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 usto get it installed.
C Compilers
In the cluster you can find these C/C++ compilers :
icc / icpc -> Intel C/C++ Compilers
man icc
man icpc
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 |
Distributed Memory Parallelism
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 / module load impi / module load poe. 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 fully supported by the Intel C and C++ compilers. To use it, the flag -qopenmp must be added to the compile line.
icc -qopenmp -o exename filename.c
icpc -qopenmp -o exename filename.C
You can also mix MPI + OPENMP code using -openmp with the mpi wrappers mentioned above.
Automatic Parallelization
The Intel C and C++ compilers are able to automatically parallelize simple loop constructs, using the option "-parallel" :
icc -parallel a.c
FORTRAN Compilers
In the cluster you can find these compilers :
ifort -> Intel Fortran Compilers
man ifort
gfortran -> GNU Compilers for FORTRAN
man gfortran
By default, the compilers expect all FORTRAN source files to have the extension ".f", and all FORTRAN source files that require preprocessing to have the extension ".F". The same applies to FORTRAN 90 source files with extensions ".f90" and ".F90".
Distributed Memory Parallelism
In order to use MPI, again you can use the wrappers mpif77 or mpif90 depending on the source code type. You can always man mpif77 to see a detailed list of options to configure the wrappers, ie: change the default compiler.
mpif77 a.f -o a.exe
Shared Memory Parallelism
OpenMP directives are fully supported by the Intel Fortran compiler when the option "-qopenmp" is set:
ifort -qopenmp
Automatic Parallelization
The Intel Fortran compiler will attempt to automatically parallelize simple loop constructs using the option "-parallel":
ifort -parallel
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 intel
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 intel/2017.1
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.