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 theenvironment-modules
package:sudo yum install environment-modules
To install Environment Modules on Ubuntu or other systems useapt-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
To enable the module to be used by all users, add the path to it to the" } module-whatis "Sets up the environment to use Arm Forge " prepend-path PATH /<install-dir>/forge/<version>/bin</install-dir> /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 toPATH
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:- 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 theMODULEPATH
environment variable to include the installation directory:export MODULEPATH=$MODULEPATH:</path/to/modulefile>
For a default Arm Compiler for Linux installation,</path/to/modulefile>
isopt/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. - Load the Environment Modules for the Arm Allinea Studio tools:
- 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
- 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
- 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 yourPATH
. For more information, see the Before you begin section.
- Arm C/C++/Fortran Compiler:
- Check your environment by examining the
PATH
variable. It should contain the appropriatebin
directories for the tools loaded in the previous step. For example, for the Arm Compiler for Linuxbin
directory:echo $PATH
/opt/arm/arm-linux-compiler-20.2_Generic-AArch64_SUSE-12_aarch64-linux/bin:</path/to... - You can also use the
which
command to check that, for example, the Arm C/C++ Compilerarmclang
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 themodule 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.
- Create an Environment Module for Arm Forge and make it available to users. An example Environment Module for Arm Forge
(Optional) Tool Configuration: Arm Compiler for Linux
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.