[mvapich-discuss] Spawned Process cannot access shared memory
Jannek Squar
squar at informatik.uni-hamburg.de
Wed Mar 29 10:22:15 EDT 2017
Hello everybody,
I encountered a problem regarding MVAPICH2 2.2 and gcc 6.3.0 while using
MPI-3 shared memory with dynamically spawned processes in Fortran on a
single node with shared memory. See simplified example files attached.
My master-process spawns one slave-process and both try to create shared
memory. Since the slave shall access the shared memory created by the
master it calls mpi_win_shared_query, but cPtr, which should hold the
process-local address, has not been associated. Therefore the execution
fails with "Program received signal SIGSEGV: Segmentation fault -
invalid memory reference".
If I build those files with IntelMPI2017 everything runs fine. Since I'm
still new to MPI-3 I hope that I did not only introduce some bug into
the example code.
Greetings
Jannek
-------------- next part --------------
OBJS = Master.o Slave.o
FFLAG = -Wall -g
FC = mpif90#
#FC = /home/squar/bin/mpif90
INCLUDE =
LIBS =
PROGRAMS = Master.x Slave.x
all: $(PROGRAMS)
intel: FC = mpiifort
intel: all
@echo "Use Intel-Compiler"
$(PROGRAMS): $(OBJS)
@echo "Create Binaries"
${FC} ${LIBS} -o $@ $(basename $@).o
%.o: %.f90
@echo "Create Object-File"
${FC} ${FFLAG} ${INCLUDE} -c $<
clean:
rm -f $(OBJS) $(PROGRAMS)
run: $(PROGRAMS)
mpirun -np 1 ./Master.x
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Master.f90
Type: text/x-fortran
Size: 1465 bytes
Desc: not available
URL: <http://mailman.cse.ohio-state.edu/pipermail/mvapich-discuss/attachments/20170329/5ccf6152/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Slave.f90
Type: text/x-fortran
Size: 1412 bytes
Desc: not available
URL: <http://mailman.cse.ohio-state.edu/pipermail/mvapich-discuss/attachments/20170329/5ccf6152/attachment-0001.bin>
More information about the mvapich-discuss
mailing list