Gilles,
Thanks! With my very rudimentary understanding of C pointers and C
programming in general I missed that translation subtly. The revised
program runs fine with a variety of optimizations and debug options on
my test system.
Tom R.
On 10/27/2016 10:23 PM, Gilles Gouaillardet wrote
Tom,
regardless the (lack of) memory model in Fortran, there is an error in
testmpi3.f90
shar_mem is declared as an integer, and hence is not in the shared memory.
i attached my version of testmpi3.f90, which behaves just like the C
version,
at least when compiled with -g -O0 and with Ope
> Rationale. The C bindings of MPI_ALLOC_MEM and MPI_FREE_MEM are similar
> to the bindings for the malloc and free C library calls: a call to
> MPI_Alloc_mem(: : :, &base) should be paired with a call to
> MPI_Free_mem(base) (one
> less level of indirection). Both arguments are declared to be of
From the MPI 3.1 standard (page 338)
Rationale. The C bindings of MPI_ALLOC_MEM and MPI_FREE_MEM are similar
to the bindings for the malloc and free C library calls: a call to
MPI_Alloc_mem(: : :, &base) should be paired with a call to
MPI_Free_mem(base) (one
less level of indirection). Both
I've had a look at the OpenMPI 1.10.3 sources, and the trouble appears to me to
be that the MPI wrappers declare
the argument
TYPE(C_PTR), INTENT(OUT) :: baseptr
inside the BIND(C) interface on the Fortran side (for OpenMPI this would, for
example be ompi_win_allocate_f), and
the C implement
Jeff,
Thanks for looking at this. I know it isn't specific to Open-MPI, but
it is a frustrating issue vis-a-vis MPI and Fortran. There are many
very large MPI applications around the world written in Fortran that
could benefit greatly from this MPI-3 capability. My own background is
in num
I can reproduce this with Intel 17 and MPICH on Mac OSX so it's not an
Open-MPI issue. I added VOLATILE to the shared memory objects to prevent
Fortran compiler optimizations as well as a bunch of MPI_Win_sync calls
(after replacing fence with lock_all/unlock_all), but neither changed the
outcome.