On Apr 20, 2005, at 3:56 AM, Ralf Wildenhues wrote:
>>> I want to build lam-7.1.1 with gcc (FC2 system) but I want
>>> to have mpif77 and mpicc use the PGI 6.0 compilers. Is there
>>> an easy way to do this?
>
> W.r.t templates, they don't. 6.0 uses weak symbols like g++, unlike
> earlier pgi versions. There might be other differences I'm unaware of.
Just a third here -- I'd have to agree. I'm unsure if this compiler
combination will work (regardless of what LAM does). You might want to
try compiling / linking simple, non-MPI apps together with this
combination (e.g., make a small library with gcc) and then compile apps
with pgcc and/or pgf77 and link them to your gcc library.
It *should* work, because C linkage is pretty well specified, but I'm
not a compiler expert, so I won't promise anything. :-)
Also, another unholy way to do this is to build LAM with gcc (et al.),
but then set the environment variables LAMMPICC and LAMMPIF77 before
invoking mpicc and mpif77. This back door has been in LAM for quite a
while, mainly for people who want/need to chain wrapper compilers
together.
>> Build and install lam with your CC and CXX set to aliases
>> for gcc and g++, then change those aliases to point to pgcc and pgCC,
>> or
>> some other compiler.
>>
>> supposing you use bash
>> alias ccom=gcc
>> alias cxxcom=g++
>> alias fortcom=pgf90
>> ../configure --with-cc=ccom --with-cxx=cxxcom --with-fc=fortcom
>> make....
>
> A question and a remark for this:
> Do you use the arguments to --with-cc and --with-cxx as input to
> libtool
> configuration?
Sometime during the 7.x series (perhaps even at 7.0? I don't remember
when we did this offhand), we switched the preferred way of setting
your compilers to the GNU Autoconf Way:
shell$ ./configure CC=pgcc CXX=pgCC FC=pgf77 ...
The --with-cc (et al.) switches are deprecated, and give warning
messages to this effect.
--
{+} Jeff Squyres
{+} jsquyres_at_[hidden]
{+} http://www.lam-mpi.org/
|