Installation of FLUKA

Revision as of 14:51, 18 November 2014 by en>Brash (Step 2: Install the Fortran Compiler)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Installation of FLUKA

In order to install the FLUKA software, one needs first to register at the main FLUKA website. Once registered and approved (takes about a day), one then will have a FLUKA userid and password, and can download the Linux tarball: fluka2011.2c-linuxAA.tar.gz

Put this file in your home directory.

Step 1: Unpack the tarball

cd
mkdir fluka
cd fluka
tar -xvzf ../fluka2011.2c-linuxAA.tar.gz


Step 2: Install the Fortran Compiler

FLUKA requires (or at least seems to work best with) the g77 Fortran compiler, which is not included by default on most modern Linux systems (it has been replaced by gfortran). One needs, as superuser, to install the g77 compatibility rpm, with:

sudo yum install compat-gcc-34-g77

Note: In principle, it should be possible to compile FLUKA with gfortran ... it would be good to investigate this possibility at some point.

Step 3: Install the appropriate i686 libraries

With g77, FLUKA will compile the needed binaries in 32-bit mode, even though one might be on a x86_64 (i.e 64-bit) system. Thus, it will look for 32-bit libraries at the linking stage, which probably are not installed (by default). Note that one should install the appropriate i686 version of whichever glibc-devel 64-bit libraries are installed. You can find out which version is installed on your system with:

rpm -qa | grep glibc-devel

For the jlabdaq system, version 2.12 is installed. Thus, the appropriate command to install the i686 libraries is:

sudo yum install glibc-devel-2.12-1.149.el6.i686

Step 4: Define FLUKA environment variables and update PATH

Edit ~/.bash_profile, and add the following lines:

export FLUPRO=/home/username/fluka
export FLUFOR=g77
export PATH=$FLUPRO:$FLUPRO/flutil:/usr/local/bin:$PATH

where username is replaced with your actual user name on the system. You will need to source this file to get these defined the first time:

source ~/.bash_profile

Step 5: Compile the FLUKA binaries

cd ~/fluka
make