<div dir="ltr"><div><div>Thank you both for your time. I respond to each question below:</div><div><br></div><div>Huiwei Lu, the outputs from the two commands are below:</div><div> </div><div>[jlarson@mintthinkpad test]$ mpiexec --version</div>
<div>HYDRA build details:</div><div> Version: 3.1</div><div> Release Date: Thu Feb 20 11:41:13 CST 2014</div><div> CC: gcc </div>
<div> CXX: g++ </div><div> F77: gfortran </div><div> F90: gfortran </div><div> Configure options: '--disable-option-checking' '--prefix=/home/jlarson/software/mpich-install' '--cache-file=/dev/null' '--srcdir=.' 'CC=gcc' 'CFLAGS= -O2' 'LDFLAGS= ' 'LIBS=-lrt -lpthread ' 'CPPFLAGS= -I/home/jlarson/software/mpich-3.1/src/mpl/include -I/home/jlarson/software/mpich-3.1/src/mpl/include -I/home/jlarson/software/mpich-3.1/src/openpa/src -I/home/jlarson/software/mpich-3.1/src/openpa/src -I/home/jlarson/software/mpich-3.1/src/mpi/romio/include'</div>
<div> Process Manager: pmi</div><div> Launchers available: ssh rsh fork slurm ll lsf sge manual persist</div><div> Topology libraries available: hwloc</div>
<div>
Resource management kernels available: user slurm ll lsf sge pbs cobalt</div><div> Checkpointing libraries available: blcr</div><div> Demux engines available: poll select</div><div>[jlarson@mintthinkpad test]$ mpicc -v</div>
<div>mpicc for MPICH version 3.1</div><div>Using built-in specs.</div><div>COLLECT_GCC=gcc</div><div>COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.6/lto-wrapper</div><div>Target: x86_64-linux-gnu</div><div>Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.6.3-1ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu</div>
<div>Thread model: posix</div><div>gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) </div></div><div><br></div><div>Jed Brown,</div><div><br></div><div>I don't know how else to have the function communicate with the worker that spawned it. If I replace the lines:</div>
<div>----</div><div><div>comm_to_function_wrapper = MPI.Comm.Get_parent()</div><div>rank = comm_to_function_wrapper.Get_rank()</div></div><div>----</div><div>with:</div><div>----</div><div>comm_to_function_wrapper = MPI.COMM_WORLD.Get_parent()</div>
<div><div>rank = comm_to_function_wrapper.Get_rank()</div></div><div>----</div><div>then I still get valid output for 3 ranks, but not 30. Is there a valid way for a spawned task to communicate with the worker that spawned it? I was using the example from the mpi4py manual:</div>
<div><a href="http://mpi4py.scipy.org/docs/mpi4py.pdf" target="_blank">http://mpi4py.scipy.org/docs/mpi4py.pdf</a><br></div><div>(See the lines directly below "Worker (or child, or server) side:" in Section 4.3: Dynamic Process Management)<br>
</div><div><br></div><div>Thank you again!</div><div>Jeff</div>
<div> </div><div><br></div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Mar 11, 2014 at 5:52 PM, Jed Brown <span dir="ltr"><<a href="mailto:jed@jedbrown.org" target="_blank">jed@jedbrown.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div>Jeffrey Larson <<a href="mailto:jmlarson@anl.gov" target="_blank">jmlarson@anl.gov</a>> writes:<br>
<br>
> Thank you for your response. Attached are the script and the simple<br>
> function that it calls.<br>
><br>
> The command:<br>
> $ mpiexec -n 3 python script.py<br>
> works great, but 30 crashes.<br>
<br>
</div>I don't think this is valid:<br>
<br>
| comm_to_function_wrapper = MPI.Comm.Get_parent()<br>
| rank = comm_to_function_wrapper.Get_rank()<br>
<br>
$ make intercomm CC=/opt/mpich/bin/mpicc && /opt/mpich/bin/mpiexec -n 2 ./intercomm<br>
/opt/mpich/bin/mpicc intercomm.c -o intercomm<br>
Fatal error in PMPI_Comm_rank: Invalid communicator, error stack:<br>
PMPI_Comm_rank(108): MPI_Comm_rank(MPI_COMM_NULL, rank=0x7fff9fe6a118) failed<br>
PMPI_Comm_rank(66).: Null communicator<br>
Fatal error in PMPI_Comm_rank: Invalid communicator, error stack:<br>
PMPI_Comm_rank(108): MPI_Comm_rank(MPI_COMM_NULL, rank=0x7fff5e484d48) failed<br>
PMPI_Comm_rank(66).: Null communicator<br>
<br>
===================================================================================<br>
= BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES<br>
= PID 8474 RUNNING AT batura<br>
= EXIT CODE: 1<br>
= CLEANING UP REMAINING PROCESSES<br>
= YOU CAN IGNORE THE BELOW CLEANUP MESSAGES<br>
===================================================================================<br>
$ /opt/mpich/bin/mpichversion<br>
MPICH Version: 3.1<br>
MPICH Release date: Thu Feb 20 11:41:13 CST 2014<br>
MPICH Device: ch3:nemesis<br>
MPICH configure: --prefix=/opt/mpich --enable-shared --enable-sharedlibs=gcc --enable-error-checking=runtime --enable-error-messages=all --enable-timer-type=clock_gettime --with-python=python2<br>
MPICH CC: gcc -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -O2<br>
MPICH CXX: g++ -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4<br>
MPICH F77: gfortran -O2<br>
MPICH FC: gfortran<br>
<br>
</blockquote></div><br></div></div>