Tom Roche | 27 Mar 17:45 2012
Picon

environment modules for gcc/gfortran?


From where can one obtain environment modules for gcc/gfortran?
What I mean:

Folks in my group (which develops a scientific model) want for us to
support (and therefore to regularly build/test on) gcc/gfortran.
Unfortunately our cluster is running

$ lsb_release -ds
"Red Hat Enterprise Linux Server release 5.4 (Tikanga)"
$ gfortran --version
GNU Fortran (GCC) 4.1.2 20080704 (Red Hat 4.1.2-46)

which is obviously downlevel (3.75 years next week). We currently
support pgi and ifort, which our cluster managers keep much more
up-to-date using Environment Modules

http://sourceforge.net/projects/modules/

such that

$ module avail 2>&1 | fgrep -ie 'intel'
intel                       openmpi_pgi
intel-11.1                  pgi
intel-12.0                  pgi-11.8
intel-12.1                  pgi-11.9
intel_ilp64                 pgimpi
intel_lp64                  pgimpi-11.9
intelmpi                    pvm3

(Continue reading)

Katherine Holcomb | 27 Mar 18:49 2012

Re: environment modules for gcc/gfortran?

You need to roll your own modules script.  They are fairly simple Tcl 
scripts with some extensions.  So you would install the newer version 
into some unique location -- don't make it fight with the system gcc in 
/usr.  Let's say it's in /opt/gcc-4.7 (and will include g++ and 
gfortran).  It would be like

######################################################################
##
##
proc ModulesHelp { } {
         global version GCChome

         puts stderr "\tGCC\n"
         puts stderr "\tThis module loads the latest version of 
gfortran/gcc/g++.\n"
}

module-whatis    "loads the latest GCC Compiler Environment"

# for Tcl script use only
set    version        4.7
set    GCChome        /opt/gcc-$version

prepend-path    PATH           $GCChome/bin
prepend-path    INCLUDE        $GCChome/include
prepend-path    LD_LIBRARY_PATH $GCChome/lib
prepend-path     MANPATH        $GCChome/man

---------
You'd have to adjust the paths since these aren't the way gcc usually 
(Continue reading)

Tom Roche | 28 Mar 00:43 2012
Picon

Re: environment modules for gcc/gfortran?


Katherine Holcomb Tue, 27 Mar 2012 12:49:14 -0400
> You need to roll your own modules script. They are fairly simple Tcl
> scripts with some extensions. So you would install the newer version
> into some unique location -- don't make it fight with the system gcc
> in /usr. Let's say it's in /opt/gcc-4.7

Thanks for the instructions  <at> 

http://gcc.gnu.org/ml/fortran/2012-03/msg00140.html

! One more question: is 4.7 the gcc/gfortran version you would use?
I ask because I got the following post from the cluster maintainer
today:

>> I tried to compile the 4.6 version of GCC from source and could not
>> get it to work. If you have a working version, I would be happy to
>> put it [up]

FWIW, the cluster is running RHEL 5.4.

TIA, Tom Roche <Tom_Roche <at> pobox.com>

Katherine Holcomb | 28 Mar 15:55 2012

Re: environment modules for gcc/gfortran?

I don't have an opinion on version; 4.7 was just the latest official 
version of which I'm aware.

We run the equivalent of Centos 5.4 on our cluster and there is an rpm 
for gcc 4.4, but it installs under the names gcc44/gfortran44 which 
makes it less convenient for most users.  I wasn't able to get my module 
script to alias gcc44 to gcc or gfortran44 to gfortran, though I haven't 
put much effort into it.  Version 4.4 gfortran still lacks many 
important new features that are well supported even in 4.6 (for 
instance, 4.6.2 will compile and run a tiny little "blackjack" program I 
wrote with type-bound procedures that ICEs Intel ifort 12.1.2).  
Unfortunately I don't have any advice on building 4.6 or later on Centos 
5.4 since I've never tried it.

On 03/27/2012 06:43 PM, Tom Roche wrote:
> Katherine Holcomb Tue, 27 Mar 2012 12:49:14 -0400
>> You need to roll your own modules script. They are fairly simple Tcl
>> scripts with some extensions. So you would install the newer version
>> into some unique location -- don't make it fight with the system gcc
>> in /usr. Let's say it's in /opt/gcc-4.7
> Thanks for the instructions  <at> 
>
> http://gcc.gnu.org/ml/fortran/2012-03/msg00140.html
>
> ! One more question: is 4.7 the gcc/gfortran version you would use?
> I ask because I got the following post from the cluster maintainer
> today:
>
>>> I tried to compile the 4.6 version of GCC from source and could not
>>> get it to work. If you have a working version, I would be happy to
(Continue reading)

Paul Richard Thomas | 28 Mar 16:26 2012
Picon

Re: environment modules for gcc/gfortran?

Dear Katherine and Tom,

