Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
SWIFTsim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SWIFT
SWIFTsim
Commits
d89f9b87
Commit
d89f9b87
authored
8 years ago
by
Peter W. Draper
Browse files
Options
Downloads
Patches
Plain Diff
Make sure all message have the correct MPI rank
Otherwise until engine_init we see [0000]
parent
e90dd24b
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
examples/main.c
+5
-0
5 additions, 0 deletions
examples/main.c
with
5 additions
and
0 deletions
examples/main.c
+
5
−
0
View file @
d89f9b87
...
@@ -120,6 +120,10 @@ int main(int argc, char *argv[]) {
...
@@ -120,6 +120,10 @@ int main(int argc, char *argv[]) {
error
(
"MPI_Comm_size failed with error %i."
,
res
);
error
(
"MPI_Comm_size failed with error %i."
,
res
);
if
((
res
=
MPI_Comm_rank
(
MPI_COMM_WORLD
,
&
myrank
))
!=
MPI_SUCCESS
)
if
((
res
=
MPI_Comm_rank
(
MPI_COMM_WORLD
,
&
myrank
))
!=
MPI_SUCCESS
)
error
(
"Call to MPI_Comm_rank failed with error %i."
,
res
);
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
))
!=
if
((
res
=
MPI_Comm_set_errhandler
(
MPI_COMM_WORLD
,
MPI_ERRORS_RETURN
))
!=
MPI_SUCCESS
)
MPI_SUCCESS
)
error
(
"Call to MPI_Comm_set_errhandler failed with error %i."
,
res
);
error
(
"Call to MPI_Comm_set_errhandler failed with error %i."
,
res
);
...
@@ -131,6 +135,7 @@ int main(int argc, char *argv[]) {
...
@@ -131,6 +135,7 @@ int main(int argc, char *argv[]) {
message
(
"WARNING: you should use the non-MPI version of this program."
);
message
(
"WARNING: you should use the non-MPI version of this program."
);
}
}
fflush
(
stdout
);
fflush
(
stdout
);
#endif
#endif
/* Let's pin the main thread */
/* Let's pin the main thread */
...
...
This diff is collapsed.
Click to expand it.
Peter W. Draper
@pdraper
mentioned in issue
#222 (closed)
·
8 years ago
mentioned in issue
#222 (closed)
mentioned in issue #222
Toggle commit list
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment