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
13790e25
Commit
13790e25
authored
7 years ago
by
Thomas Jahns
Browse files
Options
Downloads
Patches
Plain Diff
Actively test world size before running tests.
* This prevents overflows later on, however theoretical.
parent
662365c2
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
tests/test_redist_collection_parallel_f.f90
+15
-3
15 additions, 3 deletions
tests/test_redist_collection_parallel_f.f90
with
15 additions
and
3 deletions
tests/test_redist_collection_parallel_f.f90
+
15
−
3
View file @
13790e25
...
...
@@ -47,7 +47,7 @@
!
PROGRAM
test_redist_collection_parallel
USE
mpi
USE
ftest_common
,
ONLY
:
init_mpi
,
finish_mpi
,
test_abort
USE
ftest_common
,
ONLY
:
init_mpi
,
finish_mpi
,
test_abort
,
icbrt
USE
test_idxlist_utils
,
ONLY
:
test_err_count
USE
yaxt
,
ONLY
:
xt_initialize
,
xt_finalize
,
xt_int_kind
,
xi
=>
xt_int_kind
,
&
xt_idxlist
,
xt_idxlist_delete
,
xt_stripe
,
xt_idxvec_new
,
&
...
...
@@ -131,9 +131,16 @@ CONTAINS
index_vector_b
(:)
TYPE
(
xt_xmap
)
::
xmaps
(
num_tx
)
TYPE
(
xt_redist
)
::
redists
(
num_tx
),
redist
,
redist_copy
INTEGER
::
i
INTEGER
::
i
,
vec_size
ALLOCATE
(
index_vector_a
(
2
*
world_size
**
2
),
index_vector_b
(
2
*
world_size
**
2
))
IF
(
world_size
&
>
icbrt
((
HUGE
(
1_xi
)
-
MOD
(
HUGE
(
1_xi
),
2_xi
))/
2_xi
))
&
CALL
test_abort
(
'communicator too large for test'
,
&
__
FILE__
,
&
__
LINE__
)
vec_size
=
2
*
world_size
**
2
ALLOCATE
(
index_vector_a
(
vec_size
),
index_vector_b
(
vec_size
))
CALL
build_idxlists
(
indices_a
,
indices_b
,
indices_all
)
xmaps
(
1
)
=
xt_xmap_all2all_new
(
indices_a
,
indices_b
,
mpi_comm_world
)
...
...
@@ -287,6 +294,11 @@ CONTAINS
TYPE
(
xt_xmap
)
::
xmaps
(
2
)
TYPE
(
xt_redist
)
::
redists
(
2
),
redist
,
redist_copy
IF
(
world_size
>
(
HUGE
(
1_xi
)
-
MOD
(
HUGE
(
1_xi
),
5_xi
))/
5_xi
)
&
CALL
test_abort
(
'communicator too large for test'
,
&
__
FILE__
,
&
__
LINE__
)
DO
i
=
1_xi
,
5_xi
src_indices_
(
i
)
=
INT
(
rank
,
xi
)
*
5_xi
+
(
i
-
1_xi
)
dst_indices_
(
i
,
1
)
=
MOD
(
src_indices_
(
i
)
+
1_xi
,
&
...
...
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