Compilers

Table of Contents

Overview

There are lots of compilers. Some are actually installed on the cluster.

Compiler C C++ Fortran OpenMP Notes
clang/LLVM clang clang++   none  
GCC 4.9 gcc-4.9 g++-4.9   2.5  
GCC 5.1 gcc-5.1 g++-5.1   2.5  
Imtel C Compiler 12 icc icc   2.5 evaluation license -> 10/20/2011
Intel Fortran Compiler 12     ifc 2.5 evaluation license -> 10/20/2011

GNU Compiler Collection

Intel C/Fortran Compiler

Set the environment variables to run the intel compiler

source /opt/intel/bin/compilervars.sh intel64

needs packages: jre

LLVM/clang

The source code can be obtained using the git repository. For the rest of the build follow the generic instructions.

cd /usr/src/llvm
git clone http://llvm.org/git/llvm.git
configure switch used description
--prefix=/opt installation prefix
--enable-optimizations  

General software installation instructions

To install software from source make sure to check the respective build instructions (if there are any) for software specific hints. First, choose and fetch the source code to the directory /usr/src/SOFTWARE. There are several common build systems:

  • automake (file "configure" exists and is executable)
  • cmake (file "cmakelists" or similar exists)

Automake

It is sensible to build the software in a separate directory outside of the source tree, eg. /usr/src/SOFTWARE/objdir.

The configure script usually takes options that describe the target installation as well as the desired feature-set of the software.

The following example is for the GNU Compiler Collection (GCC)

cd /usr/src/gcc
# download sources (eg from ftp://ftp.fu-berlin.de/unix/languages/gcc/releases/)
wget ftp://ftp.fu-berlin.de/unix/languages/gcc/releases/gcc-x.y.z.tar.bz2
# untar release tarball to /usr/src/gcc/gcc-x.y.z
tar -xf gcc-x.y.z.tar.bz2
# empty (from previous builds), recreate and switch to the build directory 
rm -r /usr/src/gcc/objdir ; mkdir /usr/src/gcc/objdir ; cd /usr/src/gcc/objdir
# configure the build
/usr/src/gcc/gcc-x.y.z/configure --prefix=/opt --program-suffix=-x.y
# compile
nice make -j 16
# install
make install

CMake

Created: 2020-07-14 Tue 16:03

Validate