Problem when running FLUKA simulation on server

Versions

Fluka 4.5.2 with GNU Fortran (Debian 12.2.0-14) 12.2.0

FLUKA:FLUKA versione: 4.5.2.
Flair: none

Description

Dear all,

I am trying to run a FLUKA simulation on a server without using Flair. Basically, I created the .inp file with Flair on my PC, then transferred the .inp file together with the required user routine .f files to the server where I want to run the simulation. On the server, I compiled and linked the routine using lfluka, and then executed the simulation with rfluka. The simulation itself appears to run smoothly, without obvious errors. However, the output files produced by the scorers are unusable. Their sizes are suspiciously small, and when I try to process them with Flair I get errors.

In contrast, when I run the same simulation locally on my PC through Flair, the output files are generated correctly and can be visualized without any issue.

I am therefore trying to understand what could be causing this discrepancy between the local and server runs.

I have attached the relevant files for the simulation.

I hope the explanation is clear enough. Any help or suggestions would be greatly appreciated.

Best regards,
Nicolò

Input files

mgdraw_reaction_summary.f (4.7 KB)

TP_spectrum.txt (2.7 KB)

source_protons.f (20.8 KB)

s60736.inp (2.3 KB)

Using your two user routines, I could successfully generate the executable with the command
$FLUKAPATH/bin/lfluka -o nicmac mgdraw_reaction_summary.f source_protons.f
where FLUKAPATH points to the FLUKA directory.
Then, the command
$FLUKAPATH/bin/rfluka -e nicmac -M2 s60736.inp
led to the successful run completion and scoring file production, provided that the TP_spectrum.txt file is renamed to TP_histogram_shot_60736.txt as hardcoded in your source routine.