Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SWIFT
SWIFTsim
Commits
d89f9b87
Commit
d89f9b87
authored
Oct 18, 2016
by
Peter W. Draper
Browse files
Make sure all message have the correct MPI rank
Otherwise until engine_init we see [0000]
parent
e90dd24b
Changes
1
Hide whitespace changes
Inline
Side-by-side
examples/main.c
View file @
d89f9b87
...
...
@@ -120,6 +120,10 @@ int main(int argc, char *argv[]) {
error
(
"MPI_Comm_size failed with error %i."
,
res
);
if
((
res
=
MPI_Comm_rank
(
MPI_COMM_WORLD
,
&
myrank
))
!=
MPI_SUCCESS
)
error
(
"Call to MPI_Comm_rank failed with error %i."
,
res
);
/* Make sure messages are stamped with the correct rank. */
engine_rank
=
myrank
;
if
((
res
=
MPI_Comm_set_errhandler
(
MPI_COMM_WORLD
,
MPI_ERRORS_RETURN
))
!=
MPI_SUCCESS
)
error
(
"Call to MPI_Comm_set_errhandler failed with error %i."
,
res
);
...
...
@@ -131,6 +135,7 @@ int main(int argc, char *argv[]) {
message
(
"WARNING: you should use the non-MPI version of this program."
);
}
fflush
(
stdout
);
#endif
/* Let's pin the main thread */
...
...
Peter W. Draper
@pdraper
mentioned in issue
#222 (closed)
·
Oct 18, 2016
mentioned in issue
#222 (closed)
mentioned in issue #222
Toggle commit list
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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