Download and Compile exciting

by Alexander Buccheri & Pasquale Pavone for exciting neon


Purpose: In this tutorial you will learn how to download and quickly compile exciting.


Introduction

First, you should choose the directory where you want to unpack the current release, exciting neon. All examples in this tutorial assume that the source code of exciting is unpacked to /home/tutorials. From now on the symbol $ will indicate the shell prompt.

$ mkdir /home/tutorials 
$ cd /home/tutorials

Download the current release, exciting neon here, and unpack it.

$ tar xvf exciting.neon.tar.gz

The latest version of exciting neon is also available from exciting's Github page:


$\Rightarrow$ clone from Github
$ git clone https://github.com/exciting/exciting.git

Before proceeding further, be sure that relevant environment variables are already defined as specified in How to set environment variables for tutorials scripts. If you choose a different location than /home/tutorials, replace /home/tutorials in your ~/.bashrc file with an appropriate path as indicated in How to set environment variables for tutorials scripts.

From now on, we assume that you have already defined all environment variables, including $EXCITINGROOT.

Before you compile the code, please also ensure that you have a fortran compiler available. exciting supports both GCC and Intel fortran compilers. One can inspect whether a compiler is in the $PATH using the which command:


Inspecting Intel ifort:

$ which ifort         # next line output is only an example...
/usr/global/intel-2019/compilers_and_libraries_2019.0.117/linux/bin/intel64/ifort

Inspecting GCC gfortran:

$ which gfortran      # next line output is only an example...
/usr/bin/gfortran

For detailed information on installing and compiling exciting, we strongly suggest to read the file $EXCITINGROOT/INSTALL.

Assuming a compiler is found, move inside the $EXCITINGROOT directory and compile using either of the supported compilers. For the purpose of using exciting within this and the other tutorials, build with Intel ifort or GCC gfortran, as shown in the following:


Compile with Intel ifort:

$ cd $EXCITINGROOT
$ cp build/platforms/make.inc.ifort build/make.inc
$ make smp

Compile with GCC gfortran:

$ cd $EXCITINGROOT
$ cp build/platforms/make.inc.ifort build/make.inc
$ make smp

where the command make smp builds the shared-memory multiprocessing version of the code. If the compilation step was successful, the binary file exciting_smp should be available in the $EXCITINGROOT/bin directory.

$ ls $EXCITINGROOT/bin
exciting_smp

If compilation fails, manual editing of the file make.inc inside $EXCITINGROOT/build may be required.

However, this is only likely if building with a compiler or libraries installed in non-standard locations. Additional details can be found in the file $EXCITINGROOT/INSTALL.


$\Rightarrow$ click here for examples of other compilation choices
$ make serial    # full serial version                   --> exciting_serial
$ make smp       # shared-memory multiprocessing version --> exciting_smp
$ make mpi       # mpi-parallelised version              --> exciting_purempi
$ make mpiandsmp # hybrid smp-mpi parallelised version   --> exciting_mpismp

Now that exciting has been compiled, you can start with the other Tutorials.