Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Y
yaxt
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
dkrz-sw
yaxt
Commits
dc5acb1b
Commit
dc5acb1b
authored
5 years ago
by
Thomas Jahns
Browse files
Options
Downloads
Patches
Plain Diff
Change sub-array offsets to save data move.
parent
945a3f8c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/xt_xmap_intersection_ext.c
+8
-11
8 additions, 11 deletions
src/xt_xmap_intersection_ext.c
with
8 additions
and
11 deletions
src/xt_xmap_intersection_ext.c
+
8
−
11
View file @
dc5acb1b
...
...
@@ -716,9 +716,9 @@ exchange_pos_ext_modifications(
MPI_Request
*
requests
=
xmalloc
((
size_t
)(
num_src_intersections
+
2
*
num_dst_intersections
)
*
sizeof
(
*
requests
));
MPI_Request
*
restrict
recv
_requests
=
requests
,
*
restrict
send_header
_requests
=
requests
+
num_
src
_intersections
,
*
restrict
send_data_requests
=
send_header
_requests
+
num_
dst
_intersections
;
MPI_Request
*
restrict
send_header
_requests
=
requests
,
*
restrict
recv
_requests
=
requests
+
num_
dst
_intersections
,
*
restrict
send_data_requests
=
recv
_requests
+
num_
src
_intersections
;
// set up receives for indices that need to be removed from the send messages
for
(
int
i
=
0
;
i
<
num_src_intersections
;
++
i
)
...
...
@@ -758,7 +758,7 @@ exchange_pos_ext_modifications(
// wait for the receiving of headers to complete
xt_mpi_call
(
MPI_Waitall
(
num_src_intersections
+
num_dst_intersections
,
recv_
requests
,
MPI_STATUSES_IGNORE
),
comm
);
requests
,
MPI_STATUSES_IGNORE
),
comm
);
size_t
total_num_pos_ext_to_recv
=
0
;
...
...
@@ -777,26 +777,23 @@ exchange_pos_ext_modifications(
size_t
offset
=
0
;
for
(
int
i
=
0
;
i
<
num_src_intersections
;
++
i
)
if
(
src_removals_per_intersection
[
i
][
1
]
>
0
)
{
++
num_src_changes
;
xt_mpi_call
(
MPI_Irecv
(
src_updated_pos_ext
+
offset
,
src_removals_per_intersection
[
i
][
1
],
MPI_2INT
,
src_com
[
i
].
rank
,
tag_offset
+
xt_mpi_tag_xmap_intersection_data_exchange
,
comm
,
recv
_requests
+
num_src_changes
),
comm
);
comm
,
send_data
_requests
-
num_src_changes
),
comm
);
offset
+=
(
size_t
)
src_removals_per_intersection
[
i
][
1
];
++
num_src_changes
;
}
}
else
src_updated_pos_ext
=
NULL
;
/* move data request handles for compact wait */
memcpy
(
recv_requests
+
num_src_changes
,
send_data_requests
,
num_dst_changes
*
sizeof
(
recv_requests
[
0
]));
// wait until all communication is completed
xt_mpi_call
(
MPI_Waitall
((
int
)
num_src_changes
+
(
int
)
num_dst_changes
,
recv_requests
,
MPI_STATUSES_IGNORE
),
comm
);
send_data_requests
-
num_src_changes
,
MPI_STATUSES_IGNORE
),
comm
);
free
(
requests
);
return
src_updated_pos_ext
;
...
...
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