Answer the question
In order to leave comments, you need to log in
MPI. Is everything running on the same thread?
At the university, they set a laboratory for parallelizing a program using OpenMPI. First, I tried to run "Hello World" and judging by the output, everything is running in one process...
int main (int argc, char **argv) {
int rank, size;
MPI_Init (&argc, &argv);
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
MPI_Comm_size(MPI_COMM_WORLD, &size);
printf( "Hello world from process %d of %d\n", rank, size );
MPI_Finalize();
return 0;
}
Answer the question
In order to leave comments, you need to log in
Problem solved. The reason was in crooked hands)
At the beginning I installed mpich2 and it didn’t work (although everything started up fine for a friend), then I installed openmpi and it all worked)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question