Professional Documents
Culture Documents
Fortran Compiling
Fortran Compiling
Outline
Surfing www.mcsr.olemiss.edu website Logging into the system via ssh Basic Structure and Syntax of Fortran A quick glance on PICO editor More detailed look on compilers and compiling commands Application of Fortran Compiling
Start the secure shell client: Start->Programs->SSH Secure Shell->Secure Shell Client Connect to willow: From the secure shell window, click Quick Connect. Then, from the Connect to Remote Host pop-up window, enter: Hostname : HostName User Name: UserName Click Connect.
If you are a windows user and you want to download ssh; Go to IT Helpdesk @ http://www.olemiss.edu/helpdesk/resources.html#software and click on the SSH Secure Shell 3.1 link. If you are a Unix user, ssh will come with the operating system
Start the Terminal: Finder Utilities Terminal Type the following command: ssh UserName@HostName Enter your password
General Command
Write editor contents to a file Save the file and exit pico Spell Check Justify the text
Move Move Move Move one character to the right one character to the left up one line down one line [Ctrl] [Ctrl] [Ctrl] [Ctrl]
o x t j
f or right arrow key b or left arrow key p or up arrow key n or down arrow key
MIPSPro Fortran Compilers, version 7.4, on sweetgum Portland Group and MPICH Fortran compilers on mimosa Intel Fortran Compilers(7.1, 8.0 and 9.0) on redwood GUI g77 on willow Suns Forte f90 on willow
Sweetgum
Mimosa
/usr/local/apps/pgi-5.2/linux86/5.2/bin/pgf77 filename.for
Redwood
Before using the Fortran Compiler on redwood, you must first load the appropriate Intel compiler module. Then, to compile:
Several versions/builds of Intel compilers are available on redwood. To compile, you must first pick which compiler version module you want to load, then load it. Before you can use the module command, you must source the correct setup file for your shell.
. /usr/share/modules/init/sh (if using ssh) (There should be a space between . and /opt) module module module module list (to see if any other versions of compiler modules are loaded) purge (to unload any other versions of compiler modules) list (to verify that other versions were successfully unloaded) avail (to see what versions of compiler modules are available to load)
These are the names of the modules and the compiler versions they correspond to:
Willow
To compile with f90, enter: f90 filename.for If there are no compilation errors this creates an executable file called a.out. To execute the Fortran program, enter: ./a.out.
g77 filename.for If there are no compilation errors this creates an executable file called a.out. To execute the Fortran program, enter: ./a.out.
www.mcsr.olemiss.edu SoftwareFortran
compiling commands create an executable file known as a.out unless specified otherwise. execute your program, type: ./a.out and press Enter.
To
MCSR Accounts
MCSR is pleased to provide free computer accounts on redwood, sweetgum, and mimosa for any student, faculty, or research staff member at any of Mississippi's 8 publicly funded universities.
If you can't access an existing account, please email assist@mcsr.olemiss.edu or call one of the consultants at 662-915-7206. You may request a password reset from the MCSR Online Account Manager.