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:
      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.


    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 
    4. You can also use the which command to check that, for example, the Arm C/C++ Compiler armclang command is available:
      which 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.


    • 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.

Previous Next