Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
| documentation:tutorials:submit:jobsequentielbash [2018/01/17 12:59] – cicaluga | documentation: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: | + | Le système de batch actuellement utilisé par le PSMN est Sun Grid Engine (SGE). Sa documentation se trouve [[documentation: |
| Ligne 10: | Ligne 10: | ||
| <code bash> | <code bash> | ||
| - | qsub programme <input > | + | qsub script_seq |
| - | </ | + | |
| - | + | ||
| - | Il est possible de rajouter des options : | + | |
| - | <code bash> | + | |
| - | qsub -V -m b -m e -e / | + | |
| - | </ | + | |
| - | + | ||
| - | avec : | + | |
| - | < | + | |
| - | -V : export environment variables | + | |
| - | -m b : mail @begin | + | |
| - | -m e : mail @end | + | |
| - | -e : where to put error files | + | |
| - | -o : where to put output files | + | |
| - | -q : file d' | + | |
| - | </ | + | |
| - | + | ||
| - | **Il est plus simple de soumettre simplement un (ou plusieurs) script contenant plus d' | + | |
| - | + | ||
| - | < | + | |
| - | qsub -m b -m e monscript | + | |
| </ | </ | ||
| Ligne 46: | Ligne 25: | ||
| On peut soumettre son job en utilisant la commande suivante : | On peut soumettre son job en utilisant la commande suivante : | ||
| - | <code bash> qsub batch.sh</ | + | <code bash> qsub script_seq</ |
| - | <code bash batch.sh> | + | <code bash script_seq> |
| #!/bin/bash | #!/bin/bash | ||
| # | # | ||
| Ligne 57: | Ligne 36: | ||
| #$ -N SommeVecVecSEQ | #$ -N SommeVecVecSEQ | ||
| ### file d' | ### file d' | ||
| - | #$ -q E5-2670_test | + | #$ -q E5_test |
| ### charger l' | ### charger l' | ||
| #$ -cwd | #$ -cwd | ||
| Ligne 73: | Ligne 52: | ||
| ### configurer l' | ### configurer l' | ||
| - | module load iccifort/2017.4 | + | module load GCC/7.2.0 |
| ### execution du programme (a changer avec votre executable) | ### execution du programme (a changer avec votre executable) | ||
| Ligne 86: | Ligne 65: | ||
| Travailler dans le /scratch | Travailler dans le /scratch | ||
| - | <code bash batch.sh> | + | <code bash script_seq> |
| #!/bin/bash | #!/bin/bash | ||
| # | # | ||
| Ligne 96: | Ligne 75: | ||
| #$ -N SommeVecVecSEQ | #$ -N SommeVecVecSEQ | ||
| ### file d' | ### file d' | ||
| - | #$ -q E5-2670_test | + | #$ -q E5_test |
| ### charger l' | ### charger l' | ||
| #$ -cwd | #$ -cwd | ||
| Ligne 108: | Ligne 87: | ||
| ### configurer l' | ### configurer l' | ||
| - | module load iccifort/2017.4 | + | module load GCC/7.2.0 |
| - | # for bash: | + | ### definition |
| - | SCRATCHDIR=${SGE_O_WORKDIR/ | + | |
| - | /bin/mkdir -p $SCRATCHDIR | + | |
| - | /bin/cp -rf SommeVecVecSEQ.exe $SCRATCHDIR/ | + | if [[ -d "/scratch/Lake" ]] |
| - | ###/bin/cp -rf $INPUT $SCRATCHDIR/ | + | then |
| + | | ||
| + | elif [[ -d "/ | ||
| + | then | ||
| + | SCRATCHDIR="/ | ||
| + | else | ||
| + | echo " | ||
| + | SCRATCHDIR=" | ||
| + | fi | ||
| - | # go to scratch | + | ### |
| + | |||
| + | ### verif SCRATCHDIR | ||
| + | echo " | ||
| + | |||
| + | ### creation du repertoire de travail dans le /scratch | ||
| + | if [[ ! -d " | ||
| + | then | ||
| + | / | ||
| + | fi | ||
| + | |||
| + | ### copie des fichiers sources dans le /scratch | ||
| + | /bin/cp ${SGE_O_WORKDIR}/ | ||
| + | |||
| + | ### se placer dans le repertoire d' | ||
| cd ${SCRATCHDIR} | cd ${SCRATCHDIR} | ||
| + | |||
| ### execution du programme | ### execution du programme | ||
| - | ###### | ||
| EXECDIR=${SCRATCHDIR} | EXECDIR=${SCRATCHDIR} | ||
| - | ${EXECDIR}/ | + | ${EXECDIR}/ |
| #### | #### | ||
| + | |||
| # copy results from scratch to home | # copy results from scratch to home | ||
| - | /bin/cp -r $SCRATCHDIR/ | + | /bin/cp -r $SCRATCHDIR/ |
| - | + | ||
| - | rm -fr ${SCRATCHDIR}/ | + | # rm -fr ${SCRATCHDIR}/ |
| + | |||
| # fin | # fin | ||
| </ | </ | ||
| - | |||
| ====== Surveiller un job ====== | ====== Surveiller un job ====== | ||
| Voir [[documentation: | Voir [[documentation: | ||