Issues using usreou.f with source.f

Dear FLUKA experts,

I am having issues running my detector.inp file with my two modified user routines usreou.f and source.f. The user routines compile and link with no issue but when I try and run my input file, it just keeps running and does not finish.

The source.f works fine by itself and I have tested the usreou.f on a slightly different input file with the only difference being that the source is a regular BEAM card and not a modified source.f file with a data set and it works to widen the peak which is what I am going for.

My issue is when I try and run them together that the run does not finish. After compiling, the command I am running is
rfluka -e isource -e iusreou -N0 -M1 detector2.inp

Is this the right command for running
two user routines? If it is correct I am not sure what my issue with the usreou.f file could be. I have attached my files.
detector2.inp (6.1 KB)
usreou.f (2.5 KB)
source.f (12.5 KB)
test.txt (3.0 KB)
The test.txt is the datafile read by source.f (my actual data files are much larger so for testing I have only included a few entries).

Thank you in advance!


Dear Tamara,

Please note that this forum provides support for the Fluka version distributed by CERN on the website, which is not the version you are using. I invite you to use the CERN distribution.

As a courtesy, I can point out that in your rfluka command you are passing two executables, this cannot lead to anything good.

No (as answered above).
You need first to link (both) the user routines into a single custom FLUKA executable (with a name of your choice) by means of the lfluka script.
Then, rfluka can be used to run the aforementioned executable.
Both scripts can be easily invoked through Flair, see its manual.

Thank you, this fixed my issue!

1 Like