Generating Submission Scripts#
orto can generate submission scripts for your job scheduler of choice using orto gen job.
Currently, only SLURM is supported, though support for additional schedulers may be added in future releases.
Setup#
To use the job submission script generation feature, you need to first set the orto_orca_load environment variable - this specifies the command(s) used to load the ORCA module on your system.
Typically a module system like Lmod or Environment Modules is used to manage software on HPC systems, and you will need to set this variable accordingly - for example, when using Environment Modules, this may be set as
export orto_orca_load="orca/6.0.1"
We advise that you set this to the version of ORCA you use most frequently.
You may also want to include other modules that are required for your calculations, such as gcc or openmpi, in the same environment variable - for example
export orto_orca_load="gcc/12.2.0 openmpi/4.1.1 orca/6.0.1"
Note
Consult your system administrator or the documentation for your HPC system to determine the correct command(s) to load ORCA and any other required modules.
Alternatively, you can provide the --orca_load optional argument in orto gen job to specify the command to load ORCA for each job submission script - this overrides the environment variable and so can be used to submit specific jobs with different versions of ORCA.
Local scratch#
If using an HPC system which provides so called “local scratch” space on the compute node, you can inform orto of this by defining the environment variable orto_local_scratch. For example, the local scratch space on an HPC system’s compute node may be located at /scratch and so you would set the environment variable as
export orto_local_scratch="/scratch"
During the job, orto will create a temporary directory in this local scratch space and copy the input files to it before running the calculation. This can improve performance for large calculations, and is particularly useful when using networked file systems which may be slow or unreliable. All files will be copied back to the submission directory when the job completes. If this environment variable is not set, orto will run the calculation in the submission directory. Regardless of whether local scratch is used, orto will only ever write the output (.out) file to the submission directory.
Usage#
To submit a job run
orto gen job <input_file>
where <input_file> is the path to your ORCA input file.
Important
You must always have the number of cores and amount of memory specified in the input file.
Note
orto is fairly agnostic to the contents of the input file, but edge-cases might not work as expected.
If you encounter any problems, please head to the bugs page to find how to report them to us.
Cores and Memory#
The number of cores and amount of memory must be specified in the input file and, by default, orto will read these numbers and use them when submitting a job.
To override this, use the --n_procs and --memory optional arguments in orto gen job - this may be useful if your submission system imposes per-core memory limits.
NBO#
If you wish to use NBO within an orca calculation, the orto_nbo_load environment variable must contain the command to used to load an NBO module - this is typically done using a module system like Lmod or Environment Modules - for example, when using Environment Modules, this may be set as
export orto_nbo_load="nbo/6.0"
Optional Arguments#
Additional command line arguments for orto gen job can be listed by running
orto gen job -h
Example#
The following minimal example is a simple ORCA input file for a geometry optimisation of benzene using the BP86 functional and the def2-svp basis set, with 16 cores and 2000 MB of memory per-core.
!BP86 def2-svp OPT
%PAL NPROCS 16 END
%maxcore 2000
*xyzfile 0 1 benzene.xyz
12
Benzene
H 1.2194 -0.1652 2.1600
C 0.6825 -0.0924 1.2087
C -0.7075 -0.0352 1.1973
H -1.2644 -0.0630 2.1393
C -1.3898 0.0572 -0.0114
H -2.4836 0.1021 -0.0204
C -0.6824 0.0925 -1.2088
H -1.2194 0.1652 -2.1599
C 0.7075 0.0352 -1.1973
H 1.2641 0.0628 -2.1395
C 1.3899 -0.0572 0.0114
H 2.4836 -0.1022 0.0205
In this example the structure is located in a separate .xyz file, but it could equally be specified directly within the input file itself.
To submit a job for this calculation, simply run
orto gen job benzene.inp
You should then see an message informing you that a submission script was created and subsequently submitted.
Jobscript written to benzene.slm
Submitted batch job 123456
and run squeue or similar to check the status of the job.
The job will be given the same name as the input file, and the output file(s) for this calculation should appear in the current directory when the job starts running. If using local scratch only the output file will be present when the job is running, and files will be copied back to the current directory when the job completes.
user@computer ~/benzene $ ls
benzene.6718675.e benzene.123456.o benzene.inp benzene.out benzene.slm benzene.xyz ...