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édenteDernière révisionLes deux révisions suivantes | ||
en:documentation:tutorials:submit:jobsequentielbash [2018/10/04 17:11] – cicaluga | en:documentation:tutorials:submit:jobsequentielbash [2020/08/25 15:58] – modification externe 127.0.0.1 | ||
---|---|---|---|
Ligne 2: | Ligne 2: | ||
- | The batch system currently used at the PSMN is Sun Grid Engine (SGE). Its documentation is [[documentation: | + | The batch system currently used at the PSMN is Sun Grid Engine (SGE). Its documentation is [[documentation: |
Ligne 58: | Ligne 58: | ||
./ | ./ | ||
- | # fin | + | # end |
</ | </ | ||
- | Travailler dans le /scratch | + | Work in the |
- | <code bash script_seq_scratch> | + | <code bash script_seq> |
#!/bin/bash | #!/bin/bash | ||
# | # | ||
### variables SGE | ### variables SGE | ||
# | # | ||
- | ### shell du job | + | ### shell of the job |
#$ -S /bin/bash | #$ -S /bin/bash | ||
- | ### nom du job (a changer) | + | ### job name (to change): |
#$ -N SommeVecVecSEQ | #$ -N SommeVecVecSEQ | ||
- | ### file d' | + | ### queue (to change) |
#$ -q E5-2670_test | #$ -q E5-2670_test | ||
- | ### charger l' | + | ### load the user environment for SGE |
#$ -cwd | #$ -cwd | ||
- | ### exporter les variables | + | ### export environment |
#$ -V | #$ -V | ||
- | ### mails en debut et fin d'execution | + | ### start and end of execution |
#$ -m be | #$ -m be | ||
- | # aller dans le repertoire de travail/soumission | + | # go to the work / submission directory |
- | # important, | + | # important, |
cd ${SGE_O_WORKDIR} | cd ${SGE_O_WORKDIR} | ||
- | ### configurer l' | + | ### configure the environment |
module load GCC/ | module load GCC/ | ||
- | ### definition | + | ### SCRATCHDIR |
SCRATCHDIR=/ | SCRATCHDIR=/ | ||
- | ### verif SCRATCHDIR | + | ### SCRATCHDIR |
echo " | echo " | ||
- | ### creation | + | ### creation |
if [[ ! -d " | if [[ ! -d " | ||
then | then | ||
Ligne 99: | Ligne 99: | ||
fi | fi | ||
- | ### copie des fichiers sources dans le /scratch | + | ### copy source files to /scratch |
/bin/cp ${SGE_O_WORKDIR}/ | /bin/cp ${SGE_O_WORKDIR}/ | ||
- | ### se placer dans le repertoire d'execution | + | ### move into the execution |
cd ${SCRATCHDIR} | cd ${SCRATCHDIR} | ||
- | ### execution | + | ### program |
###### | ###### | ||
EXECDIR=${SCRATCHDIR} | EXECDIR=${SCRATCHDIR} | ||
Ligne 116: | Ligne 116: | ||
# rm -fr ${SCRATCHDIR}/ | # rm -fr ${SCRATCHDIR}/ | ||
- | # fin | + | # end |
</ | </ | ||
- | |||
====== Surveiller un job ====== | ====== Surveiller un job ====== | ||
Voir [[documentation: | Voir [[documentation: |