Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Y
YAC
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
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
YAC
Commits
0b0aeb64
Commit
0b0aeb64
authored
2 years ago
by
Moritz Hanke
Browse files
Options
Downloads
Patches
Plain Diff
adds configure test for MPICH datatype bug
parent
3027d4e8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
config/checkdoc/test_mpich_datatype.txt
+8
-0
8 additions, 0 deletions
config/checkdoc/test_mpich_datatype.txt
config/checksrc/test_mpich_datatype.c
+69
-0
69 additions, 0 deletions
config/checksrc/test_mpich_datatype.c
with
77 additions
and
0 deletions
config/checkdoc/test_mpich_datatype.txt
0 → 100644
+
8
−
0
View file @
0b0aeb64
Your MPI library is unable to handle certain dervied MPI datatypes correctly.
It is strongly recommended to switch to a version of MPI that is not affected
with the issue.
Alternatively, you can disable this test with the configure argument
"--disable-mpi-checks" but this might result into a non-working YAC build.
This diff is collapsed.
Click to expand it.
config/checksrc/test_mpich_datatype.c
0 → 100644
+
69
−
0
View file @
0b0aeb64
#include
<mpi.h>
#include
<inttypes.h>
#include
<stdlib.h>
#include
<stdio.h>
#include
<string.h>
/* unfortunately GCC 11 cannot handle the literal constants used for
* MPI_STATUSES_IGNORE by MPICH */
#if (__GNUC__ == 11 || __GNUC__ == 12) && defined MPICH
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstringop-overread"
#pragma GCC diagnostic ignored "-Wstringop-overflow"
#endif
// acx_mpi_job_count=1
struct
datatype
{
int
i
;
uint64_t
ui64
;
};
static
MPI_Datatype
gen_ddt
(
MPI_Comm
comm
)
{
struct
datatype
dummy
;
MPI_Datatype
ddt
;
MPI_Type_create_struct
(
2
,
(
int
[]){
1
,
1
},
(
MPI_Aint
[])
{(
MPI_Aint
)((
void
*
)
&
(
dummy
.
i
)
-
(
void
*
)
&
dummy
),
(
MPI_Aint
)((
void
*
)
&
(
dummy
.
ui64
)
-
(
void
*
)
&
dummy
)},
(
MPI_Datatype
[]){
MPI_INT
,
MPI_UINT64_T
},
&
ddt
);
MPI_Type_commit
(
&
ddt
);
return
ddt
;
}
int
main
(
void
)
{
MPI_Init
(
NULL
,
NULL
);
int
rank
;
MPI_Comm_rank
(
MPI_COMM_WORLD
,
&
rank
);
MPI_Datatype
ddt
=
gen_ddt
(
MPI_COMM_WORLD
);
int
count
=
20705
;
// in my tests for counts < 17403 the bug does not occure
// int count = 17403;
size_t
buffer_size
=
count
*
sizeof
(
struct
datatype
);
struct
datatype
*
send_buffer
=
malloc
(
buffer_size
);
struct
datatype
*
recv_buffer
=
malloc
(
buffer_size
);
memset
(
send_buffer
,
0
,
buffer_size
);
memset
(
recv_buffer
,
0
,
buffer_size
);
int
tag
=
0
;
MPI_Sendrecv
(
send_buffer
,
count
,
ddt
,
rank
,
tag
,
recv_buffer
,
count
,
ddt
,
rank
,
tag
,
MPI_COMM_WORLD
,
MPI_STATUS_IGNORE
);
free
(
recv_buffer
);
free
(
send_buffer
);
MPI_Type_free
(
&
ddt
);
MPI_Finalize
();
return
EXIT_SUCCESS
;
}
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