Environment variables for Arm Server and HPC tools

This topic describes the environment variables available through the Arm-provided environment modules.

Note: This topic describes the variables available with Arm Compiler for Linux and Arm Instruction Emulator. For information about the environment variables available in Arm Forge, see the Arm DDT, Arm MAP, and Arm Performance Reports environment variables.

To configure your environment to use a tool from the Arm suite of Linux tools, you must load the appropriate modulefile for your platform. You might also want to include the environment variables in Makefiles, or possibly to customize these environment variables for individual sessions.

Administrators need to know which modulefiles are made available by installation of an Arm Linux tool, in order to enable them to be made visible and available for users to use. Installation instructions for each tool within the Arm suite of Linux tools are available here.

What are environment variables and modules?

An environment variable is a dynamic object on a computer that stores a value, which in turn can be referenced by one or more software programs. They form part of the environment in which a process runs. For example, a running process may query an environment variable to request the directory structure to find or store information.

Users can set, prepend or append an environment variable:

  • setenv <environment-variable> <value> - sets environment-variable to a value
  • prepend-path <environment-variable> <value> - prepends a value to an environment-variable, such that it becomes: value/environment-variable.
  • append-path <environment-variable> <value> - appends a value to an environment -variable, such that it becomes: environment-variable/value.

Environment Modules is an open-source package that helps users manage and modify their environment during a session, through modulefiles. A modulefile contains the necessary information to configure a shell session for an application, typically by containing instructions to alter or set environment variables. Modulefiles are interpreted using the module command. Common interpretations involve loading, unloading or switching using load <modulefile>, unload <modulefile> and switch <modulefile1> <modulefile2>, respectively. For example, to load the Arm Compiler for Linux module on a SUSE 12 installation use:

module load <install_dir>/Generic-AArch64/SUSE/12/arm-linux-compiler/20.3

Using environment variables in Makefiles

Arm makes environment variables available to establish best practices and help users write robust scripts.

It is good practice to use these Arm-provided environment variables in Makefiles rather than setting absolute paths that may change in future releases, for example:

# Location of ARMPL installation

Note for Administrators

Administrators should ensure that the Arm modulefiles receive the correct file permissions, enabling cluster users to load the appropriate module for their session, or to include them in their job submission scripts. You should also notify cluster users of the necessary Arm module to load in order to use an Arm tool.

Environment variables in Arm Compiler for Linux and Arm Instruction Emulator

The environment variables available through the Arm-provided environment modules are listed below.
The variables are separated into two groups: (1) variables that are useful to include in Makefiles, and (2) variables that are available for customization.

The following generalizations are used for denoting tool names, numbers and paths:

  • <NUMBER> is the tool build number.
  • $PREFIX is the path to the installation location of the given component.

Useful environment variables to include in a Makefile

The following table summarizes useful Arm-provided environment variables to include in a Makefile.

Environment Variable Description Action Value
<MODULE_BASE_NAME>_DIR Tool installation directory. setenv $PREFIX
<MODULE_BASE_NAME>_LIBRARIES Tool libraries directory. append-path $PREFIX/lib$PREFIX/lib
<MODULE_BASE_NAME>_INCLUDES The /includes directory path. setenv $PREFIX/include
Directory for the parallel library header files.
Directory for the 64-bit integer library header files.
Directory for the 64-bit parallel library header files.
<MODULE_BASE_NAME>_BUILD <NUMBER> Tool module version. setenv N/A

Note: Arm Performance Libraries uses three further environment variables (final table entry) to locate specific parallel libraries.

Utility environment variables

The following table summarizes the additional environment variables which can be useful to set for Arm's Linux tools.

Environment Variable Description Action Value
PATH Default tool path.
prepend-path $PREFIX/bin
CPATH Environment variable some compilers use
to set their /include directory.
prepend-path $PREFIX/include
LD_LIBRARY_PATH Dynamic libraries. prepend-path $PREFIX/lib

Interpretation of an example modulefile

The command module show <modulefile> will interpret and display the environment variable information contained in that modulefile.

For example, to show which environment variables are set by the Arm Compiler for Linux modulefile, use:

module show <modulename>
For example, for a SUSE 12 installation of Arm Compiler for Linux:
module show Generic-AArch64/SUSE/12/arm-linux-compiler/20.3

the output is:

module load      <install_dir>/modulefiles/Generic-AArch64/SUSE/12/gcc/9.3.0 setenv           ARM_LINUX_COMPILER_DIR /<install_dir>/arm-linux-compiler-20.3_Generic-AArch64_SUSE-12_aarch64-linux prepend-path     PATH /<install_dir>/arm-linux-compiler-20.3_Generic-AArch64_SUSE-12_aarch64-linux/bin setenv           ARM_LINUX_COMPILER_BUILD <build_number> setenv           ARM_LINUX_COMPILER_INCLUDES /<install_dir>/arm-linux-compiler-20.3_Generic-AArch64_SUSE-12_aarch64-linux/includes prepend-path     CPATH /<install_dir>/arm-linux-compiler-20.3_Generic-AArch64_SUSE-12_aarch64-linux/include prepend-path     LD_LIBRARY_PATH /<install_dir>/arm-linux-compiler-20.3_Generic-AArch64_SUSE-12_aarch64-linux/lib
prepend-path LIBRARY_PATH /<install_dir>/arm-linux-compiler-20.3_Generic-AArch64_SUSE-12_aarch64-linux/lib append-path      ARM_LINUX_COMPILER_LIBRARIES /<install_dir>/arm-linux-compiler-20.3_Generic-AArch64_SUSE-12_aarch64-linux/lib prepend-path     MANPATH /<install_dir>/arm-linux-compiler-20.3_Generic-AArch64_SUSE-12_aarch64-linux/share/man
append-path      ARM_HPC_COMPILER_LICENSE_SEARCH_PATH /<install_dir/licences:/opt/arm/licenses
append-path      LD_LIBRARY_PATH /<install_dir>/arm-linux-compiler-20.3_Generic-AArch64_SUSE-12_aarch64-linux/lib/clang/9.0.1/armpl_links/lib module-whatis    arm-linux-compiler


 Where, for example:

  • The environment variable ARM_LINUX_COMPILER_DIR is set to (setenv) /<install_dir>/arm-linux-compiler-20.3_Generic-AArch64_SUSE-12_aarch64-linux.
  • The path /<install_dir>/arm-linux-compiler-20.3_Generic-AArch64_SUSE-12_aarch64-linux/bin is prepended (prepend-path) to the environment variable PATH, to become /<install_dir>/arm-linux-compiler-20.3_Generic-AArch64_SUSE-12_aarch64-linux/bin/PATH.
  • The path /<install_dir>/arm-linux-compiler-20.3_Generic-AArch64_SUSE-12_aarch64-linux/lib is appended (append-path) to the environment variable ARM_LINUX_COMPILER_LIBRARIES, to become ARM_LINUX_COMPILER_LIBRARIES/<install_dir>/arm-linux-compiler-20.3_Generic-AArch64_SUSE-12_aarch64-linux/lib.