Bug 476844 - error when loading openmpi.module
Summary: error when loading openmpi.module
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: openmpi
Version: 11
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Doug Ledford
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-12-17 14:17 UTC by Christophe Trophime
Modified: 2010-02-20 00:05 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-02-20 00:05:55 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Christophe Trophime 2008-12-17 14:17:43 UTC
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 19:12:10 UTC
Jay is helping out with Open MPI issues, so added him to the Cc list.

Comment 2 Susi Lehtola 2009-05-15 19:28:18 UTC
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 19:40:11 UTC
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 20:17:13 UTC
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-10 03:26:21 UTC
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 12:38:18 UTC
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 14:22:03 UTC
This will be resolved in openmpi-1.3.3-1.fc11

Comment 8 Fedora Update System 2009-07-21 15:51:47 UTC
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 19:05:54 UTC
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 20:53:27 UTC
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-20 00:05:55 UTC
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.