Introduction

Arm Allinea Studio is composed of two packages: Arm Compiler for Linux and Arm Forge.

This tutorial describes how to download, install, setup your environment, and get started with the Arm Allinea Studio tools.

For reference:

  • The Arm Compiler for Linux package includes the Arm C/C++ Compiler, Arm Fortran Compiler, and Arm Performance Libraries.
  • The Arm Forge package includes Arm DDT, Arm MAP, and Arm Performance Reports.

Note: Arm Compiler for Linux runs on 64-bit Arm hardware, it is not a cross-compiler. For more information about compatibility, see Supported Platforms.



Download

Download the Arm Allinea Studio packages from the Downloads page.


Install

To have all of the Arm Allinea Studio tools available to use, you must install both the Arm Compiler for Linux and Arm Forge packages.

Install Arm Compiler for Linux

Follow these instructions to install the Arm Compiler for Linux package.

Before you begin

If any of the following tools are not already installed by your Linux distribution, you must install them before installing Arm Compiler for Linux:

  • Python (version 2.7 or later)
  • C Libraries:
    • SUSE and RHEL: glibc-devel
    • Ubuntu:                 libc6-dev

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

Procedure

  1. Extract the downloaded package:

    tar -xvf <package_name>.tar

    Replace <package_name> with the full name of the downloaded package.

  2. Change to the extracted package directory:

    cd <package_name>
  3. Install the package:

    • To install the package using the default options (requires superuser permissions), run:

      sudo ./<package_name>.sh
      The packages are installed to /opt/arm/<package_name>.

    • To install the package using a set of options, run:

      sudo ./<package_name>.sh <options>
      Note: sudo permissions are not required if you install the package to a location where you have write permissions using --install-to (see table below).

      Where <options> can be one or more of:

      Option
      Description
      -a, --accept Automatically accept the EULA
      (the EULA still displays).
      -l, --list-packages List the installer packages
      -i, --install-to <install_location> Install to the given directory, <install_location>.
      Use this option if you do not have sudo rights to install to /opt/arm or another central location.
      -s, --save-packages-to <install_location> Extracts the .deb or .rpm files to the given directory, <install_location>.
      -f, --force Force an install attempt to a non-empty directory.
      -h, --help Display this table in the form of a help message in the terminal.

      The packages are installed to <install_dir>/<package_name>, where <install_dir> defaults to /opt/arm if not explicitly provided using the --install-to option.

  4. The installer displays the EULA and prompts you to agree to the terms. To agree, type 'yes' at the prompt.

Note: Arm recommends that you rebuild your MPI implementation (Open MPI, MVAPICH, MPICH) after each installation of a new version of Arm Compiler for Linux. This ensures that the Fortran interface incorporates any changes to the armflang module format, and that the correct run-time libraries are used.

(Optional) Enable command line completion

The following information only applies if: a) a users' system does not have the 'bash-autocomplete' package installed, or b) users do not use bash shells, but want to use the command line complete functionality that the bash-autocomplete.sh script allows.

If 'bash-completion' is installed, you can load the 'arm<major-version>/<package-version>' environment module and use the command line completion tool immediately.

Arm Compiler for Linux versions 20.2+ include a tool that allows bash terminal users to autocomplete their command line using the Tab key on their keyboard. For compile commands, it allows users to press Tab to auto-complete the armflang|armclang|armclang++ commands, supported compiler options, and option arguments. For example, to list the supported arguments for -ffp-contract= with armclang, users can type the following command line into your terminal and press Tab where indicated by [TAB]:

armclang -ffp-contract=[TAB]

The arguments supported by -ffp-contract=return:

fast off on

Auto-completion relies on the support in a users' shell, and on the completion functions for the compiler (which make use of the  <install-dir>/share/utils/bash-autocomplete.sh file in the Arm Compiler for Linux package). If, after you have loaded the compiler modulefile, the command line completion is not working, consider the following points:  

  • To enable bash users to use this functionality, System Administrators should ensure that the 'bash-completion' package is installed and available for all users to use.

  • To enable users of other shell types to use this functionality, System Administrators must rewrite the _clang() function defined in <install-dir>/share/utils/bash-autocomplete.sh using an appropriate syntax for your users' shell, then register the _clang() function with the completion system for that shell. To automatically register autocompletion scripts when the 'arm<major-version>/<package-version>' environment module is loaded, System Administrators might also want to modify the 'arm<major-version>/<package-version>' module.

