User Tools

Site Tools


strutture:cnaf:clusterhpc:using_the_cnaf_hpc_cluster

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
strutture:cnaf:clusterhpc:using_the_cnaf_hpc_cluster [2017/07/04 11:06]
dcesini@infn.it [Requesting Access]
strutture:cnaf:clusterhpc:using_the_cnaf_hpc_cluster [2021/02/16 14:21]
dcesini@infn.it [Submitting MPI Jobs]
Line 126: Line 126:
 </code> </code>
  
-==== Submitting MPI Jobs ====+==== Submitting MPI Jobs via mpirun.lsf (obsolete)====
  
 Currently only **OpenMPI** jobs have been tested on the HPC cluster. \\ Currently only **OpenMPI** jobs have been tested on the HPC cluster. \\
Line 187: Line 187:
 (Thanks to S.Sinigardi for sharing it)\\ (Thanks to S.Sinigardi for sharing it)\\
  
 +
 +==== Alternative MPI multinode submission ====
 +It is possible to avoid the usage of mpirun.lsf and dinamically set the mpirun machine file in the following way:
 +
 +1) Create automatically the machine file to be using in the mpirun:
 +
 +    echo $LSB_HOSTS | awk '{split($0,array," ")} END {for (i in array) printf ("%s\n",array[i])}' | awk '{count[$0]++} END {for (word in count) print word,"slots=" count[word]}' > /home/HPC/username/mymachine.txt
 +
 +2) Use this command to launch mpirun:
 +
 +    mpirun --machinefile /home/HPC/username/machinefile.txt -x PSM_SHAREDCONTEXTS_MAX=8 -np $NPROC /home/HPC/username/executablename
 +
 +A possible bsub submission is:  
 +
 +    bsub -q hpc_inf_SL7  -n 16 -R "span[ptile=8]" -o testmpimy.out -e testmpimy.err /home/HPC/username/run_this_example.sh
 +
 +where in the run_this_example.sh script you launch the previous commands:
 +
 +----run_this_example.sh----
 +
 +    #!/bin/bash
 +
 +    echo $LSB_HOSTS | awk '{split($0,array," ")} END {for (i in array) printf ("%s\n",array[i])}' | awk '{count[$0]++} END {for (word in count) print word,"slots=" count[word]}' > /home/HPC/username/mymachine.txt
 +
 +    mpirun --machinefile /home/HPC/username/machinefile.txt -x PSM_SHAREDCONTEXTS_MAX=8 -np $NPROC /home/HPC/username/executablename
 ==== Submitting GPU Jobs ==== ==== Submitting GPU Jobs ====
  
strutture/cnaf/clusterhpc/using_the_cnaf_hpc_cluster.txt ยท Last modified: 2021/03/05 14:54 by dcesini@infn.it