https://www.googletagmanager.com/ns.html?id=GTM-M5WN4MT
Skip to main navigation   Skip to main content   Skip to footer

QuickStart Fortran

Fortran is a general-purpose, compiled imperative programming language that is especially suited to numeric computation and scientific computing.

Case: You have old FORTRAN code that you need to test whether it compiles and runs on the HPC.

VPN: connect to vpn-groups.kennesaw.edu

SSH: ssh [email protected]

There are two different FORTRAN compilers on the KSU HPC; GNU FORTRAN and Intel FORTRAN.

Note: It is acceptable to perform the compilation on the login node

Note: If your executable is resource intensive or long-running, you will need to run your code from within an interact session or a qsub reservation.

GNU FORTRAN is built on the GNU C Compiler architecture and accepts all of the same options as the gcc compiler.  There is one version built into the operating system and several others that depend on environment modules.  

Built-in GNU FORTRAN
Compile: $ gfortran -o exec_name your_code.f90
Execute: $ ./exec_name

GNU FORTRAN Module Example
(omitting -o option, executable will be named a.out):
Load Module: $ module load gcc/10.2.0
Compile: $ gfortran your_code.f90
Execute: $ ./a.out


Intel FORTRAN is part of the Intel oneAPI Environment. You will need to load environment modules to compile and run the final executable.

Intel FORTRAN Module Example
Load Module: $ module load oneAPI-compiler
Compile: $ ifort -o exec_name your_code.f90
Execute: $ ./exec_name


For more on Fortran, visit Fortran Programming Language.

Contact Information

Kennesaw Campus
1000 Chastain Road
Kennesaw, GA 30144

Marietta Campus
1100 South Marietta Pkwy
Marietta, GA 30060

Phone
470-KSU-INFO
(470-578-4636)

©
Assistive Options

Top of page


Assistive Options

Open the original version of this page.

UsableNet Assistive is a UsableNet product. UsableNet Assistive Main Page.