Hi,
I'm totally new with centos...we have a cluster in our labo with centos oscar. The gcc which was provided with the release is gcc41 and gfortran41. There are packages for gcc44 and gfortran44. I have installed them.
But the gcc is not a link to gcc41 or gcc44. it is just an executable. idem for gfortran. So which is the good way on centOS to choose the gcc44 and gfortran44 per default.
Thx a lot! Best regards, Guillaume
On Wed, Sep 01, 2010 at 05:35:23PM +0200, giggzounet wrote:
I'm totally new with centos...we have a cluster in our labo with centos oscar. The gcc which was provided with the release is gcc41 and gfortran41. There are packages for gcc44 and gfortran44. I have installed them. But the gcc is not a link to gcc41 or gcc44. it is just an executable. idem for gfortran. So which is the good way on centOS to choose the gcc44 and gfortran44 per default.
The easiest way in most cases is put 'export CC=gcc44' in your bash profile.
Le 01/09/2010 17:47, Matthew Miller a écrit :
On Wed, Sep 01, 2010 at 05:35:23PM +0200, giggzounet wrote:
I'm totally new with centos...we have a cluster in our labo with centos oscar. The gcc which was provided with the release is gcc41 and gfortran41. There are packages for gcc44 and gfortran44. I have installed them. But the gcc is not a link to gcc41 or gcc44. it is just an executable. idem for gfortran. So which is the good way on centOS to choose the gcc44 and gfortran44 per default.
The easiest way in most cases is put 'export CC=gcc44' in your bash profile.
and for gfortran ? export FC=gfortran44 ???
I test that.
Thx for your quick answer
From: giggzounet giggzounet@gmail.com
I'm totally new with centos...we have a cluster in our labo with centos oscar. The gcc which was provided with the release is gcc41 and gfortran41. There are packages for gcc44 and gfortran44. I have installed them. But the gcc is not a link to gcc41 or gcc44. it is just an executable. idem for gfortran. So which is the good way on centOS to choose the gcc44 and gfortran44 per default.
Are you sure you did not update the packages instead of install...? To list the packages files : rpm -ql PACKAGENAME And check what is where...
JD
giggzounet wrote:
Hi,
I'm totally new with centos...we have a cluster in our labo with centos oscar. But the gcc is not a link to gcc41 or gcc44. it is just an executable. idem for gfortran. So which is the good way on centOS to choose the gcc44 and gfortran44 per default.
Hi
I not sure if I understood the problem, but if your are using OSCAR, and if I remember right, you can install as many compiler as you want, but you select using the utility "module", like "module load gcc41" or "module load gcc44". Of course, you have to configure the environment.
Then you put the right module in your configuration file: bashrc or bash_profile.
Hope this helps
Marcelo
Le 01/09/2010 18:06, Marcelo M. Garcia a écrit :
giggzounet wrote:
Hi,
I'm totally new with centos...we have a cluster in our labo with centos oscar. But the gcc is not a link to gcc41 or gcc44. it is just an executable. idem for gfortran. So which is the good way on centOS to choose the gcc44 and gfortran44 per default.
Hi
I not sure if I understood the problem, but if your are using OSCAR, and if I remember right, you can install as many compiler as you want, but you select using the utility "module", like "module load gcc41" or "module load gcc44". Of course, you have to configure the environment.
Then you put the right module in your configuration file: bashrc or bash_profile.
Hope this helps
Marcelo
I will take a look into that!
at the moment: [18:19:54] root@master ~ # module list Currently Loaded Modulefiles: 1) torque-oscar/2.1.10 2) switcher/1.0.13 3) sge/6.0u9 4) default-manpath/1.0.1 5) oscar-modules/1.0.5
thx
Le 01/09/2010 18:06, Marcelo M. Garcia a écrit :
giggzounet wrote:
Hi,
I'm totally new with centos...we have a cluster in our labo with centos oscar. But the gcc is not a link to gcc41 or gcc44. it is just an executable. idem for gfortran. So which is the good way on centOS to choose the gcc44 and gfortran44 per default.
Hi
I not sure if I understood the problem, but if your are using OSCAR, and if I remember right, you can install as many compiler as you want, but you select using the utility "module", like "module load gcc41" or "module load gcc44". Of course, you have to configure the environment.
Then you put the right module in your configuration file: bashrc or bash_profile.
ok that's the right way. Do you know where I can find documentation about it ?
Thx
ok that's the right way. Do you know where I can find documentation about it ?
Hi
There is the main web site: http://modules.sourceforge.net/
Or, maybe the best way, it's to start from the modules provided by OSCAR, and change to your needs.
In my case, we use Bright (former ClusterVisionOS), the module files are at "/cm/shared/modulefiles". They are TCL scripts: -sh-3.2$ pwd /cm/shared/modulefiles/gcc -sh-3.2$ -sh-3.2$ -sh-3.2$ ls 4.3.4 -sh-3.2$ -sh-3.2$ more 4.3.4 #%Module -*- tcl -*- ## ## modulefile ## proc ModulesHelp { } {
puts stderr "\tAdds GNU Cross Compilers to your environment variables," }
module-whatis "adds GNU Cross Compilers to your environment variables"
set root /cm/shared/apps/gcc/4.3.4 prepend-path PATH $root/bin prepend-path LD_LIBRARY_PATH $root/lib:$root/lib64 -sh-3.2$ -sh-3.2$
Regards
mg.
Le 02/09/2010 12:11, Marcelo M. Garcia a écrit :
ok that's the right way. Do you know where I can find documentation about it ?
Hi
There is the main web site: http://modules.sourceforge.net/
Or, maybe the best way, it's to start from the modules provided by OSCAR, and change to your needs.
In my case, we use Bright (former ClusterVisionOS), the module files are at "/cm/shared/modulefiles". They are TCL scripts: -sh-3.2$ pwd /cm/shared/modulefiles/gcc -sh-3.2$ -sh-3.2$ -sh-3.2$ ls 4.3.4 -sh-3.2$ -sh-3.2$ more 4.3.4 #%Module -*- tcl -*- ## ## modulefile ## proc ModulesHelp { } {
puts stderr "\tAdds GNU Cross Compilers to your environment variables," }
module-whatis "adds GNU Cross Compilers to your environment variables"
set root /cm/shared/apps/gcc/4.3.4 prepend-path PATH $root/bin prepend-path LD_LIBRARY_PATH $root/lib:$root/lib64 -sh-3.2$ -sh-3.2$
Regards
mg.
ok. thx. Yes I'm reading the documentation of "modules" and I find some examples.
So I must have a directory (for example /opt/compiler/gcc) with the different versions of gcc (4.1 and 4.4 in my case). Then the module tcl script chooses one and exclude the other, does it ?
in order to have these gcc directories can I just copy the files from the installed rpm ? or must I compile the different gcc versions by myself ?
Thx a lot! Guillaume
giggzounet wrote:
So I must have a directory (for example /opt/compiler/gcc) with the different versions of gcc (4.1 and 4.4 in my case). Then the module tcl script chooses one and exclude the other, does it ?
in order to have these gcc directories can I just copy the files from the installed rpm ? or must I compile the different gcc versions by myself ?
Hi
To be honest, I'm a little bit confused. If you install from the rpms the binaries will have different names : gcc, gcc34, etc. So why the hassle to differentiate them?
Unless, instead, you only set environment variables CC=gcc or CC=gcc34. But sounds silly.
I think this make more sense if you have different MPI compilers, like, one mpicc (gcc34), other mpicc(gcc41), etc. Or different BLAS libraries, like libblas or libgoto etc.
Regards
mg.
Le 03/09/2010 10:58, Marcelo M. Garcia a écrit :
giggzounet wrote:
So I must have a directory (for example /opt/compiler/gcc) with the different versions of gcc (4.1 and 4.4 in my case). Then the module tcl script chooses one and exclude the other, does it ?
in order to have these gcc directories can I just copy the files from the installed rpm ? or must I compile the different gcc versions by myself ?
Hi
To be honest, I'm a little bit confused. If you install from the rpms the binaries will have different names : gcc, gcc34, etc. So why the hassle to differentiate them?
Unless, instead, you only set environment variables CC=gcc or CC=gcc34. But sounds silly.
ok. but if script are using direct gcc...and not the varaible CC ?
I think this make more sense if you have different MPI compilers, like, one mpicc (gcc34), other mpicc(gcc41), etc. Or different BLAS libraries, like libblas or libgoto etc.
it is my problem...with mpicc for example. And I though I could solve it with a gcc44 module or a gcc41 module. For example I have gcc 4.4 installed, how can say to mpicc to use it ?
Thx for your patience :) Best regards Guillaume
ok. but if script are using direct gcc...and not the varaible CC ?
I think this make more sense if you have different MPI compilers, like, one mpicc (gcc34), other mpicc(gcc41), etc. Or different BLAS libraries, like libblas or libgoto etc.
it is my problem...with mpicc for example. And I though I could solve it with a gcc44 module or a gcc41 module. For example I have gcc 4.4 installed, how can say to mpicc to use it ?
Hi
I suggest you to edit script, and replace gcc with CC[1]. Or put an alias at the beginning of the script: alias gcc=gcc34(?).
For mpi, it's much easier because you set everything: CC=gcc34, PREFIX=/data/mpi/gcc34, etc. Then you build the other one, CC=gcc, PREFIX=/data/mpi/gcc41, etc. Now you build you modules.
Probably in the FAQ or documentation of your MPI explains how to create your libraries, etc.
There a few good tutorials about parallel computing and MPI, etc here: https://computing.llnl.gov/tutorials/parallel_comp/ https://computing.llnl.gov/tutorials/mpi/
Regards
mg.
[1] You can replace inside vi, for example, or use something like 'sed': http://www.grymoire.com/Unix/Sed.html#uh-0