Orca in SLURM Native Mode

This post describes how to run the quantum chemical software package orca on particular clusters.

The problem

Orca’s parallel implementation relies on a particular OpenMPI version (2.0.2) which is called via a system call to mpirun. Now some clusters do not support mpirun, as they run in SLURM native mode. This means that the queueing system SLURM not only allocates resources to jobs, but also creates the MPI environment. The latter one used to be the task of mpirun. The error message you might get reads

Just as the message says, you should use srun (part of SLURM) instead. Alas, the calls to mpirun are hardcoded in orca. The solution is a wrapper script similar to the suggestions here (requires registration). But now the wrapper script also has to convert the arguments taken by mpirun to those taken by srun.

The solution

  1. Create a file mpirun in a separate folder, e.g. ~/bin with the contents

  2. Make it executable with chmod +x /path/to/file/mpirun.
  3. In your jobscript (!) prepend this directory to PATH:

  4. Start orca without srun in your jobscript. Otherwise, your job will hang on the first parallelisation branch.

For reference, here is an example job script:

Leave a comment

Your e-mail address will not be published.