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 Arm C/C++/Fortran Compiler and Arm Performance Libraries.

Installing Environment Modules

To install Environment Modules on Scientific 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 may need to open a new shell before attempting to load Environment Modules.

Loading Environment Modules

Note: This assumes that you have installed to the default location /opt/arm. If you have used the --install-to option to choose a difference location, replace /opt/arm with that location in the following steps:

  1. To see which Environment Modules are available, run:

    module avail

    Note: You might need to configure the MODULEPATH environment variable to include the installation directory:

    export MODULEPATH=$MODULEPATH:/opt/arm/modulefiles/
  2. Load the Arm Compiler for HPC module:

    module load <architecture>/<linux_variant>/<linux_version>/suites/arm-compiler-for-hpc/<version>

    For example:

    module load Generic-AArch64/SUSE/12/suites/arm-compiler-for-hpc/18.4

    Tip: Add the module load command to your .profile to run it automatically every time you log in.

  3. Load the appropriate Arm Performance Library module for the processors in your system, and for the compiler you are using:

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

    For example:

    module load Generic-AArch64/SUSE/12/arm-hpc-compiler-18.4/armpl/18.4

    If you prefer to use the gcc compiler, ensure you load the correct module:

    module load Generic-AArch64/SUSE/12/gcc-7.1.0/armpl/18.4
  4. Check your environment by examining the PATH variable. It should contain the appropriate bin directory from /opt/arm:

    echo $PATH 
  5. 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 HPC tools, see our Environment variables reference topic.


Should you experience a problem when configuring your environment for Arm Compiler for HPC, consider the following points:

  • When loading environment modules, 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 Compiler modules:

    module load ThunderX/RHEL/7.2/gcc-7.1.0/armpl/18.4
    module load ThunderX/RHEL/7.2/arm-hpc-compiler-18.1/armpl/18.4

    In this instance, the most recently loaded module will take 'priority' and will be the environment variables that remain set.

  • Similarly, do not load multiple modules corresponding to multiple versions of the same package, for example:

    module load Generic-AArch64/SUSE/12/suites/arm-compiler-for-hpc/18.2
    module load Generic-AArch64/SUSE/12/suites/arm-compiler-for-hpc/18.4

    Again, 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.

Related information

Now you have installed Arm Compiler for HPC, see our getting started tutorials: