Hi Ole,

Here is the latest from compiling on my OS X machine

pypar-2.1.0_66 : has the -lopa' problem, but if I run compile_pypar_locally, it installs and runs (but fails tests as discussed previously)

pypar-2.1.2_87 : 'python setup.py install' runs and finishes without errors, although it complains about the library architecture (as previously discussed re. building universal binary as opposed to a single architecture). However, if I try to import pypar in python, I get this:

>>> import pypar
ERROR: C extension mpiext could not be imported.
Please compile mpiext.c e.g. by running
  python compile_pypar_manually.py
in the pypar directory, or by using
  python setup.py install

WARNING: MPI library could not be initialised - running sequentially

By the way, should this error message read
"Please compile mpiext.c e.g. by running
  python compile_pypar_locally.py"

rather than "python compile_pypar_manually.py" ?

If I run compile_pypar_locally, it compiles. However, Python then does this:

>>> import pypar
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "pypar.py", line 863, in <module>
    mpi = CDLL('libmpi.so.0', RTLD_GLOBAL)
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/ctypes/__init__.py", line 345, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: dlopen(libmpi.so.0, 10): image not found

pypar-2.1.3_91 : 'python setup.py install' quits with the following error message

running build_ext
building 'pypar.mpiext' extension
creating build/temp.macosx-10.6-universal-2.6
gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch ppc -arch x86_64 -pipe -I/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/numpy/core/include -I/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -c mpiext.c -o build/temp.macosx-10.6-universal-2.6/mpiext.o
gcc-4.2 -Wl,-F. -bundle -undefined dynamic_lookup -arch i386 -arch ppc -arch x86_64 build/temp.macosx-10.6-universal-2.6/mpiext.o -L/usr/opt/mpi -lmpi -lelan -o build/lib.macosx-10.6-universal-2.6/pypar/mpiext.so
ld: library not found for -lelan
collect2: ld returned 1 exit status
ld: library not found for -lelan
collect2: ld returned 1 exit status
ld: library not found for -lelan
collect2: ld returned 1 exit status
lipo: can't open input file: /var/folders/eW/eWXFeb8cGoKDvOMgR+R4Q++++TI/-Tmp-//cciaX7u5.out (No such file or directory)
error: command 'gcc-4.2' failed with exit status 1

Running compile_pypar_locally gives exactly the same error message in python as 2.1.2_87

Thanks for the speedy updates!


2009/12/22 Jay Larson <jwl105@rsphymail.anu.edu.au>
Hi Ole,

The -lopa' problem is certainly the same.


Sent from Jay's BlackBerry®

From: Ole Nielsen <ole.moller.nielsen@gmail.com>
Date: Mon, 21 Dec 2009 23:37:01 +1100
To: Dr. Jay Larson (ANU)<jay.larson@anu.edu.au>; Pypar-developers<Pypar-developers@lists.sourceforge.net>; Romesh Abeysuriya<romesh.abey@gmail.com>; Jussi Lehtola<jussilehtola@fedoraproject.org>
Subject: Fwd: Problems with pypar & MPICH2

Hi guys

This sounds like the problem you had?

Is this something with recent MPICH versions perhaps?


---------- Forwarded message ----------
From: Jussi Lehtola <jussilehtola@fedoraproject.org>
Date: Mon, Dec 21, 2009 at 11:34 PM
Subject: Problems with pypar & MPICH2
To: ole.moller.nielsen@gmail.com


I'm trying to add MPICH2 support to the Fedora package of pypar, however
the compilation fails with

mpicc -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic
-D_GNU_SOURCE -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2
-fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64
-mtune=generic -fPIC -I/usr/include/mpich2-x86_64
-I/usr/include/python2.6 -c mpiext.c -o
build/temp.linux-x86_64-2.6/mpiext.o -fPIC
mpiext.c: In function 'type_map':
mpiext.c:127: warning: return makes integer from pointer without a cast
mpiext.c: In function 'op_map':
mpiext.c:168: warning: return makes integer from pointer without a cast
gcc -pthread -shared -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2
-fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64
-mtune=generic build/temp.linux-x86_64-2.6/mpiext.o
-L/usr/lib64/mpich2/lib -L/usr/lib64 -lmpich -lopa -lpthread -lrt -lopa'
-lpython2.6 -o build/lib.linux-x86_64-2.6/pypar/mpiext.so
/usr/bin/ld: cannot find -lopa'
collect2: ld returned 1 exit status

so it seems that an extra ' is picked up somewhere. Do you have any idea
where this might come out from?

Also, although I've defined CC=mpicc, the file is compiled with gcc..

Jussi Lehtola
Fedora Project Contributor