0. modify setup.py to find OpenMPI installation and libraries (it's not able to find them by itself)
# I keep my OpenMPI installation somewhere in the far
mpi_flags['inc_dirs'].append("e:\\OpenMPI_v1.6.2-win32\\include")
# ehm... OpenMPI .dlls are in the bin directory
mpi_flags['lib_dirs'].append("e:\\OpenMPI_v1.6.2-win32\\bin")
mpi_flags['libs'] = ["libmpi", "libopen-pal", "libopen-rte"]
1. modify pypar.py to generalize a unix-specific hack (the OSX users have a similar issue)
# Work around bug in OpenMPI (December 2009):
# https://bugs.launchpad.net/ubuntu/+source/petsc4py/+bug/232036
from ctypes import *
if sys.platform=="win32":
mpi = CDLL('libmpi.dll', RTLD_GLOBAL)
else:
mpi = CDLL('libmpi.so.0', RTLD_GLOBAL)
# End work around
2. the worst, add manually the runtime OpenMPI dll the the pypar installation directory
in site-packages\pypar, put them
libmpi.dll
libopen-pal
libopen-rte
then it seems to work: here it is the standard demo.py execution log (the btl_tcp_if_exclude warning depends from the strange loopback setup in win 7)
Pypar (version 2.1.4) initialised MPI OK with 2 processors
I am proc 0 of 2 on node andie
Processor 0 sending message "MSGP0" to processor 1
Processor 0 received message "MSGP0->P1" from processor 1
Size of msg was 9 bytes
I am proc 1 of 2 on node andie
Processor 1 received message "MSGP0" from processor 0
Size of msg was 5 bytes
Processor 1 sending msg "MSGP0->P1" to 0
[andie:06164] 1 more process has sent help message help-mpi-btl-tcp.txt / invalid if_inexclude
--------------------------------------------------------------------------
WARNING: An invalid value was given for btl_tcp_if_exclude. This
value will be ignored.
Local host: andie
Value: 127.0.0.1/8
Message: Did not find interface matching this subnet
--------------------------------------------------------------------------
[andie:06164] Set MCA parameter "orte_base_help_aggregate" to 0 to see all help / error messages
Nessun commento:
Posta un commento