Bug 521334

Summary: Make openmpi conform to MPI and environment modules guidelines
Product: [Fedora] Fedora Reporter: Susi Lehtola <susi.lehtola>
Component: openmpiAssignee: Jay Fenlason <fenlason>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: christophe.guilloux, dledford, dominik, frigoris.ma, gedetil, jfeeney, mattdm
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: openmpi-1.4.1-4 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-04-30 20:46:53 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Susi Lehtola 2009-09-04 20:30:29 UTC
The MPI and environment modules guidelines have been approved by FESCo some weeks ago; please make openmpi conform to them.

http://www.fedoraproject.org/wiki/PackagingDrafts/MPI
http://meetbot.fedoraproject.org/fedora-meeting/2009-08-14/fedora-meeting.2009-08-14-17.01.html

Comment 1 Jay Fenlason 2009-09-15 20:07:11 UTC
Can you try the 1.3.3-4 rpms and see if they do an adequate job of fixing this?  I think they do, but I'm new at this openmpi stuff and may have missed something.

Comment 2 Susi Lehtola 2009-09-15 21:05:26 UTC
What comes to mind with a quick look at the spec:

- You need to own a complete man page directory tree, as exists in /usr/share/man, that means {,bg,ca, and so on}/man{0p,1,1p, and so on}
as these will be needed by packages that are built against OpenMPI. (This needs to be in the main package.)

- Do you really need to separate the OpenMPI libraries from the libraries compiled against OpenMPI? I.e. what is the purpose of having
 %dir %{_libdir}/%{name}/lib/openmpi
isn't 
 %dir %{_libdir}/%{name}/lib/
enough?

- The module file in
 %{_datadir}/Modules/modulefiles/%{namearch}
is in the wrong place, it should be in %{_sysconfdir}/modulefiles. See 
http://www.fedoraproject.org/wiki/PackagingDrafts/EnvironmentModules
(This was approved at the same time as the MPI guidelines.)

- You're missing a blank line before %clean :)

**

I'll try to check the new version with a few of my own packages to see if it works as it should.

Comment 3 Susi Lehtola 2009-09-15 21:06:27 UTC
*** Bug 504357 has been marked as a duplicate of this bug. ***

Comment 4 Jay Fenlason 2009-09-16 18:54:14 UTC
1: I think it is appropriate for packages that are built under OpenMPI to create and own any subdirectories they need under .../man/.  I don't think it's appropriate or needed for OpenMPI to create empty directories Just In Case some other project might need them someday.  Directories that are owned by multiple packages are handled just fine by rpm.

Hmm, according to my reasoning, the -devel package should own man1 and man7 in addition to man3.  Fixed.

2: %dir %{_libdir}/%{name}/lib/openmpi appears to be used by shared objects that are dlopened by the OpenMPI libraries, so they should not be in the system LD_LIBRARY_PATH.  %dir %{_libdir}/%{name}/lib/ is for shared objects that must be loaded by ld.so at program startup time, so they need to be in LD_LIBRARY_PATH.

2a: The subdirectory that bothers me is /usr/lib64/openmpi/share/openmpi/, but I don't see anything specific about it in the packaging guidelines, so I'm just leaving it alone.

3: Fixed.

4: Fixed.

I should have a new OpenMPI for rawhide (1.3.3-5) built shortly.  Please check it out and let me know if it works.

Comment 5 Susi Lehtola 2009-09-17 07:41:54 UTC
(In reply to comment #4)
> 1: I think it is appropriate for packages that are built under OpenMPI to
> create and own any subdirectories they need under .../man/.  I don't think it's
> appropriate or needed for OpenMPI to create empty directories Just In Case some
> other project might need them someday.  Directories that are owned by multiple
> packages are handled just fine by rpm.
> 
> Hmm, according to my reasoning, the -devel package should own man1 and man7 in
> addition to man3.  Fixed.

Ugh, that's exactly what I'm trying to avoid. Putting the directories in the MPI runtime package that the other packages will have to require anyway is the simplest solution there is.

%{_fmoddir} already contains the architecture, so you don't need namearch. The Fortran module (mpi.mod) should be installed in %{_fmoddir}/%{name}. 

The %files section looks quite complicated.. I wouldn't use %dir, I'd use %exclude instead for the files and directories that go into -devel..

Comment 6 Susi Lehtola 2009-09-17 08:46:43 UTC
Can you do the builds for F-11 as well?

Comment 7 Susi Lehtola 2009-09-17 14:46:17 UTC
Are you involved with LAM? I just opened bug #523998 about the same thing.

Comment 8 Christophe GUILLOUX 2009-09-29 15:29:34 UTC
I tried to compile openmpi with fedora 11 because i need "--with-sge" option
but i can't install openmpi 1.3.1 because of otfdump and i can't compile 1.3.3
because of %{_fmoddir}.
Can you add --with-sge ?

Comment 9 Susi Lehtola 2009-10-17 08:54:11 UTC
ping?

Comment 10 Susi Lehtola 2009-10-23 08:56:59 UTC
ping again?

Comment 11 Jay Fenlason 2009-10-30 15:36:15 UTC
After some discussion dledford and I agreed that openmpi would create and own the man[1245689n] directories but not the hoopy translation ones.  I updated the Rawhide packages and built 1.3.3-6 in F-11 Updates Testing.

I don't have anything to do with lam, alas.

Adding --with-sge should have its own bug.

Can you try the F-11 packages from -testing and see if they work?

Comment 12 Susi Lehtola 2009-10-31 13:04:03 UTC
The definition
 MPI_PYTHON_SITEARCH     /openmpi
is wrong, and you are missing the PYTHONPATH prepend from the module.

Comment 13 Susi Lehtola 2009-11-01 18:02:13 UTC
You just need to add BuildRequires: python-devel to make the python_sitearch definition to work..

Comment 14 Bug Zapper 2009-11-16 11:58:57 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 12 development cycle.
Changing version to '12'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 15 Gilbert E. Detillieux 2009-11-26 16:35:36 UTC
I've opened bug #541660 to report the need for the --with-sge option, introduced with openmpi-1.3.

Comment 16 Susi Lehtola 2009-11-30 15:56:28 UTC
ping? please fix the python issue asap..

Comment 17 Susi Lehtola 2010-02-01 13:13:14 UTC
*** Bug 560622 has been marked as a duplicate of this bug. ***

Comment 18 Bug Zapper 2010-03-15 12:48:50 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 13 development cycle.
Changing version to '13'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 19 Susi Lehtola 2010-03-23 10:28:45 UTC
The PYTHONPATH variable still needs to be prepended.

Comment 20 Susi Lehtola 2010-04-30 20:46:53 UTC
OK, this seems to be fixed in openmpi-1.4.1-4. Closing.