Hi, I am new to the FLUKA community and I am trying to run the test input file “example.inp” and I have some issues with the gfortran version (in the ubuntu environment). I checked my current fortran version with the following outcome: GNU Fortran (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0. In order to run the latest FLUKA version (fluka-4-5.0.x86-Linux-gfor9.tgz), I tried to install the gfortran 9 version via “sudo apt install-9”. By doing this I got the “9.5.0-6ubuntu2” version. Now when I try to run the “example.inp” file I get the following message error: “Error: “/mnt/c/FLUKA/fluka4-5.0/bin/fluka” executable returned RC=2”. How can I solve this problem? I am also new to the ubuntu environment :-). Thanks in advance for any help! Best regards, Stephan.
Dear Stephan,
please have a look at the following lecture:
Cheers,
David
Dear Dávid, thanks for sending the presentation. maybe/probably it’s me but after going through this presentation I don’t have a clue how to solve my issue with this info. I tried to Google how to remove all the gfortran versions from the Ubuntu environment but I did not find an answer or something that helped. Can you comment about this? Thanks for your understanding. Best regards, Stephan.
That’s not of real use. Take a look at the content of the .err and .log files and let us know if what you read there does not explain/solve the problem.
Dear Francesco, the log file says:
"Program received signal SIGABRT: Process abort signal.
Backtrace for this error:
#0 0x7fc4b8422e59 in ???
#1 0x7fc4b8421e75 in ???
#2 0x7fc4b811932f in ???
#3 0x7fc4b8172b2c in ???
#4 0x7fc4b811927d in ???
#5 0x7fc4b80fc8fe in ???
#6 0x7fc4b8420345 in ???
#7 0x5561346bd9a6 in datimf_
at linux/datimf.f:53
#8 0x5561345918f0 in flukam_
at main/flukam.f:725
#9 0x556134589fe0 in fluka
at main/fluka.f:77
#10 0x556134589fe0 in main
at /builds/fluka/fluka/src/usflmd.inc:15
Aborted (core dumped)"
And a empty core file is created and some “fort” files that I cannot access. That is all the info I have for the moment. Maybe I need to start over all again, also removing the Ubuntu environment but that also takes time :-). If think the trouble is in the gfortran version. I just tried to run again and now I get the following lines in the terminal:
Dir: /mnt/c/FLUKA/fluka4-5.0
Data: /mnt/c/FLUKA/fluka4-5.0/data
Exec: /mnt/c/FLUKA/fluka4-5.0/bin/fluka
Input: /mnt/c/FLUKA/fluka4-5.0/bin/example.inp
Initial seed already exists
Running fluka in /mnt/c/FLUKA/fluka4-5.0/bin/fluka_556
======================== Running FLUKA for cycle # 1 ========================
Error: “/mnt/c/FLUKA/fluka4-5.0/bin/fluka” executable returned RC=134
Thanks again for your help!
Best regards,
Stephan
I just checked and according to Installation how-to | The official CERN FLUKA website my install should be compatible with gfortran 13.x (I have the 13.3.0 installed).
Dear Stephan,
I couldn’t reproduce the error myself, so I suspect something went wrong with the installation of multiple gfortran versions.
The default version of 13.3 is indeed compatible with the gfor9
packages of Fluka.
I suggest to reset/reinstall the Ubuntu environment and see if the issue remains.
Cheers,
David
Dear Dávid, thanks for your response. I will indeed try to remove everything and follow neatly the instructions on the FLUKA pages… Let’s hope it works :-). Best regards, Stephan.
I am trying to reinstall (after installing a new Ubuntu version and after installing gfortran 13.3.0) and now I am running into this error when executing the command “make” (as described in the procedure to install from an extracted *.tgz package):
gfortran -o /mnt/c/FLUKA/fluka4-5.0//bin/fluka -fuse-ld=bfd -L/mnt/c/FLUKA/fluka4-5.0//lib -lfluka -lgeometry -ldata -lmath -ltool -lstdc++ -lz -lpthread
/usr/bin/ld.bfd: cannot find -lstdc++: No such file or directory
/usr/bin/ld.bfd: cannot find -lz: No such file or directory
collect2: error: ld returned 1 exit status
make: *** [makefile:43: /mnt/c/FLUKA/fluka4-5.0//bin/fluka] Error 1
Anyone ran into the same problem? How can I solve this?
Thanks in advance for any help!
Best regards,
Stephan
In the meanwhile I installed g++ (as was described in related posts in this forum) and now I get the following lines:
svdammet@PC6053:/mnt/c/FLUKA/fluka4-5.0/src$ make
gfortran -o /mnt/c/FLUKA/fluka4-5.0//bin/fluka -fuse-ld=bfd -L/mnt/c/FLUKA/fluka4-5.0//lib -lfluka -lgeometry -ldata -lmath -ltool -lstdc++ -lz -lpthread
/usr/bin/ld.bfd: cannot find -lz: No such file or directory
collect2: error: ld returned 1 exit status
make: *** [makefile:43: /mnt/c/FLUKA/fluka4-5.0//bin/fluka] Error 1
So better but not solved yet :-).
Dear Stephan,
please install the libz-dev
package.
Cheers,
David
Good morning David, I just did, thanks for the advice. Step by step I wil get there…
I just ran the example file and I get the following lines:
F L U K A
Dir: /mnt/c/FLUKA/fluka4-5.0
Data: /mnt/c/FLUKA/fluka4-5.0/data
Exec: /mnt/c/FLUKA/fluka4-5.0/bin/fluka
Input: /mnt/c/FLUKA/fluka4-5.0/bin/example.inp
Initial seed already exists
Running fluka in /mnt/c/FLUKA/fluka4-5.0/bin/fluka_3564
======================== Running FLUKA for cycle # 1 ========================
Removing links
Removing temporary files
Saving output and random number seed
Error: No ranexample002 generated!
Saving additional files generated
I
I just ran the file outside of the “bin” directory (apparently this gives troubles) and now I get an .err, a .log and an .out file.I will check these.
Last problem solved. I needed to install the neutron data package (feedback from .err file). I was able to execute the command “rfluka -M 5 example.inp” and 5 calculations were made and ended with “End of FLUKA run”.