ORCA
ORCA is a flexible, efficient and easy-to-use general purpose tool for quantum chemistry with specific emphasis on spectroscopic properties of open-shell molecules. It features a wide variety of standard quantum chemical methods ranging from semiempirical methods to DFT to single- and multireference correlated ab initio methods. It can also treat environmental and relativistic effects. ORCA Homepage
Available Modules¶
module load ORCA/6.1.1-OpenMPI-4.1.5
Licensing requirements¶
ORCA is free, closed-source software, released as precompiled binaries. Its licence allows it to be used for academic research only, and each research group is expected to register with the ORCA developers. If you're unsure whether you can use ORCA, or a particular version of it, Contact our Support Team.
Example batch scripts¶
These batch scripts run ORCA on 16 cores.
Use the one for your partition, as --cores-per-socket differs (see NUMA settings).
#!/bin/bash -e
#SBATCH --job-name ORCA_job
#SBATCH --account nesi99991
#SBATCH --time 01:00:00
#SBATCH --partition genoa
#SBATCH --ntasks 16
#SBATCH --mem-per-cpu 1G
#SBATCH --cores-per-socket 21
#SBATCH --threads-per-core 1
#SBATCH --distribution *:block:*
#SBATCH --mem-bind local
module purge
module load ORCA/6.1.1-OpenMPI-4.1.5
export OMP_PROC_BIND=true
export OMP_PLACES=cores
srun --job-name=print_binding_stats bash -c "echo -e \"Task #\${SLURM_PROCID} is running on node \$(hostname).\n\$(hostname) has the following NUMA configuration:\n\$(lscpu | grep -i --color=none numa)\nTask #\${SLURM_PROCID} has \$(nproc) CPUs, their core IDs are \$(taskset -c -p \$\$ | awk '{print \$NF}')\n===========================================\""
# ORCA must be called by its full path
orca_exe=$(which orca)
# Don't use srun here: ORCA starts its own MPI processes
${orca_exe} MyInput.inp
#!/bin/bash -e
#SBATCH --job-name ORCA_job
#SBATCH --account nesi99991
#SBATCH --time 01:00:00
#SBATCH --partition milan
#SBATCH --ntasks 16
#SBATCH --mem-per-cpu 1G
#SBATCH --cores-per-socket 16
#SBATCH --threads-per-core 1
#SBATCH --distribution *:block:*
#SBATCH --mem-bind local
module purge
module load ORCA/6.1.1-OpenMPI-4.1.5
export OMP_PROC_BIND=true
export OMP_PLACES=cores
srun --job-name=print_binding_stats bash -c "echo -e \"Task #\${SLURM_PROCID} is running on node \$(hostname).\n\$(hostname) has the following NUMA configuration:\n\$(lscpu | grep -i --color=none numa)\nTask #\${SLURM_PROCID} has \$(nproc) CPUs, their core IDs are \$(taskset -c -p \$\$ | awk '{print \$NF}')\n===========================================\""
# ORCA must be called by its full path
orca_exe=$(which orca)
# Don't use srun here: ORCA starts its own MPI processes
${orca_exe} MyInput.inp
Replace the following:
nesi99991with your project code.MyInput.inpwith your ORCA input file.
Input file settings¶
Your ORCA input file must set the number of cores, and the memory for each core in MB:
%pal nprocs 16 end
%maxcore 800
- Set
nprocsto the value of--ntasks. To choose it, see Benchmark your ORCA jobs. - Set
%maxcoreto about 80% of--mem-per-cpu, as ORCA can use more memory than%maxcore(see ORCA's Memory Settings).
NUMA settings¶
Each Mahuika node is split into NUMA domains: groups of cores with the memory closest to them. If your job's cores are spread over several NUMA domains, ORCA can run slower, and its runtime can vary between runs (see When NUMA domains matter). The example batch scripts have these settings to avoid this:
#SBATCH --cores-per-socket 21
#SBATCH --threads-per-core 1
#SBATCH --distribution *:block:*
#SBATCH --mem-bind local
export OMP_PROC_BIND=true
export OMP_PLACES=cores
#SBATCH --cores-per-socket 16
#SBATCH --threads-per-core 1
#SBATCH --distribution *:block:*
#SBATCH --mem-bind local
export OMP_PROC_BIND=true
export OMP_PLACES=cores
- The four
#SBATCHoptions ask Slurm for cores next to each other, filling one NUMA domain before the next. - The two
exportlines stop threads moving between cores.
What the options mean explains each one.
Only --cores-per-socket differs between Genoa and Milan.
It's the number of cores in one NUMA domain, which Slurm treats as a socket.
Before starting ORCA, each batch script runs a print_binding_stats step,
which prints the cores each task was given and the node's NUMA domains:
srun --job-name=print_binding_stats bash -c "echo -e \"Task #\${SLURM_PROCID} is running on node \$(hostname).\n\$(hostname) has the following NUMA configuration:\n\$(lscpu | grep -i --color=none numa)\nTask #\${SLURM_PROCID} has \$(nproc) CPUs, their core IDs are \$(taskset -c -p \$\$ | awk '{print \$NF}')\n===========================================\""
Check a job's NUMA domains explains its output. If your runtime varies a lot between runs with the same input, check this output for cores spread over several NUMA domains.
Benchmark your ORCA jobs¶
Past a certain number of cores, more cores add little speed, but still use up your project's allocation. To find that number for your calculation, use the ORCA benchmarking tool. It runs one calculation on a range of core counts, then reports how its speed and CPU efficiency change. Its GitHub page explains how to install and use it.
You only need to benchmark one calculation that is typical of those you plan to run.
Checkpointing¶
Warning
Use checkpointing for any job that runs for more than a day.
ORCA saves checkpoint data, mainly the molecular orbitals, in a GBW (geometry, basis, wavefunction) file.
For the input file MyInput.inp, it's MyInput.gbw, in the directory ORCA runs in.
To restart from a GBW file:
- Rename the GBW file so its name differs from your input file's, for example to
checkpoint.gbw. Otherwise ORCA overwrites it as soon as it starts. -
Add these lines to your input file:
! moread %moinp "checkpoint.gbw" -
Run the calculation.
To restart from a GBW file made by an older version of ORCA, see restarting calculations in the ORCA manual.