Skip to content
Snippets Groups Projects
Commit 72c5296d authored by Thomas Jahns's avatar Thomas Jahns :cartwheel:
Browse files

Use interoperable kind for MPI_Aint.

* gfortran warns when using mpi_address_kind directly. Therefore using
  the corresponding kind from iso_c_binding removes those warnings.
parent fb2f794b
No related branches found
No related tags found
No related merge requests found
......@@ -205,6 +205,9 @@ ACX_F90_PACKAGE([MPI],[mpi],,,
save_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS $MPI_C_INCLUDE"
TJ_FIND_INTEGRAL_TYPE([MPI_Fint],[MPI_FINT],[@%:@include <mpi.h>])
TJ_FIND_INTEGRAL_TYPE([MPI_Aint],[xt_mpi_aint],[@%:@include <mpi.h>])
xt_mpi_aint_kind=c_[]AS_TR_SH([$xt_mpi_aint])
FCFLAGS="$FCFLAGS ${FPP_DEFOPT}XT_MPI_AINT_KIND=$xt_mpi_aint_kind"
CFLAGS=$save_CFLAGS
AS_CASE(["$MPI_FINT"],
[int],[XT_MPI_FINT_MAX=INT_MAX XT_MPI_FINT_FC_KIND=c_int],
......
......@@ -46,11 +46,12 @@
! SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
!
MODULE xt_mpi
USE mpi
USE mpi, orig_mpi_address_kind => mpi_address_kind
USE, INTRINSIC :: ISO_C_BINDING, ONLY: c_int, c_long, c_short, c_long_long
IMPLICIT NONE
PUBLIC
INTEGER, PARAMETER :: xt_mpi_fint_kind = XT_MPI_FINT_FC_KIND
INTEGER, PARAMETER :: mpi_address_kind = XT_MPI_AINT_KIND
INTERFACE
SUBROUTINE xt_mpi_comm_mark_exclusive(comm) &
BIND(c, name='xt_mpi_comm_mark_exclusive_f2c')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment