SLURM script for quantum espresso


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers SLURM script for quantum espresso
# 1  
Old 01-24-2012
SLURM script for quantum espresso

Hello everyone. I am trying to submit a job on quantum espresso program on a SLURM environment (parallel computing); of course SBATCH is used. I am a UNIX dummy and not sure if my script is right but i keep getting the error: sbatch: error: Batch job submission failed: job has invalid account. The script is found below. anyone can help me of what is going wrong maybe look at the script carefully and advise me (if anyone knows an easier scriot for QUANTUM ESPRESSO on SURM). ANy suggestion would be highly appreciable thanks.

Code:
#!/bin/bash 
#SBATCH -o phGB72.scf.out
#SBATCH -J scf-GB72-ph
#SBATCH --partition=superlong
#SBATCH --nodes=4
#SBATCH --cpus-per-task=1
#SBATCH --error=phGB72.scf.err
#SBATCH --nodelist=veredas81,veredas85,veredas86,veredas89
##-----------------espresso-4.3.2-----------------
EXEC_DIR=/home_cluster/fis718/eliemouj/espresso-4.3.2/GB72
##EXEC_BIN=parsec_arpack_seq.x
##EXEC_BIN=parsec_arpack_mpi.x
EXEC_BIN=/etc/profile.d/00-modules.sh
INPUTFILE=GB72ph.scf.in
##OUTPUTFILE=GB72ph.scf.out
##PP_DIR=${HOME}/parsec_pp
##PP_FILES="C_POTRE.DAT"


##-----------------parallel env-----------------
MPI=INTEL
##MPI=BULL
##MPI=SERIAL


if [ "${MPI}" == "INTEL" ]; then 
    source /opt/intel/Compiler/11.1/069/bin/iccvars.sh intel64
    source /opt/intel/Compiler/11.1/069/bin/ifortvars.sh intel64
    source /opt/intel/impi/4.0.0.028/intel64/bin/mpivars.sh
    export I_MPI_PMI_LIBRARY=/usr/lib64/libpmi.so
    export I_MPI_FABRICS=shm:dapl
fi
if [ "${MPI}" == "BULL" ]; then 
    mpibull2_devices -d=ibmr_gen2
fi
ulimit -s unlimited
ulimit -a

if [ -z "$SLURM_NPROCS" ] ; then
  if [ -z "$SLURM_NTASKS_PER_NODE" ] ; then
    SLURM_NTASKS_PER_NODE=1
  fi
  SLURM_NPROCS=$(( $SLURM_JOB_NUM_NODES * $SLURM_NTASKS_PER_NODE ))
fi
echo "SLURM_TASKS_PER_NODE    = " $SLURM_TASKS_PER_NODE   
echo "SLURM_NTASKS_PER_CORE   = " $SLURM_NTASKS_PER_CORE
echo "SLURM_NTASKS_PER_NODE   = " $SLURM_NTASKS_PER_NODE
echo "SLURM_NTASKS_PER_SOCKET = " $SLURM_NTASKS_PER_SOCKET
echo "SLURM_JOB_NUM_NODES     = " $SLURM_JOB_NUM_NODES 
echo "SLURM_NNODES            = " $SLURM_NNODES 
echo "SLURM_CPUS_PER_TASK     = " $SLURM_CPUS_PER_TASK
echo "SLURM_NPROCS            = " $SLURM_NPROCS

#-----------------create directories-----------------
cd ${SLURM_SUBMIT_DIR}                                   

#
# check if we need to restart the calculation

ID=${SLURM_JOB_NAME}.${SLURM_JOB_ID}
STORAGE_DIR=/storage/fis718/ananias/${ID}

stagein()
{
    #----------------------------------------
    # DO NOT TRUST sbcast. USE pdcp instead
    #----------------------------------------

    echo 'starting stagein'
    srun --ntasks=${SLURM_JOB_NUM_NODES} mkdir -p ${STORAGE_DIR}
    for pp in ${PP_FILES}; do
        /bin/cp -f ${PP_DIR}/${pp} ${STORAGE_DIR}/${pp}
    done
    
    /bin/cp -f ${EXEC_DIR}/${EXEC_BIN}          ${STORAGE_DIR}/${EXEC_BIN}
    /bin/cp -f ${SLURM_SUBMIT_DIR}/${INPUTFILE} ${STORAGE_DIR}/${INPUTFILE}
    ln -s ${STORAGE_DIR}/ ${SLURM_SUBMIT_DIR}
    echo 'finalizing stagein'
}

