Commit b32e308e authored by Lorenz Huedepohl's avatar Lorenz Huedepohl
Browse files

Also check MPI Thread level in C test programs

parent 9c6345ed
......@@ -95,6 +95,7 @@ int main(int argc, char** argv) {
int np_cols, np_rows;
int my_prow, my_pcol;
int mpi_comm;
int provided_mpi_thread_level;
/* blacs */
int my_blacs_ctxt, sc_desc[9], info;
......@@ -109,9 +110,21 @@ int main(int argc, char** argv) {
int value;
#ifdef WITH_MPI
MPI_Init(&argc, &argv);
MPI_Init_thread(&argc, &argv, MPI_THREAD_MULTIPLE, &provided_mpi_thread_level);
if (provided_mpi_thread_level != MPI_THREAD_MULTIPLE) {
fprintf(stderr, "MPI ERROR: MPI_THREAD_MULTIPLE is not provided on this system\n");
MPI_Comm_size(MPI_COMM_WORLD, &nprocs);
MPI_Comm_rank(MPI_COMM_WORLD, &myid);
nprocs = 1;
myid = 0;
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