This patch adds support for 64bits systems for lam-switcher-modulefile.tcl
Previous script assumed that /usr/lib was the path to search for libcr and libgm. If not found here, support was disabled. This patch check the system architecture and search in correct libdir (/usr/lib64 on x86_64 and ia64) systems. Olivier. PS: I was unable to find this file in the svn. PPS: I've also attached the src.rpm which I can't find in the svn. -- Olivier LAHAYE CEAEA Saclay DRT-LIST-DCSI-DIR
--- lam-switcher-modulefile.tcl.orig 2010-05-26 10:36:00.000000000 +0200 +++ lam-switcher-modulefile.tcl 2010-05-26 11:36:12.000000000 +0200 @@ -27,6 +27,24 @@ 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 LAM/MPI modulefile to load." # Don't let any other MPI module be loaded while this one is loaded @@ -39,8 +57,8 @@ # See if we have BLCR and/or GM -set have_blcr [file exists /usr/lib/libcr.so] -set have_gm [file exists /usr/lib/libgm.so] +set have_blcr [file exists [GetLibDir]/libcr.so] +set have_gm [file exists [GetLibDir]/libgm.so] # Get the version number of the LAM represented by this modulefile
lam-switcher-modulefile-7.1.4-3.oscar.src.rpm
Description: application/rpm
------------------------------------------------------------------------------
_______________________________________________ Oscar-devel mailing list Oscar-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/oscar-devel