Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28446 Discussions

Warnings when using mpi_f08 subarray operations

Bennett__Ed
Novice
430 Views

Hi

I've been having trouble with declared subarray types, so am trying to switch my code over to using the direct subarray notation that's now allowed by the mpi_f08 module.

Using lines like:

    call MPI_Irecv(Array(0, 1:ksizey_l), ksizey_l, MPI_Real, ip_xdn, 0 + tag_offset, comm, reqs(2))
    call MPI_Isend(Array(1, 1:ksizey_l), ksizey_l, MPI_Real, ip_xdn, 1 + tag_offset, comm, reqs(3))

give warnings along the lines of:

test_mpif08.F90(51): warning #8100: The actual argument is an array section or assumed-shape array, corresponding dummy argument that has either the VOLATILE or ASYNCHRONOUS attribute shall be an assumed-shape array.   [ARRAY]
    call MPI_Irecv(Array(0, 1:ksizey_l), ksizey_l, MPI_Real, ip_xdn, 0 + tag_offset, comm, reqs(2))

(I've gisted a full minimal working example here.)

While I can't find much documentation on mpi_f08, reading examples like this suggest that what I'm doing should be fine - can anyone tell me why am I getting this warning, and how I can avoid it (without just suppressing it with a flag)?

Thanks

Ed

0 Kudos
1 Reply
Bennett__Ed
Novice
430 Views

Having pushed through ignoring the warnings, I now find that this seems to work fine with my rank 4 and 5 arrays (large numbers of warnings notwithstanding), but corrupts data in rank 6 arrays. I've put up another gist here that shows the program I'm using in this case. I'd appreciate any pointers on how to avoid this!

Edit to add: I've noticed I was using ifort 2017 (and Intel MPI 2017). Switching to ifort 2018 (and Intel MPI 2018) gives the following error in addition to the above warning:

test_halo_6_aio.F90(60): error #7505: If an actual argument is an array section with vector subscript and corresponding dummy argument does not have VALUE attribute, it must not have ASYNCHRONOUS / VOLATILE attribute.   [BUF]
0 Kudos
Reply