Help re getting pypar installed (in the context of ANUGA)

58 views
Skip to first unread message

Ole Nielsen

unread,
Aug 14, 2012, 8:50:52 PM8/14/12
to pypar-...@googlegroups.com, anuga-user-list


---------- Forwarded message ----------
From: Steve Plimpton <sjp...@sandia.gov>
Date: Wed, Aug 15, 2012 at 12:08 AM
Subject: Re: [EXTERNAL] Can you help?
To: Ole Nielsen <ole.molle...@gmail.com>, weng...@gmail.com


In the pypar/sources/setup.py file
in _get_mpi_cmd(), you will see where it is
capturing output from running "mpicc -show".

You can try printing out the "output" variable
there and see what it is getting.

It should be the same thing you get if you type
% mpicc -show
from the command line.  If it isn't then possibly
the setup.py script is confused about which mpicc
to run or not finding it in its path.  These could
happen if you have multiple
MPIs (and multiple mpicc) installed on your box, or if you are
running the Pypar install as root, which will use different
paths.

On my box, with MPICH, mpicc -show gives this as output:

gcc -I/usr/local/include -L/usr/local/lib -Wl,-rpath,/usr/local/lib -lmpich -lopa -lmpl -lrt -lpthread

and all of those extra libs are successfully used within the Pypar
build.  I know this b/c the last line of output from

% python setup.py build

is
gcc -pthread -shared build/temp.linux-x86_64-2.7/mpiext.o -L/usr/local/lib -lmpich -lopa -lmpl -lrt -lpthread -o build/lib.linux-x86_64-2.7/pypar/mpiext.so

and you can see all those extra MPICH-specific libs are tacked on.

I believe the MPL_trid error you are getting is a function in -lmpl,
and thus you are not using those extra libs that MPICH
requires you to link with, in order to create mpiext.so.

Steve



> Date: Tue, 14 Aug 2012 20:46:31 +0700
> From: Ole Nielsen <ole.molle...@gmail.com>
> Content-Type: multipart/alternative; boundary="0015175d0998b4d48a04c73a0933"
>
> [1:text/plain Hide]
> I got this request re ANUGA, but it turns out he has got similar issues
> like you have with pypar.
> I have cross posted to the discussion groups, but thought that maybe you
> could give him a hand ?
>
> Many thanks
> Ole
>
> ---------- Forwarded message ----------
> From: Zhe Weng <weng...@gmail.com>
> Date: Tue, Aug 14, 2012 at 6:25 PM
> Subject: Problems when install ANUGA
> To: Ole.Molle...@gmail.com
>
>
> Hi Ole,
>
> I'm trying to install ajuga_parallel, but get stuck.
>
> When I try to install the pypar to my local lib dir (since I have not
> access to sudo command), I run
>         $python setup.py install --user
> it shows:
>         running mpicc -show
>         /usr/bin/mpicc: line 266: echo: write error: Broken pipe
>         running mpicc -compile_info -link_info
>         /usr/bin/mpicc: line 266: echo: write error: Broken pipe
>         running mpicc -show;mpicc -echo -c /tmp/tmpQov5Kx.c -o
> /tmp/tmpQov5Kx.o
>         /usr/bin/mpicc: line 266: echo: write error: Broken pipe
>         ……
>
> Then I imported pypar to python, it raised errors:
>         >>> import pypar
>         ERROR: C extension mpiext could not be imported.
>         Please compile mpiext.c e.g. by running
>                 python compile_pypar_locally.py
>         in the pypar directory, or by using
>                 python setup.py install
>
>         WARNING: MPI library could not be initialised - running sequentially
>
> So I follow the instruction to compile pypar locally, and errors following:
>         mpicc -c mpiext.c -I/usr/include/python2.7
> -I/usr/lib/python2.7/dist -packages/numpy/core/include -o mpiext.o -Wall
> -fPIC
>         mpiext.c: In function ‘type_map’:
>         mpiext.c:124:12: warning: cast from pointer to integer of different
> size [-Wpointer-to-int-cast]
>         mpiext.c: In function ‘op_map’:
>         mpiext.c:165:12: warning: cast from pointer to integer of different
> size [-Wpointer-to-int-cast]
>         mpicc -shared mpiext.o  -o mpiext.so -mcmodel=medium
>         Traceback (most recent call last):
>                  File "<string>", line 1, in <module>
>         ImportError: /usr/lib/libmpich.so.3: undefined symbol: MPL_trid
>         Traceback (most recent call last):
>                 File "compile_pypar_locally.py", line 61, in <module>
>                         raise Exception(msg)
>         Exception: MPI could not be initialised.
>
> I think MPI is installed well, as mpirun command works well.
>
> I can't figure this problem out, hope you can give me some guide.
>
> Thanks!
>
> Sincerely,
> John
> [2:text/html Show]


Reply all
Reply to author
Forward
0 new messages