How do I know which fortran complier is installed on my machine?
Hi guys,
I am a total newbie on linux. But I have to work on some software (Petsc) that runs on linux. So while configuring Petsc, I get the following error message : Fortran compiler you provided with --with-fc=g77 does not work So how can I find out which Fortran complier I DO have installed on this machine? Or how can I install one? Thank you!! |
g77 is part of GCC (GNU Compiler Collection). It should be in your distribution repository (or, on the install disk). There are some other FORTRAN compilers, like gfortran. Probably, you can find it in your repository too. What distribution are you using? In Slackware the package is called gcc-gfortran-4.2.4-i486-1
|
Uncle Theodore, thank you for your prompt reply.
When I type "uname -rs" I get Linux 2.6.18-92.1.22.el5 I just got access to this machine and haven't installed anything on it (So I have no CD whatsoever). Is there a command I can type to know whether I have a Fortran compiler or not? |
Well, Linux 2.6.18-92.1.22.el5 is the name of the kernel, not of the distribution. But from the "el5" piece at the end I'm going to guess it's Red Had Enterprise Linux v5.
As to FORTRAN versions. Type g77 -v in the terminal. Does it return information on the program version or says there's no such command found? Then, try gfortran -v I think you need to install the gcc package. I'm not familiar with RHEL, so I'll leave it to somebody else to tell you the exact procedure. |
For now, I've managed to go through with petcs installation without specifying a Fortran complier at all (which is somehow strange, but it worked).
In any case, g77 -c returns command not found.. While gfortran -v returns : Using built-in specs. Target: x86_64-redhat-linux ... gcc version 4.1.2 20071124 (Red Hat 4.1.2-42) So I guess gfortran was the one I should have used. Again, thank you very much sir and have a great night. |
You may also want to look at the compat-gcc-34-g77 package. It is in the standard repo.
|
All times are GMT -5. The time now is 07:52 PM. |