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>/suites/arm-compiler-for-linux/<version>

        For example:

        module load Generic-AArch64/SUSE/12/suites/arm-compiler-for-linux/20.0
      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.0/armpl/20.0.0

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

        module load Generic-AArch64/SUSE/12/gcc-9.2.0/armpl/20.0.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-compiler-for-linux-20.0_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-compiler-for-linux-20.0_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 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.

(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