#!/bin/bash

#SBATCH --job-name=QE-7.3.0-GPU-case
#SBATCH --partition=ampere
#SBATCH --time=10:00
#SBATCH --gres=gpu:1        # Select N=1,2,...,8 GPUS
#SBATCH --ntasks=1          # Allocate 1 task per GPU
                            # for optimal performance


module load centos8 nvhpc/23.11 openmpi/4.1.6
module load quantum-espresso/7.3


export ESPRESSO_PSEUDO="${PWD}"

echo "running the geometry relaxation for CO...\c"
echo "Run starts :  `date +'%Y-%m-%d %H:%M:%S:%N '` "
echo "Running Quantum Espresso with" $SLURM_NTASKS "MPI tasks"

# Optional: Disable NVFORTRAN warning
# https://docs.nvidia.com/hpc-sdk/compilers/hpc-compilers-user-guide/index.html#env-vars-nv-no-stop-msg
export NO_STOP_MESSAGE=yes

time srun pw.x < co.rx.in > output.log

echo "Run ends : `date +'%Y-%m-%d %H:%M:%S:%N '` "
