Hello,
Attached is a simple MPI program demonstrating a problem I have
encountered with 'MPI_Type_create_hindexed' when compiling with the
'mpi_f08' module. There are 2 blocks of code that are only different
in how the length and displacement arrays are declared. I get
indx.f90(50): error #6285: There is no matching specific subroutine for
this generic subroutine call. [MPI_TYPE_CREATE_HINDEXED]
call mpi_type_create_hindexed(lenidx,ijlena_2d,ijdispl_2d, &
for a case where the length and displacement arrays are 2-dimensional.
As far as I can find, there is nothing in the MPI-3.1 standard that
requires that these arrays be 1-dimensional. Am I missing something, or
is this a OPEN-MPI bug? I have been running successful programs with
multi-dimensional versions of these arrays for years when compiling with
'mpif.h'.
T. Rosmond
program hindx
use mpi_f08
implicit none
integer i,lenidx,ierr,irank,nproc,lint,ibyte
integer, dimension(:), allocatable :: ijlena_1d
integer, dimension(:,:), allocatable :: ijlena_2d
integer(kind=MPI_ADDRESS_KIND), dimension(:), allocatable :: ijdispl_1d
integer(kind=MPI_ADDRESS_KIND), dimension(:,:), allocatable :: ijdispl_2d
type(mpi_status) :: status
type(mpi_datatype) :: ij_vector_type_1d
type(mpi_datatype) :: ij_vector_type_2d
call MPI_Init(ierr)
call MPI_Comm_rank(MPI_COMM_WORLD,irank,ierr)
call MPI_Comm_size(MPI_COMM_WORLD,nproc,ierr)
call mpi_sizeof(i,ibyte,ierr)
! 1-D case (ocmpile success)
lenidx= 10
allocate(ijlena_1d(lenidx))
allocate(ijdispl_1d(lenidx))
do i=1,lenidx
ijlena_1d(i)= 1
ijdispl_1d(i)= (i-1)*ibyte
enddo
call mpi_type_create_hindexed(lenidx,ijlena_1d,ijdispl_1d, &
mpi_real,ij_vector_type_1d,ierr)
call mpi_type_commit(ij_vector_type_1d,ierr)
! 2-D case (ocmpile failure)
lenidx= 10
allocate(ijlena_2d(lenidx,1))
allocate(ijdispl_2d(lenidx,1))
do i=1,lenidx
ijlena_2d(i,1)= 1
ijdispl_2d(i,1)= (i-1)*ibyte
enddo
call mpi_type_create_hindexed(lenidx,ijlena_2d,ijdispl_2d, &
mpi_real,ij_vector_type_2d,ierr)
call mpi_type_commit(ij_vector_type_2d,ierr)
call mpi_finalize(ierr)
end
_______________________________________________
users mailing list
users@lists.open-mpi.org
https://rfd.newmexicoconsortium.org/mailman/listinfo/users