Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
swiftmpistepsim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
swiftmpistepsim
Commits
8d4c4bc9
Commit
8d4c4bc9
authored
5 years ago
by
Peter W. Draper
Browse files
Options
Downloads
Patches
Plain Diff
Suppress most output unless verbose
Fix an MPI correctness issue with passing &size
parent
9b6c9e39
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
swiftmpiproxies.c
+24
-10
24 additions, 10 deletions
swiftmpiproxies.c
with
24 additions
and
10 deletions
swiftmpiproxies.c
+
24
−
10
View file @
8d4c4bc9
...
@@ -260,9 +260,8 @@ int main(int argc, char *argv[]) {
...
@@ -260,9 +260,8 @@ int main(int argc, char *argv[]) {
/* Start Isend counts of pcells. Really just the size of the buffer
/* Start Isend counts of pcells. Really just the size of the buffer
* we're about to send, SWIFT sends the count. */
* we're about to send, SWIFT sends the count. */
int
size
=
log
->
size
;
res
=
MPI_Isend
(
&
size
,
1
,
MPI_INT
,
log
->
otherrank
,
res
=
MPI_Isend
(
&
log
->
size
,
1
,
MPI_INT
,
log
->
otherrank
,
basetag
+
proxy_tag_count
,
MPI_COMM_WORLD
,
basetag
+
proxy_tag_count
,
MPI_COMM_WORLD
,
&
req_send_counts
[
k
]);
&
req_send_counts
[
k
]);
if
(
res
!=
MPI_SUCCESS
)
error
(
"Counts MPI_Isend failed."
);
if
(
res
!=
MPI_SUCCESS
)
error
(
"Counts MPI_Isend failed."
);
...
@@ -284,7 +283,8 @@ int main(int argc, char *argv[]) {
...
@@ -284,7 +283,8 @@ int main(int argc, char *argv[]) {
&
req_recv_counts
[
k
]);
&
req_recv_counts
[
k
]);
if
(
res
!=
MPI_SUCCESS
)
error
(
"Counts MPI_Irecv failed."
);
if
(
res
!=
MPI_SUCCESS
)
error
(
"Counts MPI_Irecv failed."
);
}
}
message
(
"All counts requests and pcell sends are launched"
);
if
(
verbose
)
message
(
"All counts requests and pcell sends are launched"
);
/* Now wait for any of the counts irecvs to complete and then create the
/* Now wait for any of the counts irecvs to complete and then create the
* irecv for the pcells. */
* irecv for the pcells. */
...
@@ -312,13 +312,15 @@ int main(int argc, char *argv[]) {
...
@@ -312,13 +312,15 @@ int main(int argc, char *argv[]) {
&
req_pcells_in
[
pid
]);
&
req_pcells_in
[
pid
]);
if
(
res
!=
MPI_SUCCESS
)
error
(
"Pcell MPI_Irecv failed."
);
if
(
res
!=
MPI_SUCCESS
)
error
(
"Pcell MPI_Irecv failed."
);
}
}
message
(
"All proxy cell counts have arrived, pcells irecvs are launched"
);
if
(
verbose
)
message
(
"All proxy cell counts have arrived, pcells irecvs are launched"
);
/* Waitall for all Isend counts to complete. */
/* Waitall for all Isend counts to complete. */
res
=
MPI_Waitall
(
nr_send_pcells
,
req_send_counts
,
MPI_STATUSES_IGNORE
);
res
=
MPI_Waitall
(
nr_send_pcells
,
req_send_counts
,
MPI_STATUSES_IGNORE
);
if
(
res
!=
MPI_SUCCESS
)
error
(
"Waitall for counts Isend failed."
);
if
(
res
!=
MPI_SUCCESS
)
error
(
"Waitall for counts Isend failed."
);
message
(
"All sends of counts have completed"
);
if
(
verbose
)
message
(
"All sends of counts have completed"
);
/* Now wait for the pcell irecvs to complete, so we receive the pcells,
/* Now wait for the pcell irecvs to complete, so we receive the pcells,
* which would be unpacked in SWIFT. */
* which would be unpacked in SWIFT. */
...
@@ -343,13 +345,23 @@ int main(int argc, char *argv[]) {
...
@@ -343,13 +345,23 @@ int main(int argc, char *argv[]) {
status
.
MPI_SOURCE
,
status
.
MPI_TAG
,
expected_tag
,
status
.
MPI_SOURCE
,
status
.
MPI_TAG
,
expected_tag
,
status
.
MPI_ERROR
);
status
.
MPI_ERROR
);
/* Shouldn't happen, but has been seen. */
if
(
status
.
MPI_ERROR
!=
MPI_SUCCESS
)
mpi_error_string
(
status
.
MPI_ERROR
,
"unexpected MPI status"
);
/* Make a report on what the buffer contains. */
datacheck_fulltest
(
pcells_size
[
pid
],
pcells_in
[
pid
]);
datacheck_fulltest
(
pcells_size
[
pid
],
pcells_in
[
pid
]);
fflush
(
stdout
);
/* This call will succeed, if the receive buffer has not been
* updated. */
if
(
datacheck_test
(
myrank
,
pcells_size
[
pid
],
pcells_in
[
pid
]))
{
if
(
datacheck_test
(
myrank
,
pcells_size
[
pid
],
pcells_in
[
pid
]))
{
error
(
"Received data is not modified on receive"
);
message
(
"Received data is not modified"
);
fflush
(
stdout
);
error
(
"Failed"
);
}
else
{
}
else
{
error
(
"Received data is corrupt"
);
message
(
"Received data is corrupt"
);
fflush
(
stdout
);
error
(
"Failed"
);
}
}
}
else
{
}
else
{
if
(
verbose
)
message
(
"Received data is correct"
);
if
(
verbose
)
message
(
"Received data is correct"
);
...
@@ -357,12 +369,14 @@ int main(int argc, char *argv[]) {
...
@@ -357,12 +369,14 @@ int main(int argc, char *argv[]) {
free
(
pcells_in
[
pid
]);
free
(
pcells_in
[
pid
]);
pcells_in
[
pid
]
=
NULL
;
pcells_in
[
pid
]
=
NULL
;
}
}
message
(
"All proxy cells have arrived"
);
if
(
verbose
)
message
(
"All proxy cells have arrived"
);
/* Waitall for Isend of pcells to complete. */
/* Waitall for Isend of pcells to complete. */
res
=
MPI_Waitall
(
nr_send_pcells
,
req_pcells_out
,
MPI_STATUSES_IGNORE
);
res
=
MPI_Waitall
(
nr_send_pcells
,
req_pcells_out
,
MPI_STATUSES_IGNORE
);
if
(
res
!=
MPI_SUCCESS
)
error
(
"Waitall for pcells Isend failed."
);
if
(
res
!=
MPI_SUCCESS
)
error
(
"Waitall for pcells Isend failed."
);
message
(
"All sends of pcells have completed"
);
if
(
verbose
)
message
(
"All sends of pcells have completed"
);
/* Check data is unmodified while being offloaded. */
/* Check data is unmodified while being offloaded. */
for
(
int
k
=
0
;
k
<
nr_send_pcells
;
k
++
)
{
for
(
int
k
=
0
;
k
<
nr_send_pcells
;
k
++
)
{
...
...
This diff is collapsed.
Click to expand it.
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