[mvapich-discuss] FW: Proposed patches to MVAPICH and MVAPICH2 rpm spec files

Rajeev Thakur thakur at mcs.anl.gov
Thu Jul 17 13:23:59 EDT 2008


-----Original Message-----
From: owner-mpich2-dev at mcs.anl.gov [mailto:owner-mpich2-dev at mcs.anl.gov] 
Sent: Thursday, July 17, 2008 12:14 PM
To: owner-mpich2-dev at mcs.anl.gov
Subject: BOUNCE mpich2-dev at mcs.anl.gov: Non-member submission from ["Mike
Heinz" <michael.heinz at qlogic.com>] 

>From owner-mpich2-dev at mcs.anl.gov  Thu Jul 17 12:14:11 2008
Received: from mailgw.mcs.anl.gov (mailgw.mcs.anl.gov [140.221.9.4])
	by mcs.anl.gov (8.11.6/8.9.3) with ESMTP id m6HHE8l21800
	for <mpich2-dev at mcs.anl.gov>; Thu, 17 Jul 2008 12:14:11 -0500
Received: from localhost (localhost [127.0.0.1])
	by mailgw.mcs.anl.gov (Postfix) with ESMTP id C7E60348004
	for <mpich2-dev at mcs.anl.gov>; Thu, 17 Jul 2008 12:14:08 -0500 (CDT)
X-Greylist: delayed 60 seconds by postgrey-1.21 at mailgw.mcs.anl.gov; Thu,
17 Jul 2008 12:14:06 CDT
Received: from EPEXCH1.qlogic.org (eppat.qlogic.com [198.186.5.11])
	by mailgw.mcs.anl.gov (Postfix) with ESMTP id BEA6E348002
	for <mpich2-dev at mcs.anl.gov>; Thu, 17 Jul 2008 12:14:06 -0500 (CDT)
X-MimeOLE: Produced By Microsoft Exchange V6.5
Content-class: urn:content-classes:message
MIME-Version: 1.0
Content-Type: multipart/alternative;
	boundary="----_=_NextPart_001_01C8E830.6055FDD4"
Subject: Proposed patches to MVAPICH and MVAPICH2 rpm spec files
Date: Thu, 17 Jul 2008 12:13:03 -0500
Message-ID: <C07C40DB2364324799506DE8FF12F8D8781F8E at EPEXCH1.qlogic.org>
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Thread-Topic: Proposed patches to MVAPICH and MVAPICH2 rpm spec files
Thread-Index: AcjoMF88YEzoPuNcSj6yftFO624GxA==
From: "Mike Heinz" <michael.heinz at qlogic.com>
To: <mpich2-dev at mcs.anl.gov>, <general at lists.openfabrics.org>
X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at mailgw.mcs.anl.gov
X-Spam-Status: No, hits=0.2 required=5.0
	tests=HTML_30_40,HTML_MESSAGE,PATCH_UNIFIED_DIFF
	version=2.55
X-Spam-Level: 
X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp)
X-MCS-Mail-Loop: mpich2-dev

This is a multi-part message in MIME format.

------_=_NextPart_001_01C8E830.6055FDD4
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

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.
=20
The fix for MVAPICH-1.0.1 is this:
=20
--- 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=3D%{_prefix}/bin:\${PATH}
 fi
+if ! echo \${LD_LIBRARY_PATH} | grep -q %{_prefix}/lib ; then
+        export
LD_LIBRARY_PATH=3D%{_prefix}/lib:%{_prefix}/lib:/shared:\${LD_LIBRARY_PAT=
H
}
+fi
 EOF
=20
 # 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=3D(%{_prefix}/bin \$path)
+endif
+
+if ("1" =3D=3D "\$?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

=20
and the fix for MVAPICH2-1.0.3 is this:
=20
=20
--- ../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 @@
=20
 # 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 =3D ( %{_prefix}/bin \$path )
     endif
+
+if ("1" =3D=3D "\$?LD_LIBRARY_PATH") then
+    if ("\$LD_LIBRARY_PATH" !~ *%{_prefix}/lib) then
+        setenv LD_LIBRARY_PATH %{_prefix}/lib:\${LD_LIBRARY_PATH}
+    endif
 else
-    set path =3D ( %{_prefix}/bin )
+    setenv LD_LIBRARY_PATH %{_prefix}/lib:%{_prefix}/lib/shared
 endif
=20
 if (\$?MANPATH) then
@@ -282,7 +286,9 @@
 if ! echo \${PATH} | grep -q %{_prefix}/bin ; then
     PATH=3D%{_prefix}/bin:\${PATH}
 fi
-
+if ! echo \${LD_LIBRARY_PATH} | grep -q %{_prefix}/lib ; then
+        export LD_LIBRARY_PATH=3D%{_prefix}/lib:\${LD_LIBRARY_PATH}
+fi
 if ! echo \${MANPATH} | grep -q %{_prefix}/man ; then
     MANPATH=3D%{_prefix}/man:\${MANPATH}
 fi

=20
--
Michael Heinz
Principal Engineer, Qlogic Corporation
King of Prussia, Pennsylvania
=20



More information about the mvapich-discuss mailing list