LAM/MPI logo

LAM/MPI General User's Mailing List Archives

  |   Home   |   Download   |   Documentation   |   FAQ   |   all just in this list

From: Robert LeBlanc (leblanc_at_[hidden])
Date: 2005-07-15 11:14:37


I've seen people using the modules and it seems very clean. So you are
recompiling the entire lam source with the prefix /usr/<compiler_version>/
for each of the compilers? I know this is not directly related to LAM, but
can you send me some of your module conf files off list to give me a head
start?

Thanks,
Robert LeBlanc
BioAg Computer Support
Brigham Young University

-----Original Message-----
From: lam-bounces_at_[hidden] [mailto:lam-bounces_at_[hidden]] On Behalf Of
Troy Telford
Sent: Friday, July 15, 2005 9:30 AM
To: General LAM/MPI mailing list
Subject: Re: LAM: Using multiple compilers

On Fri, 15 Jul 2005 08:49:45 -0600, Robert LeBlanc <leblanc_at_[hidden]> wrote:

> To the wise LAM users;
>
> I've been looking at bringing an additional compiler online for use
> with
> LAM. I would like to use the GNU and Intel compilers. I've read about a
> dozen or so web pages of clusters that are doing this and all they say is
> run this script and compile as normal. I am having trouble locating
> documentation that would help me create scripts such as these. I have LAM
> compiled with GNU and from what I understand that should be fine even
> when
> using the Intel compiler for the application binaries.

I do this regularly -- with gcc, Intel, PathScale, and PGI compilers (and
additional MPI implementations). One of the more sane methods of doing
this is with what are called 'modules'.

Basically what the 'modules' do is set environment variables enabling the
use of a particular compiler. The package I'm most familiar with is
http://modules.sf.net/. It's also the package 'Modules' under SuSE 9.3,
and 'environment-modules' under SLES. (Not sure about RH, other distros).

What I typically do is have LAM compiled for each compiler (unsure if it's
entirely necessary). Then LAM is installed into different folders each
time (/usr/<compiler>-<compiler_version>/<MPI>-<MPI_version>/.

So, for instance, in your case, I'd have
/usr/gcc-3.3.3/lam-7.1.1
/usr/intel-9.0/lam-7.1.1

Where the modules come in is this: You first load the module for the
compiler to use. Next you select the MPI implementation (LAM in this
case). The module package then determines which lam installation to use
(Intel or GCC compiled) based on the compiler module you selected.

After that, using 'mpicc' or whatever else to compile works essentially
identically under GCC or under Intel.

I believe Jeff Sqyres has a similar functionality to 'modules' in a
package called 'env-switcher', however I haven't tried env-switcher yet; I
gather it works in a somewhat similar fashion to modules.

-- 
Troy Telford
Linux Networx
ttelford_at_[hidden]
(801) 649-1356
_______________________________________________
This list is archived at http://www.lam-mpi.org/MailArchives/lam/