 |
 |
 |
 |
| Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum. |

9th August 2007, 09:52 PM
|
|
Registered User
|
|
Join Date: Jun 2007
Posts: 25

|
|
|
g95 gfortran.....
hi,
i followed the install method in the g95 lmanual..posted below.
Installation Notes
Unix (Linux/OSX/Solaris/Irix/etc.):
Open a console, and go to the directory in which you want to install g95. To download and install g95, run
the following commands:
wget -O - http://ftp.g95.org/g95-x86-linux.tgz | tar xvfz -
ln -s $PWD/g95-install/bin/i686-pc-linux-gnu-g95 /usr/bin/g95
everything seemed to work fine. the g95 command in terminal prompted a "no input files" so it seemed to work. i made a quick hello program to test and i get these errors.
/tmp/cc3Ugii1.s: Assembler messages:
/tmp/cc3Ugii1.s:11: Error: suffix or operands invalid for `push'
tested the hello program with gfortran and it worked fine. i googled around a little and it appears that the error have something to do with a 64 bit 32bit problem. i mean like the compiler is expecting 64 bit, but libraries are 32 bit. or somthing like that. i am semi new to this so i don't really know where to go from here.
thanks
|

20th October 2008, 03:31 PM
|
|
Registered User
|
|
Join Date: Jun 2008
Location: Helsinki, Finland
Posts: 43

|
|
|
g95 installation method [SOLVED]
Hi dogsipod,
I know this is a bit old thread, but have you solved your problem? If you have solved it, maybe someone else can use this info as well. I just fixed the same problem for my machine. Instead of using the official g95 installation manual I modified this manual to fit my system and it works. This method is as follows:
- Get the binary pack from here (the pack is called g95-x86-linux.tgz)
- Unpack the file in e.g. a temp directory
Code:
tar -xzf g95-x86-linux.tgz
Now the directories "bin", "INSTALL", and "lib" should be there
- Go to the "g95-install" directory by
Code:
cd ~/temp/g95/g95-install
- Copy the bin and lib of g95 to your own bin and lib by
Code:
[root@localhost ~/temp/g95/g95-install] # cp bin/* /usr/local/bin/
and
Code:
[root@localhost ~/temp/g95/g95-install] # cp lib/* /usr/local/lib/ -R
- g95 is called by
Code:
i686-pc-linux-gnu-g95
, so to make this more easy make a symbolic link to the calling name "g95" by
Code:
ln -s /home/my_username/temp/g95/g95-install/bin/*g95* /bin/g95
where "my_username" is of course my real username
Now g95 should work. You can easily test it by opening a terminal and typing Then you should get the reply
Code:
g95: no input files
Testing it with a simple program can be done as follows: - Open a text editor and write for example
Code:
PROGRAM banana
PRINT*, 'I like bananas!'
END PROGRAM banana
and save the file as banana.f90
- Compile the file (in the right directory) with
Code:
g95 -o banana banana.f90
where the "-o" part connects the executable to the name "banana" (otherwise this would be "a.out"
- Run the program by
- This gives the command line output "I like bananas!"
Once again, I found this solution from this and it took me some time to get it to work, so I put it here for everyone else with the same problem. Have fun!
|

20th October 2008, 03:46 PM
|
|
Registered User
|
|
Join Date: Jun 2008
Location: Helsinki, Finland
Posts: 43

|
|
By the way, dogsipod, are you trying to run a 32 bit version on a 64 bit system or the other way around (since you posted in the 64 bit forum)? If so, there is also a 64 bit version here.
|

25th August 2009, 12:37 AM
|
 |
Registered User
|
|
Join Date: Jul 2009
Posts: 59

|
|
|
I can't make the symbolic link to work!!! Please help!
|

25th August 2009, 07:15 AM
|
|
Registered User
|
|
Join Date: Jun 2008
Location: Helsinki, Finland
Posts: 43

|
|
|
Hi SpuriousQ,
Have you tried in root? What is the problem?
|

15th November 2009, 06:53 AM
|
 |
Registered User
|
|
Join Date: Jul 2009
Posts: 59

|
|
|
eppo#1:
I'm sorry for this late response but it seems there were something wrong with the kernel. I managed to make symbolic links via gui, not via terminal commands, so the linux savvy around here recommended me to reinstall everything... so I did. Also, the savvy installed the intel fortran compiler instead of g95 (and now I'm very afraid it was the trial version). Question: which fortran 90 compiler do you recommend for Linux?
|

15th November 2009, 07:14 AM
|
|
Registered User
|
|
Join Date: Jun 2008
Location: Helsinki, Finland
Posts: 43

|
|
|
Hi SpuriousQ,
I hope things work for you now after an overhaul :-).
With regard to your question, I usually use gfortran. It is free, easy to install and works well. But my fortran programming is not that demanding. It depends a bit on what you need, compilers of e.g. Intel or Nag have support and may have a nice GUI to work with. So the matter is what you want to do, how experienced you are and what you are willing to pay for help.
|

15th November 2009, 07:47 AM
|
 |
Registered User
|
|
Join Date: Jul 2009
Posts: 59

|
|
Hi eppo#1!
I consider myself more a front-end user rather than a developer. I'm working on the SIESTA program, which uses fortran 90, and it is for crystal structure calculations (energy density of states, phonon energies, etc. -solid state physics) so I think I need something stable and reliable. I've been googleing around and it seems that g95 is more stable than gfortran but not as fast. What people recommend is to use both and maybe it is a good idea since it will give me some sort of reassurance that I'm doing things right. I cannot afford Intel nor other $$compiler -so I will use both  .
|

5th November 2010, 03:25 AM
|
|
Registered User
|
|
Join Date: Nov 2010
Posts: 3

|
|
|
Re: g95 installation method [SOLVED]
Quote:
Originally Posted by eppo#1
Hi dogsipod,
I know this is a bit old thread, but have you solved your problem? If you have solved it, maybe someone else can use this info as well. I just fixed the same problem for my machine. Instead of using the official g95 installation manual I modified this manual to fit my system and it works. This method is as follows:
- Get the binary pack from here (the pack is called g95-x86-linux.tgz)
- Unpack the file in e.g. a temp directory
Code:
tar -xzf g95-x86-linux.tgz
Now the directories "bin", "INSTALL", and "lib" should be there
- Go to the "g95-install" directory by
Code:
cd ~/temp/g95/g95-install
- Copy the bin and lib of g95 to your own bin and lib by
Code:
[root@localhost ~/temp/g95/g95-install] # cp bin/* /usr/local/bin/
and
Code:
[root@localhost ~/temp/g95/g95-install] # cp lib/* /usr/local/lib/ -R
- g95 is called by
Code:
i686-pc-linux-gnu-g95
, so to make this more easy make a symbolic link to the calling name "g95" by
Code:
ln -s /home/my_username/temp/g95/g95-install/bin/*g95* /bin/g95
where "my_username" is of course my real username
Now g95 should work. You can easily test it by opening a terminal and typing Then you should get the reply
Code:
g95: no input files
Testing it with a simple program can be done as follows: - Open a text editor and write for example
Code:
PROGRAM banana
PRINT*, 'I like bananas!'
END PROGRAM banana
and save the file as banana.f90
- Compile the file (in the right directory) with
Code:
g95 -o banana banana.f90
where the "-o" part connects the executable to the name "banana" (otherwise this would be "a.out"
- Run the program by
- This gives the command line output "I like bananas!"
Once again, I found this solution from this and it took me some time to get it to work, so I put it here for everyone else with the same problem. Have fun! 
|
Hello
I found the following message after I typed g95. All other things I followed your steps and seemed OK. The banana.f90 also showed the same message.
-bash: /bin/g95: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory
Look forward to your ideas
|

5th November 2010, 08:56 AM
|
|
Registered User
|
|
Join Date: Jun 2008
Location: Helsinki, Finland
Posts: 43

|
|
|
Re: g95 gfortran.....
Hi danfe1,
Have you tried this (as mentioned here and here)?
Code:
sudo yum install glibc.i686
Cheers
|

5th November 2010, 12:48 PM
|
|
Registered User
|
|
Join Date: Nov 2010
Posts: 3

|
|
|
Re: g95 gfortran.....
Thanks. I'll try it tomorrow.
|

9th November 2010, 08:41 AM
|
|
Registered User
|
|
Join Date: Nov 2010
Posts: 3

|
|
|
Re: g95 gfortran.....
Hello eppo1 and dogsipod,
After following the suggestion from eppo1 on the command (sudo yum install glibc.i686 ), the g95 command produced the message g95: no input files; and when a test program was made, the following message resulted.
/tmp/cc07cRdc.s: Assembler messages:
/tmp/cc07cRdc.s:11: Error: suffix or operands invalid for `push'
Please note that I have downloaded the install files for g95 at /home/Downloads/danfe1/g95-install/...
and made the symbolic link using the commands su ~
and ln -s /home/Downloads/danfe1/g95-install/bin/*g95* /bin/g95
Look for your help
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Current GMT-time: 21:46 (Saturday, 18-05-2013)
|
|
 |
 |
 |
 |
|
|