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 | ||
en:documentation:tutorials:submit:jobsequentielbash [2020/05/13 14:58] – fleroux | en:documentation:tutorials:submit:jobsequentielbash [2023/12/12 12:58] (Version actuelle) – supprimée ltaulell | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | < | ||
- | |||
- | The batch system currently used at the PSMN is Sun Grid Engine (SGE). Its documentation is [[documentation: | ||
- | |||
- | |||
- | ====== Submit a job ====== | ||
- | |||
- | We use the command '' | ||
- | |||
- | <code bash> | ||
- | qsub submission_script | ||
- | </ | ||
- | |||
- | |||
- | ====== Submission scripts ====== | ||
- | |||
- | Here are some scripts for submitting a job to the PSMN batch system. | ||
- | |||
- | <note warning> Some variables have to be updated, for exemple, according to [[documentation: | ||
- | |||
- | Other [[documentation: | ||
- | |||
- | ======for sequential programs | ||
- | |||
- | You can submit your job using the following command: | ||
- | |||
- | <code bash> qsub submission_script </ | ||
- | |||
- | <code bash submission_script> | ||
- | #!/bin/bash | ||
- | # | ||
- | ### variables SGE | ||
- | ### shell of the job | ||
- | #$ -S /bin/bash | ||
- | ### job name (to change): | ||
- | #$ -N SommeVecVecSEQ | ||
- | ### queue (to change) | ||
- | #$ -q E5_test | ||
- | ### load the user environment for SGE | ||
- | #$ -cwd | ||
- | ### to export environment variables to all runtime nodes | ||
- | #$ -V | ||
- | ### mails at the beginning and end of execution | ||
- | #$ -m be | ||
- | |||
- | # go to the work / submission directory | ||
- | # important, otherwise the program is running since ~/ | ||
- | cd ${SGE_O_WORKDIR} | ||
- | |||
- | ### configure the environment (to change) | ||
- | |||
- | module load iccifort/ | ||
- | |||
- | ### program execution (to change with your executable) | ||
- | ### | ||
- | ### | ||
- | ./ | ||
- | |||
- | # fin | ||
- | </ | ||
- | |||
- | |||
- | Work in the /scratch | ||
- | |||
- | <code bash script_seq> | ||
- | #!/bin/bash | ||
- | # | ||
- | ### variables SGE | ||
- | # | ||
- | ### shell du job | ||
- | #$ -S /bin/bash | ||
- | ### nom du job (a changer) | ||
- | #$ -N SommeVecVecSEQ | ||
- | ### file d' | ||
- | #$ -q E5-2670_test | ||
- | ### charger l' | ||
- | #$ -cwd | ||
- | ### exporter les variables d' | ||
- | #$ -V | ||
- | ### mails en debut et fin d' | ||
- | #$ -m be | ||
- | # aller dans le repertoire de travail/ | ||
- | # important, sinon, le programme est lancé depuis ~/ | ||
- | cd ${SGE_O_WORKDIR} | ||
- | ### configurer l' | ||
- | |||
- | module load GCC/ | ||
- | |||
- | ### definition SCRATCHDIR | ||
- | SCRATCHDIR=/ | ||
- | ### 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} | ||
- | |||
- | ### execution du programme | ||
- | ###### | ||
- | EXECDIR=${SCRATCHDIR} | ||
- | ${EXECDIR}/ | ||
- | #### | ||
- | |||
- | # copy results from scratch to home | ||
- | /bin/cp -r $SCRATCHDIR/ | ||
- | |||
- | # rm -fr ${SCRATCHDIR}/ | ||
- | |||
- | # fin | ||
- | </ | ||
- | ====== Surveiller un job ====== | ||
- | |||
- | Voir [[documentation: |