<?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=F+Wagner</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=F+Wagner"/>
	<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/e/Special:Contributions/F_Wagner"/>
	<updated>2026-05-20T07:22:52Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.17</generator>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=JUSTUS2/Software/Singularity&amp;diff=10355</id>
		<title>JUSTUS2/Software/Singularity</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=JUSTUS2/Software/Singularity&amp;diff=10355"/>
		<updated>2022-05-14T13:00:05Z</updated>

		<summary type="html">&lt;p&gt;F Wagner: /* NGC environment modules on JUSTUS 2 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=760px 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;
| system/singularity&lt;br /&gt;
|-&lt;br /&gt;
| License&lt;br /&gt;
| Open-source software, distributed under the 3-clause BSD License. [[#License|More...]]&lt;br /&gt;
|-&lt;br /&gt;
| Citing&lt;br /&gt;
| ---&lt;br /&gt;
|-&lt;br /&gt;
| Links&lt;br /&gt;
| [https://sylabs.io/singularity/ Homepage] &amp;amp;#124; [https://sylabs.io/docs/ Documentation]&lt;br /&gt;
|-&lt;br /&gt;
| Graphical Interface&lt;br /&gt;
| No&lt;br /&gt;
|}&lt;br /&gt;
= Description =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Singularity&#039;&#039;&#039; is a container platform.&lt;br /&gt;
&lt;br /&gt;
= License =&lt;br /&gt;
&lt;br /&gt;
Singularity is free, open-source software released under the 3-clause BSD license. Please read the [https://sylabs.io/guides/3.7/user-guide/license.html license] for additional information about Singularity.&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 Singularity with the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load system/singularity&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you wish to load another (older) version of Singularity, you can do so using&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load system/singularity/&amp;lt;version&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
with &amp;lt;version&amp;gt; specifying the desired version.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=red&amp;gt;Important: On JUSTUS 2, Singularity is available on all compute nodes. You do not have to load a module.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Program Binaries ==&lt;br /&gt;
&lt;br /&gt;
The binary &#039;&#039;singularity&#039;&#039; is main program of the container platform.&lt;br /&gt;
&lt;br /&gt;
To get help using Singularity execute the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ singularity --help&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Furthermore, a man page is available and can be accessed by typing:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ man singularity&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For additional information about how to use Singularity, please consult the [https://sylabs.io/docs/ documentation].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=red&amp;gt;Important: On JUSTUS 2, Singularity is only available on compute nodes. You must switch to such a node to invoke any &#039;&#039;singularity&#039;&#039; commands.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Batch jobs with containers ==&lt;br /&gt;
&lt;br /&gt;
Batch jobs utilizing Singularity containers are generally built the same way as all other [https://wiki.bwhpc.de/e/BwForCluster_JUSTUS_2_Slurm_HOWTO#How_to_submit_a_batch_job.3F batch jobs], where the job script contains &#039;&#039;singularity&#039;&#039; commands. For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
# Allocate one node&lt;br /&gt;
#SBATCH --nodes=1&lt;br /&gt;
# Number of program instances to be executed&lt;br /&gt;
#SBATCH --tasks-per-node=4&lt;br /&gt;
# 8 GB memory required per node&lt;br /&gt;
#SBATCH --mem=16G&lt;br /&gt;
# Maximum run time of job&lt;br /&gt;
#SBATCH --time=1:00:00&lt;br /&gt;
# Give job a reasonable name&lt;br /&gt;
#SBATCH --job-name=Singularity&lt;br /&gt;
# File name for standard output (%j will be replaced by job id)&lt;br /&gt;
#SBATCH --output=singularity_job-%j.out&lt;br /&gt;
# File name for error output&lt;br /&gt;
#SBATCH --error=singularity_job-%j.err&lt;br /&gt;
&lt;br /&gt;
module load your/singularity/version #(not needed on JUSTUS 2, but could be necessary on other system)&lt;br /&gt;
&lt;br /&gt;
cd your/workspace&lt;br /&gt;
&lt;br /&gt;
# Run container (two options to start a container)&lt;br /&gt;
singularity run [options] &amp;lt;container&amp;gt;&lt;br /&gt;
singularity exec [options] &amp;lt;container&amp;gt; &amp;lt;command&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=red&amp;gt;Keep in mind that other modules you may have loaded will not be available inside the container.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Using GPUs ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
[…]&lt;br /&gt;
# Allocate one GPU per node&lt;br /&gt;
#SBATCH --partition=gpu&lt;br /&gt;
#SBATCH --gres=gpu:1&lt;br /&gt;
[…]&lt;br /&gt;
&lt;br /&gt;
module load your/singularity/version #(not needed on JUSTUS 2, but could be necessary on other system)&lt;br /&gt;
&lt;br /&gt;
cd your/workspace&lt;br /&gt;
&lt;br /&gt;
# Run container (two options to start a container)&lt;br /&gt;
singularity run --nv [options] &amp;lt;container&amp;gt;&lt;br /&gt;
singularity exec --nv [options] &amp;lt;container&amp;gt; &amp;lt;command&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using the flag is advisable, but may be omitted if the correct GPU- and driver-APIs are available on the container.&lt;br /&gt;
&lt;br /&gt;
= Examples =&lt;br /&gt;
&lt;br /&gt;
== Run your first container on JUSTUS 2 ==&lt;br /&gt;
&lt;br /&gt;
Build a TensorFlow container with Singularity and execute a Python command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# request interactive node with GPUs&lt;br /&gt;
$ srun --nodes=1 --exclusive --gres=gpu:2 --pty bash&lt;br /&gt;
&lt;br /&gt;
# create workspace and navigate into it&lt;br /&gt;
$ WORKSPACE=`ws_allocate tensorflow 3`&lt;br /&gt;
$ cd $WORKSPACE&lt;br /&gt;
&lt;br /&gt;
# build container&lt;br /&gt;
$ singularity build tensorflow-20.11-tf2-py3.sif docker://nvcr.io/nvidia/tensorflow:20.11-tf2-py3&lt;br /&gt;
&lt;br /&gt;
# execute Python command&lt;br /&gt;
$ singularity exec --nv tensorflow-20.11-tf2-py3.sif python -c &#039;import tensorflow as tf; \&lt;br /&gt;
  print(&amp;quot;Num GPUs Available: &amp;quot;,len(tf.config.experimental.list_physical_devices(&amp;quot;GPU&amp;quot;)))&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Ready-to-use containers can be pulled from the [https://ngc.nvidia.com/catalog/containers NVIDIA GPU CLOUD (NGC)] catalog.&lt;br /&gt;
&lt;br /&gt;
== NGC environment modules on JUSTUS 2 ==&lt;br /&gt;
&lt;br /&gt;
1) Prepare a workspace to store the container&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ srun --nodes=1 --exclusive --gres=gpu:2 --pty bash&lt;br /&gt;
$ WORKSPACE=`ws_allocate ngc 3`&lt;br /&gt;
$ cd $WORKSPACE&lt;br /&gt;
$ export NGC_IMAGE_DIR=$(pwd)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;font color=red&amp;gt;Important: Containers can only run in workspaces.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2) PyTorch container&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load ngc/numlib&lt;br /&gt;
$ module load 20.12-torch-py3&lt;br /&gt;
$ python3&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; import torch&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; x = torch.randn(2,3)&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; print(x)&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; quit()&lt;br /&gt;
$ module unload 20.12-torch-py3&lt;br /&gt;
$ module unload ngc/numlib&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Use the container in the same manner as an interactive shell.&lt;br /&gt;
&lt;br /&gt;
3) LAMMPS container&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load ngc/chem&lt;br /&gt;
$ module avail&lt;br /&gt;
$ module load 29Oct2020-lammps&lt;br /&gt;
$ wget https://lammps.sandia.gov/inputs/in.lj.txt&lt;br /&gt;
$ export SINGULARITY_BINDPATH=$(pwd)&lt;br /&gt;
$ mpirun -n 2 lmp -in in.lj.txt -var x 8 -var y 8 -var z 8 -k on g 2 -sf kk -pk kokkos cuda/aware on neigh full \&lt;br /&gt;
  comm device binsize 2.8&lt;br /&gt;
$ module unload 29Oct2020-lammps&lt;br /&gt;
$ module unload ngc/chem&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Use &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;SINGULARITY_BINDPATH=&amp;lt;PATH&amp;gt;&amp;lt;/span&amp;gt; to mount the directory with the input file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Currently, &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;module load ngc/numlib&amp;lt;/span&amp;gt; for numeric libraries and &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;module load ngc/chem&amp;lt;/span&amp;gt; for chemistry programs can be selected.&lt;br /&gt;
&lt;br /&gt;
== Batch jobs with containers on JUSTUS 2 ==&lt;br /&gt;
&lt;br /&gt;
Run a GROMACS container with Singularity as a batch job:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ salloc --ntasks=1                                                         # obtain compute node&lt;br /&gt;
$ WORKSPACE=`ws_allocate gromacs 3`                                         # allocate workspace&lt;br /&gt;
$ cd $WORKSPACE                                                             # change to workspace&lt;br /&gt;
$ singularity pull gromacs-2020_2.sif docker://nvcr.io/hpc/gromacs:2020.2   # pull container from NGC&lt;br /&gt;
$ cp -r /opt/bwhpc/common/chem/ngc/gromacs/ ./bwhpc-examples/               # copy example to workspace&lt;br /&gt;
$ cd ./bwhpc-examples                                                       # change to example directory&lt;br /&gt;
$ sbatch gromacs-2020.2_gpu.slurm                                           # submit job&lt;br /&gt;
$ squeue                                                                    # obtain JOBID&lt;br /&gt;
$ scontrol show job &amp;lt;JOBID&amp;gt;                                                 # check state of job&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
More batch job examples are located at &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;/opt/bwhpc/common/chem/ngc&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
= Useful links =&lt;br /&gt;
&lt;br /&gt;
* [https://sylabs.io/docs/ Documentation (english)]&lt;br /&gt;
* [https://de.wikipedia.org/wiki/Singularity_(Software) Wikipedia article (german)]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Singularity_(software) Wikipedia article (english)]&lt;br /&gt;
----&lt;br /&gt;
[[Category:Software]]&lt;/div&gt;</summary>
		<author><name>F Wagner</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=JUSTUS2/Software/Singularity&amp;diff=10354</id>
		<title>JUSTUS2/Software/Singularity</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=JUSTUS2/Software/Singularity&amp;diff=10354"/>
		<updated>2022-05-14T12:59:40Z</updated>

		<summary type="html">&lt;p&gt;F Wagner: /* Examples */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=760px 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;
| system/singularity&lt;br /&gt;
|-&lt;br /&gt;
| License&lt;br /&gt;
| Open-source software, distributed under the 3-clause BSD License. [[#License|More...]]&lt;br /&gt;
|-&lt;br /&gt;
| Citing&lt;br /&gt;
| ---&lt;br /&gt;
|-&lt;br /&gt;
| Links&lt;br /&gt;
| [https://sylabs.io/singularity/ Homepage] &amp;amp;#124; [https://sylabs.io/docs/ Documentation]&lt;br /&gt;
|-&lt;br /&gt;
| Graphical Interface&lt;br /&gt;
| No&lt;br /&gt;
|}&lt;br /&gt;
= Description =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Singularity&#039;&#039;&#039; is a container platform.&lt;br /&gt;
&lt;br /&gt;
= License =&lt;br /&gt;
&lt;br /&gt;
Singularity is free, open-source software released under the 3-clause BSD license. Please read the [https://sylabs.io/guides/3.7/user-guide/license.html license] for additional information about Singularity.&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 Singularity with the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load system/singularity&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you wish to load another (older) version of Singularity, you can do so using&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load system/singularity/&amp;lt;version&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
with &amp;lt;version&amp;gt; specifying the desired version.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=red&amp;gt;Important: On JUSTUS 2, Singularity is available on all compute nodes. You do not have to load a module.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Program Binaries ==&lt;br /&gt;
&lt;br /&gt;
The binary &#039;&#039;singularity&#039;&#039; is main program of the container platform.&lt;br /&gt;
&lt;br /&gt;
To get help using Singularity execute the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ singularity --help&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Furthermore, a man page is available and can be accessed by typing:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ man singularity&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For additional information about how to use Singularity, please consult the [https://sylabs.io/docs/ documentation].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=red&amp;gt;Important: On JUSTUS 2, Singularity is only available on compute nodes. You must switch to such a node to invoke any &#039;&#039;singularity&#039;&#039; commands.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Batch jobs with containers ==&lt;br /&gt;
&lt;br /&gt;
Batch jobs utilizing Singularity containers are generally built the same way as all other [https://wiki.bwhpc.de/e/BwForCluster_JUSTUS_2_Slurm_HOWTO#How_to_submit_a_batch_job.3F batch jobs], where the job script contains &#039;&#039;singularity&#039;&#039; commands. For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
# Allocate one node&lt;br /&gt;
#SBATCH --nodes=1&lt;br /&gt;
# Number of program instances to be executed&lt;br /&gt;
#SBATCH --tasks-per-node=4&lt;br /&gt;
# 8 GB memory required per node&lt;br /&gt;
#SBATCH --mem=16G&lt;br /&gt;
# Maximum run time of job&lt;br /&gt;
#SBATCH --time=1:00:00&lt;br /&gt;
# Give job a reasonable name&lt;br /&gt;
#SBATCH --job-name=Singularity&lt;br /&gt;
# File name for standard output (%j will be replaced by job id)&lt;br /&gt;
#SBATCH --output=singularity_job-%j.out&lt;br /&gt;
# File name for error output&lt;br /&gt;
#SBATCH --error=singularity_job-%j.err&lt;br /&gt;
&lt;br /&gt;
module load your/singularity/version #(not needed on JUSTUS 2, but could be necessary on other system)&lt;br /&gt;
&lt;br /&gt;
cd your/workspace&lt;br /&gt;
&lt;br /&gt;
# Run container (two options to start a container)&lt;br /&gt;
singularity run [options] &amp;lt;container&amp;gt;&lt;br /&gt;
singularity exec [options] &amp;lt;container&amp;gt; &amp;lt;command&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=red&amp;gt;Keep in mind that other modules you may have loaded will not be available inside the container.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Using GPUs ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
[…]&lt;br /&gt;
# Allocate one GPU per node&lt;br /&gt;
#SBATCH --partition=gpu&lt;br /&gt;
#SBATCH --gres=gpu:1&lt;br /&gt;
[…]&lt;br /&gt;
&lt;br /&gt;
module load your/singularity/version #(not needed on JUSTUS 2, but could be necessary on other system)&lt;br /&gt;
&lt;br /&gt;
cd your/workspace&lt;br /&gt;
&lt;br /&gt;
# Run container (two options to start a container)&lt;br /&gt;
singularity run --nv [options] &amp;lt;container&amp;gt;&lt;br /&gt;
singularity exec --nv [options] &amp;lt;container&amp;gt; &amp;lt;command&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using the flag is advisable, but may be omitted if the correct GPU- and driver-APIs are available on the container.&lt;br /&gt;
&lt;br /&gt;
= Examples =&lt;br /&gt;
&lt;br /&gt;
== Run your first container on JUSTUS 2 ==&lt;br /&gt;
&lt;br /&gt;
Build a TensorFlow container with Singularity and execute a Python command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# request interactive node with GPUs&lt;br /&gt;
$ srun --nodes=1 --exclusive --gres=gpu:2 --pty bash&lt;br /&gt;
&lt;br /&gt;
# create workspace and navigate into it&lt;br /&gt;
$ WORKSPACE=`ws_allocate tensorflow 3`&lt;br /&gt;
$ cd $WORKSPACE&lt;br /&gt;
&lt;br /&gt;
# build container&lt;br /&gt;
$ singularity build tensorflow-20.11-tf2-py3.sif docker://nvcr.io/nvidia/tensorflow:20.11-tf2-py3&lt;br /&gt;
&lt;br /&gt;
# execute Python command&lt;br /&gt;
$ singularity exec --nv tensorflow-20.11-tf2-py3.sif python -c &#039;import tensorflow as tf; \&lt;br /&gt;
  print(&amp;quot;Num GPUs Available: &amp;quot;,len(tf.config.experimental.list_physical_devices(&amp;quot;GPU&amp;quot;)))&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Ready-to-use containers can be pulled from the [https://ngc.nvidia.com/catalog/containers NVIDIA GPU CLOUD (NGC)] catalog.&lt;br /&gt;
&lt;br /&gt;
== NGC environment modules on JUSTUS 2 ==&lt;br /&gt;
&lt;br /&gt;
1) Prepare a workspace to store the container&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ srun --nodes=1 --exclusive --gres=gpu:2 --pty bash&lt;br /&gt;
$ WORKSPACE=`ws_allocate ngc 3`&lt;br /&gt;
$ cd $WORKSPACE&lt;br /&gt;
$ export NGC_IMAGE_DIR=$(pwd)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;font color=red&amp;gt;Important: Containers can only run in workspaces.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2) PyTorch container&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load ngc/numlib&lt;br /&gt;
$ module load 20.12-torch-py3&lt;br /&gt;
$ python3&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; import torch&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; x = torch.randn(2,3)&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; print(x)&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; quit()&lt;br /&gt;
$ module unload 20.12-torch-py3&lt;br /&gt;
$ module unload ngc/numlib&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Use the container in the same manner as an interactive shell.&lt;br /&gt;
&lt;br /&gt;
3) LAMMPS container&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load ngc/chem&lt;br /&gt;
$ module avail&lt;br /&gt;
$ module load 29Oct2020-lammps&lt;br /&gt;
$ wget https://lammps.sandia.gov/inputs/in.lj.txt&lt;br /&gt;
$ export SINGULARITY_BINDPATH=$(pwd)&lt;br /&gt;
$ mpirun -n 2 lmp -in in.lj.txt -var x 8 -var y 8 -var z 8 -k on g 2 -sf kk -pk kokkos cuda/aware on neigh full \&lt;br /&gt;
  comm device binsize 2.8&lt;br /&gt;
$ module unload 29Oct2020&lt;br /&gt;
$ module unload ngc/chem&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Use &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;SINGULARITY_BINDPATH=&amp;lt;PATH&amp;gt;&amp;lt;/span&amp;gt; to mount the directory with the input file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Currently, &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;module load ngc/numlib&amp;lt;/span&amp;gt; for numeric libraries and &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;module load ngc/chem&amp;lt;/span&amp;gt; for chemistry programs can be selected.&lt;br /&gt;
&lt;br /&gt;
== Batch jobs with containers on JUSTUS 2 ==&lt;br /&gt;
&lt;br /&gt;
Run a GROMACS container with Singularity as a batch job:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ salloc --ntasks=1                                                         # obtain compute node&lt;br /&gt;
$ WORKSPACE=`ws_allocate gromacs 3`                                         # allocate workspace&lt;br /&gt;
$ cd $WORKSPACE                                                             # change to workspace&lt;br /&gt;
$ singularity pull gromacs-2020_2.sif docker://nvcr.io/hpc/gromacs:2020.2   # pull container from NGC&lt;br /&gt;
$ cp -r /opt/bwhpc/common/chem/ngc/gromacs/ ./bwhpc-examples/               # copy example to workspace&lt;br /&gt;
$ cd ./bwhpc-examples                                                       # change to example directory&lt;br /&gt;
$ sbatch gromacs-2020.2_gpu.slurm                                           # submit job&lt;br /&gt;
$ squeue                                                                    # obtain JOBID&lt;br /&gt;
$ scontrol show job &amp;lt;JOBID&amp;gt;                                                 # check state of job&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
More batch job examples are located at &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;/opt/bwhpc/common/chem/ngc&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
= Useful links =&lt;br /&gt;
&lt;br /&gt;
* [https://sylabs.io/docs/ Documentation (english)]&lt;br /&gt;
* [https://de.wikipedia.org/wiki/Singularity_(Software) Wikipedia article (german)]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Singularity_(software) Wikipedia article (english)]&lt;br /&gt;
----&lt;br /&gt;
[[Category:Software]]&lt;/div&gt;</summary>
		<author><name>F Wagner</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=JUSTUS2/Software/Singularity&amp;diff=10351</id>
		<title>JUSTUS2/Software/Singularity</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=JUSTUS2/Software/Singularity&amp;diff=10351"/>
		<updated>2022-05-13T09:49:04Z</updated>

		<summary type="html">&lt;p&gt;F Wagner: /* NGC environment modules on JUSTUS 2 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=760px 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;
| system/singularity&lt;br /&gt;
|-&lt;br /&gt;
| License&lt;br /&gt;
| Open-source software, distributed under the 3-clause BSD License. [[#License|More...]]&lt;br /&gt;
|-&lt;br /&gt;
| Citing&lt;br /&gt;
| ---&lt;br /&gt;
|-&lt;br /&gt;
| Links&lt;br /&gt;
| [https://sylabs.io/singularity/ Homepage] &amp;amp;#124; [https://sylabs.io/docs/ Documentation]&lt;br /&gt;
|-&lt;br /&gt;
| Graphical Interface&lt;br /&gt;
| No&lt;br /&gt;
|}&lt;br /&gt;
= Description =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Singularity&#039;&#039;&#039; is a container platform.&lt;br /&gt;
&lt;br /&gt;
= License =&lt;br /&gt;
&lt;br /&gt;
Singularity is free, open-source software released under the 3-clause BSD license. Please read the [https://sylabs.io/guides/3.7/user-guide/license.html license] for additional information about Singularity.&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 Singularity with the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load system/singularity&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you wish to load another (older) version of Singularity, you can do so using&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load system/singularity/&amp;lt;version&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
with &amp;lt;version&amp;gt; specifying the desired version.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=red&amp;gt;Important: On JUSTUS 2, Singularity is available on all compute nodes. You do not have to load a module.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Program Binaries ==&lt;br /&gt;
&lt;br /&gt;
The binary &#039;&#039;singularity&#039;&#039; is main program of the container platform.&lt;br /&gt;
&lt;br /&gt;
To get help using Singularity execute the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ singularity --help&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Furthermore, a man page is available and can be accessed by typing:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ man singularity&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For additional information about how to use Singularity, please consult the [https://sylabs.io/docs/ documentation].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=red&amp;gt;Important: On JUSTUS 2, Singularity is only available on compute nodes. You must switch to such a node to invoke any &#039;&#039;singularity&#039;&#039; commands.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Batch jobs with containers ==&lt;br /&gt;
&lt;br /&gt;
Batch jobs utilizing Singularity containers are generally built the same way as all other [https://wiki.bwhpc.de/e/BwForCluster_JUSTUS_2_Slurm_HOWTO#How_to_submit_a_batch_job.3F batch jobs], where the job script contains &#039;&#039;singularity&#039;&#039; commands. For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
# Allocate one node&lt;br /&gt;
#SBATCH --nodes=1&lt;br /&gt;
# Number of program instances to be executed&lt;br /&gt;
#SBATCH --tasks-per-node=4&lt;br /&gt;
# 8 GB memory required per node&lt;br /&gt;
#SBATCH --mem=16G&lt;br /&gt;
# Maximum run time of job&lt;br /&gt;
#SBATCH --time=1:00:00&lt;br /&gt;
# Give job a reasonable name&lt;br /&gt;
#SBATCH --job-name=Singularity&lt;br /&gt;
# File name for standard output (%j will be replaced by job id)&lt;br /&gt;
#SBATCH --output=singularity_job-%j.out&lt;br /&gt;
# File name for error output&lt;br /&gt;
#SBATCH --error=singularity_job-%j.err&lt;br /&gt;
&lt;br /&gt;
module load your/singularity/version #(not needed on JUSTUS 2, but could be necessary on other system)&lt;br /&gt;
&lt;br /&gt;
cd your/workspace&lt;br /&gt;
&lt;br /&gt;
# Run container (two options to start a container)&lt;br /&gt;
singularity run [options] &amp;lt;container&amp;gt;&lt;br /&gt;
singularity exec [options] &amp;lt;container&amp;gt; &amp;lt;command&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=red&amp;gt;Keep in mind that other modules you may have loaded will not be available inside the container.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Using GPUs ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
[…]&lt;br /&gt;
# Allocate one GPU per node&lt;br /&gt;
#SBATCH --partition=gpu&lt;br /&gt;
#SBATCH --gres=gpu:1&lt;br /&gt;
[…]&lt;br /&gt;
&lt;br /&gt;
module load your/singularity/version #(not needed on JUSTUS 2, but could be necessary on other system)&lt;br /&gt;
&lt;br /&gt;
cd your/workspace&lt;br /&gt;
&lt;br /&gt;
# Run container (two options to start a container)&lt;br /&gt;
singularity run --nv [options] &amp;lt;container&amp;gt;&lt;br /&gt;
singularity exec --nv [options] &amp;lt;container&amp;gt; &amp;lt;command&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using the flag is advisable, but may be omitted if the correct GPU- and driver-APIs are available on the container.&lt;br /&gt;
&lt;br /&gt;
= Examples =&lt;br /&gt;
&lt;br /&gt;
== Run your first container on JUSTUS 2 ==&lt;br /&gt;
&lt;br /&gt;
Build a TensorFlow container with Singularity and execute a Python command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# request interactive node with GPUs&lt;br /&gt;
$ srun --nodes=1 --exclusive --gres=gpu:2 --pty bash&lt;br /&gt;
&lt;br /&gt;
# create workspace and navigate into it&lt;br /&gt;
$ WORKSPACE=`ws_allocate tensorflow 3`&lt;br /&gt;
$ cd $WORKSPACE&lt;br /&gt;
&lt;br /&gt;
# build container&lt;br /&gt;
$ singularity build tensorflow-20.11-tf2-py3.sif docker://nvcr.io/nvidia/tensorflow:20.11-tf2-py3&lt;br /&gt;
&lt;br /&gt;
# execute Python command&lt;br /&gt;
$ singularity exec --nv tensorflow-20.11-tf2-py3.sif python -c &#039;import tensorflow as tf; \&lt;br /&gt;
  print(&amp;quot;Num GPUs Available: &amp;quot;,len(tf.config.experimental.list_physical_devices(&amp;quot;GPU&amp;quot;)))&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Ready-to-use containers can be pulled from the [https://ngc.nvidia.com/catalog/containers NVIDIA GPU CLOUD (NGC)] catalog.&lt;br /&gt;
&lt;br /&gt;
== NGC environment modules on JUSTUS 2 ==&lt;br /&gt;
&lt;br /&gt;
1) Prepare a workspace to store the container&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ srun --nodes=1 --exclusive --gres=gpu:2 --pty bash&lt;br /&gt;
$ WORKSPACE=`ws_allocate ngc 3`&lt;br /&gt;
$ cd $WORKSPACE&lt;br /&gt;
$ export NGC_IMAGE_DIR=$(pwd)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;font color=red&amp;gt;Important: Containers can only run in workspaces.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2) PyTorch container&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load ngc/numlib&lt;br /&gt;
$ module load 20.12-torch-py3&lt;br /&gt;
$ python3&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; import torch&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; x = torch.randn(2,3)&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; print(x)&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; quit()&lt;br /&gt;
$ module unload 20.12-torch-py3&lt;br /&gt;
$ module unload ngc/numlib&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Use the container in the same manner as an interactive shell.&lt;br /&gt;
&lt;br /&gt;
3) LAMMPS container&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load ngc/chem&lt;br /&gt;
$ module avail&lt;br /&gt;
$ module load 29Oct2020&lt;br /&gt;
$ wget https://lammps.sandia.gov/inputs/in.lj.txt&lt;br /&gt;
$ export SINGULARITY_BINDPATH=$(pwd)&lt;br /&gt;
$ mpirun -n 2 lmp -in in.lj.txt -var x 8 -var y 8 -var z 8 -k on g 2 -sf kk -pk kokkos cuda/aware on neigh full \&lt;br /&gt;
  comm device binsize 2.8&lt;br /&gt;
$ module unload 29Oct2020&lt;br /&gt;
$ module unload ngc/chem&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Use &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;SINGULARITY_BINDPATH=&amp;lt;PATH&amp;gt;&amp;lt;/span&amp;gt; to mount the directory with the input file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Currently, &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;module load ngc/numlib&amp;lt;/span&amp;gt; for numeric libraries and &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;module load ngc/chem&amp;lt;/span&amp;gt; for chemistry programs can be selected.&lt;br /&gt;
&lt;br /&gt;
== Batch jobs with containers on JUSTUS 2 ==&lt;br /&gt;
&lt;br /&gt;
Run a GROMACS container with Singularity as a batch job:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ salloc --ntasks=1                                                         # obtain compute node&lt;br /&gt;
$ WORKSPACE=`ws_allocate gromacs 3`                                         # allocate workspace&lt;br /&gt;
$ cd $WORKSPACE                                                             # change to workspace&lt;br /&gt;
$ singularity pull gromacs-2020_2.sif docker://nvcr.io/hpc/gromacs:2020.2   # pull container from NGC&lt;br /&gt;
$ cp -r /opt/bwhpc/common/chem/ngc/gromacs/ ./bwhpc-examples/               # copy example to workspace&lt;br /&gt;
$ cd ./bwhpc-examples                                                       # change to example directory&lt;br /&gt;
$ sbatch gromacs-2020.2_gpu.slurm                                           # submit job&lt;br /&gt;
$ squeue                                                                    # obtain JOBID&lt;br /&gt;
$ scontrol show job &amp;lt;JOBID&amp;gt;                                                 # check state of job&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
More batch job examples are located at &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;/opt/bwhpc/common/chem/ngc&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
= Useful links =&lt;br /&gt;
&lt;br /&gt;
* [https://sylabs.io/docs/ Documentation (english)]&lt;br /&gt;
* [https://de.wikipedia.org/wiki/Singularity_(Software) Wikipedia article (german)]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Singularity_(software) Wikipedia article (english)]&lt;br /&gt;
----&lt;br /&gt;
[[Category:Software]]&lt;/div&gt;</summary>
		<author><name>F Wagner</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=JUSTUS2/Software/Singularity&amp;diff=10350</id>
		<title>JUSTUS2/Software/Singularity</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=JUSTUS2/Software/Singularity&amp;diff=10350"/>
		<updated>2022-05-13T09:48:31Z</updated>

		<summary type="html">&lt;p&gt;F Wagner: /* NGC environment modules on JUSTUS 2 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=760px 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;
| system/singularity&lt;br /&gt;
|-&lt;br /&gt;
| License&lt;br /&gt;
| Open-source software, distributed under the 3-clause BSD License. [[#License|More...]]&lt;br /&gt;
|-&lt;br /&gt;
| Citing&lt;br /&gt;
| ---&lt;br /&gt;
|-&lt;br /&gt;
| Links&lt;br /&gt;
| [https://sylabs.io/singularity/ Homepage] &amp;amp;#124; [https://sylabs.io/docs/ Documentation]&lt;br /&gt;
|-&lt;br /&gt;
| Graphical Interface&lt;br /&gt;
| No&lt;br /&gt;
|}&lt;br /&gt;
= Description =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Singularity&#039;&#039;&#039; is a container platform.&lt;br /&gt;
&lt;br /&gt;
= License =&lt;br /&gt;
&lt;br /&gt;
Singularity is free, open-source software released under the 3-clause BSD license. Please read the [https://sylabs.io/guides/3.7/user-guide/license.html license] for additional information about Singularity.&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 Singularity with the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load system/singularity&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you wish to load another (older) version of Singularity, you can do so using&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load system/singularity/&amp;lt;version&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
with &amp;lt;version&amp;gt; specifying the desired version.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=red&amp;gt;Important: On JUSTUS 2, Singularity is available on all compute nodes. You do not have to load a module.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Program Binaries ==&lt;br /&gt;
&lt;br /&gt;
The binary &#039;&#039;singularity&#039;&#039; is main program of the container platform.&lt;br /&gt;
&lt;br /&gt;
To get help using Singularity execute the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ singularity --help&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Furthermore, a man page is available and can be accessed by typing:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ man singularity&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For additional information about how to use Singularity, please consult the [https://sylabs.io/docs/ documentation].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=red&amp;gt;Important: On JUSTUS 2, Singularity is only available on compute nodes. You must switch to such a node to invoke any &#039;&#039;singularity&#039;&#039; commands.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Batch jobs with containers ==&lt;br /&gt;
&lt;br /&gt;
Batch jobs utilizing Singularity containers are generally built the same way as all other [https://wiki.bwhpc.de/e/BwForCluster_JUSTUS_2_Slurm_HOWTO#How_to_submit_a_batch_job.3F batch jobs], where the job script contains &#039;&#039;singularity&#039;&#039; commands. For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
# Allocate one node&lt;br /&gt;
#SBATCH --nodes=1&lt;br /&gt;
# Number of program instances to be executed&lt;br /&gt;
#SBATCH --tasks-per-node=4&lt;br /&gt;
# 8 GB memory required per node&lt;br /&gt;
#SBATCH --mem=16G&lt;br /&gt;
# Maximum run time of job&lt;br /&gt;
#SBATCH --time=1:00:00&lt;br /&gt;
# Give job a reasonable name&lt;br /&gt;
#SBATCH --job-name=Singularity&lt;br /&gt;
# File name for standard output (%j will be replaced by job id)&lt;br /&gt;
#SBATCH --output=singularity_job-%j.out&lt;br /&gt;
# File name for error output&lt;br /&gt;
#SBATCH --error=singularity_job-%j.err&lt;br /&gt;
&lt;br /&gt;
module load your/singularity/version #(not needed on JUSTUS 2, but could be necessary on other system)&lt;br /&gt;
&lt;br /&gt;
cd your/workspace&lt;br /&gt;
&lt;br /&gt;
# Run container (two options to start a container)&lt;br /&gt;
singularity run [options] &amp;lt;container&amp;gt;&lt;br /&gt;
singularity exec [options] &amp;lt;container&amp;gt; &amp;lt;command&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=red&amp;gt;Keep in mind that other modules you may have loaded will not be available inside the container.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Using GPUs ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
[…]&lt;br /&gt;
# Allocate one GPU per node&lt;br /&gt;
#SBATCH --partition=gpu&lt;br /&gt;
#SBATCH --gres=gpu:1&lt;br /&gt;
[…]&lt;br /&gt;
&lt;br /&gt;
module load your/singularity/version #(not needed on JUSTUS 2, but could be necessary on other system)&lt;br /&gt;
&lt;br /&gt;
cd your/workspace&lt;br /&gt;
&lt;br /&gt;
# Run container (two options to start a container)&lt;br /&gt;
singularity run --nv [options] &amp;lt;container&amp;gt;&lt;br /&gt;
singularity exec --nv [options] &amp;lt;container&amp;gt; &amp;lt;command&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using the flag is advisable, but may be omitted if the correct GPU- and driver-APIs are available on the container.&lt;br /&gt;
&lt;br /&gt;
= Examples =&lt;br /&gt;
&lt;br /&gt;
== Run your first container on JUSTUS 2 ==&lt;br /&gt;
&lt;br /&gt;
Build a TensorFlow container with Singularity and execute a Python command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# request interactive node with GPUs&lt;br /&gt;
$ srun --nodes=1 --exclusive --gres=gpu:2 --pty bash&lt;br /&gt;
&lt;br /&gt;
# create workspace and navigate into it&lt;br /&gt;
$ WORKSPACE=`ws_allocate tensorflow 3`&lt;br /&gt;
$ cd $WORKSPACE&lt;br /&gt;
&lt;br /&gt;
# build container&lt;br /&gt;
$ singularity build tensorflow-20.11-tf2-py3.sif docker://nvcr.io/nvidia/tensorflow:20.11-tf2-py3&lt;br /&gt;
&lt;br /&gt;
# execute Python command&lt;br /&gt;
$ singularity exec --nv tensorflow-20.11-tf2-py3.sif python -c &#039;import tensorflow as tf; \&lt;br /&gt;
  print(&amp;quot;Num GPUs Available: &amp;quot;,len(tf.config.experimental.list_physical_devices(&amp;quot;GPU&amp;quot;)))&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Ready-to-use containers can be pulled from the [https://ngc.nvidia.com/catalog/containers NVIDIA GPU CLOUD (NGC)] catalog.&lt;br /&gt;
&lt;br /&gt;
== NGC environment modules on JUSTUS 2 ==&lt;br /&gt;
&lt;br /&gt;
1) Prepare a workspace to store the container&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ srun --nodes=1 --exclusive --gres=gpu:2 --pty bash&lt;br /&gt;
$ WORKSPACE=`ws_allocate ngc 3`&lt;br /&gt;
$ cd $WORKSPACE&lt;br /&gt;
$ export NGC_IMAGE_DIR=$(pwd)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;font color=red&amp;gt;Important: Containers can only run in workspaces.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2) PyTorch container&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load ngc/numlib&lt;br /&gt;
$ module load 20.12-torch-py3&lt;br /&gt;
$ python3&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; import torch&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; x = torch.randn(2,3)&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; print(x)&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; quit()&lt;br /&gt;
$ module unload 20.12-torch-py3&lt;br /&gt;
$ module unload ngc/numlib&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Use the container in the same manner as an interactive shell.&lt;br /&gt;
&lt;br /&gt;
3) LAMMPS container&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load ngc/chem&lt;br /&gt;
$ module avail&lt;br /&gt;
$ module load 29Oct2020&lt;br /&gt;
$ wget https://lammps.sandia.gov/inputs/in.lj.txt&lt;br /&gt;
$ export SINGULARITY_BINDPATH=$(pwd)&lt;br /&gt;
$ mpirun -n 2 lmp -in in.lj.txt -var x 8 -var y 8 -var z 8 -k on g 2 -sf kk -pk kokkos cuda/aware on neigh full \&lt;br /&gt;
  comm device binsize 2.8&lt;br /&gt;
$ module unload 29Oct2020&lt;br /&gt;
$ module unload ngc/chem&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Use &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;SINGULARITY_BINDPATH=&amp;lt;PATH&amp;gt;&amp;lt;/span&amp;gt; to mount the directory with the input file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Currently, &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;module load ngc/.numlib&amp;lt;/span&amp;gt; for numeric libraries and &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;module load ngc/.chem&amp;lt;/span&amp;gt; for chemistry programs can be selected.&lt;br /&gt;
&lt;br /&gt;
== Batch jobs with containers on JUSTUS 2 ==&lt;br /&gt;
&lt;br /&gt;
Run a GROMACS container with Singularity as a batch job:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ salloc --ntasks=1                                                         # obtain compute node&lt;br /&gt;
$ WORKSPACE=`ws_allocate gromacs 3`                                         # allocate workspace&lt;br /&gt;
$ cd $WORKSPACE                                                             # change to workspace&lt;br /&gt;
$ singularity pull gromacs-2020_2.sif docker://nvcr.io/hpc/gromacs:2020.2   # pull container from NGC&lt;br /&gt;
$ cp -r /opt/bwhpc/common/chem/ngc/gromacs/ ./bwhpc-examples/               # copy example to workspace&lt;br /&gt;
$ cd ./bwhpc-examples                                                       # change to example directory&lt;br /&gt;
$ sbatch gromacs-2020.2_gpu.slurm                                           # submit job&lt;br /&gt;
$ squeue                                                                    # obtain JOBID&lt;br /&gt;
$ scontrol show job &amp;lt;JOBID&amp;gt;                                                 # check state of job&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
More batch job examples are located at &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;/opt/bwhpc/common/chem/ngc&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
= Useful links =&lt;br /&gt;
&lt;br /&gt;
* [https://sylabs.io/docs/ Documentation (english)]&lt;br /&gt;
* [https://de.wikipedia.org/wiki/Singularity_(Software) Wikipedia article (german)]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Singularity_(software) Wikipedia article (english)]&lt;br /&gt;
----&lt;br /&gt;
[[Category:Software]]&lt;/div&gt;</summary>
		<author><name>F Wagner</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=JUSTUS2/Software/Singularity&amp;diff=10340</id>
		<title>JUSTUS2/Software/Singularity</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=JUSTUS2/Software/Singularity&amp;diff=10340"/>
		<updated>2022-05-12T09:37:00Z</updated>

		<summary type="html">&lt;p&gt;F Wagner: /* Batch jobs with containers on JUSTUS 2 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=760px 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;
| system/singularity&lt;br /&gt;
|-&lt;br /&gt;
| License&lt;br /&gt;
| Open-source software, distributed under the 3-clause BSD License. [[#License|More...]]&lt;br /&gt;
|-&lt;br /&gt;
| Citing&lt;br /&gt;
| ---&lt;br /&gt;
|-&lt;br /&gt;
| Links&lt;br /&gt;
| [https://sylabs.io/singularity/ Homepage] &amp;amp;#124; [https://sylabs.io/docs/ Documentation]&lt;br /&gt;
|-&lt;br /&gt;
| Graphical Interface&lt;br /&gt;
| No&lt;br /&gt;
|}&lt;br /&gt;
= Description =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Singularity&#039;&#039;&#039; is a container platform.&lt;br /&gt;
&lt;br /&gt;
= License =&lt;br /&gt;
&lt;br /&gt;
Singularity is free, open-source software released under the 3-clause BSD license. Please read the [https://sylabs.io/guides/3.7/user-guide/license.html license] for additional information about Singularity.&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 Singularity with the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load system/singularity&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you wish to load another (older) version of Singularity, you can do so using&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load system/singularity/&amp;lt;version&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
with &amp;lt;version&amp;gt; specifying the desired version.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=red&amp;gt;Important: On JUSTUS 2, Singularity is available on all compute nodes. You do not have to load a module.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Program Binaries ==&lt;br /&gt;
&lt;br /&gt;
The binary &#039;&#039;singularity&#039;&#039; is main program of the container platform.&lt;br /&gt;
&lt;br /&gt;
To get help using Singularity execute the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ singularity --help&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Furthermore, a man page is available and can be accessed by typing:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ man singularity&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For additional information about how to use Singularity, please consult the [https://sylabs.io/docs/ documentation].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=red&amp;gt;Important: On JUSTUS 2, Singularity is only available on compute nodes. You must switch to such a node to invoke any &#039;&#039;singularity&#039;&#039; commands.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Batch jobs with containers ==&lt;br /&gt;
&lt;br /&gt;
Batch jobs utilizing Singularity containers are generally built the same way as all other [https://wiki.bwhpc.de/e/BwForCluster_JUSTUS_2_Slurm_HOWTO#How_to_submit_a_batch_job.3F batch jobs], where the job script contains &#039;&#039;singularity&#039;&#039; commands. For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
# Allocate one node&lt;br /&gt;
#SBATCH --nodes=1&lt;br /&gt;
# Number of program instances to be executed&lt;br /&gt;
#SBATCH --tasks-per-node=4&lt;br /&gt;
# 8 GB memory required per node&lt;br /&gt;
#SBATCH --mem=16G&lt;br /&gt;
# Maximum run time of job&lt;br /&gt;
#SBATCH --time=1:00:00&lt;br /&gt;
# Give job a reasonable name&lt;br /&gt;
#SBATCH --job-name=Singularity&lt;br /&gt;
# File name for standard output (%j will be replaced by job id)&lt;br /&gt;
#SBATCH --output=singularity_job-%j.out&lt;br /&gt;
# File name for error output&lt;br /&gt;
#SBATCH --error=singularity_job-%j.err&lt;br /&gt;
&lt;br /&gt;
module load your/singularity/version #(not needed on JUSTUS 2, but could be necessary on other system)&lt;br /&gt;
&lt;br /&gt;
cd your/workspace&lt;br /&gt;
&lt;br /&gt;
# Run container (two options to start a container)&lt;br /&gt;
singularity run [options] &amp;lt;container&amp;gt;&lt;br /&gt;
singularity exec [options] &amp;lt;container&amp;gt; &amp;lt;command&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=red&amp;gt;Keep in mind that other modules you may have loaded will not be available inside the container.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Using GPUs ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
[…]&lt;br /&gt;
# Allocate one GPU per node&lt;br /&gt;
#SBATCH --partition=gpu&lt;br /&gt;
#SBATCH --gres=gpu:1&lt;br /&gt;
[…]&lt;br /&gt;
&lt;br /&gt;
module load your/singularity/version #(not needed on JUSTUS 2, but could be necessary on other system)&lt;br /&gt;
&lt;br /&gt;
cd your/workspace&lt;br /&gt;
&lt;br /&gt;
# Run container (two options to start a container)&lt;br /&gt;
singularity run --nv [options] &amp;lt;container&amp;gt;&lt;br /&gt;
singularity exec --nv [options] &amp;lt;container&amp;gt; &amp;lt;command&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using the flag is advisable, but may be omitted if the correct GPU- and driver-APIs are available on the container.&lt;br /&gt;
&lt;br /&gt;
= Examples =&lt;br /&gt;
&lt;br /&gt;
== Run your first container on JUSTUS 2 ==&lt;br /&gt;
&lt;br /&gt;
Build a TensorFlow container with Singularity and execute a Python command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# request interactive node with GPUs&lt;br /&gt;
$ srun --nodes=1 --exclusive --gres=gpu:2 --pty bash&lt;br /&gt;
&lt;br /&gt;
# create workspace and navigate into it&lt;br /&gt;
$ WORKSPACE=`ws_allocate tensorflow 3`&lt;br /&gt;
$ cd $WORKSPACE&lt;br /&gt;
&lt;br /&gt;
# build container&lt;br /&gt;
$ singularity build tensorflow-20.11-tf2-py3.sif docker://nvcr.io/nvidia/tensorflow:20.11-tf2-py3&lt;br /&gt;
&lt;br /&gt;
# execute Python command&lt;br /&gt;
$ singularity exec --nv tensorflow-20.11-tf2-py3.sif python -c &#039;import tensorflow as tf; \&lt;br /&gt;
  print(&amp;quot;Num GPUs Available: &amp;quot;,len(tf.config.experimental.list_physical_devices(&amp;quot;GPU&amp;quot;)))&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Ready-to-use containers can be pulled from the [https://ngc.nvidia.com/catalog/containers NVIDIA GPU CLOUD (NGC)] catalog.&lt;br /&gt;
&lt;br /&gt;
== NGC environment modules on JUSTUS 2 ==&lt;br /&gt;
&lt;br /&gt;
1) Prepare a workspace to store the container&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ srun --nodes=1 --exclusive --gres=gpu:2 --pty bash&lt;br /&gt;
$ WORKSPACE=`ws_allocate ngc 3`&lt;br /&gt;
$ cd $WORKSPACE&lt;br /&gt;
$ export NGC_IMAGE_DIR=$(pwd)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;font color=red&amp;gt;Important: Containers can only run in workspaces.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2) PyTorch container&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load ngc/.numlib&lt;br /&gt;
$ module load 20.12-torch-py3&lt;br /&gt;
$ python3&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; import torch&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; x = torch.randn(2,3)&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; print(x)&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; quit()&lt;br /&gt;
$ module unload 20.12-torch-py3&lt;br /&gt;
$ module unload ngc/.numlib&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Use the container in the same manner as an interactive shell.&lt;br /&gt;
&lt;br /&gt;
3) LAMMPS container&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load ngc/.chem&lt;br /&gt;
$ module avail&lt;br /&gt;
$ module load 29Oct2020&lt;br /&gt;
$ wget https://lammps.sandia.gov/inputs/in.lj.txt&lt;br /&gt;
$ export SINGULARITY_BINDPATH=$(pwd)&lt;br /&gt;
$ mpirun -n 2 lmp -in in.lj.txt -var x 8 -var y 8 -var z 8 -k on g 2 -sf kk -pk kokkos cuda/aware on neigh full \&lt;br /&gt;
  comm device binsize 2.8&lt;br /&gt;
$ module unload 29Oct2020&lt;br /&gt;
$ module unload ngc/.chem&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Use &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;SINGULARITY_BINDPATH=&amp;lt;PATH&amp;gt;&amp;lt;/span&amp;gt; to mount the directory with the input file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Currently, &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;module load ngc/.numlib&amp;lt;/span&amp;gt; for numeric libraries and &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;module load ngc/.chem&amp;lt;/span&amp;gt; for chemistry programs can be selected.&lt;br /&gt;
&lt;br /&gt;
== Batch jobs with containers on JUSTUS 2 ==&lt;br /&gt;
&lt;br /&gt;
Run a GROMACS container with Singularity as a batch job:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ salloc --ntasks=1                                                         # obtain compute node&lt;br /&gt;
$ WORKSPACE=`ws_allocate gromacs 3`                                         # allocate workspace&lt;br /&gt;
$ cd $WORKSPACE                                                             # change to workspace&lt;br /&gt;
$ singularity pull gromacs-2020_2.sif docker://nvcr.io/hpc/gromacs:2020.2   # pull container from NGC&lt;br /&gt;
$ cp -r /opt/bwhpc/common/chem/ngc/gromacs/ ./bwhpc-examples/               # copy example to workspace&lt;br /&gt;
$ cd ./bwhpc-examples                                                       # change to example directory&lt;br /&gt;
$ sbatch gromacs-2020.2_gpu.slurm                                           # submit job&lt;br /&gt;
$ squeue                                                                    # obtain JOBID&lt;br /&gt;
$ scontrol show job &amp;lt;JOBID&amp;gt;                                                 # check state of job&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
More batch job examples are located at &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;/opt/bwhpc/common/chem/ngc&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
= Useful links =&lt;br /&gt;
&lt;br /&gt;
* [https://sylabs.io/docs/ Documentation (english)]&lt;br /&gt;
* [https://de.wikipedia.org/wiki/Singularity_(Software) Wikipedia article (german)]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Singularity_(software) Wikipedia article (english)]&lt;br /&gt;
----&lt;br /&gt;
[[Category:Software]]&lt;/div&gt;</summary>
		<author><name>F Wagner</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=JUSTUS2/Software/Singularity&amp;diff=10339</id>
		<title>JUSTUS2/Software/Singularity</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=JUSTUS2/Software/Singularity&amp;diff=10339"/>
		<updated>2022-05-12T09:34:15Z</updated>

		<summary type="html">&lt;p&gt;F Wagner: /* Batch jobs with containers on JUSTUS 2 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=760px 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;
| system/singularity&lt;br /&gt;
|-&lt;br /&gt;
| License&lt;br /&gt;
| Open-source software, distributed under the 3-clause BSD License. [[#License|More...]]&lt;br /&gt;
|-&lt;br /&gt;
| Citing&lt;br /&gt;
| ---&lt;br /&gt;
|-&lt;br /&gt;
| Links&lt;br /&gt;
| [https://sylabs.io/singularity/ Homepage] &amp;amp;#124; [https://sylabs.io/docs/ Documentation]&lt;br /&gt;
|-&lt;br /&gt;
| Graphical Interface&lt;br /&gt;
| No&lt;br /&gt;
|}&lt;br /&gt;
= Description =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Singularity&#039;&#039;&#039; is a container platform.&lt;br /&gt;
&lt;br /&gt;
= License =&lt;br /&gt;
&lt;br /&gt;
Singularity is free, open-source software released under the 3-clause BSD license. Please read the [https://sylabs.io/guides/3.7/user-guide/license.html license] for additional information about Singularity.&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 Singularity with the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load system/singularity&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you wish to load another (older) version of Singularity, you can do so using&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load system/singularity/&amp;lt;version&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
with &amp;lt;version&amp;gt; specifying the desired version.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=red&amp;gt;Important: On JUSTUS 2, Singularity is available on all compute nodes. You do not have to load a module.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Program Binaries ==&lt;br /&gt;
&lt;br /&gt;
The binary &#039;&#039;singularity&#039;&#039; is main program of the container platform.&lt;br /&gt;
&lt;br /&gt;
To get help using Singularity execute the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ singularity --help&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Furthermore, a man page is available and can be accessed by typing:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ man singularity&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For additional information about how to use Singularity, please consult the [https://sylabs.io/docs/ documentation].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=red&amp;gt;Important: On JUSTUS 2, Singularity is only available on compute nodes. You must switch to such a node to invoke any &#039;&#039;singularity&#039;&#039; commands.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Batch jobs with containers ==&lt;br /&gt;
&lt;br /&gt;
Batch jobs utilizing Singularity containers are generally built the same way as all other [https://wiki.bwhpc.de/e/BwForCluster_JUSTUS_2_Slurm_HOWTO#How_to_submit_a_batch_job.3F batch jobs], where the job script contains &#039;&#039;singularity&#039;&#039; commands. For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
# Allocate one node&lt;br /&gt;
#SBATCH --nodes=1&lt;br /&gt;
# Number of program instances to be executed&lt;br /&gt;
#SBATCH --tasks-per-node=4&lt;br /&gt;
# 8 GB memory required per node&lt;br /&gt;
#SBATCH --mem=16G&lt;br /&gt;
# Maximum run time of job&lt;br /&gt;
#SBATCH --time=1:00:00&lt;br /&gt;
# Give job a reasonable name&lt;br /&gt;
#SBATCH --job-name=Singularity&lt;br /&gt;
# File name for standard output (%j will be replaced by job id)&lt;br /&gt;
#SBATCH --output=singularity_job-%j.out&lt;br /&gt;
# File name for error output&lt;br /&gt;
#SBATCH --error=singularity_job-%j.err&lt;br /&gt;
&lt;br /&gt;
module load your/singularity/version #(not needed on JUSTUS 2, but could be necessary on other system)&lt;br /&gt;
&lt;br /&gt;
cd your/workspace&lt;br /&gt;
&lt;br /&gt;
# Run container (two options to start a container)&lt;br /&gt;
singularity run [options] &amp;lt;container&amp;gt;&lt;br /&gt;
singularity exec [options] &amp;lt;container&amp;gt; &amp;lt;command&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=red&amp;gt;Keep in mind that other modules you may have loaded will not be available inside the container.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Using GPUs ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
[…]&lt;br /&gt;
# Allocate one GPU per node&lt;br /&gt;
#SBATCH --partition=gpu&lt;br /&gt;
#SBATCH --gres=gpu:1&lt;br /&gt;
[…]&lt;br /&gt;
&lt;br /&gt;
module load your/singularity/version #(not needed on JUSTUS 2, but could be necessary on other system)&lt;br /&gt;
&lt;br /&gt;
cd your/workspace&lt;br /&gt;
&lt;br /&gt;
# Run container (two options to start a container)&lt;br /&gt;
singularity run --nv [options] &amp;lt;container&amp;gt;&lt;br /&gt;
singularity exec --nv [options] &amp;lt;container&amp;gt; &amp;lt;command&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using the flag is advisable, but may be omitted if the correct GPU- and driver-APIs are available on the container.&lt;br /&gt;
&lt;br /&gt;
= Examples =&lt;br /&gt;
&lt;br /&gt;
== Run your first container on JUSTUS 2 ==&lt;br /&gt;
&lt;br /&gt;
Build a TensorFlow container with Singularity and execute a Python command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# request interactive node with GPUs&lt;br /&gt;
$ srun --nodes=1 --exclusive --gres=gpu:2 --pty bash&lt;br /&gt;
&lt;br /&gt;
# create workspace and navigate into it&lt;br /&gt;
$ WORKSPACE=`ws_allocate tensorflow 3`&lt;br /&gt;
$ cd $WORKSPACE&lt;br /&gt;
&lt;br /&gt;
# build container&lt;br /&gt;
$ singularity build tensorflow-20.11-tf2-py3.sif docker://nvcr.io/nvidia/tensorflow:20.11-tf2-py3&lt;br /&gt;
&lt;br /&gt;
# execute Python command&lt;br /&gt;
$ singularity exec --nv tensorflow-20.11-tf2-py3.sif python -c &#039;import tensorflow as tf; \&lt;br /&gt;
  print(&amp;quot;Num GPUs Available: &amp;quot;,len(tf.config.experimental.list_physical_devices(&amp;quot;GPU&amp;quot;)))&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Ready-to-use containers can be pulled from the [https://ngc.nvidia.com/catalog/containers NVIDIA GPU CLOUD (NGC)] catalog.&lt;br /&gt;
&lt;br /&gt;
== NGC environment modules on JUSTUS 2 ==&lt;br /&gt;
&lt;br /&gt;
1) Prepare a workspace to store the container&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ srun --nodes=1 --exclusive --gres=gpu:2 --pty bash&lt;br /&gt;
$ WORKSPACE=`ws_allocate ngc 3`&lt;br /&gt;
$ cd $WORKSPACE&lt;br /&gt;
$ export NGC_IMAGE_DIR=$(pwd)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;font color=red&amp;gt;Important: Containers can only run in workspaces.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2) PyTorch container&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load ngc/.numlib&lt;br /&gt;
$ module load 20.12-torch-py3&lt;br /&gt;
$ python3&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; import torch&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; x = torch.randn(2,3)&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; print(x)&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; quit()&lt;br /&gt;
$ module unload 20.12-torch-py3&lt;br /&gt;
$ module unload ngc/.numlib&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Use the container in the same manner as an interactive shell.&lt;br /&gt;
&lt;br /&gt;
3) LAMMPS container&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load ngc/.chem&lt;br /&gt;
$ module avail&lt;br /&gt;
$ module load 29Oct2020&lt;br /&gt;
$ wget https://lammps.sandia.gov/inputs/in.lj.txt&lt;br /&gt;
$ export SINGULARITY_BINDPATH=$(pwd)&lt;br /&gt;
$ mpirun -n 2 lmp -in in.lj.txt -var x 8 -var y 8 -var z 8 -k on g 2 -sf kk -pk kokkos cuda/aware on neigh full \&lt;br /&gt;
  comm device binsize 2.8&lt;br /&gt;
$ module unload 29Oct2020&lt;br /&gt;
$ module unload ngc/.chem&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Use &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;SINGULARITY_BINDPATH=&amp;lt;PATH&amp;gt;&amp;lt;/span&amp;gt; to mount the directory with the input file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Currently, &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;module load ngc/.numlib&amp;lt;/span&amp;gt; for numeric libraries and &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;module load ngc/.chem&amp;lt;/span&amp;gt; for chemistry programs can be selected.&lt;br /&gt;
&lt;br /&gt;
== Batch jobs with containers on JUSTUS 2 ==&lt;br /&gt;
&lt;br /&gt;
Run a GROMACS container with Singularity as a batch job:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ salloc --nodes=1 --ntasks=1                                               # obtain compute node&lt;br /&gt;
$ WORKSPACE=`ws_allocate gromacs 3`                                         # allocate workspace&lt;br /&gt;
$ cd $WORKSPACE                                                             # change to workspace&lt;br /&gt;
$ singularity pull gromacs-2020_2.sif docker://nvcr.io/hpc/gromacs:2020.2   # pull container from NGC&lt;br /&gt;
$ cp -r /opt/bwhpc/common/chem/ngc/gromacs/ ./bwhpc-examples/               # copy example to workspace&lt;br /&gt;
$ cd ./bwhpc-examples                                                       # change to example directory&lt;br /&gt;
$ sbatch gromacs-2020.2_gpu.slurm                                           # submit job&lt;br /&gt;
$ squeue                                                                    # obtain JOBID&lt;br /&gt;
$ scontrol show job &amp;lt;JOBID&amp;gt;                                                 # check state of job&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
More batch job examples are located at &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;/opt/bwhpc/common/chem/ngc&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
= Useful links =&lt;br /&gt;
&lt;br /&gt;
* [https://sylabs.io/docs/ Documentation (english)]&lt;br /&gt;
* [https://de.wikipedia.org/wiki/Singularity_(Software) Wikipedia article (german)]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Singularity_(software) Wikipedia article (english)]&lt;br /&gt;
----&lt;br /&gt;
[[Category:Software]]&lt;/div&gt;</summary>
		<author><name>F Wagner</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=JUSTUS2/Software/Singularity&amp;diff=10338</id>
		<title>JUSTUS2/Software/Singularity</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=JUSTUS2/Software/Singularity&amp;diff=10338"/>
		<updated>2022-05-11T18:27:03Z</updated>

		<summary type="html">&lt;p&gt;F Wagner: /* NGC environment modules on JUSTUS 2 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=760px 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;
| system/singularity&lt;br /&gt;
|-&lt;br /&gt;
| License&lt;br /&gt;
| Open-source software, distributed under the 3-clause BSD License. [[#License|More...]]&lt;br /&gt;
|-&lt;br /&gt;
| Citing&lt;br /&gt;
| ---&lt;br /&gt;
|-&lt;br /&gt;
| Links&lt;br /&gt;
| [https://sylabs.io/singularity/ Homepage] &amp;amp;#124; [https://sylabs.io/docs/ Documentation]&lt;br /&gt;
|-&lt;br /&gt;
| Graphical Interface&lt;br /&gt;
| No&lt;br /&gt;
|}&lt;br /&gt;
= Description =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Singularity&#039;&#039;&#039; is a container platform.&lt;br /&gt;
&lt;br /&gt;
= License =&lt;br /&gt;
&lt;br /&gt;
Singularity is free, open-source software released under the 3-clause BSD license. Please read the [https://sylabs.io/guides/3.7/user-guide/license.html license] for additional information about Singularity.&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 Singularity with the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load system/singularity&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you wish to load another (older) version of Singularity, you can do so using&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load system/singularity/&amp;lt;version&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
with &amp;lt;version&amp;gt; specifying the desired version.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=red&amp;gt;Important: On JUSTUS 2, Singularity is available on all compute nodes. You do not have to load a module.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Program Binaries ==&lt;br /&gt;
&lt;br /&gt;
The binary &#039;&#039;singularity&#039;&#039; is main program of the container platform.&lt;br /&gt;
&lt;br /&gt;
To get help using Singularity execute the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ singularity --help&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Furthermore, a man page is available and can be accessed by typing:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ man singularity&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For additional information about how to use Singularity, please consult the [https://sylabs.io/docs/ documentation].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=red&amp;gt;Important: On JUSTUS 2, Singularity is only available on compute nodes. You must switch to such a node to invoke any &#039;&#039;singularity&#039;&#039; commands.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Batch jobs with containers ==&lt;br /&gt;
&lt;br /&gt;
Batch jobs utilizing Singularity containers are generally built the same way as all other [https://wiki.bwhpc.de/e/BwForCluster_JUSTUS_2_Slurm_HOWTO#How_to_submit_a_batch_job.3F batch jobs], where the job script contains &#039;&#039;singularity&#039;&#039; commands. For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
# Allocate one node&lt;br /&gt;
#SBATCH --nodes=1&lt;br /&gt;
# Number of program instances to be executed&lt;br /&gt;
#SBATCH --tasks-per-node=4&lt;br /&gt;
# 8 GB memory required per node&lt;br /&gt;
#SBATCH --mem=16G&lt;br /&gt;
# Maximum run time of job&lt;br /&gt;
#SBATCH --time=1:00:00&lt;br /&gt;
# Give job a reasonable name&lt;br /&gt;
#SBATCH --job-name=Singularity&lt;br /&gt;
# File name for standard output (%j will be replaced by job id)&lt;br /&gt;
#SBATCH --output=singularity_job-%j.out&lt;br /&gt;
# File name for error output&lt;br /&gt;
#SBATCH --error=singularity_job-%j.err&lt;br /&gt;
&lt;br /&gt;
module load your/singularity/version #(not needed on JUSTUS 2, but could be necessary on other system)&lt;br /&gt;
&lt;br /&gt;
cd your/workspace&lt;br /&gt;
&lt;br /&gt;
# Run container (two options to start a container)&lt;br /&gt;
singularity run [options] &amp;lt;container&amp;gt;&lt;br /&gt;
singularity exec [options] &amp;lt;container&amp;gt; &amp;lt;command&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=red&amp;gt;Keep in mind that other modules you may have loaded will not be available inside the container.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Using GPUs ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
[…]&lt;br /&gt;
# Allocate one GPU per node&lt;br /&gt;
#SBATCH --partition=gpu&lt;br /&gt;
#SBATCH --gres=gpu:1&lt;br /&gt;
[…]&lt;br /&gt;
&lt;br /&gt;
module load your/singularity/version #(not needed on JUSTUS 2, but could be necessary on other system)&lt;br /&gt;
&lt;br /&gt;
cd your/workspace&lt;br /&gt;
&lt;br /&gt;
# Run container (two options to start a container)&lt;br /&gt;
singularity run --nv [options] &amp;lt;container&amp;gt;&lt;br /&gt;
singularity exec --nv [options] &amp;lt;container&amp;gt; &amp;lt;command&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using the flag is advisable, but may be omitted if the correct GPU- and driver-APIs are available on the container.&lt;br /&gt;
&lt;br /&gt;
= Examples =&lt;br /&gt;
&lt;br /&gt;
== Run your first container on JUSTUS 2 ==&lt;br /&gt;
&lt;br /&gt;
Build a TensorFlow container with Singularity and execute a Python command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# request interactive node with GPUs&lt;br /&gt;
$ srun --nodes=1 --exclusive --gres=gpu:2 --pty bash&lt;br /&gt;
&lt;br /&gt;
# create workspace and navigate into it&lt;br /&gt;
$ WORKSPACE=`ws_allocate tensorflow 3`&lt;br /&gt;
$ cd $WORKSPACE&lt;br /&gt;
&lt;br /&gt;
# build container&lt;br /&gt;
$ singularity build tensorflow-20.11-tf2-py3.sif docker://nvcr.io/nvidia/tensorflow:20.11-tf2-py3&lt;br /&gt;
&lt;br /&gt;
# execute Python command&lt;br /&gt;
$ singularity exec --nv tensorflow-20.11-tf2-py3.sif python -c &#039;import tensorflow as tf; \&lt;br /&gt;
  print(&amp;quot;Num GPUs Available: &amp;quot;,len(tf.config.experimental.list_physical_devices(&amp;quot;GPU&amp;quot;)))&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Ready-to-use containers can be pulled from the [https://ngc.nvidia.com/catalog/containers NVIDIA GPU CLOUD (NGC)] catalog.&lt;br /&gt;
&lt;br /&gt;
== NGC environment modules on JUSTUS 2 ==&lt;br /&gt;
&lt;br /&gt;
1) Prepare a workspace to store the container&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ srun --nodes=1 --exclusive --gres=gpu:2 --pty bash&lt;br /&gt;
$ WORKSPACE=`ws_allocate ngc 3`&lt;br /&gt;
$ cd $WORKSPACE&lt;br /&gt;
$ export NGC_IMAGE_DIR=$(pwd)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;font color=red&amp;gt;Important: Containers can only run in workspaces.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2) PyTorch container&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load ngc/.numlib&lt;br /&gt;
$ module load 20.12-torch-py3&lt;br /&gt;
$ python3&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; import torch&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; x = torch.randn(2,3)&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; print(x)&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; quit()&lt;br /&gt;
$ module unload 20.12-torch-py3&lt;br /&gt;
$ module unload ngc/.numlib&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Use the container in the same manner as an interactive shell.&lt;br /&gt;
&lt;br /&gt;
3) LAMMPS container&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load ngc/.chem&lt;br /&gt;
$ module avail&lt;br /&gt;
$ module load 29Oct2020&lt;br /&gt;
$ wget https://lammps.sandia.gov/inputs/in.lj.txt&lt;br /&gt;
$ export SINGULARITY_BINDPATH=$(pwd)&lt;br /&gt;
$ mpirun -n 2 lmp -in in.lj.txt -var x 8 -var y 8 -var z 8 -k on g 2 -sf kk -pk kokkos cuda/aware on neigh full \&lt;br /&gt;
  comm device binsize 2.8&lt;br /&gt;
$ module unload 29Oct2020&lt;br /&gt;
$ module unload ngc/.chem&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Use &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;SINGULARITY_BINDPATH=&amp;lt;PATH&amp;gt;&amp;lt;/span&amp;gt; to mount the directory with the input file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Currently, &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;module load ngc/.numlib&amp;lt;/span&amp;gt; for numeric libraries and &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;module load ngc/.chem&amp;lt;/span&amp;gt; for chemistry programs can be selected.&lt;br /&gt;
&lt;br /&gt;
== Batch jobs with containers on JUSTUS 2 ==&lt;br /&gt;
&lt;br /&gt;
Run a GROMACS container with Singularity as a batch job:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ WORKSPACE=`ws_allocate gromacs 3`                                         # allocate workspace&lt;br /&gt;
$ cd $WORKSPACE                                                             # change to workspace&lt;br /&gt;
$ singularity pull gromacs-2020_2.sif docker://nvcr.io/hpc/gromacs:2020.2   # pull container from NGC&lt;br /&gt;
$ cp -r /opt/bwhpc/common/chem/ngc/gromacs/ ./bwhpc-examples/               # copy example to workspace&lt;br /&gt;
$ cd ./bwhpc-examples                                                       # change to example directory&lt;br /&gt;
$ sbatch gromacs-2020.2_gpu.slurm                                           # submit job&lt;br /&gt;
$ squeue                                                                    # obtain JOBID&lt;br /&gt;
$ scontrol show job &amp;lt;JOBID&amp;gt;                                                 # check state of job&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
More batch job examples are located at &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;/opt/bwhpc/common/chem/ngc&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
= Useful links =&lt;br /&gt;
&lt;br /&gt;
* [https://sylabs.io/docs/ Documentation (english)]&lt;br /&gt;
* [https://de.wikipedia.org/wiki/Singularity_(Software) Wikipedia article (german)]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Singularity_(software) Wikipedia article (english)]&lt;br /&gt;
----&lt;br /&gt;
[[Category:Software]]&lt;/div&gt;</summary>
		<author><name>F Wagner</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=JUSTUS2/Software/Singularity&amp;diff=10337</id>
		<title>JUSTUS2/Software/Singularity</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=JUSTUS2/Software/Singularity&amp;diff=10337"/>
		<updated>2022-05-11T18:02:02Z</updated>

		<summary type="html">&lt;p&gt;F Wagner: /* NGC environment modules on JUSTUS 2 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=760px 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;
| system/singularity&lt;br /&gt;
|-&lt;br /&gt;
| License&lt;br /&gt;
| Open-source software, distributed under the 3-clause BSD License. [[#License|More...]]&lt;br /&gt;
|-&lt;br /&gt;
| Citing&lt;br /&gt;
| ---&lt;br /&gt;
|-&lt;br /&gt;
| Links&lt;br /&gt;
| [https://sylabs.io/singularity/ Homepage] &amp;amp;#124; [https://sylabs.io/docs/ Documentation]&lt;br /&gt;
|-&lt;br /&gt;
| Graphical Interface&lt;br /&gt;
| No&lt;br /&gt;
|}&lt;br /&gt;
= Description =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Singularity&#039;&#039;&#039; is a container platform.&lt;br /&gt;
&lt;br /&gt;
= License =&lt;br /&gt;
&lt;br /&gt;
Singularity is free, open-source software released under the 3-clause BSD license. Please read the [https://sylabs.io/guides/3.7/user-guide/license.html license] for additional information about Singularity.&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 Singularity with the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load system/singularity&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you wish to load another (older) version of Singularity, you can do so using&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load system/singularity/&amp;lt;version&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
with &amp;lt;version&amp;gt; specifying the desired version.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=red&amp;gt;Important: On JUSTUS 2, Singularity is available on all compute nodes. You do not have to load a module.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Program Binaries ==&lt;br /&gt;
&lt;br /&gt;
The binary &#039;&#039;singularity&#039;&#039; is main program of the container platform.&lt;br /&gt;
&lt;br /&gt;
To get help using Singularity execute the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ singularity --help&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Furthermore, a man page is available and can be accessed by typing:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ man singularity&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For additional information about how to use Singularity, please consult the [https://sylabs.io/docs/ documentation].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=red&amp;gt;Important: On JUSTUS 2, Singularity is only available on compute nodes. You must switch to such a node to invoke any &#039;&#039;singularity&#039;&#039; commands.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Batch jobs with containers ==&lt;br /&gt;
&lt;br /&gt;
Batch jobs utilizing Singularity containers are generally built the same way as all other [https://wiki.bwhpc.de/e/BwForCluster_JUSTUS_2_Slurm_HOWTO#How_to_submit_a_batch_job.3F batch jobs], where the job script contains &#039;&#039;singularity&#039;&#039; commands. For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
# Allocate one node&lt;br /&gt;
#SBATCH --nodes=1&lt;br /&gt;
# Number of program instances to be executed&lt;br /&gt;
#SBATCH --tasks-per-node=4&lt;br /&gt;
# 8 GB memory required per node&lt;br /&gt;
#SBATCH --mem=16G&lt;br /&gt;
# Maximum run time of job&lt;br /&gt;
#SBATCH --time=1:00:00&lt;br /&gt;
# Give job a reasonable name&lt;br /&gt;
#SBATCH --job-name=Singularity&lt;br /&gt;
# File name for standard output (%j will be replaced by job id)&lt;br /&gt;
#SBATCH --output=singularity_job-%j.out&lt;br /&gt;
# File name for error output&lt;br /&gt;
#SBATCH --error=singularity_job-%j.err&lt;br /&gt;
&lt;br /&gt;
module load your/singularity/version #(not needed on JUSTUS 2, but could be necessary on other system)&lt;br /&gt;
&lt;br /&gt;
cd your/workspace&lt;br /&gt;
&lt;br /&gt;
# Run container (two options to start a container)&lt;br /&gt;
singularity run [options] &amp;lt;container&amp;gt;&lt;br /&gt;
singularity exec [options] &amp;lt;container&amp;gt; &amp;lt;command&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=red&amp;gt;Keep in mind that other modules you may have loaded will not be available inside the container.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Using GPUs ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
[…]&lt;br /&gt;
# Allocate one GPU per node&lt;br /&gt;
#SBATCH --partition=gpu&lt;br /&gt;
#SBATCH --gres=gpu:1&lt;br /&gt;
[…]&lt;br /&gt;
&lt;br /&gt;
module load your/singularity/version #(not needed on JUSTUS 2, but could be necessary on other system)&lt;br /&gt;
&lt;br /&gt;
cd your/workspace&lt;br /&gt;
&lt;br /&gt;
# Run container (two options to start a container)&lt;br /&gt;
singularity run --nv [options] &amp;lt;container&amp;gt;&lt;br /&gt;
singularity exec --nv [options] &amp;lt;container&amp;gt; &amp;lt;command&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using the flag is advisable, but may be omitted if the correct GPU- and driver-APIs are available on the container.&lt;br /&gt;
&lt;br /&gt;
= Examples =&lt;br /&gt;
&lt;br /&gt;
== Run your first container on JUSTUS 2 ==&lt;br /&gt;
&lt;br /&gt;
Build a TensorFlow container with Singularity and execute a Python command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# request interactive node with GPUs&lt;br /&gt;
$ srun --nodes=1 --exclusive --gres=gpu:2 --pty bash&lt;br /&gt;
&lt;br /&gt;
# create workspace and navigate into it&lt;br /&gt;
$ WORKSPACE=`ws_allocate tensorflow 3`&lt;br /&gt;
$ cd $WORKSPACE&lt;br /&gt;
&lt;br /&gt;
# build container&lt;br /&gt;
$ singularity build tensorflow-20.11-tf2-py3.sif docker://nvcr.io/nvidia/tensorflow:20.11-tf2-py3&lt;br /&gt;
&lt;br /&gt;
# execute Python command&lt;br /&gt;
$ singularity exec --nv tensorflow-20.11-tf2-py3.sif python -c &#039;import tensorflow as tf; \&lt;br /&gt;
  print(&amp;quot;Num GPUs Available: &amp;quot;,len(tf.config.experimental.list_physical_devices(&amp;quot;GPU&amp;quot;)))&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Ready-to-use containers can be pulled from the [https://ngc.nvidia.com/catalog/containers NVIDIA GPU CLOUD (NGC)] catalog.&lt;br /&gt;
&lt;br /&gt;
== NGC environment modules on JUSTUS 2 ==&lt;br /&gt;
&lt;br /&gt;
1) Prepare a workspace to store the container&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ srun --nodes=1 --exclusive --gres=gpu:2 --pty bash&lt;br /&gt;
$ WORKSPACE=`ws_allocate ngc 3`&lt;br /&gt;
$ cd $WORKSPACE&lt;br /&gt;
$ export NGC_IMAGE_DIR=$(pwd)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;font color=red&amp;gt;Important: Containers can only run in workspaces.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2) PyTorch container&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load ngc/.numlib&lt;br /&gt;
$ module load 20.12-torch-py3&lt;br /&gt;
$ python3&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; import torch&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; x = torch.randn(2,3)&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; print(x)&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; quit()&lt;br /&gt;
$ module unload 20.12-torch-py3&lt;br /&gt;
$ module unload ngc/.numlib&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Use the container in the same manner as an interactive shell.&lt;br /&gt;
&lt;br /&gt;
3) LAMMPS container&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load ngc/.chem&lt;br /&gt;
$ module load 29Oct2020&lt;br /&gt;
$ wget https://lammps.sandia.gov/inputs/in.lj.txt&lt;br /&gt;
$ export SINGULARITY_BINDPATH=$(pwd)&lt;br /&gt;
$ mpirun -n 2 lmp -in in.lj.txt -var x 8 -var y 8 -var z 8 -k on g 2 -sf kk -pk kokkos cuda/aware on neigh full \&lt;br /&gt;
  comm device binsize 2.8&lt;br /&gt;
$ module unload 29Oct2020&lt;br /&gt;
$ module unload ngc/.chem&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Use &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;SINGULARITY_BINDPATH=&amp;lt;PATH&amp;gt;&amp;lt;/span&amp;gt; to mount the directory with the input file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Currently, &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;module load ngc/.numlib&amp;lt;/span&amp;gt; for numeric libraries and &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;module load ngc/.chem&amp;lt;/span&amp;gt; for chemistry programs can be selected.&lt;br /&gt;
&lt;br /&gt;
== Batch jobs with containers on JUSTUS 2 ==&lt;br /&gt;
&lt;br /&gt;
Run a GROMACS container with Singularity as a batch job:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ WORKSPACE=`ws_allocate gromacs 3`                                         # allocate workspace&lt;br /&gt;
$ cd $WORKSPACE                                                             # change to workspace&lt;br /&gt;
$ singularity pull gromacs-2020_2.sif docker://nvcr.io/hpc/gromacs:2020.2   # pull container from NGC&lt;br /&gt;
$ cp -r /opt/bwhpc/common/chem/ngc/gromacs/ ./bwhpc-examples/               # copy example to workspace&lt;br /&gt;
$ cd ./bwhpc-examples                                                       # change to example directory&lt;br /&gt;
$ sbatch gromacs-2020.2_gpu.slurm                                           # submit job&lt;br /&gt;
$ squeue                                                                    # obtain JOBID&lt;br /&gt;
$ scontrol show job &amp;lt;JOBID&amp;gt;                                                 # check state of job&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
More batch job examples are located at &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;/opt/bwhpc/common/chem/ngc&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
= Useful links =&lt;br /&gt;
&lt;br /&gt;
* [https://sylabs.io/docs/ Documentation (english)]&lt;br /&gt;
* [https://de.wikipedia.org/wiki/Singularity_(Software) Wikipedia article (german)]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Singularity_(software) Wikipedia article (english)]&lt;br /&gt;
----&lt;br /&gt;
[[Category:Software]]&lt;/div&gt;</summary>
		<author><name>F Wagner</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=Development/General_compiler_usage&amp;diff=10078</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=10078"/>
		<updated>2022-02-23T20:33:11Z</updated>

		<summary type="html">&lt;p&gt;F Wagner: /* Optimization */&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 or compiler/intel or compiler/llvm and others...  &lt;br /&gt;
|-&lt;br /&gt;
| License&lt;br /&gt;
| [[Intel_Compiler|Intel]]: Commercial &amp;amp;#124; [[GCC|GNU]]: GPL &amp;amp;#124; LLVM: Apache 2 &amp;amp;#124; PGI/NVIDIA: Commercial&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Description =&lt;br /&gt;
&lt;br /&gt;
Basically, compilers translate human-readable source code (e.g. C++ interpreted as adhering to ISO/IEC 14882:2014, encoded in UTF-8 text) into binary byte code (e.g. x86-64 with Linux ABI in ELF-format).&lt;br /&gt;
Compilers are complex software and have become very powerful in the last decades, to &#039;&#039;&#039;guide&#039;&#039;&#039; you as a programmer writing better, more portable, more performant programs. Use the compiler as a tool -- and best use multiple compilers on the same source code for best results.&lt;br /&gt;
The basic operations and hints can be performed with the same or similar commands on 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;
&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;
&lt;br /&gt;
= Loading compilers as modules =&lt;br /&gt;
&lt;br /&gt;
Modules and loading of modules is described [[Software_Modules_Lmod|here for Lmod]] and [[Environment_Modules|here for traditional Environment Modules]].&lt;br /&gt;
&lt;br /&gt;
However, modules need to be mentioned, since on any system there&#039;s a pre-installed set of compilers (for C, C++ and usually Fortran), which are provided by the Linux distribution -- the so-called system compilers. Which however may lack certain options for optimization, for warnings or other features. On RedHat Enterprise Linux this is GNU compiler v8.3.1.&lt;br /&gt;
Be advised to check out the newer compilers available as modules.&lt;br /&gt;
&lt;br /&gt;
Since Fortran (and very old C++) requires compiling and linking libraries with the very same compiler, many libraries, first-and-foremost the MPI libraries need to be provided for specific versions of a compiler.&lt;br /&gt;
On [[BwUniCluster_2.0]], these provided libraries will only be visible to &amp;lt;kbd&amp;gt;module avail&amp;lt;kbd&amp;gt;, once a compiler is loaded.&lt;br /&gt;
Hence, check out loading&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module avail compiler/intel&lt;br /&gt;
...&lt;br /&gt;
$ module load compiler/intel/2021.4.0&lt;br /&gt;
...&lt;br /&gt;
$ module avail&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
to see the available modules.&lt;br /&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;
&lt;br /&gt;
&lt;br /&gt;
== Linux Default Compiler ==&lt;br /&gt;
&lt;br /&gt;
The default Compiler installed on all compute nodes is the GNU Compiler Collection (GCC) or in short GNU compiler.&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 purge                     # unload all modules&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) 8.3.1 20191121 (Red Hat 8.3.1-5)&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/10.2(default)&lt;br /&gt;
$ gcc --version                    # now, check the current (loaded) module&lt;br /&gt;
gcc (GCC) 10.2.0&lt;br /&gt;
[...]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Synoptical Tables =&lt;br /&gt;
&lt;br /&gt;
== Compilers (no MPI) ==&lt;br /&gt;
&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;LLVM&amp;lt;/big&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
| C&lt;br /&gt;
| clang&lt;br /&gt;
|-&lt;br /&gt;
| C++&lt;br /&gt;
| clang++&lt;br /&gt;
|-&lt;br /&gt;
| Fortran 77/90&lt;br /&gt;
| flang&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/NVIDIA&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;
&lt;br /&gt;
&lt;br /&gt;
== MPI compiler and Underlying Compilers ==&lt;br /&gt;
&lt;br /&gt;
MPI implementations such as MPIch, Intel-MPI (derived from MPIch) or Open MPI provide compiler wrappers, easing the usage of MPI by providing the Include-Directory &amp;lt;kbd&amp;gt;-I&amp;lt;/kbd&amp;gt; and require libraries for linking.&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;
&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;
&lt;br /&gt;
= How to use =&lt;br /&gt;
&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;
&lt;br /&gt;
== Commands ==&lt;br /&gt;
&lt;br /&gt;
The typical introduction is a &amp;quot;Hello World&amp;quot; program. The following C source code shows best practices:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;                   // for printf&lt;br /&gt;
#include &amp;lt;stdlib.h&amp;gt;                  // for EXIT_SUCCESS and EXIT_FAILURE&lt;br /&gt;
int main (int argc, char * argv[]) { // std. definition of a program taking arguments&lt;br /&gt;
    printf(&amp;quot;Hello World\n&amp;quot;);         // Unix Output is line-buffered, end line with New-line.&lt;br /&gt;
    return EXIT_SUCCESS;             // End program by returning 0 (No Error)&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
It may 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;
&lt;br /&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 &amp;lt;kbd&amp;gt;-I&amp;lt;/kbd&amp;gt;) and where the &lt;br /&gt;
* library files are (option &amp;lt;kbd&amp;gt;-L&amp;lt;/kbd&amp;gt;). &lt;br /&gt;
In addition you have to tell the compiler which &lt;br /&gt;
* library you want to use (option &amp;lt;kbd&amp;gt;-l&amp;lt;/kbd&amp;gt;). &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 all warning messages &amp;lt;kbd&amp;gt;-Wall&amp;lt;/kbd&amp;gt; and adding flags for debugging &amp;lt;kbd&amp;gt;-g&amp;lt;/kbd&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ icc -Wall -g hello.c -o hello&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Debugger ==&lt;br /&gt;
&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;
&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 &amp;lt;kbd&amp;gt;-g&amp;lt;/kbd&amp;gt;)&amp;lt;/font&amp;gt;:&lt;br /&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 the compiler option &amp;lt;kbd&amp;gt;-Wall&amp;lt;/kbd&amp;gt; (and possibly others) should always be set, the &amp;lt;kbd&amp;gt;-g&amp;lt;/kbd&amp;gt; option should only be passed for&lt;br /&gt;
debugging purposes to find bugs.&lt;br /&gt;
It may slow down execution and enlarges the binary due to debugging symbols.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Optimization ==&lt;br /&gt;
&lt;br /&gt;
The usual and common way to compile your source is to apply compiler optimization.&lt;br /&gt;
&lt;br /&gt;
Since there are many optimization options, as a start 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;
&lt;br /&gt;
&lt;br /&gt;
All compilers offer a multitude of optimization options, &lt;br /&gt;
one may check the complete list of options with short explanation on [[GCC|GCC]], [[LLVM|LLVM]] 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;&lt;br /&gt;
$ icc -v --help | less&lt;br /&gt;
$ gcc -v --help | less&lt;br /&gt;
$ clang -v --help | less&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please note, that the optimization level &amp;lt;kbd&amp;gt;-O2&amp;lt;/kbd&amp;gt; produces code for a general instruction set.&lt;br /&gt;
If you want to set the instruction set available, and take advantage of AVX2 or AVX512f, you have to&lt;br /&gt;
either add the machine-dependent &amp;lt;kbd&amp;gt;-mavx512f&amp;lt;/kbd&amp;gt; or set the specific architecture of your&lt;br /&gt;
target processor.&lt;br /&gt;
For [[BwUniCluster_2.0]] this depends on whether you run your application on any node, then you would select&lt;br /&gt;
the older Broadwell CPU, or whether You target the newer HPC nodes (which feature Xeon Gold 6230, aka &amp;quot;Cascade Lake&amp;quot;&lt;br /&gt;
architecture.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gcc -O2 -o hello hello.c                        # General optimization for any architecture&lt;br /&gt;
$ gcc -O2 -march=broadwell -o hello hello.c       # Will work on any compute node on bwUniCluster 2.0&lt;br /&gt;
$ gcc -O2 -march=cascadelake -o hello hello.c     # This may not run on Broadwell nodes&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
While adding &amp;lt;kbd&amp;gt;-march=broadwell&amp;lt;/kbd&amp;gt; adds the compiler options such as &amp;lt;kbd&amp;gt;-mavx -mavx2 -msse3 -msse4 -msse4.1 -msse4.2 -mssse3&amp;lt;/kbd&amp;gt;,&lt;br /&gt;
adding &amp;lt;kbd&amp;gt;-march=cascadelake&amp;lt;/kbd&amp;gt; will further this by &amp;lt;kbd&amp;gt;-mavx512bw -mavx512cd -mavx512dq -mavx512f -mavx512vl -mavx512vnni -mfma&amp;lt;/kbd&amp;gt;,&lt;br /&gt;
where &amp;lt;kbd&amp;gt;-mfma&amp;lt;/kbd&amp;gt; is the setting for allowing fused-multiply-add.&lt;br /&gt;
These options may provide considerable speed-up to your code as is.&lt;br /&gt;
&#039;&#039;&#039;Please note&#039;&#039;&#039; however, that Cascade Lake may throttle the processor&#039;s clock speed, when executing AVX-512 instructions, hence running slower than&lt;br /&gt;
(older) AVX2 code paths would have.&lt;br /&gt;
&lt;br /&gt;
For GCC the options in use are best visible by calling &amp;lt;kbd&amp;gt;gcc -O2 -fverbose-asm -S -o hello.S hello.c&amp;lt;/kbd&amp;gt;.&lt;br /&gt;
The option &amp;lt;kbd&amp;gt;-fverbose-asm&amp;lt;/kbd&amp;gt; stores all the options in the assembler file &amp;lt;kbd&amp;gt;hello.S&amp;lt;/kbd&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You should then pay attention to vectorization attained by the compiler -- and concentrate on the time-consuming loops,&lt;br /&gt;
where the compiler was not able to vectorize.&lt;br /&gt;
This information is available with the Intel compiler using &amp;lt;kbd&amp;gt;-qopt-report=5&amp;lt;/kbd&amp;gt; producing a lot of output in &amp;lt;kbd&amp;gt;hello.optrpt&amp;lt;/kbd&amp;gt;,&lt;br /&gt;
while GCC offers this information using &amp;lt;kbd&amp;gt;-fopt-info-all&amp;lt;/kbd&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Warnings and Error detection ==&lt;br /&gt;
All compilers have improved tremendously with regards to analyzing and detecting suspicious code: do make &#039;&#039;&#039;use&#039;&#039;&#039; of such warnings and hints.&lt;br /&gt;
The amount of false positives has reduced and it will make your code more accessible, less error-prone and more portable.&lt;br /&gt;
&lt;br /&gt;
The typical warning flags are &amp;lt;kbd&amp;gt;-Wall&amp;lt;/kbd&amp;gt; to turn on &#039;&#039;all&#039;&#039; warnings.&lt;br /&gt;
However, there&#039;s multiple other worthwhile warnings, which are not covered (since they might increase false positives, or since they are not yet considered so prominent).&lt;br /&gt;
E.g. &amp;lt;kbd&amp;gt;-Wextra&amp;lt;/kbd&amp;gt; turns on several other warnings, which will in the above example show that neither &amp;lt;kbd&amp;gt;argc&amp;lt;/kbd&amp;gt; nor &amp;lt;kbd&amp;gt;argv&amp;lt;/kbd&amp;gt; have been used inside of &amp;lt;kbd&amp;gt;main&amp;lt;/kbd&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
For LLVM&#039;s &amp;lt;kbd&amp;gt;clang&amp;lt;/kbd&amp;gt; the flag &amp;lt;kbd&amp;gt;-Weverything&amp;lt;/kbd&amp;gt; turns on all available warnings, albeit leading to many warnings on larger projects.&lt;br /&gt;
However, the fix-it hints are very helpful as well.&lt;br /&gt;
&lt;br /&gt;
All the compilers offer the flag &amp;lt;kbd&amp;gt;-Werror&amp;lt;/kbd&amp;gt; which turns any warning (allowing completion of compilation) into hard errors.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:static_code_analysis.png|right|border|513px|Copyright: HS Esslingen)]]&lt;br /&gt;
Another powerful feature available in GNU- and LLVM-compilers is &#039;&#039;static code analysis&#039;&#039;&#039;, otherwise only available in Commercial tools, like [https://www.synopsys.com/software-integrity/security-testing/static-analysis-sast.html|Coverity].&lt;br /&gt;
Static code analysis evaluates &#039;&#039;&#039;each&#039;&#039;&#039; and &#039;&#039;&#039;every&#039;&#039;&#039; code path, making assumptions on input values and branches taken, detecting corner cases which might lead to real errors -- without having to actually execute this code path.&lt;br /&gt;
For GCC this is turned on using &amp;lt;kbd&amp;gt;-fanalyzer&amp;lt;/kbd&amp;gt; which will detect e.g. cases of memory usage after a &amp;lt;kbd&amp;gt;free()&amp;lt;/kbd&amp;gt; of said memory and many others.&lt;br /&gt;
For LLVM recompile your project using &amp;lt;kbd&amp;gt;scan-build&amp;lt;/kbd&amp;gt;, e.g.:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ scan-build make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This produces warnings on &amp;lt;kbd&amp;gt;stdout&amp;lt;/kbd&amp;gt;, but more importantly scan reports in directory &amp;lt;kbd&amp;gt;/scratch/scan-build-XXX&amp;lt;/kbd&amp;gt;, where XXX is date and time of the build.&lt;br /&gt;
For example the output of Open MPI includes real issues of missed memory releases in error code paths:&lt;br /&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>F Wagner</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=Development/General_compiler_usage&amp;diff=10077</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=10077"/>
		<updated>2022-02-23T20:27:39Z</updated>

		<summary type="html">&lt;p&gt;F Wagner: &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 or compiler/intel or compiler/llvm and others...  &lt;br /&gt;
|-&lt;br /&gt;
| License&lt;br /&gt;
| [[Intel_Compiler|Intel]]: Commercial &amp;amp;#124; [[GCC|GNU]]: GPL &amp;amp;#124; LLVM: Apache 2 &amp;amp;#124; PGI/NVIDIA: Commercial&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Description =&lt;br /&gt;
&lt;br /&gt;
Basically, compilers translate human-readable source code (e.g. C++ interpreted as adhering to ISO/IEC 14882:2014, encoded in UTF-8 text) into binary byte code (e.g. x86-64 with Linux ABI in ELF-format).&lt;br /&gt;
Compilers are complex software and have become very powerful in the last decades, to &#039;&#039;&#039;guide&#039;&#039;&#039; you as a programmer writing better, more portable, more performant programs. Use the compiler as a tool -- and best use multiple compilers on the same source code for best results.&lt;br /&gt;
The basic operations and hints can be performed with the same or similar commands on 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;
&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;
&lt;br /&gt;
= Loading compilers as modules =&lt;br /&gt;
&lt;br /&gt;
Modules and loading of modules is described [[Software_Modules_Lmod|here for Lmod]] and [[Environment_Modules|here for traditional Environment Modules]].&lt;br /&gt;
&lt;br /&gt;
However, modules need to be mentioned, since on any system there&#039;s a pre-installed set of compilers (for C, C++ and usually Fortran), which are provided by the Linux distribution -- the so-called system compilers. Which however may lack certain options for optimization, for warnings or other features. On RedHat Enterprise Linux this is GNU compiler v8.3.1.&lt;br /&gt;
Be advised to check out the newer compilers available as modules.&lt;br /&gt;
&lt;br /&gt;
Since Fortran (and very old C++) requires compiling and linking libraries with the very same compiler, many libraries, first-and-foremost the MPI libraries need to be provided for specific versions of a compiler.&lt;br /&gt;
On [[BwUniCluster_2.0]], these provided libraries will only be visible to &amp;lt;kbd&amp;gt;module avail&amp;lt;kbd&amp;gt;, once a compiler is loaded.&lt;br /&gt;
Hence, check out loading&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module avail compiler/intel&lt;br /&gt;
...&lt;br /&gt;
$ module load compiler/intel/2021.4.0&lt;br /&gt;
...&lt;br /&gt;
$ module avail&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
to see the available modules.&lt;br /&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;
&lt;br /&gt;
&lt;br /&gt;
== Linux Default Compiler ==&lt;br /&gt;
&lt;br /&gt;
The default Compiler installed on all compute nodes is the GNU Compiler Collection (GCC) or in short GNU compiler.&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 purge                     # unload all modules&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) 8.3.1 20191121 (Red Hat 8.3.1-5)&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/10.2(default)&lt;br /&gt;
$ gcc --version                    # now, check the current (loaded) module&lt;br /&gt;
gcc (GCC) 10.2.0&lt;br /&gt;
[...]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Synoptical Tables =&lt;br /&gt;
&lt;br /&gt;
== Compilers (no MPI) ==&lt;br /&gt;
&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;LLVM&amp;lt;/big&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
| C&lt;br /&gt;
| clang&lt;br /&gt;
|-&lt;br /&gt;
| C++&lt;br /&gt;
| clang++&lt;br /&gt;
|-&lt;br /&gt;
| Fortran 77/90&lt;br /&gt;
| flang&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/NVIDIA&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;
&lt;br /&gt;
&lt;br /&gt;
== MPI compiler and Underlying Compilers ==&lt;br /&gt;
&lt;br /&gt;
MPI implementations such as MPIch, Intel-MPI (derived from MPIch) or Open MPI provide compiler wrappers, easing the usage of MPI by providing the Include-Directory &amp;lt;kbd&amp;gt;-I&amp;lt;/kbd&amp;gt; and require libraries for linking.&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;
&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;
&lt;br /&gt;
= How to use =&lt;br /&gt;
&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;
&lt;br /&gt;
== Commands ==&lt;br /&gt;
&lt;br /&gt;
The typical introduction is a &amp;quot;Hello World&amp;quot; program. The following C source code shows best practices:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;                   // for printf&lt;br /&gt;
#include &amp;lt;stdlib.h&amp;gt;                  // for EXIT_SUCCESS and EXIT_FAILURE&lt;br /&gt;
int main (int argc, char * argv[]) { // std. definition of a program taking arguments&lt;br /&gt;
    printf(&amp;quot;Hello World\n&amp;quot;);         // Unix Output is line-buffered, end line with New-line.&lt;br /&gt;
    return EXIT_SUCCESS;             // End program by returning 0 (No Error)&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
It may 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;
&lt;br /&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 &amp;lt;kbd&amp;gt;-I&amp;lt;/kbd&amp;gt;) and where the &lt;br /&gt;
* library files are (option &amp;lt;kbd&amp;gt;-L&amp;lt;/kbd&amp;gt;). &lt;br /&gt;
In addition you have to tell the compiler which &lt;br /&gt;
* library you want to use (option &amp;lt;kbd&amp;gt;-l&amp;lt;/kbd&amp;gt;). &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 all warning messages &amp;lt;kbd&amp;gt;-Wall&amp;lt;/kbd&amp;gt; and adding flags for debugging &amp;lt;kbd&amp;gt;-g&amp;lt;/kbd&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ icc -Wall -g hello.c -o hello&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Debugger ==&lt;br /&gt;
&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;
&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 &amp;lt;kbd&amp;gt;-g&amp;lt;/kbd&amp;gt;)&amp;lt;/font&amp;gt;:&lt;br /&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 the compiler option &amp;lt;kbd&amp;gt;-Wall&amp;lt;/kbd&amp;gt; (and possibly others) should always be set, the &amp;lt;kbd&amp;gt;-g&amp;lt;/kbd&amp;gt; option should only be passed for&lt;br /&gt;
debugging purposes to find bugs.&lt;br /&gt;
It may slow down execution and enlarges the binary due to debugging symbols.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Optimization ==&lt;br /&gt;
&lt;br /&gt;
The usual and common way to compile your source is to apply compiler optimization.&lt;br /&gt;
&lt;br /&gt;
Since there are many optimization options, as a start 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;
&lt;br /&gt;
&lt;br /&gt;
All compilers offer a multitude of optimization options, &lt;br /&gt;
one may check the complete list of options with short explanation on [[GCC|GCC]], [[LLVM|LLVM]] 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;&lt;br /&gt;
$ icc -v --help | less&lt;br /&gt;
$ gcc -v --help | less&lt;br /&gt;
$ clang -v --help | less&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please note, that the optimization level &amp;lt;kbd&amp;gt;-O2&amp;lt;/kbd&amp;gt; produces code for a general instruction set.&lt;br /&gt;
If You want to set the instruction set available, and take advantage of AVX2 or AVX512f, You have to&lt;br /&gt;
either add the machine-dependent &amp;lt;kbd&amp;gt;-mavx512f&amp;lt;/kbd&amp;gt; or set the specific architecture of your&lt;br /&gt;
target processor.&lt;br /&gt;
For [[BwUniCluster_2.0]] this depends on whether you run your application on any node, then You would select&lt;br /&gt;
the older Broadwell CPU, or whether You target the newer HPC nodes (which feature Xeon Gold 6230, aka &amp;quot;Cascade Lake&amp;quot;&lt;br /&gt;
architecture.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gcc -O2 -o hello hello.c                        # General optimization for any architecture&lt;br /&gt;
$ gcc -O2 -march=broadwell -o hello hello.c       # Will work on any compute node on bwUniCluster 2.0&lt;br /&gt;
$ gcc -O2 -march=cascadelake -o hello hello.c     # This may not run on Broadwell nodes&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
While adding &amp;lt;kbd&amp;gt;-march=broadwell&amp;lt;/kbd&amp;gt; adds the compiler options such as &amp;lt;kbd&amp;gt;-mavx -mavx2 -msse3 -msse4 -msse4.1 -msse4.2 -mssse3&amp;lt;/kbd&amp;gt;,&lt;br /&gt;
adding &amp;lt;kbd&amp;gt;-march=cascadelake&amp;lt;/kbd&amp;gt; will further this by &amp;lt;kbd&amp;gt;-mavx512bw -mavx512cd -mavx512dq -mavx512f -mavx512vl -mavx512vnni -mfma&amp;lt;/kbd&amp;gt;,&lt;br /&gt;
where &amp;lt;kbd&amp;gt;-mfma&amp;lt;/kbd&amp;gt; is the setting for allowing fused-multiply-add.&lt;br /&gt;
These options may provide considerable speed-up to your code as is.&lt;br /&gt;
&#039;&#039;&#039;Please note&#039;&#039;&#039; however, that Cascade Lake may throttle the processor&#039;s clock speed, when executing AVX-512 instructions, hence running slower than&lt;br /&gt;
(older) AVX2 code paths would have.&lt;br /&gt;
&lt;br /&gt;
For GCC the options in use are best visible by calling &amp;lt;kbd&amp;gt;gcc -O2 -fverbose-asm -S -o hello.S hello.c&amp;lt;/kbd&amp;gt;.&lt;br /&gt;
The option &amp;lt;kbd&amp;gt;-fverbose-asm&amp;lt;/kbd&amp;gt; stores all the options in the assembler file &amp;lt;kbd&amp;gt;hello.S&amp;lt;/kbd&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You should then pay attention to vectorization attained by the compiler -- and concentrate on the time-consuming loops,&lt;br /&gt;
where the compiler was not able to vectorize.&lt;br /&gt;
This information is available with the Intel compiler using &amp;lt;kbd&amp;gt;-qopt-report=5&amp;lt;/kbd&amp;gt; producing a lot of output in &amp;lt;kbd&amp;gt;hello.optrpt&amp;lt;/kbd&amp;gt;,&lt;br /&gt;
while GCC offers this information using &amp;lt;kbd&amp;gt;-fopt-info-all&amp;lt;/kbd&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Warnings and Error detection ==&lt;br /&gt;
All compilers have improved tremendously with regards to analyzing and detecting suspicious code: do make &#039;&#039;&#039;use&#039;&#039;&#039; of such warnings and hints.&lt;br /&gt;
The amount of false positives has reduced and it will make your code more accessible, less error-prone and more portable.&lt;br /&gt;
&lt;br /&gt;
The typical warning flags are &amp;lt;kbd&amp;gt;-Wall&amp;lt;/kbd&amp;gt; to turn on &#039;&#039;all&#039;&#039; warnings.&lt;br /&gt;
However, there&#039;s multiple other worthwhile warnings, which are not covered (since they might increase false positives, or since they are not yet considered so prominent).&lt;br /&gt;
E.g. &amp;lt;kbd&amp;gt;-Wextra&amp;lt;/kbd&amp;gt; turns on several other warnings, which will in the above example show that neither &amp;lt;kbd&amp;gt;argc&amp;lt;/kbd&amp;gt; nor &amp;lt;kbd&amp;gt;argv&amp;lt;/kbd&amp;gt; have been used inside of &amp;lt;kbd&amp;gt;main&amp;lt;/kbd&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
For LLVM&#039;s &amp;lt;kbd&amp;gt;clang&amp;lt;/kbd&amp;gt; the flag &amp;lt;kbd&amp;gt;-Weverything&amp;lt;/kbd&amp;gt; turns on all available warnings, albeit leading to many warnings on larger projects.&lt;br /&gt;
However, the fix-it hints are very helpful as well.&lt;br /&gt;
&lt;br /&gt;
All the compilers offer the flag &amp;lt;kbd&amp;gt;-Werror&amp;lt;/kbd&amp;gt; which turns any warning (allowing completion of compilation) into hard errors.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:static_code_analysis.png|right|border|513px|Copyright: HS Esslingen)]]&lt;br /&gt;
Another powerful feature available in GNU- and LLVM-compilers is &#039;&#039;static code analysis&#039;&#039;&#039;, otherwise only available in Commercial tools, like [https://www.synopsys.com/software-integrity/security-testing/static-analysis-sast.html|Coverity].&lt;br /&gt;
Static code analysis evaluates &#039;&#039;&#039;each&#039;&#039;&#039; and &#039;&#039;&#039;every&#039;&#039;&#039; code path, making assumptions on input values and branches taken, detecting corner cases which might lead to real errors -- without having to actually execute this code path.&lt;br /&gt;
For GCC this is turned on using &amp;lt;kbd&amp;gt;-fanalyzer&amp;lt;/kbd&amp;gt; which will detect e.g. cases of memory usage after a &amp;lt;kbd&amp;gt;free()&amp;lt;/kbd&amp;gt; of said memory and many others.&lt;br /&gt;
For LLVM recompile your project using &amp;lt;kbd&amp;gt;scan-build&amp;lt;/kbd&amp;gt;, e.g.:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ scan-build make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This produces warnings on &amp;lt;kbd&amp;gt;stdout&amp;lt;/kbd&amp;gt;, but more importantly scan reports in directory &amp;lt;kbd&amp;gt;/scratch/scan-build-XXX&amp;lt;/kbd&amp;gt;, where XXX is date and time of the build.&lt;br /&gt;
For example the output of Open MPI includes real issues of missed memory releases in error code paths:&lt;br /&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>F Wagner</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=JUSTUS2/Software/Dalton&amp;diff=9915</id>
		<title>JUSTUS2/Software/Dalton</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=JUSTUS2/Software/Dalton&amp;diff=9915"/>
		<updated>2022-02-06T01:41:39Z</updated>

		<summary type="html">&lt;p&gt;F Wagner: /* Examples */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Softwarepage|chem/dalton}}&lt;br /&gt;
&lt;br /&gt;
{| width=760px 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/dalton&lt;br /&gt;
|-&lt;br /&gt;
| Availability&lt;br /&gt;
| [[BwForCluster_JUSTUS_2]]&lt;br /&gt;
|-&lt;br /&gt;
| License&lt;br /&gt;
| Open-source software, distributed under the GNU Lesser General Public License (LGPL). [[#License|More...]]&lt;br /&gt;
|-&lt;br /&gt;
| Citing&lt;br /&gt;
| [https://daltonprogram.org/citation/ Publications]&lt;br /&gt;
|-&lt;br /&gt;
| Links&lt;br /&gt;
| [http://www.daltonprogram.org/index.html Homepage] &amp;amp;#124; [https://daltonprogram.org/documentation/ Documentation]&lt;br /&gt;
|-&lt;br /&gt;
| Graphical Interface&lt;br /&gt;
| No&lt;br /&gt;
|}&lt;br /&gt;
= Description =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Dalton&#039;&#039;&#039; (named after [https://en.wikipedia.org/wiki/John_Dalton John Dalton]) is an ab initio quantum chemistry computer program designed to to allow convenient, automated determination of a large number of molecular properties based on an HF, HF-srDFT, DFT, MP2, CC, CI, MCSCF, or MC-srDFT reference wave function. For additional information on features please visit the [https://daltonprogram.org/features/ Description of the Dalton suite features] web page.&lt;br /&gt;
&lt;br /&gt;
= Availability =&lt;br /&gt;
&lt;br /&gt;
Dalton is available on selected bwHPC-Clusters. A complete list of versions currently installed on the bwHPC-Clusters can be obtained from the [https://www.bwhpc.de/software.html Cluster Information System (CIS)].&lt;br /&gt;
&lt;br /&gt;
In order to check which versions of Dalton are installed on the compute cluster, run the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module avail chem/dalton&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= License =&lt;br /&gt;
&lt;br /&gt;
Dalton is free, open-source software released under the GNU Lesser General Public License (LGPL). Anyone interested in using the Dalton program suite must read the conditions described in its [https://gitlab.com/dalton/dalton/-/blob/master/LICENSE license agreement].&lt;br /&gt;
&lt;br /&gt;
= Usage =&lt;br /&gt;
== Loading the module ==&lt;br /&gt;
&lt;br /&gt;
You can load the default version of Dalton with the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load chem/dalton&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The module will try to load all modules it needs to function (e.g., compiler, mpi, ...). If loading the module fails, check if you have already loaded one of those modules, but not in the version required by Dalton.&lt;br /&gt;
&lt;br /&gt;
If you wish to load another (older) version of Dalton, you can do so using&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load chem/dalton/&amp;lt;version&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
with &amp;lt;version&amp;gt; specifying the desired version.&lt;br /&gt;
&lt;br /&gt;
Please cite Dalton in your publications according to the [https://daltonprogram.org/citation/ references].&lt;br /&gt;
&lt;br /&gt;
== Program Binaries ==&lt;br /&gt;
&lt;br /&gt;
The binary &#039;&#039;dalton&#039;&#039; is main program of the Dalton package.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage: dalton [options] dalinp{.dal} [molinp{.mol} [potinp{.pot}] [pcmsolver{.pcm}]]&lt;br /&gt;
&lt;br /&gt;
Options:&lt;br /&gt;
 -w dir                : change job directory to dir (default: $HOME)&lt;br /&gt;
 -b dir                : prepend dir to directory list for basis set searches (job directory and dalton basis library&lt;br /&gt;
                         are included automatically)&lt;br /&gt;
 -o file               : redirect output from program to job directory with &amp;quot;file&amp;quot; as file name&lt;br /&gt;
 -ow                   : redirect output from program to job directory with standard file name&lt;br /&gt;
 -dal file             : the dalton input file&lt;br /&gt;
 -mol file             : the molecule input file&lt;br /&gt;
 -pot file             : the potential input file (for .QM3, .QMMM and .PELIB)&lt;br /&gt;
 -pcm file             : the pcm input file&lt;br /&gt;
 -ext log              : change default output extension from &amp;quot;.out&amp;quot; to &amp;quot;.log&amp;quot;&lt;br /&gt;
 -nobackup             : do not backup files, simply overwrite outputs&lt;br /&gt;
 -f dal_mol[_pot]      : extract dal_mol[_pot].tar.gz archive from WRKDIR into DALTON_TMPDIR before calculation&lt;br /&gt;
                         starts&lt;br /&gt;
 -noarch               : do not create tar.gz archive&lt;br /&gt;
 -t dir                : set scratch directory DALTON_TMPDIR; this script will append &#039;/DALTON_scratch_&amp;lt;USERNAME&amp;gt;&#039; to&lt;br /&gt;
                         the path unless the path contains &#039;DALTON_scratch&#039; or you explicitly set -noappend&lt;br /&gt;
 -d                    : delete job scratch directory before calculation starts&lt;br /&gt;
 -D                    : do not delete job scratch directory after calculation stops&lt;br /&gt;
 -noappend             : do not append anything to the scratch directory; be careful with this option since by&lt;br /&gt;
                         default scratch is wiped after calculation&lt;br /&gt;
 -get &amp;quot;file1 ...&amp;quot;      : get files back from DALTON_TMPDIR after calculation stops&lt;br /&gt;
 -put &amp;quot;file1 ...&amp;quot;      : put files to DALTON_TMPDIR before calculation starts&lt;br /&gt;
 -omp num              : set the number of OpenMP threads. Note that Dalton is not OpenMP parallelized, however, this&lt;br /&gt;
                         option can be used with e.g. threaded blas as MKL&lt;br /&gt;
 -N num |-np num       : use num MPI processes (defaults to 1, illegal if DALTON_LAUNCHER specified)&lt;br /&gt;
 -cpexe                : copy dalton.x to DALTON_TMPDIR before execution, either to global scratch (if&lt;br /&gt;
                         DALTON_USE_GLOBAL_SCRATCH is set) or to local scratch on all nodes&lt;br /&gt;
 -rsh                  : use rsh/rcp for communication with MPI nodes (default: ssh/scp)&lt;br /&gt;
 -nodelist &amp;quot;node1 ...&amp;quot; : set nodelist DALTON_NODELIST, dalton.x will be copied to DALTON_TMPDIR on each node unless&lt;br /&gt;
                         DALTON_USE_GLOBAL_SCRATCH is defined (the script uses PBS_NODEFILE or SLURM_NODELIST if&lt;br /&gt;
                         available)&lt;br /&gt;
 -x dalmol1 dalmol2    : calculate NEXAFS spectrum from ground and core hole states&lt;br /&gt;
 -exe exec             : change the executable from default ($DALTON_HOME/dalton/dalton.x) to exec&lt;br /&gt;
 -pg                   : do profiling with gprof&lt;br /&gt;
 -gb mem               : set dalton max usable work memory to mem Gigabytes (mem integer)&lt;br /&gt;
 -mb mem               : set dalton max usable work memory to mem Megabytes (mem integer)&lt;br /&gt;
 -ngb mem              : set node max usable work memory to mem Gigabytes (mem integer)&lt;br /&gt;
 -nmb mem              : set node max usable work memory to mem Megabytes (mem integer)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Hints for using Dalton ==&lt;br /&gt;
&lt;br /&gt;
=== Input Files ===&lt;br /&gt;
&lt;br /&gt;
For information about how to construct input files (dalinp{.dal} [molinp{.mol} [potinp{.pot}]]) for Dalton, please consult the [https://daltonprogram.org/manuals/dalton2020manual.pdf documentation].&lt;br /&gt;
&lt;br /&gt;
=== Environment Variables ===&lt;br /&gt;
&lt;br /&gt;
Environment variables understood by Dalton:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DALTON_TMPDIR             : scratch directory&lt;br /&gt;
DALTON_USE_GLOBAL_SCRATCH : use global scratch directory, do not copy any files to worker nodes&lt;br /&gt;
DALTON_NODELIST           : list of nodes, dalton.x will be copied to DALTON_TMPDIR on each node unless&lt;br /&gt;
                            DALTON_USE_GLOBAL_SCRATCH is defined&lt;br /&gt;
DALTON_LAUNCHER           : launcher for the dalton.x binary (if defined, -N flag not allowed)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Disk Usage ===&lt;br /&gt;
&lt;br /&gt;
Scratch files are written to &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;$SCRATCH&amp;lt;/span&amp;gt; by default. This configuration option can be changed by setting the environment variable &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;$DALTON_TMPDIR&amp;lt;/span&amp;gt; (e.g., to a dedicated [[workspace]]) before starting your calculations with Dalton.&lt;br /&gt;
&lt;br /&gt;
= Examples =&lt;br /&gt;
&lt;br /&gt;
As with all processes that require more than a few minutes to run, non-trivial compute jobs must be submitted to the cluster queuing system.&lt;br /&gt;
&lt;br /&gt;
Example scripts are available in the directory &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;$DALTON_EXA_DIR&amp;lt;/span&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module show chem/dalton                # show environment variables, which will be available after &#039;module load&#039;&lt;br /&gt;
$ module load chem/dalton                # load module&lt;br /&gt;
$ ls $DALTON_EXA_DIR                     # show content of directory $DALTON_EXA_DIR&lt;br /&gt;
$ cat $DALTON_EXA_DIR/README             # show examples README&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run a first simple example job on &amp;lt;font color=red&amp;gt;JUSTUS 2&amp;lt;/font&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load chem/dalton                           # load module&lt;br /&gt;
$ WORKSPACE=`ws_allocate dalton 3`                  # allocate workspace&lt;br /&gt;
$ cd $WORKSPACE                                     # change to workspace&lt;br /&gt;
$ cp -a $DALTON_HOME/bwhpc-examples .               # copy example files to workspace&lt;br /&gt;
$ cd bwhpc-examples                                 # change to test directory&lt;br /&gt;
$ sbatch dalton-2020.0.slurm                        # submit job&lt;br /&gt;
$ squeue                                            # obtain JOBID&lt;br /&gt;
$ scontrol show job &amp;lt;JOBID&amp;gt;                         # check state of job&lt;br /&gt;
$ ls                                                # when job finishes the results will be visible in this directory&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= FAQ =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; What to do if my simulations abort with &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt; MEMGET ERROR, insufficient work space in memory &amp;lt;/span&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; Increase Dalton&#039;s usable work memory with either -mb or -gb on the command line.&lt;br /&gt;
&lt;br /&gt;
= Useful links =&lt;br /&gt;
&lt;br /&gt;
* [https://daltonprogram.org/manuals/dalton2020manual.pdf Documentation (english)]&lt;br /&gt;
* [http://forum.daltonprogram.org Forum (english)]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Dalton_(program) Wikipedia article (english)]&lt;br /&gt;
* [https://daltonprogram.org/tools/ Plugins for Dalton (english)]&lt;br /&gt;
----&lt;br /&gt;
[[Category:Chemistry software]][[Category:BwForCluster_Chemistry]][[Category:BwForCluster_JUSTUS_2]]&lt;/div&gt;</summary>
		<author><name>F Wagner</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=JUSTUS2/Software/Dalton&amp;diff=9914</id>
		<title>JUSTUS2/Software/Dalton</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=JUSTUS2/Software/Dalton&amp;diff=9914"/>
		<updated>2022-02-06T01:41:12Z</updated>

		<summary type="html">&lt;p&gt;F Wagner: /* Examples */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Softwarepage|chem/dalton}}&lt;br /&gt;
&lt;br /&gt;
{| width=760px 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/dalton&lt;br /&gt;
|-&lt;br /&gt;
| Availability&lt;br /&gt;
| [[BwForCluster_JUSTUS_2]]&lt;br /&gt;
|-&lt;br /&gt;
| License&lt;br /&gt;
| Open-source software, distributed under the GNU Lesser General Public License (LGPL). [[#License|More...]]&lt;br /&gt;
|-&lt;br /&gt;
| Citing&lt;br /&gt;
| [https://daltonprogram.org/citation/ Publications]&lt;br /&gt;
|-&lt;br /&gt;
| Links&lt;br /&gt;
| [http://www.daltonprogram.org/index.html Homepage] &amp;amp;#124; [https://daltonprogram.org/documentation/ Documentation]&lt;br /&gt;
|-&lt;br /&gt;
| Graphical Interface&lt;br /&gt;
| No&lt;br /&gt;
|}&lt;br /&gt;
= Description =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Dalton&#039;&#039;&#039; (named after [https://en.wikipedia.org/wiki/John_Dalton John Dalton]) is an ab initio quantum chemistry computer program designed to to allow convenient, automated determination of a large number of molecular properties based on an HF, HF-srDFT, DFT, MP2, CC, CI, MCSCF, or MC-srDFT reference wave function. For additional information on features please visit the [https://daltonprogram.org/features/ Description of the Dalton suite features] web page.&lt;br /&gt;
&lt;br /&gt;
= Availability =&lt;br /&gt;
&lt;br /&gt;
Dalton is available on selected bwHPC-Clusters. A complete list of versions currently installed on the bwHPC-Clusters can be obtained from the [https://www.bwhpc.de/software.html Cluster Information System (CIS)].&lt;br /&gt;
&lt;br /&gt;
In order to check which versions of Dalton are installed on the compute cluster, run the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module avail chem/dalton&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= License =&lt;br /&gt;
&lt;br /&gt;
Dalton is free, open-source software released under the GNU Lesser General Public License (LGPL). Anyone interested in using the Dalton program suite must read the conditions described in its [https://gitlab.com/dalton/dalton/-/blob/master/LICENSE license agreement].&lt;br /&gt;
&lt;br /&gt;
= Usage =&lt;br /&gt;
== Loading the module ==&lt;br /&gt;
&lt;br /&gt;
You can load the default version of Dalton with the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load chem/dalton&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The module will try to load all modules it needs to function (e.g., compiler, mpi, ...). If loading the module fails, check if you have already loaded one of those modules, but not in the version required by Dalton.&lt;br /&gt;
&lt;br /&gt;
If you wish to load another (older) version of Dalton, you can do so using&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load chem/dalton/&amp;lt;version&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
with &amp;lt;version&amp;gt; specifying the desired version.&lt;br /&gt;
&lt;br /&gt;
Please cite Dalton in your publications according to the [https://daltonprogram.org/citation/ references].&lt;br /&gt;
&lt;br /&gt;
== Program Binaries ==&lt;br /&gt;
&lt;br /&gt;
The binary &#039;&#039;dalton&#039;&#039; is main program of the Dalton package.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage: dalton [options] dalinp{.dal} [molinp{.mol} [potinp{.pot}] [pcmsolver{.pcm}]]&lt;br /&gt;
&lt;br /&gt;
Options:&lt;br /&gt;
 -w dir                : change job directory to dir (default: $HOME)&lt;br /&gt;
 -b dir                : prepend dir to directory list for basis set searches (job directory and dalton basis library&lt;br /&gt;
                         are included automatically)&lt;br /&gt;
 -o file               : redirect output from program to job directory with &amp;quot;file&amp;quot; as file name&lt;br /&gt;
 -ow                   : redirect output from program to job directory with standard file name&lt;br /&gt;
 -dal file             : the dalton input file&lt;br /&gt;
 -mol file             : the molecule input file&lt;br /&gt;
 -pot file             : the potential input file (for .QM3, .QMMM and .PELIB)&lt;br /&gt;
 -pcm file             : the pcm input file&lt;br /&gt;
 -ext log              : change default output extension from &amp;quot;.out&amp;quot; to &amp;quot;.log&amp;quot;&lt;br /&gt;
 -nobackup             : do not backup files, simply overwrite outputs&lt;br /&gt;
 -f dal_mol[_pot]      : extract dal_mol[_pot].tar.gz archive from WRKDIR into DALTON_TMPDIR before calculation&lt;br /&gt;
                         starts&lt;br /&gt;
 -noarch               : do not create tar.gz archive&lt;br /&gt;
 -t dir                : set scratch directory DALTON_TMPDIR; this script will append &#039;/DALTON_scratch_&amp;lt;USERNAME&amp;gt;&#039; to&lt;br /&gt;
                         the path unless the path contains &#039;DALTON_scratch&#039; or you explicitly set -noappend&lt;br /&gt;
 -d                    : delete job scratch directory before calculation starts&lt;br /&gt;
 -D                    : do not delete job scratch directory after calculation stops&lt;br /&gt;
 -noappend             : do not append anything to the scratch directory; be careful with this option since by&lt;br /&gt;
                         default scratch is wiped after calculation&lt;br /&gt;
 -get &amp;quot;file1 ...&amp;quot;      : get files back from DALTON_TMPDIR after calculation stops&lt;br /&gt;
 -put &amp;quot;file1 ...&amp;quot;      : put files to DALTON_TMPDIR before calculation starts&lt;br /&gt;
 -omp num              : set the number of OpenMP threads. Note that Dalton is not OpenMP parallelized, however, this&lt;br /&gt;
                         option can be used with e.g. threaded blas as MKL&lt;br /&gt;
 -N num |-np num       : use num MPI processes (defaults to 1, illegal if DALTON_LAUNCHER specified)&lt;br /&gt;
 -cpexe                : copy dalton.x to DALTON_TMPDIR before execution, either to global scratch (if&lt;br /&gt;
                         DALTON_USE_GLOBAL_SCRATCH is set) or to local scratch on all nodes&lt;br /&gt;
 -rsh                  : use rsh/rcp for communication with MPI nodes (default: ssh/scp)&lt;br /&gt;
 -nodelist &amp;quot;node1 ...&amp;quot; : set nodelist DALTON_NODELIST, dalton.x will be copied to DALTON_TMPDIR on each node unless&lt;br /&gt;
                         DALTON_USE_GLOBAL_SCRATCH is defined (the script uses PBS_NODEFILE or SLURM_NODELIST if&lt;br /&gt;
                         available)&lt;br /&gt;
 -x dalmol1 dalmol2    : calculate NEXAFS spectrum from ground and core hole states&lt;br /&gt;
 -exe exec             : change the executable from default ($DALTON_HOME/dalton/dalton.x) to exec&lt;br /&gt;
 -pg                   : do profiling with gprof&lt;br /&gt;
 -gb mem               : set dalton max usable work memory to mem Gigabytes (mem integer)&lt;br /&gt;
 -mb mem               : set dalton max usable work memory to mem Megabytes (mem integer)&lt;br /&gt;
 -ngb mem              : set node max usable work memory to mem Gigabytes (mem integer)&lt;br /&gt;
 -nmb mem              : set node max usable work memory to mem Megabytes (mem integer)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Hints for using Dalton ==&lt;br /&gt;
&lt;br /&gt;
=== Input Files ===&lt;br /&gt;
&lt;br /&gt;
For information about how to construct input files (dalinp{.dal} [molinp{.mol} [potinp{.pot}]]) for Dalton, please consult the [https://daltonprogram.org/manuals/dalton2020manual.pdf documentation].&lt;br /&gt;
&lt;br /&gt;
=== Environment Variables ===&lt;br /&gt;
&lt;br /&gt;
Environment variables understood by Dalton:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DALTON_TMPDIR             : scratch directory&lt;br /&gt;
DALTON_USE_GLOBAL_SCRATCH : use global scratch directory, do not copy any files to worker nodes&lt;br /&gt;
DALTON_NODELIST           : list of nodes, dalton.x will be copied to DALTON_TMPDIR on each node unless&lt;br /&gt;
                            DALTON_USE_GLOBAL_SCRATCH is defined&lt;br /&gt;
DALTON_LAUNCHER           : launcher for the dalton.x binary (if defined, -N flag not allowed)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Disk Usage ===&lt;br /&gt;
&lt;br /&gt;
Scratch files are written to &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;$SCRATCH&amp;lt;/span&amp;gt; by default. This configuration option can be changed by setting the environment variable &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;$DALTON_TMPDIR&amp;lt;/span&amp;gt; (e.g., to a dedicated [[workspace]]) before starting your calculations with Dalton.&lt;br /&gt;
&lt;br /&gt;
= Examples =&lt;br /&gt;
&lt;br /&gt;
As with all processes that require more than a few minutes to run, non-trivial compute jobs must be submitted to the cluster queuing system.&lt;br /&gt;
&lt;br /&gt;
Example scripts are available in the directory &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;$DALTON_EXA_DIR&amp;lt;/span&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module show chem/dalton                # show environment variables, which will be available after &#039;module load&#039;&lt;br /&gt;
$ module load chem/dalton                # load module&lt;br /&gt;
$ ls $DALTON_EXA_DIR                     # show content of directory $DALTON_EXA_DIR&lt;br /&gt;
$ cat $DALTON_EXA_DIR/README             # show examples README&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run a first simple example job on &amp;lt;font color=red&amp;gt;JUSTUS 2&amp;lt;/font&amp;gt;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load chem/dalton                           # load module&lt;br /&gt;
$ WORKSPACE=`ws_allocate dalton 3`                  # allocate workspace&lt;br /&gt;
$ cd $WORKSPACE                                     # change to workspace&lt;br /&gt;
$ cp -a $DALTON_HOME/bwhpc-examples .               # copy example files to workspace&lt;br /&gt;
$ cd bwhpc-examples                                 # change to test directory&lt;br /&gt;
$ sbatch dalton-2020.0.slurm                        # submit job&lt;br /&gt;
$ squeue                                            # obtain JOBID&lt;br /&gt;
$ scontrol show job &amp;lt;JOBID&amp;gt;                         # check state of job&lt;br /&gt;
$ ls                                                # when job finishes the results will be visible in this directory&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= FAQ =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; What to do if my simulations abort with &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt; MEMGET ERROR, insufficient work space in memory &amp;lt;/span&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; Increase Dalton&#039;s usable work memory with either -mb or -gb on the command line.&lt;br /&gt;
&lt;br /&gt;
= Useful links =&lt;br /&gt;
&lt;br /&gt;
* [https://daltonprogram.org/manuals/dalton2020manual.pdf Documentation (english)]&lt;br /&gt;
* [http://forum.daltonprogram.org Forum (english)]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Dalton_(program) Wikipedia article (english)]&lt;br /&gt;
* [https://daltonprogram.org/tools/ Plugins for Dalton (english)]&lt;br /&gt;
----&lt;br /&gt;
[[Category:Chemistry software]][[Category:BwForCluster_Chemistry]][[Category:BwForCluster_JUSTUS_2]]&lt;/div&gt;</summary>
		<author><name>F Wagner</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=JUSTUS2/Software/NAMD&amp;diff=9913</id>
		<title>JUSTUS2/Software/NAMD</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=JUSTUS2/Software/NAMD&amp;diff=9913"/>
		<updated>2022-02-06T01:39:56Z</updated>

		<summary type="html">&lt;p&gt;F Wagner: /* Examples */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Softwarepage|chem/namd}}&lt;br /&gt;
&lt;br /&gt;
{| width=760px 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/namd&lt;br /&gt;
|-&lt;br /&gt;
| Availability&lt;br /&gt;
| [[BwForCluster_JUSTUS_2]] &amp;amp;#124; [[BwForCluster_MLS&amp;amp;WISO_Production]]&lt;br /&gt;
|-&lt;br /&gt;
| License&lt;br /&gt;
| Freeware for non-commercial use. [[#License|More...]]&lt;br /&gt;
|-&lt;br /&gt;
| Citing &lt;br /&gt;
| [http://www.ks.uiuc.edu/Research/namd/papers.html Publications]&lt;br /&gt;
|-&lt;br /&gt;
| Links&lt;br /&gt;
| [http://www.ks.uiuc.edu/Research/namd/ Homepage] &amp;amp;#124; [http://www.ks.uiuc.edu/Research/namd/2.14/ug/ 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;
&lt;br /&gt;
&#039;&#039;&#039;NAMD&#039;&#039;&#039; (NAnoscale Molecular Dynamics) is a parallel molecular dynamics code designed for high-performance simulation of large biomolecular systems.&lt;br /&gt;
&lt;br /&gt;
= Availability =&lt;br /&gt;
&lt;br /&gt;
NAMD is available on selected bwHPC-Clusters. A complete list of versions currently installed on the bwHPC-Clusters can be obtained from the [https://www.bwhpc.de/software.html Cluster Information System (CIS)].&lt;br /&gt;
&lt;br /&gt;
In order to check which versions of NAMD are installed on the compute cluster, run the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module avail chem/namd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= License =&lt;br /&gt;
&lt;br /&gt;
NAMD is available as [https://en.wikipedia.org/wiki/Freeware freeware] for non-commercial use by individuals, academic institutions, and corporations for in-house business uses. Please read the [http://www.ks.uiuc.edu/Research/namd/license.html license] for additional information about NAMD.&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 NAMD with the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load chem/namd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The module will try to load all modules (i.e., compiler, MPI, MKL) it needs to function. If loading the module fails, check if you have already loaded one of those modules, but not in the version required by NAMD.&lt;br /&gt;
&lt;br /&gt;
If you wish to load another (older) version of NAMD, you can do so using&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load chem/namd/&amp;lt;version&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
with &amp;lt;version&amp;gt; specifying the desired version.&lt;br /&gt;
&lt;br /&gt;
Please cite NAMD in your publications according to the [http://www.ks.uiuc.edu/Research/namd/papers.html references].&lt;br /&gt;
&lt;br /&gt;
== Program Binaries ==&lt;br /&gt;
&lt;br /&gt;
The binary &#039;&#039;namd2&#039;&#039; is main program of the NAMD package.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage: namd2 [options] [config file]&lt;br /&gt;
  &lt;br /&gt;
Example: namd2 +isomalloc_sync run.namd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For information about how to construct NAMD configuration files, please see the [http://www.ks.uiuc.edu/Research/namd/2.14/ug/ documentation]. In addition to a configuration file, NAMD also needs a CHARMM force field in either CHARMM or X-PLOR format, an X-PLOR format PSF file describing the molecular structure, and the initial coordinates of the molecular system in the form of a PDB file.&lt;br /&gt;
&lt;br /&gt;
The NAMD package includes several additional tools:&lt;br /&gt;
&lt;br /&gt;
* flipbinpdb -- flips byte-ordering of 8-byte doubles&lt;br /&gt;
* flipdcd -- flips byte-ordering of DCD files&lt;br /&gt;
* psfgen -- [https://www.ks.uiuc.edu/Research/vmd/ VMD] psfgen plugin&lt;br /&gt;
* sortreplicas -- un-shuffles replica trajectories to place same-temperature frames in the same file&lt;br /&gt;
&lt;br /&gt;
=== Charm++ ===&lt;br /&gt;
&lt;br /&gt;
Charm++ is a parallel object-oriented programming paradigm based on C++ and developed in the Parallel Programming Laboratory at the University of Illinois at Urbana–Champaign. NAMD has been implemented using Charm++.&lt;br /&gt;
&lt;br /&gt;
* charmrun -- launches Charm++ programs&lt;br /&gt;
&lt;br /&gt;
For help on usage, type&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ charmrun -help&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== GPU Acceleration ===&lt;br /&gt;
&lt;br /&gt;
Currently not available.&lt;br /&gt;
&lt;br /&gt;
== Hints for using NAMD ==&lt;br /&gt;
&lt;br /&gt;
=== Parallel Execution ===&lt;br /&gt;
&lt;br /&gt;
It is usually more efficient to run several smaller jobs with reasonable speedup side by side. Check for a reasonable speedup by increasing the number of workers from 1, 2, 4, n cores. Do not forget to adjust the memory specification when changing the number of workers&lt;br /&gt;
&lt;br /&gt;
=== Memory Management ===&lt;br /&gt;
&lt;br /&gt;
It requires some experience to choose the perfect memory value. Monitoring a job interactively may help to estimate the memory consumption. Requesting 1GB more than the required amount is typically sufficient.&lt;br /&gt;
&lt;br /&gt;
=== Runtime Specification ===&lt;br /&gt;
&lt;br /&gt;
The wall-time limit is independent of the number of parallel workers. Selecting the best value requires some experience. In general, jobs with shorter wall times get higher priorities. It could help to run the job interactively for a small period of time to monitor its convergence. Furthermore, it may be advantageous to extrapolate the run time by looking at smaller test jobs.&lt;br /&gt;
&lt;br /&gt;
= Examples =&lt;br /&gt;
&lt;br /&gt;
As with all processes that require more than a few minutes to run, non-trivial compute jobs must be submitted to the cluster queuing system.&lt;br /&gt;
&lt;br /&gt;
Example scripts are available in the directory &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;$NAMD_EXA_DIR&amp;lt;/span&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module show chem/namd                # show environment variables, which will be available after &#039;module load&#039;&lt;br /&gt;
$ module load chem/namd                # load module&lt;br /&gt;
$ ls $NAMD_EXA_DIR                     # show content of directory $NAMD_EXA_DIR&lt;br /&gt;
$ cat $NAMD_EXA_DIR/README             # show examples README&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run a first simple example job on &amp;lt;font color=red&amp;gt;JUSTUS 2&amp;lt;/font&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load chem/namd                          # load module&lt;br /&gt;
$ WORKSPACE=`ws_allocate namd 3`                 # allocate workspace&lt;br /&gt;
$ cd $WORKSPACE                                  # change to workspace&lt;br /&gt;
$ cp -a $NAMD_HOME/bwhpc-examples .              # copy example files to workspace&lt;br /&gt;
$ cd bwhpc-examples/apoa1                        # change to test directory&lt;br /&gt;
$ sbatch bwhpc_namd_apoa1.sh                     # submit job&lt;br /&gt;
$ squeue                                         # obtain JOBID&lt;br /&gt;
$ scontrol show job &amp;lt;JOBID&amp;gt;                      # check state of job&lt;br /&gt;
$ ls                                             # when job finishes the results will be visible in this directory&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Useful links =&lt;br /&gt;
&lt;br /&gt;
* [http://www.ks.uiuc.edu/Research/namd/2.14/ug/ Documentation (english)]&lt;br /&gt;
* [http://www.ks.uiuc.edu/Research/namd/mailing_list/ Maling list (english)]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/NAMD Wikipedia article (english)]&lt;br /&gt;
* [https://de.wikipedia.org/wiki/NAMD Wikipedia article (german)]&lt;br /&gt;
----&lt;br /&gt;
[[Category:Chemistry software]][[Category:BwForCluster_Chemistry]][[Category:BwForCluster_JUSTUS_2]][[Category:BwForCluster_MLS&amp;amp;WISO_Production]]&lt;/div&gt;</summary>
		<author><name>F Wagner</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=JUSTUS2/Software/NAMD&amp;diff=9912</id>
		<title>JUSTUS2/Software/NAMD</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=JUSTUS2/Software/NAMD&amp;diff=9912"/>
		<updated>2022-02-06T01:39:23Z</updated>

		<summary type="html">&lt;p&gt;F Wagner: /* Examples */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Softwarepage|chem/namd}}&lt;br /&gt;
&lt;br /&gt;
{| width=760px 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/namd&lt;br /&gt;
|-&lt;br /&gt;
| Availability&lt;br /&gt;
| [[BwForCluster_JUSTUS_2]] &amp;amp;#124; [[BwForCluster_MLS&amp;amp;WISO_Production]]&lt;br /&gt;
|-&lt;br /&gt;
| License&lt;br /&gt;
| Freeware for non-commercial use. [[#License|More...]]&lt;br /&gt;
|-&lt;br /&gt;
| Citing &lt;br /&gt;
| [http://www.ks.uiuc.edu/Research/namd/papers.html Publications]&lt;br /&gt;
|-&lt;br /&gt;
| Links&lt;br /&gt;
| [http://www.ks.uiuc.edu/Research/namd/ Homepage] &amp;amp;#124; [http://www.ks.uiuc.edu/Research/namd/2.14/ug/ 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;
&lt;br /&gt;
&#039;&#039;&#039;NAMD&#039;&#039;&#039; (NAnoscale Molecular Dynamics) is a parallel molecular dynamics code designed for high-performance simulation of large biomolecular systems.&lt;br /&gt;
&lt;br /&gt;
= Availability =&lt;br /&gt;
&lt;br /&gt;
NAMD is available on selected bwHPC-Clusters. A complete list of versions currently installed on the bwHPC-Clusters can be obtained from the [https://www.bwhpc.de/software.html Cluster Information System (CIS)].&lt;br /&gt;
&lt;br /&gt;
In order to check which versions of NAMD are installed on the compute cluster, run the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module avail chem/namd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= License =&lt;br /&gt;
&lt;br /&gt;
NAMD is available as [https://en.wikipedia.org/wiki/Freeware freeware] for non-commercial use by individuals, academic institutions, and corporations for in-house business uses. Please read the [http://www.ks.uiuc.edu/Research/namd/license.html license] for additional information about NAMD.&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 NAMD with the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load chem/namd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The module will try to load all modules (i.e., compiler, MPI, MKL) it needs to function. If loading the module fails, check if you have already loaded one of those modules, but not in the version required by NAMD.&lt;br /&gt;
&lt;br /&gt;
If you wish to load another (older) version of NAMD, you can do so using&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load chem/namd/&amp;lt;version&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
with &amp;lt;version&amp;gt; specifying the desired version.&lt;br /&gt;
&lt;br /&gt;
Please cite NAMD in your publications according to the [http://www.ks.uiuc.edu/Research/namd/papers.html references].&lt;br /&gt;
&lt;br /&gt;
== Program Binaries ==&lt;br /&gt;
&lt;br /&gt;
The binary &#039;&#039;namd2&#039;&#039; is main program of the NAMD package.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage: namd2 [options] [config file]&lt;br /&gt;
  &lt;br /&gt;
Example: namd2 +isomalloc_sync run.namd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For information about how to construct NAMD configuration files, please see the [http://www.ks.uiuc.edu/Research/namd/2.14/ug/ documentation]. In addition to a configuration file, NAMD also needs a CHARMM force field in either CHARMM or X-PLOR format, an X-PLOR format PSF file describing the molecular structure, and the initial coordinates of the molecular system in the form of a PDB file.&lt;br /&gt;
&lt;br /&gt;
The NAMD package includes several additional tools:&lt;br /&gt;
&lt;br /&gt;
* flipbinpdb -- flips byte-ordering of 8-byte doubles&lt;br /&gt;
* flipdcd -- flips byte-ordering of DCD files&lt;br /&gt;
* psfgen -- [https://www.ks.uiuc.edu/Research/vmd/ VMD] psfgen plugin&lt;br /&gt;
* sortreplicas -- un-shuffles replica trajectories to place same-temperature frames in the same file&lt;br /&gt;
&lt;br /&gt;
=== Charm++ ===&lt;br /&gt;
&lt;br /&gt;
Charm++ is a parallel object-oriented programming paradigm based on C++ and developed in the Parallel Programming Laboratory at the University of Illinois at Urbana–Champaign. NAMD has been implemented using Charm++.&lt;br /&gt;
&lt;br /&gt;
* charmrun -- launches Charm++ programs&lt;br /&gt;
&lt;br /&gt;
For help on usage, type&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ charmrun -help&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== GPU Acceleration ===&lt;br /&gt;
&lt;br /&gt;
Currently not available.&lt;br /&gt;
&lt;br /&gt;
== Hints for using NAMD ==&lt;br /&gt;
&lt;br /&gt;
=== Parallel Execution ===&lt;br /&gt;
&lt;br /&gt;
It is usually more efficient to run several smaller jobs with reasonable speedup side by side. Check for a reasonable speedup by increasing the number of workers from 1, 2, 4, n cores. Do not forget to adjust the memory specification when changing the number of workers&lt;br /&gt;
&lt;br /&gt;
=== Memory Management ===&lt;br /&gt;
&lt;br /&gt;
It requires some experience to choose the perfect memory value. Monitoring a job interactively may help to estimate the memory consumption. Requesting 1GB more than the required amount is typically sufficient.&lt;br /&gt;
&lt;br /&gt;
=== Runtime Specification ===&lt;br /&gt;
&lt;br /&gt;
The wall-time limit is independent of the number of parallel workers. Selecting the best value requires some experience. In general, jobs with shorter wall times get higher priorities. It could help to run the job interactively for a small period of time to monitor its convergence. Furthermore, it may be advantageous to extrapolate the run time by looking at smaller test jobs.&lt;br /&gt;
&lt;br /&gt;
= Examples =&lt;br /&gt;
&lt;br /&gt;
As with all processes that require more than a few minutes to run, non-trivial compute jobs must be submitted to the cluster queuing system.&lt;br /&gt;
&lt;br /&gt;
Example scripts are available in the directory &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;$NAMD_EXA_DIR&amp;lt;/span&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module show chem/namd                # show environment variables, which will be available after &#039;module load&#039;&lt;br /&gt;
$ module load chem/namd                # load module&lt;br /&gt;
$ ls $NAMD_EXA_DIR                     # show content of directory $NAMD_EXA_DIR&lt;br /&gt;
$ cat $NAMD_EXA_DIR/README             # show examples README&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run a first simple example job on &amp;lt;font color=red&amp;gt;JUSTUS 2&amp;lt;/font&amp;gt;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load chem/namd                          # load module&lt;br /&gt;
$ WORKSPACE=`ws_allocate namd 3`                 # allocate workspace&lt;br /&gt;
$ cd $WORKSPACE                                  # change to workspace&lt;br /&gt;
$ cp -a $NAMD_HOME/bwhpc-examples .              # copy example files to workspace&lt;br /&gt;
$ cd bwhpc-examples/apoa1                        # change to test directory&lt;br /&gt;
$ sbatch bwhpc_namd_apoa1.sh                     # submit job&lt;br /&gt;
$ squeue                                         # obtain JOBID&lt;br /&gt;
$ scontrol show job &amp;lt;JOBID&amp;gt;                      # check state of job&lt;br /&gt;
$ ls                                             # when job finishes the results will be visible in this directory&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Useful links =&lt;br /&gt;
&lt;br /&gt;
* [http://www.ks.uiuc.edu/Research/namd/2.14/ug/ Documentation (english)]&lt;br /&gt;
* [http://www.ks.uiuc.edu/Research/namd/mailing_list/ Maling list (english)]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/NAMD Wikipedia article (english)]&lt;br /&gt;
* [https://de.wikipedia.org/wiki/NAMD Wikipedia article (german)]&lt;br /&gt;
----&lt;br /&gt;
[[Category:Chemistry software]][[Category:BwForCluster_Chemistry]][[Category:BwForCluster_JUSTUS_2]][[Category:BwForCluster_MLS&amp;amp;WISO_Production]]&lt;/div&gt;</summary>
		<author><name>F Wagner</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=JUSTUS2/Software/Quantum_ESPRESSO&amp;diff=9911</id>
		<title>JUSTUS2/Software/Quantum ESPRESSO</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=JUSTUS2/Software/Quantum_ESPRESSO&amp;diff=9911"/>
		<updated>2022-02-06T01:35:18Z</updated>

		<summary type="html">&lt;p&gt;F Wagner: /* Examples */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Softwarepage|chem/quantum_espresso}}&lt;br /&gt;
&lt;br /&gt;
{| width=760px 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/quantum_espresso&lt;br /&gt;
|-&lt;br /&gt;
| Availability&lt;br /&gt;
| [[BwForCluster_JUSTUS_2]] &lt;br /&gt;
|-&lt;br /&gt;
| License&lt;br /&gt;
| Open-source software, distributed under the GNU General Public License (GPL). [[#License|More...]]&lt;br /&gt;
|-&lt;br /&gt;
| Citing &lt;br /&gt;
| &amp;lt;small&amp;gt;1) P Giannozzi et al 2009 J. Phys.: Condens. Matter 21 395502&amp;lt;br&amp;gt;DOI: 10.1088/0953-8984/21/39/395502.&amp;lt;br&amp;gt;2) P Giannozzi et al 2017 J. Phys.: Condens. Matter 29 465901&amp;lt;br&amp;gt;DOI: 10.1088/1361-648X/aa8f79.&amp;lt;br&amp;gt;3) P Giannozzi et al 2020 J. Chem. Phys. 152 154105&amp;lt;br&amp;gt;DOI: 10.1063/5.0005082.&amp;lt;/small&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Links&lt;br /&gt;
| [https://www.quantum-espresso.org Homepage] &amp;amp;#124; [https://www.quantum-espresso.org/resources/users-manual Documentation]&lt;br /&gt;
|-&lt;br /&gt;
| Graphical Interface&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| Plugins&lt;br /&gt;
| [https://epw-code.org/ EPW]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Description =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Quantum ESPRESSO&#039;&#039;&#039; is an integrated suite of Open-Source computer codes for electronic-structure calculations and materials modeling at the nanoscale. It is based on density-functional theory, plane waves, and pseudopotentials.&lt;br /&gt;
&lt;br /&gt;
= Availability =&lt;br /&gt;
&lt;br /&gt;
Quantum ESPRESSO is available on selected bwHPC-Clusters. A complete list of versions currently installed on the bwHPC-Clusters can be obtained from the [https://www.bwhpc.de/software.html Cluster Information System (CIS)].&lt;br /&gt;
&lt;br /&gt;
In order to check which versions of Quantum ESPRESSO are installed on the compute cluster, run the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module avail chem/quantum_espresso&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= License =&lt;br /&gt;
&lt;br /&gt;
Quantum ESPRESSO is free, open-source software released under the GNU General Public License (GPL). Anyone interested in using the Quantum ESPRESSO program suite must read the conditions described in its [https://www.quantum-espresso.org/project/manifesto manifesto].&lt;br /&gt;
&lt;br /&gt;
= Usage =&lt;br /&gt;
== Loading the module ==&lt;br /&gt;
&lt;br /&gt;
You can load the default version of Quantum ESPRESSO with the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load chem/quantum_espresso&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The module will try to load all modules it needs to function (e.g., compiler, mpi, ...). If loading the module fails, check if you have already loaded one of those modules, but not in the version required by Quantum ESPRESSO.&lt;br /&gt;
&lt;br /&gt;
If you wish to load another (older) version of Quantum ESPRESSO, you can do so using&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load chem/quantum_espresso/&amp;lt;version&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
with &amp;lt;version&amp;gt; specifying the desired version.&lt;br /&gt;
&lt;br /&gt;
Please cite Quantum ESPRESSO in your publications according to the references.&lt;br /&gt;
&lt;br /&gt;
== Program Binaries ==&lt;br /&gt;
&lt;br /&gt;
All binaries of the Quantum ESPRESSO software package are located in the directory &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;$ESPRESSO_BIN_DIR&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Hints for using Quantum ESPRESSO ==&lt;br /&gt;
&lt;br /&gt;
=== Input Files ===&lt;br /&gt;
&lt;br /&gt;
For information about how to construct input files for Quantum ESPRESSO, please consult the [https://www.quantum-espresso.org/resources/users-manual/input-data-description documentation].&lt;br /&gt;
&lt;br /&gt;
=== Disk Usage ===&lt;br /&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;
&lt;br /&gt;
= Examples =&lt;br /&gt;
&lt;br /&gt;
As with all processes that require more than a few minutes to run, non-trivial compute jobs must be submitted to the cluster queuing system.&lt;br /&gt;
&lt;br /&gt;
Example scripts are available in the directory &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;$ESPRESSO_EXA_DIR&amp;lt;/span&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module show chem/quantum_espresso         # show environment variables, which will be available after &#039;module load&#039;&lt;br /&gt;
$ module load chem/quantum_espresso         # load module&lt;br /&gt;
$ ls $ESPRESSO_EXA_DIR                      # show content of directory $ESPRESSO_EXA_DIR&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run a first simple example job on &amp;lt;font color=red&amp;gt;JUSTUS 2&amp;lt;/font&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load chem/quantum_espresso                     # load module&lt;br /&gt;
$ WORKSPACE=`ws_allocate quantum_espresso 3`            # allocate workspace&lt;br /&gt;
$ cd $WORKSPACE                                         # change to workspace&lt;br /&gt;
$ cp -a $ESPRESSO_HOME/bwhpc-examples .                 # copy example files to workspace&lt;br /&gt;
$ cd bwhpc-examples                                     # change to test directory&lt;br /&gt;
$ sbatch bwforcluster-quantum_espresso-example.sbatch   # submit job&lt;br /&gt;
$ squeue                                                # obtain JOBID&lt;br /&gt;
$ scontrol show job &amp;lt;JOBID&amp;gt;                             # check state of job&lt;br /&gt;
$ ls                                                    # when job finishes the results will be visible in this directory&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Useful links =&lt;br /&gt;
&lt;br /&gt;
* [https://www.quantum-espresso.org/Doc/user_guide/ Documentation (english)]&lt;br /&gt;
* [https://www.quantum-espresso.org/forum Forum (english)]&lt;br /&gt;
* [https://www.quantum-espresso.org/resources/tutorials Tutorials (english)]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Quantum_ESPRESSO Wikipedia article (english)]&lt;br /&gt;
* [https://www.quantum-espresso.org/resources/tools Plugins for Quantum ESPRESSO (english)]&lt;br /&gt;
----&lt;br /&gt;
[[Category:Chemistry software]][[Category:BwForCluster_Chemistry]][[Category:BwForCluster_JUSTUS_2]]&lt;/div&gt;</summary>
		<author><name>F Wagner</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=JUSTUS2/Software/Quantum_ESPRESSO&amp;diff=9910</id>
		<title>JUSTUS2/Software/Quantum ESPRESSO</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=JUSTUS2/Software/Quantum_ESPRESSO&amp;diff=9910"/>
		<updated>2022-02-06T01:34:31Z</updated>

		<summary type="html">&lt;p&gt;F Wagner: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Softwarepage|chem/quantum_espresso}}&lt;br /&gt;
&lt;br /&gt;
{| width=760px 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/quantum_espresso&lt;br /&gt;
|-&lt;br /&gt;
| Availability&lt;br /&gt;
| [[BwForCluster_JUSTUS_2]] &lt;br /&gt;
|-&lt;br /&gt;
| License&lt;br /&gt;
| Open-source software, distributed under the GNU General Public License (GPL). [[#License|More...]]&lt;br /&gt;
|-&lt;br /&gt;
| Citing &lt;br /&gt;
| &amp;lt;small&amp;gt;1) P Giannozzi et al 2009 J. Phys.: Condens. Matter 21 395502&amp;lt;br&amp;gt;DOI: 10.1088/0953-8984/21/39/395502.&amp;lt;br&amp;gt;2) P Giannozzi et al 2017 J. Phys.: Condens. Matter 29 465901&amp;lt;br&amp;gt;DOI: 10.1088/1361-648X/aa8f79.&amp;lt;br&amp;gt;3) P Giannozzi et al 2020 J. Chem. Phys. 152 154105&amp;lt;br&amp;gt;DOI: 10.1063/5.0005082.&amp;lt;/small&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Links&lt;br /&gt;
| [https://www.quantum-espresso.org Homepage] &amp;amp;#124; [https://www.quantum-espresso.org/resources/users-manual Documentation]&lt;br /&gt;
|-&lt;br /&gt;
| Graphical Interface&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| Plugins&lt;br /&gt;
| [https://epw-code.org/ EPW]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Description =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Quantum ESPRESSO&#039;&#039;&#039; is an integrated suite of Open-Source computer codes for electronic-structure calculations and materials modeling at the nanoscale. It is based on density-functional theory, plane waves, and pseudopotentials.&lt;br /&gt;
&lt;br /&gt;
= Availability =&lt;br /&gt;
&lt;br /&gt;
Quantum ESPRESSO is available on selected bwHPC-Clusters. A complete list of versions currently installed on the bwHPC-Clusters can be obtained from the [https://www.bwhpc.de/software.html Cluster Information System (CIS)].&lt;br /&gt;
&lt;br /&gt;
In order to check which versions of Quantum ESPRESSO are installed on the compute cluster, run the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module avail chem/quantum_espresso&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= License =&lt;br /&gt;
&lt;br /&gt;
Quantum ESPRESSO is free, open-source software released under the GNU General Public License (GPL). Anyone interested in using the Quantum ESPRESSO program suite must read the conditions described in its [https://www.quantum-espresso.org/project/manifesto manifesto].&lt;br /&gt;
&lt;br /&gt;
= Usage =&lt;br /&gt;
== Loading the module ==&lt;br /&gt;
&lt;br /&gt;
You can load the default version of Quantum ESPRESSO with the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load chem/quantum_espresso&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The module will try to load all modules it needs to function (e.g., compiler, mpi, ...). If loading the module fails, check if you have already loaded one of those modules, but not in the version required by Quantum ESPRESSO.&lt;br /&gt;
&lt;br /&gt;
If you wish to load another (older) version of Quantum ESPRESSO, you can do so using&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load chem/quantum_espresso/&amp;lt;version&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
with &amp;lt;version&amp;gt; specifying the desired version.&lt;br /&gt;
&lt;br /&gt;
Please cite Quantum ESPRESSO in your publications according to the references.&lt;br /&gt;
&lt;br /&gt;
== Program Binaries ==&lt;br /&gt;
&lt;br /&gt;
All binaries of the Quantum ESPRESSO software package are located in the directory &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;$ESPRESSO_BIN_DIR&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Hints for using Quantum ESPRESSO ==&lt;br /&gt;
&lt;br /&gt;
=== Input Files ===&lt;br /&gt;
&lt;br /&gt;
For information about how to construct input files for Quantum ESPRESSO, please consult the [https://www.quantum-espresso.org/resources/users-manual/input-data-description documentation].&lt;br /&gt;
&lt;br /&gt;
=== Disk Usage ===&lt;br /&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;
&lt;br /&gt;
= Examples =&lt;br /&gt;
&lt;br /&gt;
As with all processes that require more than a few minutes to run, non-trivial compute jobs must be submitted to the cluster queuing system.&lt;br /&gt;
&lt;br /&gt;
Example scripts are available in the directory &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;$ESPRESSO_EXA_DIR&amp;lt;/span&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module show chem/quantum_espresso         # show environment variables, which will be available after &#039;module load&#039;&lt;br /&gt;
$ module load chem/quantum_espresso         # load module&lt;br /&gt;
$ ls $ESPRESSO_EXA_DIR                      # show content of directory $ESPRESSO_EXA_DIR&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run several example jobs on &#039;&#039;&#039;JUSTUS 2&#039;&#039;&#039;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load chem/quantum_espresso                     # load module&lt;br /&gt;
$ WORKSPACE=`ws_allocate quantum_espresso 3`            # allocate workspace&lt;br /&gt;
$ cd $WORKSPACE                                         # change to workspace&lt;br /&gt;
$ cp -a $ESPRESSO_HOME/bwhpc-examples .                 # copy example files to workspace&lt;br /&gt;
$ cd bwhpc-examples                                     # change to test directory&lt;br /&gt;
$ sbatch bwforcluster-quantum_espresso-example.sbatch   # submit job&lt;br /&gt;
$ squeue                                                # obtain JOBID&lt;br /&gt;
$ scontrol show job &amp;lt;JOBID&amp;gt;                             # check state of job&lt;br /&gt;
$ ls                                                    # when job finishes the results will be visible in this directory&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Useful links =&lt;br /&gt;
&lt;br /&gt;
* [https://www.quantum-espresso.org/Doc/user_guide/ Documentation (english)]&lt;br /&gt;
* [https://www.quantum-espresso.org/forum Forum (english)]&lt;br /&gt;
* [https://www.quantum-espresso.org/resources/tutorials Tutorials (english)]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Quantum_ESPRESSO Wikipedia article (english)]&lt;br /&gt;
* [https://www.quantum-espresso.org/resources/tools Plugins for Quantum ESPRESSO (english)]&lt;br /&gt;
----&lt;br /&gt;
[[Category:Chemistry software]][[Category:BwForCluster_Chemistry]][[Category:BwForCluster_JUSTUS_2]]&lt;/div&gt;</summary>
		<author><name>F Wagner</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=JUSTUS2/Software/SIESTA&amp;diff=9909</id>
		<title>JUSTUS2/Software/SIESTA</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=JUSTUS2/Software/SIESTA&amp;diff=9909"/>
		<updated>2022-02-06T01:33:09Z</updated>

		<summary type="html">&lt;p&gt;F Wagner: /* Examples */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Softwarepage|chem/siesta}}&lt;br /&gt;
&lt;br /&gt;
{| width=760px 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/siesta&lt;br /&gt;
|-&lt;br /&gt;
| Availability&lt;br /&gt;
| [[BwForCluster_JUSTUS_2]]&lt;br /&gt;
|-&lt;br /&gt;
| License&lt;br /&gt;
| Free, open-source software, distributed under the GNU General Public License (GPL). [[#License|More...]]&lt;br /&gt;
|-&lt;br /&gt;
| Citing &lt;br /&gt;
| [https://departments.icmab.es/leem/SIESTA_MATERIAL/Docs/Publications/index.html Publications]&lt;br /&gt;
|-&lt;br /&gt;
| Links&lt;br /&gt;
| [https://departments.icmab.es/leem/siesta/ Homepage] &amp;amp;#124; [https://departments.icmab.es/leem/SIESTA_MATERIAL/Docs/Manuals/manuals.html 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;
&lt;br /&gt;
&#039;&#039;&#039;SIESTA&#039;&#039;&#039; (Spanish Initiative for Electronic Simulations with Thousands of Atoms) is both a method and its computer program implementation, to perform electronic structure calculations and ab initio molecular dynamics simulations of molecules and solids.&lt;br /&gt;
&lt;br /&gt;
= Availability =&lt;br /&gt;
&lt;br /&gt;
SIESTA is available on selected bwHPC-Clusters. A complete list of versions currently installed on the bwHPC-Clusters can be obtained from the [https://www.bwhpc.de/software.html Cluster Information System (CIS)].&lt;br /&gt;
&lt;br /&gt;
In order to check which versions of SIESTA are installed on the compute cluster, run the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module avail chem/siesta&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= License =&lt;br /&gt;
&lt;br /&gt;
SIESTA is free, open-source software released under the GNU General Public License (GPL). The SIESTA package in its entirety may be copied, modified or distributed according to the conditions described in its [https://departments.icmab.es/leem/SIESTA_MATERIAL/Docs/Manuals/manuals.html documentation].&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 SIESTA with the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load chem/siesta&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The module will try to load all modules it needs to function (e.g., compiler, mpi, ...). If loading the module fails, check if you have already loaded one of those modules, but not in the version required by SIESTA.&lt;br /&gt;
&lt;br /&gt;
If you wish to load another (older) version of SIESTA, you can do so using&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load chem/siesta/&amp;lt;version&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
with &amp;lt;version&amp;gt; specifying the desired version.&lt;br /&gt;
&lt;br /&gt;
Please cite SIESTA in your publications according to the [https://departments.icmab.es/leem/SIESTA_MATERIAL/Docs/Publications/index.html references].&lt;br /&gt;
&lt;br /&gt;
== Program Binaries ==&lt;br /&gt;
&lt;br /&gt;
The binary &#039;&#039;siesta&#039;&#039; is main program of the SIESTA package.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage: siesta [options] [&amp;lt; infile] [&amp;gt; outfile]&lt;br /&gt;
  &lt;br /&gt;
Example: siesta RUN.fdf &amp;gt; RUN.out&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For information about how to construct SIESTA input files, please see the [https://departments.icmab.es/leem/SIESTA_MATERIAL/Docs/Manuals/manuals.html documentation].&lt;br /&gt;
&lt;br /&gt;
== Hints for using SIESTA ==&lt;br /&gt;
&lt;br /&gt;
=== Parallel Execution ===&lt;br /&gt;
&lt;br /&gt;
It is usually more efficient to run several smaller jobs with reasonable speedup side by side. Check for a reasonable speedup by increasing the number of workers from 1, 2, 4, n cores. Do not forget to adjust the memory specification when changing the number of workers&lt;br /&gt;
&lt;br /&gt;
=== Memory Management ===&lt;br /&gt;
&lt;br /&gt;
It requires some experience to choose the perfect memory value. Monitoring a job interactively may help to estimate the memory consumption. Requesting 1GB more than the required amount is typically sufficient.&lt;br /&gt;
&lt;br /&gt;
=== Runtime Specification ===&lt;br /&gt;
&lt;br /&gt;
The wall-time limit is independent of the number of parallel workers. Selecting the best value requires some experience. In general, jobs with shorter wall times get higher priorities. It could help to run the job interactively for a small period of time to monitor its convergence. Furthermore, it may be advantageous to extrapolate the run time by looking at smaller test jobs.&lt;br /&gt;
&lt;br /&gt;
= Examples =&lt;br /&gt;
&lt;br /&gt;
As with all processes that require more than a few minutes to run, non-trivial compute jobs must be submitted to the cluster queuing system.&lt;br /&gt;
&lt;br /&gt;
Example scripts are available in the directory &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;$SIESTA_EXA_DIR&amp;lt;/span&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module show chem/siesta                # show environment variables, which will be available after &#039;module load&#039;&lt;br /&gt;
$ module load chem/siesta                # load module&lt;br /&gt;
$ ls $SIESTA_EXA_DIR                     # show content of directory $SIESTA_EXA_DIR&lt;br /&gt;
$ cat $SIESTA_EXA_DIR/README             # show examples README&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run a first simple example job on &amp;lt;font color=red&amp;gt;JUSTUS 2&amp;lt;/font&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load chem/siesta                          # load module&lt;br /&gt;
$ WORKSPACE=`ws_allocate siesta 3`                 # allocate workspace&lt;br /&gt;
$ cd $WORKSPACE                                    # change to workspace&lt;br /&gt;
$ cp -a $SIESTA_HOME/bwhpc-examples .              # copy example files to workspace&lt;br /&gt;
$ cd bwhpc-examples/h2o                            # change to test directory&lt;br /&gt;
$ sbatch bwhpc_siesta_h2o.sh                       # submit job&lt;br /&gt;
$ squeue                                           # obtain JOBID&lt;br /&gt;
$ scontrol show job &amp;lt;JOBID&amp;gt;                        # check state of job&lt;br /&gt;
$ ls                                               # when job finishes the results will be visible in this directory&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Useful links =&lt;br /&gt;
&lt;br /&gt;
* [https://departments.icmab.es/leem/SIESTA_MATERIAL/Docs/Manuals/manuals.html Documentation (english)]&lt;br /&gt;
* [https://departments.icmab.es/leem/SIESTA_MATERIAL/Docs/list.html Mailing list (english)]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/SIESTA_(computer_program) Wikipedia article (english)]&lt;br /&gt;
----&lt;br /&gt;
[[Category:Chemistry software]][[Category:BwForCluster_Chemistry]][[Category:BwForCluster_JUSTUS_2]]&lt;/div&gt;</summary>
		<author><name>F Wagner</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=JUSTUS2/Software/SIESTA&amp;diff=9908</id>
		<title>JUSTUS2/Software/SIESTA</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=JUSTUS2/Software/SIESTA&amp;diff=9908"/>
		<updated>2022-02-06T01:32:12Z</updated>

		<summary type="html">&lt;p&gt;F Wagner: /* Examples */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Softwarepage|chem/siesta}}&lt;br /&gt;
&lt;br /&gt;
{| width=760px 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/siesta&lt;br /&gt;
|-&lt;br /&gt;
| Availability&lt;br /&gt;
| [[BwForCluster_JUSTUS_2]]&lt;br /&gt;
|-&lt;br /&gt;
| License&lt;br /&gt;
| Free, open-source software, distributed under the GNU General Public License (GPL). [[#License|More...]]&lt;br /&gt;
|-&lt;br /&gt;
| Citing &lt;br /&gt;
| [https://departments.icmab.es/leem/SIESTA_MATERIAL/Docs/Publications/index.html Publications]&lt;br /&gt;
|-&lt;br /&gt;
| Links&lt;br /&gt;
| [https://departments.icmab.es/leem/siesta/ Homepage] &amp;amp;#124; [https://departments.icmab.es/leem/SIESTA_MATERIAL/Docs/Manuals/manuals.html 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;
&lt;br /&gt;
&#039;&#039;&#039;SIESTA&#039;&#039;&#039; (Spanish Initiative for Electronic Simulations with Thousands of Atoms) is both a method and its computer program implementation, to perform electronic structure calculations and ab initio molecular dynamics simulations of molecules and solids.&lt;br /&gt;
&lt;br /&gt;
= Availability =&lt;br /&gt;
&lt;br /&gt;
SIESTA is available on selected bwHPC-Clusters. A complete list of versions currently installed on the bwHPC-Clusters can be obtained from the [https://www.bwhpc.de/software.html Cluster Information System (CIS)].&lt;br /&gt;
&lt;br /&gt;
In order to check which versions of SIESTA are installed on the compute cluster, run the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module avail chem/siesta&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= License =&lt;br /&gt;
&lt;br /&gt;
SIESTA is free, open-source software released under the GNU General Public License (GPL). The SIESTA package in its entirety may be copied, modified or distributed according to the conditions described in its [https://departments.icmab.es/leem/SIESTA_MATERIAL/Docs/Manuals/manuals.html documentation].&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 SIESTA with the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load chem/siesta&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The module will try to load all modules it needs to function (e.g., compiler, mpi, ...). If loading the module fails, check if you have already loaded one of those modules, but not in the version required by SIESTA.&lt;br /&gt;
&lt;br /&gt;
If you wish to load another (older) version of SIESTA, you can do so using&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load chem/siesta/&amp;lt;version&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
with &amp;lt;version&amp;gt; specifying the desired version.&lt;br /&gt;
&lt;br /&gt;
Please cite SIESTA in your publications according to the [https://departments.icmab.es/leem/SIESTA_MATERIAL/Docs/Publications/index.html references].&lt;br /&gt;
&lt;br /&gt;
== Program Binaries ==&lt;br /&gt;
&lt;br /&gt;
The binary &#039;&#039;siesta&#039;&#039; is main program of the SIESTA package.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage: siesta [options] [&amp;lt; infile] [&amp;gt; outfile]&lt;br /&gt;
  &lt;br /&gt;
Example: siesta RUN.fdf &amp;gt; RUN.out&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For information about how to construct SIESTA input files, please see the [https://departments.icmab.es/leem/SIESTA_MATERIAL/Docs/Manuals/manuals.html documentation].&lt;br /&gt;
&lt;br /&gt;
== Hints for using SIESTA ==&lt;br /&gt;
&lt;br /&gt;
=== Parallel Execution ===&lt;br /&gt;
&lt;br /&gt;
It is usually more efficient to run several smaller jobs with reasonable speedup side by side. Check for a reasonable speedup by increasing the number of workers from 1, 2, 4, n cores. Do not forget to adjust the memory specification when changing the number of workers&lt;br /&gt;
&lt;br /&gt;
=== Memory Management ===&lt;br /&gt;
&lt;br /&gt;
It requires some experience to choose the perfect memory value. Monitoring a job interactively may help to estimate the memory consumption. Requesting 1GB more than the required amount is typically sufficient.&lt;br /&gt;
&lt;br /&gt;
=== Runtime Specification ===&lt;br /&gt;
&lt;br /&gt;
The wall-time limit is independent of the number of parallel workers. Selecting the best value requires some experience. In general, jobs with shorter wall times get higher priorities. It could help to run the job interactively for a small period of time to monitor its convergence. Furthermore, it may be advantageous to extrapolate the run time by looking at smaller test jobs.&lt;br /&gt;
&lt;br /&gt;
= Examples =&lt;br /&gt;
&lt;br /&gt;
As with all processes that require more than a few minutes to run, non-trivial compute jobs must be submitted to the cluster queuing system.&lt;br /&gt;
&lt;br /&gt;
Example scripts are available in the directory &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;$SIESTA_EXA_DIR&amp;lt;/span&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module show chem/siesta                # show environment variables, which will be available after &#039;module load&#039;&lt;br /&gt;
$ module load chem/siesta                # load module&lt;br /&gt;
$ ls $SIESTA_EXA_DIR                     # show content of directory $SIESTA_EXA_DIR&lt;br /&gt;
$ cat $SIESTA_EXA_DIR/README             # show examples README&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run a first simple example job:&lt;br /&gt;
Run a first simple example job on &amp;lt;font color=red&amp;gt;JUSTUS 2&amp;lt;/font&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load chem/siesta                          # load module&lt;br /&gt;
$ WORKSPACE=`ws_allocate siesta 3`                 # allocate workspace&lt;br /&gt;
$ cd $WORKSPACE                                    # change to workspace&lt;br /&gt;
$ cp -a $SIESTA_HOME/bwhpc-examples .              # copy example files to workspace&lt;br /&gt;
$ cd bwhpc-examples/h2o                            # change to test directory&lt;br /&gt;
$ sbatch bwhpc_siesta_h2o.sh                       # submit job&lt;br /&gt;
$ squeue                                           # obtain JOBID&lt;br /&gt;
$ scontrol show job &amp;lt;JOBID&amp;gt;                        # check state of job&lt;br /&gt;
$ ls                                               # when job finishes the results will be visible in this directory&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Useful links =&lt;br /&gt;
&lt;br /&gt;
* [https://departments.icmab.es/leem/SIESTA_MATERIAL/Docs/Manuals/manuals.html Documentation (english)]&lt;br /&gt;
* [https://departments.icmab.es/leem/SIESTA_MATERIAL/Docs/list.html Mailing list (english)]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/SIESTA_(computer_program) Wikipedia article (english)]&lt;br /&gt;
----&lt;br /&gt;
[[Category:Chemistry software]][[Category:BwForCluster_Chemistry]][[Category:BwForCluster_JUSTUS_2]]&lt;/div&gt;</summary>
		<author><name>F Wagner</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=JUSTUS2/Software/Quantum_ESPRESSO&amp;diff=9907</id>
		<title>JUSTUS2/Software/Quantum ESPRESSO</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=JUSTUS2/Software/Quantum_ESPRESSO&amp;diff=9907"/>
		<updated>2022-02-05T08:10:10Z</updated>

		<summary type="html">&lt;p&gt;F Wagner: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Softwarepage|chem/quantum_espresso}}&lt;br /&gt;
&lt;br /&gt;
{| width=760px 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/quantum_espresso&lt;br /&gt;
|-&lt;br /&gt;
| Availability&lt;br /&gt;
| [[BwForCluster_Chemistry]] &amp;amp;#124; [[BwForCluster_JUSTUS_2]] &lt;br /&gt;
|-&lt;br /&gt;
| License&lt;br /&gt;
| Open-source software, distributed under the GNU General Public License (GPL). [[#License|More...]]&lt;br /&gt;
|-&lt;br /&gt;
| Citing &lt;br /&gt;
| &amp;lt;small&amp;gt;1) P Giannozzi et al 2009 J. Phys.: Condens. Matter 21 395502&amp;lt;br&amp;gt;DOI: 10.1088/0953-8984/21/39/395502.&amp;lt;br&amp;gt;2) P Giannozzi et al 2017 J. Phys.: Condens. Matter 29 465901&amp;lt;br&amp;gt;DOI: 10.1088/1361-648X/aa8f79.&amp;lt;br&amp;gt;3) P Giannozzi et al 2020 J. Chem. Phys. 152 154105&amp;lt;br&amp;gt;DOI: 10.1063/5.0005082.&amp;lt;/small&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Links&lt;br /&gt;
| [https://www.quantum-espresso.org Homepage] &amp;amp;#124; [https://www.quantum-espresso.org/resources/users-manual Documentation]&lt;br /&gt;
|-&lt;br /&gt;
| Graphical Interface&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| Plugins&lt;br /&gt;
| [https://epw-code.org/ EPW]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Description =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Quantum ESPRESSO&#039;&#039;&#039; is an integrated suite of Open-Source computer codes for electronic-structure calculations and materials modeling at the nanoscale. It is based on density-functional theory, plane waves, and pseudopotentials.&lt;br /&gt;
&lt;br /&gt;
= Availability =&lt;br /&gt;
&lt;br /&gt;
Quantum ESPRESSO is available on selected bwHPC-Clusters. A complete list of versions currently installed on the bwHPC-Clusters can be obtained from the [https://www.bwhpc.de/software.html Cluster Information System (CIS)].&lt;br /&gt;
&lt;br /&gt;
In order to check which versions of Quantum ESPRESSO are installed on the compute cluster, run the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module avail chem/quantum_espresso&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= License =&lt;br /&gt;
&lt;br /&gt;
Quantum ESPRESSO is free, open-source software released under the GNU General Public License (GPL). Anyone interested in using the Quantum ESPRESSO program suite must read the conditions described in its [https://www.quantum-espresso.org/project/manifesto manifesto].&lt;br /&gt;
&lt;br /&gt;
= Usage =&lt;br /&gt;
== Loading the module ==&lt;br /&gt;
&lt;br /&gt;
You can load the default version of Quantum ESPRESSO with the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load chem/quantum_espresso&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The module will try to load all modules it needs to function (e.g., compiler, mpi, ...). If loading the module fails, check if you have already loaded one of those modules, but not in the version required by Quantum ESPRESSO.&lt;br /&gt;
&lt;br /&gt;
If you wish to load another (older) version of Quantum ESPRESSO, you can do so using&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load chem/quantum_espresso/&amp;lt;version&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
with &amp;lt;version&amp;gt; specifying the desired version.&lt;br /&gt;
&lt;br /&gt;
Please cite Quantum ESPRESSO in your publications according to the references.&lt;br /&gt;
&lt;br /&gt;
== Program Binaries ==&lt;br /&gt;
&lt;br /&gt;
All binaries of the Quantum ESPRESSO software package are located in the directory &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;$ESPRESSO_BIN_DIR&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Hints for using Quantum ESPRESSO ==&lt;br /&gt;
&lt;br /&gt;
=== Input Files ===&lt;br /&gt;
&lt;br /&gt;
For information about how to construct input files for Quantum ESPRESSO, please consult the [https://www.quantum-espresso.org/resources/users-manual/input-data-description documentation].&lt;br /&gt;
&lt;br /&gt;
=== Disk Usage ===&lt;br /&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;
&lt;br /&gt;
= Examples =&lt;br /&gt;
&lt;br /&gt;
As with all processes that require more than a few minutes to run, non-trivial compute jobs must be submitted to the cluster queuing system.&lt;br /&gt;
&lt;br /&gt;
Example scripts are available in the directory &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;$ESPRESSO_EXA_DIR&amp;lt;/span&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module show chem/quantum_espresso         # show environment variables, which will be available after &#039;module load&#039;&lt;br /&gt;
$ module load chem/quantum_espresso         # load module&lt;br /&gt;
$ ls $ESPRESSO_EXA_DIR                      # show content of directory $ESPRESSO_EXA_DIR&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run several example jobs on &#039;&#039;&#039;JUSTUS 2&#039;&#039;&#039;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load chem/quantum_espresso                     # load module&lt;br /&gt;
$ WORKSPACE=`ws_allocate quantum_espresso 3`            # allocate workspace&lt;br /&gt;
$ cd $WORKSPACE                                         # change to workspace&lt;br /&gt;
$ cp -a $ESPRESSO_HOME/bwhpc-examples .                 # copy example files to workspace&lt;br /&gt;
$ cd bwhpc-examples                                     # change to test directory&lt;br /&gt;
$ sbatch bwforcluster-quantum_espresso-example.sbatch   # submit job&lt;br /&gt;
$ squeue                                                # obtain JOBID&lt;br /&gt;
$ scontrol show job &amp;lt;JOBID&amp;gt;                             # check state of job&lt;br /&gt;
$ ls                                                    # when job finishes the results will be visible in this directory&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Useful links =&lt;br /&gt;
&lt;br /&gt;
* [https://www.quantum-espresso.org/Doc/user_guide/ Documentation (english)]&lt;br /&gt;
* [https://www.quantum-espresso.org/forum Forum (english)]&lt;br /&gt;
* [https://www.quantum-espresso.org/resources/tutorials Tutorials (english)]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Quantum_ESPRESSO Wikipedia article (english)]&lt;br /&gt;
* [https://www.quantum-espresso.org/resources/tools Plugins for Quantum ESPRESSO (english)]&lt;br /&gt;
----&lt;br /&gt;
[[Category:Chemistry software]][[Category:BwForCluster_Chemistry]][[Category:BwForCluster_JUSTUS_2]]&lt;/div&gt;</summary>
		<author><name>F Wagner</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=JUSTUS2/Software/Quantum_ESPRESSO&amp;diff=9906</id>
		<title>JUSTUS2/Software/Quantum ESPRESSO</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=JUSTUS2/Software/Quantum_ESPRESSO&amp;diff=9906"/>
		<updated>2022-02-05T08:09:41Z</updated>

		<summary type="html">&lt;p&gt;F Wagner: /* Loading the module */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Softwarepage|chem/quantum_espresso}}&lt;br /&gt;
&lt;br /&gt;
{| width=760px 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/quantum_espresso&lt;br /&gt;
|-&lt;br /&gt;
| Availability&lt;br /&gt;
| [[BwForCluster_Chemistry]] &amp;amp;#124; [[BwForCluster_JUSTUS_2]] &lt;br /&gt;
|-&lt;br /&gt;
| License&lt;br /&gt;
| Open-source software, distributed under the GNU General Public License (GPL). [[#License|More...]]&lt;br /&gt;
|-&lt;br /&gt;
| Citing &lt;br /&gt;
| &amp;lt;small&amp;gt;1) P Giannozzi et al 2009 J. Phys.: Condens. Matter 21 395502&amp;lt;br&amp;gt;DOI: 10.1088/0953-8984/21/39/395502.&amp;lt;br&amp;gt;2) P Giannozzi et al 2017 J. Phys.: Condens. Matter 29 465901&amp;lt;br&amp;gt;DOI: 10.1088/1361-648X/aa8f79.&amp;lt;br&amp;gt;3) P Giannozzi et al 2020 J. Chem. Phys. 152 154105&amp;lt;br&amp;gt;DOI: 10.1063/5.0005082.&amp;lt;/small&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Links&lt;br /&gt;
| [https://www.quantum-espresso.org Homepage] &amp;amp;#124; [https://www.quantum-espresso.org/resources/users-manual Documentation]&lt;br /&gt;
|-&lt;br /&gt;
| Graphical Interface&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| Plugins&lt;br /&gt;
| [https://epw-code.org/ EPW]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Description =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Quantum ESPRESSO&#039;&#039;&#039; is an integrated suite of Open-Source computer codes for electronic-structure calculations and materials modeling at the nanoscale. It is based on density-functional theory, plane waves, and pseudopotentials.&lt;br /&gt;
&lt;br /&gt;
= Availability =&lt;br /&gt;
&lt;br /&gt;
Quantum ESPRESSO is available on selected bwHPC-Clusters. A complete list of versions currently installed on the bwHPC-Clusters can be obtained from the [https://www.bwhpc.de/software.html Cluster Information System (CIS)].&lt;br /&gt;
&lt;br /&gt;
In order to check which versions of Quantum ESPRESSO are installed on the compute cluster, run the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module avail chem/quantum_espresso&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= License =&lt;br /&gt;
&lt;br /&gt;
Quantum ESPRESSO is free, open-source software released under the GNU General Public License (GPL). Anyone interested in using the Quantum ESPRESSO program suite must read the conditions described in its [https://www.quantum-espresso.org/project/manifesto manifesto].&lt;br /&gt;
&lt;br /&gt;
= Usage =&lt;br /&gt;
== Loading the module ==&lt;br /&gt;
&lt;br /&gt;
You can load the default version of Quantum ESPRESSO with the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load chem/quantum_espresso&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The module will try to load all modules it needs to function (e.g., compiler, mpi, ...). If loading the module fails, check if you have already loaded one of those modules, but not in the version required by Quantum ESPRESSO.&lt;br /&gt;
&lt;br /&gt;
If you wish to load another (older) version of Quantum ESPRESSO, you can do so using&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load chem/quantum_espresso/&amp;lt;version&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
with &amp;lt;version&amp;gt; specifying the desired version.&lt;br /&gt;
&lt;br /&gt;
Please cite Quantum ESPRESSO in your publications according to the [https://www.quantum-espresso.org/references].&lt;br /&gt;
&lt;br /&gt;
== Program Binaries ==&lt;br /&gt;
&lt;br /&gt;
All binaries of the Quantum ESPRESSO software package are located in the directory &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;$ESPRESSO_BIN_DIR&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Hints for using Quantum ESPRESSO ==&lt;br /&gt;
&lt;br /&gt;
=== Input Files ===&lt;br /&gt;
&lt;br /&gt;
For information about how to construct input files for Quantum ESPRESSO, please consult the [https://www.quantum-espresso.org/resources/users-manual/input-data-description documentation].&lt;br /&gt;
&lt;br /&gt;
=== Disk Usage ===&lt;br /&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;
&lt;br /&gt;
= Examples =&lt;br /&gt;
&lt;br /&gt;
As with all processes that require more than a few minutes to run, non-trivial compute jobs must be submitted to the cluster queuing system.&lt;br /&gt;
&lt;br /&gt;
Example scripts are available in the directory &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;$ESPRESSO_EXA_DIR&amp;lt;/span&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module show chem/quantum_espresso         # show environment variables, which will be available after &#039;module load&#039;&lt;br /&gt;
$ module load chem/quantum_espresso         # load module&lt;br /&gt;
$ ls $ESPRESSO_EXA_DIR                      # show content of directory $ESPRESSO_EXA_DIR&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run several example jobs on &#039;&#039;&#039;JUSTUS 2&#039;&#039;&#039;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load chem/quantum_espresso                     # load module&lt;br /&gt;
$ WORKSPACE=`ws_allocate quantum_espresso 3`            # allocate workspace&lt;br /&gt;
$ cd $WORKSPACE                                         # change to workspace&lt;br /&gt;
$ cp -a $ESPRESSO_HOME/bwhpc-examples .                 # copy example files to workspace&lt;br /&gt;
$ cd bwhpc-examples                                     # change to test directory&lt;br /&gt;
$ sbatch bwforcluster-quantum_espresso-example.sbatch   # submit job&lt;br /&gt;
$ squeue                                                # obtain JOBID&lt;br /&gt;
$ scontrol show job &amp;lt;JOBID&amp;gt;                             # check state of job&lt;br /&gt;
$ ls                                                    # when job finishes the results will be visible in this directory&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Useful links =&lt;br /&gt;
&lt;br /&gt;
* [https://www.quantum-espresso.org/Doc/user_guide/ Documentation (english)]&lt;br /&gt;
* [https://www.quantum-espresso.org/forum Forum (english)]&lt;br /&gt;
* [https://www.quantum-espresso.org/resources/tutorials Tutorials (english)]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Quantum_ESPRESSO Wikipedia article (english)]&lt;br /&gt;
* [https://www.quantum-espresso.org/resources/tools Plugins for Quantum ESPRESSO (english)]&lt;br /&gt;
----&lt;br /&gt;
[[Category:Chemistry software]][[Category:BwForCluster_Chemistry]][[Category:BwForCluster_JUSTUS_2]]&lt;/div&gt;</summary>
		<author><name>F Wagner</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=JUSTUS2/Software/Singularity&amp;diff=9905</id>
		<title>JUSTUS2/Software/Singularity</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=JUSTUS2/Software/Singularity&amp;diff=9905"/>
		<updated>2022-02-05T07:44:19Z</updated>

		<summary type="html">&lt;p&gt;F Wagner: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=760px 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;
| system/singularity&lt;br /&gt;
|-&lt;br /&gt;
| License&lt;br /&gt;
| Open-source software, distributed under the 3-clause BSD License. [[#License|More...]]&lt;br /&gt;
|-&lt;br /&gt;
| Citing&lt;br /&gt;
| ---&lt;br /&gt;
|-&lt;br /&gt;
| Links&lt;br /&gt;
| [https://sylabs.io/singularity/ Homepage] &amp;amp;#124; [https://sylabs.io/docs/ Documentation]&lt;br /&gt;
|-&lt;br /&gt;
| Graphical Interface&lt;br /&gt;
| No&lt;br /&gt;
|}&lt;br /&gt;
= Description =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Singularity&#039;&#039;&#039; is a container platform.&lt;br /&gt;
&lt;br /&gt;
= License =&lt;br /&gt;
&lt;br /&gt;
Singularity is free, open-source software released under the 3-clause BSD license. Please read the [https://sylabs.io/guides/3.7/user-guide/license.html license] for additional information about Singularity.&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 Singularity with the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load system/singularity&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you wish to load another (older) version of Singularity, you can do so using&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load system/singularity/&amp;lt;version&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
with &amp;lt;version&amp;gt; specifying the desired version.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=red&amp;gt;Important: On JUSTUS 2, Singularity is available on all compute nodes. You do not have to load a module.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Program Binaries ==&lt;br /&gt;
&lt;br /&gt;
The binary &#039;&#039;singularity&#039;&#039; is main program of the container platform.&lt;br /&gt;
&lt;br /&gt;
To get help using Singularity execute the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ singularity --help&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Furthermore, a man page is available and can be accessed by typing:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ man singularity&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For additional information about how to use Singularity, please consult the [https://sylabs.io/docs/ documentation].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=red&amp;gt;Important: On JUSTUS 2, Singularity is only available on compute nodes. You must switch to such a node to invoke any &#039;&#039;singularity&#039;&#039; commands.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Batch jobs with containers ==&lt;br /&gt;
&lt;br /&gt;
Batch jobs utilizing Singularity containers are generally built the same way as all other [https://wiki.bwhpc.de/e/BwForCluster_JUSTUS_2_Slurm_HOWTO#How_to_submit_a_batch_job.3F batch jobs], where the job script contains &#039;&#039;singularity&#039;&#039; commands. For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
# Allocate one node&lt;br /&gt;
#SBATCH --nodes=1&lt;br /&gt;
# Number of program instances to be executed&lt;br /&gt;
#SBATCH --tasks-per-node=4&lt;br /&gt;
# 8 GB memory required per node&lt;br /&gt;
#SBATCH --mem=16G&lt;br /&gt;
# Maximum run time of job&lt;br /&gt;
#SBATCH --time=1:00:00&lt;br /&gt;
# Give job a reasonable name&lt;br /&gt;
#SBATCH --job-name=Singularity&lt;br /&gt;
# File name for standard output (%j will be replaced by job id)&lt;br /&gt;
#SBATCH --output=singularity_job-%j.out&lt;br /&gt;
# File name for error output&lt;br /&gt;
#SBATCH --error=singularity_job-%j.err&lt;br /&gt;
&lt;br /&gt;
module load your/singularity/version #(not needed on JUSTUS 2, but could be necessary on other system)&lt;br /&gt;
&lt;br /&gt;
cd your/workspace&lt;br /&gt;
&lt;br /&gt;
# Run container (two options to start a container)&lt;br /&gt;
singularity run [options] &amp;lt;container&amp;gt;&lt;br /&gt;
singularity exec [options] &amp;lt;container&amp;gt; &amp;lt;command&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=red&amp;gt;Keep in mind that other modules you may have loaded will not be available inside the container.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Using GPUs ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
[…]&lt;br /&gt;
# Allocate one GPU per node&lt;br /&gt;
#SBATCH --partition=gpu&lt;br /&gt;
#SBATCH --gres=gpu:1&lt;br /&gt;
[…]&lt;br /&gt;
&lt;br /&gt;
module load your/singularity/version #(not needed on JUSTUS 2, but could be necessary on other system)&lt;br /&gt;
&lt;br /&gt;
cd your/workspace&lt;br /&gt;
&lt;br /&gt;
# Run container (two options to start a container)&lt;br /&gt;
singularity run --nv [options] &amp;lt;container&amp;gt;&lt;br /&gt;
singularity exec --nv [options] &amp;lt;container&amp;gt; &amp;lt;command&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using the flag is advisable, but may be omitted if the correct GPU- and driver-APIs are available on the container.&lt;br /&gt;
&lt;br /&gt;
= Examples =&lt;br /&gt;
&lt;br /&gt;
== Run your first container on JUSTUS 2 ==&lt;br /&gt;
&lt;br /&gt;
Build a TensorFlow container with Singularity and execute a Python command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# request interactive node with GPUs&lt;br /&gt;
$ srun --nodes=1 --exclusive --gres=gpu:2 --pty bash&lt;br /&gt;
&lt;br /&gt;
# create workspace and navigate into it&lt;br /&gt;
$ WORKSPACE=`ws_allocate tensorflow 3`&lt;br /&gt;
$ cd $WORKSPACE&lt;br /&gt;
&lt;br /&gt;
# build container&lt;br /&gt;
$ singularity build tensorflow-20.11-tf2-py3.sif docker://nvcr.io/nvidia/tensorflow:20.11-tf2-py3&lt;br /&gt;
&lt;br /&gt;
# execute Python command&lt;br /&gt;
$ singularity exec --nv tensorflow-20.11-tf2-py3.sif python -c &#039;import tensorflow as tf; \&lt;br /&gt;
  print(&amp;quot;Num GPUs Available: &amp;quot;,len(tf.config.experimental.list_physical_devices(&amp;quot;GPU&amp;quot;)))&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Ready-to-use containers can be pulled from the [https://ngc.nvidia.com/catalog/containers NVIDIA GPU CLOUD (NGC)] catalog.&lt;br /&gt;
&lt;br /&gt;
== NGC environment modules on JUSTUS 2 ==&lt;br /&gt;
&lt;br /&gt;
1) Prepare a workspace to store the container&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ srun --nodes=1 --exclusive --gres=gpu:2 --pty bash&lt;br /&gt;
$ WORKSPACE=`ws_allocate ngc 3`&lt;br /&gt;
$ cd $WORKSPACE&lt;br /&gt;
$ export NGC_IMAGE_DIR=$(pwd)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;font color=red&amp;gt;Important: Containers can only run in workspaces.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2) PyTorch container&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load ngc/.numlib&lt;br /&gt;
$ module load 20.12-torch-py3&lt;br /&gt;
$ python3&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; import torch&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; x = torch.randn(2,3)&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; print(x)&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; quit()&lt;br /&gt;
$ module unload 20.12-torch-py3&lt;br /&gt;
$ module unload ngc/.numlib&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Use the container in the same manner as an interactive shell.&lt;br /&gt;
&lt;br /&gt;
3) LAMMPS container&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load ngc/.chem&lt;br /&gt;
$ module load lammps-29Oct2020&lt;br /&gt;
$ wget https://lammps.sandia.gov/inputs/in.lj.txt&lt;br /&gt;
$ export SINGULARITY_BINDPATH=$(pwd)&lt;br /&gt;
$ mpirun -n 2 lmp -in in.lj.txt -var x 8 -var y 8 -var z 8 -k on g 2 -sf kk -pk kokkos cuda/aware on neigh full \&lt;br /&gt;
  comm device binsize 2.8&lt;br /&gt;
$ module unload lammps-29Oct2020&lt;br /&gt;
$ module unload ngc/.chem&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Use &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;SINGULARITY_BINDPATH=&amp;lt;PATH&amp;gt;&amp;lt;/span&amp;gt; to mount the directory with the input file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Currently, &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;module load ngc/.numlib&amp;lt;/span&amp;gt; for numeric libraries and &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;module load ngc/.chem&amp;lt;/span&amp;gt; for chemistry programs can be selected.&lt;br /&gt;
&lt;br /&gt;
== Batch jobs with containers on JUSTUS 2 ==&lt;br /&gt;
&lt;br /&gt;
Run a GROMACS container with Singularity as a batch job:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ WORKSPACE=`ws_allocate gromacs 3`                                         # allocate workspace&lt;br /&gt;
$ cd $WORKSPACE                                                             # change to workspace&lt;br /&gt;
$ singularity pull gromacs-2020_2.sif docker://nvcr.io/hpc/gromacs:2020.2   # pull container from NGC&lt;br /&gt;
$ cp -r /opt/bwhpc/common/chem/ngc/gromacs/ ./bwhpc-examples/               # copy example to workspace&lt;br /&gt;
$ cd ./bwhpc-examples                                                       # change to example directory&lt;br /&gt;
$ sbatch gromacs-2020.2_gpu.slurm                                           # submit job&lt;br /&gt;
$ squeue                                                                    # obtain JOBID&lt;br /&gt;
$ scontrol show job &amp;lt;JOBID&amp;gt;                                                 # check state of job&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
More batch job examples are located at &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;/opt/bwhpc/common/chem/ngc&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
= Useful links =&lt;br /&gt;
&lt;br /&gt;
* [https://sylabs.io/docs/ Documentation (english)]&lt;br /&gt;
* [https://de.wikipedia.org/wiki/Singularity_(Software) Wikipedia article (german)]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Singularity_(software) Wikipedia article (english)]&lt;br /&gt;
----&lt;br /&gt;
[[Category:Software]]&lt;/div&gt;</summary>
		<author><name>F Wagner</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=JUSTUS2/Software/SIESTA&amp;diff=9894</id>
		<title>JUSTUS2/Software/SIESTA</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=JUSTUS2/Software/SIESTA&amp;diff=9894"/>
		<updated>2022-02-04T19:03:19Z</updated>

		<summary type="html">&lt;p&gt;F Wagner: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Softwarepage|chem/siesta}}&lt;br /&gt;
&lt;br /&gt;
{| width=760px 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/siesta&lt;br /&gt;
|-&lt;br /&gt;
| Availability&lt;br /&gt;
| [[BwForCluster_JUSTUS_2]]&lt;br /&gt;
|-&lt;br /&gt;
| License&lt;br /&gt;
| Free, open-source software, distributed under the GNU General Public License (GPL). [[#License|More...]]&lt;br /&gt;
|-&lt;br /&gt;
| Citing &lt;br /&gt;
| [https://departments.icmab.es/leem/SIESTA_MATERIAL/Docs/Publications/index.html Publications]&lt;br /&gt;
|-&lt;br /&gt;
| Links&lt;br /&gt;
| [https://departments.icmab.es/leem/siesta/ Homepage] &amp;amp;#124; [https://departments.icmab.es/leem/SIESTA_MATERIAL/Docs/Manuals/manuals.html 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;
&lt;br /&gt;
&#039;&#039;&#039;SIESTA&#039;&#039;&#039; (Spanish Initiative for Electronic Simulations with Thousands of Atoms) is both a method and its computer program implementation, to perform electronic structure calculations and ab initio molecular dynamics simulations of molecules and solids.&lt;br /&gt;
&lt;br /&gt;
= Availability =&lt;br /&gt;
&lt;br /&gt;
SIESTA is available on selected bwHPC-Clusters. A complete list of versions currently installed on the bwHPC-Clusters can be obtained from the [https://www.bwhpc.de/software.html Cluster Information System (CIS)].&lt;br /&gt;
&lt;br /&gt;
In order to check which versions of SIESTA are installed on the compute cluster, run the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module avail chem/siesta&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= License =&lt;br /&gt;
&lt;br /&gt;
SIESTA is free, open-source software released under the GNU General Public License (GPL). The SIESTA package in its entirety may be copied, modified or distributed according to the conditions described in its [https://departments.icmab.es/leem/SIESTA_MATERIAL/Docs/Manuals/manuals.html documentation].&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 SIESTA with the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load chem/siesta&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The module will try to load all modules it needs to function (e.g., compiler, mpi, ...). If loading the module fails, check if you have already loaded one of those modules, but not in the version required by SIESTA.&lt;br /&gt;
&lt;br /&gt;
If you wish to load another (older) version of SIESTA, you can do so using&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load chem/siesta/&amp;lt;version&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
with &amp;lt;version&amp;gt; specifying the desired version.&lt;br /&gt;
&lt;br /&gt;
Please cite SIESTA in your publications according to the [https://departments.icmab.es/leem/SIESTA_MATERIAL/Docs/Publications/index.html references].&lt;br /&gt;
&lt;br /&gt;
== Program Binaries ==&lt;br /&gt;
&lt;br /&gt;
The binary &#039;&#039;siesta&#039;&#039; is main program of the SIESTA package.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage: siesta [options] [&amp;lt; infile] [&amp;gt; outfile]&lt;br /&gt;
  &lt;br /&gt;
Example: siesta RUN.fdf &amp;gt; RUN.out&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For information about how to construct SIESTA input files, please see the [https://departments.icmab.es/leem/SIESTA_MATERIAL/Docs/Manuals/manuals.html documentation].&lt;br /&gt;
&lt;br /&gt;
== Hints for using SIESTA ==&lt;br /&gt;
&lt;br /&gt;
=== Parallel Execution ===&lt;br /&gt;
&lt;br /&gt;
It is usually more efficient to run several smaller jobs with reasonable speedup side by side. Check for a reasonable speedup by increasing the number of workers from 1, 2, 4, n cores. Do not forget to adjust the memory specification when changing the number of workers&lt;br /&gt;
&lt;br /&gt;
=== Memory Management ===&lt;br /&gt;
&lt;br /&gt;
It requires some experience to choose the perfect memory value. Monitoring a job interactively may help to estimate the memory consumption. Requesting 1GB more than the required amount is typically sufficient.&lt;br /&gt;
&lt;br /&gt;
=== Runtime Specification ===&lt;br /&gt;
&lt;br /&gt;
The wall-time limit is independent of the number of parallel workers. Selecting the best value requires some experience. In general, jobs with shorter wall times get higher priorities. It could help to run the job interactively for a small period of time to monitor its convergence. Furthermore, it may be advantageous to extrapolate the run time by looking at smaller test jobs.&lt;br /&gt;
&lt;br /&gt;
= Examples =&lt;br /&gt;
&lt;br /&gt;
As with all processes that require more than a few minutes to run, non-trivial compute jobs must be submitted to the cluster queuing system.&lt;br /&gt;
&lt;br /&gt;
Example scripts are available in the directory &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;$SIESTA_EXA_DIR&amp;lt;/span&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module show chem/siesta                # show environment variables, which will be available after &#039;module load&#039;&lt;br /&gt;
$ module load chem/siesta                # load module&lt;br /&gt;
$ ls $SIESTA_EXA_DIR                     # show content of directory $SIESTA_EXA_DIR&lt;br /&gt;
$ cat $SIESTA_EXA_DIR/README             # show examples README&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run a first simple example job:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load chem/siesta                          # load module&lt;br /&gt;
$ WORKSPACE=`ws_allocate siesta 3`                 # allocate workspace&lt;br /&gt;
$ cd $WORKSPACE                                    # change to workspace&lt;br /&gt;
$ cp -a $SIESTA_HOME/bwhpc-examples .              # copy example files to workspace&lt;br /&gt;
$ cd bwhpc-examples/h2o                            # change to test directory&lt;br /&gt;
$ sbatch bwhpc_siesta_h2o.sh                       # submit job&lt;br /&gt;
$ squeue                                           # obtain JOBID&lt;br /&gt;
$ scontrol show job &amp;lt;JOBID&amp;gt;                        # check state of job&lt;br /&gt;
$ ls                                               # when job finishes the results will be visible in this directory&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Useful links =&lt;br /&gt;
&lt;br /&gt;
* [https://departments.icmab.es/leem/SIESTA_MATERIAL/Docs/Manuals/manuals.html Documentation (english)]&lt;br /&gt;
* [https://departments.icmab.es/leem/SIESTA_MATERIAL/Docs/list.html Mailing list (english)]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/SIESTA_(computer_program) Wikipedia article (english)]&lt;br /&gt;
----&lt;br /&gt;
[[Category:Chemistry software]][[Category:BwForCluster_Chemistry]][[Category:BwForCluster_JUSTUS_2]]&lt;/div&gt;</summary>
		<author><name>F Wagner</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=JUSTUS2/Software/Quantum_ESPRESSO&amp;diff=9893</id>
		<title>JUSTUS2/Software/Quantum ESPRESSO</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=JUSTUS2/Software/Quantum_ESPRESSO&amp;diff=9893"/>
		<updated>2022-02-04T18:21:28Z</updated>

		<summary type="html">&lt;p&gt;F Wagner: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Softwarepage|chem/quantum_espresso}}&lt;br /&gt;
&lt;br /&gt;
{| width=760px 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/quantum_espresso&lt;br /&gt;
|-&lt;br /&gt;
| Availability&lt;br /&gt;
| [[BwForCluster_Chemistry]] &amp;amp;#124; [[BwForCluster_JUSTUS_2]] &lt;br /&gt;
|-&lt;br /&gt;
| License&lt;br /&gt;
| Open-source software, distributed under the GNU General Public License (GPL). [[#License|More...]]&lt;br /&gt;
|-&lt;br /&gt;
| Citing &lt;br /&gt;
| &amp;lt;small&amp;gt;1) P Giannozzi et al 2009 J. Phys.: Condens. Matter 21 395502&amp;lt;br&amp;gt;DOI: 10.1088/0953-8984/21/39/395502.&amp;lt;br&amp;gt;2) P Giannozzi et al 2017 J. Phys.: Condens. Matter 29 465901&amp;lt;br&amp;gt;DOI: 10.1088/1361-648X/aa8f79.&amp;lt;br&amp;gt;3) P Giannozzi et al 2020 J. Chem. Phys. 152 154105&amp;lt;br&amp;gt;DOI: 10.1063/5.0005082.&amp;lt;/small&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Links&lt;br /&gt;
| [https://www.quantum-espresso.org Homepage] &amp;amp;#124; [https://www.quantum-espresso.org/resources/users-manual Documentation]&lt;br /&gt;
|-&lt;br /&gt;
| Graphical Interface&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| Plugins&lt;br /&gt;
| [https://epw-code.org/ EPW]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Description =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Quantum ESPRESSO&#039;&#039;&#039; is an integrated suite of Open-Source computer codes for electronic-structure calculations and materials modeling at the nanoscale. It is based on density-functional theory, plane waves, and pseudopotentials.&lt;br /&gt;
&lt;br /&gt;
= Availability =&lt;br /&gt;
&lt;br /&gt;
Quantum ESPRESSO is available on selected bwHPC-Clusters. A complete list of versions currently installed on the bwHPC-Clusters can be obtained from the [https://www.bwhpc.de/software.html Cluster Information System (CIS)].&lt;br /&gt;
&lt;br /&gt;
In order to check which versions of Quantum ESPRESSO are installed on the compute cluster, run the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module avail chem/quantum_espresso&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= License =&lt;br /&gt;
&lt;br /&gt;
Quantum ESPRESSO is free, open-source software released under the GNU General Public License (GPL). Anyone interested in using the Quantum ESPRESSO program suite must read the conditions described in its [https://www.quantum-espresso.org/project/manifesto manifesto].&lt;br /&gt;
&lt;br /&gt;
= Usage =&lt;br /&gt;
== Loading the module ==&lt;br /&gt;
&lt;br /&gt;
You can load the default version of Quantum ESPRESSO with the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load chem/quantum_espresso&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The module will try to load all modules it needs to function (e.g., compiler, mpi, ...). If loading the module fails, check if you have already loaded one of those modules, but not in the version required by Quantum ESPRESSO.&lt;br /&gt;
&lt;br /&gt;
If you wish to load another (older) version of Quantum ESPRESSO, you can do so using&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load chem/quantum_espresso/&amp;lt;version&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
with &amp;lt;version&amp;gt; specifying the desired version.&lt;br /&gt;
&lt;br /&gt;
Please cite Quantum ESPRESSO in your publications according to the [https://www.quantum-espresso.org/download references].&lt;br /&gt;
&lt;br /&gt;
== Program Binaries ==&lt;br /&gt;
&lt;br /&gt;
All binaries of the Quantum ESPRESSO software package are located in the directory &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;$ESPRESSO_BIN_DIR&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Hints for using Quantum ESPRESSO ==&lt;br /&gt;
&lt;br /&gt;
=== Input Files ===&lt;br /&gt;
&lt;br /&gt;
For information about how to construct input files for Quantum ESPRESSO, please consult the [https://www.quantum-espresso.org/resources/users-manual/input-data-description documentation].&lt;br /&gt;
&lt;br /&gt;
=== Disk Usage ===&lt;br /&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;
&lt;br /&gt;
= Examples =&lt;br /&gt;
&lt;br /&gt;
As with all processes that require more than a few minutes to run, non-trivial compute jobs must be submitted to the cluster queuing system.&lt;br /&gt;
&lt;br /&gt;
Example scripts are available in the directory &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;$ESPRESSO_EXA_DIR&amp;lt;/span&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module show chem/quantum_espresso         # show environment variables, which will be available after &#039;module load&#039;&lt;br /&gt;
$ module load chem/quantum_espresso         # load module&lt;br /&gt;
$ ls $ESPRESSO_EXA_DIR                      # show content of directory $ESPRESSO_EXA_DIR&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run several example jobs on &#039;&#039;&#039;JUSTUS 2&#039;&#039;&#039;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load chem/quantum_espresso                     # load module&lt;br /&gt;
$ WORKSPACE=`ws_allocate quantum_espresso 3`            # allocate workspace&lt;br /&gt;
$ cd $WORKSPACE                                         # change to workspace&lt;br /&gt;
$ cp -a $ESPRESSO_HOME/bwhpc-examples .                 # copy example files to workspace&lt;br /&gt;
$ cd bwhpc-examples                                     # change to test directory&lt;br /&gt;
$ sbatch bwforcluster-quantum_espresso-example.sbatch   # submit job&lt;br /&gt;
$ squeue                                                # obtain JOBID&lt;br /&gt;
$ scontrol show job &amp;lt;JOBID&amp;gt;                             # check state of job&lt;br /&gt;
$ ls                                                    # when job finishes the results will be visible in this directory&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Useful links =&lt;br /&gt;
&lt;br /&gt;
* [https://www.quantum-espresso.org/Doc/user_guide/ Documentation (english)]&lt;br /&gt;
* [https://www.quantum-espresso.org/forum Forum (english)]&lt;br /&gt;
* [https://www.quantum-espresso.org/resources/tutorials Tutorials (english)]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Quantum_ESPRESSO Wikipedia article (english)]&lt;br /&gt;
* [https://www.quantum-espresso.org/resources/tools Plugins for Quantum ESPRESSO (english)]&lt;br /&gt;
----&lt;br /&gt;
[[Category:Chemistry software]][[Category:BwForCluster_Chemistry]][[Category:BwForCluster_JUSTUS_2]]&lt;/div&gt;</summary>
		<author><name>F Wagner</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=JUSTUS2/Software/NAMD&amp;diff=9891</id>
		<title>JUSTUS2/Software/NAMD</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=JUSTUS2/Software/NAMD&amp;diff=9891"/>
		<updated>2022-02-04T17:48:48Z</updated>

		<summary type="html">&lt;p&gt;F Wagner: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Softwarepage|chem/namd}}&lt;br /&gt;
&lt;br /&gt;
{| width=760px 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/namd&lt;br /&gt;
|-&lt;br /&gt;
| Availability&lt;br /&gt;
| [[BwForCluster_JUSTUS_2]] &amp;amp;#124; [[BwForCluster_MLS&amp;amp;WISO_Production]]&lt;br /&gt;
|-&lt;br /&gt;
| License&lt;br /&gt;
| Freeware for non-commercial use. [[#License|More...]]&lt;br /&gt;
|-&lt;br /&gt;
| Citing &lt;br /&gt;
| [http://www.ks.uiuc.edu/Research/namd/papers.html Publications]&lt;br /&gt;
|-&lt;br /&gt;
| Links&lt;br /&gt;
| [http://www.ks.uiuc.edu/Research/namd/ Homepage] &amp;amp;#124; [http://www.ks.uiuc.edu/Research/namd/2.14/ug/ 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;
&lt;br /&gt;
&#039;&#039;&#039;NAMD&#039;&#039;&#039; (NAnoscale Molecular Dynamics) is a parallel molecular dynamics code designed for high-performance simulation of large biomolecular systems.&lt;br /&gt;
&lt;br /&gt;
= Availability =&lt;br /&gt;
&lt;br /&gt;
NAMD is available on selected bwHPC-Clusters. A complete list of versions currently installed on the bwHPC-Clusters can be obtained from the [https://www.bwhpc.de/software.html Cluster Information System (CIS)].&lt;br /&gt;
&lt;br /&gt;
In order to check which versions of NAMD are installed on the compute cluster, run the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module avail chem/namd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= License =&lt;br /&gt;
&lt;br /&gt;
NAMD is available as [https://en.wikipedia.org/wiki/Freeware freeware] for non-commercial use by individuals, academic institutions, and corporations for in-house business uses. Please read the [http://www.ks.uiuc.edu/Research/namd/license.html license] for additional information about NAMD.&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 NAMD with the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load chem/namd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The module will try to load all modules (i.e., compiler, MPI, MKL) it needs to function. If loading the module fails, check if you have already loaded one of those modules, but not in the version required by NAMD.&lt;br /&gt;
&lt;br /&gt;
If you wish to load another (older) version of NAMD, you can do so using&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load chem/namd/&amp;lt;version&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
with &amp;lt;version&amp;gt; specifying the desired version.&lt;br /&gt;
&lt;br /&gt;
Please cite NAMD in your publications according to the [http://www.ks.uiuc.edu/Research/namd/papers.html references].&lt;br /&gt;
&lt;br /&gt;
== Program Binaries ==&lt;br /&gt;
&lt;br /&gt;
The binary &#039;&#039;namd2&#039;&#039; is main program of the NAMD package.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage: namd2 [options] [config file]&lt;br /&gt;
  &lt;br /&gt;
Example: namd2 +isomalloc_sync run.namd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For information about how to construct NAMD configuration files, please see the [http://www.ks.uiuc.edu/Research/namd/2.14/ug/ documentation]. In addition to a configuration file, NAMD also needs a CHARMM force field in either CHARMM or X-PLOR format, an X-PLOR format PSF file describing the molecular structure, and the initial coordinates of the molecular system in the form of a PDB file.&lt;br /&gt;
&lt;br /&gt;
The NAMD package includes several additional tools:&lt;br /&gt;
&lt;br /&gt;
* flipbinpdb -- flips byte-ordering of 8-byte doubles&lt;br /&gt;
* flipdcd -- flips byte-ordering of DCD files&lt;br /&gt;
* psfgen -- [https://www.ks.uiuc.edu/Research/vmd/ VMD] psfgen plugin&lt;br /&gt;
* sortreplicas -- un-shuffles replica trajectories to place same-temperature frames in the same file&lt;br /&gt;
&lt;br /&gt;
=== Charm++ ===&lt;br /&gt;
&lt;br /&gt;
Charm++ is a parallel object-oriented programming paradigm based on C++ and developed in the Parallel Programming Laboratory at the University of Illinois at Urbana–Champaign. NAMD has been implemented using Charm++.&lt;br /&gt;
&lt;br /&gt;
* charmrun -- launches Charm++ programs&lt;br /&gt;
&lt;br /&gt;
For help on usage, type&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ charmrun -help&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== GPU Acceleration ===&lt;br /&gt;
&lt;br /&gt;
Currently not available.&lt;br /&gt;
&lt;br /&gt;
== Hints for using NAMD ==&lt;br /&gt;
&lt;br /&gt;
=== Parallel Execution ===&lt;br /&gt;
&lt;br /&gt;
It is usually more efficient to run several smaller jobs with reasonable speedup side by side. Check for a reasonable speedup by increasing the number of workers from 1, 2, 4, n cores. Do not forget to adjust the memory specification when changing the number of workers&lt;br /&gt;
&lt;br /&gt;
=== Memory Management ===&lt;br /&gt;
&lt;br /&gt;
It requires some experience to choose the perfect memory value. Monitoring a job interactively may help to estimate the memory consumption. Requesting 1GB more than the required amount is typically sufficient.&lt;br /&gt;
&lt;br /&gt;
=== Runtime Specification ===&lt;br /&gt;
&lt;br /&gt;
The wall-time limit is independent of the number of parallel workers. Selecting the best value requires some experience. In general, jobs with shorter wall times get higher priorities. It could help to run the job interactively for a small period of time to monitor its convergence. Furthermore, it may be advantageous to extrapolate the run time by looking at smaller test jobs.&lt;br /&gt;
&lt;br /&gt;
= Examples =&lt;br /&gt;
&lt;br /&gt;
As with all processes that require more than a few minutes to run, non-trivial compute jobs must be submitted to the cluster queuing system.&lt;br /&gt;
&lt;br /&gt;
Example scripts are available in the directory &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;$NAMD_EXA_DIR&amp;lt;/span&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module show chem/namd                # show environment variables, which will be available after &#039;module load&#039;&lt;br /&gt;
$ module load chem/namd                # load module&lt;br /&gt;
$ ls $NAMD_EXA_DIR                     # show content of directory $NAMD_EXA_DIR&lt;br /&gt;
$ cat $NAMD_EXA_DIR/README             # show examples README&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run a first simple example job:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load chem/namd                          # load module&lt;br /&gt;
$ WORKSPACE=`ws_allocate namd 3`                 # allocate workspace&lt;br /&gt;
$ cd $WORKSPACE                                  # change to workspace&lt;br /&gt;
$ cp -a $NAMD_HOME/bwhpc-examples .              # copy example files to workspace&lt;br /&gt;
$ cd bwhpc-examples/apoa1                        # change to test directory&lt;br /&gt;
$ sbatch bwhpc_namd_apoa1.sh                     # submit job&lt;br /&gt;
$ squeue                                         # obtain JOBID&lt;br /&gt;
$ scontrol show job &amp;lt;JOBID&amp;gt;                      # check state of job&lt;br /&gt;
$ ls                                             # when job finishes the results will be visible in this directory&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Useful links =&lt;br /&gt;
&lt;br /&gt;
* [http://www.ks.uiuc.edu/Research/namd/2.14/ug/ Documentation (english)]&lt;br /&gt;
* [http://www.ks.uiuc.edu/Research/namd/mailing_list/ Maling list (english)]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/NAMD Wikipedia article (english)]&lt;br /&gt;
* [https://de.wikipedia.org/wiki/NAMD Wikipedia article (german)]&lt;br /&gt;
----&lt;br /&gt;
[[Category:Chemistry software]][[Category:BwForCluster_Chemistry]][[Category:BwForCluster_JUSTUS_2]][[Category:BwForCluster_MLS&amp;amp;WISO_Production]]&lt;/div&gt;</summary>
		<author><name>F Wagner</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=JUSTUS2/Software/Dalton&amp;diff=9889</id>
		<title>JUSTUS2/Software/Dalton</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=JUSTUS2/Software/Dalton&amp;diff=9889"/>
		<updated>2022-02-04T17:12:43Z</updated>

		<summary type="html">&lt;p&gt;F Wagner: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Softwarepage|chem/dalton}}&lt;br /&gt;
&lt;br /&gt;
{| width=760px 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/dalton&lt;br /&gt;
|-&lt;br /&gt;
| Availability&lt;br /&gt;
| [[BwForCluster_JUSTUS_2]]&lt;br /&gt;
|-&lt;br /&gt;
| License&lt;br /&gt;
| Open-source software, distributed under the GNU Lesser General Public License (LGPL). [[#License|More...]]&lt;br /&gt;
|-&lt;br /&gt;
| Citing&lt;br /&gt;
| [https://daltonprogram.org/citation/ Publications]&lt;br /&gt;
|-&lt;br /&gt;
| Links&lt;br /&gt;
| [http://www.daltonprogram.org/index.html Homepage] &amp;amp;#124; [https://daltonprogram.org/documentation/ Documentation]&lt;br /&gt;
|-&lt;br /&gt;
| Graphical Interface&lt;br /&gt;
| No&lt;br /&gt;
|}&lt;br /&gt;
= Description =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Dalton&#039;&#039;&#039; (named after [https://en.wikipedia.org/wiki/John_Dalton John Dalton]) is an ab initio quantum chemistry computer program designed to to allow convenient, automated determination of a large number of molecular properties based on an HF, HF-srDFT, DFT, MP2, CC, CI, MCSCF, or MC-srDFT reference wave function. For additional information on features please visit the [https://daltonprogram.org/features/ Description of the Dalton suite features] web page.&lt;br /&gt;
&lt;br /&gt;
= Availability =&lt;br /&gt;
&lt;br /&gt;
Dalton is available on selected bwHPC-Clusters. A complete list of versions currently installed on the bwHPC-Clusters can be obtained from the [https://www.bwhpc.de/software.html Cluster Information System (CIS)].&lt;br /&gt;
&lt;br /&gt;
In order to check which versions of Dalton are installed on the compute cluster, run the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module avail chem/dalton&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= License =&lt;br /&gt;
&lt;br /&gt;
Dalton is free, open-source software released under the GNU Lesser General Public License (LGPL). Anyone interested in using the Dalton program suite must read the conditions described in its [https://gitlab.com/dalton/dalton/-/blob/master/LICENSE license agreement].&lt;br /&gt;
&lt;br /&gt;
= Usage =&lt;br /&gt;
== Loading the module ==&lt;br /&gt;
&lt;br /&gt;
You can load the default version of Dalton with the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load chem/dalton&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The module will try to load all modules it needs to function (e.g., compiler, mpi, ...). If loading the module fails, check if you have already loaded one of those modules, but not in the version required by Dalton.&lt;br /&gt;
&lt;br /&gt;
If you wish to load another (older) version of Dalton, you can do so using&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load chem/dalton/&amp;lt;version&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
with &amp;lt;version&amp;gt; specifying the desired version.&lt;br /&gt;
&lt;br /&gt;
Please cite Dalton in your publications according to the [https://daltonprogram.org/citation/ references].&lt;br /&gt;
&lt;br /&gt;
== Program Binaries ==&lt;br /&gt;
&lt;br /&gt;
The binary &#039;&#039;dalton&#039;&#039; is main program of the Dalton package.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage: dalton [options] dalinp{.dal} [molinp{.mol} [potinp{.pot}] [pcmsolver{.pcm}]]&lt;br /&gt;
&lt;br /&gt;
Options:&lt;br /&gt;
 -w dir                : change job directory to dir (default: $HOME)&lt;br /&gt;
 -b dir                : prepend dir to directory list for basis set searches (job directory and dalton basis library&lt;br /&gt;
                         are included automatically)&lt;br /&gt;
 -o file               : redirect output from program to job directory with &amp;quot;file&amp;quot; as file name&lt;br /&gt;
 -ow                   : redirect output from program to job directory with standard file name&lt;br /&gt;
 -dal file             : the dalton input file&lt;br /&gt;
 -mol file             : the molecule input file&lt;br /&gt;
 -pot file             : the potential input file (for .QM3, .QMMM and .PELIB)&lt;br /&gt;
 -pcm file             : the pcm input file&lt;br /&gt;
 -ext log              : change default output extension from &amp;quot;.out&amp;quot; to &amp;quot;.log&amp;quot;&lt;br /&gt;
 -nobackup             : do not backup files, simply overwrite outputs&lt;br /&gt;
 -f dal_mol[_pot]      : extract dal_mol[_pot].tar.gz archive from WRKDIR into DALTON_TMPDIR before calculation&lt;br /&gt;
                         starts&lt;br /&gt;
 -noarch               : do not create tar.gz archive&lt;br /&gt;
 -t dir                : set scratch directory DALTON_TMPDIR; this script will append &#039;/DALTON_scratch_&amp;lt;USERNAME&amp;gt;&#039; to&lt;br /&gt;
                         the path unless the path contains &#039;DALTON_scratch&#039; or you explicitly set -noappend&lt;br /&gt;
 -d                    : delete job scratch directory before calculation starts&lt;br /&gt;
 -D                    : do not delete job scratch directory after calculation stops&lt;br /&gt;
 -noappend             : do not append anything to the scratch directory; be careful with this option since by&lt;br /&gt;
                         default scratch is wiped after calculation&lt;br /&gt;
 -get &amp;quot;file1 ...&amp;quot;      : get files back from DALTON_TMPDIR after calculation stops&lt;br /&gt;
 -put &amp;quot;file1 ...&amp;quot;      : put files to DALTON_TMPDIR before calculation starts&lt;br /&gt;
 -omp num              : set the number of OpenMP threads. Note that Dalton is not OpenMP parallelized, however, this&lt;br /&gt;
                         option can be used with e.g. threaded blas as MKL&lt;br /&gt;
 -N num |-np num       : use num MPI processes (defaults to 1, illegal if DALTON_LAUNCHER specified)&lt;br /&gt;
 -cpexe                : copy dalton.x to DALTON_TMPDIR before execution, either to global scratch (if&lt;br /&gt;
                         DALTON_USE_GLOBAL_SCRATCH is set) or to local scratch on all nodes&lt;br /&gt;
 -rsh                  : use rsh/rcp for communication with MPI nodes (default: ssh/scp)&lt;br /&gt;
 -nodelist &amp;quot;node1 ...&amp;quot; : set nodelist DALTON_NODELIST, dalton.x will be copied to DALTON_TMPDIR on each node unless&lt;br /&gt;
                         DALTON_USE_GLOBAL_SCRATCH is defined (the script uses PBS_NODEFILE or SLURM_NODELIST if&lt;br /&gt;
                         available)&lt;br /&gt;
 -x dalmol1 dalmol2    : calculate NEXAFS spectrum from ground and core hole states&lt;br /&gt;
 -exe exec             : change the executable from default ($DALTON_HOME/dalton/dalton.x) to exec&lt;br /&gt;
 -pg                   : do profiling with gprof&lt;br /&gt;
 -gb mem               : set dalton max usable work memory to mem Gigabytes (mem integer)&lt;br /&gt;
 -mb mem               : set dalton max usable work memory to mem Megabytes (mem integer)&lt;br /&gt;
 -ngb mem              : set node max usable work memory to mem Gigabytes (mem integer)&lt;br /&gt;
 -nmb mem              : set node max usable work memory to mem Megabytes (mem integer)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Hints for using Dalton ==&lt;br /&gt;
&lt;br /&gt;
=== Input Files ===&lt;br /&gt;
&lt;br /&gt;
For information about how to construct input files (dalinp{.dal} [molinp{.mol} [potinp{.pot}]]) for Dalton, please consult the [https://daltonprogram.org/manuals/dalton2020manual.pdf documentation].&lt;br /&gt;
&lt;br /&gt;
=== Environment Variables ===&lt;br /&gt;
&lt;br /&gt;
Environment variables understood by Dalton:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DALTON_TMPDIR             : scratch directory&lt;br /&gt;
DALTON_USE_GLOBAL_SCRATCH : use global scratch directory, do not copy any files to worker nodes&lt;br /&gt;
DALTON_NODELIST           : list of nodes, dalton.x will be copied to DALTON_TMPDIR on each node unless&lt;br /&gt;
                            DALTON_USE_GLOBAL_SCRATCH is defined&lt;br /&gt;
DALTON_LAUNCHER           : launcher for the dalton.x binary (if defined, -N flag not allowed)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Disk Usage ===&lt;br /&gt;
&lt;br /&gt;
Scratch files are written to &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;$SCRATCH&amp;lt;/span&amp;gt; by default. This configuration option can be changed by setting the environment variable &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;$DALTON_TMPDIR&amp;lt;/span&amp;gt; (e.g., to a dedicated [[workspace]]) before starting your calculations with Dalton.&lt;br /&gt;
&lt;br /&gt;
= Examples =&lt;br /&gt;
&lt;br /&gt;
As with all processes that require more than a few minutes to run, non-trivial compute jobs must be submitted to the cluster queuing system.&lt;br /&gt;
&lt;br /&gt;
Example scripts are available in the directory &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;$DALTON_EXA_DIR&amp;lt;/span&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module show chem/dalton                # show environment variables, which will be available after &#039;module load&#039;&lt;br /&gt;
$ module load chem/dalton                # load module&lt;br /&gt;
$ ls $DALTON_EXA_DIR                     # show content of directory $DALTON_EXA_DIR&lt;br /&gt;
$ cat $DALTON_EXA_DIR/README             # show examples README&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run several example jobs on &#039;&#039;&#039;JUSTUS 2&#039;&#039;&#039;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load chem/dalton                           # load module&lt;br /&gt;
$ WORKSPACE=`ws_allocate dalton 3`                  # allocate workspace&lt;br /&gt;
$ cd $WORKSPACE                                     # change to workspace&lt;br /&gt;
$ cp -a $DALTON_HOME/bwhpc-examples .               # copy example files to workspace&lt;br /&gt;
$ cd bwhpc-examples                                 # change to test directory&lt;br /&gt;
$ sbatch dalton-2020.0.slurm                        # submit job&lt;br /&gt;
$ squeue                                            # obtain JOBID&lt;br /&gt;
$ scontrol show job &amp;lt;JOBID&amp;gt;                         # check state of job&lt;br /&gt;
$ ls                                                # when job finishes the results will be visible in this directory&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= FAQ =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; What to do if my simulations abort with &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt; MEMGET ERROR, insufficient work space in memory &amp;lt;/span&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; Increase Dalton&#039;s usable work memory with either -mb or -gb on the command line.&lt;br /&gt;
&lt;br /&gt;
= Useful links =&lt;br /&gt;
&lt;br /&gt;
* [https://daltonprogram.org/manuals/dalton2020manual.pdf Documentation (english)]&lt;br /&gt;
* [http://forum.daltonprogram.org Forum (english)]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Dalton_(program) Wikipedia article (english)]&lt;br /&gt;
* [https://daltonprogram.org/tools/ Plugins for Dalton (english)]&lt;br /&gt;
----&lt;br /&gt;
[[Category:Chemistry software]][[Category:BwForCluster_Chemistry]][[Category:BwForCluster_JUSTUS_2]]&lt;/div&gt;</summary>
		<author><name>F Wagner</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=JUSTUS2/Software/Dalton&amp;diff=9888</id>
		<title>JUSTUS2/Software/Dalton</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=JUSTUS2/Software/Dalton&amp;diff=9888"/>
		<updated>2022-02-04T17:11:58Z</updated>

		<summary type="html">&lt;p&gt;F Wagner: Undo revision 9478 by H Winkhardt (talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=760px 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/dalton&lt;br /&gt;
|-&lt;br /&gt;
| Availability&lt;br /&gt;
| [[BwForCluster_JUSTUS_2]]&lt;br /&gt;
|-&lt;br /&gt;
| License&lt;br /&gt;
| Open-source software, distributed under the GNU Lesser General Public License (LGPL). [[#License|More...]]&lt;br /&gt;
|-&lt;br /&gt;
| Citing&lt;br /&gt;
| [https://daltonprogram.org/citation/ Publications]&lt;br /&gt;
|-&lt;br /&gt;
| Links&lt;br /&gt;
| [http://www.daltonprogram.org/index.html Homepage] &amp;amp;#124; [https://daltonprogram.org/documentation/ Documentation]&lt;br /&gt;
|-&lt;br /&gt;
| Graphical Interface&lt;br /&gt;
| No&lt;br /&gt;
|}&lt;br /&gt;
= Description =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Dalton&#039;&#039;&#039; (named after [https://en.wikipedia.org/wiki/John_Dalton John Dalton]) is an ab initio quantum chemistry computer program designed to to allow convenient, automated determination of a large number of molecular properties based on an HF, HF-srDFT, DFT, MP2, CC, CI, MCSCF, or MC-srDFT reference wave function. For additional information on features please visit the [https://daltonprogram.org/features/ Description of the Dalton suite features] web page.&lt;br /&gt;
&lt;br /&gt;
= Availability =&lt;br /&gt;
&lt;br /&gt;
Dalton is available on selected bwHPC-Clusters. A complete list of versions currently installed on the bwHPC-Clusters can be obtained from the [https://www.bwhpc.de/software.html Cluster Information System (CIS)].&lt;br /&gt;
&lt;br /&gt;
In order to check which versions of Dalton are installed on the compute cluster, run the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module avail chem/dalton&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= License =&lt;br /&gt;
&lt;br /&gt;
Dalton is free, open-source software released under the GNU Lesser General Public License (LGPL). Anyone interested in using the Dalton program suite must read the conditions described in its [https://gitlab.com/dalton/dalton/-/blob/master/LICENSE license agreement].&lt;br /&gt;
&lt;br /&gt;
= Usage =&lt;br /&gt;
== Loading the module ==&lt;br /&gt;
&lt;br /&gt;
You can load the default version of Dalton with the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load chem/dalton&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The module will try to load all modules it needs to function (e.g., compiler, mpi, ...). If loading the module fails, check if you have already loaded one of those modules, but not in the version required by Dalton.&lt;br /&gt;
&lt;br /&gt;
If you wish to load another (older) version of Dalton, you can do so using&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load chem/dalton/&amp;lt;version&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
with &amp;lt;version&amp;gt; specifying the desired version.&lt;br /&gt;
&lt;br /&gt;
Please cite Dalton in your publications according to the [https://daltonprogram.org/citation/ references].&lt;br /&gt;
&lt;br /&gt;
== Program Binaries ==&lt;br /&gt;
&lt;br /&gt;
The binary &#039;&#039;dalton&#039;&#039; is main program of the Dalton package.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage: dalton [options] dalinp{.dal} [molinp{.mol} [potinp{.pot}] [pcmsolver{.pcm}]]&lt;br /&gt;
&lt;br /&gt;
Options:&lt;br /&gt;
 -w dir                : change job directory to dir (default: $HOME)&lt;br /&gt;
 -b dir                : prepend dir to directory list for basis set searches (job directory and dalton basis library&lt;br /&gt;
                         are included automatically)&lt;br /&gt;
 -o file               : redirect output from program to job directory with &amp;quot;file&amp;quot; as file name&lt;br /&gt;
 -ow                   : redirect output from program to job directory with standard file name&lt;br /&gt;
 -dal file             : the dalton input file&lt;br /&gt;
 -mol file             : the molecule input file&lt;br /&gt;
 -pot file             : the potential input file (for .QM3, .QMMM and .PELIB)&lt;br /&gt;
 -pcm file             : the pcm input file&lt;br /&gt;
 -ext log              : change default output extension from &amp;quot;.out&amp;quot; to &amp;quot;.log&amp;quot;&lt;br /&gt;
 -nobackup             : do not backup files, simply overwrite outputs&lt;br /&gt;
 -f dal_mol[_pot]      : extract dal_mol[_pot].tar.gz archive from WRKDIR into DALTON_TMPDIR before calculation&lt;br /&gt;
                         starts&lt;br /&gt;
 -noarch               : do not create tar.gz archive&lt;br /&gt;
 -t dir                : set scratch directory DALTON_TMPDIR; this script will append &#039;/DALTON_scratch_&amp;lt;USERNAME&amp;gt;&#039; to&lt;br /&gt;
                         the path unless the path contains &#039;DALTON_scratch&#039; or you explicitly set -noappend&lt;br /&gt;
 -d                    : delete job scratch directory before calculation starts&lt;br /&gt;
 -D                    : do not delete job scratch directory after calculation stops&lt;br /&gt;
 -noappend             : do not append anything to the scratch directory; be careful with this option since by&lt;br /&gt;
                         default scratch is wiped after calculation&lt;br /&gt;
 -get &amp;quot;file1 ...&amp;quot;      : get files back from DALTON_TMPDIR after calculation stops&lt;br /&gt;
 -put &amp;quot;file1 ...&amp;quot;      : put files to DALTON_TMPDIR before calculation starts&lt;br /&gt;
 -omp num              : set the number of OpenMP threads. Note that Dalton is not OpenMP parallelized, however, this&lt;br /&gt;
                         option can be used with e.g. threaded blas as MKL&lt;br /&gt;
 -N num |-np num       : use num MPI processes (defaults to 1, illegal if DALTON_LAUNCHER specified)&lt;br /&gt;
 -cpexe                : copy dalton.x to DALTON_TMPDIR before execution, either to global scratch (if&lt;br /&gt;
                         DALTON_USE_GLOBAL_SCRATCH is set) or to local scratch on all nodes&lt;br /&gt;
 -rsh                  : use rsh/rcp for communication with MPI nodes (default: ssh/scp)&lt;br /&gt;
 -nodelist &amp;quot;node1 ...&amp;quot; : set nodelist DALTON_NODELIST, dalton.x will be copied to DALTON_TMPDIR on each node unless&lt;br /&gt;
                         DALTON_USE_GLOBAL_SCRATCH is defined (the script uses PBS_NODEFILE or SLURM_NODELIST if&lt;br /&gt;
                         available)&lt;br /&gt;
 -x dalmol1 dalmol2    : calculate NEXAFS spectrum from ground and core hole states&lt;br /&gt;
 -exe exec             : change the executable from default ($DALTON_HOME/dalton/dalton.x) to exec&lt;br /&gt;
 -pg                   : do profiling with gprof&lt;br /&gt;
 -gb mem               : set dalton max usable work memory to mem Gigabytes (mem integer)&lt;br /&gt;
 -mb mem               : set dalton max usable work memory to mem Megabytes (mem integer)&lt;br /&gt;
 -ngb mem              : set node max usable work memory to mem Gigabytes (mem integer)&lt;br /&gt;
 -nmb mem              : set node max usable work memory to mem Megabytes (mem integer)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Hints for using Dalton ==&lt;br /&gt;
&lt;br /&gt;
=== Input Files ===&lt;br /&gt;
&lt;br /&gt;
For information about how to construct input files (dalinp{.dal} [molinp{.mol} [potinp{.pot}]]) for Dalton, please consult the [https://daltonprogram.org/manuals/dalton2020manual.pdf documentation].&lt;br /&gt;
&lt;br /&gt;
=== Environment Variables ===&lt;br /&gt;
&lt;br /&gt;
Environment variables understood by Dalton:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DALTON_TMPDIR             : scratch directory&lt;br /&gt;
DALTON_USE_GLOBAL_SCRATCH : use global scratch directory, do not copy any files to worker nodes&lt;br /&gt;
DALTON_NODELIST           : list of nodes, dalton.x will be copied to DALTON_TMPDIR on each node unless&lt;br /&gt;
                            DALTON_USE_GLOBAL_SCRATCH is defined&lt;br /&gt;
DALTON_LAUNCHER           : launcher for the dalton.x binary (if defined, -N flag not allowed)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Disk Usage ===&lt;br /&gt;
&lt;br /&gt;
Scratch files are written to &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;$SCRATCH&amp;lt;/span&amp;gt; by default. This configuration option can be changed by setting the environment variable &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;$DALTON_TMPDIR&amp;lt;/span&amp;gt; (e.g., to a dedicated [[workspace]]) before starting your calculations with Dalton.&lt;br /&gt;
&lt;br /&gt;
= Examples =&lt;br /&gt;
&lt;br /&gt;
As with all processes that require more than a few minutes to run, non-trivial compute jobs must be submitted to the cluster queuing system.&lt;br /&gt;
&lt;br /&gt;
Example scripts are available in the directory &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;$DALTON_EXA_DIR&amp;lt;/span&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module show chem/dalton                # show environment variables, which will be available after &#039;module load&#039;&lt;br /&gt;
$ module load chem/dalton                # load module&lt;br /&gt;
$ ls $DALTON_EXA_DIR                     # show content of directory $DALTON_EXA_DIR&lt;br /&gt;
$ cat $DALTON_EXA_DIR/README             # show examples README&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run several example jobs on &#039;&#039;&#039;JUSTUS 2&#039;&#039;&#039;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load chem/dalton                           # load module&lt;br /&gt;
$ WORKSPACE=`ws_allocate dalton 3`                  # allocate workspace&lt;br /&gt;
$ cd $WORKSPACE                                     # change to workspace&lt;br /&gt;
$ cp -a $DALTON_HOME/bwhpc-examples .               # copy example files to workspace&lt;br /&gt;
$ cd bwhpc-examples                                 # change to test directory&lt;br /&gt;
$ sbatch dalton-2020.0.slurm                        # submit job&lt;br /&gt;
$ squeue                                            # obtain JOBID&lt;br /&gt;
$ scontrol show job &amp;lt;JOBID&amp;gt;                         # check state of job&lt;br /&gt;
$ ls                                                # when job finishes the results will be visible in this directory&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= FAQ =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; What to do if my simulations abort with &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt; MEMGET ERROR, insufficient work space in memory &amp;lt;/span&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; Increase Dalton&#039;s usable work memory with either -mb or -gb on the command line.&lt;br /&gt;
&lt;br /&gt;
= Useful links =&lt;br /&gt;
&lt;br /&gt;
* [https://daltonprogram.org/manuals/dalton2020manual.pdf Documentation (english)]&lt;br /&gt;
* [http://forum.daltonprogram.org Forum (english)]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Dalton_(program) Wikipedia article (english)]&lt;br /&gt;
* [https://daltonprogram.org/tools/ Plugins for Dalton (english)]&lt;br /&gt;
----&lt;br /&gt;
[[Category:Chemistry software]][[Category:BwForCluster_Chemistry]][[Category:BwForCluster_JUSTUS_2]]&lt;/div&gt;</summary>
		<author><name>F Wagner</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=JUSTUS2/Software/Dalton&amp;diff=9887</id>
		<title>JUSTUS2/Software/Dalton</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=JUSTUS2/Software/Dalton&amp;diff=9887"/>
		<updated>2022-02-04T17:11:11Z</updated>

		<summary type="html">&lt;p&gt;F Wagner: Undo revision 9626 by H Winkhardt (talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Softwarepage}}&lt;br /&gt;
&lt;br /&gt;
{| width=760px 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/dalton&lt;br /&gt;
|-&lt;br /&gt;
| License&lt;br /&gt;
| Open-source software, distributed under the GNU Lesser General Public License (LGPL). [[#License|More...]]&lt;br /&gt;
|-&lt;br /&gt;
| Citing&lt;br /&gt;
| [https://daltonprogram.org/citation/ Publications]&lt;br /&gt;
|-&lt;br /&gt;
| Links&lt;br /&gt;
| [http://www.daltonprogram.org/index.html Homepage] &amp;amp;#124; [https://daltonprogram.org/documentation/ Documentation]&lt;br /&gt;
|-&lt;br /&gt;
| Graphical Interface&lt;br /&gt;
| No&lt;br /&gt;
|}&lt;br /&gt;
= Description =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Dalton&#039;&#039;&#039; (named after [https://en.wikipedia.org/wiki/John_Dalton John Dalton]) is an ab initio quantum chemistry computer program designed to to allow convenient, automated determination of a large number of molecular properties based on an HF, HF-srDFT, DFT, MP2, CC, CI, MCSCF, or MC-srDFT reference wave function. For additional information on features please visit the [https://daltonprogram.org/features/ Description of the Dalton suite features] web page.&lt;br /&gt;
&lt;br /&gt;
= License =&lt;br /&gt;
&lt;br /&gt;
Dalton is free, open-source software released under the GNU Lesser General Public License (LGPL). Anyone interested in using the Dalton program suite must read the conditions described in its [https://gitlab.com/dalton/dalton/-/blob/master/LICENSE license agreement].&lt;br /&gt;
&lt;br /&gt;
= Usage =&lt;br /&gt;
== Hints for using Dalton ==&lt;br /&gt;
&lt;br /&gt;
Scratch files are written to &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;$SCRATCH&amp;lt;/span&amp;gt; by default. This configuration option can be changed by setting the environment variable &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;$DALTON_TMPDIR&amp;lt;/span&amp;gt; (e.g., to a dedicated [[workspace]]) before starting your calculations with Dalton.&lt;br /&gt;
&lt;br /&gt;
= FAQ =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; What to do if my simulations abort with &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt; MEMGET ERROR, insufficient work space in memory &amp;lt;/span&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; Increase Dalton&#039;s usable work memory with either -mb or -gb on the command line.&lt;br /&gt;
&lt;br /&gt;
= Useful links =&lt;br /&gt;
&lt;br /&gt;
* [https://daltonprogram.org/manuals/dalton2020manual.pdf Documentation (english)]&lt;br /&gt;
* [http://forum.daltonprogram.org Forum (english)]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Dalton_(program) Wikipedia article (english)]&lt;br /&gt;
* [https://daltonprogram.org/tools/ Plugins for Dalton (english)]&lt;br /&gt;
----&lt;br /&gt;
[[Category:Chemistry software]][[Category:BwForCluster_Chemistry]][[Category:BwForCluster_JUSTUS_2]]&lt;/div&gt;</summary>
		<author><name>F Wagner</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster2.0/Software/R/Glmnet&amp;diff=9099</id>
		<title>BwUniCluster2.0/Software/R/Glmnet</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster2.0/Software/R/Glmnet&amp;diff=9099"/>
		<updated>2021-11-18T17:11:48Z</updated>

		<summary type="html">&lt;p&gt;F Wagner: /* Installation instructions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Installation instructions =&lt;br /&gt;
&lt;br /&gt;
Consider starting an interactive job for compiling. Copy and paste the following to your shell.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Load the R software module, e.g.&lt;br /&gt;
module load math/R/4.1.2&lt;br /&gt;
&lt;br /&gt;
# Prepare .R directory (if it does not already exists)&lt;br /&gt;
mkdir -p ~/.R&lt;br /&gt;
&lt;br /&gt;
# Write the following environment variables to Makevars&lt;br /&gt;
echo &amp;quot;CXX14=icpc&amp;quot; &amp;gt;&amp;gt; ~/.R/Makevars&lt;br /&gt;
echo &amp;quot;CXX14FLAGS=-O3 -fPIC -std=c++14 -axCORE-AVX512,CORE-AVX2,AVX -xSSE4.2 -fp-model strict -qopenmp&amp;quot; &amp;gt;&amp;gt; ~/.R/Makevars&lt;br /&gt;
&lt;br /&gt;
# Install the glmnet package from within R session&lt;br /&gt;
R -q&lt;br /&gt;
&amp;gt; install.packages(&amp;quot;glmnet&amp;quot;, dependencies=TRUE)&lt;br /&gt;
&lt;br /&gt;
# Run a quick test&lt;br /&gt;
&amp;gt; library(glmnet)&lt;br /&gt;
&amp;gt; data(QuickStartExample)&lt;br /&gt;
&amp;gt; x &amp;lt;- QuickStartExample$x&lt;br /&gt;
&amp;gt; y &amp;lt;- QuickStartExample$y&lt;br /&gt;
&amp;gt; fit &amp;lt;- glmnet(x, y)&lt;br /&gt;
&amp;gt; print(fit)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>F Wagner</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster2.0/Software/R/Glmnet&amp;diff=9098</id>
		<title>BwUniCluster2.0/Software/R/Glmnet</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster2.0/Software/R/Glmnet&amp;diff=9098"/>
		<updated>2021-11-18T17:09:10Z</updated>

		<summary type="html">&lt;p&gt;F Wagner: Created page with &amp;quot;= Installation instructions =  Consider starting an interactive job for compiling. Copy and paste the following to your shell.  &amp;lt;pre&amp;gt; # Load the R software module, e.g. module...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Installation instructions =&lt;br /&gt;
&lt;br /&gt;
Consider starting an interactive job for compiling. Copy and paste the following to your shell.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Load the R software module, e.g.&lt;br /&gt;
module load math/R/4.1.2&lt;br /&gt;
&lt;br /&gt;
# Prepare .R directory (if it does not already exists)&lt;br /&gt;
mkdir -p ~/.R&lt;br /&gt;
&lt;br /&gt;
# Write the following environment variables to Makevars&lt;br /&gt;
echo &amp;quot;CXX14=icpc&amp;quot; &amp;gt;&amp;gt; ~/.R/Makevars&lt;br /&gt;
echo &amp;quot;CXX14FLAGS=-O3 -fPIC -std=c++14 -axCORE-AVX512,CORE-AVX2,AVX -xSSE4.2 -fp-model strict -qopenmp&amp;quot; &amp;gt;&amp;gt; ~/.R/Makevars&lt;br /&gt;
&lt;br /&gt;
# Install the glmnet package from within R session&lt;br /&gt;
R -q&lt;br /&gt;
&amp;gt; install.packages(&amp;quot;glmnet&amp;quot;, dependencies=TRUE)&lt;br /&gt;
&lt;br /&gt;
# Run a quick test&lt;br /&gt;
&amp;gt; library(glmnet)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>F Wagner</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster2.0/Software/R&amp;diff=9097</id>
		<title>BwUniCluster2.0/Software/R</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster2.0/Software/R&amp;diff=9097"/>
		<updated>2021-11-18T17:05:36Z</updated>

		<summary type="html">&lt;p&gt;F Wagner: /* Optional packages for R */&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/R&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://www.r-project.org/ Homepage] &amp;amp;#124; [http://cran.r-project.org/manuals.html  Documentation]&lt;br /&gt;
|-&lt;br /&gt;
| Graphical Interface&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| Plugins&lt;br /&gt;
| User dependent&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Description =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;R&#039;&#039;&#039; is a language and environment for statistical computing and graphics. It is a GNU project which is similar to the S language and environment which was developed at Bell Laboratories (formerly AT&amp;amp;T, now Lucent Technologies) by John Chambers and colleagues. R can be considered as a different implementation of S. There are some important differences, but much code written for S runs unaltered under R.&lt;br /&gt;
&lt;br /&gt;
R provides a wide variety of statistical (linear and nonlinear modelling, classical statistical tests, time-series analysis, classification, clustering, …) and graphical techniques, and is highly extensible. The S language is often the vehicle of choice for research in statistical methodology, and R provides an Open Source route to participation in that activity.&lt;br /&gt;
&lt;br /&gt;
One of R’s strengths is the ease with which well-designed publication-quality plots can be produced, including mathematical symbols and formulae where needed. Great care has been taken over the defaults for the minor design choices in graphics, but the user retains full control.&lt;br /&gt;
&lt;br /&gt;
R is available as Free Software under the terms of the Free Software Foundation’s GNU General Public License in source code form. It compiles and runs on a wide variety of UNIX platforms and similar systems (including FreeBSD and Linux), Windows and MacOS.&lt;br /&gt;
&lt;br /&gt;
= Availability =&lt;br /&gt;
&lt;br /&gt;
R is available on selected bwHPC-Clusters. A complete list of versions currently installed on the bwHPC-Clusters can be obtained from the [https://www.bwhpc.de/software.html Cluster Information System (CIS)].&lt;br /&gt;
&lt;br /&gt;
In order to check which versions of R are installed on the compute cluster, run the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module avail math/R&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Usage =&lt;br /&gt;
The R installation also provides the standalone library libRmath. This library allows you to access R routines from your own C or C++ programs (see section 9 of the &#039;R Installation and Administration&#039; manual).&lt;br /&gt;
&lt;br /&gt;
== Loading the module ==&lt;br /&gt;
&lt;br /&gt;
You can load the default version of R with the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load math/R&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The module will try to load all 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 required by R.&lt;br /&gt;
&lt;br /&gt;
If you wish to load another (older) version of R, you can do so using&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load math/R/&amp;lt;version&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
with &amp;lt;version&amp;gt; specifying the desired version.&lt;br /&gt;
&lt;br /&gt;
== Program Binaries ==&lt;br /&gt;
Standard usage:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage: R [options] [&amp;lt; infile] [&amp;gt; outfile]&lt;br /&gt;
    R CMD command [arguments]&lt;br /&gt;
  &lt;br /&gt;
Example: R CMD BATCH script.R&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Executing R in batch mode:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
R CMD BATCH --no-save --no-restore &amp;lt;INPUT_FILE&amp;gt;.R&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For help run&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
R --help&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For command help run&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
R CMD command --help&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Further information and help&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Man pages:          man R               man Rscript&lt;br /&gt;
Info pages, e.g.:   info R-intro        info R-FAQ&lt;br /&gt;
Manuals:            $R_DOC_DIR/manual&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Multithreading in R ==&lt;br /&gt;
&lt;br /&gt;
An easy way to use multiple cores on a single node with R is to use the [https://cran.r-project.org/web/packages/doParallel/vignettes/gettingstartedParallel.pdf doParallel] package in combination with [https://cran.r-project.org/web/packages/foreach/vignettes/foreach.pdf foreach].&lt;br /&gt;
&lt;br /&gt;
= Examples =&lt;br /&gt;
As with all processes that require more than a few minutes to run, non-trivial compute jobs must be submitted to the cluster queuing system.&lt;br /&gt;
&lt;br /&gt;
Example scripts are available in the directory $R_EXA_DIR:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module show math/R                      # show environment variables, which will be available after &#039;module load&#039;&lt;br /&gt;
$ module load math/R                      # load module&lt;br /&gt;
$ ls $R_EXA_DIR                           # show content of directory $R_EXA_DIR&lt;br /&gt;
$ cat $R_EXA_DIR/README                   # show examples README&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- This is no longer valid.&lt;br /&gt;
&lt;br /&gt;
Run a first simple example job:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load math/R                                   # load module&lt;br /&gt;
$ mkdir Rtest                                          # create test directory&lt;br /&gt;
$ cp $R_EXA_DIR/bwhpc-r.moab $R_EXA_DIR/fit.R Rtest/   # copy example files to test directory&lt;br /&gt;
$ cd Rtest/                                            # change to directory&lt;br /&gt;
$ nano bwhpc-r.moab                                    # change job options, quit with &#039;CTRL+X&#039;&lt;br /&gt;
$ msub bwhpc-r.moab                                    # submit job&lt;br /&gt;
$ checkjob -v &amp;lt;JOBID&amp;gt;                                  # check state of job&lt;br /&gt;
$ ls                                                   # when job finishes the results will be visible in this directory&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Installing R-Packages into your home folder =&lt;br /&gt;
Since we cannot provide a software module for every R package, we recommend to install special R packages locally into your home folder. One possibility doing this is from within an interactive R session: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; library()                                                                # List preinstalled packages&lt;br /&gt;
&amp;gt; install.packages(&#039;package_name&#039;, repos=&amp;quot;http://cran.r-project.org&amp;quot;)      # Installing your R package and the dependencies &lt;br /&gt;
&amp;gt; library(package_name)                                                    # Loading the package into you R instance&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The package is now installed permanently in your home folder and is available every time you start R. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
By default R uses a version (and platform) specific path for personal libraries, such as &lt;br /&gt;
&amp;quot;$HOME/R/x86_64-pc-linux-gnu-library/x.y&amp;quot; for R version x.y.z. This directory will be created automatically (after confirmation) when installing a personal package for the first time.&lt;br /&gt;
&lt;br /&gt;
Users can customize a common location of their personal library packages, e.g. ~/R_libs, rather than the default location. A customized directory must exist before installing a personal package for the first time, i.e. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mkdir -p ~/R_libs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The location must also be defined in a configuration file ~/.Renviron within the home directory containing the following line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
R_LIBS_USER=&amp;quot;~/R_libs&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
By setting up a (fixed) custom location for personal library packages, any personal package installed into that directory will be visible across different R versions. This may be advantageous if the packages are to be used with different (future) R versions. &lt;br /&gt;
&lt;br /&gt;
A version specific path, such as the default path, allows users to maintain multiple personal library stacks for different (major and minor) R versions and does also prevent users from mixing their stack with libraries built with different R versions. &lt;br /&gt;
&lt;br /&gt;
The drawback is that, whenever switching to a new R release, the personal library stack &#039;&#039;&#039;must&#039;&#039;&#039; be rebuilt with that new R version into the corresponding (version specific) library path. This is considered good practice anyway in order to ensure a consistent personal library stack for any specific R version in use. Mixing libraries built with different major and minor R versions is discouraged, as this may (or may not) result in unpredictable and subtle errors. Packages that are built and installed with one version of R may be incompatible with a newer version of R, at least when the major or minor version changes. The same is true if several versions are used simultaneously, e.g. a newer R version for a more recently started project and and older version for another project (but eventually picking up libraries built with the newer R version).&lt;br /&gt;
&lt;br /&gt;
Special care has also to be taken by users who always load the default version, i.e. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load math/R&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
as the default version number may change any time. Is is therefore highly recommended to always load a specific version, e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load math/R/3.6.3&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
== Optional packages for R ==&lt;br /&gt;
&lt;br /&gt;
The following guides provide detailed instructions about how to build optional R packages. Please write a [http://www.support.bwhpc-c5.de ticket] if the instructions do not work for you or are outdated.&lt;br /&gt;
&lt;br /&gt;
* [[Rgdal]]&lt;br /&gt;
* [[Rjags]]&lt;br /&gt;
* [[Rstan]]&lt;br /&gt;
* [[glmnet]]&lt;br /&gt;
&lt;br /&gt;
= Version-specific Information =&lt;br /&gt;
&lt;br /&gt;
For specific help about a particular R version, check the information available via the module system with the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module help math/R&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Installed R plugins =&lt;br /&gt;
* [[CummeRbund_(R-package)|Bioinformatics: cummeRbund]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[[Category:Mathematics software]]&lt;br /&gt;
[[Category:BwUniCluster]]&lt;br /&gt;
[[Category:BwUniCluster_2.0]]&lt;br /&gt;
[[Category:BwForCluster_BinAC]]&lt;br /&gt;
[[Category:BwForCluster_MLS&amp;amp;WISO_Production]]&lt;/div&gt;</summary>
		<author><name>F Wagner</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=JUSTUS2/Software/Singularity&amp;diff=8997</id>
		<title>JUSTUS2/Software/Singularity</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=JUSTUS2/Software/Singularity&amp;diff=8997"/>
		<updated>2021-10-11T11:19:44Z</updated>

		<summary type="html">&lt;p&gt;F Wagner: /* NGC environment modules on JUSTUS 2 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=760px 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;
| system/singularity&lt;br /&gt;
|-&lt;br /&gt;
| Availability&lt;br /&gt;
| [[BwForCluster_JUSTUS_2]]&lt;br /&gt;
|-&lt;br /&gt;
| License&lt;br /&gt;
| Open-source software, distributed under the 3-clause BSD License. [[#License|More...]]&lt;br /&gt;
|-&lt;br /&gt;
| Citing&lt;br /&gt;
| ---&lt;br /&gt;
|-&lt;br /&gt;
| Links&lt;br /&gt;
| [https://sylabs.io/singularity/ Homepage] &amp;amp;#124; [https://sylabs.io/docs/ Documentation]&lt;br /&gt;
|-&lt;br /&gt;
| Graphical Interface&lt;br /&gt;
| No&lt;br /&gt;
|}&lt;br /&gt;
= Description =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Singularity&#039;&#039;&#039; is a container platform.&lt;br /&gt;
&lt;br /&gt;
= License =&lt;br /&gt;
&lt;br /&gt;
Singularity is free, open-source software released under the 3-clause BSD license. Please read the [https://sylabs.io/guides/3.7/user-guide/license.html license] for additional information about Singularity.&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 Singularity with the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load system/singularity&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you wish to load another (older) version of Singularity, you can do so using&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load system/singularity/&amp;lt;version&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
with &amp;lt;version&amp;gt; specifying the desired version.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=red&amp;gt;Important: On JUSTUS 2, Singularity is available on all compute nodes. You do not have to load a module.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Program Binaries ==&lt;br /&gt;
&lt;br /&gt;
The binary &#039;&#039;singularity&#039;&#039; is main program of the container platform.&lt;br /&gt;
&lt;br /&gt;
To get help using Singularity execute the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ singularity --help&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Furthermore, a man page is available and can be accessed by typing:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ man singularity&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For additional information about how to use Singularity, please consult the [https://sylabs.io/docs/ documentation].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=red&amp;gt;Important: On JUSTUS 2, Singularity is only available on compute nodes. You must switch to such a node to invoke any &#039;&#039;singularity&#039;&#039; commands.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Batch jobs with containers ==&lt;br /&gt;
&lt;br /&gt;
Batch jobs utilizing Singularity containers are generally built the same way as all other [https://wiki.bwhpc.de/e/BwForCluster_JUSTUS_2_Slurm_HOWTO#How_to_submit_a_batch_job.3F batch jobs], where the job script contains &#039;&#039;singularity&#039;&#039; commands. For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
# Allocate one node&lt;br /&gt;
#SBATCH --nodes=1&lt;br /&gt;
# Number of program instances to be executed&lt;br /&gt;
#SBATCH --tasks-per-node=4&lt;br /&gt;
# 8 GB memory required per node&lt;br /&gt;
#SBATCH --mem=16G&lt;br /&gt;
# Maximum run time of job&lt;br /&gt;
#SBATCH --time=1:00:00&lt;br /&gt;
# Give job a reasonable name&lt;br /&gt;
#SBATCH --job-name=Singularity&lt;br /&gt;
# File name for standard output (%j will be replaced by job id)&lt;br /&gt;
#SBATCH --output=singularity_job-%j.out&lt;br /&gt;
# File name for error output&lt;br /&gt;
#SBATCH --error=singularity_job-%j.err&lt;br /&gt;
&lt;br /&gt;
module load your/singularity/version #(not needed on JUSTUS 2, but could be necessary on other system)&lt;br /&gt;
&lt;br /&gt;
cd your/workspace&lt;br /&gt;
&lt;br /&gt;
# Run container (two options to start a container)&lt;br /&gt;
singularity run [options] &amp;lt;container&amp;gt;&lt;br /&gt;
singularity exec [options] &amp;lt;container&amp;gt; &amp;lt;command&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=red&amp;gt;Keep in mind that other modules you may have loaded will not be available inside the container.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Using GPUs ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
[…]&lt;br /&gt;
# Allocate one GPU per node&lt;br /&gt;
#SBATCH --partition=gpu&lt;br /&gt;
#SBATCH --gres=gpu:1&lt;br /&gt;
[…]&lt;br /&gt;
&lt;br /&gt;
module load your/singularity/version #(not needed on JUSTUS 2, but could be necessary on other system)&lt;br /&gt;
&lt;br /&gt;
cd your/workspace&lt;br /&gt;
&lt;br /&gt;
# Run container (two options to start a container)&lt;br /&gt;
singularity run --nv [options] &amp;lt;container&amp;gt;&lt;br /&gt;
singularity exec --nv [options] &amp;lt;container&amp;gt; &amp;lt;command&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using the flag is advisable, but may be omitted if the correct GPU- and driver-APIs are available on the container.&lt;br /&gt;
&lt;br /&gt;
= Examples =&lt;br /&gt;
&lt;br /&gt;
== Run your first container on JUSTUS 2 ==&lt;br /&gt;
&lt;br /&gt;
Build a TensorFlow container with Singularity and execute a Python command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# request interactive node with GPUs&lt;br /&gt;
$ srun --nodes=1 --exclusive --gres=gpu:2 --pty bash&lt;br /&gt;
&lt;br /&gt;
# create workspace and navigate into it&lt;br /&gt;
$ WORKSPACE=`ws_allocate tensorflow 3`&lt;br /&gt;
$ cd $WORKSPACE&lt;br /&gt;
&lt;br /&gt;
# build container&lt;br /&gt;
$ singularity build tensorflow-20.11-tf2-py3.sif docker://nvcr.io/nvidia/tensorflow:20.11-tf2-py3&lt;br /&gt;
&lt;br /&gt;
# execute Python command&lt;br /&gt;
$ singularity exec --nv tensorflow-20.11-tf2-py3.sif python -c &#039;import tensorflow as tf; \&lt;br /&gt;
  print(&amp;quot;Num GPUs Available: &amp;quot;,len(tf.config.experimental.list_physical_devices(&amp;quot;GPU&amp;quot;)))&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Ready-to-use containers can be pulled from the [https://ngc.nvidia.com/catalog/containers NVIDIA GPU CLOUD (NGC)] catalog.&lt;br /&gt;
&lt;br /&gt;
== NGC environment modules on JUSTUS 2 ==&lt;br /&gt;
&lt;br /&gt;
1) Prepare a workspace to store the container&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ srun --nodes=1 --exclusive --gres=gpu:2 --pty bash&lt;br /&gt;
$ WORKSPACE=`ws_allocate ngc 3`&lt;br /&gt;
$ cd $WORKSPACE&lt;br /&gt;
$ export NGC_IMAGE_DIR=$(pwd)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;font color=red&amp;gt;Important: Containers can only run in workspaces.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2) PyTorch container&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load ngc/.numlib&lt;br /&gt;
$ module load 20.12-torch-py3&lt;br /&gt;
$ python3&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; import torch&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; x = torch.randn(2,3)&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; print(x)&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; quit()&lt;br /&gt;
$ module unload 20.12-torch-py3&lt;br /&gt;
$ module unload ngc/.numlib&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Use the container in the same manner as an interactive shell.&lt;br /&gt;
&lt;br /&gt;
3) LAMMPS container&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load ngc/.chem&lt;br /&gt;
$ module load lammps-29Oct2020&lt;br /&gt;
$ wget https://lammps.sandia.gov/inputs/in.lj.txt&lt;br /&gt;
$ export SINGULARITY_BINDPATH=$(pwd)&lt;br /&gt;
$ mpirun -n 2 lmp -in in.lj.txt -var x 8 -var y 8 -var z 8 -k on g 2 -sf kk -pk kokkos cuda/aware on neigh full \&lt;br /&gt;
  comm device binsize 2.8&lt;br /&gt;
$ module unload lammps-29Oct2020&lt;br /&gt;
$ module unload ngc/.chem&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Use &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;SINGULARITY_BINDPATH=&amp;lt;PATH&amp;gt;&amp;lt;/span&amp;gt; to mount the directory with the input file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Currently, &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;module load ngc/.numlib&amp;lt;/span&amp;gt; for numeric libraries and &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;module load ngc/.chem&amp;lt;/span&amp;gt; for chemistry programs can be selected.&lt;br /&gt;
&lt;br /&gt;
== Batch jobs with containers on JUSTUS 2 ==&lt;br /&gt;
&lt;br /&gt;
Run a GROMACS container with Singularity as a batch job:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ WORKSPACE=`ws_allocate gromacs 3`                                         # allocate workspace&lt;br /&gt;
$ cd $WORKSPACE                                                             # change to workspace&lt;br /&gt;
$ singularity pull gromacs-2020_2.sif docker://nvcr.io/hpc/gromacs:2020.2   # pull container from NGC&lt;br /&gt;
$ cp -r /opt/bwhpc/common/chem/ngc/gromacs/ ./bwhpc-examples/               # copy example to workspace&lt;br /&gt;
$ cd ./bwhpc-examples                                                       # change to example directory&lt;br /&gt;
$ sbatch gromacs-2020.2_gpu.slurm                                           # submit job&lt;br /&gt;
$ squeue                                                                    # obtain JOBID&lt;br /&gt;
$ scontrol show job &amp;lt;JOBID&amp;gt;                                                 # check state of job&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
More batch job examples are located at &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;/opt/bwhpc/common/chem/ngc&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
= Useful links =&lt;br /&gt;
&lt;br /&gt;
* [https://sylabs.io/docs/ Documentation (english)]&lt;br /&gt;
* [https://de.wikipedia.org/wiki/Singularity_(Software) Wikipedia article (german)]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Singularity_(software) Wikipedia article (english)]&lt;br /&gt;
----&lt;br /&gt;
[[Category:Scientific_Applications]][[Category:BwForCluster_Chemistry]][[Category:BwForCluster_JUSTUS_2]]&lt;/div&gt;</summary>
		<author><name>F Wagner</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Software/OpenFoam&amp;diff=8804</id>
		<title>BwUniCluster3.0/Software/OpenFoam</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Software/OpenFoam&amp;diff=8804"/>
		<updated>2021-06-07T14:32:57Z</updated>

		<summary type="html">&lt;p&gt;F Wagner: &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;
| cae/openfoam&lt;br /&gt;
|-&lt;br /&gt;
| Availability&lt;br /&gt;
| [[bwUniCluster_2.0]] &amp;amp;#124; [[BwForCluster_JUSTUS_2]] &amp;amp;#124; bwGRiD-T&amp;amp;uuml;bingen &amp;amp;#124; [[BwForCluster_MLS&amp;amp;WISO_Production]]&lt;br /&gt;
|-&lt;br /&gt;
| License&lt;br /&gt;
| [https://www.openfoam.org/licence.php GNU General Public Licence]&lt;br /&gt;
|-&lt;br /&gt;
| Citing&lt;br /&gt;
| n/a&lt;br /&gt;
|-&lt;br /&gt;
| Links&lt;br /&gt;
| [https://www.openfoam.org/ Homepage] &amp;amp;#124; [https://www.openfoam.org/docs/ 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;
&amp;lt;br&amp;gt;&lt;br /&gt;
= Description =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;OpenFOAM&#039;&#039;&#039; (Open-source Field Operation And Manipulation) is a free, open-source CFD software package with an extensive range of features to solve anything from complex fluid flows involving chemical reactions, turbulence and heat transfer, to solid dynamics and electromagnetics.&lt;br /&gt;
&lt;br /&gt;
= Availability =&lt;br /&gt;
&lt;br /&gt;
OpenFOAM is available on selected bwHPC-Clusters. A complete list of versions currently installed on the bwHPC-Clusters can be obtained from the [https://www.bwhpc.de/software.html Cluster Information System (CIS)].&lt;br /&gt;
&lt;br /&gt;
= Adding OpenFOAM to Your Environment =&lt;br /&gt;
&lt;br /&gt;
In order to check which versions of OpenFOAM are installed on the compute cluster, run the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ module avail cae/openfoam&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In general, several OpenFOAM versions should be returned.&lt;br /&gt;
The default version can be accessed by loading the appropriate module:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ module load cae/openfoam&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Other OpenFOAM versions (if available) can be loaded according to:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ module load cae/openfoam/&amp;lt;version&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
with &amp;lt;version&amp;gt; specifying the desired version.&lt;br /&gt;
&lt;br /&gt;
To activate the OpenFOAM applications, type&lt;br /&gt;
&amp;lt;pre&amp;gt;$ source $FOAM_INIT&amp;lt;/pre&amp;gt;&lt;br /&gt;
or simply&lt;br /&gt;
&amp;lt;pre&amp;gt;$ foamInit&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Parallel run with OpenFOAM  =&lt;br /&gt;
For a better performance on running OpenFOAM jobs in parallel on bwUniCluster, it is recommended to have the decomposed data in local folders on each node.  &lt;br /&gt;
&lt;br /&gt;
Therefore you may use *HPC scripts, wich will copy your data to the node specific folders after running the decomposePar, and copy it back to the local case folder before running reconstructPar.&lt;br /&gt;
&lt;br /&gt;
Don&#039;t forget to allocate enough wall-time for decomposition and reconstruction of your cases. As the data will be processed directly on  the nodes, and may be lost if the job is cancelled before  the data is copied back into the case folder.&lt;br /&gt;
&lt;br /&gt;
Following commands will do that for you: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$ decomposeParHPC&lt;br /&gt;
$ reconstructParHPC&lt;br /&gt;
$ reconstructParMeshHPC&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
instead of:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ decomposePar&lt;br /&gt;
$ reconstructPar&lt;br /&gt;
$ recontructParMesh&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For example, if you want to run&amp;lt;span style=&amp;quot;background:#edeae2;margin:10px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;snappyHexMesh&amp;lt;/span&amp;gt;in parallel, you may use the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ decomposeParMeshHPC&lt;br /&gt;
$ mpirun --bind-to core --map-by core -report-bindings snappyHexMesh -overwrite -parallel&lt;br /&gt;
$ reconstructParMeshHPC -constant&amp;lt;/pre&amp;gt;&lt;br /&gt;
instead of:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ decomposePar&lt;br /&gt;
$ mpirun --bind-to core --map-by core -report-bindings snappyHexMesh -overwrite -parallel&lt;br /&gt;
$ reconstructParMesh -constant&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For running jobs on multiple nodes, OpenFOAM needs passwordless communication between the nodes, to copy data into the local folders.&lt;br /&gt;
&lt;br /&gt;
A small trick using ssh-keygen once will let your nodes to communicate freely over rsh. &lt;br /&gt;
&lt;br /&gt;
Do it once (if you didn&#039;t do it already in the past):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ssh-keygen&lt;br /&gt;
$ cat $HOME/.ssh/id_rsa.pub &amp;gt;&amp;gt; $HOME/.ssh/authorized_keys&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Building an OpenFOAM batch file for parallel processing =&lt;br /&gt;
== General information == &lt;br /&gt;
Before running OpenFOAM jobs in parallel, it is necessary to decompose the geometry domain into segments, equal to the number of processors (or threads) you intend to use. &lt;br /&gt;
&lt;br /&gt;
That means, for example, if you want to run a case on 8 processors, you will have to decompose the mesh in 8 segments, first. Then, you start the solver in &#039;&#039;parallel&#039;&#039;, letting &#039;&#039;OpenFOAM&#039;&#039; to run calculations concurrently on these segments, one processor responding for one segment of the mesh, sharing the data with all other processors in between. &lt;br /&gt;
&lt;br /&gt;
There is, of course, a mechanism that connects properly the calculations, so you don&#039;t loose your data or generate wrong results. &lt;br /&gt;
&lt;br /&gt;
Decomposition and segments building process is handled by&amp;lt;span style=&amp;quot;background:#edeae2;margin:10px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;decomposePar&amp;lt;/span&amp;gt;utility. &lt;br /&gt;
&lt;br /&gt;
The number of subdomains, in which the geometry will be decomposed, is specified in &amp;quot;&#039;&#039;system/decomposeParDict&#039;&#039;&amp;quot;, as well as the decomposition method to use. &lt;br /&gt;
&lt;br /&gt;
The automatic decomposition method is &amp;quot;&#039;&#039;scotch&#039;&#039;&amp;quot;. It trims the mesh, collecting as many cells as possible per processor, trying to avoid having empty segments or segments with not enough cells. If you want your mesh to be divided in other way, specifying the number of segments it should be cut in x, y or z direction, for example, you can use &amp;quot;simple&amp;quot; or &amp;quot;hierarchical&amp;quot; methods. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Wrapper script generation == &lt;br /&gt;
&#039;&#039;&#039;Attention:&#039;&#039;&#039; &amp;lt;span style=&amp;quot;background:#edeae2;margin:10px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;openfoam&amp;lt;/span&amp;gt; module loads automatically the necessary &amp;lt;span style=&amp;quot;background:#edeae2;margin:10px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;openmpi&amp;lt;/span&amp;gt; module for parallel run, do &#039;&#039;&#039;NOT&#039;&#039;&#039; load another version of mpi, as it may conflict with the loaded &amp;lt;span style=&amp;quot;background:#edeae2;margin:10px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;openfoam&amp;lt;/span&amp;gt; version. &lt;br /&gt;
&lt;br /&gt;
A job-script to submit a batch job called &#039;&#039;job_openfoam.sh&#039;&#039; that runs &#039;&#039;icoFoam&#039;&#039; solver with OpenFoam version 8, on 80 processors, on a &#039;&#039;multiple&#039;&#039; partition with a total wall clock time of 6 hours looks like: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--b)--&amp;gt; &lt;br /&gt;
{| style=&amp;quot;width: 100%; border:1px solid #d0cfcc; background:#f2f7ff;border-spacing: 5px;&amp;quot;&lt;br /&gt;
| style=&amp;quot;width:280px; white-space:nowrap; color:#000;&amp;quot; |&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
# Allocate nodes&lt;br /&gt;
#SBATCH --nodes=2&lt;br /&gt;
# Number of tasks per node&lt;br /&gt;
#SBATCH --ntasks-per-node=40&lt;br /&gt;
# Queue class https://wiki.bwhpc.de/e/BwUniCluster_2.0_Batch_Queues&lt;br /&gt;
#SBATCH --partition=multiple&lt;br /&gt;
# Maximum job run time&lt;br /&gt;
#SBATCH --time=4:00:00&lt;br /&gt;
# Give the job a reasonable name&lt;br /&gt;
#SBATCH --job-name=openfoam&lt;br /&gt;
# File name for standard output (%j will be replaced by job id)&lt;br /&gt;
#SBATCH --output=logs-%j.out&lt;br /&gt;
# File name for error output&lt;br /&gt;
#SBATCH --error=logs-%j.err&lt;br /&gt;
&lt;br /&gt;
# User defined variables&lt;br /&gt;
FOAM_VERSION=&amp;quot;8&amp;quot;&lt;br /&gt;
EXECUTABLE=&amp;quot;icoFoam&amp;quot;&lt;br /&gt;
MPIRUN_OPTIONS=&amp;quot;--bind-to core --map-by core --report-bindings&amp;quot;&lt;br /&gt;
&lt;br /&gt;
module load ${FOAM_VERSION}&lt;br /&gt;
foamInit&lt;br /&gt;
&lt;br /&gt;
# remove decomposePar if you already decomposed your case beforehand &lt;br /&gt;
decomposeParHPC &amp;amp;&amp;amp;&lt;br /&gt;
&lt;br /&gt;
# starting the solver in parallel. Name of the solver is given in the &amp;quot;EXECUTABLE&amp;quot; variable&lt;br /&gt;
mpirun ${MPIRUN_OPTIONS} ${EXECUTABLE} -parallel &amp;amp;&amp;amp;&lt;br /&gt;
&lt;br /&gt;
reconstructParHPC&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Attention:&#039;&#039;&#039; The script above will run a parallel OpenFOAM Job with pre-installed OpenMPI. If you are using an OpenFOAM version wich comes with pre-installed Intel MPI (like, for example&amp;lt;span style=&amp;quot;background:#edeae2;margin:10px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;cae/openfoam/v1712-impi&amp;lt;/span&amp;gt;) you will have to modify the batch script to use all the advantages of Intel MPI for parallel calculations. For details see:  &lt;br /&gt;
* [[Batch_Jobs_-_bwUniCluster_Features|Batch Jobs Features]]&lt;br /&gt;
&lt;br /&gt;
= Using I/O and reducing the amount of data and files =&lt;br /&gt;
In OpenFOAM, you can control which variables or fields are written at specific times. For example, for post-processing purposes, you might need only a subset of variables. In order to control which files will be written, there is a function object called &amp;quot;writeObjects&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
An example controlDict file may look like this: At the top of the file (entry &amp;quot;writeControl&amp;quot;) you specify that ALL fields (variables) required for restarting are saved every 12 wall-clock hours. Then, additionally, at the bottom of the controlDict in the &amp;quot;functions&amp;quot; block, you can add a function object of type &amp;quot;writeObjects&amp;quot;. With this function object, you can control the output of specific fields independent of the entry at the top of the file: &lt;br /&gt;
&amp;lt;!--b)--&amp;gt; &lt;br /&gt;
{| style=&amp;quot;width: 100%; border:1px solid #d0cfcc; background:#f2f7ff;border-spacing: 5px;&amp;quot;&lt;br /&gt;
| style=&amp;quot;width:280px; white-space:nowrap; color:#000;&amp;quot; |&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
/*--------------------------------*- C++ -*----------------------------------*\&lt;br /&gt;
| =========                 |                                                 |&lt;br /&gt;
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |&lt;br /&gt;
|  \\    /   O peration     | Version:  4.1.x                                 |&lt;br /&gt;
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |&lt;br /&gt;
|    \\/     M anipulation  |                                                 |&lt;br /&gt;
\*---------------------------------------------------------------------------*/&lt;br /&gt;
FoamFile&lt;br /&gt;
{&lt;br /&gt;
    version     2.0;&lt;br /&gt;
    format      ascii;&lt;br /&gt;
    class       dictionary;&lt;br /&gt;
    location    &amp;quot;system&amp;quot;;&lt;br /&gt;
    object      controlDict;&lt;br /&gt;
}&lt;br /&gt;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //&lt;br /&gt;
&lt;br /&gt;
startFrom       latestTime;&lt;br /&gt;
startTime       0;&lt;br /&gt;
stopAt  	endTime;&lt;br /&gt;
endTime         1e2;&lt;br /&gt;
deltaT          1e-5;&lt;br /&gt;
&lt;br /&gt;
writeControl    clockTime;&lt;br /&gt;
writeInterval   43200; // write ALL fields necessary to restart your simulation &lt;br /&gt;
                       // every 43200 wall-clock seconds = 12 hours of real time&lt;br /&gt;
&lt;br /&gt;
purgeWrite      0;&lt;br /&gt;
writeFormat     binary;&lt;br /&gt;
writePrecision  10;&lt;br /&gt;
writeCompression off;&lt;br /&gt;
timeFormat      general;&lt;br /&gt;
timePrecision   10;&lt;br /&gt;
runTimeModifiable false;&lt;br /&gt;
&lt;br /&gt;
functions&lt;br /&gt;
{&lt;br /&gt;
    writeFields // name of the function object&lt;br /&gt;
    {&lt;br /&gt;
        type writeObjects;&lt;br /&gt;
        libs ( &amp;quot;libutilityFunctionObjects.so&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
        objects&lt;br /&gt;
        (&lt;br /&gt;
	    T U rho // list of fields/variables to be written&lt;br /&gt;
        );&lt;br /&gt;
&lt;br /&gt;
        // E.g. write every 1e-5 seconds of simulation time only the specified fields&lt;br /&gt;
        writeControl runTime;&lt;br /&gt;
        writeInterval 1e-5; // write every 1e-5 seconds&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also define multiple function objects in order to write different subsets of fields at different times. You can also use wildcards in the list of fields- for example, in order to write out all fields starting with &amp;quot;RR_&amp;quot; you can add&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;RR_.*&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
to the list of objects. You can get a list of valid field names by writing &amp;quot;banana&amp;quot; in the field list. During the run of the solver all valid field names are printed.&lt;br /&gt;
The output time can be changed too. Instead of writing at specific times in the simulation, you can also write after a certain number of time steps or depening on the wall clock time:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;// write every 100th simulation time step&lt;br /&gt;
writeControl timeStep;&lt;br /&gt;
writeInterval 100;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;// every 3600 seconds of real wall clock time&lt;br /&gt;
writeControl runtime;&lt;br /&gt;
writeInterval 3600; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you use OpenFOAM before version 4.0 or 1606, the type of function object is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
type writeRegisteredObject; // (instead of type writeObjects) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you use OpenFOAM before version 3.0, you have to load the library with&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
functionObjectLibs (&amp;quot;libIOFunctionObjects.so&amp;quot;); // (instead of libs ( &amp;quot;libutilityFunctionObjects.so&amp;quot; )) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and exchange the entry &amp;quot;writeControl&amp;quot; with &amp;quot;outputControl&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
= OpenFOAM and ParaView on bwUniCluster=&lt;br /&gt;
ParaView is not directly linked to OpenFOAM installation on the cluster. Therefore, to visualize OpenFOAM jobs with ParaView, they will have to be manually opened within the specific ParaView module.  &lt;br /&gt;
&lt;br /&gt;
1. Load the ParaView module. For example: &lt;br /&gt;
&amp;lt;pre&amp;gt;$ module load cae/paraview/4.3.1&amp;lt;/pre&amp;gt;&lt;br /&gt;
2. Create a dummy &#039;*.openfoam&#039; file in the OpenFOAM case folder:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ cd &amp;lt;case_folder_path&amp;gt;&lt;br /&gt;
$ touch &amp;lt;case_name&amp;gt;.openfoam&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;NOTICE:&#039;&#039;&#039; the name of the dummy file should be the same as the name of the OpenFOAM case folder, with &#039;.openfoam&#039; extension.&lt;br /&gt;
&lt;br /&gt;
3. Open ParaView:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ paraview&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;NOTICE:&#039;&#039;&#039; ParaView is a visualization software which requires X-server to run.&lt;br /&gt;
&lt;br /&gt;
4. In Paraview go to &#039;File&#039; -&amp;gt; &#039;Open&#039;, or press Ctrl+O. Choose to show &#039;All files (*)&#039;, and open your &amp;lt;case_name&amp;gt;.openfoam file. In the pop-up window select OpenFOAM, and press &#039;Ok&#039;.&lt;br /&gt;
&lt;br /&gt;
5. That&#039;s it! Enjoy ParaView and OpenFOAM.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[[Category:Engineering software]]&lt;br /&gt;
[[Category:BwUniCluster]]&lt;br /&gt;
[[Category:BwUniCluster_2.0]]&lt;br /&gt;
[[Category:BwForCluster_Chemistry]]&lt;br /&gt;
[[Category:BwForCluster_JUSTUS_2]]&lt;br /&gt;
[[Category:BwForCluster_MLS&amp;amp;WISO_Production]]&lt;/div&gt;</summary>
		<author><name>F Wagner</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Software/OpenFoam&amp;diff=8803</id>
		<title>BwUniCluster3.0/Software/OpenFoam</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Software/OpenFoam&amp;diff=8803"/>
		<updated>2021-06-07T14:32:16Z</updated>

		<summary type="html">&lt;p&gt;F Wagner: /* OpenFOAM and ParaView on bwUniCluster */&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;
| cae/openfoam&lt;br /&gt;
|-&lt;br /&gt;
| Availability&lt;br /&gt;
| [[bwUniCluster_2.0]] &amp;amp;#124; [[BwForCluster_JUSTUS_2]] &amp;amp;#124; bwGRiD-T&amp;amp;uuml;bingen&lt;br /&gt;
|-&lt;br /&gt;
| License&lt;br /&gt;
| [https://www.openfoam.org/licence.php GNU General Public Licence]&lt;br /&gt;
|-&lt;br /&gt;
| Citing&lt;br /&gt;
| n/a&lt;br /&gt;
|-&lt;br /&gt;
| Links&lt;br /&gt;
| [https://www.openfoam.org/ Homepage] &amp;amp;#124; [https://www.openfoam.org/docs/ 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;
&amp;lt;br&amp;gt;&lt;br /&gt;
= Description =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;OpenFOAM&#039;&#039;&#039; (Open-source Field Operation And Manipulation) is a free, open-source CFD software package with an extensive range of features to solve anything from complex fluid flows involving chemical reactions, turbulence and heat transfer, to solid dynamics and electromagnetics.&lt;br /&gt;
&lt;br /&gt;
= Availability =&lt;br /&gt;
&lt;br /&gt;
OpenFOAM is available on selected bwHPC-Clusters. A complete list of versions currently installed on the bwHPC-Clusters can be obtained from the [https://www.bwhpc.de/software.html Cluster Information System (CIS)].&lt;br /&gt;
&lt;br /&gt;
= Adding OpenFOAM to Your Environment =&lt;br /&gt;
&lt;br /&gt;
In order to check which versions of OpenFOAM are installed on the compute cluster, run the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ module avail cae/openfoam&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In general, several OpenFOAM versions should be returned.&lt;br /&gt;
The default version can be accessed by loading the appropriate module:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ module load cae/openfoam&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Other OpenFOAM versions (if available) can be loaded according to:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ module load cae/openfoam/&amp;lt;version&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
with &amp;lt;version&amp;gt; specifying the desired version.&lt;br /&gt;
&lt;br /&gt;
To activate the OpenFOAM applications, type&lt;br /&gt;
&amp;lt;pre&amp;gt;$ source $FOAM_INIT&amp;lt;/pre&amp;gt;&lt;br /&gt;
or simply&lt;br /&gt;
&amp;lt;pre&amp;gt;$ foamInit&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Parallel run with OpenFOAM  =&lt;br /&gt;
For a better performance on running OpenFOAM jobs in parallel on bwUniCluster, it is recommended to have the decomposed data in local folders on each node.  &lt;br /&gt;
&lt;br /&gt;
Therefore you may use *HPC scripts, wich will copy your data to the node specific folders after running the decomposePar, and copy it back to the local case folder before running reconstructPar.&lt;br /&gt;
&lt;br /&gt;
Don&#039;t forget to allocate enough wall-time for decomposition and reconstruction of your cases. As the data will be processed directly on  the nodes, and may be lost if the job is cancelled before  the data is copied back into the case folder.&lt;br /&gt;
&lt;br /&gt;
Following commands will do that for you: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$ decomposeParHPC&lt;br /&gt;
$ reconstructParHPC&lt;br /&gt;
$ reconstructParMeshHPC&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
instead of:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ decomposePar&lt;br /&gt;
$ reconstructPar&lt;br /&gt;
$ recontructParMesh&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For example, if you want to run&amp;lt;span style=&amp;quot;background:#edeae2;margin:10px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;snappyHexMesh&amp;lt;/span&amp;gt;in parallel, you may use the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ decomposeParMeshHPC&lt;br /&gt;
$ mpirun --bind-to core --map-by core -report-bindings snappyHexMesh -overwrite -parallel&lt;br /&gt;
$ reconstructParMeshHPC -constant&amp;lt;/pre&amp;gt;&lt;br /&gt;
instead of:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ decomposePar&lt;br /&gt;
$ mpirun --bind-to core --map-by core -report-bindings snappyHexMesh -overwrite -parallel&lt;br /&gt;
$ reconstructParMesh -constant&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For running jobs on multiple nodes, OpenFOAM needs passwordless communication between the nodes, to copy data into the local folders.&lt;br /&gt;
&lt;br /&gt;
A small trick using ssh-keygen once will let your nodes to communicate freely over rsh. &lt;br /&gt;
&lt;br /&gt;
Do it once (if you didn&#039;t do it already in the past):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ssh-keygen&lt;br /&gt;
$ cat $HOME/.ssh/id_rsa.pub &amp;gt;&amp;gt; $HOME/.ssh/authorized_keys&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Building an OpenFOAM batch file for parallel processing =&lt;br /&gt;
== General information == &lt;br /&gt;
Before running OpenFOAM jobs in parallel, it is necessary to decompose the geometry domain into segments, equal to the number of processors (or threads) you intend to use. &lt;br /&gt;
&lt;br /&gt;
That means, for example, if you want to run a case on 8 processors, you will have to decompose the mesh in 8 segments, first. Then, you start the solver in &#039;&#039;parallel&#039;&#039;, letting &#039;&#039;OpenFOAM&#039;&#039; to run calculations concurrently on these segments, one processor responding for one segment of the mesh, sharing the data with all other processors in between. &lt;br /&gt;
&lt;br /&gt;
There is, of course, a mechanism that connects properly the calculations, so you don&#039;t loose your data or generate wrong results. &lt;br /&gt;
&lt;br /&gt;
Decomposition and segments building process is handled by&amp;lt;span style=&amp;quot;background:#edeae2;margin:10px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;decomposePar&amp;lt;/span&amp;gt;utility. &lt;br /&gt;
&lt;br /&gt;
The number of subdomains, in which the geometry will be decomposed, is specified in &amp;quot;&#039;&#039;system/decomposeParDict&#039;&#039;&amp;quot;, as well as the decomposition method to use. &lt;br /&gt;
&lt;br /&gt;
The automatic decomposition method is &amp;quot;&#039;&#039;scotch&#039;&#039;&amp;quot;. It trims the mesh, collecting as many cells as possible per processor, trying to avoid having empty segments or segments with not enough cells. If you want your mesh to be divided in other way, specifying the number of segments it should be cut in x, y or z direction, for example, you can use &amp;quot;simple&amp;quot; or &amp;quot;hierarchical&amp;quot; methods. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Wrapper script generation == &lt;br /&gt;
&#039;&#039;&#039;Attention:&#039;&#039;&#039; &amp;lt;span style=&amp;quot;background:#edeae2;margin:10px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;openfoam&amp;lt;/span&amp;gt; module loads automatically the necessary &amp;lt;span style=&amp;quot;background:#edeae2;margin:10px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;openmpi&amp;lt;/span&amp;gt; module for parallel run, do &#039;&#039;&#039;NOT&#039;&#039;&#039; load another version of mpi, as it may conflict with the loaded &amp;lt;span style=&amp;quot;background:#edeae2;margin:10px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;openfoam&amp;lt;/span&amp;gt; version. &lt;br /&gt;
&lt;br /&gt;
A job-script to submit a batch job called &#039;&#039;job_openfoam.sh&#039;&#039; that runs &#039;&#039;icoFoam&#039;&#039; solver with OpenFoam version 8, on 80 processors, on a &#039;&#039;multiple&#039;&#039; partition with a total wall clock time of 6 hours looks like: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--b)--&amp;gt; &lt;br /&gt;
{| style=&amp;quot;width: 100%; border:1px solid #d0cfcc; background:#f2f7ff;border-spacing: 5px;&amp;quot;&lt;br /&gt;
| style=&amp;quot;width:280px; white-space:nowrap; color:#000;&amp;quot; |&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
# Allocate nodes&lt;br /&gt;
#SBATCH --nodes=2&lt;br /&gt;
# Number of tasks per node&lt;br /&gt;
#SBATCH --ntasks-per-node=40&lt;br /&gt;
# Queue class https://wiki.bwhpc.de/e/BwUniCluster_2.0_Batch_Queues&lt;br /&gt;
#SBATCH --partition=multiple&lt;br /&gt;
# Maximum job run time&lt;br /&gt;
#SBATCH --time=4:00:00&lt;br /&gt;
# Give the job a reasonable name&lt;br /&gt;
#SBATCH --job-name=openfoam&lt;br /&gt;
# File name for standard output (%j will be replaced by job id)&lt;br /&gt;
#SBATCH --output=logs-%j.out&lt;br /&gt;
# File name for error output&lt;br /&gt;
#SBATCH --error=logs-%j.err&lt;br /&gt;
&lt;br /&gt;
# User defined variables&lt;br /&gt;
FOAM_VERSION=&amp;quot;8&amp;quot;&lt;br /&gt;
EXECUTABLE=&amp;quot;icoFoam&amp;quot;&lt;br /&gt;
MPIRUN_OPTIONS=&amp;quot;--bind-to core --map-by core --report-bindings&amp;quot;&lt;br /&gt;
&lt;br /&gt;
module load ${FOAM_VERSION}&lt;br /&gt;
foamInit&lt;br /&gt;
&lt;br /&gt;
# remove decomposePar if you already decomposed your case beforehand &lt;br /&gt;
decomposeParHPC &amp;amp;&amp;amp;&lt;br /&gt;
&lt;br /&gt;
# starting the solver in parallel. Name of the solver is given in the &amp;quot;EXECUTABLE&amp;quot; variable&lt;br /&gt;
mpirun ${MPIRUN_OPTIONS} ${EXECUTABLE} -parallel &amp;amp;&amp;amp;&lt;br /&gt;
&lt;br /&gt;
reconstructParHPC&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Attention:&#039;&#039;&#039; The script above will run a parallel OpenFOAM Job with pre-installed OpenMPI. If you are using an OpenFOAM version wich comes with pre-installed Intel MPI (like, for example&amp;lt;span style=&amp;quot;background:#edeae2;margin:10px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;cae/openfoam/v1712-impi&amp;lt;/span&amp;gt;) you will have to modify the batch script to use all the advantages of Intel MPI for parallel calculations. For details see:  &lt;br /&gt;
* [[Batch_Jobs_-_bwUniCluster_Features|Batch Jobs Features]]&lt;br /&gt;
&lt;br /&gt;
= Using I/O and reducing the amount of data and files =&lt;br /&gt;
In OpenFOAM, you can control which variables or fields are written at specific times. For example, for post-processing purposes, you might need only a subset of variables. In order to control which files will be written, there is a function object called &amp;quot;writeObjects&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
An example controlDict file may look like this: At the top of the file (entry &amp;quot;writeControl&amp;quot;) you specify that ALL fields (variables) required for restarting are saved every 12 wall-clock hours. Then, additionally, at the bottom of the controlDict in the &amp;quot;functions&amp;quot; block, you can add a function object of type &amp;quot;writeObjects&amp;quot;. With this function object, you can control the output of specific fields independent of the entry at the top of the file: &lt;br /&gt;
&amp;lt;!--b)--&amp;gt; &lt;br /&gt;
{| style=&amp;quot;width: 100%; border:1px solid #d0cfcc; background:#f2f7ff;border-spacing: 5px;&amp;quot;&lt;br /&gt;
| style=&amp;quot;width:280px; white-space:nowrap; color:#000;&amp;quot; |&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
/*--------------------------------*- C++ -*----------------------------------*\&lt;br /&gt;
| =========                 |                                                 |&lt;br /&gt;
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |&lt;br /&gt;
|  \\    /   O peration     | Version:  4.1.x                                 |&lt;br /&gt;
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |&lt;br /&gt;
|    \\/     M anipulation  |                                                 |&lt;br /&gt;
\*---------------------------------------------------------------------------*/&lt;br /&gt;
FoamFile&lt;br /&gt;
{&lt;br /&gt;
    version     2.0;&lt;br /&gt;
    format      ascii;&lt;br /&gt;
    class       dictionary;&lt;br /&gt;
    location    &amp;quot;system&amp;quot;;&lt;br /&gt;
    object      controlDict;&lt;br /&gt;
}&lt;br /&gt;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //&lt;br /&gt;
&lt;br /&gt;
startFrom       latestTime;&lt;br /&gt;
startTime       0;&lt;br /&gt;
stopAt  	endTime;&lt;br /&gt;
endTime         1e2;&lt;br /&gt;
deltaT          1e-5;&lt;br /&gt;
&lt;br /&gt;
writeControl    clockTime;&lt;br /&gt;
writeInterval   43200; // write ALL fields necessary to restart your simulation &lt;br /&gt;
                       // every 43200 wall-clock seconds = 12 hours of real time&lt;br /&gt;
&lt;br /&gt;
purgeWrite      0;&lt;br /&gt;
writeFormat     binary;&lt;br /&gt;
writePrecision  10;&lt;br /&gt;
writeCompression off;&lt;br /&gt;
timeFormat      general;&lt;br /&gt;
timePrecision   10;&lt;br /&gt;
runTimeModifiable false;&lt;br /&gt;
&lt;br /&gt;
functions&lt;br /&gt;
{&lt;br /&gt;
    writeFields // name of the function object&lt;br /&gt;
    {&lt;br /&gt;
        type writeObjects;&lt;br /&gt;
        libs ( &amp;quot;libutilityFunctionObjects.so&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
        objects&lt;br /&gt;
        (&lt;br /&gt;
	    T U rho // list of fields/variables to be written&lt;br /&gt;
        );&lt;br /&gt;
&lt;br /&gt;
        // E.g. write every 1e-5 seconds of simulation time only the specified fields&lt;br /&gt;
        writeControl runTime;&lt;br /&gt;
        writeInterval 1e-5; // write every 1e-5 seconds&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also define multiple function objects in order to write different subsets of fields at different times. You can also use wildcards in the list of fields- for example, in order to write out all fields starting with &amp;quot;RR_&amp;quot; you can add&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;RR_.*&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
to the list of objects. You can get a list of valid field names by writing &amp;quot;banana&amp;quot; in the field list. During the run of the solver all valid field names are printed.&lt;br /&gt;
The output time can be changed too. Instead of writing at specific times in the simulation, you can also write after a certain number of time steps or depening on the wall clock time:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;// write every 100th simulation time step&lt;br /&gt;
writeControl timeStep;&lt;br /&gt;
writeInterval 100;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;// every 3600 seconds of real wall clock time&lt;br /&gt;
writeControl runtime;&lt;br /&gt;
writeInterval 3600; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you use OpenFOAM before version 4.0 or 1606, the type of function object is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
type writeRegisteredObject; // (instead of type writeObjects) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you use OpenFOAM before version 3.0, you have to load the library with&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
functionObjectLibs (&amp;quot;libIOFunctionObjects.so&amp;quot;); // (instead of libs ( &amp;quot;libutilityFunctionObjects.so&amp;quot; )) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and exchange the entry &amp;quot;writeControl&amp;quot; with &amp;quot;outputControl&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
= OpenFOAM and ParaView on bwUniCluster=&lt;br /&gt;
ParaView is not directly linked to OpenFOAM installation on the cluster. Therefore, to visualize OpenFOAM jobs with ParaView, they will have to be manually opened within the specific ParaView module.  &lt;br /&gt;
&lt;br /&gt;
1. Load the ParaView module. For example: &lt;br /&gt;
&amp;lt;pre&amp;gt;$ module load cae/paraview/4.3.1&amp;lt;/pre&amp;gt;&lt;br /&gt;
2. Create a dummy &#039;*.openfoam&#039; file in the OpenFOAM case folder:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ cd &amp;lt;case_folder_path&amp;gt;&lt;br /&gt;
$ touch &amp;lt;case_name&amp;gt;.openfoam&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;NOTICE:&#039;&#039;&#039; the name of the dummy file should be the same as the name of the OpenFOAM case folder, with &#039;.openfoam&#039; extension.&lt;br /&gt;
&lt;br /&gt;
3. Open ParaView:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ paraview&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;NOTICE:&#039;&#039;&#039; ParaView is a visualization software which requires X-server to run.&lt;br /&gt;
&lt;br /&gt;
4. In Paraview go to &#039;File&#039; -&amp;gt; &#039;Open&#039;, or press Ctrl+O. Choose to show &#039;All files (*)&#039;, and open your &amp;lt;case_name&amp;gt;.openfoam file. In the pop-up window select OpenFOAM, and press &#039;Ok&#039;.&lt;br /&gt;
&lt;br /&gt;
5. That&#039;s it! Enjoy ParaView and OpenFOAM.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[[Category:Engineering software]]&lt;br /&gt;
[[Category:BwUniCluster]]&lt;br /&gt;
[[Category:BwUniCluster_2.0]]&lt;br /&gt;
[[Category:BwForCluster_Chemistry]]&lt;br /&gt;
[[Category:BwForCluster_JUSTUS_2]]&lt;br /&gt;
[[Category:BwForCluster_MLS&amp;amp;WISO_Production]]&lt;/div&gt;</summary>
		<author><name>F Wagner</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=JUSTUS2/Software/NAMD&amp;diff=8802</id>
		<title>JUSTUS2/Software/NAMD</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=JUSTUS2/Software/NAMD&amp;diff=8802"/>
		<updated>2021-06-07T14:30:43Z</updated>

		<summary type="html">&lt;p&gt;F Wagner: /* Useful links */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=760px 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/namd&lt;br /&gt;
|-&lt;br /&gt;
| Availability&lt;br /&gt;
| [[BwForCluster_JUSTUS_2]] &amp;amp;#124; [[BwForCluster_MLS&amp;amp;WISO_Production]]&lt;br /&gt;
|-&lt;br /&gt;
| License&lt;br /&gt;
| Freeware for non-commercial use. [[#License|More...]]&lt;br /&gt;
|-&lt;br /&gt;
| Citing &lt;br /&gt;
| [http://www.ks.uiuc.edu/Research/namd/papers.html Publications]&lt;br /&gt;
|-&lt;br /&gt;
| Links&lt;br /&gt;
| [http://www.ks.uiuc.edu/Research/namd/ Homepage] &amp;amp;#124; [http://www.ks.uiuc.edu/Research/namd/2.14/ug/ 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;
&lt;br /&gt;
&#039;&#039;&#039;NAMD&#039;&#039;&#039; (NAnoscale Molecular Dynamics) is a parallel molecular dynamics code designed for high-performance simulation of large biomolecular systems.&lt;br /&gt;
&lt;br /&gt;
= Availability =&lt;br /&gt;
&lt;br /&gt;
NAMD is available on selected bwHPC-Clusters. A complete list of versions currently installed on the bwHPC-Clusters can be obtained from the [https://www.bwhpc.de/software.html Cluster Information System (CIS)].&lt;br /&gt;
&lt;br /&gt;
In order to check which versions of NAMD are installed on the compute cluster, run the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module avail chem/namd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= License =&lt;br /&gt;
&lt;br /&gt;
NAMD is available as [https://en.wikipedia.org/wiki/Freeware freeware] for non-commercial use by individuals, academic institutions, and corporations for in-house business uses. Please read the [http://www.ks.uiuc.edu/Research/namd/license.html license] for additional information about NAMD.&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 NAMD with the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load chem/namd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The module will try to load all modules (i.e., compiler, MPI, MKL) it needs to function. If loading the module fails, check if you have already loaded one of those modules, but not in the version required by NAMD.&lt;br /&gt;
&lt;br /&gt;
If you wish to load another (older) version of NAMD, you can do so using&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load chem/namd/&amp;lt;version&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
with &amp;lt;version&amp;gt; specifying the desired version.&lt;br /&gt;
&lt;br /&gt;
Please cite NAMD in your publications according to the [http://www.ks.uiuc.edu/Research/namd/papers.html references].&lt;br /&gt;
&lt;br /&gt;
== Program Binaries ==&lt;br /&gt;
&lt;br /&gt;
The binary &#039;&#039;namd2&#039;&#039; is main program of the NAMD package.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage: namd2 [options] [config file]&lt;br /&gt;
  &lt;br /&gt;
Example: namd2 +isomalloc_sync run.namd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For information about how to construct NAMD configuration files, please see the [http://www.ks.uiuc.edu/Research/namd/2.14/ug/ documentation]. In addition to a configuration file, NAMD also needs a CHARMM force field in either CHARMM or X-PLOR format, an X-PLOR format PSF file describing the molecular structure, and the initial coordinates of the molecular system in the form of a PDB file.&lt;br /&gt;
&lt;br /&gt;
The NAMD package includes several additional tools:&lt;br /&gt;
&lt;br /&gt;
* flipbinpdb -- flips byte-ordering of 8-byte doubles&lt;br /&gt;
* flipdcd -- flips byte-ordering of DCD files&lt;br /&gt;
* psfgen -- [https://www.ks.uiuc.edu/Research/vmd/ VMD] psfgen plugin&lt;br /&gt;
* sortreplicas -- un-shuffles replica trajectories to place same-temperature frames in the same file&lt;br /&gt;
&lt;br /&gt;
=== Charm++ ===&lt;br /&gt;
&lt;br /&gt;
Charm++ is a parallel object-oriented programming paradigm based on C++ and developed in the Parallel Programming Laboratory at the University of Illinois at Urbana–Champaign. NAMD has been implemented using Charm++.&lt;br /&gt;
&lt;br /&gt;
* charmrun -- launches Charm++ programs&lt;br /&gt;
&lt;br /&gt;
For help on usage, type&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ charmrun -help&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== GPU Acceleration ===&lt;br /&gt;
&lt;br /&gt;
Currently not available.&lt;br /&gt;
&lt;br /&gt;
== Hints for using NAMD ==&lt;br /&gt;
&lt;br /&gt;
=== Parallel Execution ===&lt;br /&gt;
&lt;br /&gt;
It is usually more efficient to run several smaller jobs with reasonable speedup side by side. Check for a reasonable speedup by increasing the number of workers from 1, 2, 4, n cores. Do not forget to adjust the memory specification when changing the number of workers&lt;br /&gt;
&lt;br /&gt;
=== Memory Management ===&lt;br /&gt;
&lt;br /&gt;
It requires some experience to choose the perfect memory value. Monitoring a job interactively may help to estimate the memory consumption. Requesting 1GB more than the required amount is typically sufficient.&lt;br /&gt;
&lt;br /&gt;
=== Runtime Specification ===&lt;br /&gt;
&lt;br /&gt;
The wall-time limit is independent of the number of parallel workers. Selecting the best value requires some experience. In general, jobs with shorter wall times get higher priorities. It could help to run the job interactively for a small period of time to monitor its convergence. Furthermore, it may be advantageous to extrapolate the run time by looking at smaller test jobs.&lt;br /&gt;
&lt;br /&gt;
= Examples =&lt;br /&gt;
&lt;br /&gt;
As with all processes that require more than a few minutes to run, non-trivial compute jobs must be submitted to the cluster queuing system.&lt;br /&gt;
&lt;br /&gt;
Example scripts are available in the directory &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;$NAMD_EXA_DIR&amp;lt;/span&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module show chem/namd                # show environment variables, which will be available after &#039;module load&#039;&lt;br /&gt;
$ module load chem/namd                # load module&lt;br /&gt;
$ ls $NAMD_EXA_DIR                     # show content of directory $NAMD_EXA_DIR&lt;br /&gt;
$ cat $NAMD_EXA_DIR/README             # show examples README&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run a first simple example job:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load chem/namd                          # load module&lt;br /&gt;
$ WORKSPACE=`ws_allocate namd 3`                 # allocate workspace&lt;br /&gt;
$ cd $WORKSPACE                                  # change to workspace&lt;br /&gt;
$ cp -a $NAMD_HOME/bwhpc-examples .              # copy example files to workspace&lt;br /&gt;
$ cd bwhpc-examples/apoa1                        # change to test directory&lt;br /&gt;
$ sbatch bwhpc_namd_apoa1.sh                     # submit job&lt;br /&gt;
$ squeue                                         # obtain JOBID&lt;br /&gt;
$ scontrol show job &amp;lt;JOBID&amp;gt;                      # check state of job&lt;br /&gt;
$ ls                                             # when job finishes the results will be visible in this directory&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Useful links =&lt;br /&gt;
&lt;br /&gt;
* [http://www.ks.uiuc.edu/Research/namd/2.14/ug/ Documentation (english)]&lt;br /&gt;
* [http://www.ks.uiuc.edu/Research/namd/mailing_list/ Maling list (english)]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/NAMD Wikipedia article (english)]&lt;br /&gt;
* [https://de.wikipedia.org/wiki/NAMD Wikipedia article (german)]&lt;br /&gt;
----&lt;br /&gt;
[[Category:Chemistry software]][[Category:BwForCluster_Chemistry]][[Category:BwForCluster_JUSTUS_2]][[Category:BwForCluster_MLS&amp;amp;WISO_Production]]&lt;/div&gt;</summary>
		<author><name>F Wagner</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=JUSTUS2/Software/NAMD&amp;diff=8801</id>
		<title>JUSTUS2/Software/NAMD</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=JUSTUS2/Software/NAMD&amp;diff=8801"/>
		<updated>2021-06-07T14:30:11Z</updated>

		<summary type="html">&lt;p&gt;F Wagner: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=760px 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/namd&lt;br /&gt;
|-&lt;br /&gt;
| Availability&lt;br /&gt;
| [[BwForCluster_JUSTUS_2]] &amp;amp;#124; [[BwForCluster_MLS&amp;amp;WISO_Production]]&lt;br /&gt;
|-&lt;br /&gt;
| License&lt;br /&gt;
| Freeware for non-commercial use. [[#License|More...]]&lt;br /&gt;
|-&lt;br /&gt;
| Citing &lt;br /&gt;
| [http://www.ks.uiuc.edu/Research/namd/papers.html Publications]&lt;br /&gt;
|-&lt;br /&gt;
| Links&lt;br /&gt;
| [http://www.ks.uiuc.edu/Research/namd/ Homepage] &amp;amp;#124; [http://www.ks.uiuc.edu/Research/namd/2.14/ug/ 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;
&lt;br /&gt;
&#039;&#039;&#039;NAMD&#039;&#039;&#039; (NAnoscale Molecular Dynamics) is a parallel molecular dynamics code designed for high-performance simulation of large biomolecular systems.&lt;br /&gt;
&lt;br /&gt;
= Availability =&lt;br /&gt;
&lt;br /&gt;
NAMD is available on selected bwHPC-Clusters. A complete list of versions currently installed on the bwHPC-Clusters can be obtained from the [https://www.bwhpc.de/software.html Cluster Information System (CIS)].&lt;br /&gt;
&lt;br /&gt;
In order to check which versions of NAMD are installed on the compute cluster, run the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module avail chem/namd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= License =&lt;br /&gt;
&lt;br /&gt;
NAMD is available as [https://en.wikipedia.org/wiki/Freeware freeware] for non-commercial use by individuals, academic institutions, and corporations for in-house business uses. Please read the [http://www.ks.uiuc.edu/Research/namd/license.html license] for additional information about NAMD.&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 NAMD with the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load chem/namd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The module will try to load all modules (i.e., compiler, MPI, MKL) it needs to function. If loading the module fails, check if you have already loaded one of those modules, but not in the version required by NAMD.&lt;br /&gt;
&lt;br /&gt;
If you wish to load another (older) version of NAMD, you can do so using&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load chem/namd/&amp;lt;version&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
with &amp;lt;version&amp;gt; specifying the desired version.&lt;br /&gt;
&lt;br /&gt;
Please cite NAMD in your publications according to the [http://www.ks.uiuc.edu/Research/namd/papers.html references].&lt;br /&gt;
&lt;br /&gt;
== Program Binaries ==&lt;br /&gt;
&lt;br /&gt;
The binary &#039;&#039;namd2&#039;&#039; is main program of the NAMD package.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage: namd2 [options] [config file]&lt;br /&gt;
  &lt;br /&gt;
Example: namd2 +isomalloc_sync run.namd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For information about how to construct NAMD configuration files, please see the [http://www.ks.uiuc.edu/Research/namd/2.14/ug/ documentation]. In addition to a configuration file, NAMD also needs a CHARMM force field in either CHARMM or X-PLOR format, an X-PLOR format PSF file describing the molecular structure, and the initial coordinates of the molecular system in the form of a PDB file.&lt;br /&gt;
&lt;br /&gt;
The NAMD package includes several additional tools:&lt;br /&gt;
&lt;br /&gt;
* flipbinpdb -- flips byte-ordering of 8-byte doubles&lt;br /&gt;
* flipdcd -- flips byte-ordering of DCD files&lt;br /&gt;
* psfgen -- [https://www.ks.uiuc.edu/Research/vmd/ VMD] psfgen plugin&lt;br /&gt;
* sortreplicas -- un-shuffles replica trajectories to place same-temperature frames in the same file&lt;br /&gt;
&lt;br /&gt;
=== Charm++ ===&lt;br /&gt;
&lt;br /&gt;
Charm++ is a parallel object-oriented programming paradigm based on C++ and developed in the Parallel Programming Laboratory at the University of Illinois at Urbana–Champaign. NAMD has been implemented using Charm++.&lt;br /&gt;
&lt;br /&gt;
* charmrun -- launches Charm++ programs&lt;br /&gt;
&lt;br /&gt;
For help on usage, type&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ charmrun -help&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== GPU Acceleration ===&lt;br /&gt;
&lt;br /&gt;
Currently not available.&lt;br /&gt;
&lt;br /&gt;
== Hints for using NAMD ==&lt;br /&gt;
&lt;br /&gt;
=== Parallel Execution ===&lt;br /&gt;
&lt;br /&gt;
It is usually more efficient to run several smaller jobs with reasonable speedup side by side. Check for a reasonable speedup by increasing the number of workers from 1, 2, 4, n cores. Do not forget to adjust the memory specification when changing the number of workers&lt;br /&gt;
&lt;br /&gt;
=== Memory Management ===&lt;br /&gt;
&lt;br /&gt;
It requires some experience to choose the perfect memory value. Monitoring a job interactively may help to estimate the memory consumption. Requesting 1GB more than the required amount is typically sufficient.&lt;br /&gt;
&lt;br /&gt;
=== Runtime Specification ===&lt;br /&gt;
&lt;br /&gt;
The wall-time limit is independent of the number of parallel workers. Selecting the best value requires some experience. In general, jobs with shorter wall times get higher priorities. It could help to run the job interactively for a small period of time to monitor its convergence. Furthermore, it may be advantageous to extrapolate the run time by looking at smaller test jobs.&lt;br /&gt;
&lt;br /&gt;
= Examples =&lt;br /&gt;
&lt;br /&gt;
As with all processes that require more than a few minutes to run, non-trivial compute jobs must be submitted to the cluster queuing system.&lt;br /&gt;
&lt;br /&gt;
Example scripts are available in the directory &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;$NAMD_EXA_DIR&amp;lt;/span&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module show chem/namd                # show environment variables, which will be available after &#039;module load&#039;&lt;br /&gt;
$ module load chem/namd                # load module&lt;br /&gt;
$ ls $NAMD_EXA_DIR                     # show content of directory $NAMD_EXA_DIR&lt;br /&gt;
$ cat $NAMD_EXA_DIR/README             # show examples README&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run a first simple example job:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load chem/namd                          # load module&lt;br /&gt;
$ WORKSPACE=`ws_allocate namd 3`                 # allocate workspace&lt;br /&gt;
$ cd $WORKSPACE                                  # change to workspace&lt;br /&gt;
$ cp -a $NAMD_HOME/bwhpc-examples .              # copy example files to workspace&lt;br /&gt;
$ cd bwhpc-examples/apoa1                        # change to test directory&lt;br /&gt;
$ sbatch bwhpc_namd_apoa1.sh                     # submit job&lt;br /&gt;
$ squeue                                         # obtain JOBID&lt;br /&gt;
$ scontrol show job &amp;lt;JOBID&amp;gt;                      # check state of job&lt;br /&gt;
$ ls                                             # when job finishes the results will be visible in this directory&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Useful links =&lt;br /&gt;
&lt;br /&gt;
* [http://www.ks.uiuc.edu/Research/namd/2.14/ug/ Documentation (english)]&lt;br /&gt;
* [http://www.ks.uiuc.edu/Research/namd/mailing_list/ Maling list (english)]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/NAMD Wikipedia article (english)]&lt;br /&gt;
* [https://de.wikipedia.org/wiki/NAMD Wikipedia article (german)]&lt;br /&gt;
----&lt;br /&gt;
[[Category:Chemistry software]][[Category:BwForCluster_Chemistry]][[Category:BwForCluster_JUSTUS_2]]&lt;/div&gt;</summary>
		<author><name>F Wagner</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=MATLAB&amp;diff=8800</id>
		<title>MATLAB</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=MATLAB&amp;diff=8800"/>
		<updated>2021-06-07T14:25:51Z</updated>

		<summary type="html">&lt;p&gt;F Wagner: &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/matlab&lt;br /&gt;
|-&lt;br /&gt;
| License&lt;br /&gt;
| [https://de.mathworks.com/pricing-licensing/index.html?intendeduse=edu&amp;amp;prodcode=ML Academic License/Commercial]&lt;br /&gt;
|-&lt;br /&gt;
| Citing&lt;br /&gt;
| n/a&lt;br /&gt;
|-&lt;br /&gt;
| Links&lt;br /&gt;
| [https://de.mathworks.com/products/matlab/ MATLAB Homepage] &amp;amp;#124; [https://de.mathworks.com/index.html?s_tid=gn_logo MathWorks Homepage] &amp;amp;#124; [https://de.mathworks.com/support/?s_tid=gn_supp Support and more]&lt;br /&gt;
|-&lt;br /&gt;
| Graphical Interface&lt;br /&gt;
| No&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Description =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;MATLAB&#039;&#039;&#039; (MATrix LABoratory) is a high-level programming language and interactive computing environment for numerical calculation and data visualization.&lt;br /&gt;
&lt;br /&gt;
= Availability =&lt;br /&gt;
&lt;br /&gt;
MATLAB is available on selected bwHPC-Clusters along with a collection of toolboxes. A complete list of versions currently installed on the bwHPC-Clusters can be obtained from the [https://www.bwhpc.de/software.html Cluster Information System (CIS)].&lt;br /&gt;
&lt;br /&gt;
= Adding MATLAB to Your Environment =&lt;br /&gt;
&lt;br /&gt;
In order to check which versions of MATLAB are installed on the compute cluster, run the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ module avail math/matlab&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In general, several MATLAB versions should be returned.&lt;br /&gt;
The default version can be accessed by loading the appropriate module:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ module load math/matlab&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Other MATLAB versions (if available) can be loaded according to:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ module load math/matlab/&amp;lt;version&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
with &amp;lt;version&amp;gt; specifying the desired version.&lt;br /&gt;
&lt;br /&gt;
An interactive MATLAB session with graphical user interface (GUI) can be started with the command (requires X11 forwarding enabled for your ssh login):&lt;br /&gt;
&amp;lt;pre&amp;gt;$ matlab&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since graphics rendering can be very slow on remote connections, the preferable way is to run the MATLAB command line interface without GUI:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ matlab -nodisplay&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: It is not advisable to invoke an interactive MATLAB session on a login node of the cluster.&lt;br /&gt;
The recommended way to run a long-duration interactive MATLAB session is to submit an interactive job and start MATLAB from within the dedicated compute node assigned to you by the queueing system (consult the specific cluster users guide on how to submit interactive jobs).&lt;br /&gt;
&lt;br /&gt;
The following command will execute a MATLAB script or function named &amp;quot;example&amp;quot; on a single thread:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ matlab -nodisplay -singleCompThread -r example &amp;gt; result.out 2&amp;gt;&amp;amp;1&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The output of this session will be redirected to the file result.out. The option &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;-r&amp;lt;/span&amp;gt; executes the MATLAB statement non-interactively. The option &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;-singleCompThread&amp;lt;/span&amp;gt; limits MATLAB to single computational thread. Most of the time, running MATLAB in single-threaded mode will meet your needs. But if you have mathematically intense computations that benefit from the built-in multithreading provided by MATLAB&#039;s BLAS and FFT implementation, then you can experiment with running in multi-threaded mode by omitting this option (see section 4.1 - Implicit Threading).&lt;br /&gt;
&lt;br /&gt;
As with all processes that require more than a few minutes to run, non-trivial MATLAB jobs must be submitted to the cluster queuing system. Example batch scripts are available in the directory pointed to by the environment variable &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;$MATLAB_EXA_DIR&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The help page of the MATLAB module provides more version specific information:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ module help math/matlab&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Parallel Computing Using MATLAB =&lt;br /&gt;
&lt;br /&gt;
Parallelization of MATLAB jobs is realized via the built-in multithreading provided by MATLAB&#039;s BLAS and FFT implementation and the parallel computing functionality of MATLAB&#039;s Parallel Computing Toolbox (PCT). The MATLAB Parallel/Distributed Computing Server is not available on the bwHPC-Clusters.&lt;br /&gt;
&lt;br /&gt;
== Implicit Threading ==&lt;br /&gt;
&lt;br /&gt;
A large number of built-in MATLAB functions may utilize multiple cores automatically without any code modifications required. This is referred to as implicit multithreading and must be strictly distinguished from explicit parallelism provided by the Parallel Computing Toolbox (PCT) which requires specific commands in your code in order to create threads.&lt;br /&gt;
&lt;br /&gt;
Implicit threading particularly takes place for linear algebra operations (such as the solution to a linear system A\b or matrix products A*B) and FFT operations. Many other high-level MATLAB functions do also benefit from multithreading capabilities of their underlying routines. However, the user can still enforce single-threaded mode by adding the command line option &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;-singleCompThread&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Whenever implicit threading takes place, MATLAB will detect the total number of cores that exist on a machine and by default makes use of all of them. This has very important implications for MATLAB jobs in HPC environments with shared-node job scheduling policy (i.e. with multiple users sharing one compute node). Due to this behaviour, a MATLAB job may take over more compute resources than assigned by the queueing system of the cluster (and thereby taking away these resources from all other users with running jobs on the same node - including your own jobs).&lt;br /&gt;
&lt;br /&gt;
Therefore, when running in multi-threaded mode, MATLAB always requires the user&#039;s intervention to not allocate all cores of the machine (unless requested so from the queueing system). The number of threads must be controlled from within the code by means of the &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;maxNumCompThreads(N)&amp;lt;/span&amp;gt; function (which is supposed to be deprecated) or, alternatively, with the &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;feature(&#039;numThreads&#039;, N)&amp;lt;/span&amp;gt; function (which is currently undocumented).&lt;br /&gt;
&lt;br /&gt;
== Using the Parallel Computing Toolbox (PCT) ==&lt;br /&gt;
&lt;br /&gt;
By using the PCT one can make explicit use of several cores on multicore processors to parallelize MATLAB applications without MPI programming. Under MATLAB version 8.4 and earlier, this toolbox provides 12 workers (MATLAB computational engines) to execute applications locally on a single multicore node. Under MATLAB version 8.5 and later, the number of workers available is equal to the number of cores on a single node (up to a maximum of 512).&lt;br /&gt;
&lt;br /&gt;
If multiple PCT jobs are running at the same time, they all write temporary MATLAB job information to the same location. This race condition can cause one or more of the parallel MATLAB jobs fail to use the parallel functionality of the toolbox.&lt;br /&gt;
&lt;br /&gt;
To solve this issue, each MATLAB job should explicitly set a unique location where these files are created. This can be accomplished by the following snippet of code added to your MATLAB script.&lt;br /&gt;
&lt;br /&gt;
{{bwFrameA|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;Matlab&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
% create a local cluster object&lt;br /&gt;
pc = parcluster(&#039;local&#039;)&lt;br /&gt;
&lt;br /&gt;
% get the number of dedicated cores from environment&lt;br /&gt;
num_workers = str2num(getenv(&#039;SLURM_NPROCS&#039;))&lt;br /&gt;
&lt;br /&gt;
% explicitly set the JobStorageLocation to the tmp directory that is unique to each cluster job (and is on local, fast scratch)&lt;br /&gt;
parpool_tmpdir = [getenv(&#039;TMP&#039;),&#039;/.matlab/local_cluster_jobs/slurm_jobID_&#039;,getenv(&#039;SLURM_JOB_ID&#039;)]&lt;br /&gt;
mkdir(parpool_tmpdir)&lt;br /&gt;
pc.JobStorageLocation = parpool_tmpdir&lt;br /&gt;
&lt;br /&gt;
% start the parallel pool&lt;br /&gt;
parpool(pc,num_workers)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Note: The code snippet also sets the correct number of parallel workers in MATLAB according to the total number of processes dedicated to the job given by the environment variable &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;$SLURM_NPROCS&amp;lt;/span&amp;gt; in the job submission file.&lt;br /&gt;
&lt;br /&gt;
= General Performance Tips for MATLAB =&lt;br /&gt;
&lt;br /&gt;
MATLAB data structures (arrays or matrices) are dynamic in size, i.e. MATLAB will automatically resize the structure on demand. Although this seems to be convenient, MATLAB continually needs to allocate a new chunk of memory and copy over the data to the new block of memory as the array or matrix grows in a loop. This may take a significant amount of extra time during execution of the program.&lt;br /&gt;
&lt;br /&gt;
Code performance can often be drastically improved by preallocating memory for the final expected size of the array or matrix before actually starting the processing loop. In order to preallocate an array of strings, you can use MATLAB&#039;s build-in cell function. In order to preallocate an array or matrix of numbers, you can use MATLAB&#039;s build-in zeros function.&lt;br /&gt;
&lt;br /&gt;
The performance benefit of preallocation is illustrated with the following example code.&lt;br /&gt;
&lt;br /&gt;
{{bwFrameA|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;Matlab&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
% prealloc.m&lt;br /&gt;
&lt;br /&gt;
clear all;&lt;br /&gt;
&lt;br /&gt;
num=10000000;&lt;br /&gt;
&lt;br /&gt;
disp(&#039;Without preallocation:&#039;)&lt;br /&gt;
tic&lt;br /&gt;
for i=1:num&lt;br /&gt;
    a(i)=i;&lt;br /&gt;
end&lt;br /&gt;
toc&lt;br /&gt;
&lt;br /&gt;
disp(&#039;With preallocation:&#039;)&lt;br /&gt;
tic&lt;br /&gt;
b=zeros(1,num);&lt;br /&gt;
for i=1:num&lt;br /&gt;
    b(i)=i;&lt;br /&gt;
end&lt;br /&gt;
toc&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
On a compute node, the result may look like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Without preallocation:&lt;br /&gt;
Elapsed time is 2.879446 seconds.&lt;br /&gt;
With preallocation:&lt;br /&gt;
Elapsed time is 0.097557 seconds.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please recognize that the code runs almost 30 times faster with preallocation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[[Category:Mathematics software]]&lt;br /&gt;
[[Category:BwUniCluster]]&lt;br /&gt;
[[Category:BwUniCluster_2.0]]&lt;br /&gt;
[[Category:BwForCluster_BinAC]]&lt;br /&gt;
[[Category:BwForCluster_MLS&amp;amp;WISO_Production]]&lt;br /&gt;
[[Category:BwForCluster_Chemistry]]&lt;br /&gt;
[[Category:BwForCluster_JUSTUS_2]]&lt;/div&gt;</summary>
		<author><name>F Wagner</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=MATLAB&amp;diff=8799</id>
		<title>MATLAB</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=MATLAB&amp;diff=8799"/>
		<updated>2021-06-07T14:24:52Z</updated>

		<summary type="html">&lt;p&gt;F Wagner: &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/matlab&lt;br /&gt;
|-&lt;br /&gt;
| License&lt;br /&gt;
| [https://de.mathworks.com/pricing-licensing/index.html?intendeduse=edu&amp;amp;prodcode=ML Academic License/Commercial]&lt;br /&gt;
|-&lt;br /&gt;
| Citing&lt;br /&gt;
| n/a&lt;br /&gt;
|-&lt;br /&gt;
| Links&lt;br /&gt;
| [https://de.mathworks.com/products/matlab/ MATLAB Homepage] &amp;amp;#124; [https://de.mathworks.com/index.html?s_tid=gn_logo MathWorks Homepage] &amp;amp;#124; [https://de.mathworks.com/support/?s_tid=gn_supp Support and more]&lt;br /&gt;
|-&lt;br /&gt;
| Graphical Interface&lt;br /&gt;
| No&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Description =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;MATLAB&#039;&#039;&#039; (MATrix LABoratory) is a high-level programming language and interactive computing environment for numerical calculation and data visualization.&lt;br /&gt;
&lt;br /&gt;
= Availability =&lt;br /&gt;
&lt;br /&gt;
MATLAB is available on selected bwHPC-Clusters along with a collection of toolboxes. A complete list of versions currently installed on the bwHPC-Clusters can be obtained from the [https://www.bwhpc.de/software.html Cluster Information System (CIS)].&lt;br /&gt;
&lt;br /&gt;
= Adding MATLAB to Your Environment =&lt;br /&gt;
&lt;br /&gt;
In order to check which versions of MATLAB are installed on the compute cluster, run the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ module avail math/matlab&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In general, several MATLAB versions should be returned.&lt;br /&gt;
The default version can be accessed by loading the appropriate module:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ module load math/matlab&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Other MATLAB versions (if available) can be loaded according to:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ module load math/matlab/&amp;lt;version&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
with &amp;lt;version&amp;gt; specifying the desired version.&lt;br /&gt;
&lt;br /&gt;
An interactive MATLAB session with graphical user interface (GUI) can be started with the command (requires X11 forwarding enabled for your ssh login):&lt;br /&gt;
&amp;lt;pre&amp;gt;$ matlab&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since graphics rendering can be very slow on remote connections, the preferable way is to run the MATLAB command line interface without GUI:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ matlab -nodisplay&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: It is not advisable to invoke an interactive MATLAB session on a login node of the cluster.&lt;br /&gt;
The recommended way to run a long-duration interactive MATLAB session is to submit an interactive job and start MATLAB from within the dedicated compute node assigned to you by the queueing system (consult the specific cluster users guide on how to submit interactive jobs).&lt;br /&gt;
&lt;br /&gt;
The following command will execute a MATLAB script or function named &amp;quot;example&amp;quot; on a single thread:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ matlab -nodisplay -singleCompThread -r example &amp;gt; result.out 2&amp;gt;&amp;amp;1&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The output of this session will be redirected to the file result.out. The option &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;-r&amp;lt;/span&amp;gt; executes the MATLAB statement non-interactively. The option &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;-singleCompThread&amp;lt;/span&amp;gt; limits MATLAB to single computational thread. Most of the time, running MATLAB in single-threaded mode will meet your needs. But if you have mathematically intense computations that benefit from the built-in multithreading provided by MATLAB&#039;s BLAS and FFT implementation, then you can experiment with running in multi-threaded mode by omitting this option (see section 4.1 - Implicit Threading).&lt;br /&gt;
&lt;br /&gt;
As with all processes that require more than a few minutes to run, non-trivial MATLAB jobs must be submitted to the cluster queuing system. Example batch scripts are available in the directory pointed to by the environment variable &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;$MATLAB_EXA_DIR&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The help page of the MATLAB module provides more version specific information:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ module help math/matlab&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Parallel Computing Using MATLAB =&lt;br /&gt;
&lt;br /&gt;
Parallelization of MATLAB jobs is realized via the built-in multithreading provided by MATLAB&#039;s BLAS and FFT implementation and the parallel computing functionality of MATLAB&#039;s Parallel Computing Toolbox (PCT). The MATLAB Parallel/Distributed Computing Server is not available on the bwHPC-Clusters.&lt;br /&gt;
&lt;br /&gt;
== Implicit Threading ==&lt;br /&gt;
&lt;br /&gt;
A large number of built-in MATLAB functions may utilize multiple cores automatically without any code modifications required. This is referred to as implicit multithreading and must be strictly distinguished from explicit parallelism provided by the Parallel Computing Toolbox (PCT) which requires specific commands in your code in order to create threads.&lt;br /&gt;
&lt;br /&gt;
Implicit threading particularly takes place for linear algebra operations (such as the solution to a linear system A\b or matrix products A*B) and FFT operations. Many other high-level MATLAB functions do also benefit from multithreading capabilities of their underlying routines. However, the user can still enforce single-threaded mode by adding the command line option &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;-singleCompThread&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Whenever implicit threading takes place, MATLAB will detect the total number of cores that exist on a machine and by default makes use of all of them. This has very important implications for MATLAB jobs in HPC environments with shared-node job scheduling policy (i.e. with multiple users sharing one compute node). Due to this behaviour, a MATLAB job may take over more compute resources than assigned by the queueing system of the cluster (and thereby taking away these resources from all other users with running jobs on the same node - including your own jobs).&lt;br /&gt;
&lt;br /&gt;
Therefore, when running in multi-threaded mode, MATLAB always requires the user&#039;s intervention to not allocate all cores of the machine (unless requested so from the queueing system). The number of threads must be controlled from within the code by means of the &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;maxNumCompThreads(N)&amp;lt;/span&amp;gt; function (which is supposed to be deprecated) or, alternatively, with the &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;feature(&#039;numThreads&#039;, N)&amp;lt;/span&amp;gt; function (which is currently undocumented).&lt;br /&gt;
&lt;br /&gt;
== Using the Parallel Computing Toolbox (PCT) ==&lt;br /&gt;
&lt;br /&gt;
By using the PCT one can make explicit use of several cores on multicore processors to parallelize MATLAB applications without MPI programming. Under MATLAB version 8.4 and earlier, this toolbox provides 12 workers (MATLAB computational engines) to execute applications locally on a single multicore node. Under MATLAB version 8.5 and later, the number of workers available is equal to the number of cores on a single node (up to a maximum of 512).&lt;br /&gt;
&lt;br /&gt;
If multiple PCT jobs are running at the same time, they all write temporary MATLAB job information to the same location. This race condition can cause one or more of the parallel MATLAB jobs fail to use the parallel functionality of the toolbox.&lt;br /&gt;
&lt;br /&gt;
To solve this issue, each MATLAB job should explicitly set a unique location where these files are created. This can be accomplished by the following snippet of code added to your MATLAB script.&lt;br /&gt;
&lt;br /&gt;
{{bwFrameA|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;Matlab&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
% create a local cluster object&lt;br /&gt;
pc = parcluster(&#039;local&#039;)&lt;br /&gt;
&lt;br /&gt;
% get the number of dedicated cores from environment&lt;br /&gt;
num_workers = str2num(getenv(&#039;SLURM_NPROCS&#039;))&lt;br /&gt;
&lt;br /&gt;
% explicitly set the JobStorageLocation to the tmp directory that is unique to each cluster job (and is on local, fast scratch)&lt;br /&gt;
parpool_tmpdir = [getenv(&#039;TMP&#039;),&#039;/.matlab/local_cluster_jobs/slurm_jobID_&#039;,getenv(&#039;SLURM_JOB_ID&#039;)]&lt;br /&gt;
mkdir(parpool_tmpdir)&lt;br /&gt;
pc.JobStorageLocation = parpool_tmpdir&lt;br /&gt;
&lt;br /&gt;
% start the parallel pool&lt;br /&gt;
parpool(pc,num_workers)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Note: The code snippet also sets the correct number of parallel workers in MATLAB according to the total number of processes dedicated to the job given by the environment variable &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;$SLURM_NPROCS&amp;lt;/span&amp;gt; in the job submission file.&lt;br /&gt;
&lt;br /&gt;
= General Performance Tips for MATLAB =&lt;br /&gt;
&lt;br /&gt;
MATLAB data structures (arrays or matrices) are dynamic in size, i.e. MATLAB will automatically resize the structure on demand. Although this seems to be convenient, MATLAB continually needs to allocate a new chunk of memory and copy over the data to the new block of memory as the array or matrix grows in a loop. This may take a significant amount of extra time during execution of the program.&lt;br /&gt;
&lt;br /&gt;
Code performance can often be drastically improved by preallocating memory for the final expected size of the array or matrix before actually starting the processing loop. In order to preallocate an array of strings, you can use MATLAB&#039;s build-in cell function. In order to preallocate an array or matrix of numbers, you can use MATLAB&#039;s build-in zeros function.&lt;br /&gt;
&lt;br /&gt;
The performance benefit of preallocation is illustrated with the following example code.&lt;br /&gt;
&lt;br /&gt;
{{bwFrameA|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;Matlab&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
% prealloc.m&lt;br /&gt;
&lt;br /&gt;
clear all;&lt;br /&gt;
&lt;br /&gt;
num=10000000;&lt;br /&gt;
&lt;br /&gt;
disp(&#039;Without preallocation:&#039;)&lt;br /&gt;
tic&lt;br /&gt;
for i=1:num&lt;br /&gt;
    a(i)=i;&lt;br /&gt;
end&lt;br /&gt;
toc&lt;br /&gt;
&lt;br /&gt;
disp(&#039;With preallocation:&#039;)&lt;br /&gt;
tic&lt;br /&gt;
b=zeros(1,num);&lt;br /&gt;
for i=1:num&lt;br /&gt;
    b(i)=i;&lt;br /&gt;
end&lt;br /&gt;
toc&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
On a compute node, the result may look like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Without preallocation:&lt;br /&gt;
Elapsed time is 2.879446 seconds.&lt;br /&gt;
With preallocation:&lt;br /&gt;
Elapsed time is 0.097557 seconds.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please recognize that the code runs almost 30 times faster with preallocation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[[Category:Mathematics software]]&lt;br /&gt;
[[Category:BwUniCluster_2.0]]&lt;br /&gt;
[[Category:BwForCluster_BinAC]]&lt;br /&gt;
[[Category:BwForCluster_MLS&amp;amp;WISO_Production]]&lt;br /&gt;
[[Category:BwForCluster_Chemistry]]&lt;br /&gt;
[[Category:BwForCluster_JUSTUS_2]]&lt;/div&gt;</summary>
		<author><name>F Wagner</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=Development/FFTW&amp;diff=8798</id>
		<title>Development/FFTW</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=Development/FFTW&amp;diff=8798"/>
		<updated>2021-06-07T14:22:58Z</updated>

		<summary type="html">&lt;p&gt;F Wagner: &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;
| Availability&lt;br /&gt;
| [[bwUniCluster_2.0]] &amp;amp;#124; [[BwForCluster_JUSTUS_2]] &amp;amp;#124; [[BwForCluster_BinAC]] &amp;amp;#124; [[BwForCluster_MLS&amp;amp;WISO_Production]]&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://www.fftw.org/ FFTW Homepage]&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;
&lt;br /&gt;
The &#039;&#039;&#039;Fastest Fourier Transform in the West (FFTW)&#039;&#039;&#039; is a software library for computing discrete Fourier transforms 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). FFTW was developed by Matteo Frigo and Steven G. Johnson at the Massachusetts Institute of Technology.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;Intel Math Kernel Library (Intel MKL)&#039;&#039;&#039; offers FFTW2 (for version 2.x) and FFTW3 (for version 3.x) interfaces to the Intel MKL Fast Fourier Transform and Trigonometric Transform functionality. These interfaces enable applications using FFTW to gain performance with Intel MKL without changing the application source code. Therefore, it is highly recommended to use Intel MKL instead of a separate FFTW installation.&lt;br /&gt;
&lt;br /&gt;
= Availability =&lt;br /&gt;
&lt;br /&gt;
Intel MKL is available on selected bwHPC-Clusters. A complete list of versions currently installed on the bwHPC-Clusters can be obtained from the [https://www.bwhpc.de/software.html Cluster Information System (CIS)].&lt;br /&gt;
&lt;br /&gt;
In order to check which versions of Intel MKL are installed on the compute cluster, run the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module avail numlib/mkl&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Documentation =&lt;br /&gt;
&lt;br /&gt;
A documentation for Intel MKL is available [https://software.intel.com/content/www/us/en/develop/articles/intel-math-kernel-library-documentation.html online].&lt;br /&gt;
&lt;br /&gt;
The help page of the Intel MKL module provides more version specific information:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module help numlib/mkl&lt;br /&gt;
&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;
[...]&lt;br /&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;
&lt;br /&gt;
[...]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
After loading the module, the environment variable &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;$MKL_DOC_DIR&amp;lt;/span&amp;gt; points to the local documentation folder.&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 Intel MKL with the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load numlib/mkl&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The module will try to load all modules it needs to function (e.g., compiler, mpi, ...). If loading the module fails, check if you have already loaded one of those modules, but not in the version required by MKL.&lt;br /&gt;
&lt;br /&gt;
If you wish to load another (older) version of Intel MKL, you can do so using&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load numlib/mkl/&amp;lt;version&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
with &amp;lt;version&amp;gt; specifying the desired version.&lt;br /&gt;
&lt;br /&gt;
== FFTW Interface to Intel MKL ==&lt;br /&gt;
&lt;br /&gt;
To include the proper header files use the compiler option&lt;br /&gt;
 -I${MKL_INC_DIR}/fftw&lt;br /&gt;
&lt;br /&gt;
If you want to link dynamically against the FFTW functions you can just use the flag&lt;br /&gt;
 -mkl&lt;br /&gt;
&lt;br /&gt;
but when using static linking you have to link against the correct library in the directory &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;$MKL_HOME/interfaces/&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you need any assistance, please feel free to contact &#039;compchem [at] bwhpc.de&#039; or submit a trouble ticket at https://www.bwhpc.de/supportportal.&lt;br /&gt;
&lt;br /&gt;
= Examples =&lt;br /&gt;
&lt;br /&gt;
Consider the following FFTW task and create source code file &#039;fftw3-test.c&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
 * fftw test -- double precision&lt;br /&gt;
 *&lt;br /&gt;
 * icc -std=c99 fftw3-test.c -o example -mkl -I${MKL_INC_DIR}/fftw&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;fftw3.h&amp;gt;&lt;br /&gt;
#define N 8&lt;br /&gt;
&lt;br /&gt;
int main(int argc, char *argv[])&lt;br /&gt;
{&lt;br /&gt;
    double in1[] = { 0.00000, 0.12467, 0.24740, 0.36627,&lt;br /&gt;
                     0.47943, 0.58510, 0.68164, 0.76754&lt;br /&gt;
    };&lt;br /&gt;
&lt;br /&gt;
    double in2[N];&lt;br /&gt;
&lt;br /&gt;
    fftw_complex  out[N / 2 + 1];&lt;br /&gt;
    fftw_plan     p1, p2;&lt;br /&gt;
&lt;br /&gt;
    p1 = fftw_plan_dft_r2c_1d(N, in1, out, FFTW_ESTIMATE);&lt;br /&gt;
    p2 = fftw_plan_dft_c2r_1d(N, out, in2, FFTW_ESTIMATE);&lt;br /&gt;
&lt;br /&gt;
    fftw_execute(p1);&lt;br /&gt;
    fftw_execute(p2);&lt;br /&gt;
&lt;br /&gt;
    for (int i = 0; i &amp;lt; N; i++) {&lt;br /&gt;
          printf(&amp;quot;%2d %15.10f %15.10f\n&amp;quot;, i, in1[i], in2[i] / N);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    fftw_destroy_plan(p1);&lt;br /&gt;
    fftw_destroy_plan(p2);&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;
The code can be compiled and executed with the following commands: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load compiler/intel/19.1.2&lt;br /&gt;
$ module load numlib/mkl/2020.2&lt;br /&gt;
$ icc -std=c99 fftw3-test.c -o example -mkl -I${MKL_INC_DIR}/fftw&lt;br /&gt;
$ ./example&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Additional examples are located in &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;$MKLROOT/examples&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
= FAQ =&lt;br /&gt;
&lt;br /&gt;
[[File:comparison.png|right|border|300px|Copyright: KIZ (Ulm University)]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; Why does no separate FFTW module exist on the cluster?&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; MKL is more performant (see Figure on the right). Therefore, we would like to advice you that you use MKL and decided not to offer a separate FFTW installation.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; Why does my code complain about &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt; argument of type &amp;quot;long double *&amp;quot; is incompatible with parameter of type &amp;quot;double *&amp;quot; &amp;lt;/span&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; The interfaces do not support long double precision because Intel MKL FFT functions operate only on single- and double-precision floating point data types. For the very rare case that you need extended data types, please contact &#039;compchem [at] bwhpc.de&#039; or submit a trouble ticket at https://www.bwhpc.de/supportportal.&lt;br /&gt;
&lt;br /&gt;
= Useful links =&lt;br /&gt;
&lt;br /&gt;
* [https://software.intel.com/content/www/us/en/develop/articles/intel-math-kernel-library-documentation.html Documentation (english)]&lt;br /&gt;
* [https://de.wikipedia.org/wiki/Math_Kernel_Library Wikipedia article (german)]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Math_Kernel_Library Wikipedia article (english)]&lt;br /&gt;
----&lt;br /&gt;
[[Category:Numerical_libraries]][[Category:BwUniCluster]][[Category:BwUniCluster_2.0]][[Category:BwForCluster_Chemistry]][[Category:BwForCluster_JUSTUS_2]][[Category:BwForCluster_BinAC]][[Category:BwForCluster_MLS&amp;amp;WISO_Production]]&lt;/div&gt;</summary>
		<author><name>F Wagner</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=Development/FFTW&amp;diff=8797</id>
		<title>Development/FFTW</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=Development/FFTW&amp;diff=8797"/>
		<updated>2021-06-07T14:22:20Z</updated>

		<summary type="html">&lt;p&gt;F Wagner: /* Useful links */&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;
| Availability&lt;br /&gt;
| [[bwUniCluster_2.0]] &amp;amp;#124; [[BwForCluster_JUSTUS_2]]&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://www.fftw.org/ FFTW Homepage]&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;
&lt;br /&gt;
The &#039;&#039;&#039;Fastest Fourier Transform in the West (FFTW)&#039;&#039;&#039; is a software library for computing discrete Fourier transforms 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). FFTW was developed by Matteo Frigo and Steven G. Johnson at the Massachusetts Institute of Technology.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;Intel Math Kernel Library (Intel MKL)&#039;&#039;&#039; offers FFTW2 (for version 2.x) and FFTW3 (for version 3.x) interfaces to the Intel MKL Fast Fourier Transform and Trigonometric Transform functionality. These interfaces enable applications using FFTW to gain performance with Intel MKL without changing the application source code. Therefore, it is highly recommended to use Intel MKL instead of a separate FFTW installation.&lt;br /&gt;
&lt;br /&gt;
= Availability =&lt;br /&gt;
&lt;br /&gt;
Intel MKL is available on selected bwHPC-Clusters. A complete list of versions currently installed on the bwHPC-Clusters can be obtained from the [https://www.bwhpc.de/software.html Cluster Information System (CIS)].&lt;br /&gt;
&lt;br /&gt;
In order to check which versions of Intel MKL are installed on the compute cluster, run the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module avail numlib/mkl&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Documentation =&lt;br /&gt;
&lt;br /&gt;
A documentation for Intel MKL is available [https://software.intel.com/content/www/us/en/develop/articles/intel-math-kernel-library-documentation.html online].&lt;br /&gt;
&lt;br /&gt;
The help page of the Intel MKL module provides more version specific information:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module help numlib/mkl&lt;br /&gt;
&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;
[...]&lt;br /&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;
&lt;br /&gt;
[...]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
After loading the module, the environment variable &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;$MKL_DOC_DIR&amp;lt;/span&amp;gt; points to the local documentation folder.&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 Intel MKL with the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load numlib/mkl&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The module will try to load all modules it needs to function (e.g., compiler, mpi, ...). If loading the module fails, check if you have already loaded one of those modules, but not in the version required by MKL.&lt;br /&gt;
&lt;br /&gt;
If you wish to load another (older) version of Intel MKL, you can do so using&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load numlib/mkl/&amp;lt;version&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
with &amp;lt;version&amp;gt; specifying the desired version.&lt;br /&gt;
&lt;br /&gt;
== FFTW Interface to Intel MKL ==&lt;br /&gt;
&lt;br /&gt;
To include the proper header files use the compiler option&lt;br /&gt;
 -I${MKL_INC_DIR}/fftw&lt;br /&gt;
&lt;br /&gt;
If you want to link dynamically against the FFTW functions you can just use the flag&lt;br /&gt;
 -mkl&lt;br /&gt;
&lt;br /&gt;
but when using static linking you have to link against the correct library in the directory &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;$MKL_HOME/interfaces/&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you need any assistance, please feel free to contact &#039;compchem [at] bwhpc.de&#039; or submit a trouble ticket at https://www.bwhpc.de/supportportal.&lt;br /&gt;
&lt;br /&gt;
= Examples =&lt;br /&gt;
&lt;br /&gt;
Consider the following FFTW task and create source code file &#039;fftw3-test.c&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
 * fftw test -- double precision&lt;br /&gt;
 *&lt;br /&gt;
 * icc -std=c99 fftw3-test.c -o example -mkl -I${MKL_INC_DIR}/fftw&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;fftw3.h&amp;gt;&lt;br /&gt;
#define N 8&lt;br /&gt;
&lt;br /&gt;
int main(int argc, char *argv[])&lt;br /&gt;
{&lt;br /&gt;
    double in1[] = { 0.00000, 0.12467, 0.24740, 0.36627,&lt;br /&gt;
                     0.47943, 0.58510, 0.68164, 0.76754&lt;br /&gt;
    };&lt;br /&gt;
&lt;br /&gt;
    double in2[N];&lt;br /&gt;
&lt;br /&gt;
    fftw_complex  out[N / 2 + 1];&lt;br /&gt;
    fftw_plan     p1, p2;&lt;br /&gt;
&lt;br /&gt;
    p1 = fftw_plan_dft_r2c_1d(N, in1, out, FFTW_ESTIMATE);&lt;br /&gt;
    p2 = fftw_plan_dft_c2r_1d(N, out, in2, FFTW_ESTIMATE);&lt;br /&gt;
&lt;br /&gt;
    fftw_execute(p1);&lt;br /&gt;
    fftw_execute(p2);&lt;br /&gt;
&lt;br /&gt;
    for (int i = 0; i &amp;lt; N; i++) {&lt;br /&gt;
          printf(&amp;quot;%2d %15.10f %15.10f\n&amp;quot;, i, in1[i], in2[i] / N);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    fftw_destroy_plan(p1);&lt;br /&gt;
    fftw_destroy_plan(p2);&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;
The code can be compiled and executed with the following commands: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load compiler/intel/19.1.2&lt;br /&gt;
$ module load numlib/mkl/2020.2&lt;br /&gt;
$ icc -std=c99 fftw3-test.c -o example -mkl -I${MKL_INC_DIR}/fftw&lt;br /&gt;
$ ./example&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Additional examples are located in &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;$MKLROOT/examples&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
= FAQ =&lt;br /&gt;
&lt;br /&gt;
[[File:comparison.png|right|border|300px|Copyright: KIZ (Ulm University)]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; Why does no separate FFTW module exist on the cluster?&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; MKL is more performant (see Figure on the right). Therefore, we would like to advice you that you use MKL and decided not to offer a separate FFTW installation.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; Why does my code complain about &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt; argument of type &amp;quot;long double *&amp;quot; is incompatible with parameter of type &amp;quot;double *&amp;quot; &amp;lt;/span&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; The interfaces do not support long double precision because Intel MKL FFT functions operate only on single- and double-precision floating point data types. For the very rare case that you need extended data types, please contact &#039;compchem [at] bwhpc.de&#039; or submit a trouble ticket at https://www.bwhpc.de/supportportal.&lt;br /&gt;
&lt;br /&gt;
= Useful links =&lt;br /&gt;
&lt;br /&gt;
* [https://software.intel.com/content/www/us/en/develop/articles/intel-math-kernel-library-documentation.html Documentation (english)]&lt;br /&gt;
* [https://de.wikipedia.org/wiki/Math_Kernel_Library Wikipedia article (german)]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Math_Kernel_Library Wikipedia article (english)]&lt;br /&gt;
----&lt;br /&gt;
[[Category:Numerical_libraries]][[Category:BwUniCluster]][[Category:BwUniCluster_2.0]][[Category:BwForCluster_Chemistry]][[Category:BwForCluster_JUSTUS_2]][[Category:BwForCluster_BinAC]][[Category:BwForCluster_MLS&amp;amp;WISO_Production]]&lt;/div&gt;</summary>
		<author><name>F Wagner</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=Development/GSL&amp;diff=8796</id>
		<title>Development/GSL</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=Development/GSL&amp;diff=8796"/>
		<updated>2021-06-07T14:19:38Z</updated>

		<summary type="html">&lt;p&gt;F Wagner: /* Useful links */&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/gsl&lt;br /&gt;
|-&lt;br /&gt;
| Availability&lt;br /&gt;
| [[bwUniCluster_2.0]] &amp;amp;#124; [[BwForCluster_JUSTUS_2]] &amp;amp;#124; [[BwForCluster_BinAC]] &amp;amp;#124; [[BwForCluster_MLS&amp;amp;WISO_Production]]&lt;br /&gt;
|-&lt;br /&gt;
| License&lt;br /&gt;
| [http://www.gnu.org/copyleft/gpl.html GNU General Public License (GPL)]&lt;br /&gt;
|-&lt;br /&gt;
|Citing&lt;br /&gt;
| &amp;lt;small&amp;gt;&amp;lt;small&amp;gt;&amp;lt;pre&amp;gt;M. Galassi et al., GNU Scientific Library Reference Manual (3rd Ed.), ISBN 0954612078.&amp;lt;/pre&amp;gt;&amp;lt;/small&amp;gt;&amp;lt;/small&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Links&lt;br /&gt;
| [https://www.gnu.org/software/gsl/ Homepage] &amp;amp;#124; [https://www.gnu.org/software/gsl/doc/html/index.html Documentation]&lt;br /&gt;
|-&lt;br /&gt;
| Graphical Interface&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
= Description =&lt;br /&gt;
The &#039;&#039;&#039;GNU Scientific Library&#039;&#039;&#039; (&#039;&#039;&#039;GSL&#039;&#039;&#039;) is a software library for numerical computations in applied mathematics and science. GSL is written in C, but bindings exist for other programming languages as well. The library provides a wide range of mathematical routines such as random number generators, special functions and least-squares fitting. There are over 1000 functions in total with an extensive test suite.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The complete range of subject areas covered by the library:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;bull; Complex Numbers &amp;amp;bull; Roots of Polynomials &amp;amp;bull; Special Functions &amp;amp;bull; Vectors and Matrices &amp;amp;bull; Permutations &amp;amp;bull; Sorting &amp;amp;bull; BLAS Support &amp;amp;bull; Linear Algebra &amp;amp;bull; Eigensystems &amp;amp;bull; Fast Fourier Transforms &amp;amp;bull; Quadrature &amp;amp;bull; Random Numbers &amp;amp;bull; Quasi-Random Sequences &amp;amp;bull; Random Distributions &amp;amp;bull; Statistics &amp;amp;bull; Histograms &amp;amp;bull; N-Tuples &amp;amp;bull; Monte Carlo Integration &amp;amp;bull; Simulated Annealing &amp;amp;bull; Differential Equations &amp;amp;bull; Interpolation &amp;amp;bull; Numerical Differentiation &amp;amp;bull; Chebyshev Approximation &amp;amp;bull; Series Acceleration &amp;amp;bull; Discrete Hankel Transforms &amp;amp;bull; Root-Finding &amp;amp;bull; Minimization &amp;amp;bull; Least-Squares Fitting &amp;amp;bull; Physical Constants &amp;amp;bull; IEEE Floating-Point &amp;amp;bull; Discrete Wavelet Transforms &amp;amp;bull; Basis splines &amp;amp;bull; Running Statistics &amp;amp;bull; Sparse Matrices and Linear Algebra&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Availability =&lt;br /&gt;
&lt;br /&gt;
GSL is available on selected bwHPC-Clusters. A complete list of versions currently installed on the bwHPC-Clusters can be obtained from the [https://www.bwhpc.de/software.html Cluster Information System (CIS)].&lt;br /&gt;
&lt;br /&gt;
In order to check which versions of GSL are installed on the compute cluster, run the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module avail numlib/gsl&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Documentation =&lt;br /&gt;
&lt;br /&gt;
A documentation for GSL is available [https://www.gnu.org/software/gsl/doc/html/index.html online].&lt;br /&gt;
&lt;br /&gt;
The help page of the GSL module provides more version specific information:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module help numlib/gsl&lt;br /&gt;
&lt;br /&gt;
----------- Module Specific Help for &#039;numlib/gsl/2.6&#039; ----------&lt;br /&gt;
This module sets the path and environment variables for GSL-2.6.&lt;br /&gt;
 &lt;br /&gt;
 The library has been compiled with GNU compiler 8.3 using the following optimization flags:&lt;br /&gt;
 &lt;br /&gt;
  -O3 -funroll-loops -march=native -mtune=native&lt;br /&gt;
 &lt;br /&gt;
 Online-Documentation: $GSL_WWW&lt;br /&gt;
 &lt;br /&gt;
 Local-Documentation: $GSL_DOC_DIR&lt;br /&gt;
 &lt;br /&gt;
 Code Examples: $GSL_EXA_DIR&lt;br /&gt;
 &lt;br /&gt;
 Tips for compiling and linking:&lt;br /&gt;
 &lt;br /&gt;
 After having loaded the environment module, you can use several environment variables to&lt;br /&gt;
 compile and link your application with the GSL library.&lt;br /&gt;
 &lt;br /&gt;
 Your source code should contain preprocessor include statements with a gsl/prefix, such as&lt;br /&gt;
 &lt;br /&gt;
  #include &amp;lt;gsl/gsl_math.h&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 A typical compilation command for a source file example.c with the GNU C compiler gcc is&lt;br /&gt;
 &lt;br /&gt;
  gcc -Wall -I\$GSL_INC_DIR -c example.c&lt;br /&gt;
 &lt;br /&gt;
 The GSL_INC_DIR environment variable points to the location of the include path for the GSL header files.&lt;br /&gt;
 &lt;br /&gt;
 The following command can be used to link the application with the GSL library:&lt;br /&gt;
 &lt;br /&gt;
  gcc -L\$GSL_LIB_DIR -o example example.o -lgsl -lgslcblas -lm&lt;br /&gt;
&lt;br /&gt;
 The GSL_LIB_DIR environment variable points to the location of the GSL library.&lt;br /&gt;
 &lt;br /&gt;
 In case of problems, submit a trouble ticket at &#039;https://bw-support.scc.kit.edu&#039;.&lt;br /&gt;
 &lt;br /&gt;
 The full version is: numlib/gsl/2.6&lt;br /&gt;
&amp;lt;/pre&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 GSL with the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load numlib/gsl&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The module will try to load all modules it needs to function (e.g., compiler, mpi, ...). If loading the module fails, check if you have already loaded one of those modules, but not in the version required by GSL.&lt;br /&gt;
&lt;br /&gt;
If you wish to load another (older) version of GSL, you can do so using&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load numlib/gsl/&amp;lt;version&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
with &amp;lt;version&amp;gt; specifying the desired version.&lt;br /&gt;
&lt;br /&gt;
== How to use GSL ==&lt;br /&gt;
&lt;br /&gt;
A man page is available and can be accessed by typing&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ man gsl&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Includes ===&lt;br /&gt;
&lt;br /&gt;
Your source code should contain preprocessor include statements with a gsl/prefix such as&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;#include &amp;lt;gsl/gsl_math.h&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Compile ===&lt;br /&gt;
&lt;br /&gt;
A typical compilation command for a source file &#039;example.c&#039; using the Intel C compiler icc is&lt;br /&gt;
&amp;lt;pre&amp;gt; $ icc -Wall -I$GSL_INC_DIR -c example.c &amp;lt;/pre&amp;gt;&lt;br /&gt;
The &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;$GSL_INC_DIR&amp;lt;/span&amp;gt; environment variable points to the location of the include path for the GSL header files.&lt;br /&gt;
&lt;br /&gt;
=== Link ===&lt;br /&gt;
&lt;br /&gt;
The following command can be used to link the application with the GSL libraries:&lt;br /&gt;
&amp;lt;pre&amp;gt; $ icc -L$GSL_LIB_DIR -o example example.o -lgsl -lgslcblas -lm &amp;lt;/pre&amp;gt;&lt;br /&gt;
The &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;$GSL_LIB_DIR&amp;lt;/span&amp;gt; environment variable points to the location of the GSL libraries.&lt;br /&gt;
Also make sure to have the GSL module loaded before running applications build with this library.&lt;br /&gt;
&lt;br /&gt;
= Examples =&lt;br /&gt;
&lt;br /&gt;
Consider the following GSL task and create source code file &#039;gsl-test.c&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;gsl/gsl_sf_bessel.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
int main (void)&lt;br /&gt;
{&lt;br /&gt;
  double x = 5.0;&lt;br /&gt;
  double y = gsl_sf_bessel_J0 (x);&lt;br /&gt;
  printf (&amp;quot;J0(%g) = %.18e\n&amp;quot;, x, y);&lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The code can be compiled and executed with the following commands: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load numlib/gsl/2.6-intel-19.1.2&lt;br /&gt;
$ icc -Wall -I$GSL_INC_DIR -c gsl-test.c&lt;br /&gt;
$ icc -L$GSL_LIB_DIR -o example gsl-test.o -lgsl -lgslcblas -lm&lt;br /&gt;
$ ./example&lt;br /&gt;
J0(5) = -1.775967713143382642e-01&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Useful links =&lt;br /&gt;
&lt;br /&gt;
* [https://www.gnu.org/software/gsl/doc/html/index.html Documentation (english)]&lt;br /&gt;
* [https://de.wikipedia.org/wiki/GNU_Scientific_Library Wikipedia article (german)]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/GNU_Scientific_Library Wikipedia article (english)]&lt;br /&gt;
----&lt;br /&gt;
[[Category: Numerical libraries]][[Category:BwUniCluster]][[Category:BwUniCluster_2.0]][[Category:BwForCluster_Chemistry]][[Category:BwForCluster_JUSTUS_2]][[Category:BwForCluster_BinAC]][[Category:BwForCluster_MLS&amp;amp;WISO_Production]]&lt;/div&gt;</summary>
		<author><name>F Wagner</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=Development/GSL&amp;diff=8795</id>
		<title>Development/GSL</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=Development/GSL&amp;diff=8795"/>
		<updated>2021-06-07T14:18:38Z</updated>

		<summary type="html">&lt;p&gt;F Wagner: &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/gsl&lt;br /&gt;
|-&lt;br /&gt;
| Availability&lt;br /&gt;
| [[bwUniCluster_2.0]] &amp;amp;#124; [[BwForCluster_JUSTUS_2]] &amp;amp;#124; [[BwForCluster_BinAC]] &amp;amp;#124; [[BwForCluster_MLS&amp;amp;WISO_Production]]&lt;br /&gt;
|-&lt;br /&gt;
| License&lt;br /&gt;
| [http://www.gnu.org/copyleft/gpl.html GNU General Public License (GPL)]&lt;br /&gt;
|-&lt;br /&gt;
|Citing&lt;br /&gt;
| &amp;lt;small&amp;gt;&amp;lt;small&amp;gt;&amp;lt;pre&amp;gt;M. Galassi et al., GNU Scientific Library Reference Manual (3rd Ed.), ISBN 0954612078.&amp;lt;/pre&amp;gt;&amp;lt;/small&amp;gt;&amp;lt;/small&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Links&lt;br /&gt;
| [https://www.gnu.org/software/gsl/ Homepage] &amp;amp;#124; [https://www.gnu.org/software/gsl/doc/html/index.html Documentation]&lt;br /&gt;
|-&lt;br /&gt;
| Graphical Interface&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
= Description =&lt;br /&gt;
The &#039;&#039;&#039;GNU Scientific Library&#039;&#039;&#039; (&#039;&#039;&#039;GSL&#039;&#039;&#039;) is a software library for numerical computations in applied mathematics and science. GSL is written in C, but bindings exist for other programming languages as well. The library provides a wide range of mathematical routines such as random number generators, special functions and least-squares fitting. There are over 1000 functions in total with an extensive test suite.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The complete range of subject areas covered by the library:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;bull; Complex Numbers &amp;amp;bull; Roots of Polynomials &amp;amp;bull; Special Functions &amp;amp;bull; Vectors and Matrices &amp;amp;bull; Permutations &amp;amp;bull; Sorting &amp;amp;bull; BLAS Support &amp;amp;bull; Linear Algebra &amp;amp;bull; Eigensystems &amp;amp;bull; Fast Fourier Transforms &amp;amp;bull; Quadrature &amp;amp;bull; Random Numbers &amp;amp;bull; Quasi-Random Sequences &amp;amp;bull; Random Distributions &amp;amp;bull; Statistics &amp;amp;bull; Histograms &amp;amp;bull; N-Tuples &amp;amp;bull; Monte Carlo Integration &amp;amp;bull; Simulated Annealing &amp;amp;bull; Differential Equations &amp;amp;bull; Interpolation &amp;amp;bull; Numerical Differentiation &amp;amp;bull; Chebyshev Approximation &amp;amp;bull; Series Acceleration &amp;amp;bull; Discrete Hankel Transforms &amp;amp;bull; Root-Finding &amp;amp;bull; Minimization &amp;amp;bull; Least-Squares Fitting &amp;amp;bull; Physical Constants &amp;amp;bull; IEEE Floating-Point &amp;amp;bull; Discrete Wavelet Transforms &amp;amp;bull; Basis splines &amp;amp;bull; Running Statistics &amp;amp;bull; Sparse Matrices and Linear Algebra&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Availability =&lt;br /&gt;
&lt;br /&gt;
GSL is available on selected bwHPC-Clusters. A complete list of versions currently installed on the bwHPC-Clusters can be obtained from the [https://www.bwhpc.de/software.html Cluster Information System (CIS)].&lt;br /&gt;
&lt;br /&gt;
In order to check which versions of GSL are installed on the compute cluster, run the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module avail numlib/gsl&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Documentation =&lt;br /&gt;
&lt;br /&gt;
A documentation for GSL is available [https://www.gnu.org/software/gsl/doc/html/index.html online].&lt;br /&gt;
&lt;br /&gt;
The help page of the GSL module provides more version specific information:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module help numlib/gsl&lt;br /&gt;
&lt;br /&gt;
----------- Module Specific Help for &#039;numlib/gsl/2.6&#039; ----------&lt;br /&gt;
This module sets the path and environment variables for GSL-2.6.&lt;br /&gt;
 &lt;br /&gt;
 The library has been compiled with GNU compiler 8.3 using the following optimization flags:&lt;br /&gt;
 &lt;br /&gt;
  -O3 -funroll-loops -march=native -mtune=native&lt;br /&gt;
 &lt;br /&gt;
 Online-Documentation: $GSL_WWW&lt;br /&gt;
 &lt;br /&gt;
 Local-Documentation: $GSL_DOC_DIR&lt;br /&gt;
 &lt;br /&gt;
 Code Examples: $GSL_EXA_DIR&lt;br /&gt;
 &lt;br /&gt;
 Tips for compiling and linking:&lt;br /&gt;
 &lt;br /&gt;
 After having loaded the environment module, you can use several environment variables to&lt;br /&gt;
 compile and link your application with the GSL library.&lt;br /&gt;
 &lt;br /&gt;
 Your source code should contain preprocessor include statements with a gsl/prefix, such as&lt;br /&gt;
 &lt;br /&gt;
  #include &amp;lt;gsl/gsl_math.h&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 A typical compilation command for a source file example.c with the GNU C compiler gcc is&lt;br /&gt;
 &lt;br /&gt;
  gcc -Wall -I\$GSL_INC_DIR -c example.c&lt;br /&gt;
 &lt;br /&gt;
 The GSL_INC_DIR environment variable points to the location of the include path for the GSL header files.&lt;br /&gt;
 &lt;br /&gt;
 The following command can be used to link the application with the GSL library:&lt;br /&gt;
 &lt;br /&gt;
  gcc -L\$GSL_LIB_DIR -o example example.o -lgsl -lgslcblas -lm&lt;br /&gt;
&lt;br /&gt;
 The GSL_LIB_DIR environment variable points to the location of the GSL library.&lt;br /&gt;
 &lt;br /&gt;
 In case of problems, submit a trouble ticket at &#039;https://bw-support.scc.kit.edu&#039;.&lt;br /&gt;
 &lt;br /&gt;
 The full version is: numlib/gsl/2.6&lt;br /&gt;
&amp;lt;/pre&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 GSL with the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load numlib/gsl&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The module will try to load all modules it needs to function (e.g., compiler, mpi, ...). If loading the module fails, check if you have already loaded one of those modules, but not in the version required by GSL.&lt;br /&gt;
&lt;br /&gt;
If you wish to load another (older) version of GSL, you can do so using&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load numlib/gsl/&amp;lt;version&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
with &amp;lt;version&amp;gt; specifying the desired version.&lt;br /&gt;
&lt;br /&gt;
== How to use GSL ==&lt;br /&gt;
&lt;br /&gt;
A man page is available and can be accessed by typing&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ man gsl&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Includes ===&lt;br /&gt;
&lt;br /&gt;
Your source code should contain preprocessor include statements with a gsl/prefix such as&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;#include &amp;lt;gsl/gsl_math.h&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Compile ===&lt;br /&gt;
&lt;br /&gt;
A typical compilation command for a source file &#039;example.c&#039; using the Intel C compiler icc is&lt;br /&gt;
&amp;lt;pre&amp;gt; $ icc -Wall -I$GSL_INC_DIR -c example.c &amp;lt;/pre&amp;gt;&lt;br /&gt;
The &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;$GSL_INC_DIR&amp;lt;/span&amp;gt; environment variable points to the location of the include path for the GSL header files.&lt;br /&gt;
&lt;br /&gt;
=== Link ===&lt;br /&gt;
&lt;br /&gt;
The following command can be used to link the application with the GSL libraries:&lt;br /&gt;
&amp;lt;pre&amp;gt; $ icc -L$GSL_LIB_DIR -o example example.o -lgsl -lgslcblas -lm &amp;lt;/pre&amp;gt;&lt;br /&gt;
The &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;$GSL_LIB_DIR&amp;lt;/span&amp;gt; environment variable points to the location of the GSL libraries.&lt;br /&gt;
Also make sure to have the GSL module loaded before running applications build with this library.&lt;br /&gt;
&lt;br /&gt;
= Examples =&lt;br /&gt;
&lt;br /&gt;
Consider the following GSL task and create source code file &#039;gsl-test.c&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;gsl/gsl_sf_bessel.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
int main (void)&lt;br /&gt;
{&lt;br /&gt;
  double x = 5.0;&lt;br /&gt;
  double y = gsl_sf_bessel_J0 (x);&lt;br /&gt;
  printf (&amp;quot;J0(%g) = %.18e\n&amp;quot;, x, y);&lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The code can be compiled and executed with the following commands: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load numlib/gsl/2.6-intel-19.1.2&lt;br /&gt;
$ icc -Wall -I$GSL_INC_DIR -c gsl-test.c&lt;br /&gt;
$ icc -L$GSL_LIB_DIR -o example gsl-test.o -lgsl -lgslcblas -lm&lt;br /&gt;
$ ./example&lt;br /&gt;
J0(5) = -1.775967713143382642e-01&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Useful links =&lt;br /&gt;
&lt;br /&gt;
* [https://www.gnu.org/software/gsl/doc/html/index.html Documentation (english)]&lt;br /&gt;
* [https://de.wikipedia.org/wiki/GNU_Scientific_Library Wikipedia article (german)]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/GNU_Scientific_Library Wikipedia article (english)]&lt;br /&gt;
----&lt;br /&gt;
[[Category: Numerical libraries]][[Category:BwUniCluster]][[Category:BwUniCluster_2.0]][[Category:BwForCluster_Chemistry]][[Category:BwForCluster_JUSTUS_2]]&lt;/div&gt;</summary>
		<author><name>F Wagner</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=Development/GSL&amp;diff=8793</id>
		<title>Development/GSL</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=Development/GSL&amp;diff=8793"/>
		<updated>2021-06-02T22:38:58Z</updated>

		<summary type="html">&lt;p&gt;F Wagner: /* How to use GSL */&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/gsl&lt;br /&gt;
|-&lt;br /&gt;
| Availability&lt;br /&gt;
| [[bwUniCluster_2.0]] &amp;amp;#124; [[BwForCluster_JUSTUS_2]]&lt;br /&gt;
|-&lt;br /&gt;
| License&lt;br /&gt;
| [http://www.gnu.org/copyleft/gpl.html GNU General Public License (GPL)]&lt;br /&gt;
|-&lt;br /&gt;
|Citing&lt;br /&gt;
| &amp;lt;small&amp;gt;&amp;lt;small&amp;gt;&amp;lt;pre&amp;gt;M. Galassi et al., GNU Scientific Library Reference Manual (3rd Ed.), ISBN 0954612078.&amp;lt;/pre&amp;gt;&amp;lt;/small&amp;gt;&amp;lt;/small&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Links&lt;br /&gt;
| [https://www.gnu.org/software/gsl/ Homepage] &amp;amp;#124; [https://www.gnu.org/software/gsl/doc/html/index.html Documentation]&lt;br /&gt;
|-&lt;br /&gt;
| Graphical Interface&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
= Description =&lt;br /&gt;
The &#039;&#039;&#039;GNU Scientific Library&#039;&#039;&#039; (&#039;&#039;&#039;GSL&#039;&#039;&#039;) is a software library for numerical computations in applied mathematics and science. GSL is written in C, but bindings exist for other programming languages as well. The library provides a wide range of mathematical routines such as random number generators, special functions and least-squares fitting. There are over 1000 functions in total with an extensive test suite.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The complete range of subject areas covered by the library:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;bull; Complex Numbers &amp;amp;bull; Roots of Polynomials &amp;amp;bull; Special Functions &amp;amp;bull; Vectors and Matrices &amp;amp;bull; Permutations &amp;amp;bull; Sorting &amp;amp;bull; BLAS Support &amp;amp;bull; Linear Algebra &amp;amp;bull; Eigensystems &amp;amp;bull; Fast Fourier Transforms &amp;amp;bull; Quadrature &amp;amp;bull; Random Numbers &amp;amp;bull; Quasi-Random Sequences &amp;amp;bull; Random Distributions &amp;amp;bull; Statistics &amp;amp;bull; Histograms &amp;amp;bull; N-Tuples &amp;amp;bull; Monte Carlo Integration &amp;amp;bull; Simulated Annealing &amp;amp;bull; Differential Equations &amp;amp;bull; Interpolation &amp;amp;bull; Numerical Differentiation &amp;amp;bull; Chebyshev Approximation &amp;amp;bull; Series Acceleration &amp;amp;bull; Discrete Hankel Transforms &amp;amp;bull; Root-Finding &amp;amp;bull; Minimization &amp;amp;bull; Least-Squares Fitting &amp;amp;bull; Physical Constants &amp;amp;bull; IEEE Floating-Point &amp;amp;bull; Discrete Wavelet Transforms &amp;amp;bull; Basis splines &amp;amp;bull; Running Statistics &amp;amp;bull; Sparse Matrices and Linear Algebra&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Availability =&lt;br /&gt;
&lt;br /&gt;
GSL is available on selected bwHPC-Clusters. A complete list of versions currently installed on the bwHPC-Clusters can be obtained from the [https://www.bwhpc.de/software.html Cluster Information System (CIS)].&lt;br /&gt;
&lt;br /&gt;
In order to check which versions of GSL are installed on the compute cluster, run the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module avail numlib/gsl&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Documentation =&lt;br /&gt;
&lt;br /&gt;
A documentation for GSL is available [https://www.gnu.org/software/gsl/doc/html/index.html online].&lt;br /&gt;
&lt;br /&gt;
The help page of the GSL module provides more version specific information:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module help numlib/gsl&lt;br /&gt;
&lt;br /&gt;
----------- Module Specific Help for &#039;numlib/gsl/2.6&#039; ----------&lt;br /&gt;
This module sets the path and environment variables for GSL-2.6.&lt;br /&gt;
 &lt;br /&gt;
 The library has been compiled with GNU compiler 8.3 using the following optimization flags:&lt;br /&gt;
 &lt;br /&gt;
  -O3 -funroll-loops -march=native -mtune=native&lt;br /&gt;
 &lt;br /&gt;
 Online-Documentation: $GSL_WWW&lt;br /&gt;
 &lt;br /&gt;
 Local-Documentation: $GSL_DOC_DIR&lt;br /&gt;
 &lt;br /&gt;
 Code Examples: $GSL_EXA_DIR&lt;br /&gt;
 &lt;br /&gt;
 Tips for compiling and linking:&lt;br /&gt;
 &lt;br /&gt;
 After having loaded the environment module, you can use several environment variables to&lt;br /&gt;
 compile and link your application with the GSL library.&lt;br /&gt;
 &lt;br /&gt;
 Your source code should contain preprocessor include statements with a gsl/prefix, such as&lt;br /&gt;
 &lt;br /&gt;
  #include &amp;lt;gsl/gsl_math.h&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 A typical compilation command for a source file example.c with the GNU C compiler gcc is&lt;br /&gt;
 &lt;br /&gt;
  gcc -Wall -I\$GSL_INC_DIR -c example.c&lt;br /&gt;
 &lt;br /&gt;
 The GSL_INC_DIR environment variable points to the location of the include path for the GSL header files.&lt;br /&gt;
 &lt;br /&gt;
 The following command can be used to link the application with the GSL library:&lt;br /&gt;
 &lt;br /&gt;
  gcc -L\$GSL_LIB_DIR -o example example.o -lgsl -lgslcblas -lm&lt;br /&gt;
&lt;br /&gt;
 The GSL_LIB_DIR environment variable points to the location of the GSL library.&lt;br /&gt;
 &lt;br /&gt;
 In case of problems, submit a trouble ticket at &#039;https://bw-support.scc.kit.edu&#039;.&lt;br /&gt;
 &lt;br /&gt;
 The full version is: numlib/gsl/2.6&lt;br /&gt;
&amp;lt;/pre&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 GSL with the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load numlib/gsl&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The module will try to load all modules it needs to function (e.g., compiler, mpi, ...). If loading the module fails, check if you have already loaded one of those modules, but not in the version required by GSL.&lt;br /&gt;
&lt;br /&gt;
If you wish to load another (older) version of GSL, you can do so using&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load numlib/gsl/&amp;lt;version&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
with &amp;lt;version&amp;gt; specifying the desired version.&lt;br /&gt;
&lt;br /&gt;
== How to use GSL ==&lt;br /&gt;
&lt;br /&gt;
A man page is available and can be accessed by typing&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ man gsl&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Includes ===&lt;br /&gt;
&lt;br /&gt;
Your source code should contain preprocessor include statements with a gsl/prefix such as&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;#include &amp;lt;gsl/gsl_math.h&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Compile ===&lt;br /&gt;
&lt;br /&gt;
A typical compilation command for a source file &#039;example.c&#039; using the Intel C compiler icc is&lt;br /&gt;
&amp;lt;pre&amp;gt; $ icc -Wall -I$GSL_INC_DIR -c example.c &amp;lt;/pre&amp;gt;&lt;br /&gt;
The &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;$GSL_INC_DIR&amp;lt;/span&amp;gt; environment variable points to the location of the include path for the GSL header files.&lt;br /&gt;
&lt;br /&gt;
=== Link ===&lt;br /&gt;
&lt;br /&gt;
The following command can be used to link the application with the GSL libraries:&lt;br /&gt;
&amp;lt;pre&amp;gt; $ icc -L$GSL_LIB_DIR -o example example.o -lgsl -lgslcblas -lm &amp;lt;/pre&amp;gt;&lt;br /&gt;
The &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;$GSL_LIB_DIR&amp;lt;/span&amp;gt; environment variable points to the location of the GSL libraries.&lt;br /&gt;
Also make sure to have the GSL module loaded before running applications build with this library.&lt;br /&gt;
&lt;br /&gt;
= Examples =&lt;br /&gt;
&lt;br /&gt;
Consider the following GSL task and create source code file &#039;gsl-test.c&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;gsl/gsl_sf_bessel.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
int main (void)&lt;br /&gt;
{&lt;br /&gt;
  double x = 5.0;&lt;br /&gt;
  double y = gsl_sf_bessel_J0 (x);&lt;br /&gt;
  printf (&amp;quot;J0(%g) = %.18e\n&amp;quot;, x, y);&lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The code can be compiled and executed with the following commands: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load numlib/gsl/2.6-intel-19.1.2&lt;br /&gt;
$ icc -Wall -I$GSL_INC_DIR -c gsl-test.c&lt;br /&gt;
$ icc -L$GSL_LIB_DIR -o example gsl-test.o -lgsl -lgslcblas -lm&lt;br /&gt;
$ ./example&lt;br /&gt;
J0(5) = -1.775967713143382642e-01&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Useful links =&lt;br /&gt;
&lt;br /&gt;
* [https://www.gnu.org/software/gsl/doc/html/index.html Documentation (english)]&lt;br /&gt;
* [https://de.wikipedia.org/wiki/GNU_Scientific_Library Wikipedia article (german)]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/GNU_Scientific_Library Wikipedia article (english)]&lt;br /&gt;
----&lt;br /&gt;
[[Category: Numerical libraries]][[Category:BwUniCluster]][[Category:BwUniCluster_2.0]][[Category:BwForCluster_Chemistry]][[Category:BwForCluster_JUSTUS_2]]&lt;/div&gt;</summary>
		<author><name>F Wagner</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=Development/GSL&amp;diff=8792</id>
		<title>Development/GSL</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=Development/GSL&amp;diff=8792"/>
		<updated>2021-06-02T22:38:21Z</updated>

		<summary type="html">&lt;p&gt;F Wagner: /* Link */&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/gsl&lt;br /&gt;
|-&lt;br /&gt;
| Availability&lt;br /&gt;
| [[bwUniCluster_2.0]] &amp;amp;#124; [[BwForCluster_JUSTUS_2]]&lt;br /&gt;
|-&lt;br /&gt;
| License&lt;br /&gt;
| [http://www.gnu.org/copyleft/gpl.html GNU General Public License (GPL)]&lt;br /&gt;
|-&lt;br /&gt;
|Citing&lt;br /&gt;
| &amp;lt;small&amp;gt;&amp;lt;small&amp;gt;&amp;lt;pre&amp;gt;M. Galassi et al., GNU Scientific Library Reference Manual (3rd Ed.), ISBN 0954612078.&amp;lt;/pre&amp;gt;&amp;lt;/small&amp;gt;&amp;lt;/small&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Links&lt;br /&gt;
| [https://www.gnu.org/software/gsl/ Homepage] &amp;amp;#124; [https://www.gnu.org/software/gsl/doc/html/index.html Documentation]&lt;br /&gt;
|-&lt;br /&gt;
| Graphical Interface&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
= Description =&lt;br /&gt;
The &#039;&#039;&#039;GNU Scientific Library&#039;&#039;&#039; (&#039;&#039;&#039;GSL&#039;&#039;&#039;) is a software library for numerical computations in applied mathematics and science. GSL is written in C, but bindings exist for other programming languages as well. The library provides a wide range of mathematical routines such as random number generators, special functions and least-squares fitting. There are over 1000 functions in total with an extensive test suite.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The complete range of subject areas covered by the library:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;bull; Complex Numbers &amp;amp;bull; Roots of Polynomials &amp;amp;bull; Special Functions &amp;amp;bull; Vectors and Matrices &amp;amp;bull; Permutations &amp;amp;bull; Sorting &amp;amp;bull; BLAS Support &amp;amp;bull; Linear Algebra &amp;amp;bull; Eigensystems &amp;amp;bull; Fast Fourier Transforms &amp;amp;bull; Quadrature &amp;amp;bull; Random Numbers &amp;amp;bull; Quasi-Random Sequences &amp;amp;bull; Random Distributions &amp;amp;bull; Statistics &amp;amp;bull; Histograms &amp;amp;bull; N-Tuples &amp;amp;bull; Monte Carlo Integration &amp;amp;bull; Simulated Annealing &amp;amp;bull; Differential Equations &amp;amp;bull; Interpolation &amp;amp;bull; Numerical Differentiation &amp;amp;bull; Chebyshev Approximation &amp;amp;bull; Series Acceleration &amp;amp;bull; Discrete Hankel Transforms &amp;amp;bull; Root-Finding &amp;amp;bull; Minimization &amp;amp;bull; Least-Squares Fitting &amp;amp;bull; Physical Constants &amp;amp;bull; IEEE Floating-Point &amp;amp;bull; Discrete Wavelet Transforms &amp;amp;bull; Basis splines &amp;amp;bull; Running Statistics &amp;amp;bull; Sparse Matrices and Linear Algebra&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Availability =&lt;br /&gt;
&lt;br /&gt;
GSL is available on selected bwHPC-Clusters. A complete list of versions currently installed on the bwHPC-Clusters can be obtained from the [https://www.bwhpc.de/software.html Cluster Information System (CIS)].&lt;br /&gt;
&lt;br /&gt;
In order to check which versions of GSL are installed on the compute cluster, run the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module avail numlib/gsl&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Documentation =&lt;br /&gt;
&lt;br /&gt;
A documentation for GSL is available [https://www.gnu.org/software/gsl/doc/html/index.html online].&lt;br /&gt;
&lt;br /&gt;
The help page of the GSL module provides more version specific information:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module help numlib/gsl&lt;br /&gt;
&lt;br /&gt;
----------- Module Specific Help for &#039;numlib/gsl/2.6&#039; ----------&lt;br /&gt;
This module sets the path and environment variables for GSL-2.6.&lt;br /&gt;
 &lt;br /&gt;
 The library has been compiled with GNU compiler 8.3 using the following optimization flags:&lt;br /&gt;
 &lt;br /&gt;
  -O3 -funroll-loops -march=native -mtune=native&lt;br /&gt;
 &lt;br /&gt;
 Online-Documentation: $GSL_WWW&lt;br /&gt;
 &lt;br /&gt;
 Local-Documentation: $GSL_DOC_DIR&lt;br /&gt;
 &lt;br /&gt;
 Code Examples: $GSL_EXA_DIR&lt;br /&gt;
 &lt;br /&gt;
 Tips for compiling and linking:&lt;br /&gt;
 &lt;br /&gt;
 After having loaded the environment module, you can use several environment variables to&lt;br /&gt;
 compile and link your application with the GSL library.&lt;br /&gt;
 &lt;br /&gt;
 Your source code should contain preprocessor include statements with a gsl/prefix, such as&lt;br /&gt;
 &lt;br /&gt;
  #include &amp;lt;gsl/gsl_math.h&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 A typical compilation command for a source file example.c with the GNU C compiler gcc is&lt;br /&gt;
 &lt;br /&gt;
  gcc -Wall -I\$GSL_INC_DIR -c example.c&lt;br /&gt;
 &lt;br /&gt;
 The GSL_INC_DIR environment variable points to the location of the include path for the GSL header files.&lt;br /&gt;
 &lt;br /&gt;
 The following command can be used to link the application with the GSL library:&lt;br /&gt;
 &lt;br /&gt;
  gcc -L\$GSL_LIB_DIR -o example example.o -lgsl -lgslcblas -lm&lt;br /&gt;
&lt;br /&gt;
 The GSL_LIB_DIR environment variable points to the location of the GSL library.&lt;br /&gt;
 &lt;br /&gt;
 In case of problems, submit a trouble ticket at &#039;https://bw-support.scc.kit.edu&#039;.&lt;br /&gt;
 &lt;br /&gt;
 The full version is: numlib/gsl/2.6&lt;br /&gt;
&amp;lt;/pre&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 GSL with the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load numlib/gsl&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The module will try to load all modules it needs to function (e.g., compiler, mpi, ...). If loading the module fails, check if you have already loaded one of those modules, but not in the version required by GSL.&lt;br /&gt;
&lt;br /&gt;
If you wish to load another (older) version of GSL, you can do so using&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load numlib/gsl/&amp;lt;version&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
with &amp;lt;version&amp;gt; specifying the desired version.&lt;br /&gt;
&lt;br /&gt;
== How to use GSL ==&lt;br /&gt;
&lt;br /&gt;
A man page is available and can be accessed by typing&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ man gsl&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Includes ===&lt;br /&gt;
&lt;br /&gt;
Your source code should contain preprocessor include statements with a gsl/prefix such as&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;#include &amp;lt;gsl/gsl_math.h&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Compile ===&lt;br /&gt;
&lt;br /&gt;
A typical compilation command for a source file &#039;example.c&#039; using the Intel C compiler icc is&lt;br /&gt;
&amp;lt;pre&amp;gt; $ icc -Wall -I$GSL_INC_DIR -c example.c &amp;lt;/pre&amp;gt;&lt;br /&gt;
The $GSL_INC_DIR environment variable points to the location of the include path for the GSL header files.&lt;br /&gt;
&lt;br /&gt;
=== Link ===&lt;br /&gt;
&lt;br /&gt;
The following command can be used to link the application with the GSL libraries:&lt;br /&gt;
&amp;lt;pre&amp;gt; $ icc -L$GSL_LIB_DIR -o example example.o -lgsl -lgslcblas -lm &amp;lt;/pre&amp;gt;&lt;br /&gt;
The &amp;lt;span style=&amp;quot;background:#edeae2;margin:2px;padding:1px;border:1px dotted #808080&amp;quot;&amp;gt;$GSL_LIB_DIR&amp;lt;/span&amp;gt; environment variable points to the location of the GSL libraries.&lt;br /&gt;
Also make sure to have the GSL module loaded before running applications build with this library.&lt;br /&gt;
&lt;br /&gt;
= Examples =&lt;br /&gt;
&lt;br /&gt;
Consider the following GSL task and create source code file &#039;gsl-test.c&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;gsl/gsl_sf_bessel.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
int main (void)&lt;br /&gt;
{&lt;br /&gt;
  double x = 5.0;&lt;br /&gt;
  double y = gsl_sf_bessel_J0 (x);&lt;br /&gt;
  printf (&amp;quot;J0(%g) = %.18e\n&amp;quot;, x, y);&lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The code can be compiled and executed with the following commands: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load numlib/gsl/2.6-intel-19.1.2&lt;br /&gt;
$ icc -Wall -I$GSL_INC_DIR -c gsl-test.c&lt;br /&gt;
$ icc -L$GSL_LIB_DIR -o example gsl-test.o -lgsl -lgslcblas -lm&lt;br /&gt;
$ ./example&lt;br /&gt;
J0(5) = -1.775967713143382642e-01&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Useful links =&lt;br /&gt;
&lt;br /&gt;
* [https://www.gnu.org/software/gsl/doc/html/index.html Documentation (english)]&lt;br /&gt;
* [https://de.wikipedia.org/wiki/GNU_Scientific_Library Wikipedia article (german)]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/GNU_Scientific_Library Wikipedia article (english)]&lt;br /&gt;
----&lt;br /&gt;
[[Category: Numerical libraries]][[Category:BwUniCluster]][[Category:BwUniCluster_2.0]][[Category:BwForCluster_Chemistry]][[Category:BwForCluster_JUSTUS_2]]&lt;/div&gt;</summary>
		<author><name>F Wagner</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=Development/GSL&amp;diff=8791</id>
		<title>Development/GSL</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=Development/GSL&amp;diff=8791"/>
		<updated>2021-06-02T22:36:02Z</updated>

		<summary type="html">&lt;p&gt;F Wagner: /* Compile */&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/gsl&lt;br /&gt;
|-&lt;br /&gt;
| Availability&lt;br /&gt;
| [[bwUniCluster_2.0]] &amp;amp;#124; [[BwForCluster_JUSTUS_2]]&lt;br /&gt;
|-&lt;br /&gt;
| License&lt;br /&gt;
| [http://www.gnu.org/copyleft/gpl.html GNU General Public License (GPL)]&lt;br /&gt;
|-&lt;br /&gt;
|Citing&lt;br /&gt;
| &amp;lt;small&amp;gt;&amp;lt;small&amp;gt;&amp;lt;pre&amp;gt;M. Galassi et al., GNU Scientific Library Reference Manual (3rd Ed.), ISBN 0954612078.&amp;lt;/pre&amp;gt;&amp;lt;/small&amp;gt;&amp;lt;/small&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Links&lt;br /&gt;
| [https://www.gnu.org/software/gsl/ Homepage] &amp;amp;#124; [https://www.gnu.org/software/gsl/doc/html/index.html Documentation]&lt;br /&gt;
|-&lt;br /&gt;
| Graphical Interface&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
= Description =&lt;br /&gt;
The &#039;&#039;&#039;GNU Scientific Library&#039;&#039;&#039; (&#039;&#039;&#039;GSL&#039;&#039;&#039;) is a software library for numerical computations in applied mathematics and science. GSL is written in C, but bindings exist for other programming languages as well. The library provides a wide range of mathematical routines such as random number generators, special functions and least-squares fitting. There are over 1000 functions in total with an extensive test suite.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The complete range of subject areas covered by the library:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;bull; Complex Numbers &amp;amp;bull; Roots of Polynomials &amp;amp;bull; Special Functions &amp;amp;bull; Vectors and Matrices &amp;amp;bull; Permutations &amp;amp;bull; Sorting &amp;amp;bull; BLAS Support &amp;amp;bull; Linear Algebra &amp;amp;bull; Eigensystems &amp;amp;bull; Fast Fourier Transforms &amp;amp;bull; Quadrature &amp;amp;bull; Random Numbers &amp;amp;bull; Quasi-Random Sequences &amp;amp;bull; Random Distributions &amp;amp;bull; Statistics &amp;amp;bull; Histograms &amp;amp;bull; N-Tuples &amp;amp;bull; Monte Carlo Integration &amp;amp;bull; Simulated Annealing &amp;amp;bull; Differential Equations &amp;amp;bull; Interpolation &amp;amp;bull; Numerical Differentiation &amp;amp;bull; Chebyshev Approximation &amp;amp;bull; Series Acceleration &amp;amp;bull; Discrete Hankel Transforms &amp;amp;bull; Root-Finding &amp;amp;bull; Minimization &amp;amp;bull; Least-Squares Fitting &amp;amp;bull; Physical Constants &amp;amp;bull; IEEE Floating-Point &amp;amp;bull; Discrete Wavelet Transforms &amp;amp;bull; Basis splines &amp;amp;bull; Running Statistics &amp;amp;bull; Sparse Matrices and Linear Algebra&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Availability =&lt;br /&gt;
&lt;br /&gt;
GSL is available on selected bwHPC-Clusters. A complete list of versions currently installed on the bwHPC-Clusters can be obtained from the [https://www.bwhpc.de/software.html Cluster Information System (CIS)].&lt;br /&gt;
&lt;br /&gt;
In order to check which versions of GSL are installed on the compute cluster, run the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module avail numlib/gsl&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Documentation =&lt;br /&gt;
&lt;br /&gt;
A documentation for GSL is available [https://www.gnu.org/software/gsl/doc/html/index.html online].&lt;br /&gt;
&lt;br /&gt;
The help page of the GSL module provides more version specific information:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module help numlib/gsl&lt;br /&gt;
&lt;br /&gt;
----------- Module Specific Help for &#039;numlib/gsl/2.6&#039; ----------&lt;br /&gt;
This module sets the path and environment variables for GSL-2.6.&lt;br /&gt;
 &lt;br /&gt;
 The library has been compiled with GNU compiler 8.3 using the following optimization flags:&lt;br /&gt;
 &lt;br /&gt;
  -O3 -funroll-loops -march=native -mtune=native&lt;br /&gt;
 &lt;br /&gt;
 Online-Documentation: $GSL_WWW&lt;br /&gt;
 &lt;br /&gt;
 Local-Documentation: $GSL_DOC_DIR&lt;br /&gt;
 &lt;br /&gt;
 Code Examples: $GSL_EXA_DIR&lt;br /&gt;
 &lt;br /&gt;
 Tips for compiling and linking:&lt;br /&gt;
 &lt;br /&gt;
 After having loaded the environment module, you can use several environment variables to&lt;br /&gt;
 compile and link your application with the GSL library.&lt;br /&gt;
 &lt;br /&gt;
 Your source code should contain preprocessor include statements with a gsl/prefix, such as&lt;br /&gt;
 &lt;br /&gt;
  #include &amp;lt;gsl/gsl_math.h&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 A typical compilation command for a source file example.c with the GNU C compiler gcc is&lt;br /&gt;
 &lt;br /&gt;
  gcc -Wall -I\$GSL_INC_DIR -c example.c&lt;br /&gt;
 &lt;br /&gt;
 The GSL_INC_DIR environment variable points to the location of the include path for the GSL header files.&lt;br /&gt;
 &lt;br /&gt;
 The following command can be used to link the application with the GSL library:&lt;br /&gt;
 &lt;br /&gt;
  gcc -L\$GSL_LIB_DIR -o example example.o -lgsl -lgslcblas -lm&lt;br /&gt;
&lt;br /&gt;
 The GSL_LIB_DIR environment variable points to the location of the GSL library.&lt;br /&gt;
 &lt;br /&gt;
 In case of problems, submit a trouble ticket at &#039;https://bw-support.scc.kit.edu&#039;.&lt;br /&gt;
 &lt;br /&gt;
 The full version is: numlib/gsl/2.6&lt;br /&gt;
&amp;lt;/pre&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 GSL with the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load numlib/gsl&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The module will try to load all modules it needs to function (e.g., compiler, mpi, ...). If loading the module fails, check if you have already loaded one of those modules, but not in the version required by GSL.&lt;br /&gt;
&lt;br /&gt;
If you wish to load another (older) version of GSL, you can do so using&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load numlib/gsl/&amp;lt;version&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
with &amp;lt;version&amp;gt; specifying the desired version.&lt;br /&gt;
&lt;br /&gt;
== How to use GSL ==&lt;br /&gt;
&lt;br /&gt;
A man page is available and can be accessed by typing&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ man gsl&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Includes ===&lt;br /&gt;
&lt;br /&gt;
Your source code should contain preprocessor include statements with a gsl/prefix such as&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;#include &amp;lt;gsl/gsl_math.h&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Compile ===&lt;br /&gt;
&lt;br /&gt;
A typical compilation command for a source file &#039;example.c&#039; using the Intel C compiler icc is&lt;br /&gt;
&amp;lt;pre&amp;gt; $ icc -Wall -I$GSL_INC_DIR -c example.c &amp;lt;/pre&amp;gt;&lt;br /&gt;
The $GSL_INC_DIR environment variable points to the location of the include path for the GSL header files.&lt;br /&gt;
&lt;br /&gt;
=== Link ===&lt;br /&gt;
&lt;br /&gt;
The following command can be used to link the application with the GSL libraries:&lt;br /&gt;
&amp;lt;pre&amp;gt; $ icc -L$GSL_LIB_DIR -o example example.o -lgsl -lgslcblas -lm &amp;lt;/pre&amp;gt;&lt;br /&gt;
The $GSL_LIB_DIR environment variable points to the location of the GSL libraries.&lt;br /&gt;
Also make sure to have the GSL module loaded before running applications build with this library.&lt;br /&gt;
&lt;br /&gt;
= Examples =&lt;br /&gt;
&lt;br /&gt;
Consider the following GSL task and create source code file &#039;gsl-test.c&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;gsl/gsl_sf_bessel.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
int main (void)&lt;br /&gt;
{&lt;br /&gt;
  double x = 5.0;&lt;br /&gt;
  double y = gsl_sf_bessel_J0 (x);&lt;br /&gt;
  printf (&amp;quot;J0(%g) = %.18e\n&amp;quot;, x, y);&lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The code can be compiled and executed with the following commands: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load numlib/gsl/2.6-intel-19.1.2&lt;br /&gt;
$ icc -Wall -I$GSL_INC_DIR -c gsl-test.c&lt;br /&gt;
$ icc -L$GSL_LIB_DIR -o example gsl-test.o -lgsl -lgslcblas -lm&lt;br /&gt;
$ ./example&lt;br /&gt;
J0(5) = -1.775967713143382642e-01&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Useful links =&lt;br /&gt;
&lt;br /&gt;
* [https://www.gnu.org/software/gsl/doc/html/index.html Documentation (english)]&lt;br /&gt;
* [https://de.wikipedia.org/wiki/GNU_Scientific_Library Wikipedia article (german)]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/GNU_Scientific_Library Wikipedia article (english)]&lt;br /&gt;
----&lt;br /&gt;
[[Category: Numerical libraries]][[Category:BwUniCluster]][[Category:BwUniCluster_2.0]][[Category:BwForCluster_Chemistry]][[Category:BwForCluster_JUSTUS_2]]&lt;/div&gt;</summary>
		<author><name>F Wagner</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=Development/GSL&amp;diff=8790</id>
		<title>Development/GSL</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=Development/GSL&amp;diff=8790"/>
		<updated>2021-06-02T22:35:28Z</updated>

		<summary type="html">&lt;p&gt;F Wagner: /* Compile */&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/gsl&lt;br /&gt;
|-&lt;br /&gt;
| Availability&lt;br /&gt;
| [[bwUniCluster_2.0]] &amp;amp;#124; [[BwForCluster_JUSTUS_2]]&lt;br /&gt;
|-&lt;br /&gt;
| License&lt;br /&gt;
| [http://www.gnu.org/copyleft/gpl.html GNU General Public License (GPL)]&lt;br /&gt;
|-&lt;br /&gt;
|Citing&lt;br /&gt;
| &amp;lt;small&amp;gt;&amp;lt;small&amp;gt;&amp;lt;pre&amp;gt;M. Galassi et al., GNU Scientific Library Reference Manual (3rd Ed.), ISBN 0954612078.&amp;lt;/pre&amp;gt;&amp;lt;/small&amp;gt;&amp;lt;/small&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Links&lt;br /&gt;
| [https://www.gnu.org/software/gsl/ Homepage] &amp;amp;#124; [https://www.gnu.org/software/gsl/doc/html/index.html Documentation]&lt;br /&gt;
|-&lt;br /&gt;
| Graphical Interface&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
= Description =&lt;br /&gt;
The &#039;&#039;&#039;GNU Scientific Library&#039;&#039;&#039; (&#039;&#039;&#039;GSL&#039;&#039;&#039;) is a software library for numerical computations in applied mathematics and science. GSL is written in C, but bindings exist for other programming languages as well. The library provides a wide range of mathematical routines such as random number generators, special functions and least-squares fitting. There are over 1000 functions in total with an extensive test suite.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The complete range of subject areas covered by the library:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;bull; Complex Numbers &amp;amp;bull; Roots of Polynomials &amp;amp;bull; Special Functions &amp;amp;bull; Vectors and Matrices &amp;amp;bull; Permutations &amp;amp;bull; Sorting &amp;amp;bull; BLAS Support &amp;amp;bull; Linear Algebra &amp;amp;bull; Eigensystems &amp;amp;bull; Fast Fourier Transforms &amp;amp;bull; Quadrature &amp;amp;bull; Random Numbers &amp;amp;bull; Quasi-Random Sequences &amp;amp;bull; Random Distributions &amp;amp;bull; Statistics &amp;amp;bull; Histograms &amp;amp;bull; N-Tuples &amp;amp;bull; Monte Carlo Integration &amp;amp;bull; Simulated Annealing &amp;amp;bull; Differential Equations &amp;amp;bull; Interpolation &amp;amp;bull; Numerical Differentiation &amp;amp;bull; Chebyshev Approximation &amp;amp;bull; Series Acceleration &amp;amp;bull; Discrete Hankel Transforms &amp;amp;bull; Root-Finding &amp;amp;bull; Minimization &amp;amp;bull; Least-Squares Fitting &amp;amp;bull; Physical Constants &amp;amp;bull; IEEE Floating-Point &amp;amp;bull; Discrete Wavelet Transforms &amp;amp;bull; Basis splines &amp;amp;bull; Running Statistics &amp;amp;bull; Sparse Matrices and Linear Algebra&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Availability =&lt;br /&gt;
&lt;br /&gt;
GSL is available on selected bwHPC-Clusters. A complete list of versions currently installed on the bwHPC-Clusters can be obtained from the [https://www.bwhpc.de/software.html Cluster Information System (CIS)].&lt;br /&gt;
&lt;br /&gt;
In order to check which versions of GSL are installed on the compute cluster, run the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module avail numlib/gsl&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Documentation =&lt;br /&gt;
&lt;br /&gt;
A documentation for GSL is available [https://www.gnu.org/software/gsl/doc/html/index.html online].&lt;br /&gt;
&lt;br /&gt;
The help page of the GSL module provides more version specific information:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module help numlib/gsl&lt;br /&gt;
&lt;br /&gt;
----------- Module Specific Help for &#039;numlib/gsl/2.6&#039; ----------&lt;br /&gt;
This module sets the path and environment variables for GSL-2.6.&lt;br /&gt;
 &lt;br /&gt;
 The library has been compiled with GNU compiler 8.3 using the following optimization flags:&lt;br /&gt;
 &lt;br /&gt;
  -O3 -funroll-loops -march=native -mtune=native&lt;br /&gt;
 &lt;br /&gt;
 Online-Documentation: $GSL_WWW&lt;br /&gt;
 &lt;br /&gt;
 Local-Documentation: $GSL_DOC_DIR&lt;br /&gt;
 &lt;br /&gt;
 Code Examples: $GSL_EXA_DIR&lt;br /&gt;
 &lt;br /&gt;
 Tips for compiling and linking:&lt;br /&gt;
 &lt;br /&gt;
 After having loaded the environment module, you can use several environment variables to&lt;br /&gt;
 compile and link your application with the GSL library.&lt;br /&gt;
 &lt;br /&gt;
 Your source code should contain preprocessor include statements with a gsl/prefix, such as&lt;br /&gt;
 &lt;br /&gt;
  #include &amp;lt;gsl/gsl_math.h&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 A typical compilation command for a source file example.c with the GNU C compiler gcc is&lt;br /&gt;
 &lt;br /&gt;
  gcc -Wall -I\$GSL_INC_DIR -c example.c&lt;br /&gt;
 &lt;br /&gt;
 The GSL_INC_DIR environment variable points to the location of the include path for the GSL header files.&lt;br /&gt;
 &lt;br /&gt;
 The following command can be used to link the application with the GSL library:&lt;br /&gt;
 &lt;br /&gt;
  gcc -L\$GSL_LIB_DIR -o example example.o -lgsl -lgslcblas -lm&lt;br /&gt;
&lt;br /&gt;
 The GSL_LIB_DIR environment variable points to the location of the GSL library.&lt;br /&gt;
 &lt;br /&gt;
 In case of problems, submit a trouble ticket at &#039;https://bw-support.scc.kit.edu&#039;.&lt;br /&gt;
 &lt;br /&gt;
 The full version is: numlib/gsl/2.6&lt;br /&gt;
&amp;lt;/pre&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 GSL with the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load numlib/gsl&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The module will try to load all modules it needs to function (e.g., compiler, mpi, ...). If loading the module fails, check if you have already loaded one of those modules, but not in the version required by GSL.&lt;br /&gt;
&lt;br /&gt;
If you wish to load another (older) version of GSL, you can do so using&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load numlib/gsl/&amp;lt;version&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
with &amp;lt;version&amp;gt; specifying the desired version.&lt;br /&gt;
&lt;br /&gt;
== How to use GSL ==&lt;br /&gt;
&lt;br /&gt;
A man page is available and can be accessed by typing&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ man gsl&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Includes ===&lt;br /&gt;
&lt;br /&gt;
Your source code should contain preprocessor include statements with a gsl/prefix such as&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;#include &amp;lt;gsl/gsl_math.h&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Compile ===&lt;br /&gt;
&lt;br /&gt;
A typical compilation command for a source file &#039;example.c&#039; using the Intel C compiler icc is&lt;br /&gt;
&amp;lt;pre&amp;gt; $ icc -Wall -I$GSL_INC_DIR -c example.c &amp;lt;/pre&amp;gt;&lt;br /&gt;
The $GSL_INC_DIR environment variable points to location of the include path for the GSL header files.&lt;br /&gt;
&lt;br /&gt;
=== Link ===&lt;br /&gt;
&lt;br /&gt;
The following command can be used to link the application with the GSL libraries:&lt;br /&gt;
&amp;lt;pre&amp;gt; $ icc -L$GSL_LIB_DIR -o example example.o -lgsl -lgslcblas -lm &amp;lt;/pre&amp;gt;&lt;br /&gt;
The $GSL_LIB_DIR environment variable points to the location of the GSL libraries.&lt;br /&gt;
Also make sure to have the GSL module loaded before running applications build with this library.&lt;br /&gt;
&lt;br /&gt;
= Examples =&lt;br /&gt;
&lt;br /&gt;
Consider the following GSL task and create source code file &#039;gsl-test.c&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;gsl/gsl_sf_bessel.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
int main (void)&lt;br /&gt;
{&lt;br /&gt;
  double x = 5.0;&lt;br /&gt;
  double y = gsl_sf_bessel_J0 (x);&lt;br /&gt;
  printf (&amp;quot;J0(%g) = %.18e\n&amp;quot;, x, y);&lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The code can be compiled and executed with the following commands: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load numlib/gsl/2.6-intel-19.1.2&lt;br /&gt;
$ icc -Wall -I$GSL_INC_DIR -c gsl-test.c&lt;br /&gt;
$ icc -L$GSL_LIB_DIR -o example gsl-test.o -lgsl -lgslcblas -lm&lt;br /&gt;
$ ./example&lt;br /&gt;
J0(5) = -1.775967713143382642e-01&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Useful links =&lt;br /&gt;
&lt;br /&gt;
* [https://www.gnu.org/software/gsl/doc/html/index.html Documentation (english)]&lt;br /&gt;
* [https://de.wikipedia.org/wiki/GNU_Scientific_Library Wikipedia article (german)]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/GNU_Scientific_Library Wikipedia article (english)]&lt;br /&gt;
----&lt;br /&gt;
[[Category: Numerical libraries]][[Category:BwUniCluster]][[Category:BwUniCluster_2.0]][[Category:BwForCluster_Chemistry]][[Category:BwForCluster_JUSTUS_2]]&lt;/div&gt;</summary>
		<author><name>F Wagner</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=Development/GSL&amp;diff=8789</id>
		<title>Development/GSL</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=Development/GSL&amp;diff=8789"/>
		<updated>2021-06-02T22:34:06Z</updated>

		<summary type="html">&lt;p&gt;F Wagner: /* How to use GSL */&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/gsl&lt;br /&gt;
|-&lt;br /&gt;
| Availability&lt;br /&gt;
| [[bwUniCluster_2.0]] &amp;amp;#124; [[BwForCluster_JUSTUS_2]]&lt;br /&gt;
|-&lt;br /&gt;
| License&lt;br /&gt;
| [http://www.gnu.org/copyleft/gpl.html GNU General Public License (GPL)]&lt;br /&gt;
|-&lt;br /&gt;
|Citing&lt;br /&gt;
| &amp;lt;small&amp;gt;&amp;lt;small&amp;gt;&amp;lt;pre&amp;gt;M. Galassi et al., GNU Scientific Library Reference Manual (3rd Ed.), ISBN 0954612078.&amp;lt;/pre&amp;gt;&amp;lt;/small&amp;gt;&amp;lt;/small&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Links&lt;br /&gt;
| [https://www.gnu.org/software/gsl/ Homepage] &amp;amp;#124; [https://www.gnu.org/software/gsl/doc/html/index.html Documentation]&lt;br /&gt;
|-&lt;br /&gt;
| Graphical Interface&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
= Description =&lt;br /&gt;
The &#039;&#039;&#039;GNU Scientific Library&#039;&#039;&#039; (&#039;&#039;&#039;GSL&#039;&#039;&#039;) is a software library for numerical computations in applied mathematics and science. GSL is written in C, but bindings exist for other programming languages as well. The library provides a wide range of mathematical routines such as random number generators, special functions and least-squares fitting. There are over 1000 functions in total with an extensive test suite.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The complete range of subject areas covered by the library:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;bull; Complex Numbers &amp;amp;bull; Roots of Polynomials &amp;amp;bull; Special Functions &amp;amp;bull; Vectors and Matrices &amp;amp;bull; Permutations &amp;amp;bull; Sorting &amp;amp;bull; BLAS Support &amp;amp;bull; Linear Algebra &amp;amp;bull; Eigensystems &amp;amp;bull; Fast Fourier Transforms &amp;amp;bull; Quadrature &amp;amp;bull; Random Numbers &amp;amp;bull; Quasi-Random Sequences &amp;amp;bull; Random Distributions &amp;amp;bull; Statistics &amp;amp;bull; Histograms &amp;amp;bull; N-Tuples &amp;amp;bull; Monte Carlo Integration &amp;amp;bull; Simulated Annealing &amp;amp;bull; Differential Equations &amp;amp;bull; Interpolation &amp;amp;bull; Numerical Differentiation &amp;amp;bull; Chebyshev Approximation &amp;amp;bull; Series Acceleration &amp;amp;bull; Discrete Hankel Transforms &amp;amp;bull; Root-Finding &amp;amp;bull; Minimization &amp;amp;bull; Least-Squares Fitting &amp;amp;bull; Physical Constants &amp;amp;bull; IEEE Floating-Point &amp;amp;bull; Discrete Wavelet Transforms &amp;amp;bull; Basis splines &amp;amp;bull; Running Statistics &amp;amp;bull; Sparse Matrices and Linear Algebra&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Availability =&lt;br /&gt;
&lt;br /&gt;
GSL is available on selected bwHPC-Clusters. A complete list of versions currently installed on the bwHPC-Clusters can be obtained from the [https://www.bwhpc.de/software.html Cluster Information System (CIS)].&lt;br /&gt;
&lt;br /&gt;
In order to check which versions of GSL are installed on the compute cluster, run the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module avail numlib/gsl&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Documentation =&lt;br /&gt;
&lt;br /&gt;
A documentation for GSL is available [https://www.gnu.org/software/gsl/doc/html/index.html online].&lt;br /&gt;
&lt;br /&gt;
The help page of the GSL module provides more version specific information:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module help numlib/gsl&lt;br /&gt;
&lt;br /&gt;
----------- Module Specific Help for &#039;numlib/gsl/2.6&#039; ----------&lt;br /&gt;
This module sets the path and environment variables for GSL-2.6.&lt;br /&gt;
 &lt;br /&gt;
 The library has been compiled with GNU compiler 8.3 using the following optimization flags:&lt;br /&gt;
 &lt;br /&gt;
  -O3 -funroll-loops -march=native -mtune=native&lt;br /&gt;
 &lt;br /&gt;
 Online-Documentation: $GSL_WWW&lt;br /&gt;
 &lt;br /&gt;
 Local-Documentation: $GSL_DOC_DIR&lt;br /&gt;
 &lt;br /&gt;
 Code Examples: $GSL_EXA_DIR&lt;br /&gt;
 &lt;br /&gt;
 Tips for compiling and linking:&lt;br /&gt;
 &lt;br /&gt;
 After having loaded the environment module, you can use several environment variables to&lt;br /&gt;
 compile and link your application with the GSL library.&lt;br /&gt;
 &lt;br /&gt;
 Your source code should contain preprocessor include statements with a gsl/prefix, such as&lt;br /&gt;
 &lt;br /&gt;
  #include &amp;lt;gsl/gsl_math.h&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 A typical compilation command for a source file example.c with the GNU C compiler gcc is&lt;br /&gt;
 &lt;br /&gt;
  gcc -Wall -I\$GSL_INC_DIR -c example.c&lt;br /&gt;
 &lt;br /&gt;
 The GSL_INC_DIR environment variable points to the location of the include path for the GSL header files.&lt;br /&gt;
 &lt;br /&gt;
 The following command can be used to link the application with the GSL library:&lt;br /&gt;
 &lt;br /&gt;
  gcc -L\$GSL_LIB_DIR -o example example.o -lgsl -lgslcblas -lm&lt;br /&gt;
&lt;br /&gt;
 The GSL_LIB_DIR environment variable points to the location of the GSL library.&lt;br /&gt;
 &lt;br /&gt;
 In case of problems, submit a trouble ticket at &#039;https://bw-support.scc.kit.edu&#039;.&lt;br /&gt;
 &lt;br /&gt;
 The full version is: numlib/gsl/2.6&lt;br /&gt;
&amp;lt;/pre&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 GSL with the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load numlib/gsl&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The module will try to load all modules it needs to function (e.g., compiler, mpi, ...). If loading the module fails, check if you have already loaded one of those modules, but not in the version required by GSL.&lt;br /&gt;
&lt;br /&gt;
If you wish to load another (older) version of GSL, you can do so using&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load numlib/gsl/&amp;lt;version&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
with &amp;lt;version&amp;gt; specifying the desired version.&lt;br /&gt;
&lt;br /&gt;
== How to use GSL ==&lt;br /&gt;
&lt;br /&gt;
A man page is available and can be accessed by typing&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ man gsl&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Includes ===&lt;br /&gt;
&lt;br /&gt;
Your source code should contain preprocessor include statements with a gsl/prefix such as&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;#include &amp;lt;gsl/gsl_math.h&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Compile ===&lt;br /&gt;
&lt;br /&gt;
A typical compilation command for a source file &#039;example.c&#039; with the Intel C compiler icc is&lt;br /&gt;
&amp;lt;pre&amp;gt; $ icc -Wall -I$GSL_INC_DIR -c example.c &amp;lt;/pre&amp;gt;&lt;br /&gt;
The $GSL_INC_DIR environment variable points to location of the include path for the GSL header files.&lt;br /&gt;
&lt;br /&gt;
=== Link ===&lt;br /&gt;
&lt;br /&gt;
The following command can be used to link the application with the GSL libraries:&lt;br /&gt;
&amp;lt;pre&amp;gt; $ icc -L$GSL_LIB_DIR -o example example.o -lgsl -lgslcblas -lm &amp;lt;/pre&amp;gt;&lt;br /&gt;
The $GSL_LIB_DIR environment variable points to the location of the GSL libraries.&lt;br /&gt;
Also make sure to have the GSL module loaded before running applications build with this library.&lt;br /&gt;
&lt;br /&gt;
= Examples =&lt;br /&gt;
&lt;br /&gt;
Consider the following GSL task and create source code file &#039;gsl-test.c&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;gsl/gsl_sf_bessel.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
int main (void)&lt;br /&gt;
{&lt;br /&gt;
  double x = 5.0;&lt;br /&gt;
  double y = gsl_sf_bessel_J0 (x);&lt;br /&gt;
  printf (&amp;quot;J0(%g) = %.18e\n&amp;quot;, x, y);&lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The code can be compiled and executed with the following commands: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load numlib/gsl/2.6-intel-19.1.2&lt;br /&gt;
$ icc -Wall -I$GSL_INC_DIR -c gsl-test.c&lt;br /&gt;
$ icc -L$GSL_LIB_DIR -o example gsl-test.o -lgsl -lgslcblas -lm&lt;br /&gt;
$ ./example&lt;br /&gt;
J0(5) = -1.775967713143382642e-01&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Useful links =&lt;br /&gt;
&lt;br /&gt;
* [https://www.gnu.org/software/gsl/doc/html/index.html Documentation (english)]&lt;br /&gt;
* [https://de.wikipedia.org/wiki/GNU_Scientific_Library Wikipedia article (german)]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/GNU_Scientific_Library Wikipedia article (english)]&lt;br /&gt;
----&lt;br /&gt;
[[Category: Numerical libraries]][[Category:BwUniCluster]][[Category:BwUniCluster_2.0]][[Category:BwForCluster_Chemistry]][[Category:BwForCluster_JUSTUS_2]]&lt;/div&gt;</summary>
		<author><name>F Wagner</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=Development/GSL&amp;diff=8788</id>
		<title>Development/GSL</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=Development/GSL&amp;diff=8788"/>
		<updated>2021-06-02T22:33:51Z</updated>

		<summary type="html">&lt;p&gt;F Wagner: /* Link */&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/gsl&lt;br /&gt;
|-&lt;br /&gt;
| Availability&lt;br /&gt;
| [[bwUniCluster_2.0]] &amp;amp;#124; [[BwForCluster_JUSTUS_2]]&lt;br /&gt;
|-&lt;br /&gt;
| License&lt;br /&gt;
| [http://www.gnu.org/copyleft/gpl.html GNU General Public License (GPL)]&lt;br /&gt;
|-&lt;br /&gt;
|Citing&lt;br /&gt;
| &amp;lt;small&amp;gt;&amp;lt;small&amp;gt;&amp;lt;pre&amp;gt;M. Galassi et al., GNU Scientific Library Reference Manual (3rd Ed.), ISBN 0954612078.&amp;lt;/pre&amp;gt;&amp;lt;/small&amp;gt;&amp;lt;/small&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Links&lt;br /&gt;
| [https://www.gnu.org/software/gsl/ Homepage] &amp;amp;#124; [https://www.gnu.org/software/gsl/doc/html/index.html Documentation]&lt;br /&gt;
|-&lt;br /&gt;
| Graphical Interface&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
= Description =&lt;br /&gt;
The &#039;&#039;&#039;GNU Scientific Library&#039;&#039;&#039; (&#039;&#039;&#039;GSL&#039;&#039;&#039;) is a software library for numerical computations in applied mathematics and science. GSL is written in C, but bindings exist for other programming languages as well. The library provides a wide range of mathematical routines such as random number generators, special functions and least-squares fitting. There are over 1000 functions in total with an extensive test suite.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The complete range of subject areas covered by the library:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;bull; Complex Numbers &amp;amp;bull; Roots of Polynomials &amp;amp;bull; Special Functions &amp;amp;bull; Vectors and Matrices &amp;amp;bull; Permutations &amp;amp;bull; Sorting &amp;amp;bull; BLAS Support &amp;amp;bull; Linear Algebra &amp;amp;bull; Eigensystems &amp;amp;bull; Fast Fourier Transforms &amp;amp;bull; Quadrature &amp;amp;bull; Random Numbers &amp;amp;bull; Quasi-Random Sequences &amp;amp;bull; Random Distributions &amp;amp;bull; Statistics &amp;amp;bull; Histograms &amp;amp;bull; N-Tuples &amp;amp;bull; Monte Carlo Integration &amp;amp;bull; Simulated Annealing &amp;amp;bull; Differential Equations &amp;amp;bull; Interpolation &amp;amp;bull; Numerical Differentiation &amp;amp;bull; Chebyshev Approximation &amp;amp;bull; Series Acceleration &amp;amp;bull; Discrete Hankel Transforms &amp;amp;bull; Root-Finding &amp;amp;bull; Minimization &amp;amp;bull; Least-Squares Fitting &amp;amp;bull; Physical Constants &amp;amp;bull; IEEE Floating-Point &amp;amp;bull; Discrete Wavelet Transforms &amp;amp;bull; Basis splines &amp;amp;bull; Running Statistics &amp;amp;bull; Sparse Matrices and Linear Algebra&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Availability =&lt;br /&gt;
&lt;br /&gt;
GSL is available on selected bwHPC-Clusters. A complete list of versions currently installed on the bwHPC-Clusters can be obtained from the [https://www.bwhpc.de/software.html Cluster Information System (CIS)].&lt;br /&gt;
&lt;br /&gt;
In order to check which versions of GSL are installed on the compute cluster, run the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module avail numlib/gsl&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Documentation =&lt;br /&gt;
&lt;br /&gt;
A documentation for GSL is available [https://www.gnu.org/software/gsl/doc/html/index.html online].&lt;br /&gt;
&lt;br /&gt;
The help page of the GSL module provides more version specific information:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module help numlib/gsl&lt;br /&gt;
&lt;br /&gt;
----------- Module Specific Help for &#039;numlib/gsl/2.6&#039; ----------&lt;br /&gt;
This module sets the path and environment variables for GSL-2.6.&lt;br /&gt;
 &lt;br /&gt;
 The library has been compiled with GNU compiler 8.3 using the following optimization flags:&lt;br /&gt;
 &lt;br /&gt;
  -O3 -funroll-loops -march=native -mtune=native&lt;br /&gt;
 &lt;br /&gt;
 Online-Documentation: $GSL_WWW&lt;br /&gt;
 &lt;br /&gt;
 Local-Documentation: $GSL_DOC_DIR&lt;br /&gt;
 &lt;br /&gt;
 Code Examples: $GSL_EXA_DIR&lt;br /&gt;
 &lt;br /&gt;
 Tips for compiling and linking:&lt;br /&gt;
 &lt;br /&gt;
 After having loaded the environment module, you can use several environment variables to&lt;br /&gt;
 compile and link your application with the GSL library.&lt;br /&gt;
 &lt;br /&gt;
 Your source code should contain preprocessor include statements with a gsl/prefix, such as&lt;br /&gt;
 &lt;br /&gt;
  #include &amp;lt;gsl/gsl_math.h&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 A typical compilation command for a source file example.c with the GNU C compiler gcc is&lt;br /&gt;
 &lt;br /&gt;
  gcc -Wall -I\$GSL_INC_DIR -c example.c&lt;br /&gt;
 &lt;br /&gt;
 The GSL_INC_DIR environment variable points to the location of the include path for the GSL header files.&lt;br /&gt;
 &lt;br /&gt;
 The following command can be used to link the application with the GSL library:&lt;br /&gt;
 &lt;br /&gt;
  gcc -L\$GSL_LIB_DIR -o example example.o -lgsl -lgslcblas -lm&lt;br /&gt;
&lt;br /&gt;
 The GSL_LIB_DIR environment variable points to the location of the GSL library.&lt;br /&gt;
 &lt;br /&gt;
 In case of problems, submit a trouble ticket at &#039;https://bw-support.scc.kit.edu&#039;.&lt;br /&gt;
 &lt;br /&gt;
 The full version is: numlib/gsl/2.6&lt;br /&gt;
&amp;lt;/pre&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 GSL with the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load numlib/gsl&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The module will try to load all modules it needs to function (e.g., compiler, mpi, ...). If loading the module fails, check if you have already loaded one of those modules, but not in the version required by GSL.&lt;br /&gt;
&lt;br /&gt;
If you wish to load another (older) version of GSL, you can do so using&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load numlib/gsl/&amp;lt;version&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
with &amp;lt;version&amp;gt; specifying the desired version.&lt;br /&gt;
&lt;br /&gt;
== How to use GSL ==&lt;br /&gt;
&lt;br /&gt;
A man page is available and can be accessed by typing:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ man gsl&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Includes ===&lt;br /&gt;
&lt;br /&gt;
Your source code should contain preprocessor include statements with a gsl/prefix such as&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;#include &amp;lt;gsl/gsl_math.h&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Compile ===&lt;br /&gt;
&lt;br /&gt;
A typical compilation command for a source file &#039;example.c&#039; with the Intel C compiler icc is&lt;br /&gt;
&amp;lt;pre&amp;gt; $ icc -Wall -I$GSL_INC_DIR -c example.c &amp;lt;/pre&amp;gt;&lt;br /&gt;
The $GSL_INC_DIR environment variable points to location of the include path for the GSL header files.&lt;br /&gt;
&lt;br /&gt;
=== Link ===&lt;br /&gt;
&lt;br /&gt;
The following command can be used to link the application with the GSL libraries:&lt;br /&gt;
&amp;lt;pre&amp;gt; $ icc -L$GSL_LIB_DIR -o example example.o -lgsl -lgslcblas -lm &amp;lt;/pre&amp;gt;&lt;br /&gt;
The $GSL_LIB_DIR environment variable points to the location of the GSL libraries.&lt;br /&gt;
Also make sure to have the GSL module loaded before running applications build with this library.&lt;br /&gt;
&lt;br /&gt;
= Examples =&lt;br /&gt;
&lt;br /&gt;
Consider the following GSL task and create source code file &#039;gsl-test.c&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;gsl/gsl_sf_bessel.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
int main (void)&lt;br /&gt;
{&lt;br /&gt;
  double x = 5.0;&lt;br /&gt;
  double y = gsl_sf_bessel_J0 (x);&lt;br /&gt;
  printf (&amp;quot;J0(%g) = %.18e\n&amp;quot;, x, y);&lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The code can be compiled and executed with the following commands: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load numlib/gsl/2.6-intel-19.1.2&lt;br /&gt;
$ icc -Wall -I$GSL_INC_DIR -c gsl-test.c&lt;br /&gt;
$ icc -L$GSL_LIB_DIR -o example gsl-test.o -lgsl -lgslcblas -lm&lt;br /&gt;
$ ./example&lt;br /&gt;
J0(5) = -1.775967713143382642e-01&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Useful links =&lt;br /&gt;
&lt;br /&gt;
* [https://www.gnu.org/software/gsl/doc/html/index.html Documentation (english)]&lt;br /&gt;
* [https://de.wikipedia.org/wiki/GNU_Scientific_Library Wikipedia article (german)]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/GNU_Scientific_Library Wikipedia article (english)]&lt;br /&gt;
----&lt;br /&gt;
[[Category: Numerical libraries]][[Category:BwUniCluster]][[Category:BwUniCluster_2.0]][[Category:BwForCluster_Chemistry]][[Category:BwForCluster_JUSTUS_2]]&lt;/div&gt;</summary>
		<author><name>F Wagner</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=Development/GSL&amp;diff=8787</id>
		<title>Development/GSL</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=Development/GSL&amp;diff=8787"/>
		<updated>2021-06-02T22:33:20Z</updated>

		<summary type="html">&lt;p&gt;F Wagner: /* Link */&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/gsl&lt;br /&gt;
|-&lt;br /&gt;
| Availability&lt;br /&gt;
| [[bwUniCluster_2.0]] &amp;amp;#124; [[BwForCluster_JUSTUS_2]]&lt;br /&gt;
|-&lt;br /&gt;
| License&lt;br /&gt;
| [http://www.gnu.org/copyleft/gpl.html GNU General Public License (GPL)]&lt;br /&gt;
|-&lt;br /&gt;
|Citing&lt;br /&gt;
| &amp;lt;small&amp;gt;&amp;lt;small&amp;gt;&amp;lt;pre&amp;gt;M. Galassi et al., GNU Scientific Library Reference Manual (3rd Ed.), ISBN 0954612078.&amp;lt;/pre&amp;gt;&amp;lt;/small&amp;gt;&amp;lt;/small&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Links&lt;br /&gt;
| [https://www.gnu.org/software/gsl/ Homepage] &amp;amp;#124; [https://www.gnu.org/software/gsl/doc/html/index.html Documentation]&lt;br /&gt;
|-&lt;br /&gt;
| Graphical Interface&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
= Description =&lt;br /&gt;
The &#039;&#039;&#039;GNU Scientific Library&#039;&#039;&#039; (&#039;&#039;&#039;GSL&#039;&#039;&#039;) is a software library for numerical computations in applied mathematics and science. GSL is written in C, but bindings exist for other programming languages as well. The library provides a wide range of mathematical routines such as random number generators, special functions and least-squares fitting. There are over 1000 functions in total with an extensive test suite.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The complete range of subject areas covered by the library:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;bull; Complex Numbers &amp;amp;bull; Roots of Polynomials &amp;amp;bull; Special Functions &amp;amp;bull; Vectors and Matrices &amp;amp;bull; Permutations &amp;amp;bull; Sorting &amp;amp;bull; BLAS Support &amp;amp;bull; Linear Algebra &amp;amp;bull; Eigensystems &amp;amp;bull; Fast Fourier Transforms &amp;amp;bull; Quadrature &amp;amp;bull; Random Numbers &amp;amp;bull; Quasi-Random Sequences &amp;amp;bull; Random Distributions &amp;amp;bull; Statistics &amp;amp;bull; Histograms &amp;amp;bull; N-Tuples &amp;amp;bull; Monte Carlo Integration &amp;amp;bull; Simulated Annealing &amp;amp;bull; Differential Equations &amp;amp;bull; Interpolation &amp;amp;bull; Numerical Differentiation &amp;amp;bull; Chebyshev Approximation &amp;amp;bull; Series Acceleration &amp;amp;bull; Discrete Hankel Transforms &amp;amp;bull; Root-Finding &amp;amp;bull; Minimization &amp;amp;bull; Least-Squares Fitting &amp;amp;bull; Physical Constants &amp;amp;bull; IEEE Floating-Point &amp;amp;bull; Discrete Wavelet Transforms &amp;amp;bull; Basis splines &amp;amp;bull; Running Statistics &amp;amp;bull; Sparse Matrices and Linear Algebra&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Availability =&lt;br /&gt;
&lt;br /&gt;
GSL is available on selected bwHPC-Clusters. A complete list of versions currently installed on the bwHPC-Clusters can be obtained from the [https://www.bwhpc.de/software.html Cluster Information System (CIS)].&lt;br /&gt;
&lt;br /&gt;
In order to check which versions of GSL are installed on the compute cluster, run the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module avail numlib/gsl&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Documentation =&lt;br /&gt;
&lt;br /&gt;
A documentation for GSL is available [https://www.gnu.org/software/gsl/doc/html/index.html online].&lt;br /&gt;
&lt;br /&gt;
The help page of the GSL module provides more version specific information:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module help numlib/gsl&lt;br /&gt;
&lt;br /&gt;
----------- Module Specific Help for &#039;numlib/gsl/2.6&#039; ----------&lt;br /&gt;
This module sets the path and environment variables for GSL-2.6.&lt;br /&gt;
 &lt;br /&gt;
 The library has been compiled with GNU compiler 8.3 using the following optimization flags:&lt;br /&gt;
 &lt;br /&gt;
  -O3 -funroll-loops -march=native -mtune=native&lt;br /&gt;
 &lt;br /&gt;
 Online-Documentation: $GSL_WWW&lt;br /&gt;
 &lt;br /&gt;
 Local-Documentation: $GSL_DOC_DIR&lt;br /&gt;
 &lt;br /&gt;
 Code Examples: $GSL_EXA_DIR&lt;br /&gt;
 &lt;br /&gt;
 Tips for compiling and linking:&lt;br /&gt;
 &lt;br /&gt;
 After having loaded the environment module, you can use several environment variables to&lt;br /&gt;
 compile and link your application with the GSL library.&lt;br /&gt;
 &lt;br /&gt;
 Your source code should contain preprocessor include statements with a gsl/prefix, such as&lt;br /&gt;
 &lt;br /&gt;
  #include &amp;lt;gsl/gsl_math.h&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 A typical compilation command for a source file example.c with the GNU C compiler gcc is&lt;br /&gt;
 &lt;br /&gt;
  gcc -Wall -I\$GSL_INC_DIR -c example.c&lt;br /&gt;
 &lt;br /&gt;
 The GSL_INC_DIR environment variable points to the location of the include path for the GSL header files.&lt;br /&gt;
 &lt;br /&gt;
 The following command can be used to link the application with the GSL library:&lt;br /&gt;
 &lt;br /&gt;
  gcc -L\$GSL_LIB_DIR -o example example.o -lgsl -lgslcblas -lm&lt;br /&gt;
&lt;br /&gt;
 The GSL_LIB_DIR environment variable points to the location of the GSL library.&lt;br /&gt;
 &lt;br /&gt;
 In case of problems, submit a trouble ticket at &#039;https://bw-support.scc.kit.edu&#039;.&lt;br /&gt;
 &lt;br /&gt;
 The full version is: numlib/gsl/2.6&lt;br /&gt;
&amp;lt;/pre&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 GSL with the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load numlib/gsl&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The module will try to load all modules it needs to function (e.g., compiler, mpi, ...). If loading the module fails, check if you have already loaded one of those modules, but not in the version required by GSL.&lt;br /&gt;
&lt;br /&gt;
If you wish to load another (older) version of GSL, you can do so using&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load numlib/gsl/&amp;lt;version&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
with &amp;lt;version&amp;gt; specifying the desired version.&lt;br /&gt;
&lt;br /&gt;
== How to use GSL ==&lt;br /&gt;
&lt;br /&gt;
A man page is available and can be accessed by typing:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ man gsl&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Includes ===&lt;br /&gt;
&lt;br /&gt;
Your source code should contain preprocessor include statements with a gsl/prefix such as&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;#include &amp;lt;gsl/gsl_math.h&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Compile ===&lt;br /&gt;
&lt;br /&gt;
A typical compilation command for a source file &#039;example.c&#039; with the Intel C compiler icc is&lt;br /&gt;
&amp;lt;pre&amp;gt; $ icc -Wall -I$GSL_INC_DIR -c example.c &amp;lt;/pre&amp;gt;&lt;br /&gt;
The $GSL_INC_DIR environment variable points to location of the include path for the GSL header files.&lt;br /&gt;
&lt;br /&gt;
=== Link ===&lt;br /&gt;
&lt;br /&gt;
The following command can be used to link the application with the GSL libraries.&lt;br /&gt;
&amp;lt;pre&amp;gt; $ icc -L$GSL_LIB_DIR -o example example.o -lgsl -lgslcblas -lm &amp;lt;/pre&amp;gt;&lt;br /&gt;
The $GSL_LIB_DIR environment variable points to the location of the GSL libraries.&lt;br /&gt;
Also make sure to have the GSL module loaded before running applications build with this library.&lt;br /&gt;
&lt;br /&gt;
= Examples =&lt;br /&gt;
&lt;br /&gt;
Consider the following GSL task and create source code file &#039;gsl-test.c&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;gsl/gsl_sf_bessel.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
int main (void)&lt;br /&gt;
{&lt;br /&gt;
  double x = 5.0;&lt;br /&gt;
  double y = gsl_sf_bessel_J0 (x);&lt;br /&gt;
  printf (&amp;quot;J0(%g) = %.18e\n&amp;quot;, x, y);&lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The code can be compiled and executed with the following commands: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load numlib/gsl/2.6-intel-19.1.2&lt;br /&gt;
$ icc -Wall -I$GSL_INC_DIR -c gsl-test.c&lt;br /&gt;
$ icc -L$GSL_LIB_DIR -o example gsl-test.o -lgsl -lgslcblas -lm&lt;br /&gt;
$ ./example&lt;br /&gt;
J0(5) = -1.775967713143382642e-01&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Useful links =&lt;br /&gt;
&lt;br /&gt;
* [https://www.gnu.org/software/gsl/doc/html/index.html Documentation (english)]&lt;br /&gt;
* [https://de.wikipedia.org/wiki/GNU_Scientific_Library Wikipedia article (german)]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/GNU_Scientific_Library Wikipedia article (english)]&lt;br /&gt;
----&lt;br /&gt;
[[Category: Numerical libraries]][[Category:BwUniCluster]][[Category:BwUniCluster_2.0]][[Category:BwForCluster_Chemistry]][[Category:BwForCluster_JUSTUS_2]]&lt;/div&gt;</summary>
		<author><name>F Wagner</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=Development/GSL&amp;diff=8786</id>
		<title>Development/GSL</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=Development/GSL&amp;diff=8786"/>
		<updated>2021-06-02T22:32:48Z</updated>

		<summary type="html">&lt;p&gt;F Wagner: /* Link */&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/gsl&lt;br /&gt;
|-&lt;br /&gt;
| Availability&lt;br /&gt;
| [[bwUniCluster_2.0]] &amp;amp;#124; [[BwForCluster_JUSTUS_2]]&lt;br /&gt;
|-&lt;br /&gt;
| License&lt;br /&gt;
| [http://www.gnu.org/copyleft/gpl.html GNU General Public License (GPL)]&lt;br /&gt;
|-&lt;br /&gt;
|Citing&lt;br /&gt;
| &amp;lt;small&amp;gt;&amp;lt;small&amp;gt;&amp;lt;pre&amp;gt;M. Galassi et al., GNU Scientific Library Reference Manual (3rd Ed.), ISBN 0954612078.&amp;lt;/pre&amp;gt;&amp;lt;/small&amp;gt;&amp;lt;/small&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Links&lt;br /&gt;
| [https://www.gnu.org/software/gsl/ Homepage] &amp;amp;#124; [https://www.gnu.org/software/gsl/doc/html/index.html Documentation]&lt;br /&gt;
|-&lt;br /&gt;
| Graphical Interface&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
= Description =&lt;br /&gt;
The &#039;&#039;&#039;GNU Scientific Library&#039;&#039;&#039; (&#039;&#039;&#039;GSL&#039;&#039;&#039;) is a software library for numerical computations in applied mathematics and science. GSL is written in C, but bindings exist for other programming languages as well. The library provides a wide range of mathematical routines such as random number generators, special functions and least-squares fitting. There are over 1000 functions in total with an extensive test suite.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The complete range of subject areas covered by the library:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;bull; Complex Numbers &amp;amp;bull; Roots of Polynomials &amp;amp;bull; Special Functions &amp;amp;bull; Vectors and Matrices &amp;amp;bull; Permutations &amp;amp;bull; Sorting &amp;amp;bull; BLAS Support &amp;amp;bull; Linear Algebra &amp;amp;bull; Eigensystems &amp;amp;bull; Fast Fourier Transforms &amp;amp;bull; Quadrature &amp;amp;bull; Random Numbers &amp;amp;bull; Quasi-Random Sequences &amp;amp;bull; Random Distributions &amp;amp;bull; Statistics &amp;amp;bull; Histograms &amp;amp;bull; N-Tuples &amp;amp;bull; Monte Carlo Integration &amp;amp;bull; Simulated Annealing &amp;amp;bull; Differential Equations &amp;amp;bull; Interpolation &amp;amp;bull; Numerical Differentiation &amp;amp;bull; Chebyshev Approximation &amp;amp;bull; Series Acceleration &amp;amp;bull; Discrete Hankel Transforms &amp;amp;bull; Root-Finding &amp;amp;bull; Minimization &amp;amp;bull; Least-Squares Fitting &amp;amp;bull; Physical Constants &amp;amp;bull; IEEE Floating-Point &amp;amp;bull; Discrete Wavelet Transforms &amp;amp;bull; Basis splines &amp;amp;bull; Running Statistics &amp;amp;bull; Sparse Matrices and Linear Algebra&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Availability =&lt;br /&gt;
&lt;br /&gt;
GSL is available on selected bwHPC-Clusters. A complete list of versions currently installed on the bwHPC-Clusters can be obtained from the [https://www.bwhpc.de/software.html Cluster Information System (CIS)].&lt;br /&gt;
&lt;br /&gt;
In order to check which versions of GSL are installed on the compute cluster, run the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module avail numlib/gsl&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Documentation =&lt;br /&gt;
&lt;br /&gt;
A documentation for GSL is available [https://www.gnu.org/software/gsl/doc/html/index.html online].&lt;br /&gt;
&lt;br /&gt;
The help page of the GSL module provides more version specific information:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module help numlib/gsl&lt;br /&gt;
&lt;br /&gt;
----------- Module Specific Help for &#039;numlib/gsl/2.6&#039; ----------&lt;br /&gt;
This module sets the path and environment variables for GSL-2.6.&lt;br /&gt;
 &lt;br /&gt;
 The library has been compiled with GNU compiler 8.3 using the following optimization flags:&lt;br /&gt;
 &lt;br /&gt;
  -O3 -funroll-loops -march=native -mtune=native&lt;br /&gt;
 &lt;br /&gt;
 Online-Documentation: $GSL_WWW&lt;br /&gt;
 &lt;br /&gt;
 Local-Documentation: $GSL_DOC_DIR&lt;br /&gt;
 &lt;br /&gt;
 Code Examples: $GSL_EXA_DIR&lt;br /&gt;
 &lt;br /&gt;
 Tips for compiling and linking:&lt;br /&gt;
 &lt;br /&gt;
 After having loaded the environment module, you can use several environment variables to&lt;br /&gt;
 compile and link your application with the GSL library.&lt;br /&gt;
 &lt;br /&gt;
 Your source code should contain preprocessor include statements with a gsl/prefix, such as&lt;br /&gt;
 &lt;br /&gt;
  #include &amp;lt;gsl/gsl_math.h&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 A typical compilation command for a source file example.c with the GNU C compiler gcc is&lt;br /&gt;
 &lt;br /&gt;
  gcc -Wall -I\$GSL_INC_DIR -c example.c&lt;br /&gt;
 &lt;br /&gt;
 The GSL_INC_DIR environment variable points to the location of the include path for the GSL header files.&lt;br /&gt;
 &lt;br /&gt;
 The following command can be used to link the application with the GSL library:&lt;br /&gt;
 &lt;br /&gt;
  gcc -L\$GSL_LIB_DIR -o example example.o -lgsl -lgslcblas -lm&lt;br /&gt;
&lt;br /&gt;
 The GSL_LIB_DIR environment variable points to the location of the GSL library.&lt;br /&gt;
 &lt;br /&gt;
 In case of problems, submit a trouble ticket at &#039;https://bw-support.scc.kit.edu&#039;.&lt;br /&gt;
 &lt;br /&gt;
 The full version is: numlib/gsl/2.6&lt;br /&gt;
&amp;lt;/pre&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 GSL with the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load numlib/gsl&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The module will try to load all modules it needs to function (e.g., compiler, mpi, ...). If loading the module fails, check if you have already loaded one of those modules, but not in the version required by GSL.&lt;br /&gt;
&lt;br /&gt;
If you wish to load another (older) version of GSL, you can do so using&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load numlib/gsl/&amp;lt;version&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
with &amp;lt;version&amp;gt; specifying the desired version.&lt;br /&gt;
&lt;br /&gt;
== How to use GSL ==&lt;br /&gt;
&lt;br /&gt;
A man page is available and can be accessed by typing:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ man gsl&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Includes ===&lt;br /&gt;
&lt;br /&gt;
Your source code should contain preprocessor include statements with a gsl/prefix such as&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;#include &amp;lt;gsl/gsl_math.h&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Compile ===&lt;br /&gt;
&lt;br /&gt;
A typical compilation command for a source file &#039;example.c&#039; with the Intel C compiler icc is&lt;br /&gt;
&amp;lt;pre&amp;gt; $ icc -Wall -I$GSL_INC_DIR -c example.c &amp;lt;/pre&amp;gt;&lt;br /&gt;
The $GSL_INC_DIR environment variable points to location of the include path for the GSL header files.&lt;br /&gt;
&lt;br /&gt;
=== Link ===&lt;br /&gt;
&lt;br /&gt;
The following command can be used to link the application with the GSL libraries.&lt;br /&gt;
&amp;lt;pre&amp;gt; $ icc -L$GSL_LIB_DIR -o example example.o -lgsl -lgslcblas -lm &amp;lt;/pre&amp;gt;&lt;br /&gt;
The $GSL_LIB_DIR environment variable points to the location of the GSL libraries.&lt;br /&gt;
Also make sure to have the GSL-module loaded before running applications build with this library.&lt;br /&gt;
&lt;br /&gt;
= Examples =&lt;br /&gt;
&lt;br /&gt;
Consider the following GSL task and create source code file &#039;gsl-test.c&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;gsl/gsl_sf_bessel.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
int main (void)&lt;br /&gt;
{&lt;br /&gt;
  double x = 5.0;&lt;br /&gt;
  double y = gsl_sf_bessel_J0 (x);&lt;br /&gt;
  printf (&amp;quot;J0(%g) = %.18e\n&amp;quot;, x, y);&lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The code can be compiled and executed with the following commands: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load numlib/gsl/2.6-intel-19.1.2&lt;br /&gt;
$ icc -Wall -I$GSL_INC_DIR -c gsl-test.c&lt;br /&gt;
$ icc -L$GSL_LIB_DIR -o example gsl-test.o -lgsl -lgslcblas -lm&lt;br /&gt;
$ ./example&lt;br /&gt;
J0(5) = -1.775967713143382642e-01&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Useful links =&lt;br /&gt;
&lt;br /&gt;
* [https://www.gnu.org/software/gsl/doc/html/index.html Documentation (english)]&lt;br /&gt;
* [https://de.wikipedia.org/wiki/GNU_Scientific_Library Wikipedia article (german)]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/GNU_Scientific_Library Wikipedia article (english)]&lt;br /&gt;
----&lt;br /&gt;
[[Category: Numerical libraries]][[Category:BwUniCluster]][[Category:BwUniCluster_2.0]][[Category:BwForCluster_Chemistry]][[Category:BwForCluster_JUSTUS_2]]&lt;/div&gt;</summary>
		<author><name>F Wagner</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=Development/GSL&amp;diff=8785</id>
		<title>Development/GSL</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=Development/GSL&amp;diff=8785"/>
		<updated>2021-06-02T22:32:12Z</updated>

		<summary type="html">&lt;p&gt;F Wagner: /* Compile */&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/gsl&lt;br /&gt;
|-&lt;br /&gt;
| Availability&lt;br /&gt;
| [[bwUniCluster_2.0]] &amp;amp;#124; [[BwForCluster_JUSTUS_2]]&lt;br /&gt;
|-&lt;br /&gt;
| License&lt;br /&gt;
| [http://www.gnu.org/copyleft/gpl.html GNU General Public License (GPL)]&lt;br /&gt;
|-&lt;br /&gt;
|Citing&lt;br /&gt;
| &amp;lt;small&amp;gt;&amp;lt;small&amp;gt;&amp;lt;pre&amp;gt;M. Galassi et al., GNU Scientific Library Reference Manual (3rd Ed.), ISBN 0954612078.&amp;lt;/pre&amp;gt;&amp;lt;/small&amp;gt;&amp;lt;/small&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Links&lt;br /&gt;
| [https://www.gnu.org/software/gsl/ Homepage] &amp;amp;#124; [https://www.gnu.org/software/gsl/doc/html/index.html Documentation]&lt;br /&gt;
|-&lt;br /&gt;
| Graphical Interface&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
= Description =&lt;br /&gt;
The &#039;&#039;&#039;GNU Scientific Library&#039;&#039;&#039; (&#039;&#039;&#039;GSL&#039;&#039;&#039;) is a software library for numerical computations in applied mathematics and science. GSL is written in C, but bindings exist for other programming languages as well. The library provides a wide range of mathematical routines such as random number generators, special functions and least-squares fitting. There are over 1000 functions in total with an extensive test suite.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The complete range of subject areas covered by the library:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;bull; Complex Numbers &amp;amp;bull; Roots of Polynomials &amp;amp;bull; Special Functions &amp;amp;bull; Vectors and Matrices &amp;amp;bull; Permutations &amp;amp;bull; Sorting &amp;amp;bull; BLAS Support &amp;amp;bull; Linear Algebra &amp;amp;bull; Eigensystems &amp;amp;bull; Fast Fourier Transforms &amp;amp;bull; Quadrature &amp;amp;bull; Random Numbers &amp;amp;bull; Quasi-Random Sequences &amp;amp;bull; Random Distributions &amp;amp;bull; Statistics &amp;amp;bull; Histograms &amp;amp;bull; N-Tuples &amp;amp;bull; Monte Carlo Integration &amp;amp;bull; Simulated Annealing &amp;amp;bull; Differential Equations &amp;amp;bull; Interpolation &amp;amp;bull; Numerical Differentiation &amp;amp;bull; Chebyshev Approximation &amp;amp;bull; Series Acceleration &amp;amp;bull; Discrete Hankel Transforms &amp;amp;bull; Root-Finding &amp;amp;bull; Minimization &amp;amp;bull; Least-Squares Fitting &amp;amp;bull; Physical Constants &amp;amp;bull; IEEE Floating-Point &amp;amp;bull; Discrete Wavelet Transforms &amp;amp;bull; Basis splines &amp;amp;bull; Running Statistics &amp;amp;bull; Sparse Matrices and Linear Algebra&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Availability =&lt;br /&gt;
&lt;br /&gt;
GSL is available on selected bwHPC-Clusters. A complete list of versions currently installed on the bwHPC-Clusters can be obtained from the [https://www.bwhpc.de/software.html Cluster Information System (CIS)].&lt;br /&gt;
&lt;br /&gt;
In order to check which versions of GSL are installed on the compute cluster, run the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module avail numlib/gsl&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Documentation =&lt;br /&gt;
&lt;br /&gt;
A documentation for GSL is available [https://www.gnu.org/software/gsl/doc/html/index.html online].&lt;br /&gt;
&lt;br /&gt;
The help page of the GSL module provides more version specific information:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module help numlib/gsl&lt;br /&gt;
&lt;br /&gt;
----------- Module Specific Help for &#039;numlib/gsl/2.6&#039; ----------&lt;br /&gt;
This module sets the path and environment variables for GSL-2.6.&lt;br /&gt;
 &lt;br /&gt;
 The library has been compiled with GNU compiler 8.3 using the following optimization flags:&lt;br /&gt;
 &lt;br /&gt;
  -O3 -funroll-loops -march=native -mtune=native&lt;br /&gt;
 &lt;br /&gt;
 Online-Documentation: $GSL_WWW&lt;br /&gt;
 &lt;br /&gt;
 Local-Documentation: $GSL_DOC_DIR&lt;br /&gt;
 &lt;br /&gt;
 Code Examples: $GSL_EXA_DIR&lt;br /&gt;
 &lt;br /&gt;
 Tips for compiling and linking:&lt;br /&gt;
 &lt;br /&gt;
 After having loaded the environment module, you can use several environment variables to&lt;br /&gt;
 compile and link your application with the GSL library.&lt;br /&gt;
 &lt;br /&gt;
 Your source code should contain preprocessor include statements with a gsl/prefix, such as&lt;br /&gt;
 &lt;br /&gt;
  #include &amp;lt;gsl/gsl_math.h&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 A typical compilation command for a source file example.c with the GNU C compiler gcc is&lt;br /&gt;
 &lt;br /&gt;
  gcc -Wall -I\$GSL_INC_DIR -c example.c&lt;br /&gt;
 &lt;br /&gt;
 The GSL_INC_DIR environment variable points to the location of the include path for the GSL header files.&lt;br /&gt;
 &lt;br /&gt;
 The following command can be used to link the application with the GSL library:&lt;br /&gt;
 &lt;br /&gt;
  gcc -L\$GSL_LIB_DIR -o example example.o -lgsl -lgslcblas -lm&lt;br /&gt;
&lt;br /&gt;
 The GSL_LIB_DIR environment variable points to the location of the GSL library.&lt;br /&gt;
 &lt;br /&gt;
 In case of problems, submit a trouble ticket at &#039;https://bw-support.scc.kit.edu&#039;.&lt;br /&gt;
 &lt;br /&gt;
 The full version is: numlib/gsl/2.6&lt;br /&gt;
&amp;lt;/pre&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 GSL with the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load numlib/gsl&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The module will try to load all modules it needs to function (e.g., compiler, mpi, ...). If loading the module fails, check if you have already loaded one of those modules, but not in the version required by GSL.&lt;br /&gt;
&lt;br /&gt;
If you wish to load another (older) version of GSL, you can do so using&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load numlib/gsl/&amp;lt;version&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
with &amp;lt;version&amp;gt; specifying the desired version.&lt;br /&gt;
&lt;br /&gt;
== How to use GSL ==&lt;br /&gt;
&lt;br /&gt;
A man page is available and can be accessed by typing:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ man gsl&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Includes ===&lt;br /&gt;
&lt;br /&gt;
Your source code should contain preprocessor include statements with a gsl/prefix such as&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;#include &amp;lt;gsl/gsl_math.h&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Compile ===&lt;br /&gt;
&lt;br /&gt;
A typical compilation command for a source file &#039;example.c&#039; with the Intel C compiler icc is&lt;br /&gt;
&amp;lt;pre&amp;gt; $ icc -Wall -I$GSL_INC_DIR -c example.c &amp;lt;/pre&amp;gt;&lt;br /&gt;
The $GSL_INC_DIR environment variable points to location of the include path for the GSL header files.&lt;br /&gt;
&lt;br /&gt;
=== Link ===&lt;br /&gt;
&lt;br /&gt;
The following command can be used to link the application with the GSL libraries.&lt;br /&gt;
&amp;lt;pre&amp;gt; $ icc -L$GSL_LIB_DIR -o example example.o -lgsl -lgslcblas -lm &amp;lt;/pre&amp;gt;&lt;br /&gt;
The [[#GSL-Specific Environments|$GSL_LIB_DIR environment variable]] points to the location &lt;br /&gt;
of the gsl libraries.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Also make sure to have the GSL-module loaded before running applications build&lt;br /&gt;
with this library.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Examples =&lt;br /&gt;
&lt;br /&gt;
Consider the following GSL task and create source code file &#039;gsl-test.c&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;gsl/gsl_sf_bessel.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
int main (void)&lt;br /&gt;
{&lt;br /&gt;
  double x = 5.0;&lt;br /&gt;
  double y = gsl_sf_bessel_J0 (x);&lt;br /&gt;
  printf (&amp;quot;J0(%g) = %.18e\n&amp;quot;, x, y);&lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The code can be compiled and executed with the following commands: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load numlib/gsl/2.6-intel-19.1.2&lt;br /&gt;
$ icc -Wall -I$GSL_INC_DIR -c gsl-test.c&lt;br /&gt;
$ icc -L$GSL_LIB_DIR -o example gsl-test.o -lgsl -lgslcblas -lm&lt;br /&gt;
$ ./example&lt;br /&gt;
J0(5) = -1.775967713143382642e-01&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Useful links =&lt;br /&gt;
&lt;br /&gt;
* [https://www.gnu.org/software/gsl/doc/html/index.html Documentation (english)]&lt;br /&gt;
* [https://de.wikipedia.org/wiki/GNU_Scientific_Library Wikipedia article (german)]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/GNU_Scientific_Library Wikipedia article (english)]&lt;br /&gt;
----&lt;br /&gt;
[[Category: Numerical libraries]][[Category:BwUniCluster]][[Category:BwUniCluster_2.0]][[Category:BwForCluster_Chemistry]][[Category:BwForCluster_JUSTUS_2]]&lt;/div&gt;</summary>
		<author><name>F Wagner</name></author>
	</entry>
</feed>