Minimum description of the job script
Example of the job script
#!/bin/sh
#SBATCH -J CO
#SBATCH -p cmdinteractive
#SBATCH -N 1
#SBATCH -n 4
# Load the modules
module load intel_compiler/2020.4.304
module load intel_mpi/2020.4.304
module load intel_mkl/2020.4.304
# Set the executable of the STATE code
ln -fs ${HOME}/STATE/src/state/src/STATE
# Set the pseudopotential data
ln -fs ../gncpp/pot.C_pbe1
ln -fs ../gncpp/pot.O_pbe1
# Set the input/output files
INPUT_FILE=nfinp_scf
OUTPUT_FILE=nfout_scf
# Run!
ulimit -s unlimited
srun ./STATE < ${INPUT_FILE} > ${OUTPUT_FILE}
Header
#!/bin/sh
#SBATCH -J CO
#SBATCH -p cmdinteractive
#SBATCH -N 1
#SBATCH -n 4
1st line:
#!/bin/sh
Name of the shell used
2nd line:
#SBATCH -J CO
Name of the job, which is shown when you use the squeue
command
3rd line:
#SBATCH -p cmdinteractive
Name of the partition (queue)
4th line:
#SBATCH -N 1
Number of nodes
5th line:
#SBATCH -n 4
Number of MPI processes
In the case OpenMPI (thread) parallelization needs to be activated, add the following (in this case, 2 thread parallelization will be performed):
#SBATCH -c 2
In this example, we use 4 cores with 1 node.
Note
Each node of ohtaka has 128 cores, and (number of MPI processes) times (number of OpenMPI processes) should be within the resource you request.
Body
#!/bin/sh
#SBATCH -J CO
#SBATCH -p cmdinteractive
#SBATCH -N 1
#SBATCH -n 4
# Load the modules
module load intel_compiler/2020.4.304
module load intel_mpi/2020.4.304
module load intel_mkl/2020.4.304
# Set the executable of the STATE code
ln -fs ${HOME}/state/src/STATE
# Set the pseudopotential data
ln -fs ../gncpp/pot.C_pbe1
ln -fs ../gncpp/pot.O_pbe1
# Set the input/output files
INPUT_FILE=nfinp_scf
OUTPUT_FILE=nfout_scf
# Run!
ulimit -s unlimited
srun ./STATE < ${INPUT_FILE} > ${OUTPUT_FILE}
Modules
# Load the modules
module load intel_compiler/2020.4.304
module load intel_mpi/2020.4.304
module load intel_mkl/2020.4.304
Please do not change them, unless you build STATE with different modules.
STATE executable
# Set the executable of the STATE code
ln -fs ${HOME}/STATE/src/state/src/STATE
Please do not change this line, unless you don’t change the name of the STATE executable
Pseudopotentials
# Set the pseudopotential data
ln -fs ../gncpp/pot.C_pbe1
ln -fs ../gncpp/pot.O_pbe1
Please choose all the pseudopotentials you need to use and write here (change C_pbe1
and O_pbe1
, and add more lines if necessary)
Input/output files
# Set the input/output files
INPUT_FILE=nfinp_scf
OUTPUT_FILE=nfout_scf
Please change the input (nfinp_scf
) and output (nfout_scf
) file names as necessary.
You don’t have to change the following lines in the job script.
Minimum list of submission commands
Submission of a job
$ sbatch [job script]
Check the job status
$ squeue
Cancel the job
$ scancel [Job ID]
Use squeue
to know your JOB ID
Available resources on ohtaka
Partition (queue) |
Min. # of nodes |
Max. # of nodes |
Max. hours |
---|---|---|---|
cpdinteractive |
1 |
8 |
24 hours |
cmd1cpu |
1 |
1 |
24 hours |
cmd16cpu |
2 |
16 |
24 hours |
Warning
Max. number of nodes allocated for the CMD workshop is 16. If you used too may cores, other users in the course have to wait until their reqired number nodes are available. Please choose the number of cores with care. In the begininng, it is better to play within one node (128 cores) to get accustomed to use many cores/nodes.