Software Environment
All software and numerical libraries available at the cluster can be found at /apps/. If you need something that is not there please contact us to get it installed.
C Compilers
In the cluster you can find these C/C++ compilers :
gcc / g++ -> GNU Compilers for C/C++
man gcc
man g++
All invocations of the C or C++ compilers follow these suffix conventions for input files:
.C, .cc, .cpp, or .cxx -> C++ source file.
.c -> C source file
.i -> preprocessed C source file
.so -> shared object file
.o -> object file for ld command
.s -> assembler source file
By default, the preprocessor is run on both C and C++ source files.
These are the default sizes of the standard C/C++ datatypes on the machine
Type | Length (bytes) |
---|---|
bool (c++ only) | 1 |
char | 1 |
wchar_t | 4 |
short | 2 |
int | 4 |
long | 8 |
float | 4 |
double | 8 |
long double | 16 |
GCC
The GCC provided by the system is version 8.5.0. For better support of new and old hardware features we have different versions that can be loaded via the provided modules. For example gcc versions 8.2.0, 9.2.0 and 11.2.0:
module load gcc/11.2.0
Distributed Memory Parallelism
HSM Compute doesn't have InfiniBand connection, so the inter-node connections are via Ethernet, that means the overhead of using MPI between nodes is higher than usual, and such we recommend limiting MPI to a single node.
To compile MPI programs it is recommended to use the following handy wrappers: mpicc, mpicxx for C and C++ source code. You need to choose the Parallel environment first: module load openmpi. These wrappers will include all the necessary libraries to build MPI applications without having to specify all the details by hand.
mpicc a.c -o a.exe
mpicxx a.C -o a.exe
Shared Memory Parallelism
OpenMP directives are supported by the GNU/PGI C and C++ compilers. To use it, the flag -fopenmp/-mp must be added to the compile line.
gcc -fopenmp -o exename filename.c
g++ -fopenmp -o exename filename.C
You can also mix MPI + OPENMP code using -fopenmp/-mp with the mpi wrappers mentioned above.
Modules Environment
The Environment Modules package (http://modules.sourceforge.net/) provides a dynamic modification of a user's environment via modulefiles. Each modulefile contains the information needed to configure the shell for an application or a compilation. Modules can be loaded and unloaded dynamically, in a clean fashion. All popular shells are supported, including bash, ksh, zsh, sh, csh, tcsh, as well as some scripting languages such as perl.
Installed software packages are divided into five categories:
- Environment: modulefiles dedicated to prepare the environment, for example, get all necessary variables to use openmpi to compile or run programs
- Tools: useful tools which can be used at any time (php, perl, ...)
- Applications: High Performance Computers programs (GROMACS, ...)
- Libraries: Those are tipycally loaded at a compilation time, they load into the environment the correct compiler and linker flags (FFTW, LAPACK, ...)
- Compilers: Compiler suites available for the system (intel, gcc, ...)
Modules tool usage
Modules can be invoked in two ways: by name alone or by name and version. Invoking them by name implies loading the default module version. This is usually the most recent version that has been tested to be stable (recommended) or the only version available.
module load python
Invoking by version loads the version specified of the application. As of this writing, the previous command and the following one load the same module.
module load python/3.10.2
The most important commands for modules are these:
- module list shows all the loaded modules
- module avail shows all the modules the user is able to load
- module purge removes all the loaded modules
- module load \<modulename> loads the necessary environment variables for the selected modulefile (PATH, MANPATH, LD_LIBRARY_PATH...)
- module unload \<modulename> removes all environment changes made by module load command
- module switch \<oldmodule> \<newmodule> unloads the first module (oldmodule) and loads the second module (newmodule)
You can run "module help" any time to check the command's usage and options or check the module(1) manpage for further information.