I have encountered an issue while running simulations for clinical particle beams (proton, alpha, and carbon ion) using FLUKA. My approach involves utilizing an external text file to generate a Spread-Out Bragg Peak (SOBP). I have written a
source.f file to sample from this spectrum file and compiled it with
comscw.f without encountering any issues. In my input file, I utilize source and open cards to define the beam of interest.
This method has been effective thus far. However, I am currently facing a problem with newly generated executables. While I can still successfully run the executable versions I had before, the new executables are terminating with errors in different versions of FLUKA:
In FLUKA version ‘4-1.1’, the simulation aborts with the following error message:
Abort called from DEULOA reason Failed to load deuebu.dat Run stopped!
STOP Failed to load deuebu.dat
In FLUKA version ‘4-3.3’, the simulation ends with the error code “executable returned RC=136.”
IT"S IMPORTANT to mention that Both versions of FLUKA compile the file correctly, but the simulation cannot run due to the aforementioned errors.
I am using Flair, installed from the repository (updated flair version 3.3-0.1).
Could you please assist me in understanding and resolving these issues? Any guidance on troubleshooting these errors would be greatly appreciated.
The error you got for FLUKA 4-1.1 indicates an incomplete installation of FLUKA. The file mentioned in the error message should be located at /data.
To know the error message with FLUKA 4-3.3 you need to look at the .out, .log, or .err files generated (maybe in a fluka_xxxx directory).
If you can’t find the error message, please upload your simulation files (input, user routines, etc.), so we can try to reproduce the issue.
Thank you @horvathd for responding.
Upon further investigation, I confirmed that the “deuebu.dat” file is indeed missing in the FLUKA 4-1.1 data directory. After copying it from the 4-3.3 version, the same error (RC=135) persisted in the 4-1.1 version, and in the 4-3.3 version, I am still receiving the “RC=136” error showed only in .out file (FLUKA doesn’t generate .err and .log files for this run). It’s noteworthy that these errors only arise when I compile and run the executable with my source.f routine that reads from an external file. Previous executables compiled with the same source.f and comscw.f work correctly, and new executables compiled only with comscw.f also function without issues.
I am attaching the relevant input files and source code for your review
sourcemodSOBP.f (9.5 KB)
He4_SOBP.inp (3.0 KB)
He4_SOBP.flair (2.5 KB)
spectrum.dat (37.0 KB)
Thank you once again for your assistance.
I can run your simulation without any errors.
What message do you get if you run FLUKA from the command line with the following command?
rfluka -M1 -e my-fluka-executable inputfile.inp
rfluka: command not found
the Fortran version is GNU Fortran (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0
did you install FLUKA from the
.tgz or from the
.deb file? If you used the
.tgz, did you add FLUKA to your PATH environment variable? (See the last section on Installing FLUKA on GNU/Linux or macOS (.tgz packages) | The official CERN FLUKA website)
Also, please note that the lastest version of FLUKA now is 4-3.4.
Thank you @horvathd for your prompt response and guidance.
Following your advice, I have installed the most recent version of FLUKA (fluka-4-3.4.x86-Linux-gfor9.tgz) as per the instructions provided on the official CERN FLUKA website. I’m not sure though if executing this command “make install DESTDIR=/usr/local/fluka” is required since FLUKA is up running smoothly. I made sure to include the FLUKA directory in my PATH environment variable with the following command:.
This update allowed me to run simulations from the terminal. However, both Flair and the terminal command still report an RC=136 error for the new built executables:
rfluka -M1 -e /home/stantz/simulation/routines/newSource /home/stantz/simulation/TreatmentPlan/Ning/He4/SOBP/He4_SOBP.inp
Error: “/home/stantz/simulation/routines/newSource” executable returned RC=136
This issue seems to occur exclusively with compilations involving
source.f , which reads from an external file. Given that you were able to run a similar simulation, I am sharing the link for the problematic executable for your review. Could you please check if it works on your end.
it works now after I updated the source file.