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
bdb38684
Commit
bdb38684
authored
5 years ago
by
Thomas Jahns
Browse files
Options
Downloads
Patches
Plain Diff
Add adjustable exchangers to serial p2p redist tests.
parent
ff3aadad
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
tests/test_redist_p2p.c
+9
-9
9 additions, 9 deletions
tests/test_redist_p2p.c
tests/test_redist_p2p_f.f90
+13
-7
13 additions, 7 deletions
tests/test_redist_p2p_f.f90
tests/test_redist_p2p_run.in
+2
-2
2 additions, 2 deletions
tests/test_redist_p2p_run.in
with
24 additions
and
18 deletions
tests/test_redist_p2p.c
+
9
−
9
View file @
bdb38684
...
...
@@ -59,13 +59,14 @@
#include
"tests.h"
#include
"test_redist_common.h"
int
main
(
void
)
{
int
main
(
int
argc
,
char
**
argv
)
{
// init mpi
xt_mpi_call
(
MPI_Init
(
NULL
,
NULL
),
MPI_COMM_WORLD
);
xt_initialize
(
MPI_COMM_WORLD
);
Xt_config
config
=
redist_exchanger_option
(
&
argc
,
&
argv
);
// offset-free test:
{
...
...
@@ -86,7 +87,7 @@ int main(void) {
=
xt_xmap_all2all_new
(
src_idxlist
,
dst_idxlist
,
MPI_COMM_WORLD
);
// redist_p2p
Xt_redist
redist
=
xt_redist_p2p_new
(
xmap
,
MPI_DOUBLE
);
Xt_redist
redist
=
xt_redist_p2p_
custom_
new
(
xmap
,
MPI_DOUBLE
,
config
);
// test communicator of redist
...
...
@@ -141,8 +142,8 @@ int main(void) {
for
(
int
i
=
0
;
i
<
dst_num
;
i
++
)
dst_pos
[
i
]
=
dst_num
-
1
-
i
;
Xt_redist
redist
=
xt_redist_p2p_off_new
(
xmap
,
src_pos
,
dst_pos
,
MPI_DOUBLE
);
Xt_redist
redist
=
xt_redist_p2p_off_custom_new
(
xmap
,
src_pos
,
dst_pos
,
MPI_DOUBLE
,
config
);
// test communicator of redist
...
...
@@ -193,11 +194,9 @@ int main(void) {
src_pos
[
1
]
=
{
{
.
start
=
0
,
.
size
=
src_num
,
.
stride
=
1
}
},
dst_pos
[
1
]
=
{
{
.
start
=
dst_num
-
1
,
.
size
=
dst_num
,
.
stride
=
-
1
}
};
Xt_redist
redist
=
xt_redist_p2p_ext_new
(
xmap
,
sizeof
(
src_pos
)
/
sizeof
(
src_pos
[
0
]),
src_pos
,
sizeof
(
dst_pos
)
/
sizeof
(
dst_pos
[
0
]),
dst_pos
,
MPI_LONG
);
Xt_redist
redist
=
xt_redist_p2p_ext_custom_new
(
xmap
,
sizeof
(
src_pos
)
/
sizeof
(
src_pos
[
0
]),
src_pos
,
sizeof
(
dst_pos
)
/
sizeof
(
dst_pos
[
0
]),
dst_pos
,
MPI_LONG
,
config
);
// test communicator of redist
...
...
@@ -224,6 +223,7 @@ int main(void) {
xt_idxlist_delete
(
dst_idxlist
);
}
xt_config_delete
(
config
);
xt_finalize
();
MPI_Finalize
();
...
...
This diff is collapsed.
Click to expand it.
tests/test_redist_p2p_f.f90
+
13
−
7
View file @
bdb38684
...
...
@@ -48,25 +48,29 @@ PROGRAM test_redist_p2p_f
USE
yaxt
,
ONLY
:
xt_int_kind
,
xt_xmap
,
xt_idxlist
,
xt_redist
,
xt_offset_ext
,
&
xi
=>
xt_int_kind
,
xt_int_mpidt
,
xt_initialize
,
xt_finalize
,
&
xt_idxvec_new
,
xt_idxlist_delete
,
&
xt_redist_p2p_new
,
xt_redist_p2p_off_new
,
xt_redist_p2p_ext_new
,
&
xt_redist_p2p_new
,
xt_redist_p2p_off_
custom_
new
,
xt_redist_p2p_ext_new
,
&
xt_redist_s_exchange
,
&
xt_redist_copy
,
xt_redist_delete
,
xt_redist_get_mpi_comm
,
&
xt_xmap_all2all_new
,
xt_xmap_delete
xt_xmap_all2all_new
,
xt_xmap_delete
,
&
xt_config
,
xt_config_delete
! pgfortran is in most versions well incapable of handling multiply extended
! generic interfaces
#ifdef __PGI
USE
xt_redist_logical
,
ONLY
:
xt_redist_s_exchange
#endif
USE
ftest_common
,
ONLY
:
init_mpi
,
finish_mpi
,
test_abort
USE
test_redist_common
,
ONLY
:
check_redist
,
communicators_are_congruent
USE
test_redist_common
,
ONLY
:
check_redist
,
communicators_are_congruent
,
&
redist_exchanger_option
USE
test_idxlist_utils
,
ONLY
:
test_err_count
IMPLICIT
NONE
CHARACTER
(
len
=*
),
PARAMETER
::
filename
=
'test_redist_p2p_f.f90'
TYPE
(
xt_config
)
::
config
! init mpi
CALL
init_mpi
CALL
xt_initialize
(
mpi_comm_world
)
config
=
redist_exchanger_option
()
! offset-free test:
! source index list
...
...
@@ -77,6 +81,7 @@ PROGRAM test_redist_p2p_f
IF
(
test_err_count
()
/
=
0
)
&
CALL
test_abort
(
"non-zero error count!"
,
filename
,
__
LINE__
)
CALL
xt_config_delete
(
config
)
CALL
xt_finalize
CALL
finish_mpi
...
...
@@ -125,7 +130,7 @@ CONTAINS
xmap
=
xt_xmap_all2all_new
(
src_idxlist
,
dst_idxlist
,
mpi_comm_world
)
! redist_p2p
redist_dp
=
xt_redist_p2p_new
(
xmap
,
mpi_double_precision
)
redist_dp
=
xt_redist_p2p_new
(
xmap
,
mpi_double_precision
,
config
)
! test communicator of redist
IF
(
.NOT.
communicators_are_congruent
(
xt_redist_get_mpi_comm
(
redist_dp
),
&
...
...
@@ -139,7 +144,7 @@ CONTAINS
src_l
=
NINT
(
MOD
(
src_data
,
2.0d0
))
==
1
dst_l
=
.FALSE.
ref_dst_l
=
NINT
(
MOD
(
ref_dst_data
,
2.0d0
))
==
1
redist_l
=
xt_redist_p2p_new
(
xmap
,
mpi_logical
)
redist_l
=
xt_redist_p2p_new
(
xmap
,
mpi_logical
,
config
)
IF
(
.NOT.
communicators_are_congruent
(
xt_redist_get_mpi_comm
(
redist_l
),
&
mpi_comm_world
))
&
CALL
test_abort
(
"error in xt_redist_get_mpi_Comm"
,
filename
,
__
LINE__
)
...
...
@@ -202,7 +207,8 @@ CONTAINS
xmap
=
xt_xmap_all2all_new
(
src_idxlist
,
dst_idxlist
,
mpi_comm_world
)
! redist_p2p with offsets
redist
=
xt_redist_p2p_off_new
(
xmap
,
src_pos
,
dst_pos
,
mpi_double_precision
)
redist
=
xt_redist_p2p_off_custom_new
(
xmap
,
src_pos
,
dst_pos
,
&
mpi_double_precision
,
config
)
! test communicator of redist
IF
(
.NOT.
communicators_are_congruent
(
xt_redist_get_mpi_comm
(
redist
),
&
...
...
@@ -262,7 +268,7 @@ CONTAINS
xmap
=
xt_xmap_all2all_new
(
src_idxlist
,
dst_idxlist
,
mpi_comm_world
)
! redist_p2p with extents of offsets
redist
=
xt_redist_p2p_ext_new
(
xmap
,
src_pos
,
dst_pos
,
xt_int_mpidt
)
redist
=
xt_redist_p2p_ext_new
(
xmap
,
src_pos
,
dst_pos
,
xt_int_mpidt
,
config
)
! test communicator of redist
IF
(
.NOT.
communicators_are_congruent
(
xt_redist_get_MPI_Comm
(
redist
),
&
mpi_comm_world
))
&
...
...
This diff is collapsed.
Click to expand it.
tests/test_redist_p2p_run.in
+
2
−
2
View file @
bdb38684
...
...
@@ -4,9 +4,9 @@ LIBC_FATAL_STDERR_=1
export LIBC_FATAL_STDERR_
[ x"@MPI_LAUNCH@" != xtrue ] || exit 77
@abs_top_builddir@/libtool --mode=execute \
@MPI_LAUNCH@ -n 1 @abs_builddir@/test_redist_p2p
@MPI_LAUNCH@ -n 1 @abs_builddir@/test_redist_p2p
"$@"
@abs_top_builddir@/libtool --mode=execute \
@MPI_LAUNCH@ -n 1 @abs_builddir@/test_redist_p2p_f
@MPI_LAUNCH@ -n 1 @abs_builddir@/test_redist_p2p_f
"$@"
#
# Local Variables:
# mode: sh
...
...
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