On Wed, 25 Jun 2003, x z wrote:
> Question: How can I tell Lam to use g77?
> ==========================
>
> When I installed 6.5.9, I did not specify any configure switches. And
> when I ran mpicc -showme, the system responds with "gcc ....."; when i
> ran mpif77 -showme, the system responds with "f77 ....." Therefore I
> suspect that I was compiling the lam source code with gcc and was using
> gcc and Sun's f77 as the underlying compiler. And according to the Lam
> Installation Guide, mixing compilers from different vendors is no good.
> So, i did the installation a second time. This time I did it on a
> SunBlade100 with Solaris 8. I did a "configure --prefix --with-fc=g77".
This is correct (although, per my prior mail, I think you actually want to
use the Solaris compilers, not the GNU compilers).
Note that in my prior mail, I suggested using environment variables to
override the default compilers before running configure. The --with-*
switches in 6.5.9 are equivalent to this, so what you did should have
worked just as well. Note, however, that those --with-* switches are
disappearing in LAM/MPI 7.0, and you can *only* override the compilers
with envrionment variables.
> Part of the output says:
>
> checking if want FORTRAN support... yes
> checking for g77... g77
> ...
> checking g77 external naming convention... FORTRANDOUBLEUNDERSCORE
Yup -- looks good so far.
> ...
> *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
> *** create self contained shared libraries on Solaris systems, without
> *** introducing a dependency on libgcc.a. Therefore, libtool is disabling
> *** -no-undefined support, which will at least allow you to build shared
> *** libraries. However, you may find that when you link such libraries
> *** into an application without using GCC, you have to manually add
> *** `gcc --print-libgcc-file-name` to the link command. We urge you to
> *** upgrade to a newer version of GCC. Another option is to rebuild your
> *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
Are you making shared libraries? (i.e., using the "--disable-static
--enable-shared" switches) If not, then don't worry about this warning.
> When I did a "make", part of the output says:
> Making all in f77
Not to worry -- this is actually a directory name (referring to
share/mpi/f77), not a compiler name.
> When I did a mpif77, the system responds:
> f77 -I/home/lam6.5.9/include -L/home/lam6.5.9/lib -llammpio -lpmpi
> -llamf77mpi -lmpi -llam -lsocket -lnsl -laio
So this should not have happened. :-) I can think of 4 reasons offhand
that you might be seeing this behavior:
1. When you re-configured LAM and re-built it, you did not "make clean"
first. This, therefore, may not have re-compiled the wrapper compilers
proprly. As a quick test, you can do the following to see if this is what
happened:
cd /directory/where/you/have/lam/source/code/lam-6.5.9
cd tools/hf77
./hf77 -showme
# should show "f77..."
make clean all
./hf77 -showme
# show now show "g77..."
If this is what happened, then do a top-level "make clean all install",
and you should be ok.
2. Running "mpif77" is still running the older mpif77 because the prefix
that you installed to this time was different than the one you chose last
time, and your $PATH is still finding the old one.
3. Running "mpif77" is still running the older mpif77 because you didn't
re-run "make install".
4. You have the environment variable LAMH77 set to "f77", which overrides
the underlying compiler that mpif77 uses at run time.
Did any of those fix the problem?
> Therefore, it appears lam is still using Sun's f77 as the Fortran
> compiler. How can I tell it to use g77? And for taht matter, how can I
What you did should have worked (--with-fc=f77). And from LAM's configure
output
> tell it to use Sun's cc instead of gcc? Using teh config switch
> --with-cc=cc?
Yes, or setting the environment variable CC before running configure.
> Also, there seems to be an environmnet variable called HOSTTYPE in my
> system that says HOSTTYPE=SUN4. But when I set up my BLACS
> installation, I used the include file Bmake.SUN4SOL2 instead of
> Bmake.SUN4. Does it make a difference? I am no system admin, I really
> do not know the difference between the two. I guess SUN4SOL2 would be
> closer to Solaris 7/8.
I *believe* so. I'm not entirely sure what the differences are between
the BLACS Bmake template files, but SUN4 is your architecture type, and
Solaris 2.x is your OS type, so that's probably your best bet. You might
want to diff the BLACS Bmake templates and see if you can glean any useful
information from the differences between the files.
--
{+} Jeff Squyres
{+} jsquyres_at_[hidden]
{+} http://www.lam-mpi.org/
|