About this Install Guide

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.

Arm Compiler for Linux (ACfL) is a suite of tools containing Arm C/C++ Compiler (armclang), Arm Fortran Compiler (armflang), and Arm Performance Libraries (ArmPL). It is tailored to the development of High Performance Computing (HPC) applications.

Arm Compiler for Linux runs on 64-bit Arm machines, it is not a cross-compiler.

You do not require any additional license to use Arm Compiler for Linux.

Arm-based hardware

Arm Compiler for Linux supports all 64-bit Arm based server-class hardware .

Ensure you are using a supported 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.

Install pre-requisites

If any of the following tools are not already installed by your Linux distribution, you must install them before installing Arm Compiler for Linux. These packages can be installed with the appropriate package manager for your OS:

  • SLES: awk environment-modules glibc-devel gzip python3 tar
  • RHEL: environment-modules glibc-devel procps python3
  • Amazon Linux: environment-modules glibc-devel gzip procps python3 tar
  • Ubuntu: environment-modules libc6-dev python3

Note: The minimum supported version for Python is version 3.6.

You must have at least 2 GB of free hard disk space to both download and unpack the Arm Compiler for Linux package. You must also have an additional 6 GB of free space to install the package.

For example:

    

        
        
            sudo apt update
sudo apt install -y python-is-python3 libc6-dev
        
    

You are now ready to install ACfL manually or with Spack .

Download and install manually

Download with wget

Download releases from the command line using wget. Install wget if not present.

    

        
        
            sudo apt install wget
        
    

Fetch the appropriate installer

ACfL installation packages are available to download from Arm Developer . Individual Arm Performance Libraries (ArmPL) packages are also available.

Fetch the ACfL installers:

Ubuntu Linux:

    

        
        
            wget  https://developer.arm.com/-/media/Files/downloads/hpc/arm-compiler-for-linux/23-10/arm-compiler-for-linux_23.10_Ubuntu-22.04_aarch64.tar
        
    

Red Hat Linux:

    

        
        
            wget https://developer.arm.com/-/media/Files/downloads/hpc/arm-compiler-for-linux/23-10/arm-compiler-for-linux_23.10_RHEL-8_aarch64.tar
        
    

Install

To install the Arm Compiler for Linux package on your 64-bit Linux Arm machine extract the package and run the installation script.

Each command sequence includes accepting the license agreement to automate the installation and installing the modules software.

Ubuntu Linux:

    

        
        
            sudo -E apt-get -y install environment-modules python3 libc6-dev
tar -xvf arm-compiler-for-linux_23.10_Ubuntu-22.04_aarch64.tar
cd ./arm-compiler-for-linux_23.10_Ubuntu-22.04
sudo ./arm-compiler-for-linux_23.10_Ubuntu-22.04.sh --accept
        
    

Red Hat Linux:

    

        
        
            sudo yum -y install environment-modules python3 glibc-devel
tar -xvf arm-compiler-for-linux_23.10_RHEL-8_aarch64.tar
cd arm-compiler-for-linux_23.10_RHEL-8
sudo ./arm-compiler-for-linux_23.10_RHEL-8.sh --accept
        
    

Set up environment

Arm Compiler for Linux uses environment modules to dynamically modify your user environment. Refer to the Environment Modules documentation for more information.

Set up the environment, for example, in your .bashrc and add module files.

Ubuntu Linux:

    

        
        
            echo "source /usr/share/modules/init/bash" >> ~/.bashrc
echo "module use /opt/arm/modulefiles" >> ~/.bashrc
source ~/.bashrc
        
    

Red Hat Linux:

    

        
        
            echo "source /usr/share/Modules/init/bash" >> ~/.bashrc
echo "module use /opt/arm/modulefiles" >> ~/.bashrc
source ~/.bashrc
        
    

To list available modules:

    

        
        
            module avail
        
    

To configure Arm Compiler for Linux:

    

        
        
            module load acfl/23.10
        
    

To configure GCC:

    

        
        
            module load gnu/12.2.0
        
    

ACfL is now ready to use .

Download and install with Spack

Arm Compiler for Linux is available with the Spack package manager.

See the Arm Compiler for Linux and Arm PL now available in Spack blog for full details.

Setup Spack

Clone the Spack repostitory and add bin directory to the path:

    

        
        
            git clone -c feature.manyFiles=true https://github.com/spack/spack.git
export PATH=/home/ubuntu/spack/bin:$PATH
        
    

Set up shell support:

    

        
        
            . /home/ubuntu/spack/share/spack/setup-env.sh
        
    

Spack is now ready to use.

Install ACfL

Download and install Arm Compiler for Linux with:

    

        
        
            spack install acfl
        
    

If you wish to install just the Arm Performance Libraries, use:

    

        
        
            spack install armpl-gcc
        
    

Setup environment

Use the commands below to set up the environment:

    

        
        
            spack load acfl
spack compiler find
        
    

ACfL is now ready to use .

Get started with Arm C/C++ compiler

To get started with the Arm C/C++ Compiler and compile a simple application follow the steps below.

Check that the correct compiler version is being used:

    

        
        
            armclang --version
        
    

Create a text file named hello.c with the contents below.

    

        
        
            #include <stdio.h>

int main()
{
    printf("Hello, C World!\n");
    return 0;
}
        
    

Build the application with:

    

        
        
            armclang hello.c -o hello
        
    

Run the application with:

    

        
        
            ./hello
        
    

The program will output the string specified.

    

        
        Hello, C World!

        
    

Get started with Arm Fortran compiler

To get started with the Arm Fortran Compiler and compile a simple application follow the steps below.

Check that the correct compiler version is being used:

    

        
        
            armflang --version
        
    

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, Fortran World!'
end program hello
        
    

Build the application with:

    

        
        
            armflang hello.f90 -o hello
        
    

Run the application with:

    

        
        
            ./hello
        
    

The program will output the string specified.

    

        
        Hello, Fortran World!

        
    

Get started with Arm Performance Libraries

To get started with the Arm Performance Libraries and learn how to select the optimal library for your system, follow the Get started with Arm Performance Libraries guide.


Feedback

How would you rate the overall quality of this tool quick-install guide?