Difference between revisions of "HowTo:adf"

From CAC Wiki
Jump to: navigation, search
(Location of the program and setup)
(ADF)
 
(58 intermediate revisions by 2 users not shown)
Line 1: Line 1:
= ADF =
+
== ADF ==
  
 
This is a short help file on how to use the computational Quantum Chemistry code "ADF" on our clusters. We require all users of this software to sign a statement. The software can only be accessed by persons who belong to a specific Unix group. See details below.  
 
This is a short help file on how to use the computational Quantum Chemistry code "ADF" on our clusters. We require all users of this software to sign a statement. The software can only be accessed by persons who belong to a specific Unix group. See details below.  
  
== Features ==
+
'''Important: This software is no longer licensed on our systems. Compute Canada users can still [https://docs.computecanada.ca/wiki/ADF run ADF on Graham].'''
  
 +
 +
{|  style="border-spacing: 8px;"
 +
| valign="top" width="50%" style="padding:1em; border:1px solid #aaaaaa; background-color:#e1eaf1; border-radius:7px" |
 +
 +
=== Features ===
 
ADF stands for "'''A'''msterdam '''D'''ensity '''F'''unctional" and denotes a package of programs that uses Density Functional Theory (DFT) for electronic and molecular structure calculations. The package is geared towards chemists and physicists with an interest in the structure of molecules and solids.
 
ADF stands for "'''A'''msterdam '''D'''ensity '''F'''unctional" and denotes a package of programs that uses Density Functional Theory (DFT) for electronic and molecular structure calculations. The package is geared towards chemists and physicists with an interest in the structure of molecules and solids.
  
Line 18: Line 23:
 
ADF handles geometry optimizations, transition states, reaction paths, and infrared frequencies. It allows the calculation of a variety of properties, ranging from UV spectra (requiring the treatment of excited states) to NMR chemical shifts and spin-spin couplings (where the use of Slater-type bases is of great use). The BAND code can be used for calculations on polymers, surfaces and bulk solids.
 
ADF handles geometry optimizations, transition states, reaction paths, and infrared frequencies. It allows the calculation of a variety of properties, ranging from UV spectra (requiring the treatment of excited states) to NMR chemical shifts and spin-spin couplings (where the use of Slater-type bases is of great use). The BAND code can be used for calculations on polymers, surfaces and bulk solids.
  
== Location of the program and setup ==
+
=== Location of the program and setup ===
  
The present version of ADF is 2016.101. The programs in the ADF package reside in /opt/adf. To use ADF on our machines, it is required that you read our licensing agreement and [http://www.hpcvl.org/sites/default/files/ADF_statement.pdf sign a statement]. You will then be made a member of a Unix group adf, which enables you to run the software.
+
The present version of ADF is 2017.108. The programs in the ADF package reside in /global/software/adf. To use ADF on our machines, it is required that you read our licensing agreement and [https://info.cac.queensu.ca/wiki/files/cac-adf-statement.pdf sign a statement]. You will then be made a member of a Unix group adf, which enables you to run the software.
  
 
ADF requires the sourcing of a setup script to function properly:
 
ADF requires the sourcing of a setup script to function properly:
  
 
<pre>
 
<pre>
source /opt/adf/adf2016.101/adfrc.sh
+
source /global/software/adf/adf2017.108/adfrc.sh
 
</pre>
 
</pre>
  
Line 32: Line 37:
 
The above settings is best applied through a call to usepackage on our system. Issuing the command
 
The above settings is best applied through a call to usepackage on our system. Issuing the command
  
<pre>use adf</pre>
+
<pre>module load adf</pre>
  
 
will take care of this, as well as including the $ADFBIN directory in the $PATH. This command may also be placed into a login shell setup file (.bash_profile).
 
will take care of this, as well as including the $ADFBIN directory in the $PATH. This command may also be placed into a login shell setup file (.bash_profile).
  
== Scratch files ==
+
=== Scratch files ===
  
One of the settings is the environment variable '''GAUSS_SCRDIR''' which is required to redirect the temporary files that Gaussian uses to the proper scratch space, presently  
+
One of the settings is the environment variable '''SCM_TMPDIR''' which is required to redirect the temporary files that ADF uses to the proper scratch space, presently  
  
<pre>export GAUSS_SCRDIR=/scratch/hpcXXXX</pre>
+
<pre>
 +
/global/scratch/hpcXXXX
 +
</pre>
  
where hpcXXXX stands for your username. If for some reason Gaussian does not terminate normally (e.g. a job gets cancelled), it leaves behind large '''scratch files''' which you may have to delete manually. To check if such files exist, type
+
where hpcXXXX stands for your username. If for some reason ADF does not terminate normally (e.g. a job gets cancelled), it leaves behind large '''scratch files''' which you may have to delete manually. To check if such files exist, use the ls command. Usually the scratch files are in sub-directories that start with '''kid_''':
  
<pre>ls -lt /scratch/hpcXXXX</pre>
+
<pre>
 +
$ ls $SCM_TMPDIR
 +
kid_0.ax49ZF  kid_0.d9VDRE  kid_0.LQQtwj  kid_0.VLH2Ek  kid_0.Zjn0mZ
 +
kid_0.BBskVK  kid_0.DIHNlB  kid_0.m1wEx2  kid_0.vMalpJ  kid_1.1LZdFQ
 +
kid_0.cdUtDi  kid_0.fnWCrB  kid_0.pyWQ5u  kid_0.wElmpK  kid_2.mFNeFQ
 +
kid_0.cK4iVj  kid_0.HVRsbX  kid_0.QLOJsE  kid_0.XHby8B  kid_3.5t9REQ
 +
kid_0.AcBCde  kid_0.cmepvE  kid_0.kJ85iE  kid_0.sX0Ddm  kid_0.Y5xTMN
 +
</pre>
  
Once you have determined that the scratch files are no longer needed (because the program that used them is not running any more), you can delete them by typing
+
Once you have determined that the scratch files are no longer needed (because the program that used them is not running any more), you can delete them:
  
<pre>rm /scratch/hpcxxxx/Gau-*</pre>  
+
<pre>
 +
$ rm -r $SCM_TMPDIR/kid_*
 +
$ ls $SCM_TMPDIR
 +
$
 +
</pre>  
  
 
Cleaning up the scratch space is the user's responsibility. If it is not done regularly, it can cause jobs to terminate, and much work to be lost.
 
Cleaning up the scratch space is the user's responsibility. If it is not done regularly, it can cause jobs to terminate, and much work to be lost.
 +
|}
  
== Running Gaussian from a command line==
+
{|  style="border-spacing: 8px;"
 +
| valign="top" width="50%" style="padding:1em; border:1px solid #aaaaaa; background-color:#f7f7f7; border-radius:7px" |
  
To run Gaussian on our systems, you have to belong to a '''user group g98''' (it's called that for historical reason, but it applies to all versions of Gaussian). You need to read our license agreement and [http://www.hpcvl.org/sites/default/files/gaussian-statement.pdf signed a statement] to be included in this user group. Once you are, you can access the executables.
+
=== Running ADF from a command line===
  
A computation is performed by preparing an input file and pipe it to standard input of the program '''g09'''. Standard output should be caught in a log-file. We suggest you use the '''extensions''' ''.g09 for input'' files and ''.log for results''.
+
The following instructions assume that you are a member of the Unix group "adf". The instructions in this section are only useful if you need to run test jobs of a short duration. If you want to run a production job, please refer to to instructions on how to start a ADF batch job.
  
Interactively, the command line to invoke Gaussian is thus:
+
Once program usage is set up through the "use" command, the program(s) can be run:
  
<pre> g09 < test.g09 >test.gout </pre>
+
<pre>
 +
adf <in >out
 +
</pre>
  
This will only work if you are a member of the g98 group and have set the environment correctly. Note that the '''interactive execution of Gaussian is only meant for test runs'''.
+
Instructions about the job are read from standard input, which has been redirected from a file in in the above command lines. Commonly an input file will be constructed to specify what calculation is to be run. The output of the program(s) goes to "standard output" and has been redirected to an output file out above. Note that the output of these programs is commonly thousands of lines long and should therefore be redirected in any case.
  
Gaussian input files are explained in the "User's Reference". It is impossible to give an outline here. Sample files can be found in
+
The construction of a proper input file for ADF is an involved process, and is outside the scope of this help file. Detailed instructions can be found in the [https://www.scm.com/doc/ADF/index.html ADF User's Guide], which should be studied before the program can be used properly. As an initial hint, here is a  sample input file:
  
<pre>/opt/gaussian/g09/bsd/logs</pre>
+
<pre>
 +
title benzene BP/SZ bondorders tol=0.05
  
'''Note:''' It is absolutely essential to have a good idea about the size and complexity of your calculations before you start a Gaussian job. Many of the methods mentioned above have terrible scaling properties, i.e. the computational cost grows very quickly with the number of electrons, degrees of freedom, or number of basis functions used. We suggest you start with a small basis set and a cheap method, and then slowly increase those parameters.
+
define
 +
cc=1.38476576
 +
ccc=120.0
 +
dih=0.0
 +
hc=1.07212846
 +
hcc= 120.0
 +
dih2=180.0
 +
end
  
== Submitting (parallel) Gaussian jobs ==
+
atoms Z-matrix
 +
C  0 0 0
 +
C  1 0 0  cc
 +
C  2 1 0  cc ccc
 +
C  3 2 1  cc ccc dih
 +
C  4 3 2  cc ccc dih
 +
C  5 4 3  cc ccc dih
 +
H  2 1 3  hc hcc dih2
 +
H  3 2 4  hc hcc dih2
 +
H  4 3 5  hc hcc dih2
 +
H  5 4 3  hc hcc dih2
 +
H  6 5 4  hc hcc dih2
 +
H  1 2 3  hc hcc dih2
 +
end
  
If you want to run Gaussian on several processors on our machines, you have to include a line in your input file:
+
basis
 +
Type SZ
 +
Core None
 +
end
  
<pre>%nproc=8</pre>
+
symmetry NOSYM
  
where we assume that you want to use 8 processors (cores, threads).
+
xc
 +
  gga becke perdew
 +
end
  
'''It is mandatory to submit a Gaussian job script through our scheduling software''' (see our [[HowTo:Scheduler|Scheduler Help File]] for details).  
+
bondorder tol=0.05 printall
  
Here is a "bare bones" sample of a Gaussian submission script:
+
noprint sfo
 +
</pre>
 +
 
 +
The input consists of several units, separated by blank lines, starting with a keyword, and ending with the statement END. For instance, the atoms in a molecules may be specified by issuing the keyword atoms, followed by one line with the atom name and "Z-matrix" relative coordinates for each atom, and closing with end (case insensitive).
 +
 
 +
'''Note:''' It is absolutely essential to have a good idea about the size and complexity of your calculations before you start a ADF job. Many of the methods have terrible scaling properties, i.e. the computational cost grows very quickly with the number of electrons, degrees of freedom, or number of basis functions used. We suggest you start with a small basis set and a cheap method, and then slowly increase those parameters.
 +
 
 +
=== Submitting (parallel) ADF jobs ===
 +
 
 +
In most cases, you will run ADF in batch mode through a scheduler. This is '''mandatory''' for production jobs, i.e. jobs of more than about 1 hr duration that use multiple processes, or multiple jobs submitted as part of a project. Production jobs that are submitted outside of the load balancing software will be terminated by the system administrator.
 +
 
 +
The advantage to submit jobs via a load balancing software is that the software will automatically find the resources required and put the job onto a node that has a low load. This will help executing the job faster.
 +
 
 +
Production jobs on Frontenac are submitted via [https://slurm.schedmd.com/overview.html SLURM]. To obtain details, read our [[SLURM|SLURM help file]]. For an ADF batch job, this means that rather than issuing the commands directly, you wrap them into a batch script. Here is an example for such a script:
  
 
<pre>
 
<pre>
#! /bin/bash
+
#!/bin/bash
#$ -S /bin/bash
+
#SBATCH --job-name=ADF_test
#$ -q abaqus.q
+
#SBATCH --mail-type=ALL
#$ -l qname=abaqus.q
+
#SBATCH --mail-user=myEmail@whatever.com
#$ -cwd
+
#SBATCH --output=STD.out
#$ -V
+
#SBATCH --error=STD.err
#$ -M hpcXXXX@localhost
+
#SBATCH --nodes=1
#$ -m be
+
#SBATCH --ntasks=8
#$ -o STD.out
+
#SBATCH --cpus-per-taskl=1
#$ -e STD.err
+
#SBATCH --time=30:00
#$ -pe shm.pe 8
+
#SBATCH --mem=1000
g09 < sample.g09 > sample.log
+
module load adf
 +
export SCM_TMPDIR=$TMPDIR
 +
adf -n $SLURM_NTASKS < testsys.adf
 
</pre>
 
</pre>
  
* The first 6 lines of the script make sure the right shell is used, the program executes on the correct cluster, and all necessary setup is done.
+
This script needs to be altered by replacing all the relevant items. It sets all the necessary environment variables through the "module load adf" command, and then starts the program. The lines in the script that start with #SBATCH are interpreted SLURM as directives for the execution of the program.
* An email address for notifications is specified in the '''#$ -M''' line. We suggest "hpcXXXX@localhost" (hpcXXXX stands for the username). Place a file '''.forward''' containing your actual email address into your home directory.
+
 
* The '''-o''' and '''-e''' lines are used to tell the system where to write "standard output" and "standard error", i.e. the screen output.
+
For instance the line "#SBATCH --mail-type=ALL" tells SLURM to notify the user via email when the job starts, finishes, or is cancelled. The line beginning with "#SBATCH --mail-user=" tells the scheduler about the email address of the user.
* The '''#$ -pe gaussian.pe 8''' line specifies the number of processors the scheduler will allocate (8 in this example). It is crucial to choose the same number as specified in the '''%nrocs=''' line of the input file.  
+
 
 +
The --output and --error lines determine whence the standard input and the standard error are to be redirected. Since the job is going to be executed in batch, no terminal is available as a default for these.  
 +
 
 +
The ADF package is able to execute in parallel using MPI. This means that some tasks may be done in a fraction of the time it takes to execute on a single CPU.
 +
 
 +
ADF parallel jobs contains several lines that determine the number of parallel processes to be used. The --nodes line determines how many nodes a involved (at present this needs to be 1), while -ntasks relates how many tasks (MPI processes) are being used. This number is crucial, as it is being re-used as an option in the "adf" command line through the internal variable SLURM_NTASKS. In the example we chose 8. Finally, then --cpus-per-task option sets the number of cores per task to 1. This should be set to 1 for ADF jobs.
 +
 
 +
Once properly modified, the script (let's call it "adf.sh") can be submitted by typing
 +
 
 +
<pre>sbatch adf.sh</pre>
 +
 
 +
|}
 +
 
 +
{|  style="border-spacing: 8px;"
 +
| valign="top" width="50%" style="padding:1em; border:1px solid #aaaaaa; background-color:#e1eaf1; border-radius:7px" |
  
The script (let's call it g09.sh) is submitted by the qsub command:
+
=== Migration SW -> Frontenac ===
  
<pre>qsub g09.sh</pre>
+
The following is a list of differences concerning ADF usage on tghe SW cluster vs the new Frontenac cluster. The main impact comes from the different scheduler.
  
This must be done from the working directory, i.e. the directory that contains the input file and is supposed to contain the output. Also make sure that you have set up gaussian ('''use g09''') before you submit a job.
+
{| class="wikitable" style="float:left; margin-right: 25px;"
 +
!colspan="3"| '''Changes when migrating from SW cluster (SGE) to Frontenac (SLURM)'''
 +
|-
 +
|
 +
|'''SW (swlogin1)'''
 +
|'''Frontenac (caclogin01)'''
 +
|-
 +
| '''Version'''
 +
| 2016.01
 +
| 2017.01
 +
|-
 +
| '''Scheduler'''
 +
| Sun Grid Engine (SGE)
 +
| SLURM
 +
|-
 +
| '''GUI available'''
 +
| yes
 +
| yes
 +
|-
 +
| '''Queue specification <br> in submit script'''
 +
| none
 +
| none
 +
|-
 +
| '''Login node for <br> submission'''
 +
| swlogin1
 +
| caclogin01
 +
|-
 +
| '''Setup command'''
 +
| use adf
 +
| module load adf
 +
|}
  
== Licensing ==
+
=== Licensing ===
  
Gaussian is a licensed program. The license held by the Centre for Advanced Computing is limited to our computers at our main site. That means that any of our users can use the program on our machines (but nowhere else), whether they are located at Queen's or not.
+
ADF is a licensed program. The license held by the Centre for Advanced Computing is limited to our computers at our main site. That means that any of our users can use the program on our machines (but nowhere else), whether they are located at Queen's or not.
  
We require users of Gaussian to [http://www.hpcvl.org/sites/default/files/gaussian-statement.pdf sign a statement] in which they state that they are informed about the [http://www.hpcvl.org/sites/default/files/g09-licence.pdf terms of the license] to be included in the Gaussian user group named "g98". Please fax the completed statement to (613) 533-2015 or scan/email to [mailto:cac.admin@queensu.ca cac.admin@queensu.ca].
+
We require users of ADF to [https://info.cac.queensu.ca/wiki/files/cac-adf-statement.pdf sign a statement] in which they state that they are informed about the [https://info.cac.queensu.ca/wiki/files/cac-adf-license.pdf terms of the license] to be included in the ADF user group named "adf". Please fax the completed statement to (613) 533-2015 or scan/email to [mailto:cac.admin@queensu.ca cac.admin@queensu.ca].
  
== Where can I get more detailed information ? ==
+
=== Help ===
  
* To learn the basics about Gaussian input and output, refer to the [http://www.gaussian.com/g_tech/g_ur/g09help.htm Gaussian 09 User's Reference].  
+
* To learn the basics about Gaussian input and output, refer to the [https://www.scm.com/documentation/ADF/index/ ADF 2017 Manual].  
* For templates, and to get many examples, check out /opt/gaussian/g09/bsd/examples.
+
* For templates, and to get many examples, check out [https://www.scm.com/documentation/ADF/Examples/Examples/ https://www.scm.com/documentation/ADF/Examples/Examples/].
* The [http://www.gaussian.com Gaussian web page] contains a lot of information.
+
* The [https://www.scm.com/adf-modeling-suite/ ADF web page] contains a lot of information.  
* For hardcore computational chemists, there is the [http://www.gaussian.com/g_tech/g09iop.htm Gaussian IOPs Reference], useful if you want to tinker with default settings and internal parameters.  
+
* These [http://www.gaussian.com/g_prod/books.htm can be purchased from Gaussian Inc.].
+
 
* '''Send [mailto:cac.help@queensu.ca|email to cac.help@queensu.ca]'''. We're happy to help.
 
* '''Send [mailto:cac.help@queensu.ca|email to cac.help@queensu.ca]'''. We're happy to help.
 +
|}

Latest revision as of 15:58, 21 August 2023

ADF

This is a short help file on how to use the computational Quantum Chemistry code "ADF" on our clusters. We require all users of this software to sign a statement. The software can only be accessed by persons who belong to a specific Unix group. See details below.

Important: This software is no longer licensed on our systems. Compute Canada users can still run ADF on Graham.


Features

ADF stands for "Amsterdam Density Functional" and denotes a package of programs that uses Density Functional Theory (DFT) for electronic and molecular structure calculations. The package is geared towards chemists and physicists with an interest in the structure of molecules and solids.

The ADF package consists of two main components:

  • ADF for molecular calculations
  • BAND for calculations on solids

Unlike most other molecular/solid/electronic structure codes, ADF employs "Slater-type" basis sets, ie, functions that have an exponential behaviour, which are more suitable for the description of chemical systems than the more commonly employed "Gaussian type" ones. The downside of this are computational difficulties that may be circumvented by numerical integration. Since DFT depends largely on numerical integration anyhow, the "Slater approach" is particularly well-suited for DFT code.

ADF is arguably the best DFT code available at this time for transition metal compounds and solids.

ADF handles geometry optimizations, transition states, reaction paths, and infrared frequencies. It allows the calculation of a variety of properties, ranging from UV spectra (requiring the treatment of excited states) to NMR chemical shifts and spin-spin couplings (where the use of Slater-type bases is of great use). The BAND code can be used for calculations on polymers, surfaces and bulk solids.

Location of the program and setup

The present version of ADF is 2017.108. The programs in the ADF package reside in /global/software/adf. To use ADF on our machines, it is required that you read our licensing agreement and sign a statement. You will then be made a member of a Unix group adf, which enables you to run the software.

ADF requires the sourcing of a setup script to function properly:

source /global/software/adf/adf2017.108/adfrc.sh

This script sets environment variables that are necessary for proper program execution and are used for the system to find executables and data files such as basis sets. Among others, SCMLICENSE is used by the license manager of the program to find a machine specific license file.

The above settings is best applied through a call to usepackage on our system. Issuing the command

module load adf

will take care of this, as well as including the $ADFBIN directory in the $PATH. This command may also be placed into a login shell setup file (.bash_profile).

Scratch files

One of the settings is the environment variable SCM_TMPDIR which is required to redirect the temporary files that ADF uses to the proper scratch space, presently

/global/scratch/hpcXXXX

where hpcXXXX stands for your username. If for some reason ADF does not terminate normally (e.g. a job gets cancelled), it leaves behind large scratch files which you may have to delete manually. To check if such files exist, use the ls command. Usually the scratch files are in sub-directories that start with kid_:

$ ls $SCM_TMPDIR
kid_0.ax49ZF  kid_0.d9VDRE  kid_0.LQQtwj  kid_0.VLH2Ek  kid_0.Zjn0mZ
kid_0.BBskVK  kid_0.DIHNlB  kid_0.m1wEx2  kid_0.vMalpJ  kid_1.1LZdFQ
kid_0.cdUtDi  kid_0.fnWCrB  kid_0.pyWQ5u  kid_0.wElmpK  kid_2.mFNeFQ
kid_0.cK4iVj  kid_0.HVRsbX  kid_0.QLOJsE  kid_0.XHby8B  kid_3.5t9REQ
kid_0.AcBCde  kid_0.cmepvE  kid_0.kJ85iE  kid_0.sX0Ddm  kid_0.Y5xTMN

Once you have determined that the scratch files are no longer needed (because the program that used them is not running any more), you can delete them:

$ rm -r $SCM_TMPDIR/kid_*
$ ls $SCM_TMPDIR
$

Cleaning up the scratch space is the user's responsibility. If it is not done regularly, it can cause jobs to terminate, and much work to be lost.

Running ADF from a command line

The following instructions assume that you are a member of the Unix group "adf". The instructions in this section are only useful if you need to run test jobs of a short duration. If you want to run a production job, please refer to to instructions on how to start a ADF batch job.

Once program usage is set up through the "use" command, the program(s) can be run:

adf <in >out 

Instructions about the job are read from standard input, which has been redirected from a file in in the above command lines. Commonly an input file will be constructed to specify what calculation is to be run. The output of the program(s) goes to "standard output" and has been redirected to an output file out above. Note that the output of these programs is commonly thousands of lines long and should therefore be redirected in any case.

The construction of a proper input file for ADF is an involved process, and is outside the scope of this help file. Detailed instructions can be found in the ADF User's Guide, which should be studied before the program can be used properly. As an initial hint, here is a sample input file:

title benzene BP/SZ bondorders tol=0.05

define
 cc=1.38476576
 ccc=120.0
 dih=0.0
 hc=1.07212846
 hcc= 120.0
 dih2=180.0
end

atoms Z-matrix
 C  0 0 0
 C  1 0 0  cc
 C  2 1 0  cc ccc
 C  3 2 1  cc ccc dih
 C  4 3 2  cc ccc dih
 C  5 4 3  cc ccc dih
 H  2 1 3  hc hcc dih2
 H  3 2 4  hc hcc dih2
 H  4 3 5  hc hcc dih2
 H  5 4 3  hc hcc dih2
 H  6 5 4  hc hcc dih2
 H  1 2 3  hc hcc dih2
end

basis
 Type SZ
 Core None
end

symmetry NOSYM

xc
  gga becke perdew
end

bondorder tol=0.05 printall

noprint sfo

The input consists of several units, separated by blank lines, starting with a keyword, and ending with the statement END. For instance, the atoms in a molecules may be specified by issuing the keyword atoms, followed by one line with the atom name and "Z-matrix" relative coordinates for each atom, and closing with end (case insensitive).

Note: It is absolutely essential to have a good idea about the size and complexity of your calculations before you start a ADF job. Many of the methods have terrible scaling properties, i.e. the computational cost grows very quickly with the number of electrons, degrees of freedom, or number of basis functions used. We suggest you start with a small basis set and a cheap method, and then slowly increase those parameters.

Submitting (parallel) ADF jobs

In most cases, you will run ADF in batch mode through a scheduler. This is mandatory for production jobs, i.e. jobs of more than about 1 hr duration that use multiple processes, or multiple jobs submitted as part of a project. Production jobs that are submitted outside of the load balancing software will be terminated by the system administrator.

The advantage to submit jobs via a load balancing software is that the software will automatically find the resources required and put the job onto a node that has a low load. This will help executing the job faster.

Production jobs on Frontenac are submitted via SLURM. To obtain details, read our SLURM help file. For an ADF batch job, this means that rather than issuing the commands directly, you wrap them into a batch script. Here is an example for such a script:

#!/bin/bash
#SBATCH --job-name=ADF_test
#SBATCH --mail-type=ALL
#SBATCH --mail-user=myEmail@whatever.com
#SBATCH --output=STD.out
#SBATCH --error=STD.err
#SBATCH --nodes=1
#SBATCH --ntasks=8
#SBATCH --cpus-per-taskl=1
#SBATCH --time=30:00
#SBATCH --mem=1000
module load adf
export SCM_TMPDIR=$TMPDIR
adf -n $SLURM_NTASKS < testsys.adf

This script needs to be altered by replacing all the relevant items. It sets all the necessary environment variables through the "module load adf" command, and then starts the program. The lines in the script that start with #SBATCH are interpreted SLURM as directives for the execution of the program.

For instance the line "#SBATCH --mail-type=ALL" tells SLURM to notify the user via email when the job starts, finishes, or is cancelled. The line beginning with "#SBATCH --mail-user=" tells the scheduler about the email address of the user.

The --output and --error lines determine whence the standard input and the standard error are to be redirected. Since the job is going to be executed in batch, no terminal is available as a default for these.

The ADF package is able to execute in parallel using MPI. This means that some tasks may be done in a fraction of the time it takes to execute on a single CPU.

ADF parallel jobs contains several lines that determine the number of parallel processes to be used. The --nodes line determines how many nodes a involved (at present this needs to be 1), while -ntasks relates how many tasks (MPI processes) are being used. This number is crucial, as it is being re-used as an option in the "adf" command line through the internal variable SLURM_NTASKS. In the example we chose 8. Finally, then --cpus-per-task option sets the number of cores per task to 1. This should be set to 1 for ADF jobs.

Once properly modified, the script (let's call it "adf.sh") can be submitted by typing

sbatch adf.sh

Migration SW -> Frontenac

The following is a list of differences concerning ADF usage on tghe SW cluster vs the new Frontenac cluster. The main impact comes from the different scheduler.

Changes when migrating from SW cluster (SGE) to Frontenac (SLURM)
SW (swlogin1) Frontenac (caclogin01)
Version 2016.01 2017.01
Scheduler Sun Grid Engine (SGE) SLURM
GUI available yes yes
Queue specification
in submit script
none none
Login node for
submission
swlogin1 caclogin01
Setup command use adf module load adf

Licensing

ADF is a licensed program. The license held by the Centre for Advanced Computing is limited to our computers at our main site. That means that any of our users can use the program on our machines (but nowhere else), whether they are located at Queen's or not.

We require users of ADF to sign a statement in which they state that they are informed about the terms of the license to be included in the ADF user group named "adf". Please fax the completed statement to (613) 533-2015 or scan/email to cac.admin@queensu.ca.

Help