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
documentation:tutorials:submit:jobsequentielbash [2018/10/04 16:31] – [Soumettre un job] cicalugadocumentation:tutorials:submit:jobsequentielbash [2021/01/14 15:55] (Version actuelle) – [job séquentiel (shell bash)] cicaluga
Ligne 2: Ligne 2:
  
  
-Le système de batch actuellement utilisé par le PSMN est Sun Grid Engine (SGE). Sa documentation se trouve [[documentation:tools:sge|à cette page]] ainsi que [[faq:sge|dans la F.A.Q.]].+Le système de batch actuellement utilisé par le PSMN est Sun Grid Engine (SGE). Sa documentation se trouve [[documentation:tools:sge|à cette page]] ainsi que [[faq:accueil|dans la F.A.Q.]].
  
  
Ligne 52: Ligne 52:
  
 ### configurer l'environnement (a changer) ### configurer l'environnement (a changer)
-module load GCC/7.2.0 +module load GCC/7.2.0
  
 ### execution du programme (a changer avec votre executable) ### execution du programme (a changer avec votre executable)
Ligne 75: Ligne 75:
 #$ -N SommeVecVecSEQ #$ -N SommeVecVecSEQ
 ### file d'attente (a changer) ### file d'attente (a changer)
-#$ -q E5-2670_test+#$ -q E5_test
 ### charger l'environnement utilisateur pour SGE ### charger l'environnement utilisateur pour SGE
 #$ -cwd #$ -cwd
Ligne 89: Ligne 89:
 module load GCC/7.2.0  module load GCC/7.2.0 
  
-for bash: +### definition SCRATCHDIR en fonction de la partition existent
-SCRATCHDIR=${SGE_O_WORKDIR/home/scratch} +
-/bin/mkdir -p $SCRATCHDIR+
  
-/bin/cp -rf SommeVecVecSEQ.exe $SCRATCHDIR/ +if [[ -d "/scratch/Lake" ]] 
-###/bin/cp -rf $INPUT $SCRATCHDIR/+then 
 +    SCRATCHDIR="/scratch/Lake/${USER}/${JOB_ID}/" 
 +elif [[ -d "/scratch/E5N" ]] 
 +then 
 +    SCRATCHDIR="/scratch/E5N/${USER}/${JOB_ID}/"  
 +else 
 +    echo "Cannot create ${SCRATCHDIR} on /scratch, creating it in the current directory" 
 +    SCRATCHDIR="${SGE_O_WORKDIR}/scratch/" 
 +fi
  
-go to scratch (instead of workdir) before running binary+###SCRATCHDIR=/scratch/E5N/votre_login/Formations/Sequentiel 
 + 
 +### verif SCRATCHDIR 
 +echo "SCRATCHDIR=${SCRATCHDIR}" 
 + 
 +### creation du repertoire de travail dans le /scratch 
 +if [[ ! -d "${SCRATCHDIR}" ]]  
 +then 
 +   /bin/mkdir -p ${SCRATCHDIR} 
 +fi  
 + 
 +### copie des fichiers sources dans le /scratch 
 +/bin/cp ${SGE_O_WORKDIR}/* ${SCRATCHDIR}/ 
 +  
 +### se placer dans le repertoire d'execution AVANT le lancement du programme
 cd ${SCRATCHDIR} cd ${SCRATCHDIR}
 + 
 ### execution du programme ### execution du programme
-######EXECDIR=/scratch/cicaluga/tempo 
 EXECDIR=${SCRATCHDIR} EXECDIR=${SCRATCHDIR}
-${EXECDIR}/SommeVecVecSEQ.exe > output+${EXECDIR}/SommeVecVecSEQ.exe > output_scratch
 ####./SommeVecVecSEQ.exe ####./SommeVecVecSEQ.exe
 + 
 # copy results from scratch to home # copy results from scratch to home
-/bin/cp -r $SCRATCHDIR/output $SGE_O_WORKDIR/ +/bin/cp -r $SCRATCHDIR/output_scratch $SGE_O_WORKDIR/output_home 
- +  
-rm -fr ${SCRATCHDIR}/+rm -fr ${SCRATCHDIR}/
 + 
 # fin # fin
 </code> </code>
- 
  
 ====== Surveiller un job ====== ====== Surveiller un job ======
  
 Voir [[documentation:tools:sge#surveiller_les_jobs|la documentation]] qui correspond et [[documentation:examples:qstat_cli|les exemples]]. Voir [[documentation:tools:sge#surveiller_les_jobs|la documentation]] qui correspond et [[documentation:examples:qstat_cli|les exemples]].
documentation/tutorials/submit/jobsequentielbash.1538670666.txt.gz · Dernière modification : 2020/08/25 15:58 (modification externe)