CINES - Centre Informatique National de l’Enseignement Supérieur

Rechercher
Fermer ce champ de recherche.

C.I.N.E.S. Centre Informatique National de l’Enseignement Supérieur

T&T#1 Comment indexer ses sorties SLURM

Dans les fichiers de sortie SLURM, les lignes peuvent correspondre à des taches MPI différentes. Il est intéressant (dans le cas d’un débogage,  de labelliser avec le rang MPI chaque ligne du listing.

Pour arriver à cela, il suffit d’ajouter une option à la commande de lancement de son programme parallèle.

 


Pour IntelMPI

Il faut utiliser l’option -prepend rank sur la ligne de commande.

  • Exemple :
mpirun -prepend-rank -n $SLURM_NTASKS ./intelmpi_tandt1

 

  • Listing de sortie :
[0] filling array on rank 0
[1] filling array on rank 1
[2] filling array on rank 2
[3] filling array on rank 3
[3] forrtl: severe (408): fort: (2): Subscript #1 of the array VECTOR has value 4 which is greater than the upper bound of 3
[3] 
[3] Image PC Routine Line Source 
[3] intelmpi_tandt1 0000000000405DD6 Unknown Unknown Unknown
[3] intelmpi_tandt1 0000000000403E43 MAIN__ 21 tandt1.f90
[3] intelmpi_tandt1 000000000040375E Unknown Unknown Unknown
[3] libc.so.6 00007FBE1813FD5D Unknown Unknown Unknown
[3] intelmpi_tandt1 0000000000403669 Unknown Unknown Unknown

On voit clairement que c’est le rang numéro 3 qui pose problème (le « [3] » en début de ligne)

 


Pour la version BullXMPI

C’est l’option –label qu’il faut utiliser sur sa ligne de commande.

  • Exemple :
srun --label --mpi=pmi2 -K1 --resv-ports -n $SLURM_NTASKS ./bullxmpi_tandt1
  • Listing de sortie :
0: filling array on rank 0
2: filling array on rank 2
3: filling array on rank 3
1: filling array on rank 1
3: forrtl: severe (408): fort: (2): Subscript #1 of the array VECTOR has value 4 which is greater than the upper bound of 3
3: 
3: Image PC Routine Line Source 
3: bullxmpi_tandt1 000000000040AA16 Unknown Unknown Unknown
3: bullxmpi_tandt1 0000000000408A83 MAIN__ 21 tandt1.f90
3: bullxmpi_tandt1 000000000040839E Unknown Unknown Unknown
3: libc.so.6 00007F6258312D5D Unknown Unknown Unknown
3: bullxmpi_tandt1 00000000004082A9 Unknown Unknown Unknown

Ici aussi on voit le numéro du rang en début de ligne (« 3: » ).