Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check result of MPI_Query_thread in if statements #122

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 4 additions & 9 deletions EXAMPLE/pddrive.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,23 +200,18 @@ int main(int argc, char *argv[])

if(grid.iam==0){
MPI_Query_thread(&omp_mpi_level);
switch (omp_mpi_level) {
case MPI_THREAD_SINGLE:
if (omp_mpi_level == MPI_THREAD_SINGLE) {
printf("MPI_Query_thread with MPI_THREAD_SINGLE\n");
fflush(stdout);
break;
case MPI_THREAD_FUNNELED:
} else if (omp_mpi_level == MPI_THREAD_FUNNELED) {
printf("MPI_Query_thread with MPI_THREAD_FUNNELED\n");
fflush(stdout);
break;
case MPI_THREAD_SERIALIZED:
} else if (omp_mpi_level == MPI_THREAD_SERIALIZED) {
printf("MPI_Query_thread with MPI_THREAD_SERIALIZED\n");
fflush(stdout);
break;
case MPI_THREAD_MULTIPLE:
} else if (omp_mpi_level == MPI_THREAD_MULTIPLE) {
printf("MPI_Query_thread with MPI_THREAD_MULTIPLE\n");
fflush(stdout);
break;
}
}

Expand Down
13 changes: 4 additions & 9 deletions EXAMPLE/pddrive3d.c
Original file line number Diff line number Diff line change
Expand Up @@ -267,23 +267,18 @@ main (int argc, char *argv[])

if(grid.iam==0) {
MPI_Query_thread(&omp_mpi_level);
switch (omp_mpi_level) {
case MPI_THREAD_SINGLE:
if (omp_mpi_level == MPI_THREAD_SINGLE) {
printf("MPI_Query_thread with MPI_THREAD_SINGLE\n");
fflush(stdout);
break;
case MPI_THREAD_FUNNELED:
} else if (omp_mpi_level == MPI_THREAD_FUNNELED) {
printf("MPI_Query_thread with MPI_THREAD_FUNNELED\n");
fflush(stdout);
break;
case MPI_THREAD_SERIALIZED:
} else if (omp_mpi_level == MPI_THREAD_SERIALIZED) {
printf("MPI_Query_thread with MPI_THREAD_SERIALIZED\n");
fflush(stdout);
break;
case MPI_THREAD_MULTIPLE:
} else if (omp_mpi_level == MPI_THREAD_MULTIPLE) {
printf("MPI_Query_thread with MPI_THREAD_MULTIPLE\n");
fflush(stdout);
break;
}
fflush(stdout);
}
Expand Down
13 changes: 4 additions & 9 deletions EXAMPLE/pddrive3d1.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,23 +200,18 @@ main (int argc, char *argv[])

if(grid.iam==0) {
MPI_Query_thread(&omp_mpi_level);
switch (omp_mpi_level) {
case MPI_THREAD_SINGLE:
if (omp_mpi_level == MPI_THREAD_SINGLE) {
printf("MPI_Query_thread with MPI_THREAD_SINGLE\n");
fflush(stdout);
break;
case MPI_THREAD_FUNNELED:
} else if (omp_mpi_level == MPI_THREAD_FUNNELED) {
printf("MPI_Query_thread with MPI_THREAD_FUNNELED\n");
fflush(stdout);
break;
case MPI_THREAD_SERIALIZED:
} else if (omp_mpi_level == MPI_THREAD_SERIALIZED) {
printf("MPI_Query_thread with MPI_THREAD_SERIALIZED\n");
fflush(stdout);
break;
case MPI_THREAD_MULTIPLE:
} else if (omp_mpi_level == MPI_THREAD_MULTIPLE) {
printf("MPI_Query_thread with MPI_THREAD_MULTIPLE\n");
fflush(stdout);
break;
}
fflush(stdout);
}
Expand Down
13 changes: 4 additions & 9 deletions EXAMPLE/pddrive3d2.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,23 +207,18 @@ main (int argc, char *argv[])

if(grid.iam==0) {
MPI_Query_thread(&omp_mpi_level);
switch (omp_mpi_level) {
case MPI_THREAD_SINGLE:
if (omp_mpi_level == MPI_THREAD_SINGLE) {
printf("MPI_Query_thread with MPI_THREAD_SINGLE\n");
fflush(stdout);
break;
case MPI_THREAD_FUNNELED:
} else if (omp_mpi_level == MPI_THREAD_FUNNELED) {
printf("MPI_Query_thread with MPI_THREAD_FUNNELED\n");
fflush(stdout);
break;
case MPI_THREAD_SERIALIZED:
} else if (omp_mpi_level == MPI_THREAD_SERIALIZED) {
printf("MPI_Query_thread with MPI_THREAD_SERIALIZED\n");
fflush(stdout);
break;
case MPI_THREAD_MULTIPLE:
} else if (omp_mpi_level == MPI_THREAD_MULTIPLE) {
printf("MPI_Query_thread with MPI_THREAD_MULTIPLE\n");
fflush(stdout);
break;
}
fflush(stdout);
}
Expand Down
13 changes: 4 additions & 9 deletions EXAMPLE/pddrive3d3.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,23 +204,18 @@ main (int argc, char *argv[])

if (grid.iam==0) {
MPI_Query_thread(&omp_mpi_level);
switch (omp_mpi_level) {
case MPI_THREAD_SINGLE:
if (omp_mpi_level == MPI_THREAD_SINGLE) {
printf("MPI_Query_thread with MPI_THREAD_SINGLE\n");
fflush(stdout);
break;
case MPI_THREAD_FUNNELED:
} else if (omp_mpi_level == MPI_THREAD_FUNNELED) {
printf("MPI_Query_thread with MPI_THREAD_FUNNELED\n");
fflush(stdout);
break;
case MPI_THREAD_SERIALIZED:
} else if (omp_mpi_level == MPI_THREAD_SERIALIZED) {
printf("MPI_Query_thread with MPI_THREAD_SERIALIZED\n");
fflush(stdout);
break;
case MPI_THREAD_MULTIPLE:
} else if (omp_mpi_level == MPI_THREAD_MULTIPLE) {
printf("MPI_Query_thread with MPI_THREAD_MULTIPLE\n");
fflush(stdout);
break;
}
fflush(stdout);
}
Expand Down
31 changes: 13 additions & 18 deletions EXAMPLE/pddrive_spawn.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,24 +129,19 @@ int main(int argc, char *argv[])

if(grid.iam==0){
MPI_Query_thread(&omp_mpi_level);
switch (omp_mpi_level) {
case MPI_THREAD_SINGLE:
printf("MPI_Query_thread with MPI_THREAD_SINGLE\n");
fflush(stdout);
break;
case MPI_THREAD_FUNNELED:
printf("MPI_Query_thread with MPI_THREAD_FUNNELED\n");
fflush(stdout);
break;
case MPI_THREAD_SERIALIZED:
printf("MPI_Query_thread with MPI_THREAD_SERIALIZED\n");
fflush(stdout);
break;
case MPI_THREAD_MULTIPLE:
printf("MPI_Query_thread with MPI_THREAD_MULTIPLE\n");
fflush(stdout);
break;
}
if (omp_mpi_level == MPI_THREAD_SINGLE) {
printf("MPI_Query_thread with MPI_THREAD_SINGLE\n");
fflush(stdout);
} else if (omp_mpi_level == MPI_THREAD_FUNNELED) {
printf("MPI_Query_thread with MPI_THREAD_FUNNELED\n");
fflush(stdout);
} else if (omp_mpi_level == MPI_THREAD_SERIALIZED) {
printf("MPI_Query_thread with MPI_THREAD_SERIALIZED\n");
fflush(stdout);
} else if (omp_mpi_level == MPI_THREAD_MULTIPLE) {
printf("MPI_Query_thread with MPI_THREAD_MULTIPLE\n");
fflush(stdout);
}
}

/* Bail out if I do not belong in the grid. */
Expand Down
31 changes: 13 additions & 18 deletions EXAMPLE/psdrive.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,24 +200,19 @@ int main(int argc, char *argv[])

if(grid.iam==0){
MPI_Query_thread(&omp_mpi_level);
switch (omp_mpi_level) {
case MPI_THREAD_SINGLE:
printf("MPI_Query_thread with MPI_THREAD_SINGLE\n");
fflush(stdout);
break;
case MPI_THREAD_FUNNELED:
printf("MPI_Query_thread with MPI_THREAD_FUNNELED\n");
fflush(stdout);
break;
case MPI_THREAD_SERIALIZED:
printf("MPI_Query_thread with MPI_THREAD_SERIALIZED\n");
fflush(stdout);
break;
case MPI_THREAD_MULTIPLE:
printf("MPI_Query_thread with MPI_THREAD_MULTIPLE\n");
fflush(stdout);
break;
}
if (omp_mpi_level == MPI_THREAD_SINGLE) {
printf("MPI_Query_thread with MPI_THREAD_SINGLE\n");
fflush(stdout);
} else if (omp_mpi_level == MPI_THREAD_FUNNELED) {
printf("MPI_Query_thread with MPI_THREAD_FUNNELED\n");
fflush(stdout);
} else if (omp_mpi_level == MPI_THREAD_SERIALIZED) {
printf("MPI_Query_thread with MPI_THREAD_SERIALIZED\n");
fflush(stdout);
} else if (omp_mpi_level == MPI_THREAD_MULTIPLE) {
printf("MPI_Query_thread with MPI_THREAD_MULTIPLE\n");
fflush(stdout);
}
}

/* Bail out if I do not belong in the grid. */
Expand Down
13 changes: 4 additions & 9 deletions EXAMPLE/psdrive3d.c
Original file line number Diff line number Diff line change
Expand Up @@ -267,23 +267,18 @@ main (int argc, char *argv[])

if(grid.iam==0) {
MPI_Query_thread(&omp_mpi_level);
switch (omp_mpi_level) {
case MPI_THREAD_SINGLE:
if (omp_mpi_level == MPI_THREAD_SINGLE) {
printf("MPI_Query_thread with MPI_THREAD_SINGLE\n");
fflush(stdout);
break;
case MPI_THREAD_FUNNELED:
} else if (omp_mpi_level == MPI_THREAD_FUNNELED) {
printf("MPI_Query_thread with MPI_THREAD_FUNNELED\n");
fflush(stdout);
break;
case MPI_THREAD_SERIALIZED:
} else if (omp_mpi_level == MPI_THREAD_SERIALIZED) {
printf("MPI_Query_thread with MPI_THREAD_SERIALIZED\n");
fflush(stdout);
break;
case MPI_THREAD_MULTIPLE:
} else if (omp_mpi_level == MPI_THREAD_MULTIPLE) {
printf("MPI_Query_thread with MPI_THREAD_MULTIPLE\n");
fflush(stdout);
break;
}
fflush(stdout);
}
Expand Down
13 changes: 4 additions & 9 deletions EXAMPLE/psdrive3d1.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,23 +200,18 @@ main (int argc, char *argv[])

if(grid.iam==0) {
MPI_Query_thread(&omp_mpi_level);
switch (omp_mpi_level) {
case MPI_THREAD_SINGLE:
if (omp_mpi_level == MPI_THREAD_SINGLE) {
printf("MPI_Query_thread with MPI_THREAD_SINGLE\n");
fflush(stdout);
break;
case MPI_THREAD_FUNNELED:
} else if (omp_mpi_level == MPI_THREAD_FUNNELED) {
printf("MPI_Query_thread with MPI_THREAD_FUNNELED\n");
fflush(stdout);
break;
case MPI_THREAD_SERIALIZED:
} else if (omp_mpi_level == MPI_THREAD_SERIALIZED) {
printf("MPI_Query_thread with MPI_THREAD_SERIALIZED\n");
fflush(stdout);
break;
case MPI_THREAD_MULTIPLE:
} else if (omp_mpi_level == MPI_THREAD_MULTIPLE) {
printf("MPI_Query_thread with MPI_THREAD_MULTIPLE\n");
fflush(stdout);
break;
}
fflush(stdout);
}
Expand Down
13 changes: 4 additions & 9 deletions EXAMPLE/psdrive3d2.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,23 +207,18 @@ main (int argc, char *argv[])

if(grid.iam==0) {
MPI_Query_thread(&omp_mpi_level);
switch (omp_mpi_level) {
case MPI_THREAD_SINGLE:
if (omp_mpi_level == MPI_THREAD_SINGLE) {
printf("MPI_Query_thread with MPI_THREAD_SINGLE\n");
fflush(stdout);
break;
case MPI_THREAD_FUNNELED:
} else if (omp_mpi_level == MPI_THREAD_FUNNELED) {
printf("MPI_Query_thread with MPI_THREAD_FUNNELED\n");
fflush(stdout);
break;
case MPI_THREAD_SERIALIZED:
} else if (omp_mpi_level == MPI_THREAD_SERIALIZED) {
printf("MPI_Query_thread with MPI_THREAD_SERIALIZED\n");
fflush(stdout);
break;
case MPI_THREAD_MULTIPLE:
} else if (omp_mpi_level == MPI_THREAD_MULTIPLE) {
printf("MPI_Query_thread with MPI_THREAD_MULTIPLE\n");
fflush(stdout);
break;
}
fflush(stdout);
}
Expand Down
13 changes: 4 additions & 9 deletions EXAMPLE/psdrive3d3.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,23 +204,18 @@ main (int argc, char *argv[])

if (grid.iam==0) {
MPI_Query_thread(&omp_mpi_level);
switch (omp_mpi_level) {
case MPI_THREAD_SINGLE:
if (omp_mpi_level == MPI_THREAD_SINGLE) {
printf("MPI_Query_thread with MPI_THREAD_SINGLE\n");
fflush(stdout);
break;
case MPI_THREAD_FUNNELED:
} else if (omp_mpi_level == MPI_THREAD_FUNNELED) {
printf("MPI_Query_thread with MPI_THREAD_FUNNELED\n");
fflush(stdout);
break;
case MPI_THREAD_SERIALIZED:
} else if (omp_mpi_level == MPI_THREAD_SERIALIZED) {
printf("MPI_Query_thread with MPI_THREAD_SERIALIZED\n");
fflush(stdout);
break;
case MPI_THREAD_MULTIPLE:
} else if (omp_mpi_level == MPI_THREAD_MULTIPLE) {
printf("MPI_Query_thread with MPI_THREAD_MULTIPLE\n");
fflush(stdout);
break;
}
fflush(stdout);
}
Expand Down
31 changes: 13 additions & 18 deletions EXAMPLE/pzdrive.c
Original file line number Diff line number Diff line change
Expand Up @@ -199,24 +199,19 @@ int main(int argc, char *argv[])

if(grid.iam==0){
MPI_Query_thread(&omp_mpi_level);
switch (omp_mpi_level) {
case MPI_THREAD_SINGLE:
printf("MPI_Query_thread with MPI_THREAD_SINGLE\n");
fflush(stdout);
break;
case MPI_THREAD_FUNNELED:
printf("MPI_Query_thread with MPI_THREAD_FUNNELED\n");
fflush(stdout);
break;
case MPI_THREAD_SERIALIZED:
printf("MPI_Query_thread with MPI_THREAD_SERIALIZED\n");
fflush(stdout);
break;
case MPI_THREAD_MULTIPLE:
printf("MPI_Query_thread with MPI_THREAD_MULTIPLE\n");
fflush(stdout);
break;
}
if (omp_mpi_level == MPI_THREAD_SINGLE) {
printf("MPI_Query_thread with MPI_THREAD_SINGLE\n");
fflush(stdout);
} else if (omp_mpi_level == MPI_THREAD_FUNNELED) {
printf("MPI_Query_thread with MPI_THREAD_FUNNELED\n");
fflush(stdout);
} else if (omp_mpi_level == MPI_THREAD_SERIALIZED) {
printf("MPI_Query_thread with MPI_THREAD_SERIALIZED\n");
fflush(stdout);
} else if (omp_mpi_level == MPI_THREAD_MULTIPLE) {
printf("MPI_Query_thread with MPI_THREAD_MULTIPLE\n");
fflush(stdout);
}
}

/* Bail out if I do not belong in the grid. */
Expand Down
13 changes: 4 additions & 9 deletions EXAMPLE/pzdrive3d.c
Original file line number Diff line number Diff line change
Expand Up @@ -267,23 +267,18 @@ main (int argc, char *argv[])

if(grid.iam==0) {
MPI_Query_thread(&omp_mpi_level);
switch (omp_mpi_level) {
case MPI_THREAD_SINGLE:
if (omp_mpi_level == MPI_THREAD_SINGLE) {
printf("MPI_Query_thread with MPI_THREAD_SINGLE\n");
fflush(stdout);
break;
case MPI_THREAD_FUNNELED:
} else if (omp_mpi_level == MPI_THREAD_FUNNELED) {
printf("MPI_Query_thread with MPI_THREAD_FUNNELED\n");
fflush(stdout);
break;
case MPI_THREAD_SERIALIZED:
} else if (omp_mpi_level == MPI_THREAD_SERIALIZED) {
printf("MPI_Query_thread with MPI_THREAD_SERIALIZED\n");
fflush(stdout);
break;
case MPI_THREAD_MULTIPLE:
} else if (omp_mpi_level == MPI_THREAD_MULTIPLE) {
printf("MPI_Query_thread with MPI_THREAD_MULTIPLE\n");
fflush(stdout);
break;
}
fflush(stdout);
}
Expand Down
Loading