Using the 4.4.0 preview in RHEL isn't so straightforward. You might
not actually be using it, even though you think you are.
You might already be doing these things, but if you aren't, here are
my suggestions. I can provide details if you are unfamiliar with
setting links and such.
1. Even though you install gcc44, etc., your default system gcc is
still the old one. This is as it should be. Do not change this lest
you risk terrible consequences for your OS. The executables you need
to use are called gcc44, gfortran44 and g++44, and they exist in
/usr/bin. The libraries you need to link with are probably in a
location like /usr/lib/gcc/x86_64-redhat-linux6E/4.4.0/
2. I strongly recommend not installing as root. I mean ever with
this sort of software, but here especially because you are mucking
about with the system compilers and libraries. Confusing system
libraries can cause much trouble. Instead, give a non-root user
ownership of the amber11 tree and install using that user. I have a
separate "installer" account on my machines for this purpose, and all
of /usr/local is owned by installer.
3. Your life will be simplest if the gcc44, etc., executables are
*called* gcc, gfortran and g++ so far as AMBER is concerned. You can
not use aliases for this. Instead, find or make a directory, public
if others might want to use the 4.4.0 compilers (recommended), that is
not in the root user's $PATH. Next, in that directory, make symbolic
links to /usr/bin/gcc44, etc., that are called gcc, etc. Finally,
reset the install user's $PATH so that it sees that directory first.
Here's what my setup looks like:
[installer.aarya ~]$ which gcc
/usr/local/bin/gcc
[installer.aarya ~]$ ls -l /usr/local/bin/gcc
lrwxrwxrwx 1 installer users 14 May 13 09:56 /usr/local/bin/gcc ->
/usr/bin/gcc44
[installer.aarya ~]$ gcc --version
gcc (GCC) 4.4.0 20090514 (Red Hat 4.4.0-6)
4. You will need to set your $LD_LIBRARY_PATH to include the proper
libraries. Mine looks like:
[installer.aarya ~]$ echo $LD_LIBRARY_PATH
/usr/local/lib:/usr/lib/gcc/x86_64-redhat-linux6E/4.4.0/
[installer.aarya ~]$
5. To test that AMBER agrees, when you run configure, check the
versions reported:
[installer.aarya src]$ ./configure gnu
[snip]
Obtaining the gnu suite version:
gcc -v
The version is 4.4.0
[snip]
Validating the C++ compiler version:
g++ -v
The version is 4.4.0
6] When we compile that way, we get all tests passing with no errors,
both serial and parallel.
On Tue, Jun 8, 2010 at 8:41 AM, Steve Seibold <seibold.chemistry.msu.edu> wrote:
> Hi Dr.Case
> I am using a Linux Red Hat 5 OS and according to my "installed packages" I have on my system "gcc44-gfortran-4.4.0-e15.x86_64-Fortran support for GCC 4.4 preview". I did an update for my OS and downloaded the latter package.
>
> I created a "new" directory and untared AMBER (and Tools) in this new (empty) directory. This should make sure the compiler is not using older files..right? I have an "AMBER_old" directory where I compiled using older version of gcc.
>
> Thanks for your help!
>
> Steve
>
>
> -----Original Message-----
> From: amber-bounces.ambermd.org [mailto:amber-bounces.ambermd.org] On Behalf Of case
> Sent: Tuesday, June 08, 2010 8:17 AM
> To: AMBER Mailing List
> Subject: Re: [AMBER] gcc44 compiler
>
> On Tue, Jun 08, 2010, Steve Seibold wrote:
>
>> I down loaded the gcc44 compiler and was successful in compiling
>> AmberToos1.4 as it passed all its test jobs. However, when I tried to
>> compile Amber11 I got the following "Fatal Error":
>>
>>
>>
>> Fatal Error: Parse error when checking module version for file
>> 'netcdf.mod' opened at (1)
>
> What version of gfortran are you using? What OS? It may be that you will have to type "make clean" in amber11/src, and perhaps even re-run the configure script again. Make sure that there is no "netcdf.mod" file in amber11/src/sander left over from some previous compilation. It would also be very helpful to see more of the error message.
>
> (If you are using gcc version 4.4, you also must be using gfortran version 4.4).
>
> ....dac
>
>
> _______________________________________________
> AMBER mailing list
> AMBER.ambermd.org
> http://lists.ambermd.org/mailman/listinfo/amber
>
> _______________________________________________
> AMBER mailing list
> AMBER.ambermd.org
> http://lists.ambermd.org/mailman/listinfo/amber
>
--
:-) Lachele
Lachele Foley
CCRC/UGA
Athens, GA USA
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Tue Jun 08 2010 - 07:30:03 PDT