Install Arm Forge

These steps describe the Linux text-mode install for Arm Forge, however a graphical installation is also available. For the full instructions on how to install Arm Forge on your Linux platform, see the installation instructions in the Arm Forge User Guide.

Procedure

  1. Untar the Arm Forge installation package and run the textinstall.sh script by using these commands:

    tar xf arm-forge-<version>-linux-aarch64.tar
        cd arm-forge-<version>-linux-aarch64
        ./textinstall.sh
    Note: Replace <version> with the required version. For example, the AArch64 Linux tarball package for the 21.0 version is:
    arm-forge-21.0-linux-aarch64.tar
  2. When you are prompted, press Return to read the license. When prompted, agree to the license terms by typing a, and pressing Enter. Next, when prompted, enter the path of the Arm Forge installation directory. The directory must be accessible on all the nodes in your cluster.

Install Arm Licence Server

If you will use Arm Allinea Studio with a floating license, you must also install Arm Licence Server to serve your floating license.

You do not need to install Arm Licence Server if you have an evaluation or named user licence.

Procedure

To install Arm Licence Server:

  1. Untar the Arm Forge installation package and run the textinstall.sh script by using these commands:
    tar xf arm-licence-server-linux-aarch64.tar
    cd arm-licence-server-linux-aarhc64
    ./textinstall.sh
    Replace with the four digit version number of your installation package using the format xx.x for major product releases, and the format xx.x.x for support releases. For example, the AArch64 Linux tarball package for the 21.0 version is:
    arm-forge-21.0-linux-aarch64.tar
  2. When you are prompted, press Return to read the license, and enter the path of the installation directory.

A full description of how to install, setup, and use Arm Licence Server is provided in the Arm Licence Server User Guide.



Set up your license

Use the following instructions to add your license to your system installations:

If you are using the Arm Allinea Studio tools on a cloud compute provider:

  • For a named user license, follow the same steps in Add a named user license
  • For a floating license, you must:
    1. Install Arm Licence Server on your host machine, or another suitable license server location.
      You must ensure that the license server can be contacted by your cloud session instance.
    2. Contact Arm Support and tell them the MAC address of your license server. Arm Support will provide you with two license files: a server license file, and a client license file.
    3. Add your server license file to your Arm Licence Server installation. For more information, see the Add a new license topic in the Arm Licence Server User Guide.
    4. Edit your client license file and add the 'hostname' where you have installed Arm Licence Server.
    5. In your cloud instance, navigate to where you installed Arm Compiler for Linux and create a directory called licenses. For a default installation, Arm Compiler for Linux is installed in the /opt/arm directory.
    6. Copy your client license file to /<install-dir>/licenses.
    7. (Optional) Arm Forge searches for individual licenses in its installation directory.

      If you have a separate floating license for Arm Forge, you will need to copy that license to the /licenses/ directory in the Arm Forge installation location.

      If you do not have a separate license file for Arm Forge, to enable the Arm Allinea Studio client license to be found, you must set the ARM_LICENSE_DIR environment variable to /<install-dir>/licenses.
      export ARM_LICENSE_DIR=/<install-dir>/licenses
    8. To enable Arm Licence Server to detect the new floating license, restart Arm Licence Server.

To learn more about how to install and use Arm Licence Server, see the Arm Licence Server User Guide.


Configuration

There are two types of configuration you might want to complete before using the Arm Allinea Studio tools:

  • Environment configuration: Dynamically modify your environment on Linux to easily use the tools.

  • Tool configuration: Change some of the default functionality of the tools using configuration files.

For more information, see the Environment configuration and Tool configuration sections below.

Environment Configuration

Environment Modules, and the Lmod Environment Module, systems enable you to dynamically modify your user environment on Linux. They are especially useful in managing different versions of software packages. Use the following instructions to configure your Linux environment to use the Arm Allinea Studio tools.

