Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
elpa
elpa
Commits
b32e308e
Commit
b32e308e
authored
Dec 14, 2017
by
Lorenz Huedepohl
Browse files
Also check MPI Thread level in C test programs
parent
9c6345ed
Changes
1
Hide whitespace changes
Inline
Side-by-side
test/C/test.c
View file @
b32e308e
...
...
@@ -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
#ifndef WITH_OPENMP
MPI_Init
(
&
argc
,
&
argv
);
#else
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_Finalize
();
exit
(
77
);
}
#endif
MPI_Comm_size
(
MPI_COMM_WORLD
,
&
nprocs
);
MPI_Comm_rank
(
MPI_COMM_WORLD
,
&
myid
);
#else
nprocs
=
1
;
myid
=
0
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment