ciptamf / pypar

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

Setup error on OS X #3

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Running 'python setup.py install' on OS X with MPICH2 does not set up pypar
correctly, although the 'setup.py' script seems to run without any errors.
The following output is generated:

romesh: source > python setup.py install
setup.py:34: DeprecationWarning: The popen2 module is deprecated.  Use the
subprocess module.
  import popen2 # FIXME: Replace with subprocess -
http://docs.python.org/library/subprocess.html#replacing-older-functions-with-th
e-subprocess-module
/Users/romesh/mpich2-install/bin/mpicc: line 248: echo: write error: Broken
pipe
/Users/romesh/mpich2-install/bin/mpicc: line 248: echo: write error: Broken
pipe
/Users/romesh/mpich2-install/bin/mpicc: line 248: echo: write error: Broken
pipe
+ '[' no = no ']'
+ unset 'allargs[0]'
++ expr 0 + 1
+ argno=1
+ for arg in '"$@"'
+ addarg=yes
+ case "$arg" in
+ linking=no
+ '[' yes = no ']'
++ expr 1 + 1
+ argno=2
+ for arg in '"$@"'
+ addarg=yes
+ case "$arg" in
+ '[' yes = no ']'
++ expr 2 + 1
+ argno=3
+ for arg in '"$@"'
+ addarg=yes
+ case "$arg" in
+ '[' yes = no ']'
++ expr 3 + 1
+ argno=4
+ for arg in '"$@"'
+ addarg=yes
+ case "$arg" in
+ '[' yes = no ']'
++ expr 4 + 1
+ argno=5
+ '[' 5 -eq 0 ']'
+ '[' yes = yes ']'
+ mpilibs='-lpmpich -lmpich -lopa'
+ CFLAGS=
+ LDFLAGS=' '
+ '[' -n '' ']'
+ '[' no = yes ']'
+ gcc -c /var/folders/eW/eWXFeb8cGoKDvOMgR+R4Q++++TI/-Tmp-/tmp7YHukX.c -o
/var/folders/eW/eWXFeb8cGoKDvOMgR+R4Q++++TI/-Tmp-/tmp7YHukX.o
-I/Users/romesh/mpich2-install/include
+ rc=0
+ exit 0
gcc -I/Users/romesh/mpich2-install/include
-L/Users/romesh/mpich2-install/lib -L/Users/romesh/mpich2-install/lib
-lpmpich -lmpich -lopa -lpthread
+ '[' no = no ']'
+ unset 'allargs[0]'
++ expr 0 + 1
+ argno=1
+ for arg in '"$@"'
+ addarg=yes
+ case "$arg" in
+ linking=no
+ '[' yes = no ']'
++ expr 1 + 1
+ argno=2
+ for arg in '"$@"'
+ addarg=yes
+ case "$arg" in
+ '[' yes = no ']'
++ expr 2 + 1
+ argno=3
+ for arg in '"$@"'
+ addarg=yes
+ case "$arg" in
+ '[' yes = no ']'
++ expr 3 + 1
+ argno=4
+ for arg in '"$@"'
+ addarg=yes
+ case "$arg" in
+ '[' yes = no ']'
++ expr 4 + 1
+ argno=5
+ '[' 5 -eq 0 ']'
+ '[' yes = yes ']'
+ mpilibs='-lpmpich -lmpich -lopa'
+ CFLAGS=
+ LDFLAGS=' '
+ '[' -n '' ']'
+ '[' no = yes ']'
+ gcc -c /var/folders/eW/eWXFeb8cGoKDvOMgR+R4Q++++TI/-Tmp-/tmp7YHukX.c -o
/var/folders/eW/eWXFeb8cGoKDvOMgR+R4Q++++TI/-Tmp-/tmp7YHukX.o
-I/Users/romesh/mpich2-install/include
+ rc=0
+ exit 0

running install
running build
running build_py
creating build
creating build/lib.macosx-10.6-universal-2.6
creating build/lib.macosx-10.6-universal-2.6/pypar
copying __init__.py -> build/lib.macosx-10.6-universal-2.6/pypar
copying __metadata__.py -> build/lib.macosx-10.6-universal-2.6/pypar
copying compile.py -> build/lib.macosx-10.6-universal-2.6/pypar
copying compile_pypar_locally.py -> build/lib.macosx-10.6-universal-2.6/pypar
copying network_timing.py -> build/lib.macosx-10.6-universal-2.6/pypar
copying pypar.py -> build/lib.macosx-10.6-universal-2.6/pypar
copying pypar_balancer.py -> build/lib.macosx-10.6-universal-2.6/pypar
copying test_init.py -> build/lib.macosx-10.6-universal-2.6/pypar
copying test_pypar.py -> build/lib.macosx-10.6-universal-2.6/pypar
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/Users/romesh/mpich2-install/include
-I/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/num
py/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
mpiext.c: In function ‘type_map’:
mpiext.c:124: warning: cast from pointer to integer of different size
mpiext.c: In function ‘op_map’:
mpiext.c:165: warning: cast from pointer to integer of different size
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/Users/romesh/mpich2-install/lib -lpmpich -lmpich -lopa -lpthread -o
build/lib.macosx-10.6-universal-2.6/pypar/mpiext.so
ld: warning: in /Users/romesh/mpich2-install/lib/libpmpich.dylib, file is
not of required architecture
ld: warning: in /Users/romesh/mpich2-install/lib/libmpich.dylib, file is
not of required architecture
ld: warning: in /Users/romesh/mpich2-install/lib/libopa.a, file is not of
required architecture
ld: warning: in /Users/romesh/mpich2-install/lib/libpmpich.dylib, file is
not of required architecture
ld: warning: in /Users/romesh/mpich2-install/lib/libmpich.dylib, file is
not of required architecture
ld: warning: in /Users/romesh/mpich2-install/lib/libopa.a, file is not of
required architecture
running install_lib
copying build/lib.macosx-10.6-universal-2.6/pypar/mpiext.so ->
/Library/Python/2.6/site-packages/pypar
running install_egg_info
Removing /Library/Python/2.6/site-packages/Pypar-2.1.4-py2.6.egg-info
Writing /Library/Python/2.6/site-packages/Pypar-2.1.4-py2.6.egg-info

But pypar cannot be imported in python:

romesh: source > python
Python 2.6.1 (r261:67515, Jul  7 2009, 23:51:51) 
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> 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
>>> 

Original issue reported on code.google.com by romesh.a...@gmail.com on 22 Dec 2009 at 10:47

GoogleCodeExporter commented 8 years ago
I'm also having this same problem installing on Mac OS X. Has this been 
resolved?

Original comment by belso...@gmail.com on 28 May 2010 at 11:18

GoogleCodeExporter commented 8 years ago
Unfortunately not, as far as I know. I ended up installing OpenMPI instead of 
MPICH2
and got it working on OS X that way

Original comment by romesh.a...@gmail.com on 28 May 2010 at 11:22