Before you begin

  • Ensure your system has Environment Modules or the Lmod Environment Modules system installed.
    To install Environment Modules on Linux, CentOS, and RHEL distributions, install the environment-modules package:
    sudo yum install environment-modules
    To install Environment Modules on Ubuntu or other systems use apt-get:
    sudo apt-get install environment-modules
    Note: You might need to open a new shell before attempting to load Environment Modules.
    To learn how to install the Lmod Environment Modules system, see the Lmod Environment Modules documentation.
  • System Administrators: Either:
    • Create an environment module for Arm Forge and make it available to users. An example Environment Modules-type environment module for Arm Forge is:
      #%Module
      proc ModulesHelp { } {
              puts stderr "Sets up the environment to use Arm Forge "
      }
      module-whatis "Sets up the environment to use Arm Forge "
      prepend-path PATH /<install-dir>/forge/<version>/bin</install-dir>
      To enable the module to be used by all users, add the path to it to the /usr/share/Modules/init/.modulespath file used by the cluster machines. The .modulespath file is plain text, and contains the directory to add to MODULEPATH.

    • Ensure that <install>/bin is added to PATH for each user, by default.

    Procedure

    Note:
    This procedure assumes that you have installed Arm Compiler for Linux to the default location /opt/arm. If you have installed the packages to a different location, replace /opt/arm with that location in the following steps:

    1. To see which environment modules are available, run:

      module avail

      Note: If you do not see any modules for the Arm Allinea Studio tools, add the module for the missing tool using module add </path/to/install-dir>, or configure the MODULEPATH environment variable to include the installation directory:

      export MODULEPATH=$MODULEPATH:</path/to/modulefile>
      For a default Arm Compiler for Linux installation, </path/to/modulefile> is /opt/arm/modulefiles. The Arm Forge installation does not install modulefiles by default. See the Before you begin section for details about how to create one or add the executable to your PATH.
    2. Load the environment modules for the Arm Allinea Studio tools:

      1. Arm C/C++/Fortran Compiler:

        module load arm<major-version>/<package-version>

        Where '<package-version>' is equivalent to '<major-version>.<minor-version>{.<patch-version>}'
        For example:

        module load arm21/21.0
      2. If you are using Arm Performance Libraries with Arm C/C++/Fortran Compiler, you do not need to load the Arm Performance Libraries modulefile. Instead, when you compile your code, include the '-armpl' and either the '-mcpu' or '-march' options and the compiler automatically links to the appropriate version of Arm Performance Libraries for your system.

        Note: If you are using Arm Performance Libraries with GCC, you must load both the GCC and the Arm Performance Libraries modulefiles:
        module load gnu10/10.2.0
        module load armpl-AArch64{-SVE}/21.0.0 

        The 'armpl-AArch64{-SVE}/<package-version>' will only become available to load after you load the modulefile for the packaged GCC compiler modulefile, 'gnu<major-version>/<package-version>'. '+SVE' should be included to load the SVE variant of Arm Performance Libraries.

      3. Arm Forge (for workstation or remote interactive sessions):
        module load <forge-module>
        Note: Check with your system administrator what the Arm Forge environment module is called for your system. If there is are environment modules, they should have added the executables to your PATH. For more information, see the Before you begin section.
    3. Check your environment by examining the PATH variable. It should contain the appropriate bin directories for the tools loaded in the previous step. For example, examining the PATH variable for an Arm Compiler for Linux installation on a SLES 15 system gives:
      echo $PATH 
      /opt/arm/arm-linux-compiler-21.0_Generic-AArch64_SUSE-15_aarch64-linux/bin:</path/to...
    4. You can also use the which command to check that, for example, the Arm C/C++ Compiler armclang command is available:
      which armclang 
      /opt/arm/arm-linux-compiler-21.0_Generic-AArch64_SUSE-15_aarch64-linux/bin/armclang 

    For more information about the environment variables and modules provided with Arm's suite of Server and HPC tools, see our Environment variables reference for Arm Server and HPC tools topic.

    Notes:

    • Ensure that you only load the appropriate module for the package you are using. For example, when compiling and using Arm Performance Libraries, do not load both the GCC and Arm C/C++/Fortran Compiler modules. Similarly, do not load multiple modules corresponding to multiple versions of the same packages. In these instances, the most recently loaded module will take priority and will be the environment variables that remain set.

    • If in doubt as to which environment modules are loaded, use the module list command and look for multiple modules loaded for the same package or purpose. Unload modules as appropriate.

    • By default, Arm Compiler for Linux modulefiles are configured to find dependent Arm Compiler for Linux modulefiles at a location that is relative to the installed '/modulefiles/' directory. If you move or copy the '/modulefiles/' directory to a new location, the modulefile dependency directories ('/moduledeps/' and '/module_globals/'), must also be moved to maintain their same relative position (to  '/modulefiles/'). When trying to locate binaries, broken relative links between modulefile locations will cause the modulefiles to fail. To learn more about how to move Arm Compiler for Linux modulefiles, see the Error moving Arm Compiler for Linux modulefiles section in the Arm Fortran Compiler or Arm C/C++ Compiler Developer and Reference guides.

