Fluka fortran runtime error, error cascade/synstp.f

Dear colleagues,
I am running a FLUKA simulation with a custom executable, and I get the error reported below.
I am running the latest FLUKA version (4.3.3) on a Centos7 machine, gcc9.2.0. I also tried to run without the custom executable, just running the command:

$FLUPRO/bin/rfluka -N0 -M1 na64_2021.inp

and I get the same error. The input card is attached to this message.
na64_2021.inp (358.9 KB)

May I ask you where this error originates from?
Thanks,
Andrea

Error:

At line 681 of file cascade/synstp.f
Fortran runtime error: Index '0' of dimension 1 of array 'cmpemf' below lower bound of 1

Error termination. Backtrace:
#0  0x673eab in synstp_
	at cascade/synstp.f:681
#1  0x66c7e6 in magnew_
	at cascade/magnew.f:1767
#2  0x628fcf in kaskad_
	at cascade/kaskad.f:3499
#3  0x4ea6d0 in feeder_
	at cascade/feeder.f:277
#4  0x45a170 in flukam_
	at main/flukam.f:2796
#5  0x43b450 in fluka
	at main/fluka.f:77
#6  0x43b450 in main
	at /shared/src/usflmd.inc:15

Follow-up

From an intuition suggested by the name of the file synstp.f, I modified my input card to switch off the syncrotron radiation emission (SYRASTEP card). The error is no longer present, but I can’t tell if this is due simply to the fact that, disabling this card, the history of the simulation changes, and maybe another, totally unrelated case that triggered the error simply did not occur…

Hi Andrea,

I am trying to reproduce your error. Could you also attach the user routines you are using?

Dear Daniele,
sure. I attach here a tar file with all the codes I am using - to compile, just run make. I also added the environment config script that I use at CERN.

rootfluka.zip (30.8 KB)

Bests,
Andrea

Hi Andrea,

indeed we found a bug in the treatment of synchrotron emission (SR) by all particles which are not electrons and positrons. This bug is being addressed and will be solved in the next minor release.

In the meantime, if you want to have the SR emission in your simulation, a small workaround would be to increase the SR energy threshold such that your primary muon can never emit a synchrotron radiation photon. In other words, you want to pick a synchrotron radiation energy threshold 10 times higher the maximum crytical energy that a muon can have in your simulation. That should be around 100 eV.

Dear Daniele,
sorry for late reply. Indeed, I saw that the crash was present only when the primary particle was not an electron or a positron!

I’ll try the workaround that you suggest.
Thanks,
Andrea