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
052fac5c
Commit
052fac5c
authored
5 years ago
by
Thomas Jahns
Browse files
Options
Downloads
Patches
Plain Diff
Merge functionality and harmonize naming.
parent
b5e2d4fa
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/xt_xmap_intersection.c
+1
-9
1 addition, 9 deletions
src/xt_xmap_intersection.c
src/xt_xmap_intersection_common.h
+19
-0
19 additions, 0 deletions
src/xt_xmap_intersection_common.h
src/xt_xmap_intersection_ext.c
+11
-18
11 additions, 18 deletions
src/xt_xmap_intersection_ext.c
with
31 additions
and
27 deletions
src/xt_xmap_intersection.c
+
1
−
9
View file @
052fac5c
...
...
@@ -603,15 +603,7 @@ xt_xmap_intersection_new(int num_src_intersections,
while
((
first_missing_pos
<
(
num_dst_indices
-
1
))
&&
(
found_index_mask
[
first_missing_pos
]))
++
first_missing_pos
;
Xt_int
missing_index
;
xt_idxlist_get_index_at_position
(
dst_idxlist
,
first_missing_pos
,
&
missing_index
);
char
error_message
[
1024
];
sprintf
(
error_message
,
"ERROR: destination intersections do not match "
"with destination index list (first missing index %lld "
"at position %d)"
,
(
long
long
)
missing_index
,
first_missing_pos
);
Xt_abort
(
comm
,
error_message
,
__FILE__
,
__LINE__
);
print_miss_msg
(
dst_idxlist
,
first_missing_pos
,
comm
,
__FILE__
,
__LINE__
);
}
int
n_in
=
xmap
->
n_in
,
n_out
=
xmap
->
n_out
;
...
...
This diff is collapsed.
Click to expand it.
src/xt_xmap_intersection_common.h
+
19
−
0
View file @
052fac5c
...
...
@@ -58,6 +58,7 @@ struct pos_run {
int
start
,
direction
;
};
#include
"core/core.h"
#include
"xt_stripe_util.h"
/* how many pos values have monotonically either positively or
...
...
@@ -142,6 +143,24 @@ static inline void generate_pos(
assert
(
ofs
==
num_pos
);
}
static
inline
void
print_miss_msg
(
Xt_idxlist
dst_idxlist
,
int
missing_pos
,
MPI_Comm
comm
,
const
char
*
source
,
int
line
)
__attribute__
((
noreturn
));
static
inline
void
print_miss_msg
(
Xt_idxlist
dst_idxlist
,
int
missing_pos
,
MPI_Comm
comm
,
const
char
*
source
,
int
line
)
{
Xt_int
missing_index
;
xt_idxlist_get_index_at_position
(
dst_idxlist
,
missing_pos
,
&
missing_index
);
char
error_message
[
1024
];
sprintf
(
error_message
,
"ERROR: destination intersections do not match "
"with destination index list (first missing index %lld "
"at position %d)"
,
(
long
long
)
missing_index
,
missing_pos
);
Xt_abort
(
comm
,
error_message
,
source
,
line
);
}
#endif
/*
...
...
This diff is collapsed.
Click to expand it.
src/xt_xmap_intersection_ext.c
+
11
−
18
View file @
052fac5c
...
...
@@ -403,8 +403,8 @@ generate_transfer_ext(struct Xt_xmap_intersection_ext_ *xmap,
const
struct
Xt_com_list
src_com
[
num_src_intersections
],
int
num_dst_intersections
,
const
struct
Xt_com_list
dst_com
[
num_dst_intersections
],
Xt_idxlist
src_idxlist
_local
,
Xt_idxlist
dst_idxlist
_local
,
Xt_idxlist
src_idxlist
,
Xt_idxlist
dst_idxlist
,
MPI_Comm
comm
)
{
/* {dst|src}_removals_per_intersection[i][0] denotes the number of
...
...
@@ -422,24 +422,17 @@ generate_transfer_ext(struct Xt_xmap_intersection_ext_ *xmap,
{
struct
Xt_pos_ext_vec
cover
=
generate_dir_transfer_ext_dst
(
num_dst_intersections
,
dst_com
,
dst_idxlist
_local
,
num_dst_intersections
,
dst_com
,
dst_idxlist
,
&
xmap
->
n_in
,
xmap
->
msg
,
dst_removals_per_intersection
);
if
(
!
xt_idxlist_pos_ext_is_full_cover
(
dst_idxlist
_local
,
cover
))
{
if
(
xt_idxlist_get_num_indices
(
dst_idxlist
_local
)
==
0
)
if
(
!
xt_idxlist_pos_ext_is_full_cover
(
dst_idxlist
,
cover
))
{
if
(
xt_idxlist_get_num_indices
(
dst_idxlist
)
==
0
)
Xt_abort
(
comm
,
"ERROR: ups...this should not have happend..."
,
__FILE__
,
__LINE__
);
int
first_missing_pos
=
0
;
Xt_int
missing_index
;
if
((
cover
.
num_pos_ext
>
0
)
&&
(
cover
.
pos_ext
[
0
].
start
==
0
))
first_missing_pos
=
cover
.
pos_ext
[
0
].
start
+
cover
.
pos_ext
[
0
].
size
;
xt_idxlist_get_index_at_position
(
dst_idxlist_local
,
first_missing_pos
,
&
missing_index
);
char
error_message
[
1024
];
sprintf
(
error_message
,
"ERROR: destination intersections do not match "
"with destination index list (first missing index %lld "
"at position %d)"
,
(
long
long
)
missing_index
,
first_missing_pos
);
Xt_abort
(
comm
,
error_message
,
__FILE__
,
__LINE__
);
int
first_missing_pos
=
((
cover
.
num_pos_ext
>
0
)
&&
(
cover
.
pos_ext
[
0
].
start
==
0
))
?
cover
.
pos_ext
[
0
].
start
+
cover
.
pos_ext
[
0
].
size
:
0
;
print_miss_msg
(
dst_idxlist
,
first_missing_pos
,
comm
,
__FILE__
,
__LINE__
);
}
xt_cover_finish
(
&
cover
);
}
...
...
@@ -451,7 +444,7 @@ generate_transfer_ext(struct Xt_xmap_intersection_ext_ *xmap,
src_removals_per_intersection
,
(
const
int
(
*
)[
2
])
dst_removals_per_intersection
,
xmap
->
tag_offset
,
comm
);
remap_dst_intersections
(
num_dst_intersections
,
dst_com
,
dst_idxlist
_local
,
remap_dst_intersections
(
num_dst_intersections
,
dst_com
,
dst_idxlist
,
xmap
->
n_in
,
xmap
->
msg
,
(
const
int
(
*
)[
2
])
dst_removals_per_intersection
);
...
...
@@ -460,7 +453,7 @@ generate_transfer_ext(struct Xt_xmap_intersection_ext_ *xmap,
*
sizeof
(
*
src_removals_per_intersection
));
generate_dir_transfer_pos_ext_src
(
num_src_intersections
,
src_com
,
src_idxlist
_local
,
num_src_intersections
,
src_com
,
src_idxlist
,
&
xmap
->
n_out
,
xmap
->
msg
+
xmap
->
n_in
,
(
const
int
(
*
)[
2
])
src_removals_per_intersection
,
pos_updates
);
free
(
src_removals_per_intersection
);
...
...
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