Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Fortran 101 question

Status
Not open for further replies.

ahe72

Programmer
Nov 21, 2010
2
US
I need to be able to compile fortran on a windows xp machine that can be executed on a linux machine. The reason I can't just compile on the linux machine is that I don't have super user access (thus I can't install a fortran 90 compiler, all it has is g77 and it's not compiling my fortran 90 progrm). The compiler I currently have now on windows is g95.
 
If your program doesn't have too much features from Fortran 90, you can try to compile it with g77 using the option -ffree-form.
 
To install g95 on Linux, you don't need a super user access.

Download the binary package from (the one called Linux x86)

You will get a file named g95-x86-linux.tgz

Uncompressed this compressed archive file as follows :

Code:
tar zxvf g95-x86-linux.tgz

A directory should have been created with the name g95-install. Now, you just have to make the command g95 available. Two ways for that : creating an alias or adding symbolic link into a directory which belongs to the PATH environment variable. I prefer the second way which works even when calling g95 in shell or make files but the first way is simpler if you use g95 in an interactive command windows.

The following instruction has to be inserted into your personal .bashrc configuration file located in you home directory :

Code:
alias g95=/.../g95-install/bin/i686-pc-linux-gnu-g95

Of course, you have to replace ... by the correct directory which contains the directory g95-install.

To finish the installation, open a new command window (or run the command bash in the current one) and test the command g95





François Jacq
 
Thank you that is great. I didn't realize I could just copy the files and it would work. Thanks alot Francois!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top