Hi David, On Thu, 3 Feb 2011 17:23:52 +0200, avidday <[email protected]> wrote: > On Sun, Jan 30, 2011 at 7:11 AM, Andreas Kloeckner > <[email protected]> wrote: > > > Try calling pytools.prefork.enable_prefork before you call MPI_Init(). > > (PyCUDA is already prepared for this under the hood, and you already > > have pytools if you have PyCUDA.) > > > > http://git.tiker.net/pytools.git/blob/HEAD:/pytools/prefork.py > > Thank you for the suggestion. Unfortunately it doesn't solve the > problem. If I run this: > > import sys > import time > > from pytools import prefork > prefork.enable_prefork() > > tcmd = ["gcc","--version"] > > retcode, stdout, stderr = prefork.call_capture_output(tcmd) > > sys.stdout.write("stdout: %s\n"%(stdout)) > sys.stdout.write("stderr: %s\n"%(stderr)) > sys.stdout.flush() > > time.sleep(10) > sys.stdout.write("done\n") > > using mpich2 1.3, only one process returns any output on stdout, the > others return None. The pytools methods succeed in doing the fork and > I can see the sockets that are created, but nothing is returned.
I can't reproduce your results using mpich2 version 1.3.2. If I mpirun -n 2 your program, both processes get something in their stdout. Perhaps a bug in your mpich2 version? In the meantime, I've integrated your earlier hack into PyCUDA. If the case is encountered, a warning is also issued. Andreas
pgp0u8qpQZsnw.pgp
Description: PGP signature
_______________________________________________ PyCUDA mailing list [email protected] http://lists.tiker.net/listinfo/pycuda
