ORCA

ORCA

ORCA 5.0.4 (Linux x86-64, shared, OpenMPI 4.1.1 build) (OS / stack-CentOS 7.9 (glibc 2.17), OpenHPC 1.3.8, SLURM 18.08.8, Lmod, Spack 0.23.1) has been installed into the central software tree on the duhpc cluster and validated for production use by chemistry researchers. The package provides DFT, DLPNO-CCSD(T) coupled cluster, multireference methods (CASSCF/NEVPT2), and a comprehensive spectroscopy suite, complementing the existing GAMESS-US and Gaussian 16 installations.

Template for ORCA Job (orca_compute.sh):

#!/bin/bash
###############################################################################
# orca_compute.sh  -  single-node ORCA 5.0.4 job template for duhpc
#
# COPY this, then edit INPUT and the #SBATCH lines. ORCA is run by FULL PATH and
# is told its core count via '%pal nprocs N end' INSIDE the .inp file. Do NOT
# wrap ORCA in mpirun/srun -- it spawns its own MPI ranks.
#
#   cp /scratch/apps/templates/orca_compute.sh myjob.sh
#   # edit INPUT=, --ntasks, and put a matching '%pal nprocs N end' in myjob.inp
#   sbatch myjob.sh
###############################################################################
#SBATCH --job-name=orca
#SBATCH --partition=compute
#SBATCH --nodes=1
#SBATCH --ntasks=16            # <-- MUST equal '%pal nprocs 16 end' in your .inp
#SBATCH --cpus-per-task=1      # ORCA parallelism is by MPI rank, not threads
#SBATCH --mem=32G             # total memory; set to a bit above (ntasks x %maxcore_MB). Adjust per job.
#SBATCH --time=2-00:00:00      # compute partition max is 5 days
#SBATCH --output=%x.%j.out
#SBATCH --error=%x.%j.err

#------------------------------------------------------------------ user edits
INPUT="myjob"                  # base name; expects ${INPUT}.inp, writes ${INPUT}.out
#----------------------------------------------------------------------------

module purge
module load orca/5.0.4

# InfiniBand/transport settings (belt-and-braces backup; also in the OpenMPI
# build's MCA config). Cluster uses native openib BTL, not UCX. Do not change.
export OMPI_MCA_btl_openib_allow_ib=1
export OMPI_MCA_pml=ob1
export OMPI_MCA_osc="^ucx"

# Belt-and-braces against any limits.conf drift (the SIGXCPU lesson).
ulimit -t unlimited 2>/dev/null || true
ulimit -u unlimited 2>/dev/null || true
ulimit -s unlimited 2>/dev/null || true   # ORCA likes a large stack

# Per-job node-local scratch. ORCA writes MANY temp files; keep them OFF Lustre
# during the run, then only the .out/.gbw/.xyz land in your project dir.
export ORCA_SCRATCH="/tmp/orca.${SLURM_JOB_ID}.${USER}"
mkdir -p "$ORCA_SCRATCH"
cp "${INPUT}.inp" "$ORCA_SCRATCH"/
# copy any restart/gbw/xyz dependencies your input references:
# cp ${INPUT}.gbw "$ORCA_SCRATCH"/ 2>/dev/null || true
cd "$ORCA_SCRATCH"

echo "Host          : $(hostname)"
echo "ORCA binary   : $(which orca)         (must be \$ORCA_DIR/orca)"
echo "mpirun        : $(which mpirun)       (must be the DEDICATED OpenMPI 4.1.1)"
echo "Scratch       : $ORCA_SCRATCH"
echo "Cores (SLURM) : ${SLURM_NTASKS}   <-- confirm '%pal nprocs ${SLURM_NTASKS} end' is in ${INPUT}.inp"

# FULL PATH is mandatory for ORCA parallel runs.
"$ORCA_DIR/orca" "${INPUT}.inp" > "${SLURM_SUBMIT_DIR}/${INPUT}.out" 2>&1
RC=$?

# Pull back the useful artefacts, then clean scratch.
cp -f "${INPUT}".gbw "${INPUT}".xyz "${INPUT}"*.txt "${SLURM_SUBMIT_DIR}/" 2>/dev/null || true
cd "${SLURM_SUBMIT_DIR}"
rm -rf "$ORCA_SCRATCH"