I believe that I have RHEL5.4 as a virtual machine at home.  If so,
I'll build a release version of 4.7.0 on it.  It'll take a few days
because I know that some of the dependencies will need updating and
all the usual good stuff.  I have to say that, whilst I am a gfortran
maintainer and would say this :-), building your own is very straight
forward on linices - just read the instructions at gcc.gnu.org and
follow them to the letter!

Not only does 4.7.0 do good things with typebound procedures but its
implementation of object oriented programming is sufficiently complete
that it deals with all the examples in Damian Rouson's book and he is
intending to use it for teaching purposes.

Best regards

Paul

On Wed, Mar 28, 2012 at 3:55 PM, Katherine Holcomb <kah3f <at> virginia.edu> wrote:
> I don't have an opinion on version; 4.7 was just the latest official version
> of which I'm aware.
>
> We run the equivalent of Centos 5.4 on our cluster and there is an rpm for
> gcc 4.4, but it installs under the names gcc44/gfortran44 which makes it
> less convenient for most users.  I wasn't able to get my module script to
> alias gcc44 to gcc or gfortran44 to gfortran, though I haven't put much
> effort into it.  Version 4.4 gfortran still lacks many important new
> features that are well supported even in 4.6 (for instance, 4.6.2 will
> compile and run a tiny little "blackjack" program I wrote with type-bound
(Continue reading)

Manfred Schwarb | 28 Mar 17:16 2012
Picon
Picon

Re: environment modules for gcc/gfortran?

Am 28.03.2012 16:26, schrieb Paul Richard Thomas:
> Dear Katherine and Tom,
>
> I believe that I have RHEL5.4 as a virtual machine at home.  If so,
> I'll build a release version of 4.7.0 on it.  It'll take a few days
> because I know that some of the dependencies will need updating and
> all the usual good stuff.  I have to say that, whilst I am a gfortran
> maintainer and would say this :-), building your own is very straight
> forward on linices - just read the instructions at gcc.gnu.org and
> follow them to the letter!
>
> Not only does 4.7.0 do good things with typebound procedures but its
> implementation of object oriented programming is sufficiently complete
> that it deals with all the examples in Damian Rouson's book and he is
> intending to use it for teaching purposes.
>
> Best regards

Paul, Katherine, Tom,

the binaries at http://gfortran.com/download/x86_64/
will probably work on RHEL / Centos 5.4 (modulo libgomp), it's worth a try.
See the readme file in the directory. You will find the latest
snapshots of GCC 4.3, 4.4, 4.5, 4.6, 4.7, 4.8 so you can choose
which to take.

Cheers,
Manfred

>
(Continue reading)

Paul Richard Thomas | 28 Mar 18:30 2012
Picon

Re: environment modules for gcc/gfortran?

Manfred,

Indeed - I had forgotten that nightly builds are available on
gfortran.com.  Don't forget to take a look at the PLEASE_README.txt.
In particular:

"The builds need fairly new auxiliary libraries however. If your
system does not provide up-to-date libraries of libgmp and libmpfr,
you can find them in the archive gcc-infrastructure.tar.xz.

For GCC 4.5 and newer, you also need up-to-date libraries of libmpc,
libelf, ppl and cloog-ppl, which you find in the infrastructure archive, too."

This is straightforward however.

Cheers

Paul

On Wed, Mar 28, 2012 at 5:16 PM, Manfred Schwarb <manfred99 <at> gmx.ch> wrote:
> Am 28.03.2012 16:26, schrieb Paul Richard Thomas:
>
>> Dear Katherine and Tom,
>>
>> I believe that I have RHEL5.4 as a virtual machine at home.  If so,
>> I'll build a release version of 4.7.0 on it.  It'll take a few days
>> because I know that some of the dependencies will need updating and
>> all the usual good stuff.  I have to say that, whilst I am a gfortran
>> maintainer and would say this :-), building your own is very straight
>> forward on linices - just read the instructions at gcc.gnu.org and
(Continue reading)

Tom Roche | 28 Mar 17:53 2012
Picon

upgrading gcc/gfortran on linux, glibc=2.5


Paul Richard Thomas Wed, 28 Mar 2012 16:26:17 +0200
> I believe that I have RHEL5.4 as a virtual machine at home. If so,
> I'll build a release version of 4.7.0 on it.

Thanks!

> It'll take a few days because I know that some of the dependencies
> will need updating and all the usual good stuff. I have to say that,
> whilst I am a gfortran maintainer and would say this :-), building
> your own is very straight forward on linices

