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
82473678
Commit
82473678
authored
5 years ago
by
Peter W. Draper
Browse files
Options
Downloads
Patches
Plain Diff
Also check sent data is unmodified
parent
606ff3ae
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
+15
-3
15 additions, 3 deletions
swiftmpiproxies.c
with
15 additions
and
3 deletions
swiftmpiproxies.c
+
15
−
3
View file @
82473678
...
@@ -266,7 +266,7 @@ int main(int argc, char *argv[]) {
...
@@ -266,7 +266,7 @@ int main(int argc, char *argv[]) {
pcells_in
[
pid
]
=
calloc
(
pcells_size
[
pid
],
1
);
pcells_in
[
pid
]
=
calloc
(
pcells_size
[
pid
],
1
);
/* Fill data with a pattern for checking when overwritten. */
/* Fill data with a pattern for checking when overwritten. */
datacheck_fill
(
1
,
log
->
size
,
log
->
data
);
datacheck_fill
(
1
,
pcells_size
[
pid
],
pcells_in
[
pid
]
);
res
=
MPI_Irecv
(
pcells_in
[
pid
],
pcells_size
[
pid
],
MPI_BYTE
,
log
->
otherrank
,
res
=
MPI_Irecv
(
pcells_in
[
pid
],
pcells_size
[
pid
],
MPI_BYTE
,
log
->
otherrank
,
basetag
+
proxy_tag_cells
,
MPI_COMM_WORLD
,
basetag
+
proxy_tag_cells
,
MPI_COMM_WORLD
,
&
req_pcells_in
[
pid
]);
&
req_pcells_in
[
pid
]);
...
@@ -290,8 +290,8 @@ int main(int argc, char *argv[]) {
...
@@ -290,8 +290,8 @@ int main(int argc, char *argv[]) {
/* Check the data received is correct. */
/* Check the data received is correct. */
struct
mpiuse_log_entry
*
log
=
send_pcells
[
pid
];
struct
mpiuse_log_entry
*
log
=
send_pcells
[
pid
];
if
(
!
datacheck_test
(
1
,
log
->
size
,
log
->
data
))
{
if
(
!
datacheck_test
(
0
,
pcells_size
[
pid
],
pcells_in
[
pid
]
))
{
if
(
datacheck_test
(
0
,
log
->
size
,
log
->
data
))
{
if
(
!
datacheck_test
(
1
,
pcells_size
[
pid
],
pcells_in
[
pid
]
))
{
error
(
"Received data is not modified"
);
error
(
"Received data is not modified"
);
}
else
{
}
else
{
error
(
"Received data is corrupt"
);
error
(
"Received data is corrupt"
);
...
@@ -299,6 +299,7 @@ int main(int argc, char *argv[]) {
...
@@ -299,6 +299,7 @@ int main(int argc, char *argv[]) {
}
else
{
}
else
{
message
(
"Received data is correct"
);
message
(
"Received data is correct"
);
}
}
free
(
pcells_in
[
pid
]);
}
}
message
(
"All proxy cells have arrived"
);
message
(
"All proxy cells have arrived"
);
...
@@ -306,6 +307,17 @@ int main(int argc, char *argv[]) {
...
@@ -306,6 +307,17 @@ int main(int argc, char *argv[]) {
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."
);
/* Check data is unmodified. */
for
(
int
k
=
0
;
k
<
nr_send_pcells
;
k
++
)
{
struct
mpiuse_log_entry
*
log
=
send_pcells
[
k
];
if
(
!
datacheck_test
(
0
,
log
->
size
,
log
->
data
))
{
error
(
"Sent data has been corrupted"
);
}
else
{
message
(
"Sent data is correct"
);
}
free
(
log
->
data
);
}
/* Shutdown MPI. */
/* Shutdown MPI. */
res
=
MPI_Finalize
();
res
=
MPI_Finalize
();
if
(
res
!=
MPI_SUCCESS
)
if
(
res
!=
MPI_SUCCESS
)
...
...
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