Search

link to homepage

Institute for Advanced Simulation (IAS)

Navigation and service


Compile and Execute

Compilation and Execution of Parallel Programs on JURECA

This section gives a short introduction to the compiling and execution procedure on JURECA.

Compilation

This section gives you an overview of the compiling procedure on JURECA.

In order to have access to compilers and libraries a toolchain must be loaded.

As a rule of thumb, for most applications, the Intel compilers provide the highest performance on the JURECA platform. However, we recommend to experiment with different compilers and compiler options to find an optimal setting for the specific application.

The following table shows the names of the MPI wrapper procedures for the Intel compilers as well as the names of compilers themselves. The wrappers build up the MPI environment for your compilation task. Therefore we recommend to always use the wrappers instead of the compiler drivers themselves.

Programming LanguageWrapperIntel Compiler
Fortran 90mpif90ifort
Fortran 77mpif77ifort
C++mpicxxicpc
Cmpiccicc


Useful general options for the compilers:

OptionDescription
-openmpEnables the parallelizer to generate multi-threaded code based on the OpenMP directives
-helpGives a long list of quite a big amount of options
-soxStores useful information like compiler version, options used etc. in the executable. If you want to extract these information use:
strings -a <executable> | grep comment:
-gCreates debugging information in the object files. This is necessary if you want to debug your program


Some useful preprocessor options:

OptionDescrition
-DDefines a macro
-UUndefines a macro
-IAllows to add further directories to the include file search path
-HGives the include file order. This options is very useful if you want to find out which directories are used and in which order they are applied


Linker option:

OptionDescrition
-LA path can be given in which the linker searches for libraries


Some options for optimization:

OptionDescription
-O0No optimization: useful, if you want to debug your program (default setting, if you use the "-g" option)
-O1Optimize with respect to code size and code locality
-O2Optimize with respect to code speed. This is the default setting. In most cases this option is a better choice than -O1
-O3Try this option, if your code includes a big amount of loops and floating-point calculations
-ipoInterprocedural optimization
-axCORE-AVX2Indicates the processor for which code is created


General command line example for the compile step:

mpicxx -O2 program.cpp -o program.x

Omitting -o program.x results in an executable named a.out.

If your program runs fine with these parameters, you could check whether setting the variable PSP_ONDEMAND=1 improves the performance of the application.

Execution

Programs have to be execucted through the workload manager on JURECA. Please see the Quick Introduction and Batch System pages for more information.


Servicemeu

Homepage