Except we lack root :-( Our cluster (which is currently running

$ lsb_release -ds
"Red Hat Enterprise Linux Server release 5.4 (Tikanga)"
$ gfortran --version
GNU Fortran (GCC) 4.1.2 20080704 (Red Hat 4.1.2-46)
$ ldd --version
ldd (GNU libc) 2.5

) is maintained by contractors for a larger group, who dissuade us
from building dependencies as fundamental as gcc. While there are
plans to upgrade the cluster to RHEL 6 "soon," that may not be for
months, and anyway that would only get us to gcc-4.4 (IIUC). However,
one of the admins has stated

> I tried to compile the 4.6 version of GCC from source and could not
> get it to work. If you have a working version, I would be happy to
> put it [up]
(Continue reading)

Paul Richard Thomas | 28 Mar 18:33 2012
Picon

Re: upgrading gcc/gfortran on linux, glibc=2.5

Dear Tom,

I am glad that you sent this to the fortran list.  There are people
out here that are far more expert than I am at answering the sort of
questions that you are answering.  In fact, I tried a few months back
to build gfortran without root privileges and failed precisely because
glibc versions did not match.  I did not try very hard, mark you :-)

Cheers

Paul

On Wed, Mar 28, 2012 at 5:53 PM, Tom Roche <Tom_Roche <at> pobox.com> wrote:
>
> Paul Richard Thomas Wed, 28 Mar 2012 16:26:17 +0200
>> I believe that I have RHEL5.4 as a virtual machine at home. If so,
>> I'll build a release version of 4.7.0 on it.
>
> Thanks!
>
>> It'll take a few days because I know that some of the dependencies
>> will need updating and all the usual good stuff. I have to say that,
>> whilst I am a gfortran maintainer and would say this :-), building
>> your own is very straight forward on linices
>
> Except we lack root :-( Our cluster (which is currently running
>
> $ lsb_release -ds
> "Red Hat Enterprise Linux Server release 5.4 (Tikanga)"
> $ gfortran --version
(Continue reading)

Manfred Schwarb | 28 Mar 22:33 2012
Picon
Picon

Re: upgrading gcc/gfortran on linux, glibc=2.5

Am 28.03.2012 17:53, schrieb Tom Roche:

>
> Paul Richard Thomas Wed, 28 Mar 2012 16:26:17 +0200
>> I believe that I have RHEL5.4 as a virtual machine at home. If so,
>> I'll build a release version of 4.7.0 on it.
>
> Thanks!
>
>> It'll take a few days because I know that some of the dependencies
>> will need updating and all the usual good stuff. I have to say that,
>> whilst I am a gfortran maintainer and would say this :-), building
>> your own is very straight forward on linices
>
> Except we lack root :-( Our cluster (which is currently running
>

Definitely not needed. You can compile GCC as a normal user, and install
it everywhere you want.

> $ lsb_release -ds
> "Red Hat Enterprise Linux Server release 5.4 (Tikanga)"
> $ gfortran --version
> GNU Fortran (GCC) 4.1.2 20080704 (Red Hat 4.1.2-46)
> $ ldd --version
> ldd (GNU libc) 2.5
>
> ) is maintained by contractors for a larger group, who dissuade us
> from building dependencies as fundamental as gcc. While there are
> plans to upgrade the cluster to RHEL 6 "soon," that may not be for
(Continue reading)

Tom Roche | 29 Mar 01:53 2012
Picon

gcc versions: stable vs development


Thanks for all the help getting a gfortran for our cluster ...
but one more question. The admin says he's using the 4.6 binary, since

> Neither GCC 4.7 nor 4.8 are stable, they are development snapshots
> (beta releases).

so I'd like to know:

1 Is that correct?

2 In general, how does one tell if a given gcc release is development
  or stable? I note

* the list of releases  <at> 

http://gcc.gnu.org/releases.html

  says nothing about which releases are development or stable.

* the release page for 4.7.0

http://gcc.gnu.org/gcc-4.7/

  says only that it "is a major release."

TIA, Tom Roche <Tom_Roche <at> pobox.com>

Tim Prince | 29 Mar 05:59 2012
Picon

Re: gcc versions: stable vs development

  On 03/28/2012 04:53 PM, Tom Roche wrote:
> Thanks for all the help getting a gfortran for our cluster ...
> but one more question. The admin says he's using the 4.6 binary, since
>
>> Neither GCC 4.7 nor 4.8 are stable, they are development snapshots
>> (beta releases).
> so I'd like to know:
>
> 1 Is that correct?
>
> 2 In general, how does one tell if a given gcc release is development
>    or stable? I note
>
> * the list of releases  <at> 
>
> http://gcc.gnu.org/releases.html
>
>    says nothing about which releases are development or stable.
>
> * the release page for 4.7.0
>
> http://gcc.gnu.org/gcc-4.7/
>
>    says only that it "is a major release."
>
> TIA, Tom Roche<Tom_Roche <at> pobox.com>
I think you found your answer. 4.7.0 was released since your admin 
formed that opinion.  My only reservation is that g++ 4.7 is 
incompatible with Intel C++.  If that matters, 4.6.3 is good. No 
problems with Fortran or C.
(Continue reading)


Gmane