early()
{
    echo ' '
    echo ' ############ WARNING:  EARLY TERMINATION #############'
    echo ' '
    
    touch stop_scf
    sleep 120
    # and so parsec does a clean kill ...
}

trap 'early' SIGHUP SIGINT SIGUSR1 SIGUSR2
#--------------------------EXECUTION--------------------------
cd ${STORAGE_DIR}

if [ "${MPI}" == "BULL" ]; then
    srun  ./${EXEC_BIN}
fi

if [ "${MPI}" == "INTEL" ]; then
    HOSTFILE=/tmp/hosts.$SLURM_JOB_ID
    srun hostname -s | sort -u > ${HOSTFILE}
    mpdboot -n ${SLURM_NNODES} -f ${HOSTFILE} -r ssh
    mpdtrace -l
    echo "start executable"
    mpiexec -np ${SLURM_NPROCS} ${EXEC_DIR}/./${EXEC_BIN} <${INPUTFILE}
    mpdallexit
fi

#rm -f ${EXEC_BIN}
#
# send time checker daemon 

#--------------------------EXECUTION--------------------------

exit

Moderator's Comments:
Mod Comment Please use code tags!

Last edited by radoulov; 01-25-2012 at 07:45 AM..
 
Login or Register to Ask a Question

Previous Thread | Next Thread

7 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to let it go straight into espresso coding?

13578875446998765 (0 Replies)
Discussion started by: qwer123
0 Replies

2. UNIX for Dummies Questions & Answers

Quantum tape drive

Hi, Using Redhat 5.7. I have Quantum tape drive connected to the server. I am trying to install the Netbackup software. Just wondering how can I see the Quantum is connected to the server. is any command I run to see the tape drive is connected? I used to work on Solaris, I used to do... (1 Reply)
Discussion started by: samnyc
1 Replies

3. UNIX for Dummies Questions & Answers

problem in time limit of a job on slurm

Hello everyone. I am trying to do a parallel computation and the computation continues for like an hour and then it stops with the error: slurmd: *** JOB 785385 CANCELLED AT 2012-02-08T20:18:42 DUE TO TIME LIMIT *** Please can anyone tell me what is going on and how to fix the error...I... (0 Replies)
Discussion started by: lebphys78
0 Replies

4. UNIX for Dummies Questions & Answers

unable to make Q espresso

Dear all I am trying to install quantum espresso. When I implement the necessary commands (like configure and make), I get the following error: /usr/bin/ld: warning: libgfortran.so.1, needed by/usr/lib64/openmpi/1.2.4-gcc/libmpi_f90.so, may conflict with libgfortran.so.3 Can anyone suggest... (2 Replies)
Discussion started by: chevskan
2 Replies

5. Filesystems, Disks and Memory

Quantum Firware Flash

Tried to use some 18gb Quantum Atlas III's (TD18J011) in my RS/6000's but resulted in horribly slow bootup times. These were Auspex pulls. Anyone know availability of firmware updates for these? No luck searching so far. Not sure if this would help with original problem, but worth the shot.... (0 Replies)
Discussion started by: mooshkie
0 Replies

6. UNIX for Dummies Questions & Answers

Quantum/Unix

I was wondering if anyone has any information if UNIX/LINUX will be viable with quantum computing. I have very limited knowledge of quantum physics vs. Quantum computing and the correlation to UNIX/LINUX? (6 Replies)
Discussion started by: globix
6 Replies

7. UNIX for Dummies Questions & Answers

Anyone have experience with Quantum DLT8000

I know this is off subject, but I have been having fits with a Quantum M1500 library with DTL8000 drives, and figured that some of you have had some experience with them. Thanks, Chuck (1 Reply)
Discussion started by: 98_1LE
1 Replies
Login or Register to Ask a Question