echo "ORCA exit code: $RC"
grep -q "ORCA TERMINATED NORMALLY" "${INPUT}.out" \
  && echo "==> NORMAL TERMINATION" \
  || echo "==> CHECK ${INPUT}.out -- did not terminate normally"
exit $RC

Template for ORCA MPI Job (orca_mpi.sh):

#!/bin/bash
###############################################################################
# orca_mpi.sh  -  MULTI-NODE ORCA 5.0.4 job template for duhpc (mpi partition)
#
# Multi-node ORCA differs from single-node in ONE important way: scratch must
# live on a SHARED filesystem (Lustre), not node-local /tmp, because ranks on
# different nodes need to see the same working files. We therefore stage into
# /scratch/home/$USER/orca-run-<jobid>/.
#
# As always: ORCA is invoked by FULL PATH, core count comes from
# '%pal nprocs N end' in the .inp, and you NEVER wrap ORCA in mpirun/srun --
# ORCA's own mpirun reads the SLURM allocation (our OpenMPI 4.1.1 is SLURM-aware).
#
# The mpi partition enforces MinNodes=2; for a single node use orca_compute.sh
# (the submit plugin will redirect you anyway).
###############################################################################
#SBATCH --job-name=orca_mpi
#SBATCH --partition=mpi
#SBATCH --nodes=2
#SBATCH --ntasks=32            # total ranks = '%pal nprocs 32 end' in your .inp
#SBATCH --ntasks-per-node=16
#SBATCH --cpus-per-task=1
#SBATCH --mem=0               # request all memory on each node (mpi nodes are exclusive)
#SBATCH --time=2-00:00:00
#SBATCH --output=%x.%j.out
#SBATCH --error=%x.%j.err

#------------------------------------------------------------------ user edits
INPUT="myjob"
#----------------------------------------------------------------------------

module purge
module load orca/5.0.4

# InfiniBand transport (belt-and-braces backup; also set in the OpenMPI build's
# etc/openmpi-mca-params.conf). This cluster uses the native openib BTL, NOT UCX
# (the available UCX has no InfiniBand support). Do not change these.
export OMPI_MCA_btl_openib_allow_ib=1
export OMPI_MCA_pml=ob1
export OMPI_MCA_osc="^ucx"
export OMPI_MCA_btl="openib,self,vader,tcp"

ulimit -t unlimited 2>/dev/null || true
ulimit -u unlimited 2>/dev/null || true
ulimit -s unlimited 2>/dev/null || true

# SHARED scratch on Lustre (visible to every node in the allocation).
export ORCA_SCRATCH="/scratch/home/${USER}/orca-run-${SLURM_JOB_ID}"
mkdir -p "$ORCA_SCRATCH"
cp "${INPUT}.inp" "$ORCA_SCRATCH"/
# cp ${INPUT}.gbw "$ORCA_SCRATCH"/ 2>/dev/null || true   # restart files if any
cd "$ORCA_SCRATCH"

echo "Nodes         : $SLURM_JOB_NODELIST"
echo "Total ranks   : $SLURM_NTASKS  <-- confirm '%pal nprocs $SLURM_NTASKS end' in ${INPUT}.inp"
echo "ORCA binary   : $(which orca)"
echo "mpirun        : $(which mpirun)  ($(mpirun --version | head -1))"
echo "Shared scratch: $ORCA_SCRATCH"

# ORCA reads the SLURM allocation through its bundled SLURM-aware OpenMPI.
# Full path is mandatory; do NOT prepend mpirun/srun.
"$ORCA_DIR/orca" "${INPUT}.inp" > "${SLURM_SUBMIT_DIR}/${INPUT}.out" 2>&1
RC=$?

cp -f "${INPUT}".gbw "${INPUT}".xyz "${INPUT}"*.txt "${SLURM_SUBMIT_DIR}/" 2>/dev/null || true
cd "${SLURM_SUBMIT_DIR}"
rm -rf "$ORCA_SCRATCH"

echo "ORCA exit code: $RC"
grep -q "ORCA TERMINATED NORMALLY" "${INPUT}.out" \
  && echo "==> NORMAL TERMINATION" \
  || echo "==> CHECK ${INPUT}.out -- did not terminate normally (multi-node MPI/IB issue?)"
exit $RC

Getting Support

  • Email to Mr. Imran Ghani on ighani[at]ducc[dot]du[dot]ac[dot]in for any duhpc related information.
back to chemistry.du.ac.in/hpcc