Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
faq:chimie:lammps [2020/06/22 14:44] – [Submission script] tjiangfaq:chimie:lammps [2022/03/03 16:29] (Version actuelle) – [Submission script] tjiang
Ligne 1: Ligne 1:
-====== AMBER ======+====== LAMMPS ======
 ===== Submission script ===== ===== Submission script =====
-<code bash sub_amber17.sh>+<code bash sub_lammps.sh>
 #!/bin/bash #!/bin/bash
 # #
Ligne 18: Ligne 18:
  
 # donné par le système de batch # donné par le système de batch
-HOSTFILE=${TMPDIR}/machines+HOSTFILE="${TMPDIR}/machines"
  
-cd ${SGE_O_WORKDIR} +if [[ -d "/scratch" ]]
- +
-if [[ -d "/scratch/Chimie" ]] +
-then +
-    SCRATCHDIR=/scratch/Chimie/$USER/$JOB_ID/ +
-elif [[ -d "/scratch/Lake" ]] +
-then +
-    SCRATCHDIR=/scratch/Lake/$USER/$JOB_ID/ +
-elif [[ -d "/scratch/E5N" ]]+
 then then
-    SCRATCHDIR=/scratch/E5N/$USER/$JOB_ID/+    ### for Lake scratch / CLG* SLG* queues 
 +    if [[ -e "/scratch/Lake/lake-gfs-scratch" ]] 
 +    then 
 +    SCRATCHDIR="/scratch/Lake/${USER}/${JOB_ID}/" 
 +    ### for E5N scratch / E5* queues 
 +    elif [[ -e "/scratch/E5N/E5N-gfs-scratch" ]] 
 +    then 
 +    SCRATCHDIR="/scratch/E5N/${USER}/${JOB_ID}/
 +    ### for Chimie scratch 
 +    elif [[ -e "/scratch/Chimie/chimie-gfs-scratch" ]] 
 +    then 
 +    SCRATCHDIR="/scratch/Chimie/${USER}/${JOB_ID}/" 
 +    else 
 +    echo "/scratch not found, cannot create ${SCRATCHDIR}" 
 +    exit 1 
 +    fi
 else else
-    echo "/scratch not found, cannot create ${SCRATCHDIR}, fall back to the current directory+    echo "/scratch not found, cannot create ${SCRATCHDIR}" 
-    SCRATCHDIR=${SGE_O_WORKDIR}+    exit 1
 fi fi
 +
 # Using /tmp as scratch instead # Using /tmp as scratch instead
-# SCRATCHDIR=/tmp/$USER/$JOB_ID/+# SCRATCHDIR="/tmp/${USER}/${JOB_ID/}"
  
-echo $SCRATCHDIR +echo "Creating scratch for this job: ${SCRATCHDIR}" 
-/bin/mkdir -p $SCRATCHDIR+/bin/mkdir -p "${SCRATCHDIR}"
  
 # modifier les noms des fichiers # modifier les noms des fichiers
-cp -f in*.lmp data*.lmp ${SCRATCHDIR}/+cd "${SGE_O_WORKDIR}" || { echo "cannot cd to ${SGE_O_WORKDIR}"; exit 1; } 
 +cp -f in*.lmp data*.lmp "${SCRATCHDIR}" 
 +#cp -f in*.lmp data*.lmp pair*.lmp "${SCRATCHDIR}"
  
-cd ${SCRATCHDIR} 
  
 # modifier noms des fichiers # modifier noms des fichiers
-mpirun -v -hostfile ${HOSTFILE} -np ${NSLOTS} lammps.sse -in in.eq.lmp > out.lmp +cd "${SCRATCHDIR}" || { echo "cannot cd to ${SCRATCHDIR}"; exit 1; } 
-if [[ "$SCRATCHDIR" != "$SGE_O_WORKDIR" ]] +mpirun -v -hostfile "${HOSTFILE}-np "${NSLOTS}lammps.sse -in in.eq.lmp > out.lmp 
-then +cp -rpf -- outputfiles_only "${SGE_O_WORKDIR}" 
-    cp -rpf *  ${SGE_O_WORKDIR}/ +rm -f "${SCRATCHDIR}" 
-    rm -f ${SCRATCHDIR}/ +
-fi+
 </code> </code>
faq/chimie/lammps.1592837074.txt.gz · Dernière modification : 2020/08/25 15:58 (modification externe)