Compilers

Table of Contents

Overview

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

Compiler C C++ Fortran OpenMP Notes
AMD x86 Open64 Compiler Suite 4.2.3.1-1 opencc opencc openf95 2.5  
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

Open64 Compiler

The x86 Open64 Compiler uses the frontend of GCC 4.2. That means, it supports the same language standards as GCC 4.2. distinguish between different installed gcc versions, eg. "-4.6" to get gcc-4.6 |

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  

x86 Open64 Compiler Suite

Download the sources from the official AMD open64 website http://developer.amd.com/tools/open64/Pages/default.aspx (registration needed, however a direct link http://download2-developer.amd.com/amd/open64/x86_open64-4.2.5.2-1.src.tar.bz with the correct version number might work as well). The build will need the following packages

build-essential gfortran flex bison ia32-libs gcc-multilib g++-multilib gfortran-multilib

and follows just the generic build.

configure switch used description
--prefix=/opt installation prefix
--disable-host_bdver1-support disable Bulldozer Architecture support

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: 2015-11-12 Thu 09:18

Emacs 24.4.1 (Org mode 8.2.10)

Validate