[mvapich-discuss] MPI_THREAD_MULTIPLE is not supported...
Evren Yurtesen IB
eyurtese at abo.fi
Tue Jun 26 04:12:39 EDT 2012
I am having getting threaded programs to run. All I get is
MPI_THREAD_SINGLE. The test code seems to function with mpich2... Also as
a side question, how do I see or select which channel is used at runtime?
Compile options:
-bash-4.1$ /export/modules/apps/mvapich2/1.8/gnu/bin/mpich2version
MVAPICH2 Version: 1.8
MVAPICH2 Release date: Mon Apr 30 14:50:19 EDT 2012
MVAPICH2 Device: ch3:mrail
MVAPICH2 configure: --prefix=/export/modules/apps/mvapich2/1.8/gnu
--with-valgrind=/export/modules/tools/valgrind/3.7.0/include/valgrind
--enable-fast=O3 --enable-shared --enable-threads=runtime
MVAPICH2 CC: gcc -O3 -march=corei7 -mtune=corei7 -O3
MVAPICH2 CXX: c++ -O3 -march=corei7 -mtune=corei7 -O3
MVAPICH2 F77: gfortran -O3 -march=corei7 -mtune=corei7 -O3
MVAPICH2 FC: gfortran -O3 -march=corei7 -mtune=corei7 -O3
-bash-4.1$
I have a test program as follows:
#include <mpi.h>
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[]) {
int node_id=-1,totalnodes=-1,provided=-1;
MPI_Init_thread(&argc, &argv, MPI_THREAD_MULTIPLE, &provided);
MPI_Comm_size(MPI_COMM_WORLD, &totalnodes);
MPI_Comm_rank(MPI_COMM_WORLD, &node_id);
if(provided != MPI_THREAD_MULTIPLE) {
fprintf(stderr, "This MPI implementation does not support MPI_THREAD_MULTIPLE.\n"
"Use another impelmentation that supports MPI_THREAD_MULTIPLE.\n");
fprintf(stderr, "Provided was ");
if(provided == MPI_THREAD_SINGLE)
fprintf(stderr, "MPI_THREAD_SINGLE");
else if(provided == MPI_THREAD_FUNNELED)
fprintf(stderr, "MPI_THREAD_FUNNELED");
else if(provided == MPI_THREAD_SERIALIZED)
fprintf(stderr, "MPI_THREAD_SERIALIZED");
else if(provided == MPI_THREAD_MULTIPLE)
fprintf(stderr, "MPI_THREAD_MULTIPLE");
else
fprintf(stderr, "Unknown");
fprintf(stderr, "\n");
MPI_Finalize();
exit(-1);
}
MPI_Finalize();
exit(0);
}
Thanks!
Evren
More information about the mvapich-discuss
mailing list