Bug 476844 - error when loading openmpi.module
error when loading openmpi.module
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: openmpi (Show other bugs)
11
All Linux
low Severity medium
: ---
: ---
Assigned To: Doug Ledford
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-12-17 09:17 EST by Christophe Trophime
Modified: 2010-02-19 19:05 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-02-19 19:05:55 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Christophe Trophime 2008-12-17 09:17:43 EST
Description of problem:
I am trying to load openmpi.module by using the command
module load /usr/lib64/openmpi/1.2.4-gcc/openmpi.module

I get the following error messages
cmdSetenv.c(124):ERROR:11: Usage is 'setenv[-force] variable value'
openmpi.module(8):ERROR:102: Tcl command execution failed: setenv			CFLAGS		-I/usr/include/openmpi/1.2.4-gcc -I/usr/include/openmpi/1.2.4-gcc/openmpi -I/usr/include/openmpi/1.2.4-gcc/64 -m64

In fact when looking at the openmpi.module file
#%Module 1.0
#
#  OpenMPI module for use with 'environment-modules' package:
# 
prepend-path		MANPATH		@DATADIR@/openmpi/1.2.4-gcc/man
prepend-path 		PATH 		@DATADIR@/openmpi/1.2.4-gcc/bin64
prepend-path 		LD_LIBRARY_PATH /usr/lib64/openmpi/1.2.4-gcc
setenv			CFLAGS		-I/usr/include/openmpi/1.2.4-gcc -I/usr/include/openmpi/1.2.4-gcc/openmpi -I/usr/include/openmpi/1.2.4-gcc/64 -m64
setenv			LDFLAGS		-L/usr/lib64/openmpi/1.2.4-gcc -lmpi

it seems that the problems come from the "undefined" @DATADIR@

Version-Release number of selected component (if applicable):
1.2.4-2.fc9.x86_64


How reproducible:
every time

Steps to Reproduce:
1. . /etc/profile.d/modules.sh
2. module load /usr/lib64/openmpi/1.2.4-gcc/openmpi.module
3.
  
Actual results:
cmdSetenv.c(124):ERROR:11: Usage is 'setenv[-force] variable value'
openmpi.module(8):ERROR:102: Tcl command execution failed: setenv			CFLAGS		-I/usr/include/openmpi/1.2.4-gcc -I/usr/include/openmpi/1.2.4-gcc/openmpi -I/usr/include/openmpi/1.2.4-gcc/64 -m64


Expected results:
no error messages

Additional info:
Comment 1 Doug Ledford 2009-03-19 15:12:10 EDT
Jay is helping out with Open MPI issues, so added him to the Cc list.
Comment 2 Susi Lehtola 2009-05-15 15:28:18 EDT
I can confirm this on F10. The fix is very easy: if the variable is long, you have to enclose it with " ".

With
setenv                  CFLAGS          "-I/usr/include/openmpi/1.2.4-gcc -I/usr/include/openmpi/1.2.4-gcc/openmpi -I/usr/include/openmpi/1.2.4-gcc/64 -m64"
setenv                  LDFLAGS         "-L/usr/lib64/openmpi/1.2.4-gcc -lmpi"

it works.
Comment 3 Susi Lehtola 2009-05-15 15:40:11 EDT
Also, there's something wrong with the beginning of the file:

prepend-path            MANPATH         @DATADIR@/openmpi/1.2.4-gcc/man
prepend-path            PATH            @DATADIR@/openmpi/1.2.4-gcc/bin64

I assume @DATADIR@ should be sed'd to %{_datadir} in the build phase?
Comment 4 Susi Lehtola 2009-05-15 16:17:13 EDT
I think the module should be installed into /etc/modulefiles (Requires: environment-modules) where it can be seen by 'module'.

Another thing: I'm not sure setting the CFLAGS and LDFLAGS variables is needed, since mpi{cc,f90,f77,c++,CC,cxx} already have them included. Besides, setting CFLAGS and LDFLAGS has side effects, for instance loading the module in a spec file overrides %{optflags}.
Comment 5 Bug Zapper 2009-06-09 23:26:21 EDT
This message is a reminder that Fedora 9 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 9.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '9'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 9's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 9 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 6 Christophe Trophime 2009-07-06 08:38:18 EDT
The problem exists also on fc11
When trying to change mpi implementation:

module load /usr/lib/openmpi/1.3.1-gcc/openmpi.module

I got:

cmdSetenv.c(124):ERROR:11: Usage is 'setenv[-force] variable value'
openmpi.module(8):ERROR:102: Tcl command execution failed: setenv			CFLAGS		-I/usr/include/openmpi/1.3.1-gcc -I/usr/include/openmpi/1.3.1-gcc/openmpi -I/usr/include/openmpi/1.3.1-gcc/%{mode} 

This time the openmpi.module file contains "%{mode}" see bellow

#%Module 1.0
#
#  OpenMPI module for use with 'environment-modules' package:
# 
prepend-path		MANPATH		/usr/share/openmpi/1.3.1-gcc/man
prepend-path 		PATH 		/usr/share/openmpi/1.3.1-gcc/bin%{mode}
prepend-path 		LD_LIBRARY_PATH /usr/lib/openmpi/1.3.1-gcc
setenv			CFLAGS		-I/usr/include/openmpi/1.3.1-gcc -I/usr/include/openmpi/1.3.1-gcc/openmpi -I/usr/include/openmpi/1.3.1-gcc/%{mode} 
setenv			LDFLAGS		-L/usr/lib/openmpi/1.3.1-gcc -lmpi
Comment 7 Doug Ledford 2009-07-21 10:22:03 EDT
This will be resolved in openmpi-1.3.3-1.fc11
Comment 8 Fedora Update System 2009-07-21 11:51:47 EDT
openmpi-1.3.3-1.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/openmpi-1.3.3-1.fc11
Comment 9 Fedora Update System 2009-07-23 15:05:54 EDT
openmpi-1.3.3-2.fc11 has been pushed to the Fedora 11 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update openmpi'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-7951
Comment 10 Alex Lancaster 2009-11-12 15:53:27 EST
Unfortunately a new update was pushed which omitted adding this bug to a new update to supercede the one above.  Please visit:

https://admin.fedoraproject.org/updates/F11/FEDORA-2009-10848

and test the version in updates-testing before it gets pushed to stable (which will happen very soon) to make sure there are no regressions.
Comment 11 Doug Ledford 2010-02-19 19:05:55 EST
This should be resolved by the current openmpi, closing.

Note You need to log in before you can comment on or make changes to this bug.