To run a job with MVAPICH2 under SLURM, I configured SLURM with ./configure --with-pm=no --with-pmi=slurm
Then, I have a doubt with compiling MPI jobs. The SLURM documentation mentions that we need to link the slurm_lib with the executable during the compilation step mpicc -L<path to slurm lib> -lpmi HelloWorld.c I used the /usr/local/lib/slurm as the path to the SLURM lib and got the executable a.out After compilation, can I run the executables directly using the srun -n4 --mpi=none a.out command ? Or do I have to use salloc -N2 bash sbcast the executables around srun .. Which is the correct way ?
