In my application, I have the following in my code. I am using mpi_f08
in that specific routine to use the function MPI_F_SYNC_REG
for safe synchronisation. It seems using mpi_f08
is triggering the problem.
use mpi_f08, only: MPI_F_SYNC_REG
do I = 1, noblocks
ncell = geom(I)% ncell
allocate(buf(ncell,6))
call MPI_IBCAST(buf,root,ncell*6, request, mpi_comm_world, mopier)
call mpi_wait(request, mpier)
ptr = buf(:,6)
deallocate(buf)
enddo
When running with openmpi and gfortran I get the following runtime error:
Fortran runtime error: Index '6' of dimension 2 of array 'buf' outside of expected range (0:5)
I am running with gcc 10.1.0 and openmpi 4.1.0. Recreating this problem is tough, I am seeking an advice or hints, if any of way might have came across such problem before. What could this be? Because clearly I am explicitly allocating 6 elements on the 2nd dimension, and I don't see why gfortran suddenly switches to a 0 based indexing