Thank you both for your time. I respond to each question below:
Huiwei Lu, the outputs from the two commands are below:
[jlarson@mintthinkpad test]$ mpiexec --version
HYDRA build details:
Version: 3.1
Release Date: Thu Feb 20 11:41:13 CST 2014
CC: gcc
CXX: g++
F77: gfortran
F90: gfortran
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'
Process Manager: pmi
Launchers available: ssh rsh fork slurm ll lsf sge manual persist
Topology libraries available: hwloc
Resource management kernels available: user slurm ll lsf sge pbs cobalt
Checkpointing libraries available: blcr
Demux engines available: poll select
[jlarson@mintthinkpad test]$ mpicc -v
mpicc for MPICH version 3.1
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.6/lto-wrapper
Target: x86_64-linux-gnu
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
Thread model: posix
gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)
I don't know how else to have the function communicate with the worker that spawned it. If I replace the lines:
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:
(See the lines directly below "Worker (or child, or server) side:" in Section 4.3: Dynamic Process Management)