Scientific Computing and Data / High Performance Computing / Documentation / Software Build and Compile on Minerva

Software Build and Compile on Minerva

Building Third-Party Applications

You should be able to find many applications already installed on Minerva as system modules using module spider or module avail on the command line. These system modules are there just for the sake of convenience for the users and in no event imply an absolute requirement of using them on Minerva. You may use your own software installed in your local area and can even set up your own modules if you prefer.

In most cases you’ll want to download the source code and build the software so that it’s compatible with the Minerva software environment. You cannot use yum or any other installation process that requires root privileges, but this is almost never necessary. The key is to specify a target installation directory for which you have write permissions. Details vary; you should consult the package’s documentation and be prepared to experiment. When using the popular autotools build process, the standard approach is to use the --prefix option to specify a non-default, user-owned installation directory at the time you execute configure or make:

$ export INSTALLDIR=/sc/arion/work/MyUserID/my_apps
$ ./configure --prefix=$INSTALLDIR
$ make
$ make install

Other languages, frameworks, and build systems generally have equivalent mechanisms for installing software in user space. In most cases a web search like “Software_Name Linux install local” will get you the information you need.


The programming environment is centered on the compiler. Minerva supports C/C++ and Fortran compilers from INTEL, and GNU Compiler Collection (GCC). Only one compiler module should be loaded at a time to avoid ambiguity. Compiling code for parallel execution on Minerva must use the proper implementation of MPI and link against the proper libraries. The MPI implementation currently supported by Minerva is OpenMPI and INTEL MPI. In particular, note that OpenMPI is not part of the MPICH family of MPI implementations.

For each supported compiler suite, a version of OpenMPI that is compatible with that compiler is loaded by using the module command. For example, to use the GCC compilers with OpenMPI:

module load openmpi

To use the INTEL MPI:

module load intel

When compiling non-MPI programs, modules for compilers without MPI support can be loaded instead:

module load gcc


Compiler Names

Compiler “wrappers” provided by OpenMPI and INTEL MPI supply the correct compiler and linker flags for MPI applications. For non-MPI codes the “native” compilers may be used directly.

Language MPI Native GCC Native Intel
Fortran mpiff77, mpif90 gfortran ifort
C/C++ mpicc gcc icc


Basic Examples

Serial Code

gfortran -O2 -o test test.f


mpicc -O2 -o MPItest MPItest.c


icc -O2 -qopenmp -o OpenMPtest OpenMPtest.c
gcc -O2 -fopenmp -o OpenMPtest OpenMPtest.c

Available compiler options depend on the underlying native compiler; complete descriptions are available via the “man” command.

GooGhywoiu9839t543j0s7543uw1 - pls add to GA account UA-149832711-2 with 'Manage Users and Edit' permissions - date 12/2/22