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
e7de0353
Commit
e7de0353
authored
5 years ago
by
Thomas Jahns
Browse files
Options
Downloads
Patches
Plain Diff
Change sub-array offsets to save data move.
parent
88766d3f
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.c
+10
-13
10 additions, 13 deletions
src/xt_xmap_intersection.c
with
10 additions
and
13 deletions
src/xt_xmap_intersection.c
+
10
−
13
View file @
e7de0353
...
...
@@ -437,9 +437,9 @@ exchange_points_to_remove(int num_src_intersections,
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
)
...
...
@@ -476,7 +476,7 @@ exchange_points_to_remove(int num_src_intersections,
// 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
);
send_header
_requests
,
MPI_STATUSES_IGNORE
),
comm
);
size_t
total_num_src_indices_to_recv
=
0
;
...
...
@@ -494,31 +494,28 @@ exchange_points_to_remove(int num_src_intersections,
offset
=
0
;
for
(
int
i
=
0
;
i
<
num_src_intersections
;
++
i
)
if
(
num_src_indices_to_remove_per_intersection
[
i
]
>
0
)
{
++
num_nonempty_src_intersections
;
xt_mpi_call
(
MPI_Irecv
(
(
*
src_indices_to_remove
)
+
offset
,
num_src_indices_to_remove_per_intersection
[
i
],
Xt_int_dt
,
src_com
[
i
].
rank
,
tag_offset
+
xt_mpi_tag_xmap_intersection_data_exchange
,
comm
,
recv_requests
+
num_nonempty_src_intersections
),
comm
);
send_data_requests
-
num_nonempty_src_intersections
),
comm
);
offset
=
offset
+
num_src_indices_to_remove_per_intersection
[
i
];
++
num_nonempty_src_intersections
;
offset
+=
num_src_indices_to_remove_per_intersection
[
i
];
}
}
else
{
*
src_indices_to_remove
=
NULL
;
}
/* move data request handles for compact wait */
memcpy
(
recv_requests
+
num_nonempty_src_intersections
,
send_data_requests
,
num_nonempty_dst_intersections
*
sizeof
(
recv_requests
[
0
]));
// wait until all communication is completed
xt_mpi_call
(
MPI_Waitall
((
int
)
num_nonempty_src_intersections
+
(
int
)
num_nonempty_dst_intersections
,
requests
,
MPI_STATUSES_IGNORE
),
comm
);
send_data_requests
-
num_nonempty_src_intersections
,
MPI_STATUSES_IGNORE
),
comm
);
free
(
requests
);
}
...
...
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