SCIENTIFIC-LINUX-DEVEL Archives

April 2008

SCIENTIFIC-LINUX-DEVEL@LISTSERV.FNAL.GOV

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Jon Peatfield <[log in to unmask]>
Reply To:
Jon Peatfield <[log in to unmask]>
Date:
Mon, 21 Apr 2008 13:16:21 +0100
Content-Type:
TEXT/PLAIN
Parts/Attachments:
TEXT/PLAIN (102 lines)
I assume that this is actually a problem with TUV's packaging rather than 
anything that SL have done but I thought I'd ask here before reporting it 
to them...

In sl50 openmpi-devel is version 1.1.1 and sets up alternatives for mpicc 
etc in the postinstall scriptlet like (for the 32bit version):

  alternatives --install  /usr/bin/mpicc mpicc \
                         /usr/bin/opal_wrapper-32 10 \
         --slave /usr/bin/mpic++ mpic++ /usr/bin/opal_wrapper-32 \
         --slave /usr/bin/mpiCC mpiCC /usr/bin/opal_wrapper-32 \
         --slave /usr/bin/mpicxx mpicxx /usr/bin/opal_wrapper-32 \
         --slave /usr/bin/mpif77 mpif77 /usr/bin/opal_wrapper-32 \
         --slave /usr/bin/mpif90 mpif90 /usr/bin/opal_wrapper-32

It will remove those iff openmpi is removed but not if upgraded, ie the 
preuninstall scriptlet is:

  if [ "$1" -eq 0 ]; then
     alternatives --remove mpicc /usr/bin/opal_wrapper-32
  fi

that all looks fine, but in sl51 the openmpi 1.2.3 packaging changes so 
that the opal_wrapper is installed as /usr/bin/opal_wrapper-1.2.3-gcc-32 
etc.  It has the following scriptmets:

postinstall:
  alternatives --install  /usr/bin/mpicc mpicc \
                         /usr/bin/opal_wrapper-1.2.3-gcc-32 \
                         10 \
         --slave /usr/bin/mpic++ mpic++ \
                 /usr/bin/opal_wrapper-1.2.3-gcc-32 \
         --slave /usr/bin/mpiCC mpiCC \
                 /usr/bin/opal_wrapper-1.2.3-gcc-32 \
         --slave /usr/bin/mpicxx mpicxx \
                 /usr/bin/opal_wrapper-1.2.3-gcc-32 \
         --slave /usr/bin/mpif77 mpif77 \
                 /usr/bin/opal_wrapper-1.2.3-gcc-32 \
         --slave /usr/bin/mpif90 mpif90 \
                 /usr/bin/opal_wrapper-1.2.3-gcc-32

preuninstall:
  alternatives --remove mpicc /usr/bin/opal_wrapper-1.2.3-gcc-32

which looks like it is designed so that at some point muplitle versions 
may be installed at the same time (sounds good).

However because the openmpi-devel 1.1.1 isn't removed when upgrading the 
alternatives it added arn't removed and being at the same priority as the 
new ones don't get zapped so /etc/alternatives/mpicc (etc) still point at 
/usr/bin/opal_wrapper-32 which no lomnger exists...

Another error in the packaging is that in openmpi 1.2.3 (not devel) the 
man pages are not compressed but the links it adds with alternatives 
assumes that they are:

$ rpm -ql openmpi | grep -i man
/usr/share/openmpi/1.2.3-gcc/man
/usr/share/openmpi/1.2.3-gcc/man/man1
/usr/share/openmpi/1.2.3-gcc/man/man1/mpiCC.1
/usr/share/openmpi/1.2.3-gcc/man/man1/mpic++.1
/usr/share/openmpi/1.2.3-gcc/man/man1/mpicc.1
/usr/share/openmpi/1.2.3-gcc/man/man1/mpicxx.1
/usr/share/openmpi/1.2.3-gcc/man/man1/mpiexec.1
/usr/share/openmpi/1.2.3-gcc/man/man1/mpif77.1
/usr/share/openmpi/1.2.3-gcc/man/man1/mpif90.1
/usr/share/openmpi/1.2.3-gcc/man/man1/mpirun.1
/usr/share/openmpi/1.2.3-gcc/man/man1/orterun.1
$ rpm -q openmpi --scripts
postinstall scriptlet (using /bin/sh):
alternatives --install /usr/bin/mpirun mpi-run /usr/bin/orterun \
                 10 \
         --slave /usr/bin/mpiexec mpi-exec /usr/bin/orterun \
         --slave /usr/share/man/man1/mpirun.1.gz mpi-run-man \
                 /usr/share/openmpi/1.2.3-gcc/man/man1/mpirun.1.gz \
         --slave /usr/share/man/man1/mpiexec.1.gz mpi-exec-man \
                 /usr/share/openmpi/1.2.3-gcc/man/man1/orterun.1.gz
preuninstall scriptlet (using /bin/sh):
alternatives --remove mpi-run /usr/bin/orterun

Obviously the scriptlet for openmpi-devel 1.1.1 can't easily be fixed but 
the newer package could work round the problem.

In the meantime the following fixes mpicc etc for me:

   cd /etc/alternatives
   LT=$(readlink mpicc)
   if [ ! -e $LT ]; then
     /usr/sbin/alternatives --remove mpicc $LT
   fi

which one could generalise needed...

Can anyone with real RHEL upgraded from 'EL 5' to 'EL 5 update 1' verify 
that the same happens there too?  The specfile for openmpi looks obviously 
wrong for the mpicc stuff but I can't tell if the man pages are supposed 
to be magically compressed by something...

-- 
Jon Peatfield,  Computer Officer,  DAMTP,  University of Cambridge
Mail:  [log in to unmask]     Web:  http://www.damtp.cam.ac.uk/

ATOM RSS1 RSS2