Hi Tim, Jeffrey,
* Tim Prince wrote on Wed, Apr 20, 2005 at 08:19:29AM CEST:
> At 09:09 AM 4/19/2005, Jeffrey B. Layton 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?
>
> Not knowing why you'd want to do this, or what obstacles you have in mind,
> it seems there should be no trouble as long as you substitute
> link-compatible compilers. Don't PGI 6.0 compilers work the same as
> earlier ones?
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.
> 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? If so: libtool decides some of the shared library
characteristics by name, so choosing an arbitrary different name might
be unfortunate in that case. But I don't know if this applies at all.
But if it applies, then it also applies that LAMs libtool version does
not fully support for PGI 6.0 yet. This probably won't affect your
situation at all, I just wanted to let you know about this. I have put
some experimental support for PGI 6.0 and C++ with templates into the
Libtool HEAD CVS branch, but am reluctant to backport, partly because of
pending issues, where it's unclear whether libtool or PGI is at fault.
To stress it again, I don't know if any of this applies to the situation
at hand.
Other than that, bash usually does not apply alias substitution within
shell scripts. One has to set the shell option expand_aliases to enable
this explicitly.
> later, change the aliases as you wish, at your own risk, keeping PATH and
> LD_LIBRARY_PATH and options supplied consistent with the compiler in use.
> g77, if it worked, would require -fno-second-underscore.
Regards,
Ralf
|