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

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 <location> Install to the given directory.
      Use this option if you do not have sudo rights to install to /opt/arm or another central location.
      -s, --save-packages-to <location> Save packages to given directory.
      -f, --force Force an install attempt to a non empty directory.
      --list-available-microarchitectures List the supported microarchitectures.
      --only-install-microarchitectures=<arg>,<arg> Install the packages for a subset of the supported microarchitectures.
      Supported microarchitectures include:
      • generic: For a generic Armv8-A implementation.
      • generic-sve: For a generic, SVE-enabled Armv8-A implementation.
      • Target-specific: To see the CPU targets supported, see the supported arguments for the -mcpu= compiler option in the Arm Fortran Compiler or Arm C/C++ Compiler reference guide.

      Note: The generic implementation is always installed. native is supported for the -mcpu option, but is not a supported argument for --only-install-microarchitectures. To specify multiple microarchitectures, pass each microarchitecture as a comma-separated argument.
      -h, --help Display this table in the form of a help message in the terminal.

      Note: For the --list-available-microarchitectures and --only-install-microarchitectures=<arg> options, there is a delay between running the script and receiving a response.

      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) Next Steps: Enable command line completion

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 bash users to complete the armflang|armclang|armclang++ commands, and for options it allows users to complete the option name, and also any arguments it supports. Where an option is already complete, and it supports arguments, users can press the Tab key to see a list of the supported 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 your 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.

  • 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. If 'bash-completion' is installed, users can load the 'arm-linux-compiler' environment module and use command line completion with the commands and options immediately.

  • 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-linux-compiler environment module is loaded, System Administrators might also want to modify the arm-linux-compiler 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>-<distro>-<arch>.tar
    cd arm-forge-<version>-<distro>-<arch>
    ./textinstall.sh
    Note: Replace <version>, <distro>, and <arch> with the required version, OS distribution, and architecture. For example, the tarball package for the 20.1 version, Redhat 7.4 OS, and Armv8-A (AArch64) architecture is:
    arm-forge-20.1-Redhat-7.4-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.

Configuration

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

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

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

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

Environment Configuration

Environment Modules 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 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.
  • System Administrators: Either:
    • Create an Environment Module for Arm Forge and make it available to users. An example 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 <architecture>/<linux_variant>/<linux_version>/arm-linux-compiler/<version>

        For example:

        module load Generic-AArch64/SUSE/12/arm-linux-compiler/20.2
      2. Arm Performance Libraries:

        module load <architecture>/<linux_variant>/<linux_version>/<compiler_version>/armpl/<armpl_version>

        For example (with Arm C/C++/Fortran Compiler):

        module load Generic-AArch64/SUSE/12/arm-linux-compiler-20.2/armpl/20.2.0

        To use the GCC compiler instead of the Arm C/C++/Fortran Compiler, instead use:

        module load Generic-AArch64/SUSE/12/gcc-9.3.0/armpl/20.2.0
      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, for the Arm Compiler for Linux  bin directory:
      echo $PATH 
      /opt/arm/arm-linux-compiler-20.2_Generic-AArch64_SUSE-12_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-20.2_Generic-AArch64_SUSE-12_aarch64-linux/bin/armclang 

    For more information about the environment variables and modules provided with Arm's suite of HPC tools, see our Environment variables reference for Arm 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 multiple modules using the module unload <module> command, as appropriate.

    • By default, Arm Compiler for Linux modulefiles are configured to find the Arm Compiler for Linux binaries at a location that is relative to the modulefiles. If you  move or copy the modulefiles to a new location, the installed binaries are no longer at the same relative location to the new modulefile location. When trying to locate binaries, the broken relative links between the new modulefile location and the location of the installed binaries causes the new modulefiles to fail. For a workaround to use moved or copied 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 Arm C/C++ Compiler

See Get started with Arm C/C++ Compiler which shows how to compile and generate executables that can run on any 64-bit Armv8-A architecture.


Get started with Arm Fortran Compiler

See Get started with Arm Fortran Compiler which shows how to install and compile Fortran code using different optimizations levels, and generate an executable.


Get started with Arm Performance Libraries

See Get Started with Arm Performance Libraries which describes how to:

  • Dynamically modify your user environment on Linux using environment modules
  • Compile and run the example codes provided in the installation
  • Select between the single-threaded, multi-threaded, 32-bit, and 64-bit variant of the libraries

Get Started with Arm Forge

See the Arm Forge User Guide to learn how to start, control, and tailor the debugger (Arm DDT), profiler (Arm MAP), and performance analyzer (Arm Performance Reports) to analyze your code.


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 GNU GCC component, GNU 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.