Description of problem: I'm not sure if this qualifies as a bug in the Fedora package, or that the program that I'm installing, doesn't follow standards. So maybe this is a request for help and clarification and not a bug report. I'm installing an external, non-rpm, program (amuse, from www.amusecode.org) that requires mpich2 and mpi4py. So, I installed those packages from Fedora, but the program setup still doesn't find it. basically, the program does: self.check_module("mpi4py", lambda module : module.__version__, '1.1.0') to verify presence and version of mpi4py, and that fails. This seems to be due to the fact that the fedora package installs its files in /usr/lib64/python2.6/site-packages/mpich2/mpi4py whereas installation from source installs in /usr/lib64/python2.6/site-packages/mpi4py (and, in that case, installation can proceed). If I do: ln -s mpich2/mpi4py /usr/lib64/python2.6/site-packages/ the test succeeds and I can install the program, but of course this is an ugly workaround. Any help?
I think this is actually a bug in the mpich2 package. Take a look at the module contents: $ module show mpich2-x86_64 ------------------------------------------------------------------- /usr/share/Modules/modulefiles/mpich2-x86_64: setenv MPI_BIN /usr/lib64/mpich2/bin setenv MPI_SYSCONFIG /etc/mpich2-x86_64 setenv MPI_FORTRAN_MOD_DIR /usr/include/mpich2-x86_64 setenv MPI_INCLUDE /usr/include/mpich2-x86_64 setenv MPI_LIB /usr/lib64/mpich2/lib setenv MPI_MAN /usr/share/man/mpich2 setenv MPI_PYTHON_SITEARCH /usr/lib64/python2.6/site-packages/mpich2 setenv MPI_COMPILER mpich2-x86_64 setenv MPI_SUFFIX _mpich2 setenv MPI_HOME /usr/lib64/mpich2 prepend-path PATH /usr/lib64/mpich2/bin prepend-path LD_LIBRARY_PATH /usr/lib64/mpich2/lib prepend-path MANPATH /usr/share/man/mpich2 ------------------------------------------------------------------- I think a line is missing: prepend-path PYTHONPATH /usr/lib64/python2.6/site-packages/mpich2 If you and that line at the very end of file "/usr/share/Modules/modulefiles/mpich2-x86_64", things should work. This fix would be more appropriate than your symlink workaround. PS: Not sure how to ping MPICH2 package maintainers about this...
Thanks, that is a better workaround anyway. I'm not sure about filing a bug with the mpich2 package however, after all, mpi4py is not a requirement for mpich2, so mpich2 has no obligation to set up the environment for mpi4py, i think.
That requirement is not only for mpi4py, but for EVERY Python package that also depends on MPI. Take a look at the MPI packaging guidelines: http://fedoraproject.org/wiki/Packaging/MPI. You will see this text: The module file MUST prepend ... PYTHONPATH to %{python_sitearch}/%{name}%{?_cc_name_suffix}/ IIUC, MPICH2 is violating the Fedora packaging guidelines for MPI implementations.
Yes, you're right, so it is a MPICH2 packaging bug and I'll file it there. Thanks for your quick help!
Lisandro, thanks for tracking this down. ____________________________________________ This issue is already "in progress" for F-13 in bug #542745, but there doesn't seem to be much progress anymore. :-( Deji: ping? This shouldn't be more than just: $ git diff diff --git a/mpich2-modules.patch b/mpich2-modules.patch index 357b815..036ce19 100644 --- a/mpich2-modules.patch +++ b/mpich2-modules.patch @@ -1,6 +1,6 @@ --- src/packaging/envmods/mpich2.module.in 2009-07-02 15:54:58.000000000 -0 +++ src/packaging/envmods/mpich2.module.in.new 2009-11-09 10:37:03.524042574 -0 -@@ -4,11 +4,16 @@ +@@ -4,11 +4,17 @@ # # Define prefix so PATH and MANPATH can be updated. @@ -19,6 +19,7 @@ prepend-path PATH @bindir@ +prepend-path LD_LIBRARY_PATH @libdir@ prepend-path MANPATH @mandir@ ++prepend-path PYTHONPATH @pysitearch@/@MPILIBNAME@2 - -# Undefine prefix and exec_prefix which are too generic environment variables. -unsetenv prefix
mpich2-1.2.1p1-3.fc13 has been submitted as an update for Fedora 13. https://admin.fedoraproject.org/updates/mpich2-1.2.1p1-3.fc13
mpich2-1.2.1p1-9.fc14 has been submitted as an update for Fedora 14. https://admin.fedoraproject.org/updates/mpich2-1.2.1p1-9.fc14
mpich2-1.2.1p1-2.fc12 has been submitted as an update for Fedora 12. https://admin.fedoraproject.org/updates/mpich2-1.2.1p1-2.fc12
mpich2-1.2.1p1-9.fc14 has been pushed to the Fedora 14 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update mpich2'. You can provide feedback for this update here: https://admin.fedoraproject.org/updates/mpich2-1.2.1p1-9.fc14
mpich2-1.2.1p1-3.fc12 has been pushed to the Fedora 12 stable repository. If problems still persist, please make note of it in this bug report.
mpich2-1.2.1p1-10.fc14 has been pushed to the Fedora 14 stable repository. If problems still persist, please make note of it in this bug report.