Hi @horvathd,
I managed to create a core file and have a backtrace. The problem has nothing to do with the spectrum sampling routines but it is due to errors in the input.
Martin, please check your material assignments. There is one where you assign a material to a material (h-BN and Ar). In addition, there might be something fishy with your definition of h-BN. If I replace that one with Ar (assigning Argon to the region Paint) your input works.
Cheers
Chris
P.S.: @KillMartin: the core file is created in the fluka_XXXXX directory and usually has a name core.XXXXX (where the XXXX is a number). If you carry out the steps I’ve described you will see:
#0 0x00007fc79b4cd353 in log () from /lib64/libm.so.6
#1 0x000000000063918e in master.0.dpdxio (__entry=__entry@entry=0, tdmax=<error reading variable: Cannot access memory at address 0x0>, ldedx=.TRUE.,
jmat=3, epo=0.0011759015688124989, ij=-6) at dedx/dpdxio.f:290
#2 0x000000000063d4b8 in dpdxio (ij=-6, epo=0.0011759015688124989, jmat=3, ldedx=.TRUE.) at dedx/dpdxio.f:4
#3 0x0000000000668077 in getlet (ij=-6, ekin=0.0011759015688124989, pla=0.093634648116316513, tdelta=-1, matlet=3) at dedx/getlet.f:114
#4 0x000000000058b9f8 in master.0.usrsco (__entry=__entry@entry=11, ppcont=0.093634648116316513, jreg=4, tzi=0.80608054848703115, tyi=-0.55591941443693105,
txi=0.20294766321134811, ekcont=0.0011759015688124989, llo=2, icall=201, rul0=1, kreg=3, zb=0.093511209356933064, yb=-0.40904608516820284,
xb=0.24879224356942328, ijinp=-6) at score/usrsco.f:6193
#5 0x000000000059af24 in usrscy (ijinp=-6, xb=0.24879224356942328, yb=-0.40904608516820284, zb=, txi=0.20294766321134811,
tyi=-0.55591941443693105, tzi=0.80608054848703115, kreg=3, jreg=4, rul0=1, icall=201, llo=2, ekcont=0.0011759015688124989, ppcont=0.093634648116316513)
at score/usrsco.f:5284
A stack trace has to be read from bottom to top. So the interesting line is actual number 1, which was where the code crashed and you can see (in bold) that this was in the scoring routines related to LET. So that’s where in your input you then have to start looking around. At that time the sampling has already finished and the particle is well on it’s way.