El 05/10/2012 17:01, <neha...@gmail.com> escribió:
>
> Thanks for the reply.
>
> The path to /opt/local/bin already existed in environment variable $PATH. Added env var $LD_LIBRAY_PATH=/opt/local/lib to ~/.profile and reran pip upgrade but am still receiving the same error. Emphasize that the file not being found is a header (mpi.h), and is located in /opt/local/include/openmpi
> Is their an environment variable that I can define to include this path in the installer search?
>
Sorry. I got confused. Basically, you should add to PATH the directory containing the mpicc compiler wrapper, and LD_LIBRARY_PATH to the libmpi.dylib shared library.
Can you try this? If it fails please send us the output of 'mpicc -show'.
> --
>
>
Sorry. I got confused. Basically, you should add to PATH the directory containing the mpicc compiler wrapper, and LD_LIBRARY_PATH to the libmpi.dylib shared library.
[/opt/local/bin]
11:20:15-nehalecky@nico:bin $ ll openmpi*
lrwxr-xr-x 1 root admin 39B Oct 4 11:12 openmpic++@ -> /opt/local/lib/openmpi/bin/opal_wrapper
lrwxr-xr-x 1 root admin 39B Oct 4 11:12 openmpicc@ -> /opt/local/lib/openmpi/bin/opal_wrapper
lrwxr-xr-x 1 root admin 39B Oct 4 11:12 openmpicxx@ -> /opt/local/lib/openmpi/bin/opal_wrapper
lrwxr-xr-x 1 root admin 34B Oct 4 11:12 openmpiexec@ -> /opt/local/lib/openmpi/bin/orterun
lrwxr-xr-x 1 root admin 39B Oct 4 11:12 openmpif77@ -> /opt/local/lib/openmpi/bin/opal_wrapper
lrwxr-xr-x 1 root admin 39B Oct 4 11:12 openmpif90@ -> /opt/local/lib/openmpi/bin/opal_wrapper
lrwxr-xr-x 1 root admin 34B Oct 4 11:12 openmpirun@ -> /opt/local/lib/openmpi/bin/orterun
fatal error: 'mpi.h' file not found
Can you try this? If it fails please send us the output of 'mpicc -show'.
11:22:14-nehalecky@nico:bin $ openmpicc -show
/usr/bin/clang -I/opt/local/include/openmpi -L/opt/local/lib -lmpi -lm
Oh! So the compiler wrapper is not "mpicc" but "openmpicc" ? This is
certainly not standard practice! Please try the following (I'm
assuming openmpicc is in your $PATH):
$ export MPICC=openmpicc
$ sudo -E pip install --upgrade mpi4py
Well, if you install MPICH2 or OpenMPI from sources, both install
"mpicc" in $prefix/bin, so they conflicts. Perhaps MacPorts folks do
install as "openmpicc" in order to avoid such conflicts with other MPI
implementations. Is MPICH2 also available from MacPorts? (I'm not a
Mac user).
Perhaps I should update mpi4py to look for "openmpicc" in the next
release. I would need a little more info, can you help me? Basically,
I would need a listing of all the files that the MacPort package
installs. Is easy for you to get such information?