Reading time: | 15 min |
Last updated: | 16 Jan 2024 |
Test status: |
Reading time: |
15 min |
Last updated: |
16 Jan 2024 |
Test status: |
This guide is intended to get you up and running with this tool quickly with the most common settings. For a thorough review of all options, refer to the official documentation.
GNU Fortran is the Fortran compiler front end and run-time libraries for GCC, the GNU Compiler Collection.
GFortran is available on all Linux distributions and can be installed using the package manager.
Follow the instructions below to install and use gfortran
on an Arm Linux distribution.
Confirm you are using an Arm machine by running:
uname -m
The output should be:
aarch64
If you see a different result, you are not using an Arm computer running 64-bit Linux.
The Linux package manager downloads the required files so there are no special instructions.
Use the apt
command to install software packages on any Debian based Linux distribution, including Ubuntu.
sudo apt update
sudo apt install gfortran -y
These Linux distributions use yum
as the package manager.
To install the most common development tools use the commands below. If the machine has sudo
you can use it.
sudo yum update -y
sudo yum install gcc-gfortran -y
If sudo
is not available become root and omit the sudo
.
sudo yum update -y
sudo yum install gcc-gfortran -y
Arm GNU Toolchain is open source and freely available for use. No licenses need to be set up for use.
To confirm the installation is complete run:
gfortran --version
To compile an example program, create a text file named hello.f90
with the contents below.
program hello
! This is a comment line; it is ignored by the compiler
print *, 'Hello, Arm world!'
end program hello
To compile the program use:
gfortran hello.f90 -o hello
To run the application use:
./hello
The program will print the string specified in the print statement.
How would you rate the overall quality of this tool quick-install guide?
What is the primary reason for your feedback ?
Thank you. We're grateful for your feedback on how to improve this tool quick-install guide.