On Feb 13, 2007, at 4:29 PM, Steven A. DuChene wrote:

I discovered the hard way that there are openmpi profile.d scripts that get packaged into openmpi rpm files. The reason this became a painful issue for our cluster is that it seems the csh profile.d script that gets installed with the openmpi-runtime-1.1.4 is defective. If it gets sourced into a user's environment it makes tcsh on linux error out with a "if: Badly formed number"

Yoinks.  Well, it goes to show how many people used that SRPM.  :-)

Sorry about those -- I have most of those fixed on the trunk but forgot to back-port most of the fixes back to the 1.1 branch SRPM specfile.

I want to be able to alter the spec file that builds the rpm so I can have it automagically incorperate the patch we worked up to fix this issue but I have not been able to figure out where in the openmpi sources that the profile.d
scripts for csh and sh get generated.

They're actually generated in the specfile itself.

We had to patch the openmpi-1.1.4.csh script as follows:

-if ("") then
-    setenv PATH ${PATH}:/opt/openmpi-g95/1.1.4/bin/
+if ( $?PATH ) then
+    setenv PATH ${PATH}:/opt/openmpi/1.1.4/bin/
 endif
-if ("1LD_LIBRARY_PATH") then
-    if ("") then
- setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:/opt/openmpi- g95/1.1.4/lib
-    endif
+if ( $?LD_LIBRARY_PATH ) then
+ setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:/opt/openmpi/ 1.1.4/lib
 endif
-if ("1MANPATH") then
-    if ("") then
-        setenv MANPATH ${MANPATH}:/opt/openmpi-g95/1.1.4/man
-    endif
+if ( $?MANPATH ) then
+        setenv MANPATH ${MANPATH}:/opt/openmpi/1.1.4/man
 endif

Most of this is due to bad escaping (i.e., lackthereof) in the spec file. I'll fix that up shortly. We're likely to do a 1.1.5 release in the not-distant future -- is it ok to wait for that, or do you need a new 1.1.4 SRPM?

Thanks for bringing it to my attention!

--
Jeff Squyres
Server Virtualization Business Unit
Cisco Systems

Reply via email to