uniomni / pypar

Automatically exported from code.google.com/p/pypar
0 stars 0 forks source link

pypar windows #5

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hi, I have compiled Pypar on windows 32 s.o.
When I try to launch the Paypar test i can't find the libmpi.so:

mpi = CDLL('libmpi.so.0', RTLD_GLOBAL)

I use MPICH2.
Any suggestion?

Original issue reported on code.google.com by pisoni.s...@gmail.com on 12 Jan 2012 at 9:28

GoogleCodeExporter commented 9 years ago
hello, libmpi on windows is libmpi.dll. in pypar.py try this

# 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

Original comment by gp.cic...@gmail.com on 2 Feb 2013 at 12:26