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:gaussian [2020/06/23 15:00] – [Submission script Gaussian 16] shellcheck ltaulellfaq:chimie:gaussian [2022/03/03 16:29] (Version actuelle) – [Submission script Gaussian 16] tjiang
Ligne 14: Ligne 14:
  
 # trace script (debug purpose, not mandatory) # trace script (debug purpose, not mandatory)
-set -x+#set -x
 # set globals # set globals
 job="structure11" job="structure11"
Ligne 40: Ligne 40:
 export Gaussian="$g16root/g16/g16" export Gaussian="$g16root/g16/g16"
  
-cd "${SGE_O_WORKDIR}" || { echo "cannot cd to ${SGE_O_WORKDIR}"; exit 1; } +#cd "${SGE_O_WORKDIR}" || { echo "cannot cd to ${SGE_O_WORKDIR}"; exit 1; } 
-echo "########## begin env##################" +#echo "########## begin env##################" 
-env +#env 
-echo "########## end env ##################"+#echo "########## end env ##################"
 echo "########## Hostname ##################" echo "########## Hostname ##################"
 hostname hostname
  
-HOMEDIR="{SGE_O_WORKDIR}" +HOMEDIR="${SGE_O_WORKDIR}"
-cd "${HOMEDIR}" || { echo "cannot cd to ${HOMEDIR}"; exit 1; } +
 # Replace 'home' by 'scratch', from SGE_O_WORKDIR, store to SCRATCHDIR # Replace 'home' by 'scratch', from SGE_O_WORKDIR, store to SCRATCHDIR
 # check if scratch exist, create or complain # check if scratch exist, create or complain
Ligne 66: Ligne 64:
 else else
     echo "/scratch not found, cannot create ${SCRATCHDIR}"     echo "/scratch not found, cannot create ${SCRATCHDIR}"
-    #exit 1+    exit 1
 fi fi
  
-# check if scratchdir is OK +CalcDir="${SCRATCHDIR}" 
-echo "ok" >  "${SCRATCHDIR}/toto" +echo "Creating scratch for this job: ${SCRATCHDIR}" 
-Ok=$(cat "${SCRATCHDIR}/toto") +mkdir -p "${CalcDir}" 
-if [[ "${Ok}" != "ok" ]] +
-then +
-    # if scratch is unavailable, fallback to home +
-    CalcDir="${SGE_O_WORKDIR}/scratch_${job}" +
-    mkdir -p "${CalcDir}" +
-else +
-    CalcDir="${SCRATCHDIR}" +
-fi+
  
 # Gaussian specific ScratchDir # Gaussian specific ScratchDir
Ligne 121: Ligne 112:
 ls -al ls -al
  
-echo "time ${Gaussian} < ${job}.${ExtIn} > ${HOMEDIR}/${job}.${ExtOut}"+#echo "time ${Gaussian} < ${job}.${ExtIn} > ${HOMEDIR}/${job}.${ExtOut}"
  
 #/usr/bin/time ${Gaussian} < ${job}.${ExtIn} > ${HOMEDIR}/${job}.${ExtOut} #/usr/bin/time ${Gaussian} < ${job}.${ExtIn} > ${HOMEDIR}/${job}.${ExtOut}
Ligne 132: Ligne 123:
 fi fi
  
-cp -- * "${HOMEDIR}/"+ 
 +#copy back everything including the huge rwf files, normally we don't need it 
 +#cp -- * "${HOMEDIR}/" 
 +cp -- outputfiles_only "${HOMEDIR}/"
  
 # final cleanup (commented during debug) # final cleanup (commented during debug)
 rm -r "${GAUSS_SCRDIR}" rm -r "${GAUSS_SCRDIR}"
-rm -r "${CalcDir}" 
  
-#Remove Gau-* files that we don't need +
-cd "${HOMEDIR}" || { echo "cannot cd to ${HOMEDIR}"; exit 1; } +
-rm -f "Gau-*"+
  
 </code> </code>
faq/chimie/gaussian.1592924436.txt.gz · Dernière modification : 2020/08/25 15:58 (modification externe)