Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 9th August 2007, 09:52 PM
dogsipod Offline
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
Reply With Quote
  #2  
Old 20th October 2008, 03:31 PM
eppo#1 Offline
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:
  1. Get the binary pack from here (the pack is called g95-x86-linux.tgz)
  2. 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
  3. Go to the "g95-install" directory by
    Code:
    cd ~/temp/g95/g95-install
  4. 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
  5. 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:
    su -
    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
Code:
g95
Then you should get the reply
Code:
g95: no input files
Testing it with a simple program can be done as follows:
  1. 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
  2. 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"
  3. Run the program by
    Code:
    ./banana
  4. 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!
Reply With Quote
  #3  
Old 20th October 2008, 03:46 PM
eppo#1 Offline
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.
Reply With Quote
  #4  
Old 25th August 2009, 12:37 AM
SpuriousQ's Avatar
SpuriousQ Offline
Registered User
 
Join Date: Jul 2009
Posts: 59
linuxfedorafirefox
I can't make the symbolic link to work!!! Please help!
Reply With Quote
  #5  
Old 25th August 2009, 07:15 AM
eppo#1 Offline
Registered User
 
Join Date: Jun 2008
Location: Helsinki, Finland
Posts: 43
linuxfedorafirefox
Hi SpuriousQ,

Have you tried in root? What is the problem?
Reply With Quote
  #6  
Old 15th November 2009, 06:53 AM
SpuriousQ's Avatar
SpuriousQ Offline
Registered User
 
Join Date: Jul 2009
Posts: 59
windows_vistaie
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?
Reply With Quote
  #7  
Old 15th November 2009, 07:14 AM
eppo#1 Offline
Registered User
 
Join Date: Jun 2008
Location: Helsinki, Finland
Posts: 43
linuxfedorafirefox
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.
Reply With Quote
  #8  
Old 15th November 2009, 07:47 AM
SpuriousQ's Avatar
SpuriousQ Offline
Registered User
 
Join Date: Jul 2009
Posts: 59
windows_vistaie
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 .
Reply With Quote
  #9  
Old 5th November 2010, 03:25 AM
danfe1 Offline
Registered User
 
Join Date: Nov 2010
Posts: 3
linuxfedorafirefox
Re: g95 installation method [SOLVED]

Quote:
Originally Posted by eppo#1 View Post
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:
  1. Get the binary pack from here (the pack is called g95-x86-linux.tgz)
  2. 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
  3. Go to the "g95-install" directory by
    Code:
    cd ~/temp/g95/g95-install
  4. 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
  5. 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:
    su -
    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
Code:
g95
Then you should get the reply
Code:
g95: no input files
Testing it with a simple program can be done as follows:
  1. 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
  2. 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"
  3. Run the program by
    Code:
    ./banana
  4. 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
Reply With Quote
  #10  
Old 5th November 2010, 08:56 AM
eppo#1 Offline
Registered User
 
Join Date: Jun 2008
Location: Helsinki, Finland
Posts: 43
linuxredhatfirefox
Re: g95 gfortran.....

Hi danfe1,

Have you tried this (as mentioned here and here)?

Code:
sudo yum install glibc.i686
Cheers
Reply With Quote
  #11  
Old 5th November 2010, 12:48 PM
danfe1 Offline
Registered User
 
Join Date: Nov 2010
Posts: 3
windows_xp_2003ie
Re: g95 gfortran.....

Thanks. I'll try it tomorrow.
Reply With Quote
  #12  
Old 9th November 2010, 08:41 AM
danfe1 Offline
Registered User
 
Join Date: Nov 2010
Posts: 3
linuxfedorafirefox
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
Reply With Quote
Reply

Tags
g95, gfortran

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
gfortran on Fedora 10 on PS3 not working imntritejr Mac Chat 2 1st February 2009 10:05 PM
gcc and gfortran for Installing Opensees in FC5 sukumar_baishya Using Fedora 2 15th July 2006 03:57 PM
Any Fortran compilers for FC4 *besides* gfortran (GCC4) Belayman Using Fedora 6 6th July 2005 09:53 AM


Current GMT-time: 21:46 (Saturday, 18-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat