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
Dernière révisionLes deux révisions suivantes
en:documentation:tutorials:submit [2020/05/13 14:55] – supprimée flerouxen:documentation:tutorials:submit [2020/08/25 15:58] – créée - modification externe 127.0.0.1
Ligne 1: Ligne 1:
 +<note>**REMNDER** : allo-psmn is just a connexion server; it allows you to have access to your files and to transfer them, **and that's all**. To work, you must to connect, from ''allo-psmn'', to [[documentation:clusters:services#serveurs_de_compilation|one of  compilation servers]]</note>
  
 +
 +The batch system currently used at the PSMN is Sun Grid Engine (SGE). 
 +
 +Its documentation is [[en:documentation:tools:sge|on this page]] as well as [[en:faq:accueil|in the F.A.Q.]].
 +
 +
 +====== Submit a job ======
 +
 +We use the command ''qsub'' to submit a job to the batch system of PSMN. For exemple :
 +
 +<code bash>
 +qsub submission_script
 +</code>
 +
 +
 +
 +====== Submission scripts ======
 +
 +Here are some scripts for submitting a job to the PSMN batch system.
 +
 +<note warning>Some variables have to be modified according  to [[documentation:clusters:batch#les_files_d_attente|the actual configurations of the queues]].</note>
 +
 +Other [[documentation:examples:tutorials_scripts|exemples of submission scripts ]], [[documentation:examples:submit_scripts|exemples of submission scripts]] as well as [[documentation:tutorials:build:accueil|tutorials]].
 +
 +
 +======for parallel job (shell bash) ======
 +
 +
 +You can submit your job using the following command:
 +
 +<code bash> qsub submission_script </code>
 +
 +<code bash submission_script>
 +#!/bin/bash
 +#
 +### variables SGE
 +### shell of the job
 +#$ -S /bin/bash
 +### job name (to change)
 +#$ -N SommeVecVecPAR
 +### queue (to change)
 +#$ -q E5_test
 +### parallel environment & nb cpu (NSLOTS) (to change)
 +#$ -pe test_debian 2
 +### 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
 +     
 +# given by the batch system
 +HOSTFILE=${TMPDIR}/machines
 +
 +# go to the work / submission directory
 +# important, otherwise the program is running since ~/
 +cd ${SGE_O_WORKDIR}
 +
 +# init env (should be in ~/.profile)
 +source /usr/share/lmod/lmod/init/bash
 +
 +### configure the environment (to change)
 +module load iccifort/2017.4
 +module load intel/2017.4b/OpenMPI/3.0.0
 +
 +### au besoin, forcer l'env OpenMPI
 +PREFIX="/applis/PSMN/debian9/software/Compiler/intel/2017.4b/OpenMPI/3.0.0/"
 +MPIRUN=${PREFIX}/bin/mpirun
 +
 +### program execution (to change with your executable)
 +###EXECDIR=${HOME}/Formations/Parallel
 +###${MPIRUN} -v -prefix ${PREFIX} -mca btl vader,openib,self -hostfile ${HOSTFILE} -np ${NSLOTS} ${EXECDIR}/SommeVecVecPAR.exe
 +
 +${MPIRUN} -v -prefix ${PREFIX} -mca btl vader,openib,self -np ${NSLOTS} SommeVecVecPAR.exe
 +
 +# fin
 +</code>
 +
 +
 +<note important>:!: OpenMPI 1.5.4 et supérieures \\
 +ATTENTION au hostfile :!:</note>
 +====== Surveiller un job ======
 +
 +See corresponding [[documentation:tools:sge#surveiller_les_jobs|the documentation]]  and [[documentation:examples:qstat_cli| the examples]].