Geoffroy, Here is my progress so far to have openmpi-oscar-1.4.2 built.
All my work is related to ~svn/pkgsrc/opkg/openmpi/trunk in that directory, I've: 1)added the following files: - build.cfg => I 'don't know if it's ok as I'm not familiar with syntax. lines seems to be duplicated, please check if it is ok. although note that it still includes dependancy on: - libibverbs-devel (openfabrics wich provides openib stack: standard in CentOS5 starting with update 4 at least) - blcr-devel (Berkley checkpoint-restart stack): https://ftg.lbl.gov/CheckpointRestart/CheckpointDownloads.shtml rpmbuild --rebuild https://ftg.lbl.gov/CheckpointRestart/downloads/blcr-0.8.2-1.src.rpm will provides all necessary components. - openmpi-oscar.cfg - openmpi-switcher-modulefile.cfg (maybe it should be named openmpi-oscar-switcher-modulefile.cfg) - rpm/openmpi-1.4.2.spec (which is the original spec file with $VERSION and $EXTENSION replaced with correct values (maybe bad idea)) 2) updated the Makefile (patch attached) 3) updated /opt/openmpi-switcher-modulefile-1.4.2/share/openmpi/openmpi-1.4.2 (attached) which I'm unable to find in the cvs tree (only source rpm is available) this update fix the check for libcr.so and libgm.so that are searched into /usr/lib even on 64bits systems wich naturaly fails. I did not touch ~svn/oscar/packages/openmpi/config.xml as I'm building packages by doing the following: cd ~svn/pkgsrc/opkg/openmpi/trunk make rpm In fact, I must admint that I'm a little bit lost in build system as I'm using 2 svn repositories: http://svn.oscar.openclustergroup.org/oscar/trunk/ (in ~svn/oscar/) http://svn.oscar.openclustergroup.org/oscar/pkgsrc/ (in ~svn/pkgsrc) For example, I've created ~svn/pkgsrc/opkg/openmpi/trunk/build.cfg from http://svn.oscar.openclustergroup.org/oscar/pkgsrc/opkg/lam/trunk/build.cfg before noticing that http://svn.oscar.openclustergroup.org/oscar/trunk/packages/openmpi/SRPMS/build.cfg existed. Sometimes, files like build.cfg are located in: http://svn.oscar.openclustergroup.org/oscar/pkgsrc/opkg/<product>/trunk/build.cfg and sometimes it's located in: http://svn.oscar.openclustergroup.org/oscar/trunk/packages/<product>/SRPMS/build.cfg Finaly, some packages seems to exists, but there is no rpm in the repo: eg: http://svn.oscar.openclustergroup.org/oscar/trunk/packages/blcr/config.xml I've done an rpmbuild --rebuild https://ftg.lbl.gov/CheckpointRestart/downloads/blcr-0.8.2-1.src.rpm in the meantime. Sorry for long mail, I understand that this work is baldy presented, but it's the best I can do regarding my understanding of the build system. As usual, please review carfully those modifications as they may be inapropriate regarding oscar rules (naming scheem, ...) Best regards, Olivier. -- Olivier LAHAYE CEAEA Saclay DRT-LIST-DCSI-DIR
[fc:5|6|7|8:*] requires: switcher:modules-oscar common: openmpi-oscar --target noarch --define "config_options FC=gfortran --with-tm=/opt/pbs" common: openmpi-switcher-module requires: torque:torque openmpi-oscar --define "config_options FC=gfortran --with-tm=/opt/pbs" [sles|suse:*:*] requires: gcc-fortran requires: switcher:modules-oscar common: openmpi-oscar --target noarch --define "config_options FC=gfortran --with-tm=/opt/pbs" common: openmpi-switcher-modulefile requires: torque:torque openmpi-oscar --define "config_options FC=gfortran --with-tm=/opt/pbs" [rhel:4|5:*] requires: gcc-gfortran blcr-devel libibverbs-devel requires: switcher:modules-oscar common: openmpi-oscar --target noarch --define "configure_options FC=gfortran --with-tm=/opt/pbs --with-blcr=yes --with-ft=cr --with-openib" --define "install_in_opt 1" --define "ofed 1" --define "_name openmpi-oscar" --define "install_shell_scripts 1" --define "install_modulefile 1" --define "use_mpi_selector 1" --define "allow_fortify_source 0" --define "modules_rpm_name modules-oscar" common: openmpi-switcher-modulefile requires: torque:torque openmpi-oscar --define "config_options FC=gfortran --with-tm=/opt/pbs --with-blcr=yes --with-ft=cr --with-openib" --define "install_in_opt 1" --define "ofed 1" --define "_name openmpi-oscar" --define "install_shell_scripts 1" --define "install_modulefile 1" --define "use_mpi_selector 1" --define "allow_fortify_source 0" --define "modules_rpm_name modules-oscar" # --with-sge (Sun Grid engine support) # sample config file, might need change for certain distros [*:*:*] requires: switcher:modules-oscar common: openmpi-oscar --target noarch --define "--with-tm=/opt/pbs" common: openmpi-switcher-module requires: torque:torque openmpi-oscar --define "config_options --with-tm=/opt/pbs"
Index: Makefile =================================================================== --- Makefile (révision 9212) +++ Makefile (copie de travail) @@ -4,6 +4,6 @@ @echo "Debian package(s) not yet available" rpm: clean - /usr/bin/build_package --type rpm --output $(PKGDEST) --url http://www.csm.ornl.gov/srt/downloads/oscar/openmpi-1.2.4.tar.bz2 --package-name openmpi --verbose + /usr/bin/build_package --type rpm --output $(PKGDEST) --url http://www.csm.ornl.gov/srt/downloads/oscar/openmpi-1.4.2.tar.bz2 --package-name openmpi-oscar --verbose clean:
source = wget, http://www.open-mpi.org/software/ompi/v1.4/downloads/openmpi-1.4.2-1.src.rpm
source = wget, http://www.csm.ornl.gov/srt/downloads/oscar/openmpi-switcher-modulefile-1.4.2-1.src.rpm
#%Module -*- tcl -*- # # Copyright (c) 2006 The Trustees of Indiana University and Indiana # University Research and Technology # Corporation. All rights reserved. # Copyright (c) 2006 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow # # $HEADER$ # This modulefile is a dispatcher for other Open MPI modulefiles. It # looks around the environment of the machine and determines which # Open MPI modulefile to load (i.e., which Open MPI installation to # use). proc ModulesHelp { } { puts stderr "\tThis module acts as a dispatcher to automatically" puts stderr "\tload the 'right' Open MPI installation into your" puts stderr "\tenvironment based on what Open MPI installations are" puts stderr "\tavailable and the environment available on this machine." } proc GetLibDir { } { set unameexe "/bin/uname" if { [file exists $unameexe] } { set machinetype [ exec /bin/uname -m ] if { $machinetype == "x86" || $machinetype == "i386" || $machinetype == "i486" || $machinetype == "i586" || $machinetype == "i686" } { return /usr/lib } if { $machinetype == "x86_64" || $machinetype == "ia64" } { return /usr/lib64 } } } module-whatis "Automatically select an appropriate Open MPI modulefile to load." # Don't let any other MPI module be loaded while this one is loaded conflict mpi # Directory where we'll find the Open MPI modulefiles. set modulefiledir /opt/modules/modulefiles # See if we have BLCR and/or GM set have_blcr [file exists [GetLibDir]/libcr.so] set have_gm [file exists [GetLibDir]/libgm.so] # Get the version number of the Open MPI represented by this modulefile set version [lindex [split [module-info name] "-"] 1] # If we find a matching modulefile, [un]load it. Otherwise, fail # silently because we don't want to interject stuff in stderr for fear # of breaking system-level scripts (e.g., cexec). The "break" # statement in the final else clause will ensure that this module is # actually not loaded. So fail silently, but under protest. ;-) set dir "$modulefiledir/openmpi" if { $have_blcr == 1 && $have_gm == 1 && [file exists $dir/openmpi-with-blcr-and-gm-$version] } { module load $dir/openmpi-with-blcr-and-gm-$version } elseif { $have_blcr == 0 && $have_gm == 1 && [file exists $dir/openmpi-with-gm-$version] } { module load $dir/openmpi-with-gm-$version } elseif { $have_blcr == 1 && $have_gm == 0 && [file exists $dir/openmpi-with-blcr-$version] } { module load $dir/openmpi-with-blcr-$version } elseif { [file exists $dir/openmpi-$version] } { module load $dir/openmpi-$version } else { break }
------------------------------------------------------------------------------
_______________________________________________ Oscar-devel mailing list Oscar-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/oscar-devel