User Tools

Site Tools


quick_start

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
quick_start [2021/04/09 14:13] nicoquick_start [2021/04/09 14:41] (current) nico
Line 17: Line 17:
     1) gcc/XXXX/slurm/XXXX     1) gcc/XXXX/slurm/XXXX
  
-In this documentation, XXXX stands for a version number.+In this documentation, XXXX stands for a version number. If not, you can load the module this way :
  
 +  nicolas.greneche@magi1:~$ module load gcc/XXXX/slurm/XXXX
  
 +You can also update your .bashrc in your home directory to add this command. On standard configurations, you can add the command at the end of the file.
  
 +Now it's time to compile your code to run on Magi. You may have to load additionnal modules to access libraries of compilers required to your code. In this starting guide, we compile and run an MPI code. So, we have to load the OpenMPI module :
  
 +  nicolas.greneche@magi1:~$ module load gcc/XXXX/openmpi/XXXX
  
 +Then, we can compile the code :
 +
 +  nicolas.greneche@magi1:~/Formation/C/openmpi$ mpicc -o hellompi hellompi.c
 +
 +If you are luck enough to have free nodes on Magi, you can try to run your code interactively (to check if everything is OK) :
 +
 +  nicolas.greneche@magi1:~/Formation/C/openmpi$ srun -N 2 -n 20 -p MISC-56c-VERYSHORT ./hellompi
 +  Hello world from process 1 of 20 at magi110
 +  Hello world from process 11 of 20 at magi114
 +  Hello world from process 12 of 20 at magi114
 +  Hello world from process 2 of 20 at magi110
 +  Hello world from process 13 of 20 at magi114
 +  Hello world from process 3 of 20 at magi110
 +  Hello world from process 14 of 20 at magi114
 +  Hello world from process 4 of 20 at magi110
 +  Hello world from process 15 of 20 at magi114
 +  Hello world from process 5 of 20 at magi110
 +  Hello world from process 16 of 20 at magi114
 +  Hello world from process 17 of 20 at magi114
 +  Hello world from process 6 of 20 at magi110
 +  Hello world from process 18 of 20 at magi114
 +  Hello world from process 7 of 20 at magi110
 +  Hello world from process 19 of 20 at magi114
 +  Hello world from process 10 of 20 at magi114
 +  Hello world from process 8 of 20 at magi110
 +  Hello world from process 9 of 20 at magi110
 +  Hello world from process 0 of 20 at magi110
quick_start.1617970435.txt.gz · Last modified: 2021/04/09 14:13 by nico