Skip to content

FLUKA and FLAIR

Hostgroups

These features are available for the following hostgroups and their respective subhostgroups:

  • fluka:

    • machine_protection/linux
  • flair:

    • machine_protection/linux/ts

fluka can run on any of the Linux machines. The headless Linux nodes of the machine_protection/linux/nodes hostgroup (see here for the definition of hostgroup) are suitable for running simulations jobs. Of course the Terminal Server machines are also available to run fluka, for example if one runs it from flair.

flair is also available on the Linux TS VMs. The flair GUI is best used from a Desktop Environment such as XFCE, although direct X forwarding would also work. For that reason, flair is only installed on the TS and not on the headless nodes. flair is provided as a Conda package.

See the documentation page to identify the available general purpose Linux VMs of the node or ts subhostgroups.

Accessing FLUKA

Users must first request a fluka license from the official FLUKA website. A valid license is required before being added to the machine-protection-studies-fluka-users e-group which controls the access to the mp-fluka EOS project space containing the fluka binaries). The conda package for flair is also distributed on that EOS project space (see below).

Running fluka

FLUKA website and user forum

Please refer to the official FLUKA website and user forum for additional information.

fluka and all the associated binaries are present in the $PATH, so it can simply be run as follow:

fluka file.inp

The main fluka binary and the associated binaries are located on the mp-fluka EOS project space (/eos/project-m/mp-fluka/) at /eos/project-m/mp-fluka/fluka/bin; a shell script and symbolic links located in /usr/local/bin ensure that they are all available in your $PATH.

Running flair

FLAIR website and user forum

Please refer to the official FLAIR website and user forum for additional information.

tl;dr - Initial setup of the flair conda environment

To install and activate the flair Conda environment and run flair, proceed as follow:

conda env create --file /eos/project-m/mp-fluka/flair.yml
conda activate flair
conda install /eos/project-m/mp-fluka/flair.tar.bz2
flair
tl;dr - Subsequent environment activation and running flair

When the flair conda environment is correctly installed (check that with conda env list, simply activate it and run flair:

conda activate flair
flair

flair is provided as a Conda package (condensed instructions above). This allows to install flair within a given environment without affecting the system Python or any other Python environment that might be in use.

The following environment is proposed as a template, although the user is of course allowed to create a different one:

# Run:
#    conda env create --file /eos/project-m/mp-fluka/flair.yml
# Customized environment for Flair with Python 3
name: flair
channels:
  # Conda forge distribution
  # https://conda-forge.org
  - conda-forge
dependencies:
  - python=3.7
  - matplotlib
  - numpy
  - pydicom
  - Pillow

The file is avalable at /eos/project-m/mp-fluka/flair.yml. An environment can be created and activated like this:

conda env create --file /eos/project-m/mp-fluka/flair.yml
conda activate flair

The flair package then needs to be installed like this:

conda install /eos/project-m/mp-fluka/flair.tar.bz2

flair should then be available:

flair

flair needs to be configured to correctly locate the fluka executables. The screenshot below details the changes to be made.

Openstack

When the environment has already been created (verify this with conda env list) and flair was installed in the environemnt, you can subsequently run flair by simply activating the environment first:

conda activate flair
flair

Administration guide

The following is intended for administrators only.

EOS project space and ACL e-groups

To provide a fine-grained access control to the FLUKA binaries, a dedicated EOS project space has been created: mp-fluka. The following e-groups have access to it: - cernbox-project-mp-fluka-admins (admins): the mpcfluka service account and the machine-protection-studies e-group; - cernbox-project-mp-fluka-writers (writers): the admins e-group; - cernbox-project-mp-fluka-readers (readers): the machine-protection-studies-fluka-users e-group.

The machine-protection-studies-fluka-users e-group should thus be used to control the users allowed to access (read-only) the mp-fluka EOS space. Only these users will be able to run fluka and associated binaries. Before adding a user to that e-group, one should verify that the user has a valid license!

Creating or updating the fluka distribution

This requires a write access to mp-fluka on EOS (see above).

To update the fluka distribution:

  • Download the latest binary FLUKA release from the official website ("Binary libraries for GNU/Linux", chose the appropriate Fortran compiler - gfortran 9 is adivsed)
  • From a machine able to access the EOS project space (/eos/projet-m/mp-fluka):

    • Load a toolchain providing the same gfortran version as the one choosen above:
    source /cvmfs/sft.cern.ch/lcg/views/setupViews.sh LCG_100 x86_64-centos7-gcc9-opt
    
    • Extract the archive and compile:
    tar -xvf fluka-[release].[platform]-gfor[compiler-version].tgz
    cd src
    make
    
  • Copy it back to EOS

Creating or updating the flair Conda package

This requires a write access to mp-fluka on EOS (see above).

A dedicated repository has been created for the conda package, along with documentation files. Please refer to the documentation in the repository.