<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.bwhpc.de/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=R+Rutka</id>
	<title>bwHPC Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.bwhpc.de/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=R+Rutka"/>
	<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/e/Special:Contributions/R_Rutka"/>
	<updated>2026-09-22T14:58:32Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.17</generator>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=JUSTUS2/Software/Orca&amp;diff=5666</id>
		<title>JUSTUS2/Software/Orca</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=JUSTUS2/Software/Orca&amp;diff=5666"/>
		<updated>2019-02-14T16:06:55Z</updated>

		<summary type="html">&lt;p&gt;R Rutka: /* Versions and Availability */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=600px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Description !! Content&lt;br /&gt;
|-&lt;br /&gt;
| module load&lt;br /&gt;
| chem/orca&lt;br /&gt;
|-&lt;br /&gt;
| Availability&lt;br /&gt;
| [[bwUniCluster]] &amp;amp;#124; [[BwForCluster_Chemistry]]&lt;br /&gt;
|-&lt;br /&gt;
| License&lt;br /&gt;
| [https://orcaforum.cec.mpg.de/license.html &amp;quot;Research group&amp;quot; license]&lt;br /&gt;
|-&lt;br /&gt;
|Citing&lt;br /&gt;
| [https://orcaforum.cec.mpg.de/OrcaManual.pdf As described in the manual]&lt;br /&gt;
|-&lt;br /&gt;
| Links&lt;br /&gt;
| [https://orcaforum.cec.mpg.de/ ORCA Forum Homepage] &amp;amp;#124; [https://orcaforum.cec.mpg.de/OrcaManual.pdf Documentation]&lt;br /&gt;
|-&lt;br /&gt;
| Graphical Interface&lt;br /&gt;
| No&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
= Description =&lt;br /&gt;
&#039;&#039;&#039;ORCA&#039;&#039;&#039; is a modern electronic structure program package. It is a flexible, efficient and easy-to-use general purpose tool for quantum chemistry with specific emphasis on spectroscopic properties of open-shell molecules.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
ORCA is able to carry out geometry optimizations and to predict a large number of spectroscopic parameters at different levels of theory. Besides the use of Hartee Fock theory, density functional theory (DFT) and semiempirical methods, high level ab initio quantum chemical methods, based on the configuration interaction and coupled cluster methods, are included into ORCA to an increasing degree.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Due to the user-friendly style, ORCA is considered to be a helpful tool not only for computational chemists, but also for chemists, physicists and biologists that are interested in developing the full information content of their experimental data with help of calculations. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;Implemented Methods&amp;lt;/u&amp;gt;&lt;br /&gt;
* Semiempirical INDO/S, MNDO, AM1, PM3, NDDO/1&lt;br /&gt;
* Hartee Fock theory (RHF, UHF, ROHF and CASSCF) all in direct, semidirect, or conventional mode, different RI approximations&lt;br /&gt;
* DFT including a reasonably large number of exchange and correlation functionals including hybrid DFT and the most recent double hybrid functionals (see below).&lt;br /&gt;
* High level single reference correlation models: CCSD(T), QCISD(T), CEPA, CPF (with and without RI, Local)&lt;br /&gt;
* High level ab-initio individual selecting multireference methods (MRCI, MRMP2, MRMP3, MRMP4, MRACPF, MRAQCC, SORCI, DDCI) for ground- and excited-states.&lt;br /&gt;
* Geometry optimization in redundant internal coordinates using analytical gradient techniques for all SCF methods as well as MP2.&lt;br /&gt;
* Excited state calculations via TD-DFT and CI-singles (CIS). For CIS an analytic gradient is also available. The doubles correction is available for CIS(D) in an efficient implementation.&lt;br /&gt;
* Scalar relativistic ZORA, IORA and Douglas-Kroll-Hess (DKH) approaches, picture change effects, all-electron basis sets, effective core potentials&lt;br /&gt;
* The COSMO model is available throughout the package for continuum dielectric modeling of the environment.&lt;br /&gt;
* QM/MM interface to GROMACS&lt;br /&gt;
* Double hybrid functionals including a fraction of nonlocal correlation. Analytic gradients are also available (these methods were invented by the Grimme group).&lt;br /&gt;
* Van der Waals correct density functionals.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
For more information on features please visit [https://orcaforum.cec.mpg.de/ &#039;&#039;The ORCA Portal of the Max-Planck Institute&#039;&#039;] web page.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Versions and Availability =&lt;br /&gt;
A list of versions currently available on all bwHPC-C5-Clusters can be obtained from the&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://cis-hpc.uni-konstanz.de Cluster Information System CIS]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/big&amp;gt;&lt;br /&gt;
{{#widget:Iframe&lt;br /&gt;
|url=https://cis-hpc.uni-konstanz.de/prod.cis/bwUniCluster/chem/orca&lt;br /&gt;
|width=99%&lt;br /&gt;
|height=290&lt;br /&gt;
|border=0&lt;br /&gt;
}}&lt;br /&gt;
On the command line interface of any bwHPC cluster you&#039;ll get a list of available versions by using&lt;br /&gt;
the command&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;&#039;module avail chem/orca&#039;&#039;&#039;&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module avail chem/orca               # bwUniCluster&lt;br /&gt;
--------------------- /opt/bwhpc/common/modulefiles ----------------------&lt;br /&gt;
chem/orca/3.0.1 chem/orca/3.0.3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= License =&lt;br /&gt;
The ORCA license is considered as a &amp;quot;Research group&amp;quot; license. Thus anyone who directly associated with your research group is covered by the license and may share your copy of ORCA on all computer resources of your group.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
This license only applies to academic users. Commercial use of ORCA is prohibited under the terms of this license.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[https://orcaforum.cec.mpg.de/license.html Complete ORCA Users License Agreement]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
= Usage =&lt;br /&gt;
== Loading the module ==&lt;br /&gt;
You can load the default version of &#039;&#039;ORCA&#039;&#039; with the command &#039;&#039;&#039;&#039;module load chem/orca&#039;&#039;&#039;&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load chem/orca&lt;br /&gt;
module avail chem/orca&lt;br /&gt;
------------------------ /opt/bwhpc/common/modulefiles ----------------------&lt;br /&gt;
chem/orca/3.0.3    chem/orca/3.0.3-openmpi-1.6.5(default)&lt;br /&gt;
$ module load chem/orca&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The module will try to load modules it needs to function (e.g. compiler/intel). If loading the module fails, check if you have already loaded one of those modules, but not in the version needed for Orca.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
If you wish to load a specific (older) version, you can do so using e.g.&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&#039;&#039;&#039;&#039;module load chem/orca/&#039;&#039;&#039;version&#039; to load the version you desires.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load chem/orca/3.0.1    # bwUniCluster example&lt;br /&gt;
Please do not use this module if you do not own a valid ORCA group license.&lt;br /&gt;
Please cite ORCA in your publications according to ORCA documentation.&lt;br /&gt;
Please read &#039;module help chem/orca/3.0.1&#039; before using ORCA.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;font color=red&amp;gt;Orca 3.0.3 mit OpenMPI 1.6.5 läuft stabiler! &lt;br /&gt;
Einige MPI-Abstürze sind nachweislich (gleicher Job) damit durchgelaufen.&amp;lt;br&amp;gt;&lt;br /&gt;
This version is known to be more stable with bigger jobs. Try this one if you get problems with other versions of Orca!&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;font color=green&amp;gt;This version is the default now. [[#Versions and Availability|Only available on the Chemical Cluster &#039;Justus&#039;]]!&amp;lt;/font&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Program Binaries ==&lt;br /&gt;
You can find the ORCA binaries in the main folder of the ORCA system.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
After loading the ORCA module (&#039;&#039;module load chem/orca/&#039;version&#039;&#039;&#039;) this path is also set to the local $PATH- and [[#ORCA-Specific Environments|$ORCA_BIN_DIR environments]].&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ls -x $ORCA_BIN_DIR&lt;br /&gt;
bwhpc-examples    manual           modulefiles   orca           orca_2aim         orca_2mkl&lt;br /&gt;
orca_anoint       orca_anoint_mpi  orca_asa      orca_casscf    orca_casscf_mpi   orca_chelpg&lt;br /&gt;
orca_ciprep       orca_cis         orca_cis_mpi  orca_cleanup   orca_cleanup_mpi  orca_cpcasscf&lt;br /&gt;
orca_cpscf        orca_cpscf_mpi   orca_eca      orca_ecplib    orca_eprnmr       orca_eprnmr_mpi&lt;br /&gt;
orca_euler        orca_fci         orca_fitpes   orca_gstep     orca_gtoint       orca_gtoint_mpi&lt;br /&gt;
orca_loc          orca_mapspc      orca_md       orca_mdci      orca_mdci_mpi     orca_mergefrag&lt;br /&gt;
orca_mp2          orca_mp2_mpi     orca_mrci     orca_mrci_mpi  orca_ndoint       orca_numfreq&lt;br /&gt;
orca_pc           orca_pc_mpi      orca_plot     orca_pltvib    orca_pop          orca_rel&lt;br /&gt;
orca_rocis        orca_rocis_mpi   orca_scf      orca_scfgrad   orca_scfgrad_mpi  orca_scfhess&lt;br /&gt;
orca_scfhess_mpi  orca_scf_mpi     orca_soc      orca_soc_mpi   orca_vib          orca_vpot&lt;br /&gt;
otool_cosmo       otool_gcp        otool_smd&lt;br /&gt;
$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Only the programs with the suffix &amp;lt;font color=green&amp;gt;&#039;&#039;&#039;_mpi&#039;&#039;&#039;&amp;lt;/font&amp;gt; are compiled including OPENMPI functionality.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Disk Usage ==&lt;br /&gt;
Scratch files are written to the current directory by default.&amp;lt;br&amp;gt;&lt;br /&gt;
Please change to a local directory or to &#039;&#039;&#039;your local workspace&#039;&#039;&#039; (preferred) before starting your calculations. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;calc_repo&#039; is an example name of a repository you created by using the command &#039;ws_allocate&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd $(ws_find calc_repo)&lt;br /&gt;
[&#039;your-id&#039;-calc_repo-0]$ pwd&lt;br /&gt;
/work/workspace/scratch/&#039;your-id&#039;-calc_repo-0&lt;br /&gt;
[&#039;your-id&#039;-calc_repo-0]$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
You can copy a simple interactive example to your &#039;&#039;&#039;workspace&#039;&#039;&#039; and run it, using &#039;msub&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd $(ws_find calc_repo)&lt;br /&gt;
$ cp $ORCA_EXA_DIR/bwhpc-orca-example.moab .&lt;br /&gt;
$ cp bwhpc-orca-example.moab myorcajob.moab &lt;br /&gt;
§ vi myorcajob.moab         # do your own modifications&lt;br /&gt;
$ msub myorcajob.moab       # start job submission&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
= ORCA-Specific Environments =&lt;br /&gt;
To see a list of all ORCA environments set by the &#039;module load chem/orca/version&#039;-command,&lt;br /&gt;
use &#039;&#039;&#039;&#039;env | grep ORCA&#039;&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Or try the command &#039;&#039;&#039;&#039;module show &#039;chem/orca&#039;&#039;&#039;/version&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load chem/orca/3.0.3&lt;br /&gt;
$ env | grep ORCA&lt;br /&gt;
ORCA_VERSION=3.0.3&lt;br /&gt;
ORCA_MAN_DIR=/opt/bwhpc/common/chem/orca/3.0.3/manual&lt;br /&gt;
ORCA_EXA_DIR=/opt/bwhpc/common/chem/orca/3.0.3/bwhpc-examples&lt;br /&gt;
ORCA_BIN_DIR=/opt/bwhpc/common/chem/orca/3.0.3&lt;br /&gt;
ORCA_HOME=/opt/bwhpc/common/chem/orca/3.0.3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
= Version-Specific Information =&lt;br /&gt;
For a more detailed information specific to a specific ORCA version, see the information available via the module system with the command &#039;&#039;&#039;&#039;module help chem/orca&#039;&#039;&#039;&#039;.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
For a small abstract what ORCA is about use the command &#039;&#039;&#039;&#039;module whatis chem/orca&#039;&#039;&#039;&#039;.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;Examples&amp;lt;/u&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module avail chem/orca&lt;br /&gt;
----------------------- /opt/bwhpc/common/modulefiles ---------------------------&lt;br /&gt;
chem/orca/3.0.1 chem/orca/3.0.3&lt;br /&gt;
&lt;br /&gt;
$ module whatis chem/orca/3.0.1&lt;br /&gt;
chem/orca/3.0.1      : Quantum chemistry package ORCA, version 3.0.1&lt;br /&gt;
    (command &#039;/opt/bwhpc/common/chem/orca/3.0.1/orca&#039;)&lt;br /&gt;
&lt;br /&gt;
$ module help chem/orca/3.0.1&lt;br /&gt;
----------- Module Specific Help for &#039;chem/orca/3.0.1&#039; ------------&lt;br /&gt;
This module provides the quantum chemistry package ORCA version 3.0.1&lt;br /&gt;
via command &#039;/opt/bwhpc/common/chem/orca/3.0.1/orca&#039; &lt;br /&gt;
[...] &lt;br /&gt;
Documentation: &lt;br /&gt;
*  Max-Planck-Institut fuer Chemische Energiekonversion  &lt;br /&gt;
   https://cec.mpg.de/forum/portal.php&lt;br /&gt;
*  New features for version 3.0.1&lt;br /&gt;
   https://cec.mpg.de/forum/portal.php#a3&lt;br /&gt;
*  Manuals in pdf format:&lt;br /&gt;
   /opt/bwhpc/common/chem/orca/3.0.1/manual&lt;br /&gt;
*  Example data and a Moab example script can be found here:&lt;br /&gt;
   /opt/bwhpc/common/chem/orca/3.0.1/bwhpc-examples&lt;br /&gt;
[...]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
[[Category:Chemistry software]][[Category:bwUniCluster]][[Category:bwForCluster_Chemistry]][[Category:BwForCluster_BinAC]]&lt;/div&gt;</summary>
		<author><name>R Rutka</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwForCluster_User_Access_Members_Uni_Konstanz&amp;diff=4951</id>
		<title>BwForCluster User Access Members Uni Konstanz</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwForCluster_User_Access_Members_Uni_Konstanz&amp;diff=4951"/>
		<updated>2017-07-20T09:39:47Z</updated>

		<summary type="html">&lt;p&gt;R Rutka: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;A valid account for the University of Konstanz is required to access to bwForCluster. So you need at least an employee- or student ID (Matrikelnummer).&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==  ==&lt;br /&gt;
&lt;br /&gt;
Your [[#BwForCluster_User_Access | registration request]] for a new &#039;&#039;rechenvorhaben&#039;&#039; will be delivered to your local support team at the University of Konstanz. They will automatically proof your request and set the bwForCluster-Entitlement or contact you directly if further information is necessary.&lt;br /&gt;
&lt;br /&gt;
In case of joining an existing &#039;&#039;rechenvorhaben&#039;&#039;, please contact the [http://www.rz.uni-konstanz.de/en/support/ local support] to obtain the bwForCluster-Entitlement.&lt;br /&gt;
&lt;br /&gt;
==   ==&lt;br /&gt;
&lt;br /&gt;
For more information about registration visit the related web pages and follow the instructions documented on this page.&lt;br /&gt;
&lt;br /&gt;
German version: [https://www.kim.uni-konstanz.de/services/forschen-und-lehren/high-performance-computing-in-bw/zugang-bwuni-cluster/ Zugang bwForCluster]&lt;br /&gt;
&lt;br /&gt;
English version: [https://www.kim.uni-konstanz.de/en/services/research-and-teaching/high-performance-computing-in-baden-wuerttemberg/access-to-bwunicluster/ Access bwForCluster (in progress)]&lt;/div&gt;</summary>
		<author><name>R Rutka</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=Development/Parallel_Programming&amp;diff=4628</id>
		<title>Development/Parallel Programming</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=Development/Parallel_Programming&amp;diff=4628"/>
		<updated>2016-12-05T11:11:01Z</updated>

		<summary type="html">&lt;p&gt;R Rutka: /* impi (Intel) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=600px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Description !! Content&lt;br /&gt;
|-&lt;br /&gt;
| module load&lt;br /&gt;
| mpi/impi &amp;amp;#124; mpi/openmpi &lt;br /&gt;
|-&lt;br /&gt;
| Links&lt;br /&gt;
| [https://software.intel.com/en-us/intel-mpi-library Intel® MPI Library] &amp;amp;#124; [http://www.open-mpi.org/ Open MPI] &lt;br /&gt;
|-&lt;br /&gt;
| License&lt;br /&gt;
| [https://software.intel.com/en-us/articles/intel-mpi-library-licensing-faq Intel MPI Library Licensing FAQ] &amp;lt;small&amp;gt;install-doc/EULA.txt&amp;lt;/small&amp;gt; &amp;amp;#124; [http://www.open-mpi.org/community/license.php Open MPI License]&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
= Introduction =&lt;br /&gt;
This page will provide information regarding the supported parallel programming paradigms and specific hints on their usage.&lt;br /&gt;
Please refer to the [[BwUniCluster_Environment_Modules|Modules Documentation]] how to setup your environment on bwUniCluster to load a specific software installation.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
More informations about Compilers installed at our clusters is available here:&lt;br /&gt;
* [[Intel_Compiler|Intel Compiler Suite]]&lt;br /&gt;
* [[GCC|GNU Compiler (GCC)]]&lt;br /&gt;
* [[General_compiler_usage|General Compiler Usage (incl. PGI Compiler)]]&lt;br /&gt;
&lt;br /&gt;
= Versions and Availability =&lt;br /&gt;
=== impi (Intel) ===&lt;br /&gt;
A list of versions currently available compilers on the bwHPC-C5-Clusters can be obtained from the&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;big&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[https://cis-hpc.uni-konstanz.de/prod.cis/ Cluster Information System CIS]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
{{#widget:Iframe&lt;br /&gt;
|url=https://cis-hpc.uni-konstanz.de/prod.cis/bwUniCluster/mpi/impi&lt;br /&gt;
|width=99%&lt;br /&gt;
|height=1200&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== openmpi ===&lt;br /&gt;
A list of versions currently available compilers on the bwHPC-C5-Clusters can be obtained from the&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;big&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[https://cis-hpc.uni-konstanz.de/prod.cis/ Cluster Information System CIS]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
{{#widget:Iframe&lt;br /&gt;
|url=https://cis-hpc.uni-konstanz.de/prod.cis/bwUniCluster/mpi/openmpi&lt;br /&gt;
|width=99%&lt;br /&gt;
|height=2100&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= OpenMP =&lt;br /&gt;
== General Information ==&lt;br /&gt;
OpenMP is a mature specification [http://openmp.org/wp/openmp-specifications/] to allow easy, portable, and most importantly incremental node-level parallelisation of code.&lt;br /&gt;
Being a thread-based approach, OpenMP is aimed at more fine-grained parallelism than [[BwHPC_Best_Practices_Repository#MPI|MPI]].&lt;br /&gt;
Although there have been extensions to extend OpenMP for inter-node parallelisation, it is a node-level approach aimed to make best usage of a node&#039;s cores&amp;lt;!-- -- the section [[#Hybrid Parallelisation|Hybrid Parallelisation]] will explain how to parallelise utilizing MPI plus a thread-based parallelization paradigm like OpenMP--&amp;gt;.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
With regard to ease-of-use, OpenMP is ahead of any other common approach: the source-code is annotated using &amp;lt;tt&amp;gt;#pragma omp&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;!$omp&amp;lt;/tt&amp;gt; statements, in C/C++ and Fortran respectively.&lt;br /&gt;
Whenever the compiler encompasses a semantic block of code encapsulated in a parallel region, this block of code is transparently compiled into a function, which is passed to a so-called team-of-threads upon entering this semantic block. This fork-join model of execution eases a lot of the programmer&#039;s pain involved with Threads.&lt;br /&gt;
Being a loop-centric approach, OpenMP is aimed at codes with long/time-consuming loops.&lt;br /&gt;
A single combined directive &amp;lt;tt&amp;gt;pragma omp parallel for&amp;lt;/tt&amp;gt; will tell the compiler to automatically parallel the ensuing for-loop.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The following example is a bit more advanced in that even reductions of variables over multiple threads are easily to parallel:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
   for (int i=0, sum = 0.0; i &amp;lt; VECTOR_LEN; i++)&lt;br /&gt;
     norm2 += (v[i]*v[i]);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
is parallelized by just adding a single line as in:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
#  pragma omp parallel for reduction(+:norm2)&lt;br /&gt;
   for (int i=0, sum = 0.0; i &amp;lt; VECTOR_LEN; i++)&lt;br /&gt;
     norm2 += (v[i]*v[i]);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
With &amp;lt;tt&amp;gt;VECTOR_LENGTH&amp;lt;/tt&amp;gt; being large enough, this piece of code compiled with OpenMP will run in parallel, exhibiting very nice speedup.&lt;br /&gt;
Compiled without, the code remains as is. Developpers may therefore incrementally parallelize their application based on the profile derived from performance analysis tools, starting with the most time-consuming loops.&lt;br /&gt;
Using OpenMP&#039;s concise API, one may query the number of running threads, the number of processors, a time to calculate runtime, and even set parameters such as the number of threads to execute a parallel region.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The OpenMP-4.0 specification added support for the SIMD-directive to better utilize SIMD-vectorization, as well as integrating directives to offload computation to accelerators using the &amp;lt;tt&amp;gt;target&amp;lt;/tt&amp;gt; directive: these are integrated into the Intel Compiler and are actively being worked on for the GNU compiler, some restrictions may apply.&lt;br /&gt;
== OpenMP Best Practice Guide ==&lt;br /&gt;
The following silly example to calculate the squared Euklidian Norm shows some techniques:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;omp.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#define VECTOR_LENGTH 5&lt;br /&gt;
&lt;br /&gt;
int main (int argc, char * argv[])&lt;br /&gt;
{&lt;br /&gt;
    int len = VECTOR_LENGTH;&lt;br /&gt;
    int i;&lt;br /&gt;
    double * v;&lt;br /&gt;
    double norm2 = 0.0;&lt;br /&gt;
    double t1, tdiff;&lt;br /&gt;
&lt;br /&gt;
    if (argc &amp;gt; 1)&lt;br /&gt;
        len = atoi (argv[1]);&lt;br /&gt;
    v = malloc (len * sizeof(double));&lt;br /&gt;
&lt;br /&gt;
    t1 = omp_get_wtime();&lt;br /&gt;
    // Initialization already with (the same number of) threads&lt;br /&gt;
#pragma omp parallel for&lt;br /&gt;
    for (i=0; i &amp;lt; len; i++) {&lt;br /&gt;
        v[i] = i;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // Now aggregate the sum-of-squares by specifying a reduction&lt;br /&gt;
#pragma omp parallel for reduction(+:norm2)&lt;br /&gt;
    for(i=0; i &amp;lt; len; i++) {&lt;br /&gt;
        norm2 += (v[i]*v[i]);&lt;br /&gt;
    }&lt;br /&gt;
    tdiff = omp_get_wtime() - t1;&lt;br /&gt;
&lt;br /&gt;
    printf (&amp;quot;norm2: %f Time:%f\n&amp;quot;, norm2, tdiff);&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;!-- Specific OpenMP hints: default(none), reproducability, thread-safey --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Group independent parallel sections together: in the above example, You may combine those two sections into one larger parallel block. This will just once enter the parallel region (in the fork-join model) instead of twice. Especially in inner loops, this will considerably decrease overhead.&lt;br /&gt;
* Compile with the Intel compiler&#039;s option &amp;lt;tt&amp;gt;-diag-enable sc-parallel3&amp;lt;/tt&amp;gt; to get the further warnings on thread-safety, performance, etc. The following code with loop-carried dependency will e.g. compile fine (aka without warning):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
#pragma omp parallel for reduction(+:norm2)&lt;br /&gt;
    for(i=1; i &amp;lt; len-1; i++) {&lt;br /&gt;
        v[i] = v[i-1]+v[i+1];&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
However the Intel compiler with &amp;lt;tt&amp;gt;-diag-enable sc-parallel3&amp;lt;/tt&amp;gt; will produce the following warning:&lt;br /&gt;
&amp;lt;tt&amp;gt;warning #12246: variable &amp;quot;v&amp;quot; has loop carried data dependency that may lead to incorrect program execution in parallel mode; see (file:omp_norm2.c line:32)&amp;lt;/tt&amp;gt;&lt;br /&gt;
* Always specify &amp;lt;tt&amp;gt;default(none)&amp;lt;/tt&amp;gt; on larger parallel regions in order to specifically set the visibility of variables to either &amp;lt;tt&amp;gt;shared&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;private&amp;lt;/tt&amp;gt;.&lt;br /&gt;
* Try to restructure code to allow for &amp;lt;tt&amp;gt;nowait&amp;lt;/tt&amp;gt;: OpenMP defines synchronization points (implied barriers) at the end of work sharing constructs such as the &amp;lt;tt&amp;gt;pragma omp for&amp;lt;tt&amp;gt; directive. If the ensuing section of code does not depend on data being generated inside the parallel section, adding the &amp;lt;tt&amp;gt;nowait&amp;lt;/tt&amp;gt; clause to the worksharing directive allows the compiler to eliminate this synchronization point. This reduces overhead, allows for better overlap and better utilization of the processor&#039;s resources. This might imply however to restructure the code (move portions of independent code in between dependent works-sharing constructs).&lt;br /&gt;
== Usage ==&lt;br /&gt;
OpenMP is supported by various compilers, here the usage for two main compilers [[BwHPC_BPG_Compiler#GCC|GCC]] and [[BwHPC_BPG_Compiler#Intel Suite|Intel Suite]] are introduced.&lt;br /&gt;
For both compilers, You first need to turn on OpenMP support by specifying a parameter on the compiler&#039;s command-line.&lt;br /&gt;
In case You make function calls to OpenMP&#039;s API, You also need to include the header-file &amp;lt;tt&amp;gt;omp.h&amp;lt;/tt&amp;gt;.&lt;br /&gt;
OpenMP&#039;s API allows to query or set the number of threads, query the number of processors, get a wall-clock time to measure execution times, etc.&lt;br /&gt;
=== OpenMP with GNU Compiler Collection ===&lt;br /&gt;
Starting with version 4.2 the gcc compiler supports OpenMP-2.5.&lt;br /&gt;
Since then the analysis capabilities of the GNU compiler have steadily improved.&lt;br /&gt;
The installed compilers support OpenMP-3.1.&lt;br /&gt;
&amp;lt;!-- Starting with gcc-4.9 OpenMP-4.0 is supported, however the &amp;lt;tt&amp;gt;target&amp;lt;/tt&amp;gt; directive will only offload to the host processor. --&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
To use OpenMP with the gcc-compiler, pass &amp;lt;tt&amp;gt;-fopenmp&amp;lt;/tt&amp;gt; as parameter.&lt;br /&gt;
=== OpenMP with Intel Compiler ===&lt;br /&gt;
The Intel Compiler&#039;s support for OpenMP is more advanced than gcc&#039;s -- especially in term of programmer support.&lt;br /&gt;
To use OpenMP with the Intel compiler, pass &amp;lt;tt&amp;gt;-openmp&amp;lt;/tt&amp;gt; as command-line parameter.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
One may get very insightful information about OpenMP, when compiling with&lt;br /&gt;
* Compiling with &amp;lt;tt&amp;gt;-openmp-report2&amp;lt;/tt&amp;gt; to get information, which loops were parallelized and a reason why not.&lt;br /&gt;
* Compiling with &amp;lt;tt&amp;gt;-diag-enable sc-parallel3&amp;lt;/tt&amp;gt; to get errors and warnings about your sources weaknesses with regard to parallelization (see example below).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------------------------------------------- --&amp;gt;&lt;br /&gt;
= MPI =&lt;br /&gt;
In this section, You will find information regarding the supported installations of the Message-Passing Interface libraries and their usage.&amp;lt;br&amp;gt;&lt;br /&gt;
Due to the Fortran interface ABI, all MPI-libraries are normally bound to a specific compiler-vendor and even the specific compiler version.&lt;br /&gt;
Therefore, as listed in [[BwHPC_BPG_Compiler]] two compilers are supported on bwUniCluster: [[GCC|GCC]] and [[Intel_Compiler|Intel Compiler Suite]].&lt;br /&gt;
As both compilers are continously improving, the communication libraries will be adopted in lock-step.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
With a set of different implementations, there comes the problem of choice. These pages should inform the user of the communication libraries, what considerations should be done with regard to performance, maintainability and debugging -- in general tool support -- of the various implementations.&lt;br /&gt;
== MPI Introduction ==&lt;br /&gt;
The Message-Passing Interface is a standard provided by the [http://www.mpi-forum.org MPI-Forum] which regularly convenes for the [http://meetings.mpi-forum.org MPI-Forum Meetings] to update this standard. The current version is MPI-3.0 available as [http://mpi-forum.org/docs/mpi-3.0/mpi30-report.pdf PDF].&lt;br /&gt;
This document defines the API of over 300 functions for the C- and the Fortran-language -- however, You will certainly not need all of them to begin with.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Every MPI-conforming program needs to call &amp;lt;tt&amp;gt;MPI_Init()&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;MPI_Finalize()&amp;lt;/tt&amp;gt; upon start and shutdown -- or &amp;lt;tt&amp;gt;MPI_Abort()&amp;lt;/tt&amp;gt; in case of an abnormal termination.&lt;br /&gt;
After initialization the programm may call any other MPI-function, specifically communication functions.&lt;br /&gt;
However to do so, it is required to find out how many processes the program has been started with, using &amp;lt;tt&amp;gt;MPI_Comm_size()&amp;lt;/tt&amp;gt; and what number (here called a rank= this particular process has using &amp;lt;tt&amp;gt;MPI_Comm_rank()&amp;lt;/tt&amp;gt;.&lt;br /&gt;
Communication is always relative to a so-called communicator -- the default one after initialization being called &amp;lt;tt&amp;gt;MPI_COMM_WORLD&amp;lt;/tt&amp;gt;- &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
There&#039;s basically three ways of communication:&lt;br /&gt;
* two-sided communication using point-to-point (often abbreviated P2P) functions, such as &amp;lt;tt&amp;gt;MPI_Send()&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;MPI_Recv()&amp;lt;/tt&amp;gt;, which always involves two participating processes,&lt;br /&gt;
* collectice communcation functions (often abbreviated as colls) involve multiple processes, examples are &amp;lt;tt&amp;gt;MPI_Bcast()&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;MPI_Reduce()&amp;lt;/tt&amp;gt;, &lt;br /&gt;
* one-sided communication, where communication between two processes is initiated by one-process, only. With proper RMA-hardware support and careful programming, this may allow higher performance or scalibility.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
All parts of the programm, which reference MPI functionality need to be compiled with the &#039;&#039;&#039;same&#039;&#039;&#039; compiler settings/include files and linked to the same MPI-Library. This is stressed here, since without taking pre-cautions, a different MPI&#039;s header may be included, resulting in funny errors: consider that Intel MPI is derived from MPIch, with MPI-datatypes being C &amp;lt;tt&amp;gt;int&amp;lt;/tt&amp;gt;s, while Open MPI uses pointers to structures (the former being 4, the latter being 8 bytes on bwUniCluster).&lt;br /&gt;
To ease the programmer&#039;s life, MPI implementations offer compiler-wrappers, e.g. &amp;lt;tt&amp;gt;mpicc&amp;lt;/tt&amp;gt; for C and &amp;lt;tt&amp;gt;mpif90&amp;lt;/tt&amp;gt; for Fortran90 for compilation and linking, taking care to include all required libraries.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
All programs must be started using the &amp;lt;tt&amp;gt;mpirun&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;mpiexec&amp;lt;/tt&amp;gt; command. Depending on the actual implementation, it uses different arguments, however the following works with any MPI:&lt;br /&gt;
* &amp;lt;tt&amp;gt;mpirun -np 128 ./app&amp;lt;/tt&amp;gt; starts 128 processes (with ranks 0 to 127)&lt;br /&gt;
* &amp;lt;tt&amp;gt;mpiexec -n 128 -hostfile mynodes.txt ./app&amp;lt;/tt&amp;gt; starts 128 processes on only the nodes listed line-by-line in the provided text-file &amp;lt;tt&amp;gt;mynodes.txt&amp;lt;/tt&amp;gt;.&lt;br /&gt;
* &amp;lt;tt&amp;gt;mpiexec -n 64 ./app1 : -n 64 ./app2&amp;lt;/tt&amp;gt; starts 128 processes, 64 of which execute &amp;lt;tt&amp;gt;app1&amp;lt;/tt&amp;gt;, the other 64 execute &amp;lt;tt&amp;gt;app2&amp;lt;/tt&amp;gt;. All processes however participate in the same &amp;lt;tt&amp;gt;MPI_COMM_WORLD&amp;lt;/tt&amp;gt; and therefore must accordingly take care about their respective ranks.&lt;br /&gt;
Please note, that process placement (e.g. a round-robin scheme), and specifically process-binding to sockets is MPI-implementation dependant.&lt;br /&gt;
== MPI Best Practice Guide ==&lt;br /&gt;
Specific performance considerations with regard to MPI (independent of the implementation):&lt;br /&gt;
* No communication at all is best: Only communicate between processes if at all necessary. Consider that file-access is &amp;quot;communication&amp;quot; as well.&lt;br /&gt;
* If communication is done with multiple processes, try to involve as many processes in just one call: MPI optimizes the communication pattern for so-called &amp;quot;collective communication&amp;quot; to take advantage of the underlying network (with regard to network topology, message sizes, queueing capabilities of the network interconnect, etc.). Therefore try to always think in collective communication, if a communication pattern involves a group of processes.&lt;br /&gt;
* Try to group processes together: Function calls like &amp;lt;tt&amp;gt;MPI_Cart_create&amp;lt;/tt&amp;gt; will come in handy for applications with cartesian domains but also general communicators derived from &amp;lt;tt&amp;gt;MPI_COMM_WORLD&amp;lt;/tt&amp;gt; using &amp;lt;tt&amp;gt;MPI_Comm_split()&amp;lt;/tt&amp;gt; may benefit by MPI&#039;s knowing the underlying network topology. Use MPI3&#039;s &amp;lt;tt&amp;gt;MPI_Comm_split_type()&amp;lt;/tt&amp;gt; with &amp;lt;tt&amp;gt;MPI_COMM_TYPE_SHARED&amp;lt;/tt&amp;gt; for a sub-communicator with processes having access to the same shared memory region (aka on bwUniCluster the same node).&lt;br /&gt;
* File-accesses to load / store data &#039;&#039;&#039;must&#039;&#039;&#039; be done collectively: Writing to storage, or even reading the initialization data -- all of which involves getting data from/to all MPI processes -- must be done collectively. MPI&#039;s Parallel IO offers a rich API to read and distribute the data access -- in order to take advantage of parallel filesystems like Lustre. A many-fold performance improvement may be seen by writing data in large chunks in collective fashion -- and at the same time being nice to other users and applications. &lt;br /&gt;
* Try to hide the communication by computation: Try to hide (some) of the cost of communication of Point-to-point communication by using non-blocking / immediate P2P-calls (&amp;lt;tt&amp;gt;MPI_Isend&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;MPI_Irecv&amp;lt;/tt&amp;gt; et al, followed by &amp;lt;tt&amp;gt;MPI_Wait&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;MPI_Test&amp;lt;/tt&amp;gt; et al). This may allow the MPI-implementation to initiate or even offload communication to the network interconnect and resume executing your application, while data is being transferred. MPI-3 adds non-blocking collectives, e.g. &amp;lt;tt&amp;gt;MPI_Ibcast()&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;MPI_Iallreduce()&amp;lt;/tt&amp;gt;. For extra credit, explain the use-cases of &amp;lt;tt&amp;gt;MPI_Ibarrier()&amp;lt;/tt&amp;gt;.&lt;br /&gt;
* Every call to MPI may trigger an access to physical hardware -- limit it: When calling communication-related functions such as &amp;lt;tt&amp;gt;MPI_Test&amp;lt;/tt&amp;gt; to check whether a specific communication has finished, the queue of the network adapter may need to be queried. This memory access or even physical hardware access to query the state will cost cycles. Therefore, the programmer should combine multiple requests with functions such as &amp;lt;tt&amp;gt;MPI_Waitall()&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;MPI_Waitany()&amp;lt;/tt&amp;gt; or their Test*-counterparts.&lt;br /&gt;
* Make usage of derived datatypes: instead of manually copying data into temporary, even newly allocated memory, describe the data-layout to MPI -- and let the implementation, or even the network HCA&#039;s hardware do the data fetching.&lt;br /&gt;
* Bind Your processes to sockets: Operating Systems are good in making best use of the ressources -- which sometimes involves moving tasks from one core to another, or even (though more unlikely since the OS&#039; heuristics try to avoid it) to another socket, with the obvious effects: Caches are cold, every memory access to memory allocated on the previous socket &amp;quot;has to travel the bus&amp;quot;. This is particularly happening if You have multiple OpenMP parallel regions which are separated by code that does IO -- and threads are sleeping -- the processes doing IO may wander to a different socket... Bind Your processes to at least the socket. All major MPIs support this binding (see below).&lt;br /&gt;
* Do not use the C++ interface: First of all, it has been marked as deprecated in the MPI-3.0 standard, since it added little benefit to C++ programmers over the C-interface. Moreover, since MPI implementations are written in C, the interface adds another level of indirection and therefore a bit of overhead in terms of instructions and Cache misses.&lt;br /&gt;
== Open MPI ==&lt;br /&gt;
The [http://www.open-mpi.org Open MPI] library is an open, flexible and nevertheless performant implementation of MPI-2 and MPI-3. Licensed under BSD, it is being actively developed by an open community of industry and research institutions.&lt;br /&gt;
The flexibility comes in handy: using the concept of a [http://www.open-mpi.org/faq/?category=tuning#mca-def MCA] (aka a plugin) Open MPI supports many different network interconnects (Infinband, TCP, Cray, etc.) , on the other hand, a installation may be tailored to suite an installation, e.g. the network (Infiniband with specific settings), the main startup-mechanism, etc.&lt;br /&gt;
Furthermore, the [http://www.open-mpi.org/faq/ FAQ] offers hints on [http://www.open-mpi.org/faq/?category=tuning performance tuning].&lt;br /&gt;
=== Usage ===&lt;br /&gt;
Like other MPI implementations, after loading the [[BwUniCluster_Environment_Modules|module]], Open MPI provides the compiler-wrappers &amp;lt;tt&amp;gt;mpicc&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;mpicxx&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;mpifort&amp;lt;/tt&amp;gt;  (or for&lt;br /&gt;
versions lower than 1.7 &amp;lt;tt&amp;gt;mpif77&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;mpif90&amp;lt;/tt&amp;gt;) for the C-, C++ and Fortran compilers respectively. Albeit their usage is not required, these wrappers are handy to not have to use the command-line options for header- or library directories, aka &amp;lt;tt&amp;gt;-I&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;-L&amp;lt;/tt&amp;gt;, as well as the actual needed MPI-libraries itselve.&lt;br /&gt;
=== Further information === &lt;br /&gt;
Open MPI also features a few specific functionalities that will help users and developpers, alike:&lt;br /&gt;
* Open MPI&#039;s tool &amp;lt;tt&amp;gt;ompi_info&amp;lt;/tt&amp;gt; allows seeing all of Open MPI&#039;s installed MCA components and their specific options.&lt;br /&gt;
Without any option the user gets a list of flags, the Open MPI installation was compiled for (version of compilers, specific configure-flags, e.g. debugging, or profiling options). Furthermore, using &amp;lt;tt&amp;gt;ompi_info --param all all&amp;lt;/tt&amp;gt; one may see all of the MCA&#039;s options, e.g. that the default PML-MCA uses an initial free-list of 4 blocks (increased by 64 upon first encountering this limit):&lt;br /&gt;
&amp;lt;tt&amp;gt;ompi_info --param ob1 all&amp;lt;/tt&amp;gt; -- which may be increased for applications that are certain to benefit from a larger value upon startup.&lt;br /&gt;
* Open MPI allows adapting MCA parameters on the command-line: parameters may be supplied, e.g. the above-mentioned parameter &amp;lt;tt&amp;gt;mpirun -np 128 --mca mpirun -np 16 --mca pml_ob1_free_list_num 128 ./mpi_stub&amp;lt;/tt&amp;gt;.&lt;br /&gt;
* Open MPI internally uses the tool [http://www.open-mpi.org/projects/hwloc/ hwloc] for node-local processor-information, as well as process- and memory-affinity. This tool also is a good tool to get information on the node&#039;s processor topology and Cache-information. This may be used to optimize and balance memory usage or for choosing a better ratio of MPI processes per node vs. OpenMP threads per core.&lt;br /&gt;
== Intel (i)MPI ==&lt;br /&gt;
The Intel MPI Library is a multi-fabric message passing library that implements the Message Passing Interface, v2.2 (MPI-2.2) specification. It provides a standard library across Intel&lt;br /&gt;
platforms that enable adoption of MPI-2.2 functions as their needs dictate.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The Intel MPI Library enables developers to change or to upgrade processors and interconnects as new technology becomes available without changes to the software or to the operating environment.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The library is provided in the following kits:&lt;br /&gt;
* The Intel MPI Library Runtime Environment (RTO) has the tools you need to run programs, including Multipurpose Daemon (MPD), Hydra and supporting utilities, shared (.so) libraries, and documentation.&lt;br /&gt;
* The Intel MPI Library Development Kit (SDK) includes all of the Runtime Environment components plus compilation tools, including compiler commands such as &amp;lt;b&amp;gt;mpiicc&amp;lt;/b&amp;gt;, include files and modules, static (.a) libraries, debug libraries, trace libraries, and test codes.&lt;br /&gt;
=== General information  ===&lt;br /&gt;
All Intel mpi-modules are called &#039;&#039;&#039;&#039;mpi/impi&#039;&#039;&#039;&#039;.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
These modules provides the Intel Message Passing Interface (mpicc, mpicxx, mpif77&lt;br /&gt;
and mpif90) for the Intel compiler suite (icc, icpc and ifort) &amp;lt;small&amp;gt;(see also [http://software.intel.com/en-us/intel-mpi-library Intel MPI Library])&amp;lt;/small&amp;gt;.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The corresponding Intel compiler module is loaded automatically (if not done before). &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;font color=red&amp;gt;Compiler and MPI module must fit. Don&#039;t mix incongruous versions!&amp;lt;/font&amp;gt;&lt;br /&gt;
=== Usage ===&lt;br /&gt;
The following table lists available MPI compiler commands and the underlying compilers, compiler families, languages, and application binary interfaces (ABIs) that they support.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;The Intel MPI Library Compiler Drivers&amp;lt;/u&amp;gt;&lt;br /&gt;
{| width=600px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Compiler Command !! Default Compiler !! Supported Language(s) !! Supported ABI&#039;s&lt;br /&gt;
|-&lt;br /&gt;
| colspan=4 style=&amp;quot;background-color:#DCDCDC;&amp;quot; | Generic Compilers &lt;br /&gt;
|-&lt;br /&gt;
| mpicc || gcc, cc  || C || 32/64 bit &lt;br /&gt;
|-&lt;br /&gt;
| mpicxx || g++ || C/C++ || 32/64 bit &lt;br /&gt;
|-&lt;br /&gt;
| mpifc || gfortran || Fortran77/Fortran 95 || 32/64 bit&lt;br /&gt;
|-&lt;br /&gt;
| colspan=4 style=&amp;quot;background-color:#DCDCDC;&amp;quot; | [[GCC|GNU Compiler]] Versions 3 and higher &lt;br /&gt;
|-&lt;br /&gt;
| mpigcc || gcc || C || 32/64 bit &lt;br /&gt;
|-&lt;br /&gt;
| mpigxx || g++  || C/C++ || 32/64 bit &lt;br /&gt;
|-&lt;br /&gt;
| mpif77 || g77 || Fortran 77 || 32/64 bit &lt;br /&gt;
|-&lt;br /&gt;
| mpif90 || gfortran || Fortran 95 || 32/64 bit&lt;br /&gt;
|-&lt;br /&gt;
| colspan=4 style=&amp;quot;background-color:#DCDCDC;&amp;quot; | [[Intel_Compiler|&#039;&#039;&#039;Intel Fortran, C++ Compilers&#039;&#039;&#039;]] Versions 13.1 through 14.0 and Higher&lt;br /&gt;
|-&lt;br /&gt;
| mpiicc || icc || C || 32/64 bit &lt;br /&gt;
|-&lt;br /&gt;
| mpiicpc || icpc || C++ || 32/64 bit &lt;br /&gt;
|-&lt;br /&gt;
|impiifort  || ifort || Fortran77/Fortran 95 || 32/64 bit &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
* Compiler commands are available only in the Intel MPI Library Development Kit.&lt;br /&gt;
* Compiler commands are in the &amp;lt;installdir&amp;gt;/&amp;lt;arch&amp;gt;/bin directory. Where &amp;lt;installdir&amp;gt; refers to the Intel MPI Library installation directory (depending on the loaded mpi module) and &amp;lt;arch&amp;gt; is one of the following architectures:&lt;br /&gt;
* ia32 - IA-32 architecture&lt;br /&gt;
* intel64 - Intel 64 architecture&lt;br /&gt;
* mic – Intel Xeon Phi™ Coprocessor architecture&lt;br /&gt;
* Ensure that the corresponding underlying compilers (32-bit or 64-bit, as appropriate) are already in your PATH. This is normally done by the &#039;module load&#039; command. &lt;br /&gt;
* To port existing MPI-enabled applications to the Intel MPI Library, recompile all sources.&lt;br /&gt;
* To display mini-help of a compiler command, execute it without any parameters.&lt;br /&gt;
&lt;br /&gt;
=== Further information ===&lt;br /&gt;
==== Intel MPI without multithreading on the bwUniCluster ====&lt;br /&gt;
* [[Batch_Jobs_-_bwUniCluster_Features#Intel_MPI_without_Multithreading|Additional Infos about Intel MPI without Multithreading]]&lt;br /&gt;
==== Sample MPI programm in &amp;quot;C&amp;quot; ====&lt;br /&gt;
The following example  code includes a sample MPI program written in C.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
#******************************************************************************&lt;br /&gt;
# Content: (exemplify version)&lt;br /&gt;
#      Based on a Monto Carlo method, this MPI sample code uses volumes to&lt;br /&gt;
#      estimate the number PI.&lt;br /&gt;
#*****************************************************************************/&lt;br /&gt;
#include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;math.h&amp;gt;&lt;br /&gt;
#include &amp;lt;time.h&amp;gt;&lt;br /&gt;
#include &amp;lt;math.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
// here you&#039;l include the main MPI-library&lt;br /&gt;
#include &amp;quot;mpi.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#define MASTER 0&lt;br /&gt;
#define TAG_HELLO 4&lt;br /&gt;
#define TAG_TEST 5&lt;br /&gt;
#define TAG_TIME 6&lt;br /&gt;
&lt;br /&gt;
int main(int argc, char *argv[]) {&lt;br /&gt;
  int i, id, remote_id, num_procs;&lt;br /&gt;
   &lt;br /&gt;
  MPI_Status stat;&lt;br /&gt;
  int namelen;&lt;br /&gt;
  char name[MPI_MAX_PROCESSOR_NAME];&lt;br /&gt;
&lt;br /&gt;
  // Start MPI.&lt;br /&gt;
  if (MPI_Init (&amp;amp;argc, &amp;amp;argv) != MPI_SUCCESS) {&lt;br /&gt;
      printf (&amp;quot;Failed to initialize MPIn&amp;quot;);&lt;br /&gt;
      return (-1);&lt;br /&gt;
  }&lt;br /&gt;
  // Create the communicator, and retrieve the number of processes.&lt;br /&gt;
  MPI_Comm_size (MPI_COMM_WORLD, &amp;amp;num_procs);&lt;br /&gt;
&lt;br /&gt;
  // Determine the rank of the process.&lt;br /&gt;
  MPI_Comm_rank (MPI_COMM_WORLD, &amp;amp;id);&lt;br /&gt;
&lt;br /&gt;
  // Get machine name&lt;br /&gt;
  MPI_Get_processor_name (name, &amp;amp;namelen);&lt;br /&gt;
  &lt;br /&gt;
  if (id == MASTER) {&lt;br /&gt;
      printf (&amp;quot;Hello world: rank %d of %d running on %sn&amp;quot;, id, num_procs, name);&lt;br /&gt;
&lt;br /&gt;
  for (i = 1; i&amp;lt;num_procs; i++) {	&lt;br /&gt;
      MPI_Recv (&amp;amp;remote_id, 1, MPI_INT, i, TAG_HELLO, MPI_COMM_WORLD, &amp;amp;stat);	&lt;br /&gt;
      MPI_Recv (&amp;amp;num_procs, 1, MPI_INT, i, TAG_HELLO, MPI_COMM_WORLD, &amp;amp;stat);  		&lt;br /&gt;
      MPI_Recv (&amp;amp;namelen, 1, MPI_INT, i, TAG_HELLO, MPI_COMM_WORLD, &amp;amp;stat);			&lt;br /&gt;
      MPI_Recv (name, namelen+1, MPI_CHAR, i, TAG_HELLO, MPI_COMM_WORLD, &amp;amp;stat);&lt;br /&gt;
			&lt;br /&gt;
      printf (&amp;quot;Hello world: rank %d of %d running on %sn&amp;quot;, remote_id, num_procs, name);&lt;br /&gt;
      }&lt;br /&gt;
  }&lt;br /&gt;
  else {	    &lt;br /&gt;
      MPI_Send (&amp;amp;id, 1, MPI_INT, MASTER, TAG_HELLO, MPI_COMM_WORLD);&lt;br /&gt;
      MPI_Send (&amp;amp;num_procs, 1, MPI_INT, MASTER, TAG_HELLO, MPI_COMM_WORLD);&lt;br /&gt;
      MPI_Send (&amp;amp;namelen, 1, MPI_INT, MASTER, TAG_HELLO, MPI_COMM_WORLD);&lt;br /&gt;
      MPI_Send (name, namelen+1, MPI_CHAR, MASTER, TAG_HELLO, MPI_COMM_WORLD);&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
   // Rank 0 distributes seek randomly to all processes.&lt;br /&gt;
  double startprocess, endprocess;&lt;br /&gt;
&lt;br /&gt;
  int distributed_seed = 0;&lt;br /&gt;
  int *buff;&lt;br /&gt;
&lt;br /&gt;
  buff = (int *)malloc(num_procs * sizeof(int));&lt;br /&gt;
	&lt;br /&gt;
  unsigned int MAX_NUM_POINTS = pow (2,32) - 1;&lt;br /&gt;
  unsigned int num_local_points = MAX_NUM_POINTS / num_procs;&lt;br /&gt;
&lt;br /&gt;
  if (id == MASTER) {		  &lt;br /&gt;
      srand (time(NULL));&lt;br /&gt;
  &lt;br /&gt;
      for (i=0; i&amp;lt;num_procs; i++) {           &lt;br /&gt;
          distributed_seed = rand();&lt;br /&gt;
          buff[i] = distributed_seed;&lt;br /&gt;
     }  &lt;br /&gt;
  }&lt;br /&gt;
  // Broadcast the seed to all processes&lt;br /&gt;
  MPI_Bcast(buff, num_procs, MPI_INT, MASTER, MPI_COMM_WORLD);&lt;br /&gt;
&lt;br /&gt;
  // At this point, every process (including rank 0) has a different seed. Using their seed,&lt;br /&gt;
  // each process generates N points randomly in the interval [1/n, 1, 1]&lt;br /&gt;
  startprocess = MPI_Wtime();&lt;br /&gt;
&lt;br /&gt;
  srand (buff[id]);&lt;br /&gt;
&lt;br /&gt;
  unsigned int point = 0;&lt;br /&gt;
  unsigned int rand_MAX = 128000;&lt;br /&gt;
  float p_x, p_y, p_z;&lt;br /&gt;
  float temp, temp2, pi;&lt;br /&gt;
  double result;&lt;br /&gt;
  unsigned int inside = 0, total_inside = 0;&lt;br /&gt;
&lt;br /&gt;
  for (point=0; point&amp;lt;num_local_points; point++) {&lt;br /&gt;
      temp = (rand() % (rand_MAX+1));&lt;br /&gt;
      p_x = temp / rand_MAX;&lt;br /&gt;
      p_x = p_x / num_procs;&lt;br /&gt;
      &lt;br /&gt;
      temp2 = (float)id / num_procs;	// id belongs to 0, num_procs-1&lt;br /&gt;
      p_x += temp2;&lt;br /&gt;
      &lt;br /&gt;
      temp = (rand() % (rand_MAX+1));&lt;br /&gt;
      p_y = temp / rand_MAX;&lt;br /&gt;
      &lt;br /&gt;
      temp = (rand() % (rand_MAX+1));&lt;br /&gt;
      p_z = temp / rand_MAX;&lt;br /&gt;
&lt;br /&gt;
      // Compute the number of points residing inside of the 1/8 of the sphere&lt;br /&gt;
      result = p_x * p_x + p_y * p_y + p_z * p_z;&lt;br /&gt;
&lt;br /&gt;
      if (result &amp;lt;= 1) inside++;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  double elapsed = MPI_Wtime() - startprocess;&lt;br /&gt;
&lt;br /&gt;
  MPI_Reduce (&amp;amp;inside, &amp;amp;total_inside, 1, MPI_UNSIGNED, MPI_SUM, MASTER, MPI_COMM_WORLD);&lt;br /&gt;
&lt;br /&gt;
#if DEBUG &lt;br /&gt;
  printf (&amp;quot;rank %d counts %u points inside the spheren&amp;quot;, id, inside);&lt;br /&gt;
#endif&lt;br /&gt;
  if (id == MASTER) {&lt;br /&gt;
      double timeprocess[num_procs];&lt;br /&gt;
&lt;br /&gt;
      timeprocess[MASTER] = elapsed;&lt;br /&gt;
      printf(&amp;quot;Elapsed time from rank %d: %10.2f (sec) n&amp;quot;, MASTER, timeprocess[MASTER]);&lt;br /&gt;
      for (i=1; i&amp;lt;num_procs; i++) {&lt;br /&gt;
	  // Rank 0 waits for elapsed time value &lt;br /&gt;
	  MPI_Recv (&amp;amp;timeprocess[i], 1, MPI_DOUBLE, i, TAG_TIME, MPI_COMM_WORLD, &amp;amp;stat); &lt;br /&gt;
	  printf(&amp;quot;Elapsed time from rank %d: %10.2f (sec) n&amp;quot;, i, timeprocess[i]);&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
      temp = 6 * (float)total_inside;&lt;br /&gt;
      pi = temp / MAX_NUM_POINTS;   &lt;br /&gt;
      printf ( &amp;quot;Out of %u points, there are %u points inside the sphere =&amp;gt; pi=%16.12fn&amp;quot;,&lt;br /&gt;
          MAX_NUM_POINTS, total_inside, pi);&lt;br /&gt;
  }&lt;br /&gt;
  else {&lt;br /&gt;
      // Send back the processing time (in second)&lt;br /&gt;
      MPI_Send (&amp;amp;elapsed, 1, MPI_DOUBLE, MASTER, TAG_TIME, MPI_COMM_WORLD);&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  free(buff);&lt;br /&gt;
&lt;br /&gt;
  // Terminate MPI.&lt;br /&gt;
  MPI_Finalize();&lt;br /&gt;
  &lt;br /&gt;
  return 0;&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
= Hybrid Parallelization = &lt;br /&gt;
--&amp;gt;&lt;/div&gt;</summary>
		<author><name>R Rutka</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=Environment_Modules&amp;diff=4541</id>
		<title>Environment Modules</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=Environment_Modules&amp;diff=4541"/>
		<updated>2016-11-03T16:54:26Z</updated>

		<summary type="html">&lt;p&gt;R Rutka: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=650px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Description !! Content&lt;br /&gt;
|-&lt;br /&gt;
| module load&lt;br /&gt;
| category/name &amp;amp;#124; category/name/version (optional)&lt;br /&gt;
|-&lt;br /&gt;
| Links&lt;br /&gt;
| [http://modules.sourceforge.net/ Environment Modules Project] &amp;amp;#124; [http://sourceforge.net/projects/modules/ Environment Modules]&lt;br /&gt;
|-&lt;br /&gt;
| License&lt;br /&gt;
| [http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU General Public License]&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
= Introduction =&lt;br /&gt;
&#039;&#039;&#039;Environment Modules&#039;&#039;&#039;, or short &#039;&#039;&#039;Modules&#039;&#039;&#039; are the means by which most of the installed scientific software is provided on the bwHPC clusters.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The use of different compilers, libraries and software packages requires users to set up  a specific session environment suited for the program they want to run. The bwHPC clusters provide users with the possibility to load and unload complete environments for compilers, libraries and software packages by a single command. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
= Description = &lt;br /&gt;
The Environment &#039;&#039;Modules&#039;&#039; package enables dynamic modification of your environment by the &lt;br /&gt;
use of so-called &#039;&#039;modulefiles&#039;&#039;. A &#039;&#039;modulefile&#039;&#039; contains information to configure the shell &lt;br /&gt;
for a program/software . Typically, a modulefile contains instructions that alter or set shell &lt;br /&gt;
environment variables, such as PATH and MANPATH, to enable access to various installed &lt;br /&gt;
software. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
One of the key features of using the Environment &#039;&#039;Modules&#039;&#039; software is to allow multiple versions of the same software to be used in your environment in a controlled manner. &lt;br /&gt;
For example, two different versions of the Intel C compiler can be installed on the system at the same time - the version used is based upon which Intel C compiler modulefile is loaded.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The software stack of bwHPC clusters provides a number of modulefiles. You can also &lt;br /&gt;
create your own modulefiles. &#039;&#039;Modulefiles&#039;&#039; may be shared by many users on a system, and &lt;br /&gt;
users may have their own collection of modulefiles to supplement or replace the shared &lt;br /&gt;
modulefiles.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
A modulefile does not provide configuration of your environment until it is explicitly loaded, &lt;br /&gt;
i.e., the specific modulefile for a software product or application must be loaded in your environment before the configuration information in the modulefile is effective.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
For instance loading the default Intel C and Fortran compiler you must execute&lt;br /&gt;
&#039;&#039;&#039;&#039;module load compiler/intel&#039;&#039;&#039;&#039;.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load compiler/intel&lt;br /&gt;
$ module list&lt;br /&gt;
Currently Loaded Modulefiles:&lt;br /&gt;
  1) compiler/pgi/12.10(default)    2) compiler/intel/15.0(default)&lt;br /&gt;
$ : Display all Intel related environments now&lt;br /&gt;
$ env | grep INTEL&lt;br /&gt;
INTEL_LICENSE_FILE=/opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/licenses&lt;br /&gt;
INTEL_LIB_MICMPI=/opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/mpirt/lib/mic&lt;br /&gt;
INTEL_HOME=/opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187&lt;br /&gt;
INTEL_VERSION=15.0.3&lt;br /&gt;
INTEL_MAN_DIR=/opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/man/en_US&lt;br /&gt;
INTEL_INC_DIR=/opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/compiler/include&lt;br /&gt;
INTEL_BIN_DIR=/opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/bin/intel64&lt;br /&gt;
INTEL_DOC_DIR=/opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/Documentation/en_US&lt;br /&gt;
INTEL_LIB_DIR=/opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/compiler/lib/intel64&lt;br /&gt;
INTEL_LIB_MIC=/opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/compiler/lib/mic&lt;br /&gt;
INTEL_PYTHONHOME=/opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/debugger/python/intel64&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Usage =&lt;br /&gt;
== Documentation ==&lt;br /&gt;
For help on how to use &#039;&#039;Modules&#039;&#039; software, i.e., the command &#039;&#039;&#039;module&#039;&#039;&#039;, &lt;br /&gt;
execute &#039;&#039;&#039;&#039;module help&#039;&#039;&#039;&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module help&lt;br /&gt;
Modules Release 3.2.10 2012-12-21 (Copyright GNU GPL v2 1991):&lt;br /&gt;
&lt;br /&gt;
  Usage: module [ switches ] [ subcommand ] [subcommand-args ]&lt;br /&gt;
&lt;br /&gt;
Switches:&lt;br /&gt;
	-H|--help		this usage info&lt;br /&gt;
	-V|--version		modules version &amp;amp; configuration options&lt;br /&gt;
	-f|--force		force active dependency resolution&lt;br /&gt;
	-t|--terse		terse    format avail and list format&lt;br /&gt;
	-l|--long		long     format avail and list format&lt;br /&gt;
	-h|--human		readable format avail and list format&lt;br /&gt;
	-v|--verbose		enable  verbose messages&lt;br /&gt;
	-s|--silent		disable verbose messages&lt;br /&gt;
	-c|--create		create caches for avail and apropos&lt;br /&gt;
	-i|--icase		case insensitive&lt;br /&gt;
	-u|--userlvl &amp;lt;lvl&amp;gt;	set user level to (nov[ice],exp[ert],adv[anced])&lt;br /&gt;
  Available SubCommands and Args:&lt;br /&gt;
	+ add|load		modulefile [modulefile ...]&lt;br /&gt;
	+ rm|unload		modulefile [modulefile ...]&lt;br /&gt;
	+ switch|swap		[modulefile1] modulefile2&lt;br /&gt;
	+ display|show		modulefile [modulefile ...]&lt;br /&gt;
	+ avail			[modulefile [modulefile ...]]&lt;br /&gt;
	+ use [-a|--append]	dir [dir ...]&lt;br /&gt;
	+ unuse			dir [dir ...]&lt;br /&gt;
	+ update&lt;br /&gt;
	+ refresh&lt;br /&gt;
	+ purge&lt;br /&gt;
	+ list&lt;br /&gt;
	+ clear&lt;br /&gt;
	+ help			[modulefile [modulefile ...]]&lt;br /&gt;
	+ whatis		[modulefile [modulefile ...]]&lt;br /&gt;
	+ apropos|keyword	string&lt;br /&gt;
	+ initadd		modulefile [modulefile ...]&lt;br /&gt;
	+ initprepend		modulefile [modulefile ...]&lt;br /&gt;
	+ initrm		modulefile [modulefile ...]&lt;br /&gt;
	+ initswitch		modulefile1 modulefile2&lt;br /&gt;
	+ initlist&lt;br /&gt;
	+ initclear&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
or &#039;&#039;&#039;&#039;man module&#039;&#039;&#039;&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
MODULE(1)                       Modules package                      MODULE(1)&lt;br /&gt;
&lt;br /&gt;
NAME&lt;br /&gt;
       module - command interface to the Modules package&lt;br /&gt;
&lt;br /&gt;
SYNOPSIS&lt;br /&gt;
       module [ switches ] [ sub-command ] [ sub-command-args ]&lt;br /&gt;
&lt;br /&gt;
DESCRIPTION&lt;br /&gt;
       module is a user interface to the Modules package.  The Modules package&lt;br /&gt;
       provides for the dynamic modification of  the  user&#039;s  environment  via&lt;br /&gt;
       modulefiles.&lt;br /&gt;
&lt;br /&gt;
       Each  modulefile contains the information needed to configure the shel&lt;br /&gt;
[...]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
For help on particular version of &#039;&#039;Module&#039;&#039;, e.g. Intel compiler version X.Y,  execute&lt;br /&gt;
&#039;&#039;&#039;&#039;module help compiler/intel&#039;&#039;&#039;&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module help compiler/intel&lt;br /&gt;
----------- Module Specific Help for &#039;compiler/intel/15.0&#039; --------&lt;br /&gt;
This module provides the Intel(R) compiler suite version 15.0.3 via&lt;br /&gt;
commands &#039;icc&#039;, &#039;icpc&#039; and &#039;ifort&#039; (version 15.0.3), the debugger &#039;gdb-ia&#039; (version&lt;br /&gt;
7.8.3) as well as the Intel(R) Threading Building Blocks TBB (version 4.3.5)&lt;br /&gt;
and the Integrated Performance Primitives IPP libraries (version 8.2.2)&lt;br /&gt;
(for details see also &#039;http://software.intel.com/en-us/intel-compilers/&#039;).&lt;br /&gt;
&lt;br /&gt;
The related Math Kernel Library MKL module is &#039;numlib/mkl/11.2.3&#039;.&lt;br /&gt;
The related Intel MPI module is &#039;mpi/impi/5.0.3-intel-15.0&#039;.&lt;br /&gt;
The Intel &#039;icpc&#039; should work well with GNU compiler version 4.4 to 4.8.&lt;br /&gt;
Before using TBB or IPP setup the corresponding environment, e.g. for 64bit+bash&lt;br /&gt;
  source $INTEL_HOME/tbb/bin/tbbvars.sh intel64&lt;br /&gt;
  source $INTEL_HOME/ipp/bin/ippvars.sh intel64&lt;br /&gt;
&lt;br /&gt;
Commands:&lt;br /&gt;
  icc           # Intel(R) C compiler&lt;br /&gt;
  icpc          # Intel(R) C++ compiler&lt;br /&gt;
  ifort         # Intel(R) Fortran compiler&lt;br /&gt;
  gdb-ia        # Intel version of GNU debugger&lt;br /&gt;
  # idb is not available anymore in Intel compiler suite 2015.&lt;br /&gt;
&lt;br /&gt;
Local documentation:&lt;br /&gt;
  Man pages: man icc; man icpc; man ifort; man gdb-ia&lt;br /&gt;
  firefox $INTEL_DOC_DIR/beginusing_lc.htm&lt;br /&gt;
  firefox $INTEL_DOC_DIR/beginusing_lf.htm&lt;br /&gt;
  The html-pages are very detailed and cover TBB and IPP as well as MKL.&lt;br /&gt;
&lt;br /&gt;
For some Intel(R) compiler option examples, hints on how to compile 32bit code&lt;br /&gt;
and solutions for less common problems see the tips and troubleshooting doc:&lt;br /&gt;
  $INTEL_DOC_DIR/intel-compiler-tips-and-troubleshooting.txt&lt;br /&gt;
&lt;br /&gt;
For details on library and include dirs please call&lt;br /&gt;
    module show compiler/intel/15.0&lt;br /&gt;
[...]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== Online Documentation ===&lt;br /&gt;
[https://sourceforge.net/p/modules/wiki/FAQ/ Frequently Asked Questions (FAQ)]&lt;br /&gt;
&lt;br /&gt;
== Display all available Modules ==&lt;br /&gt;
Available &#039;&#039;Module&#039;&#039; are modulefiles that can be loaded by the user. A &#039;&#039;Module&#039;&#039; must be loaded before it provides changes to your environment, as described in the introduction to this &lt;br /&gt;
section. You can display all available &#039;&#039;Modules&#039;&#039; on the system by executing:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module avail&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The short form the command is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module av&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Available &#039;&#039;Modules&#039;&#039; can be also displayed in different modes, such as&lt;br /&gt;
* each &#039;&#039;Module&#039;&#039; per one line&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module -t avail&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* long&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module -l avail&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
== bwHPC CLuster Information System (CIS) ==&lt;br /&gt;
A &#039;&#039;&#039;GUI-Version of all available and scheduled modules&#039;&#039;&#039; is available with our &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;CIS&#039;&#039;&#039; (Cluster Information System).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Software Admins are able to &#039;&#039;&#039;announce new modules&#039;&#039;&#039;, versions and complete new software, too.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Academic users and other interested parties can get a &#039;&#039;&#039;summay of all installed modules and module-help informations&#039;&#039;&#039;.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;big&amp;gt;&lt;br /&gt;
[https://cis-hpc.uni-konstanz.de CIS: Cluster Information System]&lt;br /&gt;
&amp;lt;/big&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File: cis.jpg]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Module categories, versions  and defaults ==&lt;br /&gt;
The bwHPC clusters (such as [[bwUniCluster]]) traditionally provide a large variety of &lt;br /&gt;
software and software versions. Therefore &#039;&#039;Module&#039;&#039; are divided in category folders &lt;br /&gt;
containing subfolders of modulefiles again containing modulefile versions, and must be addressed&lt;br /&gt;
as follows:&lt;br /&gt;
 category/softwarename/version&lt;br /&gt;
For instance the Intel compiler X.Y belongs to the category of compilers, therefore the  &lt;br /&gt;
modulefile &#039;&#039;X.Y&#039;&#039; is placed under the category &#039;&#039;compiler&#039;&#039; and &#039;&#039;intel&#039;&#039;.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
In case of multiple software versions, one version will be always defined as the &#039;&#039;&#039;default&#039;&#039;&#039; &lt;br /&gt;
version. The &#039;&#039;Module&#039;&#039; of the default can be addressed by simply omitting the version number:&lt;br /&gt;
 category/softwarename&lt;br /&gt;
== Finding software Modules ==&lt;br /&gt;
Currently all bwHPC software packages are assigned to the following &#039;&#039;Module&#039;&#039; categories:&lt;br /&gt;
&amp;lt;!-- add wiki category for each of those, possibly just as a link --&amp;gt;&lt;br /&gt;
* [[:Category:Biology_software|bio]]&lt;br /&gt;
* [[:Category:Engineering_software|cae]]&lt;br /&gt;
* [[:Category:Chemistry_software|chem]]&lt;br /&gt;
* [[:Category:Compiler_software|compiler]]&lt;br /&gt;
* [[:Category:Debugger_software|devel]]&lt;br /&gt;
* [[BwHPC_BPG_for_Mathematics|math]]&lt;br /&gt;
* mpi&lt;br /&gt;
* [[:Category:Numerical libraries|numlib]]&lt;br /&gt;
* [[:Category:Physics software|phys]]&lt;br /&gt;
* [[:Category:System software|system]]&lt;br /&gt;
* [[:Category:Visualization|vis]]&lt;br /&gt;
You can selectively list software in one of those categories using, e.g. for the category &amp;quot;compiler&amp;quot; &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module avail compiler/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Searches are looking for a substring starting at the begin of the name, so this would list all software in categories starting with a &amp;quot;c&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module avail c&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
while this would find nothing&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module avail hem&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
== Loading Modules ==&lt;br /&gt;
You can load a &#039;&#039;Module&#039;&#039; software in to your environment to enable easier access to software that &lt;br /&gt;
you want to use by executing:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load category/softwarename/version&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module add category/softwarename/version&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Loading a &#039;&#039;Module&#039;&#039; in this manner affects ONLY your environment for the current session.&lt;br /&gt;
=== Loading conflicts ===&lt;br /&gt;
By default you can not load different versions of same software &#039;&#039;Module&#039;&#039; in same session. Loading for example Intel compiler version X while Intel compiler version Y is loaded results in error message as follows:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
Module &#039;compiler/intel/X&#039; conflicts with the currently loaded module(s) &#039;compiler/intel/Y&#039;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
The solution is [[#Unloading Modules|unloading]] or switching &#039;&#039;Modules&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Showing the changes introduced by a Module ===&lt;br /&gt;
Loading a &#039;&#039;Module&#039;&#039; will change the environment of the current shell session. For instance the $PATH variable will be expanded by the software&#039;s binary directory. Other &#039;&#039;Module&#039;&#039; variables may even change the behavior of the current shell session or the software program(s) in a more drastic way. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Loaded &#039;&#039;Modules&#039;&#039; may also invoke an additional set of environment variables, which e.g. point to directories or destinations of documentation and examples. Their nomenclature is systematic: &lt;br /&gt;
{| width=600px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Variable&lt;br /&gt;
! Pointing to&lt;br /&gt;
|-&lt;br /&gt;
| $SWN_HOME&lt;br /&gt;
| Root directory of the software package&lt;br /&gt;
|-&lt;br /&gt;
| $SWN_DOC_DIR&lt;br /&gt;
| Documentation&lt;br /&gt;
|-&lt;br /&gt;
| $SWN_EXA_DIR&lt;br /&gt;
| Examples&lt;br /&gt;
|-&lt;br /&gt;
| $SWN_BPR_URL&lt;br /&gt;
| URL of software&#039;s Wiki article&lt;br /&gt;
|-&lt;br /&gt;
| and many many more...&lt;br /&gt;
| &amp;amp;nbsp;&lt;br /&gt;
|}&lt;br /&gt;
with SWN being the place holder of the software &#039;&#039;Module&#039;&#039; name.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
All the changes to the current shell session to be invoked by loading the &#039;&#039;Module&#039;&#039; can be reviewed using &#039;&#039;&#039;&#039;module show category/softwarename/version&#039;&#039;&#039;&#039;.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;Example (Intel compiler)&amp;lt;/u&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module show compiler/intel/14.0&lt;br /&gt;
-------------------------------------------------------------------&lt;br /&gt;
/opt/bwhpc/common/modulefiles/compiler/intel/14.0:&lt;br /&gt;
module-whatis	 Intel(R) compiler suite (icc, icpc, ifort), debugger (idb), IPP and TBB ver 14.0.4 &lt;br /&gt;
setenv		 INTEL_VERSION 14.0.4 &lt;br /&gt;
setenv		 INTEL_HOME /opt/bwhpc/common/compiler/intel/compxe.2013.sp1.4.211/composer_xe_2013_sp1.4.211 &lt;br /&gt;
setenv		 INTEL_BIN_DIR /opt/bwhpc/common/compiler/intel/compxe.2013.sp1.4.211/composer_xe_2013_sp1.4.211/bin/intel64 &lt;br /&gt;
setenv		 INTEL_LIB_DIR /opt/bwhpc/common/compiler/intel/compxe.2013.sp1.4.211/composer_xe_2013_sp1.4.211/compiler/lib/intel64 &lt;br /&gt;
setenv		 INTEL_LIB_MIC /opt/bwhpc/common/compiler/intel/compxe.2013.sp1.4.211/composer_xe_2013_sp1.4.211/compiler/lib/mic &lt;br /&gt;
setenv		 INTEL_INC_DIR /opt/bwhpc/common/compiler/intel/compxe.2013.sp1.4.211/composer_xe_2013_sp1.4.211/compiler/include &lt;br /&gt;
setenv		 INTEL_MAN_DIR /opt/bwhpc/common/compiler/intel/compxe.2013.sp1.4.211/composer_xe_2013_sp1.4.211/man/en_US &lt;br /&gt;
setenv		 INTEL_DOC_DIR /opt/bwhpc/common/compiler/intel/compxe.2013.sp1.4.211/composer_xe_2013_sp1.4.211/Documentation/en_US &lt;br /&gt;
setenv		 ICC_VERSION 14.0.4 &lt;br /&gt;
setenv		 ICC_HOME /opt/bwhpc/common/compiler/intel/compxe.2013.sp1.4.211/composer_xe_2013_sp1.4.211 &lt;br /&gt;
setenv		 ICC_BIN_DIR /opt/bwhpc/common/compiler/intel/compxe.2013.sp1.4.211/composer_xe_2013_sp1.4.211/bin/intel64 &lt;br /&gt;
setenv		 ICC_LIB_DIR /opt/bwhpc/common/compiler/intel/compxe.2013.sp1.4.211/composer_xe_2013_sp1.4.211/compiler/lib/intel64 &lt;br /&gt;
setenv		 ICC_INC_DIR /opt/bwhpc/common/compiler/intel/compxe.2013.sp1.4.211/composer_xe_2013_sp1.4.211/compiler/include &lt;br /&gt;
setenv		 ICC_MAN_DIR /opt/bwhpc/common/compiler/intel/compxe.2013.sp1.4.211/composer_xe_2013_sp1.4.211/man/en_US &lt;br /&gt;
setenv		 ICC_DOC_DIR /opt/bwhpc/common/compiler/intel/compxe.2013.sp1.4.211/composer_xe_2013_sp1.4.211/Documentation/en_US &lt;br /&gt;
setenv		 IFORT_VERSION 14.0.4 &lt;br /&gt;
setenv		 IFORT_HOME /opt/bwhpc/common/compiler/intel/compxe.2013.sp1.4.211/composer_xe_2013_sp1.4.211 &lt;br /&gt;
setenv		 IFORT_BIN_DIR /opt/bwhpc/common/compiler/intel/compxe.2013.sp1.4.211/composer_xe_2013_sp1.4.211/bin/intel64 &lt;br /&gt;
setenv		 IFORT_LIB_DIR /opt/bwhpc/common/compiler/intel/compxe.2013.sp1.4.211/composer_xe_2013_sp1.4.211/compiler/lib/intel64 &lt;br /&gt;
setenv		 IFORT_INC_DIR /opt/bwhpc/common/compiler/intel/compxe.2013.sp1.4.211/composer_xe_2013_sp1.4.211/compiler/include &lt;br /&gt;
setenv		 IFORT_MAN_DIR /opt/bwhpc/common/compiler/intel/compxe.2013.sp1.4.211/composer_xe_2013_sp1.4.211/man/en_US &lt;br /&gt;
setenv		 IFORT_DOC_DIR /opt/bwhpc/common/compiler/intel/compxe.2013.sp1.4.211/composer_xe_2013_sp1.4.211/Documentation/en_US &lt;br /&gt;
setenv		 IDB_VERSION 14.0.4 &lt;br /&gt;
setenv		 IDB_HOME /opt/bwhpc/common/compiler/intel/compxe.2013.sp1.4.211/composer_xe_2013_sp1.4.211 &lt;br /&gt;
setenv		 IDB_LIB_DIR /opt/bwhpc/common/compiler/intel/compxe.2013.sp1.4.211/composer_xe_2013_sp1.4.211/debugger/lib/intel64 &lt;br /&gt;
setenv		 LANGUAGE_TERRITORY en_US &lt;br /&gt;
prepend-path	 PATH /opt/bwhpc/common/compiler/intel/compxe.2013.sp1.4.211/composer_xe_2013_sp1.4.211/bin/intel64 &lt;br /&gt;
prepend-path	 LD_LIBRARY_PATH /opt/bwhpc/common/compiler/intel/compxe.2013.sp1.4.211/composer_xe_2013_sp1.4.211/compiler/lib/intel64 &lt;br /&gt;
prepend-path	 LD_RUN_PATH /opt/bwhpc/common/compiler/intel/compxe.2013.sp1.4.211/composer_xe_2013_sp1.4.211/compiler/lib/intel64 &lt;br /&gt;
prepend-path	 MIC_LD_LIBRARY_PATH /opt/bwhpc/common/compiler/intel/compxe.2013.sp1.4.211/composer_xe_2013_sp1.4.211/compiler/lib/mic &lt;br /&gt;
prepend-path	 LIBRARY_PATH /opt/bwhpc/common/compiler/intel/compxe.2013.sp1.4.211/composer_xe_2013_sp1.4.211/compiler/lib/intel64 &lt;br /&gt;
prepend-path	 MANPATH /opt/bwhpc/common/compiler/intel/compxe.2013.sp1.4.211/composer_xe_2013_sp1.4.211/man/en_US &lt;br /&gt;
prepend-path	 NLSPATH /opt/bwhpc/common/compiler/intel/compxe.2013.sp1.4.211/composer_xe_2013_sp1.4.211/compiler/lib/intel64/locale/%l_%t/%N &lt;br /&gt;
prepend-path	 LD_LIBRARY_PATH /opt/bwhpc/common/compiler/intel/compxe.2013.sp1.4.211/composer_xe_2013_sp1.4.211/debugger/lib/intel64 &lt;br /&gt;
prepend-path	 NLSPATH /opt/bwhpc/common/compiler/intel/compxe.2013.sp1.4.211/composer_xe_2013_sp1.4.211/debugger/intel64/locale/%l_%t/%N &lt;br /&gt;
prepend-path	 INTEL_LICENSE_FILE /opt/bwhpc/common/compiler/intel/compxe.2013.sp1.4.211/composer_xe_2013_sp1.4.211/licenses &lt;br /&gt;
setenv		 IDB_JAVA_ARGUMENTS -Xms512m -Xmx1024m &lt;br /&gt;
setenv		 CC icc &lt;br /&gt;
setenv		 CXX icpc &lt;br /&gt;
setenv		 F77 ifort &lt;br /&gt;
setenv		 FC ifort &lt;br /&gt;
setenv		 F90 ifort &lt;br /&gt;
setenv		 TEST_MODULE_SCRIPT /opt/bwhpc/common/compiler/intel/compxe.2013.sp1.4.211/install-doc/test-compiler-intel.sh &lt;br /&gt;
setenv		 TEST_MODULE_NAME compiler/intel/14.0 &lt;br /&gt;
conflict	 compiler/intel &lt;br /&gt;
conflict	 compiler/gnu/4.9 &lt;br /&gt;
-------------------------------------------------------------------&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;font color=red&amp;gt;&#039;module show&#039; does &#039;&#039;&#039;not&#039;&#039;&#039; load the &#039;&#039;Module&#039;&#039;!&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Modules depending on Modules ===&lt;br /&gt;
Some program &#039;&#039;Modules&#039;&#039; depend on libraries to be loaded to the user environment. Therefore the&lt;br /&gt;
corresponding &#039;&#039;Modules&#039;&#039; of the software must be loaded together with the &#039;&#039;Modules&#039;&#039; of &lt;br /&gt;
the libraries. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
By default such software &#039;&#039;Modules&#039;&#039; try to load required &#039;&#039;Modules&#039;&#039; and corresponding versions automatically. However, automatic loading might fail if a different version of that required &#039;&#039;Module&#039;&#039; &lt;br /&gt;
is already loaded (cf. [[#Loading conflicts|Loading conflicts]]).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Unloading Modules ==&lt;br /&gt;
To unload or to remove a software &#039;&#039;Module&#039;&#039; execute:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module unload category/softwarename/version&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module remove category/softwarename/version&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== Unloading all loaded modules ===&lt;br /&gt;
==== Purge ====&lt;br /&gt;
Unloading a &#039;&#039;Module&#039;&#039; that has been loaded by default makes it inactive for the current session only - it will be reloaded the next time you log in.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
In order to remove all previously loaded software modules from your environment issue the command &#039;module purge&#039;.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;Example&amp;lt;/u&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module list&lt;br /&gt;
Currently Loaded Modulefiles:&lt;br /&gt;
  1) devel/gdb/7.7&lt;br /&gt;
  2) compiler/intel/14.0&lt;br /&gt;
  3) mpi/openmpi/1.8-intel-14.0(default)&lt;br /&gt;
$&lt;br /&gt;
$ module purge&lt;br /&gt;
$ module list&lt;br /&gt;
No Modulefiles Currently Loaded.&lt;br /&gt;
$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;font color&amp;gt;Beware!&amp;lt;/font&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;module purge&#039; is working without any further inquiry.&lt;br /&gt;
&lt;br /&gt;
==== Clear ====&lt;br /&gt;
Use &#039;&#039;&#039;&#039;module clear&#039;&#039;&#039;&#039; and confirm with &amp;quot;&#039;&#039;&#039;y&#039;&#039;&#039;&amp;quot; to unload all loaded module, too.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;Example&amp;lt;/u&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module list&lt;br /&gt;
Currently Loaded Modulefiles:&lt;br /&gt;
  1) compiler/intel/14.0&lt;br /&gt;
  2) mpi/openmpi/1.8-intel-14.0(default)&lt;br /&gt;
  3) devel/gdb/7.7&lt;br /&gt;
$ &lt;br /&gt;
$ module clear&lt;br /&gt;
Are you sure you want to clear all loaded modules!? [n] y&lt;br /&gt;
$&lt;br /&gt;
$ module list&lt;br /&gt;
No Modulefiles Currently Loaded.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Display your loaded Modules ==&lt;br /&gt;
All &#039;&#039;Modules&#039;&#039; that are currently loaded for you can be displayed by the&lt;br /&gt;
command &#039;&#039;&#039;&#039;module list&#039;&#039;&#039;&#039;. [[#Purge|See example above]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Note: You only have to load further &#039;&#039;Modules&#039;&#039;, if you want to use additional software&lt;br /&gt;
packages or to change the version of an already loaded software.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Software job examples =&lt;br /&gt;
The &#039;&#039;Modules&#039;&#039; installed on bwHPC systems provide job examples to help you get started using the software or submitting jobs with this software. Examples can be found via a convenient &lt;br /&gt;
variable $SWN_EXA_DIR (for a &#039;&#039;Module&#039;&#039; called &#039;&#039;&#039;SWN&#039;&#039;&#039;). It is advisable to copy the whole example folder to your $HOME directory, so you can edit those job examples. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
For copying the entire job examples folder of software &#039;&#039;&#039;swn&#039;&#039;&#039; to your working directory, execute:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load catogory/softwarename&lt;br /&gt;
$ cp -R $SWN_EXA_DIR .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
= How do Modules work? =&lt;br /&gt;
The default shell on the bwHPC clusters is bash, so explanations and examples will be shown for bash. In general, programs cannot modify the environment of the shell they are being run from, so how can the module command do exactly that?&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The module command is not a program, but a bash-function.&lt;br /&gt;
You can view its content using &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ type module&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and you will get a result like this: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ type module&lt;br /&gt;
module is a function&lt;br /&gt;
module () &lt;br /&gt;
{ &lt;br /&gt;
    eval `/usr/bin/modulecmd bash $*`&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this function, modulecmd is called. Its output to stdout is then executed inside your current shell using the bash-internal &#039;&#039;eval&#039;&#039; command. As a consequence, all output that you see from the module is transmitted via stderr (output handle 2)  or in some cases even stdin (output handle 0).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
[[Category:System software]][[Category:bwUniCluster|Environment Modules]][[Category:ForHLR Phase I|Environment Modules]]&lt;/div&gt;</summary>
		<author><name>R Rutka</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=Development/Parallel_Programming&amp;diff=4540</id>
		<title>Development/Parallel Programming</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=Development/Parallel_Programming&amp;diff=4540"/>
		<updated>2016-11-03T16:51:55Z</updated>

		<summary type="html">&lt;p&gt;R Rutka: /* openmpi */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=600px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Description !! Content&lt;br /&gt;
|-&lt;br /&gt;
| module load&lt;br /&gt;
| mpi/impi &amp;amp;#124; mpi/openmpi &lt;br /&gt;
|-&lt;br /&gt;
| Links&lt;br /&gt;
| [https://software.intel.com/en-us/intel-mpi-library Intel® MPI Library] &amp;amp;#124; [http://www.open-mpi.org/ Open MPI] &lt;br /&gt;
|-&lt;br /&gt;
| License&lt;br /&gt;
| [https://software.intel.com/en-us/articles/intel-mpi-library-licensing-faq Intel MPI Library Licensing FAQ] &amp;lt;small&amp;gt;install-doc/EULA.txt&amp;lt;/small&amp;gt; &amp;amp;#124; [http://www.open-mpi.org/community/license.php Open MPI License]&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
= Introduction =&lt;br /&gt;
This page will provide information regarding the supported parallel programming paradigms and specific hints on their usage.&lt;br /&gt;
Please refer to the [[BwUniCluster_Environment_Modules|Modules Documentation]] how to setup your environment on bwUniCluster to load a specific software installation.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
More informations about Compilers installed at our clusters is available here:&lt;br /&gt;
* [[Intel_Compiler|Intel Compiler Suite]]&lt;br /&gt;
* [[GCC|GNU Compiler (GCC)]]&lt;br /&gt;
* [[General_compiler_usage|General Compiler Usage (incl. PGI Compiler)]]&lt;br /&gt;
&lt;br /&gt;
= Versions and Availability =&lt;br /&gt;
=== impi (Intel) ===&lt;br /&gt;
A list of versions currently available compilers on the bwHPC-C5-Clusters can be obtained from the&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;big&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[https://cis-hpc.uni-konstanz.de/prod.cis/ Cluster Information System CIS]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
{{#widget:Iframe&lt;br /&gt;
|url=https://cis-hpc.uni-konstanz.de/prod.cis/bwUniCluster/mpi/impi&lt;br /&gt;
|width=99%&lt;br /&gt;
|height=1300&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== openmpi ===&lt;br /&gt;
A list of versions currently available compilers on the bwHPC-C5-Clusters can be obtained from the&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;big&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[https://cis-hpc.uni-konstanz.de/prod.cis/ Cluster Information System CIS]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
{{#widget:Iframe&lt;br /&gt;
|url=https://cis-hpc.uni-konstanz.de/prod.cis/bwUniCluster/mpi/openmpi&lt;br /&gt;
|width=99%&lt;br /&gt;
|height=2100&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= OpenMP =&lt;br /&gt;
== General Information ==&lt;br /&gt;
OpenMP is a mature specification [http://openmp.org/wp/openmp-specifications/] to allow easy, portable, and most importantly incremental node-level parallelisation of code.&lt;br /&gt;
Being a thread-based approach, OpenMP is aimed at more fine-grained parallelism than [[BwHPC_Best_Practices_Repository#MPI|MPI]].&lt;br /&gt;
Although there have been extensions to extend OpenMP for inter-node parallelisation, it is a node-level approach aimed to make best usage of a node&#039;s cores&amp;lt;!-- -- the section [[#Hybrid Parallelisation|Hybrid Parallelisation]] will explain how to parallelise utilizing MPI plus a thread-based parallelization paradigm like OpenMP--&amp;gt;.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
With regard to ease-of-use, OpenMP is ahead of any other common approach: the source-code is annotated using &amp;lt;tt&amp;gt;#pragma omp&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;!$omp&amp;lt;/tt&amp;gt; statements, in C/C++ and Fortran respectively.&lt;br /&gt;
Whenever the compiler encompasses a semantic block of code encapsulated in a parallel region, this block of code is transparently compiled into a function, which is passed to a so-called team-of-threads upon entering this semantic block. This fork-join model of execution eases a lot of the programmer&#039;s pain involved with Threads.&lt;br /&gt;
Being a loop-centric approach, OpenMP is aimed at codes with long/time-consuming loops.&lt;br /&gt;
A single combined directive &amp;lt;tt&amp;gt;pragma omp parallel for&amp;lt;/tt&amp;gt; will tell the compiler to automatically parallel the ensuing for-loop.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The following example is a bit more advanced in that even reductions of variables over multiple threads are easily to parallel:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
   for (int i=0, sum = 0.0; i &amp;lt; VECTOR_LEN; i++)&lt;br /&gt;
     norm2 += (v[i]*v[i]);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
is parallelized by just adding a single line as in:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
#  pragma omp parallel for reduction(+:norm2)&lt;br /&gt;
   for (int i=0, sum = 0.0; i &amp;lt; VECTOR_LEN; i++)&lt;br /&gt;
     norm2 += (v[i]*v[i]);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
With &amp;lt;tt&amp;gt;VECTOR_LENGTH&amp;lt;/tt&amp;gt; being large enough, this piece of code compiled with OpenMP will run in parallel, exhibiting very nice speedup.&lt;br /&gt;
Compiled without, the code remains as is. Developpers may therefore incrementally parallelize their application based on the profile derived from performance analysis tools, starting with the most time-consuming loops.&lt;br /&gt;
Using OpenMP&#039;s concise API, one may query the number of running threads, the number of processors, a time to calculate runtime, and even set parameters such as the number of threads to execute a parallel region.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The OpenMP-4.0 specification added support for the SIMD-directive to better utilize SIMD-vectorization, as well as integrating directives to offload computation to accelerators using the &amp;lt;tt&amp;gt;target&amp;lt;/tt&amp;gt; directive: these are integrated into the Intel Compiler and are actively being worked on for the GNU compiler, some restrictions may apply.&lt;br /&gt;
== OpenMP Best Practice Guide ==&lt;br /&gt;
The following silly example to calculate the squared Euklidian Norm shows some techniques:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;omp.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#define VECTOR_LENGTH 5&lt;br /&gt;
&lt;br /&gt;
int main (int argc, char * argv[])&lt;br /&gt;
{&lt;br /&gt;
    int len = VECTOR_LENGTH;&lt;br /&gt;
    int i;&lt;br /&gt;
    double * v;&lt;br /&gt;
    double norm2 = 0.0;&lt;br /&gt;
    double t1, tdiff;&lt;br /&gt;
&lt;br /&gt;
    if (argc &amp;gt; 1)&lt;br /&gt;
        len = atoi (argv[1]);&lt;br /&gt;
    v = malloc (len * sizeof(double));&lt;br /&gt;
&lt;br /&gt;
    t1 = omp_get_wtime();&lt;br /&gt;
    // Initialization already with (the same number of) threads&lt;br /&gt;
#pragma omp parallel for&lt;br /&gt;
    for (i=0; i &amp;lt; len; i++) {&lt;br /&gt;
        v[i] = i;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // Now aggregate the sum-of-squares by specifying a reduction&lt;br /&gt;
#pragma omp parallel for reduction(+:norm2)&lt;br /&gt;
    for(i=0; i &amp;lt; len; i++) {&lt;br /&gt;
        norm2 += (v[i]*v[i]);&lt;br /&gt;
    }&lt;br /&gt;
    tdiff = omp_get_wtime() - t1;&lt;br /&gt;
&lt;br /&gt;
    printf (&amp;quot;norm2: %f Time:%f\n&amp;quot;, norm2, tdiff);&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;!-- Specific OpenMP hints: default(none), reproducability, thread-safey --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Group independent parallel sections together: in the above example, You may combine those two sections into one larger parallel block. This will just once enter the parallel region (in the fork-join model) instead of twice. Especially in inner loops, this will considerably decrease overhead.&lt;br /&gt;
* Compile with the Intel compiler&#039;s option &amp;lt;tt&amp;gt;-diag-enable sc-parallel3&amp;lt;/tt&amp;gt; to get the further warnings on thread-safety, performance, etc. The following code with loop-carried dependency will e.g. compile fine (aka without warning):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
#pragma omp parallel for reduction(+:norm2)&lt;br /&gt;
    for(i=1; i &amp;lt; len-1; i++) {&lt;br /&gt;
        v[i] = v[i-1]+v[i+1];&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
However the Intel compiler with &amp;lt;tt&amp;gt;-diag-enable sc-parallel3&amp;lt;/tt&amp;gt; will produce the following warning:&lt;br /&gt;
&amp;lt;tt&amp;gt;warning #12246: variable &amp;quot;v&amp;quot; has loop carried data dependency that may lead to incorrect program execution in parallel mode; see (file:omp_norm2.c line:32)&amp;lt;/tt&amp;gt;&lt;br /&gt;
* Always specify &amp;lt;tt&amp;gt;default(none)&amp;lt;/tt&amp;gt; on larger parallel regions in order to specifically set the visibility of variables to either &amp;lt;tt&amp;gt;shared&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;private&amp;lt;/tt&amp;gt;.&lt;br /&gt;
* Try to restructure code to allow for &amp;lt;tt&amp;gt;nowait&amp;lt;/tt&amp;gt;: OpenMP defines synchronization points (implied barriers) at the end of work sharing constructs such as the &amp;lt;tt&amp;gt;pragma omp for&amp;lt;tt&amp;gt; directive. If the ensuing section of code does not depend on data being generated inside the parallel section, adding the &amp;lt;tt&amp;gt;nowait&amp;lt;/tt&amp;gt; clause to the worksharing directive allows the compiler to eliminate this synchronization point. This reduces overhead, allows for better overlap and better utilization of the processor&#039;s resources. This might imply however to restructure the code (move portions of independent code in between dependent works-sharing constructs).&lt;br /&gt;
== Usage ==&lt;br /&gt;
OpenMP is supported by various compilers, here the usage for two main compilers [[BwHPC_BPG_Compiler#GCC|GCC]] and [[BwHPC_BPG_Compiler#Intel Suite|Intel Suite]] are introduced.&lt;br /&gt;
For both compilers, You first need to turn on OpenMP support by specifying a parameter on the compiler&#039;s command-line.&lt;br /&gt;
In case You make function calls to OpenMP&#039;s API, You also need to include the header-file &amp;lt;tt&amp;gt;omp.h&amp;lt;/tt&amp;gt;.&lt;br /&gt;
OpenMP&#039;s API allows to query or set the number of threads, query the number of processors, get a wall-clock time to measure execution times, etc.&lt;br /&gt;
=== OpenMP with GNU Compiler Collection ===&lt;br /&gt;
Starting with version 4.2 the gcc compiler supports OpenMP-2.5.&lt;br /&gt;
Since then the analysis capabilities of the GNU compiler have steadily improved.&lt;br /&gt;
The installed compilers support OpenMP-3.1.&lt;br /&gt;
&amp;lt;!-- Starting with gcc-4.9 OpenMP-4.0 is supported, however the &amp;lt;tt&amp;gt;target&amp;lt;/tt&amp;gt; directive will only offload to the host processor. --&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
To use OpenMP with the gcc-compiler, pass &amp;lt;tt&amp;gt;-fopenmp&amp;lt;/tt&amp;gt; as parameter.&lt;br /&gt;
=== OpenMP with Intel Compiler ===&lt;br /&gt;
The Intel Compiler&#039;s support for OpenMP is more advanced than gcc&#039;s -- especially in term of programmer support.&lt;br /&gt;
To use OpenMP with the Intel compiler, pass &amp;lt;tt&amp;gt;-openmp&amp;lt;/tt&amp;gt; as command-line parameter.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
One may get very insightful information about OpenMP, when compiling with&lt;br /&gt;
* Compiling with &amp;lt;tt&amp;gt;-openmp-report2&amp;lt;/tt&amp;gt; to get information, which loops were parallelized and a reason why not.&lt;br /&gt;
* Compiling with &amp;lt;tt&amp;gt;-diag-enable sc-parallel3&amp;lt;/tt&amp;gt; to get errors and warnings about your sources weaknesses with regard to parallelization (see example below).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------------------------------------------- --&amp;gt;&lt;br /&gt;
= MPI =&lt;br /&gt;
In this section, You will find information regarding the supported installations of the Message-Passing Interface libraries and their usage.&amp;lt;br&amp;gt;&lt;br /&gt;
Due to the Fortran interface ABI, all MPI-libraries are normally bound to a specific compiler-vendor and even the specific compiler version.&lt;br /&gt;
Therefore, as listed in [[BwHPC_BPG_Compiler]] two compilers are supported on bwUniCluster: [[GCC|GCC]] and [[Intel_Compiler|Intel Compiler Suite]].&lt;br /&gt;
As both compilers are continously improving, the communication libraries will be adopted in lock-step.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
With a set of different implementations, there comes the problem of choice. These pages should inform the user of the communication libraries, what considerations should be done with regard to performance, maintainability and debugging -- in general tool support -- of the various implementations.&lt;br /&gt;
== MPI Introduction ==&lt;br /&gt;
The Message-Passing Interface is a standard provided by the [http://www.mpi-forum.org MPI-Forum] which regularly convenes for the [http://meetings.mpi-forum.org MPI-Forum Meetings] to update this standard. The current version is MPI-3.0 available as [http://mpi-forum.org/docs/mpi-3.0/mpi30-report.pdf PDF].&lt;br /&gt;
This document defines the API of over 300 functions for the C- and the Fortran-language -- however, You will certainly not need all of them to begin with.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Every MPI-conforming program needs to call &amp;lt;tt&amp;gt;MPI_Init()&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;MPI_Finalize()&amp;lt;/tt&amp;gt; upon start and shutdown -- or &amp;lt;tt&amp;gt;MPI_Abort()&amp;lt;/tt&amp;gt; in case of an abnormal termination.&lt;br /&gt;
After initialization the programm may call any other MPI-function, specifically communication functions.&lt;br /&gt;
However to do so, it is required to find out how many processes the program has been started with, using &amp;lt;tt&amp;gt;MPI_Comm_size()&amp;lt;/tt&amp;gt; and what number (here called a rank= this particular process has using &amp;lt;tt&amp;gt;MPI_Comm_rank()&amp;lt;/tt&amp;gt;.&lt;br /&gt;
Communication is always relative to a so-called communicator -- the default one after initialization being called &amp;lt;tt&amp;gt;MPI_COMM_WORLD&amp;lt;/tt&amp;gt;- &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
There&#039;s basically three ways of communication:&lt;br /&gt;
* two-sided communication using point-to-point (often abbreviated P2P) functions, such as &amp;lt;tt&amp;gt;MPI_Send()&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;MPI_Recv()&amp;lt;/tt&amp;gt;, which always involves two participating processes,&lt;br /&gt;
* collectice communcation functions (often abbreviated as colls) involve multiple processes, examples are &amp;lt;tt&amp;gt;MPI_Bcast()&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;MPI_Reduce()&amp;lt;/tt&amp;gt;, &lt;br /&gt;
* one-sided communication, where communication between two processes is initiated by one-process, only. With proper RMA-hardware support and careful programming, this may allow higher performance or scalibility.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
All parts of the programm, which reference MPI functionality need to be compiled with the &#039;&#039;&#039;same&#039;&#039;&#039; compiler settings/include files and linked to the same MPI-Library. This is stressed here, since without taking pre-cautions, a different MPI&#039;s header may be included, resulting in funny errors: consider that Intel MPI is derived from MPIch, with MPI-datatypes being C &amp;lt;tt&amp;gt;int&amp;lt;/tt&amp;gt;s, while Open MPI uses pointers to structures (the former being 4, the latter being 8 bytes on bwUniCluster).&lt;br /&gt;
To ease the programmer&#039;s life, MPI implementations offer compiler-wrappers, e.g. &amp;lt;tt&amp;gt;mpicc&amp;lt;/tt&amp;gt; for C and &amp;lt;tt&amp;gt;mpif90&amp;lt;/tt&amp;gt; for Fortran90 for compilation and linking, taking care to include all required libraries.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
All programs must be started using the &amp;lt;tt&amp;gt;mpirun&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;mpiexec&amp;lt;/tt&amp;gt; command. Depending on the actual implementation, it uses different arguments, however the following works with any MPI:&lt;br /&gt;
* &amp;lt;tt&amp;gt;mpirun -np 128 ./app&amp;lt;/tt&amp;gt; starts 128 processes (with ranks 0 to 127)&lt;br /&gt;
* &amp;lt;tt&amp;gt;mpiexec -n 128 -hostfile mynodes.txt ./app&amp;lt;/tt&amp;gt; starts 128 processes on only the nodes listed line-by-line in the provided text-file &amp;lt;tt&amp;gt;mynodes.txt&amp;lt;/tt&amp;gt;.&lt;br /&gt;
* &amp;lt;tt&amp;gt;mpiexec -n 64 ./app1 : -n 64 ./app2&amp;lt;/tt&amp;gt; starts 128 processes, 64 of which execute &amp;lt;tt&amp;gt;app1&amp;lt;/tt&amp;gt;, the other 64 execute &amp;lt;tt&amp;gt;app2&amp;lt;/tt&amp;gt;. All processes however participate in the same &amp;lt;tt&amp;gt;MPI_COMM_WORLD&amp;lt;/tt&amp;gt; and therefore must accordingly take care about their respective ranks.&lt;br /&gt;
Please note, that process placement (e.g. a round-robin scheme), and specifically process-binding to sockets is MPI-implementation dependant.&lt;br /&gt;
== MPI Best Practice Guide ==&lt;br /&gt;
Specific performance considerations with regard to MPI (independent of the implementation):&lt;br /&gt;
* No communication at all is best: Only communicate between processes if at all necessary. Consider that file-access is &amp;quot;communication&amp;quot; as well.&lt;br /&gt;
* If communication is done with multiple processes, try to involve as many processes in just one call: MPI optimizes the communication pattern for so-called &amp;quot;collective communication&amp;quot; to take advantage of the underlying network (with regard to network topology, message sizes, queueing capabilities of the network interconnect, etc.). Therefore try to always think in collective communication, if a communication pattern involves a group of processes.&lt;br /&gt;
* Try to group processes together: Function calls like &amp;lt;tt&amp;gt;MPI_Cart_create&amp;lt;/tt&amp;gt; will come in handy for applications with cartesian domains but also general communicators derived from &amp;lt;tt&amp;gt;MPI_COMM_WORLD&amp;lt;/tt&amp;gt; using &amp;lt;tt&amp;gt;MPI_Comm_split()&amp;lt;/tt&amp;gt; may benefit by MPI&#039;s knowing the underlying network topology. Use MPI3&#039;s &amp;lt;tt&amp;gt;MPI_Comm_split_type()&amp;lt;/tt&amp;gt; with &amp;lt;tt&amp;gt;MPI_COMM_TYPE_SHARED&amp;lt;/tt&amp;gt; for a sub-communicator with processes having access to the same shared memory region (aka on bwUniCluster the same node).&lt;br /&gt;
* File-accesses to load / store data &#039;&#039;&#039;must&#039;&#039;&#039; be done collectively: Writing to storage, or even reading the initialization data -- all of which involves getting data from/to all MPI processes -- must be done collectively. MPI&#039;s Parallel IO offers a rich API to read and distribute the data access -- in order to take advantage of parallel filesystems like Lustre. A many-fold performance improvement may be seen by writing data in large chunks in collective fashion -- and at the same time being nice to other users and applications. &lt;br /&gt;
* Try to hide the communication by computation: Try to hide (some) of the cost of communication of Point-to-point communication by using non-blocking / immediate P2P-calls (&amp;lt;tt&amp;gt;MPI_Isend&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;MPI_Irecv&amp;lt;/tt&amp;gt; et al, followed by &amp;lt;tt&amp;gt;MPI_Wait&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;MPI_Test&amp;lt;/tt&amp;gt; et al). This may allow the MPI-implementation to initiate or even offload communication to the network interconnect and resume executing your application, while data is being transferred. MPI-3 adds non-blocking collectives, e.g. &amp;lt;tt&amp;gt;MPI_Ibcast()&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;MPI_Iallreduce()&amp;lt;/tt&amp;gt;. For extra credit, explain the use-cases of &amp;lt;tt&amp;gt;MPI_Ibarrier()&amp;lt;/tt&amp;gt;.&lt;br /&gt;
* Every call to MPI may trigger an access to physical hardware -- limit it: When calling communication-related functions such as &amp;lt;tt&amp;gt;MPI_Test&amp;lt;/tt&amp;gt; to check whether a specific communication has finished, the queue of the network adapter may need to be queried. This memory access or even physical hardware access to query the state will cost cycles. Therefore, the programmer should combine multiple requests with functions such as &amp;lt;tt&amp;gt;MPI_Waitall()&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;MPI_Waitany()&amp;lt;/tt&amp;gt; or their Test*-counterparts.&lt;br /&gt;
* Make usage of derived datatypes: instead of manually copying data into temporary, even newly allocated memory, describe the data-layout to MPI -- and let the implementation, or even the network HCA&#039;s hardware do the data fetching.&lt;br /&gt;
* Bind Your processes to sockets: Operating Systems are good in making best use of the ressources -- which sometimes involves moving tasks from one core to another, or even (though more unlikely since the OS&#039; heuristics try to avoid it) to another socket, with the obvious effects: Caches are cold, every memory access to memory allocated on the previous socket &amp;quot;has to travel the bus&amp;quot;. This is particularly happening if You have multiple OpenMP parallel regions which are separated by code that does IO -- and threads are sleeping -- the processes doing IO may wander to a different socket... Bind Your processes to at least the socket. All major MPIs support this binding (see below).&lt;br /&gt;
* Do not use the C++ interface: First of all, it has been marked as deprecated in the MPI-3.0 standard, since it added little benefit to C++ programmers over the C-interface. Moreover, since MPI implementations are written in C, the interface adds another level of indirection and therefore a bit of overhead in terms of instructions and Cache misses.&lt;br /&gt;
== Open MPI ==&lt;br /&gt;
The [http://www.open-mpi.org Open MPI] library is an open, flexible and nevertheless performant implementation of MPI-2 and MPI-3. Licensed under BSD, it is being actively developed by an open community of industry and research institutions.&lt;br /&gt;
The flexibility comes in handy: using the concept of a [http://www.open-mpi.org/faq/?category=tuning#mca-def MCA] (aka a plugin) Open MPI supports many different network interconnects (Infinband, TCP, Cray, etc.) , on the other hand, a installation may be tailored to suite an installation, e.g. the network (Infiniband with specific settings), the main startup-mechanism, etc.&lt;br /&gt;
Furthermore, the [http://www.open-mpi.org/faq/ FAQ] offers hints on [http://www.open-mpi.org/faq/?category=tuning performance tuning].&lt;br /&gt;
=== Usage ===&lt;br /&gt;
Like other MPI implementations, after loading the [[BwUniCluster_Environment_Modules|module]], Open MPI provides the compiler-wrappers &amp;lt;tt&amp;gt;mpicc&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;mpicxx&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;mpifort&amp;lt;/tt&amp;gt;  (or for&lt;br /&gt;
versions lower than 1.7 &amp;lt;tt&amp;gt;mpif77&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;mpif90&amp;lt;/tt&amp;gt;) for the C-, C++ and Fortran compilers respectively. Albeit their usage is not required, these wrappers are handy to not have to use the command-line options for header- or library directories, aka &amp;lt;tt&amp;gt;-I&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;-L&amp;lt;/tt&amp;gt;, as well as the actual needed MPI-libraries itselve.&lt;br /&gt;
=== Further information === &lt;br /&gt;
Open MPI also features a few specific functionalities that will help users and developpers, alike:&lt;br /&gt;
* Open MPI&#039;s tool &amp;lt;tt&amp;gt;ompi_info&amp;lt;/tt&amp;gt; allows seeing all of Open MPI&#039;s installed MCA components and their specific options.&lt;br /&gt;
Without any option the user gets a list of flags, the Open MPI installation was compiled for (version of compilers, specific configure-flags, e.g. debugging, or profiling options). Furthermore, using &amp;lt;tt&amp;gt;ompi_info --param all all&amp;lt;/tt&amp;gt; one may see all of the MCA&#039;s options, e.g. that the default PML-MCA uses an initial free-list of 4 blocks (increased by 64 upon first encountering this limit):&lt;br /&gt;
&amp;lt;tt&amp;gt;ompi_info --param ob1 all&amp;lt;/tt&amp;gt; -- which may be increased for applications that are certain to benefit from a larger value upon startup.&lt;br /&gt;
* Open MPI allows adapting MCA parameters on the command-line: parameters may be supplied, e.g. the above-mentioned parameter &amp;lt;tt&amp;gt;mpirun -np 128 --mca mpirun -np 16 --mca pml_ob1_free_list_num 128 ./mpi_stub&amp;lt;/tt&amp;gt;.&lt;br /&gt;
* Open MPI internally uses the tool [http://www.open-mpi.org/projects/hwloc/ hwloc] for node-local processor-information, as well as process- and memory-affinity. This tool also is a good tool to get information on the node&#039;s processor topology and Cache-information. This may be used to optimize and balance memory usage or for choosing a better ratio of MPI processes per node vs. OpenMP threads per core.&lt;br /&gt;
== Intel (i)MPI ==&lt;br /&gt;
The Intel MPI Library is a multi-fabric message passing library that implements the Message Passing Interface, v2.2 (MPI-2.2) specification. It provides a standard library across Intel&lt;br /&gt;
platforms that enable adoption of MPI-2.2 functions as their needs dictate.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The Intel MPI Library enables developers to change or to upgrade processors and interconnects as new technology becomes available without changes to the software or to the operating environment.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The library is provided in the following kits:&lt;br /&gt;
* The Intel MPI Library Runtime Environment (RTO) has the tools you need to run programs, including Multipurpose Daemon (MPD), Hydra and supporting utilities, shared (.so) libraries, and documentation.&lt;br /&gt;
* The Intel MPI Library Development Kit (SDK) includes all of the Runtime Environment components plus compilation tools, including compiler commands such as &amp;lt;b&amp;gt;mpiicc&amp;lt;/b&amp;gt;, include files and modules, static (.a) libraries, debug libraries, trace libraries, and test codes.&lt;br /&gt;
=== General information  ===&lt;br /&gt;
All Intel mpi-modules are called &#039;&#039;&#039;&#039;mpi/impi&#039;&#039;&#039;&#039;.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
These modules provides the Intel Message Passing Interface (mpicc, mpicxx, mpif77&lt;br /&gt;
and mpif90) for the Intel compiler suite (icc, icpc and ifort) &amp;lt;small&amp;gt;(see also [http://software.intel.com/en-us/intel-mpi-library Intel MPI Library])&amp;lt;/small&amp;gt;.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The corresponding Intel compiler module is loaded automatically (if not done before). &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;font color=red&amp;gt;Compiler and MPI module must fit. Don&#039;t mix incongruous versions!&amp;lt;/font&amp;gt;&lt;br /&gt;
=== Usage ===&lt;br /&gt;
The following table lists available MPI compiler commands and the underlying compilers, compiler families, languages, and application binary interfaces (ABIs) that they support.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;The Intel MPI Library Compiler Drivers&amp;lt;/u&amp;gt;&lt;br /&gt;
{| width=600px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Compiler Command !! Default Compiler !! Supported Language(s) !! Supported ABI&#039;s&lt;br /&gt;
|-&lt;br /&gt;
| colspan=4 style=&amp;quot;background-color:#DCDCDC;&amp;quot; | Generic Compilers &lt;br /&gt;
|-&lt;br /&gt;
| mpicc || gcc, cc  || C || 32/64 bit &lt;br /&gt;
|-&lt;br /&gt;
| mpicxx || g++ || C/C++ || 32/64 bit &lt;br /&gt;
|-&lt;br /&gt;
| mpifc || gfortran || Fortran77/Fortran 95 || 32/64 bit&lt;br /&gt;
|-&lt;br /&gt;
| colspan=4 style=&amp;quot;background-color:#DCDCDC;&amp;quot; | [[GCC|GNU Compiler]] Versions 3 and higher &lt;br /&gt;
|-&lt;br /&gt;
| mpigcc || gcc || C || 32/64 bit &lt;br /&gt;
|-&lt;br /&gt;
| mpigxx || g++  || C/C++ || 32/64 bit &lt;br /&gt;
|-&lt;br /&gt;
| mpif77 || g77 || Fortran 77 || 32/64 bit &lt;br /&gt;
|-&lt;br /&gt;
| mpif90 || gfortran || Fortran 95 || 32/64 bit&lt;br /&gt;
|-&lt;br /&gt;
| colspan=4 style=&amp;quot;background-color:#DCDCDC;&amp;quot; | [[Intel_Compiler|&#039;&#039;&#039;Intel Fortran, C++ Compilers&#039;&#039;&#039;]] Versions 13.1 through 14.0 and Higher&lt;br /&gt;
|-&lt;br /&gt;
| mpiicc || icc || C || 32/64 bit &lt;br /&gt;
|-&lt;br /&gt;
| mpiicpc || icpc || C++ || 32/64 bit &lt;br /&gt;
|-&lt;br /&gt;
|impiifort  || ifort || Fortran77/Fortran 95 || 32/64 bit &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
* Compiler commands are available only in the Intel MPI Library Development Kit.&lt;br /&gt;
* Compiler commands are in the &amp;lt;installdir&amp;gt;/&amp;lt;arch&amp;gt;/bin directory. Where &amp;lt;installdir&amp;gt; refers to the Intel MPI Library installation directory (depending on the loaded mpi module) and &amp;lt;arch&amp;gt; is one of the following architectures:&lt;br /&gt;
* ia32 - IA-32 architecture&lt;br /&gt;
* intel64 - Intel 64 architecture&lt;br /&gt;
* mic – Intel Xeon Phi™ Coprocessor architecture&lt;br /&gt;
* Ensure that the corresponding underlying compilers (32-bit or 64-bit, as appropriate) are already in your PATH. This is normally done by the &#039;module load&#039; command. &lt;br /&gt;
* To port existing MPI-enabled applications to the Intel MPI Library, recompile all sources.&lt;br /&gt;
* To display mini-help of a compiler command, execute it without any parameters.&lt;br /&gt;
&lt;br /&gt;
=== Further information ===&lt;br /&gt;
==== Intel MPI without multithreading on the bwUniCluster ====&lt;br /&gt;
* [[Batch_Jobs_-_bwUniCluster_Features#Intel_MPI_without_Multithreading|Additional Infos about Intel MPI without Multithreading]]&lt;br /&gt;
==== Sample MPI programm in &amp;quot;C&amp;quot; ====&lt;br /&gt;
The following example  code includes a sample MPI program written in C.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
#******************************************************************************&lt;br /&gt;
# Content: (exemplify version)&lt;br /&gt;
#      Based on a Monto Carlo method, this MPI sample code uses volumes to&lt;br /&gt;
#      estimate the number PI.&lt;br /&gt;
#*****************************************************************************/&lt;br /&gt;
#include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;math.h&amp;gt;&lt;br /&gt;
#include &amp;lt;time.h&amp;gt;&lt;br /&gt;
#include &amp;lt;math.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
// here you&#039;l include the main MPI-library&lt;br /&gt;
#include &amp;quot;mpi.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#define MASTER 0&lt;br /&gt;
#define TAG_HELLO 4&lt;br /&gt;
#define TAG_TEST 5&lt;br /&gt;
#define TAG_TIME 6&lt;br /&gt;
&lt;br /&gt;
int main(int argc, char *argv[]) {&lt;br /&gt;
  int i, id, remote_id, num_procs;&lt;br /&gt;
   &lt;br /&gt;
  MPI_Status stat;&lt;br /&gt;
  int namelen;&lt;br /&gt;
  char name[MPI_MAX_PROCESSOR_NAME];&lt;br /&gt;
&lt;br /&gt;
  // Start MPI.&lt;br /&gt;
  if (MPI_Init (&amp;amp;argc, &amp;amp;argv) != MPI_SUCCESS) {&lt;br /&gt;
      printf (&amp;quot;Failed to initialize MPIn&amp;quot;);&lt;br /&gt;
      return (-1);&lt;br /&gt;
  }&lt;br /&gt;
  // Create the communicator, and retrieve the number of processes.&lt;br /&gt;
  MPI_Comm_size (MPI_COMM_WORLD, &amp;amp;num_procs);&lt;br /&gt;
&lt;br /&gt;
  // Determine the rank of the process.&lt;br /&gt;
  MPI_Comm_rank (MPI_COMM_WORLD, &amp;amp;id);&lt;br /&gt;
&lt;br /&gt;
  // Get machine name&lt;br /&gt;
  MPI_Get_processor_name (name, &amp;amp;namelen);&lt;br /&gt;
  &lt;br /&gt;
  if (id == MASTER) {&lt;br /&gt;
      printf (&amp;quot;Hello world: rank %d of %d running on %sn&amp;quot;, id, num_procs, name);&lt;br /&gt;
&lt;br /&gt;
  for (i = 1; i&amp;lt;num_procs; i++) {	&lt;br /&gt;
      MPI_Recv (&amp;amp;remote_id, 1, MPI_INT, i, TAG_HELLO, MPI_COMM_WORLD, &amp;amp;stat);	&lt;br /&gt;
      MPI_Recv (&amp;amp;num_procs, 1, MPI_INT, i, TAG_HELLO, MPI_COMM_WORLD, &amp;amp;stat);  		&lt;br /&gt;
      MPI_Recv (&amp;amp;namelen, 1, MPI_INT, i, TAG_HELLO, MPI_COMM_WORLD, &amp;amp;stat);			&lt;br /&gt;
      MPI_Recv (name, namelen+1, MPI_CHAR, i, TAG_HELLO, MPI_COMM_WORLD, &amp;amp;stat);&lt;br /&gt;
			&lt;br /&gt;
      printf (&amp;quot;Hello world: rank %d of %d running on %sn&amp;quot;, remote_id, num_procs, name);&lt;br /&gt;
      }&lt;br /&gt;
  }&lt;br /&gt;
  else {	    &lt;br /&gt;
      MPI_Send (&amp;amp;id, 1, MPI_INT, MASTER, TAG_HELLO, MPI_COMM_WORLD);&lt;br /&gt;
      MPI_Send (&amp;amp;num_procs, 1, MPI_INT, MASTER, TAG_HELLO, MPI_COMM_WORLD);&lt;br /&gt;
      MPI_Send (&amp;amp;namelen, 1, MPI_INT, MASTER, TAG_HELLO, MPI_COMM_WORLD);&lt;br /&gt;
      MPI_Send (name, namelen+1, MPI_CHAR, MASTER, TAG_HELLO, MPI_COMM_WORLD);&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
   // Rank 0 distributes seek randomly to all processes.&lt;br /&gt;
  double startprocess, endprocess;&lt;br /&gt;
&lt;br /&gt;
  int distributed_seed = 0;&lt;br /&gt;
  int *buff;&lt;br /&gt;
&lt;br /&gt;
  buff = (int *)malloc(num_procs * sizeof(int));&lt;br /&gt;
	&lt;br /&gt;
  unsigned int MAX_NUM_POINTS = pow (2,32) - 1;&lt;br /&gt;
  unsigned int num_local_points = MAX_NUM_POINTS / num_procs;&lt;br /&gt;
&lt;br /&gt;
  if (id == MASTER) {		  &lt;br /&gt;
      srand (time(NULL));&lt;br /&gt;
  &lt;br /&gt;
      for (i=0; i&amp;lt;num_procs; i++) {           &lt;br /&gt;
          distributed_seed = rand();&lt;br /&gt;
          buff[i] = distributed_seed;&lt;br /&gt;
     }  &lt;br /&gt;
  }&lt;br /&gt;
  // Broadcast the seed to all processes&lt;br /&gt;
  MPI_Bcast(buff, num_procs, MPI_INT, MASTER, MPI_COMM_WORLD);&lt;br /&gt;
&lt;br /&gt;
  // At this point, every process (including rank 0) has a different seed. Using their seed,&lt;br /&gt;
  // each process generates N points randomly in the interval [1/n, 1, 1]&lt;br /&gt;
  startprocess = MPI_Wtime();&lt;br /&gt;
&lt;br /&gt;
  srand (buff[id]);&lt;br /&gt;
&lt;br /&gt;
  unsigned int point = 0;&lt;br /&gt;
  unsigned int rand_MAX = 128000;&lt;br /&gt;
  float p_x, p_y, p_z;&lt;br /&gt;
  float temp, temp2, pi;&lt;br /&gt;
  double result;&lt;br /&gt;
  unsigned int inside = 0, total_inside = 0;&lt;br /&gt;
&lt;br /&gt;
  for (point=0; point&amp;lt;num_local_points; point++) {&lt;br /&gt;
      temp = (rand() % (rand_MAX+1));&lt;br /&gt;
      p_x = temp / rand_MAX;&lt;br /&gt;
      p_x = p_x / num_procs;&lt;br /&gt;
      &lt;br /&gt;
      temp2 = (float)id / num_procs;	// id belongs to 0, num_procs-1&lt;br /&gt;
      p_x += temp2;&lt;br /&gt;
      &lt;br /&gt;
      temp = (rand() % (rand_MAX+1));&lt;br /&gt;
      p_y = temp / rand_MAX;&lt;br /&gt;
      &lt;br /&gt;
      temp = (rand() % (rand_MAX+1));&lt;br /&gt;
      p_z = temp / rand_MAX;&lt;br /&gt;
&lt;br /&gt;
      // Compute the number of points residing inside of the 1/8 of the sphere&lt;br /&gt;
      result = p_x * p_x + p_y * p_y + p_z * p_z;&lt;br /&gt;
&lt;br /&gt;
      if (result &amp;lt;= 1) inside++;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  double elapsed = MPI_Wtime() - startprocess;&lt;br /&gt;
&lt;br /&gt;
  MPI_Reduce (&amp;amp;inside, &amp;amp;total_inside, 1, MPI_UNSIGNED, MPI_SUM, MASTER, MPI_COMM_WORLD);&lt;br /&gt;
&lt;br /&gt;
#if DEBUG &lt;br /&gt;
  printf (&amp;quot;rank %d counts %u points inside the spheren&amp;quot;, id, inside);&lt;br /&gt;
#endif&lt;br /&gt;
  if (id == MASTER) {&lt;br /&gt;
      double timeprocess[num_procs];&lt;br /&gt;
&lt;br /&gt;
      timeprocess[MASTER] = elapsed;&lt;br /&gt;
      printf(&amp;quot;Elapsed time from rank %d: %10.2f (sec) n&amp;quot;, MASTER, timeprocess[MASTER]);&lt;br /&gt;
      for (i=1; i&amp;lt;num_procs; i++) {&lt;br /&gt;
	  // Rank 0 waits for elapsed time value &lt;br /&gt;
	  MPI_Recv (&amp;amp;timeprocess[i], 1, MPI_DOUBLE, i, TAG_TIME, MPI_COMM_WORLD, &amp;amp;stat); &lt;br /&gt;
	  printf(&amp;quot;Elapsed time from rank %d: %10.2f (sec) n&amp;quot;, i, timeprocess[i]);&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
      temp = 6 * (float)total_inside;&lt;br /&gt;
      pi = temp / MAX_NUM_POINTS;   &lt;br /&gt;
      printf ( &amp;quot;Out of %u points, there are %u points inside the sphere =&amp;gt; pi=%16.12fn&amp;quot;,&lt;br /&gt;
          MAX_NUM_POINTS, total_inside, pi);&lt;br /&gt;
  }&lt;br /&gt;
  else {&lt;br /&gt;
      // Send back the processing time (in second)&lt;br /&gt;
      MPI_Send (&amp;amp;elapsed, 1, MPI_DOUBLE, MASTER, TAG_TIME, MPI_COMM_WORLD);&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  free(buff);&lt;br /&gt;
&lt;br /&gt;
  // Terminate MPI.&lt;br /&gt;
  MPI_Finalize();&lt;br /&gt;
  &lt;br /&gt;
  return 0;&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
= Hybrid Parallelization = &lt;br /&gt;
--&amp;gt;&lt;/div&gt;</summary>
		<author><name>R Rutka</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=Development/Parallel_Programming&amp;diff=4539</id>
		<title>Development/Parallel Programming</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=Development/Parallel_Programming&amp;diff=4539"/>
		<updated>2016-11-03T16:51:32Z</updated>

		<summary type="html">&lt;p&gt;R Rutka: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=600px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Description !! Content&lt;br /&gt;
|-&lt;br /&gt;
| module load&lt;br /&gt;
| mpi/impi &amp;amp;#124; mpi/openmpi &lt;br /&gt;
|-&lt;br /&gt;
| Links&lt;br /&gt;
| [https://software.intel.com/en-us/intel-mpi-library Intel® MPI Library] &amp;amp;#124; [http://www.open-mpi.org/ Open MPI] &lt;br /&gt;
|-&lt;br /&gt;
| License&lt;br /&gt;
| [https://software.intel.com/en-us/articles/intel-mpi-library-licensing-faq Intel MPI Library Licensing FAQ] &amp;lt;small&amp;gt;install-doc/EULA.txt&amp;lt;/small&amp;gt; &amp;amp;#124; [http://www.open-mpi.org/community/license.php Open MPI License]&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
= Introduction =&lt;br /&gt;
This page will provide information regarding the supported parallel programming paradigms and specific hints on their usage.&lt;br /&gt;
Please refer to the [[BwUniCluster_Environment_Modules|Modules Documentation]] how to setup your environment on bwUniCluster to load a specific software installation.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
More informations about Compilers installed at our clusters is available here:&lt;br /&gt;
* [[Intel_Compiler|Intel Compiler Suite]]&lt;br /&gt;
* [[GCC|GNU Compiler (GCC)]]&lt;br /&gt;
* [[General_compiler_usage|General Compiler Usage (incl. PGI Compiler)]]&lt;br /&gt;
&lt;br /&gt;
= Versions and Availability =&lt;br /&gt;
=== impi (Intel) ===&lt;br /&gt;
A list of versions currently available compilers on the bwHPC-C5-Clusters can be obtained from the&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;big&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[https://cis-hpc.uni-konstanz.de/prod.cis/ Cluster Information System CIS]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
{{#widget:Iframe&lt;br /&gt;
|url=https://cis-hpc.uni-konstanz.de/prod.cis/bwUniCluster/mpi/impi&lt;br /&gt;
|width=99%&lt;br /&gt;
|height=1300&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== openmpi ===&lt;br /&gt;
A list of versions currently available compilers on the bwHPC-C5-Clusters can be obtained from the&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;big&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[https://cis-hpc.uni-konstanz.de/prod.cis/ Cluster Information System CIS]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
{{#widget:Iframe&lt;br /&gt;
|url=https://cis-hpc.uni-konstanz.de/prod.cis/bwUniCluster/mpi/openmpi&lt;br /&gt;
|width=99%&lt;br /&gt;
|height=1900&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= OpenMP =&lt;br /&gt;
== General Information ==&lt;br /&gt;
OpenMP is a mature specification [http://openmp.org/wp/openmp-specifications/] to allow easy, portable, and most importantly incremental node-level parallelisation of code.&lt;br /&gt;
Being a thread-based approach, OpenMP is aimed at more fine-grained parallelism than [[BwHPC_Best_Practices_Repository#MPI|MPI]].&lt;br /&gt;
Although there have been extensions to extend OpenMP for inter-node parallelisation, it is a node-level approach aimed to make best usage of a node&#039;s cores&amp;lt;!-- -- the section [[#Hybrid Parallelisation|Hybrid Parallelisation]] will explain how to parallelise utilizing MPI plus a thread-based parallelization paradigm like OpenMP--&amp;gt;.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
With regard to ease-of-use, OpenMP is ahead of any other common approach: the source-code is annotated using &amp;lt;tt&amp;gt;#pragma omp&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;!$omp&amp;lt;/tt&amp;gt; statements, in C/C++ and Fortran respectively.&lt;br /&gt;
Whenever the compiler encompasses a semantic block of code encapsulated in a parallel region, this block of code is transparently compiled into a function, which is passed to a so-called team-of-threads upon entering this semantic block. This fork-join model of execution eases a lot of the programmer&#039;s pain involved with Threads.&lt;br /&gt;
Being a loop-centric approach, OpenMP is aimed at codes with long/time-consuming loops.&lt;br /&gt;
A single combined directive &amp;lt;tt&amp;gt;pragma omp parallel for&amp;lt;/tt&amp;gt; will tell the compiler to automatically parallel the ensuing for-loop.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The following example is a bit more advanced in that even reductions of variables over multiple threads are easily to parallel:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
   for (int i=0, sum = 0.0; i &amp;lt; VECTOR_LEN; i++)&lt;br /&gt;
     norm2 += (v[i]*v[i]);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
is parallelized by just adding a single line as in:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
#  pragma omp parallel for reduction(+:norm2)&lt;br /&gt;
   for (int i=0, sum = 0.0; i &amp;lt; VECTOR_LEN; i++)&lt;br /&gt;
     norm2 += (v[i]*v[i]);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
With &amp;lt;tt&amp;gt;VECTOR_LENGTH&amp;lt;/tt&amp;gt; being large enough, this piece of code compiled with OpenMP will run in parallel, exhibiting very nice speedup.&lt;br /&gt;
Compiled without, the code remains as is. Developpers may therefore incrementally parallelize their application based on the profile derived from performance analysis tools, starting with the most time-consuming loops.&lt;br /&gt;
Using OpenMP&#039;s concise API, one may query the number of running threads, the number of processors, a time to calculate runtime, and even set parameters such as the number of threads to execute a parallel region.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The OpenMP-4.0 specification added support for the SIMD-directive to better utilize SIMD-vectorization, as well as integrating directives to offload computation to accelerators using the &amp;lt;tt&amp;gt;target&amp;lt;/tt&amp;gt; directive: these are integrated into the Intel Compiler and are actively being worked on for the GNU compiler, some restrictions may apply.&lt;br /&gt;
== OpenMP Best Practice Guide ==&lt;br /&gt;
The following silly example to calculate the squared Euklidian Norm shows some techniques:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;omp.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#define VECTOR_LENGTH 5&lt;br /&gt;
&lt;br /&gt;
int main (int argc, char * argv[])&lt;br /&gt;
{&lt;br /&gt;
    int len = VECTOR_LENGTH;&lt;br /&gt;
    int i;&lt;br /&gt;
    double * v;&lt;br /&gt;
    double norm2 = 0.0;&lt;br /&gt;
    double t1, tdiff;&lt;br /&gt;
&lt;br /&gt;
    if (argc &amp;gt; 1)&lt;br /&gt;
        len = atoi (argv[1]);&lt;br /&gt;
    v = malloc (len * sizeof(double));&lt;br /&gt;
&lt;br /&gt;
    t1 = omp_get_wtime();&lt;br /&gt;
    // Initialization already with (the same number of) threads&lt;br /&gt;
#pragma omp parallel for&lt;br /&gt;
    for (i=0; i &amp;lt; len; i++) {&lt;br /&gt;
        v[i] = i;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // Now aggregate the sum-of-squares by specifying a reduction&lt;br /&gt;
#pragma omp parallel for reduction(+:norm2)&lt;br /&gt;
    for(i=0; i &amp;lt; len; i++) {&lt;br /&gt;
        norm2 += (v[i]*v[i]);&lt;br /&gt;
    }&lt;br /&gt;
    tdiff = omp_get_wtime() - t1;&lt;br /&gt;
&lt;br /&gt;
    printf (&amp;quot;norm2: %f Time:%f\n&amp;quot;, norm2, tdiff);&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;!-- Specific OpenMP hints: default(none), reproducability, thread-safey --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Group independent parallel sections together: in the above example, You may combine those two sections into one larger parallel block. This will just once enter the parallel region (in the fork-join model) instead of twice. Especially in inner loops, this will considerably decrease overhead.&lt;br /&gt;
* Compile with the Intel compiler&#039;s option &amp;lt;tt&amp;gt;-diag-enable sc-parallel3&amp;lt;/tt&amp;gt; to get the further warnings on thread-safety, performance, etc. The following code with loop-carried dependency will e.g. compile fine (aka without warning):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
#pragma omp parallel for reduction(+:norm2)&lt;br /&gt;
    for(i=1; i &amp;lt; len-1; i++) {&lt;br /&gt;
        v[i] = v[i-1]+v[i+1];&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
However the Intel compiler with &amp;lt;tt&amp;gt;-diag-enable sc-parallel3&amp;lt;/tt&amp;gt; will produce the following warning:&lt;br /&gt;
&amp;lt;tt&amp;gt;warning #12246: variable &amp;quot;v&amp;quot; has loop carried data dependency that may lead to incorrect program execution in parallel mode; see (file:omp_norm2.c line:32)&amp;lt;/tt&amp;gt;&lt;br /&gt;
* Always specify &amp;lt;tt&amp;gt;default(none)&amp;lt;/tt&amp;gt; on larger parallel regions in order to specifically set the visibility of variables to either &amp;lt;tt&amp;gt;shared&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;private&amp;lt;/tt&amp;gt;.&lt;br /&gt;
* Try to restructure code to allow for &amp;lt;tt&amp;gt;nowait&amp;lt;/tt&amp;gt;: OpenMP defines synchronization points (implied barriers) at the end of work sharing constructs such as the &amp;lt;tt&amp;gt;pragma omp for&amp;lt;tt&amp;gt; directive. If the ensuing section of code does not depend on data being generated inside the parallel section, adding the &amp;lt;tt&amp;gt;nowait&amp;lt;/tt&amp;gt; clause to the worksharing directive allows the compiler to eliminate this synchronization point. This reduces overhead, allows for better overlap and better utilization of the processor&#039;s resources. This might imply however to restructure the code (move portions of independent code in between dependent works-sharing constructs).&lt;br /&gt;
== Usage ==&lt;br /&gt;
OpenMP is supported by various compilers, here the usage for two main compilers [[BwHPC_BPG_Compiler#GCC|GCC]] and [[BwHPC_BPG_Compiler#Intel Suite|Intel Suite]] are introduced.&lt;br /&gt;
For both compilers, You first need to turn on OpenMP support by specifying a parameter on the compiler&#039;s command-line.&lt;br /&gt;
In case You make function calls to OpenMP&#039;s API, You also need to include the header-file &amp;lt;tt&amp;gt;omp.h&amp;lt;/tt&amp;gt;.&lt;br /&gt;
OpenMP&#039;s API allows to query or set the number of threads, query the number of processors, get a wall-clock time to measure execution times, etc.&lt;br /&gt;
=== OpenMP with GNU Compiler Collection ===&lt;br /&gt;
Starting with version 4.2 the gcc compiler supports OpenMP-2.5.&lt;br /&gt;
Since then the analysis capabilities of the GNU compiler have steadily improved.&lt;br /&gt;
The installed compilers support OpenMP-3.1.&lt;br /&gt;
&amp;lt;!-- Starting with gcc-4.9 OpenMP-4.0 is supported, however the &amp;lt;tt&amp;gt;target&amp;lt;/tt&amp;gt; directive will only offload to the host processor. --&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
To use OpenMP with the gcc-compiler, pass &amp;lt;tt&amp;gt;-fopenmp&amp;lt;/tt&amp;gt; as parameter.&lt;br /&gt;
=== OpenMP with Intel Compiler ===&lt;br /&gt;
The Intel Compiler&#039;s support for OpenMP is more advanced than gcc&#039;s -- especially in term of programmer support.&lt;br /&gt;
To use OpenMP with the Intel compiler, pass &amp;lt;tt&amp;gt;-openmp&amp;lt;/tt&amp;gt; as command-line parameter.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
One may get very insightful information about OpenMP, when compiling with&lt;br /&gt;
* Compiling with &amp;lt;tt&amp;gt;-openmp-report2&amp;lt;/tt&amp;gt; to get information, which loops were parallelized and a reason why not.&lt;br /&gt;
* Compiling with &amp;lt;tt&amp;gt;-diag-enable sc-parallel3&amp;lt;/tt&amp;gt; to get errors and warnings about your sources weaknesses with regard to parallelization (see example below).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------------------------------------------- --&amp;gt;&lt;br /&gt;
= MPI =&lt;br /&gt;
In this section, You will find information regarding the supported installations of the Message-Passing Interface libraries and their usage.&amp;lt;br&amp;gt;&lt;br /&gt;
Due to the Fortran interface ABI, all MPI-libraries are normally bound to a specific compiler-vendor and even the specific compiler version.&lt;br /&gt;
Therefore, as listed in [[BwHPC_BPG_Compiler]] two compilers are supported on bwUniCluster: [[GCC|GCC]] and [[Intel_Compiler|Intel Compiler Suite]].&lt;br /&gt;
As both compilers are continously improving, the communication libraries will be adopted in lock-step.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
With a set of different implementations, there comes the problem of choice. These pages should inform the user of the communication libraries, what considerations should be done with regard to performance, maintainability and debugging -- in general tool support -- of the various implementations.&lt;br /&gt;
== MPI Introduction ==&lt;br /&gt;
The Message-Passing Interface is a standard provided by the [http://www.mpi-forum.org MPI-Forum] which regularly convenes for the [http://meetings.mpi-forum.org MPI-Forum Meetings] to update this standard. The current version is MPI-3.0 available as [http://mpi-forum.org/docs/mpi-3.0/mpi30-report.pdf PDF].&lt;br /&gt;
This document defines the API of over 300 functions for the C- and the Fortran-language -- however, You will certainly not need all of them to begin with.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Every MPI-conforming program needs to call &amp;lt;tt&amp;gt;MPI_Init()&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;MPI_Finalize()&amp;lt;/tt&amp;gt; upon start and shutdown -- or &amp;lt;tt&amp;gt;MPI_Abort()&amp;lt;/tt&amp;gt; in case of an abnormal termination.&lt;br /&gt;
After initialization the programm may call any other MPI-function, specifically communication functions.&lt;br /&gt;
However to do so, it is required to find out how many processes the program has been started with, using &amp;lt;tt&amp;gt;MPI_Comm_size()&amp;lt;/tt&amp;gt; and what number (here called a rank= this particular process has using &amp;lt;tt&amp;gt;MPI_Comm_rank()&amp;lt;/tt&amp;gt;.&lt;br /&gt;
Communication is always relative to a so-called communicator -- the default one after initialization being called &amp;lt;tt&amp;gt;MPI_COMM_WORLD&amp;lt;/tt&amp;gt;- &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
There&#039;s basically three ways of communication:&lt;br /&gt;
* two-sided communication using point-to-point (often abbreviated P2P) functions, such as &amp;lt;tt&amp;gt;MPI_Send()&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;MPI_Recv()&amp;lt;/tt&amp;gt;, which always involves two participating processes,&lt;br /&gt;
* collectice communcation functions (often abbreviated as colls) involve multiple processes, examples are &amp;lt;tt&amp;gt;MPI_Bcast()&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;MPI_Reduce()&amp;lt;/tt&amp;gt;, &lt;br /&gt;
* one-sided communication, where communication between two processes is initiated by one-process, only. With proper RMA-hardware support and careful programming, this may allow higher performance or scalibility.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
All parts of the programm, which reference MPI functionality need to be compiled with the &#039;&#039;&#039;same&#039;&#039;&#039; compiler settings/include files and linked to the same MPI-Library. This is stressed here, since without taking pre-cautions, a different MPI&#039;s header may be included, resulting in funny errors: consider that Intel MPI is derived from MPIch, with MPI-datatypes being C &amp;lt;tt&amp;gt;int&amp;lt;/tt&amp;gt;s, while Open MPI uses pointers to structures (the former being 4, the latter being 8 bytes on bwUniCluster).&lt;br /&gt;
To ease the programmer&#039;s life, MPI implementations offer compiler-wrappers, e.g. &amp;lt;tt&amp;gt;mpicc&amp;lt;/tt&amp;gt; for C and &amp;lt;tt&amp;gt;mpif90&amp;lt;/tt&amp;gt; for Fortran90 for compilation and linking, taking care to include all required libraries.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
All programs must be started using the &amp;lt;tt&amp;gt;mpirun&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;mpiexec&amp;lt;/tt&amp;gt; command. Depending on the actual implementation, it uses different arguments, however the following works with any MPI:&lt;br /&gt;
* &amp;lt;tt&amp;gt;mpirun -np 128 ./app&amp;lt;/tt&amp;gt; starts 128 processes (with ranks 0 to 127)&lt;br /&gt;
* &amp;lt;tt&amp;gt;mpiexec -n 128 -hostfile mynodes.txt ./app&amp;lt;/tt&amp;gt; starts 128 processes on only the nodes listed line-by-line in the provided text-file &amp;lt;tt&amp;gt;mynodes.txt&amp;lt;/tt&amp;gt;.&lt;br /&gt;
* &amp;lt;tt&amp;gt;mpiexec -n 64 ./app1 : -n 64 ./app2&amp;lt;/tt&amp;gt; starts 128 processes, 64 of which execute &amp;lt;tt&amp;gt;app1&amp;lt;/tt&amp;gt;, the other 64 execute &amp;lt;tt&amp;gt;app2&amp;lt;/tt&amp;gt;. All processes however participate in the same &amp;lt;tt&amp;gt;MPI_COMM_WORLD&amp;lt;/tt&amp;gt; and therefore must accordingly take care about their respective ranks.&lt;br /&gt;
Please note, that process placement (e.g. a round-robin scheme), and specifically process-binding to sockets is MPI-implementation dependant.&lt;br /&gt;
== MPI Best Practice Guide ==&lt;br /&gt;
Specific performance considerations with regard to MPI (independent of the implementation):&lt;br /&gt;
* No communication at all is best: Only communicate between processes if at all necessary. Consider that file-access is &amp;quot;communication&amp;quot; as well.&lt;br /&gt;
* If communication is done with multiple processes, try to involve as many processes in just one call: MPI optimizes the communication pattern for so-called &amp;quot;collective communication&amp;quot; to take advantage of the underlying network (with regard to network topology, message sizes, queueing capabilities of the network interconnect, etc.). Therefore try to always think in collective communication, if a communication pattern involves a group of processes.&lt;br /&gt;
* Try to group processes together: Function calls like &amp;lt;tt&amp;gt;MPI_Cart_create&amp;lt;/tt&amp;gt; will come in handy for applications with cartesian domains but also general communicators derived from &amp;lt;tt&amp;gt;MPI_COMM_WORLD&amp;lt;/tt&amp;gt; using &amp;lt;tt&amp;gt;MPI_Comm_split()&amp;lt;/tt&amp;gt; may benefit by MPI&#039;s knowing the underlying network topology. Use MPI3&#039;s &amp;lt;tt&amp;gt;MPI_Comm_split_type()&amp;lt;/tt&amp;gt; with &amp;lt;tt&amp;gt;MPI_COMM_TYPE_SHARED&amp;lt;/tt&amp;gt; for a sub-communicator with processes having access to the same shared memory region (aka on bwUniCluster the same node).&lt;br /&gt;
* File-accesses to load / store data &#039;&#039;&#039;must&#039;&#039;&#039; be done collectively: Writing to storage, or even reading the initialization data -- all of which involves getting data from/to all MPI processes -- must be done collectively. MPI&#039;s Parallel IO offers a rich API to read and distribute the data access -- in order to take advantage of parallel filesystems like Lustre. A many-fold performance improvement may be seen by writing data in large chunks in collective fashion -- and at the same time being nice to other users and applications. &lt;br /&gt;
* Try to hide the communication by computation: Try to hide (some) of the cost of communication of Point-to-point communication by using non-blocking / immediate P2P-calls (&amp;lt;tt&amp;gt;MPI_Isend&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;MPI_Irecv&amp;lt;/tt&amp;gt; et al, followed by &amp;lt;tt&amp;gt;MPI_Wait&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;MPI_Test&amp;lt;/tt&amp;gt; et al). This may allow the MPI-implementation to initiate or even offload communication to the network interconnect and resume executing your application, while data is being transferred. MPI-3 adds non-blocking collectives, e.g. &amp;lt;tt&amp;gt;MPI_Ibcast()&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;MPI_Iallreduce()&amp;lt;/tt&amp;gt;. For extra credit, explain the use-cases of &amp;lt;tt&amp;gt;MPI_Ibarrier()&amp;lt;/tt&amp;gt;.&lt;br /&gt;
* Every call to MPI may trigger an access to physical hardware -- limit it: When calling communication-related functions such as &amp;lt;tt&amp;gt;MPI_Test&amp;lt;/tt&amp;gt; to check whether a specific communication has finished, the queue of the network adapter may need to be queried. This memory access or even physical hardware access to query the state will cost cycles. Therefore, the programmer should combine multiple requests with functions such as &amp;lt;tt&amp;gt;MPI_Waitall()&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;MPI_Waitany()&amp;lt;/tt&amp;gt; or their Test*-counterparts.&lt;br /&gt;
* Make usage of derived datatypes: instead of manually copying data into temporary, even newly allocated memory, describe the data-layout to MPI -- and let the implementation, or even the network HCA&#039;s hardware do the data fetching.&lt;br /&gt;
* Bind Your processes to sockets: Operating Systems are good in making best use of the ressources -- which sometimes involves moving tasks from one core to another, or even (though more unlikely since the OS&#039; heuristics try to avoid it) to another socket, with the obvious effects: Caches are cold, every memory access to memory allocated on the previous socket &amp;quot;has to travel the bus&amp;quot;. This is particularly happening if You have multiple OpenMP parallel regions which are separated by code that does IO -- and threads are sleeping -- the processes doing IO may wander to a different socket... Bind Your processes to at least the socket. All major MPIs support this binding (see below).&lt;br /&gt;
* Do not use the C++ interface: First of all, it has been marked as deprecated in the MPI-3.0 standard, since it added little benefit to C++ programmers over the C-interface. Moreover, since MPI implementations are written in C, the interface adds another level of indirection and therefore a bit of overhead in terms of instructions and Cache misses.&lt;br /&gt;
== Open MPI ==&lt;br /&gt;
The [http://www.open-mpi.org Open MPI] library is an open, flexible and nevertheless performant implementation of MPI-2 and MPI-3. Licensed under BSD, it is being actively developed by an open community of industry and research institutions.&lt;br /&gt;
The flexibility comes in handy: using the concept of a [http://www.open-mpi.org/faq/?category=tuning#mca-def MCA] (aka a plugin) Open MPI supports many different network interconnects (Infinband, TCP, Cray, etc.) , on the other hand, a installation may be tailored to suite an installation, e.g. the network (Infiniband with specific settings), the main startup-mechanism, etc.&lt;br /&gt;
Furthermore, the [http://www.open-mpi.org/faq/ FAQ] offers hints on [http://www.open-mpi.org/faq/?category=tuning performance tuning].&lt;br /&gt;
=== Usage ===&lt;br /&gt;
Like other MPI implementations, after loading the [[BwUniCluster_Environment_Modules|module]], Open MPI provides the compiler-wrappers &amp;lt;tt&amp;gt;mpicc&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;mpicxx&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;mpifort&amp;lt;/tt&amp;gt;  (or for&lt;br /&gt;
versions lower than 1.7 &amp;lt;tt&amp;gt;mpif77&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;mpif90&amp;lt;/tt&amp;gt;) for the C-, C++ and Fortran compilers respectively. Albeit their usage is not required, these wrappers are handy to not have to use the command-line options for header- or library directories, aka &amp;lt;tt&amp;gt;-I&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;-L&amp;lt;/tt&amp;gt;, as well as the actual needed MPI-libraries itselve.&lt;br /&gt;
=== Further information === &lt;br /&gt;
Open MPI also features a few specific functionalities that will help users and developpers, alike:&lt;br /&gt;
* Open MPI&#039;s tool &amp;lt;tt&amp;gt;ompi_info&amp;lt;/tt&amp;gt; allows seeing all of Open MPI&#039;s installed MCA components and their specific options.&lt;br /&gt;
Without any option the user gets a list of flags, the Open MPI installation was compiled for (version of compilers, specific configure-flags, e.g. debugging, or profiling options). Furthermore, using &amp;lt;tt&amp;gt;ompi_info --param all all&amp;lt;/tt&amp;gt; one may see all of the MCA&#039;s options, e.g. that the default PML-MCA uses an initial free-list of 4 blocks (increased by 64 upon first encountering this limit):&lt;br /&gt;
&amp;lt;tt&amp;gt;ompi_info --param ob1 all&amp;lt;/tt&amp;gt; -- which may be increased for applications that are certain to benefit from a larger value upon startup.&lt;br /&gt;
* Open MPI allows adapting MCA parameters on the command-line: parameters may be supplied, e.g. the above-mentioned parameter &amp;lt;tt&amp;gt;mpirun -np 128 --mca mpirun -np 16 --mca pml_ob1_free_list_num 128 ./mpi_stub&amp;lt;/tt&amp;gt;.&lt;br /&gt;
* Open MPI internally uses the tool [http://www.open-mpi.org/projects/hwloc/ hwloc] for node-local processor-information, as well as process- and memory-affinity. This tool also is a good tool to get information on the node&#039;s processor topology and Cache-information. This may be used to optimize and balance memory usage or for choosing a better ratio of MPI processes per node vs. OpenMP threads per core.&lt;br /&gt;
== Intel (i)MPI ==&lt;br /&gt;
The Intel MPI Library is a multi-fabric message passing library that implements the Message Passing Interface, v2.2 (MPI-2.2) specification. It provides a standard library across Intel&lt;br /&gt;
platforms that enable adoption of MPI-2.2 functions as their needs dictate.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The Intel MPI Library enables developers to change or to upgrade processors and interconnects as new technology becomes available without changes to the software or to the operating environment.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The library is provided in the following kits:&lt;br /&gt;
* The Intel MPI Library Runtime Environment (RTO) has the tools you need to run programs, including Multipurpose Daemon (MPD), Hydra and supporting utilities, shared (.so) libraries, and documentation.&lt;br /&gt;
* The Intel MPI Library Development Kit (SDK) includes all of the Runtime Environment components plus compilation tools, including compiler commands such as &amp;lt;b&amp;gt;mpiicc&amp;lt;/b&amp;gt;, include files and modules, static (.a) libraries, debug libraries, trace libraries, and test codes.&lt;br /&gt;
=== General information  ===&lt;br /&gt;
All Intel mpi-modules are called &#039;&#039;&#039;&#039;mpi/impi&#039;&#039;&#039;&#039;.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
These modules provides the Intel Message Passing Interface (mpicc, mpicxx, mpif77&lt;br /&gt;
and mpif90) for the Intel compiler suite (icc, icpc and ifort) &amp;lt;small&amp;gt;(see also [http://software.intel.com/en-us/intel-mpi-library Intel MPI Library])&amp;lt;/small&amp;gt;.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The corresponding Intel compiler module is loaded automatically (if not done before). &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;font color=red&amp;gt;Compiler and MPI module must fit. Don&#039;t mix incongruous versions!&amp;lt;/font&amp;gt;&lt;br /&gt;
=== Usage ===&lt;br /&gt;
The following table lists available MPI compiler commands and the underlying compilers, compiler families, languages, and application binary interfaces (ABIs) that they support.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;The Intel MPI Library Compiler Drivers&amp;lt;/u&amp;gt;&lt;br /&gt;
{| width=600px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Compiler Command !! Default Compiler !! Supported Language(s) !! Supported ABI&#039;s&lt;br /&gt;
|-&lt;br /&gt;
| colspan=4 style=&amp;quot;background-color:#DCDCDC;&amp;quot; | Generic Compilers &lt;br /&gt;
|-&lt;br /&gt;
| mpicc || gcc, cc  || C || 32/64 bit &lt;br /&gt;
|-&lt;br /&gt;
| mpicxx || g++ || C/C++ || 32/64 bit &lt;br /&gt;
|-&lt;br /&gt;
| mpifc || gfortran || Fortran77/Fortran 95 || 32/64 bit&lt;br /&gt;
|-&lt;br /&gt;
| colspan=4 style=&amp;quot;background-color:#DCDCDC;&amp;quot; | [[GCC|GNU Compiler]] Versions 3 and higher &lt;br /&gt;
|-&lt;br /&gt;
| mpigcc || gcc || C || 32/64 bit &lt;br /&gt;
|-&lt;br /&gt;
| mpigxx || g++  || C/C++ || 32/64 bit &lt;br /&gt;
|-&lt;br /&gt;
| mpif77 || g77 || Fortran 77 || 32/64 bit &lt;br /&gt;
|-&lt;br /&gt;
| mpif90 || gfortran || Fortran 95 || 32/64 bit&lt;br /&gt;
|-&lt;br /&gt;
| colspan=4 style=&amp;quot;background-color:#DCDCDC;&amp;quot; | [[Intel_Compiler|&#039;&#039;&#039;Intel Fortran, C++ Compilers&#039;&#039;&#039;]] Versions 13.1 through 14.0 and Higher&lt;br /&gt;
|-&lt;br /&gt;
| mpiicc || icc || C || 32/64 bit &lt;br /&gt;
|-&lt;br /&gt;
| mpiicpc || icpc || C++ || 32/64 bit &lt;br /&gt;
|-&lt;br /&gt;
|impiifort  || ifort || Fortran77/Fortran 95 || 32/64 bit &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
* Compiler commands are available only in the Intel MPI Library Development Kit.&lt;br /&gt;
* Compiler commands are in the &amp;lt;installdir&amp;gt;/&amp;lt;arch&amp;gt;/bin directory. Where &amp;lt;installdir&amp;gt; refers to the Intel MPI Library installation directory (depending on the loaded mpi module) and &amp;lt;arch&amp;gt; is one of the following architectures:&lt;br /&gt;
* ia32 - IA-32 architecture&lt;br /&gt;
* intel64 - Intel 64 architecture&lt;br /&gt;
* mic – Intel Xeon Phi™ Coprocessor architecture&lt;br /&gt;
* Ensure that the corresponding underlying compilers (32-bit or 64-bit, as appropriate) are already in your PATH. This is normally done by the &#039;module load&#039; command. &lt;br /&gt;
* To port existing MPI-enabled applications to the Intel MPI Library, recompile all sources.&lt;br /&gt;
* To display mini-help of a compiler command, execute it without any parameters.&lt;br /&gt;
&lt;br /&gt;
=== Further information ===&lt;br /&gt;
==== Intel MPI without multithreading on the bwUniCluster ====&lt;br /&gt;
* [[Batch_Jobs_-_bwUniCluster_Features#Intel_MPI_without_Multithreading|Additional Infos about Intel MPI without Multithreading]]&lt;br /&gt;
==== Sample MPI programm in &amp;quot;C&amp;quot; ====&lt;br /&gt;
The following example  code includes a sample MPI program written in C.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
#******************************************************************************&lt;br /&gt;
# Content: (exemplify version)&lt;br /&gt;
#      Based on a Monto Carlo method, this MPI sample code uses volumes to&lt;br /&gt;
#      estimate the number PI.&lt;br /&gt;
#*****************************************************************************/&lt;br /&gt;
#include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;math.h&amp;gt;&lt;br /&gt;
#include &amp;lt;time.h&amp;gt;&lt;br /&gt;
#include &amp;lt;math.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
// here you&#039;l include the main MPI-library&lt;br /&gt;
#include &amp;quot;mpi.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#define MASTER 0&lt;br /&gt;
#define TAG_HELLO 4&lt;br /&gt;
#define TAG_TEST 5&lt;br /&gt;
#define TAG_TIME 6&lt;br /&gt;
&lt;br /&gt;
int main(int argc, char *argv[]) {&lt;br /&gt;
  int i, id, remote_id, num_procs;&lt;br /&gt;
   &lt;br /&gt;
  MPI_Status stat;&lt;br /&gt;
  int namelen;&lt;br /&gt;
  char name[MPI_MAX_PROCESSOR_NAME];&lt;br /&gt;
&lt;br /&gt;
  // Start MPI.&lt;br /&gt;
  if (MPI_Init (&amp;amp;argc, &amp;amp;argv) != MPI_SUCCESS) {&lt;br /&gt;
      printf (&amp;quot;Failed to initialize MPIn&amp;quot;);&lt;br /&gt;
      return (-1);&lt;br /&gt;
  }&lt;br /&gt;
  // Create the communicator, and retrieve the number of processes.&lt;br /&gt;
  MPI_Comm_size (MPI_COMM_WORLD, &amp;amp;num_procs);&lt;br /&gt;
&lt;br /&gt;
  // Determine the rank of the process.&lt;br /&gt;
  MPI_Comm_rank (MPI_COMM_WORLD, &amp;amp;id);&lt;br /&gt;
&lt;br /&gt;
  // Get machine name&lt;br /&gt;
  MPI_Get_processor_name (name, &amp;amp;namelen);&lt;br /&gt;
  &lt;br /&gt;
  if (id == MASTER) {&lt;br /&gt;
      printf (&amp;quot;Hello world: rank %d of %d running on %sn&amp;quot;, id, num_procs, name);&lt;br /&gt;
&lt;br /&gt;
  for (i = 1; i&amp;lt;num_procs; i++) {	&lt;br /&gt;
      MPI_Recv (&amp;amp;remote_id, 1, MPI_INT, i, TAG_HELLO, MPI_COMM_WORLD, &amp;amp;stat);	&lt;br /&gt;
      MPI_Recv (&amp;amp;num_procs, 1, MPI_INT, i, TAG_HELLO, MPI_COMM_WORLD, &amp;amp;stat);  		&lt;br /&gt;
      MPI_Recv (&amp;amp;namelen, 1, MPI_INT, i, TAG_HELLO, MPI_COMM_WORLD, &amp;amp;stat);			&lt;br /&gt;
      MPI_Recv (name, namelen+1, MPI_CHAR, i, TAG_HELLO, MPI_COMM_WORLD, &amp;amp;stat);&lt;br /&gt;
			&lt;br /&gt;
      printf (&amp;quot;Hello world: rank %d of %d running on %sn&amp;quot;, remote_id, num_procs, name);&lt;br /&gt;
      }&lt;br /&gt;
  }&lt;br /&gt;
  else {	    &lt;br /&gt;
      MPI_Send (&amp;amp;id, 1, MPI_INT, MASTER, TAG_HELLO, MPI_COMM_WORLD);&lt;br /&gt;
      MPI_Send (&amp;amp;num_procs, 1, MPI_INT, MASTER, TAG_HELLO, MPI_COMM_WORLD);&lt;br /&gt;
      MPI_Send (&amp;amp;namelen, 1, MPI_INT, MASTER, TAG_HELLO, MPI_COMM_WORLD);&lt;br /&gt;
      MPI_Send (name, namelen+1, MPI_CHAR, MASTER, TAG_HELLO, MPI_COMM_WORLD);&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
   // Rank 0 distributes seek randomly to all processes.&lt;br /&gt;
  double startprocess, endprocess;&lt;br /&gt;
&lt;br /&gt;
  int distributed_seed = 0;&lt;br /&gt;
  int *buff;&lt;br /&gt;
&lt;br /&gt;
  buff = (int *)malloc(num_procs * sizeof(int));&lt;br /&gt;
	&lt;br /&gt;
  unsigned int MAX_NUM_POINTS = pow (2,32) - 1;&lt;br /&gt;
  unsigned int num_local_points = MAX_NUM_POINTS / num_procs;&lt;br /&gt;
&lt;br /&gt;
  if (id == MASTER) {		  &lt;br /&gt;
      srand (time(NULL));&lt;br /&gt;
  &lt;br /&gt;
      for (i=0; i&amp;lt;num_procs; i++) {           &lt;br /&gt;
          distributed_seed = rand();&lt;br /&gt;
          buff[i] = distributed_seed;&lt;br /&gt;
     }  &lt;br /&gt;
  }&lt;br /&gt;
  // Broadcast the seed to all processes&lt;br /&gt;
  MPI_Bcast(buff, num_procs, MPI_INT, MASTER, MPI_COMM_WORLD);&lt;br /&gt;
&lt;br /&gt;
  // At this point, every process (including rank 0) has a different seed. Using their seed,&lt;br /&gt;
  // each process generates N points randomly in the interval [1/n, 1, 1]&lt;br /&gt;
  startprocess = MPI_Wtime();&lt;br /&gt;
&lt;br /&gt;
  srand (buff[id]);&lt;br /&gt;
&lt;br /&gt;
  unsigned int point = 0;&lt;br /&gt;
  unsigned int rand_MAX = 128000;&lt;br /&gt;
  float p_x, p_y, p_z;&lt;br /&gt;
  float temp, temp2, pi;&lt;br /&gt;
  double result;&lt;br /&gt;
  unsigned int inside = 0, total_inside = 0;&lt;br /&gt;
&lt;br /&gt;
  for (point=0; point&amp;lt;num_local_points; point++) {&lt;br /&gt;
      temp = (rand() % (rand_MAX+1));&lt;br /&gt;
      p_x = temp / rand_MAX;&lt;br /&gt;
      p_x = p_x / num_procs;&lt;br /&gt;
      &lt;br /&gt;
      temp2 = (float)id / num_procs;	// id belongs to 0, num_procs-1&lt;br /&gt;
      p_x += temp2;&lt;br /&gt;
      &lt;br /&gt;
      temp = (rand() % (rand_MAX+1));&lt;br /&gt;
      p_y = temp / rand_MAX;&lt;br /&gt;
      &lt;br /&gt;
      temp = (rand() % (rand_MAX+1));&lt;br /&gt;
      p_z = temp / rand_MAX;&lt;br /&gt;
&lt;br /&gt;
      // Compute the number of points residing inside of the 1/8 of the sphere&lt;br /&gt;
      result = p_x * p_x + p_y * p_y + p_z * p_z;&lt;br /&gt;
&lt;br /&gt;
      if (result &amp;lt;= 1) inside++;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  double elapsed = MPI_Wtime() - startprocess;&lt;br /&gt;
&lt;br /&gt;
  MPI_Reduce (&amp;amp;inside, &amp;amp;total_inside, 1, MPI_UNSIGNED, MPI_SUM, MASTER, MPI_COMM_WORLD);&lt;br /&gt;
&lt;br /&gt;
#if DEBUG &lt;br /&gt;
  printf (&amp;quot;rank %d counts %u points inside the spheren&amp;quot;, id, inside);&lt;br /&gt;
#endif&lt;br /&gt;
  if (id == MASTER) {&lt;br /&gt;
      double timeprocess[num_procs];&lt;br /&gt;
&lt;br /&gt;
      timeprocess[MASTER] = elapsed;&lt;br /&gt;
      printf(&amp;quot;Elapsed time from rank %d: %10.2f (sec) n&amp;quot;, MASTER, timeprocess[MASTER]);&lt;br /&gt;
      for (i=1; i&amp;lt;num_procs; i++) {&lt;br /&gt;
	  // Rank 0 waits for elapsed time value &lt;br /&gt;
	  MPI_Recv (&amp;amp;timeprocess[i], 1, MPI_DOUBLE, i, TAG_TIME, MPI_COMM_WORLD, &amp;amp;stat); &lt;br /&gt;
	  printf(&amp;quot;Elapsed time from rank %d: %10.2f (sec) n&amp;quot;, i, timeprocess[i]);&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
      temp = 6 * (float)total_inside;&lt;br /&gt;
      pi = temp / MAX_NUM_POINTS;   &lt;br /&gt;
      printf ( &amp;quot;Out of %u points, there are %u points inside the sphere =&amp;gt; pi=%16.12fn&amp;quot;,&lt;br /&gt;
          MAX_NUM_POINTS, total_inside, pi);&lt;br /&gt;
  }&lt;br /&gt;
  else {&lt;br /&gt;
      // Send back the processing time (in second)&lt;br /&gt;
      MPI_Send (&amp;amp;elapsed, 1, MPI_DOUBLE, MASTER, TAG_TIME, MPI_COMM_WORLD);&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  free(buff);&lt;br /&gt;
&lt;br /&gt;
  // Terminate MPI.&lt;br /&gt;
  MPI_Finalize();&lt;br /&gt;
  &lt;br /&gt;
  return 0;&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
= Hybrid Parallelization = &lt;br /&gt;
--&amp;gt;&lt;/div&gt;</summary>
		<author><name>R Rutka</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=Development/MKL&amp;diff=4538</id>
		<title>Development/MKL</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=Development/MKL&amp;diff=4538"/>
		<updated>2016-11-03T16:50:06Z</updated>

		<summary type="html">&lt;p&gt;R Rutka: /* Examples */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=600px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Description !! Content&lt;br /&gt;
|-&lt;br /&gt;
| module load&lt;br /&gt;
| numlib/mkl&lt;br /&gt;
|-&lt;br /&gt;
| License&lt;br /&gt;
| Commercial. See [https://software.intel.com/en-us/articles/end-user-license-agreement EULA].&lt;br /&gt;
|-&lt;br /&gt;
| Citing &lt;br /&gt;
| n/a&lt;br /&gt;
|-&lt;br /&gt;
| Links&lt;br /&gt;
| [https://software.intel.com/en-us/intel-mkl Intel MKL Homepage] &amp;amp;#124; [http://software.intel.com/en-us/articles/intel-math-kernel-library-documentation Online-Documentation]&lt;br /&gt;
|-&lt;br /&gt;
| Graphical Interface&lt;br /&gt;
| No&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Description =&lt;br /&gt;
&#039;&#039;&#039;Intel MKL (Math Kernel Library)&#039;&#039;&#039; is a library of optimized math routines for numerical computations such as linear algebra (using BLAS, LAPACK, ScaLAPACK) and discrete Fourier Transformation.&lt;br /&gt;
With its standard interface in matrix computation and the interface of the popular fast Fourier transformation library fftw, MKL can be used to replace other libraries with minimal code changes. In fact a program which uses FFTW without MPI doesn&#039;t need to be changed at all. Just recompile it with the MKL linker flags.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* [http://software.intel.com/en-us/articles/intel-math-kernel-library-documentation Online-Documentation]&lt;br /&gt;
&lt;br /&gt;
= Versions and Availability =&lt;br /&gt;
A list of currently available MKL modules can be obtained from the&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;big&amp;gt;&lt;br /&gt;
[https://cis-hpc.uni-konstanz.de/prod.cis/ Cluster Information System CIS] &amp;lt;/big&amp;gt;&lt;br /&gt;
{{#widget:Iframe&lt;br /&gt;
|url=https://cis-hpc.uni-konstanz.de/prod.cis/bwUniCluster/numlib/mkl&lt;br /&gt;
|width=99%&lt;br /&gt;
|height=700&lt;br /&gt;
|border=0&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Show a list of available versions using &#039;module avail numlib/mkl&#039; on any HPC-C5 cluster.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
: EXAMPLE bwUniCluster&lt;br /&gt;
$ module avail numlib/mkl&lt;br /&gt;
------------------------------ /opt/bwhpc/common/modulefiles ------------------------------&lt;br /&gt;
numlib/mkl/10.3.12         numlib/mkl/11.1.4(default)&lt;br /&gt;
numlib/mkl/11.0.5          numlib/mkl/11.2.3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Local documentation =&lt;br /&gt;
There is some information in the module help file accessible via &#039;module help numlib/mkl&#039;-&lt;br /&gt;
command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
: EXCERPT ONLY&lt;br /&gt;
$ module help numlib/mkl&lt;br /&gt;
----------- Module Specific Help for &#039;numlib/mkl/11.1.4&#039; ----------&lt;br /&gt;
This module provides the Intel(R) Math Kernel Library (MKL)&lt;br /&gt;
version 11.1.4, a fast and reliable implementation&lt;br /&gt;
of BLAS/LAPACK/FFTW (see also &#039;http://software.intel.com/en-us/intel-mkl/&#039;).&lt;br /&gt;
&lt;br /&gt;
The preferable compiler for this MKL version is &#039;compiler/intel/14.0&#039;. Linking&lt;br /&gt;
with other compilers like GNU, PGI and SUN is possible. The desired compiler&lt;br /&gt;
module (exception system GNU compiler) has to be loaded before using MKL.&lt;br /&gt;
&lt;br /&gt;
Local documentation:&lt;br /&gt;
&lt;br /&gt;
  Man pages in &#039;$MKL_MAN_DIR/man3&#039;, e.g. &#039;man dotc&#039;.&lt;br /&gt;
  firefox  $MKL_DOC_DIR/mkl_documentation.htm&lt;br /&gt;
  acroread $MKL_DOC_DIR/l_mkl_11.1.4.211.mklman.pdf&lt;br /&gt;
  acroread $MKL_DOC_DIR/l_mkl_11.1.4.211.mkl_11.1.4_lnx_userguide.pdf&lt;br /&gt;
&lt;br /&gt;
Linking examples (ifort compiler with support for blas and lapack):&lt;br /&gt;
&lt;br /&gt;
* Dynamic linking of myprog.f and parallel MKL supporting the LP64 interface:&lt;br /&gt;
&lt;br /&gt;
  ifort myprog.f -L${MKL_LIB_DIR} -I${MKL_INC_DIR}            \&lt;br /&gt;
        -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread&lt;br /&gt;
[... t.b.c. ...]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
After loading the module, the environment variable $MKL_DOC_DIR points to the local documentation folder. Various examples can be found in $MKLROOT/examples.&lt;br /&gt;
&lt;br /&gt;
= MKL-Specific Environments =&lt;br /&gt;
To see a list of all MKL environments set by the &#039;module load&#039;-command use &#039;env | grep MKL&#039;. Or use the command &#039;module display numlib/mkl/version&#039;.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Example &amp;lt;small&amp;gt;(bwUniCluster)&amp;lt;/small&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load numlib/mkl&lt;br /&gt;
$ env | grep MKL&lt;br /&gt;
MKLROOT=/opt/bwhpc/common/compiler/intel/compxe.2013.sp1.4.211/mkl&lt;br /&gt;
MKL_LIB_MIC_COM=/opt/bwhpc/common/compiler/intel/compxe.2013.sp1.4.211/lib/mic&lt;br /&gt;
MKL_DOC_DIR=/opt/bwhpc/common/compiler/intel/compxe.2013.sp1.4.211/composerxe/Documentation/en_US/mkl&lt;br /&gt;
MKL_NUM_THREADS=1&lt;br /&gt;
MKL_HOME=/opt/bwhpc/common/compiler/intel/compxe.2013.sp1.4.211/mkl&lt;br /&gt;
MKL_LIB_MIC=/opt/bwhpc/common/compiler/intel/compxe.2013.sp1.4.211/mkl/lib/mic&lt;br /&gt;
MKL_MAN_DIR=/opt/bwhpc/common/compiler/intel/compxe.2013.sp1.4.211/man/en_US&lt;br /&gt;
MKL_EXA_DIR=/opt/bwhpc/common/compiler/intel/compxe.2013.sp1.4.211/composerxe/Samples/en_US&lt;br /&gt;
MKL_STA_DIR=/opt/bwhpc/common/compiler/intel/compxe.2013.sp1.4.211/mkl/lib/intel64_static&lt;br /&gt;
MKL_INC_DIR=/opt/bwhpc/common/compiler/intel/compxe.2013.sp1.4.211/mkl/include&lt;br /&gt;
MKL_BIN_DIR=/opt/bwhpc/common/compiler/intel/compxe.2013.sp1.4.211/mkl/bin&lt;br /&gt;
MKL_LIB_DIR=/opt/bwhpc/common/compiler/intel/compxe.2013.sp1.4.211/mkl/lib/intel64&lt;br /&gt;
MKL_VERSION=11.1.4&lt;br /&gt;
MKL_LIB_COM=/opt/bwhpc/common/compiler/intel/compxe.2013.sp1.4.211/lib/intel64&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Compiling and linking =&lt;br /&gt;
Compilation is possible with both GCC and Intel compilers but it is easier for Intel compilers, so this case is explained here.&lt;br /&gt;
After loading the compiler and the library module with&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load compiler/intel&lt;br /&gt;
$ module load numlib/mkl&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
you can include the MKL header file in your program:&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;#include &amp;lt;mkl.h&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
Compilation is simple:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ icpc -c example_mkl.c&amp;lt;/pre&amp;gt;&lt;br /&gt;
When linking the program you have to tell the compiler to link against the mkl library:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ icpc example_mkl.o -mkl&amp;lt;/pre&amp;gt;&lt;br /&gt;
With the -mkl switch the intel compiler automatically sets the correct linker flags but you can specify them explicitly for example to enable static linking or when non-intel compilers are used. Information about the different options can be found at http://software.intel.com/en-us/node/438568 and especially helpful is the MKL link line advisor at http://software.intel.com/en-us/articles/intel-mkl-link-line-advisor.&lt;br /&gt;
By default $MKL_NUM_THREADS is set to 1 and so only one thread will be created, but if you feel the need to run the computation on more cores (after benchmarking) you can set $MKL_NUM_THREADS to a higher number.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== FFTW Interface to Intel Math Kernel Library (MKL) ==&lt;br /&gt;
Sometimes, [[FFTW|FFTW]] is not available on your cluster. You can use the MKL library&lt;br /&gt;
instead and include the FFTW functions, too.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Intel Math Kernel Library (MKL) offers FFTW2 and FFTW3 interfaces to Intel MKL Fast Fourier Transform and Trigonometric Transform functionality. The purpose of these interfaces is to enable applications using FFTW to gain performance with Intel MKL without changing the program source code.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Here is an excerpt from &#039;module help numlib/mkl&#039;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Static FFTW2/3 C/Fortran interfaces can be found in dir&lt;br /&gt;
    ${MKL_HOME}/interfaces/&lt;br /&gt;
  Examples:&lt;br /&gt;
    Link to FFTW3 Fortran interface with GNU compiler and ilp64 support:&lt;br /&gt;
      ${MKL_HOME}/interfaces/fftw3xf/libfftw3xf_intel64_double_i8_gnu47.a&lt;br /&gt;
    Link to FFTW3 Fortran interface with Intel compiler and lp64 support:&lt;br /&gt;
      ${MKL_HOME}/interfaces/fftw3xf/libfftw3xf_intel64_double_i4_intel150.a&lt;br /&gt;
  The Intel FFTW interfaces requires the Intel MKL library (e.g. it does&lt;br /&gt;
  not work with ACML library). Usually it is not a problem to use a&lt;br /&gt;
  different compiler version, e.g. to use _gnu41.a with gnu 4.3 compiler.&lt;br /&gt;
  See dir ${MKL_HOME}/interfaces/ for other interfaces (fftw2/3 Fortran/C).&lt;br /&gt;
  Compiler option for include files: -I${MKL_INC_DIR}/fftw&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
See the corresponding webpages:&lt;br /&gt;
* [https://software.intel.com/en-us/node/471410 FFTW Interface to Intel Math Kernel Library]&lt;br /&gt;
* [https://software.intel.com/de-de/node/471414 FFTW2 Interface to Intel Math Kernel Library]&lt;br /&gt;
* [https://software.intel.com/en-us/node/471456 FFTW3 Interface to Intel Math Kernel Library]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Examples =&lt;br /&gt;
To help getting started we provide two C++ examples. The first one computes the square of a 2x2 matrix:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;iostream&amp;gt;&lt;br /&gt;
#include &amp;lt;mkl.h&amp;gt;&lt;br /&gt;
using namespace std;&lt;br /&gt;
&lt;br /&gt;
int main()&lt;br /&gt;
{&lt;br /&gt;
    double m[2][2] = {{2,1}, {0,2}};&lt;br /&gt;
    double c[2][2];&lt;br /&gt;
&lt;br /&gt;
    for(int i = 0; i &amp;lt; 2; ++i)&lt;br /&gt;
    {&lt;br /&gt;
        for(int j = 0; j &amp;lt; 2; ++j)&lt;br /&gt;
            cout &amp;lt;&amp;lt; m[i][j] &amp;lt;&amp;lt; &amp;quot; &amp;quot;;&lt;br /&gt;
&lt;br /&gt;
        cout &amp;lt;&amp;lt; endl;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    cblas_dgemm(CblasRowMajor, CblasNoTrans, CblasNoTrans, 2, 2, 2, 1.0, &amp;amp;m[0][0], 2, &amp;amp;m[0][0], 2, 0.0, &amp;amp;c[0][0], 2);&lt;br /&gt;
&lt;br /&gt;
    cout &amp;lt;&amp;lt; endl;&lt;br /&gt;
&lt;br /&gt;
    for(int i = 0; i &amp;lt; 2; ++i)&lt;br /&gt;
    {&lt;br /&gt;
        for(int j = 0; j &amp;lt; 2; ++j)&lt;br /&gt;
            cout &amp;lt;&amp;lt; c[i][j] &amp;lt;&amp;lt; &amp;quot; &amp;quot;;&lt;br /&gt;
&lt;br /&gt;
        cout &amp;lt;&amp;lt; endl;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
And the second one does a fast Fourier transformation using the Intel MKL interface (DFTI):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;iostream&amp;gt;&lt;br /&gt;
#include &amp;lt;complex&amp;gt;&lt;br /&gt;
#include &amp;lt;cmath&amp;gt;&lt;br /&gt;
#include &amp;lt;mkl.h&amp;gt;&lt;br /&gt;
using namespace std;&lt;br /&gt;
&lt;br /&gt;
int main()&lt;br /&gt;
{&lt;br /&gt;
    const int N = 3;&lt;br /&gt;
    complex&amp;lt;double&amp;gt; x[N] = {2, -1, 0.5};&lt;br /&gt;
&lt;br /&gt;
    cout &amp;lt;&amp;lt; &amp;quot;Input: &amp;quot; &amp;lt;&amp;lt; endl;&lt;br /&gt;
&lt;br /&gt;
    for(int i = 0; i &amp;lt; N; i++)&lt;br /&gt;
        cout &amp;lt;&amp;lt; x[i] &amp;lt;&amp;lt; endl;&lt;br /&gt;
&lt;br /&gt;
    DFTI_DESCRIPTOR_HANDLE desc;&lt;br /&gt;
&lt;br /&gt;
    DftiCreateDescriptor(&amp;amp;desc, DFTI_DOUBLE, DFTI_COMPLEX, 1, N);&lt;br /&gt;
    DftiCommitDescriptor(desc);&lt;br /&gt;
    DftiComputeForward(desc, x);&lt;br /&gt;
    DftiFreeDescriptor(&amp;amp;desc);&lt;br /&gt;
&lt;br /&gt;
    cout &amp;lt;&amp;lt; &amp;quot;\nOutput: &amp;quot; &amp;lt;&amp;lt; endl;&lt;br /&gt;
&lt;br /&gt;
    for(int i = 0; i &amp;lt; N; i++)&lt;br /&gt;
        cout &amp;lt;&amp;lt; x[i] &amp;lt;&amp;lt; endl;&lt;br /&gt;
&lt;br /&gt;
    cout &amp;lt;&amp;lt; &amp;quot;\nTest the interpolation function f:&amp;quot; &amp;lt;&amp;lt; endl;&lt;br /&gt;
&lt;br /&gt;
    for(int i = 0; i &amp;lt; N; i++)&lt;br /&gt;
    {&lt;br /&gt;
        double t = i/(double)N;&lt;br /&gt;
        complex&amp;lt;double&amp;gt; u(0, 2*M_PI*t);&lt;br /&gt;
        complex&amp;lt;double&amp;gt; z = exp(u);&lt;br /&gt;
        complex&amp;lt;double&amp;gt; w = 1.0/N * (x[0] + x[1]*z + x[2]*z*z);&lt;br /&gt;
&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;f(&amp;quot; &amp;lt;&amp;lt; t &amp;lt;&amp;lt; &amp;quot;) = &amp;quot; &amp;lt;&amp;lt; w &amp;lt;&amp;lt; endl;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Numerical_libraries]][[Category:bwUniCluster]][[Category:bwForCluster_Chemistry]][[Category:BwForCluster_BinAC]][[Category:bwForCluster_MLS&amp;amp;WISO_Production]]&lt;/div&gt;</summary>
		<author><name>R Rutka</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=Development/MKL&amp;diff=4537</id>
		<title>Development/MKL</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=Development/MKL&amp;diff=4537"/>
		<updated>2016-11-03T16:49:30Z</updated>

		<summary type="html">&lt;p&gt;R Rutka: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=600px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Description !! Content&lt;br /&gt;
|-&lt;br /&gt;
| module load&lt;br /&gt;
| numlib/mkl&lt;br /&gt;
|-&lt;br /&gt;
| License&lt;br /&gt;
| Commercial. See [https://software.intel.com/en-us/articles/end-user-license-agreement EULA].&lt;br /&gt;
|-&lt;br /&gt;
| Citing &lt;br /&gt;
| n/a&lt;br /&gt;
|-&lt;br /&gt;
| Links&lt;br /&gt;
| [https://software.intel.com/en-us/intel-mkl Intel MKL Homepage] &amp;amp;#124; [http://software.intel.com/en-us/articles/intel-math-kernel-library-documentation Online-Documentation]&lt;br /&gt;
|-&lt;br /&gt;
| Graphical Interface&lt;br /&gt;
| No&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Description =&lt;br /&gt;
&#039;&#039;&#039;Intel MKL (Math Kernel Library)&#039;&#039;&#039; is a library of optimized math routines for numerical computations such as linear algebra (using BLAS, LAPACK, ScaLAPACK) and discrete Fourier Transformation.&lt;br /&gt;
With its standard interface in matrix computation and the interface of the popular fast Fourier transformation library fftw, MKL can be used to replace other libraries with minimal code changes. In fact a program which uses FFTW without MPI doesn&#039;t need to be changed at all. Just recompile it with the MKL linker flags.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* [http://software.intel.com/en-us/articles/intel-math-kernel-library-documentation Online-Documentation]&lt;br /&gt;
&lt;br /&gt;
= Versions and Availability =&lt;br /&gt;
A list of currently available MKL modules can be obtained from the&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;big&amp;gt;&lt;br /&gt;
[https://cis-hpc.uni-konstanz.de/prod.cis/ Cluster Information System CIS] &amp;lt;/big&amp;gt;&lt;br /&gt;
{{#widget:Iframe&lt;br /&gt;
|url=https://cis-hpc.uni-konstanz.de/prod.cis/bwUniCluster/numlib/mkl&lt;br /&gt;
|width=99%&lt;br /&gt;
|height=700&lt;br /&gt;
|border=0&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Show a list of available versions using &#039;module avail numlib/mkl&#039; on any HPC-C5 cluster.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
: EXAMPLE bwUniCluster&lt;br /&gt;
$ module avail numlib/mkl&lt;br /&gt;
------------------------------ /opt/bwhpc/common/modulefiles ------------------------------&lt;br /&gt;
numlib/mkl/10.3.12         numlib/mkl/11.1.4(default)&lt;br /&gt;
numlib/mkl/11.0.5          numlib/mkl/11.2.3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Local documentation =&lt;br /&gt;
There is some information in the module help file accessible via &#039;module help numlib/mkl&#039;-&lt;br /&gt;
command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
: EXCERPT ONLY&lt;br /&gt;
$ module help numlib/mkl&lt;br /&gt;
----------- Module Specific Help for &#039;numlib/mkl/11.1.4&#039; ----------&lt;br /&gt;
This module provides the Intel(R) Math Kernel Library (MKL)&lt;br /&gt;
version 11.1.4, a fast and reliable implementation&lt;br /&gt;
of BLAS/LAPACK/FFTW (see also &#039;http://software.intel.com/en-us/intel-mkl/&#039;).&lt;br /&gt;
&lt;br /&gt;
The preferable compiler for this MKL version is &#039;compiler/intel/14.0&#039;. Linking&lt;br /&gt;
with other compilers like GNU, PGI and SUN is possible. The desired compiler&lt;br /&gt;
module (exception system GNU compiler) has to be loaded before using MKL.&lt;br /&gt;
&lt;br /&gt;
Local documentation:&lt;br /&gt;
&lt;br /&gt;
  Man pages in &#039;$MKL_MAN_DIR/man3&#039;, e.g. &#039;man dotc&#039;.&lt;br /&gt;
  firefox  $MKL_DOC_DIR/mkl_documentation.htm&lt;br /&gt;
  acroread $MKL_DOC_DIR/l_mkl_11.1.4.211.mklman.pdf&lt;br /&gt;
  acroread $MKL_DOC_DIR/l_mkl_11.1.4.211.mkl_11.1.4_lnx_userguide.pdf&lt;br /&gt;
&lt;br /&gt;
Linking examples (ifort compiler with support for blas and lapack):&lt;br /&gt;
&lt;br /&gt;
* Dynamic linking of myprog.f and parallel MKL supporting the LP64 interface:&lt;br /&gt;
&lt;br /&gt;
  ifort myprog.f -L${MKL_LIB_DIR} -I${MKL_INC_DIR}            \&lt;br /&gt;
        -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread&lt;br /&gt;
[... t.b.c. ...]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
After loading the module, the environment variable $MKL_DOC_DIR points to the local documentation folder. Various examples can be found in $MKLROOT/examples.&lt;br /&gt;
&lt;br /&gt;
= MKL-Specific Environments =&lt;br /&gt;
To see a list of all MKL environments set by the &#039;module load&#039;-command use &#039;env | grep MKL&#039;. Or use the command &#039;module display numlib/mkl/version&#039;.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Example &amp;lt;small&amp;gt;(bwUniCluster)&amp;lt;/small&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load numlib/mkl&lt;br /&gt;
$ env | grep MKL&lt;br /&gt;
MKLROOT=/opt/bwhpc/common/compiler/intel/compxe.2013.sp1.4.211/mkl&lt;br /&gt;
MKL_LIB_MIC_COM=/opt/bwhpc/common/compiler/intel/compxe.2013.sp1.4.211/lib/mic&lt;br /&gt;
MKL_DOC_DIR=/opt/bwhpc/common/compiler/intel/compxe.2013.sp1.4.211/composerxe/Documentation/en_US/mkl&lt;br /&gt;
MKL_NUM_THREADS=1&lt;br /&gt;
MKL_HOME=/opt/bwhpc/common/compiler/intel/compxe.2013.sp1.4.211/mkl&lt;br /&gt;
MKL_LIB_MIC=/opt/bwhpc/common/compiler/intel/compxe.2013.sp1.4.211/mkl/lib/mic&lt;br /&gt;
MKL_MAN_DIR=/opt/bwhpc/common/compiler/intel/compxe.2013.sp1.4.211/man/en_US&lt;br /&gt;
MKL_EXA_DIR=/opt/bwhpc/common/compiler/intel/compxe.2013.sp1.4.211/composerxe/Samples/en_US&lt;br /&gt;
MKL_STA_DIR=/opt/bwhpc/common/compiler/intel/compxe.2013.sp1.4.211/mkl/lib/intel64_static&lt;br /&gt;
MKL_INC_DIR=/opt/bwhpc/common/compiler/intel/compxe.2013.sp1.4.211/mkl/include&lt;br /&gt;
MKL_BIN_DIR=/opt/bwhpc/common/compiler/intel/compxe.2013.sp1.4.211/mkl/bin&lt;br /&gt;
MKL_LIB_DIR=/opt/bwhpc/common/compiler/intel/compxe.2013.sp1.4.211/mkl/lib/intel64&lt;br /&gt;
MKL_VERSION=11.1.4&lt;br /&gt;
MKL_LIB_COM=/opt/bwhpc/common/compiler/intel/compxe.2013.sp1.4.211/lib/intel64&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Compiling and linking =&lt;br /&gt;
Compilation is possible with both GCC and Intel compilers but it is easier for Intel compilers, so this case is explained here.&lt;br /&gt;
After loading the compiler and the library module with&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load compiler/intel&lt;br /&gt;
$ module load numlib/mkl&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
you can include the MKL header file in your program:&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;#include &amp;lt;mkl.h&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
Compilation is simple:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ icpc -c example_mkl.c&amp;lt;/pre&amp;gt;&lt;br /&gt;
When linking the program you have to tell the compiler to link against the mkl library:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ icpc example_mkl.o -mkl&amp;lt;/pre&amp;gt;&lt;br /&gt;
With the -mkl switch the intel compiler automatically sets the correct linker flags but you can specify them explicitly for example to enable static linking or when non-intel compilers are used. Information about the different options can be found at http://software.intel.com/en-us/node/438568 and especially helpful is the MKL link line advisor at http://software.intel.com/en-us/articles/intel-mkl-link-line-advisor.&lt;br /&gt;
By default $MKL_NUM_THREADS is set to 1 and so only one thread will be created, but if you feel the need to run the computation on more cores (after benchmarking) you can set $MKL_NUM_THREADS to a higher number.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== FFTW Interface to Intel Math Kernel Library (MKL) ==&lt;br /&gt;
Sometimes, [[FFTW|FFTW]] is not available on your cluster. You can use the MKL library&lt;br /&gt;
instead and include the FFTW functions, too.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Intel Math Kernel Library (MKL) offers FFTW2 and FFTW3 interfaces to Intel MKL Fast Fourier Transform and Trigonometric Transform functionality. The purpose of these interfaces is to enable applications using FFTW to gain performance with Intel MKL without changing the program source code.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Here is an excerpt from &#039;module help numlib/mkl&#039;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Static FFTW2/3 C/Fortran interfaces can be found in dir&lt;br /&gt;
    ${MKL_HOME}/interfaces/&lt;br /&gt;
  Examples:&lt;br /&gt;
    Link to FFTW3 Fortran interface with GNU compiler and ilp64 support:&lt;br /&gt;
      ${MKL_HOME}/interfaces/fftw3xf/libfftw3xf_intel64_double_i8_gnu47.a&lt;br /&gt;
    Link to FFTW3 Fortran interface with Intel compiler and lp64 support:&lt;br /&gt;
      ${MKL_HOME}/interfaces/fftw3xf/libfftw3xf_intel64_double_i4_intel150.a&lt;br /&gt;
  The Intel FFTW interfaces requires the Intel MKL library (e.g. it does&lt;br /&gt;
  not work with ACML library). Usually it is not a problem to use a&lt;br /&gt;
  different compiler version, e.g. to use _gnu41.a with gnu 4.3 compiler.&lt;br /&gt;
  See dir ${MKL_HOME}/interfaces/ for other interfaces (fftw2/3 Fortran/C).&lt;br /&gt;
  Compiler option for include files: -I${MKL_INC_DIR}/fftw&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
See the corresponding webpages:&lt;br /&gt;
* [https://software.intel.com/en-us/node/471410 FFTW Interface to Intel Math Kernel Library]&lt;br /&gt;
* [https://software.intel.com/de-de/node/471414 FFTW2 Interface to Intel Math Kernel Library]&lt;br /&gt;
* [https://software.intel.com/en-us/node/471456 FFTW3 Interface to Intel Math Kernel Library]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Examples =&lt;br /&gt;
To help getting started we provide two C++ examples. The first one computes the square of a 2x2 matrix:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;iostream&amp;gt;&lt;br /&gt;
#include &amp;lt;mkl.h&amp;gt;&lt;br /&gt;
using namespace std;&lt;br /&gt;
&lt;br /&gt;
int main()&lt;br /&gt;
{&lt;br /&gt;
    double m[2][2] = {{2,1}, {0,2}};&lt;br /&gt;
    double c[2][2];&lt;br /&gt;
&lt;br /&gt;
    for(int i = 0; i &amp;lt; 2; ++i)&lt;br /&gt;
    {&lt;br /&gt;
        for(int j = 0; j &amp;lt; 2; ++j)&lt;br /&gt;
            cout &amp;lt;&amp;lt; m[i][j] &amp;lt;&amp;lt; &amp;quot; &amp;quot;;&lt;br /&gt;
&lt;br /&gt;
        cout &amp;lt;&amp;lt; endl;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    cblas_dgemm(CblasRowMajor, CblasNoTrans, CblasNoTrans, 2, 2, 2, 1.0, &amp;amp;m[0][0], 2, &amp;amp;m[0][0], 2, 0.0, &amp;amp;c[0][0], 2);&lt;br /&gt;
&lt;br /&gt;
    cout &amp;lt;&amp;lt; endl;&lt;br /&gt;
&lt;br /&gt;
    for(int i = 0; i &amp;lt; 2; ++i)&lt;br /&gt;
    {&lt;br /&gt;
        for(int j = 0; j &amp;lt; 2; ++j)&lt;br /&gt;
            cout &amp;lt;&amp;lt; c[i][j] &amp;lt;&amp;lt; &amp;quot; &amp;quot;;&lt;br /&gt;
&lt;br /&gt;
        cout &amp;lt;&amp;lt; endl;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
And the second one does a fast Fourier transformation using the Intel MKL interface (DFTI):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;iostream&amp;gt;&lt;br /&gt;
#include &amp;lt;complex&amp;gt;&lt;br /&gt;
#include &amp;lt;cmath&amp;gt;&lt;br /&gt;
#include &amp;lt;mkl.h&amp;gt;&lt;br /&gt;
using namespace std;&lt;br /&gt;
&lt;br /&gt;
int main()&lt;br /&gt;
{&lt;br /&gt;
    const int N = 3;&lt;br /&gt;
    complex&amp;lt;double&amp;gt; x[N] = {2, -1, 0.5};&lt;br /&gt;
&lt;br /&gt;
    cout &amp;lt;&amp;lt; &amp;quot;Input: &amp;quot; &amp;lt;&amp;lt; endl;&lt;br /&gt;
&lt;br /&gt;
    for(int i = 0; i &amp;lt; N; i++)&lt;br /&gt;
        cout &amp;lt;&amp;lt; x[i] &amp;lt;&amp;lt; endl;&lt;br /&gt;
&lt;br /&gt;
    DFTI_DESCRIPTOR_HANDLE desc;&lt;br /&gt;
&lt;br /&gt;
    DftiCreateDescriptor(&amp;amp;desc, DFTI_DOUBLE, DFTI_COMPLEX, 1, N);&lt;br /&gt;
    DftiCommitDescriptor(desc);&lt;br /&gt;
    DftiComputeForward(desc, x);&lt;br /&gt;
    DftiFreeDescriptor(&amp;amp;desc);&lt;br /&gt;
&lt;br /&gt;
    cout &amp;lt;&amp;lt; &amp;quot;\nOutput: &amp;quot; &amp;lt;&amp;lt; endl;&lt;br /&gt;
&lt;br /&gt;
    for(int i = 0; i &amp;lt; N; i++)&lt;br /&gt;
        cout &amp;lt;&amp;lt; x[i] &amp;lt;&amp;lt; endl;&lt;br /&gt;
&lt;br /&gt;
    cout &amp;lt;&amp;lt; &amp;quot;\nTest the interpolation function f:&amp;quot; &amp;lt;&amp;lt; endl;&lt;br /&gt;
&lt;br /&gt;
    for(int i = 0; i &amp;lt; N; i++)&lt;br /&gt;
    {&lt;br /&gt;
        double t = i/(double)N;&lt;br /&gt;
        complex&amp;lt;double&amp;gt; u(0, 2*M_PI*t);&lt;br /&gt;
        complex&amp;lt;double&amp;gt; z = exp(u);&lt;br /&gt;
        complex&amp;lt;double&amp;gt; w = 1.0/N * (x[0] + x[1]*z + x[2]*z*z);&lt;br /&gt;
&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;f(&amp;quot; &amp;lt;&amp;lt; t &amp;lt;&amp;lt; &amp;quot;) = &amp;quot; &amp;lt;&amp;lt; w &amp;lt;&amp;lt; endl;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Numerical_libraries]][[Category:bwUniCluster]][[Category:bwForCluster_Chemistry]][[Category:bwForCluster_MLS&amp;amp;WISO_Production]]&lt;/div&gt;</summary>
		<author><name>R Rutka</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=Development/FFTW&amp;diff=4534</id>
		<title>Development/FFTW</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=Development/FFTW&amp;diff=4534"/>
		<updated>2016-11-03T16:46:40Z</updated>

		<summary type="html">&lt;p&gt;R Rutka: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=600px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Description !! Content&lt;br /&gt;
|-&lt;br /&gt;
| module load&lt;br /&gt;
| numlib/fftw&lt;br /&gt;
|-&lt;br /&gt;
| License&lt;br /&gt;
| [http://www.fftw.org/faq/section1.html#isfftwfree GPL] &amp;amp;#124; [http://www.fftw.org/fftw3_doc/License-and-Copyright.html License and Copyright]&lt;br /&gt;
|-&lt;br /&gt;
|Citing&lt;br /&gt;
| [https://github.com/FFTW/fftw3/blob/master/AUTHORS Authors]&lt;br /&gt;
|-&lt;br /&gt;
| Links&lt;br /&gt;
| [http://www.fftw.org/ FFTW Homepage] &amp;amp;#124; [http://www.fftw.org/#documentation  Documentation]&lt;br /&gt;
|-&lt;br /&gt;
| Graphical Interface&lt;br /&gt;
| No&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
= Description =&lt;br /&gt;
&#039;&#039;&#039;FFTW&#039;&#039;&#039; is a C subroutine library for computing the discrete Fourier transform (DFT) in one or more dimensions, of arbitrary input size, and of both real and complex data (as well as of even/odd data, i.e. the discrete cosine/sine transforms or DCT/DST).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.fftw.org/ More infos about FFTW]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
This package provides three versions of the fftw3 library depending on precision: &lt;br /&gt;
# libfft3&lt;br /&gt;
# libfftw3f &lt;br /&gt;
# libfftw3l &amp;lt;small&amp;gt;for double, single and long-double precision libraries&amp;lt;/small&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Documentation =&lt;br /&gt;
== Online ==&lt;br /&gt;
[http://www.fftw.org/fftw3_doc/ Online Documentation]&lt;br /&gt;
== Local ==&lt;br /&gt;
* info fftw3&lt;br /&gt;
* man fftw-wisdom&lt;br /&gt;
* man fftw-wisdom-to-conf&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
See also documentation folder pointed to by shell variable [[#FFTW Specific Environments|$FFTW_DOC_DIR]].&lt;br /&gt;
= Versions and Availability =&lt;br /&gt;
A list of versions currently available on all bwHPC-C5-Clusters can be obtained from the&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://cis-hpc.uni-konstanz.de/prod.cis/ Cluster Information System CIS]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/big&amp;gt;&lt;br /&gt;
{{#widget:Iframe&lt;br /&gt;
|url=https://cis-hpc.uni-konstanz.de/prod.cis/bwUniCluster/numlib/fftw&lt;br /&gt;
|width=99%&lt;br /&gt;
|height=350&lt;br /&gt;
|border=0&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
= Loading the Module =&lt;br /&gt;
Load the fftw module, and, if needed, the corresponding openmpi and compiler module.&lt;br /&gt;
You can load the default version of &#039;FFTW&#039;&#039; with the command &#039;&#039;&#039;&#039;module load numlib/fftw&#039;&#039;&#039;&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load numlib/fftw&lt;br /&gt;
Loading module dependency &#039;compiler/intel/13.1&#039;.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The module will try to load modules it needs to function (e.g. compiler, mpi, numlibs). &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
If loading the module fails, check if you have already loaded one of those modules with&amp;lt;br&amp;gt;&lt;br /&gt;
the command &#039;module list&#039;.&lt;br /&gt;
If you wish to load a specific (older) version (if available), you can do so using e.g. &lt;br /&gt;
&#039;&#039;&#039;&#039;module load numlib/fftw&#039;&#039;&#039;/&#039;version&#039; to load the version you desires.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module avail numlib/fftw&lt;br /&gt;
------------------------ /opt/bwhpc/common/modulefiles -------------------------&lt;br /&gt;
numlib/fftw/3.3.3-impi-4.1.1-gnu-4.4&lt;br /&gt;
numlib/fftw/3.3.3-impi-4.1.1-intel-13.1(default)&lt;br /&gt;
$ &lt;br /&gt;
$ module load numlib/fftw/3.3.3-impi-4.1.1-gnu-4.4&lt;br /&gt;
$ module list&lt;br /&gt;
Currently Loaded Modulefiles:&lt;br /&gt;
  1) numlib/fftw/3.3.3-impi-4.1.1-gnu-4.4&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;font color=red&amp;gt;Beware!&amp;lt;/font&amp;gt;&amp;amp;nbsp;Compiler, MPI-module and numerical library must fit!&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
= Hints for compiling and linking =&lt;br /&gt;
== FFTW Specific Environments ==&lt;br /&gt;
To see a list of all FFTW environments set by the &#039;module load&#039;-command use the command&lt;br /&gt;
&#039;module display numlib/fftw&#039;.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
After having loaded the appropriate module(s), you can use several environment variables to compile and link your application.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module display numlib/fftw&lt;br /&gt;
-------------------------------------------------------------------&lt;br /&gt;
/opt/bwhpc/common/modulefiles/numlib/fftw/3.3.3-impi-4.1.1-intel-13.1:&lt;br /&gt;
FTW_VERSION = 3.3.3-impi-4.1.1-intel-13.1 &lt;br /&gt;
FFTW_HOME = /opt/bwhpc/common/numlib/fftw/3.3.3-impi-4.1.1-intel-13.1 &lt;br /&gt;
FFTW_BIN_DIR = /opt/bwhpc/common/numlib/fftw/3.3.3-impi-4.1.1-intel-13.1/bin &lt;br /&gt;
FFTW_INC_DIR = /opt/bwhpc/common/numlib/fftw/3.3.3-impi-4.1.1-intel-13.1/include &lt;br /&gt;
FFTW_LIB_DIR = /opt/bwhpc/common/numlib/fftw/3.3.3-impi-4.1.1-intel-13.1/lib &lt;br /&gt;
FFTW_STA_DIR = /opt/bwhpc/common/numlib/fftw/3.3.3-impi-4.1.1-intel-13.1/lib &lt;br /&gt;
FFTW_SHA_DIR = (empty)&lt;br /&gt;
FFTW_MAN_DIR = /opt/bwhpc/common/numlib/fftw/3.3.3-impi-4.1.1-intel-13.1/share/man &lt;br /&gt;
FFTW_INF_DIR = /opt/bwhpc/common/numlib/fftw/3.3.3-impi-4.1.1-intel-13.1/share/info &lt;br /&gt;
FFTW_DOC_DIR = /opt/bwhpc/common/numlib/fftw/3.3.3-impi-4.1.1-intel-13.1/doc &lt;br /&gt;
FFTW_EXA_DIR = /opt/bwhpc/common/numlib/fftw/3.3.3-impi-4.1.1-intel-13.1/examples &lt;br /&gt;
FFTW_WWW = http://www.fftw.org/ &lt;br /&gt;
PATH = /opt/bwhpc/common/numlib/fftw/3.3.3-impi-4.1.1-intel-13.1/bin:$PATH&lt;br /&gt;
MANPATH = /opt/bwhpc/common/numlib/fftw/3.3.3-impi-4.1.1-intel-13.1/share/man:$MANPATH&lt;br /&gt;
INFOPATH = /opt/bwhpc/common/numlib/fftw/3.3.3-impi-4.1.1-intel-13.1/share/info:$INFOPATH&lt;br /&gt;
LD_LIBRARY_PATH = /opt/bwhpc/common/numlib/fftw/3.3.3-impi-4.1.1-intel-13.1/lib:$LD_LIBRARY_PATH &lt;br /&gt;
[...]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Compile a Serial Program ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 $ gcc example.c -o example -I$FFTW_INC_DIR -L$FFTW_LIB_DIR -lfftw3 -lm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== with POSIX Threads ===&lt;br /&gt;
Compile program with support for POSIX threads.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 $ gcc example.c -o example -I$FFTW_INC_DIR -L$FFTW_LIB_DIR -lfftw3_threads -lfftw3 -lpthread -lm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Compile program with support for OpenMP threads ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 $ gcc example.c -o example -fopenmp -I$FFTW_INC_DIR -L$FFTW_LIB_DIR -lfftw3_omp -lfftw3 -lm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Compile program with support for MPI ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 $ mpicc example.c -o example -I$FFTW_INC_DIR -L$FFTW_LIB_DIR -lfftw3_mpi -lfftw3 -lm &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Run program with MPI support ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 $ mpirun -n &amp;lt;ncpu&amp;gt; ./example &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Replace &amp;lt;ncpu&amp;gt; by number of processor cores.)&lt;br /&gt;
&lt;br /&gt;
Replace -lfftw3, -lfftw3_threads, etc. by -lfftw3f, -lfftw3f_threads, etc. for single &lt;br /&gt;
precision and by -lfftw3l, -lfftw3l_threads etc. for long-double precision codes, respectively.&lt;br /&gt;
&lt;br /&gt;
These commands will compile your program with dynamic fftw library versions in &lt;br /&gt;
which case you also have to have the fftw module loaded for running the program. &lt;br /&gt;
Alternatively, you may want to link your program with static fftw library versions. &lt;br /&gt;
With static fftw libraries it is only necessary to load the fftw module for compiling &lt;br /&gt;
but not for executing the program.&lt;br /&gt;
&lt;br /&gt;
== Compile program with static fftw library versions ==&lt;br /&gt;
Example for POSIX threads support&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 $ gcc example.c -o example -I$FFTW_INC_DIR $FFTW_LIB_DIR/{libfftw3_threads.a,libfftw3.a} -lpthread -lm &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
or:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 $ gcc example.c -o example -I$FFTW_INC_DIR -L$FFTW_LIB_DIR -Wl,-Bstatic -lfftw3 -lfftw3_threads \&lt;br /&gt;
       -Wl,-Bdynamic -lpthread -lm &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[#FFTW Specific Environments|Environment variables $FFTW_INC_DIR, $FFTW_LIB_DIR]] etc. are available after loading the module.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== FFTW Interface to Intel Math Kernel Library (MKL) ==&lt;br /&gt;
Sometimes, FFTW is not available on your cluster. You can use the [[Math_Kernel_Library_(MKL)|MKL library]] instead and include the FFTW functions, too.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Intel Math Kernel Library (MKL) offers FFTW2 and FFTW3 interfaces to Intel MKL Fast Fourier Transform and Trigonometric Transform functionality. The purpose of these interfaces is to enable applications using FFTW to gain performance with Intel MKL without changing the program source code.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Here is an excerpt from &#039;module help numlib/mkl&#039;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Static FFTW2/3 C/Fortran interfaces can be found in dir&lt;br /&gt;
    ${MKL_HOME}/interfaces/&lt;br /&gt;
  Examples:&lt;br /&gt;
    Link to FFTW3 Fortran interface with GNU compiler and ilp64 support:&lt;br /&gt;
      ${MKL_HOME}/interfaces/fftw3xf/libfftw3xf_intel64_double_i8_gnu47.a&lt;br /&gt;
    Link to FFTW3 Fortran interface with Intel compiler and lp64 support:&lt;br /&gt;
      ${MKL_HOME}/interfaces/fftw3xf/libfftw3xf_intel64_double_i4_intel150.a&lt;br /&gt;
  The Intel FFTW interfaces requires the Intel MKL library (e.g. it does&lt;br /&gt;
  not work with ACML library). Usually it is not a problem to use a&lt;br /&gt;
  different compiler version, e.g. to use _gnu41.a with gnu 4.3 compiler.&lt;br /&gt;
  See dir ${MKL_HOME}/interfaces/ for other interfaces (fftw2/3 Fortran/C).&lt;br /&gt;
  Compiler option for include files: -I${MKL_INC_DIR}/fftw&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
See the corresponding webpages:&lt;br /&gt;
* [https://software.intel.com/en-us/node/471410 FFTW Interface to Intel Math Kernel Library]&lt;br /&gt;
* [https://software.intel.com/de-de/node/471414 FFTW2 Interface to Intel Math Kernel Library]&lt;br /&gt;
* [https://software.intel.com/en-us/node/471456 FFTW3 Interface to Intel Math Kernel Library]&lt;br /&gt;
&lt;br /&gt;
== Sample Code ==&lt;br /&gt;
Sample code for various test cases is provided in folder pointed to by environment&lt;br /&gt;
variable [[#FFTW Specific Environments|$FFTW_EXA_DIR]].&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module list&lt;br /&gt;
Currently Loaded Modulefiles:&lt;br /&gt;
  1) compiler/intel/13.1&lt;br /&gt;
  2) numlib/fftw/3.3.3-impi-4.1.1-intel-13.1(default)&lt;br /&gt;
$ ls -F $FFTW_EXA_DIR&lt;br /&gt;
ex_mpi_2d.c         ex_serial_1d.c  fftw3f-test.c&lt;br /&gt;
ex_ompthreads_2d.c  ex_serial_2d.c  fftw3l-test.c&lt;br /&gt;
ex_pthreads_2d.c    ex_serial_3d.c  fftw3-test.c&lt;br /&gt;
$ echo $FFTW_EXA_DIR&lt;br /&gt;
/opt/bwhpc/common/numlib/fftw/3.3.3-impi-4.1.1-intel-13.1/examples&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
[[Category:Numerical_libraries]][[Category:bwUniCluster]][[Category:BwForCluster_BinAC]]&lt;/div&gt;</summary>
		<author><name>R Rutka</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=Development/FFTW&amp;diff=4533</id>
		<title>Development/FFTW</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=Development/FFTW&amp;diff=4533"/>
		<updated>2016-11-03T16:46:13Z</updated>

		<summary type="html">&lt;p&gt;R Rutka: /* Sample Code */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=600px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Description !! Content&lt;br /&gt;
|-&lt;br /&gt;
| module load&lt;br /&gt;
| numlib/fftw&lt;br /&gt;
|-&lt;br /&gt;
| Availability&lt;br /&gt;
| [[bwUniCluster]]&lt;br /&gt;
|-&lt;br /&gt;
| License&lt;br /&gt;
| [http://www.fftw.org/faq/section1.html#isfftwfree GPL] &amp;amp;#124; [http://www.fftw.org/fftw3_doc/License-and-Copyright.html License and Copyright]&lt;br /&gt;
|-&lt;br /&gt;
|Citing&lt;br /&gt;
| [https://github.com/FFTW/fftw3/blob/master/AUTHORS Authors]&lt;br /&gt;
|-&lt;br /&gt;
| Links&lt;br /&gt;
| [http://www.fftw.org/ FFTW Homepage] &amp;amp;#124; [http://www.fftw.org/#documentation  Documentation]&lt;br /&gt;
|-&lt;br /&gt;
| Graphical Interface&lt;br /&gt;
| No&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
= Description =&lt;br /&gt;
&#039;&#039;&#039;FFTW&#039;&#039;&#039; is a C subroutine library for computing the discrete Fourier transform (DFT) in one or more dimensions, of arbitrary input size, and of both real and complex data (as well as of even/odd data, i.e. the discrete cosine/sine transforms or DCT/DST).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.fftw.org/ More infos about FFTW]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
This package provides three versions of the fftw3 library depending on precision: &lt;br /&gt;
# libfft3&lt;br /&gt;
# libfftw3f &lt;br /&gt;
# libfftw3l &amp;lt;small&amp;gt;for double, single and long-double precision libraries&amp;lt;/small&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Documentation =&lt;br /&gt;
== Online ==&lt;br /&gt;
[http://www.fftw.org/fftw3_doc/ Online Documentation]&lt;br /&gt;
== Local ==&lt;br /&gt;
* info fftw3&lt;br /&gt;
* man fftw-wisdom&lt;br /&gt;
* man fftw-wisdom-to-conf&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
See also documentation folder pointed to by shell variable [[#FFTW Specific Environments|$FFTW_DOC_DIR]].&lt;br /&gt;
= Versions and Availability =&lt;br /&gt;
A list of versions currently available on all bwHPC-C5-Clusters can be obtained from the&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://cis-hpc.uni-konstanz.de/prod.cis/ Cluster Information System CIS]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/big&amp;gt;&lt;br /&gt;
{{#widget:Iframe&lt;br /&gt;
|url=https://cis-hpc.uni-konstanz.de/prod.cis/bwUniCluster/numlib/fftw&lt;br /&gt;
|width=99%&lt;br /&gt;
|height=350&lt;br /&gt;
|border=0&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
= Loading the Module =&lt;br /&gt;
Load the fftw module, and, if needed, the corresponding openmpi and compiler module.&lt;br /&gt;
You can load the default version of &#039;FFTW&#039;&#039; with the command &#039;&#039;&#039;&#039;module load numlib/fftw&#039;&#039;&#039;&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load numlib/fftw&lt;br /&gt;
Loading module dependency &#039;compiler/intel/13.1&#039;.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The module will try to load modules it needs to function (e.g. compiler, mpi, numlibs). &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
If loading the module fails, check if you have already loaded one of those modules with&amp;lt;br&amp;gt;&lt;br /&gt;
the command &#039;module list&#039;.&lt;br /&gt;
If you wish to load a specific (older) version (if available), you can do so using e.g. &lt;br /&gt;
&#039;&#039;&#039;&#039;module load numlib/fftw&#039;&#039;&#039;/&#039;version&#039; to load the version you desires.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module avail numlib/fftw&lt;br /&gt;
------------------------ /opt/bwhpc/common/modulefiles -------------------------&lt;br /&gt;
numlib/fftw/3.3.3-impi-4.1.1-gnu-4.4&lt;br /&gt;
numlib/fftw/3.3.3-impi-4.1.1-intel-13.1(default)&lt;br /&gt;
$ &lt;br /&gt;
$ module load numlib/fftw/3.3.3-impi-4.1.1-gnu-4.4&lt;br /&gt;
$ module list&lt;br /&gt;
Currently Loaded Modulefiles:&lt;br /&gt;
  1) numlib/fftw/3.3.3-impi-4.1.1-gnu-4.4&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;font color=red&amp;gt;Beware!&amp;lt;/font&amp;gt;&amp;amp;nbsp;Compiler, MPI-module and numerical library must fit!&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
= Hints for compiling and linking =&lt;br /&gt;
== FFTW Specific Environments ==&lt;br /&gt;
To see a list of all FFTW environments set by the &#039;module load&#039;-command use the command&lt;br /&gt;
&#039;module display numlib/fftw&#039;.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
After having loaded the appropriate module(s), you can use several environment variables to compile and link your application.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module display numlib/fftw&lt;br /&gt;
-------------------------------------------------------------------&lt;br /&gt;
/opt/bwhpc/common/modulefiles/numlib/fftw/3.3.3-impi-4.1.1-intel-13.1:&lt;br /&gt;
FTW_VERSION = 3.3.3-impi-4.1.1-intel-13.1 &lt;br /&gt;
FFTW_HOME = /opt/bwhpc/common/numlib/fftw/3.3.3-impi-4.1.1-intel-13.1 &lt;br /&gt;
FFTW_BIN_DIR = /opt/bwhpc/common/numlib/fftw/3.3.3-impi-4.1.1-intel-13.1/bin &lt;br /&gt;
FFTW_INC_DIR = /opt/bwhpc/common/numlib/fftw/3.3.3-impi-4.1.1-intel-13.1/include &lt;br /&gt;
FFTW_LIB_DIR = /opt/bwhpc/common/numlib/fftw/3.3.3-impi-4.1.1-intel-13.1/lib &lt;br /&gt;
FFTW_STA_DIR = /opt/bwhpc/common/numlib/fftw/3.3.3-impi-4.1.1-intel-13.1/lib &lt;br /&gt;
FFTW_SHA_DIR = (empty)&lt;br /&gt;
FFTW_MAN_DIR = /opt/bwhpc/common/numlib/fftw/3.3.3-impi-4.1.1-intel-13.1/share/man &lt;br /&gt;
FFTW_INF_DIR = /opt/bwhpc/common/numlib/fftw/3.3.3-impi-4.1.1-intel-13.1/share/info &lt;br /&gt;
FFTW_DOC_DIR = /opt/bwhpc/common/numlib/fftw/3.3.3-impi-4.1.1-intel-13.1/doc &lt;br /&gt;
FFTW_EXA_DIR = /opt/bwhpc/common/numlib/fftw/3.3.3-impi-4.1.1-intel-13.1/examples &lt;br /&gt;
FFTW_WWW = http://www.fftw.org/ &lt;br /&gt;
PATH = /opt/bwhpc/common/numlib/fftw/3.3.3-impi-4.1.1-intel-13.1/bin:$PATH&lt;br /&gt;
MANPATH = /opt/bwhpc/common/numlib/fftw/3.3.3-impi-4.1.1-intel-13.1/share/man:$MANPATH&lt;br /&gt;
INFOPATH = /opt/bwhpc/common/numlib/fftw/3.3.3-impi-4.1.1-intel-13.1/share/info:$INFOPATH&lt;br /&gt;
LD_LIBRARY_PATH = /opt/bwhpc/common/numlib/fftw/3.3.3-impi-4.1.1-intel-13.1/lib:$LD_LIBRARY_PATH &lt;br /&gt;
[...]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Compile a Serial Program ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 $ gcc example.c -o example -I$FFTW_INC_DIR -L$FFTW_LIB_DIR -lfftw3 -lm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== with POSIX Threads ===&lt;br /&gt;
Compile program with support for POSIX threads.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 $ gcc example.c -o example -I$FFTW_INC_DIR -L$FFTW_LIB_DIR -lfftw3_threads -lfftw3 -lpthread -lm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Compile program with support for OpenMP threads ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 $ gcc example.c -o example -fopenmp -I$FFTW_INC_DIR -L$FFTW_LIB_DIR -lfftw3_omp -lfftw3 -lm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Compile program with support for MPI ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 $ mpicc example.c -o example -I$FFTW_INC_DIR -L$FFTW_LIB_DIR -lfftw3_mpi -lfftw3 -lm &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Run program with MPI support ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 $ mpirun -n &amp;lt;ncpu&amp;gt; ./example &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Replace &amp;lt;ncpu&amp;gt; by number of processor cores.)&lt;br /&gt;
&lt;br /&gt;
Replace -lfftw3, -lfftw3_threads, etc. by -lfftw3f, -lfftw3f_threads, etc. for single &lt;br /&gt;
precision and by -lfftw3l, -lfftw3l_threads etc. for long-double precision codes, respectively.&lt;br /&gt;
&lt;br /&gt;
These commands will compile your program with dynamic fftw library versions in &lt;br /&gt;
which case you also have to have the fftw module loaded for running the program. &lt;br /&gt;
Alternatively, you may want to link your program with static fftw library versions. &lt;br /&gt;
With static fftw libraries it is only necessary to load the fftw module for compiling &lt;br /&gt;
but not for executing the program.&lt;br /&gt;
&lt;br /&gt;
== Compile program with static fftw library versions ==&lt;br /&gt;
Example for POSIX threads support&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 $ gcc example.c -o example -I$FFTW_INC_DIR $FFTW_LIB_DIR/{libfftw3_threads.a,libfftw3.a} -lpthread -lm &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
or:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 $ gcc example.c -o example -I$FFTW_INC_DIR -L$FFTW_LIB_DIR -Wl,-Bstatic -lfftw3 -lfftw3_threads \&lt;br /&gt;
       -Wl,-Bdynamic -lpthread -lm &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[#FFTW Specific Environments|Environment variables $FFTW_INC_DIR, $FFTW_LIB_DIR]] etc. are available after loading the module.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== FFTW Interface to Intel Math Kernel Library (MKL) ==&lt;br /&gt;
Sometimes, FFTW is not available on your cluster. You can use the [[Math_Kernel_Library_(MKL)|MKL library]] instead and include the FFTW functions, too.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Intel Math Kernel Library (MKL) offers FFTW2 and FFTW3 interfaces to Intel MKL Fast Fourier Transform and Trigonometric Transform functionality. The purpose of these interfaces is to enable applications using FFTW to gain performance with Intel MKL without changing the program source code.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Here is an excerpt from &#039;module help numlib/mkl&#039;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Static FFTW2/3 C/Fortran interfaces can be found in dir&lt;br /&gt;
    ${MKL_HOME}/interfaces/&lt;br /&gt;
  Examples:&lt;br /&gt;
    Link to FFTW3 Fortran interface with GNU compiler and ilp64 support:&lt;br /&gt;
      ${MKL_HOME}/interfaces/fftw3xf/libfftw3xf_intel64_double_i8_gnu47.a&lt;br /&gt;
    Link to FFTW3 Fortran interface with Intel compiler and lp64 support:&lt;br /&gt;
      ${MKL_HOME}/interfaces/fftw3xf/libfftw3xf_intel64_double_i4_intel150.a&lt;br /&gt;
  The Intel FFTW interfaces requires the Intel MKL library (e.g. it does&lt;br /&gt;
  not work with ACML library). Usually it is not a problem to use a&lt;br /&gt;
  different compiler version, e.g. to use _gnu41.a with gnu 4.3 compiler.&lt;br /&gt;
  See dir ${MKL_HOME}/interfaces/ for other interfaces (fftw2/3 Fortran/C).&lt;br /&gt;
  Compiler option for include files: -I${MKL_INC_DIR}/fftw&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
See the corresponding webpages:&lt;br /&gt;
* [https://software.intel.com/en-us/node/471410 FFTW Interface to Intel Math Kernel Library]&lt;br /&gt;
* [https://software.intel.com/de-de/node/471414 FFTW2 Interface to Intel Math Kernel Library]&lt;br /&gt;
* [https://software.intel.com/en-us/node/471456 FFTW3 Interface to Intel Math Kernel Library]&lt;br /&gt;
&lt;br /&gt;
== Sample Code ==&lt;br /&gt;
Sample code for various test cases is provided in folder pointed to by environment&lt;br /&gt;
variable [[#FFTW Specific Environments|$FFTW_EXA_DIR]].&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module list&lt;br /&gt;
Currently Loaded Modulefiles:&lt;br /&gt;
  1) compiler/intel/13.1&lt;br /&gt;
  2) numlib/fftw/3.3.3-impi-4.1.1-intel-13.1(default)&lt;br /&gt;
$ ls -F $FFTW_EXA_DIR&lt;br /&gt;
ex_mpi_2d.c         ex_serial_1d.c  fftw3f-test.c&lt;br /&gt;
ex_ompthreads_2d.c  ex_serial_2d.c  fftw3l-test.c&lt;br /&gt;
ex_pthreads_2d.c    ex_serial_3d.c  fftw3-test.c&lt;br /&gt;
$ echo $FFTW_EXA_DIR&lt;br /&gt;
/opt/bwhpc/common/numlib/fftw/3.3.3-impi-4.1.1-intel-13.1/examples&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
[[Category:Numerical_libraries]][[Category:bwUniCluster]][[Category:BwForCluster_BinAC]]&lt;/div&gt;</summary>
		<author><name>R Rutka</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=Development/FFTW&amp;diff=4532</id>
		<title>Development/FFTW</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=Development/FFTW&amp;diff=4532"/>
		<updated>2016-11-03T16:45:55Z</updated>

		<summary type="html">&lt;p&gt;R Rutka: /* Versions and Availability */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=600px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Description !! Content&lt;br /&gt;
|-&lt;br /&gt;
| module load&lt;br /&gt;
| numlib/fftw&lt;br /&gt;
|-&lt;br /&gt;
| Availability&lt;br /&gt;
| [[bwUniCluster]]&lt;br /&gt;
|-&lt;br /&gt;
| License&lt;br /&gt;
| [http://www.fftw.org/faq/section1.html#isfftwfree GPL] &amp;amp;#124; [http://www.fftw.org/fftw3_doc/License-and-Copyright.html License and Copyright]&lt;br /&gt;
|-&lt;br /&gt;
|Citing&lt;br /&gt;
| [https://github.com/FFTW/fftw3/blob/master/AUTHORS Authors]&lt;br /&gt;
|-&lt;br /&gt;
| Links&lt;br /&gt;
| [http://www.fftw.org/ FFTW Homepage] &amp;amp;#124; [http://www.fftw.org/#documentation  Documentation]&lt;br /&gt;
|-&lt;br /&gt;
| Graphical Interface&lt;br /&gt;
| No&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
= Description =&lt;br /&gt;
&#039;&#039;&#039;FFTW&#039;&#039;&#039; is a C subroutine library for computing the discrete Fourier transform (DFT) in one or more dimensions, of arbitrary input size, and of both real and complex data (as well as of even/odd data, i.e. the discrete cosine/sine transforms or DCT/DST).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.fftw.org/ More infos about FFTW]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
This package provides three versions of the fftw3 library depending on precision: &lt;br /&gt;
# libfft3&lt;br /&gt;
# libfftw3f &lt;br /&gt;
# libfftw3l &amp;lt;small&amp;gt;for double, single and long-double precision libraries&amp;lt;/small&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Documentation =&lt;br /&gt;
== Online ==&lt;br /&gt;
[http://www.fftw.org/fftw3_doc/ Online Documentation]&lt;br /&gt;
== Local ==&lt;br /&gt;
* info fftw3&lt;br /&gt;
* man fftw-wisdom&lt;br /&gt;
* man fftw-wisdom-to-conf&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
See also documentation folder pointed to by shell variable [[#FFTW Specific Environments|$FFTW_DOC_DIR]].&lt;br /&gt;
= Versions and Availability =&lt;br /&gt;
A list of versions currently available on all bwHPC-C5-Clusters can be obtained from the&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://cis-hpc.uni-konstanz.de/prod.cis/ Cluster Information System CIS]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/big&amp;gt;&lt;br /&gt;
{{#widget:Iframe&lt;br /&gt;
|url=https://cis-hpc.uni-konstanz.de/prod.cis/bwUniCluster/numlib/fftw&lt;br /&gt;
|width=99%&lt;br /&gt;
|height=350&lt;br /&gt;
|border=0&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
= Loading the Module =&lt;br /&gt;
Load the fftw module, and, if needed, the corresponding openmpi and compiler module.&lt;br /&gt;
You can load the default version of &#039;FFTW&#039;&#039; with the command &#039;&#039;&#039;&#039;module load numlib/fftw&#039;&#039;&#039;&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load numlib/fftw&lt;br /&gt;
Loading module dependency &#039;compiler/intel/13.1&#039;.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The module will try to load modules it needs to function (e.g. compiler, mpi, numlibs). &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
If loading the module fails, check if you have already loaded one of those modules with&amp;lt;br&amp;gt;&lt;br /&gt;
the command &#039;module list&#039;.&lt;br /&gt;
If you wish to load a specific (older) version (if available), you can do so using e.g. &lt;br /&gt;
&#039;&#039;&#039;&#039;module load numlib/fftw&#039;&#039;&#039;/&#039;version&#039; to load the version you desires.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module avail numlib/fftw&lt;br /&gt;
------------------------ /opt/bwhpc/common/modulefiles -------------------------&lt;br /&gt;
numlib/fftw/3.3.3-impi-4.1.1-gnu-4.4&lt;br /&gt;
numlib/fftw/3.3.3-impi-4.1.1-intel-13.1(default)&lt;br /&gt;
$ &lt;br /&gt;
$ module load numlib/fftw/3.3.3-impi-4.1.1-gnu-4.4&lt;br /&gt;
$ module list&lt;br /&gt;
Currently Loaded Modulefiles:&lt;br /&gt;
  1) numlib/fftw/3.3.3-impi-4.1.1-gnu-4.4&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;font color=red&amp;gt;Beware!&amp;lt;/font&amp;gt;&amp;amp;nbsp;Compiler, MPI-module and numerical library must fit!&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
= Hints for compiling and linking =&lt;br /&gt;
== FFTW Specific Environments ==&lt;br /&gt;
To see a list of all FFTW environments set by the &#039;module load&#039;-command use the command&lt;br /&gt;
&#039;module display numlib/fftw&#039;.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
After having loaded the appropriate module(s), you can use several environment variables to compile and link your application.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module display numlib/fftw&lt;br /&gt;
-------------------------------------------------------------------&lt;br /&gt;
/opt/bwhpc/common/modulefiles/numlib/fftw/3.3.3-impi-4.1.1-intel-13.1:&lt;br /&gt;
FTW_VERSION = 3.3.3-impi-4.1.1-intel-13.1 &lt;br /&gt;
FFTW_HOME = /opt/bwhpc/common/numlib/fftw/3.3.3-impi-4.1.1-intel-13.1 &lt;br /&gt;
FFTW_BIN_DIR = /opt/bwhpc/common/numlib/fftw/3.3.3-impi-4.1.1-intel-13.1/bin &lt;br /&gt;
FFTW_INC_DIR = /opt/bwhpc/common/numlib/fftw/3.3.3-impi-4.1.1-intel-13.1/include &lt;br /&gt;
FFTW_LIB_DIR = /opt/bwhpc/common/numlib/fftw/3.3.3-impi-4.1.1-intel-13.1/lib &lt;br /&gt;
FFTW_STA_DIR = /opt/bwhpc/common/numlib/fftw/3.3.3-impi-4.1.1-intel-13.1/lib &lt;br /&gt;
FFTW_SHA_DIR = (empty)&lt;br /&gt;
FFTW_MAN_DIR = /opt/bwhpc/common/numlib/fftw/3.3.3-impi-4.1.1-intel-13.1/share/man &lt;br /&gt;
FFTW_INF_DIR = /opt/bwhpc/common/numlib/fftw/3.3.3-impi-4.1.1-intel-13.1/share/info &lt;br /&gt;
FFTW_DOC_DIR = /opt/bwhpc/common/numlib/fftw/3.3.3-impi-4.1.1-intel-13.1/doc &lt;br /&gt;
FFTW_EXA_DIR = /opt/bwhpc/common/numlib/fftw/3.3.3-impi-4.1.1-intel-13.1/examples &lt;br /&gt;
FFTW_WWW = http://www.fftw.org/ &lt;br /&gt;
PATH = /opt/bwhpc/common/numlib/fftw/3.3.3-impi-4.1.1-intel-13.1/bin:$PATH&lt;br /&gt;
MANPATH = /opt/bwhpc/common/numlib/fftw/3.3.3-impi-4.1.1-intel-13.1/share/man:$MANPATH&lt;br /&gt;
INFOPATH = /opt/bwhpc/common/numlib/fftw/3.3.3-impi-4.1.1-intel-13.1/share/info:$INFOPATH&lt;br /&gt;
LD_LIBRARY_PATH = /opt/bwhpc/common/numlib/fftw/3.3.3-impi-4.1.1-intel-13.1/lib:$LD_LIBRARY_PATH &lt;br /&gt;
[...]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Compile a Serial Program ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 $ gcc example.c -o example -I$FFTW_INC_DIR -L$FFTW_LIB_DIR -lfftw3 -lm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== with POSIX Threads ===&lt;br /&gt;
Compile program with support for POSIX threads.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 $ gcc example.c -o example -I$FFTW_INC_DIR -L$FFTW_LIB_DIR -lfftw3_threads -lfftw3 -lpthread -lm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Compile program with support for OpenMP threads ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 $ gcc example.c -o example -fopenmp -I$FFTW_INC_DIR -L$FFTW_LIB_DIR -lfftw3_omp -lfftw3 -lm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Compile program with support for MPI ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 $ mpicc example.c -o example -I$FFTW_INC_DIR -L$FFTW_LIB_DIR -lfftw3_mpi -lfftw3 -lm &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Run program with MPI support ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 $ mpirun -n &amp;lt;ncpu&amp;gt; ./example &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Replace &amp;lt;ncpu&amp;gt; by number of processor cores.)&lt;br /&gt;
&lt;br /&gt;
Replace -lfftw3, -lfftw3_threads, etc. by -lfftw3f, -lfftw3f_threads, etc. for single &lt;br /&gt;
precision and by -lfftw3l, -lfftw3l_threads etc. for long-double precision codes, respectively.&lt;br /&gt;
&lt;br /&gt;
These commands will compile your program with dynamic fftw library versions in &lt;br /&gt;
which case you also have to have the fftw module loaded for running the program. &lt;br /&gt;
Alternatively, you may want to link your program with static fftw library versions. &lt;br /&gt;
With static fftw libraries it is only necessary to load the fftw module for compiling &lt;br /&gt;
but not for executing the program.&lt;br /&gt;
&lt;br /&gt;
== Compile program with static fftw library versions ==&lt;br /&gt;
Example for POSIX threads support&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 $ gcc example.c -o example -I$FFTW_INC_DIR $FFTW_LIB_DIR/{libfftw3_threads.a,libfftw3.a} -lpthread -lm &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
or:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 $ gcc example.c -o example -I$FFTW_INC_DIR -L$FFTW_LIB_DIR -Wl,-Bstatic -lfftw3 -lfftw3_threads \&lt;br /&gt;
       -Wl,-Bdynamic -lpthread -lm &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[#FFTW Specific Environments|Environment variables $FFTW_INC_DIR, $FFTW_LIB_DIR]] etc. are available after loading the module.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== FFTW Interface to Intel Math Kernel Library (MKL) ==&lt;br /&gt;
Sometimes, FFTW is not available on your cluster. You can use the [[Math_Kernel_Library_(MKL)|MKL library]] instead and include the FFTW functions, too.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Intel Math Kernel Library (MKL) offers FFTW2 and FFTW3 interfaces to Intel MKL Fast Fourier Transform and Trigonometric Transform functionality. The purpose of these interfaces is to enable applications using FFTW to gain performance with Intel MKL without changing the program source code.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Here is an excerpt from &#039;module help numlib/mkl&#039;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Static FFTW2/3 C/Fortran interfaces can be found in dir&lt;br /&gt;
    ${MKL_HOME}/interfaces/&lt;br /&gt;
  Examples:&lt;br /&gt;
    Link to FFTW3 Fortran interface with GNU compiler and ilp64 support:&lt;br /&gt;
      ${MKL_HOME}/interfaces/fftw3xf/libfftw3xf_intel64_double_i8_gnu47.a&lt;br /&gt;
    Link to FFTW3 Fortran interface with Intel compiler and lp64 support:&lt;br /&gt;
      ${MKL_HOME}/interfaces/fftw3xf/libfftw3xf_intel64_double_i4_intel150.a&lt;br /&gt;
  The Intel FFTW interfaces requires the Intel MKL library (e.g. it does&lt;br /&gt;
  not work with ACML library). Usually it is not a problem to use a&lt;br /&gt;
  different compiler version, e.g. to use _gnu41.a with gnu 4.3 compiler.&lt;br /&gt;
  See dir ${MKL_HOME}/interfaces/ for other interfaces (fftw2/3 Fortran/C).&lt;br /&gt;
  Compiler option for include files: -I${MKL_INC_DIR}/fftw&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
See the corresponding webpages:&lt;br /&gt;
* [https://software.intel.com/en-us/node/471410 FFTW Interface to Intel Math Kernel Library]&lt;br /&gt;
* [https://software.intel.com/de-de/node/471414 FFTW2 Interface to Intel Math Kernel Library]&lt;br /&gt;
* [https://software.intel.com/en-us/node/471456 FFTW3 Interface to Intel Math Kernel Library]&lt;br /&gt;
&lt;br /&gt;
== Sample Code ==&lt;br /&gt;
Sample code for various test cases is provided in folder pointed to by environment&lt;br /&gt;
variable [[#FFTW Specific Environments|$FFTW_EXA_DIR]].&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module list&lt;br /&gt;
Currently Loaded Modulefiles:&lt;br /&gt;
  1) compiler/intel/13.1&lt;br /&gt;
  2) numlib/fftw/3.3.3-impi-4.1.1-intel-13.1(default)&lt;br /&gt;
$ ls -F $FFTW_EXA_DIR&lt;br /&gt;
ex_mpi_2d.c         ex_serial_1d.c  fftw3f-test.c&lt;br /&gt;
ex_ompthreads_2d.c  ex_serial_2d.c  fftw3l-test.c&lt;br /&gt;
ex_pthreads_2d.c    ex_serial_3d.c  fftw3-test.c&lt;br /&gt;
$ echo $FFTW_EXA_DIR&lt;br /&gt;
/opt/bwhpc/common/numlib/fftw/3.3.3-impi-4.1.1-intel-13.1/examples&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
[[Category:Numerical_libraries]][[Category:bwUniCluster]]&lt;/div&gt;</summary>
		<author><name>R Rutka</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=Development/FFTW&amp;diff=4531</id>
		<title>Development/FFTW</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=Development/FFTW&amp;diff=4531"/>
		<updated>2016-11-03T16:45:30Z</updated>

		<summary type="html">&lt;p&gt;R Rutka: /* Versions and Availability */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=600px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Description !! Content&lt;br /&gt;
|-&lt;br /&gt;
| module load&lt;br /&gt;
| numlib/fftw&lt;br /&gt;
|-&lt;br /&gt;
| Availability&lt;br /&gt;
| [[bwUniCluster]]&lt;br /&gt;
|-&lt;br /&gt;
| License&lt;br /&gt;
| [http://www.fftw.org/faq/section1.html#isfftwfree GPL] &amp;amp;#124; [http://www.fftw.org/fftw3_doc/License-and-Copyright.html License and Copyright]&lt;br /&gt;
|-&lt;br /&gt;
|Citing&lt;br /&gt;
| [https://github.com/FFTW/fftw3/blob/master/AUTHORS Authors]&lt;br /&gt;
|-&lt;br /&gt;
| Links&lt;br /&gt;
| [http://www.fftw.org/ FFTW Homepage] &amp;amp;#124; [http://www.fftw.org/#documentation  Documentation]&lt;br /&gt;
|-&lt;br /&gt;
| Graphical Interface&lt;br /&gt;
| No&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
= Description =&lt;br /&gt;
&#039;&#039;&#039;FFTW&#039;&#039;&#039; is a C subroutine library for computing the discrete Fourier transform (DFT) in one or more dimensions, of arbitrary input size, and of both real and complex data (as well as of even/odd data, i.e. the discrete cosine/sine transforms or DCT/DST).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.fftw.org/ More infos about FFTW]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
This package provides three versions of the fftw3 library depending on precision: &lt;br /&gt;
# libfft3&lt;br /&gt;
# libfftw3f &lt;br /&gt;
# libfftw3l &amp;lt;small&amp;gt;for double, single and long-double precision libraries&amp;lt;/small&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Documentation =&lt;br /&gt;
== Online ==&lt;br /&gt;
[http://www.fftw.org/fftw3_doc/ Online Documentation]&lt;br /&gt;
== Local ==&lt;br /&gt;
* info fftw3&lt;br /&gt;
* man fftw-wisdom&lt;br /&gt;
* man fftw-wisdom-to-conf&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
See also documentation folder pointed to by shell variable [[#FFTW Specific Environments|$FFTW_DOC_DIR]].&lt;br /&gt;
= Versions and Availability =&lt;br /&gt;
A list of versions currently available on all bwHPC-C5-Clusters can be obtained from the&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://cis-hpc.uni-konstanz.de/prod.cis/ Cluster Information System CIS]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/big&amp;gt;&lt;br /&gt;
{{#widget:Iframe&lt;br /&gt;
|url=https://cis-hpc.uni-konstanz.de/prod.cis/bwUniCluster/numlib/fftw&lt;br /&gt;
|width=99%&lt;br /&gt;
|height=400&lt;br /&gt;
|border=0&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
= Loading the Module =&lt;br /&gt;
Load the fftw module, and, if needed, the corresponding openmpi and compiler module.&lt;br /&gt;
You can load the default version of &#039;FFTW&#039;&#039; with the command &#039;&#039;&#039;&#039;module load numlib/fftw&#039;&#039;&#039;&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load numlib/fftw&lt;br /&gt;
Loading module dependency &#039;compiler/intel/13.1&#039;.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The module will try to load modules it needs to function (e.g. compiler, mpi, numlibs). &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
If loading the module fails, check if you have already loaded one of those modules with&amp;lt;br&amp;gt;&lt;br /&gt;
the command &#039;module list&#039;.&lt;br /&gt;
If you wish to load a specific (older) version (if available), you can do so using e.g. &lt;br /&gt;
&#039;&#039;&#039;&#039;module load numlib/fftw&#039;&#039;&#039;/&#039;version&#039; to load the version you desires.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module avail numlib/fftw&lt;br /&gt;
------------------------ /opt/bwhpc/common/modulefiles -------------------------&lt;br /&gt;
numlib/fftw/3.3.3-impi-4.1.1-gnu-4.4&lt;br /&gt;
numlib/fftw/3.3.3-impi-4.1.1-intel-13.1(default)&lt;br /&gt;
$ &lt;br /&gt;
$ module load numlib/fftw/3.3.3-impi-4.1.1-gnu-4.4&lt;br /&gt;
$ module list&lt;br /&gt;
Currently Loaded Modulefiles:&lt;br /&gt;
  1) numlib/fftw/3.3.3-impi-4.1.1-gnu-4.4&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;font color=red&amp;gt;Beware!&amp;lt;/font&amp;gt;&amp;amp;nbsp;Compiler, MPI-module and numerical library must fit!&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
= Hints for compiling and linking =&lt;br /&gt;
== FFTW Specific Environments ==&lt;br /&gt;
To see a list of all FFTW environments set by the &#039;module load&#039;-command use the command&lt;br /&gt;
&#039;module display numlib/fftw&#039;.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
After having loaded the appropriate module(s), you can use several environment variables to compile and link your application.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module display numlib/fftw&lt;br /&gt;
-------------------------------------------------------------------&lt;br /&gt;
/opt/bwhpc/common/modulefiles/numlib/fftw/3.3.3-impi-4.1.1-intel-13.1:&lt;br /&gt;
FTW_VERSION = 3.3.3-impi-4.1.1-intel-13.1 &lt;br /&gt;
FFTW_HOME = /opt/bwhpc/common/numlib/fftw/3.3.3-impi-4.1.1-intel-13.1 &lt;br /&gt;
FFTW_BIN_DIR = /opt/bwhpc/common/numlib/fftw/3.3.3-impi-4.1.1-intel-13.1/bin &lt;br /&gt;
FFTW_INC_DIR = /opt/bwhpc/common/numlib/fftw/3.3.3-impi-4.1.1-intel-13.1/include &lt;br /&gt;
FFTW_LIB_DIR = /opt/bwhpc/common/numlib/fftw/3.3.3-impi-4.1.1-intel-13.1/lib &lt;br /&gt;
FFTW_STA_DIR = /opt/bwhpc/common/numlib/fftw/3.3.3-impi-4.1.1-intel-13.1/lib &lt;br /&gt;
FFTW_SHA_DIR = (empty)&lt;br /&gt;
FFTW_MAN_DIR = /opt/bwhpc/common/numlib/fftw/3.3.3-impi-4.1.1-intel-13.1/share/man &lt;br /&gt;
FFTW_INF_DIR = /opt/bwhpc/common/numlib/fftw/3.3.3-impi-4.1.1-intel-13.1/share/info &lt;br /&gt;
FFTW_DOC_DIR = /opt/bwhpc/common/numlib/fftw/3.3.3-impi-4.1.1-intel-13.1/doc &lt;br /&gt;
FFTW_EXA_DIR = /opt/bwhpc/common/numlib/fftw/3.3.3-impi-4.1.1-intel-13.1/examples &lt;br /&gt;
FFTW_WWW = http://www.fftw.org/ &lt;br /&gt;
PATH = /opt/bwhpc/common/numlib/fftw/3.3.3-impi-4.1.1-intel-13.1/bin:$PATH&lt;br /&gt;
MANPATH = /opt/bwhpc/common/numlib/fftw/3.3.3-impi-4.1.1-intel-13.1/share/man:$MANPATH&lt;br /&gt;
INFOPATH = /opt/bwhpc/common/numlib/fftw/3.3.3-impi-4.1.1-intel-13.1/share/info:$INFOPATH&lt;br /&gt;
LD_LIBRARY_PATH = /opt/bwhpc/common/numlib/fftw/3.3.3-impi-4.1.1-intel-13.1/lib:$LD_LIBRARY_PATH &lt;br /&gt;
[...]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Compile a Serial Program ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 $ gcc example.c -o example -I$FFTW_INC_DIR -L$FFTW_LIB_DIR -lfftw3 -lm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== with POSIX Threads ===&lt;br /&gt;
Compile program with support for POSIX threads.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 $ gcc example.c -o example -I$FFTW_INC_DIR -L$FFTW_LIB_DIR -lfftw3_threads -lfftw3 -lpthread -lm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Compile program with support for OpenMP threads ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 $ gcc example.c -o example -fopenmp -I$FFTW_INC_DIR -L$FFTW_LIB_DIR -lfftw3_omp -lfftw3 -lm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Compile program with support for MPI ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 $ mpicc example.c -o example -I$FFTW_INC_DIR -L$FFTW_LIB_DIR -lfftw3_mpi -lfftw3 -lm &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Run program with MPI support ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 $ mpirun -n &amp;lt;ncpu&amp;gt; ./example &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Replace &amp;lt;ncpu&amp;gt; by number of processor cores.)&lt;br /&gt;
&lt;br /&gt;
Replace -lfftw3, -lfftw3_threads, etc. by -lfftw3f, -lfftw3f_threads, etc. for single &lt;br /&gt;
precision and by -lfftw3l, -lfftw3l_threads etc. for long-double precision codes, respectively.&lt;br /&gt;
&lt;br /&gt;
These commands will compile your program with dynamic fftw library versions in &lt;br /&gt;
which case you also have to have the fftw module loaded for running the program. &lt;br /&gt;
Alternatively, you may want to link your program with static fftw library versions. &lt;br /&gt;
With static fftw libraries it is only necessary to load the fftw module for compiling &lt;br /&gt;
but not for executing the program.&lt;br /&gt;
&lt;br /&gt;
== Compile program with static fftw library versions ==&lt;br /&gt;
Example for POSIX threads support&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 $ gcc example.c -o example -I$FFTW_INC_DIR $FFTW_LIB_DIR/{libfftw3_threads.a,libfftw3.a} -lpthread -lm &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
or:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 $ gcc example.c -o example -I$FFTW_INC_DIR -L$FFTW_LIB_DIR -Wl,-Bstatic -lfftw3 -lfftw3_threads \&lt;br /&gt;
       -Wl,-Bdynamic -lpthread -lm &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[#FFTW Specific Environments|Environment variables $FFTW_INC_DIR, $FFTW_LIB_DIR]] etc. are available after loading the module.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== FFTW Interface to Intel Math Kernel Library (MKL) ==&lt;br /&gt;
Sometimes, FFTW is not available on your cluster. You can use the [[Math_Kernel_Library_(MKL)|MKL library]] instead and include the FFTW functions, too.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Intel Math Kernel Library (MKL) offers FFTW2 and FFTW3 interfaces to Intel MKL Fast Fourier Transform and Trigonometric Transform functionality. The purpose of these interfaces is to enable applications using FFTW to gain performance with Intel MKL without changing the program source code.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Here is an excerpt from &#039;module help numlib/mkl&#039;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Static FFTW2/3 C/Fortran interfaces can be found in dir&lt;br /&gt;
    ${MKL_HOME}/interfaces/&lt;br /&gt;
  Examples:&lt;br /&gt;
    Link to FFTW3 Fortran interface with GNU compiler and ilp64 support:&lt;br /&gt;
      ${MKL_HOME}/interfaces/fftw3xf/libfftw3xf_intel64_double_i8_gnu47.a&lt;br /&gt;
    Link to FFTW3 Fortran interface with Intel compiler and lp64 support:&lt;br /&gt;
      ${MKL_HOME}/interfaces/fftw3xf/libfftw3xf_intel64_double_i4_intel150.a&lt;br /&gt;
  The Intel FFTW interfaces requires the Intel MKL library (e.g. it does&lt;br /&gt;
  not work with ACML library). Usually it is not a problem to use a&lt;br /&gt;
  different compiler version, e.g. to use _gnu41.a with gnu 4.3 compiler.&lt;br /&gt;
  See dir ${MKL_HOME}/interfaces/ for other interfaces (fftw2/3 Fortran/C).&lt;br /&gt;
  Compiler option for include files: -I${MKL_INC_DIR}/fftw&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
See the corresponding webpages:&lt;br /&gt;
* [https://software.intel.com/en-us/node/471410 FFTW Interface to Intel Math Kernel Library]&lt;br /&gt;
* [https://software.intel.com/de-de/node/471414 FFTW2 Interface to Intel Math Kernel Library]&lt;br /&gt;
* [https://software.intel.com/en-us/node/471456 FFTW3 Interface to Intel Math Kernel Library]&lt;br /&gt;
&lt;br /&gt;
== Sample Code ==&lt;br /&gt;
Sample code for various test cases is provided in folder pointed to by environment&lt;br /&gt;
variable [[#FFTW Specific Environments|$FFTW_EXA_DIR]].&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module list&lt;br /&gt;
Currently Loaded Modulefiles:&lt;br /&gt;
  1) compiler/intel/13.1&lt;br /&gt;
  2) numlib/fftw/3.3.3-impi-4.1.1-intel-13.1(default)&lt;br /&gt;
$ ls -F $FFTW_EXA_DIR&lt;br /&gt;
ex_mpi_2d.c         ex_serial_1d.c  fftw3f-test.c&lt;br /&gt;
ex_ompthreads_2d.c  ex_serial_2d.c  fftw3l-test.c&lt;br /&gt;
ex_pthreads_2d.c    ex_serial_3d.c  fftw3-test.c&lt;br /&gt;
$ echo $FFTW_EXA_DIR&lt;br /&gt;
/opt/bwhpc/common/numlib/fftw/3.3.3-impi-4.1.1-intel-13.1/examples&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
[[Category:Numerical_libraries]][[Category:bwUniCluster]]&lt;/div&gt;</summary>
		<author><name>R Rutka</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=Development/Intel_Compiler&amp;diff=4530</id>
		<title>Development/Intel Compiler</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=Development/Intel_Compiler&amp;diff=4530"/>
		<updated>2016-11-03T16:44:48Z</updated>

		<summary type="html">&lt;p&gt;R Rutka: /* Further literature */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=600px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Description !! Content&lt;br /&gt;
|-&lt;br /&gt;
| module load&lt;br /&gt;
| compiler/intel&lt;br /&gt;
|-&lt;br /&gt;
| License&lt;br /&gt;
| Commercial. See $INTEL_HOME/install-doc/EULA.txt. &amp;amp;#124; [https://software.intel.com/en-us/faq/licensing Intel Product Licensig FAQ]&lt;br /&gt;
|-&lt;br /&gt;
|Citing&lt;br /&gt;
| n/a&lt;br /&gt;
|-&lt;br /&gt;
| Links&lt;br /&gt;
| [https://software.intel.com/en-us/c-compilers Intel C-Compiler Homepage]&lt;br /&gt;
|-&lt;br /&gt;
| Graphical Interface&lt;br /&gt;
| [[#Debugger|Yes (Intel Debugger GUI-Verison)]]&lt;br /&gt;
|-&lt;br /&gt;
| Included modules&lt;br /&gt;
|  icc &amp;amp;#124; icpc &amp;amp;#124; ifort &amp;amp;#124; idb&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
= Introduction =&lt;br /&gt;
The &#039;&#039;&#039;Intel Compiler&#039;&#039;&#039; of the &#039;&#039;&#039;Intel Composer XE Suite&#039;&#039;&#039; consists of tools to compile and debug C, C++ and Fortran programs:&lt;br /&gt;
{| width=400px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;padding:3px&amp;quot;| icc&lt;br /&gt;
|style=&amp;quot;padding:3px&amp;quot;| Intel  C compiler&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;padding:3px&amp;quot;| icpc&lt;br /&gt;
|style=&amp;quot;padding:3px&amp;quot;| Intel C++ compiler&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;padding:3px&amp;quot;| ifort&lt;br /&gt;
|style=&amp;quot;padding:3px&amp;quot;| [https://software.intel.com/en-us/fortran-compilers Intel Fortran compiler]&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;padding:3px&amp;quot;| [[#GUI|idb]]&lt;br /&gt;
|style=&amp;quot;padding:3px&amp;quot;| Intel debugger in GUI mode&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;padding:3px&amp;quot;| [[#Console Mode|idbc]]&lt;br /&gt;
|style=&amp;quot;padding:3px&amp;quot;| Intel debugger in console mode&lt;br /&gt;
|}&lt;br /&gt;
Aside from that the suite also includes the TBB (Threading Building Blocks) and IPP (Integrated Performance Primitives) libraries.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
More information about the MPI versions of the Intel Compiler is available here:&lt;br /&gt;
* [[BwHPC_BPG_for_Parallel_Programming|Best Practices Guide for Parallel Programming]].&lt;br /&gt;
&lt;br /&gt;
= Versions and Availability =&lt;br /&gt;
A list of versions currently available on all bwHPC-C5-Clusters can be obtained from the&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://cis-hpc.uni-konstanz.de/prod.cis/ Cluster Information System CIS]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/big&amp;gt;&lt;br /&gt;
{{#widget:Iframe&lt;br /&gt;
|url=https://cis-hpc.uni-konstanz.de/prod.cis/bwUniCluster/compiler/intel&lt;br /&gt;
|width=99%&lt;br /&gt;
|height=700&lt;br /&gt;
}}&lt;br /&gt;
On the command line interface of any bwHPC cluster you&#039;ll get a list of available versions &lt;br /&gt;
by using the command &#039;module avail compiler/intel&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ : bwUniCluster&lt;br /&gt;
$ module avail compiler/intel&lt;br /&gt;
---------------------- /opt/bwhpc/common/modulefiles -----------------------&lt;br /&gt;
compiler/intel/12.1          compiler/intel/14.0&lt;br /&gt;
compiler/intel/13.1          compiler/intel/15.0(default)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Loading the module ==&lt;br /&gt;
=== Default Version ===&lt;br /&gt;
You can load the default version of the Intel Compiler with the command&lt;br /&gt;
&#039;&#039;&#039;&#039;module load compiler/intel&#039;&#039;&#039;&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module avail compiler/intel&lt;br /&gt;
---------------------- /opt/bwhpc/common/modulefiles -----------------------&lt;br /&gt;
compiler/intel/12.1          compiler/intel/14.0&lt;br /&gt;
compiler/intel/13.1          compiler/intel/15.0(default)&lt;br /&gt;
$ module load compiler/intel&lt;br /&gt;
$ module list&lt;br /&gt;
Currently Loaded Modulefiles:&lt;br /&gt;
  1) compiler/intel/15.0(default)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here, we got the &amp;quot;default&amp;quot; version 15.0 (example).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The module will try to load modules it needs to function. &lt;br /&gt;
If loading the module fails, check if you have already loaded the module &lt;br /&gt;
with &#039;module list&#039;.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Specific (newer or older) Version ===&lt;br /&gt;
If you wish to load a specific (older or newer) version (if available), you can do so using e.g. &lt;br /&gt;
&#039;&#039;&#039;&#039;module load compiler/intel&#039;&#039;&#039;/version&#039; to load the version you desires.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module avail compiler/intel&lt;br /&gt;
---------------------- /opt/bwhpc/common/modulefiles -----------------------&lt;br /&gt;
compiler/intel/12.1          compiler/intel/14.0&lt;br /&gt;
compiler/intel/13.1          compiler/intel/15.0(default)&lt;br /&gt;
$ module load compiler/intel/14.0&lt;br /&gt;
$ module list&lt;br /&gt;
Currently Loaded Modulefiles:&lt;br /&gt;
  1) compiler/intel/14.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Intel C-Compiler &amp;quot;version 14.0&amp;quot; is loaded now (example).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Intel C-Compiler-Specific Environments =&lt;br /&gt;
To see a list of all Intel C-Compiler environments set by the &#039;module load&#039;-command use the command &#039;&#039;&#039;module show compiler/intel&#039;&#039;&#039;.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Example (excerpt, default version)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module show compiler/intel  # output is revised&lt;br /&gt;
-------------------------------------------------------------------&lt;br /&gt;
/opt/bwhpc/common/modulefiles/compiler/intel/15.0:&lt;br /&gt;
[...]&lt;br /&gt;
INTEL_VERSION = 15.0.3 &lt;br /&gt;
INTEL_HOME = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187 &lt;br /&gt;
INTEL_BIN_DIR = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/bin/intel64 &lt;br /&gt;
INTEL_LIB_DIR = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/compiler/lib/intel64 &lt;br /&gt;
INTEL_LIB_MIC = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/compiler/lib/mic &lt;br /&gt;
INTEL_LIB_MICMPI = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/mpirt/lib/mic &lt;br /&gt;
INTEL_INC_DIR = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/compiler/include &lt;br /&gt;
INTEL_MAN_DIR = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/man/en_US &lt;br /&gt;
INTEL_DOC_DIR = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/Documentation/en_US &lt;br /&gt;
GDB_VERSION = 15.0.3 &lt;br /&gt;
GDB_HOME = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/debugger/gdb/intel64 &lt;br /&gt;
GDB_BIN_DIR = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/debugger/gdb/intel64/bin &lt;br /&gt;
GDB_LIB_DIR = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/debugger/libipt/intel64/lib &lt;br /&gt;
GDB_INC_DIR = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/debugger/gdb/intel64/include &lt;br /&gt;
GDB_INF_DIR = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/debugger/gdb/intel64/share/info &lt;br /&gt;
GDB_MAN_DIR = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/debugger/gdb/intel64/share/man &lt;br /&gt;
ICC_VERSION = 15.0.3 &lt;br /&gt;
ICC_HOME = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187 &lt;br /&gt;
ICC_BIN_DIR = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/bin/intel64 &lt;br /&gt;
ICC_LIB_DIR = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/compiler/lib/intel64 &lt;br /&gt;
ICC_INC_DIR = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/compiler/include &lt;br /&gt;
ICC_MAN_DIR = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/man/en_US &lt;br /&gt;
ICC_DOC_DIR = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/Documentation/en_US &lt;br /&gt;
IFORT_VERSION = 15.0.3 &lt;br /&gt;
IFORT_HOME = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187 &lt;br /&gt;
IFORT_BIN_DIR = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/bin/intel64 &lt;br /&gt;
IFORT_LIB_DIR = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/compiler/lib/intel64 &lt;br /&gt;
IFORT_INC_DIR = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/compiler/include &lt;br /&gt;
IFORT_MAN_DIR = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/man/en_US &lt;br /&gt;
IFORT_DOC_DIR = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/Documentation/en_US &lt;br /&gt;
LANGUAGE_TERRITORY = en_US &lt;br /&gt;
PATH = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/bin/intel64:$PATH&lt;br /&gt;
LD_LIBRARY_PATH = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187:$LD_LIBRARY_PATH/composer_xe_2015.3.187/compiler/lib/intel64 &lt;br /&gt;
LD_RUN_PATH = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/compiler/lib/intel64:$LD_RUN_PATH&lt;br /&gt;
MIC_LD_LIBRARY_PATH = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/mpirt/lib/mic:$MIC_LD_LIBRARY_PATH&lt;br /&gt;
MIC_LD_LIBRARY_PATH = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/compiler/lib/mic:$MIC_LD_LIBRARY_PATH &lt;br /&gt;
MIC_LIBRARY_PATH = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/mpirt/lib/mic:$MIC_LIBRARY_PATH&lt;br /&gt;
MIC_LIBRARY_PATH = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/compiler/lib/mic:$MIC_LIBRARY_PATH&lt;br /&gt;
LIBRARY_PATH = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/compiler/lib/intel64:$LIBRARY_PATH&lt;br /&gt;
MANPATH = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/man/en_US:$MANPATH&lt;br /&gt;
NLSPATH = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/compiler/lib/intel64/locale/%l_%t/%N:$NLSPATH&lt;br /&gt;
INTEL_PYTHONHOME = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/debugger/python/intel64:$INTEL_PYTHONHOME&lt;br /&gt;
PATH = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/debugger/gdb/intel64/bin:$PATH&lt;br /&gt;
LD_LIBRARY_PATH = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/debugger/libipt/intel64/lib:$LD_LIBRARY_PATH&lt;br /&gt;
MANPATH = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/debugger/gdb/intel64/share/man:$MANPATH&lt;br /&gt;
INFOPATH = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/debugger/gdb/intel64/share/info:$INFOPATH&lt;br /&gt;
NLSPATH = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/debugger/gdb/intel64/share/locale/%l_%t/%N:$NLSPATH&lt;br /&gt;
INTEL_LICENSE_FILE = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/licenses&lt;br /&gt;
CC = icc &lt;br /&gt;
CXX = icpc &lt;br /&gt;
F77 = ifort &lt;br /&gt;
FC = ifort &lt;br /&gt;
F90 = ifort &lt;br /&gt;
TEST_MODULE_SCRIPT = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/install-doc/test-compiler-intel.sh &lt;br /&gt;
TEST_MODULE_NAME = compiler/intel/15.0 &lt;br /&gt;
[...] &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Documentation =&lt;br /&gt;
== Online documentation ==&lt;br /&gt;
* [http://software.intel.com/en-us/articles/intel-c-composer-xe-documentation Intel® C-Compiler Documentation]&lt;br /&gt;
* [https://software.intel.com/en-us/intel-software-technical-documentation Intel® Software Documentation Library]&lt;br /&gt;
&lt;br /&gt;
== Local documentation == &lt;br /&gt;
For version specific documentation see the help page of the module. For example&lt;br /&gt;
&#039;&#039;&#039;&#039;module help compiler/intel&#039;&#039;&#039;&#039; will show the information for the default version.&lt;br /&gt;
&amp;lt;pre&amp;gt;$ module help compiler/intel&lt;br /&gt;
----------- Module Specific Help for &#039;compiler/intel/15.0&#039; --------&lt;br /&gt;
This module provides the Intel(R) compiler suite version 15.0.3 via&lt;br /&gt;
commands &#039;icc&#039;, &#039;icpc&#039; and &#039;ifort&#039; (version 15.0.3), the debugger &#039;gdb-ia&#039; (version&lt;br /&gt;
7.8.3) as well as the Intel(R) Threading Building Blocks TBB (version 4.3.5)&lt;br /&gt;
and the Integrated Performance Primitives IPP libraries (version 8.2.2)&lt;br /&gt;
(for details see also &#039;http://software.intel.com/en-us/intel-compilers/&#039;).&lt;br /&gt;
&lt;br /&gt;
The related Math Kernel Library MKL module is &#039;numlib/mkl/11.2.3&#039;.&lt;br /&gt;
The related Intel MPI module is &#039;mpi/impi/5.0.3-intel-15.0&#039;.&lt;br /&gt;
The Intel &#039;icpc&#039; should work well with GNU compiler version 4.4 to 4.8.&lt;br /&gt;
Before using TBB or IPP setup the corresponding environment, e.g. for 64bit+bash&lt;br /&gt;
  source $INTEL_HOME/tbb/bin/tbbvars.sh intel64&lt;br /&gt;
  source $INTEL_HOME/ipp/bin/ippvars.sh intel64&lt;br /&gt;
&lt;br /&gt;
Commands:&lt;br /&gt;
  icc           # Intel(R) C compiler&lt;br /&gt;
  icpc          # Intel(R) C++ compiler&lt;br /&gt;
  ifort         # Intel(R) Fortran compiler&lt;br /&gt;
  gdb-ia        # Intel version of GNU debugger&lt;br /&gt;
  # idb is not available anymore in Intel compiler suite 2015.&lt;br /&gt;
&lt;br /&gt;
Local documentation:&lt;br /&gt;
  Man pages: man icc; man icpc; man ifort; man gdb-ia&lt;br /&gt;
  firefox $INTEL_DOC_DIR/beginusing_lc.htm&lt;br /&gt;
  firefox $INTEL_DOC_DIR/beginusing_lf.htm&lt;br /&gt;
  The html-pages are very detailed and cover TBB and IPP as well as MKL.&lt;br /&gt;
&lt;br /&gt;
For some Intel(R) compiler option examples, hints on how to compile 32bit code&lt;br /&gt;
and solutions for less common problems see the tips and troubleshooting doc:&lt;br /&gt;
  $INTEL_DOC_DIR/intel-compiler-tips-and-troubleshooting.txt&lt;br /&gt;
&lt;br /&gt;
For details on library and include dirs please call&lt;br /&gt;
    module show compiler/intel/15.0&lt;br /&gt;
[...]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Manual Pages ==&lt;br /&gt;
For detailed lists of the different program options consult the particular man page&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ man icc&lt;br /&gt;
$ man icpc&lt;br /&gt;
$ man ifort&lt;br /&gt;
$ man idb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Debugger =&lt;br /&gt;
== GUI ==&lt;br /&gt;
The Intel Debugger is an Eclipse Rich Client Platform based GUI driven Debugger with exciting features for parallelism and threading.&lt;br /&gt;
* [https://software.intel.com/sites/default/files/04/0d/idb-linux-12.pdf Intel Debugger for Linux]&lt;br /&gt;
* [https://software.intel.com/en-us/search/gss/intel%20debugger%20gui More Infos...]&lt;br /&gt;
Start the GUI-debugger with the command &#039;&#039;&#039;&#039;idb [binary-file-name] &amp;amp;&#039;&#039;&#039;&#039;.&lt;br /&gt;
[[File:Intel_Debugger.jpg]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Console Mode ==&lt;br /&gt;
=== Intel Debugger ===&lt;br /&gt;
The console-mode Intel debugger will be started using the command &#039;&#039;&#039;&#039;idbc [binary-file]&#039;&#039;&#039;&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;idbc module_avail_grep&lt;br /&gt;
Intel(R) Debugger for applications running on Intel(R) 64, Version 13.0, Build [80.483.23]&lt;br /&gt;
------------------ &lt;br /&gt;
object file name: module_avail_grep &lt;br /&gt;
Reading symbols from /pfs/data2/home/kn/kn_kn/kn_pop235844/module_avail_grep...done.&lt;br /&gt;
(idb) help&lt;br /&gt;
List of classes of commands:&lt;br /&gt;
&lt;br /&gt;
    breakpoints -- Commands for manipulation with breakpoints.&lt;br /&gt;
    data        -- Examining data.&lt;br /&gt;
    extensions  -- Idb extension commands.&lt;br /&gt;
    files       -- Specifying and examing files.&lt;br /&gt;
    obscure     -- Obscure features.&lt;br /&gt;
    openmp      -- OpenMP support.&lt;br /&gt;
    parallel    -- MPI support.&lt;br /&gt;
    running     -- Running the program.&lt;br /&gt;
    stack       -- Examining the stack.&lt;br /&gt;
    status      -- Status inquiries.&lt;br /&gt;
    support     -- Support facilities.&lt;br /&gt;
&lt;br /&gt;
To display help on a particular command, enter &amp;quot;help&amp;quot; followed by the command&lt;br /&gt;
name. Command name abbreviations are allowed if unambiguous.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=== GNU for Intel Debugger ===&lt;br /&gt;
To debug applications natively on IA-32 or Intel64 Architecture systems, you may also use GDB with the following command: &#039;&#039;&#039;&#039;gdb-ia&#039;&#039;&#039;&#039;.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The actual debugger usage is the same as for the GNU Project Debugger. Extensions for IA-32/Intel 64Architecture are described in the [https://software.intel.com/en-us/get-started-with-debugger-extension-for-linux?language=de#documentation debugger documentation].&lt;br /&gt;
&amp;lt;pre&amp;gt;$ gdb-ia ./structure&lt;br /&gt;
[...]&lt;br /&gt;
GNU gdb (GDB) 7.5-1.0.81&lt;br /&gt;
Copyright (C) 2012 Free Software Foundation, Inc; (C) 2013-2014 Intel Corp.&lt;br /&gt;
License GPLv3+: GNU GPL version 3 or later &amp;lt;http://gnu.org/licenses/gpl.html&amp;gt;&lt;br /&gt;
This is free software: you are free to change and redistribute it.&lt;br /&gt;
There is NO WARRANTY, to the extent permitted by law.  Type &amp;quot;show copying&amp;quot;&lt;br /&gt;
and &amp;quot;show warranty&amp;quot; for details.&lt;br /&gt;
This GDB was configured as &amp;quot;x86_64-unknown-linux-gnu&amp;quot;.&lt;br /&gt;
For information about how to find Technical Support, Product Updates,              &lt;br /&gt;
User Forums, FAQs, tips and tricks, and other support information, please visit:&lt;br /&gt;
&amp;lt;http://www.intel.com/software/products/support/&amp;gt;...&lt;br /&gt;
Reading symbols from /pfs/data1/software_uc1/bwhpc/common/bio/structure/2.3.4/console/structure...done.&lt;br /&gt;
[...]&lt;br /&gt;
(gdb)&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[GDB|More GDB-Infos here...]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
= Optimizations = &lt;br /&gt;
You can turn on various optimization options to enhance the performance of your program. Which options are the best depends on the specific program and can be determined by benchmarking your code. A command which gives good performance and a decent file size is&lt;br /&gt;
&#039;&#039;&#039;icc -xHost -O2 ex.c&#039;&#039;&#039;.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
There are more aggressive optimization flags and levels (e.g. -O3 or -fast and implied options) but the compiled programs can get quite large due to inlining. Additionally the compilation process will probably take longer. Moreover it may happen that the compiled program is even slower -- or may require installation of additional statically-linked libraries. Such a command would be for example:&lt;br /&gt;
&#039;&#039;&#039;icc -fast ex.c&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
= Profiling =&lt;br /&gt;
Profiling an application means augmenting the compiled binary with information on execution counts per source-line (and basic blocks) -- e.g. one may see how many times an if-statement has been evaluated to true. To do so, compile your code with the profile flag:&lt;br /&gt;
&#039;&#039;&#039;icc -p ex.c -o ex&#039;&#039;&#039;.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Using the gprof tool, one may manually inspect execution count of each executed line of source code.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
For compiler optimization, recompile Your source using &lt;br /&gt;
&#039;&#039;&#039;icc -prof-gen ex.c -o ex&#039;&#039;&#039;&lt;br /&gt;
then execute the most co]]mmon and typical use-case of your application, and then recompile using the generated profile count (and using optimization):&lt;br /&gt;
&#039;&#039;&#039;icc -prof-use -O2 ex.c -o ex&#039;&#039;&#039;.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Further literature ==&lt;br /&gt;
A tutorial on optimization can be found at [https://software.intel.com/sites/default/files/managed/c1/61/compiler-essentials.1.pdf Compiler-Essentials.pdf]&lt;br /&gt;
and to get the different optimization options execute&lt;br /&gt;
&#039;&#039;&#039;icc -help opt&#039;&#039;&#039;&lt;br /&gt;
&#039;&#039;&#039;icc -help advanced&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
or the previously described catch-all option &#039;&#039;&#039;&#039;&#039;-v --help&#039;&#039;&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[Category:Compiler_software]][[Category:bwUniCluster]][[Category:bwForCluster_Chemistry]][[Category:BwForCluster_BinAC]][[Category:bwForCluster_MLS&amp;amp;WISO_Production]]&lt;/div&gt;</summary>
		<author><name>R Rutka</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=Development/Intel_Compiler&amp;diff=4529</id>
		<title>Development/Intel Compiler</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=Development/Intel_Compiler&amp;diff=4529"/>
		<updated>2016-11-03T16:44:18Z</updated>

		<summary type="html">&lt;p&gt;R Rutka: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=600px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Description !! Content&lt;br /&gt;
|-&lt;br /&gt;
| module load&lt;br /&gt;
| compiler/intel&lt;br /&gt;
|-&lt;br /&gt;
| License&lt;br /&gt;
| Commercial. See $INTEL_HOME/install-doc/EULA.txt. &amp;amp;#124; [https://software.intel.com/en-us/faq/licensing Intel Product Licensig FAQ]&lt;br /&gt;
|-&lt;br /&gt;
|Citing&lt;br /&gt;
| n/a&lt;br /&gt;
|-&lt;br /&gt;
| Links&lt;br /&gt;
| [https://software.intel.com/en-us/c-compilers Intel C-Compiler Homepage]&lt;br /&gt;
|-&lt;br /&gt;
| Graphical Interface&lt;br /&gt;
| [[#Debugger|Yes (Intel Debugger GUI-Verison)]]&lt;br /&gt;
|-&lt;br /&gt;
| Included modules&lt;br /&gt;
|  icc &amp;amp;#124; icpc &amp;amp;#124; ifort &amp;amp;#124; idb&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
= Introduction =&lt;br /&gt;
The &#039;&#039;&#039;Intel Compiler&#039;&#039;&#039; of the &#039;&#039;&#039;Intel Composer XE Suite&#039;&#039;&#039; consists of tools to compile and debug C, C++ and Fortran programs:&lt;br /&gt;
{| width=400px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;padding:3px&amp;quot;| icc&lt;br /&gt;
|style=&amp;quot;padding:3px&amp;quot;| Intel  C compiler&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;padding:3px&amp;quot;| icpc&lt;br /&gt;
|style=&amp;quot;padding:3px&amp;quot;| Intel C++ compiler&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;padding:3px&amp;quot;| ifort&lt;br /&gt;
|style=&amp;quot;padding:3px&amp;quot;| [https://software.intel.com/en-us/fortran-compilers Intel Fortran compiler]&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;padding:3px&amp;quot;| [[#GUI|idb]]&lt;br /&gt;
|style=&amp;quot;padding:3px&amp;quot;| Intel debugger in GUI mode&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;padding:3px&amp;quot;| [[#Console Mode|idbc]]&lt;br /&gt;
|style=&amp;quot;padding:3px&amp;quot;| Intel debugger in console mode&lt;br /&gt;
|}&lt;br /&gt;
Aside from that the suite also includes the TBB (Threading Building Blocks) and IPP (Integrated Performance Primitives) libraries.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
More information about the MPI versions of the Intel Compiler is available here:&lt;br /&gt;
* [[BwHPC_BPG_for_Parallel_Programming|Best Practices Guide for Parallel Programming]].&lt;br /&gt;
&lt;br /&gt;
= Versions and Availability =&lt;br /&gt;
A list of versions currently available on all bwHPC-C5-Clusters can be obtained from the&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://cis-hpc.uni-konstanz.de/prod.cis/ Cluster Information System CIS]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/big&amp;gt;&lt;br /&gt;
{{#widget:Iframe&lt;br /&gt;
|url=https://cis-hpc.uni-konstanz.de/prod.cis/bwUniCluster/compiler/intel&lt;br /&gt;
|width=99%&lt;br /&gt;
|height=700&lt;br /&gt;
}}&lt;br /&gt;
On the command line interface of any bwHPC cluster you&#039;ll get a list of available versions &lt;br /&gt;
by using the command &#039;module avail compiler/intel&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ : bwUniCluster&lt;br /&gt;
$ module avail compiler/intel&lt;br /&gt;
---------------------- /opt/bwhpc/common/modulefiles -----------------------&lt;br /&gt;
compiler/intel/12.1          compiler/intel/14.0&lt;br /&gt;
compiler/intel/13.1          compiler/intel/15.0(default)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Loading the module ==&lt;br /&gt;
=== Default Version ===&lt;br /&gt;
You can load the default version of the Intel Compiler with the command&lt;br /&gt;
&#039;&#039;&#039;&#039;module load compiler/intel&#039;&#039;&#039;&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module avail compiler/intel&lt;br /&gt;
---------------------- /opt/bwhpc/common/modulefiles -----------------------&lt;br /&gt;
compiler/intel/12.1          compiler/intel/14.0&lt;br /&gt;
compiler/intel/13.1          compiler/intel/15.0(default)&lt;br /&gt;
$ module load compiler/intel&lt;br /&gt;
$ module list&lt;br /&gt;
Currently Loaded Modulefiles:&lt;br /&gt;
  1) compiler/intel/15.0(default)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here, we got the &amp;quot;default&amp;quot; version 15.0 (example).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The module will try to load modules it needs to function. &lt;br /&gt;
If loading the module fails, check if you have already loaded the module &lt;br /&gt;
with &#039;module list&#039;.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Specific (newer or older) Version ===&lt;br /&gt;
If you wish to load a specific (older or newer) version (if available), you can do so using e.g. &lt;br /&gt;
&#039;&#039;&#039;&#039;module load compiler/intel&#039;&#039;&#039;/version&#039; to load the version you desires.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module avail compiler/intel&lt;br /&gt;
---------------------- /opt/bwhpc/common/modulefiles -----------------------&lt;br /&gt;
compiler/intel/12.1          compiler/intel/14.0&lt;br /&gt;
compiler/intel/13.1          compiler/intel/15.0(default)&lt;br /&gt;
$ module load compiler/intel/14.0&lt;br /&gt;
$ module list&lt;br /&gt;
Currently Loaded Modulefiles:&lt;br /&gt;
  1) compiler/intel/14.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Intel C-Compiler &amp;quot;version 14.0&amp;quot; is loaded now (example).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Intel C-Compiler-Specific Environments =&lt;br /&gt;
To see a list of all Intel C-Compiler environments set by the &#039;module load&#039;-command use the command &#039;&#039;&#039;module show compiler/intel&#039;&#039;&#039;.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Example (excerpt, default version)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module show compiler/intel  # output is revised&lt;br /&gt;
-------------------------------------------------------------------&lt;br /&gt;
/opt/bwhpc/common/modulefiles/compiler/intel/15.0:&lt;br /&gt;
[...]&lt;br /&gt;
INTEL_VERSION = 15.0.3 &lt;br /&gt;
INTEL_HOME = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187 &lt;br /&gt;
INTEL_BIN_DIR = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/bin/intel64 &lt;br /&gt;
INTEL_LIB_DIR = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/compiler/lib/intel64 &lt;br /&gt;
INTEL_LIB_MIC = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/compiler/lib/mic &lt;br /&gt;
INTEL_LIB_MICMPI = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/mpirt/lib/mic &lt;br /&gt;
INTEL_INC_DIR = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/compiler/include &lt;br /&gt;
INTEL_MAN_DIR = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/man/en_US &lt;br /&gt;
INTEL_DOC_DIR = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/Documentation/en_US &lt;br /&gt;
GDB_VERSION = 15.0.3 &lt;br /&gt;
GDB_HOME = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/debugger/gdb/intel64 &lt;br /&gt;
GDB_BIN_DIR = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/debugger/gdb/intel64/bin &lt;br /&gt;
GDB_LIB_DIR = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/debugger/libipt/intel64/lib &lt;br /&gt;
GDB_INC_DIR = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/debugger/gdb/intel64/include &lt;br /&gt;
GDB_INF_DIR = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/debugger/gdb/intel64/share/info &lt;br /&gt;
GDB_MAN_DIR = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/debugger/gdb/intel64/share/man &lt;br /&gt;
ICC_VERSION = 15.0.3 &lt;br /&gt;
ICC_HOME = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187 &lt;br /&gt;
ICC_BIN_DIR = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/bin/intel64 &lt;br /&gt;
ICC_LIB_DIR = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/compiler/lib/intel64 &lt;br /&gt;
ICC_INC_DIR = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/compiler/include &lt;br /&gt;
ICC_MAN_DIR = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/man/en_US &lt;br /&gt;
ICC_DOC_DIR = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/Documentation/en_US &lt;br /&gt;
IFORT_VERSION = 15.0.3 &lt;br /&gt;
IFORT_HOME = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187 &lt;br /&gt;
IFORT_BIN_DIR = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/bin/intel64 &lt;br /&gt;
IFORT_LIB_DIR = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/compiler/lib/intel64 &lt;br /&gt;
IFORT_INC_DIR = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/compiler/include &lt;br /&gt;
IFORT_MAN_DIR = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/man/en_US &lt;br /&gt;
IFORT_DOC_DIR = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/Documentation/en_US &lt;br /&gt;
LANGUAGE_TERRITORY = en_US &lt;br /&gt;
PATH = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/bin/intel64:$PATH&lt;br /&gt;
LD_LIBRARY_PATH = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187:$LD_LIBRARY_PATH/composer_xe_2015.3.187/compiler/lib/intel64 &lt;br /&gt;
LD_RUN_PATH = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/compiler/lib/intel64:$LD_RUN_PATH&lt;br /&gt;
MIC_LD_LIBRARY_PATH = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/mpirt/lib/mic:$MIC_LD_LIBRARY_PATH&lt;br /&gt;
MIC_LD_LIBRARY_PATH = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/compiler/lib/mic:$MIC_LD_LIBRARY_PATH &lt;br /&gt;
MIC_LIBRARY_PATH = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/mpirt/lib/mic:$MIC_LIBRARY_PATH&lt;br /&gt;
MIC_LIBRARY_PATH = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/compiler/lib/mic:$MIC_LIBRARY_PATH&lt;br /&gt;
LIBRARY_PATH = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/compiler/lib/intel64:$LIBRARY_PATH&lt;br /&gt;
MANPATH = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/man/en_US:$MANPATH&lt;br /&gt;
NLSPATH = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/compiler/lib/intel64/locale/%l_%t/%N:$NLSPATH&lt;br /&gt;
INTEL_PYTHONHOME = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/debugger/python/intel64:$INTEL_PYTHONHOME&lt;br /&gt;
PATH = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/debugger/gdb/intel64/bin:$PATH&lt;br /&gt;
LD_LIBRARY_PATH = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/debugger/libipt/intel64/lib:$LD_LIBRARY_PATH&lt;br /&gt;
MANPATH = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/debugger/gdb/intel64/share/man:$MANPATH&lt;br /&gt;
INFOPATH = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/debugger/gdb/intel64/share/info:$INFOPATH&lt;br /&gt;
NLSPATH = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/debugger/gdb/intel64/share/locale/%l_%t/%N:$NLSPATH&lt;br /&gt;
INTEL_LICENSE_FILE = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/composer_xe_2015.3.187/licenses&lt;br /&gt;
CC = icc &lt;br /&gt;
CXX = icpc &lt;br /&gt;
F77 = ifort &lt;br /&gt;
FC = ifort &lt;br /&gt;
F90 = ifort &lt;br /&gt;
TEST_MODULE_SCRIPT = /opt/bwhpc/common/compiler/intel/compxe.2015.3.187/install-doc/test-compiler-intel.sh &lt;br /&gt;
TEST_MODULE_NAME = compiler/intel/15.0 &lt;br /&gt;
[...] &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Documentation =&lt;br /&gt;
== Online documentation ==&lt;br /&gt;
* [http://software.intel.com/en-us/articles/intel-c-composer-xe-documentation Intel® C-Compiler Documentation]&lt;br /&gt;
* [https://software.intel.com/en-us/intel-software-technical-documentation Intel® Software Documentation Library]&lt;br /&gt;
&lt;br /&gt;
== Local documentation == &lt;br /&gt;
For version specific documentation see the help page of the module. For example&lt;br /&gt;
&#039;&#039;&#039;&#039;module help compiler/intel&#039;&#039;&#039;&#039; will show the information for the default version.&lt;br /&gt;
&amp;lt;pre&amp;gt;$ module help compiler/intel&lt;br /&gt;
----------- Module Specific Help for &#039;compiler/intel/15.0&#039; --------&lt;br /&gt;
This module provides the Intel(R) compiler suite version 15.0.3 via&lt;br /&gt;
commands &#039;icc&#039;, &#039;icpc&#039; and &#039;ifort&#039; (version 15.0.3), the debugger &#039;gdb-ia&#039; (version&lt;br /&gt;
7.8.3) as well as the Intel(R) Threading Building Blocks TBB (version 4.3.5)&lt;br /&gt;
and the Integrated Performance Primitives IPP libraries (version 8.2.2)&lt;br /&gt;
(for details see also &#039;http://software.intel.com/en-us/intel-compilers/&#039;).&lt;br /&gt;
&lt;br /&gt;
The related Math Kernel Library MKL module is &#039;numlib/mkl/11.2.3&#039;.&lt;br /&gt;
The related Intel MPI module is &#039;mpi/impi/5.0.3-intel-15.0&#039;.&lt;br /&gt;
The Intel &#039;icpc&#039; should work well with GNU compiler version 4.4 to 4.8.&lt;br /&gt;
Before using TBB or IPP setup the corresponding environment, e.g. for 64bit+bash&lt;br /&gt;
  source $INTEL_HOME/tbb/bin/tbbvars.sh intel64&lt;br /&gt;
  source $INTEL_HOME/ipp/bin/ippvars.sh intel64&lt;br /&gt;
&lt;br /&gt;
Commands:&lt;br /&gt;
  icc           # Intel(R) C compiler&lt;br /&gt;
  icpc          # Intel(R) C++ compiler&lt;br /&gt;
  ifort         # Intel(R) Fortran compiler&lt;br /&gt;
  gdb-ia        # Intel version of GNU debugger&lt;br /&gt;
  # idb is not available anymore in Intel compiler suite 2015.&lt;br /&gt;
&lt;br /&gt;
Local documentation:&lt;br /&gt;
  Man pages: man icc; man icpc; man ifort; man gdb-ia&lt;br /&gt;
  firefox $INTEL_DOC_DIR/beginusing_lc.htm&lt;br /&gt;
  firefox $INTEL_DOC_DIR/beginusing_lf.htm&lt;br /&gt;
  The html-pages are very detailed and cover TBB and IPP as well as MKL.&lt;br /&gt;
&lt;br /&gt;
For some Intel(R) compiler option examples, hints on how to compile 32bit code&lt;br /&gt;
and solutions for less common problems see the tips and troubleshooting doc:&lt;br /&gt;
  $INTEL_DOC_DIR/intel-compiler-tips-and-troubleshooting.txt&lt;br /&gt;
&lt;br /&gt;
For details on library and include dirs please call&lt;br /&gt;
    module show compiler/intel/15.0&lt;br /&gt;
[...]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Manual Pages ==&lt;br /&gt;
For detailed lists of the different program options consult the particular man page&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ man icc&lt;br /&gt;
$ man icpc&lt;br /&gt;
$ man ifort&lt;br /&gt;
$ man idb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Debugger =&lt;br /&gt;
== GUI ==&lt;br /&gt;
The Intel Debugger is an Eclipse Rich Client Platform based GUI driven Debugger with exciting features for parallelism and threading.&lt;br /&gt;
* [https://software.intel.com/sites/default/files/04/0d/idb-linux-12.pdf Intel Debugger for Linux]&lt;br /&gt;
* [https://software.intel.com/en-us/search/gss/intel%20debugger%20gui More Infos...]&lt;br /&gt;
Start the GUI-debugger with the command &#039;&#039;&#039;&#039;idb [binary-file-name] &amp;amp;&#039;&#039;&#039;&#039;.&lt;br /&gt;
[[File:Intel_Debugger.jpg]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Console Mode ==&lt;br /&gt;
=== Intel Debugger ===&lt;br /&gt;
The console-mode Intel debugger will be started using the command &#039;&#039;&#039;&#039;idbc [binary-file]&#039;&#039;&#039;&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;idbc module_avail_grep&lt;br /&gt;
Intel(R) Debugger for applications running on Intel(R) 64, Version 13.0, Build [80.483.23]&lt;br /&gt;
------------------ &lt;br /&gt;
object file name: module_avail_grep &lt;br /&gt;
Reading symbols from /pfs/data2/home/kn/kn_kn/kn_pop235844/module_avail_grep...done.&lt;br /&gt;
(idb) help&lt;br /&gt;
List of classes of commands:&lt;br /&gt;
&lt;br /&gt;
    breakpoints -- Commands for manipulation with breakpoints.&lt;br /&gt;
    data        -- Examining data.&lt;br /&gt;
    extensions  -- Idb extension commands.&lt;br /&gt;
    files       -- Specifying and examing files.&lt;br /&gt;
    obscure     -- Obscure features.&lt;br /&gt;
    openmp      -- OpenMP support.&lt;br /&gt;
    parallel    -- MPI support.&lt;br /&gt;
    running     -- Running the program.&lt;br /&gt;
    stack       -- Examining the stack.&lt;br /&gt;
    status      -- Status inquiries.&lt;br /&gt;
    support     -- Support facilities.&lt;br /&gt;
&lt;br /&gt;
To display help on a particular command, enter &amp;quot;help&amp;quot; followed by the command&lt;br /&gt;
name. Command name abbreviations are allowed if unambiguous.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=== GNU for Intel Debugger ===&lt;br /&gt;
To debug applications natively on IA-32 or Intel64 Architecture systems, you may also use GDB with the following command: &#039;&#039;&#039;&#039;gdb-ia&#039;&#039;&#039;&#039;.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The actual debugger usage is the same as for the GNU Project Debugger. Extensions for IA-32/Intel 64Architecture are described in the [https://software.intel.com/en-us/get-started-with-debugger-extension-for-linux?language=de#documentation debugger documentation].&lt;br /&gt;
&amp;lt;pre&amp;gt;$ gdb-ia ./structure&lt;br /&gt;
[...]&lt;br /&gt;
GNU gdb (GDB) 7.5-1.0.81&lt;br /&gt;
Copyright (C) 2012 Free Software Foundation, Inc; (C) 2013-2014 Intel Corp.&lt;br /&gt;
License GPLv3+: GNU GPL version 3 or later &amp;lt;http://gnu.org/licenses/gpl.html&amp;gt;&lt;br /&gt;
This is free software: you are free to change and redistribute it.&lt;br /&gt;
There is NO WARRANTY, to the extent permitted by law.  Type &amp;quot;show copying&amp;quot;&lt;br /&gt;
and &amp;quot;show warranty&amp;quot; for details.&lt;br /&gt;
This GDB was configured as &amp;quot;x86_64-unknown-linux-gnu&amp;quot;.&lt;br /&gt;
For information about how to find Technical Support, Product Updates,              &lt;br /&gt;
User Forums, FAQs, tips and tricks, and other support information, please visit:&lt;br /&gt;
&amp;lt;http://www.intel.com/software/products/support/&amp;gt;...&lt;br /&gt;
Reading symbols from /pfs/data1/software_uc1/bwhpc/common/bio/structure/2.3.4/console/structure...done.&lt;br /&gt;
[...]&lt;br /&gt;
(gdb)&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[GDB|More GDB-Infos here...]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
= Optimizations = &lt;br /&gt;
You can turn on various optimization options to enhance the performance of your program. Which options are the best depends on the specific program and can be determined by benchmarking your code. A command which gives good performance and a decent file size is&lt;br /&gt;
&#039;&#039;&#039;icc -xHost -O2 ex.c&#039;&#039;&#039;.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
There are more aggressive optimization flags and levels (e.g. -O3 or -fast and implied options) but the compiled programs can get quite large due to inlining. Additionally the compilation process will probably take longer. Moreover it may happen that the compiled program is even slower -- or may require installation of additional statically-linked libraries. Such a command would be for example:&lt;br /&gt;
&#039;&#039;&#039;icc -fast ex.c&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
= Profiling =&lt;br /&gt;
Profiling an application means augmenting the compiled binary with information on execution counts per source-line (and basic blocks) -- e.g. one may see how many times an if-statement has been evaluated to true. To do so, compile your code with the profile flag:&lt;br /&gt;
&#039;&#039;&#039;icc -p ex.c -o ex&#039;&#039;&#039;.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Using the gprof tool, one may manually inspect execution count of each executed line of source code.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
For compiler optimization, recompile Your source using &lt;br /&gt;
&#039;&#039;&#039;icc -prof-gen ex.c -o ex&#039;&#039;&#039;&lt;br /&gt;
then execute the most co]]mmon and typical use-case of your application, and then recompile using the generated profile count (and using optimization):&lt;br /&gt;
&#039;&#039;&#039;icc -prof-use -O2 ex.c -o ex&#039;&#039;&#039;.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Further literature ==&lt;br /&gt;
A tutorial on optimization can be found at [https://software.intel.com/sites/default/files/managed/c1/61/compiler-essentials.1.pdf Compiler-Essentials.pdf]&lt;br /&gt;
and to get the different optimization options execute&lt;br /&gt;
&#039;&#039;&#039;icc -help opt&#039;&#039;&#039;&lt;br /&gt;
&#039;&#039;&#039;icc -help advanced&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
or the previously described catch-all option &#039;&#039;&#039;&#039;&#039;-v --help&#039;&#039;&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[Category:Compiler_software]][[Category:bwUniCluster]][[Category:bwForCluster_Chemistry]][[Category:bwForCluster_MLS&amp;amp;WISO_Production]]&lt;/div&gt;</summary>
		<author><name>R Rutka</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=Development/General_compiler_usage&amp;diff=4528</id>
		<title>Development/General compiler usage</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=Development/General_compiler_usage&amp;diff=4528"/>
		<updated>2016-11-03T16:43:09Z</updated>

		<summary type="html">&lt;p&gt;R Rutka: /* Intel */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=600px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Description !! Content&lt;br /&gt;
|-&lt;br /&gt;
| module load&lt;br /&gt;
| compiler/gnu&amp;amp;#124;intel&amp;amp;#124;pgi&amp;amp;#124;...  &lt;br /&gt;
|-&lt;br /&gt;
| License&lt;br /&gt;
| [[Intel_Compiler|Intel]]: Commercial &amp;amp;#124; [[GCC|GNU]]: GPL &amp;amp;#124; PGI: Commercial&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
= Description = &lt;br /&gt;
The basic operations can be performed with the same commands for all available compilers. For advanced usage such as optimization and profiling you should consult the best practice guide of the compiler you intend to use ([[BwHPC_BPG_Compiler#GCC|GCC]], [[BwHPC_BPG_Compiler#Intel Suite|Intel Suite]]).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
More information about the MPI versions of the GNU and Intel Compilers is available here:&lt;br /&gt;
* [[BwHPC_BPG_for_Parallel_Programming|Best Practices Guide for Parallel Programming]].&lt;br /&gt;
&lt;br /&gt;
= Versions and Availability =&lt;br /&gt;
A list of versions currently available compilers on the bwHPC-C5-Clusters can be obtained from the&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;big&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[https://cis-hpc.uni-konstanz.de/prod.cis/ Cluster Information System CIS]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/big&amp;gt;&lt;br /&gt;
== GNU ==&lt;br /&gt;
{{#widget:Iframe&lt;br /&gt;
|url=https://cis-hpc.uni-konstanz.de/prod.cis/bwUniCluster/compiler/gnu&lt;br /&gt;
|width=99%&lt;br /&gt;
|height=750&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Intel ==&lt;br /&gt;
{{#widget:Iframe&lt;br /&gt;
|url=https://cis-hpc.uni-konstanz.de/prod.cis/bwUniCluster/compiler/intel&lt;br /&gt;
|width=99%&lt;br /&gt;
|height=700&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== PGI ==&lt;br /&gt;
{{#widget:Iframe&lt;br /&gt;
|url=https://cis-hpc.uni-konstanz.de/prod.cis/bwUniCluster/compiler/pgi&lt;br /&gt;
|width=99%&lt;br /&gt;
|height=400&lt;br /&gt;
}}&lt;br /&gt;
On the command line interface of any bwHPC cluster you&#039;ll get a list of available versions &lt;br /&gt;
by using the command &amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;&#039;module avail compiler&#039;&#039;&#039;&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ : bwUniCluster&lt;br /&gt;
$ module avail compiler&lt;br /&gt;
---------------------- /opt/bwhpc/common/modulefiles -----------------------&lt;br /&gt;
compiler/gnu/4.5             compiler/intel/12.1&lt;br /&gt;
compiler/gnu/4.7(default)    compiler/intel/13.1&lt;br /&gt;
compiler/gnu/4.8             compiler/intel/14.0&lt;br /&gt;
compiler/gnu/4.9             compiler/intel/15.0(default)&lt;br /&gt;
compiler/gnu/5.2&lt;br /&gt;
$ : bwForCluster (Justus)&lt;br /&gt;
$ module avail compiler&lt;br /&gt;
---------------------- /opt/bwhpc/common/modulefiles -----------------------&lt;br /&gt;
compiler/gnu/4.5             compiler/intel/15.0(default)&lt;br /&gt;
compiler/gnu/4.7(default)    compiler/pgi/12.10(default)&lt;br /&gt;
compiler/gnu/4.8             compiler/pgi/12.10_static&lt;br /&gt;
compiler/gnu/4.9             compiler/pgi/13.7&lt;br /&gt;
compiler/gnu/5.2             compiler/pgi/13.7_static&lt;br /&gt;
compiler/intel/12.1          compiler/pgi/14.10&lt;br /&gt;
compiler/intel/13.1          compiler/pgi/14.10_static&lt;br /&gt;
compiler/intel/14.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Loading the module =&lt;br /&gt;
== Default Version ==&lt;br /&gt;
You can load the default version of the a compiler with the command&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;module load compiler&#039;&#039;&#039;/&#039;&#039;&#039;name-of-the-compiler-suite&#039;&#039;&#039;.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;Example with Intel on bwUniCluster&amp;lt;/u&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module avail compiler/intel&lt;br /&gt;
---------------------- /opt/bwhpc/common/modulefiles -----------------------&lt;br /&gt;
compiler/intel/12.1          compiler/intel/14.0&lt;br /&gt;
compiler/intel/13.1          compiler/intel/15.0(default)&lt;br /&gt;
$ module load compiler/intel&lt;br /&gt;
$ module list&lt;br /&gt;
Currently Loaded Modulefiles:&lt;br /&gt;
  1) compiler/intel/15.0(default)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here, we got the &amp;quot;default&amp;quot; version 15.0 (example).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The module will try to load modules it needs to function. &lt;br /&gt;
If loading the module fails, check if you have already loaded the module with &#039;&#039;&#039;&#039;module list&#039;&#039;&#039;&#039;.&lt;br /&gt;
== Specific (newer or older) Version ==&lt;br /&gt;
If you wish to load a specific compiler version and release (if available), you can do so using&amp;lt;br&amp;gt; &lt;br /&gt;
&#039;&#039;&#039;module load compiler&#039;&#039;/&#039;&#039;name-of-the-compiler-suite&#039;&#039;/&#039;&#039;version-of-the-compiler-suite&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
to load the version you desires.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;Example with Intel compiler, version 14.0 on bwUniCluster&amp;lt;/u&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module avail compiler/intel&lt;br /&gt;
---------------------- /opt/bwhpc/common/modulefiles -----------------------&lt;br /&gt;
compiler/intel/12.1          compiler/intel/14.0&lt;br /&gt;
compiler/intel/13.1          compiler/intel/15.0(default)&lt;br /&gt;
$ module load compiler/intel/14.0&lt;br /&gt;
$ module list&lt;br /&gt;
Currently Loaded Modulefiles:&lt;br /&gt;
  1) compiler/intel/14.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Intel C-Compiler &amp;quot;version 14.0&amp;quot; is loaded now (example).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
All Intel, GCC and PGI have compilers for different languages which will be available &lt;br /&gt;
after the module is loaded.&lt;br /&gt;
== Linux  Original Compiler ==&lt;br /&gt;
The original Compiler installed on all compute nodes is GNU.&lt;br /&gt;
* Don&#039;t get distracted with the available compiler modules.&lt;br /&gt;
* Only the modules are loading the complete environments needed.  &lt;br /&gt;
&amp;lt;u&amp;gt;Example&amp;lt;/u&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module clear                     # unload all modules&lt;br /&gt;
Are you sure you want to clear all loaded modules!? [n] y&lt;br /&gt;
$ module list                      # control&lt;br /&gt;
No Modulefiles Currently Loaded.&lt;br /&gt;
$ gcc --version                    # see version of default Linux GNU compiler&lt;br /&gt;
gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-16)&lt;br /&gt;
[...]&lt;br /&gt;
$ module load compiler/gnu         # load default GNU compiler module&lt;br /&gt;
$ module list                      # control&lt;br /&gt;
Currently Loaded Modulefiles:&lt;br /&gt;
  1) compiler/gnu/4.7(default)&lt;br /&gt;
$ gcc --version                    # now, check the current (loaded) module&lt;br /&gt;
gcc (GCC) 4.7.3 &lt;br /&gt;
[...]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
= Synoptical Tables =&lt;br /&gt;
== Compilers (no MPI) == &lt;br /&gt;
{| width=600px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Compiler Suite&lt;br /&gt;
! Language&lt;br /&gt;
! Command&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;vertical-align:top;&amp;quot; rowspan=&amp;quot;3&amp;quot; | &amp;lt;font color=green&amp;gt;&amp;lt;big&amp;gt;Intel Composer&amp;lt;/big&amp;gt;&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt; [[Intel_Compiler|&amp;amp;bull;&amp;amp;nbsp;Best Practice Guides on Intel Compiler Software]] &lt;br /&gt;
| C&lt;br /&gt;
| icc&lt;br /&gt;
|-&lt;br /&gt;
| C++&lt;br /&gt;
| icpc&lt;br /&gt;
|-&lt;br /&gt;
| Fortran&lt;br /&gt;
| ifort&lt;br /&gt;
|- &lt;br /&gt;
| style=&amp;quot;vertical-align:top;&amp;quot; rowspan=&amp;quot;3&amp;quot; | &amp;lt;font color=green&amp;gt;&amp;lt;big&amp;gt;GCC&amp;lt;/big&amp;gt;&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt; [[GCC|&amp;amp;bull;&amp;amp;nbsp;Best Practice Guides on GNU Compiler Software]]&lt;br /&gt;
| C&lt;br /&gt;
| gcc&lt;br /&gt;
|-&lt;br /&gt;
| C++&lt;br /&gt;
| g++&lt;br /&gt;
|-&lt;br /&gt;
| Fortran&lt;br /&gt;
| gfortran&lt;br /&gt;
|- &lt;br /&gt;
| style=&amp;quot;vertical-align:top;&amp;quot; rowspan=&amp;quot;3&amp;quot; | &amp;lt;font color=green&amp;gt;&amp;lt;big&amp;gt;PGI&amp;lt;/big&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
| C&lt;br /&gt;
| pgcc&lt;br /&gt;
|-&lt;br /&gt;
| C++&lt;br /&gt;
| pgCC&lt;br /&gt;
|-&lt;br /&gt;
| Fortran 77/90&lt;br /&gt;
| pgf77 or pgf90&lt;br /&gt;
|}&lt;br /&gt;
== MPI compiler and Underlying Compilers ==&lt;br /&gt;
The following table lists available MPI compiler commands and the underlying compilers, compiler families, languages, and application binary interfaces (ABIs) that they support.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| width=600px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! MPI Compiler Command !! Default Compiler !! Supported Language(s) !! Supported ABI&#039;s&lt;br /&gt;
|-&lt;br /&gt;
| colspan=4 style=&amp;quot;background-color:#DCDCDC;&amp;quot; | Generic Compilers &lt;br /&gt;
|-&lt;br /&gt;
| mpicc || gcc, cc  || C || 32/64 bit &lt;br /&gt;
|-&lt;br /&gt;
| mpicxx || g++ || C/C++ || 32/64 bit &lt;br /&gt;
|-&lt;br /&gt;
| mpifc || gfortran || Fortran77/Fortran 95 || 32/64 bit&lt;br /&gt;
|-&lt;br /&gt;
| colspan=4 style=&amp;quot;background-color:#DCDCDC;&amp;quot; | [[GCC|GNU Compiler]] Versions 3 and higher &lt;br /&gt;
|-&lt;br /&gt;
| mpigcc || gcc || C || 32/64 bit &lt;br /&gt;
|-&lt;br /&gt;
| mpigxx || g++  || C/C++ || 32/64 bit &lt;br /&gt;
|-&lt;br /&gt;
| mpif77 || g77 || Fortran 77 || 32/64 bit &lt;br /&gt;
|-&lt;br /&gt;
| mpif90 || gfortran || Fortran 95 || 32/64 bit&lt;br /&gt;
|-&lt;br /&gt;
| colspan=4 style=&amp;quot;background-color:#DCDCDC;&amp;quot; | [[Intel_Compiler|Intel Fortran, C++ Compilers]] Versions 13.1 through 14.0 and Higher&lt;br /&gt;
|-&lt;br /&gt;
| mpiicc || icc || C || 32/64 bit &lt;br /&gt;
|-&lt;br /&gt;
| mpiicpc || icpc || C++ || 32/64 bit &lt;br /&gt;
|-&lt;br /&gt;
|impiifort  || ifort || Fortran77/Fortran 95 || 32/64 bit &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= How to use =&lt;br /&gt;
The following compiler commands work for all the compilers in the list above even though&lt;br /&gt;
the examples will be for &#039;&#039;&#039;icc&#039;&#039;&#039; only. &lt;br /&gt;
== Commands ==&lt;br /&gt;
When &#039;&#039;hello.c&#039;&#039; is a C source code file such as&lt;br /&gt;
&amp;lt;source lang=C style=&amp;quot;font: normal normal 2em monospace&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
int main() {&lt;br /&gt;
    printf(&amp;quot;Hello world\n&amp;quot;);&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
it can be compiled and linked with the single command&lt;br /&gt;
&amp;lt;pre&amp;gt;$ icc hello.c -o hello&amp;lt;/pre&amp;gt;&lt;br /&gt;
to produce an executable named &#039;&#039;hello&#039;&#039;.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
This process can be divided into two steps:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ icc -c hello.c&lt;br /&gt;
$ icc hello.o -o hello&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
When using libraries you must sometimes specify where the &lt;br /&gt;
* include files are (option &#039;&#039;&#039;-I&#039;&#039;&#039;) and where the &lt;br /&gt;
* library files are (option &#039;&#039;&#039;-L&#039;&#039;&#039;). &lt;br /&gt;
In addition you have to tell the compiler which &lt;br /&gt;
* library you want to use (option &#039;&#039;&#039;-l&#039;&#039;&#039;). &lt;br /&gt;
For example after loading the module numlib/fftw you can compile code for fftw using&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ icc -c hello.c -I$FFTW_INC_DIR&lt;br /&gt;
$ icc hello.o -o hello -L$FFTW_LIB_DIR -lfftw3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
When the program crashes or doesn&#039;t produce the expected output the compiler can &lt;br /&gt;
help you by printing warning messages:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ icc -Wall hello.c -o hello&amp;lt;/pre&amp;gt;&lt;br /&gt;
== Debugger ==&lt;br /&gt;
If the problem can&#039;t be solved this way you can inspect what exactly your program &lt;br /&gt;
does [[BwHPC_BPG_Debugger|using a debugger]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;font color=green&amp;gt;To use the debugger properly with your program you have to compile it with debug information (option -g)&amp;lt;/font&amp;gt;:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;Example&amp;lt;/u&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;$ icc -g hello.c -o hello&amp;lt;/pre&amp;gt;&lt;br /&gt;
Although -Wall should always be set, the -g option should only be stated when you want&lt;br /&gt;
to find bugs, since it may slow down execution and enlarges the binary due&lt;br /&gt;
to debugging symbols.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Optimization ==&lt;br /&gt;
The usual and common way to compile your source is to apply compiler optimization.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Since there are many optimization options, as a stzart for now the &amp;lt;font color=green&amp;gt;optimization level -O2&amp;lt;/font&amp;gt; is recommended:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ icc -O2 hello.c -o hello&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;font color=red&amp;gt;Beware:&amp;lt;/font&amp;gt;&amp;amp;nbsp;The optimization-flag used is a capital-O (like Otto) and not a 0 (Zero)!&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Both compilers offer a multitude of options (with regard to the above and others), &lt;br /&gt;
one may check the complete list of options with short explanation on [[GCC|GCC]] and &lt;br /&gt;
[[Intel_Compiler|Intel Suite]] using option &#039;&#039;&#039;-v&#039;&#039;&#039; &#039;&#039;&#039;--help&#039;&#039;&#039;:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ icc -v --help hello.c -o hello&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
= Makefile =&lt;br /&gt;
If you&#039;re working in a project that already uses make, there should be a file called Makefile in the top-level directory.&lt;br /&gt;
Running:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ make&amp;lt;/pre&amp;gt; &lt;br /&gt;
should build the project from source.&lt;br /&gt;
== What is make? ==&lt;br /&gt;
Make is a tool designed to manage dependencies in a build process.&lt;br /&gt;
== Simple Makefile for hello.c ==&lt;br /&gt;
For instance, if you have a source file called &#039;&#039;hello.c&#039;&#039; and you need to build  &lt;br /&gt;
the binary/executable &#039;&#039;hello&#039;&#039;, then you might have a Makefile in the same &lt;br /&gt;
directory that looks like this:&lt;br /&gt;
&amp;lt;source lang=make style=&amp;quot;font: normal normal 2em monospace&amp;quot;&amp;gt; &lt;br /&gt;
# define the C compiler to use&lt;br /&gt;
# you do not need this if you load the compiler module first&lt;br /&gt;
# # CC      = icc &lt;br /&gt;
&lt;br /&gt;
# define any compile-time flags&lt;br /&gt;
#    -g    # adds debugging information to the executable file&lt;br /&gt;
#    -O2   # optimization level 2&lt;br /&gt;
#    -Wall # turns on most, but not all, compiler warnings&lt;br /&gt;
CFLAGS  = -g -O2 -Wall&lt;br /&gt;
&lt;br /&gt;
# unix/linux removal command used for &#039;make clean&#039;&lt;br /&gt;
RM      = rm -f&lt;br /&gt;
&lt;br /&gt;
# the build target executable&lt;br /&gt;
# use a variable if you&#039;d like to rename the binary later&lt;br /&gt;
TARGET = hello&lt;br /&gt;
&lt;br /&gt;
# default action when make was invoked without options&lt;br /&gt;
default: all&lt;br /&gt;
&lt;br /&gt;
# starts section beginning with :hello  -&amp;gt; :hello = :$(TARGET)&lt;br /&gt;
all: $(TARGET)&lt;br /&gt;
&lt;br /&gt;
# main build section of this Makefile&lt;br /&gt;
# same as: hello: hello.c&lt;br /&gt;
#    $(CC) $(CFLAGS) -o hello hello.c&lt;br /&gt;
$(TARGET): $(TARGET).c&lt;br /&gt;
      $(CC) $(CFLAGS) -o $(TARGET) $(TARGET).c&lt;br /&gt;
&lt;br /&gt;
# clean all garbage with &#039;make clean&#039; oder &#039;make veryclean&#039;&lt;br /&gt;
clean veryclean:&lt;br /&gt;
      $(RM) $(TARGET) $(TARGET).o&lt;br /&gt;
&lt;br /&gt;
# run the programm with &#039;make run&#039;&lt;br /&gt;
run:&lt;br /&gt;
      ./$(TARGET)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
When ordered to build a file, make will ensure that all dependencies are up to date, and it will not rebuild any those which need not be rebuilt.&lt;br /&gt;
&lt;br /&gt;
== Load Compiler Environments ==&lt;br /&gt;
Another makefile &amp;lt;small&amp;gt;(using makedepend and more advanced make syntax)&amp;lt;/small&amp;gt;.&lt;br /&gt;
Here we use the GNU-C-Compiler.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$module load compiler/gnu&lt;br /&gt;
$ module list&lt;br /&gt;
Currently Loaded Modulefiles:&lt;br /&gt;
  1) compiler/gnu/4.7(default)&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
A list of all defined environments set by the &#039;module load&#039;-command can be&lt;br /&gt;
displayed by: &#039;module show compiler/gnu&#039; (e.g. GNU compiler).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module show compiler/gnu&lt;br /&gt;
-------------------------------------------------------------------&lt;br /&gt;
/opt/bwhpc/common/modulefiles/compiler/gnu/4.7:&lt;br /&gt;
[...]&lt;br /&gt;
setenv		 GNU_VERSION 4.7.3 &lt;br /&gt;
setenv		 GNU_HOME /opt/bwhpc/common/compiler/gnu/4.7.3/x86_64 &lt;br /&gt;
setenv		 GNU_BIN_DIR /opt/bwhpc/common/compiler/gnu/4.7.3/x86_64/bin &lt;br /&gt;
setenv		 GNU_MAN_DIR /opt/bwhpc/common/compiler/gnu/4.7.3/x86_64/share/man &lt;br /&gt;
setenv		 GNU_LIB_DIR /opt/bwhpc/common/compiler/gnu/4.7.3/x86_64/lib64 &lt;br /&gt;
prepend-path	 PATH /opt/bwhpc/common/compiler/gnu/4.7.3/x86_64/bin &lt;br /&gt;
prepend-path	 MANPATH /opt/bwhpc/common/compiler/gnu/4.7.3/x86_64/share/man &lt;br /&gt;
prepend-path	 LD_RUN_PATH /opt/bwhpc/common/compiler/gnu/4.7.3/x86_64/lib &lt;br /&gt;
prepend-path	 LD_LIBRARY_PATH /opt/bwhpc/common/compiler/gnu/4.7.3/x86_64/lib &lt;br /&gt;
prepend-path	 LD_RUN_PATH /opt/bwhpc/common/compiler/gnu/4.7.3/x86_64/lib64 &lt;br /&gt;
prepend-path	 LD_LIBRARY_PATH /opt/bwhpc/common/compiler/gnu/4.7.3/x86_64/lib64 &lt;br /&gt;
setenv		 CC gcc &lt;br /&gt;
setenv		 CXX g++ &lt;br /&gt;
setenv		 F77 gfortran &lt;br /&gt;
setenv		 FC gfortran &lt;br /&gt;
setenv		 F90 gfortran &lt;br /&gt;
[...]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
== Advaneced Makefile Examples ==&lt;br /&gt;
This envs may be used in your local Makefile.&lt;br /&gt;
&amp;lt;source lang=make style=&amp;quot;font: normal normal 2em monospace&amp;quot;&amp;gt; &lt;br /&gt;
#&lt;br /&gt;
# &#039;make depend&#039; uses makedepend to automatically generate dependencies &lt;br /&gt;
#               (dependencies are added to end of Makefile)&lt;br /&gt;
# &#039;make&#039;        build executable file &#039;mycc&#039;&lt;br /&gt;
# &#039;make clean&#039;  removes all .o and executable files&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
# define the C compiler to use. &lt;br /&gt;
# CC is set by the &#039;module load&#039;-command so it&#039;s unnecessary here.&lt;br /&gt;
# # CC = gcc&lt;br /&gt;
&lt;br /&gt;
# define any compile-time flags&lt;br /&gt;
CFLAGS = -Wall -g -O2&lt;br /&gt;
&lt;br /&gt;
# define any directories containing header files other than /usr/include&lt;br /&gt;
#&lt;br /&gt;
INCLUDES = -I/home/newhall/include &lt;br /&gt;
#  -I../include -I$(GNU_INC_DIR)  (example)&lt;br /&gt;
&lt;br /&gt;
# define library paths in addition to /usr/lib&lt;br /&gt;
#   if I wanted to include libraries not in /usr/lib I&#039;d specify&lt;br /&gt;
#   their path using -Lpath, something like:&lt;br /&gt;
LFLAGS = -L/home/newhall/lib  -L../lib&lt;br /&gt;
&lt;br /&gt;
# define any libraries to link into executable:&lt;br /&gt;
#   if I want to link in libraries (libx.so or libx.a) I use the -llibname &lt;br /&gt;
#   option, something like (this will link in libmylib.so and libm.so:&lt;br /&gt;
LIBS = -l$(GNU_LIB_DIR) -lmylib -lm &lt;br /&gt;
&lt;br /&gt;
# define the C source files (examples only)&lt;br /&gt;
SRCS = emitter.c error.c init.c lexer.c main.c symbol.c parser.c&lt;br /&gt;
&lt;br /&gt;
# define the C object files &lt;br /&gt;
#&lt;br /&gt;
# This uses Suffix Replacement within a macro:&lt;br /&gt;
#   $(name:string1=string2)&lt;br /&gt;
#         For each word in &#039;name&#039; replace &#039;string1&#039; with &#039;string2&#039;&lt;br /&gt;
# Below we are replacing the suffix .c of all words in the macro SRCS&lt;br /&gt;
# with the .o suffix&lt;br /&gt;
#&lt;br /&gt;
OBJS = $(SRCS:.c=.o)&lt;br /&gt;
&lt;br /&gt;
# define the executable file &lt;br /&gt;
MAIN = mycc&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# The following part of the makefile is generic; it can be used to &lt;br /&gt;
# build any executable just by changing the definitions above and by&lt;br /&gt;
# deleting dependencies appended to the file from &#039;make depend&#039;&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
.PHONY: depend clean&lt;br /&gt;
&lt;br /&gt;
all:    $(MAIN)&lt;br /&gt;
        @echo  Simple compiler named mycc has been compiled&lt;br /&gt;
&lt;br /&gt;
$(MAIN): $(OBJS) &lt;br /&gt;
        $(CC) $(CFLAGS) $(INCLUDES) -o $(MAIN) $(OBJS) $(LFLAGS) $(LIBS)&lt;br /&gt;
&lt;br /&gt;
# this is a suffix replacement rule for building .o&#039;s from .c&#039;s&lt;br /&gt;
# it uses automatic variables $&amp;lt;: the name of the prerequisite of&lt;br /&gt;
# the rule(a .c file) and $@: the name of the target of the rule (a .o file) &lt;br /&gt;
# (see the gnu make manual section about automatic variables)&lt;br /&gt;
.c.o:&lt;br /&gt;
        $(CC) $(CFLAGS) $(INCLUDES) -c $&amp;lt;  -o $@&lt;br /&gt;
&lt;br /&gt;
clean:&lt;br /&gt;
        $(RM) *.o *~ $(MAIN)&lt;br /&gt;
&lt;br /&gt;
depend: $(SRCS)&lt;br /&gt;
        makedepend $(INCLUDES) $^&lt;br /&gt;
&lt;br /&gt;
# DO NOT DELETE THIS LINE -- make depend needs it&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
This is an excerpt from the CIS makefile to show how you can do branchings in a makefile.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
We use the shell-command &#039;&#039;&#039;$(shell uname -s)&#039;&#039;&#039;  to determine the machine is a Linux.&lt;br /&gt;
&amp;lt;source lang=make style=&amp;quot;font: normal normal 2em monospace&amp;quot;&amp;gt; &lt;br /&gt;
[...]&lt;br /&gt;
#&lt;br /&gt;
# LINUX system&lt;br /&gt;
#&lt;br /&gt;
UNAME_S := $(shell uname -s)&lt;br /&gt;
ifeq ($(UNAME_S),Linux)&lt;br /&gt;
   LDFLAGS=-g -m32  -lm -lcrypt&lt;br /&gt;
   CFLAGS=-g -Wimplicit -Wunused -Wformat -Werror -Wreturn-type \&lt;br /&gt;
   -Wmissing-prototypes -m32 -funsigned-char -Wno-parentheses \&lt;br /&gt;
   -D_XOPEN_SOURCE -D_GNU_SOURCE -Wno-pointer-sign -Wno-unused-but-set-variable&lt;br /&gt;
endif&lt;br /&gt;
#&lt;br /&gt;
# MAC-OS&lt;br /&gt;
#&lt;br /&gt;
ifeq ($(UNAME_S),Darwin)&lt;br /&gt;
....... &lt;br /&gt;
[...]&lt;br /&gt;
OBJ=db/db.o db/app.o db/w3tool.o db/w3lib.o db/maildecode.o&lt;br /&gt;
ALL=.dependent db.c w3dbs cis svnout x tools&lt;br /&gt;
SRC=db.c app.c w3tool.c w3lib.c  cis.c x.c maildecode.c&lt;br /&gt;
&lt;br /&gt;
db/%.o: %.c&lt;br /&gt;
   @echo &amp;quot;compile $&amp;lt; ...&amp;quot;&lt;br /&gt;
   @$(CC) $(CFLAGS) -c $&amp;lt; -o $@&lt;br /&gt;
&lt;br /&gt;
[...]&lt;br /&gt;
&lt;br /&gt;
all: $(ALL)&lt;br /&gt;
clean:&lt;br /&gt;
   @echo &amp;quot;cleaning ...&amp;quot;&lt;br /&gt;
   @rm -rf *.o $(ALL) core tags db.h db.c html/model.html a.out gmon.out core.* x tools svnout w3lib.tgz *.dSYM *.gcno *.gcda *.gcov g* .dependent $(OBJ)&lt;br /&gt;
&lt;br /&gt;
cis: db/cis.o $(OBJ)&lt;br /&gt;
   @echo &amp;quot;building cis ...&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Makefile structure ==&lt;br /&gt;
Makefiles contain definitions and rules.&lt;br /&gt;
* A definition has the form:&amp;lt;br&amp;gt;&lt;br /&gt;
VAR=value&lt;br /&gt;
* A rule has the form: &amp;lt;br&amp;gt;&lt;br /&gt;
output files: input files&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;TAB&amp;gt;&amp;lt;TAB&amp;gt;commands to turn inputs to outputs&lt;br /&gt;
* All commands must be &amp;lt;font color=green&amp;gt;tab-indented&amp;lt;/font&amp;gt;.&lt;br /&gt;
* # are marking the beginning of a comment. Rest of the line will be ignored.&lt;br /&gt;
* To reference the variable VAR, surround it with &amp;lt;font color=green&amp;gt;$(VAR)&amp;lt;/font&amp;gt;. &lt;br /&gt;
* Try running &#039;&#039;&#039;&#039;man make&#039;&#039;&#039;&#039; for more details.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;TAB&amp;gt; = Tabulator&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[Category:Compiler_software]][[Category:bwUniCluster]][[Category:bwForCluster_Chemistry]][[Category:BwForCluster_BinAC]][[Category:bwForCluster_MLS&amp;amp;WISO_Production]]&lt;/div&gt;</summary>
		<author><name>R Rutka</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=Development/General_compiler_usage&amp;diff=4527</id>
		<title>Development/General compiler usage</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=Development/General_compiler_usage&amp;diff=4527"/>
		<updated>2016-11-03T16:42:52Z</updated>

		<summary type="html">&lt;p&gt;R Rutka: /* PGI */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=600px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Description !! Content&lt;br /&gt;
|-&lt;br /&gt;
| module load&lt;br /&gt;
| compiler/gnu&amp;amp;#124;intel&amp;amp;#124;pgi&amp;amp;#124;...  &lt;br /&gt;
|-&lt;br /&gt;
| License&lt;br /&gt;
| [[Intel_Compiler|Intel]]: Commercial &amp;amp;#124; [[GCC|GNU]]: GPL &amp;amp;#124; PGI: Commercial&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
= Description = &lt;br /&gt;
The basic operations can be performed with the same commands for all available compilers. For advanced usage such as optimization and profiling you should consult the best practice guide of the compiler you intend to use ([[BwHPC_BPG_Compiler#GCC|GCC]], [[BwHPC_BPG_Compiler#Intel Suite|Intel Suite]]).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
More information about the MPI versions of the GNU and Intel Compilers is available here:&lt;br /&gt;
* [[BwHPC_BPG_for_Parallel_Programming|Best Practices Guide for Parallel Programming]].&lt;br /&gt;
&lt;br /&gt;
= Versions and Availability =&lt;br /&gt;
A list of versions currently available compilers on the bwHPC-C5-Clusters can be obtained from the&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;big&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[https://cis-hpc.uni-konstanz.de/prod.cis/ Cluster Information System CIS]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/big&amp;gt;&lt;br /&gt;
== GNU ==&lt;br /&gt;
{{#widget:Iframe&lt;br /&gt;
|url=https://cis-hpc.uni-konstanz.de/prod.cis/bwUniCluster/compiler/gnu&lt;br /&gt;
|width=99%&lt;br /&gt;
|height=750&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Intel ==&lt;br /&gt;
{{#widget:Iframe&lt;br /&gt;
|url=https://cis-hpc.uni-konstanz.de/prod.cis/bwUniCluster/compiler/intel&lt;br /&gt;
|width=99%&lt;br /&gt;
|height=750&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== PGI ==&lt;br /&gt;
{{#widget:Iframe&lt;br /&gt;
|url=https://cis-hpc.uni-konstanz.de/prod.cis/bwUniCluster/compiler/pgi&lt;br /&gt;
|width=99%&lt;br /&gt;
|height=400&lt;br /&gt;
}}&lt;br /&gt;
On the command line interface of any bwHPC cluster you&#039;ll get a list of available versions &lt;br /&gt;
by using the command &amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;&#039;module avail compiler&#039;&#039;&#039;&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ : bwUniCluster&lt;br /&gt;
$ module avail compiler&lt;br /&gt;
---------------------- /opt/bwhpc/common/modulefiles -----------------------&lt;br /&gt;
compiler/gnu/4.5             compiler/intel/12.1&lt;br /&gt;
compiler/gnu/4.7(default)    compiler/intel/13.1&lt;br /&gt;
compiler/gnu/4.8             compiler/intel/14.0&lt;br /&gt;
compiler/gnu/4.9             compiler/intel/15.0(default)&lt;br /&gt;
compiler/gnu/5.2&lt;br /&gt;
$ : bwForCluster (Justus)&lt;br /&gt;
$ module avail compiler&lt;br /&gt;
---------------------- /opt/bwhpc/common/modulefiles -----------------------&lt;br /&gt;
compiler/gnu/4.5             compiler/intel/15.0(default)&lt;br /&gt;
compiler/gnu/4.7(default)    compiler/pgi/12.10(default)&lt;br /&gt;
compiler/gnu/4.8             compiler/pgi/12.10_static&lt;br /&gt;
compiler/gnu/4.9             compiler/pgi/13.7&lt;br /&gt;
compiler/gnu/5.2             compiler/pgi/13.7_static&lt;br /&gt;
compiler/intel/12.1          compiler/pgi/14.10&lt;br /&gt;
compiler/intel/13.1          compiler/pgi/14.10_static&lt;br /&gt;
compiler/intel/14.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Loading the module =&lt;br /&gt;
== Default Version ==&lt;br /&gt;
You can load the default version of the a compiler with the command&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;module load compiler&#039;&#039;&#039;/&#039;&#039;&#039;name-of-the-compiler-suite&#039;&#039;&#039;.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;Example with Intel on bwUniCluster&amp;lt;/u&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module avail compiler/intel&lt;br /&gt;
---------------------- /opt/bwhpc/common/modulefiles -----------------------&lt;br /&gt;
compiler/intel/12.1          compiler/intel/14.0&lt;br /&gt;
compiler/intel/13.1          compiler/intel/15.0(default)&lt;br /&gt;
$ module load compiler/intel&lt;br /&gt;
$ module list&lt;br /&gt;
Currently Loaded Modulefiles:&lt;br /&gt;
  1) compiler/intel/15.0(default)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here, we got the &amp;quot;default&amp;quot; version 15.0 (example).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The module will try to load modules it needs to function. &lt;br /&gt;
If loading the module fails, check if you have already loaded the module with &#039;&#039;&#039;&#039;module list&#039;&#039;&#039;&#039;.&lt;br /&gt;
== Specific (newer or older) Version ==&lt;br /&gt;
If you wish to load a specific compiler version and release (if available), you can do so using&amp;lt;br&amp;gt; &lt;br /&gt;
&#039;&#039;&#039;module load compiler&#039;&#039;/&#039;&#039;name-of-the-compiler-suite&#039;&#039;/&#039;&#039;version-of-the-compiler-suite&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
to load the version you desires.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;Example with Intel compiler, version 14.0 on bwUniCluster&amp;lt;/u&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module avail compiler/intel&lt;br /&gt;
---------------------- /opt/bwhpc/common/modulefiles -----------------------&lt;br /&gt;
compiler/intel/12.1          compiler/intel/14.0&lt;br /&gt;
compiler/intel/13.1          compiler/intel/15.0(default)&lt;br /&gt;
$ module load compiler/intel/14.0&lt;br /&gt;
$ module list&lt;br /&gt;
Currently Loaded Modulefiles:&lt;br /&gt;
  1) compiler/intel/14.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Intel C-Compiler &amp;quot;version 14.0&amp;quot; is loaded now (example).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
All Intel, GCC and PGI have compilers for different languages which will be available &lt;br /&gt;
after the module is loaded.&lt;br /&gt;
== Linux  Original Compiler ==&lt;br /&gt;
The original Compiler installed on all compute nodes is GNU.&lt;br /&gt;
* Don&#039;t get distracted with the available compiler modules.&lt;br /&gt;
* Only the modules are loading the complete environments needed.  &lt;br /&gt;
&amp;lt;u&amp;gt;Example&amp;lt;/u&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module clear                     # unload all modules&lt;br /&gt;
Are you sure you want to clear all loaded modules!? [n] y&lt;br /&gt;
$ module list                      # control&lt;br /&gt;
No Modulefiles Currently Loaded.&lt;br /&gt;
$ gcc --version                    # see version of default Linux GNU compiler&lt;br /&gt;
gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-16)&lt;br /&gt;
[...]&lt;br /&gt;
$ module load compiler/gnu         # load default GNU compiler module&lt;br /&gt;
$ module list                      # control&lt;br /&gt;
Currently Loaded Modulefiles:&lt;br /&gt;
  1) compiler/gnu/4.7(default)&lt;br /&gt;
$ gcc --version                    # now, check the current (loaded) module&lt;br /&gt;
gcc (GCC) 4.7.3 &lt;br /&gt;
[...]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
= Synoptical Tables =&lt;br /&gt;
== Compilers (no MPI) == &lt;br /&gt;
{| width=600px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Compiler Suite&lt;br /&gt;
! Language&lt;br /&gt;
! Command&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;vertical-align:top;&amp;quot; rowspan=&amp;quot;3&amp;quot; | &amp;lt;font color=green&amp;gt;&amp;lt;big&amp;gt;Intel Composer&amp;lt;/big&amp;gt;&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt; [[Intel_Compiler|&amp;amp;bull;&amp;amp;nbsp;Best Practice Guides on Intel Compiler Software]] &lt;br /&gt;
| C&lt;br /&gt;
| icc&lt;br /&gt;
|-&lt;br /&gt;
| C++&lt;br /&gt;
| icpc&lt;br /&gt;
|-&lt;br /&gt;
| Fortran&lt;br /&gt;
| ifort&lt;br /&gt;
|- &lt;br /&gt;
| style=&amp;quot;vertical-align:top;&amp;quot; rowspan=&amp;quot;3&amp;quot; | &amp;lt;font color=green&amp;gt;&amp;lt;big&amp;gt;GCC&amp;lt;/big&amp;gt;&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt; [[GCC|&amp;amp;bull;&amp;amp;nbsp;Best Practice Guides on GNU Compiler Software]]&lt;br /&gt;
| C&lt;br /&gt;
| gcc&lt;br /&gt;
|-&lt;br /&gt;
| C++&lt;br /&gt;
| g++&lt;br /&gt;
|-&lt;br /&gt;
| Fortran&lt;br /&gt;
| gfortran&lt;br /&gt;
|- &lt;br /&gt;
| style=&amp;quot;vertical-align:top;&amp;quot; rowspan=&amp;quot;3&amp;quot; | &amp;lt;font color=green&amp;gt;&amp;lt;big&amp;gt;PGI&amp;lt;/big&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
| C&lt;br /&gt;
| pgcc&lt;br /&gt;
|-&lt;br /&gt;
| C++&lt;br /&gt;
| pgCC&lt;br /&gt;
|-&lt;br /&gt;
| Fortran 77/90&lt;br /&gt;
| pgf77 or pgf90&lt;br /&gt;
|}&lt;br /&gt;
== MPI compiler and Underlying Compilers ==&lt;br /&gt;
The following table lists available MPI compiler commands and the underlying compilers, compiler families, languages, and application binary interfaces (ABIs) that they support.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| width=600px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! MPI Compiler Command !! Default Compiler !! Supported Language(s) !! Supported ABI&#039;s&lt;br /&gt;
|-&lt;br /&gt;
| colspan=4 style=&amp;quot;background-color:#DCDCDC;&amp;quot; | Generic Compilers &lt;br /&gt;
|-&lt;br /&gt;
| mpicc || gcc, cc  || C || 32/64 bit &lt;br /&gt;
|-&lt;br /&gt;
| mpicxx || g++ || C/C++ || 32/64 bit &lt;br /&gt;
|-&lt;br /&gt;
| mpifc || gfortran || Fortran77/Fortran 95 || 32/64 bit&lt;br /&gt;
|-&lt;br /&gt;
| colspan=4 style=&amp;quot;background-color:#DCDCDC;&amp;quot; | [[GCC|GNU Compiler]] Versions 3 and higher &lt;br /&gt;
|-&lt;br /&gt;
| mpigcc || gcc || C || 32/64 bit &lt;br /&gt;
|-&lt;br /&gt;
| mpigxx || g++  || C/C++ || 32/64 bit &lt;br /&gt;
|-&lt;br /&gt;
| mpif77 || g77 || Fortran 77 || 32/64 bit &lt;br /&gt;
|-&lt;br /&gt;
| mpif90 || gfortran || Fortran 95 || 32/64 bit&lt;br /&gt;
|-&lt;br /&gt;
| colspan=4 style=&amp;quot;background-color:#DCDCDC;&amp;quot; | [[Intel_Compiler|Intel Fortran, C++ Compilers]] Versions 13.1 through 14.0 and Higher&lt;br /&gt;
|-&lt;br /&gt;
| mpiicc || icc || C || 32/64 bit &lt;br /&gt;
|-&lt;br /&gt;
| mpiicpc || icpc || C++ || 32/64 bit &lt;br /&gt;
|-&lt;br /&gt;
|impiifort  || ifort || Fortran77/Fortran 95 || 32/64 bit &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= How to use =&lt;br /&gt;
The following compiler commands work for all the compilers in the list above even though&lt;br /&gt;
the examples will be for &#039;&#039;&#039;icc&#039;&#039;&#039; only. &lt;br /&gt;
== Commands ==&lt;br /&gt;
When &#039;&#039;hello.c&#039;&#039; is a C source code file such as&lt;br /&gt;
&amp;lt;source lang=C style=&amp;quot;font: normal normal 2em monospace&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
int main() {&lt;br /&gt;
    printf(&amp;quot;Hello world\n&amp;quot;);&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
it can be compiled and linked with the single command&lt;br /&gt;
&amp;lt;pre&amp;gt;$ icc hello.c -o hello&amp;lt;/pre&amp;gt;&lt;br /&gt;
to produce an executable named &#039;&#039;hello&#039;&#039;.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
This process can be divided into two steps:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ icc -c hello.c&lt;br /&gt;
$ icc hello.o -o hello&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
When using libraries you must sometimes specify where the &lt;br /&gt;
* include files are (option &#039;&#039;&#039;-I&#039;&#039;&#039;) and where the &lt;br /&gt;
* library files are (option &#039;&#039;&#039;-L&#039;&#039;&#039;). &lt;br /&gt;
In addition you have to tell the compiler which &lt;br /&gt;
* library you want to use (option &#039;&#039;&#039;-l&#039;&#039;&#039;). &lt;br /&gt;
For example after loading the module numlib/fftw you can compile code for fftw using&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ icc -c hello.c -I$FFTW_INC_DIR&lt;br /&gt;
$ icc hello.o -o hello -L$FFTW_LIB_DIR -lfftw3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
When the program crashes or doesn&#039;t produce the expected output the compiler can &lt;br /&gt;
help you by printing warning messages:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ icc -Wall hello.c -o hello&amp;lt;/pre&amp;gt;&lt;br /&gt;
== Debugger ==&lt;br /&gt;
If the problem can&#039;t be solved this way you can inspect what exactly your program &lt;br /&gt;
does [[BwHPC_BPG_Debugger|using a debugger]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;font color=green&amp;gt;To use the debugger properly with your program you have to compile it with debug information (option -g)&amp;lt;/font&amp;gt;:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;Example&amp;lt;/u&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;$ icc -g hello.c -o hello&amp;lt;/pre&amp;gt;&lt;br /&gt;
Although -Wall should always be set, the -g option should only be stated when you want&lt;br /&gt;
to find bugs, since it may slow down execution and enlarges the binary due&lt;br /&gt;
to debugging symbols.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Optimization ==&lt;br /&gt;
The usual and common way to compile your source is to apply compiler optimization.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Since there are many optimization options, as a stzart for now the &amp;lt;font color=green&amp;gt;optimization level -O2&amp;lt;/font&amp;gt; is recommended:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ icc -O2 hello.c -o hello&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;font color=red&amp;gt;Beware:&amp;lt;/font&amp;gt;&amp;amp;nbsp;The optimization-flag used is a capital-O (like Otto) and not a 0 (Zero)!&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Both compilers offer a multitude of options (with regard to the above and others), &lt;br /&gt;
one may check the complete list of options with short explanation on [[GCC|GCC]] and &lt;br /&gt;
[[Intel_Compiler|Intel Suite]] using option &#039;&#039;&#039;-v&#039;&#039;&#039; &#039;&#039;&#039;--help&#039;&#039;&#039;:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ icc -v --help hello.c -o hello&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
= Makefile =&lt;br /&gt;
If you&#039;re working in a project that already uses make, there should be a file called Makefile in the top-level directory.&lt;br /&gt;
Running:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ make&amp;lt;/pre&amp;gt; &lt;br /&gt;
should build the project from source.&lt;br /&gt;
== What is make? ==&lt;br /&gt;
Make is a tool designed to manage dependencies in a build process.&lt;br /&gt;
== Simple Makefile for hello.c ==&lt;br /&gt;
For instance, if you have a source file called &#039;&#039;hello.c&#039;&#039; and you need to build  &lt;br /&gt;
the binary/executable &#039;&#039;hello&#039;&#039;, then you might have a Makefile in the same &lt;br /&gt;
directory that looks like this:&lt;br /&gt;
&amp;lt;source lang=make style=&amp;quot;font: normal normal 2em monospace&amp;quot;&amp;gt; &lt;br /&gt;
# define the C compiler to use&lt;br /&gt;
# you do not need this if you load the compiler module first&lt;br /&gt;
# # CC      = icc &lt;br /&gt;
&lt;br /&gt;
# define any compile-time flags&lt;br /&gt;
#    -g    # adds debugging information to the executable file&lt;br /&gt;
#    -O2   # optimization level 2&lt;br /&gt;
#    -Wall # turns on most, but not all, compiler warnings&lt;br /&gt;
CFLAGS  = -g -O2 -Wall&lt;br /&gt;
&lt;br /&gt;
# unix/linux removal command used for &#039;make clean&#039;&lt;br /&gt;
RM      = rm -f&lt;br /&gt;
&lt;br /&gt;
# the build target executable&lt;br /&gt;
# use a variable if you&#039;d like to rename the binary later&lt;br /&gt;
TARGET = hello&lt;br /&gt;
&lt;br /&gt;
# default action when make was invoked without options&lt;br /&gt;
default: all&lt;br /&gt;
&lt;br /&gt;
# starts section beginning with :hello  -&amp;gt; :hello = :$(TARGET)&lt;br /&gt;
all: $(TARGET)&lt;br /&gt;
&lt;br /&gt;
# main build section of this Makefile&lt;br /&gt;
# same as: hello: hello.c&lt;br /&gt;
#    $(CC) $(CFLAGS) -o hello hello.c&lt;br /&gt;
$(TARGET): $(TARGET).c&lt;br /&gt;
      $(CC) $(CFLAGS) -o $(TARGET) $(TARGET).c&lt;br /&gt;
&lt;br /&gt;
# clean all garbage with &#039;make clean&#039; oder &#039;make veryclean&#039;&lt;br /&gt;
clean veryclean:&lt;br /&gt;
      $(RM) $(TARGET) $(TARGET).o&lt;br /&gt;
&lt;br /&gt;
# run the programm with &#039;make run&#039;&lt;br /&gt;
run:&lt;br /&gt;
      ./$(TARGET)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
When ordered to build a file, make will ensure that all dependencies are up to date, and it will not rebuild any those which need not be rebuilt.&lt;br /&gt;
&lt;br /&gt;
== Load Compiler Environments ==&lt;br /&gt;
Another makefile &amp;lt;small&amp;gt;(using makedepend and more advanced make syntax)&amp;lt;/small&amp;gt;.&lt;br /&gt;
Here we use the GNU-C-Compiler.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$module load compiler/gnu&lt;br /&gt;
$ module list&lt;br /&gt;
Currently Loaded Modulefiles:&lt;br /&gt;
  1) compiler/gnu/4.7(default)&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
A list of all defined environments set by the &#039;module load&#039;-command can be&lt;br /&gt;
displayed by: &#039;module show compiler/gnu&#039; (e.g. GNU compiler).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module show compiler/gnu&lt;br /&gt;
-------------------------------------------------------------------&lt;br /&gt;
/opt/bwhpc/common/modulefiles/compiler/gnu/4.7:&lt;br /&gt;
[...]&lt;br /&gt;
setenv		 GNU_VERSION 4.7.3 &lt;br /&gt;
setenv		 GNU_HOME /opt/bwhpc/common/compiler/gnu/4.7.3/x86_64 &lt;br /&gt;
setenv		 GNU_BIN_DIR /opt/bwhpc/common/compiler/gnu/4.7.3/x86_64/bin &lt;br /&gt;
setenv		 GNU_MAN_DIR /opt/bwhpc/common/compiler/gnu/4.7.3/x86_64/share/man &lt;br /&gt;
setenv		 GNU_LIB_DIR /opt/bwhpc/common/compiler/gnu/4.7.3/x86_64/lib64 &lt;br /&gt;
prepend-path	 PATH /opt/bwhpc/common/compiler/gnu/4.7.3/x86_64/bin &lt;br /&gt;
prepend-path	 MANPATH /opt/bwhpc/common/compiler/gnu/4.7.3/x86_64/share/man &lt;br /&gt;
prepend-path	 LD_RUN_PATH /opt/bwhpc/common/compiler/gnu/4.7.3/x86_64/lib &lt;br /&gt;
prepend-path	 LD_LIBRARY_PATH /opt/bwhpc/common/compiler/gnu/4.7.3/x86_64/lib &lt;br /&gt;
prepend-path	 LD_RUN_PATH /opt/bwhpc/common/compiler/gnu/4.7.3/x86_64/lib64 &lt;br /&gt;
prepend-path	 LD_LIBRARY_PATH /opt/bwhpc/common/compiler/gnu/4.7.3/x86_64/lib64 &lt;br /&gt;
setenv		 CC gcc &lt;br /&gt;
setenv		 CXX g++ &lt;br /&gt;
setenv		 F77 gfortran &lt;br /&gt;
setenv		 FC gfortran &lt;br /&gt;
setenv		 F90 gfortran &lt;br /&gt;
[...]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
== Advaneced Makefile Examples ==&lt;br /&gt;
This envs may be used in your local Makefile.&lt;br /&gt;
&amp;lt;source lang=make style=&amp;quot;font: normal normal 2em monospace&amp;quot;&amp;gt; &lt;br /&gt;
#&lt;br /&gt;
# &#039;make depend&#039; uses makedepend to automatically generate dependencies &lt;br /&gt;
#               (dependencies are added to end of Makefile)&lt;br /&gt;
# &#039;make&#039;        build executable file &#039;mycc&#039;&lt;br /&gt;
# &#039;make clean&#039;  removes all .o and executable files&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
# define the C compiler to use. &lt;br /&gt;
# CC is set by the &#039;module load&#039;-command so it&#039;s unnecessary here.&lt;br /&gt;
# # CC = gcc&lt;br /&gt;
&lt;br /&gt;
# define any compile-time flags&lt;br /&gt;
CFLAGS = -Wall -g -O2&lt;br /&gt;
&lt;br /&gt;
# define any directories containing header files other than /usr/include&lt;br /&gt;
#&lt;br /&gt;
INCLUDES = -I/home/newhall/include &lt;br /&gt;
#  -I../include -I$(GNU_INC_DIR)  (example)&lt;br /&gt;
&lt;br /&gt;
# define library paths in addition to /usr/lib&lt;br /&gt;
#   if I wanted to include libraries not in /usr/lib I&#039;d specify&lt;br /&gt;
#   their path using -Lpath, something like:&lt;br /&gt;
LFLAGS = -L/home/newhall/lib  -L../lib&lt;br /&gt;
&lt;br /&gt;
# define any libraries to link into executable:&lt;br /&gt;
#   if I want to link in libraries (libx.so or libx.a) I use the -llibname &lt;br /&gt;
#   option, something like (this will link in libmylib.so and libm.so:&lt;br /&gt;
LIBS = -l$(GNU_LIB_DIR) -lmylib -lm &lt;br /&gt;
&lt;br /&gt;
# define the C source files (examples only)&lt;br /&gt;
SRCS = emitter.c error.c init.c lexer.c main.c symbol.c parser.c&lt;br /&gt;
&lt;br /&gt;
# define the C object files &lt;br /&gt;
#&lt;br /&gt;
# This uses Suffix Replacement within a macro:&lt;br /&gt;
#   $(name:string1=string2)&lt;br /&gt;
#         For each word in &#039;name&#039; replace &#039;string1&#039; with &#039;string2&#039;&lt;br /&gt;
# Below we are replacing the suffix .c of all words in the macro SRCS&lt;br /&gt;
# with the .o suffix&lt;br /&gt;
#&lt;br /&gt;
OBJS = $(SRCS:.c=.o)&lt;br /&gt;
&lt;br /&gt;
# define the executable file &lt;br /&gt;
MAIN = mycc&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# The following part of the makefile is generic; it can be used to &lt;br /&gt;
# build any executable just by changing the definitions above and by&lt;br /&gt;
# deleting dependencies appended to the file from &#039;make depend&#039;&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
.PHONY: depend clean&lt;br /&gt;
&lt;br /&gt;
all:    $(MAIN)&lt;br /&gt;
        @echo  Simple compiler named mycc has been compiled&lt;br /&gt;
&lt;br /&gt;
$(MAIN): $(OBJS) &lt;br /&gt;
        $(CC) $(CFLAGS) $(INCLUDES) -o $(MAIN) $(OBJS) $(LFLAGS) $(LIBS)&lt;br /&gt;
&lt;br /&gt;
# this is a suffix replacement rule for building .o&#039;s from .c&#039;s&lt;br /&gt;
# it uses automatic variables $&amp;lt;: the name of the prerequisite of&lt;br /&gt;
# the rule(a .c file) and $@: the name of the target of the rule (a .o file) &lt;br /&gt;
# (see the gnu make manual section about automatic variables)&lt;br /&gt;
.c.o:&lt;br /&gt;
        $(CC) $(CFLAGS) $(INCLUDES) -c $&amp;lt;  -o $@&lt;br /&gt;
&lt;br /&gt;
clean:&lt;br /&gt;
        $(RM) *.o *~ $(MAIN)&lt;br /&gt;
&lt;br /&gt;
depend: $(SRCS)&lt;br /&gt;
        makedepend $(INCLUDES) $^&lt;br /&gt;
&lt;br /&gt;
# DO NOT DELETE THIS LINE -- make depend needs it&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
This is an excerpt from the CIS makefile to show how you can do branchings in a makefile.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
We use the shell-command &#039;&#039;&#039;$(shell uname -s)&#039;&#039;&#039;  to determine the machine is a Linux.&lt;br /&gt;
&amp;lt;source lang=make style=&amp;quot;font: normal normal 2em monospace&amp;quot;&amp;gt; &lt;br /&gt;
[...]&lt;br /&gt;
#&lt;br /&gt;
# LINUX system&lt;br /&gt;
#&lt;br /&gt;
UNAME_S := $(shell uname -s)&lt;br /&gt;
ifeq ($(UNAME_S),Linux)&lt;br /&gt;
   LDFLAGS=-g -m32  -lm -lcrypt&lt;br /&gt;
   CFLAGS=-g -Wimplicit -Wunused -Wformat -Werror -Wreturn-type \&lt;br /&gt;
   -Wmissing-prototypes -m32 -funsigned-char -Wno-parentheses \&lt;br /&gt;
   -D_XOPEN_SOURCE -D_GNU_SOURCE -Wno-pointer-sign -Wno-unused-but-set-variable&lt;br /&gt;
endif&lt;br /&gt;
#&lt;br /&gt;
# MAC-OS&lt;br /&gt;
#&lt;br /&gt;
ifeq ($(UNAME_S),Darwin)&lt;br /&gt;
....... &lt;br /&gt;
[...]&lt;br /&gt;
OBJ=db/db.o db/app.o db/w3tool.o db/w3lib.o db/maildecode.o&lt;br /&gt;
ALL=.dependent db.c w3dbs cis svnout x tools&lt;br /&gt;
SRC=db.c app.c w3tool.c w3lib.c  cis.c x.c maildecode.c&lt;br /&gt;
&lt;br /&gt;
db/%.o: %.c&lt;br /&gt;
   @echo &amp;quot;compile $&amp;lt; ...&amp;quot;&lt;br /&gt;
   @$(CC) $(CFLAGS) -c $&amp;lt; -o $@&lt;br /&gt;
&lt;br /&gt;
[...]&lt;br /&gt;
&lt;br /&gt;
all: $(ALL)&lt;br /&gt;
clean:&lt;br /&gt;
   @echo &amp;quot;cleaning ...&amp;quot;&lt;br /&gt;
   @rm -rf *.o $(ALL) core tags db.h db.c html/model.html a.out gmon.out core.* x tools svnout w3lib.tgz *.dSYM *.gcno *.gcda *.gcov g* .dependent $(OBJ)&lt;br /&gt;
&lt;br /&gt;
cis: db/cis.o $(OBJ)&lt;br /&gt;
   @echo &amp;quot;building cis ...&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Makefile structure ==&lt;br /&gt;
Makefiles contain definitions and rules.&lt;br /&gt;
* A definition has the form:&amp;lt;br&amp;gt;&lt;br /&gt;
VAR=value&lt;br /&gt;
* A rule has the form: &amp;lt;br&amp;gt;&lt;br /&gt;
output files: input files&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;TAB&amp;gt;&amp;lt;TAB&amp;gt;commands to turn inputs to outputs&lt;br /&gt;
* All commands must be &amp;lt;font color=green&amp;gt;tab-indented&amp;lt;/font&amp;gt;.&lt;br /&gt;
* # are marking the beginning of a comment. Rest of the line will be ignored.&lt;br /&gt;
* To reference the variable VAR, surround it with &amp;lt;font color=green&amp;gt;$(VAR)&amp;lt;/font&amp;gt;. &lt;br /&gt;
* Try running &#039;&#039;&#039;&#039;man make&#039;&#039;&#039;&#039; for more details.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;TAB&amp;gt; = Tabulator&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[Category:Compiler_software]][[Category:bwUniCluster]][[Category:bwForCluster_Chemistry]][[Category:BwForCluster_BinAC]][[Category:bwForCluster_MLS&amp;amp;WISO_Production]]&lt;/div&gt;</summary>
		<author><name>R Rutka</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=Development/General_compiler_usage&amp;diff=4526</id>
		<title>Development/General compiler usage</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=Development/General_compiler_usage&amp;diff=4526"/>
		<updated>2016-11-03T16:42:35Z</updated>

		<summary type="html">&lt;p&gt;R Rutka: /* Intel */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=600px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Description !! Content&lt;br /&gt;
|-&lt;br /&gt;
| module load&lt;br /&gt;
| compiler/gnu&amp;amp;#124;intel&amp;amp;#124;pgi&amp;amp;#124;...  &lt;br /&gt;
|-&lt;br /&gt;
| License&lt;br /&gt;
| [[Intel_Compiler|Intel]]: Commercial &amp;amp;#124; [[GCC|GNU]]: GPL &amp;amp;#124; PGI: Commercial&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
= Description = &lt;br /&gt;
The basic operations can be performed with the same commands for all available compilers. For advanced usage such as optimization and profiling you should consult the best practice guide of the compiler you intend to use ([[BwHPC_BPG_Compiler#GCC|GCC]], [[BwHPC_BPG_Compiler#Intel Suite|Intel Suite]]).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
More information about the MPI versions of the GNU and Intel Compilers is available here:&lt;br /&gt;
* [[BwHPC_BPG_for_Parallel_Programming|Best Practices Guide for Parallel Programming]].&lt;br /&gt;
&lt;br /&gt;
= Versions and Availability =&lt;br /&gt;
A list of versions currently available compilers on the bwHPC-C5-Clusters can be obtained from the&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;big&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[https://cis-hpc.uni-konstanz.de/prod.cis/ Cluster Information System CIS]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/big&amp;gt;&lt;br /&gt;
== GNU ==&lt;br /&gt;
{{#widget:Iframe&lt;br /&gt;
|url=https://cis-hpc.uni-konstanz.de/prod.cis/bwUniCluster/compiler/gnu&lt;br /&gt;
|width=99%&lt;br /&gt;
|height=750&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Intel ==&lt;br /&gt;
{{#widget:Iframe&lt;br /&gt;
|url=https://cis-hpc.uni-konstanz.de/prod.cis/bwUniCluster/compiler/intel&lt;br /&gt;
|width=99%&lt;br /&gt;
|height=750&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== PGI ==&lt;br /&gt;
{{#widget:Iframe&lt;br /&gt;
|url=https://cis-hpc.uni-konstanz.de/prod.cis/bwUniCluster/compiler/pgi&lt;br /&gt;
|width=99%&lt;br /&gt;
|height=200&lt;br /&gt;
}}&lt;br /&gt;
On the command line interface of any bwHPC cluster you&#039;ll get a list of available versions &lt;br /&gt;
by using the command &amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;&#039;module avail compiler&#039;&#039;&#039;&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ : bwUniCluster&lt;br /&gt;
$ module avail compiler&lt;br /&gt;
---------------------- /opt/bwhpc/common/modulefiles -----------------------&lt;br /&gt;
compiler/gnu/4.5             compiler/intel/12.1&lt;br /&gt;
compiler/gnu/4.7(default)    compiler/intel/13.1&lt;br /&gt;
compiler/gnu/4.8             compiler/intel/14.0&lt;br /&gt;
compiler/gnu/4.9             compiler/intel/15.0(default)&lt;br /&gt;
compiler/gnu/5.2&lt;br /&gt;
$ : bwForCluster (Justus)&lt;br /&gt;
$ module avail compiler&lt;br /&gt;
---------------------- /opt/bwhpc/common/modulefiles -----------------------&lt;br /&gt;
compiler/gnu/4.5             compiler/intel/15.0(default)&lt;br /&gt;
compiler/gnu/4.7(default)    compiler/pgi/12.10(default)&lt;br /&gt;
compiler/gnu/4.8             compiler/pgi/12.10_static&lt;br /&gt;
compiler/gnu/4.9             compiler/pgi/13.7&lt;br /&gt;
compiler/gnu/5.2             compiler/pgi/13.7_static&lt;br /&gt;
compiler/intel/12.1          compiler/pgi/14.10&lt;br /&gt;
compiler/intel/13.1          compiler/pgi/14.10_static&lt;br /&gt;
compiler/intel/14.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Loading the module =&lt;br /&gt;
== Default Version ==&lt;br /&gt;
You can load the default version of the a compiler with the command&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;module load compiler&#039;&#039;&#039;/&#039;&#039;&#039;name-of-the-compiler-suite&#039;&#039;&#039;.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;Example with Intel on bwUniCluster&amp;lt;/u&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module avail compiler/intel&lt;br /&gt;
---------------------- /opt/bwhpc/common/modulefiles -----------------------&lt;br /&gt;
compiler/intel/12.1          compiler/intel/14.0&lt;br /&gt;
compiler/intel/13.1          compiler/intel/15.0(default)&lt;br /&gt;
$ module load compiler/intel&lt;br /&gt;
$ module list&lt;br /&gt;
Currently Loaded Modulefiles:&lt;br /&gt;
  1) compiler/intel/15.0(default)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here, we got the &amp;quot;default&amp;quot; version 15.0 (example).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The module will try to load modules it needs to function. &lt;br /&gt;
If loading the module fails, check if you have already loaded the module with &#039;&#039;&#039;&#039;module list&#039;&#039;&#039;&#039;.&lt;br /&gt;
== Specific (newer or older) Version ==&lt;br /&gt;
If you wish to load a specific compiler version and release (if available), you can do so using&amp;lt;br&amp;gt; &lt;br /&gt;
&#039;&#039;&#039;module load compiler&#039;&#039;/&#039;&#039;name-of-the-compiler-suite&#039;&#039;/&#039;&#039;version-of-the-compiler-suite&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
to load the version you desires.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;Example with Intel compiler, version 14.0 on bwUniCluster&amp;lt;/u&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module avail compiler/intel&lt;br /&gt;
---------------------- /opt/bwhpc/common/modulefiles -----------------------&lt;br /&gt;
compiler/intel/12.1          compiler/intel/14.0&lt;br /&gt;
compiler/intel/13.1          compiler/intel/15.0(default)&lt;br /&gt;
$ module load compiler/intel/14.0&lt;br /&gt;
$ module list&lt;br /&gt;
Currently Loaded Modulefiles:&lt;br /&gt;
  1) compiler/intel/14.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Intel C-Compiler &amp;quot;version 14.0&amp;quot; is loaded now (example).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
All Intel, GCC and PGI have compilers for different languages which will be available &lt;br /&gt;
after the module is loaded.&lt;br /&gt;
== Linux  Original Compiler ==&lt;br /&gt;
The original Compiler installed on all compute nodes is GNU.&lt;br /&gt;
* Don&#039;t get distracted with the available compiler modules.&lt;br /&gt;
* Only the modules are loading the complete environments needed.  &lt;br /&gt;
&amp;lt;u&amp;gt;Example&amp;lt;/u&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module clear                     # unload all modules&lt;br /&gt;
Are you sure you want to clear all loaded modules!? [n] y&lt;br /&gt;
$ module list                      # control&lt;br /&gt;
No Modulefiles Currently Loaded.&lt;br /&gt;
$ gcc --version                    # see version of default Linux GNU compiler&lt;br /&gt;
gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-16)&lt;br /&gt;
[...]&lt;br /&gt;
$ module load compiler/gnu         # load default GNU compiler module&lt;br /&gt;
$ module list                      # control&lt;br /&gt;
Currently Loaded Modulefiles:&lt;br /&gt;
  1) compiler/gnu/4.7(default)&lt;br /&gt;
$ gcc --version                    # now, check the current (loaded) module&lt;br /&gt;
gcc (GCC) 4.7.3 &lt;br /&gt;
[...]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
= Synoptical Tables =&lt;br /&gt;
== Compilers (no MPI) == &lt;br /&gt;
{| width=600px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Compiler Suite&lt;br /&gt;
! Language&lt;br /&gt;
! Command&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;vertical-align:top;&amp;quot; rowspan=&amp;quot;3&amp;quot; | &amp;lt;font color=green&amp;gt;&amp;lt;big&amp;gt;Intel Composer&amp;lt;/big&amp;gt;&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt; [[Intel_Compiler|&amp;amp;bull;&amp;amp;nbsp;Best Practice Guides on Intel Compiler Software]] &lt;br /&gt;
| C&lt;br /&gt;
| icc&lt;br /&gt;
|-&lt;br /&gt;
| C++&lt;br /&gt;
| icpc&lt;br /&gt;
|-&lt;br /&gt;
| Fortran&lt;br /&gt;
| ifort&lt;br /&gt;
|- &lt;br /&gt;
| style=&amp;quot;vertical-align:top;&amp;quot; rowspan=&amp;quot;3&amp;quot; | &amp;lt;font color=green&amp;gt;&amp;lt;big&amp;gt;GCC&amp;lt;/big&amp;gt;&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt; [[GCC|&amp;amp;bull;&amp;amp;nbsp;Best Practice Guides on GNU Compiler Software]]&lt;br /&gt;
| C&lt;br /&gt;
| gcc&lt;br /&gt;
|-&lt;br /&gt;
| C++&lt;br /&gt;
| g++&lt;br /&gt;
|-&lt;br /&gt;
| Fortran&lt;br /&gt;
| gfortran&lt;br /&gt;
|- &lt;br /&gt;
| style=&amp;quot;vertical-align:top;&amp;quot; rowspan=&amp;quot;3&amp;quot; | &amp;lt;font color=green&amp;gt;&amp;lt;big&amp;gt;PGI&amp;lt;/big&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
| C&lt;br /&gt;
| pgcc&lt;br /&gt;
|-&lt;br /&gt;
| C++&lt;br /&gt;
| pgCC&lt;br /&gt;
|-&lt;br /&gt;
| Fortran 77/90&lt;br /&gt;
| pgf77 or pgf90&lt;br /&gt;
|}&lt;br /&gt;
== MPI compiler and Underlying Compilers ==&lt;br /&gt;
The following table lists available MPI compiler commands and the underlying compilers, compiler families, languages, and application binary interfaces (ABIs) that they support.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| width=600px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! MPI Compiler Command !! Default Compiler !! Supported Language(s) !! Supported ABI&#039;s&lt;br /&gt;
|-&lt;br /&gt;
| colspan=4 style=&amp;quot;background-color:#DCDCDC;&amp;quot; | Generic Compilers &lt;br /&gt;
|-&lt;br /&gt;
| mpicc || gcc, cc  || C || 32/64 bit &lt;br /&gt;
|-&lt;br /&gt;
| mpicxx || g++ || C/C++ || 32/64 bit &lt;br /&gt;
|-&lt;br /&gt;
| mpifc || gfortran || Fortran77/Fortran 95 || 32/64 bit&lt;br /&gt;
|-&lt;br /&gt;
| colspan=4 style=&amp;quot;background-color:#DCDCDC;&amp;quot; | [[GCC|GNU Compiler]] Versions 3 and higher &lt;br /&gt;
|-&lt;br /&gt;
| mpigcc || gcc || C || 32/64 bit &lt;br /&gt;
|-&lt;br /&gt;
| mpigxx || g++  || C/C++ || 32/64 bit &lt;br /&gt;
|-&lt;br /&gt;
| mpif77 || g77 || Fortran 77 || 32/64 bit &lt;br /&gt;
|-&lt;br /&gt;
| mpif90 || gfortran || Fortran 95 || 32/64 bit&lt;br /&gt;
|-&lt;br /&gt;
| colspan=4 style=&amp;quot;background-color:#DCDCDC;&amp;quot; | [[Intel_Compiler|Intel Fortran, C++ Compilers]] Versions 13.1 through 14.0 and Higher&lt;br /&gt;
|-&lt;br /&gt;
| mpiicc || icc || C || 32/64 bit &lt;br /&gt;
|-&lt;br /&gt;
| mpiicpc || icpc || C++ || 32/64 bit &lt;br /&gt;
|-&lt;br /&gt;
|impiifort  || ifort || Fortran77/Fortran 95 || 32/64 bit &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= How to use =&lt;br /&gt;
The following compiler commands work for all the compilers in the list above even though&lt;br /&gt;
the examples will be for &#039;&#039;&#039;icc&#039;&#039;&#039; only. &lt;br /&gt;
== Commands ==&lt;br /&gt;
When &#039;&#039;hello.c&#039;&#039; is a C source code file such as&lt;br /&gt;
&amp;lt;source lang=C style=&amp;quot;font: normal normal 2em monospace&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
int main() {&lt;br /&gt;
    printf(&amp;quot;Hello world\n&amp;quot;);&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
it can be compiled and linked with the single command&lt;br /&gt;
&amp;lt;pre&amp;gt;$ icc hello.c -o hello&amp;lt;/pre&amp;gt;&lt;br /&gt;
to produce an executable named &#039;&#039;hello&#039;&#039;.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
This process can be divided into two steps:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ icc -c hello.c&lt;br /&gt;
$ icc hello.o -o hello&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
When using libraries you must sometimes specify where the &lt;br /&gt;
* include files are (option &#039;&#039;&#039;-I&#039;&#039;&#039;) and where the &lt;br /&gt;
* library files are (option &#039;&#039;&#039;-L&#039;&#039;&#039;). &lt;br /&gt;
In addition you have to tell the compiler which &lt;br /&gt;
* library you want to use (option &#039;&#039;&#039;-l&#039;&#039;&#039;). &lt;br /&gt;
For example after loading the module numlib/fftw you can compile code for fftw using&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ icc -c hello.c -I$FFTW_INC_DIR&lt;br /&gt;
$ icc hello.o -o hello -L$FFTW_LIB_DIR -lfftw3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
When the program crashes or doesn&#039;t produce the expected output the compiler can &lt;br /&gt;
help you by printing warning messages:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ icc -Wall hello.c -o hello&amp;lt;/pre&amp;gt;&lt;br /&gt;
== Debugger ==&lt;br /&gt;
If the problem can&#039;t be solved this way you can inspect what exactly your program &lt;br /&gt;
does [[BwHPC_BPG_Debugger|using a debugger]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;font color=green&amp;gt;To use the debugger properly with your program you have to compile it with debug information (option -g)&amp;lt;/font&amp;gt;:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;Example&amp;lt;/u&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;$ icc -g hello.c -o hello&amp;lt;/pre&amp;gt;&lt;br /&gt;
Although -Wall should always be set, the -g option should only be stated when you want&lt;br /&gt;
to find bugs, since it may slow down execution and enlarges the binary due&lt;br /&gt;
to debugging symbols.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Optimization ==&lt;br /&gt;
The usual and common way to compile your source is to apply compiler optimization.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Since there are many optimization options, as a stzart for now the &amp;lt;font color=green&amp;gt;optimization level -O2&amp;lt;/font&amp;gt; is recommended:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ icc -O2 hello.c -o hello&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;font color=red&amp;gt;Beware:&amp;lt;/font&amp;gt;&amp;amp;nbsp;The optimization-flag used is a capital-O (like Otto) and not a 0 (Zero)!&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Both compilers offer a multitude of options (with regard to the above and others), &lt;br /&gt;
one may check the complete list of options with short explanation on [[GCC|GCC]] and &lt;br /&gt;
[[Intel_Compiler|Intel Suite]] using option &#039;&#039;&#039;-v&#039;&#039;&#039; &#039;&#039;&#039;--help&#039;&#039;&#039;:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ icc -v --help hello.c -o hello&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
= Makefile =&lt;br /&gt;
If you&#039;re working in a project that already uses make, there should be a file called Makefile in the top-level directory.&lt;br /&gt;
Running:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ make&amp;lt;/pre&amp;gt; &lt;br /&gt;
should build the project from source.&lt;br /&gt;
== What is make? ==&lt;br /&gt;
Make is a tool designed to manage dependencies in a build process.&lt;br /&gt;
== Simple Makefile for hello.c ==&lt;br /&gt;
For instance, if you have a source file called &#039;&#039;hello.c&#039;&#039; and you need to build  &lt;br /&gt;
the binary/executable &#039;&#039;hello&#039;&#039;, then you might have a Makefile in the same &lt;br /&gt;
directory that looks like this:&lt;br /&gt;
&amp;lt;source lang=make style=&amp;quot;font: normal normal 2em monospace&amp;quot;&amp;gt; &lt;br /&gt;
# define the C compiler to use&lt;br /&gt;
# you do not need this if you load the compiler module first&lt;br /&gt;
# # CC      = icc &lt;br /&gt;
&lt;br /&gt;
# define any compile-time flags&lt;br /&gt;
#    -g    # adds debugging information to the executable file&lt;br /&gt;
#    -O2   # optimization level 2&lt;br /&gt;
#    -Wall # turns on most, but not all, compiler warnings&lt;br /&gt;
CFLAGS  = -g -O2 -Wall&lt;br /&gt;
&lt;br /&gt;
# unix/linux removal command used for &#039;make clean&#039;&lt;br /&gt;
RM      = rm -f&lt;br /&gt;
&lt;br /&gt;
# the build target executable&lt;br /&gt;
# use a variable if you&#039;d like to rename the binary later&lt;br /&gt;
TARGET = hello&lt;br /&gt;
&lt;br /&gt;
# default action when make was invoked without options&lt;br /&gt;
default: all&lt;br /&gt;
&lt;br /&gt;
# starts section beginning with :hello  -&amp;gt; :hello = :$(TARGET)&lt;br /&gt;
all: $(TARGET)&lt;br /&gt;
&lt;br /&gt;
# main build section of this Makefile&lt;br /&gt;
# same as: hello: hello.c&lt;br /&gt;
#    $(CC) $(CFLAGS) -o hello hello.c&lt;br /&gt;
$(TARGET): $(TARGET).c&lt;br /&gt;
      $(CC) $(CFLAGS) -o $(TARGET) $(TARGET).c&lt;br /&gt;
&lt;br /&gt;
# clean all garbage with &#039;make clean&#039; oder &#039;make veryclean&#039;&lt;br /&gt;
clean veryclean:&lt;br /&gt;
      $(RM) $(TARGET) $(TARGET).o&lt;br /&gt;
&lt;br /&gt;
# run the programm with &#039;make run&#039;&lt;br /&gt;
run:&lt;br /&gt;
      ./$(TARGET)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
When ordered to build a file, make will ensure that all dependencies are up to date, and it will not rebuild any those which need not be rebuilt.&lt;br /&gt;
&lt;br /&gt;
== Load Compiler Environments ==&lt;br /&gt;
Another makefile &amp;lt;small&amp;gt;(using makedepend and more advanced make syntax)&amp;lt;/small&amp;gt;.&lt;br /&gt;
Here we use the GNU-C-Compiler.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$module load compiler/gnu&lt;br /&gt;
$ module list&lt;br /&gt;
Currently Loaded Modulefiles:&lt;br /&gt;
  1) compiler/gnu/4.7(default)&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
A list of all defined environments set by the &#039;module load&#039;-command can be&lt;br /&gt;
displayed by: &#039;module show compiler/gnu&#039; (e.g. GNU compiler).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module show compiler/gnu&lt;br /&gt;
-------------------------------------------------------------------&lt;br /&gt;
/opt/bwhpc/common/modulefiles/compiler/gnu/4.7:&lt;br /&gt;
[...]&lt;br /&gt;
setenv		 GNU_VERSION 4.7.3 &lt;br /&gt;
setenv		 GNU_HOME /opt/bwhpc/common/compiler/gnu/4.7.3/x86_64 &lt;br /&gt;
setenv		 GNU_BIN_DIR /opt/bwhpc/common/compiler/gnu/4.7.3/x86_64/bin &lt;br /&gt;
setenv		 GNU_MAN_DIR /opt/bwhpc/common/compiler/gnu/4.7.3/x86_64/share/man &lt;br /&gt;
setenv		 GNU_LIB_DIR /opt/bwhpc/common/compiler/gnu/4.7.3/x86_64/lib64 &lt;br /&gt;
prepend-path	 PATH /opt/bwhpc/common/compiler/gnu/4.7.3/x86_64/bin &lt;br /&gt;
prepend-path	 MANPATH /opt/bwhpc/common/compiler/gnu/4.7.3/x86_64/share/man &lt;br /&gt;
prepend-path	 LD_RUN_PATH /opt/bwhpc/common/compiler/gnu/4.7.3/x86_64/lib &lt;br /&gt;
prepend-path	 LD_LIBRARY_PATH /opt/bwhpc/common/compiler/gnu/4.7.3/x86_64/lib &lt;br /&gt;
prepend-path	 LD_RUN_PATH /opt/bwhpc/common/compiler/gnu/4.7.3/x86_64/lib64 &lt;br /&gt;
prepend-path	 LD_LIBRARY_PATH /opt/bwhpc/common/compiler/gnu/4.7.3/x86_64/lib64 &lt;br /&gt;
setenv		 CC gcc &lt;br /&gt;
setenv		 CXX g++ &lt;br /&gt;
setenv		 F77 gfortran &lt;br /&gt;
setenv		 FC gfortran &lt;br /&gt;
setenv		 F90 gfortran &lt;br /&gt;
[...]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
== Advaneced Makefile Examples ==&lt;br /&gt;
This envs may be used in your local Makefile.&lt;br /&gt;
&amp;lt;source lang=make style=&amp;quot;font: normal normal 2em monospace&amp;quot;&amp;gt; &lt;br /&gt;
#&lt;br /&gt;
# &#039;make depend&#039; uses makedepend to automatically generate dependencies &lt;br /&gt;
#               (dependencies are added to end of Makefile)&lt;br /&gt;
# &#039;make&#039;        build executable file &#039;mycc&#039;&lt;br /&gt;
# &#039;make clean&#039;  removes all .o and executable files&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
# define the C compiler to use. &lt;br /&gt;
# CC is set by the &#039;module load&#039;-command so it&#039;s unnecessary here.&lt;br /&gt;
# # CC = gcc&lt;br /&gt;
&lt;br /&gt;
# define any compile-time flags&lt;br /&gt;
CFLAGS = -Wall -g -O2&lt;br /&gt;
&lt;br /&gt;
# define any directories containing header files other than /usr/include&lt;br /&gt;
#&lt;br /&gt;
INCLUDES = -I/home/newhall/include &lt;br /&gt;
#  -I../include -I$(GNU_INC_DIR)  (example)&lt;br /&gt;
&lt;br /&gt;
# define library paths in addition to /usr/lib&lt;br /&gt;
#   if I wanted to include libraries not in /usr/lib I&#039;d specify&lt;br /&gt;
#   their path using -Lpath, something like:&lt;br /&gt;
LFLAGS = -L/home/newhall/lib  -L../lib&lt;br /&gt;
&lt;br /&gt;
# define any libraries to link into executable:&lt;br /&gt;
#   if I want to link in libraries (libx.so or libx.a) I use the -llibname &lt;br /&gt;
#   option, something like (this will link in libmylib.so and libm.so:&lt;br /&gt;
LIBS = -l$(GNU_LIB_DIR) -lmylib -lm &lt;br /&gt;
&lt;br /&gt;
# define the C source files (examples only)&lt;br /&gt;
SRCS = emitter.c error.c init.c lexer.c main.c symbol.c parser.c&lt;br /&gt;
&lt;br /&gt;
# define the C object files &lt;br /&gt;
#&lt;br /&gt;
# This uses Suffix Replacement within a macro:&lt;br /&gt;
#   $(name:string1=string2)&lt;br /&gt;
#         For each word in &#039;name&#039; replace &#039;string1&#039; with &#039;string2&#039;&lt;br /&gt;
# Below we are replacing the suffix .c of all words in the macro SRCS&lt;br /&gt;
# with the .o suffix&lt;br /&gt;
#&lt;br /&gt;
OBJS = $(SRCS:.c=.o)&lt;br /&gt;
&lt;br /&gt;
# define the executable file &lt;br /&gt;
MAIN = mycc&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# The following part of the makefile is generic; it can be used to &lt;br /&gt;
# build any executable just by changing the definitions above and by&lt;br /&gt;
# deleting dependencies appended to the file from &#039;make depend&#039;&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
.PHONY: depend clean&lt;br /&gt;
&lt;br /&gt;
all:    $(MAIN)&lt;br /&gt;
        @echo  Simple compiler named mycc has been compiled&lt;br /&gt;
&lt;br /&gt;
$(MAIN): $(OBJS) &lt;br /&gt;
        $(CC) $(CFLAGS) $(INCLUDES) -o $(MAIN) $(OBJS) $(LFLAGS) $(LIBS)&lt;br /&gt;
&lt;br /&gt;
# this is a suffix replacement rule for building .o&#039;s from .c&#039;s&lt;br /&gt;
# it uses automatic variables $&amp;lt;: the name of the prerequisite of&lt;br /&gt;
# the rule(a .c file) and $@: the name of the target of the rule (a .o file) &lt;br /&gt;
# (see the gnu make manual section about automatic variables)&lt;br /&gt;
.c.o:&lt;br /&gt;
        $(CC) $(CFLAGS) $(INCLUDES) -c $&amp;lt;  -o $@&lt;br /&gt;
&lt;br /&gt;
clean:&lt;br /&gt;
        $(RM) *.o *~ $(MAIN)&lt;br /&gt;
&lt;br /&gt;
depend: $(SRCS)&lt;br /&gt;
        makedepend $(INCLUDES) $^&lt;br /&gt;
&lt;br /&gt;
# DO NOT DELETE THIS LINE -- make depend needs it&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
This is an excerpt from the CIS makefile to show how you can do branchings in a makefile.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
We use the shell-command &#039;&#039;&#039;$(shell uname -s)&#039;&#039;&#039;  to determine the machine is a Linux.&lt;br /&gt;
&amp;lt;source lang=make style=&amp;quot;font: normal normal 2em monospace&amp;quot;&amp;gt; &lt;br /&gt;
[...]&lt;br /&gt;
#&lt;br /&gt;
# LINUX system&lt;br /&gt;
#&lt;br /&gt;
UNAME_S := $(shell uname -s)&lt;br /&gt;
ifeq ($(UNAME_S),Linux)&lt;br /&gt;
   LDFLAGS=-g -m32  -lm -lcrypt&lt;br /&gt;
   CFLAGS=-g -Wimplicit -Wunused -Wformat -Werror -Wreturn-type \&lt;br /&gt;
   -Wmissing-prototypes -m32 -funsigned-char -Wno-parentheses \&lt;br /&gt;
   -D_XOPEN_SOURCE -D_GNU_SOURCE -Wno-pointer-sign -Wno-unused-but-set-variable&lt;br /&gt;
endif&lt;br /&gt;
#&lt;br /&gt;
# MAC-OS&lt;br /&gt;
#&lt;br /&gt;
ifeq ($(UNAME_S),Darwin)&lt;br /&gt;
....... &lt;br /&gt;
[...]&lt;br /&gt;
OBJ=db/db.o db/app.o db/w3tool.o db/w3lib.o db/maildecode.o&lt;br /&gt;
ALL=.dependent db.c w3dbs cis svnout x tools&lt;br /&gt;
SRC=db.c app.c w3tool.c w3lib.c  cis.c x.c maildecode.c&lt;br /&gt;
&lt;br /&gt;
db/%.o: %.c&lt;br /&gt;
   @echo &amp;quot;compile $&amp;lt; ...&amp;quot;&lt;br /&gt;
   @$(CC) $(CFLAGS) -c $&amp;lt; -o $@&lt;br /&gt;
&lt;br /&gt;
[...]&lt;br /&gt;
&lt;br /&gt;
all: $(ALL)&lt;br /&gt;
clean:&lt;br /&gt;
   @echo &amp;quot;cleaning ...&amp;quot;&lt;br /&gt;
   @rm -rf *.o $(ALL) core tags db.h db.c html/model.html a.out gmon.out core.* x tools svnout w3lib.tgz *.dSYM *.gcno *.gcda *.gcov g* .dependent $(OBJ)&lt;br /&gt;
&lt;br /&gt;
cis: db/cis.o $(OBJ)&lt;br /&gt;
   @echo &amp;quot;building cis ...&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Makefile structure ==&lt;br /&gt;
Makefiles contain definitions and rules.&lt;br /&gt;
* A definition has the form:&amp;lt;br&amp;gt;&lt;br /&gt;
VAR=value&lt;br /&gt;
* A rule has the form: &amp;lt;br&amp;gt;&lt;br /&gt;
output files: input files&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;TAB&amp;gt;&amp;lt;TAB&amp;gt;commands to turn inputs to outputs&lt;br /&gt;
* All commands must be &amp;lt;font color=green&amp;gt;tab-indented&amp;lt;/font&amp;gt;.&lt;br /&gt;
* # are marking the beginning of a comment. Rest of the line will be ignored.&lt;br /&gt;
* To reference the variable VAR, surround it with &amp;lt;font color=green&amp;gt;$(VAR)&amp;lt;/font&amp;gt;. &lt;br /&gt;
* Try running &#039;&#039;&#039;&#039;man make&#039;&#039;&#039;&#039; for more details.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;TAB&amp;gt; = Tabulator&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[Category:Compiler_software]][[Category:bwUniCluster]][[Category:bwForCluster_Chemistry]][[Category:BwForCluster_BinAC]][[Category:bwForCluster_MLS&amp;amp;WISO_Production]]&lt;/div&gt;</summary>
		<author><name>R Rutka</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=Development/General_compiler_usage&amp;diff=4525</id>
		<title>Development/General compiler usage</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=Development/General_compiler_usage&amp;diff=4525"/>
		<updated>2016-11-03T16:42:18Z</updated>

		<summary type="html">&lt;p&gt;R Rutka: /* GNU */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=600px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Description !! Content&lt;br /&gt;
|-&lt;br /&gt;
| module load&lt;br /&gt;
| compiler/gnu&amp;amp;#124;intel&amp;amp;#124;pgi&amp;amp;#124;...  &lt;br /&gt;
|-&lt;br /&gt;
| License&lt;br /&gt;
| [[Intel_Compiler|Intel]]: Commercial &amp;amp;#124; [[GCC|GNU]]: GPL &amp;amp;#124; PGI: Commercial&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
= Description = &lt;br /&gt;
The basic operations can be performed with the same commands for all available compilers. For advanced usage such as optimization and profiling you should consult the best practice guide of the compiler you intend to use ([[BwHPC_BPG_Compiler#GCC|GCC]], [[BwHPC_BPG_Compiler#Intel Suite|Intel Suite]]).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
More information about the MPI versions of the GNU and Intel Compilers is available here:&lt;br /&gt;
* [[BwHPC_BPG_for_Parallel_Programming|Best Practices Guide for Parallel Programming]].&lt;br /&gt;
&lt;br /&gt;
= Versions and Availability =&lt;br /&gt;
A list of versions currently available compilers on the bwHPC-C5-Clusters can be obtained from the&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;big&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[https://cis-hpc.uni-konstanz.de/prod.cis/ Cluster Information System CIS]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/big&amp;gt;&lt;br /&gt;
== GNU ==&lt;br /&gt;
{{#widget:Iframe&lt;br /&gt;
|url=https://cis-hpc.uni-konstanz.de/prod.cis/bwUniCluster/compiler/gnu&lt;br /&gt;
|width=99%&lt;br /&gt;
|height=750&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Intel ==&lt;br /&gt;
{{#widget:Iframe&lt;br /&gt;
|url=https://cis-hpc.uni-konstanz.de/prod.cis/bwUniCluster/compiler/intel&lt;br /&gt;
|width=99%&lt;br /&gt;
|height=770&lt;br /&gt;
}}&lt;br /&gt;
== PGI ==&lt;br /&gt;
{{#widget:Iframe&lt;br /&gt;
|url=https://cis-hpc.uni-konstanz.de/prod.cis/bwUniCluster/compiler/pgi&lt;br /&gt;
|width=99%&lt;br /&gt;
|height=200&lt;br /&gt;
}}&lt;br /&gt;
On the command line interface of any bwHPC cluster you&#039;ll get a list of available versions &lt;br /&gt;
by using the command &amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;&#039;module avail compiler&#039;&#039;&#039;&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ : bwUniCluster&lt;br /&gt;
$ module avail compiler&lt;br /&gt;
---------------------- /opt/bwhpc/common/modulefiles -----------------------&lt;br /&gt;
compiler/gnu/4.5             compiler/intel/12.1&lt;br /&gt;
compiler/gnu/4.7(default)    compiler/intel/13.1&lt;br /&gt;
compiler/gnu/4.8             compiler/intel/14.0&lt;br /&gt;
compiler/gnu/4.9             compiler/intel/15.0(default)&lt;br /&gt;
compiler/gnu/5.2&lt;br /&gt;
$ : bwForCluster (Justus)&lt;br /&gt;
$ module avail compiler&lt;br /&gt;
---------------------- /opt/bwhpc/common/modulefiles -----------------------&lt;br /&gt;
compiler/gnu/4.5             compiler/intel/15.0(default)&lt;br /&gt;
compiler/gnu/4.7(default)    compiler/pgi/12.10(default)&lt;br /&gt;
compiler/gnu/4.8             compiler/pgi/12.10_static&lt;br /&gt;
compiler/gnu/4.9             compiler/pgi/13.7&lt;br /&gt;
compiler/gnu/5.2             compiler/pgi/13.7_static&lt;br /&gt;
compiler/intel/12.1          compiler/pgi/14.10&lt;br /&gt;
compiler/intel/13.1          compiler/pgi/14.10_static&lt;br /&gt;
compiler/intel/14.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Loading the module =&lt;br /&gt;
== Default Version ==&lt;br /&gt;
You can load the default version of the a compiler with the command&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;module load compiler&#039;&#039;&#039;/&#039;&#039;&#039;name-of-the-compiler-suite&#039;&#039;&#039;.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;Example with Intel on bwUniCluster&amp;lt;/u&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module avail compiler/intel&lt;br /&gt;
---------------------- /opt/bwhpc/common/modulefiles -----------------------&lt;br /&gt;
compiler/intel/12.1          compiler/intel/14.0&lt;br /&gt;
compiler/intel/13.1          compiler/intel/15.0(default)&lt;br /&gt;
$ module load compiler/intel&lt;br /&gt;
$ module list&lt;br /&gt;
Currently Loaded Modulefiles:&lt;br /&gt;
  1) compiler/intel/15.0(default)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here, we got the &amp;quot;default&amp;quot; version 15.0 (example).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The module will try to load modules it needs to function. &lt;br /&gt;
If loading the module fails, check if you have already loaded the module with &#039;&#039;&#039;&#039;module list&#039;&#039;&#039;&#039;.&lt;br /&gt;
== Specific (newer or older) Version ==&lt;br /&gt;
If you wish to load a specific compiler version and release (if available), you can do so using&amp;lt;br&amp;gt; &lt;br /&gt;
&#039;&#039;&#039;module load compiler&#039;&#039;/&#039;&#039;name-of-the-compiler-suite&#039;&#039;/&#039;&#039;version-of-the-compiler-suite&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
to load the version you desires.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;Example with Intel compiler, version 14.0 on bwUniCluster&amp;lt;/u&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module avail compiler/intel&lt;br /&gt;
---------------------- /opt/bwhpc/common/modulefiles -----------------------&lt;br /&gt;
compiler/intel/12.1          compiler/intel/14.0&lt;br /&gt;
compiler/intel/13.1          compiler/intel/15.0(default)&lt;br /&gt;
$ module load compiler/intel/14.0&lt;br /&gt;
$ module list&lt;br /&gt;
Currently Loaded Modulefiles:&lt;br /&gt;
  1) compiler/intel/14.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Intel C-Compiler &amp;quot;version 14.0&amp;quot; is loaded now (example).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
All Intel, GCC and PGI have compilers for different languages which will be available &lt;br /&gt;
after the module is loaded.&lt;br /&gt;
== Linux  Original Compiler ==&lt;br /&gt;
The original Compiler installed on all compute nodes is GNU.&lt;br /&gt;
* Don&#039;t get distracted with the available compiler modules.&lt;br /&gt;
* Only the modules are loading the complete environments needed.  &lt;br /&gt;
&amp;lt;u&amp;gt;Example&amp;lt;/u&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module clear                     # unload all modules&lt;br /&gt;
Are you sure you want to clear all loaded modules!? [n] y&lt;br /&gt;
$ module list                      # control&lt;br /&gt;
No Modulefiles Currently Loaded.&lt;br /&gt;
$ gcc --version                    # see version of default Linux GNU compiler&lt;br /&gt;
gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-16)&lt;br /&gt;
[...]&lt;br /&gt;
$ module load compiler/gnu         # load default GNU compiler module&lt;br /&gt;
$ module list                      # control&lt;br /&gt;
Currently Loaded Modulefiles:&lt;br /&gt;
  1) compiler/gnu/4.7(default)&lt;br /&gt;
$ gcc --version                    # now, check the current (loaded) module&lt;br /&gt;
gcc (GCC) 4.7.3 &lt;br /&gt;
[...]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
= Synoptical Tables =&lt;br /&gt;
== Compilers (no MPI) == &lt;br /&gt;
{| width=600px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Compiler Suite&lt;br /&gt;
! Language&lt;br /&gt;
! Command&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;vertical-align:top;&amp;quot; rowspan=&amp;quot;3&amp;quot; | &amp;lt;font color=green&amp;gt;&amp;lt;big&amp;gt;Intel Composer&amp;lt;/big&amp;gt;&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt; [[Intel_Compiler|&amp;amp;bull;&amp;amp;nbsp;Best Practice Guides on Intel Compiler Software]] &lt;br /&gt;
| C&lt;br /&gt;
| icc&lt;br /&gt;
|-&lt;br /&gt;
| C++&lt;br /&gt;
| icpc&lt;br /&gt;
|-&lt;br /&gt;
| Fortran&lt;br /&gt;
| ifort&lt;br /&gt;
|- &lt;br /&gt;
| style=&amp;quot;vertical-align:top;&amp;quot; rowspan=&amp;quot;3&amp;quot; | &amp;lt;font color=green&amp;gt;&amp;lt;big&amp;gt;GCC&amp;lt;/big&amp;gt;&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt; [[GCC|&amp;amp;bull;&amp;amp;nbsp;Best Practice Guides on GNU Compiler Software]]&lt;br /&gt;
| C&lt;br /&gt;
| gcc&lt;br /&gt;
|-&lt;br /&gt;
| C++&lt;br /&gt;
| g++&lt;br /&gt;
|-&lt;br /&gt;
| Fortran&lt;br /&gt;
| gfortran&lt;br /&gt;
|- &lt;br /&gt;
| style=&amp;quot;vertical-align:top;&amp;quot; rowspan=&amp;quot;3&amp;quot; | &amp;lt;font color=green&amp;gt;&amp;lt;big&amp;gt;PGI&amp;lt;/big&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
| C&lt;br /&gt;
| pgcc&lt;br /&gt;
|-&lt;br /&gt;
| C++&lt;br /&gt;
| pgCC&lt;br /&gt;
|-&lt;br /&gt;
| Fortran 77/90&lt;br /&gt;
| pgf77 or pgf90&lt;br /&gt;
|}&lt;br /&gt;
== MPI compiler and Underlying Compilers ==&lt;br /&gt;
The following table lists available MPI compiler commands and the underlying compilers, compiler families, languages, and application binary interfaces (ABIs) that they support.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| width=600px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! MPI Compiler Command !! Default Compiler !! Supported Language(s) !! Supported ABI&#039;s&lt;br /&gt;
|-&lt;br /&gt;
| colspan=4 style=&amp;quot;background-color:#DCDCDC;&amp;quot; | Generic Compilers &lt;br /&gt;
|-&lt;br /&gt;
| mpicc || gcc, cc  || C || 32/64 bit &lt;br /&gt;
|-&lt;br /&gt;
| mpicxx || g++ || C/C++ || 32/64 bit &lt;br /&gt;
|-&lt;br /&gt;
| mpifc || gfortran || Fortran77/Fortran 95 || 32/64 bit&lt;br /&gt;
|-&lt;br /&gt;
| colspan=4 style=&amp;quot;background-color:#DCDCDC;&amp;quot; | [[GCC|GNU Compiler]] Versions 3 and higher &lt;br /&gt;
|-&lt;br /&gt;
| mpigcc || gcc || C || 32/64 bit &lt;br /&gt;
|-&lt;br /&gt;
| mpigxx || g++  || C/C++ || 32/64 bit &lt;br /&gt;
|-&lt;br /&gt;
| mpif77 || g77 || Fortran 77 || 32/64 bit &lt;br /&gt;
|-&lt;br /&gt;
| mpif90 || gfortran || Fortran 95 || 32/64 bit&lt;br /&gt;
|-&lt;br /&gt;
| colspan=4 style=&amp;quot;background-color:#DCDCDC;&amp;quot; | [[Intel_Compiler|Intel Fortran, C++ Compilers]] Versions 13.1 through 14.0 and Higher&lt;br /&gt;
|-&lt;br /&gt;
| mpiicc || icc || C || 32/64 bit &lt;br /&gt;
|-&lt;br /&gt;
| mpiicpc || icpc || C++ || 32/64 bit &lt;br /&gt;
|-&lt;br /&gt;
|impiifort  || ifort || Fortran77/Fortran 95 || 32/64 bit &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= How to use =&lt;br /&gt;
The following compiler commands work for all the compilers in the list above even though&lt;br /&gt;
the examples will be for &#039;&#039;&#039;icc&#039;&#039;&#039; only. &lt;br /&gt;
== Commands ==&lt;br /&gt;
When &#039;&#039;hello.c&#039;&#039; is a C source code file such as&lt;br /&gt;
&amp;lt;source lang=C style=&amp;quot;font: normal normal 2em monospace&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
int main() {&lt;br /&gt;
    printf(&amp;quot;Hello world\n&amp;quot;);&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
it can be compiled and linked with the single command&lt;br /&gt;
&amp;lt;pre&amp;gt;$ icc hello.c -o hello&amp;lt;/pre&amp;gt;&lt;br /&gt;
to produce an executable named &#039;&#039;hello&#039;&#039;.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
This process can be divided into two steps:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ icc -c hello.c&lt;br /&gt;
$ icc hello.o -o hello&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
When using libraries you must sometimes specify where the &lt;br /&gt;
* include files are (option &#039;&#039;&#039;-I&#039;&#039;&#039;) and where the &lt;br /&gt;
* library files are (option &#039;&#039;&#039;-L&#039;&#039;&#039;). &lt;br /&gt;
In addition you have to tell the compiler which &lt;br /&gt;
* library you want to use (option &#039;&#039;&#039;-l&#039;&#039;&#039;). &lt;br /&gt;
For example after loading the module numlib/fftw you can compile code for fftw using&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ icc -c hello.c -I$FFTW_INC_DIR&lt;br /&gt;
$ icc hello.o -o hello -L$FFTW_LIB_DIR -lfftw3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
When the program crashes or doesn&#039;t produce the expected output the compiler can &lt;br /&gt;
help you by printing warning messages:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ icc -Wall hello.c -o hello&amp;lt;/pre&amp;gt;&lt;br /&gt;
== Debugger ==&lt;br /&gt;
If the problem can&#039;t be solved this way you can inspect what exactly your program &lt;br /&gt;
does [[BwHPC_BPG_Debugger|using a debugger]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;font color=green&amp;gt;To use the debugger properly with your program you have to compile it with debug information (option -g)&amp;lt;/font&amp;gt;:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;Example&amp;lt;/u&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;$ icc -g hello.c -o hello&amp;lt;/pre&amp;gt;&lt;br /&gt;
Although -Wall should always be set, the -g option should only be stated when you want&lt;br /&gt;
to find bugs, since it may slow down execution and enlarges the binary due&lt;br /&gt;
to debugging symbols.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Optimization ==&lt;br /&gt;
The usual and common way to compile your source is to apply compiler optimization.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Since there are many optimization options, as a stzart for now the &amp;lt;font color=green&amp;gt;optimization level -O2&amp;lt;/font&amp;gt; is recommended:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ icc -O2 hello.c -o hello&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;font color=red&amp;gt;Beware:&amp;lt;/font&amp;gt;&amp;amp;nbsp;The optimization-flag used is a capital-O (like Otto) and not a 0 (Zero)!&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Both compilers offer a multitude of options (with regard to the above and others), &lt;br /&gt;
one may check the complete list of options with short explanation on [[GCC|GCC]] and &lt;br /&gt;
[[Intel_Compiler|Intel Suite]] using option &#039;&#039;&#039;-v&#039;&#039;&#039; &#039;&#039;&#039;--help&#039;&#039;&#039;:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ icc -v --help hello.c -o hello&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
= Makefile =&lt;br /&gt;
If you&#039;re working in a project that already uses make, there should be a file called Makefile in the top-level directory.&lt;br /&gt;
Running:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ make&amp;lt;/pre&amp;gt; &lt;br /&gt;
should build the project from source.&lt;br /&gt;
== What is make? ==&lt;br /&gt;
Make is a tool designed to manage dependencies in a build process.&lt;br /&gt;
== Simple Makefile for hello.c ==&lt;br /&gt;
For instance, if you have a source file called &#039;&#039;hello.c&#039;&#039; and you need to build  &lt;br /&gt;
the binary/executable &#039;&#039;hello&#039;&#039;, then you might have a Makefile in the same &lt;br /&gt;
directory that looks like this:&lt;br /&gt;
&amp;lt;source lang=make style=&amp;quot;font: normal normal 2em monospace&amp;quot;&amp;gt; &lt;br /&gt;
# define the C compiler to use&lt;br /&gt;
# you do not need this if you load the compiler module first&lt;br /&gt;
# # CC      = icc &lt;br /&gt;
&lt;br /&gt;
# define any compile-time flags&lt;br /&gt;
#    -g    # adds debugging information to the executable file&lt;br /&gt;
#    -O2   # optimization level 2&lt;br /&gt;
#    -Wall # turns on most, but not all, compiler warnings&lt;br /&gt;
CFLAGS  = -g -O2 -Wall&lt;br /&gt;
&lt;br /&gt;
# unix/linux removal command used for &#039;make clean&#039;&lt;br /&gt;
RM      = rm -f&lt;br /&gt;
&lt;br /&gt;
# the build target executable&lt;br /&gt;
# use a variable if you&#039;d like to rename the binary later&lt;br /&gt;
TARGET = hello&lt;br /&gt;
&lt;br /&gt;
# default action when make was invoked without options&lt;br /&gt;
default: all&lt;br /&gt;
&lt;br /&gt;
# starts section beginning with :hello  -&amp;gt; :hello = :$(TARGET)&lt;br /&gt;
all: $(TARGET)&lt;br /&gt;
&lt;br /&gt;
# main build section of this Makefile&lt;br /&gt;
# same as: hello: hello.c&lt;br /&gt;
#    $(CC) $(CFLAGS) -o hello hello.c&lt;br /&gt;
$(TARGET): $(TARGET).c&lt;br /&gt;
      $(CC) $(CFLAGS) -o $(TARGET) $(TARGET).c&lt;br /&gt;
&lt;br /&gt;
# clean all garbage with &#039;make clean&#039; oder &#039;make veryclean&#039;&lt;br /&gt;
clean veryclean:&lt;br /&gt;
      $(RM) $(TARGET) $(TARGET).o&lt;br /&gt;
&lt;br /&gt;
# run the programm with &#039;make run&#039;&lt;br /&gt;
run:&lt;br /&gt;
      ./$(TARGET)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
When ordered to build a file, make will ensure that all dependencies are up to date, and it will not rebuild any those which need not be rebuilt.&lt;br /&gt;
&lt;br /&gt;
== Load Compiler Environments ==&lt;br /&gt;
Another makefile &amp;lt;small&amp;gt;(using makedepend and more advanced make syntax)&amp;lt;/small&amp;gt;.&lt;br /&gt;
Here we use the GNU-C-Compiler.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$module load compiler/gnu&lt;br /&gt;
$ module list&lt;br /&gt;
Currently Loaded Modulefiles:&lt;br /&gt;
  1) compiler/gnu/4.7(default)&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
A list of all defined environments set by the &#039;module load&#039;-command can be&lt;br /&gt;
displayed by: &#039;module show compiler/gnu&#039; (e.g. GNU compiler).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module show compiler/gnu&lt;br /&gt;
-------------------------------------------------------------------&lt;br /&gt;
/opt/bwhpc/common/modulefiles/compiler/gnu/4.7:&lt;br /&gt;
[...]&lt;br /&gt;
setenv		 GNU_VERSION 4.7.3 &lt;br /&gt;
setenv		 GNU_HOME /opt/bwhpc/common/compiler/gnu/4.7.3/x86_64 &lt;br /&gt;
setenv		 GNU_BIN_DIR /opt/bwhpc/common/compiler/gnu/4.7.3/x86_64/bin &lt;br /&gt;
setenv		 GNU_MAN_DIR /opt/bwhpc/common/compiler/gnu/4.7.3/x86_64/share/man &lt;br /&gt;
setenv		 GNU_LIB_DIR /opt/bwhpc/common/compiler/gnu/4.7.3/x86_64/lib64 &lt;br /&gt;
prepend-path	 PATH /opt/bwhpc/common/compiler/gnu/4.7.3/x86_64/bin &lt;br /&gt;
prepend-path	 MANPATH /opt/bwhpc/common/compiler/gnu/4.7.3/x86_64/share/man &lt;br /&gt;
prepend-path	 LD_RUN_PATH /opt/bwhpc/common/compiler/gnu/4.7.3/x86_64/lib &lt;br /&gt;
prepend-path	 LD_LIBRARY_PATH /opt/bwhpc/common/compiler/gnu/4.7.3/x86_64/lib &lt;br /&gt;
prepend-path	 LD_RUN_PATH /opt/bwhpc/common/compiler/gnu/4.7.3/x86_64/lib64 &lt;br /&gt;
prepend-path	 LD_LIBRARY_PATH /opt/bwhpc/common/compiler/gnu/4.7.3/x86_64/lib64 &lt;br /&gt;
setenv		 CC gcc &lt;br /&gt;
setenv		 CXX g++ &lt;br /&gt;
setenv		 F77 gfortran &lt;br /&gt;
setenv		 FC gfortran &lt;br /&gt;
setenv		 F90 gfortran &lt;br /&gt;
[...]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
== Advaneced Makefile Examples ==&lt;br /&gt;
This envs may be used in your local Makefile.&lt;br /&gt;
&amp;lt;source lang=make style=&amp;quot;font: normal normal 2em monospace&amp;quot;&amp;gt; &lt;br /&gt;
#&lt;br /&gt;
# &#039;make depend&#039; uses makedepend to automatically generate dependencies &lt;br /&gt;
#               (dependencies are added to end of Makefile)&lt;br /&gt;
# &#039;make&#039;        build executable file &#039;mycc&#039;&lt;br /&gt;
# &#039;make clean&#039;  removes all .o and executable files&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
# define the C compiler to use. &lt;br /&gt;
# CC is set by the &#039;module load&#039;-command so it&#039;s unnecessary here.&lt;br /&gt;
# # CC = gcc&lt;br /&gt;
&lt;br /&gt;
# define any compile-time flags&lt;br /&gt;
CFLAGS = -Wall -g -O2&lt;br /&gt;
&lt;br /&gt;
# define any directories containing header files other than /usr/include&lt;br /&gt;
#&lt;br /&gt;
INCLUDES = -I/home/newhall/include &lt;br /&gt;
#  -I../include -I$(GNU_INC_DIR)  (example)&lt;br /&gt;
&lt;br /&gt;
# define library paths in addition to /usr/lib&lt;br /&gt;
#   if I wanted to include libraries not in /usr/lib I&#039;d specify&lt;br /&gt;
#   their path using -Lpath, something like:&lt;br /&gt;
LFLAGS = -L/home/newhall/lib  -L../lib&lt;br /&gt;
&lt;br /&gt;
# define any libraries to link into executable:&lt;br /&gt;
#   if I want to link in libraries (libx.so or libx.a) I use the -llibname &lt;br /&gt;
#   option, something like (this will link in libmylib.so and libm.so:&lt;br /&gt;
LIBS = -l$(GNU_LIB_DIR) -lmylib -lm &lt;br /&gt;
&lt;br /&gt;
# define the C source files (examples only)&lt;br /&gt;
SRCS = emitter.c error.c init.c lexer.c main.c symbol.c parser.c&lt;br /&gt;
&lt;br /&gt;
# define the C object files &lt;br /&gt;
#&lt;br /&gt;
# This uses Suffix Replacement within a macro:&lt;br /&gt;
#   $(name:string1=string2)&lt;br /&gt;
#         For each word in &#039;name&#039; replace &#039;string1&#039; with &#039;string2&#039;&lt;br /&gt;
# Below we are replacing the suffix .c of all words in the macro SRCS&lt;br /&gt;
# with the .o suffix&lt;br /&gt;
#&lt;br /&gt;
OBJS = $(SRCS:.c=.o)&lt;br /&gt;
&lt;br /&gt;
# define the executable file &lt;br /&gt;
MAIN = mycc&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# The following part of the makefile is generic; it can be used to &lt;br /&gt;
# build any executable just by changing the definitions above and by&lt;br /&gt;
# deleting dependencies appended to the file from &#039;make depend&#039;&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
.PHONY: depend clean&lt;br /&gt;
&lt;br /&gt;
all:    $(MAIN)&lt;br /&gt;
        @echo  Simple compiler named mycc has been compiled&lt;br /&gt;
&lt;br /&gt;
$(MAIN): $(OBJS) &lt;br /&gt;
        $(CC) $(CFLAGS) $(INCLUDES) -o $(MAIN) $(OBJS) $(LFLAGS) $(LIBS)&lt;br /&gt;
&lt;br /&gt;
# this is a suffix replacement rule for building .o&#039;s from .c&#039;s&lt;br /&gt;
# it uses automatic variables $&amp;lt;: the name of the prerequisite of&lt;br /&gt;
# the rule(a .c file) and $@: the name of the target of the rule (a .o file) &lt;br /&gt;
# (see the gnu make manual section about automatic variables)&lt;br /&gt;
.c.o:&lt;br /&gt;
        $(CC) $(CFLAGS) $(INCLUDES) -c $&amp;lt;  -o $@&lt;br /&gt;
&lt;br /&gt;
clean:&lt;br /&gt;
        $(RM) *.o *~ $(MAIN)&lt;br /&gt;
&lt;br /&gt;
depend: $(SRCS)&lt;br /&gt;
        makedepend $(INCLUDES) $^&lt;br /&gt;
&lt;br /&gt;
# DO NOT DELETE THIS LINE -- make depend needs it&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
This is an excerpt from the CIS makefile to show how you can do branchings in a makefile.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
We use the shell-command &#039;&#039;&#039;$(shell uname -s)&#039;&#039;&#039;  to determine the machine is a Linux.&lt;br /&gt;
&amp;lt;source lang=make style=&amp;quot;font: normal normal 2em monospace&amp;quot;&amp;gt; &lt;br /&gt;
[...]&lt;br /&gt;
#&lt;br /&gt;
# LINUX system&lt;br /&gt;
#&lt;br /&gt;
UNAME_S := $(shell uname -s)&lt;br /&gt;
ifeq ($(UNAME_S),Linux)&lt;br /&gt;
   LDFLAGS=-g -m32  -lm -lcrypt&lt;br /&gt;
   CFLAGS=-g -Wimplicit -Wunused -Wformat -Werror -Wreturn-type \&lt;br /&gt;
   -Wmissing-prototypes -m32 -funsigned-char -Wno-parentheses \&lt;br /&gt;
   -D_XOPEN_SOURCE -D_GNU_SOURCE -Wno-pointer-sign -Wno-unused-but-set-variable&lt;br /&gt;
endif&lt;br /&gt;
#&lt;br /&gt;
# MAC-OS&lt;br /&gt;
#&lt;br /&gt;
ifeq ($(UNAME_S),Darwin)&lt;br /&gt;
....... &lt;br /&gt;
[...]&lt;br /&gt;
OBJ=db/db.o db/app.o db/w3tool.o db/w3lib.o db/maildecode.o&lt;br /&gt;
ALL=.dependent db.c w3dbs cis svnout x tools&lt;br /&gt;
SRC=db.c app.c w3tool.c w3lib.c  cis.c x.c maildecode.c&lt;br /&gt;
&lt;br /&gt;
db/%.o: %.c&lt;br /&gt;
   @echo &amp;quot;compile $&amp;lt; ...&amp;quot;&lt;br /&gt;
   @$(CC) $(CFLAGS) -c $&amp;lt; -o $@&lt;br /&gt;
&lt;br /&gt;
[...]&lt;br /&gt;
&lt;br /&gt;
all: $(ALL)&lt;br /&gt;
clean:&lt;br /&gt;
   @echo &amp;quot;cleaning ...&amp;quot;&lt;br /&gt;
   @rm -rf *.o $(ALL) core tags db.h db.c html/model.html a.out gmon.out core.* x tools svnout w3lib.tgz *.dSYM *.gcno *.gcda *.gcov g* .dependent $(OBJ)&lt;br /&gt;
&lt;br /&gt;
cis: db/cis.o $(OBJ)&lt;br /&gt;
   @echo &amp;quot;building cis ...&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Makefile structure ==&lt;br /&gt;
Makefiles contain definitions and rules.&lt;br /&gt;
* A definition has the form:&amp;lt;br&amp;gt;&lt;br /&gt;
VAR=value&lt;br /&gt;
* A rule has the form: &amp;lt;br&amp;gt;&lt;br /&gt;
output files: input files&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;TAB&amp;gt;&amp;lt;TAB&amp;gt;commands to turn inputs to outputs&lt;br /&gt;
* All commands must be &amp;lt;font color=green&amp;gt;tab-indented&amp;lt;/font&amp;gt;.&lt;br /&gt;
* # are marking the beginning of a comment. Rest of the line will be ignored.&lt;br /&gt;
* To reference the variable VAR, surround it with &amp;lt;font color=green&amp;gt;$(VAR)&amp;lt;/font&amp;gt;. &lt;br /&gt;
* Try running &#039;&#039;&#039;&#039;man make&#039;&#039;&#039;&#039; for more details.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;TAB&amp;gt; = Tabulator&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[Category:Compiler_software]][[Category:bwUniCluster]][[Category:bwForCluster_Chemistry]][[Category:BwForCluster_BinAC]][[Category:bwForCluster_MLS&amp;amp;WISO_Production]]&lt;/div&gt;</summary>
		<author><name>R Rutka</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=Development/General_compiler_usage&amp;diff=4524</id>
		<title>Development/General compiler usage</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=Development/General_compiler_usage&amp;diff=4524"/>
		<updated>2016-11-03T16:41:56Z</updated>

		<summary type="html">&lt;p&gt;R Rutka: /* GNU */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=600px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Description !! Content&lt;br /&gt;
|-&lt;br /&gt;
| module load&lt;br /&gt;
| compiler/gnu&amp;amp;#124;intel&amp;amp;#124;pgi&amp;amp;#124;...  &lt;br /&gt;
|-&lt;br /&gt;
| License&lt;br /&gt;
| [[Intel_Compiler|Intel]]: Commercial &amp;amp;#124; [[GCC|GNU]]: GPL &amp;amp;#124; PGI: Commercial&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
= Description = &lt;br /&gt;
The basic operations can be performed with the same commands for all available compilers. For advanced usage such as optimization and profiling you should consult the best practice guide of the compiler you intend to use ([[BwHPC_BPG_Compiler#GCC|GCC]], [[BwHPC_BPG_Compiler#Intel Suite|Intel Suite]]).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
More information about the MPI versions of the GNU and Intel Compilers is available here:&lt;br /&gt;
* [[BwHPC_BPG_for_Parallel_Programming|Best Practices Guide for Parallel Programming]].&lt;br /&gt;
&lt;br /&gt;
= Versions and Availability =&lt;br /&gt;
A list of versions currently available compilers on the bwHPC-C5-Clusters can be obtained from the&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;big&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[https://cis-hpc.uni-konstanz.de/prod.cis/ Cluster Information System CIS]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/big&amp;gt;&lt;br /&gt;
== GNU ==&lt;br /&gt;
{{#widget:Iframe&lt;br /&gt;
|url=https://cis-hpc.uni-konstanz.de/prod.cis/bwUniCluster/compiler/gnu&lt;br /&gt;
|width=99%&lt;br /&gt;
|height=800&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Intel ==&lt;br /&gt;
{{#widget:Iframe&lt;br /&gt;
|url=https://cis-hpc.uni-konstanz.de/prod.cis/bwUniCluster/compiler/intel&lt;br /&gt;
|width=99%&lt;br /&gt;
|height=770&lt;br /&gt;
}}&lt;br /&gt;
== PGI ==&lt;br /&gt;
{{#widget:Iframe&lt;br /&gt;
|url=https://cis-hpc.uni-konstanz.de/prod.cis/bwUniCluster/compiler/pgi&lt;br /&gt;
|width=99%&lt;br /&gt;
|height=200&lt;br /&gt;
}}&lt;br /&gt;
On the command line interface of any bwHPC cluster you&#039;ll get a list of available versions &lt;br /&gt;
by using the command &amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;&#039;module avail compiler&#039;&#039;&#039;&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ : bwUniCluster&lt;br /&gt;
$ module avail compiler&lt;br /&gt;
---------------------- /opt/bwhpc/common/modulefiles -----------------------&lt;br /&gt;
compiler/gnu/4.5             compiler/intel/12.1&lt;br /&gt;
compiler/gnu/4.7(default)    compiler/intel/13.1&lt;br /&gt;
compiler/gnu/4.8             compiler/intel/14.0&lt;br /&gt;
compiler/gnu/4.9             compiler/intel/15.0(default)&lt;br /&gt;
compiler/gnu/5.2&lt;br /&gt;
$ : bwForCluster (Justus)&lt;br /&gt;
$ module avail compiler&lt;br /&gt;
---------------------- /opt/bwhpc/common/modulefiles -----------------------&lt;br /&gt;
compiler/gnu/4.5             compiler/intel/15.0(default)&lt;br /&gt;
compiler/gnu/4.7(default)    compiler/pgi/12.10(default)&lt;br /&gt;
compiler/gnu/4.8             compiler/pgi/12.10_static&lt;br /&gt;
compiler/gnu/4.9             compiler/pgi/13.7&lt;br /&gt;
compiler/gnu/5.2             compiler/pgi/13.7_static&lt;br /&gt;
compiler/intel/12.1          compiler/pgi/14.10&lt;br /&gt;
compiler/intel/13.1          compiler/pgi/14.10_static&lt;br /&gt;
compiler/intel/14.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Loading the module =&lt;br /&gt;
== Default Version ==&lt;br /&gt;
You can load the default version of the a compiler with the command&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;module load compiler&#039;&#039;&#039;/&#039;&#039;&#039;name-of-the-compiler-suite&#039;&#039;&#039;.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;Example with Intel on bwUniCluster&amp;lt;/u&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module avail compiler/intel&lt;br /&gt;
---------------------- /opt/bwhpc/common/modulefiles -----------------------&lt;br /&gt;
compiler/intel/12.1          compiler/intel/14.0&lt;br /&gt;
compiler/intel/13.1          compiler/intel/15.0(default)&lt;br /&gt;
$ module load compiler/intel&lt;br /&gt;
$ module list&lt;br /&gt;
Currently Loaded Modulefiles:&lt;br /&gt;
  1) compiler/intel/15.0(default)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here, we got the &amp;quot;default&amp;quot; version 15.0 (example).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The module will try to load modules it needs to function. &lt;br /&gt;
If loading the module fails, check if you have already loaded the module with &#039;&#039;&#039;&#039;module list&#039;&#039;&#039;&#039;.&lt;br /&gt;
== Specific (newer or older) Version ==&lt;br /&gt;
If you wish to load a specific compiler version and release (if available), you can do so using&amp;lt;br&amp;gt; &lt;br /&gt;
&#039;&#039;&#039;module load compiler&#039;&#039;/&#039;&#039;name-of-the-compiler-suite&#039;&#039;/&#039;&#039;version-of-the-compiler-suite&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
to load the version you desires.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;Example with Intel compiler, version 14.0 on bwUniCluster&amp;lt;/u&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module avail compiler/intel&lt;br /&gt;
---------------------- /opt/bwhpc/common/modulefiles -----------------------&lt;br /&gt;
compiler/intel/12.1          compiler/intel/14.0&lt;br /&gt;
compiler/intel/13.1          compiler/intel/15.0(default)&lt;br /&gt;
$ module load compiler/intel/14.0&lt;br /&gt;
$ module list&lt;br /&gt;
Currently Loaded Modulefiles:&lt;br /&gt;
  1) compiler/intel/14.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Intel C-Compiler &amp;quot;version 14.0&amp;quot; is loaded now (example).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
All Intel, GCC and PGI have compilers for different languages which will be available &lt;br /&gt;
after the module is loaded.&lt;br /&gt;
== Linux  Original Compiler ==&lt;br /&gt;
The original Compiler installed on all compute nodes is GNU.&lt;br /&gt;
* Don&#039;t get distracted with the available compiler modules.&lt;br /&gt;
* Only the modules are loading the complete environments needed.  &lt;br /&gt;
&amp;lt;u&amp;gt;Example&amp;lt;/u&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module clear                     # unload all modules&lt;br /&gt;
Are you sure you want to clear all loaded modules!? [n] y&lt;br /&gt;
$ module list                      # control&lt;br /&gt;
No Modulefiles Currently Loaded.&lt;br /&gt;
$ gcc --version                    # see version of default Linux GNU compiler&lt;br /&gt;
gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-16)&lt;br /&gt;
[...]&lt;br /&gt;
$ module load compiler/gnu         # load default GNU compiler module&lt;br /&gt;
$ module list                      # control&lt;br /&gt;
Currently Loaded Modulefiles:&lt;br /&gt;
  1) compiler/gnu/4.7(default)&lt;br /&gt;
$ gcc --version                    # now, check the current (loaded) module&lt;br /&gt;
gcc (GCC) 4.7.3 &lt;br /&gt;
[...]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
= Synoptical Tables =&lt;br /&gt;
== Compilers (no MPI) == &lt;br /&gt;
{| width=600px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Compiler Suite&lt;br /&gt;
! Language&lt;br /&gt;
! Command&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;vertical-align:top;&amp;quot; rowspan=&amp;quot;3&amp;quot; | &amp;lt;font color=green&amp;gt;&amp;lt;big&amp;gt;Intel Composer&amp;lt;/big&amp;gt;&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt; [[Intel_Compiler|&amp;amp;bull;&amp;amp;nbsp;Best Practice Guides on Intel Compiler Software]] &lt;br /&gt;
| C&lt;br /&gt;
| icc&lt;br /&gt;
|-&lt;br /&gt;
| C++&lt;br /&gt;
| icpc&lt;br /&gt;
|-&lt;br /&gt;
| Fortran&lt;br /&gt;
| ifort&lt;br /&gt;
|- &lt;br /&gt;
| style=&amp;quot;vertical-align:top;&amp;quot; rowspan=&amp;quot;3&amp;quot; | &amp;lt;font color=green&amp;gt;&amp;lt;big&amp;gt;GCC&amp;lt;/big&amp;gt;&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt; [[GCC|&amp;amp;bull;&amp;amp;nbsp;Best Practice Guides on GNU Compiler Software]]&lt;br /&gt;
| C&lt;br /&gt;
| gcc&lt;br /&gt;
|-&lt;br /&gt;
| C++&lt;br /&gt;
| g++&lt;br /&gt;
|-&lt;br /&gt;
| Fortran&lt;br /&gt;
| gfortran&lt;br /&gt;
|- &lt;br /&gt;
| style=&amp;quot;vertical-align:top;&amp;quot; rowspan=&amp;quot;3&amp;quot; | &amp;lt;font color=green&amp;gt;&amp;lt;big&amp;gt;PGI&amp;lt;/big&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
| C&lt;br /&gt;
| pgcc&lt;br /&gt;
|-&lt;br /&gt;
| C++&lt;br /&gt;
| pgCC&lt;br /&gt;
|-&lt;br /&gt;
| Fortran 77/90&lt;br /&gt;
| pgf77 or pgf90&lt;br /&gt;
|}&lt;br /&gt;
== MPI compiler and Underlying Compilers ==&lt;br /&gt;
The following table lists available MPI compiler commands and the underlying compilers, compiler families, languages, and application binary interfaces (ABIs) that they support.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| width=600px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! MPI Compiler Command !! Default Compiler !! Supported Language(s) !! Supported ABI&#039;s&lt;br /&gt;
|-&lt;br /&gt;
| colspan=4 style=&amp;quot;background-color:#DCDCDC;&amp;quot; | Generic Compilers &lt;br /&gt;
|-&lt;br /&gt;
| mpicc || gcc, cc  || C || 32/64 bit &lt;br /&gt;
|-&lt;br /&gt;
| mpicxx || g++ || C/C++ || 32/64 bit &lt;br /&gt;
|-&lt;br /&gt;
| mpifc || gfortran || Fortran77/Fortran 95 || 32/64 bit&lt;br /&gt;
|-&lt;br /&gt;
| colspan=4 style=&amp;quot;background-color:#DCDCDC;&amp;quot; | [[GCC|GNU Compiler]] Versions 3 and higher &lt;br /&gt;
|-&lt;br /&gt;
| mpigcc || gcc || C || 32/64 bit &lt;br /&gt;
|-&lt;br /&gt;
| mpigxx || g++  || C/C++ || 32/64 bit &lt;br /&gt;
|-&lt;br /&gt;
| mpif77 || g77 || Fortran 77 || 32/64 bit &lt;br /&gt;
|-&lt;br /&gt;
| mpif90 || gfortran || Fortran 95 || 32/64 bit&lt;br /&gt;
|-&lt;br /&gt;
| colspan=4 style=&amp;quot;background-color:#DCDCDC;&amp;quot; | [[Intel_Compiler|Intel Fortran, C++ Compilers]] Versions 13.1 through 14.0 and Higher&lt;br /&gt;
|-&lt;br /&gt;
| mpiicc || icc || C || 32/64 bit &lt;br /&gt;
|-&lt;br /&gt;
| mpiicpc || icpc || C++ || 32/64 bit &lt;br /&gt;
|-&lt;br /&gt;
|impiifort  || ifort || Fortran77/Fortran 95 || 32/64 bit &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= How to use =&lt;br /&gt;
The following compiler commands work for all the compilers in the list above even though&lt;br /&gt;
the examples will be for &#039;&#039;&#039;icc&#039;&#039;&#039; only. &lt;br /&gt;
== Commands ==&lt;br /&gt;
When &#039;&#039;hello.c&#039;&#039; is a C source code file such as&lt;br /&gt;
&amp;lt;source lang=C style=&amp;quot;font: normal normal 2em monospace&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
int main() {&lt;br /&gt;
    printf(&amp;quot;Hello world\n&amp;quot;);&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
it can be compiled and linked with the single command&lt;br /&gt;
&amp;lt;pre&amp;gt;$ icc hello.c -o hello&amp;lt;/pre&amp;gt;&lt;br /&gt;
to produce an executable named &#039;&#039;hello&#039;&#039;.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
This process can be divided into two steps:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ icc -c hello.c&lt;br /&gt;
$ icc hello.o -o hello&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
When using libraries you must sometimes specify where the &lt;br /&gt;
* include files are (option &#039;&#039;&#039;-I&#039;&#039;&#039;) and where the &lt;br /&gt;
* library files are (option &#039;&#039;&#039;-L&#039;&#039;&#039;). &lt;br /&gt;
In addition you have to tell the compiler which &lt;br /&gt;
* library you want to use (option &#039;&#039;&#039;-l&#039;&#039;&#039;). &lt;br /&gt;
For example after loading the module numlib/fftw you can compile code for fftw using&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ icc -c hello.c -I$FFTW_INC_DIR&lt;br /&gt;
$ icc hello.o -o hello -L$FFTW_LIB_DIR -lfftw3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
When the program crashes or doesn&#039;t produce the expected output the compiler can &lt;br /&gt;
help you by printing warning messages:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ icc -Wall hello.c -o hello&amp;lt;/pre&amp;gt;&lt;br /&gt;
== Debugger ==&lt;br /&gt;
If the problem can&#039;t be solved this way you can inspect what exactly your program &lt;br /&gt;
does [[BwHPC_BPG_Debugger|using a debugger]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;font color=green&amp;gt;To use the debugger properly with your program you have to compile it with debug information (option -g)&amp;lt;/font&amp;gt;:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;Example&amp;lt;/u&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;$ icc -g hello.c -o hello&amp;lt;/pre&amp;gt;&lt;br /&gt;
Although -Wall should always be set, the -g option should only be stated when you want&lt;br /&gt;
to find bugs, since it may slow down execution and enlarges the binary due&lt;br /&gt;
to debugging symbols.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Optimization ==&lt;br /&gt;
The usual and common way to compile your source is to apply compiler optimization.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Since there are many optimization options, as a stzart for now the &amp;lt;font color=green&amp;gt;optimization level -O2&amp;lt;/font&amp;gt; is recommended:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ icc -O2 hello.c -o hello&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;font color=red&amp;gt;Beware:&amp;lt;/font&amp;gt;&amp;amp;nbsp;The optimization-flag used is a capital-O (like Otto) and not a 0 (Zero)!&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Both compilers offer a multitude of options (with regard to the above and others), &lt;br /&gt;
one may check the complete list of options with short explanation on [[GCC|GCC]] and &lt;br /&gt;
[[Intel_Compiler|Intel Suite]] using option &#039;&#039;&#039;-v&#039;&#039;&#039; &#039;&#039;&#039;--help&#039;&#039;&#039;:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ icc -v --help hello.c -o hello&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
= Makefile =&lt;br /&gt;
If you&#039;re working in a project that already uses make, there should be a file called Makefile in the top-level directory.&lt;br /&gt;
Running:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ make&amp;lt;/pre&amp;gt; &lt;br /&gt;
should build the project from source.&lt;br /&gt;
== What is make? ==&lt;br /&gt;
Make is a tool designed to manage dependencies in a build process.&lt;br /&gt;
== Simple Makefile for hello.c ==&lt;br /&gt;
For instance, if you have a source file called &#039;&#039;hello.c&#039;&#039; and you need to build  &lt;br /&gt;
the binary/executable &#039;&#039;hello&#039;&#039;, then you might have a Makefile in the same &lt;br /&gt;
directory that looks like this:&lt;br /&gt;
&amp;lt;source lang=make style=&amp;quot;font: normal normal 2em monospace&amp;quot;&amp;gt; &lt;br /&gt;
# define the C compiler to use&lt;br /&gt;
# you do not need this if you load the compiler module first&lt;br /&gt;
# # CC      = icc &lt;br /&gt;
&lt;br /&gt;
# define any compile-time flags&lt;br /&gt;
#    -g    # adds debugging information to the executable file&lt;br /&gt;
#    -O2   # optimization level 2&lt;br /&gt;
#    -Wall # turns on most, but not all, compiler warnings&lt;br /&gt;
CFLAGS  = -g -O2 -Wall&lt;br /&gt;
&lt;br /&gt;
# unix/linux removal command used for &#039;make clean&#039;&lt;br /&gt;
RM      = rm -f&lt;br /&gt;
&lt;br /&gt;
# the build target executable&lt;br /&gt;
# use a variable if you&#039;d like to rename the binary later&lt;br /&gt;
TARGET = hello&lt;br /&gt;
&lt;br /&gt;
# default action when make was invoked without options&lt;br /&gt;
default: all&lt;br /&gt;
&lt;br /&gt;
# starts section beginning with :hello  -&amp;gt; :hello = :$(TARGET)&lt;br /&gt;
all: $(TARGET)&lt;br /&gt;
&lt;br /&gt;
# main build section of this Makefile&lt;br /&gt;
# same as: hello: hello.c&lt;br /&gt;
#    $(CC) $(CFLAGS) -o hello hello.c&lt;br /&gt;
$(TARGET): $(TARGET).c&lt;br /&gt;
      $(CC) $(CFLAGS) -o $(TARGET) $(TARGET).c&lt;br /&gt;
&lt;br /&gt;
# clean all garbage with &#039;make clean&#039; oder &#039;make veryclean&#039;&lt;br /&gt;
clean veryclean:&lt;br /&gt;
      $(RM) $(TARGET) $(TARGET).o&lt;br /&gt;
&lt;br /&gt;
# run the programm with &#039;make run&#039;&lt;br /&gt;
run:&lt;br /&gt;
      ./$(TARGET)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
When ordered to build a file, make will ensure that all dependencies are up to date, and it will not rebuild any those which need not be rebuilt.&lt;br /&gt;
&lt;br /&gt;
== Load Compiler Environments ==&lt;br /&gt;
Another makefile &amp;lt;small&amp;gt;(using makedepend and more advanced make syntax)&amp;lt;/small&amp;gt;.&lt;br /&gt;
Here we use the GNU-C-Compiler.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$module load compiler/gnu&lt;br /&gt;
$ module list&lt;br /&gt;
Currently Loaded Modulefiles:&lt;br /&gt;
  1) compiler/gnu/4.7(default)&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
A list of all defined environments set by the &#039;module load&#039;-command can be&lt;br /&gt;
displayed by: &#039;module show compiler/gnu&#039; (e.g. GNU compiler).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module show compiler/gnu&lt;br /&gt;
-------------------------------------------------------------------&lt;br /&gt;
/opt/bwhpc/common/modulefiles/compiler/gnu/4.7:&lt;br /&gt;
[...]&lt;br /&gt;
setenv		 GNU_VERSION 4.7.3 &lt;br /&gt;
setenv		 GNU_HOME /opt/bwhpc/common/compiler/gnu/4.7.3/x86_64 &lt;br /&gt;
setenv		 GNU_BIN_DIR /opt/bwhpc/common/compiler/gnu/4.7.3/x86_64/bin &lt;br /&gt;
setenv		 GNU_MAN_DIR /opt/bwhpc/common/compiler/gnu/4.7.3/x86_64/share/man &lt;br /&gt;
setenv		 GNU_LIB_DIR /opt/bwhpc/common/compiler/gnu/4.7.3/x86_64/lib64 &lt;br /&gt;
prepend-path	 PATH /opt/bwhpc/common/compiler/gnu/4.7.3/x86_64/bin &lt;br /&gt;
prepend-path	 MANPATH /opt/bwhpc/common/compiler/gnu/4.7.3/x86_64/share/man &lt;br /&gt;
prepend-path	 LD_RUN_PATH /opt/bwhpc/common/compiler/gnu/4.7.3/x86_64/lib &lt;br /&gt;
prepend-path	 LD_LIBRARY_PATH /opt/bwhpc/common/compiler/gnu/4.7.3/x86_64/lib &lt;br /&gt;
prepend-path	 LD_RUN_PATH /opt/bwhpc/common/compiler/gnu/4.7.3/x86_64/lib64 &lt;br /&gt;
prepend-path	 LD_LIBRARY_PATH /opt/bwhpc/common/compiler/gnu/4.7.3/x86_64/lib64 &lt;br /&gt;
setenv		 CC gcc &lt;br /&gt;
setenv		 CXX g++ &lt;br /&gt;
setenv		 F77 gfortran &lt;br /&gt;
setenv		 FC gfortran &lt;br /&gt;
setenv		 F90 gfortran &lt;br /&gt;
[...]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
== Advaneced Makefile Examples ==&lt;br /&gt;
This envs may be used in your local Makefile.&lt;br /&gt;
&amp;lt;source lang=make style=&amp;quot;font: normal normal 2em monospace&amp;quot;&amp;gt; &lt;br /&gt;
#&lt;br /&gt;
# &#039;make depend&#039; uses makedepend to automatically generate dependencies &lt;br /&gt;
#               (dependencies are added to end of Makefile)&lt;br /&gt;
# &#039;make&#039;        build executable file &#039;mycc&#039;&lt;br /&gt;
# &#039;make clean&#039;  removes all .o and executable files&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
# define the C compiler to use. &lt;br /&gt;
# CC is set by the &#039;module load&#039;-command so it&#039;s unnecessary here.&lt;br /&gt;
# # CC = gcc&lt;br /&gt;
&lt;br /&gt;
# define any compile-time flags&lt;br /&gt;
CFLAGS = -Wall -g -O2&lt;br /&gt;
&lt;br /&gt;
# define any directories containing header files other than /usr/include&lt;br /&gt;
#&lt;br /&gt;
INCLUDES = -I/home/newhall/include &lt;br /&gt;
#  -I../include -I$(GNU_INC_DIR)  (example)&lt;br /&gt;
&lt;br /&gt;
# define library paths in addition to /usr/lib&lt;br /&gt;
#   if I wanted to include libraries not in /usr/lib I&#039;d specify&lt;br /&gt;
#   their path using -Lpath, something like:&lt;br /&gt;
LFLAGS = -L/home/newhall/lib  -L../lib&lt;br /&gt;
&lt;br /&gt;
# define any libraries to link into executable:&lt;br /&gt;
#   if I want to link in libraries (libx.so or libx.a) I use the -llibname &lt;br /&gt;
#   option, something like (this will link in libmylib.so and libm.so:&lt;br /&gt;
LIBS = -l$(GNU_LIB_DIR) -lmylib -lm &lt;br /&gt;
&lt;br /&gt;
# define the C source files (examples only)&lt;br /&gt;
SRCS = emitter.c error.c init.c lexer.c main.c symbol.c parser.c&lt;br /&gt;
&lt;br /&gt;
# define the C object files &lt;br /&gt;
#&lt;br /&gt;
# This uses Suffix Replacement within a macro:&lt;br /&gt;
#   $(name:string1=string2)&lt;br /&gt;
#         For each word in &#039;name&#039; replace &#039;string1&#039; with &#039;string2&#039;&lt;br /&gt;
# Below we are replacing the suffix .c of all words in the macro SRCS&lt;br /&gt;
# with the .o suffix&lt;br /&gt;
#&lt;br /&gt;
OBJS = $(SRCS:.c=.o)&lt;br /&gt;
&lt;br /&gt;
# define the executable file &lt;br /&gt;
MAIN = mycc&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# The following part of the makefile is generic; it can be used to &lt;br /&gt;
# build any executable just by changing the definitions above and by&lt;br /&gt;
# deleting dependencies appended to the file from &#039;make depend&#039;&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
.PHONY: depend clean&lt;br /&gt;
&lt;br /&gt;
all:    $(MAIN)&lt;br /&gt;
        @echo  Simple compiler named mycc has been compiled&lt;br /&gt;
&lt;br /&gt;
$(MAIN): $(OBJS) &lt;br /&gt;
        $(CC) $(CFLAGS) $(INCLUDES) -o $(MAIN) $(OBJS) $(LFLAGS) $(LIBS)&lt;br /&gt;
&lt;br /&gt;
# this is a suffix replacement rule for building .o&#039;s from .c&#039;s&lt;br /&gt;
# it uses automatic variables $&amp;lt;: the name of the prerequisite of&lt;br /&gt;
# the rule(a .c file) and $@: the name of the target of the rule (a .o file) &lt;br /&gt;
# (see the gnu make manual section about automatic variables)&lt;br /&gt;
.c.o:&lt;br /&gt;
        $(CC) $(CFLAGS) $(INCLUDES) -c $&amp;lt;  -o $@&lt;br /&gt;
&lt;br /&gt;
clean:&lt;br /&gt;
        $(RM) *.o *~ $(MAIN)&lt;br /&gt;
&lt;br /&gt;
depend: $(SRCS)&lt;br /&gt;
        makedepend $(INCLUDES) $^&lt;br /&gt;
&lt;br /&gt;
# DO NOT DELETE THIS LINE -- make depend needs it&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
This is an excerpt from the CIS makefile to show how you can do branchings in a makefile.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
We use the shell-command &#039;&#039;&#039;$(shell uname -s)&#039;&#039;&#039;  to determine the machine is a Linux.&lt;br /&gt;
&amp;lt;source lang=make style=&amp;quot;font: normal normal 2em monospace&amp;quot;&amp;gt; &lt;br /&gt;
[...]&lt;br /&gt;
#&lt;br /&gt;
# LINUX system&lt;br /&gt;
#&lt;br /&gt;
UNAME_S := $(shell uname -s)&lt;br /&gt;
ifeq ($(UNAME_S),Linux)&lt;br /&gt;
   LDFLAGS=-g -m32  -lm -lcrypt&lt;br /&gt;
   CFLAGS=-g -Wimplicit -Wunused -Wformat -Werror -Wreturn-type \&lt;br /&gt;
   -Wmissing-prototypes -m32 -funsigned-char -Wno-parentheses \&lt;br /&gt;
   -D_XOPEN_SOURCE -D_GNU_SOURCE -Wno-pointer-sign -Wno-unused-but-set-variable&lt;br /&gt;
endif&lt;br /&gt;
#&lt;br /&gt;
# MAC-OS&lt;br /&gt;
#&lt;br /&gt;
ifeq ($(UNAME_S),Darwin)&lt;br /&gt;
....... &lt;br /&gt;
[...]&lt;br /&gt;
OBJ=db/db.o db/app.o db/w3tool.o db/w3lib.o db/maildecode.o&lt;br /&gt;
ALL=.dependent db.c w3dbs cis svnout x tools&lt;br /&gt;
SRC=db.c app.c w3tool.c w3lib.c  cis.c x.c maildecode.c&lt;br /&gt;
&lt;br /&gt;
db/%.o: %.c&lt;br /&gt;
   @echo &amp;quot;compile $&amp;lt; ...&amp;quot;&lt;br /&gt;
   @$(CC) $(CFLAGS) -c $&amp;lt; -o $@&lt;br /&gt;
&lt;br /&gt;
[...]&lt;br /&gt;
&lt;br /&gt;
all: $(ALL)&lt;br /&gt;
clean:&lt;br /&gt;
   @echo &amp;quot;cleaning ...&amp;quot;&lt;br /&gt;
   @rm -rf *.o $(ALL) core tags db.h db.c html/model.html a.out gmon.out core.* x tools svnout w3lib.tgz *.dSYM *.gcno *.gcda *.gcov g* .dependent $(OBJ)&lt;br /&gt;
&lt;br /&gt;
cis: db/cis.o $(OBJ)&lt;br /&gt;
   @echo &amp;quot;building cis ...&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Makefile structure ==&lt;br /&gt;
Makefiles contain definitions and rules.&lt;br /&gt;
* A definition has the form:&amp;lt;br&amp;gt;&lt;br /&gt;
VAR=value&lt;br /&gt;
* A rule has the form: &amp;lt;br&amp;gt;&lt;br /&gt;
output files: input files&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;TAB&amp;gt;&amp;lt;TAB&amp;gt;commands to turn inputs to outputs&lt;br /&gt;
* All commands must be &amp;lt;font color=green&amp;gt;tab-indented&amp;lt;/font&amp;gt;.&lt;br /&gt;
* # are marking the beginning of a comment. Rest of the line will be ignored.&lt;br /&gt;
* To reference the variable VAR, surround it with &amp;lt;font color=green&amp;gt;$(VAR)&amp;lt;/font&amp;gt;. &lt;br /&gt;
* Try running &#039;&#039;&#039;&#039;man make&#039;&#039;&#039;&#039; for more details.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;TAB&amp;gt; = Tabulator&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[Category:Compiler_software]][[Category:bwUniCluster]][[Category:bwForCluster_Chemistry]][[Category:BwForCluster_BinAC]][[Category:bwForCluster_MLS&amp;amp;WISO_Production]]&lt;/div&gt;</summary>
		<author><name>R Rutka</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=Development/General_compiler_usage&amp;diff=4523</id>
		<title>Development/General compiler usage</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=Development/General_compiler_usage&amp;diff=4523"/>
		<updated>2016-11-03T16:41:37Z</updated>

		<summary type="html">&lt;p&gt;R Rutka: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=600px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Description !! Content&lt;br /&gt;
|-&lt;br /&gt;
| module load&lt;br /&gt;
| compiler/gnu&amp;amp;#124;intel&amp;amp;#124;pgi&amp;amp;#124;...  &lt;br /&gt;
|-&lt;br /&gt;
| License&lt;br /&gt;
| [[Intel_Compiler|Intel]]: Commercial &amp;amp;#124; [[GCC|GNU]]: GPL &amp;amp;#124; PGI: Commercial&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
= Description = &lt;br /&gt;
The basic operations can be performed with the same commands for all available compilers. For advanced usage such as optimization and profiling you should consult the best practice guide of the compiler you intend to use ([[BwHPC_BPG_Compiler#GCC|GCC]], [[BwHPC_BPG_Compiler#Intel Suite|Intel Suite]]).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
More information about the MPI versions of the GNU and Intel Compilers is available here:&lt;br /&gt;
* [[BwHPC_BPG_for_Parallel_Programming|Best Practices Guide for Parallel Programming]].&lt;br /&gt;
&lt;br /&gt;
= Versions and Availability =&lt;br /&gt;
A list of versions currently available compilers on the bwHPC-C5-Clusters can be obtained from the&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;big&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[https://cis-hpc.uni-konstanz.de/prod.cis/ Cluster Information System CIS]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/big&amp;gt;&lt;br /&gt;
== GNU ==&lt;br /&gt;
{{#widget:Iframe&lt;br /&gt;
|url=https://cis-hpc.uni-konstanz.de/prod.cis/bwUniCluster/compiler/gnu&lt;br /&gt;
|width=99%&lt;br /&gt;
|height=470&lt;br /&gt;
}}&lt;br /&gt;
== Intel ==&lt;br /&gt;
{{#widget:Iframe&lt;br /&gt;
|url=https://cis-hpc.uni-konstanz.de/prod.cis/bwUniCluster/compiler/intel&lt;br /&gt;
|width=99%&lt;br /&gt;
|height=770&lt;br /&gt;
}}&lt;br /&gt;
== PGI ==&lt;br /&gt;
{{#widget:Iframe&lt;br /&gt;
|url=https://cis-hpc.uni-konstanz.de/prod.cis/bwUniCluster/compiler/pgi&lt;br /&gt;
|width=99%&lt;br /&gt;
|height=200&lt;br /&gt;
}}&lt;br /&gt;
On the command line interface of any bwHPC cluster you&#039;ll get a list of available versions &lt;br /&gt;
by using the command &amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;&#039;module avail compiler&#039;&#039;&#039;&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ : bwUniCluster&lt;br /&gt;
$ module avail compiler&lt;br /&gt;
---------------------- /opt/bwhpc/common/modulefiles -----------------------&lt;br /&gt;
compiler/gnu/4.5             compiler/intel/12.1&lt;br /&gt;
compiler/gnu/4.7(default)    compiler/intel/13.1&lt;br /&gt;
compiler/gnu/4.8             compiler/intel/14.0&lt;br /&gt;
compiler/gnu/4.9             compiler/intel/15.0(default)&lt;br /&gt;
compiler/gnu/5.2&lt;br /&gt;
$ : bwForCluster (Justus)&lt;br /&gt;
$ module avail compiler&lt;br /&gt;
---------------------- /opt/bwhpc/common/modulefiles -----------------------&lt;br /&gt;
compiler/gnu/4.5             compiler/intel/15.0(default)&lt;br /&gt;
compiler/gnu/4.7(default)    compiler/pgi/12.10(default)&lt;br /&gt;
compiler/gnu/4.8             compiler/pgi/12.10_static&lt;br /&gt;
compiler/gnu/4.9             compiler/pgi/13.7&lt;br /&gt;
compiler/gnu/5.2             compiler/pgi/13.7_static&lt;br /&gt;
compiler/intel/12.1          compiler/pgi/14.10&lt;br /&gt;
compiler/intel/13.1          compiler/pgi/14.10_static&lt;br /&gt;
compiler/intel/14.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Loading the module =&lt;br /&gt;
== Default Version ==&lt;br /&gt;
You can load the default version of the a compiler with the command&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;module load compiler&#039;&#039;&#039;/&#039;&#039;&#039;name-of-the-compiler-suite&#039;&#039;&#039;.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;Example with Intel on bwUniCluster&amp;lt;/u&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module avail compiler/intel&lt;br /&gt;
---------------------- /opt/bwhpc/common/modulefiles -----------------------&lt;br /&gt;
compiler/intel/12.1          compiler/intel/14.0&lt;br /&gt;
compiler/intel/13.1          compiler/intel/15.0(default)&lt;br /&gt;
$ module load compiler/intel&lt;br /&gt;
$ module list&lt;br /&gt;
Currently Loaded Modulefiles:&lt;br /&gt;
  1) compiler/intel/15.0(default)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here, we got the &amp;quot;default&amp;quot; version 15.0 (example).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The module will try to load modules it needs to function. &lt;br /&gt;
If loading the module fails, check if you have already loaded the module with &#039;&#039;&#039;&#039;module list&#039;&#039;&#039;&#039;.&lt;br /&gt;
== Specific (newer or older) Version ==&lt;br /&gt;
If you wish to load a specific compiler version and release (if available), you can do so using&amp;lt;br&amp;gt; &lt;br /&gt;
&#039;&#039;&#039;module load compiler&#039;&#039;/&#039;&#039;name-of-the-compiler-suite&#039;&#039;/&#039;&#039;version-of-the-compiler-suite&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
to load the version you desires.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;Example with Intel compiler, version 14.0 on bwUniCluster&amp;lt;/u&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module avail compiler/intel&lt;br /&gt;
---------------------- /opt/bwhpc/common/modulefiles -----------------------&lt;br /&gt;
compiler/intel/12.1          compiler/intel/14.0&lt;br /&gt;
compiler/intel/13.1          compiler/intel/15.0(default)&lt;br /&gt;
$ module load compiler/intel/14.0&lt;br /&gt;
$ module list&lt;br /&gt;
Currently Loaded Modulefiles:&lt;br /&gt;
  1) compiler/intel/14.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Intel C-Compiler &amp;quot;version 14.0&amp;quot; is loaded now (example).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
All Intel, GCC and PGI have compilers for different languages which will be available &lt;br /&gt;
after the module is loaded.&lt;br /&gt;
== Linux  Original Compiler ==&lt;br /&gt;
The original Compiler installed on all compute nodes is GNU.&lt;br /&gt;
* Don&#039;t get distracted with the available compiler modules.&lt;br /&gt;
* Only the modules are loading the complete environments needed.  &lt;br /&gt;
&amp;lt;u&amp;gt;Example&amp;lt;/u&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module clear                     # unload all modules&lt;br /&gt;
Are you sure you want to clear all loaded modules!? [n] y&lt;br /&gt;
$ module list                      # control&lt;br /&gt;
No Modulefiles Currently Loaded.&lt;br /&gt;
$ gcc --version                    # see version of default Linux GNU compiler&lt;br /&gt;
gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-16)&lt;br /&gt;
[...]&lt;br /&gt;
$ module load compiler/gnu         # load default GNU compiler module&lt;br /&gt;
$ module list                      # control&lt;br /&gt;
Currently Loaded Modulefiles:&lt;br /&gt;
  1) compiler/gnu/4.7(default)&lt;br /&gt;
$ gcc --version                    # now, check the current (loaded) module&lt;br /&gt;
gcc (GCC) 4.7.3 &lt;br /&gt;
[...]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
= Synoptical Tables =&lt;br /&gt;
== Compilers (no MPI) == &lt;br /&gt;
{| width=600px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Compiler Suite&lt;br /&gt;
! Language&lt;br /&gt;
! Command&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;vertical-align:top;&amp;quot; rowspan=&amp;quot;3&amp;quot; | &amp;lt;font color=green&amp;gt;&amp;lt;big&amp;gt;Intel Composer&amp;lt;/big&amp;gt;&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt; [[Intel_Compiler|&amp;amp;bull;&amp;amp;nbsp;Best Practice Guides on Intel Compiler Software]] &lt;br /&gt;
| C&lt;br /&gt;
| icc&lt;br /&gt;
|-&lt;br /&gt;
| C++&lt;br /&gt;
| icpc&lt;br /&gt;
|-&lt;br /&gt;
| Fortran&lt;br /&gt;
| ifort&lt;br /&gt;
|- &lt;br /&gt;
| style=&amp;quot;vertical-align:top;&amp;quot; rowspan=&amp;quot;3&amp;quot; | &amp;lt;font color=green&amp;gt;&amp;lt;big&amp;gt;GCC&amp;lt;/big&amp;gt;&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt; [[GCC|&amp;amp;bull;&amp;amp;nbsp;Best Practice Guides on GNU Compiler Software]]&lt;br /&gt;
| C&lt;br /&gt;
| gcc&lt;br /&gt;
|-&lt;br /&gt;
| C++&lt;br /&gt;
| g++&lt;br /&gt;
|-&lt;br /&gt;
| Fortran&lt;br /&gt;
| gfortran&lt;br /&gt;
|- &lt;br /&gt;
| style=&amp;quot;vertical-align:top;&amp;quot; rowspan=&amp;quot;3&amp;quot; | &amp;lt;font color=green&amp;gt;&amp;lt;big&amp;gt;PGI&amp;lt;/big&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
| C&lt;br /&gt;
| pgcc&lt;br /&gt;
|-&lt;br /&gt;
| C++&lt;br /&gt;
| pgCC&lt;br /&gt;
|-&lt;br /&gt;
| Fortran 77/90&lt;br /&gt;
| pgf77 or pgf90&lt;br /&gt;
|}&lt;br /&gt;
== MPI compiler and Underlying Compilers ==&lt;br /&gt;
The following table lists available MPI compiler commands and the underlying compilers, compiler families, languages, and application binary interfaces (ABIs) that they support.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| width=600px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! MPI Compiler Command !! Default Compiler !! Supported Language(s) !! Supported ABI&#039;s&lt;br /&gt;
|-&lt;br /&gt;
| colspan=4 style=&amp;quot;background-color:#DCDCDC;&amp;quot; | Generic Compilers &lt;br /&gt;
|-&lt;br /&gt;
| mpicc || gcc, cc  || C || 32/64 bit &lt;br /&gt;
|-&lt;br /&gt;
| mpicxx || g++ || C/C++ || 32/64 bit &lt;br /&gt;
|-&lt;br /&gt;
| mpifc || gfortran || Fortran77/Fortran 95 || 32/64 bit&lt;br /&gt;
|-&lt;br /&gt;
| colspan=4 style=&amp;quot;background-color:#DCDCDC;&amp;quot; | [[GCC|GNU Compiler]] Versions 3 and higher &lt;br /&gt;
|-&lt;br /&gt;
| mpigcc || gcc || C || 32/64 bit &lt;br /&gt;
|-&lt;br /&gt;
| mpigxx || g++  || C/C++ || 32/64 bit &lt;br /&gt;
|-&lt;br /&gt;
| mpif77 || g77 || Fortran 77 || 32/64 bit &lt;br /&gt;
|-&lt;br /&gt;
| mpif90 || gfortran || Fortran 95 || 32/64 bit&lt;br /&gt;
|-&lt;br /&gt;
| colspan=4 style=&amp;quot;background-color:#DCDCDC;&amp;quot; | [[Intel_Compiler|Intel Fortran, C++ Compilers]] Versions 13.1 through 14.0 and Higher&lt;br /&gt;
|-&lt;br /&gt;
| mpiicc || icc || C || 32/64 bit &lt;br /&gt;
|-&lt;br /&gt;
| mpiicpc || icpc || C++ || 32/64 bit &lt;br /&gt;
|-&lt;br /&gt;
|impiifort  || ifort || Fortran77/Fortran 95 || 32/64 bit &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= How to use =&lt;br /&gt;
The following compiler commands work for all the compilers in the list above even though&lt;br /&gt;
the examples will be for &#039;&#039;&#039;icc&#039;&#039;&#039; only. &lt;br /&gt;
== Commands ==&lt;br /&gt;
When &#039;&#039;hello.c&#039;&#039; is a C source code file such as&lt;br /&gt;
&amp;lt;source lang=C style=&amp;quot;font: normal normal 2em monospace&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
int main() {&lt;br /&gt;
    printf(&amp;quot;Hello world\n&amp;quot;);&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
it can be compiled and linked with the single command&lt;br /&gt;
&amp;lt;pre&amp;gt;$ icc hello.c -o hello&amp;lt;/pre&amp;gt;&lt;br /&gt;
to produce an executable named &#039;&#039;hello&#039;&#039;.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
This process can be divided into two steps:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ icc -c hello.c&lt;br /&gt;
$ icc hello.o -o hello&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
When using libraries you must sometimes specify where the &lt;br /&gt;
* include files are (option &#039;&#039;&#039;-I&#039;&#039;&#039;) and where the &lt;br /&gt;
* library files are (option &#039;&#039;&#039;-L&#039;&#039;&#039;). &lt;br /&gt;
In addition you have to tell the compiler which &lt;br /&gt;
* library you want to use (option &#039;&#039;&#039;-l&#039;&#039;&#039;). &lt;br /&gt;
For example after loading the module numlib/fftw you can compile code for fftw using&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ icc -c hello.c -I$FFTW_INC_DIR&lt;br /&gt;
$ icc hello.o -o hello -L$FFTW_LIB_DIR -lfftw3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
When the program crashes or doesn&#039;t produce the expected output the compiler can &lt;br /&gt;
help you by printing warning messages:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ icc -Wall hello.c -o hello&amp;lt;/pre&amp;gt;&lt;br /&gt;
== Debugger ==&lt;br /&gt;
If the problem can&#039;t be solved this way you can inspect what exactly your program &lt;br /&gt;
does [[BwHPC_BPG_Debugger|using a debugger]].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;font color=green&amp;gt;To use the debugger properly with your program you have to compile it with debug information (option -g)&amp;lt;/font&amp;gt;:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;Example&amp;lt;/u&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;$ icc -g hello.c -o hello&amp;lt;/pre&amp;gt;&lt;br /&gt;
Although -Wall should always be set, the -g option should only be stated when you want&lt;br /&gt;
to find bugs, since it may slow down execution and enlarges the binary due&lt;br /&gt;
to debugging symbols.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Optimization ==&lt;br /&gt;
The usual and common way to compile your source is to apply compiler optimization.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Since there are many optimization options, as a stzart for now the &amp;lt;font color=green&amp;gt;optimization level -O2&amp;lt;/font&amp;gt; is recommended:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ icc -O2 hello.c -o hello&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;font color=red&amp;gt;Beware:&amp;lt;/font&amp;gt;&amp;amp;nbsp;The optimization-flag used is a capital-O (like Otto) and not a 0 (Zero)!&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Both compilers offer a multitude of options (with regard to the above and others), &lt;br /&gt;
one may check the complete list of options with short explanation on [[GCC|GCC]] and &lt;br /&gt;
[[Intel_Compiler|Intel Suite]] using option &#039;&#039;&#039;-v&#039;&#039;&#039; &#039;&#039;&#039;--help&#039;&#039;&#039;:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ icc -v --help hello.c -o hello&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
= Makefile =&lt;br /&gt;
If you&#039;re working in a project that already uses make, there should be a file called Makefile in the top-level directory.&lt;br /&gt;
Running:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ make&amp;lt;/pre&amp;gt; &lt;br /&gt;
should build the project from source.&lt;br /&gt;
== What is make? ==&lt;br /&gt;
Make is a tool designed to manage dependencies in a build process.&lt;br /&gt;
== Simple Makefile for hello.c ==&lt;br /&gt;
For instance, if you have a source file called &#039;&#039;hello.c&#039;&#039; and you need to build  &lt;br /&gt;
the binary/executable &#039;&#039;hello&#039;&#039;, then you might have a Makefile in the same &lt;br /&gt;
directory that looks like this:&lt;br /&gt;
&amp;lt;source lang=make style=&amp;quot;font: normal normal 2em monospace&amp;quot;&amp;gt; &lt;br /&gt;
# define the C compiler to use&lt;br /&gt;
# you do not need this if you load the compiler module first&lt;br /&gt;
# # CC      = icc &lt;br /&gt;
&lt;br /&gt;
# define any compile-time flags&lt;br /&gt;
#    -g    # adds debugging information to the executable file&lt;br /&gt;
#    -O2   # optimization level 2&lt;br /&gt;
#    -Wall # turns on most, but not all, compiler warnings&lt;br /&gt;
CFLAGS  = -g -O2 -Wall&lt;br /&gt;
&lt;br /&gt;
# unix/linux removal command used for &#039;make clean&#039;&lt;br /&gt;
RM      = rm -f&lt;br /&gt;
&lt;br /&gt;
# the build target executable&lt;br /&gt;
# use a variable if you&#039;d like to rename the binary later&lt;br /&gt;
TARGET = hello&lt;br /&gt;
&lt;br /&gt;
# default action when make was invoked without options&lt;br /&gt;
default: all&lt;br /&gt;
&lt;br /&gt;
# starts section beginning with :hello  -&amp;gt; :hello = :$(TARGET)&lt;br /&gt;
all: $(TARGET)&lt;br /&gt;
&lt;br /&gt;
# main build section of this Makefile&lt;br /&gt;
# same as: hello: hello.c&lt;br /&gt;
#    $(CC) $(CFLAGS) -o hello hello.c&lt;br /&gt;
$(TARGET): $(TARGET).c&lt;br /&gt;
      $(CC) $(CFLAGS) -o $(TARGET) $(TARGET).c&lt;br /&gt;
&lt;br /&gt;
# clean all garbage with &#039;make clean&#039; oder &#039;make veryclean&#039;&lt;br /&gt;
clean veryclean:&lt;br /&gt;
      $(RM) $(TARGET) $(TARGET).o&lt;br /&gt;
&lt;br /&gt;
# run the programm with &#039;make run&#039;&lt;br /&gt;
run:&lt;br /&gt;
      ./$(TARGET)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
When ordered to build a file, make will ensure that all dependencies are up to date, and it will not rebuild any those which need not be rebuilt.&lt;br /&gt;
&lt;br /&gt;
== Load Compiler Environments ==&lt;br /&gt;
Another makefile &amp;lt;small&amp;gt;(using makedepend and more advanced make syntax)&amp;lt;/small&amp;gt;.&lt;br /&gt;
Here we use the GNU-C-Compiler.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$module load compiler/gnu&lt;br /&gt;
$ module list&lt;br /&gt;
Currently Loaded Modulefiles:&lt;br /&gt;
  1) compiler/gnu/4.7(default)&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
A list of all defined environments set by the &#039;module load&#039;-command can be&lt;br /&gt;
displayed by: &#039;module show compiler/gnu&#039; (e.g. GNU compiler).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module show compiler/gnu&lt;br /&gt;
-------------------------------------------------------------------&lt;br /&gt;
/opt/bwhpc/common/modulefiles/compiler/gnu/4.7:&lt;br /&gt;
[...]&lt;br /&gt;
setenv		 GNU_VERSION 4.7.3 &lt;br /&gt;
setenv		 GNU_HOME /opt/bwhpc/common/compiler/gnu/4.7.3/x86_64 &lt;br /&gt;
setenv		 GNU_BIN_DIR /opt/bwhpc/common/compiler/gnu/4.7.3/x86_64/bin &lt;br /&gt;
setenv		 GNU_MAN_DIR /opt/bwhpc/common/compiler/gnu/4.7.3/x86_64/share/man &lt;br /&gt;
setenv		 GNU_LIB_DIR /opt/bwhpc/common/compiler/gnu/4.7.3/x86_64/lib64 &lt;br /&gt;
prepend-path	 PATH /opt/bwhpc/common/compiler/gnu/4.7.3/x86_64/bin &lt;br /&gt;
prepend-path	 MANPATH /opt/bwhpc/common/compiler/gnu/4.7.3/x86_64/share/man &lt;br /&gt;
prepend-path	 LD_RUN_PATH /opt/bwhpc/common/compiler/gnu/4.7.3/x86_64/lib &lt;br /&gt;
prepend-path	 LD_LIBRARY_PATH /opt/bwhpc/common/compiler/gnu/4.7.3/x86_64/lib &lt;br /&gt;
prepend-path	 LD_RUN_PATH /opt/bwhpc/common/compiler/gnu/4.7.3/x86_64/lib64 &lt;br /&gt;
prepend-path	 LD_LIBRARY_PATH /opt/bwhpc/common/compiler/gnu/4.7.3/x86_64/lib64 &lt;br /&gt;
setenv		 CC gcc &lt;br /&gt;
setenv		 CXX g++ &lt;br /&gt;
setenv		 F77 gfortran &lt;br /&gt;
setenv		 FC gfortran &lt;br /&gt;
setenv		 F90 gfortran &lt;br /&gt;
[...]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
== Advaneced Makefile Examples ==&lt;br /&gt;
This envs may be used in your local Makefile.&lt;br /&gt;
&amp;lt;source lang=make style=&amp;quot;font: normal normal 2em monospace&amp;quot;&amp;gt; &lt;br /&gt;
#&lt;br /&gt;
# &#039;make depend&#039; uses makedepend to automatically generate dependencies &lt;br /&gt;
#               (dependencies are added to end of Makefile)&lt;br /&gt;
# &#039;make&#039;        build executable file &#039;mycc&#039;&lt;br /&gt;
# &#039;make clean&#039;  removes all .o and executable files&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
# define the C compiler to use. &lt;br /&gt;
# CC is set by the &#039;module load&#039;-command so it&#039;s unnecessary here.&lt;br /&gt;
# # CC = gcc&lt;br /&gt;
&lt;br /&gt;
# define any compile-time flags&lt;br /&gt;
CFLAGS = -Wall -g -O2&lt;br /&gt;
&lt;br /&gt;
# define any directories containing header files other than /usr/include&lt;br /&gt;
#&lt;br /&gt;
INCLUDES = -I/home/newhall/include &lt;br /&gt;
#  -I../include -I$(GNU_INC_DIR)  (example)&lt;br /&gt;
&lt;br /&gt;
# define library paths in addition to /usr/lib&lt;br /&gt;
#   if I wanted to include libraries not in /usr/lib I&#039;d specify&lt;br /&gt;
#   their path using -Lpath, something like:&lt;br /&gt;
LFLAGS = -L/home/newhall/lib  -L../lib&lt;br /&gt;
&lt;br /&gt;
# define any libraries to link into executable:&lt;br /&gt;
#   if I want to link in libraries (libx.so or libx.a) I use the -llibname &lt;br /&gt;
#   option, something like (this will link in libmylib.so and libm.so:&lt;br /&gt;
LIBS = -l$(GNU_LIB_DIR) -lmylib -lm &lt;br /&gt;
&lt;br /&gt;
# define the C source files (examples only)&lt;br /&gt;
SRCS = emitter.c error.c init.c lexer.c main.c symbol.c parser.c&lt;br /&gt;
&lt;br /&gt;
# define the C object files &lt;br /&gt;
#&lt;br /&gt;
# This uses Suffix Replacement within a macro:&lt;br /&gt;
#   $(name:string1=string2)&lt;br /&gt;
#         For each word in &#039;name&#039; replace &#039;string1&#039; with &#039;string2&#039;&lt;br /&gt;
# Below we are replacing the suffix .c of all words in the macro SRCS&lt;br /&gt;
# with the .o suffix&lt;br /&gt;
#&lt;br /&gt;
OBJS = $(SRCS:.c=.o)&lt;br /&gt;
&lt;br /&gt;
# define the executable file &lt;br /&gt;
MAIN = mycc&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# The following part of the makefile is generic; it can be used to &lt;br /&gt;
# build any executable just by changing the definitions above and by&lt;br /&gt;
# deleting dependencies appended to the file from &#039;make depend&#039;&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
.PHONY: depend clean&lt;br /&gt;
&lt;br /&gt;
all:    $(MAIN)&lt;br /&gt;
        @echo  Simple compiler named mycc has been compiled&lt;br /&gt;
&lt;br /&gt;
$(MAIN): $(OBJS) &lt;br /&gt;
        $(CC) $(CFLAGS) $(INCLUDES) -o $(MAIN) $(OBJS) $(LFLAGS) $(LIBS)&lt;br /&gt;
&lt;br /&gt;
# this is a suffix replacement rule for building .o&#039;s from .c&#039;s&lt;br /&gt;
# it uses automatic variables $&amp;lt;: the name of the prerequisite of&lt;br /&gt;
# the rule(a .c file) and $@: the name of the target of the rule (a .o file) &lt;br /&gt;
# (see the gnu make manual section about automatic variables)&lt;br /&gt;
.c.o:&lt;br /&gt;
        $(CC) $(CFLAGS) $(INCLUDES) -c $&amp;lt;  -o $@&lt;br /&gt;
&lt;br /&gt;
clean:&lt;br /&gt;
        $(RM) *.o *~ $(MAIN)&lt;br /&gt;
&lt;br /&gt;
depend: $(SRCS)&lt;br /&gt;
        makedepend $(INCLUDES) $^&lt;br /&gt;
&lt;br /&gt;
# DO NOT DELETE THIS LINE -- make depend needs it&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
This is an excerpt from the CIS makefile to show how you can do branchings in a makefile.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
We use the shell-command &#039;&#039;&#039;$(shell uname -s)&#039;&#039;&#039;  to determine the machine is a Linux.&lt;br /&gt;
&amp;lt;source lang=make style=&amp;quot;font: normal normal 2em monospace&amp;quot;&amp;gt; &lt;br /&gt;
[...]&lt;br /&gt;
#&lt;br /&gt;
# LINUX system&lt;br /&gt;
#&lt;br /&gt;
UNAME_S := $(shell uname -s)&lt;br /&gt;
ifeq ($(UNAME_S),Linux)&lt;br /&gt;
   LDFLAGS=-g -m32  -lm -lcrypt&lt;br /&gt;
   CFLAGS=-g -Wimplicit -Wunused -Wformat -Werror -Wreturn-type \&lt;br /&gt;
   -Wmissing-prototypes -m32 -funsigned-char -Wno-parentheses \&lt;br /&gt;
   -D_XOPEN_SOURCE -D_GNU_SOURCE -Wno-pointer-sign -Wno-unused-but-set-variable&lt;br /&gt;
endif&lt;br /&gt;
#&lt;br /&gt;
# MAC-OS&lt;br /&gt;
#&lt;br /&gt;
ifeq ($(UNAME_S),Darwin)&lt;br /&gt;
....... &lt;br /&gt;
[...]&lt;br /&gt;
OBJ=db/db.o db/app.o db/w3tool.o db/w3lib.o db/maildecode.o&lt;br /&gt;
ALL=.dependent db.c w3dbs cis svnout x tools&lt;br /&gt;
SRC=db.c app.c w3tool.c w3lib.c  cis.c x.c maildecode.c&lt;br /&gt;
&lt;br /&gt;
db/%.o: %.c&lt;br /&gt;
   @echo &amp;quot;compile $&amp;lt; ...&amp;quot;&lt;br /&gt;
   @$(CC) $(CFLAGS) -c $&amp;lt; -o $@&lt;br /&gt;
&lt;br /&gt;
[...]&lt;br /&gt;
&lt;br /&gt;
all: $(ALL)&lt;br /&gt;
clean:&lt;br /&gt;
   @echo &amp;quot;cleaning ...&amp;quot;&lt;br /&gt;
   @rm -rf *.o $(ALL) core tags db.h db.c html/model.html a.out gmon.out core.* x tools svnout w3lib.tgz *.dSYM *.gcno *.gcda *.gcov g* .dependent $(OBJ)&lt;br /&gt;
&lt;br /&gt;
cis: db/cis.o $(OBJ)&lt;br /&gt;
   @echo &amp;quot;building cis ...&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Makefile structure ==&lt;br /&gt;
Makefiles contain definitions and rules.&lt;br /&gt;
* A definition has the form:&amp;lt;br&amp;gt;&lt;br /&gt;
VAR=value&lt;br /&gt;
* A rule has the form: &amp;lt;br&amp;gt;&lt;br /&gt;
output files: input files&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;TAB&amp;gt;&amp;lt;TAB&amp;gt;commands to turn inputs to outputs&lt;br /&gt;
* All commands must be &amp;lt;font color=green&amp;gt;tab-indented&amp;lt;/font&amp;gt;.&lt;br /&gt;
* # are marking the beginning of a comment. Rest of the line will be ignored.&lt;br /&gt;
* To reference the variable VAR, surround it with &amp;lt;font color=green&amp;gt;$(VAR)&amp;lt;/font&amp;gt;. &lt;br /&gt;
* Try running &#039;&#039;&#039;&#039;man make&#039;&#039;&#039;&#039; for more details.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;TAB&amp;gt; = Tabulator&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[Category:Compiler_software]][[Category:bwUniCluster]][[Category:bwForCluster_Chemistry]][[Category:BwForCluster_BinAC]][[Category:bwForCluster_MLS&amp;amp;WISO_Production]]&lt;/div&gt;</summary>
		<author><name>R Rutka</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=Development/GCC&amp;diff=4522</id>
		<title>Development/GCC</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=Development/GCC&amp;diff=4522"/>
		<updated>2016-11-03T16:40:05Z</updated>

		<summary type="html">&lt;p&gt;R Rutka: /* Versions and Availability */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=600px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Description !! Content&lt;br /&gt;
|-&lt;br /&gt;
| module load&lt;br /&gt;
| compiler/gnu/xxx&lt;br /&gt;
|-&lt;br /&gt;
| License&lt;br /&gt;
| GPL&lt;br /&gt;
|-&lt;br /&gt;
|Citing&lt;br /&gt;
| n/a&lt;br /&gt;
|-&lt;br /&gt;
| Links&lt;br /&gt;
| [http://gcc.gnu.org/ GNU-Homepage]&lt;br /&gt;
|-&lt;br /&gt;
| Graphical Interface&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| Included modules&lt;br /&gt;
| gcc &amp;amp;#124; g++ &amp;amp;#124; gfortran&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
= Introduction =&lt;br /&gt;
The &#039;&#039;&#039;GNU Compiler Collection (GCC)&#039;&#039;&#039; consists of tools to compile C, C++ and Fortran programs:&lt;br /&gt;
{| width=400px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;padding:3px&amp;quot;| gcc&lt;br /&gt;
|style=&amp;quot;padding:3px&amp;quot;| GNU C compiler&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;padding:3px&amp;quot;| g++&lt;br /&gt;
|style=&amp;quot;padding:3px&amp;quot;| GNU C++ compiler&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;padding:3px&amp;quot;| gfortran&lt;br /&gt;
|style=&amp;quot;padding:3px&amp;quot;| GNU Fortran compiler&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
More information about the MPI versions of the GCC Compiler is available here: &lt;br /&gt;
* [[BwHPC_BPG_for_Parallel_Programming|Best Practices Guide for Parallel Programming]].&lt;br /&gt;
&lt;br /&gt;
= Versions and Availability =&lt;br /&gt;
A list of versions currently available on all bwHPC-C5-Clusters can be obtained from the&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://cis-hpc.uni-konstanz.de/prod.cis/ Cluster Information System CIS]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/big&amp;gt;&lt;br /&gt;
{{#widget:Iframe&lt;br /&gt;
|url=https://cis-hpc.uni-konstanz.de/prod.cis/bwUniCluster/compiler/gnu&lt;br /&gt;
|width=99%&lt;br /&gt;
|height=770&lt;br /&gt;
}}&lt;br /&gt;
There is a version of GCC available on the system without loading a module but it may be outdated and it is &amp;lt;font color=green&amp;gt;recommended to load the GNU compiler module&amp;lt;/font&amp;gt;.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
On the command line interface of any bwHPC cluster you&#039;ll get a list of available versions &lt;br /&gt;
by using the command &#039;module avail compiler/gnu&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ : bwUniCluster&lt;br /&gt;
$ module avail compiler/gnu&lt;br /&gt;
-------------------- /opt/bwhpc/common/modulefiles ---------------------&lt;br /&gt;
compiler/gnu/4.5          compiler/gnu/4.8          compiler/gnu/5.2&lt;br /&gt;
compiler/gnu/4.7(default) compiler/gnu/4.9&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Loading the module =&lt;br /&gt;
== Default Version ==&lt;br /&gt;
Load the version of &#039;&#039;GCC&#039;&#039; with the command&lt;br /&gt;
&#039;module load compiler/gnu&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module avail compiler/gnu&lt;br /&gt;
------------------ /opt/bwhpc/common/modulefiles -------------------&lt;br /&gt;
compiler/gnu/4.5          compiler/gnu/4.8          compiler/gnu/5.2&lt;br /&gt;
compiler/gnu/4.7(default) compiler/gnu/4.9&lt;br /&gt;
$ module load compiler/gnu&lt;br /&gt;
$ module list&lt;br /&gt;
Currently Loaded Modulefiles:&lt;br /&gt;
  1) compiler/gnu/4.7(default)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here, we got the &amp;quot;default&amp;quot; version 4.7 (example).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The module will try to load modules it needs to function. &lt;br /&gt;
If loading the module fails, check if you have already loaded the module &lt;br /&gt;
with &#039;module list&#039;.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Specific (newer or older) Version ===&lt;br /&gt;
If you wish to load a specific (older or newer) version (if available), you can do so using e.g. &lt;br /&gt;
&#039;module load compiler/gnu/version&#039; to load the version you desires.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module list&lt;br /&gt;
Currently Loaded Modulefiles:&lt;br /&gt;
  1) compiler/gnu/4.7(default)&lt;br /&gt;
$ module clear&lt;br /&gt;
Are you sure you want to clear all loaded modules!? [n] y&lt;br /&gt;
$ : New version will be used :&lt;br /&gt;
$ module load compiler/gnu/5.2&lt;br /&gt;
$ module list&lt;br /&gt;
Currently Loaded Modulefiles:&lt;br /&gt;
  1) compiler/gnu/5.2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
GCC &amp;quot;version 5.2&amp;quot; is loaded now.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= GCC-Specific Environments =&lt;br /&gt;
To see a list of all GCC environments set by the &#039;module load&#039;-command use &lt;br /&gt;
&#039;env | grep GNU&#039;.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Or use the command &#039;module show compiler/gnu/version&#039;.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Example (Version 5.2)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/opt/bwhpc/common/modulefiles/compiler/gnu/5.2:&lt;br /&gt;
GNU_VERSION = 5.2.0 &lt;br /&gt;
GNU_HOME = /opt/bwhpc/common/compiler/gnu/5.2.0 &lt;br /&gt;
GNU_BIN_DIR = /opt/bwhpc/common/compiler/gnu/5.2.0/bin &lt;br /&gt;
GNU_MAN_DIR = /opt/bwhpc/common/compiler/gnu/5.2.0/man &lt;br /&gt;
GNU_LIB_DIR = /opt/bwhpc/common/compiler/gnu/5.2.0/lib64 &lt;br /&gt;
PATH = $PATH:/opt/bwhpc/common/compiler/gnu/5.2.0/bin &lt;br /&gt;
MANPATH = $MANPATH:/opt/bwhpc/common/compiler/gnu/5.2.0/man &lt;br /&gt;
LD_LIBRARY_PATH = $LD_LIBRARY_PATH:/opt/bwhpc/common/compiler/gnu/5.2.0/lib64 &lt;br /&gt;
CC = gcc &lt;br /&gt;
CXX = g++ &lt;br /&gt;
F77 = gfortran &lt;br /&gt;
FC = gfortran &lt;br /&gt;
F90 = gfortran &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
= Documentation =&lt;br /&gt;
== Online documentation ==&lt;br /&gt;
[http://gcc.gnu.org/onlinedocs/ GCC online documentation]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Local documentation ==&lt;br /&gt;
For version specific documentation see the help page of the module.&amp;lt;br&amp;gt;&lt;br /&gt;
Show informations for the default version by using the command&lt;br /&gt;
&#039;module help compiler/gnu&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module help compiler/gnu&lt;br /&gt;
----------- Module Specific Help for &#039;compiler/gnu/4.7&#039; -----------&lt;br /&gt;
This module provides the GNU compiler suite version 4.7.3&lt;br /&gt;
via commands &#039;gcc&#039;, &#039;g++&#039; and &#039;gfortran&#039; (see also &#039;http://gcc.gnu.org/&#039;).&lt;br /&gt;
The GNU compiler has been build with gmp-4.3.2, mpfr-2.4.2 and mpc-0.8.1.&lt;br /&gt;
&lt;br /&gt;
Commands:&lt;br /&gt;
  cpp      - GNU pre processor&lt;br /&gt;
  gcc      - GNU C compiler&lt;br /&gt;
  g++      - GNU C++ compiler&lt;br /&gt;
  gfortran - GNU Fortran compiler (Fortran 77, 90 and 95)&lt;br /&gt;
&lt;br /&gt;
Libraries can be found in&lt;br /&gt;
  $GNU_LIB_DIR = /opt/bwhpc/common/compiler/gnu/4.7.3/x86_64/lib64&lt;br /&gt;
&lt;br /&gt;
Local documentation:&lt;br /&gt;
  See commands &#039;man cpp&#039;, &#039;man gcc&#039;, &#039;man g++&#039; and &#039;man gfortran&#039;.&lt;br /&gt;
&lt;br /&gt;
Online documentation:&lt;br /&gt;
  http://gcc.gnu.org/onlinedocs/&lt;br /&gt;
&lt;br /&gt;
For details on library and include dirs please call&lt;br /&gt;
    module show compiler/gnu/4.7&lt;br /&gt;
&lt;br /&gt;
Please do not add the gnu compiler module to any automatic environment setup&lt;br /&gt;
procedure (neither to ~/.profile nor to ~/.bashrc).&lt;br /&gt;
[...]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Manual Pages ===&lt;br /&gt;
For detailed lists of the different program options consult the particular man page.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ man gcc&lt;br /&gt;
$ man g++&lt;br /&gt;
$ man gfortran&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
= Optimizations =&lt;br /&gt;
You can turn on various optimization options to enhance the performance of your program. Which options are the best depends on the specific program and can be determined by benchmarking your code. A command which gives good performance and a decent file size is&lt;br /&gt;
&amp;lt;pre&amp;gt;$ gcc -march=native -O2 ex.c -o ex&amp;lt;/pre&amp;gt;&lt;br /&gt;
There are more aggressive optimization flags but the compiled programs can get quite large and the compilation process will probably take much longer. Moreover it can happen that the so compiled program is even slower. Such a command would be for example&lt;br /&gt;
&amp;lt;pre&amp;gt;$ gcc -march=native -O3 ex.c -o ex&amp;lt;/pre&amp;gt;&lt;br /&gt;
For a complete list of all the optimization options execute&lt;br /&gt;
&amp;lt;pre&amp;gt;$ gcc --help=optimizers&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Profiling with Gprof ==&lt;br /&gt;
Gprof is the profiler which belongs to the gcc compiler. Gprof is also installed on the system and can be used to profile your code. The profiler supports C, C++, Pascal and Fortran 77 program code. With this tool it is possible to analyse call times and time spent within program functions.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The first required step is to compile your program with the profiling flag &amp;quot;-pg&amp;quot;.&lt;br /&gt;
&amp;lt;pre&amp;gt;$ gcc -pg ex.c -o ex&amp;lt;/pre&amp;gt;&lt;br /&gt;
Compiled in this way your program will generate profiling data during execution. By default a file named gmon.out can be found in the work directory after running the program.&lt;br /&gt;
&amp;lt;pre&amp;gt;$ ./ex&amp;lt;/pre&amp;gt;&lt;br /&gt;
The next step is to run the gprof program to analyse the gmon.out profiling data file.  This file contains profiling data concerning the program execution, like an overview, time information or the call graph, in human readable format.&lt;br /&gt;
&amp;lt;pre&amp;gt;$ gprof gmon.out ex &amp;gt; outputfile.txt&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Compiler_software]][[Category:bwUniCluster]][[Category:bwForCluster_Chemistry]][[Category:BwForCluster_BinAC]][[Category:bwForCluster_MLS&amp;amp;WISO_Production]]&lt;/div&gt;</summary>
		<author><name>R Rutka</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=Development/GCC&amp;diff=4521</id>
		<title>Development/GCC</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=Development/GCC&amp;diff=4521"/>
		<updated>2016-11-03T16:39:42Z</updated>

		<summary type="html">&lt;p&gt;R Rutka: /* Versions and Availability */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=600px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Description !! Content&lt;br /&gt;
|-&lt;br /&gt;
| module load&lt;br /&gt;
| compiler/gnu/xxx&lt;br /&gt;
|-&lt;br /&gt;
| License&lt;br /&gt;
| GPL&lt;br /&gt;
|-&lt;br /&gt;
|Citing&lt;br /&gt;
| n/a&lt;br /&gt;
|-&lt;br /&gt;
| Links&lt;br /&gt;
| [http://gcc.gnu.org/ GNU-Homepage]&lt;br /&gt;
|-&lt;br /&gt;
| Graphical Interface&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| Included modules&lt;br /&gt;
| gcc &amp;amp;#124; g++ &amp;amp;#124; gfortran&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
= Introduction =&lt;br /&gt;
The &#039;&#039;&#039;GNU Compiler Collection (GCC)&#039;&#039;&#039; consists of tools to compile C, C++ and Fortran programs:&lt;br /&gt;
{| width=400px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;padding:3px&amp;quot;| gcc&lt;br /&gt;
|style=&amp;quot;padding:3px&amp;quot;| GNU C compiler&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;padding:3px&amp;quot;| g++&lt;br /&gt;
|style=&amp;quot;padding:3px&amp;quot;| GNU C++ compiler&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;padding:3px&amp;quot;| gfortran&lt;br /&gt;
|style=&amp;quot;padding:3px&amp;quot;| GNU Fortran compiler&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
More information about the MPI versions of the GCC Compiler is available here: &lt;br /&gt;
* [[BwHPC_BPG_for_Parallel_Programming|Best Practices Guide for Parallel Programming]].&lt;br /&gt;
&lt;br /&gt;
= Versions and Availability =&lt;br /&gt;
A list of versions currently available on all bwHPC-C5-Clusters can be obtained from the&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://cis-hpc.uni-konstanz.de/prod.cis/ Cluster Information System CIS]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/big&amp;gt;&lt;br /&gt;
{{#widget:Iframe&lt;br /&gt;
|url=https://cis-hpc.uni-konstanz.de/prod.cis/bwUniCluster/compiler/gnu&lt;br /&gt;
|width=99%&lt;br /&gt;
|height=700&lt;br /&gt;
}}&lt;br /&gt;
There is a version of GCC available on the system without loading a module but it may be outdated and it is &amp;lt;font color=green&amp;gt;recommended to load the GNU compiler module&amp;lt;/font&amp;gt;.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
On the command line interface of any bwHPC cluster you&#039;ll get a list of available versions &lt;br /&gt;
by using the command &#039;module avail compiler/gnu&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ : bwUniCluster&lt;br /&gt;
$ module avail compiler/gnu&lt;br /&gt;
-------------------- /opt/bwhpc/common/modulefiles ---------------------&lt;br /&gt;
compiler/gnu/4.5          compiler/gnu/4.8          compiler/gnu/5.2&lt;br /&gt;
compiler/gnu/4.7(default) compiler/gnu/4.9&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Loading the module =&lt;br /&gt;
== Default Version ==&lt;br /&gt;
Load the version of &#039;&#039;GCC&#039;&#039; with the command&lt;br /&gt;
&#039;module load compiler/gnu&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module avail compiler/gnu&lt;br /&gt;
------------------ /opt/bwhpc/common/modulefiles -------------------&lt;br /&gt;
compiler/gnu/4.5          compiler/gnu/4.8          compiler/gnu/5.2&lt;br /&gt;
compiler/gnu/4.7(default) compiler/gnu/4.9&lt;br /&gt;
$ module load compiler/gnu&lt;br /&gt;
$ module list&lt;br /&gt;
Currently Loaded Modulefiles:&lt;br /&gt;
  1) compiler/gnu/4.7(default)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here, we got the &amp;quot;default&amp;quot; version 4.7 (example).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The module will try to load modules it needs to function. &lt;br /&gt;
If loading the module fails, check if you have already loaded the module &lt;br /&gt;
with &#039;module list&#039;.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Specific (newer or older) Version ===&lt;br /&gt;
If you wish to load a specific (older or newer) version (if available), you can do so using e.g. &lt;br /&gt;
&#039;module load compiler/gnu/version&#039; to load the version you desires.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module list&lt;br /&gt;
Currently Loaded Modulefiles:&lt;br /&gt;
  1) compiler/gnu/4.7(default)&lt;br /&gt;
$ module clear&lt;br /&gt;
Are you sure you want to clear all loaded modules!? [n] y&lt;br /&gt;
$ : New version will be used :&lt;br /&gt;
$ module load compiler/gnu/5.2&lt;br /&gt;
$ module list&lt;br /&gt;
Currently Loaded Modulefiles:&lt;br /&gt;
  1) compiler/gnu/5.2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
GCC &amp;quot;version 5.2&amp;quot; is loaded now.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= GCC-Specific Environments =&lt;br /&gt;
To see a list of all GCC environments set by the &#039;module load&#039;-command use &lt;br /&gt;
&#039;env | grep GNU&#039;.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Or use the command &#039;module show compiler/gnu/version&#039;.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Example (Version 5.2)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/opt/bwhpc/common/modulefiles/compiler/gnu/5.2:&lt;br /&gt;
GNU_VERSION = 5.2.0 &lt;br /&gt;
GNU_HOME = /opt/bwhpc/common/compiler/gnu/5.2.0 &lt;br /&gt;
GNU_BIN_DIR = /opt/bwhpc/common/compiler/gnu/5.2.0/bin &lt;br /&gt;
GNU_MAN_DIR = /opt/bwhpc/common/compiler/gnu/5.2.0/man &lt;br /&gt;
GNU_LIB_DIR = /opt/bwhpc/common/compiler/gnu/5.2.0/lib64 &lt;br /&gt;
PATH = $PATH:/opt/bwhpc/common/compiler/gnu/5.2.0/bin &lt;br /&gt;
MANPATH = $MANPATH:/opt/bwhpc/common/compiler/gnu/5.2.0/man &lt;br /&gt;
LD_LIBRARY_PATH = $LD_LIBRARY_PATH:/opt/bwhpc/common/compiler/gnu/5.2.0/lib64 &lt;br /&gt;
CC = gcc &lt;br /&gt;
CXX = g++ &lt;br /&gt;
F77 = gfortran &lt;br /&gt;
FC = gfortran &lt;br /&gt;
F90 = gfortran &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
= Documentation =&lt;br /&gt;
== Online documentation ==&lt;br /&gt;
[http://gcc.gnu.org/onlinedocs/ GCC online documentation]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Local documentation ==&lt;br /&gt;
For version specific documentation see the help page of the module.&amp;lt;br&amp;gt;&lt;br /&gt;
Show informations for the default version by using the command&lt;br /&gt;
&#039;module help compiler/gnu&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module help compiler/gnu&lt;br /&gt;
----------- Module Specific Help for &#039;compiler/gnu/4.7&#039; -----------&lt;br /&gt;
This module provides the GNU compiler suite version 4.7.3&lt;br /&gt;
via commands &#039;gcc&#039;, &#039;g++&#039; and &#039;gfortran&#039; (see also &#039;http://gcc.gnu.org/&#039;).&lt;br /&gt;
The GNU compiler has been build with gmp-4.3.2, mpfr-2.4.2 and mpc-0.8.1.&lt;br /&gt;
&lt;br /&gt;
Commands:&lt;br /&gt;
  cpp      - GNU pre processor&lt;br /&gt;
  gcc      - GNU C compiler&lt;br /&gt;
  g++      - GNU C++ compiler&lt;br /&gt;
  gfortran - GNU Fortran compiler (Fortran 77, 90 and 95)&lt;br /&gt;
&lt;br /&gt;
Libraries can be found in&lt;br /&gt;
  $GNU_LIB_DIR = /opt/bwhpc/common/compiler/gnu/4.7.3/x86_64/lib64&lt;br /&gt;
&lt;br /&gt;
Local documentation:&lt;br /&gt;
  See commands &#039;man cpp&#039;, &#039;man gcc&#039;, &#039;man g++&#039; and &#039;man gfortran&#039;.&lt;br /&gt;
&lt;br /&gt;
Online documentation:&lt;br /&gt;
  http://gcc.gnu.org/onlinedocs/&lt;br /&gt;
&lt;br /&gt;
For details on library and include dirs please call&lt;br /&gt;
    module show compiler/gnu/4.7&lt;br /&gt;
&lt;br /&gt;
Please do not add the gnu compiler module to any automatic environment setup&lt;br /&gt;
procedure (neither to ~/.profile nor to ~/.bashrc).&lt;br /&gt;
[...]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Manual Pages ===&lt;br /&gt;
For detailed lists of the different program options consult the particular man page.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ man gcc&lt;br /&gt;
$ man g++&lt;br /&gt;
$ man gfortran&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
= Optimizations =&lt;br /&gt;
You can turn on various optimization options to enhance the performance of your program. Which options are the best depends on the specific program and can be determined by benchmarking your code. A command which gives good performance and a decent file size is&lt;br /&gt;
&amp;lt;pre&amp;gt;$ gcc -march=native -O2 ex.c -o ex&amp;lt;/pre&amp;gt;&lt;br /&gt;
There are more aggressive optimization flags but the compiled programs can get quite large and the compilation process will probably take much longer. Moreover it can happen that the so compiled program is even slower. Such a command would be for example&lt;br /&gt;
&amp;lt;pre&amp;gt;$ gcc -march=native -O3 ex.c -o ex&amp;lt;/pre&amp;gt;&lt;br /&gt;
For a complete list of all the optimization options execute&lt;br /&gt;
&amp;lt;pre&amp;gt;$ gcc --help=optimizers&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Profiling with Gprof ==&lt;br /&gt;
Gprof is the profiler which belongs to the gcc compiler. Gprof is also installed on the system and can be used to profile your code. The profiler supports C, C++, Pascal and Fortran 77 program code. With this tool it is possible to analyse call times and time spent within program functions.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The first required step is to compile your program with the profiling flag &amp;quot;-pg&amp;quot;.&lt;br /&gt;
&amp;lt;pre&amp;gt;$ gcc -pg ex.c -o ex&amp;lt;/pre&amp;gt;&lt;br /&gt;
Compiled in this way your program will generate profiling data during execution. By default a file named gmon.out can be found in the work directory after running the program.&lt;br /&gt;
&amp;lt;pre&amp;gt;$ ./ex&amp;lt;/pre&amp;gt;&lt;br /&gt;
The next step is to run the gprof program to analyse the gmon.out profiling data file.  This file contains profiling data concerning the program execution, like an overview, time information or the call graph, in human readable format.&lt;br /&gt;
&amp;lt;pre&amp;gt;$ gprof gmon.out ex &amp;gt; outputfile.txt&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Compiler_software]][[Category:bwUniCluster]][[Category:bwForCluster_Chemistry]][[Category:BwForCluster_BinAC]][[Category:bwForCluster_MLS&amp;amp;WISO_Production]]&lt;/div&gt;</summary>
		<author><name>R Rutka</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=Development/GCC&amp;diff=4520</id>
		<title>Development/GCC</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=Development/GCC&amp;diff=4520"/>
		<updated>2016-11-03T16:39:24Z</updated>

		<summary type="html">&lt;p&gt;R Rutka: /* Versions and Availability */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=600px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Description !! Content&lt;br /&gt;
|-&lt;br /&gt;
| module load&lt;br /&gt;
| compiler/gnu/xxx&lt;br /&gt;
|-&lt;br /&gt;
| License&lt;br /&gt;
| GPL&lt;br /&gt;
|-&lt;br /&gt;
|Citing&lt;br /&gt;
| n/a&lt;br /&gt;
|-&lt;br /&gt;
| Links&lt;br /&gt;
| [http://gcc.gnu.org/ GNU-Homepage]&lt;br /&gt;
|-&lt;br /&gt;
| Graphical Interface&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| Included modules&lt;br /&gt;
| gcc &amp;amp;#124; g++ &amp;amp;#124; gfortran&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
= Introduction =&lt;br /&gt;
The &#039;&#039;&#039;GNU Compiler Collection (GCC)&#039;&#039;&#039; consists of tools to compile C, C++ and Fortran programs:&lt;br /&gt;
{| width=400px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;padding:3px&amp;quot;| gcc&lt;br /&gt;
|style=&amp;quot;padding:3px&amp;quot;| GNU C compiler&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;padding:3px&amp;quot;| g++&lt;br /&gt;
|style=&amp;quot;padding:3px&amp;quot;| GNU C++ compiler&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;padding:3px&amp;quot;| gfortran&lt;br /&gt;
|style=&amp;quot;padding:3px&amp;quot;| GNU Fortran compiler&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
More information about the MPI versions of the GCC Compiler is available here: &lt;br /&gt;
* [[BwHPC_BPG_for_Parallel_Programming|Best Practices Guide for Parallel Programming]].&lt;br /&gt;
&lt;br /&gt;
= Versions and Availability =&lt;br /&gt;
A list of versions currently available on all bwHPC-C5-Clusters can be obtained from the&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://cis-hpc.uni-konstanz.de/prod.cis/ Cluster Information System CIS]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/big&amp;gt;&lt;br /&gt;
{{#widget:Iframe&lt;br /&gt;
|url=https://cis-hpc.uni-konstanz.de/prod.cis/bwUniCluster/compiler/gnu&lt;br /&gt;
|width=99%&lt;br /&gt;
|height=650&lt;br /&gt;
}}&lt;br /&gt;
There is a version of GCC available on the system without loading a module but it may be outdated and it is &amp;lt;font color=green&amp;gt;recommended to load the GNU compiler module&amp;lt;/font&amp;gt;.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
On the command line interface of any bwHPC cluster you&#039;ll get a list of available versions &lt;br /&gt;
by using the command &#039;module avail compiler/gnu&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ : bwUniCluster&lt;br /&gt;
$ module avail compiler/gnu&lt;br /&gt;
-------------------- /opt/bwhpc/common/modulefiles ---------------------&lt;br /&gt;
compiler/gnu/4.5          compiler/gnu/4.8          compiler/gnu/5.2&lt;br /&gt;
compiler/gnu/4.7(default) compiler/gnu/4.9&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
= Loading the module =&lt;br /&gt;
== Default Version ==&lt;br /&gt;
Load the version of &#039;&#039;GCC&#039;&#039; with the command&lt;br /&gt;
&#039;module load compiler/gnu&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module avail compiler/gnu&lt;br /&gt;
------------------ /opt/bwhpc/common/modulefiles -------------------&lt;br /&gt;
compiler/gnu/4.5          compiler/gnu/4.8          compiler/gnu/5.2&lt;br /&gt;
compiler/gnu/4.7(default) compiler/gnu/4.9&lt;br /&gt;
$ module load compiler/gnu&lt;br /&gt;
$ module list&lt;br /&gt;
Currently Loaded Modulefiles:&lt;br /&gt;
  1) compiler/gnu/4.7(default)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here, we got the &amp;quot;default&amp;quot; version 4.7 (example).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The module will try to load modules it needs to function. &lt;br /&gt;
If loading the module fails, check if you have already loaded the module &lt;br /&gt;
with &#039;module list&#039;.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Specific (newer or older) Version ===&lt;br /&gt;
If you wish to load a specific (older or newer) version (if available), you can do so using e.g. &lt;br /&gt;
&#039;module load compiler/gnu/version&#039; to load the version you desires.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module list&lt;br /&gt;
Currently Loaded Modulefiles:&lt;br /&gt;
  1) compiler/gnu/4.7(default)&lt;br /&gt;
$ module clear&lt;br /&gt;
Are you sure you want to clear all loaded modules!? [n] y&lt;br /&gt;
$ : New version will be used :&lt;br /&gt;
$ module load compiler/gnu/5.2&lt;br /&gt;
$ module list&lt;br /&gt;
Currently Loaded Modulefiles:&lt;br /&gt;
  1) compiler/gnu/5.2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
GCC &amp;quot;version 5.2&amp;quot; is loaded now.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= GCC-Specific Environments =&lt;br /&gt;
To see a list of all GCC environments set by the &#039;module load&#039;-command use &lt;br /&gt;
&#039;env | grep GNU&#039;.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Or use the command &#039;module show compiler/gnu/version&#039;.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Example (Version 5.2)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/opt/bwhpc/common/modulefiles/compiler/gnu/5.2:&lt;br /&gt;
GNU_VERSION = 5.2.0 &lt;br /&gt;
GNU_HOME = /opt/bwhpc/common/compiler/gnu/5.2.0 &lt;br /&gt;
GNU_BIN_DIR = /opt/bwhpc/common/compiler/gnu/5.2.0/bin &lt;br /&gt;
GNU_MAN_DIR = /opt/bwhpc/common/compiler/gnu/5.2.0/man &lt;br /&gt;
GNU_LIB_DIR = /opt/bwhpc/common/compiler/gnu/5.2.0/lib64 &lt;br /&gt;
PATH = $PATH:/opt/bwhpc/common/compiler/gnu/5.2.0/bin &lt;br /&gt;
MANPATH = $MANPATH:/opt/bwhpc/common/compiler/gnu/5.2.0/man &lt;br /&gt;
LD_LIBRARY_PATH = $LD_LIBRARY_PATH:/opt/bwhpc/common/compiler/gnu/5.2.0/lib64 &lt;br /&gt;
CC = gcc &lt;br /&gt;
CXX = g++ &lt;br /&gt;
F77 = gfortran &lt;br /&gt;
FC = gfortran &lt;br /&gt;
F90 = gfortran &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
= Documentation =&lt;br /&gt;
== Online documentation ==&lt;br /&gt;
[http://gcc.gnu.org/onlinedocs/ GCC online documentation]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Local documentation ==&lt;br /&gt;
For version specific documentation see the help page of the module.&amp;lt;br&amp;gt;&lt;br /&gt;
Show informations for the default version by using the command&lt;br /&gt;
&#039;module help compiler/gnu&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module help compiler/gnu&lt;br /&gt;
----------- Module Specific Help for &#039;compiler/gnu/4.7&#039; -----------&lt;br /&gt;
This module provides the GNU compiler suite version 4.7.3&lt;br /&gt;
via commands &#039;gcc&#039;, &#039;g++&#039; and &#039;gfortran&#039; (see also &#039;http://gcc.gnu.org/&#039;).&lt;br /&gt;
The GNU compiler has been build with gmp-4.3.2, mpfr-2.4.2 and mpc-0.8.1.&lt;br /&gt;
&lt;br /&gt;
Commands:&lt;br /&gt;
  cpp      - GNU pre processor&lt;br /&gt;
  gcc      - GNU C compiler&lt;br /&gt;
  g++      - GNU C++ compiler&lt;br /&gt;
  gfortran - GNU Fortran compiler (Fortran 77, 90 and 95)&lt;br /&gt;
&lt;br /&gt;
Libraries can be found in&lt;br /&gt;
  $GNU_LIB_DIR = /opt/bwhpc/common/compiler/gnu/4.7.3/x86_64/lib64&lt;br /&gt;
&lt;br /&gt;
Local documentation:&lt;br /&gt;
  See commands &#039;man cpp&#039;, &#039;man gcc&#039;, &#039;man g++&#039; and &#039;man gfortran&#039;.&lt;br /&gt;
&lt;br /&gt;
Online documentation:&lt;br /&gt;
  http://gcc.gnu.org/onlinedocs/&lt;br /&gt;
&lt;br /&gt;
For details on library and include dirs please call&lt;br /&gt;
    module show compiler/gnu/4.7&lt;br /&gt;
&lt;br /&gt;
Please do not add the gnu compiler module to any automatic environment setup&lt;br /&gt;
procedure (neither to ~/.profile nor to ~/.bashrc).&lt;br /&gt;
[...]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Manual Pages ===&lt;br /&gt;
For detailed lists of the different program options consult the particular man page.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ man gcc&lt;br /&gt;
$ man g++&lt;br /&gt;
$ man gfortran&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
= Optimizations =&lt;br /&gt;
You can turn on various optimization options to enhance the performance of your program. Which options are the best depends on the specific program and can be determined by benchmarking your code. A command which gives good performance and a decent file size is&lt;br /&gt;
&amp;lt;pre&amp;gt;$ gcc -march=native -O2 ex.c -o ex&amp;lt;/pre&amp;gt;&lt;br /&gt;
There are more aggressive optimization flags but the compiled programs can get quite large and the compilation process will probably take much longer. Moreover it can happen that the so compiled program is even slower. Such a command would be for example&lt;br /&gt;
&amp;lt;pre&amp;gt;$ gcc -march=native -O3 ex.c -o ex&amp;lt;/pre&amp;gt;&lt;br /&gt;
For a complete list of all the optimization options execute&lt;br /&gt;
&amp;lt;pre&amp;gt;$ gcc --help=optimizers&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Profiling with Gprof ==&lt;br /&gt;
Gprof is the profiler which belongs to the gcc compiler. Gprof is also installed on the system and can be used to profile your code. The profiler supports C, C++, Pascal and Fortran 77 program code. With this tool it is possible to analyse call times and time spent within program functions.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The first required step is to compile your program with the profiling flag &amp;quot;-pg&amp;quot;.&lt;br /&gt;
&amp;lt;pre&amp;gt;$ gcc -pg ex.c -o ex&amp;lt;/pre&amp;gt;&lt;br /&gt;
Compiled in this way your program will generate profiling data during execution. By default a file named gmon.out can be found in the work directory after running the program.&lt;br /&gt;
&amp;lt;pre&amp;gt;$ ./ex&amp;lt;/pre&amp;gt;&lt;br /&gt;
The next step is to run the gprof program to analyse the gmon.out profiling data file.  This file contains profiling data concerning the program execution, like an overview, time information or the call graph, in human readable format.&lt;br /&gt;
&amp;lt;pre&amp;gt;$ gprof gmon.out ex &amp;gt; outputfile.txt&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Compiler_software]][[Category:bwUniCluster]][[Category:bwForCluster_Chemistry]][[Category:BwForCluster_BinAC]][[Category:bwForCluster_MLS&amp;amp;WISO_Production]]&lt;/div&gt;</summary>
		<author><name>R Rutka</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=Development/GCC&amp;diff=4519</id>
		<title>Development/GCC</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=Development/GCC&amp;diff=4519"/>
		<updated>2016-11-03T16:38:10Z</updated>

		<summary type="html">&lt;p&gt;R Rutka: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=600px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Description !! Content&lt;br /&gt;
|-&lt;br /&gt;
| module load&lt;br /&gt;
| compiler/gnu/xxx&lt;br /&gt;
|-&lt;br /&gt;
| License&lt;br /&gt;
| GPL&lt;br /&gt;
|-&lt;br /&gt;
|Citing&lt;br /&gt;
| n/a&lt;br /&gt;
|-&lt;br /&gt;
| Links&lt;br /&gt;
| [http://gcc.gnu.org/ GNU-Homepage]&lt;br /&gt;
|-&lt;br /&gt;
| Graphical Interface&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| Included modules&lt;br /&gt;
| gcc &amp;amp;#124; g++ &amp;amp;#124; gfortran&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
= Introduction =&lt;br /&gt;
The &#039;&#039;&#039;GNU Compiler Collection (GCC)&#039;&#039;&#039; consists of tools to compile C, C++ and Fortran programs:&lt;br /&gt;
{| width=400px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;padding:3px&amp;quot;| gcc&lt;br /&gt;
|style=&amp;quot;padding:3px&amp;quot;| GNU C compiler&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;padding:3px&amp;quot;| g++&lt;br /&gt;
|style=&amp;quot;padding:3px&amp;quot;| GNU C++ compiler&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;padding:3px&amp;quot;| gfortran&lt;br /&gt;
|style=&amp;quot;padding:3px&amp;quot;| GNU Fortran compiler&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
More information about the MPI versions of the GCC Compiler is available here: &lt;br /&gt;
* [[BwHPC_BPG_for_Parallel_Programming|Best Practices Guide for Parallel Programming]].&lt;br /&gt;
&lt;br /&gt;
= Versions and Availability =&lt;br /&gt;
A list of versions currently available on all bwHPC-C5-Clusters can be obtained from the&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://cis-hpc.uni-konstanz.de/prod.cis/ Cluster Information System CIS]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/big&amp;gt;&lt;br /&gt;
{{#widget:Iframe&lt;br /&gt;
|url=https://cis-hpc.uni-konstanz.de/prod.cis/bwUniCluster/compiler/gnu&lt;br /&gt;
|width=99%&lt;br /&gt;
|height=600&lt;br /&gt;
}}&lt;br /&gt;
There is a version of GCC available on the system without loading a module but it may be outdated and it is &amp;lt;font color=green&amp;gt;recommended to load the GNU compiler module&amp;lt;/font&amp;gt;.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
On the command line interface of any bwHPC cluster you&#039;ll get a list of available versions &lt;br /&gt;
by using the command &#039;module avail compiler/gnu&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ : bwUniCluster&lt;br /&gt;
$ module avail compiler/gnu&lt;br /&gt;
-------------------- /opt/bwhpc/common/modulefiles ---------------------&lt;br /&gt;
compiler/gnu/4.5          compiler/gnu/4.8          compiler/gnu/5.2&lt;br /&gt;
compiler/gnu/4.7(default) compiler/gnu/4.9&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Loading the module ==&lt;br /&gt;
=== Default Version ===&lt;br /&gt;
You can load the default version of &#039;&#039;GCC&#039;&#039; with the command&lt;br /&gt;
&#039;module load compiler/gnu&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module avail compiler/gnu&lt;br /&gt;
-------------------- /opt/bwhpc/common/modulefiles ---------------------&lt;br /&gt;
compiler/gnu/4.5          compiler/gnu/4.8          compiler/gnu/5.2&lt;br /&gt;
compiler/gnu/4.7(default) compiler/gnu/4.9&lt;br /&gt;
$ module load compiler/gnu&lt;br /&gt;
$ module list&lt;br /&gt;
Currently Loaded Modulefiles:&lt;br /&gt;
  1) compiler/gnu/4.7(default)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here, we got the &amp;quot;default&amp;quot; version 4.7 (example).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The module will try to load modules it needs to function. &lt;br /&gt;
If loading the module fails, check if you have already loaded the module &lt;br /&gt;
with &#039;module list&#039;.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Specific (newer or older) Version ===&lt;br /&gt;
If you wish to load a specific (older or newer) version (if available), you can do so using e.g. &lt;br /&gt;
&#039;module load compiler/gnu/version&#039; to load the version you desires.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module list&lt;br /&gt;
Currently Loaded Modulefiles:&lt;br /&gt;
  1) compiler/gnu/4.7(default)&lt;br /&gt;
$ module clear&lt;br /&gt;
Are you sure you want to clear all loaded modules!? [n] y&lt;br /&gt;
$ : New version will be used :&lt;br /&gt;
$ module load compiler/gnu/5.2&lt;br /&gt;
$ module list&lt;br /&gt;
Currently Loaded Modulefiles:&lt;br /&gt;
  1) compiler/gnu/5.2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
GCC &amp;quot;version 5.2&amp;quot; is loaded now.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
= GCC-Specific Environments =&lt;br /&gt;
To see a list of all GCC environments set by the &#039;module load&#039;-command use &lt;br /&gt;
&#039;env | grep GNU&#039;.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Or use the command &#039;module show compiler/gnu/version&#039;.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Example (Version 5.2)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/opt/bwhpc/common/modulefiles/compiler/gnu/5.2:&lt;br /&gt;
GNU_VERSION = 5.2.0 &lt;br /&gt;
GNU_HOME = /opt/bwhpc/common/compiler/gnu/5.2.0 &lt;br /&gt;
GNU_BIN_DIR = /opt/bwhpc/common/compiler/gnu/5.2.0/bin &lt;br /&gt;
GNU_MAN_DIR = /opt/bwhpc/common/compiler/gnu/5.2.0/man &lt;br /&gt;
GNU_LIB_DIR = /opt/bwhpc/common/compiler/gnu/5.2.0/lib64 &lt;br /&gt;
PATH = $PATH:/opt/bwhpc/common/compiler/gnu/5.2.0/bin &lt;br /&gt;
MANPATH = $MANPATH:/opt/bwhpc/common/compiler/gnu/5.2.0/man &lt;br /&gt;
LD_LIBRARY_PATH = $LD_LIBRARY_PATH:/opt/bwhpc/common/compiler/gnu/5.2.0/lib64 &lt;br /&gt;
CC = gcc &lt;br /&gt;
CXX = g++ &lt;br /&gt;
F77 = gfortran &lt;br /&gt;
FC = gfortran &lt;br /&gt;
F90 = gfortran &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
= Documentation =&lt;br /&gt;
== Online documentation ==&lt;br /&gt;
[http://gcc.gnu.org/onlinedocs/ GCC online documentation]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Local documentation ==&lt;br /&gt;
For version specific documentation see the help page of the module.&amp;lt;br&amp;gt;&lt;br /&gt;
Show informations for the default version by using the command&lt;br /&gt;
&#039;module help compiler/gnu&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module help compiler/gnu&lt;br /&gt;
----------- Module Specific Help for &#039;compiler/gnu/4.7&#039; -----------&lt;br /&gt;
This module provides the GNU compiler suite version 4.7.3&lt;br /&gt;
via commands &#039;gcc&#039;, &#039;g++&#039; and &#039;gfortran&#039; (see also &#039;http://gcc.gnu.org/&#039;).&lt;br /&gt;
The GNU compiler has been build with gmp-4.3.2, mpfr-2.4.2 and mpc-0.8.1.&lt;br /&gt;
&lt;br /&gt;
Commands:&lt;br /&gt;
  cpp      - GNU pre processor&lt;br /&gt;
  gcc      - GNU C compiler&lt;br /&gt;
  g++      - GNU C++ compiler&lt;br /&gt;
  gfortran - GNU Fortran compiler (Fortran 77, 90 and 95)&lt;br /&gt;
&lt;br /&gt;
Libraries can be found in&lt;br /&gt;
  $GNU_LIB_DIR = /opt/bwhpc/common/compiler/gnu/4.7.3/x86_64/lib64&lt;br /&gt;
&lt;br /&gt;
Local documentation:&lt;br /&gt;
  See commands &#039;man cpp&#039;, &#039;man gcc&#039;, &#039;man g++&#039; and &#039;man gfortran&#039;.&lt;br /&gt;
&lt;br /&gt;
Online documentation:&lt;br /&gt;
  http://gcc.gnu.org/onlinedocs/&lt;br /&gt;
&lt;br /&gt;
For details on library and include dirs please call&lt;br /&gt;
    module show compiler/gnu/4.7&lt;br /&gt;
&lt;br /&gt;
Please do not add the gnu compiler module to any automatic environment setup&lt;br /&gt;
procedure (neither to ~/.profile nor to ~/.bashrc).&lt;br /&gt;
[...]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Manual Pages ===&lt;br /&gt;
For detailed lists of the different program options consult the particular man page.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ man gcc&lt;br /&gt;
$ man g++&lt;br /&gt;
$ man gfortran&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
= Optimizations =&lt;br /&gt;
You can turn on various optimization options to enhance the performance of your program. Which options are the best depends on the specific program and can be determined by benchmarking your code. A command which gives good performance and a decent file size is&lt;br /&gt;
&amp;lt;pre&amp;gt;$ gcc -march=native -O2 ex.c -o ex&amp;lt;/pre&amp;gt;&lt;br /&gt;
There are more aggressive optimization flags but the compiled programs can get quite large and the compilation process will probably take much longer. Moreover it can happen that the so compiled program is even slower. Such a command would be for example&lt;br /&gt;
&amp;lt;pre&amp;gt;$ gcc -march=native -O3 ex.c -o ex&amp;lt;/pre&amp;gt;&lt;br /&gt;
For a complete list of all the optimization options execute&lt;br /&gt;
&amp;lt;pre&amp;gt;$ gcc --help=optimizers&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Profiling with Gprof ==&lt;br /&gt;
Gprof is the profiler which belongs to the gcc compiler. Gprof is also installed on the system and can be used to profile your code. The profiler supports C, C++, Pascal and Fortran 77 program code. With this tool it is possible to analyse call times and time spent within program functions.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The first required step is to compile your program with the profiling flag &amp;quot;-pg&amp;quot;.&lt;br /&gt;
&amp;lt;pre&amp;gt;$ gcc -pg ex.c -o ex&amp;lt;/pre&amp;gt;&lt;br /&gt;
Compiled in this way your program will generate profiling data during execution. By default a file named gmon.out can be found in the work directory after running the program.&lt;br /&gt;
&amp;lt;pre&amp;gt;$ ./ex&amp;lt;/pre&amp;gt;&lt;br /&gt;
The next step is to run the gprof program to analyse the gmon.out profiling data file.  This file contains profiling data concerning the program execution, like an overview, time information or the call graph, in human readable format.&lt;br /&gt;
&amp;lt;pre&amp;gt;$ gprof gmon.out ex &amp;gt; outputfile.txt&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Compiler_software]][[Category:bwUniCluster]][[Category:bwForCluster_Chemistry]][[Category:BwForCluster_BinAC]][[Category:bwForCluster_MLS&amp;amp;WISO_Production]]&lt;/div&gt;</summary>
		<author><name>R Rutka</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster2.0/Software/Mathematica&amp;diff=4518</id>
		<title>BwUniCluster2.0/Software/Mathematica</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster2.0/Software/Mathematica&amp;diff=4518"/>
		<updated>2016-11-03T16:35:40Z</updated>

		<summary type="html">&lt;p&gt;R Rutka: /* Parallel Computation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=600px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Description !! Content&lt;br /&gt;
|-&lt;br /&gt;
| module load&lt;br /&gt;
| math/mathematica&lt;br /&gt;
|-&lt;br /&gt;
| License&lt;br /&gt;
| Commercial. See [http://www.wolfram.com/mathematica/pricing/ Mathematica Pricing].&lt;br /&gt;
|-&lt;br /&gt;
| Citing &lt;br /&gt;
| n/a&lt;br /&gt;
|-&lt;br /&gt;
| Links&lt;br /&gt;
| [http://www.wolfram.com/mathematica/ Homepage] &amp;amp;#124; [http://www.wolfram.com/support/?source=nav Documentation]&lt;br /&gt;
|-&lt;br /&gt;
| Graphical Interface&lt;br /&gt;
| Yes (See [[VNC]])&lt;br /&gt;
|-&lt;br /&gt;
| Comments&lt;br /&gt;
| Mathematica might not be available on all locations and clusters.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Description == &lt;br /&gt;
&#039;&#039;&#039;Mathematica&#039;&#039;&#039; is a software from Wolfram for symbolic and numerical computation with many features such as powerful visualization and application specific functions.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Versions and Availability ==&lt;br /&gt;
A list of versions currently available on all bwHPC-C5-Clusters can be obtained from the&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;big&amp;gt;&lt;br /&gt;
[https://cis-hpc.uni-konstanz.de/prod.cis/ Cluster Information System CIS]&lt;br /&gt;
&amp;lt;/big&amp;gt;&lt;br /&gt;
{{#widget:Iframe&lt;br /&gt;
|url=https://cis-hpc.uni-konstanz.de/prod.cis/bwUniCluster/math/mathematica&lt;br /&gt;
|width=90%&lt;br /&gt;
|height=330&lt;br /&gt;
|border=0&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
= Loading =&lt;br /&gt;
To check if Mathematica is available execute&lt;br /&gt;
 $ module avail math/mathematica&lt;br /&gt;
&lt;br /&gt;
If Mathematica is available you can load a specific version or you can load the default version with&lt;br /&gt;
 $ module load math/mathematica&lt;br /&gt;
&lt;br /&gt;
= General Usage =&lt;br /&gt;
Mathematica can be used interactively on the command line or with a graphical front-end.&lt;br /&gt;
Alternatively Mathematica can run a script in batch mode which is useful when submitting batch jobs to the cluster.&lt;br /&gt;
After loading Mathematica the different modes can be used as follows.&lt;br /&gt;
&lt;br /&gt;
*Interactive with GUI (needs [[X11 forwarding]] or [[VNC]]):&amp;lt;br /&amp;gt;&amp;lt;pre&amp;gt;$ mathematica&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Interactive with command line:&amp;lt;br /&amp;gt;&amp;lt;pre&amp;gt;$ math&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Non-Interactive. Looks like interactive with command line but input is taken from script.m:&amp;lt;br /&amp;gt;&amp;lt;pre&amp;gt;$ math &amp;lt; script.m&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Non-Interactive. You have to explicitly specify what you want to print&amp;lt;br /&amp;gt;&amp;lt;pre&amp;gt;$ math -script script.m&amp;lt;/pre&amp;gt;However, the output is done in InputForm which is suitable for input in other Mathematica calculations but if you want pretty output you have to change the output format to OutputForm like this&amp;lt;br /&amp;gt;&amp;lt;pre&amp;gt;SetOptions[$Output, FormatType -&amp;gt; OutputForm]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For an introduction to Mathematica we refer to the online documentation ([http://reference.wolfram.com/mathematica/guide/Mathematica.html Mathematica Documentation Center]). Specific information on the use in a compute cluster is in the next section.&lt;br /&gt;
&lt;br /&gt;
= Parallel Computation =&lt;br /&gt;
Obviously parallel computation can be useful to speed up time-consuming computations, but it should also be used for multiple computations with different input data files (e.g. for parametric studies). The reason for this&lt;br /&gt;
is the license model from Wolfram. There are two types of licenses. &lt;br /&gt;
* Each time an instance of Mathematica starts, a so called MathKernel license is used up.&lt;br /&gt;
* Each time Mathematica spawns a subprocess, a license called SubMathKernel is used up.&lt;br /&gt;
Because usually there are much more SubMathKernel licenses than MathKernel licenses it is recommended to start multiple subprocesses instead of submitting multiple jobs.&lt;br /&gt;
&lt;br /&gt;
Remember to request the correct amount of processors in your [[Batch Jobs]] script but note that Mathematica will not automatically use these processors.&lt;br /&gt;
In general you have to adjust your code to benefit from more cores.&lt;br /&gt;
To do this you first have to start a number of kernels which are then used by ParallelTable to run the computations in parallel.&lt;br /&gt;
This basic example computes the first eight square numbers in parallel.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
LaunchKernels[8]&lt;br /&gt;
f[i_] := i^2&lt;br /&gt;
DistributeDefinitions[f]&lt;br /&gt;
ParallelTable[f[i], {i,0,7}]&lt;br /&gt;
CloseKernels[]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note that the use of DistributeDefinitions is necessary for f is a user defined function and the definition of this function must be available to all kernels.&lt;br /&gt;
&lt;br /&gt;
The next example is the computation of a numerical solution for the following initial value problem&lt;br /&gt;
 x&#039;(t) = x(t)^2 - x(t)^3&lt;br /&gt;
 x(0) = d&lt;br /&gt;
It is difficult to solve this equation with high accuracy at the point 1/d.&lt;br /&gt;
We decrease the step size of the algorithm to see how the execution time and the relative error at the point 1/d change.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
d = 0.00001&lt;br /&gt;
&lt;br /&gt;
y[t_] := 1/(ProductLog[(1/d-1)*Exp[1/d-1-t]]+1)	(* analytical solution *)&lt;br /&gt;
relerr[t_, s_] := Abs[(y[t] - x[t]/.s)/y[t]]			(* relative error of solution s at time t *)&lt;br /&gt;
g[v_] := {v[[1]], v[[2]][[1]], relerr[1/d, v[[2]][[2]][[1]]]}	(* helper function *)&lt;br /&gt;
&lt;br /&gt;
(* compute numerical solutions for 6 different step sizes *)&lt;br /&gt;
LaunchKernels[6]&lt;br /&gt;
tbl = ParallelTable[{step, Timing[NDSolve[{x&#039;[t] == x[t]^2 - x[t]^3, x[0] == d}, x, {t, 0, 2/d}, MaxStepSize-&amp;gt;step, MaxSteps-&amp;gt;10000000]]}, {step,5,3,-0.4}]&lt;br /&gt;
CloseKernels[]&lt;br /&gt;
&lt;br /&gt;
SetOptions[$Output, FormatType -&amp;gt; OutputForm]    (* better output when called with -script *)&lt;br /&gt;
Print[ Grid[Join[{{&amp;quot;Stepsize&amp;quot;, &amp;quot;Time&amp;quot;, &amp;quot;Error at 1/d&amp;quot;}}, Map[g, tbl]]] ]    (* print the result *)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Mathematica features some further functions similar to ParallelTable which are documented on the [http://reference.wolfram.com/mathematica/guide/ParallelComputing.html Mathematica parallel computing webpage] from Wolfram. One such function is ParallelSubmit which can be used to start two (or more) completely unrelated functions in parallel. But bear in mind that the functions should have similar running times because the scheduler reserves the requested resources for the runtime of the whole job. The following code shows how to pack two 1-core jobs into one 2-core job.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
f[r_] := (&lt;br /&gt;
    d = 0.000001;&lt;br /&gt;
    {time, sol} = Timing[NDSolve[{x&#039;[t] == r*x[t]^2 - x[t]^3, x[0] == d}, x, {t, 0, 2/d}, MaxStepSize-&amp;gt;3, MaxSteps-&amp;gt;10000000]];&lt;br /&gt;
    {time, x[1/d]/.sol[[1]]}&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
g[r_] := (&lt;br /&gt;
    {time, sol} = Timing[NDSolve[{y&#039;&#039;[t] + (r+1)*y&#039;[t] + r*y[t] == 0, y[0] == 1, y&#039;[0] == 0},  y, {t, 0, 30}, MaxStepSize-&amp;gt;0.000002, MaxSteps-&amp;gt;10000000000]];&lt;br /&gt;
    {time, y[30]/.sol[[1]]}&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
kernel1 := (&lt;br /&gt;
    file = OpenWrite[&amp;quot;out1.txt&amp;quot;, FormatType -&amp;gt; OutputForm];&lt;br /&gt;
    $Output = {file};&lt;br /&gt;
    Print[f[1.2]];&lt;br /&gt;
    Close[file];&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
kernel2 := (&lt;br /&gt;
    file = OpenWrite[&amp;quot;out2.txt&amp;quot;, FormatType -&amp;gt; OutputForm];&lt;br /&gt;
    $Output = {file};&lt;br /&gt;
    Print[g[1000]];&lt;br /&gt;
    Close[file];&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
LaunchKernels[2]&lt;br /&gt;
DistributeDefinitions[kernel1, kernel2]&lt;br /&gt;
e = {ParallelSubmit[kernel1], ParallelSubmit[kernel2]}&lt;br /&gt;
WaitAll[e]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The helper functions kernel1 and kernel2 get started in different threads and then they execute f and g. The output of these functions is redirected to different files so the results can clearly be distinguished and examined as soon as one function is done.&lt;br /&gt;
&lt;br /&gt;
[[Category:Mathematics software]] [[Category:bwUniCluster]][[Category:bwForCluster_MLS&amp;amp;WISO_Production]]&lt;/div&gt;</summary>
		<author><name>R Rutka</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster2.0/Software/Mathematica&amp;diff=4517</id>
		<title>BwUniCluster2.0/Software/Mathematica</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster2.0/Software/Mathematica&amp;diff=4517"/>
		<updated>2016-11-03T16:34:50Z</updated>

		<summary type="html">&lt;p&gt;R Rutka: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=600px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Description !! Content&lt;br /&gt;
|-&lt;br /&gt;
| module load&lt;br /&gt;
| math/mathematica&lt;br /&gt;
|-&lt;br /&gt;
| License&lt;br /&gt;
| Commercial. See [http://www.wolfram.com/mathematica/pricing/ Mathematica Pricing].&lt;br /&gt;
|-&lt;br /&gt;
| Citing &lt;br /&gt;
| n/a&lt;br /&gt;
|-&lt;br /&gt;
| Links&lt;br /&gt;
| [http://www.wolfram.com/mathematica/ Homepage] &amp;amp;#124; [http://www.wolfram.com/support/?source=nav Documentation]&lt;br /&gt;
|-&lt;br /&gt;
| Graphical Interface&lt;br /&gt;
| Yes (See [[VNC]])&lt;br /&gt;
|-&lt;br /&gt;
| Comments&lt;br /&gt;
| Mathematica might not be available on all locations and clusters.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Description == &lt;br /&gt;
&#039;&#039;&#039;Mathematica&#039;&#039;&#039; is a software from Wolfram for symbolic and numerical computation with many features such as powerful visualization and application specific functions.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Versions and Availability ==&lt;br /&gt;
A list of versions currently available on all bwHPC-C5-Clusters can be obtained from the&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;big&amp;gt;&lt;br /&gt;
[https://cis-hpc.uni-konstanz.de/prod.cis/ Cluster Information System CIS]&lt;br /&gt;
&amp;lt;/big&amp;gt;&lt;br /&gt;
{{#widget:Iframe&lt;br /&gt;
|url=https://cis-hpc.uni-konstanz.de/prod.cis/bwUniCluster/math/mathematica&lt;br /&gt;
|width=90%&lt;br /&gt;
|height=330&lt;br /&gt;
|border=0&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
= Loading =&lt;br /&gt;
To check if Mathematica is available execute&lt;br /&gt;
 $ module avail math/mathematica&lt;br /&gt;
&lt;br /&gt;
If Mathematica is available you can load a specific version or you can load the default version with&lt;br /&gt;
 $ module load math/mathematica&lt;br /&gt;
&lt;br /&gt;
= General Usage =&lt;br /&gt;
Mathematica can be used interactively on the command line or with a graphical front-end.&lt;br /&gt;
Alternatively Mathematica can run a script in batch mode which is useful when submitting batch jobs to the cluster.&lt;br /&gt;
After loading Mathematica the different modes can be used as follows.&lt;br /&gt;
&lt;br /&gt;
*Interactive with GUI (needs [[X11 forwarding]] or [[VNC]]):&amp;lt;br /&amp;gt;&amp;lt;pre&amp;gt;$ mathematica&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Interactive with command line:&amp;lt;br /&amp;gt;&amp;lt;pre&amp;gt;$ math&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Non-Interactive. Looks like interactive with command line but input is taken from script.m:&amp;lt;br /&amp;gt;&amp;lt;pre&amp;gt;$ math &amp;lt; script.m&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Non-Interactive. You have to explicitly specify what you want to print&amp;lt;br /&amp;gt;&amp;lt;pre&amp;gt;$ math -script script.m&amp;lt;/pre&amp;gt;However, the output is done in InputForm which is suitable for input in other Mathematica calculations but if you want pretty output you have to change the output format to OutputForm like this&amp;lt;br /&amp;gt;&amp;lt;pre&amp;gt;SetOptions[$Output, FormatType -&amp;gt; OutputForm]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For an introduction to Mathematica we refer to the online documentation ([http://reference.wolfram.com/mathematica/guide/Mathematica.html Mathematica Documentation Center]). Specific information on the use in a compute cluster is in the next section.&lt;br /&gt;
&lt;br /&gt;
= Parallel Computation =&lt;br /&gt;
Obviously parallel computation can be useful to speed up time-consuming computations, but it should also be used for multiple computations with different input data files (e.g. for parametric studies). The reason for this&lt;br /&gt;
is the license model from Wolfram. There are two types of licenses. &lt;br /&gt;
* Each time an instance of Mathematica starts, a so called MathKernel license is used up.&lt;br /&gt;
* Each time Mathematica spawns a subprocess, a license called SubMathKernel is used up.&lt;br /&gt;
Because usually there are much more SubMathKernel licenses than MathKernel licenses it is recommended to start multiple subprocesses instead of submitting multiple jobs.&lt;br /&gt;
&lt;br /&gt;
Remember to request the correct amount of processors in your [[Batch Jobs]] script but note that Mathematica will not automatically use these processors.&lt;br /&gt;
In general you have to adjust your code to benefit from more cores.&lt;br /&gt;
To do this you first have to start a number of kernels which are then used by ParallelTable to run the computations in parallel.&lt;br /&gt;
This basic example computes the first eight square numbers in parallel.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
LaunchKernels[8]&lt;br /&gt;
f[i_] := i^2&lt;br /&gt;
DistributeDefinitions[f]&lt;br /&gt;
ParallelTable[f[i], {i,0,7}]&lt;br /&gt;
CloseKernels[]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note that the use of DistributeDefinitions is necessary for f is a user defined function and the definition of this function must be available to all kernels.&lt;br /&gt;
&lt;br /&gt;
The next example is the computation of a numerical solution for the following initial value problem&lt;br /&gt;
 x&#039;(t) = x(t)^2 - x(t)^3&lt;br /&gt;
 x(0) = d&lt;br /&gt;
It is difficult to solve this equation with high accuracy at the point 1/d.&lt;br /&gt;
We decrease the step size of the algorithm to see how the execution time and the relative error at the point 1/d change.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
d = 0.00001&lt;br /&gt;
&lt;br /&gt;
y[t_] := 1/(ProductLog[(1/d-1)*Exp[1/d-1-t]]+1)	(* analytical solution *)&lt;br /&gt;
relerr[t_, s_] := Abs[(y[t] - x[t]/.s)/y[t]]			(* relative error of solution s at time t *)&lt;br /&gt;
g[v_] := {v[[1]], v[[2]][[1]], relerr[1/d, v[[2]][[2]][[1]]]}	(* helper function *)&lt;br /&gt;
&lt;br /&gt;
(* compute numerical solutions for 6 different step sizes *)&lt;br /&gt;
LaunchKernels[6]&lt;br /&gt;
tbl = ParallelTable[{step, Timing[NDSolve[{x&#039;[t] == x[t]^2 - x[t]^3, x[0] == d}, x, {t, 0, 2/d}, MaxStepSize-&amp;gt;step, MaxSteps-&amp;gt;10000000]]}, {step,5,3,-0.4}]&lt;br /&gt;
CloseKernels[]&lt;br /&gt;
&lt;br /&gt;
SetOptions[$Output, FormatType -&amp;gt; OutputForm]    (* better output when called with -script *)&lt;br /&gt;
Print[ Grid[Join[{{&amp;quot;Stepsize&amp;quot;, &amp;quot;Time&amp;quot;, &amp;quot;Error at 1/d&amp;quot;}}, Map[g, tbl]]] ]    (* print the result *)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Mathematica features some further functions similar to ParallelTable which are documented on the [http://reference.wolfram.com/mathematica/guide/ParallelComputing.html Mathematica parallel computing webpage] from Wolfram. One such function is ParallelSubmit which can be used to start two (or more) completely unrelated functions in parallel. But bear in mind that the functions should have similar running times because the scheduler reserves the requested resources for the runtime of the whole job. The following code shows how to pack two 1-core jobs into one 2-core job.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
f[r_] := (&lt;br /&gt;
    d = 0.000001;&lt;br /&gt;
    {time, sol} = Timing[NDSolve[{x&#039;[t] == r*x[t]^2 - x[t]^3, x[0] == d}, x, {t, 0, 2/d}, MaxStepSize-&amp;gt;3, MaxSteps-&amp;gt;10000000]];&lt;br /&gt;
    {time, x[1/d]/.sol[[1]]}&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
g[r_] := (&lt;br /&gt;
    {time, sol} = Timing[NDSolve[{y&#039;&#039;[t] + (r+1)*y&#039;[t] + r*y[t] == 0, y[0] == 1, y&#039;[0] == 0},  y, {t, 0, 30}, MaxStepSize-&amp;gt;0.000002, MaxSteps-&amp;gt;10000000000]];&lt;br /&gt;
    {time, y[30]/.sol[[1]]}&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
kernel1 := (&lt;br /&gt;
    file = OpenWrite[&amp;quot;out1.txt&amp;quot;, FormatType -&amp;gt; OutputForm];&lt;br /&gt;
    $Output = {file};&lt;br /&gt;
    Print[f[1.2]];&lt;br /&gt;
    Close[file];&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
kernel2 := (&lt;br /&gt;
    file = OpenWrite[&amp;quot;out2.txt&amp;quot;, FormatType -&amp;gt; OutputForm];&lt;br /&gt;
    $Output = {file};&lt;br /&gt;
    Print[g[1000]];&lt;br /&gt;
    Close[file];&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
LaunchKernels[2]&lt;br /&gt;
DistributeDefinitions[kernel1, kernel2]&lt;br /&gt;
e = {ParallelSubmit[kernel1], ParallelSubmit[kernel2]}&lt;br /&gt;
WaitAll[e]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The helper functions kernel1 and kernel2 get started in different threads and then they execute f and g. The output of these functions is redirected to different files so the results can clearly be distinguished and examined as soon as one function is done.&lt;br /&gt;
&lt;br /&gt;
[[Category:Mathematics software]] [[Category:bwUniCluster]][[Category:BwForCluster_BinAC]] [[Category:bwForCluster_MLS&amp;amp;WISO_Production]]&lt;/div&gt;</summary>
		<author><name>R Rutka</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster2.0/Software/Mathematica&amp;diff=4516</id>
		<title>BwUniCluster2.0/Software/Mathematica</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster2.0/Software/Mathematica&amp;diff=4516"/>
		<updated>2016-11-03T16:34:10Z</updated>

		<summary type="html">&lt;p&gt;R Rutka: /* Parallel Computation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=600px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Description !! Content&lt;br /&gt;
|-&lt;br /&gt;
| module load&lt;br /&gt;
| math/mathematica&lt;br /&gt;
|-&lt;br /&gt;
| Availability&lt;br /&gt;
| [[bwUniCluster]] &amp;amp;#124; [[bwForCluster_MLS&amp;amp;WISO_Production]]&lt;br /&gt;
|-&lt;br /&gt;
| License&lt;br /&gt;
| Commercial. See [http://www.wolfram.com/mathematica/pricing/ Mathematica Pricing].&lt;br /&gt;
|-&lt;br /&gt;
| Citing &lt;br /&gt;
| n/a&lt;br /&gt;
|-&lt;br /&gt;
| Links&lt;br /&gt;
| [http://www.wolfram.com/mathematica/ Homepage] &amp;amp;#124; [http://www.wolfram.com/support/?source=nav Documentation]&lt;br /&gt;
|-&lt;br /&gt;
| Graphical Interface&lt;br /&gt;
| Yes (See [[VNC]])&lt;br /&gt;
|-&lt;br /&gt;
| Comments&lt;br /&gt;
| Mathematica might not be available on all locations and clusters.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Description == &lt;br /&gt;
&#039;&#039;&#039;Mathematica&#039;&#039;&#039; is a software from Wolfram for symbolic and numerical computation with many features such as powerful visualization and application specific functions.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Versions and Availability ==&lt;br /&gt;
A list of versions currently available on all bwHPC-C5-Clusters can be obtained from the&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;big&amp;gt;&lt;br /&gt;
[https://cis-hpc.uni-konstanz.de/prod.cis/ Cluster Information System CIS]&lt;br /&gt;
&amp;lt;/big&amp;gt;&lt;br /&gt;
{{#widget:Iframe&lt;br /&gt;
|url=https://cis-hpc.uni-konstanz.de/prod.cis/bwUniCluster/math/mathematica&lt;br /&gt;
|width=90%&lt;br /&gt;
|height=330&lt;br /&gt;
|border=0&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
= Loading =&lt;br /&gt;
To check if Mathematica is available execute&lt;br /&gt;
 $ module avail math/mathematica&lt;br /&gt;
&lt;br /&gt;
If Mathematica is available you can load a specific version or you can load the default version with&lt;br /&gt;
 $ module load math/mathematica&lt;br /&gt;
&lt;br /&gt;
= General Usage =&lt;br /&gt;
Mathematica can be used interactively on the command line or with a graphical front-end.&lt;br /&gt;
Alternatively Mathematica can run a script in batch mode which is useful when submitting batch jobs to the cluster.&lt;br /&gt;
After loading Mathematica the different modes can be used as follows.&lt;br /&gt;
&lt;br /&gt;
*Interactive with GUI (needs [[X11 forwarding]] or [[VNC]]):&amp;lt;br /&amp;gt;&amp;lt;pre&amp;gt;$ mathematica&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Interactive with command line:&amp;lt;br /&amp;gt;&amp;lt;pre&amp;gt;$ math&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Non-Interactive. Looks like interactive with command line but input is taken from script.m:&amp;lt;br /&amp;gt;&amp;lt;pre&amp;gt;$ math &amp;lt; script.m&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Non-Interactive. You have to explicitly specify what you want to print&amp;lt;br /&amp;gt;&amp;lt;pre&amp;gt;$ math -script script.m&amp;lt;/pre&amp;gt;However, the output is done in InputForm which is suitable for input in other Mathematica calculations but if you want pretty output you have to change the output format to OutputForm like this&amp;lt;br /&amp;gt;&amp;lt;pre&amp;gt;SetOptions[$Output, FormatType -&amp;gt; OutputForm]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For an introduction to Mathematica we refer to the online documentation ([http://reference.wolfram.com/mathematica/guide/Mathematica.html Mathematica Documentation Center]). Specific information on the use in a compute cluster is in the next section.&lt;br /&gt;
&lt;br /&gt;
= Parallel Computation =&lt;br /&gt;
Obviously parallel computation can be useful to speed up time-consuming computations, but it should also be used for multiple computations with different input data files (e.g. for parametric studies). The reason for this&lt;br /&gt;
is the license model from Wolfram. There are two types of licenses. &lt;br /&gt;
* Each time an instance of Mathematica starts, a so called MathKernel license is used up.&lt;br /&gt;
* Each time Mathematica spawns a subprocess, a license called SubMathKernel is used up.&lt;br /&gt;
Because usually there are much more SubMathKernel licenses than MathKernel licenses it is recommended to start multiple subprocesses instead of submitting multiple jobs.&lt;br /&gt;
&lt;br /&gt;
Remember to request the correct amount of processors in your [[Batch Jobs]] script but note that Mathematica will not automatically use these processors.&lt;br /&gt;
In general you have to adjust your code to benefit from more cores.&lt;br /&gt;
To do this you first have to start a number of kernels which are then used by ParallelTable to run the computations in parallel.&lt;br /&gt;
This basic example computes the first eight square numbers in parallel.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
LaunchKernels[8]&lt;br /&gt;
f[i_] := i^2&lt;br /&gt;
DistributeDefinitions[f]&lt;br /&gt;
ParallelTable[f[i], {i,0,7}]&lt;br /&gt;
CloseKernels[]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note that the use of DistributeDefinitions is necessary for f is a user defined function and the definition of this function must be available to all kernels.&lt;br /&gt;
&lt;br /&gt;
The next example is the computation of a numerical solution for the following initial value problem&lt;br /&gt;
 x&#039;(t) = x(t)^2 - x(t)^3&lt;br /&gt;
 x(0) = d&lt;br /&gt;
It is difficult to solve this equation with high accuracy at the point 1/d.&lt;br /&gt;
We decrease the step size of the algorithm to see how the execution time and the relative error at the point 1/d change.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
d = 0.00001&lt;br /&gt;
&lt;br /&gt;
y[t_] := 1/(ProductLog[(1/d-1)*Exp[1/d-1-t]]+1)	(* analytical solution *)&lt;br /&gt;
relerr[t_, s_] := Abs[(y[t] - x[t]/.s)/y[t]]			(* relative error of solution s at time t *)&lt;br /&gt;
g[v_] := {v[[1]], v[[2]][[1]], relerr[1/d, v[[2]][[2]][[1]]]}	(* helper function *)&lt;br /&gt;
&lt;br /&gt;
(* compute numerical solutions for 6 different step sizes *)&lt;br /&gt;
LaunchKernels[6]&lt;br /&gt;
tbl = ParallelTable[{step, Timing[NDSolve[{x&#039;[t] == x[t]^2 - x[t]^3, x[0] == d}, x, {t, 0, 2/d}, MaxStepSize-&amp;gt;step, MaxSteps-&amp;gt;10000000]]}, {step,5,3,-0.4}]&lt;br /&gt;
CloseKernels[]&lt;br /&gt;
&lt;br /&gt;
SetOptions[$Output, FormatType -&amp;gt; OutputForm]    (* better output when called with -script *)&lt;br /&gt;
Print[ Grid[Join[{{&amp;quot;Stepsize&amp;quot;, &amp;quot;Time&amp;quot;, &amp;quot;Error at 1/d&amp;quot;}}, Map[g, tbl]]] ]    (* print the result *)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Mathematica features some further functions similar to ParallelTable which are documented on the [http://reference.wolfram.com/mathematica/guide/ParallelComputing.html Mathematica parallel computing webpage] from Wolfram. One such function is ParallelSubmit which can be used to start two (or more) completely unrelated functions in parallel. But bear in mind that the functions should have similar running times because the scheduler reserves the requested resources for the runtime of the whole job. The following code shows how to pack two 1-core jobs into one 2-core job.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
f[r_] := (&lt;br /&gt;
    d = 0.000001;&lt;br /&gt;
    {time, sol} = Timing[NDSolve[{x&#039;[t] == r*x[t]^2 - x[t]^3, x[0] == d}, x, {t, 0, 2/d}, MaxStepSize-&amp;gt;3, MaxSteps-&amp;gt;10000000]];&lt;br /&gt;
    {time, x[1/d]/.sol[[1]]}&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
g[r_] := (&lt;br /&gt;
    {time, sol} = Timing[NDSolve[{y&#039;&#039;[t] + (r+1)*y&#039;[t] + r*y[t] == 0, y[0] == 1, y&#039;[0] == 0},  y, {t, 0, 30}, MaxStepSize-&amp;gt;0.000002, MaxSteps-&amp;gt;10000000000]];&lt;br /&gt;
    {time, y[30]/.sol[[1]]}&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
kernel1 := (&lt;br /&gt;
    file = OpenWrite[&amp;quot;out1.txt&amp;quot;, FormatType -&amp;gt; OutputForm];&lt;br /&gt;
    $Output = {file};&lt;br /&gt;
    Print[f[1.2]];&lt;br /&gt;
    Close[file];&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
kernel2 := (&lt;br /&gt;
    file = OpenWrite[&amp;quot;out2.txt&amp;quot;, FormatType -&amp;gt; OutputForm];&lt;br /&gt;
    $Output = {file};&lt;br /&gt;
    Print[g[1000]];&lt;br /&gt;
    Close[file];&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
LaunchKernels[2]&lt;br /&gt;
DistributeDefinitions[kernel1, kernel2]&lt;br /&gt;
e = {ParallelSubmit[kernel1], ParallelSubmit[kernel2]}&lt;br /&gt;
WaitAll[e]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The helper functions kernel1 and kernel2 get started in different threads and then they execute f and g. The output of these functions is redirected to different files so the results can clearly be distinguished and examined as soon as one function is done.&lt;br /&gt;
&lt;br /&gt;
[[Category:Mathematics software]] [[Category:bwUniCluster]][[Category:BwForCluster_BinAC]] [[Category:bwForCluster_MLS&amp;amp;WISO_Production]]&lt;/div&gt;</summary>
		<author><name>R Rutka</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster2.0/Software/Mathematica&amp;diff=4515</id>
		<title>BwUniCluster2.0/Software/Mathematica</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster2.0/Software/Mathematica&amp;diff=4515"/>
		<updated>2016-11-03T16:33:34Z</updated>

		<summary type="html">&lt;p&gt;R Rutka: /* Versions and Availability */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=600px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Description !! Content&lt;br /&gt;
|-&lt;br /&gt;
| module load&lt;br /&gt;
| math/mathematica&lt;br /&gt;
|-&lt;br /&gt;
| Availability&lt;br /&gt;
| [[bwUniCluster]] &amp;amp;#124; [[bwForCluster_MLS&amp;amp;WISO_Production]]&lt;br /&gt;
|-&lt;br /&gt;
| License&lt;br /&gt;
| Commercial. See [http://www.wolfram.com/mathematica/pricing/ Mathematica Pricing].&lt;br /&gt;
|-&lt;br /&gt;
| Citing &lt;br /&gt;
| n/a&lt;br /&gt;
|-&lt;br /&gt;
| Links&lt;br /&gt;
| [http://www.wolfram.com/mathematica/ Homepage] &amp;amp;#124; [http://www.wolfram.com/support/?source=nav Documentation]&lt;br /&gt;
|-&lt;br /&gt;
| Graphical Interface&lt;br /&gt;
| Yes (See [[VNC]])&lt;br /&gt;
|-&lt;br /&gt;
| Comments&lt;br /&gt;
| Mathematica might not be available on all locations and clusters.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Description == &lt;br /&gt;
&#039;&#039;&#039;Mathematica&#039;&#039;&#039; is a software from Wolfram for symbolic and numerical computation with many features such as powerful visualization and application specific functions.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Versions and Availability ==&lt;br /&gt;
A list of versions currently available on all bwHPC-C5-Clusters can be obtained from the&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;big&amp;gt;&lt;br /&gt;
[https://cis-hpc.uni-konstanz.de/prod.cis/ Cluster Information System CIS]&lt;br /&gt;
&amp;lt;/big&amp;gt;&lt;br /&gt;
{{#widget:Iframe&lt;br /&gt;
|url=https://cis-hpc.uni-konstanz.de/prod.cis/bwUniCluster/math/mathematica&lt;br /&gt;
|width=90%&lt;br /&gt;
|height=330&lt;br /&gt;
|border=0&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
= Loading =&lt;br /&gt;
To check if Mathematica is available execute&lt;br /&gt;
 $ module avail math/mathematica&lt;br /&gt;
&lt;br /&gt;
If Mathematica is available you can load a specific version or you can load the default version with&lt;br /&gt;
 $ module load math/mathematica&lt;br /&gt;
&lt;br /&gt;
= General Usage =&lt;br /&gt;
Mathematica can be used interactively on the command line or with a graphical front-end.&lt;br /&gt;
Alternatively Mathematica can run a script in batch mode which is useful when submitting batch jobs to the cluster.&lt;br /&gt;
After loading Mathematica the different modes can be used as follows.&lt;br /&gt;
&lt;br /&gt;
*Interactive with GUI (needs [[X11 forwarding]] or [[VNC]]):&amp;lt;br /&amp;gt;&amp;lt;pre&amp;gt;$ mathematica&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Interactive with command line:&amp;lt;br /&amp;gt;&amp;lt;pre&amp;gt;$ math&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Non-Interactive. Looks like interactive with command line but input is taken from script.m:&amp;lt;br /&amp;gt;&amp;lt;pre&amp;gt;$ math &amp;lt; script.m&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Non-Interactive. You have to explicitly specify what you want to print&amp;lt;br /&amp;gt;&amp;lt;pre&amp;gt;$ math -script script.m&amp;lt;/pre&amp;gt;However, the output is done in InputForm which is suitable for input in other Mathematica calculations but if you want pretty output you have to change the output format to OutputForm like this&amp;lt;br /&amp;gt;&amp;lt;pre&amp;gt;SetOptions[$Output, FormatType -&amp;gt; OutputForm]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For an introduction to Mathematica we refer to the online documentation ([http://reference.wolfram.com/mathematica/guide/Mathematica.html Mathematica Documentation Center]). Specific information on the use in a compute cluster is in the next section.&lt;br /&gt;
&lt;br /&gt;
= Parallel Computation =&lt;br /&gt;
Obviously parallel computation can be useful to speed up time-consuming computations, but it should also be used for multiple computations with different input data files (e.g. for parametric studies). The reason for this&lt;br /&gt;
is the license model from Wolfram. There are two types of licenses. &lt;br /&gt;
* Each time an instance of Mathematica starts, a so called MathKernel license is used up.&lt;br /&gt;
* Each time Mathematica spawns a subprocess, a license called SubMathKernel is used up.&lt;br /&gt;
Because usually there are much more SubMathKernel licenses than MathKernel licenses it is recommended to start multiple subprocesses instead of submitting multiple jobs.&lt;br /&gt;
&lt;br /&gt;
Remember to request the correct amount of processors in your [[Batch Jobs]] script but note that Mathematica will not automatically use these processors.&lt;br /&gt;
In general you have to adjust your code to benefit from more cores.&lt;br /&gt;
To do this you first have to start a number of kernels which are then used by ParallelTable to run the computations in parallel.&lt;br /&gt;
This basic example computes the first eight square numbers in parallel.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
LaunchKernels[8]&lt;br /&gt;
f[i_] := i^2&lt;br /&gt;
DistributeDefinitions[f]&lt;br /&gt;
ParallelTable[f[i], {i,0,7}]&lt;br /&gt;
CloseKernels[]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note that the use of DistributeDefinitions is necessary for f is a user defined function and the definition of this function must be available to all kernels.&lt;br /&gt;
&lt;br /&gt;
The next example is the computation of a numerical solution for the following initial value problem&lt;br /&gt;
 x&#039;(t) = x(t)^2 - x(t)^3&lt;br /&gt;
 x(0) = d&lt;br /&gt;
It is difficult to solve this equation with high accuracy at the point 1/d.&lt;br /&gt;
We decrease the step size of the algorithm to see how the execution time and the relative error at the point 1/d change.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
d = 0.00001&lt;br /&gt;
&lt;br /&gt;
y[t_] := 1/(ProductLog[(1/d-1)*Exp[1/d-1-t]]+1)	(* analytical solution *)&lt;br /&gt;
relerr[t_, s_] := Abs[(y[t] - x[t]/.s)/y[t]]			(* relative error of solution s at time t *)&lt;br /&gt;
g[v_] := {v[[1]], v[[2]][[1]], relerr[1/d, v[[2]][[2]][[1]]]}	(* helper function *)&lt;br /&gt;
&lt;br /&gt;
(* compute numerical solutions for 6 different step sizes *)&lt;br /&gt;
LaunchKernels[6]&lt;br /&gt;
tbl = ParallelTable[{step, Timing[NDSolve[{x&#039;[t] == x[t]^2 - x[t]^3, x[0] == d}, x, {t, 0, 2/d}, MaxStepSize-&amp;gt;step, MaxSteps-&amp;gt;10000000]]}, {step,5,3,-0.4}]&lt;br /&gt;
CloseKernels[]&lt;br /&gt;
&lt;br /&gt;
SetOptions[$Output, FormatType -&amp;gt; OutputForm]    (* better output when called with -script *)&lt;br /&gt;
Print[ Grid[Join[{{&amp;quot;Stepsize&amp;quot;, &amp;quot;Time&amp;quot;, &amp;quot;Error at 1/d&amp;quot;}}, Map[g, tbl]]] ]    (* print the result *)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Mathematica features some further functions similar to ParallelTable which are documented on the [http://reference.wolfram.com/mathematica/guide/ParallelComputing.html Mathematica parallel computing webpage] from Wolfram. One such function is ParallelSubmit which can be used to start two (or more) completely unrelated functions in parallel. But bear in mind that the functions should have similar running times because the scheduler reserves the requested resources for the runtime of the whole job. The following code shows how to pack two 1-core jobs into one 2-core job.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
f[r_] := (&lt;br /&gt;
    d = 0.000001;&lt;br /&gt;
    {time, sol} = Timing[NDSolve[{x&#039;[t] == r*x[t]^2 - x[t]^3, x[0] == d}, x, {t, 0, 2/d}, MaxStepSize-&amp;gt;3, MaxSteps-&amp;gt;10000000]];&lt;br /&gt;
    {time, x[1/d]/.sol[[1]]}&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
g[r_] := (&lt;br /&gt;
    {time, sol} = Timing[NDSolve[{y&#039;&#039;[t] + (r+1)*y&#039;[t] + r*y[t] == 0, y[0] == 1, y&#039;[0] == 0},  y, {t, 0, 30}, MaxStepSize-&amp;gt;0.000002, MaxSteps-&amp;gt;10000000000]];&lt;br /&gt;
    {time, y[30]/.sol[[1]]}&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
kernel1 := (&lt;br /&gt;
    file = OpenWrite[&amp;quot;out1.txt&amp;quot;, FormatType -&amp;gt; OutputForm];&lt;br /&gt;
    $Output = {file};&lt;br /&gt;
    Print[f[1.2]];&lt;br /&gt;
    Close[file];&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
kernel2 := (&lt;br /&gt;
    file = OpenWrite[&amp;quot;out2.txt&amp;quot;, FormatType -&amp;gt; OutputForm];&lt;br /&gt;
    $Output = {file};&lt;br /&gt;
    Print[g[1000]];&lt;br /&gt;
    Close[file];&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
LaunchKernels[2]&lt;br /&gt;
DistributeDefinitions[kernel1, kernel2]&lt;br /&gt;
e = {ParallelSubmit[kernel1], ParallelSubmit[kernel2]}&lt;br /&gt;
WaitAll[e]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The helper functions kernel1 and kernel2 get started in different threads and then they execute f and g. The output of these functions is redirected to different files so the results can clearly be distinguished and examined as soon as one function is done.&lt;br /&gt;
&lt;br /&gt;
[[Category:Mathematics software]] [[Category:bwUniCluster]] [[Category:bwForCluster_MLS&amp;amp;WISO_Production]]&lt;/div&gt;</summary>
		<author><name>R Rutka</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster2.0/Software/Mathematica&amp;diff=4514</id>
		<title>BwUniCluster2.0/Software/Mathematica</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster2.0/Software/Mathematica&amp;diff=4514"/>
		<updated>2016-11-03T16:33:17Z</updated>

		<summary type="html">&lt;p&gt;R Rutka: /* Versions and Availability */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=600px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Description !! Content&lt;br /&gt;
|-&lt;br /&gt;
| module load&lt;br /&gt;
| math/mathematica&lt;br /&gt;
|-&lt;br /&gt;
| Availability&lt;br /&gt;
| [[bwUniCluster]] &amp;amp;#124; [[bwForCluster_MLS&amp;amp;WISO_Production]]&lt;br /&gt;
|-&lt;br /&gt;
| License&lt;br /&gt;
| Commercial. See [http://www.wolfram.com/mathematica/pricing/ Mathematica Pricing].&lt;br /&gt;
|-&lt;br /&gt;
| Citing &lt;br /&gt;
| n/a&lt;br /&gt;
|-&lt;br /&gt;
| Links&lt;br /&gt;
| [http://www.wolfram.com/mathematica/ Homepage] &amp;amp;#124; [http://www.wolfram.com/support/?source=nav Documentation]&lt;br /&gt;
|-&lt;br /&gt;
| Graphical Interface&lt;br /&gt;
| Yes (See [[VNC]])&lt;br /&gt;
|-&lt;br /&gt;
| Comments&lt;br /&gt;
| Mathematica might not be available on all locations and clusters.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Description == &lt;br /&gt;
&#039;&#039;&#039;Mathematica&#039;&#039;&#039; is a software from Wolfram for symbolic and numerical computation with many features such as powerful visualization and application specific functions.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Versions and Availability ==&lt;br /&gt;
A list of versions currently available on all bwHPC-C5-Clusters can be obtained from the&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;big&amp;gt;&lt;br /&gt;
[https://cis-hpc.uni-konstanz.de/prod.cis/ Cluster Information System CIS]&lt;br /&gt;
&amp;lt;/big&amp;gt;&lt;br /&gt;
{{#widget:Iframe&lt;br /&gt;
|url=https://cis-hpc.uni-konstanz.de/prod.cis/bwUniCluster/math/mathematica&lt;br /&gt;
|width=90%&lt;br /&gt;
|height=250&lt;br /&gt;
|border=0&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
= Loading =&lt;br /&gt;
To check if Mathematica is available execute&lt;br /&gt;
 $ module avail math/mathematica&lt;br /&gt;
&lt;br /&gt;
If Mathematica is available you can load a specific version or you can load the default version with&lt;br /&gt;
 $ module load math/mathematica&lt;br /&gt;
&lt;br /&gt;
= General Usage =&lt;br /&gt;
Mathematica can be used interactively on the command line or with a graphical front-end.&lt;br /&gt;
Alternatively Mathematica can run a script in batch mode which is useful when submitting batch jobs to the cluster.&lt;br /&gt;
After loading Mathematica the different modes can be used as follows.&lt;br /&gt;
&lt;br /&gt;
*Interactive with GUI (needs [[X11 forwarding]] or [[VNC]]):&amp;lt;br /&amp;gt;&amp;lt;pre&amp;gt;$ mathematica&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Interactive with command line:&amp;lt;br /&amp;gt;&amp;lt;pre&amp;gt;$ math&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Non-Interactive. Looks like interactive with command line but input is taken from script.m:&amp;lt;br /&amp;gt;&amp;lt;pre&amp;gt;$ math &amp;lt; script.m&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Non-Interactive. You have to explicitly specify what you want to print&amp;lt;br /&amp;gt;&amp;lt;pre&amp;gt;$ math -script script.m&amp;lt;/pre&amp;gt;However, the output is done in InputForm which is suitable for input in other Mathematica calculations but if you want pretty output you have to change the output format to OutputForm like this&amp;lt;br /&amp;gt;&amp;lt;pre&amp;gt;SetOptions[$Output, FormatType -&amp;gt; OutputForm]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For an introduction to Mathematica we refer to the online documentation ([http://reference.wolfram.com/mathematica/guide/Mathematica.html Mathematica Documentation Center]). Specific information on the use in a compute cluster is in the next section.&lt;br /&gt;
&lt;br /&gt;
= Parallel Computation =&lt;br /&gt;
Obviously parallel computation can be useful to speed up time-consuming computations, but it should also be used for multiple computations with different input data files (e.g. for parametric studies). The reason for this&lt;br /&gt;
is the license model from Wolfram. There are two types of licenses. &lt;br /&gt;
* Each time an instance of Mathematica starts, a so called MathKernel license is used up.&lt;br /&gt;
* Each time Mathematica spawns a subprocess, a license called SubMathKernel is used up.&lt;br /&gt;
Because usually there are much more SubMathKernel licenses than MathKernel licenses it is recommended to start multiple subprocesses instead of submitting multiple jobs.&lt;br /&gt;
&lt;br /&gt;
Remember to request the correct amount of processors in your [[Batch Jobs]] script but note that Mathematica will not automatically use these processors.&lt;br /&gt;
In general you have to adjust your code to benefit from more cores.&lt;br /&gt;
To do this you first have to start a number of kernels which are then used by ParallelTable to run the computations in parallel.&lt;br /&gt;
This basic example computes the first eight square numbers in parallel.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
LaunchKernels[8]&lt;br /&gt;
f[i_] := i^2&lt;br /&gt;
DistributeDefinitions[f]&lt;br /&gt;
ParallelTable[f[i], {i,0,7}]&lt;br /&gt;
CloseKernels[]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note that the use of DistributeDefinitions is necessary for f is a user defined function and the definition of this function must be available to all kernels.&lt;br /&gt;
&lt;br /&gt;
The next example is the computation of a numerical solution for the following initial value problem&lt;br /&gt;
 x&#039;(t) = x(t)^2 - x(t)^3&lt;br /&gt;
 x(0) = d&lt;br /&gt;
It is difficult to solve this equation with high accuracy at the point 1/d.&lt;br /&gt;
We decrease the step size of the algorithm to see how the execution time and the relative error at the point 1/d change.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
d = 0.00001&lt;br /&gt;
&lt;br /&gt;
y[t_] := 1/(ProductLog[(1/d-1)*Exp[1/d-1-t]]+1)	(* analytical solution *)&lt;br /&gt;
relerr[t_, s_] := Abs[(y[t] - x[t]/.s)/y[t]]			(* relative error of solution s at time t *)&lt;br /&gt;
g[v_] := {v[[1]], v[[2]][[1]], relerr[1/d, v[[2]][[2]][[1]]]}	(* helper function *)&lt;br /&gt;
&lt;br /&gt;
(* compute numerical solutions for 6 different step sizes *)&lt;br /&gt;
LaunchKernels[6]&lt;br /&gt;
tbl = ParallelTable[{step, Timing[NDSolve[{x&#039;[t] == x[t]^2 - x[t]^3, x[0] == d}, x, {t, 0, 2/d}, MaxStepSize-&amp;gt;step, MaxSteps-&amp;gt;10000000]]}, {step,5,3,-0.4}]&lt;br /&gt;
CloseKernels[]&lt;br /&gt;
&lt;br /&gt;
SetOptions[$Output, FormatType -&amp;gt; OutputForm]    (* better output when called with -script *)&lt;br /&gt;
Print[ Grid[Join[{{&amp;quot;Stepsize&amp;quot;, &amp;quot;Time&amp;quot;, &amp;quot;Error at 1/d&amp;quot;}}, Map[g, tbl]]] ]    (* print the result *)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Mathematica features some further functions similar to ParallelTable which are documented on the [http://reference.wolfram.com/mathematica/guide/ParallelComputing.html Mathematica parallel computing webpage] from Wolfram. One such function is ParallelSubmit which can be used to start two (or more) completely unrelated functions in parallel. But bear in mind that the functions should have similar running times because the scheduler reserves the requested resources for the runtime of the whole job. The following code shows how to pack two 1-core jobs into one 2-core job.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
f[r_] := (&lt;br /&gt;
    d = 0.000001;&lt;br /&gt;
    {time, sol} = Timing[NDSolve[{x&#039;[t] == r*x[t]^2 - x[t]^3, x[0] == d}, x, {t, 0, 2/d}, MaxStepSize-&amp;gt;3, MaxSteps-&amp;gt;10000000]];&lt;br /&gt;
    {time, x[1/d]/.sol[[1]]}&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
g[r_] := (&lt;br /&gt;
    {time, sol} = Timing[NDSolve[{y&#039;&#039;[t] + (r+1)*y&#039;[t] + r*y[t] == 0, y[0] == 1, y&#039;[0] == 0},  y, {t, 0, 30}, MaxStepSize-&amp;gt;0.000002, MaxSteps-&amp;gt;10000000000]];&lt;br /&gt;
    {time, y[30]/.sol[[1]]}&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
kernel1 := (&lt;br /&gt;
    file = OpenWrite[&amp;quot;out1.txt&amp;quot;, FormatType -&amp;gt; OutputForm];&lt;br /&gt;
    $Output = {file};&lt;br /&gt;
    Print[f[1.2]];&lt;br /&gt;
    Close[file];&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
kernel2 := (&lt;br /&gt;
    file = OpenWrite[&amp;quot;out2.txt&amp;quot;, FormatType -&amp;gt; OutputForm];&lt;br /&gt;
    $Output = {file};&lt;br /&gt;
    Print[g[1000]];&lt;br /&gt;
    Close[file];&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
LaunchKernels[2]&lt;br /&gt;
DistributeDefinitions[kernel1, kernel2]&lt;br /&gt;
e = {ParallelSubmit[kernel1], ParallelSubmit[kernel2]}&lt;br /&gt;
WaitAll[e]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The helper functions kernel1 and kernel2 get started in different threads and then they execute f and g. The output of these functions is redirected to different files so the results can clearly be distinguished and examined as soon as one function is done.&lt;br /&gt;
&lt;br /&gt;
[[Category:Mathematics software]] [[Category:bwUniCluster]] [[Category:bwForCluster_MLS&amp;amp;WISO_Production]]&lt;/div&gt;</summary>
		<author><name>R Rutka</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=JUSTUS2/Software/Orca&amp;diff=4506</id>
		<title>JUSTUS2/Software/Orca</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=JUSTUS2/Software/Orca&amp;diff=4506"/>
		<updated>2016-11-03T16:26:52Z</updated>

		<summary type="html">&lt;p&gt;R Rutka: /* Version-Specific Information */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=600px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Description !! Content&lt;br /&gt;
|-&lt;br /&gt;
| module load&lt;br /&gt;
| chem/orca&lt;br /&gt;
|-&lt;br /&gt;
| Availability&lt;br /&gt;
| [[bwUniCluster]] &amp;amp;#124; [[BwForCluster_Chemistry]]&lt;br /&gt;
|-&lt;br /&gt;
| License&lt;br /&gt;
| [https://orcaforum.cec.mpg.de/license.html &amp;quot;Research group&amp;quot; license]&lt;br /&gt;
|-&lt;br /&gt;
|Citing&lt;br /&gt;
| [https://orcaforum.cec.mpg.de/OrcaManual.pdf As described in the manual]&lt;br /&gt;
|-&lt;br /&gt;
| Links&lt;br /&gt;
| [https://orcaforum.cec.mpg.de/ ORCA Forum Homepage] &amp;amp;#124; [https://orcaforum.cec.mpg.de/OrcaManual.pdf Documentation]&lt;br /&gt;
|-&lt;br /&gt;
| Graphical Interface&lt;br /&gt;
| No&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
= Description =&lt;br /&gt;
&#039;&#039;&#039;ORCA&#039;&#039;&#039; is a modern electronic structure program package. It is a flexible, efficient and easy-to-use general purpose tool for quantum chemistry with specific emphasis on spectroscopic properties of open-shell molecules.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
ORCA is able to carry out geometry optimizations and to predict a large number of spectroscopic parameters at different levels of theory. Besides the use of Hartee Fock theory, density functional theory (DFT) and semiempirical methods, high level ab initio quantum chemical methods, based on the configuration interaction and coupled cluster methods, are included into ORCA to an increasing degree.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Due to the user-friendly style, ORCA is considered to be a helpful tool not only for computational chemists, but also for chemists, physicists and biologists that are interested in developing the full information content of their experimental data with help of calculations. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;Implemented Methods&amp;lt;/u&amp;gt;&lt;br /&gt;
* Semiempirical INDO/S, MNDO, AM1, PM3, NDDO/1&lt;br /&gt;
* Hartee Fock theory (RHF, UHF, ROHF and CASSCF) all in direct, semidirect, or conventional mode, different RI approximations&lt;br /&gt;
* DFT including a reasonably large number of exchange and correlation functionals including hybrid DFT and the most recent double hybrid functionals (see below).&lt;br /&gt;
* High level single reference correlation models: CCSD(T), QCISD(T), CEPA, CPF (with and without RI, Local)&lt;br /&gt;
* High level ab-initio individual selecting multireference methods (MRCI, MRMP2, MRMP3, MRMP4, MRACPF, MRAQCC, SORCI, DDCI) for ground- and excited-states.&lt;br /&gt;
* Geometry optimization in redundant internal coordinates using analytical gradient techniques for all SCF methods as well as MP2.&lt;br /&gt;
* Excited state calculations via TD-DFT and CI-singles (CIS). For CIS an analytic gradient is also available. The doubles correction is available for CIS(D) in an efficient implementation.&lt;br /&gt;
* Scalar relativistic ZORA, IORA and Douglas-Kroll-Hess (DKH) approaches, picture change effects, all-electron basis sets, effective core potentials&lt;br /&gt;
* The COSMO model is available throughout the package for continuum dielectric modeling of the environment.&lt;br /&gt;
* QM/MM interface to GROMACS&lt;br /&gt;
* Double hybrid functionals including a fraction of nonlocal correlation. Analytic gradients are also available (these methods were invented by the Grimme group).&lt;br /&gt;
* Van der Waals correct density functionals.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
For more information on features please visit [https://orcaforum.cec.mpg.de/ &#039;&#039;The ORCA Portal of the Max-Planck Institute&#039;&#039;] web page.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Versions and Availability =&lt;br /&gt;
A list of versions currently available on all bwHPC-C5-Clusters can be obtained from the&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://cis-hpc.uni-konstanz.de Cluster Information System CIS]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/big&amp;gt;&lt;br /&gt;
{{#widget:Iframe&lt;br /&gt;
|url=https://cis-hpc.uni-konstanz.de/prod.cis/bwUniCluster/chem/orca&lt;br /&gt;
|width=99%&lt;br /&gt;
|height=280&lt;br /&gt;
|border=0&lt;br /&gt;
}}&lt;br /&gt;
On the command line interface of any bwHPC cluster you&#039;ll get a list of available versions by using&lt;br /&gt;
the command&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;&#039;module avail chem/orca&#039;&#039;&#039;&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module avail chem/orca               # bwUniCluster&lt;br /&gt;
--------------------- /opt/bwhpc/common/modulefiles ----------------------&lt;br /&gt;
chem/orca/3.0.1 chem/orca/3.0.3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= License =&lt;br /&gt;
The ORCA license is considered as a &amp;quot;Research group&amp;quot; license. Thus anyone who directly associated with your research group is covered by the license and may share your copy of ORCA on all computer resources of your group.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
This license only applies to academic users. Commercial use of ORCA is prohibited under the terms of this license.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[https://orcaforum.cec.mpg.de/license.html Complete ORCA Users License Agreement]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
= Usage =&lt;br /&gt;
== Loading the module ==&lt;br /&gt;
You can load the default version of &#039;&#039;ORCA&#039;&#039; with the command &#039;&#039;&#039;&#039;module load chem/orca&#039;&#039;&#039;&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load chem/orca&lt;br /&gt;
module avail chem/orca&lt;br /&gt;
------------------------ /opt/bwhpc/common/modulefiles ----------------------&lt;br /&gt;
chem/orca/3.0.3    chem/orca/3.0.3-openmpi-1.6.5(default)&lt;br /&gt;
$ module load chem/orca&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The module will try to load modules it needs to function (e.g. compiler/intel). If loading the module fails, check if you have already loaded one of those modules, but not in the version needed for Orca.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
If you wish to load a specific (older) version, you can do so using e.g.&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&#039;&#039;&#039;&#039;module load chem/orca/&#039;&#039;&#039;version&#039; to load the version you desires.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load chem/orca/3.0.1    # bwUniCluster example&lt;br /&gt;
Please do not use this module if you do not own a valid ORCA group license.&lt;br /&gt;
Please cite ORCA in your publications according to ORCA documentation.&lt;br /&gt;
Please read &#039;module help chem/orca/3.0.1&#039; before using ORCA.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;font color=red&amp;gt;Orca 3.0.3 mit OpenMPI 1.6.5 läuft stabiler! &lt;br /&gt;
Einige MPI-Abstürze sind nachweislich (gleicher Job) damit durchgelaufen.&amp;lt;br&amp;gt;&lt;br /&gt;
This version is known to be more stable with bigger jobs. Try this one if you get problems with other versions of Orca!&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;font color=green&amp;gt;This version is the default now. [[#Versions and Availability|Only available on the Chemical Cluster &#039;Justus&#039;]]!&amp;lt;/font&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Program Binaries ==&lt;br /&gt;
You can find the ORCA binaries in the main folder of the ORCA system.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
After loading the ORCA module (&#039;&#039;module load chem/orca/&#039;version&#039;&#039;&#039;) this path is also set to the local $PATH- and [[#ORCA-Specific Environments|$ORCA_BIN_DIR environments]].&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ls -x $ORCA_BIN_DIR&lt;br /&gt;
bwhpc-examples    manual           modulefiles   orca           orca_2aim         orca_2mkl&lt;br /&gt;
orca_anoint       orca_anoint_mpi  orca_asa      orca_casscf    orca_casscf_mpi   orca_chelpg&lt;br /&gt;
orca_ciprep       orca_cis         orca_cis_mpi  orca_cleanup   orca_cleanup_mpi  orca_cpcasscf&lt;br /&gt;
orca_cpscf        orca_cpscf_mpi   orca_eca      orca_ecplib    orca_eprnmr       orca_eprnmr_mpi&lt;br /&gt;
orca_euler        orca_fci         orca_fitpes   orca_gstep     orca_gtoint       orca_gtoint_mpi&lt;br /&gt;
orca_loc          orca_mapspc      orca_md       orca_mdci      orca_mdci_mpi     orca_mergefrag&lt;br /&gt;
orca_mp2          orca_mp2_mpi     orca_mrci     orca_mrci_mpi  orca_ndoint       orca_numfreq&lt;br /&gt;
orca_pc           orca_pc_mpi      orca_plot     orca_pltvib    orca_pop          orca_rel&lt;br /&gt;
orca_rocis        orca_rocis_mpi   orca_scf      orca_scfgrad   orca_scfgrad_mpi  orca_scfhess&lt;br /&gt;
orca_scfhess_mpi  orca_scf_mpi     orca_soc      orca_soc_mpi   orca_vib          orca_vpot&lt;br /&gt;
otool_cosmo       otool_gcp        otool_smd&lt;br /&gt;
$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Only the programs with the suffix &amp;lt;font color=green&amp;gt;&#039;&#039;&#039;_mpi&#039;&#039;&#039;&amp;lt;/font&amp;gt; are compiled including OPENMPI functionality.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Disk Usage ==&lt;br /&gt;
Scratch files are written to the current directory by default.&amp;lt;br&amp;gt;&lt;br /&gt;
Please change to a local directory or to &#039;&#039;&#039;your local workspace&#039;&#039;&#039; (preferred) before starting your calculations. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;calc_repo&#039; is an example name of a repository you created by using the command &#039;ws_allocate&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd $(ws_find calc_repo)&lt;br /&gt;
[&#039;your-id&#039;-calc_repo-0]$ pwd&lt;br /&gt;
/work/workspace/scratch/&#039;your-id&#039;-calc_repo-0&lt;br /&gt;
[&#039;your-id&#039;-calc_repo-0]$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
You can copy a simple interactive example to your &#039;&#039;&#039;workspace&#039;&#039;&#039; and run it, using &#039;msub&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd $(ws_find calc_repo)&lt;br /&gt;
$ cp $ORCA_EXA_DIR/bwhpc-orca-example.moab .&lt;br /&gt;
$ cp bwhpc-orca-example.moab myorcajob.moab &lt;br /&gt;
§ vi myorcajob.moab         # do your own modifications&lt;br /&gt;
$ msub myorcajob.moab       # start job submission&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
= ORCA-Specific Environments =&lt;br /&gt;
To see a list of all ORCA environments set by the &#039;module load chem/orca/version&#039;-command,&lt;br /&gt;
use &#039;&#039;&#039;&#039;env | grep ORCA&#039;&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Or try the command &#039;&#039;&#039;&#039;module show &#039;chem/orca&#039;&#039;&#039;/version&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load chem/orca/3.0.3&lt;br /&gt;
$ env | grep ORCA&lt;br /&gt;
ORCA_VERSION=3.0.3&lt;br /&gt;
ORCA_MAN_DIR=/opt/bwhpc/common/chem/orca/3.0.3/manual&lt;br /&gt;
ORCA_EXA_DIR=/opt/bwhpc/common/chem/orca/3.0.3/bwhpc-examples&lt;br /&gt;
ORCA_BIN_DIR=/opt/bwhpc/common/chem/orca/3.0.3&lt;br /&gt;
ORCA_HOME=/opt/bwhpc/common/chem/orca/3.0.3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
= Version-Specific Information =&lt;br /&gt;
For a more detailed information specific to a specific ORCA version, see the information available via the module system with the command &#039;&#039;&#039;&#039;module help chem/orca&#039;&#039;&#039;&#039;.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
For a small abstract what ORCA is about use the command &#039;&#039;&#039;&#039;module whatis chem/orca&#039;&#039;&#039;&#039;.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;Examples&amp;lt;/u&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module avail chem/orca&lt;br /&gt;
----------------------- /opt/bwhpc/common/modulefiles ---------------------------&lt;br /&gt;
chem/orca/3.0.1 chem/orca/3.0.3&lt;br /&gt;
&lt;br /&gt;
$ module whatis chem/orca/3.0.1&lt;br /&gt;
chem/orca/3.0.1      : Quantum chemistry package ORCA, version 3.0.1&lt;br /&gt;
    (command &#039;/opt/bwhpc/common/chem/orca/3.0.1/orca&#039;)&lt;br /&gt;
&lt;br /&gt;
$ module help chem/orca/3.0.1&lt;br /&gt;
----------- Module Specific Help for &#039;chem/orca/3.0.1&#039; ------------&lt;br /&gt;
This module provides the quantum chemistry package ORCA version 3.0.1&lt;br /&gt;
via command &#039;/opt/bwhpc/common/chem/orca/3.0.1/orca&#039; &lt;br /&gt;
[...] &lt;br /&gt;
Documentation: &lt;br /&gt;
*  Max-Planck-Institut fuer Chemische Energiekonversion  &lt;br /&gt;
   https://cec.mpg.de/forum/portal.php&lt;br /&gt;
*  New features for version 3.0.1&lt;br /&gt;
   https://cec.mpg.de/forum/portal.php#a3&lt;br /&gt;
*  Manuals in pdf format:&lt;br /&gt;
   /opt/bwhpc/common/chem/orca/3.0.1/manual&lt;br /&gt;
*  Example data and a Moab example script can be found here:&lt;br /&gt;
   /opt/bwhpc/common/chem/orca/3.0.1/bwhpc-examples&lt;br /&gt;
[...]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
[[Category:Chemistry software]][[Category:bwUniCluster]][[Category:bwForCluster_Chemistry]][[Category:BwForCluster_BinAC]]&lt;/div&gt;</summary>
		<author><name>R Rutka</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=JUSTUS2/Software/Orca&amp;diff=4505</id>
		<title>JUSTUS2/Software/Orca</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=JUSTUS2/Software/Orca&amp;diff=4505"/>
		<updated>2016-11-03T16:26:22Z</updated>

		<summary type="html">&lt;p&gt;R Rutka: /* Version-Specific Information */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=600px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Description !! Content&lt;br /&gt;
|-&lt;br /&gt;
| module load&lt;br /&gt;
| chem/orca&lt;br /&gt;
|-&lt;br /&gt;
| Availability&lt;br /&gt;
| [[bwUniCluster]] &amp;amp;#124; [[BwForCluster_Chemistry]]&lt;br /&gt;
|-&lt;br /&gt;
| License&lt;br /&gt;
| [https://orcaforum.cec.mpg.de/license.html &amp;quot;Research group&amp;quot; license]&lt;br /&gt;
|-&lt;br /&gt;
|Citing&lt;br /&gt;
| [https://orcaforum.cec.mpg.de/OrcaManual.pdf As described in the manual]&lt;br /&gt;
|-&lt;br /&gt;
| Links&lt;br /&gt;
| [https://orcaforum.cec.mpg.de/ ORCA Forum Homepage] &amp;amp;#124; [https://orcaforum.cec.mpg.de/OrcaManual.pdf Documentation]&lt;br /&gt;
|-&lt;br /&gt;
| Graphical Interface&lt;br /&gt;
| No&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
= Description =&lt;br /&gt;
&#039;&#039;&#039;ORCA&#039;&#039;&#039; is a modern electronic structure program package. It is a flexible, efficient and easy-to-use general purpose tool for quantum chemistry with specific emphasis on spectroscopic properties of open-shell molecules.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
ORCA is able to carry out geometry optimizations and to predict a large number of spectroscopic parameters at different levels of theory. Besides the use of Hartee Fock theory, density functional theory (DFT) and semiempirical methods, high level ab initio quantum chemical methods, based on the configuration interaction and coupled cluster methods, are included into ORCA to an increasing degree.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Due to the user-friendly style, ORCA is considered to be a helpful tool not only for computational chemists, but also for chemists, physicists and biologists that are interested in developing the full information content of their experimental data with help of calculations. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;Implemented Methods&amp;lt;/u&amp;gt;&lt;br /&gt;
* Semiempirical INDO/S, MNDO, AM1, PM3, NDDO/1&lt;br /&gt;
* Hartee Fock theory (RHF, UHF, ROHF and CASSCF) all in direct, semidirect, or conventional mode, different RI approximations&lt;br /&gt;
* DFT including a reasonably large number of exchange and correlation functionals including hybrid DFT and the most recent double hybrid functionals (see below).&lt;br /&gt;
* High level single reference correlation models: CCSD(T), QCISD(T), CEPA, CPF (with and without RI, Local)&lt;br /&gt;
* High level ab-initio individual selecting multireference methods (MRCI, MRMP2, MRMP3, MRMP4, MRACPF, MRAQCC, SORCI, DDCI) for ground- and excited-states.&lt;br /&gt;
* Geometry optimization in redundant internal coordinates using analytical gradient techniques for all SCF methods as well as MP2.&lt;br /&gt;
* Excited state calculations via TD-DFT and CI-singles (CIS). For CIS an analytic gradient is also available. The doubles correction is available for CIS(D) in an efficient implementation.&lt;br /&gt;
* Scalar relativistic ZORA, IORA and Douglas-Kroll-Hess (DKH) approaches, picture change effects, all-electron basis sets, effective core potentials&lt;br /&gt;
* The COSMO model is available throughout the package for continuum dielectric modeling of the environment.&lt;br /&gt;
* QM/MM interface to GROMACS&lt;br /&gt;
* Double hybrid functionals including a fraction of nonlocal correlation. Analytic gradients are also available (these methods were invented by the Grimme group).&lt;br /&gt;
* Van der Waals correct density functionals.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
For more information on features please visit [https://orcaforum.cec.mpg.de/ &#039;&#039;The ORCA Portal of the Max-Planck Institute&#039;&#039;] web page.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Versions and Availability =&lt;br /&gt;
A list of versions currently available on all bwHPC-C5-Clusters can be obtained from the&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://cis-hpc.uni-konstanz.de Cluster Information System CIS]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/big&amp;gt;&lt;br /&gt;
{{#widget:Iframe&lt;br /&gt;
|url=https://cis-hpc.uni-konstanz.de/prod.cis/bwUniCluster/chem/orca&lt;br /&gt;
|width=99%&lt;br /&gt;
|height=280&lt;br /&gt;
|border=0&lt;br /&gt;
}}&lt;br /&gt;
On the command line interface of any bwHPC cluster you&#039;ll get a list of available versions by using&lt;br /&gt;
the command&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;&#039;module avail chem/orca&#039;&#039;&#039;&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module avail chem/orca               # bwUniCluster&lt;br /&gt;
--------------------- /opt/bwhpc/common/modulefiles ----------------------&lt;br /&gt;
chem/orca/3.0.1 chem/orca/3.0.3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= License =&lt;br /&gt;
The ORCA license is considered as a &amp;quot;Research group&amp;quot; license. Thus anyone who directly associated with your research group is covered by the license and may share your copy of ORCA on all computer resources of your group.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
This license only applies to academic users. Commercial use of ORCA is prohibited under the terms of this license.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[https://orcaforum.cec.mpg.de/license.html Complete ORCA Users License Agreement]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
= Usage =&lt;br /&gt;
== Loading the module ==&lt;br /&gt;
You can load the default version of &#039;&#039;ORCA&#039;&#039; with the command &#039;&#039;&#039;&#039;module load chem/orca&#039;&#039;&#039;&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load chem/orca&lt;br /&gt;
module avail chem/orca&lt;br /&gt;
------------------------ /opt/bwhpc/common/modulefiles ----------------------&lt;br /&gt;
chem/orca/3.0.3    chem/orca/3.0.3-openmpi-1.6.5(default)&lt;br /&gt;
$ module load chem/orca&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The module will try to load modules it needs to function (e.g. compiler/intel). If loading the module fails, check if you have already loaded one of those modules, but not in the version needed for Orca.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
If you wish to load a specific (older) version, you can do so using e.g.&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&#039;&#039;&#039;&#039;module load chem/orca/&#039;&#039;&#039;version&#039; to load the version you desires.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load chem/orca/3.0.1    # bwUniCluster example&lt;br /&gt;
Please do not use this module if you do not own a valid ORCA group license.&lt;br /&gt;
Please cite ORCA in your publications according to ORCA documentation.&lt;br /&gt;
Please read &#039;module help chem/orca/3.0.1&#039; before using ORCA.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;font color=red&amp;gt;Orca 3.0.3 mit OpenMPI 1.6.5 läuft stabiler! &lt;br /&gt;
Einige MPI-Abstürze sind nachweislich (gleicher Job) damit durchgelaufen.&amp;lt;br&amp;gt;&lt;br /&gt;
This version is known to be more stable with bigger jobs. Try this one if you get problems with other versions of Orca!&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;font color=green&amp;gt;This version is the default now. [[#Versions and Availability|Only available on the Chemical Cluster &#039;Justus&#039;]]!&amp;lt;/font&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Program Binaries ==&lt;br /&gt;
You can find the ORCA binaries in the main folder of the ORCA system.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
After loading the ORCA module (&#039;&#039;module load chem/orca/&#039;version&#039;&#039;&#039;) this path is also set to the local $PATH- and [[#ORCA-Specific Environments|$ORCA_BIN_DIR environments]].&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ls -x $ORCA_BIN_DIR&lt;br /&gt;
bwhpc-examples    manual           modulefiles   orca           orca_2aim         orca_2mkl&lt;br /&gt;
orca_anoint       orca_anoint_mpi  orca_asa      orca_casscf    orca_casscf_mpi   orca_chelpg&lt;br /&gt;
orca_ciprep       orca_cis         orca_cis_mpi  orca_cleanup   orca_cleanup_mpi  orca_cpcasscf&lt;br /&gt;
orca_cpscf        orca_cpscf_mpi   orca_eca      orca_ecplib    orca_eprnmr       orca_eprnmr_mpi&lt;br /&gt;
orca_euler        orca_fci         orca_fitpes   orca_gstep     orca_gtoint       orca_gtoint_mpi&lt;br /&gt;
orca_loc          orca_mapspc      orca_md       orca_mdci      orca_mdci_mpi     orca_mergefrag&lt;br /&gt;
orca_mp2          orca_mp2_mpi     orca_mrci     orca_mrci_mpi  orca_ndoint       orca_numfreq&lt;br /&gt;
orca_pc           orca_pc_mpi      orca_plot     orca_pltvib    orca_pop          orca_rel&lt;br /&gt;
orca_rocis        orca_rocis_mpi   orca_scf      orca_scfgrad   orca_scfgrad_mpi  orca_scfhess&lt;br /&gt;
orca_scfhess_mpi  orca_scf_mpi     orca_soc      orca_soc_mpi   orca_vib          orca_vpot&lt;br /&gt;
otool_cosmo       otool_gcp        otool_smd&lt;br /&gt;
$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Only the programs with the suffix &amp;lt;font color=green&amp;gt;&#039;&#039;&#039;_mpi&#039;&#039;&#039;&amp;lt;/font&amp;gt; are compiled including OPENMPI functionality.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Disk Usage ==&lt;br /&gt;
Scratch files are written to the current directory by default.&amp;lt;br&amp;gt;&lt;br /&gt;
Please change to a local directory or to &#039;&#039;&#039;your local workspace&#039;&#039;&#039; (preferred) before starting your calculations. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;calc_repo&#039; is an example name of a repository you created by using the command &#039;ws_allocate&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd $(ws_find calc_repo)&lt;br /&gt;
[&#039;your-id&#039;-calc_repo-0]$ pwd&lt;br /&gt;
/work/workspace/scratch/&#039;your-id&#039;-calc_repo-0&lt;br /&gt;
[&#039;your-id&#039;-calc_repo-0]$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
You can copy a simple interactive example to your &#039;&#039;&#039;workspace&#039;&#039;&#039; and run it, using &#039;msub&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd $(ws_find calc_repo)&lt;br /&gt;
$ cp $ORCA_EXA_DIR/bwhpc-orca-example.moab .&lt;br /&gt;
$ cp bwhpc-orca-example.moab myorcajob.moab &lt;br /&gt;
§ vi myorcajob.moab         # do your own modifications&lt;br /&gt;
$ msub myorcajob.moab       # start job submission&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
= ORCA-Specific Environments =&lt;br /&gt;
To see a list of all ORCA environments set by the &#039;module load chem/orca/version&#039;-command,&lt;br /&gt;
use &#039;&#039;&#039;&#039;env | grep ORCA&#039;&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Or try the command &#039;&#039;&#039;&#039;module show &#039;chem/orca&#039;&#039;&#039;/version&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load chem/orca/3.0.3&lt;br /&gt;
$ env | grep ORCA&lt;br /&gt;
ORCA_VERSION=3.0.3&lt;br /&gt;
ORCA_MAN_DIR=/opt/bwhpc/common/chem/orca/3.0.3/manual&lt;br /&gt;
ORCA_EXA_DIR=/opt/bwhpc/common/chem/orca/3.0.3/bwhpc-examples&lt;br /&gt;
ORCA_BIN_DIR=/opt/bwhpc/common/chem/orca/3.0.3&lt;br /&gt;
ORCA_HOME=/opt/bwhpc/common/chem/orca/3.0.3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
= Version-Specific Information =&lt;br /&gt;
For a more detailed information specific to a specific ORCA version, see the information available via the module system with the command &#039;&#039;&#039;&#039;module help chem/orca&#039;&#039;&#039;&#039;.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
For a small abstract what ORCA is about use the command &#039;&#039;&#039;&#039;module whatis chem/orca&#039;&#039;&#039;&#039;.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;Examples&amp;lt;/u&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module avail chem/orca&lt;br /&gt;
------------------------------ /opt/bwhpc/common/modulefiles ---------------------------------------&lt;br /&gt;
chem/orca/3.0.1 chem/orca/3.0.3&lt;br /&gt;
&lt;br /&gt;
$ module whatis chem/orca/3.0.1&lt;br /&gt;
chem/orca/3.0.1      : Quantum chemistry package ORCA, version 3.0.1&lt;br /&gt;
    (command &#039;/opt/bwhpc/common/chem/orca/3.0.1/orca&#039;)&lt;br /&gt;
&lt;br /&gt;
$ module help chem/orca/3.0.1&lt;br /&gt;
----------- Module Specific Help for &#039;chem/orca/3.0.1&#039; ------------&lt;br /&gt;
This module provides the quantum chemistry package ORCA version 3.0.1&lt;br /&gt;
via command &#039;/opt/bwhpc/common/chem/orca/3.0.1/orca&#039; &lt;br /&gt;
[...] &lt;br /&gt;
Documentation: &lt;br /&gt;
*  Max-Planck-Institut fuer Chemische Energiekonversion  &lt;br /&gt;
   https://cec.mpg.de/forum/portal.php&lt;br /&gt;
*  New features for version 3.0.1&lt;br /&gt;
   https://cec.mpg.de/forum/portal.php#a3&lt;br /&gt;
*  Manuals in pdf format:&lt;br /&gt;
   /opt/bwhpc/common/chem/orca/3.0.1/manual&lt;br /&gt;
*  Example data and a Moab example script can be found here:&lt;br /&gt;
   /opt/bwhpc/common/chem/orca/3.0.1/bwhpc-examples&lt;br /&gt;
[...]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
[[Category:Chemistry software]][[Category:bwUniCluster]][[Category:bwForCluster_Chemistry]][[Category:BwForCluster_BinAC]]&lt;/div&gt;</summary>
		<author><name>R Rutka</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=JUSTUS2/Software/Orca&amp;diff=4504</id>
		<title>JUSTUS2/Software/Orca</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=JUSTUS2/Software/Orca&amp;diff=4504"/>
		<updated>2016-11-03T16:25:44Z</updated>

		<summary type="html">&lt;p&gt;R Rutka: /* Versions and Availability */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=600px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Description !! Content&lt;br /&gt;
|-&lt;br /&gt;
| module load&lt;br /&gt;
| chem/orca&lt;br /&gt;
|-&lt;br /&gt;
| Availability&lt;br /&gt;
| [[bwUniCluster]] &amp;amp;#124; [[BwForCluster_Chemistry]]&lt;br /&gt;
|-&lt;br /&gt;
| License&lt;br /&gt;
| [https://orcaforum.cec.mpg.de/license.html &amp;quot;Research group&amp;quot; license]&lt;br /&gt;
|-&lt;br /&gt;
|Citing&lt;br /&gt;
| [https://orcaforum.cec.mpg.de/OrcaManual.pdf As described in the manual]&lt;br /&gt;
|-&lt;br /&gt;
| Links&lt;br /&gt;
| [https://orcaforum.cec.mpg.de/ ORCA Forum Homepage] &amp;amp;#124; [https://orcaforum.cec.mpg.de/OrcaManual.pdf Documentation]&lt;br /&gt;
|-&lt;br /&gt;
| Graphical Interface&lt;br /&gt;
| No&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
= Description =&lt;br /&gt;
&#039;&#039;&#039;ORCA&#039;&#039;&#039; is a modern electronic structure program package. It is a flexible, efficient and easy-to-use general purpose tool for quantum chemistry with specific emphasis on spectroscopic properties of open-shell molecules.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
ORCA is able to carry out geometry optimizations and to predict a large number of spectroscopic parameters at different levels of theory. Besides the use of Hartee Fock theory, density functional theory (DFT) and semiempirical methods, high level ab initio quantum chemical methods, based on the configuration interaction and coupled cluster methods, are included into ORCA to an increasing degree.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Due to the user-friendly style, ORCA is considered to be a helpful tool not only for computational chemists, but also for chemists, physicists and biologists that are interested in developing the full information content of their experimental data with help of calculations. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;Implemented Methods&amp;lt;/u&amp;gt;&lt;br /&gt;
* Semiempirical INDO/S, MNDO, AM1, PM3, NDDO/1&lt;br /&gt;
* Hartee Fock theory (RHF, UHF, ROHF and CASSCF) all in direct, semidirect, or conventional mode, different RI approximations&lt;br /&gt;
* DFT including a reasonably large number of exchange and correlation functionals including hybrid DFT and the most recent double hybrid functionals (see below).&lt;br /&gt;
* High level single reference correlation models: CCSD(T), QCISD(T), CEPA, CPF (with and without RI, Local)&lt;br /&gt;
* High level ab-initio individual selecting multireference methods (MRCI, MRMP2, MRMP3, MRMP4, MRACPF, MRAQCC, SORCI, DDCI) for ground- and excited-states.&lt;br /&gt;
* Geometry optimization in redundant internal coordinates using analytical gradient techniques for all SCF methods as well as MP2.&lt;br /&gt;
* Excited state calculations via TD-DFT and CI-singles (CIS). For CIS an analytic gradient is also available. The doubles correction is available for CIS(D) in an efficient implementation.&lt;br /&gt;
* Scalar relativistic ZORA, IORA and Douglas-Kroll-Hess (DKH) approaches, picture change effects, all-electron basis sets, effective core potentials&lt;br /&gt;
* The COSMO model is available throughout the package for continuum dielectric modeling of the environment.&lt;br /&gt;
* QM/MM interface to GROMACS&lt;br /&gt;
* Double hybrid functionals including a fraction of nonlocal correlation. Analytic gradients are also available (these methods were invented by the Grimme group).&lt;br /&gt;
* Van der Waals correct density functionals.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
For more information on features please visit [https://orcaforum.cec.mpg.de/ &#039;&#039;The ORCA Portal of the Max-Planck Institute&#039;&#039;] web page.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Versions and Availability =&lt;br /&gt;
A list of versions currently available on all bwHPC-C5-Clusters can be obtained from the&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://cis-hpc.uni-konstanz.de Cluster Information System CIS]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/big&amp;gt;&lt;br /&gt;
{{#widget:Iframe&lt;br /&gt;
|url=https://cis-hpc.uni-konstanz.de/prod.cis/bwUniCluster/chem/orca&lt;br /&gt;
|width=99%&lt;br /&gt;
|height=280&lt;br /&gt;
|border=0&lt;br /&gt;
}}&lt;br /&gt;
On the command line interface of any bwHPC cluster you&#039;ll get a list of available versions by using&lt;br /&gt;
the command&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;&#039;module avail chem/orca&#039;&#039;&#039;&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module avail chem/orca               # bwUniCluster&lt;br /&gt;
--------------------- /opt/bwhpc/common/modulefiles ----------------------&lt;br /&gt;
chem/orca/3.0.1 chem/orca/3.0.3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= License =&lt;br /&gt;
The ORCA license is considered as a &amp;quot;Research group&amp;quot; license. Thus anyone who directly associated with your research group is covered by the license and may share your copy of ORCA on all computer resources of your group.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
This license only applies to academic users. Commercial use of ORCA is prohibited under the terms of this license.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[https://orcaforum.cec.mpg.de/license.html Complete ORCA Users License Agreement]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
= Usage =&lt;br /&gt;
== Loading the module ==&lt;br /&gt;
You can load the default version of &#039;&#039;ORCA&#039;&#039; with the command &#039;&#039;&#039;&#039;module load chem/orca&#039;&#039;&#039;&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load chem/orca&lt;br /&gt;
module avail chem/orca&lt;br /&gt;
------------------------ /opt/bwhpc/common/modulefiles ----------------------&lt;br /&gt;
chem/orca/3.0.3    chem/orca/3.0.3-openmpi-1.6.5(default)&lt;br /&gt;
$ module load chem/orca&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The module will try to load modules it needs to function (e.g. compiler/intel). If loading the module fails, check if you have already loaded one of those modules, but not in the version needed for Orca.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
If you wish to load a specific (older) version, you can do so using e.g.&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&#039;&#039;&#039;&#039;module load chem/orca/&#039;&#039;&#039;version&#039; to load the version you desires.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load chem/orca/3.0.1    # bwUniCluster example&lt;br /&gt;
Please do not use this module if you do not own a valid ORCA group license.&lt;br /&gt;
Please cite ORCA in your publications according to ORCA documentation.&lt;br /&gt;
Please read &#039;module help chem/orca/3.0.1&#039; before using ORCA.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;font color=red&amp;gt;Orca 3.0.3 mit OpenMPI 1.6.5 läuft stabiler! &lt;br /&gt;
Einige MPI-Abstürze sind nachweislich (gleicher Job) damit durchgelaufen.&amp;lt;br&amp;gt;&lt;br /&gt;
This version is known to be more stable with bigger jobs. Try this one if you get problems with other versions of Orca!&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;font color=green&amp;gt;This version is the default now. [[#Versions and Availability|Only available on the Chemical Cluster &#039;Justus&#039;]]!&amp;lt;/font&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Program Binaries ==&lt;br /&gt;
You can find the ORCA binaries in the main folder of the ORCA system.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
After loading the ORCA module (&#039;&#039;module load chem/orca/&#039;version&#039;&#039;&#039;) this path is also set to the local $PATH- and [[#ORCA-Specific Environments|$ORCA_BIN_DIR environments]].&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ls -x $ORCA_BIN_DIR&lt;br /&gt;
bwhpc-examples    manual           modulefiles   orca           orca_2aim         orca_2mkl&lt;br /&gt;
orca_anoint       orca_anoint_mpi  orca_asa      orca_casscf    orca_casscf_mpi   orca_chelpg&lt;br /&gt;
orca_ciprep       orca_cis         orca_cis_mpi  orca_cleanup   orca_cleanup_mpi  orca_cpcasscf&lt;br /&gt;
orca_cpscf        orca_cpscf_mpi   orca_eca      orca_ecplib    orca_eprnmr       orca_eprnmr_mpi&lt;br /&gt;
orca_euler        orca_fci         orca_fitpes   orca_gstep     orca_gtoint       orca_gtoint_mpi&lt;br /&gt;
orca_loc          orca_mapspc      orca_md       orca_mdci      orca_mdci_mpi     orca_mergefrag&lt;br /&gt;
orca_mp2          orca_mp2_mpi     orca_mrci     orca_mrci_mpi  orca_ndoint       orca_numfreq&lt;br /&gt;
orca_pc           orca_pc_mpi      orca_plot     orca_pltvib    orca_pop          orca_rel&lt;br /&gt;
orca_rocis        orca_rocis_mpi   orca_scf      orca_scfgrad   orca_scfgrad_mpi  orca_scfhess&lt;br /&gt;
orca_scfhess_mpi  orca_scf_mpi     orca_soc      orca_soc_mpi   orca_vib          orca_vpot&lt;br /&gt;
otool_cosmo       otool_gcp        otool_smd&lt;br /&gt;
$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Only the programs with the suffix &amp;lt;font color=green&amp;gt;&#039;&#039;&#039;_mpi&#039;&#039;&#039;&amp;lt;/font&amp;gt; are compiled including OPENMPI functionality.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Disk Usage ==&lt;br /&gt;
Scratch files are written to the current directory by default.&amp;lt;br&amp;gt;&lt;br /&gt;
Please change to a local directory or to &#039;&#039;&#039;your local workspace&#039;&#039;&#039; (preferred) before starting your calculations. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;calc_repo&#039; is an example name of a repository you created by using the command &#039;ws_allocate&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd $(ws_find calc_repo)&lt;br /&gt;
[&#039;your-id&#039;-calc_repo-0]$ pwd&lt;br /&gt;
/work/workspace/scratch/&#039;your-id&#039;-calc_repo-0&lt;br /&gt;
[&#039;your-id&#039;-calc_repo-0]$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
You can copy a simple interactive example to your &#039;&#039;&#039;workspace&#039;&#039;&#039; and run it, using &#039;msub&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd $(ws_find calc_repo)&lt;br /&gt;
$ cp $ORCA_EXA_DIR/bwhpc-orca-example.moab .&lt;br /&gt;
$ cp bwhpc-orca-example.moab myorcajob.moab &lt;br /&gt;
§ vi myorcajob.moab         # do your own modifications&lt;br /&gt;
$ msub myorcajob.moab       # start job submission&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
= ORCA-Specific Environments =&lt;br /&gt;
To see a list of all ORCA environments set by the &#039;module load chem/orca/version&#039;-command,&lt;br /&gt;
use &#039;&#039;&#039;&#039;env | grep ORCA&#039;&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Or try the command &#039;&#039;&#039;&#039;module show &#039;chem/orca&#039;&#039;&#039;/version&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load chem/orca/3.0.3&lt;br /&gt;
$ env | grep ORCA&lt;br /&gt;
ORCA_VERSION=3.0.3&lt;br /&gt;
ORCA_MAN_DIR=/opt/bwhpc/common/chem/orca/3.0.3/manual&lt;br /&gt;
ORCA_EXA_DIR=/opt/bwhpc/common/chem/orca/3.0.3/bwhpc-examples&lt;br /&gt;
ORCA_BIN_DIR=/opt/bwhpc/common/chem/orca/3.0.3&lt;br /&gt;
ORCA_HOME=/opt/bwhpc/common/chem/orca/3.0.3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
= Version-Specific Information =&lt;br /&gt;
For a more detailed information specific to a specific ORCA version, see the information available via the module system with the command &#039;&#039;&#039;&#039;module help chem/orca&#039;&#039;&#039;&#039;.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
For a small abstract what ORCA is about use the command &#039;&#039;&#039;&#039;module whatis chem/orca&#039;&#039;&#039;&#039;.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;Examples&amp;lt;/u&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module avail chem/orca&lt;br /&gt;
------------------------------ /opt/bwhpc/common/modulefiles ---------------------------------------&lt;br /&gt;
chem/orca/3.0.1 chem/orca/3.0.3&lt;br /&gt;
&lt;br /&gt;
$ module whatis chem/orca/3.0.1&lt;br /&gt;
chem/orca/3.0.1      : Quantum chemistry package ORCA, version 3.0.1&lt;br /&gt;
    (command &#039;/opt/bwhpc/common/chem/orca/3.0.1/orca&#039;)&lt;br /&gt;
&lt;br /&gt;
$ module help chem/orca/3.0.1&lt;br /&gt;
----------- Module Specific Help for &#039;chem/orca/3.0.1&#039; ------------&lt;br /&gt;
This module provides the quantum chemistry package ORCA version 3.0.1&lt;br /&gt;
via command &#039;/opt/bwhpc/common/chem/orca/3.0.1/orca&#039; &lt;br /&gt;
[...] &lt;br /&gt;
Documentation: &lt;br /&gt;
*  Max-Planck-Institut fuer Chemische Energiekonversion  &lt;br /&gt;
   https://cec.mpg.de/forum/portal.php&lt;br /&gt;
*  New features for version 3.0.1&lt;br /&gt;
   https://cec.mpg.de/forum/portal.php#a3&lt;br /&gt;
*  Manuals in pdf format:&lt;br /&gt;
   /opt/bwhpc/common/chem/orca/3.0.1/manual&lt;br /&gt;
*  Example data and a Moab example script can be found here:&lt;br /&gt;
   /opt/bwhpc/common/chem/orca/3.0.1/bwhpc-examples&lt;br /&gt;
[...]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
[[Category:Chemistry software]][[Category:bwUniCluster]][[Category:bwForCluster_Chemistry]]&lt;/div&gt;</summary>
		<author><name>R Rutka</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=JUSTUS2/Software/Gaussian&amp;diff=4502</id>
		<title>JUSTUS2/Software/Gaussian</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=JUSTUS2/Software/Gaussian&amp;diff=4502"/>
		<updated>2016-11-03T16:22:31Z</updated>

		<summary type="html">&lt;p&gt;R Rutka: /* Parallel computing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=600px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Description !! Content&lt;br /&gt;
|-&lt;br /&gt;
| module load&lt;br /&gt;
| chem/gaussian&lt;br /&gt;
|-&lt;br /&gt;
| License&lt;br /&gt;
| Commercial. See: [http://www.gaussian.com/g_prod/prix.htm Pricing for Gaussian Products]&lt;br /&gt;
|-&lt;br /&gt;
| Citing&lt;br /&gt;
| [http://www.gaussian.com/g_tech/g_ur/m_citation.htm See Gaussian manual]&lt;br /&gt;
|-&lt;br /&gt;
| Links&lt;br /&gt;
| [http://www.gaussian.com Homepage] &amp;amp;#124; [http://www.gaussian.com/g_tech/g09ur.htm Manual] &amp;amp;#124; [http://www.gaussian.com/g_tech/g09iop.htm IOps Reference]&lt;br /&gt;
|-&lt;br /&gt;
| Graphical Interface&lt;br /&gt;
| Yes. See [[Gaussview]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Description =&lt;br /&gt;
&#039;&#039;&#039;Gaussian&#039;&#039;&#039; is a general purpose &#039;&#039;quantum chemistry&#039;&#039; software package for &#039;&#039;ab initio&#039;&#039; electronic structure calculations. It provides:&lt;br /&gt;
* ground state calculations for methods such as HF, many DFT functionals, MP2/3/4 or CCSD(T);&lt;br /&gt;
* basic excited state calculations such as TDHF or TDDF;&lt;br /&gt;
* coupled multi-shell QM/MM calculations (ONIOM);&lt;br /&gt;
* geometry optimizations, transition state searches, molecular dynamics calculations;&lt;br /&gt;
* property and spectra calculations such as IR, UV/VIS, Raman or CD; as well as&lt;br /&gt;
* shared-memory parallel versions for almost all kind of jobs.&lt;br /&gt;
For more information on features please visit Gaussian&#039;s [http://www.gaussian.com/g_prod/g09b.htm &#039;&#039;Overview of Capabilities and Features&#039;&#039;] web page.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Versions and Availability =&lt;br /&gt;
A list of versions currently available on the bwForCluster Chemistry can be obtained from the [https://cis-hpc.uni-konstanz.de/prod.cis/Justus/chem/gaussian Cluster Information System (CIS)]:&lt;br /&gt;
{{#widget:Iframe&lt;br /&gt;
|url=https://cis-hpc.uni-konstanz.de/prod.cis/Justus/chem/gaussian&lt;br /&gt;
|width=99%&lt;br /&gt;
|height=250&lt;br /&gt;
|border=&lt;br /&gt;
}}&lt;br /&gt;
On the command line of a particular bwHPC cluster a list of all available versions is displayed by command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module avail chem/gaussian&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Parallel computing =&lt;br /&gt;
The binaries of the Gaussian module can run in serial and shared-memory parallel mode. Switching between the serial and parallel version is done via statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%NProcShare=PPN&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
in section &#039;&#039;Link 0 commands&#039;&#039; before the &#039;&#039;route section&#039;&#039; at the beginning of the Gaussian input file. &#039;&#039;PPN&#039;&#039; should be replaced by the number of parallel cores. This value &#039;&#039;&#039;must&#039;&#039;&#039; be identical to the &#039;&#039;ppn&#039;&#039; value specified when requesting resources from the queueing system. The installed Gaussian binaries are shared-memory parallel. Therefore only single node jobs do make sense. Without &#039;&#039;NProcShare&#039;&#039; statement the serial version of Gaussian is selected.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Usage =&lt;br /&gt;
&lt;br /&gt;
== Loading the module ==&lt;br /&gt;
&lt;br /&gt;
You can load the default version of &#039;&#039;Gaussian&#039;&#039; with command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load chem/gaussian&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The Gaussian module does not depend on any other module (no dependencies).&lt;br /&gt;
&lt;br /&gt;
If you wish to load a specific version you may do so by specifying the version explicitly, e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load chem/gaussian/g09.D.01&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
to load version &#039;&#039;g09.D.01&#039;&#039; of Gaussian.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Running Gaussian interactively ==&lt;br /&gt;
After loading the Gaussian module you can run a quick interactive example by executing&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ time g09 &amp;lt; $GAUSSIAN_EXA_DIR/test0553-8core-parallel.com&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In most cases running Gaussian requires setting up the command input file and piping that input into g09.&lt;br /&gt;
&lt;br /&gt;
== Creating Gaussian input files ==&lt;br /&gt;
&lt;br /&gt;
For documentation about how to construct input files see the [http://www.gaussian.com/g_tech/g_ur/g09help.htm Gaussian manual]. In addition the program [[Gaussview]] is a very good graphical user interface for constructing molecules and for setting up calculations. Finally these calculation setups can be saved as Gaussian command files and thereafter can be submitted to the cluster with help of the queueing system examples below.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Disk usage ==&lt;br /&gt;
&lt;br /&gt;
By default, scratch files of Gaussian are placed in GAUSS_SCRDIR as displayed when loading the Gaussian module. In most cases the module load command of Gaussian should set the GAUSS_SCRDIR pointing to an optimal node-local file system. When running multiple Gaussian jobs together on one node a user may want to add one more sub-directory level containing e.g. job id and job name for clarity - if not done so already by the queueing system.&lt;br /&gt;
&lt;br /&gt;
Predicting how much disk space a specific Gaussian calculation requires is a very difficult task. It requires experience with the methods, the basis sets, the calculated properties and the system you are investigating. The best advice is probably to start with small basis sets and small example systems, run such example calculations and observe their (hopefully small) disk usage while the job is running. Then read the Gaussian documentation about scaling behaviour and basis set sizes (the basis set size of the current calculation is printed at the beginning of the output of the Gaussian job). Finally try to extrapolate to your desired final system and basis set.&lt;br /&gt;
&lt;br /&gt;
You can also try to specify a fixed amount of disk space for a calculation. This is done by adding a statement like&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%MaxDisk=50000MB&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
to the route section of the Gaussian input file. But please be aware that (a) [[http://www.gaussian.com/g_tech/g_ur/k_maxdisk.htm Gaussian does not necessarily obey the specified value]] and (b) you might force Gaussian to select a slower algorithm when specifying an inappropriate value.&lt;br /&gt;
&lt;br /&gt;
In any case please make sure that you request sufficient but not far too much node-local disk space from the queueing system. For information on how much node-local disk space is available at the cluster and how to request a certain amount of node-local disk space for a calculation from the queueing system, please consult the cluster specific queueing system documentation as well as the queueing system examples of the Gaussian module as described below.&lt;br /&gt;
&lt;br /&gt;
Except for very short interactive test jobs please never run Gaussian calculations in any globally mounted directory like your $HOME or $WORK directory.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Memory usage ==&lt;br /&gt;
&lt;br /&gt;
Predicting the memory requirements of a job is nearly as difficult as predicting the disk requirements. But the strategies can be very similar. So start with small test systems and small basis sets and then extrapolate.&lt;br /&gt;
&lt;br /&gt;
You may specify the memory for a calculation explicitly in the route section of the Gaussian input file, for example&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%Mem=10000MB&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Gaussian usually obeys this value rather well. We have seen calculations that exceed the Mem value by at most by 2GB. Therefore it is usually sufficient to request Mem+2GB from the queueing system.&lt;br /&gt;
&lt;br /&gt;
But please carefully monitor the output of Gaussian when restricting the memory in the input file. Gaussian automatically switches between algorithms (e.g. recalculating values instead of storing them) when specifying too low memory values. So when the output is indicating that with more memory e.g. the &#039;&#039;integrals&#039;&#039; could be kept in memory the calculation might be much faster when assigning more memory.&lt;br /&gt;
&lt;br /&gt;
In case of shared-memory parallel jobs the number of workers has only minor influence on the memory consumption (maybe up to 10%). This is since all workers work together on one common data set.&lt;br /&gt;
&lt;br /&gt;
== Using SSD systems efficiently ==&lt;br /&gt;
&lt;br /&gt;
Compared with conventional disks SSD&#039;s are far more than 1000 times faster when serving random-IO requests. Therefore some of the default strategies of Gaussian, e.g. recalculate some values instead of storing them on disk, might not be optimal in all cases. Of course this is only relevant when there is not enough RAM to store the intermediate values, e.g. two centre integrals, etc.&lt;br /&gt;
&lt;br /&gt;
So if you plan to do many huge calculations that do not fit into the RAM, you may want to compare the execution time of a job that is re-calculating the intermediate values whenever needed and a job that forces these values to be written to and read from the node-local SSD&#039;s. Depending on how much time it costs to re-calculate the intermediate values, using the SSD&#039;s can be much faster.&lt;br /&gt;
&lt;br /&gt;
= Examples =&lt;br /&gt;
&lt;br /&gt;
== Queueing system template provided by Gaussian module ==&lt;br /&gt;
&lt;br /&gt;
The Gaussian module provides a simple Moab example of Hexanitroethan (C2N6O12) that runs an 8 core parallel single energy point calculation using method B3LYP and basis set 6-31g(df,pd). To submit the example do the following steps:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ws_allocate calc_repo 30; cd $(ws_find calc_repo)&lt;br /&gt;
$ mkdir my_first_job; cd my_first_job&lt;br /&gt;
$ module load chem/gaussian&lt;br /&gt;
$ cp -v ${GAUSSIAN_EXA_DIR}/{bwforcluster-gaussian-example.moab,test0553-*.com} ./&lt;br /&gt;
$ msub bwforcluster-gaussian-example.moab&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The last step submits the job example script &#039;&#039;bwforcluster-gaussian-example.moab&#039;&#039; to the queueing system. Once started on a compute node, all calculations will be done under an unique directory on the [[Batch_Jobs_-_bwForCluster_Chemistry_Features#Disk_Space_and_Resources|local file system ($TMPDIR)]] of that particular compute node. Please &#039;&#039;&#039;carefully&#039;&#039;&#039; read this &#039;&#039;local file system&#039;&#039; documentation as well as the comments in the queueing system example script &#039;&#039;bwforcluster-gaussian-example.moab&#039;&#039;.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Direct submission of Gaussian command files ==&lt;br /&gt;
&lt;br /&gt;
For users who do not want to deal with queueing system scripts we have created a submit command that automatically creates and submits queueing system scripts for Gaussian. For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ws_allocate calc_repo 30; cd $(ws_find calc_repo)&lt;br /&gt;
$ mkdir my_first_job; cd my_first_job&lt;br /&gt;
$ module load chem/gaussian&lt;br /&gt;
$ cp $GAUSSIAN_EXA_DIR/test0553-8core-parallel.com ./&lt;br /&gt;
$ gauss_sub test0553-8core-parallel.com&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Caveat for windows users ==&lt;br /&gt;
&lt;br /&gt;
If you have transferred the Gaussian input file from a Windows computer&lt;br /&gt;
to Unix then make sure to convert the line breaks of Windows (&amp;lt;CR&amp;gt;+&amp;lt;LF&amp;gt;) &lt;br /&gt;
to Unix (only &amp;lt;LF&amp;gt;). Otherwise Gaussian will write strange error messages.&lt;br /&gt;
Typical Unix commands for that are: &#039;dos2unix&#039; and &#039;unix2dos&#039;. Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ dos2unix test0553-8core-parallel.com&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Version-specific information =&lt;br /&gt;
&lt;br /&gt;
For specific information  about version &#039;&#039;VERSION&#039;&#039; see the information available via the module system with the command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module help chem/gaussian/VERSION&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Please read the local version-specific module help documentation&#039;&#039;&#039; before using the software. The module help contains links to additional documentation and resources as well as information about support contact.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[[Category:Chemistry software]][[Category:bwForCluster_Chemistry]][[Category:BwForCluster_BinAC]]&lt;/div&gt;</summary>
		<author><name>R Rutka</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=JUSTUS2/Software/Gaussian&amp;diff=4501</id>
		<title>JUSTUS2/Software/Gaussian</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=JUSTUS2/Software/Gaussian&amp;diff=4501"/>
		<updated>2016-11-03T16:22:04Z</updated>

		<summary type="html">&lt;p&gt;R Rutka: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=600px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Description !! Content&lt;br /&gt;
|-&lt;br /&gt;
| module load&lt;br /&gt;
| chem/gaussian&lt;br /&gt;
|-&lt;br /&gt;
| License&lt;br /&gt;
| Commercial. See: [http://www.gaussian.com/g_prod/prix.htm Pricing for Gaussian Products]&lt;br /&gt;
|-&lt;br /&gt;
| Citing&lt;br /&gt;
| [http://www.gaussian.com/g_tech/g_ur/m_citation.htm See Gaussian manual]&lt;br /&gt;
|-&lt;br /&gt;
| Links&lt;br /&gt;
| [http://www.gaussian.com Homepage] &amp;amp;#124; [http://www.gaussian.com/g_tech/g09ur.htm Manual] &amp;amp;#124; [http://www.gaussian.com/g_tech/g09iop.htm IOps Reference]&lt;br /&gt;
|-&lt;br /&gt;
| Graphical Interface&lt;br /&gt;
| Yes. See [[Gaussview]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Description =&lt;br /&gt;
&#039;&#039;&#039;Gaussian&#039;&#039;&#039; is a general purpose &#039;&#039;quantum chemistry&#039;&#039; software package for &#039;&#039;ab initio&#039;&#039; electronic structure calculations. It provides:&lt;br /&gt;
* ground state calculations for methods such as HF, many DFT functionals, MP2/3/4 or CCSD(T);&lt;br /&gt;
* basic excited state calculations such as TDHF or TDDF;&lt;br /&gt;
* coupled multi-shell QM/MM calculations (ONIOM);&lt;br /&gt;
* geometry optimizations, transition state searches, molecular dynamics calculations;&lt;br /&gt;
* property and spectra calculations such as IR, UV/VIS, Raman or CD; as well as&lt;br /&gt;
* shared-memory parallel versions for almost all kind of jobs.&lt;br /&gt;
For more information on features please visit Gaussian&#039;s [http://www.gaussian.com/g_prod/g09b.htm &#039;&#039;Overview of Capabilities and Features&#039;&#039;] web page.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Versions and Availability =&lt;br /&gt;
A list of versions currently available on the bwForCluster Chemistry can be obtained from the [https://cis-hpc.uni-konstanz.de/prod.cis/Justus/chem/gaussian Cluster Information System (CIS)]:&lt;br /&gt;
{{#widget:Iframe&lt;br /&gt;
|url=https://cis-hpc.uni-konstanz.de/prod.cis/Justus/chem/gaussian&lt;br /&gt;
|width=99%&lt;br /&gt;
|height=250&lt;br /&gt;
|border=&lt;br /&gt;
}}&lt;br /&gt;
On the command line of a particular bwHPC cluster a list of all available versions is displayed by command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module avail chem/gaussian&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parallel computing ==&lt;br /&gt;
The binaries of the Gaussian module can run in serial and shared-memory parallel mode. Switching between the serial and parallel version is done via statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%NProcShare=PPN&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
in section &#039;&#039;Link 0 commands&#039;&#039; before the &#039;&#039;route section&#039;&#039; at the beginning of the Gaussian input file. &#039;&#039;PPN&#039;&#039; should be replaced by the number of parallel cores. This value &#039;&#039;&#039;must&#039;&#039;&#039; be identical to the &#039;&#039;ppn&#039;&#039; value specified when requesting resources from the queueing system. The installed Gaussian binaries are shared-memory parallel. Therefore only single node jobs do make sense. Without &#039;&#039;NProcShare&#039;&#039; statement the serial version of Gaussian is selected.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Usage =&lt;br /&gt;
&lt;br /&gt;
== Loading the module ==&lt;br /&gt;
&lt;br /&gt;
You can load the default version of &#039;&#039;Gaussian&#039;&#039; with command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load chem/gaussian&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The Gaussian module does not depend on any other module (no dependencies).&lt;br /&gt;
&lt;br /&gt;
If you wish to load a specific version you may do so by specifying the version explicitly, e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load chem/gaussian/g09.D.01&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
to load version &#039;&#039;g09.D.01&#039;&#039; of Gaussian.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Running Gaussian interactively ==&lt;br /&gt;
After loading the Gaussian module you can run a quick interactive example by executing&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ time g09 &amp;lt; $GAUSSIAN_EXA_DIR/test0553-8core-parallel.com&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In most cases running Gaussian requires setting up the command input file and piping that input into g09.&lt;br /&gt;
&lt;br /&gt;
== Creating Gaussian input files ==&lt;br /&gt;
&lt;br /&gt;
For documentation about how to construct input files see the [http://www.gaussian.com/g_tech/g_ur/g09help.htm Gaussian manual]. In addition the program [[Gaussview]] is a very good graphical user interface for constructing molecules and for setting up calculations. Finally these calculation setups can be saved as Gaussian command files and thereafter can be submitted to the cluster with help of the queueing system examples below.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Disk usage ==&lt;br /&gt;
&lt;br /&gt;
By default, scratch files of Gaussian are placed in GAUSS_SCRDIR as displayed when loading the Gaussian module. In most cases the module load command of Gaussian should set the GAUSS_SCRDIR pointing to an optimal node-local file system. When running multiple Gaussian jobs together on one node a user may want to add one more sub-directory level containing e.g. job id and job name for clarity - if not done so already by the queueing system.&lt;br /&gt;
&lt;br /&gt;
Predicting how much disk space a specific Gaussian calculation requires is a very difficult task. It requires experience with the methods, the basis sets, the calculated properties and the system you are investigating. The best advice is probably to start with small basis sets and small example systems, run such example calculations and observe their (hopefully small) disk usage while the job is running. Then read the Gaussian documentation about scaling behaviour and basis set sizes (the basis set size of the current calculation is printed at the beginning of the output of the Gaussian job). Finally try to extrapolate to your desired final system and basis set.&lt;br /&gt;
&lt;br /&gt;
You can also try to specify a fixed amount of disk space for a calculation. This is done by adding a statement like&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%MaxDisk=50000MB&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
to the route section of the Gaussian input file. But please be aware that (a) [[http://www.gaussian.com/g_tech/g_ur/k_maxdisk.htm Gaussian does not necessarily obey the specified value]] and (b) you might force Gaussian to select a slower algorithm when specifying an inappropriate value.&lt;br /&gt;
&lt;br /&gt;
In any case please make sure that you request sufficient but not far too much node-local disk space from the queueing system. For information on how much node-local disk space is available at the cluster and how to request a certain amount of node-local disk space for a calculation from the queueing system, please consult the cluster specific queueing system documentation as well as the queueing system examples of the Gaussian module as described below.&lt;br /&gt;
&lt;br /&gt;
Except for very short interactive test jobs please never run Gaussian calculations in any globally mounted directory like your $HOME or $WORK directory.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Memory usage ==&lt;br /&gt;
&lt;br /&gt;
Predicting the memory requirements of a job is nearly as difficult as predicting the disk requirements. But the strategies can be very similar. So start with small test systems and small basis sets and then extrapolate.&lt;br /&gt;
&lt;br /&gt;
You may specify the memory for a calculation explicitly in the route section of the Gaussian input file, for example&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%Mem=10000MB&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Gaussian usually obeys this value rather well. We have seen calculations that exceed the Mem value by at most by 2GB. Therefore it is usually sufficient to request Mem+2GB from the queueing system.&lt;br /&gt;
&lt;br /&gt;
But please carefully monitor the output of Gaussian when restricting the memory in the input file. Gaussian automatically switches between algorithms (e.g. recalculating values instead of storing them) when specifying too low memory values. So when the output is indicating that with more memory e.g. the &#039;&#039;integrals&#039;&#039; could be kept in memory the calculation might be much faster when assigning more memory.&lt;br /&gt;
&lt;br /&gt;
In case of shared-memory parallel jobs the number of workers has only minor influence on the memory consumption (maybe up to 10%). This is since all workers work together on one common data set.&lt;br /&gt;
&lt;br /&gt;
== Using SSD systems efficiently ==&lt;br /&gt;
&lt;br /&gt;
Compared with conventional disks SSD&#039;s are far more than 1000 times faster when serving random-IO requests. Therefore some of the default strategies of Gaussian, e.g. recalculate some values instead of storing them on disk, might not be optimal in all cases. Of course this is only relevant when there is not enough RAM to store the intermediate values, e.g. two centre integrals, etc.&lt;br /&gt;
&lt;br /&gt;
So if you plan to do many huge calculations that do not fit into the RAM, you may want to compare the execution time of a job that is re-calculating the intermediate values whenever needed and a job that forces these values to be written to and read from the node-local SSD&#039;s. Depending on how much time it costs to re-calculate the intermediate values, using the SSD&#039;s can be much faster.&lt;br /&gt;
&lt;br /&gt;
= Examples =&lt;br /&gt;
&lt;br /&gt;
== Queueing system template provided by Gaussian module ==&lt;br /&gt;
&lt;br /&gt;
The Gaussian module provides a simple Moab example of Hexanitroethan (C2N6O12) that runs an 8 core parallel single energy point calculation using method B3LYP and basis set 6-31g(df,pd). To submit the example do the following steps:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ws_allocate calc_repo 30; cd $(ws_find calc_repo)&lt;br /&gt;
$ mkdir my_first_job; cd my_first_job&lt;br /&gt;
$ module load chem/gaussian&lt;br /&gt;
$ cp -v ${GAUSSIAN_EXA_DIR}/{bwforcluster-gaussian-example.moab,test0553-*.com} ./&lt;br /&gt;
$ msub bwforcluster-gaussian-example.moab&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The last step submits the job example script &#039;&#039;bwforcluster-gaussian-example.moab&#039;&#039; to the queueing system. Once started on a compute node, all calculations will be done under an unique directory on the [[Batch_Jobs_-_bwForCluster_Chemistry_Features#Disk_Space_and_Resources|local file system ($TMPDIR)]] of that particular compute node. Please &#039;&#039;&#039;carefully&#039;&#039;&#039; read this &#039;&#039;local file system&#039;&#039; documentation as well as the comments in the queueing system example script &#039;&#039;bwforcluster-gaussian-example.moab&#039;&#039;.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Direct submission of Gaussian command files ==&lt;br /&gt;
&lt;br /&gt;
For users who do not want to deal with queueing system scripts we have created a submit command that automatically creates and submits queueing system scripts for Gaussian. For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ws_allocate calc_repo 30; cd $(ws_find calc_repo)&lt;br /&gt;
$ mkdir my_first_job; cd my_first_job&lt;br /&gt;
$ module load chem/gaussian&lt;br /&gt;
$ cp $GAUSSIAN_EXA_DIR/test0553-8core-parallel.com ./&lt;br /&gt;
$ gauss_sub test0553-8core-parallel.com&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Caveat for windows users ==&lt;br /&gt;
&lt;br /&gt;
If you have transferred the Gaussian input file from a Windows computer&lt;br /&gt;
to Unix then make sure to convert the line breaks of Windows (&amp;lt;CR&amp;gt;+&amp;lt;LF&amp;gt;) &lt;br /&gt;
to Unix (only &amp;lt;LF&amp;gt;). Otherwise Gaussian will write strange error messages.&lt;br /&gt;
Typical Unix commands for that are: &#039;dos2unix&#039; and &#039;unix2dos&#039;. Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ dos2unix test0553-8core-parallel.com&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Version-specific information =&lt;br /&gt;
&lt;br /&gt;
For specific information  about version &#039;&#039;VERSION&#039;&#039; see the information available via the module system with the command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module help chem/gaussian/VERSION&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Please read the local version-specific module help documentation&#039;&#039;&#039; before using the software. The module help contains links to additional documentation and resources as well as information about support contact.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[[Category:Chemistry software]][[Category:bwForCluster_Chemistry]][[Category:BwForCluster_BinAC]]&lt;/div&gt;</summary>
		<author><name>R Rutka</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=JUSTUS2/Software/Gaussian&amp;diff=4500</id>
		<title>JUSTUS2/Software/Gaussian</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=JUSTUS2/Software/Gaussian&amp;diff=4500"/>
		<updated>2016-11-03T16:21:22Z</updated>

		<summary type="html">&lt;p&gt;R Rutka: /* Versions and Availability */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=600px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Description !! Content&lt;br /&gt;
|-&lt;br /&gt;
| module load&lt;br /&gt;
| chem/gaussian&lt;br /&gt;
|-&lt;br /&gt;
| Availability&lt;br /&gt;
| [[BwForCluster_Chemistry]]&lt;br /&gt;
|-&lt;br /&gt;
| License&lt;br /&gt;
| Commercial. See: [http://www.gaussian.com/g_prod/prix.htm Pricing for Gaussian Products]&lt;br /&gt;
|-&lt;br /&gt;
| Citing&lt;br /&gt;
| [http://www.gaussian.com/g_tech/g_ur/m_citation.htm See Gaussian manual]&lt;br /&gt;
|-&lt;br /&gt;
| Links&lt;br /&gt;
| [http://www.gaussian.com Homepage] &amp;amp;#124; [http://www.gaussian.com/g_tech/g09ur.htm Manual] &amp;amp;#124; [http://www.gaussian.com/g_tech/g09iop.htm IOps Reference]&lt;br /&gt;
|-&lt;br /&gt;
| Graphical Interface&lt;br /&gt;
| Yes. See [[Gaussview]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Description =&lt;br /&gt;
&#039;&#039;&#039;Gaussian&#039;&#039;&#039; is a general purpose &#039;&#039;quantum chemistry&#039;&#039; software package for &#039;&#039;ab initio&#039;&#039; electronic structure calculations. It provides:&lt;br /&gt;
* ground state calculations for methods such as HF, many DFT functionals, MP2/3/4 or CCSD(T);&lt;br /&gt;
* basic excited state calculations such as TDHF or TDDF;&lt;br /&gt;
* coupled multi-shell QM/MM calculations (ONIOM);&lt;br /&gt;
* geometry optimizations, transition state searches, molecular dynamics calculations;&lt;br /&gt;
* property and spectra calculations such as IR, UV/VIS, Raman or CD; as well as&lt;br /&gt;
* shared-memory parallel versions for almost all kind of jobs.&lt;br /&gt;
For more information on features please visit Gaussian&#039;s [http://www.gaussian.com/g_prod/g09b.htm &#039;&#039;Overview of Capabilities and Features&#039;&#039;] web page.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Versions and Availability =&lt;br /&gt;
A list of versions currently available on the bwForCluster Chemistry can be obtained from the [https://cis-hpc.uni-konstanz.de/prod.cis/Justus/chem/gaussian Cluster Information System (CIS)]:&lt;br /&gt;
{{#widget:Iframe&lt;br /&gt;
|url=https://cis-hpc.uni-konstanz.de/prod.cis/Justus/chem/gaussian&lt;br /&gt;
|width=99%&lt;br /&gt;
|height=250&lt;br /&gt;
|border=&lt;br /&gt;
}}&lt;br /&gt;
On the command line of a particular bwHPC cluster a list of all available versions is displayed by command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module avail chem/gaussian&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parallel computing ==&lt;br /&gt;
The binaries of the Gaussian module can run in serial and shared-memory parallel mode. Switching between the serial and parallel version is done via statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%NProcShare=PPN&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
in section &#039;&#039;Link 0 commands&#039;&#039; before the &#039;&#039;route section&#039;&#039; at the beginning of the Gaussian input file. &#039;&#039;PPN&#039;&#039; should be replaced by the number of parallel cores. This value &#039;&#039;&#039;must&#039;&#039;&#039; be identical to the &#039;&#039;ppn&#039;&#039; value specified when requesting resources from the queueing system. The installed Gaussian binaries are shared-memory parallel. Therefore only single node jobs do make sense. Without &#039;&#039;NProcShare&#039;&#039; statement the serial version of Gaussian is selected.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Usage =&lt;br /&gt;
&lt;br /&gt;
== Loading the module ==&lt;br /&gt;
&lt;br /&gt;
You can load the default version of &#039;&#039;Gaussian&#039;&#039; with command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load chem/gaussian&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The Gaussian module does not depend on any other module (no dependencies).&lt;br /&gt;
&lt;br /&gt;
If you wish to load a specific version you may do so by specifying the version explicitly, e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load chem/gaussian/g09.D.01&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
to load version &#039;&#039;g09.D.01&#039;&#039; of Gaussian.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Running Gaussian interactively ==&lt;br /&gt;
After loading the Gaussian module you can run a quick interactive example by executing&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ time g09 &amp;lt; $GAUSSIAN_EXA_DIR/test0553-8core-parallel.com&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In most cases running Gaussian requires setting up the command input file and piping that input into g09.&lt;br /&gt;
&lt;br /&gt;
== Creating Gaussian input files ==&lt;br /&gt;
&lt;br /&gt;
For documentation about how to construct input files see the [http://www.gaussian.com/g_tech/g_ur/g09help.htm Gaussian manual]. In addition the program [[Gaussview]] is a very good graphical user interface for constructing molecules and for setting up calculations. Finally these calculation setups can be saved as Gaussian command files and thereafter can be submitted to the cluster with help of the queueing system examples below.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Disk usage ==&lt;br /&gt;
&lt;br /&gt;
By default, scratch files of Gaussian are placed in GAUSS_SCRDIR as displayed when loading the Gaussian module. In most cases the module load command of Gaussian should set the GAUSS_SCRDIR pointing to an optimal node-local file system. When running multiple Gaussian jobs together on one node a user may want to add one more sub-directory level containing e.g. job id and job name for clarity - if not done so already by the queueing system.&lt;br /&gt;
&lt;br /&gt;
Predicting how much disk space a specific Gaussian calculation requires is a very difficult task. It requires experience with the methods, the basis sets, the calculated properties and the system you are investigating. The best advice is probably to start with small basis sets and small example systems, run such example calculations and observe their (hopefully small) disk usage while the job is running. Then read the Gaussian documentation about scaling behaviour and basis set sizes (the basis set size of the current calculation is printed at the beginning of the output of the Gaussian job). Finally try to extrapolate to your desired final system and basis set.&lt;br /&gt;
&lt;br /&gt;
You can also try to specify a fixed amount of disk space for a calculation. This is done by adding a statement like&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%MaxDisk=50000MB&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
to the route section of the Gaussian input file. But please be aware that (a) [[http://www.gaussian.com/g_tech/g_ur/k_maxdisk.htm Gaussian does not necessarily obey the specified value]] and (b) you might force Gaussian to select a slower algorithm when specifying an inappropriate value.&lt;br /&gt;
&lt;br /&gt;
In any case please make sure that you request sufficient but not far too much node-local disk space from the queueing system. For information on how much node-local disk space is available at the cluster and how to request a certain amount of node-local disk space for a calculation from the queueing system, please consult the cluster specific queueing system documentation as well as the queueing system examples of the Gaussian module as described below.&lt;br /&gt;
&lt;br /&gt;
Except for very short interactive test jobs please never run Gaussian calculations in any globally mounted directory like your $HOME or $WORK directory.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Memory usage ==&lt;br /&gt;
&lt;br /&gt;
Predicting the memory requirements of a job is nearly as difficult as predicting the disk requirements. But the strategies can be very similar. So start with small test systems and small basis sets and then extrapolate.&lt;br /&gt;
&lt;br /&gt;
You may specify the memory for a calculation explicitly in the route section of the Gaussian input file, for example&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%Mem=10000MB&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Gaussian usually obeys this value rather well. We have seen calculations that exceed the Mem value by at most by 2GB. Therefore it is usually sufficient to request Mem+2GB from the queueing system.&lt;br /&gt;
&lt;br /&gt;
But please carefully monitor the output of Gaussian when restricting the memory in the input file. Gaussian automatically switches between algorithms (e.g. recalculating values instead of storing them) when specifying too low memory values. So when the output is indicating that with more memory e.g. the &#039;&#039;integrals&#039;&#039; could be kept in memory the calculation might be much faster when assigning more memory.&lt;br /&gt;
&lt;br /&gt;
In case of shared-memory parallel jobs the number of workers has only minor influence on the memory consumption (maybe up to 10%). This is since all workers work together on one common data set.&lt;br /&gt;
&lt;br /&gt;
== Using SSD systems efficiently ==&lt;br /&gt;
&lt;br /&gt;
Compared with conventional disks SSD&#039;s are far more than 1000 times faster when serving random-IO requests. Therefore some of the default strategies of Gaussian, e.g. recalculate some values instead of storing them on disk, might not be optimal in all cases. Of course this is only relevant when there is not enough RAM to store the intermediate values, e.g. two centre integrals, etc.&lt;br /&gt;
&lt;br /&gt;
So if you plan to do many huge calculations that do not fit into the RAM, you may want to compare the execution time of a job that is re-calculating the intermediate values whenever needed and a job that forces these values to be written to and read from the node-local SSD&#039;s. Depending on how much time it costs to re-calculate the intermediate values, using the SSD&#039;s can be much faster.&lt;br /&gt;
&lt;br /&gt;
= Examples =&lt;br /&gt;
&lt;br /&gt;
== Queueing system template provided by Gaussian module ==&lt;br /&gt;
&lt;br /&gt;
The Gaussian module provides a simple Moab example of Hexanitroethan (C2N6O12) that runs an 8 core parallel single energy point calculation using method B3LYP and basis set 6-31g(df,pd). To submit the example do the following steps:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ws_allocate calc_repo 30; cd $(ws_find calc_repo)&lt;br /&gt;
$ mkdir my_first_job; cd my_first_job&lt;br /&gt;
$ module load chem/gaussian&lt;br /&gt;
$ cp -v ${GAUSSIAN_EXA_DIR}/{bwforcluster-gaussian-example.moab,test0553-*.com} ./&lt;br /&gt;
$ msub bwforcluster-gaussian-example.moab&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The last step submits the job example script &#039;&#039;bwforcluster-gaussian-example.moab&#039;&#039; to the queueing system. Once started on a compute node, all calculations will be done under an unique directory on the [[Batch_Jobs_-_bwForCluster_Chemistry_Features#Disk_Space_and_Resources|local file system ($TMPDIR)]] of that particular compute node. Please &#039;&#039;&#039;carefully&#039;&#039;&#039; read this &#039;&#039;local file system&#039;&#039; documentation as well as the comments in the queueing system example script &#039;&#039;bwforcluster-gaussian-example.moab&#039;&#039;.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Direct submission of Gaussian command files ==&lt;br /&gt;
&lt;br /&gt;
For users who do not want to deal with queueing system scripts we have created a submit command that automatically creates and submits queueing system scripts for Gaussian. For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ws_allocate calc_repo 30; cd $(ws_find calc_repo)&lt;br /&gt;
$ mkdir my_first_job; cd my_first_job&lt;br /&gt;
$ module load chem/gaussian&lt;br /&gt;
$ cp $GAUSSIAN_EXA_DIR/test0553-8core-parallel.com ./&lt;br /&gt;
$ gauss_sub test0553-8core-parallel.com&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Caveat for windows users ==&lt;br /&gt;
&lt;br /&gt;
If you have transferred the Gaussian input file from a Windows computer&lt;br /&gt;
to Unix then make sure to convert the line breaks of Windows (&amp;lt;CR&amp;gt;+&amp;lt;LF&amp;gt;) &lt;br /&gt;
to Unix (only &amp;lt;LF&amp;gt;). Otherwise Gaussian will write strange error messages.&lt;br /&gt;
Typical Unix commands for that are: &#039;dos2unix&#039; and &#039;unix2dos&#039;. Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ dos2unix test0553-8core-parallel.com&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Version-specific information =&lt;br /&gt;
&lt;br /&gt;
For specific information  about version &#039;&#039;VERSION&#039;&#039; see the information available via the module system with the command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module help chem/gaussian/VERSION&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Please read the local version-specific module help documentation&#039;&#039;&#039; before using the software. The module help contains links to additional documentation and resources as well as information about support contact.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[[Category:Chemistry software]][[Category:bwForCluster_Chemistry]]&lt;/div&gt;</summary>
		<author><name>R Rutka</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=JUSTUS2/Software/Gaussian&amp;diff=4499</id>
		<title>JUSTUS2/Software/Gaussian</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=JUSTUS2/Software/Gaussian&amp;diff=4499"/>
		<updated>2016-11-03T16:21:05Z</updated>

		<summary type="html">&lt;p&gt;R Rutka: /* Versions and Availability */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=600px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Description !! Content&lt;br /&gt;
|-&lt;br /&gt;
| module load&lt;br /&gt;
| chem/gaussian&lt;br /&gt;
|-&lt;br /&gt;
| Availability&lt;br /&gt;
| [[BwForCluster_Chemistry]]&lt;br /&gt;
|-&lt;br /&gt;
| License&lt;br /&gt;
| Commercial. See: [http://www.gaussian.com/g_prod/prix.htm Pricing for Gaussian Products]&lt;br /&gt;
|-&lt;br /&gt;
| Citing&lt;br /&gt;
| [http://www.gaussian.com/g_tech/g_ur/m_citation.htm See Gaussian manual]&lt;br /&gt;
|-&lt;br /&gt;
| Links&lt;br /&gt;
| [http://www.gaussian.com Homepage] &amp;amp;#124; [http://www.gaussian.com/g_tech/g09ur.htm Manual] &amp;amp;#124; [http://www.gaussian.com/g_tech/g09iop.htm IOps Reference]&lt;br /&gt;
|-&lt;br /&gt;
| Graphical Interface&lt;br /&gt;
| Yes. See [[Gaussview]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Description =&lt;br /&gt;
&#039;&#039;&#039;Gaussian&#039;&#039;&#039; is a general purpose &#039;&#039;quantum chemistry&#039;&#039; software package for &#039;&#039;ab initio&#039;&#039; electronic structure calculations. It provides:&lt;br /&gt;
* ground state calculations for methods such as HF, many DFT functionals, MP2/3/4 or CCSD(T);&lt;br /&gt;
* basic excited state calculations such as TDHF or TDDF;&lt;br /&gt;
* coupled multi-shell QM/MM calculations (ONIOM);&lt;br /&gt;
* geometry optimizations, transition state searches, molecular dynamics calculations;&lt;br /&gt;
* property and spectra calculations such as IR, UV/VIS, Raman or CD; as well as&lt;br /&gt;
* shared-memory parallel versions for almost all kind of jobs.&lt;br /&gt;
For more information on features please visit Gaussian&#039;s [http://www.gaussian.com/g_prod/g09b.htm &#039;&#039;Overview of Capabilities and Features&#039;&#039;] web page.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Versions and Availability =&lt;br /&gt;
A list of versions currently available on the bwForCluster Chemistry can be obtained from the [https://cis-hpc.uni-konstanz.de/prod.cis/Justus/chem/gaussian Cluster Information System (CIS)]:&lt;br /&gt;
{{#widget:Iframe&lt;br /&gt;
|url=https://cis-hpc.uni-konstanz.de/prod.cis/Justus/chem/gaussian&lt;br /&gt;
|width=99%&lt;br /&gt;
|height=150&lt;br /&gt;
|border=&lt;br /&gt;
}}&lt;br /&gt;
On the command line of a particular bwHPC cluster a list of all available versions is displayed by command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module avail chem/gaussian&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parallel computing ==&lt;br /&gt;
The binaries of the Gaussian module can run in serial and shared-memory parallel mode. Switching between the serial and parallel version is done via statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%NProcShare=PPN&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
in section &#039;&#039;Link 0 commands&#039;&#039; before the &#039;&#039;route section&#039;&#039; at the beginning of the Gaussian input file. &#039;&#039;PPN&#039;&#039; should be replaced by the number of parallel cores. This value &#039;&#039;&#039;must&#039;&#039;&#039; be identical to the &#039;&#039;ppn&#039;&#039; value specified when requesting resources from the queueing system. The installed Gaussian binaries are shared-memory parallel. Therefore only single node jobs do make sense. Without &#039;&#039;NProcShare&#039;&#039; statement the serial version of Gaussian is selected.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Usage =&lt;br /&gt;
&lt;br /&gt;
== Loading the module ==&lt;br /&gt;
&lt;br /&gt;
You can load the default version of &#039;&#039;Gaussian&#039;&#039; with command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load chem/gaussian&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The Gaussian module does not depend on any other module (no dependencies).&lt;br /&gt;
&lt;br /&gt;
If you wish to load a specific version you may do so by specifying the version explicitly, e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load chem/gaussian/g09.D.01&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
to load version &#039;&#039;g09.D.01&#039;&#039; of Gaussian.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Running Gaussian interactively ==&lt;br /&gt;
After loading the Gaussian module you can run a quick interactive example by executing&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ time g09 &amp;lt; $GAUSSIAN_EXA_DIR/test0553-8core-parallel.com&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In most cases running Gaussian requires setting up the command input file and piping that input into g09.&lt;br /&gt;
&lt;br /&gt;
== Creating Gaussian input files ==&lt;br /&gt;
&lt;br /&gt;
For documentation about how to construct input files see the [http://www.gaussian.com/g_tech/g_ur/g09help.htm Gaussian manual]. In addition the program [[Gaussview]] is a very good graphical user interface for constructing molecules and for setting up calculations. Finally these calculation setups can be saved as Gaussian command files and thereafter can be submitted to the cluster with help of the queueing system examples below.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Disk usage ==&lt;br /&gt;
&lt;br /&gt;
By default, scratch files of Gaussian are placed in GAUSS_SCRDIR as displayed when loading the Gaussian module. In most cases the module load command of Gaussian should set the GAUSS_SCRDIR pointing to an optimal node-local file system. When running multiple Gaussian jobs together on one node a user may want to add one more sub-directory level containing e.g. job id and job name for clarity - if not done so already by the queueing system.&lt;br /&gt;
&lt;br /&gt;
Predicting how much disk space a specific Gaussian calculation requires is a very difficult task. It requires experience with the methods, the basis sets, the calculated properties and the system you are investigating. The best advice is probably to start with small basis sets and small example systems, run such example calculations and observe their (hopefully small) disk usage while the job is running. Then read the Gaussian documentation about scaling behaviour and basis set sizes (the basis set size of the current calculation is printed at the beginning of the output of the Gaussian job). Finally try to extrapolate to your desired final system and basis set.&lt;br /&gt;
&lt;br /&gt;
You can also try to specify a fixed amount of disk space for a calculation. This is done by adding a statement like&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%MaxDisk=50000MB&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
to the route section of the Gaussian input file. But please be aware that (a) [[http://www.gaussian.com/g_tech/g_ur/k_maxdisk.htm Gaussian does not necessarily obey the specified value]] and (b) you might force Gaussian to select a slower algorithm when specifying an inappropriate value.&lt;br /&gt;
&lt;br /&gt;
In any case please make sure that you request sufficient but not far too much node-local disk space from the queueing system. For information on how much node-local disk space is available at the cluster and how to request a certain amount of node-local disk space for a calculation from the queueing system, please consult the cluster specific queueing system documentation as well as the queueing system examples of the Gaussian module as described below.&lt;br /&gt;
&lt;br /&gt;
Except for very short interactive test jobs please never run Gaussian calculations in any globally mounted directory like your $HOME or $WORK directory.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Memory usage ==&lt;br /&gt;
&lt;br /&gt;
Predicting the memory requirements of a job is nearly as difficult as predicting the disk requirements. But the strategies can be very similar. So start with small test systems and small basis sets and then extrapolate.&lt;br /&gt;
&lt;br /&gt;
You may specify the memory for a calculation explicitly in the route section of the Gaussian input file, for example&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%Mem=10000MB&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Gaussian usually obeys this value rather well. We have seen calculations that exceed the Mem value by at most by 2GB. Therefore it is usually sufficient to request Mem+2GB from the queueing system.&lt;br /&gt;
&lt;br /&gt;
But please carefully monitor the output of Gaussian when restricting the memory in the input file. Gaussian automatically switches between algorithms (e.g. recalculating values instead of storing them) when specifying too low memory values. So when the output is indicating that with more memory e.g. the &#039;&#039;integrals&#039;&#039; could be kept in memory the calculation might be much faster when assigning more memory.&lt;br /&gt;
&lt;br /&gt;
In case of shared-memory parallel jobs the number of workers has only minor influence on the memory consumption (maybe up to 10%). This is since all workers work together on one common data set.&lt;br /&gt;
&lt;br /&gt;
== Using SSD systems efficiently ==&lt;br /&gt;
&lt;br /&gt;
Compared with conventional disks SSD&#039;s are far more than 1000 times faster when serving random-IO requests. Therefore some of the default strategies of Gaussian, e.g. recalculate some values instead of storing them on disk, might not be optimal in all cases. Of course this is only relevant when there is not enough RAM to store the intermediate values, e.g. two centre integrals, etc.&lt;br /&gt;
&lt;br /&gt;
So if you plan to do many huge calculations that do not fit into the RAM, you may want to compare the execution time of a job that is re-calculating the intermediate values whenever needed and a job that forces these values to be written to and read from the node-local SSD&#039;s. Depending on how much time it costs to re-calculate the intermediate values, using the SSD&#039;s can be much faster.&lt;br /&gt;
&lt;br /&gt;
= Examples =&lt;br /&gt;
&lt;br /&gt;
== Queueing system template provided by Gaussian module ==&lt;br /&gt;
&lt;br /&gt;
The Gaussian module provides a simple Moab example of Hexanitroethan (C2N6O12) that runs an 8 core parallel single energy point calculation using method B3LYP and basis set 6-31g(df,pd). To submit the example do the following steps:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ws_allocate calc_repo 30; cd $(ws_find calc_repo)&lt;br /&gt;
$ mkdir my_first_job; cd my_first_job&lt;br /&gt;
$ module load chem/gaussian&lt;br /&gt;
$ cp -v ${GAUSSIAN_EXA_DIR}/{bwforcluster-gaussian-example.moab,test0553-*.com} ./&lt;br /&gt;
$ msub bwforcluster-gaussian-example.moab&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The last step submits the job example script &#039;&#039;bwforcluster-gaussian-example.moab&#039;&#039; to the queueing system. Once started on a compute node, all calculations will be done under an unique directory on the [[Batch_Jobs_-_bwForCluster_Chemistry_Features#Disk_Space_and_Resources|local file system ($TMPDIR)]] of that particular compute node. Please &#039;&#039;&#039;carefully&#039;&#039;&#039; read this &#039;&#039;local file system&#039;&#039; documentation as well as the comments in the queueing system example script &#039;&#039;bwforcluster-gaussian-example.moab&#039;&#039;.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Direct submission of Gaussian command files ==&lt;br /&gt;
&lt;br /&gt;
For users who do not want to deal with queueing system scripts we have created a submit command that automatically creates and submits queueing system scripts for Gaussian. For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ws_allocate calc_repo 30; cd $(ws_find calc_repo)&lt;br /&gt;
$ mkdir my_first_job; cd my_first_job&lt;br /&gt;
$ module load chem/gaussian&lt;br /&gt;
$ cp $GAUSSIAN_EXA_DIR/test0553-8core-parallel.com ./&lt;br /&gt;
$ gauss_sub test0553-8core-parallel.com&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Caveat for windows users ==&lt;br /&gt;
&lt;br /&gt;
If you have transferred the Gaussian input file from a Windows computer&lt;br /&gt;
to Unix then make sure to convert the line breaks of Windows (&amp;lt;CR&amp;gt;+&amp;lt;LF&amp;gt;) &lt;br /&gt;
to Unix (only &amp;lt;LF&amp;gt;). Otherwise Gaussian will write strange error messages.&lt;br /&gt;
Typical Unix commands for that are: &#039;dos2unix&#039; and &#039;unix2dos&#039;. Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ dos2unix test0553-8core-parallel.com&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Version-specific information =&lt;br /&gt;
&lt;br /&gt;
For specific information  about version &#039;&#039;VERSION&#039;&#039; see the information available via the module system with the command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module help chem/gaussian/VERSION&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Please read the local version-specific module help documentation&#039;&#039;&#039; before using the software. The module help contains links to additional documentation and resources as well as information about support contact.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[[Category:Chemistry software]][[Category:bwForCluster_Chemistry]]&lt;/div&gt;</summary>
		<author><name>R Rutka</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster/Maintenance/2016-10&amp;diff=4471</id>
		<title>BwUniCluster/Maintenance/2016-10</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster/Maintenance/2016-10&amp;diff=4471"/>
		<updated>2016-10-26T14:06:11Z</updated>

		<summary type="html">&lt;p&gt;R Rutka: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!--__TOC__&lt;br /&gt;
&lt;br /&gt;
= 2016-10-17: bwUniCluster Maintenance =&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
The bwUniCluster system was &#039;&#039;&#039;unavailable&#039;&#039;&#039; between &#039;&#039;&#039;October 17, 2016&#039;&#039;&#039; and &#039;&#039;&#039;October 21, 2016&#039;&#039;&#039; for maintenance which had been completed as planned. &lt;br /&gt;
&lt;br /&gt;
We strongly recommend to recompile your source code after the maintenance due to operating system as well as software and libraries upgrade. This does also apply to binaries that may &lt;br /&gt;
have been built as add-ons for existing software modules, e.g. private packages for R and &lt;br /&gt;
Octave, Matlab MEX files, etc.&lt;br /&gt;
&lt;br /&gt;
All pending jobs had been canceled due to possibly obsolete dependencies.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Operational System Upgrade ==&lt;br /&gt;
Upgrade from Red Hat Enterprise Linux Server release &#039;&#039;&#039;6.8&#039;&#039;&#039; (Santiago) to Red Hat Enterprise Linux Server release &#039;&#039;&#039;7.2&#039;&#039;&#039; (Maipo)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== REPLACED SSH Host Key ==&lt;br /&gt;
The original SSH host key of bwUniCluster has been generated under Redhat 6 with [https://en.wikipedia.org/wiki/Digital_Signature_Algorithm DSA]. Redhat 7 and latest SSH clients recommend improved key generation algorithm such as ECDSA and ED25519. Indeed, Redhat 7 has opted out DSA key generation. Following the recommendations the original SSH host key of bwUniCluster has been replaced with a new one based on [https://en.wikipedia.org/wiki/Elliptic_Curve_Digital_Signature_Algorithm ECDSA].&lt;br /&gt;
=== HowTo: Putty users ===&lt;br /&gt;
If you have used the putty client before the maintenance the original SSH host key has been cached. Putty will pop up the following message to you (cf. screen shot below):&lt;br /&gt;
[[File:BwUniCluster_howto_replace_ssh_host_key_putty_2016-10-21.png|650px|center|border|]]&lt;br /&gt;
By accepting it (button &#039;&#039;&#039;Yes&#039;&#039;&#039;) putty will stored the new SSH host key.&lt;br /&gt;
&lt;br /&gt;
=== HowTo: Linux and macOS users ===&lt;br /&gt;
Remove the SSH host key of the bwUniCluster host name (bwunicluster.scc.kit.edu or uc1.scc.kit.edu):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
for hostname in uc1.scc.kit.edu bwunicluster.scc.kit.edu uc1-login1.scc.kit.edu uc1-login2.scc.kit.edu; do ssh-keygen -f &amp;quot;${HOME}/.ssh/known_hosts&amp;quot; -R $hostname ; done&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Afterwards and during login accept the new host key:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ECDSA key fingerprint is e0:3b:1e:36:80:44:c5:48:e9:b3:eb:65:34:ba:72:5c.&lt;br /&gt;
Are you sure you want to continue connecting (yes/no)?&lt;br /&gt;
yes&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Updated and new software modules ==&lt;br /&gt;
* devel/python/2.7.12&lt;br /&gt;
* devel/python/3.5.2&lt;br /&gt;
* math/R/3.3.1&lt;br /&gt;
* math/rstudio/0.99&lt;br /&gt;
* math/sagemath/7.3&lt;br /&gt;
* numlib/gsl/2.2.1-gnu-4.8&lt;br /&gt;
* numlib/gsl/2.2.1-intel-16.0&lt;br /&gt;
* numlib/fftw/3.3.5-impi-5.1.3-gnu-4.8&lt;br /&gt;
* numlib/fftw/3.3.5-impi-5.1.3-intel-16.0&lt;br /&gt;
* numlib/python_numpy/1.11.2-python-2.7.12&lt;br /&gt;
* chem/gromacs/5.1.4&lt;br /&gt;
* chem/amber/12 with Intel 14 only (Amber 14 available on bwFor-Cluster Justus)&lt;br /&gt;
* chem/dalton/2016&lt;br /&gt;
&lt;br /&gt;
== CHANGED Software Defaults ==&lt;br /&gt;
Software modules for which a newer version has been set as the default.&lt;br /&gt;
* chem/turbomole/7.0 -&amp;gt;  chem/turbomole/7.1&lt;br /&gt;
* chem/tmolex/4.1 -&amp;gt; chem/tmolex/4.2&lt;br /&gt;
* devel/python/2.7.10 -&amp;gt; devel/python/2.7.12 (actually not the default but newest 2.7 release)&lt;br /&gt;
* devel/python/3.5.0 -&amp;gt; devel/python/3.5.2 &lt;br /&gt;
* math/R/3.1.2 -&amp;gt; math/R/3.3.1&lt;br /&gt;
* numlib/fftw/3.3.3-impi-4.1.1-intel-13.1 -&amp;gt; numlib/fftw/3.3.5-impi-5.1.3-intel-16.0&lt;br /&gt;
* numlib/gsl/1.16-intel-13.1 -&amp;gt; numlib/gsl/2.2.1-intel-16.0&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
Planned default changes (if no showstopper is found):&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
* compiler/intel/15.0 -&amp;gt; compiler/intel/16.0&lt;br /&gt;
* numlib/mkl/11.2.3 -&amp;gt; numlib/mkl/11.3.4&lt;br /&gt;
* mpi/impi/5.0.3-intel-15.0 -&amp;gt; mpi/impi/5.1.3-intel-16.0&lt;br /&gt;
* devel/itac/9.0.3 -&amp;gt; devel/itac/9.1.2&lt;br /&gt;
&lt;br /&gt;
== RECOMPILED Software Modules==&lt;br /&gt;
Software modules which have been recompiled with different compiler or libraries&lt;br /&gt;
* phys/qutip/3.1.0&lt;br /&gt;
* chem/xcrysden/1.5.60&lt;br /&gt;
&lt;br /&gt;
== REMOVED Software Modules==&lt;br /&gt;
=== Intel compiler and related software  ===&lt;br /&gt;
Very old Intel compiler and related modules &#039;&#039;(which was available to all bwUniCluster users (/opt/bwhpc/common/modulefiles)&#039;&#039;:&lt;br /&gt;
* compiler/intel/12.1&lt;br /&gt;
* compiler/intel/13.1&lt;br /&gt;
* numlib/mkl/10.3.12&lt;br /&gt;
* numlib/mkl/11.0.5&lt;br /&gt;
* mpi/impi/4.1.0-gnu-4.4&lt;br /&gt;
* mpi/impi/4.1.0-gnu-4.5&lt;br /&gt;
* mpi/impi/4.1.0-intel-12.1&lt;br /&gt;
* mpi/impi/4.1.1-gnu-4.4&lt;br /&gt;
* mpi/impi/4.1.1-gnu-4.7&lt;br /&gt;
* mpi/impi/4.1.1-intel-13.1&lt;br /&gt;
* devel/itac/8.1.1&lt;br /&gt;
* devel/itac/8.1.2&lt;br /&gt;
* mpi/openmpi/1.6.5-intel-12.1&lt;br /&gt;
* mpi/openmpi/1.6.5-intel-13.1&lt;br /&gt;
* mpi/openmpi/1.8-intel-12.1&lt;br /&gt;
* mpi/openmpi/1.8-intel-13.1&lt;br /&gt;
* mpi/openmpi/1.10-intel-12.1&lt;br /&gt;
* mpi/openmpi/1.10-intel-13.1&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note that all dependent modules and binaries will stop working thereafter. So rebuild your modules and/or binaries with newer versions of the Intel compiler.&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Common software ===&lt;br /&gt;
Software that was available to all bwUniCluster users &#039;&#039;(/opt/bwhpc/common/modulefiles)&#039;&#039;:&lt;br /&gt;
* chem/turbomole/6.5&lt;br /&gt;
* chem/turbomole/6.6&lt;br /&gt;
* chem/tmolex/4.0&lt;br /&gt;
* chem/molden/5.2.1&lt;br /&gt;
* devel/cmake/2.8.11 (now system default version)&lt;br /&gt;
* lib/hdf5/1.8.13-gnu-4.4&lt;br /&gt;
* lib/hdf5/1.8.13-openmpi-1.8-gnu-4.4&lt;br /&gt;
* math/R/3.0.2&lt;br /&gt;
* numlib/fftw/3.3.3-impi-4.1.1-gnu-4.4&lt;br /&gt;
* numlib/fftw/3.3.3-impi-4.1.1-intel-13.1&lt;br /&gt;
* numlib/gsl/1.16-gnu-4.4&lt;br /&gt;
* numlib/gsl/1.16-intel-13.1&lt;br /&gt;
* phys/qutip/2.2.0&lt;br /&gt;
* lib/matplotlib/1.3.1&lt;br /&gt;
* chem/dalton/2013&lt;br /&gt;
* chem/gromacs/4.5.3_gridcount-1.4&lt;br /&gt;
* chem/gromacs/4.6.2&lt;br /&gt;
* chem/gromacs/5.0&lt;br /&gt;
* chem/gromacs/5.0.2&lt;br /&gt;
&lt;br /&gt;
=== Freiburg software ===&lt;br /&gt;
Software that was &#039;&#039;&#039;ONLY&#039;&#039;&#039; available to users from Freiburg &#039;&#039;(/opt/bwhpc/fr/modulefiles)&#039;&#039;:&lt;br /&gt;
* chem/lammps/5Sep2014_linux&lt;br /&gt;
* chem/lammps/5Sep2014_mkl&lt;br /&gt;
* cns/nest/2.2.2-python-2.7.6_cns&lt;br /&gt;
* cns/nest/2.8.0-python-2.7.6_cns&lt;br /&gt;
* devel/cmake/3.0.1&lt;br /&gt;
* devel/python/2.7.6_cns&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[[Category:bwHPC News|UniCluster]]|[[Category:bwUniCluster]]&lt;/div&gt;</summary>
		<author><name>R Rutka</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster/Maintenance/2016-10&amp;diff=4470</id>
		<title>BwUniCluster/Maintenance/2016-10</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster/Maintenance/2016-10&amp;diff=4470"/>
		<updated>2016-10-25T13:57:36Z</updated>

		<summary type="html">&lt;p&gt;R Rutka: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!--__TOC__&lt;br /&gt;
&lt;br /&gt;
= 2016-10-17: bwUniCluster Maintenance =&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
The bwUniCluster system was &#039;&#039;&#039;unavailable&#039;&#039;&#039; between &#039;&#039;&#039;October 17, 2016&#039;&#039;&#039; and &#039;&#039;&#039;October 21, 2016&#039;&#039;&#039; for maintenance which had been completed as planned. &lt;br /&gt;
&lt;br /&gt;
We strongly recommend to recompile your source code after the maintenance due to operating system as well as software and libraries upgrade. This does also apply to binaries that may &lt;br /&gt;
have been built as add-ons for existing software modules, e.g. private packages for R and &lt;br /&gt;
Octave, Matlab MEX files, etc.&lt;br /&gt;
&lt;br /&gt;
All pending jobs had been canceled due to possibly obsolete dependencies.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Operational System Upgrade ==&lt;br /&gt;
Upgrade from Red Hat Enterprise Linux Server release &#039;&#039;&#039;6.8&#039;&#039;&#039; (Santiago) to Red Hat Enterprise Linux Server release &#039;&#039;&#039;7.2&#039;&#039;&#039; (Maipo)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== REPLACED SSH Host Key ==&lt;br /&gt;
The original SSH host key of bwUniCluster has been generated under Redhat 6 with [https://en.wikipedia.org/wiki/Digital_Signature_Algorithm DSA]. Redhat 7 and latest SSH clients recommend improved key generation algorithm such as ECDSA and ED25519. Indeed, Redhat 7 has opted out DSA key generation. Following the recommendations the original SSH host key of bwUniCluster has been replaced with a new one based on [https://en.wikipedia.org/wiki/Elliptic_Curve_Digital_Signature_Algorithm ECDSA].&lt;br /&gt;
=== HowTo: Putty users ===&lt;br /&gt;
If you have used the putty client before the maintenance the original SSH host key has been cached. Putty will pop up the following message to you (cf. screen shot below):&lt;br /&gt;
[[File:BwUniCluster_howto_replace_ssh_host_key_putty_2016-10-21.png|650px|center|border|]]&lt;br /&gt;
By accepting it (button &#039;&#039;&#039;Yes&#039;&#039;&#039;) putty will stored the new SSH host key.&lt;br /&gt;
&lt;br /&gt;
=== HowTo: Linux and macOS users ===&lt;br /&gt;
Remove the SSH host key of the bwUniCluster host name (bwunicluster.scc.kit.edu or uc1.scc.kit.edu):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
for hostname in uc1.scc.kit.edu bwunicluster.scc.kit.edu uc1-login1.scc.kit.edu uc1-login2.scc.kit.edu; do ssh-keygen -f &amp;quot;${HOME}/.ssh/known_hosts&amp;quot; -R $hostname ; done&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Afterwards and during login accept the new host key:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ECDSA key fingerprint is e0:3b:1e:36:80:44:c5:48:e9:b3:eb:65:34:ba:72:5c.&lt;br /&gt;
Are you sure you want to continue connecting (yes/no)?&lt;br /&gt;
yes&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Updated and new software modules ==&lt;br /&gt;
* devel/python/2.7.12&lt;br /&gt;
* devel/python/3.5.2&lt;br /&gt;
* math/R/3.3.1&lt;br /&gt;
* math/rstudio/0.99&lt;br /&gt;
* math/sagemath/7.3&lt;br /&gt;
* numlib/gsl/2.2.1-gnu-4.8&lt;br /&gt;
* numlib/gsl/2.2.1-intel-16.0&lt;br /&gt;
* numlib/fftw/3.3.5-impi-5.1.3-gnu-4.8&lt;br /&gt;
* numlib/fftw/3.3.5-impi-5.1.3-intel-16.0&lt;br /&gt;
* numlib/python_numpy/1.11.2-python-2.7.12&lt;br /&gt;
* chem/gromacs/5.1.4&lt;br /&gt;
* chem/amber/12 with Intel 14 only (Amber 14 available on bwFor-Cluster Justus)&lt;br /&gt;
* chem/dalton/2016&lt;br /&gt;
&lt;br /&gt;
== CHANGED Software Defaults ==&lt;br /&gt;
Software modules for which a newer version has been set as the default.&lt;br /&gt;
* chem/turbomole/7.0 -&amp;gt;  chem/turbomole/7.1&lt;br /&gt;
* chem/tmolex/4.1 -&amp;gt; chem/tmolex/4.2&lt;br /&gt;
* devel/python/2.7.10 -&amp;gt; devel/python/2.7.12 (actually not the default but newest 2.7 release)&lt;br /&gt;
* devel/python/3.5.0 -&amp;gt; devel/python/3.5.2 &lt;br /&gt;
* math/R/3.1.2 -&amp;gt; math/R/3.3.1&lt;br /&gt;
* numlib/fftw/3.3.3-impi-4.1.1-intel-13.1 -&amp;gt; numlib/fftw/3.3.5-impi-5.1.3-intel-16.0&lt;br /&gt;
* numlib/gsl/1.16-intel-13.1 -&amp;gt; numlib/gsl/2.2.1-intel-16.0&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
Planned default changes (if no showstopper is found):&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
* compiler/intel/15.0 -&amp;gt; compiler/intel/16.0&lt;br /&gt;
* numlib/mkl/11.2.3 -&amp;gt; numlib/mkl/11.3.4&lt;br /&gt;
* mpi/impi/5.0.3-intel-15.0 -&amp;gt; mpi/impi/5.1.3-intel-16.0&lt;br /&gt;
* devel/itac/9.0.3 -&amp;gt; devel/itac/9.1.2&lt;br /&gt;
&lt;br /&gt;
== RECOMPILED Software Modules==&lt;br /&gt;
Software modules which have been recompiled with different compiler or libraries&lt;br /&gt;
* phys/qutip/3.1.0&lt;br /&gt;
* chem/xcrysden/1.5.60&lt;br /&gt;
&lt;br /&gt;
== REMOVED Software Modules==&lt;br /&gt;
=== Intel compiler and related software  ===&lt;br /&gt;
Very old Intel compiler and related modules &#039;&#039;(which was available to all bwUniCluster users (/opt/bwhpc/common/modulefiles)&#039;&#039;:&lt;br /&gt;
* compiler/intel/12.1&lt;br /&gt;
* compiler/intel/13.1&lt;br /&gt;
* numlib/mkl/10.3.12&lt;br /&gt;
* numlib/mkl/11.0.5&lt;br /&gt;
* mpi/impi/4.1.0-gnu-4.4&lt;br /&gt;
* mpi/impi/4.1.0-gnu-4.5&lt;br /&gt;
* mpi/impi/4.1.0-intel-12.1&lt;br /&gt;
* mpi/impi/4.1.1-gnu-4.4&lt;br /&gt;
* mpi/impi/4.1.1-gnu-4.7&lt;br /&gt;
* mpi/impi/4.1.1-intel-13.1&lt;br /&gt;
* devel/itac/8.1.1&lt;br /&gt;
* devel/itac/8.1.2&lt;br /&gt;
* mpi/openmpi/1.6.5-intel-12.1&lt;br /&gt;
* mpi/openmpi/1.6.5-intel-13.1&lt;br /&gt;
* mpi/openmpi/1.8-intel-12.1&lt;br /&gt;
* mpi/openmpi/1.8-intel-13.1&lt;br /&gt;
* mpi/openmpi/1.10-intel-12.1&lt;br /&gt;
* mpi/openmpi/1.10-intel-13.1&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note that all dependent modules and binaries will stop working thereafter. So rebuild your modules and/or binaries with newer versions of the Intel compiler.&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Common software ===&lt;br /&gt;
Software that was available to all bwUniCluster users &#039;&#039;(/opt/bwhpc/common/modulefiles)&#039;&#039;:&lt;br /&gt;
* chem/turbomole/6.5&lt;br /&gt;
* chem/turbomole/6.6&lt;br /&gt;
* chem/tmolex/4.0&lt;br /&gt;
* chem/molden/5.2.1&lt;br /&gt;
* devel/cmake/2.8.11 (now system default version)&lt;br /&gt;
* lib/hdf5/1.8.13-gnu-4.4&lt;br /&gt;
* lib/hdf5/1.8.13-openmpi-1.8-gnu-4.4&lt;br /&gt;
* math/R/3.0.2&lt;br /&gt;
* numlib/fftw/3.3.3-impi-4.1.1-gnu-4.4&lt;br /&gt;
* numlib/fftw/3.3.3-impi-4.1.1-intel-13.1&lt;br /&gt;
* numlib/gsl/1.16-gnu-4.4&lt;br /&gt;
* numlib/gsl/1.16-intel-13.1&lt;br /&gt;
* phys/qutip/2.2.0&lt;br /&gt;
* lib/matplotlib/1.3.1&lt;br /&gt;
* chem/dalton/2013 (Dalton 2016  available on bwFor-Cluster Justus)&lt;br /&gt;
* chem/gromacs/4.5.3_gridcount-1.4&lt;br /&gt;
* chem/gromacs/4.6.2&lt;br /&gt;
* chem/gromacs/5.0&lt;br /&gt;
* chem/gromacs/5.0.2&lt;br /&gt;
&lt;br /&gt;
=== Freiburg software ===&lt;br /&gt;
Software that was &#039;&#039;&#039;ONLY&#039;&#039;&#039; available to users from Freiburg &#039;&#039;(/opt/bwhpc/fr/modulefiles)&#039;&#039;:&lt;br /&gt;
* chem/lammps/5Sep2014_linux&lt;br /&gt;
* chem/lammps/5Sep2014_mkl&lt;br /&gt;
* cns/nest/2.2.2-python-2.7.6_cns&lt;br /&gt;
* cns/nest/2.8.0-python-2.7.6_cns&lt;br /&gt;
* devel/cmake/3.0.1&lt;br /&gt;
* devel/python/2.7.6_cns&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[[Category:bwHPC News|UniCluster]]|[[Category:bwUniCluster]]&lt;/div&gt;</summary>
		<author><name>R Rutka</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster/Maintenance/2016-10&amp;diff=4468</id>
		<title>BwUniCluster/Maintenance/2016-10</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster/Maintenance/2016-10&amp;diff=4468"/>
		<updated>2016-10-24T08:46:29Z</updated>

		<summary type="html">&lt;p&gt;R Rutka: /* Freiburg software */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!--__TOC__&lt;br /&gt;
&lt;br /&gt;
= 2016-10-17: bwUniCluster Maintenance =&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
The bwUniCluster system was &#039;&#039;&#039;unavailable&#039;&#039;&#039; between &#039;&#039;&#039;October 17, 2016&#039;&#039;&#039; and &#039;&#039;&#039;October 21, 2016&#039;&#039;&#039; for maintenance which had been completed as planned. &lt;br /&gt;
&lt;br /&gt;
We strongly recommend to recompile your source code after the maintenance due to operating system as well as software and libraries upgrade. This does also apply to binaries that may &lt;br /&gt;
have been built as add-ons for existing software modules, e.g. private packages for R and &lt;br /&gt;
Octave, Matlab MEX files, etc.&lt;br /&gt;
&lt;br /&gt;
All pending jobs had been canceled due to possibly obsolete dependencies.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Operational System Upgrade ==&lt;br /&gt;
Upgrade from Red Hat Enterprise Linux Server release &#039;&#039;&#039;6.8&#039;&#039;&#039; (Santiago) to Red Hat Enterprise Linux Server release &#039;&#039;&#039;7.2&#039;&#039;&#039; (Maipo)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== REPLACED SSH Host Key ==&lt;br /&gt;
The original SSH host key of bwUniCluster has been generated under Redhat 6 with [https://en.wikipedia.org/wiki/Digital_Signature_Algorithm DSA]. Redhat 7 and latest SSH clients recommend improved key generation algorithm such as ECDSA and ED25519. Indeed, Redhat 7 has opted out DSA key generation. Following the recommendations the original SSH host key of bwUniCluster has been replaced with a new one based on [https://en.wikipedia.org/wiki/Elliptic_Curve_Digital_Signature_Algorithm ECDSA].&lt;br /&gt;
=== HowTo: Putty users ===&lt;br /&gt;
If you have used the putty client before the maintenance the original SSH host key has been cached. Putty will pop up the following message to you (cf. screen shot below):&lt;br /&gt;
[[File:BwUniCluster_howto_replace_ssh_host_key_putty_2016-10-21.png|650px|center|border|]]&lt;br /&gt;
By accepting it (button &#039;&#039;&#039;Yes&#039;&#039;&#039;) putty will stored the new SSH host key.&lt;br /&gt;
&lt;br /&gt;
=== HowTo: Linux and macOS users ===&lt;br /&gt;
Remove the SSH host key of the bwUniCluster host name (bwunicluster.scc.kit.edu or uc1.scc.kit.edu):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
for hostname in uc1.scc.kit.edu bwunicluster.scc.kit.edu uc1-login1.scc.kit.edu uc1-login2.scc.kit.edu; do ssh-keygen -f &amp;quot;${HOME}/.ssh/known_hosts&amp;quot; -R $hostname ; done&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Afterwards and during login accept the new host key:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ECDSA key fingerprint is e0:3b:1e:36:80:44:c5:48:e9:b3:eb:65:34:ba:72:5c.&lt;br /&gt;
Are you sure you want to continue connecting (yes/no)?&lt;br /&gt;
yes&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Updated and new software modules ==&lt;br /&gt;
* devel/python/2.7.12&lt;br /&gt;
* devel/python/3.5.2&lt;br /&gt;
* math/R/3.3.1&lt;br /&gt;
* math/rstudio/0.99&lt;br /&gt;
* math/sagemath/7.3&lt;br /&gt;
* numlib/gsl/2.2.1-gnu-4.8&lt;br /&gt;
* numlib/gsl/2.2.1-intel-16.0&lt;br /&gt;
* numlib/fftw/3.3.5-impi-5.1.3-gnu-4.8&lt;br /&gt;
* numlib/fftw/3.3.5-impi-5.1.3-intel-16.0&lt;br /&gt;
* numlib/python_numpy/1.11.2-python-2.7.12&lt;br /&gt;
* chem/gromacs/5.1.4&lt;br /&gt;
* chem/amber/14 (Amber 14/16 available on bwFor-Cluster Justus)&lt;br /&gt;
* chem/dalton/2016 (bwFor-Cluster Justus)&lt;br /&gt;
&lt;br /&gt;
== CHANGED Software Defaults ==&lt;br /&gt;
Software modules for which a newer version has been set as the default.&lt;br /&gt;
* chem/turbomole/7.0 -&amp;gt;  chem/turbomole/7.1&lt;br /&gt;
* chem/tmolex/4.1 -&amp;gt; chem/tmolex/4.2&lt;br /&gt;
* devel/python/2.7.10 -&amp;gt; devel/python/2.7.12 (actually not the default but newest 2.7 release)&lt;br /&gt;
* devel/python/3.5.0 -&amp;gt; devel/python/3.5.2 &lt;br /&gt;
* math/R/3.1.2 -&amp;gt; math/R/3.3.1&lt;br /&gt;
* numlib/fftw/3.3.3-impi-4.1.1-intel-13.1 -&amp;gt; numlib/fftw/3.3.5-impi-5.1.3-intel-16.0&lt;br /&gt;
* numlib/gsl/1.16-intel-13.1 -&amp;gt; numlib/gsl/2.2.1-intel-16.0&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
Planned default changes (if no showstopper is found):&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
* compiler/intel/15.0 -&amp;gt; compiler/intel/16.0&lt;br /&gt;
* numlib/mkl/11.2.3 -&amp;gt; numlib/mkl/11.3.4&lt;br /&gt;
* mpi/impi/5.0.3-intel-15.0 -&amp;gt; mpi/impi/5.1.3-intel-16.0&lt;br /&gt;
* devel/itac/9.0.3 -&amp;gt; devel/itac/9.1.2&lt;br /&gt;
&lt;br /&gt;
== RECOMPILED Software Modules==&lt;br /&gt;
Software modules which have been recompiled with different compiler or libraries&lt;br /&gt;
* phys/qutip/3.1.0&lt;br /&gt;
* chem/xcrysden/1.5.60&lt;br /&gt;
&lt;br /&gt;
== REMOVED Software Modules==&lt;br /&gt;
=== Intel compiler and related software  ===&lt;br /&gt;
Very old Intel compiler and related modules &#039;&#039;(which was available to all bwUniCluster users (/opt/bwhpc/common/modulefiles)&#039;&#039;:&lt;br /&gt;
* compiler/intel/12.1&lt;br /&gt;
* compiler/intel/13.1&lt;br /&gt;
* numlib/mkl/10.3.12&lt;br /&gt;
* numlib/mkl/11.0.5&lt;br /&gt;
* mpi/impi/4.1.0-gnu-4.4&lt;br /&gt;
* mpi/impi/4.1.0-gnu-4.5&lt;br /&gt;
* mpi/impi/4.1.0-intel-12.1&lt;br /&gt;
* mpi/impi/4.1.1-gnu-4.4&lt;br /&gt;
* mpi/impi/4.1.1-gnu-4.7&lt;br /&gt;
* mpi/impi/4.1.1-intel-13.1&lt;br /&gt;
* devel/itac/8.1.1&lt;br /&gt;
* devel/itac/8.1.2&lt;br /&gt;
* mpi/openmpi/1.6.5-intel-12.1&lt;br /&gt;
* mpi/openmpi/1.6.5-intel-13.1&lt;br /&gt;
* mpi/openmpi/1.8-intel-12.1&lt;br /&gt;
* mpi/openmpi/1.8-intel-13.1&lt;br /&gt;
* mpi/openmpi/1.10-intel-12.1&lt;br /&gt;
* mpi/openmpi/1.10-intel-13.1&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note that all dependent modules and binaries will stop working thereafter. So rebuild your modules and/or binaries with newer versions of the Intel compiler.&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Common software ===&lt;br /&gt;
Software that was available to all bwUniCluster users &#039;&#039;(/opt/bwhpc/common/modulefiles)&#039;&#039;:&lt;br /&gt;
* chem/turbomole/6.5&lt;br /&gt;
* chem/turbomole/6.6&lt;br /&gt;
* chem/tmolex/4.0&lt;br /&gt;
* chem/molden/5.2.1&lt;br /&gt;
* devel/cmake/2.8.11 (now system default version)&lt;br /&gt;
* lib/hdf5/1.8.13-gnu-4.4&lt;br /&gt;
* lib/hdf5/1.8.13-openmpi-1.8-gnu-4.4&lt;br /&gt;
* math/R/3.0.2&lt;br /&gt;
* numlib/fftw/3.3.3-impi-4.1.1-gnu-4.4&lt;br /&gt;
* numlib/fftw/3.3.3-impi-4.1.1-intel-13.1&lt;br /&gt;
* numlib/gsl/1.16-gnu-4.4&lt;br /&gt;
* numlib/gsl/1.16-intel-13.1&lt;br /&gt;
* phys/qutip/2.2.0&lt;br /&gt;
* lib/matplotlib/1.3.1&lt;br /&gt;
* chem/amber/12 (Amber 15/16 available on bwFor-Cluster Justus)&lt;br /&gt;
* chem/dalton/2013 (Dalton 2016  available on bwFor-Cluster Justus)&lt;br /&gt;
* chem/gromacs/4.5.3_gridcount-1.4&lt;br /&gt;
* chem/gromacs/4.6.2&lt;br /&gt;
* chem/gromacs/5.0&lt;br /&gt;
* chem/gromacs/5.0.2&lt;br /&gt;
&lt;br /&gt;
=== Freiburg software ===&lt;br /&gt;
Software that was &#039;&#039;&#039;ONLY&#039;&#039;&#039; available to users from Freiburg &#039;&#039;(/opt/bwhpc/fr/modulefiles)&#039;&#039;:&lt;br /&gt;
* chem/lammps/5Sep2014_linux&lt;br /&gt;
* chem/lammps/5Sep2014_mkl&lt;br /&gt;
* cns/nest/2.2.2-python-2.7.6_cns&lt;br /&gt;
* cns/nest/2.8.0-python-2.7.6_cns&lt;br /&gt;
* devel/cmake/3.0.1&lt;br /&gt;
* devel/python/2.7.6_cns&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[[Category:bwHPC News|UniCluster]]|[[Category:bwUniCluster]]&lt;/div&gt;</summary>
		<author><name>R Rutka</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster/Maintenance/2016-10&amp;diff=4467</id>
		<title>BwUniCluster/Maintenance/2016-10</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster/Maintenance/2016-10&amp;diff=4467"/>
		<updated>2016-10-24T08:45:28Z</updated>

		<summary type="html">&lt;p&gt;R Rutka: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!--__TOC__&lt;br /&gt;
&lt;br /&gt;
= 2016-10-17: bwUniCluster Maintenance =&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
The bwUniCluster system was &#039;&#039;&#039;unavailable&#039;&#039;&#039; between &#039;&#039;&#039;October 17, 2016&#039;&#039;&#039; and &#039;&#039;&#039;October 21, 2016&#039;&#039;&#039; for maintenance which had been completed as planned. &lt;br /&gt;
&lt;br /&gt;
We strongly recommend to recompile your source code after the maintenance due to operating system as well as software and libraries upgrade. This does also apply to binaries that may &lt;br /&gt;
have been built as add-ons for existing software modules, e.g. private packages for R and &lt;br /&gt;
Octave, Matlab MEX files, etc.&lt;br /&gt;
&lt;br /&gt;
All pending jobs had been canceled due to possibly obsolete dependencies.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Operational System Upgrade ==&lt;br /&gt;
Upgrade from Red Hat Enterprise Linux Server release &#039;&#039;&#039;6.8&#039;&#039;&#039; (Santiago) to Red Hat Enterprise Linux Server release &#039;&#039;&#039;7.2&#039;&#039;&#039; (Maipo)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== REPLACED SSH Host Key ==&lt;br /&gt;
The original SSH host key of bwUniCluster has been generated under Redhat 6 with [https://en.wikipedia.org/wiki/Digital_Signature_Algorithm DSA]. Redhat 7 and latest SSH clients recommend improved key generation algorithm such as ECDSA and ED25519. Indeed, Redhat 7 has opted out DSA key generation. Following the recommendations the original SSH host key of bwUniCluster has been replaced with a new one based on [https://en.wikipedia.org/wiki/Elliptic_Curve_Digital_Signature_Algorithm ECDSA].&lt;br /&gt;
=== HowTo: Putty users ===&lt;br /&gt;
If you have used the putty client before the maintenance the original SSH host key has been cached. Putty will pop up the following message to you (cf. screen shot below):&lt;br /&gt;
[[File:BwUniCluster_howto_replace_ssh_host_key_putty_2016-10-21.png|650px|center|border|]]&lt;br /&gt;
By accepting it (button &#039;&#039;&#039;Yes&#039;&#039;&#039;) putty will stored the new SSH host key.&lt;br /&gt;
&lt;br /&gt;
=== HowTo: Linux and macOS users ===&lt;br /&gt;
Remove the SSH host key of the bwUniCluster host name (bwunicluster.scc.kit.edu or uc1.scc.kit.edu):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
for hostname in uc1.scc.kit.edu bwunicluster.scc.kit.edu uc1-login1.scc.kit.edu uc1-login2.scc.kit.edu; do ssh-keygen -f &amp;quot;${HOME}/.ssh/known_hosts&amp;quot; -R $hostname ; done&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Afterwards and during login accept the new host key:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ECDSA key fingerprint is e0:3b:1e:36:80:44:c5:48:e9:b3:eb:65:34:ba:72:5c.&lt;br /&gt;
Are you sure you want to continue connecting (yes/no)?&lt;br /&gt;
yes&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Updated and new software modules ==&lt;br /&gt;
* devel/python/2.7.12&lt;br /&gt;
* devel/python/3.5.2&lt;br /&gt;
* math/R/3.3.1&lt;br /&gt;
* math/rstudio/0.99&lt;br /&gt;
* math/sagemath/7.3&lt;br /&gt;
* numlib/gsl/2.2.1-gnu-4.8&lt;br /&gt;
* numlib/gsl/2.2.1-intel-16.0&lt;br /&gt;
* numlib/fftw/3.3.5-impi-5.1.3-gnu-4.8&lt;br /&gt;
* numlib/fftw/3.3.5-impi-5.1.3-intel-16.0&lt;br /&gt;
* numlib/python_numpy/1.11.2-python-2.7.12&lt;br /&gt;
* chem/gromacs/5.1.4&lt;br /&gt;
* chem/amber/14 (Amber 14/16 available on bwFor-Cluster Justus)&lt;br /&gt;
* chem/dalton/2016 (bwFor-Cluster Justus)&lt;br /&gt;
&lt;br /&gt;
== CHANGED Software Defaults ==&lt;br /&gt;
Software modules for which a newer version has been set as the default.&lt;br /&gt;
* chem/turbomole/7.0 -&amp;gt;  chem/turbomole/7.1&lt;br /&gt;
* chem/tmolex/4.1 -&amp;gt; chem/tmolex/4.2&lt;br /&gt;
* devel/python/2.7.10 -&amp;gt; devel/python/2.7.12 (actually not the default but newest 2.7 release)&lt;br /&gt;
* devel/python/3.5.0 -&amp;gt; devel/python/3.5.2 &lt;br /&gt;
* math/R/3.1.2 -&amp;gt; math/R/3.3.1&lt;br /&gt;
* numlib/fftw/3.3.3-impi-4.1.1-intel-13.1 -&amp;gt; numlib/fftw/3.3.5-impi-5.1.3-intel-16.0&lt;br /&gt;
* numlib/gsl/1.16-intel-13.1 -&amp;gt; numlib/gsl/2.2.1-intel-16.0&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
Planned default changes (if no showstopper is found):&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
* compiler/intel/15.0 -&amp;gt; compiler/intel/16.0&lt;br /&gt;
* numlib/mkl/11.2.3 -&amp;gt; numlib/mkl/11.3.4&lt;br /&gt;
* mpi/impi/5.0.3-intel-15.0 -&amp;gt; mpi/impi/5.1.3-intel-16.0&lt;br /&gt;
* devel/itac/9.0.3 -&amp;gt; devel/itac/9.1.2&lt;br /&gt;
&lt;br /&gt;
== RECOMPILED Software Modules==&lt;br /&gt;
Software modules which have been recompiled with different compiler or libraries&lt;br /&gt;
* phys/qutip/3.1.0&lt;br /&gt;
* chem/xcrysden/1.5.60&lt;br /&gt;
&lt;br /&gt;
== REMOVED Software Modules==&lt;br /&gt;
=== Intel compiler and related software  ===&lt;br /&gt;
Very old Intel compiler and related modules &#039;&#039;(which was available to all bwUniCluster users (/opt/bwhpc/common/modulefiles)&#039;&#039;:&lt;br /&gt;
* compiler/intel/12.1&lt;br /&gt;
* compiler/intel/13.1&lt;br /&gt;
* numlib/mkl/10.3.12&lt;br /&gt;
* numlib/mkl/11.0.5&lt;br /&gt;
* mpi/impi/4.1.0-gnu-4.4&lt;br /&gt;
* mpi/impi/4.1.0-gnu-4.5&lt;br /&gt;
* mpi/impi/4.1.0-intel-12.1&lt;br /&gt;
* mpi/impi/4.1.1-gnu-4.4&lt;br /&gt;
* mpi/impi/4.1.1-gnu-4.7&lt;br /&gt;
* mpi/impi/4.1.1-intel-13.1&lt;br /&gt;
* devel/itac/8.1.1&lt;br /&gt;
* devel/itac/8.1.2&lt;br /&gt;
* mpi/openmpi/1.6.5-intel-12.1&lt;br /&gt;
* mpi/openmpi/1.6.5-intel-13.1&lt;br /&gt;
* mpi/openmpi/1.8-intel-12.1&lt;br /&gt;
* mpi/openmpi/1.8-intel-13.1&lt;br /&gt;
* mpi/openmpi/1.10-intel-12.1&lt;br /&gt;
* mpi/openmpi/1.10-intel-13.1&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note that all dependent modules and binaries will stop working thereafter. So rebuild your modules and/or binaries with newer versions of the Intel compiler.&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Common software ===&lt;br /&gt;
Software that was available to all bwUniCluster users &#039;&#039;(/opt/bwhpc/common/modulefiles)&#039;&#039;:&lt;br /&gt;
* chem/turbomole/6.5&lt;br /&gt;
* chem/turbomole/6.6&lt;br /&gt;
* chem/tmolex/4.0&lt;br /&gt;
* chem/molden/5.2.1&lt;br /&gt;
* devel/cmake/2.8.11 (now system default version)&lt;br /&gt;
* lib/hdf5/1.8.13-gnu-4.4&lt;br /&gt;
* lib/hdf5/1.8.13-openmpi-1.8-gnu-4.4&lt;br /&gt;
* math/R/3.0.2&lt;br /&gt;
* numlib/fftw/3.3.3-impi-4.1.1-gnu-4.4&lt;br /&gt;
* numlib/fftw/3.3.3-impi-4.1.1-intel-13.1&lt;br /&gt;
* numlib/gsl/1.16-gnu-4.4&lt;br /&gt;
* numlib/gsl/1.16-intel-13.1&lt;br /&gt;
* phys/qutip/2.2.0&lt;br /&gt;
* lib/matplotlib/1.3.1&lt;br /&gt;
* chem/amber/12 (Amber 15/16 available on bwFor-Cluster Justus)&lt;br /&gt;
* chem/dalton/2013 (Dalton 2016  available on bwFor-Cluster Justus)&lt;br /&gt;
* chem/gromacs/4.5.3_gridcount-1.4&lt;br /&gt;
* chem/gromacs/4.6.2&lt;br /&gt;
* chem/gromacs/5.0&lt;br /&gt;
* chem/gromacs/5.0.2&lt;br /&gt;
&lt;br /&gt;
=== Freiburg software ===&lt;br /&gt;
Software that was &#039;&#039;&#039;ONLY&#039;&#039;&#039; available to users from Freiburg &#039;&#039;(/opt/bwhpc/fr/modulefiles)&#039;&#039;:&lt;br /&gt;
* chem/lammps/5Sep2014_linux&lt;br /&gt;
* chem/lammps/5Sep2014_mkl&lt;br /&gt;
* cns/nest/2.2.2-python-2.7.6_cns&lt;br /&gt;
* cns/nest/2.8.0-python-2.7.6_cns&lt;br /&gt;
* devel/cmake/3.0.1&lt;br /&gt;
* devel/python/2.7.6_cns&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[[Category:bwHPC News|UniCluster]]|[[Category:bwUniCluster]]&lt;/div&gt;</summary>
		<author><name>R Rutka</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=JUSTUS2/Software/Schrodinger&amp;diff=4434</id>
		<title>JUSTUS2/Software/Schrodinger</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=JUSTUS2/Software/Schrodinger&amp;diff=4434"/>
		<updated>2016-10-10T09:28:56Z</updated>

		<summary type="html">&lt;p&gt;R Rutka: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!--{|  align=&amp;quot;right&amp;quot; {{Table|width=600px}}   --&amp;gt;&lt;br /&gt;
&amp;lt;!--{|{{Softwarebox}}--&amp;gt;&lt;br /&gt;
{| width=600px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot;  style=&amp;quot;text-align:center&amp;quot; | Schrödinger&lt;br /&gt;
|-&lt;br /&gt;
| module load&lt;br /&gt;
| chem/schrodinger&lt;br /&gt;
&amp;lt;!-- Neben CIS auch bereits über Kategorien  abgedeckt--&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Availability&lt;br /&gt;
| [[bwUniCluster]] &amp;amp;#124; [[BwForCluster_Chemistry]] &amp;amp;#124; bwGRiD Tuebingen&lt;br /&gt;
&amp;lt;!-- &lt;br /&gt;
[[bwForCluster ENM]],  [[bwForCluster MLS/WISO]],  [[bwForCluster Theochem]],  [[bwForCluster BinAC]]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| License&lt;br /&gt;
| commercial&lt;br /&gt;
|-&lt;br /&gt;
|Citing&lt;br /&gt;
| 5. See Schrodinger manual&lt;br /&gt;
|-&lt;br /&gt;
| Links&lt;br /&gt;
| [https://www.schrodinger.com Homepage] &amp;amp;#124; [http://www.schrodinger.com/supportdocs/18/  Documentation]&lt;br /&gt;
|-&lt;br /&gt;
| Graphical Interface&lt;br /&gt;
| Yes, Maestro, Desmond&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Description == &lt;br /&gt;
&#039;&#039;&#039;Schrödinger&#039;&#039;&#039; is a collection of software chemical or biochemical use. It offers various tools, like Maestro, that acts like an interface to all other schrödinger software and it is supposed to be used for material science, to investigate the structure, the reactivity and properties of chemical systems. Maestro is part of the Materials science suite.&lt;br /&gt;
&lt;br /&gt;
= Versions and Availability =&lt;br /&gt;
A list of versions currently available on all bwHPC-C5-Clusters can be obtained from the&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://cis-hpc.uni-konstanz.de Cluster Information System CIS]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/big&amp;gt;&lt;br /&gt;
{{#widget:Iframe&lt;br /&gt;
|url=https://cis-hpc.uni-konstanz.de/prod.cis/bwUniCluster/chem/schrodinger&lt;br /&gt;
|width=99%&lt;br /&gt;
|height=370&lt;br /&gt;
|border=0&lt;br /&gt;
}}&lt;br /&gt;
On the command line interface of any bwHPC cluster you&#039;ll get a list of available versions by using&lt;br /&gt;
the command&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;&#039;module avail chem/schrodinger&#039;&#039;&#039;&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
: UniCluster&lt;br /&gt;
$ module avail chem/schrodinger&lt;br /&gt;
------------------------ /opt/bwhpc/common/modulefiles -------------------------&lt;br /&gt;
chem/schrodinger/2014u1 chem/schrodinger/2015u3&lt;br /&gt;
chem/schrodinger/2014u2 chem/schrodinger/2015u4&lt;br /&gt;
: Justus&lt;br /&gt;
$ module avail chem/schrodinger&lt;br /&gt;
------------------------ /opt/bwhpc/common/modulefiles -------------------------&lt;br /&gt;
chem/schrodinger/2015u4&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;font color=red&amp;gt;The module is called &#039;&#039;&#039;&#039;schrodinger&#039;&#039;&#039;&#039; and &#039;&#039;&#039;not&#039;&#039;&#039; &#039;schoedinger&#039; or &#039;schrödinger&#039;!&amp;lt;/font&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= License and Registering =&lt;br /&gt;
Schrödinger, especially Maestro, is available after registering for academical use for no charge. Downloadable here: [https://www.schroedinger.com/downloadcenter/ Download Center]&amp;lt;br&amp;gt;&lt;br /&gt;
Your request will be verified and after that you can download Maestro for academical use. That will take about 48 hours.&lt;br /&gt;
&lt;br /&gt;
== Prerequirements ==&lt;br /&gt;
=== Requesting the License Key ===&lt;br /&gt;
After installing Maestro you need a license key which you can request from the „Competence Center for Bioinformatics“. Please contact &lt;br /&gt;
&lt;br /&gt;
==== Set environment variable for the license server ====&lt;br /&gt;
When you got the licence server information, set it as an environment variable, editing $LICENSE_SERVER$ in the following command.&lt;br /&gt;
&amp;lt;pre&amp;gt;export LM_LICENSE_FILE=$LICENSE_SERVER$&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On a Mac system you should additionally execute following tasks&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo vi /etc/launchd.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Insert: &amp;lt;pre&amp;gt;setenv LM_LICENSE_FILE $LICENSE_SERVER$&amp;lt;/pre&amp;gt; and save the file.&lt;br /&gt;
&lt;br /&gt;
Execute following command and start Maestro from Sportlight:&lt;br /&gt;
&amp;lt;pre&amp;gt;launchctl setenv LM_LICENSE_FILE $LICENSE_FILE$&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== bwGRiD/bwUni/JUSTUS specific installation ===&lt;br /&gt;
&lt;br /&gt;
Follow the instruction for your operating system.&lt;br /&gt;
&lt;br /&gt;
==== Linux/Mac ====&lt;br /&gt;
&lt;br /&gt;
Download [https://raw.githubusercontent.com/marekdynowski/bwSchrodingerHosts/master/post-install.sh this file] and open a terminal in the download folder. Make the bash-script executable&lt;br /&gt;
&amp;lt;pre&amp;gt;chmod u+x post-install.sh&amp;lt;/pre&amp;gt;&lt;br /&gt;
and execute it.&lt;br /&gt;
&amp;lt;pre&amp;gt;./post-install.sh&amp;lt;/pre&amp;gt;&lt;br /&gt;
You will be asked for the License Server, your usernames on the cluster and the schrodinger path/version.&lt;br /&gt;
&lt;br /&gt;
==== Windows ====&lt;br /&gt;
&lt;br /&gt;
$SCHRODINGER ist the path to your schrodinger installation.&lt;br /&gt;
Download [https://codeload.github.com/marekdynowski/MOAB-Schroedinger-Submitter/zip/master this zipfile], extract it and copy the MOAB folder to $SCHRODINGER/queues/.&lt;br /&gt;
&lt;br /&gt;
Download the [https://raw.githubusercontent.com/marekdynowski/bwSchrodingerHosts/master/schrodinger.hosts sample schrodinger.hosts]&lt;br /&gt;
and change the entries&lt;br /&gt;
* %LICENSE_SERVER% the address of the license server&lt;br /&gt;
* %USER_BWGRID% your username on the bwhpc cluster&lt;br /&gt;
* %USER_BWUNI% your username on the bwUni cluster&lt;br /&gt;
* %USER_BWJUSTUS% your username on the Justus cluster&lt;br /&gt;
* %SCHROD_VERSION% the schrodinger version (e.g. 2015u4)&lt;br /&gt;
You can delete sections of the schrodinger.hosts if you don&#039;t have an account on these clusters.&lt;br /&gt;
&lt;br /&gt;
Please execute these commands in your windows shell. (Close Schrodinger before executing these commands!)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd $SCHRODINGER/utilities&lt;br /&gt;
feature_flags.exe -d JOBCON_JSERVER_GO&lt;br /&gt;
jserver.exe -cleanall&lt;br /&gt;
jserver.exe -shutdown&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
=== Copy your public key ===&lt;br /&gt;
Maestro needs a passwordless login for submitting jobs on the cluster. &lt;br /&gt;
Login to the cluster and copy your public key of your host system from &amp;lt;tt&amp;gt;.ssh/id_rsa.pub&amp;lt;/tt&amp;gt; into &amp;lt;tt&amp;gt;.ssh/authorized_keys&amp;lt;/tt&amp;gt; file on the cluster.&lt;br /&gt;
&lt;br /&gt;
=== Using Maestro with the offered example ===&lt;br /&gt;
First start Maestro and choose the following menu items:&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Schrodinger-Usage01.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then load the molecularDynamicsExample.cms from your filesystem:&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Schrodinger-Usage02.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Choose your desired host and click &amp;quot;Run&amp;quot;.&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Schrodinger-Usage03.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Monitoring your Job ===&lt;br /&gt;
Maestro offers an job monitoring interface, which you can start in the left corner of the molecule window.&lt;br /&gt;
[[File:Schrodinger-Monitor01.jpg]]&lt;br /&gt;
Furthermore you are able to manipulate you job on the cluster.&lt;br /&gt;
&lt;br /&gt;
[[Category:Chemistry software]][[Category:bwUniCluster]][[Category:bwForCluster_Chemistry]]&lt;/div&gt;</summary>
		<author><name>R Rutka</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=JUSTUS2/Software/Turbomole&amp;diff=4169</id>
		<title>JUSTUS2/Software/Turbomole</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=JUSTUS2/Software/Turbomole&amp;diff=4169"/>
		<updated>2016-07-05T14:57:22Z</updated>

		<summary type="html">&lt;p&gt;R Rutka: /* Versions and Availability */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=600px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Description !! Content&lt;br /&gt;
|-&lt;br /&gt;
| module load&lt;br /&gt;
| chem/turbomole&lt;br /&gt;
|-&lt;br /&gt;
| Availability&lt;br /&gt;
| [[bwUniCluster]] &amp;amp;#124; [[BwForCluster_Chemistry]]&lt;br /&gt;
|-&lt;br /&gt;
| License&lt;br /&gt;
| [http://www.turbomole-gmbh.com/how-to-buy.html Commerical]&lt;br /&gt;
|-&lt;br /&gt;
| Citing&lt;br /&gt;
| [http://www.turbomole-gmbh.com/manuals/version_6_5/Documentation_html/node5.html See  Turbomole manual]&lt;br /&gt;
|-&lt;br /&gt;
| Links&lt;br /&gt;
| [http://www.turbomole.com Homepage] &amp;amp;#124; [http://www.turbomole-gmbh.com/turbomole-manuals.html Documentation]&lt;br /&gt;
|-&lt;br /&gt;
| Graphical Interface&lt;br /&gt;
| No (Yes, for generating input) &lt;br /&gt;
|-&lt;br /&gt;
| User Forum&lt;br /&gt;
| [http://www.turbo-forum.com/ external]&lt;br /&gt;
|}&lt;br /&gt;
= Description = &lt;br /&gt;
&#039;&#039;&#039;Turbomole&#039;&#039;&#039; is a general purpose &#039;&#039;quantum chemistry&#039;&#039; software package for &#039;&#039;ab initio&#039;&#039; electronic structure calculations and provides:&lt;br /&gt;
* ground state calculations for methods such as Hartree-Fock, DFT, MP2, and CCSD(T);&lt;br /&gt;
* excited state calculations at different levels such as full RPA, TDDFT, CIS(D), CC2, an ADC(2);&lt;br /&gt;
* geometry optimizations, transition state searches, molecular dynamics calculations;&lt;br /&gt;
* property and spectra calculations such as IR, UV/VIS, Raman, and CD; &lt;br /&gt;
* approximations like resolution-of-the-identity (RI) to speed-up the calculations without introducing uncontrollable or unknown errors; as well as&lt;br /&gt;
* parallel versions (OpenMP, Fork,  MPI and Global Arrays) for almost all kind of jobs.&lt;br /&gt;
For more information on Turbmole&#039;s features please visit [http://www.turbomole-gmbh.com/program-overview.html http://www.turbomole-gmbh.com/program-overview.html].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
= Versions and Availability =&lt;br /&gt;
A current list of the versions available on the bwUniCluster and bwForClusters can be obtained from the&amp;lt;br&amp;gt; &lt;br /&gt;
Cluster Information System: [https://cis-hpc.uni-konstanz.de/prod.cis/bwUniCluster/chem/turbomole CIS Information on Turbomole] or here:&lt;br /&gt;
{{#widget:Iframe&lt;br /&gt;
|url=https://cis-hpc.uni-konstanz.de/prod.cis/bwUniCluster/chem/turbomole&lt;br /&gt;
|width=99%&lt;br /&gt;
|height=350&lt;br /&gt;
|border=0&lt;br /&gt;
}}&lt;br /&gt;
On the command line interface (CLI) of a particular bwHPC cluster a list of all available Turbomole versions can be inquired as followed&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module avail chem/turbomole&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
== Parallel computing ==&lt;br /&gt;
The Turbomole &#039;&#039;Module&#039;&#039; subsumes all available parallel computing variants of Turbomole&#039;s binaries. Turbomole defines the following parallel computing variants:&lt;br /&gt;
* SMP = Shared-memory parallel computing based on OpenMP and Fork() with the latter using separated address spaces.&lt;br /&gt;
* MPI = Message passing interface protocol based parallel computing&lt;br /&gt;
* GA = Global arrays, API for &amp;quot;shared-memory&amp;quot; programming for distributed-memory computers which can be used e.g. to complement MPI. &lt;br /&gt;
However only one of the 3 parallel variants or the sequential variant can be loaded at once and most Turbomole&#039;s binaries support only 1 or 2 of the parallelization variants. Like for Turbomole installations without a &#039;&#039;Module&#039;&#039; system, the variants have to be triggered by the environment variable $PARA_ARCH.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Usage =&lt;br /&gt;
== Before loading the Module ==&lt;br /&gt;
Before loading the Turbomole &#039;&#039;Module&#039;&#039; the parallel computing variant has to be defined via the environment variable $PARA_ARCH using the abbreviations SMP, MPI or GA, e.g.:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ export PARA_ARCH=MPI&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
will [[#Loading the Module|later load]] the &#039;&#039;&#039;MPI binary variants&#039;&#039;&#039;. If the variable $PARA_ARCH is not defined or empty, the sequential binary variants will be active once the Turbomole Module is loaded.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Loading the Module ==&lt;br /&gt;
You can load the default version of &#039;&#039;Turbomole&#039;&#039; with the command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load chem/turbomole&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The Turbomole &#039;&#039;Module&#039;&#039; does not depend on any other &#039;&#039;Module&#039;&#039;, but on the variable $PARA_ARCH. Moreover, Turbomole provides its own libraries regarding &#039;&#039;OpenMP&#039;&#039;, &#039;&#039;Fork()&#039;&#039;, &#039;&#039;MPI&#039;&#039;, and &#039;&#039;Global Array&#039;&#039; based parallelization.&lt;br /&gt;
If you wish to load a specific (older) version you can do so by executing e.g.: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load chem/turbomole/6.5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
to load the version 6.5&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Switching between different parallel variants ==&lt;br /&gt;
To switch between the different parallel variants provided by the Turbomole &#039;&#039;Module&#039;&#039;, simply define the new parallel variant via $PARA_ARCH and load the &#039;&#039;Module&#039;&#039; again. Note that for switching between the parallel variants unloading of the Turbomole &#039;&#039;Module&#039;&#039; is not required. For instance to change to the MPI variant, execute:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ export PARA_ARCH=MPI&lt;br /&gt;
$ module load chem/turbomole&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Turbomole binaries ==&lt;br /&gt;
The &#039;&#039;&#039;Turbomole&#039;&#039;&#039; software package consists of a set of stand-alone program binaries providing different features and parallelization support:&lt;br /&gt;
{|  width=750px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- style=text-align:left&amp;quot;&lt;br /&gt;
! Binary !! Features !! OpenMP !! Fork !! MPI !! GA&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| define&lt;br /&gt;
| Interactive input generator&lt;br /&gt;
| no&lt;br /&gt;
| no&lt;br /&gt;
| no&lt;br /&gt;
| no&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| dscf &lt;br /&gt;
| Energy calculations&lt;br /&gt;
| yes&lt;br /&gt;
| yes&lt;br /&gt;
| yes&lt;br /&gt;
|  no&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| grad&lt;br /&gt;
| Gradient calculations&lt;br /&gt;
| no&lt;br /&gt;
| yes&lt;br /&gt;
| yes&lt;br /&gt;
| no&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| ridft&lt;br /&gt;
| Energy calc. with fast Coulomb approximation &lt;br /&gt;
| no&lt;br /&gt;
| yes&lt;br /&gt;
| yes&lt;br /&gt;
| yes&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| rdgrad&lt;br /&gt;
| Gradient calc. with fast Coulomb approximation &lt;br /&gt;
| no&lt;br /&gt;
| yes&lt;br /&gt;
| yes&lt;br /&gt;
| yes&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| ricc2&lt;br /&gt;
| Electronic excitation energies, transition moments and properties of excited states&lt;br /&gt;
| yes&lt;br /&gt;
| no&lt;br /&gt;
| yes&lt;br /&gt;
| no&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| statpt&lt;br /&gt;
| Hessian and coordinate update for stationary point search&lt;br /&gt;
| no&lt;br /&gt;
| no&lt;br /&gt;
| no&lt;br /&gt;
| no&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| aoforce&lt;br /&gt;
| Analytic calculation of force constants, vibrational frequencies and IR intensities&lt;br /&gt;
| no&lt;br /&gt;
| yes&lt;br /&gt;
| no&lt;br /&gt;
| no&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| escf&lt;br /&gt;
| Calc. of time dependent and dielectric properties &lt;br /&gt;
| no&lt;br /&gt;
| yes&lt;br /&gt;
| no&lt;br /&gt;
| no&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| egrad&lt;br /&gt;
| gradients and first-order properties of excited states&lt;br /&gt;
| no&lt;br /&gt;
| yes&lt;br /&gt;
| no&lt;br /&gt;
| no&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| odft&lt;br /&gt;
| Orbital-dependent energy calc.&lt;br /&gt;
| yes&lt;br /&gt;
| no&lt;br /&gt;
| no&lt;br /&gt;
| st no&lt;br /&gt;
|}&lt;br /&gt;
For the complete set of binaries and more detailed description of their features read [http://www.turbomole-gmbh.com/manuals/version_6_5/Documentation_html/node8.html here].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Turbomole tools ==&lt;br /&gt;
Turbomole&#039;s tool set contains scripts and binaries that help to prepare, execute workflows (such as geometry optimisation) and postprocess results. &lt;br /&gt;
{| width=750px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- style=&amp;quot;text-align:left&amp;quot;&lt;br /&gt;
! Script !! Type !! Description &lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| x2t&lt;br /&gt;
| Preparation&lt;br /&gt;
| Converts  XYZ coordinates into &#039;&#039;Turbomole&#039;&#039; coordinates. &lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| sdg&lt;br /&gt;
| Preparation&lt;br /&gt;
| Shows data group from &#039;&#039;control&#039;&#039; file: for example&amp;lt;span style=&amp;quot;background:#edeae2;margin:10px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;$ sdg coord&amp;lt;/span&amp;gt;shows current Turbomole coordinates used.&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| jobex&lt;br /&gt;
| Optimization workflow&lt;br /&gt;
| Shell script that controls and executes automatic optimizations of molecular geometry parameters.&lt;br /&gt;
&amp;lt;!-- NumForce does currently not work with Moab+Slurm&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| NumForce &lt;br /&gt;
| Workflow &lt;br /&gt;
| Shell script to calculates 2nd derivatives by numerical differentiation of gradients. Supports parallelization of tasks.&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| tm2molden&lt;br /&gt;
| Postprocessing&lt;br /&gt;
| Creates a molden format input file for the [[Molden]] program. &lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| eiger&lt;br /&gt;
| Postprocessing&lt;br /&gt;
| Script front-end of program &#039;&#039;eigerf&#039;&#039; to display HOMO-LUMO gap and MO eigenvalues.&lt;br /&gt;
|}&lt;br /&gt;
For the complete set of tools and more detailed description of their features read [http://www.turbomole-gmbh.com/manuals/version_6_5/Documentation_html/node9.html here].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Disk Usage ==&lt;br /&gt;
By default, scratch files of Turbomole binaries are placed in the directory of Turbmole binary execution. Please do not run your Turbomole calculations in your $HOME or $WORK directory. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
= Examples =&lt;br /&gt;
== Single node jobs ==&lt;br /&gt;
=== Template provided by Turbomole Module ===&lt;br /&gt;
The Turbomole &#039;&#039;Module&#039;&#039; provides a simple Moab example of Cubane (C8H8) that runs an energy relaxation via MPI parallel &#039;&#039;dscf&#039;&#039; using 4 cores on a single node and its local file system. To simply run the example do the following steps:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load chem/turbomole&lt;br /&gt;
$ mkdir -vp ~/Turbomole-example/&lt;br /&gt;
$ cd ~/Turbomole-examples/&lt;br /&gt;
$ cp -r $TURBOMOLE_EXA_DIR/* ~/Turbmole-example/&lt;br /&gt;
$ msub bwHPC_turbomole_single-node_example.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The last step submits the job example script bwHPC_turbomole_single-node_example.sh to the queueing system. Once started on a compute node, all calculations will be done under an unique directory on the [[BwUniCluster_File_System#File_Systems|local file system]] of that particular compute node.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Geometry optimization ===&lt;br /&gt;
To do a geometry optimization of the [[#Single node job template provided by Turbomole Module|previous job example]] modify bwHPC_turbomole_single-node_example.sh by replacing the following line&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
time dscf &amp;gt; dscf.out 2&amp;gt;&amp;amp;1&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
with&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
time jobex -dscf -keep 2&amp;gt;&amp;amp;1&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
and submit the modified script to the queueing system via [[Batch Jobs|msub]].&lt;br /&gt;
The Turbomole command &#039;&#039;jobex&#039;&#039; controls the call of all the required Turbomole binaries for the geometry optimization.  &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
= Turbomole-Specific Environment Variables =&lt;br /&gt;
To see a list of all Turbomole environments set by the &#039;module load&#039;-command do the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
module show chem/turbomole 2&amp;gt;&amp;amp;1 | grep -E &#039;(setenv|prepend-path)&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Version-Specific Information =&lt;br /&gt;
For specific information about the Turbomole version (e.g. 6.6) to be loaded do the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
module help chem/turbomole/6.6&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[[Category:Chemistry software]][[Category:bwUniCluster]][[Category:bwForCluster_Chemistry]]&lt;/div&gt;</summary>
		<author><name>R Rutka</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=JUSTUS2/Software/Orca&amp;diff=4081</id>
		<title>JUSTUS2/Software/Orca</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=JUSTUS2/Software/Orca&amp;diff=4081"/>
		<updated>2016-06-01T14:26:33Z</updated>

		<summary type="html">&lt;p&gt;R Rutka: /* Versions and Availability */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=600px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Description !! Content&lt;br /&gt;
|-&lt;br /&gt;
| module load&lt;br /&gt;
| chem/orca&lt;br /&gt;
|-&lt;br /&gt;
| Availability&lt;br /&gt;
| [[bwUniCluster]] &amp;amp;#124; [[BwForCluster_Chemistry]]&lt;br /&gt;
|-&lt;br /&gt;
| License&lt;br /&gt;
| [https://orcaforum.cec.mpg.de/license.html &amp;quot;Research group&amp;quot; license]&lt;br /&gt;
|-&lt;br /&gt;
|Citing&lt;br /&gt;
| [https://orcaforum.cec.mpg.de/OrcaManual.pdf As described in the manual]&lt;br /&gt;
|-&lt;br /&gt;
| Links&lt;br /&gt;
| [https://orcaforum.cec.mpg.de/ ORCA Forum Homepage] &amp;amp;#124; [https://orcaforum.cec.mpg.de/OrcaManual.pdf Documentation]&lt;br /&gt;
|-&lt;br /&gt;
| Graphical Interface&lt;br /&gt;
| No&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
= Description =&lt;br /&gt;
&#039;&#039;&#039;ORCA&#039;&#039;&#039; is a modern electronic structure program package. It is a flexible, efficient and easy-to-use general purpose tool for quantum chemistry with specific emphasis on spectroscopic properties of open-shell molecules.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
ORCA is able to carry out geometry optimizations and to predict a large number of spectroscopic parameters at different levels of theory. Besides the use of Hartee Fock theory, density functional theory (DFT) and semiempirical methods, high level ab initio quantum chemical methods, based on the configuration interaction and coupled cluster methods, are included into ORCA to an increasing degree.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Due to the user-friendly style, ORCA is considered to be a helpful tool not only for computational chemists, but also for chemists, physicists and biologists that are interested in developing the full information content of their experimental data with help of calculations. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;Implemented Methods&amp;lt;/u&amp;gt;&lt;br /&gt;
* Semiempirical INDO/S, MNDO, AM1, PM3, NDDO/1&lt;br /&gt;
* Hartee Fock theory (RHF, UHF, ROHF and CASSCF) all in direct, semidirect, or conventional mode, different RI approximations&lt;br /&gt;
* DFT including a reasonably large number of exchange and correlation functionals including hybrid DFT and the most recent double hybrid functionals (see below).&lt;br /&gt;
* High level single reference correlation models: CCSD(T), QCISD(T), CEPA, CPF (with and without RI, Local)&lt;br /&gt;
* High level ab-initio individual selecting multireference methods (MRCI, MRMP2, MRMP3, MRMP4, MRACPF, MRAQCC, SORCI, DDCI) for ground- and excited-states.&lt;br /&gt;
* Geometry optimization in redundant internal coordinates using analytical gradient techniques for all SCF methods as well as MP2.&lt;br /&gt;
* Excited state calculations via TD-DFT and CI-singles (CIS). For CIS an analytic gradient is also available. The doubles correction is available for CIS(D) in an efficient implementation.&lt;br /&gt;
* Scalar relativistic ZORA, IORA and Douglas-Kroll-Hess (DKH) approaches, picture change effects, all-electron basis sets, effective core potentials&lt;br /&gt;
* The COSMO model is available throughout the package for continuum dielectric modeling of the environment.&lt;br /&gt;
* QM/MM interface to GROMACS&lt;br /&gt;
* Double hybrid functionals including a fraction of nonlocal correlation. Analytic gradients are also available (these methods were invented by the Grimme group).&lt;br /&gt;
* Van der Waals correct density functionals.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
For more information on features please visit [https://orcaforum.cec.mpg.de/ &#039;&#039;The ORCA Portal of the Max-Planck Institute&#039;&#039;] web page.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Versions and Availability =&lt;br /&gt;
A list of versions currently available on all bwHPC-C5-Clusters can be obtained from the&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://cis-hpc.uni-konstanz.de Cluster Information System CIS]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/big&amp;gt;&lt;br /&gt;
{{#widget:Iframe&lt;br /&gt;
|url=https://cis-hpc.uni-konstanz.de/prod.cis/bwUniCluster/chem/orca&lt;br /&gt;
|width=99%&lt;br /&gt;
|height=230&lt;br /&gt;
|border=0&lt;br /&gt;
}}&lt;br /&gt;
On the command line interface of any bwHPC cluster you&#039;ll get a list of available versions by using&lt;br /&gt;
the command&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;&#039;module avail chem/orca&#039;&#039;&#039;&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module avail chem/orca               # bwUniCluster&lt;br /&gt;
------------------------ /opt/bwhpc/common/modulefiles -------------------------&lt;br /&gt;
chem/orca/3.0.1 chem/orca/3.0.3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= License =&lt;br /&gt;
The ORCA license is considered as a &amp;quot;Research group&amp;quot; license. Thus anyone who directly associated with your research group is covered by the license and may share your copy of ORCA on all computer resources of your group.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
This license only applies to academic users. Commercial use of ORCA is prohibited under the terms of this license.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[https://orcaforum.cec.mpg.de/license.html Complete ORCA Users License Agreement]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
= Usage =&lt;br /&gt;
== Loading the module ==&lt;br /&gt;
You can load the default version of &#039;&#039;ORCA&#039;&#039; with the command &#039;&#039;&#039;&#039;module load chem/orca&#039;&#039;&#039;&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load chem/orca&lt;br /&gt;
module avail chem/orca&lt;br /&gt;
------------------------ /opt/bwhpc/common/modulefiles ----------------------&lt;br /&gt;
chem/orca/3.0.3    chem/orca/3.0.3-openmpi-1.6.5(default)&lt;br /&gt;
$ module load chem/orca&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The module will try to load modules it needs to function (e.g. compiler/intel). If loading the module fails, check if you have already loaded one of those modules, but not in the version needed for Orca.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
If you wish to load a specific (older) version, you can do so using e.g.&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&#039;&#039;&#039;&#039;module load chem/orca/&#039;&#039;&#039;version&#039; to load the version you desires.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load chem/orca/3.0.1    # bwUniCluster example&lt;br /&gt;
Please do not use this module if you do not own a valid ORCA group license.&lt;br /&gt;
Please cite ORCA in your publications according to ORCA documentation.&lt;br /&gt;
Please read &#039;module help chem/orca/3.0.1&#039; before using ORCA.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;font color=red&amp;gt;Orca 3.0.3 mit OpenMPI 1.6.5 läuft stabiler! &lt;br /&gt;
Einige MPI-Abstürze sind nachweislich (gleicher Job) damit durchgelaufen.&amp;lt;br&amp;gt;&lt;br /&gt;
This version is known to be more stable with bigger jobs. Try this one if you get problems with other versions of Orca!&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;font color=green&amp;gt;This version is the default now. [[#Versions and Availability|Only available on the Chemical Cluster &#039;Justus&#039;]]!&amp;lt;/font&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Program Binaries ==&lt;br /&gt;
You can find the ORCA binaries in the main folder of the ORCA system.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
After loading the ORCA module (&#039;&#039;module load chem/orca/&#039;version&#039;&#039;&#039;) this path is also set to the local $PATH- and [[#ORCA-Specific Environments|$ORCA_BIN_DIR environments]].&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ls -x $ORCA_BIN_DIR&lt;br /&gt;
bwhpc-examples    manual           modulefiles   orca           orca_2aim         orca_2mkl&lt;br /&gt;
orca_anoint       orca_anoint_mpi  orca_asa      orca_casscf    orca_casscf_mpi   orca_chelpg&lt;br /&gt;
orca_ciprep       orca_cis         orca_cis_mpi  orca_cleanup   orca_cleanup_mpi  orca_cpcasscf&lt;br /&gt;
orca_cpscf        orca_cpscf_mpi   orca_eca      orca_ecplib    orca_eprnmr       orca_eprnmr_mpi&lt;br /&gt;
orca_euler        orca_fci         orca_fitpes   orca_gstep     orca_gtoint       orca_gtoint_mpi&lt;br /&gt;
orca_loc          orca_mapspc      orca_md       orca_mdci      orca_mdci_mpi     orca_mergefrag&lt;br /&gt;
orca_mp2          orca_mp2_mpi     orca_mrci     orca_mrci_mpi  orca_ndoint       orca_numfreq&lt;br /&gt;
orca_pc           orca_pc_mpi      orca_plot     orca_pltvib    orca_pop          orca_rel&lt;br /&gt;
orca_rocis        orca_rocis_mpi   orca_scf      orca_scfgrad   orca_scfgrad_mpi  orca_scfhess&lt;br /&gt;
orca_scfhess_mpi  orca_scf_mpi     orca_soc      orca_soc_mpi   orca_vib          orca_vpot&lt;br /&gt;
otool_cosmo       otool_gcp        otool_smd&lt;br /&gt;
$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Only the programs with the suffix &amp;lt;font color=green&amp;gt;&#039;&#039;&#039;_mpi&#039;&#039;&#039;&amp;lt;/font&amp;gt; are compiled including OPENMPI functionality.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Disk Usage ==&lt;br /&gt;
Scratch files are written to the current directory by default.&amp;lt;br&amp;gt;&lt;br /&gt;
Please change to a local directory or to &#039;&#039;&#039;your local workspace&#039;&#039;&#039; (preferred) before starting your calculations. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;calc_repo&#039; is an example name of a repository you created by using the command &#039;ws_allocate&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd $(ws_find calc_repo)&lt;br /&gt;
[&#039;your-id&#039;-calc_repo-0]$ pwd&lt;br /&gt;
/work/workspace/scratch/&#039;your-id&#039;-calc_repo-0&lt;br /&gt;
[&#039;your-id&#039;-calc_repo-0]$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
You can copy a simple interactive example to your &#039;&#039;&#039;workspace&#039;&#039;&#039; and run it, using &#039;msub&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd $(ws_find calc_repo)&lt;br /&gt;
$ cp $ORCA_EXA_DIR/bwhpc-orca-example.moab .&lt;br /&gt;
$ cp bwhpc-orca-example.moab myorcajob.moab &lt;br /&gt;
§ vi myorcajob.moab         # do your own modifications&lt;br /&gt;
$ msub myorcajob.moab       # start job submission&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
= ORCA-Specific Environments =&lt;br /&gt;
To see a list of all ORCA environments set by the &#039;module load chem/orca/version&#039;-command,&lt;br /&gt;
use &#039;&#039;&#039;&#039;env | grep ORCA&#039;&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Or try the command &#039;&#039;&#039;&#039;module show &#039;chem/orca&#039;&#039;&#039;/version&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load chem/orca/3.0.3&lt;br /&gt;
$ env | grep ORCA&lt;br /&gt;
ORCA_VERSION=3.0.3&lt;br /&gt;
ORCA_MAN_DIR=/opt/bwhpc/common/chem/orca/3.0.3/manual&lt;br /&gt;
ORCA_EXA_DIR=/opt/bwhpc/common/chem/orca/3.0.3/bwhpc-examples&lt;br /&gt;
ORCA_BIN_DIR=/opt/bwhpc/common/chem/orca/3.0.3&lt;br /&gt;
ORCA_HOME=/opt/bwhpc/common/chem/orca/3.0.3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
= Version-Specific Information =&lt;br /&gt;
For a more detailed information specific to a specific ORCA version, see the information available via the module system with the command &#039;&#039;&#039;&#039;module help chem/orca&#039;&#039;&#039;&#039;.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
For a small abstract what ORCA is about use the command &#039;&#039;&#039;&#039;module whatis chem/orca&#039;&#039;&#039;&#039;.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;Examples&amp;lt;/u&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module avail chem/orca&lt;br /&gt;
------------------------------ /opt/bwhpc/common/modulefiles ---------------------------------------&lt;br /&gt;
chem/orca/3.0.1 chem/orca/3.0.3&lt;br /&gt;
&lt;br /&gt;
$ module whatis chem/orca/3.0.1&lt;br /&gt;
chem/orca/3.0.1      : Quantum chemistry package ORCA, version 3.0.1&lt;br /&gt;
    (command &#039;/opt/bwhpc/common/chem/orca/3.0.1/orca&#039;)&lt;br /&gt;
&lt;br /&gt;
$ module help chem/orca/3.0.1&lt;br /&gt;
----------- Module Specific Help for &#039;chem/orca/3.0.1&#039; ------------&lt;br /&gt;
This module provides the quantum chemistry package ORCA version 3.0.1&lt;br /&gt;
via command &#039;/opt/bwhpc/common/chem/orca/3.0.1/orca&#039; &lt;br /&gt;
[...] &lt;br /&gt;
Documentation: &lt;br /&gt;
*  Max-Planck-Institut fuer Chemische Energiekonversion  &lt;br /&gt;
   https://cec.mpg.de/forum/portal.php&lt;br /&gt;
*  New features for version 3.0.1&lt;br /&gt;
   https://cec.mpg.de/forum/portal.php#a3&lt;br /&gt;
*  Manuals in pdf format:&lt;br /&gt;
   /opt/bwhpc/common/chem/orca/3.0.1/manual&lt;br /&gt;
*  Example data and a Moab example script can be found here:&lt;br /&gt;
   /opt/bwhpc/common/chem/orca/3.0.1/bwhpc-examples&lt;br /&gt;
[...]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
[[Category:Chemistry software]][[Category:bwUniCluster]][[Category:bwForCluster_Chemistry]]&lt;/div&gt;</summary>
		<author><name>R Rutka</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=File:Raxml_gui.jpg&amp;diff=3961</id>
		<title>File:Raxml gui.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=File:Raxml_gui.jpg&amp;diff=3961"/>
		<updated>2016-03-22T14:05:47Z</updated>

		<summary type="html">&lt;p&gt;R Rutka: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>R Rutka</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=Development/Parallel_Programming&amp;diff=3938</id>
		<title>Development/Parallel Programming</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=Development/Parallel_Programming&amp;diff=3938"/>
		<updated>2016-03-14T09:38:47Z</updated>

		<summary type="html">&lt;p&gt;R Rutka: /* openmpi */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=600px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Description !! Content&lt;br /&gt;
|-&lt;br /&gt;
| module load&lt;br /&gt;
| mpi/impi &amp;amp;#124; mpi/openmpi &lt;br /&gt;
|-&lt;br /&gt;
| Availability&lt;br /&gt;
| [[bwUniCluster]] &amp;amp;#124; [[BwForCluster_Chemistry]] &amp;amp;#124;  [[BwForCluster_MLS&amp;amp;amp;WISO]] &amp;amp;#124; bwGRiD_tu&lt;br /&gt;
|-&lt;br /&gt;
| Links&lt;br /&gt;
| [https://software.intel.com/en-us/intel-mpi-library Intel® MPI Library] &amp;amp;#124; [http://www.open-mpi.org/ Open MPI] &lt;br /&gt;
|-&lt;br /&gt;
| License&lt;br /&gt;
| [https://software.intel.com/en-us/articles/intel-mpi-library-licensing-faq Intel MPI Library Licensing FAQ] &amp;lt;small&amp;gt;install-doc/EULA.txt&amp;lt;/small&amp;gt; &amp;amp;#124; [http://www.open-mpi.org/community/license.php Open MPI License]&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
= Introduction =&lt;br /&gt;
This page will provide information regarding the supported parallel programming paradigms and specific hints on their usage.&lt;br /&gt;
Please refer to the [[BwUniCluster_Environment_Modules|Modules Documentation]] how to setup your environment on bwUniCluster to load a specific software installation.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
More informations about Compilers installed at our clusters is available here:&lt;br /&gt;
* [[Intel_Compiler|Intel Compiler Suite]]&lt;br /&gt;
* [[GCC|GNU Compiler (GCC)]]&lt;br /&gt;
* [[General_compiler_usage|General Compiler Usage (incl. PGI Compiler)]]&lt;br /&gt;
&lt;br /&gt;
= Versions and Availability =&lt;br /&gt;
=== impi (Intel) ===&lt;br /&gt;
A list of versions currently available compilers on the bwHPC-C5-Clusters can be obtained from the&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;big&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[https://cis-hpc.uni-konstanz.de/prod.cis/ Cluster Information System CIS]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
{{#widget:Iframe&lt;br /&gt;
|url=https://cis-hpc.uni-konstanz.de/prod.cis/bwUniCluster/mpi/impi&lt;br /&gt;
|width=99%&lt;br /&gt;
|height=1100&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== openmpi ===&lt;br /&gt;
A list of versions currently available compilers on the bwHPC-C5-Clusters can be obtained from the&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;big&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[https://cis-hpc.uni-konstanz.de/prod.cis/ Cluster Information System CIS]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
{{#widget:Iframe&lt;br /&gt;
|url=https://cis-hpc.uni-konstanz.de/prod.cis/bwUniCluster/mpi/openmpi&lt;br /&gt;
|width=99%&lt;br /&gt;
|height=1600&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= OpenMP =&lt;br /&gt;
== General Information ==&lt;br /&gt;
OpenMP is a mature specification [http://openmp.org/wp/openmp-specifications/] to allow easy, portable, and most importantly incremental node-level parallelisation of code.&lt;br /&gt;
Being a thread-based approach, OpenMP is aimed at more fine-grained parallelism than [[BwHPC_Best_Practices_Repository#MPI|MPI]].&lt;br /&gt;
Although there have been extensions to extend OpenMP for inter-node parallelisation, it is a node-level approach aimed to make best usage of a node&#039;s cores&amp;lt;!-- -- the section [[#Hybrid Parallelisation|Hybrid Parallelisation]] will explain how to parallelise utilizing MPI plus a thread-based parallelization paradigm like OpenMP--&amp;gt;.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
With regard to ease-of-use, OpenMP is ahead of any other common approach: the source-code is annotated using &amp;lt;tt&amp;gt;#pragma omp&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;!$omp&amp;lt;/tt&amp;gt; statements, in C/C++ and Fortran respectively.&lt;br /&gt;
Whenever the compiler encompasses a semantic block of code encapsulated in a parallel region, this block of code is transparently compiled into a function, which is passed to a so-called team-of-threads upon entering this semantic block. This fork-join model of execution eases a lot of the programmer&#039;s pain involved with Threads.&lt;br /&gt;
Being a loop-centric approach, OpenMP is aimed at codes with long/time-consuming loops.&lt;br /&gt;
A single combined directive &amp;lt;tt&amp;gt;pragma omp parallel for&amp;lt;/tt&amp;gt; will tell the compiler to automatically parallel the ensuing for-loop.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The following example is a bit more advanced in that even reductions of variables over multiple threads are easily to parallel:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
   for (int i=0, sum = 0.0; i &amp;lt; VECTOR_LEN; i++)&lt;br /&gt;
     norm2 += (v[i]*v[i]);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
is parallelized by just adding a single line as in:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
#  pragma omp parallel for reduction(+:norm2)&lt;br /&gt;
   for (int i=0, sum = 0.0; i &amp;lt; VECTOR_LEN; i++)&lt;br /&gt;
     norm2 += (v[i]*v[i]);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
With &amp;lt;tt&amp;gt;VECTOR_LENGTH&amp;lt;/tt&amp;gt; being large enough, this piece of code compiled with OpenMP will run in parallel, exhibiting very nice speedup.&lt;br /&gt;
Compiled without, the code remains as is. Developpers may therefore incrementally parallelize their application based on the profile derived from performance analysis tools, starting with the most time-consuming loops.&lt;br /&gt;
Using OpenMP&#039;s concise API, one may query the number of running threads, the number of processors, a time to calculate runtime, and even set parameters such as the number of threads to execute a parallel region.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The OpenMP-4.0 specification added support for the SIMD-directive to better utilize SIMD-vectorization, as well as integrating directives to offload computation to accelerators using the &amp;lt;tt&amp;gt;target&amp;lt;/tt&amp;gt; directive: these are integrated into the Intel Compiler and are actively being worked on for the GNU compiler, some restrictions may apply.&lt;br /&gt;
== OpenMP Best Practice Guide ==&lt;br /&gt;
The following silly example to calculate the squared Euklidian Norm shows some techniques:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;omp.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#define VECTOR_LENGTH 5&lt;br /&gt;
&lt;br /&gt;
int main (int argc, char * argv[])&lt;br /&gt;
{&lt;br /&gt;
    int len = VECTOR_LENGTH;&lt;br /&gt;
    int i;&lt;br /&gt;
    double * v;&lt;br /&gt;
    double norm2 = 0.0;&lt;br /&gt;
    double t1, tdiff;&lt;br /&gt;
&lt;br /&gt;
    if (argc &amp;gt; 1)&lt;br /&gt;
        len = atoi (argv[1]);&lt;br /&gt;
    v = malloc (len * sizeof(double));&lt;br /&gt;
&lt;br /&gt;
    t1 = omp_get_wtime();&lt;br /&gt;
    // Initialization already with (the same number of) threads&lt;br /&gt;
#pragma omp parallel for&lt;br /&gt;
    for (i=0; i &amp;lt; len; i++) {&lt;br /&gt;
        v[i] = i;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // Now aggregate the sum-of-squares by specifying a reduction&lt;br /&gt;
#pragma omp parallel for reduction(+:norm2)&lt;br /&gt;
    for(i=0; i &amp;lt; len; i++) {&lt;br /&gt;
        norm2 += (v[i]*v[i]);&lt;br /&gt;
    }&lt;br /&gt;
    tdiff = omp_get_wtime() - t1;&lt;br /&gt;
&lt;br /&gt;
    printf (&amp;quot;norm2: %f Time:%f\n&amp;quot;, norm2, tdiff);&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;!-- Specific OpenMP hints: default(none), reproducability, thread-safey --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Group independent parallel sections together: in the above example, You may combine those two sections into one larger parallel block. This will just once enter the parallel region (in the fork-join model) instead of twice. Especially in inner loops, this will considerably decrease overhead.&lt;br /&gt;
* Compile with the Intel compiler&#039;s option &amp;lt;tt&amp;gt;-diag-enable sc-parallel3&amp;lt;/tt&amp;gt; to get the further warnings on thread-safety, performance, etc. The following code with loop-carried dependency will e.g. compile fine (aka without warning):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
#pragma omp parallel for reduction(+:norm2)&lt;br /&gt;
    for(i=1; i &amp;lt; len-1; i++) {&lt;br /&gt;
        v[i] = v[i-1]+v[i+1];&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
However the Intel compiler with &amp;lt;tt&amp;gt;-diag-enable sc-parallel3&amp;lt;/tt&amp;gt; will produce the following warning:&lt;br /&gt;
&amp;lt;tt&amp;gt;warning #12246: variable &amp;quot;v&amp;quot; has loop carried data dependency that may lead to incorrect program execution in parallel mode; see (file:omp_norm2.c line:32)&amp;lt;/tt&amp;gt;&lt;br /&gt;
* Always specify &amp;lt;tt&amp;gt;default(none)&amp;lt;/tt&amp;gt; on larger parallel regions in order to specifically set the visibility of variables to either &amp;lt;tt&amp;gt;shared&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;private&amp;lt;/tt&amp;gt;.&lt;br /&gt;
* Try to restructure code to allow for &amp;lt;tt&amp;gt;nowait&amp;lt;/tt&amp;gt;: OpenMP defines synchronization points (implied barriers) at the end of work sharing constructs such as the &amp;lt;tt&amp;gt;pragma omp for&amp;lt;tt&amp;gt; directive. If the ensuing section of code does not depend on data being generated inside the parallel section, adding the &amp;lt;tt&amp;gt;nowait&amp;lt;/tt&amp;gt; clause to the worksharing directive allows the compiler to eliminate this synchronization point. This reduces overhead, allows for better overlap and better utilization of the processor&#039;s resources. This might imply however to restructure the code (move portions of independent code in between dependent works-sharing constructs).&lt;br /&gt;
== Usage ==&lt;br /&gt;
OpenMP is supported by various compilers, here the usage for two main compilers [[BwHPC_BPG_Compiler#GCC|GCC]] and [[BwHPC_BPG_Compiler#Intel Suite|Intel Suite]] are introduced.&lt;br /&gt;
For both compilers, You first need to turn on OpenMP support by specifying a parameter on the compiler&#039;s command-line.&lt;br /&gt;
In case You make function calls to OpenMP&#039;s API, You also need to include the header-file &amp;lt;tt&amp;gt;omp.h&amp;lt;/tt&amp;gt;.&lt;br /&gt;
OpenMP&#039;s API allows to query or set the number of threads, query the number of processors, get a wall-clock time to measure execution times, etc.&lt;br /&gt;
=== OpenMP with GNU Compiler Collection ===&lt;br /&gt;
Starting with version 4.2 the gcc compiler supports OpenMP-2.5.&lt;br /&gt;
Since then the analysis capabilities of the GNU compiler have steadily improved.&lt;br /&gt;
The installed compilers support OpenMP-3.1.&lt;br /&gt;
&amp;lt;!-- Starting with gcc-4.9 OpenMP-4.0 is supported, however the &amp;lt;tt&amp;gt;target&amp;lt;/tt&amp;gt; directive will only offload to the host processor. --&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
To use OpenMP with the gcc-compiler, pass &amp;lt;tt&amp;gt;-fopenmp&amp;lt;/tt&amp;gt; as parameter.&lt;br /&gt;
=== OpenMP with Intel Compiler ===&lt;br /&gt;
The Intel Compiler&#039;s support for OpenMP is more advanced than gcc&#039;s -- especially in term of programmer support.&lt;br /&gt;
To use OpenMP with the Intel compiler, pass &amp;lt;tt&amp;gt;-openmp&amp;lt;/tt&amp;gt; as command-line parameter.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
One may get very insightful information about OpenMP, when compiling with&lt;br /&gt;
* Compiling with &amp;lt;tt&amp;gt;-openmp-report2&amp;lt;/tt&amp;gt; to get information, which loops were parallelized and a reason why not.&lt;br /&gt;
* Compiling with &amp;lt;tt&amp;gt;-diag-enable sc-parallel3&amp;lt;/tt&amp;gt; to get errors and warnings about your sources weaknesses with regard to parallelization (see example below).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;!-- ---------------------------------------------------------------------------------------------- --&amp;gt;&lt;br /&gt;
= MPI =&lt;br /&gt;
In this section, You will find information regarding the supported installations of the Message-Passing Interface libraries and their usage.&amp;lt;br&amp;gt;&lt;br /&gt;
Due to the Fortran interface ABI, all MPI-libraries are normally bound to a specific compiler-vendor and even the specific compiler version.&lt;br /&gt;
Therefore, as listed in [[BwHPC_BPG_Compiler]] two compilers are supported on bwUniCluster: [[GCC|GCC]] and [[Intel_Compiler|Intel Compiler Suite]].&lt;br /&gt;
As both compilers are continously improving, the communication libraries will be adopted in lock-step.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
With a set of different implementations, there comes the problem of choice. These pages should inform the user of the communication libraries, what considerations should be done with regard to performance, maintainability and debugging -- in general tool support -- of the various implementations.&lt;br /&gt;
== MPI Introduction ==&lt;br /&gt;
The Message-Passing Interface is a standard provided by the [http://www.mpi-forum.org MPI-Forum] which regularly convenes for the [http://meetings.mpi-forum.org MPI-Forum Meetings] to update this standard. The current version is MPI-3.0 available as [http://mpi-forum.org/docs/mpi-3.0/mpi30-report.pdf PDF].&lt;br /&gt;
This document defines the API of over 300 functions for the C- and the Fortran-language -- however, You will certainly not need all of them to begin with.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Every MPI-conforming program needs to call &amp;lt;tt&amp;gt;MPI_Init()&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;MPI_Finalize()&amp;lt;/tt&amp;gt; upon start and shutdown -- or &amp;lt;tt&amp;gt;MPI_Abort()&amp;lt;/tt&amp;gt; in case of an abnormal termination.&lt;br /&gt;
After initialization the programm may call any other MPI-function, specifically communication functions.&lt;br /&gt;
However to do so, it is required to find out how many processes the program has been started with, using &amp;lt;tt&amp;gt;MPI_Comm_size()&amp;lt;/tt&amp;gt; and what number (here called a rank= this particular process has using &amp;lt;tt&amp;gt;MPI_Comm_rank()&amp;lt;/tt&amp;gt;.&lt;br /&gt;
Communication is always relative to a so-called communicator -- the default one after initialization being called &amp;lt;tt&amp;gt;MPI_COMM_WORLD&amp;lt;/tt&amp;gt;- &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
There&#039;s basically three ways of communication:&lt;br /&gt;
* two-sided communication using point-to-point (often abbreviated P2P) functions, such as &amp;lt;tt&amp;gt;MPI_Send()&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;MPI_Recv()&amp;lt;/tt&amp;gt;, which always involves two participating processes,&lt;br /&gt;
* collectice communcation functions (often abbreviated as colls) involve multiple processes, examples are &amp;lt;tt&amp;gt;MPI_Bcast()&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;MPI_Reduce()&amp;lt;/tt&amp;gt;, &lt;br /&gt;
* one-sided communication, where communication between two processes is initiated by one-process, only. With proper RMA-hardware support and careful programming, this may allow higher performance or scalibility.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
All parts of the programm, which reference MPI functionality need to be compiled with the &#039;&#039;&#039;same&#039;&#039;&#039; compiler settings/include files and linked to the same MPI-Library. This is stressed here, since without taking pre-cautions, a different MPI&#039;s header may be included, resulting in funny errors: consider that Intel MPI is derived from MPIch, with MPI-datatypes being C &amp;lt;tt&amp;gt;int&amp;lt;/tt&amp;gt;s, while Open MPI uses pointers to structures (the former being 4, the latter being 8 bytes on bwUniCluster).&lt;br /&gt;
To ease the programmer&#039;s life, MPI implementations offer compiler-wrappers, e.g. &amp;lt;tt&amp;gt;mpicc&amp;lt;/tt&amp;gt; for C and &amp;lt;tt&amp;gt;mpif90&amp;lt;/tt&amp;gt; for Fortran90 for compilation and linking, taking care to include all required libraries.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
All programs must be started using the &amp;lt;tt&amp;gt;mpirun&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;mpiexec&amp;lt;/tt&amp;gt; command. Depending on the actual implementation, it uses different arguments, however the following works with any MPI:&lt;br /&gt;
* &amp;lt;tt&amp;gt;mpirun -np 128 ./app&amp;lt;/tt&amp;gt; starts 128 processes (with ranks 0 to 127)&lt;br /&gt;
* &amp;lt;tt&amp;gt;mpiexec -n 128 -hostfile mynodes.txt ./app&amp;lt;/tt&amp;gt; starts 128 processes on only the nodes listed line-by-line in the provided text-file &amp;lt;tt&amp;gt;mynodes.txt&amp;lt;/tt&amp;gt;.&lt;br /&gt;
* &amp;lt;tt&amp;gt;mpiexec -n 64 ./app1 : -n 64 ./app2&amp;lt;/tt&amp;gt; starts 128 processes, 64 of which execute &amp;lt;tt&amp;gt;app1&amp;lt;/tt&amp;gt;, the other 64 execute &amp;lt;tt&amp;gt;app2&amp;lt;/tt&amp;gt;. All processes however participate in the same &amp;lt;tt&amp;gt;MPI_COMM_WORLD&amp;lt;/tt&amp;gt; and therefore must accordingly take care about their respective ranks.&lt;br /&gt;
Please note, that process placement (e.g. a round-robin scheme), and specifically process-binding to sockets is MPI-implementation dependant.&lt;br /&gt;
== MPI Best Practice Guide ==&lt;br /&gt;
Specific performance considerations with regard to MPI (independent of the implementation):&lt;br /&gt;
* No communication at all is best: Only communicate between processes if at all necessary. Consider that file-access is &amp;quot;communication&amp;quot; as well.&lt;br /&gt;
* If communication is done with multiple processes, try to involve as many processes in just one call: MPI optimizes the communication pattern for so-called &amp;quot;collective communication&amp;quot; to take advantage of the underlying network (with regard to network topology, message sizes, queueing capabilities of the network interconnect, etc.). Therefore try to always think in collective communication, if a communication pattern involves a group of processes.&lt;br /&gt;
* Try to group processes together: Function calls like &amp;lt;tt&amp;gt;MPI_Cart_create&amp;lt;/tt&amp;gt; will come in handy for applications with cartesian domains but also general communicators derived from &amp;lt;tt&amp;gt;MPI_COMM_WORLD&amp;lt;/tt&amp;gt; using &amp;lt;tt&amp;gt;MPI_Comm_split()&amp;lt;/tt&amp;gt; may benefit by MPI&#039;s knowing the underlying network topology. Use MPI3&#039;s &amp;lt;tt&amp;gt;MPI_Comm_split_type()&amp;lt;/tt&amp;gt; with &amp;lt;tt&amp;gt;MPI_COMM_TYPE_SHARED&amp;lt;/tt&amp;gt; for a sub-communicator with processes having access to the same shared memory region (aka on bwUniCluster the same node).&lt;br /&gt;
* File-accesses to load / store data &#039;&#039;&#039;must&#039;&#039;&#039; be done collectively: Writing to storage, or even reading the initialization data -- all of which involves getting data from/to all MPI processes -- must be done collectively. MPI&#039;s Parallel IO offers a rich API to read and distribute the data access -- in order to take advantage of parallel filesystems like Lustre. A many-fold performance improvement may be seen by writing data in large chunks in collective fashion -- and at the same time being nice to other users and applications. &lt;br /&gt;
* Try to hide the communication by computation: Try to hide (some) of the cost of communication of Point-to-point communication by using non-blocking / immediate P2P-calls (&amp;lt;tt&amp;gt;MPI_Isend&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;MPI_Irecv&amp;lt;/tt&amp;gt; et al, followed by &amp;lt;tt&amp;gt;MPI_Wait&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;MPI_Test&amp;lt;/tt&amp;gt; et al). This may allow the MPI-implementation to initiate or even offload communication to the network interconnect and resume executing your application, while data is being transferred. MPI-3 adds non-blocking collectives, e.g. &amp;lt;tt&amp;gt;MPI_Ibcast()&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;MPI_Iallreduce()&amp;lt;/tt&amp;gt;. For extra credit, explain the use-cases of &amp;lt;tt&amp;gt;MPI_Ibarrier()&amp;lt;/tt&amp;gt;.&lt;br /&gt;
* Every call to MPI may trigger an access to physical hardware -- limit it: When calling communication-related functions such as &amp;lt;tt&amp;gt;MPI_Test&amp;lt;/tt&amp;gt; to check whether a specific communication has finished, the queue of the network adapter may need to be queried. This memory access or even physical hardware access to query the state will cost cycles. Therefore, the programmer should combine multiple requests with functions such as &amp;lt;tt&amp;gt;MPI_Waitall()&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;MPI_Waitany()&amp;lt;/tt&amp;gt; or their Test*-counterparts.&lt;br /&gt;
* Make usage of derived datatypes: instead of manually copying data into temporary, even newly allocated memory, describe the data-layout to MPI -- and let the implementation, or even the network HCA&#039;s hardware do the data fetching.&lt;br /&gt;
* Bind Your processes to sockets: Operating Systems are good in making best use of the ressources -- which sometimes involves moving tasks from one core to another, or even (though more unlikely since the OS&#039; heuristics try to avoid it) to another socket, with the obvious effects: Caches are cold, every memory access to memory allocated on the previous socket &amp;quot;has to travel the bus&amp;quot;. This is particularly happening if You have multiple OpenMP parallel regions which are separated by code that does IO -- and threads are sleeping -- the processes doing IO may wander to a different socket... Bind Your processes to at least the socket. All major MPIs support this binding (see below).&lt;br /&gt;
* Do not use the C++ interface: First of all, it has been marked as deprecated in the MPI-3.0 standard, since it added little benefit to C++ programmers over the C-interface. Moreover, since MPI implementations are written in C, the interface adds another level of indirection and therefore a bit of overhead in terms of instructions and Cache misses.&lt;br /&gt;
== Open MPI ==&lt;br /&gt;
The [http://www.open-mpi.org Open MPI] library is an open, flexible and nevertheless performant implementation of MPI-2 and MPI-3. Licensed under BSD, it is being actively developed by an open community of industry and research institutions.&lt;br /&gt;
The flexibility comes in handy: using the concept of a [http://www.open-mpi.org/faq/?category=tuning#mca-def MCA] (aka a plugin) Open MPI supports many different network interconnects (Infinband, TCP, Cray, etc.) , on the other hand, a installation may be tailored to suite an installation, e.g. the network (Infiniband with specific settings), the main startup-mechanism, etc.&lt;br /&gt;
Furthermore, the [http://www.open-mpi.org/faq/ FAQ] offers hints on [http://www.open-mpi.org/faq/?category=tuning performance tuning].&lt;br /&gt;
=== Usage ===&lt;br /&gt;
Like other MPI implementations, after loading the [[BwUniCluster_Environment_Modules|module]], Open MPI provides the compiler-wrappers &amp;lt;tt&amp;gt;mpicc&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;mpicxx&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;mpifort&amp;lt;/tt&amp;gt;  (or for&lt;br /&gt;
versions lower than 1.7 &amp;lt;tt&amp;gt;mpif77&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;mpif90&amp;lt;/tt&amp;gt;) for the C-, C++ and Fortran compilers respectively. Albeit their usage is not required, these wrappers are handy to not have to use the command-line options for header- or library directories, aka &amp;lt;tt&amp;gt;-I&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;-L&amp;lt;/tt&amp;gt;, as well as the actual needed MPI-libraries itselve.&lt;br /&gt;
=== Further information === &lt;br /&gt;
Open MPI also features a few specific functionalities that will help users and developpers, alike:&lt;br /&gt;
* Open MPI&#039;s tool &amp;lt;tt&amp;gt;ompi_info&amp;lt;/tt&amp;gt; allows seeing all of Open MPI&#039;s installed MCA components and their specific options.&lt;br /&gt;
Without any option the user gets a list of flags, the Open MPI installation was compiled for (version of compilers, specific configure-flags, e.g. debugging, or profiling options). Furthermore, using &amp;lt;tt&amp;gt;ompi_info --param all all&amp;lt;/tt&amp;gt; one may see all of the MCA&#039;s options, e.g. that the default PML-MCA uses an initial free-list of 4 blocks (increased by 64 upon first encountering this limit):&lt;br /&gt;
&amp;lt;tt&amp;gt;ompi_info --param ob1 all&amp;lt;/tt&amp;gt; -- which may be increased for applications that are certain to benefit from a larger value upon startup.&lt;br /&gt;
* Open MPI allows adapting MCA parameters on the command-line: parameters may be supplied, e.g. the above-mentioned parameter &amp;lt;tt&amp;gt;mpirun -np 128 --mca mpirun -np 16 --mca pml_ob1_free_list_num 128 ./mpi_stub&amp;lt;/tt&amp;gt;.&lt;br /&gt;
* Open MPI internally uses the tool [http://www.open-mpi.org/projects/hwloc/ hwloc] for node-local processor-information, as well as process- and memory-affinity. This tool also is a good tool to get information on the node&#039;s processor topology and Cache-information. This may be used to optimize and balance memory usage or for choosing a better ratio of MPI processes per node vs. OpenMP threads per core.&lt;br /&gt;
== Intel (i)MPI ==&lt;br /&gt;
The Intel MPI Library is a multi-fabric message passing library that implements the Message Passing Interface, v2.2 (MPI-2.2) specification. It provides a standard library across Intel&lt;br /&gt;
platforms that enable adoption of MPI-2.2 functions as their needs dictate.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The Intel MPI Library enables developers to change or to upgrade processors and interconnects as new technology becomes available without changes to the software or to the operating environment.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The library is provided in the following kits:&lt;br /&gt;
* The Intel MPI Library Runtime Environment (RTO) has the tools you need to run programs, including Multipurpose Daemon (MPD), Hydra and supporting utilities, shared (.so) libraries, and documentation.&lt;br /&gt;
* The Intel MPI Library Development Kit (SDK) includes all of the Runtime Environment components plus compilation tools, including compiler commands such as &amp;lt;b&amp;gt;mpiicc&amp;lt;/b&amp;gt;, include files and modules, static (.a) libraries, debug libraries, trace libraries, and test codes.&lt;br /&gt;
=== General information  ===&lt;br /&gt;
All Intel mpi-modules are called &#039;&#039;&#039;&#039;mpi/impi&#039;&#039;&#039;&#039;.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
These modules provides the Intel Message Passing Interface (mpicc, mpicxx, mpif77&lt;br /&gt;
and mpif90) for the Intel compiler suite (icc, icpc and ifort) &amp;lt;small&amp;gt;(see also [http://software.intel.com/en-us/intel-mpi-library Intel MPI Library])&amp;lt;/small&amp;gt;.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The corresponding Intel compiler module is loaded automatically (if not done before). &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;font color=red&amp;gt;Compiler and MPI module must fit. Don&#039;t mix incongruous versions!&amp;lt;/font&amp;gt;&lt;br /&gt;
=== Usage ===&lt;br /&gt;
The following table lists available MPI compiler commands and the underlying compilers, compiler families, languages, and application binary interfaces (ABIs) that they support.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;The Intel MPI Library Compiler Drivers&amp;lt;/u&amp;gt;&lt;br /&gt;
{| width=600px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Compiler Command !! Default Compiler !! Supported Language(s) !! Supported ABI&#039;s&lt;br /&gt;
|-&lt;br /&gt;
| colspan=4 style=&amp;quot;background-color:#DCDCDC;&amp;quot; | Generic Compilers &lt;br /&gt;
|-&lt;br /&gt;
| mpicc || gcc, cc  || C || 32/64 bit &lt;br /&gt;
|-&lt;br /&gt;
| mpicxx || g++ || C/C++ || 32/64 bit &lt;br /&gt;
|-&lt;br /&gt;
| mpifc || gfortran || Fortran77/Fortran 95 || 32/64 bit&lt;br /&gt;
|-&lt;br /&gt;
| colspan=4 style=&amp;quot;background-color:#DCDCDC;&amp;quot; | [[GCC|GNU Compiler]] Versions 3 and higher &lt;br /&gt;
|-&lt;br /&gt;
| mpigcc || gcc || C || 32/64 bit &lt;br /&gt;
|-&lt;br /&gt;
| mpigxx || g++  || C/C++ || 32/64 bit &lt;br /&gt;
|-&lt;br /&gt;
| mpif77 || g77 || Fortran 77 || 32/64 bit &lt;br /&gt;
|-&lt;br /&gt;
| mpif90 || gfortran || Fortran 95 || 32/64 bit&lt;br /&gt;
|-&lt;br /&gt;
| colspan=4 style=&amp;quot;background-color:#DCDCDC;&amp;quot; | [[Intel_Compiler|&#039;&#039;&#039;Intel Fortran, C++ Compilers&#039;&#039;&#039;]] Versions 13.1 through 14.0 and Higher&lt;br /&gt;
|-&lt;br /&gt;
| mpiicc || icc || C || 32/64 bit &lt;br /&gt;
|-&lt;br /&gt;
| mpiicpc || icpc || C++ || 32/64 bit &lt;br /&gt;
|-&lt;br /&gt;
|impiifort  || ifort || Fortran77/Fortran 95 || 32/64 bit &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
* Compiler commands are available only in the Intel MPI Library Development Kit.&lt;br /&gt;
* Compiler commands are in the &amp;lt;installdir&amp;gt;/&amp;lt;arch&amp;gt;/bin directory. Where &amp;lt;installdir&amp;gt; refers to the Intel MPI Library installation directory (depending on the loaded mpi module) and &amp;lt;arch&amp;gt; is one of the following architectures:&lt;br /&gt;
* ia32 - IA-32 architecture&lt;br /&gt;
* intel64 - Intel 64 architecture&lt;br /&gt;
* mic – Intel Xeon Phi™ Coprocessor architecture&lt;br /&gt;
* Ensure that the corresponding underlying compilers (32-bit or 64-bit, as appropriate) are already in your PATH. This is normally done by the &#039;module load&#039; command. &lt;br /&gt;
* To port existing MPI-enabled applications to the Intel MPI Library, recompile all sources.&lt;br /&gt;
* To display mini-help of a compiler command, execute it without any parameters.&lt;br /&gt;
&lt;br /&gt;
=== Further information ===&lt;br /&gt;
==== Intel MPI without multithreading on the bwUniCluster ====&lt;br /&gt;
* [[Batch_Jobs_-_bwUniCluster_Features#Intel_MPI_without_Multithreading|Additional Infos about Intel MPI without Multithreading]]&lt;br /&gt;
==== Sample MPI programm in &amp;quot;C&amp;quot; ====&lt;br /&gt;
The following example  code includes a sample MPI program written in C.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
#******************************************************************************&lt;br /&gt;
# Content: (exemplify version)&lt;br /&gt;
#      Based on a Monto Carlo method, this MPI sample code uses volumes to&lt;br /&gt;
#      estimate the number PI.&lt;br /&gt;
#*****************************************************************************/&lt;br /&gt;
#include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;math.h&amp;gt;&lt;br /&gt;
#include &amp;lt;time.h&amp;gt;&lt;br /&gt;
#include &amp;lt;math.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
// here you&#039;l include the main MPI-library&lt;br /&gt;
#include &amp;quot;mpi.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#define MASTER 0&lt;br /&gt;
#define TAG_HELLO 4&lt;br /&gt;
#define TAG_TEST 5&lt;br /&gt;
#define TAG_TIME 6&lt;br /&gt;
&lt;br /&gt;
int main(int argc, char *argv[]) {&lt;br /&gt;
  int i, id, remote_id, num_procs;&lt;br /&gt;
   &lt;br /&gt;
  MPI_Status stat;&lt;br /&gt;
  int namelen;&lt;br /&gt;
  char name[MPI_MAX_PROCESSOR_NAME];&lt;br /&gt;
&lt;br /&gt;
  // Start MPI.&lt;br /&gt;
  if (MPI_Init (&amp;amp;argc, &amp;amp;argv) != MPI_SUCCESS) {&lt;br /&gt;
      printf (&amp;quot;Failed to initialize MPIn&amp;quot;);&lt;br /&gt;
      return (-1);&lt;br /&gt;
  }&lt;br /&gt;
  // Create the communicator, and retrieve the number of processes.&lt;br /&gt;
  MPI_Comm_size (MPI_COMM_WORLD, &amp;amp;num_procs);&lt;br /&gt;
&lt;br /&gt;
  // Determine the rank of the process.&lt;br /&gt;
  MPI_Comm_rank (MPI_COMM_WORLD, &amp;amp;id);&lt;br /&gt;
&lt;br /&gt;
  // Get machine name&lt;br /&gt;
  MPI_Get_processor_name (name, &amp;amp;namelen);&lt;br /&gt;
  &lt;br /&gt;
  if (id == MASTER) {&lt;br /&gt;
      printf (&amp;quot;Hello world: rank %d of %d running on %sn&amp;quot;, id, num_procs, name);&lt;br /&gt;
&lt;br /&gt;
  for (i = 1; i&amp;lt;num_procs; i++) {	&lt;br /&gt;
      MPI_Recv (&amp;amp;remote_id, 1, MPI_INT, i, TAG_HELLO, MPI_COMM_WORLD, &amp;amp;stat);	&lt;br /&gt;
      MPI_Recv (&amp;amp;num_procs, 1, MPI_INT, i, TAG_HELLO, MPI_COMM_WORLD, &amp;amp;stat);  		&lt;br /&gt;
      MPI_Recv (&amp;amp;namelen, 1, MPI_INT, i, TAG_HELLO, MPI_COMM_WORLD, &amp;amp;stat);			&lt;br /&gt;
      MPI_Recv (name, namelen+1, MPI_CHAR, i, TAG_HELLO, MPI_COMM_WORLD, &amp;amp;stat);&lt;br /&gt;
			&lt;br /&gt;
      printf (&amp;quot;Hello world: rank %d of %d running on %sn&amp;quot;, remote_id, num_procs, name);&lt;br /&gt;
      }&lt;br /&gt;
  }&lt;br /&gt;
  else {	    &lt;br /&gt;
      MPI_Send (&amp;amp;id, 1, MPI_INT, MASTER, TAG_HELLO, MPI_COMM_WORLD);&lt;br /&gt;
      MPI_Send (&amp;amp;num_procs, 1, MPI_INT, MASTER, TAG_HELLO, MPI_COMM_WORLD);&lt;br /&gt;
      MPI_Send (&amp;amp;namelen, 1, MPI_INT, MASTER, TAG_HELLO, MPI_COMM_WORLD);&lt;br /&gt;
      MPI_Send (name, namelen+1, MPI_CHAR, MASTER, TAG_HELLO, MPI_COMM_WORLD);&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
   // Rank 0 distributes seek randomly to all processes.&lt;br /&gt;
  double startprocess, endprocess;&lt;br /&gt;
&lt;br /&gt;
  int distributed_seed = 0;&lt;br /&gt;
  int *buff;&lt;br /&gt;
&lt;br /&gt;
  buff = (int *)malloc(num_procs * sizeof(int));&lt;br /&gt;
	&lt;br /&gt;
  unsigned int MAX_NUM_POINTS = pow (2,32) - 1;&lt;br /&gt;
  unsigned int num_local_points = MAX_NUM_POINTS / num_procs;&lt;br /&gt;
&lt;br /&gt;
  if (id == MASTER) {		  &lt;br /&gt;
      srand (time(NULL));&lt;br /&gt;
  &lt;br /&gt;
      for (i=0; i&amp;lt;num_procs; i++) {           &lt;br /&gt;
          distributed_seed = rand();&lt;br /&gt;
          buff[i] = distributed_seed;&lt;br /&gt;
     }  &lt;br /&gt;
  }&lt;br /&gt;
  // Broadcast the seed to all processes&lt;br /&gt;
  MPI_Bcast(buff, num_procs, MPI_INT, MASTER, MPI_COMM_WORLD);&lt;br /&gt;
&lt;br /&gt;
  // At this point, every process (including rank 0) has a different seed. Using their seed,&lt;br /&gt;
  // each process generates N points randomly in the interval [1/n, 1, 1]&lt;br /&gt;
  startprocess = MPI_Wtime();&lt;br /&gt;
&lt;br /&gt;
  srand (buff[id]);&lt;br /&gt;
&lt;br /&gt;
  unsigned int point = 0;&lt;br /&gt;
  unsigned int rand_MAX = 128000;&lt;br /&gt;
  float p_x, p_y, p_z;&lt;br /&gt;
  float temp, temp2, pi;&lt;br /&gt;
  double result;&lt;br /&gt;
  unsigned int inside = 0, total_inside = 0;&lt;br /&gt;
&lt;br /&gt;
  for (point=0; point&amp;lt;num_local_points; point++) {&lt;br /&gt;
      temp = (rand() % (rand_MAX+1));&lt;br /&gt;
      p_x = temp / rand_MAX;&lt;br /&gt;
      p_x = p_x / num_procs;&lt;br /&gt;
      &lt;br /&gt;
      temp2 = (float)id / num_procs;	// id belongs to 0, num_procs-1&lt;br /&gt;
      p_x += temp2;&lt;br /&gt;
      &lt;br /&gt;
      temp = (rand() % (rand_MAX+1));&lt;br /&gt;
      p_y = temp / rand_MAX;&lt;br /&gt;
      &lt;br /&gt;
      temp = (rand() % (rand_MAX+1));&lt;br /&gt;
      p_z = temp / rand_MAX;&lt;br /&gt;
&lt;br /&gt;
      // Compute the number of points residing inside of the 1/8 of the sphere&lt;br /&gt;
      result = p_x * p_x + p_y * p_y + p_z * p_z;&lt;br /&gt;
&lt;br /&gt;
      if (result &amp;lt;= 1) inside++;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  double elapsed = MPI_Wtime() - startprocess;&lt;br /&gt;
&lt;br /&gt;
  MPI_Reduce (&amp;amp;inside, &amp;amp;total_inside, 1, MPI_UNSIGNED, MPI_SUM, MASTER, MPI_COMM_WORLD);&lt;br /&gt;
&lt;br /&gt;
#if DEBUG &lt;br /&gt;
  printf (&amp;quot;rank %d counts %u points inside the spheren&amp;quot;, id, inside);&lt;br /&gt;
#endif&lt;br /&gt;
  if (id == MASTER) {&lt;br /&gt;
      double timeprocess[num_procs];&lt;br /&gt;
&lt;br /&gt;
      timeprocess[MASTER] = elapsed;&lt;br /&gt;
      printf(&amp;quot;Elapsed time from rank %d: %10.2f (sec) n&amp;quot;, MASTER, timeprocess[MASTER]);&lt;br /&gt;
      for (i=1; i&amp;lt;num_procs; i++) {&lt;br /&gt;
	  // Rank 0 waits for elapsed time value &lt;br /&gt;
	  MPI_Recv (&amp;amp;timeprocess[i], 1, MPI_DOUBLE, i, TAG_TIME, MPI_COMM_WORLD, &amp;amp;stat); &lt;br /&gt;
	  printf(&amp;quot;Elapsed time from rank %d: %10.2f (sec) n&amp;quot;, i, timeprocess[i]);&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
      temp = 6 * (float)total_inside;&lt;br /&gt;
      pi = temp / MAX_NUM_POINTS;   &lt;br /&gt;
      printf ( &amp;quot;Out of %u points, there are %u points inside the sphere =&amp;gt; pi=%16.12fn&amp;quot;,&lt;br /&gt;
          MAX_NUM_POINTS, total_inside, pi);&lt;br /&gt;
  }&lt;br /&gt;
  else {&lt;br /&gt;
      // Send back the processing time (in second)&lt;br /&gt;
      MPI_Send (&amp;amp;elapsed, 1, MPI_DOUBLE, MASTER, TAG_TIME, MPI_COMM_WORLD);&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  free(buff);&lt;br /&gt;
&lt;br /&gt;
  // Terminate MPI.&lt;br /&gt;
  MPI_Finalize();&lt;br /&gt;
  &lt;br /&gt;
  return 0;&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
= Hybrid Parallelization = &lt;br /&gt;
--&amp;gt;&lt;/div&gt;</summary>
		<author><name>R Rutka</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=JUSTUS2/Software/Schrodinger&amp;diff=3937</id>
		<title>JUSTUS2/Software/Schrodinger</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=JUSTUS2/Software/Schrodinger&amp;diff=3937"/>
		<updated>2016-03-14T09:23:47Z</updated>

		<summary type="html">&lt;p&gt;R Rutka: /* Versions and Availability */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!--{|  align=&amp;quot;right&amp;quot; {{Table|width=600px}}   --&amp;gt;&lt;br /&gt;
&amp;lt;!--{|{{Softwarebox}}--&amp;gt;&lt;br /&gt;
{| width=600px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot;  style=&amp;quot;text-align:center&amp;quot; | Schrödinger&lt;br /&gt;
|-&lt;br /&gt;
| module load&lt;br /&gt;
| chem/schrodinger&lt;br /&gt;
&amp;lt;!-- Neben CIS auch bereits über Kategorien  abgedeckt--&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Availability&lt;br /&gt;
| [[bwUniCluster]] &amp;amp;#124; [[BwForCluster_Chemistry]] &amp;amp;#124; bwGRiD Tuebingen&lt;br /&gt;
&amp;lt;!-- &lt;br /&gt;
[[bwForCluster ENM]],  [[bwForCluster MLS/WISO]],  [[bwForCluster Theochem]],  [[bwForCluster BinAC]]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| License&lt;br /&gt;
| commercial&lt;br /&gt;
|-&lt;br /&gt;
|Citing&lt;br /&gt;
| 5. See Schrodinger manual&lt;br /&gt;
|-&lt;br /&gt;
| Links&lt;br /&gt;
| [https://www.schrodinger.com Homepage] &amp;amp;#124; [http://www.schrodinger.com/supportdocs/18/  Documentation]&lt;br /&gt;
|-&lt;br /&gt;
| Graphical Interface&lt;br /&gt;
| Yes, Maestro, Desmond&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Description == &lt;br /&gt;
&#039;&#039;&#039;Schrödinger&#039;&#039;&#039; is a collection of software chemical or biochemical use. It offers various tools, like Maestro, that acts like an interface to all other schrödinger software and it is supposed to be used for material science, to investigate the structure, the reactivity and properties of chemical systems. Maestro is part of the Materials science suite.&lt;br /&gt;
&lt;br /&gt;
= Versions and Availability =&lt;br /&gt;
A list of versions currently available on all bwHPC-C5-Clusters can be obtained from the&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://cis-hpc.uni-konstanz.de Cluster Information System CIS]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/big&amp;gt;&lt;br /&gt;
{{#widget:Iframe&lt;br /&gt;
|url=https://cis-hpc.uni-konstanz.de/prod.cis/bwUniCluster/chem/schrodinger&lt;br /&gt;
|width=99%&lt;br /&gt;
|height=350&lt;br /&gt;
|border=0&lt;br /&gt;
}}&lt;br /&gt;
On the command line interface of any bwHPC cluster you&#039;ll get a list of available versions by using&lt;br /&gt;
the command&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;&#039;module avail chem/schrodinger&#039;&#039;&#039;&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
: UniCluster&lt;br /&gt;
$ module avail chem/schrodinger&lt;br /&gt;
------------------------ /opt/bwhpc/common/modulefiles -------------------------&lt;br /&gt;
chem/schrodinger/2014u1 chem/schrodinger/2015u3&lt;br /&gt;
chem/schrodinger/2014u2 chem/schrodinger/2015u4&lt;br /&gt;
: Justus&lt;br /&gt;
$ module avail chem/schrodinger&lt;br /&gt;
------------------------ /opt/bwhpc/common/modulefiles -------------------------&lt;br /&gt;
chem/schrodinger/2015u4&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;font color=red&amp;gt;The module is called &#039;&#039;&#039;&#039;schrodinger&#039;&#039;&#039;&#039; and &#039;&#039;&#039;not&#039;&#039;&#039; &#039;schoedinger&#039; or &#039;schrödinger&#039;!&amp;lt;/font&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= License and Registering =&lt;br /&gt;
Schrödinger, especially Maestro, is available after registering for academical use for no charge. Downloadable here: [https://www.schroedinger.com/downloadcenter/ Download Center]&amp;lt;br&amp;gt;&lt;br /&gt;
Your request will be verified and after that you can download Maestro for academical use. That will take about 48 hours.&lt;br /&gt;
&lt;br /&gt;
== Prerequirements ==&lt;br /&gt;
=== Requesting the License Key ===&lt;br /&gt;
After installing Maestro you need a license key which you can request from the „Competence Center for Bioinformatics“. Please contact &lt;br /&gt;
&lt;br /&gt;
==== Set environment variable for the license server ====&lt;br /&gt;
When you got the licence server information, set it as an environment variable, editing $LICENSE_SERVER$ in the following command.&lt;br /&gt;
&amp;lt;pre&amp;gt;export LM_LICENSE_FILE=$LICENSE_SERVER$&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On a Mac system you should additionally execute following tasks&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo vi /etc/launchd.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Insert: &amp;lt;pre&amp;gt;setenv LM_LICENSE_FILE $LICENSE_SERVER$&amp;lt;/pre&amp;gt; and save the file.&lt;br /&gt;
&lt;br /&gt;
Execute following command and start Maestro from Sportlight:&lt;br /&gt;
&amp;lt;pre&amp;gt;launchctl setenv LM_LICENSE_FILE $LICENSE_FILE$&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== bwGRiD/bwUni/JUSTUS specific installation ===&lt;br /&gt;
&lt;br /&gt;
Follow the instruction for your operating system.&lt;br /&gt;
&lt;br /&gt;
==== Linux/Mac ====&lt;br /&gt;
&lt;br /&gt;
Download [https://raw.githubusercontent.com/marekdynowski/bwSchrodingerHosts/master/post-install.sh this file] and open a terminal in the download folder. Make the bash-script executable&lt;br /&gt;
&amp;lt;pre&amp;gt;chmod u+x post-install.sh&amp;lt;/pre&amp;gt;&lt;br /&gt;
and execute it.&lt;br /&gt;
&amp;lt;pre&amp;gt;./post-install.sh&amp;lt;/pre&amp;gt;&lt;br /&gt;
You will be asked for the License Server, your usernames on the cluster and the schrodinger path/version.&lt;br /&gt;
&lt;br /&gt;
==== Windows ====&lt;br /&gt;
&lt;br /&gt;
$SCHRODINGER ist the path to your schrodinger installation.&lt;br /&gt;
Download [https://codeload.github.com/marekdynowski/MOAB-Schroedinger-Submitter/zip/master this zipfile], extract it and copy the MOAB folder to $SCHRODINGER/queues/.&lt;br /&gt;
&lt;br /&gt;
Download the [https://raw.githubusercontent.com/marekdynowski/bwSchrodingerHosts/master/schrodinger.hosts sample schrodinger.hosts]&lt;br /&gt;
and change the entries&lt;br /&gt;
* %LICENSE_SERVER% the address of the license server&lt;br /&gt;
* %USER_BWGRID% your username on the bwhpc cluster&lt;br /&gt;
* %USER_BWUNI% your username on the bwUni cluster&lt;br /&gt;
* %USER_BWJUSTUS% your username on the Justus cluster&lt;br /&gt;
* %SCHROD_VERSION% the schrodinger version (e.g. 2015u4)&lt;br /&gt;
You can delete sections of the schrodinger.hosts if you don&#039;t have an account on these clusters.&lt;br /&gt;
&lt;br /&gt;
Please execute these commands in your windows shell. (Close Schrodinger before executing these commands!)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd $SCHRODINGER/utilities&lt;br /&gt;
feature_flags.exe -d JOBCON_JSERVER_GO&lt;br /&gt;
jserver.exe -cleanall&lt;br /&gt;
jserver.exe -shutdown&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
=== Copy your public key ===&lt;br /&gt;
Maestro needs a passwordless login for submitting jobs on the cluster. &lt;br /&gt;
Login to the cluster and copy your public key of your host system from &amp;lt;tt&amp;gt;.ssh/id_rsa.pub&amp;lt;/tt&amp;gt; into &amp;lt;tt&amp;gt;.ssh/authorized_keys&amp;lt;/tt&amp;gt; file on the cluster.&lt;br /&gt;
&lt;br /&gt;
=== Using Maestro with the offered example ===&lt;br /&gt;
First start Maestro and choose the following menu items:&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Schrodinger-Usage01.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then load the molecularDynamicsExample.cms from your filesystem:&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Schrodinger-Usage02.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Choose your desired host and click &amp;quot;Run&amp;quot;.&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Schrodinger-Usage03.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Monitoring your Job ===&lt;br /&gt;
Maestro offers an job monitoring interface, which you can start in the left corner of the molecule window.&lt;br /&gt;
[[File:Schrodinger-Monitor01.jpg]]&lt;br /&gt;
Furthermore you are able to manipulate you job on the cluster.&lt;br /&gt;
&lt;br /&gt;
[[Category:Chemistry software]][[Category:bwUniCluster]][[Category:bwForCluster_Chemistry]]&lt;/div&gt;</summary>
		<author><name>R Rutka</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=JUSTUS2/Software/Schrodinger&amp;diff=3936</id>
		<title>JUSTUS2/Software/Schrodinger</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=JUSTUS2/Software/Schrodinger&amp;diff=3936"/>
		<updated>2016-03-14T09:02:01Z</updated>

		<summary type="html">&lt;p&gt;R Rutka: /* Versions and Availability */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!--{|  align=&amp;quot;right&amp;quot; {{Table|width=600px}}   --&amp;gt;&lt;br /&gt;
&amp;lt;!--{|{{Softwarebox}}--&amp;gt;&lt;br /&gt;
{| width=600px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot;  style=&amp;quot;text-align:center&amp;quot; | Schrödinger&lt;br /&gt;
|-&lt;br /&gt;
| module load&lt;br /&gt;
| chem/schrodinger&lt;br /&gt;
&amp;lt;!-- Neben CIS auch bereits über Kategorien  abgedeckt--&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Availability&lt;br /&gt;
| [[bwUniCluster]] &amp;amp;#124; [[BwForCluster_Chemistry]] &amp;amp;#124; bwGRiD Tuebingen&lt;br /&gt;
&amp;lt;!-- &lt;br /&gt;
[[bwForCluster ENM]],  [[bwForCluster MLS/WISO]],  [[bwForCluster Theochem]],  [[bwForCluster BinAC]]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| License&lt;br /&gt;
| commercial&lt;br /&gt;
|-&lt;br /&gt;
|Citing&lt;br /&gt;
| 5. See Schrodinger manual&lt;br /&gt;
|-&lt;br /&gt;
| Links&lt;br /&gt;
| [https://www.schrodinger.com Homepage] &amp;amp;#124; [http://www.schrodinger.com/supportdocs/18/  Documentation]&lt;br /&gt;
|-&lt;br /&gt;
| Graphical Interface&lt;br /&gt;
| Yes, Maestro, Desmond&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Description == &lt;br /&gt;
&#039;&#039;&#039;Schrödinger&#039;&#039;&#039; is a collection of software chemical or biochemical use. It offers various tools, like Maestro, that acts like an interface to all other schrödinger software and it is supposed to be used for material science, to investigate the structure, the reactivity and properties of chemical systems. Maestro is part of the Materials science suite.&lt;br /&gt;
&lt;br /&gt;
= Versions and Availability =&lt;br /&gt;
A list of versions currently available on all bwHPC-C5-Clusters can be obtained from the&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://cis-hpc.uni-konstanz.de Cluster Information System CIS]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/big&amp;gt;&lt;br /&gt;
{{#widget:Iframe&lt;br /&gt;
|url=https://cis-hpc.uni-konstanz.de/prod.cis/bwUniCluster/chem/schrodinger&lt;br /&gt;
|width=99%&lt;br /&gt;
|height=350&lt;br /&gt;
|border=0&lt;br /&gt;
}}&lt;br /&gt;
On the command line interface of any bwHPC cluster you&#039;ll get a list of available versions by using&lt;br /&gt;
the command&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;&#039;module avail chem/schrodinger&#039;&#039;&#039;&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
: UniCluster&lt;br /&gt;
$ module avail chem/schrodinger&lt;br /&gt;
------------------------ /opt/bwhpc/common/modulefiles -------------------------&lt;br /&gt;
chem/schrodinger/2014u1 chem/schrodinger/2015u3&lt;br /&gt;
chem/schrodinger/2014u2 chem/schrodinger/2015u4&lt;br /&gt;
: Justus&lt;br /&gt;
$ module avail chem/schrodinger&lt;br /&gt;
------------------------ /opt/bwhpc/common/modulefiles -------------------------&lt;br /&gt;
chem/schrodinger/2015u4&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= License and Registering =&lt;br /&gt;
Schrödinger, especially Maestro, is available after registering for academical use for no charge. Downloadable here: [https://www.schroedinger.com/downloadcenter/ Download Center]&amp;lt;br&amp;gt;&lt;br /&gt;
Your request will be verified and after that you can download Maestro for academical use. That will take about 48 hours.&lt;br /&gt;
&lt;br /&gt;
== Prerequirements ==&lt;br /&gt;
=== Requesting the License Key ===&lt;br /&gt;
After installing Maestro you need a license key which you can request from the „Competence Center for Bioinformatics“. Please contact &lt;br /&gt;
&lt;br /&gt;
==== Set environment variable for the license server ====&lt;br /&gt;
When you got the licence server information, set it as an environment variable, editing $LICENSE_SERVER$ in the following command.&lt;br /&gt;
&amp;lt;pre&amp;gt;export LM_LICENSE_FILE=$LICENSE_SERVER$&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On a Mac system you should additionally execute following tasks&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo vi /etc/launchd.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Insert: &amp;lt;pre&amp;gt;setenv LM_LICENSE_FILE $LICENSE_SERVER$&amp;lt;/pre&amp;gt; and save the file.&lt;br /&gt;
&lt;br /&gt;
Execute following command and start Maestro from Sportlight:&lt;br /&gt;
&amp;lt;pre&amp;gt;launchctl setenv LM_LICENSE_FILE $LICENSE_FILE$&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== bwGRiD/bwUni/JUSTUS specific installation ===&lt;br /&gt;
&lt;br /&gt;
Follow the instruction for your operating system.&lt;br /&gt;
&lt;br /&gt;
==== Linux/Mac ====&lt;br /&gt;
&lt;br /&gt;
Download [https://raw.githubusercontent.com/marekdynowski/bwSchrodingerHosts/master/post-install.sh this file] and open a terminal in the download folder. Make the bash-script executable&lt;br /&gt;
&amp;lt;pre&amp;gt;chmod u+x post-install.sh&amp;lt;/pre&amp;gt;&lt;br /&gt;
and execute it.&lt;br /&gt;
&amp;lt;pre&amp;gt;./post-install.sh&amp;lt;/pre&amp;gt;&lt;br /&gt;
You will be asked for the License Server, your usernames on the cluster and the schrodinger path/version.&lt;br /&gt;
&lt;br /&gt;
==== Windows ====&lt;br /&gt;
&lt;br /&gt;
$SCHRODINGER ist the path to your schrodinger installation.&lt;br /&gt;
Download [https://codeload.github.com/marekdynowski/MOAB-Schroedinger-Submitter/zip/master this zipfile], extract it and copy the MOAB folder to $SCHRODINGER/queues/.&lt;br /&gt;
&lt;br /&gt;
Download the [https://raw.githubusercontent.com/marekdynowski/bwSchrodingerHosts/master/schrodinger.hosts sample schrodinger.hosts]&lt;br /&gt;
and change the entries&lt;br /&gt;
* %LICENSE_SERVER% the address of the license server&lt;br /&gt;
* %USER_BWGRID% your username on the bwhpc cluster&lt;br /&gt;
* %USER_BWUNI% your username on the bwUni cluster&lt;br /&gt;
* %USER_BWJUSTUS% your username on the Justus cluster&lt;br /&gt;
* %SCHROD_VERSION% the schrodinger version (e.g. 2015u4)&lt;br /&gt;
You can delete sections of the schrodinger.hosts if you don&#039;t have an account on these clusters.&lt;br /&gt;
&lt;br /&gt;
Please execute these commands in your windows shell. (Close Schrodinger before executing these commands!)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd $SCHRODINGER/utilities&lt;br /&gt;
feature_flags.exe -d JOBCON_JSERVER_GO&lt;br /&gt;
jserver.exe -cleanall&lt;br /&gt;
jserver.exe -shutdown&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
=== Copy your public key ===&lt;br /&gt;
Maestro needs a passwordless login for submitting jobs on the cluster. &lt;br /&gt;
Login to the cluster and copy your public key of your host system from &amp;lt;tt&amp;gt;.ssh/id_rsa.pub&amp;lt;/tt&amp;gt; into &amp;lt;tt&amp;gt;.ssh/authorized_keys&amp;lt;/tt&amp;gt; file on the cluster.&lt;br /&gt;
&lt;br /&gt;
=== Using Maestro with the offered example ===&lt;br /&gt;
First start Maestro and choose the following menu items:&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Schrodinger-Usage01.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then load the molecularDynamicsExample.cms from your filesystem:&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Schrodinger-Usage02.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Choose your desired host and click &amp;quot;Run&amp;quot;.&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Schrodinger-Usage03.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Monitoring your Job ===&lt;br /&gt;
Maestro offers an job monitoring interface, which you can start in the left corner of the molecule window.&lt;br /&gt;
[[File:Schrodinger-Monitor01.jpg]]&lt;br /&gt;
Furthermore you are able to manipulate you job on the cluster.&lt;br /&gt;
&lt;br /&gt;
[[Category:Chemistry software]][[Category:bwUniCluster]][[Category:bwForCluster_Chemistry]]&lt;/div&gt;</summary>
		<author><name>R Rutka</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=JUSTUS2/Software/Schrodinger&amp;diff=3935</id>
		<title>JUSTUS2/Software/Schrodinger</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=JUSTUS2/Software/Schrodinger&amp;diff=3935"/>
		<updated>2016-03-14T08:44:13Z</updated>

		<summary type="html">&lt;p&gt;R Rutka: /* Using Maestro with the offered example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!--{|  align=&amp;quot;right&amp;quot; {{Table|width=600px}}   --&amp;gt;&lt;br /&gt;
&amp;lt;!--{|{{Softwarebox}}--&amp;gt;&lt;br /&gt;
{| width=600px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot;  style=&amp;quot;text-align:center&amp;quot; | Schrödinger&lt;br /&gt;
|-&lt;br /&gt;
| module load&lt;br /&gt;
| chem/schrodinger&lt;br /&gt;
&amp;lt;!-- Neben CIS auch bereits über Kategorien  abgedeckt--&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Availability&lt;br /&gt;
| [[bwUniCluster]] &amp;amp;#124; [[BwForCluster_Chemistry]] &amp;amp;#124; bwGRiD Tuebingen&lt;br /&gt;
&amp;lt;!-- &lt;br /&gt;
[[bwForCluster ENM]],  [[bwForCluster MLS/WISO]],  [[bwForCluster Theochem]],  [[bwForCluster BinAC]]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| License&lt;br /&gt;
| commercial&lt;br /&gt;
|-&lt;br /&gt;
|Citing&lt;br /&gt;
| 5. See Schrodinger manual&lt;br /&gt;
|-&lt;br /&gt;
| Links&lt;br /&gt;
| [https://www.schrodinger.com Homepage] &amp;amp;#124; [http://www.schrodinger.com/supportdocs/18/  Documentation]&lt;br /&gt;
|-&lt;br /&gt;
| Graphical Interface&lt;br /&gt;
| Yes, Maestro, Desmond&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Description == &lt;br /&gt;
&#039;&#039;&#039;Schrödinger&#039;&#039;&#039; is a collection of software chemical or biochemical use. It offers various tools, like Maestro, that acts like an interface to all other schrödinger software and it is supposed to be used for material science, to investigate the structure, the reactivity and properties of chemical systems. Maestro is part of the Materials science suite.&lt;br /&gt;
&lt;br /&gt;
= Versions and Availability =&lt;br /&gt;
A list of versions currently available on all bwHPC-C5-Clusters can be obtained from the&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://cis-hpc.uni-konstanz.de Cluster Information System CIS]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/big&amp;gt;&lt;br /&gt;
{{#widget:Iframe&lt;br /&gt;
|url=https://cis-hpc.uni-konstanz.de/prod.cis/bwUniCluster/chem/schrodinger&lt;br /&gt;
|width=99%&lt;br /&gt;
|height=330&lt;br /&gt;
|border=0&lt;br /&gt;
}}&lt;br /&gt;
On the command line interface of any bwHPC cluster you&#039;ll get a list of available versions by using&lt;br /&gt;
the command&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;&#039;module avail chem/schrodinger&#039;&#039;&#039;&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
: UniCluster&lt;br /&gt;
$ module avail chem/schrodinger&lt;br /&gt;
------------------------ /opt/bwhpc/common/modulefiles -------------------------&lt;br /&gt;
chem/schrodinger/2014u1 chem/schrodinger/2015u3&lt;br /&gt;
chem/schrodinger/2014u2 chem/schrodinger/2015u4&lt;br /&gt;
: Justus&lt;br /&gt;
$ module avail chem/schrodinger&lt;br /&gt;
------------------------ /opt/bwhpc/common/modulefiles -------------------------&lt;br /&gt;
chem/schrodinger/2015u4&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= License and Registering =&lt;br /&gt;
Schrödinger, especially Maestro, is available after registering for academical use for no charge. Downloadable here: [https://www.schroedinger.com/downloadcenter/ Download Center]&amp;lt;br&amp;gt;&lt;br /&gt;
Your request will be verified and after that you can download Maestro for academical use. That will take about 48 hours.&lt;br /&gt;
&lt;br /&gt;
== Prerequirements ==&lt;br /&gt;
=== Requesting the License Key ===&lt;br /&gt;
After installing Maestro you need a license key which you can request from the „Competence Center for Bioinformatics“. Please contact &lt;br /&gt;
&lt;br /&gt;
==== Set environment variable for the license server ====&lt;br /&gt;
When you got the licence server information, set it as an environment variable, editing $LICENSE_SERVER$ in the following command.&lt;br /&gt;
&amp;lt;pre&amp;gt;export LM_LICENSE_FILE=$LICENSE_SERVER$&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On a Mac system you should additionally execute following tasks&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo vi /etc/launchd.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Insert: &amp;lt;pre&amp;gt;setenv LM_LICENSE_FILE $LICENSE_SERVER$&amp;lt;/pre&amp;gt; and save the file.&lt;br /&gt;
&lt;br /&gt;
Execute following command and start Maestro from Sportlight:&lt;br /&gt;
&amp;lt;pre&amp;gt;launchctl setenv LM_LICENSE_FILE $LICENSE_FILE$&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== bwGRiD/bwUni/JUSTUS specific installation ===&lt;br /&gt;
&lt;br /&gt;
Follow the instruction for your operating system.&lt;br /&gt;
&lt;br /&gt;
==== Linux/Mac ====&lt;br /&gt;
&lt;br /&gt;
Download [https://raw.githubusercontent.com/marekdynowski/bwSchrodingerHosts/master/post-install.sh this file] and open a terminal in the download folder. Make the bash-script executable&lt;br /&gt;
&amp;lt;pre&amp;gt;chmod u+x post-install.sh&amp;lt;/pre&amp;gt;&lt;br /&gt;
and execute it.&lt;br /&gt;
&amp;lt;pre&amp;gt;./post-install.sh&amp;lt;/pre&amp;gt;&lt;br /&gt;
You will be asked for the License Server, your usernames on the cluster and the schrodinger path/version.&lt;br /&gt;
&lt;br /&gt;
==== Windows ====&lt;br /&gt;
&lt;br /&gt;
$SCHRODINGER ist the path to your schrodinger installation.&lt;br /&gt;
Download [https://codeload.github.com/marekdynowski/MOAB-Schroedinger-Submitter/zip/master this zipfile], extract it and copy the MOAB folder to $SCHRODINGER/queues/.&lt;br /&gt;
&lt;br /&gt;
Download the [https://raw.githubusercontent.com/marekdynowski/bwSchrodingerHosts/master/schrodinger.hosts sample schrodinger.hosts]&lt;br /&gt;
and change the entries&lt;br /&gt;
* %LICENSE_SERVER% the address of the license server&lt;br /&gt;
* %USER_BWGRID% your username on the bwhpc cluster&lt;br /&gt;
* %USER_BWUNI% your username on the bwUni cluster&lt;br /&gt;
* %USER_BWJUSTUS% your username on the Justus cluster&lt;br /&gt;
* %SCHROD_VERSION% the schrodinger version (e.g. 2015u4)&lt;br /&gt;
You can delete sections of the schrodinger.hosts if you don&#039;t have an account on these clusters.&lt;br /&gt;
&lt;br /&gt;
Please execute these commands in your windows shell. (Close Schrodinger before executing these commands!)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd $SCHRODINGER/utilities&lt;br /&gt;
feature_flags.exe -d JOBCON_JSERVER_GO&lt;br /&gt;
jserver.exe -cleanall&lt;br /&gt;
jserver.exe -shutdown&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
=== Copy your public key ===&lt;br /&gt;
Maestro needs a passwordless login for submitting jobs on the cluster. &lt;br /&gt;
Login to the cluster and copy your public key of your host system from &amp;lt;tt&amp;gt;.ssh/id_rsa.pub&amp;lt;/tt&amp;gt; into &amp;lt;tt&amp;gt;.ssh/authorized_keys&amp;lt;/tt&amp;gt; file on the cluster.&lt;br /&gt;
&lt;br /&gt;
=== Using Maestro with the offered example ===&lt;br /&gt;
First start Maestro and choose the following menu items:&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Schrodinger-Usage01.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then load the molecularDynamicsExample.cms from your filesystem:&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Schrodinger-Usage02.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Choose your desired host and click &amp;quot;Run&amp;quot;.&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Schrodinger-Usage03.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Monitoring your Job ===&lt;br /&gt;
Maestro offers an job monitoring interface, which you can start in the left corner of the molecule window.&lt;br /&gt;
[[File:Schrodinger-Monitor01.jpg]]&lt;br /&gt;
Furthermore you are able to manipulate you job on the cluster.&lt;br /&gt;
&lt;br /&gt;
[[Category:Chemistry software]][[Category:bwUniCluster]][[Category:bwForCluster_Chemistry]]&lt;/div&gt;</summary>
		<author><name>R Rutka</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=JUSTUS2/Software/Schrodinger&amp;diff=3934</id>
		<title>JUSTUS2/Software/Schrodinger</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=JUSTUS2/Software/Schrodinger&amp;diff=3934"/>
		<updated>2016-03-14T08:43:22Z</updated>

		<summary type="html">&lt;p&gt;R Rutka: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!--{|  align=&amp;quot;right&amp;quot; {{Table|width=600px}}   --&amp;gt;&lt;br /&gt;
&amp;lt;!--{|{{Softwarebox}}--&amp;gt;&lt;br /&gt;
{| width=600px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot;  style=&amp;quot;text-align:center&amp;quot; | Schrödinger&lt;br /&gt;
|-&lt;br /&gt;
| module load&lt;br /&gt;
| chem/schrodinger&lt;br /&gt;
&amp;lt;!-- Neben CIS auch bereits über Kategorien  abgedeckt--&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Availability&lt;br /&gt;
| [[bwUniCluster]] &amp;amp;#124; [[BwForCluster_Chemistry]] &amp;amp;#124; bwGRiD Tuebingen&lt;br /&gt;
&amp;lt;!-- &lt;br /&gt;
[[bwForCluster ENM]],  [[bwForCluster MLS/WISO]],  [[bwForCluster Theochem]],  [[bwForCluster BinAC]]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| License&lt;br /&gt;
| commercial&lt;br /&gt;
|-&lt;br /&gt;
|Citing&lt;br /&gt;
| 5. See Schrodinger manual&lt;br /&gt;
|-&lt;br /&gt;
| Links&lt;br /&gt;
| [https://www.schrodinger.com Homepage] &amp;amp;#124; [http://www.schrodinger.com/supportdocs/18/  Documentation]&lt;br /&gt;
|-&lt;br /&gt;
| Graphical Interface&lt;br /&gt;
| Yes, Maestro, Desmond&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Description == &lt;br /&gt;
&#039;&#039;&#039;Schrödinger&#039;&#039;&#039; is a collection of software chemical or biochemical use. It offers various tools, like Maestro, that acts like an interface to all other schrödinger software and it is supposed to be used for material science, to investigate the structure, the reactivity and properties of chemical systems. Maestro is part of the Materials science suite.&lt;br /&gt;
&lt;br /&gt;
= Versions and Availability =&lt;br /&gt;
A list of versions currently available on all bwHPC-C5-Clusters can be obtained from the&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://cis-hpc.uni-konstanz.de Cluster Information System CIS]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/big&amp;gt;&lt;br /&gt;
{{#widget:Iframe&lt;br /&gt;
|url=https://cis-hpc.uni-konstanz.de/prod.cis/bwUniCluster/chem/schrodinger&lt;br /&gt;
|width=99%&lt;br /&gt;
|height=330&lt;br /&gt;
|border=0&lt;br /&gt;
}}&lt;br /&gt;
On the command line interface of any bwHPC cluster you&#039;ll get a list of available versions by using&lt;br /&gt;
the command&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;&#039;module avail chem/schrodinger&#039;&#039;&#039;&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
: UniCluster&lt;br /&gt;
$ module avail chem/schrodinger&lt;br /&gt;
------------------------ /opt/bwhpc/common/modulefiles -------------------------&lt;br /&gt;
chem/schrodinger/2014u1 chem/schrodinger/2015u3&lt;br /&gt;
chem/schrodinger/2014u2 chem/schrodinger/2015u4&lt;br /&gt;
: Justus&lt;br /&gt;
$ module avail chem/schrodinger&lt;br /&gt;
------------------------ /opt/bwhpc/common/modulefiles -------------------------&lt;br /&gt;
chem/schrodinger/2015u4&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= License and Registering =&lt;br /&gt;
Schrödinger, especially Maestro, is available after registering for academical use for no charge. Downloadable here: [https://www.schroedinger.com/downloadcenter/ Download Center]&amp;lt;br&amp;gt;&lt;br /&gt;
Your request will be verified and after that you can download Maestro for academical use. That will take about 48 hours.&lt;br /&gt;
&lt;br /&gt;
== Prerequirements ==&lt;br /&gt;
=== Requesting the License Key ===&lt;br /&gt;
After installing Maestro you need a license key which you can request from the „Competence Center for Bioinformatics“. Please contact &lt;br /&gt;
&lt;br /&gt;
==== Set environment variable for the license server ====&lt;br /&gt;
When you got the licence server information, set it as an environment variable, editing $LICENSE_SERVER$ in the following command.&lt;br /&gt;
&amp;lt;pre&amp;gt;export LM_LICENSE_FILE=$LICENSE_SERVER$&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On a Mac system you should additionally execute following tasks&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo vi /etc/launchd.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Insert: &amp;lt;pre&amp;gt;setenv LM_LICENSE_FILE $LICENSE_SERVER$&amp;lt;/pre&amp;gt; and save the file.&lt;br /&gt;
&lt;br /&gt;
Execute following command and start Maestro from Sportlight:&lt;br /&gt;
&amp;lt;pre&amp;gt;launchctl setenv LM_LICENSE_FILE $LICENSE_FILE$&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== bwGRiD/bwUni/JUSTUS specific installation ===&lt;br /&gt;
&lt;br /&gt;
Follow the instruction for your operating system.&lt;br /&gt;
&lt;br /&gt;
==== Linux/Mac ====&lt;br /&gt;
&lt;br /&gt;
Download [https://raw.githubusercontent.com/marekdynowski/bwSchrodingerHosts/master/post-install.sh this file] and open a terminal in the download folder. Make the bash-script executable&lt;br /&gt;
&amp;lt;pre&amp;gt;chmod u+x post-install.sh&amp;lt;/pre&amp;gt;&lt;br /&gt;
and execute it.&lt;br /&gt;
&amp;lt;pre&amp;gt;./post-install.sh&amp;lt;/pre&amp;gt;&lt;br /&gt;
You will be asked for the License Server, your usernames on the cluster and the schrodinger path/version.&lt;br /&gt;
&lt;br /&gt;
==== Windows ====&lt;br /&gt;
&lt;br /&gt;
$SCHRODINGER ist the path to your schrodinger installation.&lt;br /&gt;
Download [https://codeload.github.com/marekdynowski/MOAB-Schroedinger-Submitter/zip/master this zipfile], extract it and copy the MOAB folder to $SCHRODINGER/queues/.&lt;br /&gt;
&lt;br /&gt;
Download the [https://raw.githubusercontent.com/marekdynowski/bwSchrodingerHosts/master/schrodinger.hosts sample schrodinger.hosts]&lt;br /&gt;
and change the entries&lt;br /&gt;
* %LICENSE_SERVER% the address of the license server&lt;br /&gt;
* %USER_BWGRID% your username on the bwhpc cluster&lt;br /&gt;
* %USER_BWUNI% your username on the bwUni cluster&lt;br /&gt;
* %USER_BWJUSTUS% your username on the Justus cluster&lt;br /&gt;
* %SCHROD_VERSION% the schrodinger version (e.g. 2015u4)&lt;br /&gt;
You can delete sections of the schrodinger.hosts if you don&#039;t have an account on these clusters.&lt;br /&gt;
&lt;br /&gt;
Please execute these commands in your windows shell. (Close Schrodinger before executing these commands!)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd $SCHRODINGER/utilities&lt;br /&gt;
feature_flags.exe -d JOBCON_JSERVER_GO&lt;br /&gt;
jserver.exe -cleanall&lt;br /&gt;
jserver.exe -shutdown&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
=== Copy your public key ===&lt;br /&gt;
Maestro needs a passwordless login for submitting jobs on the cluster. &lt;br /&gt;
Login to the cluster and copy your public key of your host system from &amp;lt;tt&amp;gt;.ssh/id_rsa.pub&amp;lt;/tt&amp;gt; into &amp;lt;tt&amp;gt;.ssh/authorized_keys&amp;lt;/tt&amp;gt; file on the cluster.&lt;br /&gt;
&lt;br /&gt;
=== Using Maestro with the offered example ===&lt;br /&gt;
First start Maestro and choose the following menu items:&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Schrodinger-Usage01.jpg|200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then load the molecularDynamicsExample.cms from your filesystem:&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Schrodinger-Usage02.jpg|200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Choose your desired host and click &amp;quot;Run&amp;quot;.&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Schrodinger-Usage03.jpg|200px]]&lt;br /&gt;
&lt;br /&gt;
=== Monitoring your Job ===&lt;br /&gt;
Maestro offers an job monitoring interface, which you can start in the left corner of the molecule window.&lt;br /&gt;
[[File:Schrodinger-Monitor01.jpg]]&lt;br /&gt;
Furthermore you are able to manipulate you job on the cluster.&lt;br /&gt;
&lt;br /&gt;
[[Category:Chemistry software]][[Category:bwUniCluster]][[Category:bwForCluster_Chemistry]]&lt;/div&gt;</summary>
		<author><name>R Rutka</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=JUSTUS2/Software/Schrodinger&amp;diff=3933</id>
		<title>JUSTUS2/Software/Schrodinger</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=JUSTUS2/Software/Schrodinger&amp;diff=3933"/>
		<updated>2016-03-14T08:42:45Z</updated>

		<summary type="html">&lt;p&gt;R Rutka: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!--{|  align=&amp;quot;right&amp;quot; {{Table|width=600px}}   --&amp;gt;&lt;br /&gt;
&amp;lt;!--{|{{Softwarebox}}--&amp;gt;&lt;br /&gt;
{| width=600px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot;  style=&amp;quot;text-align:center&amp;quot; | Schrödinger&lt;br /&gt;
|-&lt;br /&gt;
| module load&lt;br /&gt;
| chem/schrodinger&lt;br /&gt;
&amp;lt;!-- Neben CIS auch bereits über Kategorien  abgedeckt--&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Availability&lt;br /&gt;
| [[bwUniCluster]] &amp;amp;#124; [[BwForCluster_Chemistry]] &amp;amp;#124; bwGRiD Tuebingen&lt;br /&gt;
&amp;lt;!-- &lt;br /&gt;
[[bwForCluster ENM]],  [[bwForCluster MLS/WISO]],  [[bwForCluster Theochem]],  [[bwForCluster BinAC]]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| License&lt;br /&gt;
| commercial&lt;br /&gt;
|-&lt;br /&gt;
|Citing&lt;br /&gt;
| 5. See Schrodinger manual&lt;br /&gt;
|-&lt;br /&gt;
| Links&lt;br /&gt;
| [https://www.schrodinger.com Homepage] &amp;amp;#124; [http://www.schrodinger.com/supportdocs/18/  Documentation]&lt;br /&gt;
|-&lt;br /&gt;
| Graphical Interface&lt;br /&gt;
| Yes, Maestro, Desmond&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Description == &lt;br /&gt;
&#039;&#039;&#039;Schrödinger&#039;&#039;&#039; is a collection of software chemical or biochemical use. It offers various tools, like Maestro, that acts like an interface to all other schrödinger software and it is supposed to be used for material science, to investigate the structure, the reactivity and properties of chemical systems. Maestro is part of the Materials science suite.&lt;br /&gt;
&lt;br /&gt;
= Versions and Availability =&lt;br /&gt;
A list of versions currently available on all bwHPC-C5-Clusters can be obtained from the&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://cis-hpc.uni-konstanz.de Cluster Information System CIS]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/big&amp;gt;&lt;br /&gt;
{{#widget:Iframe&lt;br /&gt;
|url=https://cis-hpc.uni-konstanz.de/prod.cis/bwUniCluster/chem/schrodinger&lt;br /&gt;
|width=99%&lt;br /&gt;
|height=330&lt;br /&gt;
|border=0&lt;br /&gt;
}}&lt;br /&gt;
On the command line interface of any bwHPC cluster you&#039;ll get a list of available versions by using&lt;br /&gt;
the command&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;&#039;module avail chem/schrodinger&#039;&#039;&#039;&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
: UniCluster&lt;br /&gt;
$ module avail chem/schrodinger&lt;br /&gt;
------------------------ /opt/bwhpc/common/modulefiles -------------------------&lt;br /&gt;
chem/schrodinger/2014u1 chem/schrodinger/2015u3&lt;br /&gt;
chem/schrodinger/2014u2 chem/schrodinger/2015u4&lt;br /&gt;
: Justus&lt;br /&gt;
$ module avail chem/schrodinger&lt;br /&gt;
------------------------ /opt/bwhpc/common/modulefiles -------------------------&lt;br /&gt;
chem/schrodinger/2015u4&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= License and Registering =&lt;br /&gt;
Schrödinger, especially Maestro, is available after registering for academical use for no charge. Downloadable here: [https://www.schroedinger.com/downloadcenter/ Download Center]&amp;lt;br&amp;gt;&lt;br /&gt;
Your request will be verified and after that you can download Maestro for academical use. That will take about 48 hours.&lt;br /&gt;
&lt;br /&gt;
== Prerequirements ==&lt;br /&gt;
=== Requesting the License Key ===&lt;br /&gt;
After installing Maestro you need a license key which you can request from the „Competence Center for Bioinformatics“. Please contact &lt;br /&gt;
&lt;br /&gt;
==== Set environment variable for the license server ====&lt;br /&gt;
When you got the licence server information, set it as an environment variable, editing $LICENSE_SERVER$ in the following command.&lt;br /&gt;
&amp;lt;pre&amp;gt;export LM_LICENSE_FILE=$LICENSE_SERVER$&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On a Mac system you should additionally execute following tasks&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo vi /etc/launchd.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Insert: &amp;lt;pre&amp;gt;setenv LM_LICENSE_FILE $LICENSE_SERVER$&amp;lt;/pre&amp;gt; and save the file.&lt;br /&gt;
&lt;br /&gt;
Execute following command and start Maestro from Sportlight:&lt;br /&gt;
&amp;lt;pre&amp;gt;launchctl setenv LM_LICENSE_FILE $LICENSE_FILE$&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== bwGRiD/bwUni/JUSTUS specific installation ===&lt;br /&gt;
&lt;br /&gt;
Follow the instruction for your operating system.&lt;br /&gt;
&lt;br /&gt;
==== Linux/Mac ====&lt;br /&gt;
&lt;br /&gt;
Download [https://raw.githubusercontent.com/marekdynowski/bwSchrodingerHosts/master/post-install.sh this file] and open a terminal in the download folder. Make the bash-script executable&lt;br /&gt;
&amp;lt;pre&amp;gt;chmod u+x post-install.sh&amp;lt;/pre&amp;gt;&lt;br /&gt;
and execute it.&lt;br /&gt;
&amp;lt;pre&amp;gt;./post-install.sh&amp;lt;/pre&amp;gt;&lt;br /&gt;
You will be asked for the License Server, your usernames on the cluster and the schrodinger path/version.&lt;br /&gt;
&lt;br /&gt;
==== Windows ====&lt;br /&gt;
&lt;br /&gt;
$SCHRODINGER ist the path to your schrodinger installation.&lt;br /&gt;
Download [https://codeload.github.com/marekdynowski/MOAB-Schroedinger-Submitter/zip/master this zipfile], extract it and copy the MOAB folder to $SCHRODINGER/queues/.&lt;br /&gt;
&lt;br /&gt;
Download the [https://raw.githubusercontent.com/marekdynowski/bwSchrodingerHosts/master/schrodinger.hosts sample schrodinger.hosts]&lt;br /&gt;
and change the entries&lt;br /&gt;
* %LICENSE_SERVER% the address of the license server&lt;br /&gt;
* %USER_BWGRID% your username on the bwhpc cluster&lt;br /&gt;
* %USER_BWUNI% your username on the bwUni cluster&lt;br /&gt;
* %USER_BWJUSTUS% your username on the Justus cluster&lt;br /&gt;
* %SCHROD_VERSION% the schrodinger version (e.g. 2015u4)&lt;br /&gt;
You can delete sections of the schrodinger.hosts if you don&#039;t have an account on these clusters.&lt;br /&gt;
&lt;br /&gt;
Please execute these commands in your windows shell. (Close Schrodinger before executing these commands!)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd $SCHRODINGER/utilities&lt;br /&gt;
feature_flags.exe -d JOBCON_JSERVER_GO&lt;br /&gt;
jserver.exe -cleanall&lt;br /&gt;
jserver.exe -shutdown&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
=== Copy your public key ===&lt;br /&gt;
Maestro needs a passwordless login for submitting jobs on the cluster. &lt;br /&gt;
Login to the cluster and copy your public key of your host system from &amp;lt;tt&amp;gt;.ssh/id_rsa.pub&amp;lt;/tt&amp;gt; into &amp;lt;tt&amp;gt;.ssh/authorized_keys&amp;lt;/tt&amp;gt; file on the cluster.&lt;br /&gt;
&lt;br /&gt;
=== Using Maestro with the offered example ===&lt;br /&gt;
First start Maestro and choose the following menu items:&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Schrodinger-Usage01.jpg|200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then load the molecularDynamicsExample.cms from your filesystem:&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Schrodinger-Usage02.jpg|200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Choose your desired host and click &amp;quot;Run&amp;quot;.&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Schrodinger-Usage03.jpg|200px]]&lt;br /&gt;
&lt;br /&gt;
=== Monitoring you job ===&lt;br /&gt;
Maestro offers an job monitoring interface, which you can start in the left corner of the molecule window.&lt;br /&gt;
[[File:Schrodinger-Monitor01.jpg]]&lt;br /&gt;
Furthermore you are able to manipulate you job on the cluster.&lt;br /&gt;
&lt;br /&gt;
[[Category:Chemistry software]][[Category:bwUniCluster]][[Category:bwForCluster_Chemistry]]&lt;/div&gt;</summary>
		<author><name>R Rutka</name></author>
	</entry>
</feed>