To receive notifications about scheduled maintenance, please subscribe to the mailing-list gitlab-operations@sympa.ethz.ch. You can subscribe to the mailing-list at https://sympa.ethz.ch

Commit 3a1357cd authored by chatzidp's avatar chatzidp
Browse files

MPI on Euler

parent b4e04128
#include <stdio.h>
#include <mpi.h>
int main(int argc, char** argv)
{
int rank, nprocs, len;
char name[MPI_MAX_PROCESSOR_NAME];
MPI_Init(&argc,&argv);
MPI_Comm_size(MPI_COMM_WORLD,&nprocs);
MPI_Comm_rank(MPI_COMM_WORLD,&rank);
MPI_Get_processor_name(name, &len);
printf("Hello, world. I am %d of %d on %s\n", rank, nprocs, name);fflush(stdout);
MPI_Finalize();
return 0;
}
Hello, world. I am 0 of 1 on e2197
Hello, world. I am 8 of 12 on e2197
Hello, world. I am 6 of 12 on e2197
Hello, world. I am 9 of 12 on e2197
Hello, world. I am 1 of 12 on e2197
Hello, world. I am 2 of 12 on e2197
Hello, world. I am 3 of 12 on e2197
Hello, world. I am 4 of 12 on e2197
Hello, world. I am 5 of 12 on e2197
Hello, world. I am 10 of 12 on e2197
Hello, world. I am 7 of 12 on e2197
Hello, world. I am 0 of 12 on e2197
Hello, world. I am 11 of 12 on e2197
Hello, world. I am 0 of 24 on e2197
Hello, world. I am 1 of 24 on e2197
Hello, world. I am 2 of 24 on e2197
Hello, world. I am 3 of 24 on e2197
Hello, world. I am 4 of 24 on e2197
Hello, world. I am 5 of 24 on e2197
Hello, world. I am 6 of 24 on e2197
Hello, world. I am 7 of 24 on e2197
Hello, world. I am 8 of 24 on e2197
Hello, world. I am 9 of 24 on e2197
Hello, world. I am 10 of 24 on e2197
Hello, world. I am 11 of 24 on e2197
Hello, world. I am 12 of 24 on e2197
Hello, world. I am 13 of 24 on e2197
Hello, world. I am 14 of 24 on e2197
Hello, world. I am 15 of 24 on e2197
Hello, world. I am 16 of 24 on e2197
Hello, world. I am 17 of 24 on e2197
Hello, world. I am 18 of 24 on e2197
Hello, world. I am 19 of 24 on e2197
Hello, world. I am 20 of 24 on e2197
Hello, world. I am 21 of 24 on e2197
Hello, world. I am 22 of 24 on e2197
Hello, world. I am 23 of 24 on e2197
Hello, world. I am 0 of 36 on e2197
Hello, world. I am 1 of 36 on e2197
Hello, world. I am 2 of 36 on e2197
Hello, world. I am 7 of 36 on e2197
Hello, world. I am 3 of 36 on e2197
Hello, world. I am 5 of 36 on e2197
Hello, world. I am 8 of 36 on e2197
Hello, world. I am 6 of 36 on e2197
Hello, world. I am 4 of 36 on e2197
Hello, world. I am 9 of 36 on e2197
Hello, world. I am 11 of 36 on e2197
Hello, world. I am 13 of 36 on e2197
Hello, world. I am 14 of 36 on e2197
Hello, world. I am 15 of 36 on e2197
Hello, world. I am 10 of 36 on e2197
Hello, world. I am 17 of 36 on e2197
Hello, world. I am 18 of 36 on e2197
Hello, world. I am 23 of 36 on e2197
Hello, world. I am 16 of 36 on e2197
Hello, world. I am 20 of 36 on e2197
Hello, world. I am 21 of 36 on e2197
Hello, world. I am 22 of 36 on e2197
Hello, world. I am 12 of 36 on e2197
Hello, world. I am 19 of 36 on e2197
Hello, world. I am 29 of 36 on e2208
Hello, world. I am 30 of 36 on e2208
Hello, world. I am 31 of 36 on e2208
Hello, world. I am 32 of 36 on e2208
Hello, world. I am 33 of 36 on e2208
Hello, world. I am 34 of 36 on e2208
Hello, world. I am 35 of 36 on e2208
Hello, world. I am 24 of 36 on e2208
Hello, world. I am 25 of 36 on e2208
Hello, world. I am 26 of 36 on e2208
Hello, world. I am 27 of 36 on e2208
Hello, world. I am 28 of 36 on e2208
Hello, world. I am 1 of 48 on e2197
Hello, world. I am 2 of 48 on e2197
Hello, world. I am 3 of 48 on e2197
Hello, world. I am 4 of 48 on e2197
Hello, world. I am 5 of 48 on e2197
Hello, world. I am 7 of 48 on e2197
Hello, world. I am 10 of 48 on e2197
Hello, world. I am 11 of 48 on e2197
Hello, world. I am 13 of 48 on e2197
Hello, world. I am 9 of 48 on e2197
Hello, world. I am 12 of 48 on e2197
Hello, world. I am 14 of 48 on e2197
Hello, world. I am 15 of 48 on e2197
Hello, world. I am 16 of 48 on e2197
Hello, world. I am 17 of 48 on e2197
Hello, world. I am 18 of 48 on e2197
Hello, world. I am 19 of 48 on e2197
Hello, world. I am 20 of 48 on e2197
Hello, world. I am 21 of 48 on e2197
Hello, world. I am 6 of 48 on e2197
Hello, world. I am 8 of 48 on e2197
Hello, world. I am 22 of 48 on e2197
Hello, world. I am 23 of 48 on e2197
Hello, world. I am 0 of 48 on e2197
Hello, world. I am 37 of 48 on e2208
Hello, world. I am 38 of 48 on e2208
Hello, world. I am 39 of 48 on e2208
Hello, world. I am 40 of 48 on e2208
Hello, world. I am 41 of 48 on e2208
Hello, world. I am 42 of 48 on e2208
Hello, world. I am 43 of 48 on e2208
Hello, world. I am 44 of 48 on e2208
Hello, world. I am 45 of 48 on e2208
Hello, world. I am 46 of 48 on e2208
Hello, world. I am 47 of 48 on e2208
Hello, world. I am 26 of 48 on e2208
Hello, world. I am 28 of 48 on e2208
Hello, world. I am 29 of 48 on e2208
Hello, world. I am 30 of 48 on e2208
Hello, world. I am 31 of 48 on e2208
Hello, world. I am 32 of 48 on e2208
Hello, world. I am 33 of 48 on e2208
Hello, world. I am 34 of 48 on e2208
Hello, world. I am 35 of 48 on e2208
Hello, world. I am 36 of 48 on e2208
Hello, world. I am 24 of 48 on e2208
Hello, world. I am 25 of 48 on e2208
Hello, world. I am 27 of 48 on e2208
1) Load modules
module load gcc
module load open_mpi
2) Compile
mpicc -o example1 example1.c
3) Submit script
bsub -n 48 < script
(or ./submit.sh)
mpirun -n 1 ./example1 > output01.txt
mpirun -n 12 ./example1 > output12.txt
mpirun -n 24 ./example1 > output24.txt
mpirun -n 36 ./example1 > output36.txt
mpirun -n 48 ./example1 > output48.txt
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment