Run Flair at cluster

Dear experts
can you help me in steps, how to run flair at cluster using SLURM , how can I write job script, I don’t know if at the website work or not. then how to run.
thank you

Dear Iyad,

the script is an example for cluster using the OpenPBS system, so it is not relevant for you.

Unfortunately almost every cluster - even they are using the same submission system - are configured differently, so providing a universal script won’t be possible.

If you have a submission script you are using from the command line, that would be a great starting point. Otherwise you need to consult with the administrator of your cluster for help.


1 Like

Hi Iyad

I agree with David’s reply that it is system dependent and you will need the administrator’s help. Perhaps I can give you some clues on how to start, and you will see why you will need their help.
The basic idea of parallelizing FLUKA is to run one input per CPU and replicate. For this, you will have to write a script that echoes the srun (slurm) command to a file and batch submit that file. For example, my script is called “” and is invoked as

./ input_file_name number_of_input_files number_of_cycles

Bash reads them as $1,$2,$3. Inside the script file, I have

for ((i=1; i<=$2; i++));do
xx=$(printf "%02d" $i)

echo "srun -options /path/to/fluka4-0.1/bin/rfluka -M ${cycle} ${jobname}_${xx} & " >>$Batchfile

and submitted by another line somewhere later in the as

sbatch $Batchfile

The Batchfile looks like this.

srun -options /path/to/fluka4-0.1/bin/rfluka -M 1 inputfilename_01 & 

The srun command is repeated for the number of spawned jobs. Thus, if I want to use 100 CPUs (100 spawned jobs), I will have 100 such lines with the $xx incrementing per line (1 to 100). Each srun command line will thus have a unique input file name.

Some clusters are configured for the users to use nodes (many CPUs per node), some others for the number of CPU. Further, some may have a combination of CPUs and GPUs requiring you to chose the CPU. The -options in the srun command may have to be configured accordingly.

Good luck.
Cheers, Sunil