Skip to content

Commit 3b606ae

Browse files
committed
Use extended array-descriptor of GCC >= 8 everywhere, where it is needed.
1 parent 3943fe5 commit 3b606ae

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

src/mpi/mpi_caf.c

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2703,9 +2703,7 @@ copy_data (void *ds, mpi_caf_token_t *token, MPI_Aint offset, int dst_type,
27032703
This typedef is made to allow storing a copy of a remote descriptor on the
27042704
stack without having to care about the rank. */
27052705
typedef struct gfc_max_dim_descriptor_t {
2706-
void *base_addr;
2707-
size_t offset;
2708-
ptrdiff_t dtype;
2706+
gfc_descriptor_t base;
27092707
descriptor_dimension dim[GFC_MAX_DIMENSIONS];
27102708
} gfc_max_dim_descriptor_t;
27112709

@@ -3838,11 +3836,14 @@ PREFIX(is_present) (caf_token_t token, int image_index, caf_reference_t *refs)
38383836
MPI_BYTE, global_dynamic_win);
38393837
}
38403838
#ifdef EXTRA_DEBUG_OUTPUT
3841-
fprintf (stderr, "%d/%d: %s() remote desc rank: %d (ref_rank: %d)\n", caf_this_image, caf_num_images,
3842-
__FUNCTION__, GFC_DESCRIPTOR_RANK (&src_desc), ref_rank);
3843-
for (i = 0; i < GFC_DESCRIPTOR_RANK (&src_desc); ++i)
3844-
fprintf (stderr, "%d/%d: %s() remote desc dim[%d] = (lb = %d, ub = %d, stride = %d)\n", caf_this_image, caf_num_images,
3845-
__FUNCTION__, i, src_desc.dim[i].lower_bound, src_desc.dim[i]._ubound, src_desc.dim[i]._stride);
3839+
{
3840+
gfc_descriptor_t * src = (gfc_descriptor_t *)(&src_desc);
3841+
fprintf (stderr, "%d/%d: %s() remote desc rank: %d (ref_rank: %d)\n", caf_this_image, caf_num_images,
3842+
__FUNCTION__, GFC_DESCRIPTOR_RANK (src), ref_rank);
3843+
for (i = 0; i < GFC_DESCRIPTOR_RANK (src); ++i)
3844+
fprintf (stderr, "%d/%d: %s() remote desc dim[%d] = (lb = %d, ub = %d, stride = %d)\n", caf_this_image, caf_num_images,
3845+
__FUNCTION__, i, src_desc.dim[i].lower_bound, src_desc.dim[i]._ubound, src_desc.dim[i]._stride);
3846+
}
38463847
#endif
38473848

38483849
for (i = 0; riter->u.a.mode[i] != CAF_ARR_REF_NONE; ++i)

0 commit comments

Comments
 (0)