[ofa-general] Proposed patches to MVAPICH and MVAPICH2 rpm spec files
Mike Heinz
michael.heinz at qlogic.com
Thu Jul 17 10:13:03 PDT 2008
I'm not sure who the best person is to receive these changes: We've been
encountering complications whe converting users to OFED 1.3 because the
scripts provided for configuring the shell (mpivars.sh and mpivars.csh)
don't update the library path. This can lead to MPI programs failing to
link or failing to run. The fix is to modify the spec files for the RPMs
for these packages so that they set the LD_LIBRARY_PATH as well as the
PATH.
The fix for MVAPICH-1.0.1 is this:
--- mvapich.spec.orig 2008-07-16 17:06:44.000000000 -0400
+++ mvapich.spec 2008-07-16 16:49:27.000000000 -0400
@@ -300,17 +300,25 @@
if ! echo \${PATH} | grep -q %{_prefix}/bin ; then
export PATH=%{_prefix}/bin:\${PATH}
fi
+if ! echo \${LD_LIBRARY_PATH} | grep -q %{_prefix}/lib ; then
+ export
LD_LIBRARY_PATH=%{_prefix}/lib:%{_prefix}/lib:/shared:\${LD_LIBRARY_PATH
}
+fi
EOF
# Script for csh
cat <<EOF > %{build_root}/%{_prefix}/bin/%{shell_scripts_basename}.csh
-if (?$path) then
- if ( "\${path}" !~ *%{_prefix}/bin* ) then
- setenv path %{_prefix}/bin:\$path
+if ("\$path" !~ *%{_prefix}/bin) then
+ set path=(%{_prefix}/bin \$path)
+endif
+
+if ("1" == "\$?LD_LIBRARY_PATH") then
+ if ("\$LD_LIBRARY_PATH" !~ *%{_prefix}/lib) then
+ setenv LD_LIBRARY_PATH
%{_prefix}/lib:%{_prefix}/lib/shared:\${LD_LIBRARY_PATH}
endif
else
- setenv path %{_prefix}/bin:
+ setenv LD_LIBRARY_PATH %{_prefix}/lib:%{_prefix}/lib/shared
endif
+
EOF
and the fix for MVAPICH2-1.0.3 is this:
--- ../mvapich2.spec.orig 2008-07-16 17:17:10.000000000 -0400
+++ mvapich2.spec 2008-07-17 09:03:19.000000000 -0400
@@ -261,12 +261,16 @@
# Additionally, create the mpivars.[c]sh files.
cat >bin/mpivars.csh <<EOF
-if (\$?path) then
- if ( "\${path}" !~ *%{_prefix}/bin* ) then
+if ("\$path" !~ *%{_prefix}/bin) then
set path = ( %{_prefix}/bin \$path )
endif
+
+if ("1" == "\$?LD_LIBRARY_PATH") then
+ if ("\$LD_LIBRARY_PATH" !~ *%{_prefix}/lib) then
+ setenv LD_LIBRARY_PATH %{_prefix}/lib:\${LD_LIBRARY_PATH}
+ endif
else
- set path = ( %{_prefix}/bin )
+ setenv LD_LIBRARY_PATH %{_prefix}/lib:%{_prefix}/lib/shared
endif
if (\$?MANPATH) then
@@ -282,7 +286,9 @@
if ! echo \${PATH} | grep -q %{_prefix}/bin ; then
PATH=%{_prefix}/bin:\${PATH}
fi
-
+if ! echo \${LD_LIBRARY_PATH} | grep -q %{_prefix}/lib ; then
+ export LD_LIBRARY_PATH=%{_prefix}/lib:\${LD_LIBRARY_PATH}
+fi
if ! echo \${MANPATH} | grep -q %{_prefix}/man ; then
MANPATH=%{_prefix}/man:\${MANPATH}
fi
--
Michael Heinz
Principal Engineer, Qlogic Corporation
King of Prussia, Pennsylvania
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/general/attachments/20080717/c33fbe09/attachment.html>
More information about the general
mailing list