From HPC users
Revision as of 14:04, 6 May 2022 by Harfst (talk | contribs) (→‎Using fluka.cern with the HPC cluster)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search


fluka.cern is a general purpose tool for calculations of particle transport and interactions with matter, covering an extended range of applications spanning from proton and electron accelerator shielding to target design, calorimetry, activation, dosimetry, detector design, Accelerator Driven Systems, cosmic rays, neutrino physics, radiotherapy etc. More information on fluka.cern can found under https://fluka.cern/. Please note, that fluka.cern is very similar to FLUKA and is referred to as FLUKA on their website (fluka.cern diverged from the other project in 2021).

Please note that the fluka.cern (FLUKA) user license allows the free usage of fluka.cern (FLUKA) for non-commericial scientific research. By using fluka.cern on the cluster you accept the user license.

Installed version

You can find the available modules with (output for hpc-env/8.3:

$ module available fluka.cern
-------------------------------------- /cm/shared/uniol/modules/8.3/phys --------------------------------------

or alternatively for all environments with

$ module spider fluka.cern

Using fluka.cern

The example can be run with

$ mkdir $WORK/fluka.cern
$ cd $WORK/fluka.cern
$ cp $EBROOTFLUKACERN/example/example.inp .
$ rfluka example

To get more information refer to the manual or try

$ rfluka -h

Using fluka.cern with the HPC cluster

Since there many people working with the HPC cluster, its important that everyone has an equal chance to do so. Therefore, every job should be processed by SLURM.

For this reason, you have to create a jobscript for your tasks.


#SBATCH --ntasks=1                  
#SBATCH --mem=2G 
#SBATCH --partition=carl.p                 
#SBATCH --time=0-2:00  
#SBATCH --job-name FLUKA-TEST              
#SBATCH --output=fluka-test.%j.out        
#SBATCH --error=fluka-test.%j.err

#load fluka
module load hpc-env/8.3
module load fluka.cern

#change these settings to fit your files and needs
INPUTFILE=example   # without .inp  

#run fluka code

Save the jobscript as e.g. "flukatest.sh". The example input file has to be in the same folder as the jobscript and can be copied with the command shown above.

If your jobscript and the example file are ready, you can submit your job with the command

sbatch flukatest.sh 

(if you named you jobscript differently, add the right jobname here)

After the job has finished, you will find a number of new files in the directory where you submitted your job.


The manual is provided online here.