Tom Rosmond
2016-10-25 18:29:30 UTC
All:
I am trying to understand the use of the shared memory features of MPI-3
that allow direct sharing of the memory space of on-node processes.
Attached are 2 small test programs, one written in C (testmpi3.c), the
other F95 (testmpi3.f90) . They are solving the identical 'halo'
exchange problem. 'testmpi3.c' is a simplified version of an example
program from a presentation by Mark Lubin of Intel. I wrote
'testmpi3.f90' to mimic the C version.
Also attached are 2 text files of the compile, execution, and output
of the respective programs:
CC_testmpi3.txt
F95_testmpi3.txt
Note: All 4 files are contained in the attached 'testmpi3.tar.gz'.
Comparing the outputs of each version, it is clear that the shared
memory copies in 'testmpi3.c' are working correctly, but not in
'testmpi3.f90'. As far as I can tell, the 2 programs are equivalent up
to line 134 of 'testmpi3.c' and lines 97-101 of 'testmpi3.f90'. I
thought the calls to 'c_f_pointer' would produce Fortran pointers that
would access the correct shared memory addresses as the C-pointers do in
'testmpi3.c', but clearly that isn't happening. Can anyone explain why
not, and what is needed to make this happen. Any suggestions are welcome.
My environment:
Scientific Linux 6.8
INTEL FORTRAN and ICC version 15.0.2.164
OPEN-MPI 2.0.1
T. Rosmond
I am trying to understand the use of the shared memory features of MPI-3
that allow direct sharing of the memory space of on-node processes.
Attached are 2 small test programs, one written in C (testmpi3.c), the
other F95 (testmpi3.f90) . They are solving the identical 'halo'
exchange problem. 'testmpi3.c' is a simplified version of an example
program from a presentation by Mark Lubin of Intel. I wrote
'testmpi3.f90' to mimic the C version.
Also attached are 2 text files of the compile, execution, and output
of the respective programs:
CC_testmpi3.txt
F95_testmpi3.txt
Note: All 4 files are contained in the attached 'testmpi3.tar.gz'.
Comparing the outputs of each version, it is clear that the shared
memory copies in 'testmpi3.c' are working correctly, but not in
'testmpi3.f90'. As far as I can tell, the 2 programs are equivalent up
to line 134 of 'testmpi3.c' and lines 97-101 of 'testmpi3.f90'. I
thought the calls to 'c_f_pointer' would produce Fortran pointers that
would access the correct shared memory addresses as the C-pointers do in
'testmpi3.c', but clearly that isn't happening. Can anyone explain why
not, and what is needed to make this happen. Any suggestions are welcome.
My environment:
Scientific Linux 6.8
INTEL FORTRAN and ICC version 15.0.2.164
OPEN-MPI 2.0.1
T. Rosmond