slurm
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| slurm [2025/06/30 10:59] – amcguire | slurm [2025/06/30 17:59] (current) – amcguire | ||
|---|---|---|---|
| Line 93: | Line 93: | ||
| < | < | ||
| - | (base) | + | amcguire@fe01: |
| #include < | #include < | ||
| #include < | #include < | ||
| Line 120: | Line 120: | ||
| MPI_Finalize(); | MPI_Finalize(); | ||
| } | } | ||
| + | amcguire@fe01: | ||
| + | #!/bin/bash | ||
| + | #SBATCH -J mpi-hello | ||
| + | #SBATCH -n 2 # Number of processes | ||
| + | #SBATCH -t 0: | ||
| + | #SBATCH -o hello-job.out | ||
| - | (base) amcguire@fe01: | + | # Disable the Infiniband transport for OpenMPI |
| - | (base) | + | #export OMPI_MCA_btl=" |
| + | |||
| + | # Run the job (assumes the batch script is submitted from the same directory) | ||
| + | mpirun -np 2 ./ | ||
| + | |||
| + | amcguire@fe01: | ||
| + | amcguire@fe01: | ||
| -rwxrwx--- 1 amcguire amcguire 16992 Jun 30 10:49 mpi-hello | -rwxrwx--- 1 amcguire amcguire 16992 Jun 30 10:49 mpi-hello | ||
| - | (base) | + | amcguire@fe01: |
| Submitted batch job 1196702 | Submitted batch job 1196702 | ||
| - | (base) | + | amcguire@fe01: |
| Hello from process 0 of 2 on host p001 | Hello from process 0 of 2 on host p001 | ||
| Hello from process 1 of 2 on host p002 | Hello from process 1 of 2 on host p002 | ||
| </ | </ | ||
| - | |||
| - | For convenience, | ||
| === Exclusive access to a node === | === Exclusive access to a node === | ||
/var/lib/dokuwiki/data/attic/slurm.1751299165.txt.gz · Last modified: 2025/06/30 10:59 by amcguire