(Optional) Tool configuration: Arm Compiler for Linux

Note: This is an optional step. Arm Compiler for Linux does not require you to configure the tools. However, if you want to specify a set of default options to all invocations of the compiler, this step describes how to configure the tools.

You can configure Arm Compiler for Linux using a configuration file.

A configuration file allows a set of compiler options to be added to all invocations of the compiler. The configuration file can be copied or modified to suit your needs.

A template configuration file example.cfg can be found in <install-directory>/share/config. The template also includes more detailed information about the syntax, order of precedence, language-specific options, linker-specific options, and some example options.

How to use the configuration file

The configuration file can be manually invoked using the --config option. For example:

[armclang|armclang++|armflang] --config /path/to/this/<filename>.cfg <option>

For a more permanent solution, Arm Compiler for Linux supports three environment variables, which can be set to the path of a configuration file. The configuration files provided are used automatically, for each of armclang, armclang++, or armflang. All three variables can be set to the same configuration file. Alternatively, to set language-specific options, create language-specific files:

  • For armclang:      ARM_COMPILER_CC_CONFIG
  • For armclang++: ARM_COMPILER_CXX_CONFIG
  • For armflang:      ARM_COMPILER_FC_CONFIG

To set these environment variables, open your Arm Compiler for Linux environment modulefile for editing, and add:

  • For armclang:
    setenv    ARM_COMPILER_CC_CONFIG     /path/to/c_options.cfg
  • For armclang++:
    setenv    ARM_COMPILER_CXX_CONFIG    /path/to/c_options.cfg
  • For armflang:
    setenv    ARM_COMPILER_FC_CONFIG     /path/to/fortran_options.cfg

replacing /path/to/ with the path for your system.

For more information, see the header text in the example.cfg template file.


(Optional) Tool Configuration: Arm Forge

To find out how to configure your environment for the Arm Forge components, for example, to integrate with schedulers or set site-wide configuration settings, see the Configuration section in the Arm Forge User Guide.


Get started with the tools

Learn how to compile, link, debug, profile, and analyze, your applications with the Arm Allinea Studio tools:

Get started with Arm Fortran Compiler  - Learn how to compile your Fortran code
Get started with Arm C/C++ Compiler - Learn how to compiler your C/C++ code
Get started with Arm Performance Libraries - Learn how to select the optimal library for your system
Get started with Arm DDT - Learn how to debug your code
Get started with Arm MAP - Learn how to profile your code
Get started with Arm Performance Reports - Learn how to analyze your application performance

Uninstall

Describes how to uninstall Arm Compiler for Linux and the Arm Forge packages.

Arm Compiler for Linux

For convenience, the Arm Compiler for Linux package includes a script that can be used to uninstall it, uninstall.sh. This script is located in:

<install-dir>/arm-compiler-for-linux-<release>/uninstall.sh

Run this script to uninstall all the packages supplied as part of this suite.

This script attempts to uninstall all the components supplied as part of Arm Compiler for Linux. However, if other packages outside of this product
depend on the GCC component, GCC will not be uninstalled.

Notes:

For versions of Arm Compiler for Linux 19.3 or earlier:

  • Components depended on by other packages must be manually uninstalled.
  • If you use the --install-to option provided by the installer,you will need to uninstall the packages by manually removing their directories.

If you require support when uninstalling any version of Arm Compiler for Linux, contact support-hpc-sw@arm.com.

Arm Forge

To uninstall Arm Forge, delete the installation directory.


Next steps

To find out more information about the Arm Allinea Studio tools, and to find documentation and other resources, see the component web pages:

To learn more about how to use Arm Allinea Studio to port your applications to Arm-based, or Arm SVE-based, hardware, see our porting guides: