SIGFPE: Floating-point exception - erroneous arithmetic operation

Hello,
I need to install the latest version 4.0 on a RedHat Linux system.
I downloaded the file “gfortran 9, 64 bits (.tgz)”.
I did the installation following the instructions on the https://fluka.cern/documentation/installation/fluka-linux-macos page after loading the “GNU Fortran (GCC) 9.3.0” compiler and everything went very well, the binaries were compiled well.

But when I run the executable with the example.inp file (same with other cases), I get the following message: “Floating point exception(core dumped)”.
Looking at example001.log, it says “Program received signal SIGFPE: Floating-point exception - erroneous arithmetic operation.”

Does anyone have any idea if I’m the forgot something or if I’m doing it wrong?

Thanks for your help

Philippe

Dear Philippe,

could you post all the files generated, and the output of the rfluka command here?
Also could you specify which RedHat Linux version are using, and how did you load gfortran 9.3?

Cheers,
David

Dear David,

The bin directory with the file generated : https://drive2.demo.renater.fr/index.php/s/w4Q42ip4TGG9zSg

OS is :
[martinep@cobalt173 ~]$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.7 (Maipo)

For fortran, I did “module load gnu/9.3.0”
[martinep@cobalt173 ~]$ gfortran --version
GNU Fortran (GCC) 9.3.0

Output is :slight_smile:[pruvostj@cobalt173 inputs]$ rfluka example.inp

                               F L U K A

Dir: /ccc/work/cont003/solcomm/solcomm/products/fluka/fluka4-0.0
Data: /ccc/work/cont003/solcomm/solcomm/products/fluka/fluka4-0.0/data
Exec: /ccc/work/cont003/solcomm/solcomm/products/fluka/fluka4-0.0/bin/fluka
Input: /ccc/cont003/home/soleil/pruvostj/fluka/inputs/example.inp
Initial seed already exists
Running fluka in /ccc/cont003/home/soleil/pruvostj/fluka/inputs/fluka_35811

======================== Running FLUKA for cycle # 1 ========================
/ccc/work/cont003/solcomm/solcomm/products/fluka/fluka4-0.0/bin/rfluka: line 368: 36026 Floating point exception(core dumped) “{EXE}" "{INPF}” > “${LOGF}” 2>&1
Error: “/ccc/work/cont003/solcomm/solcomm/products/fluka/fluka4-0.0/bin/fluka” executable returned RC=136

Thanks a lot !

Philippe

Dear Philippe,

for some reason the size of the executables are smaller than they should be on your system.

Could you provide the output of the following command?

gfortran -v

Cheers,
David

Dear David,

Here is the output :slight_smile: [martinep@cobalt173 ~]$ gfortran -v
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/ccc/products2/gcc-9.3.0/Atos_7__x86_64/system/default/bin/…/libexec/gcc/x86_64-pc-linux-gnu/9.3.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: …/configure --enable-languages=c,c++,fortran --enable-lto --enable-checking=release --disable-multilib --enable-shared=yes --enable-static=yes --enable-threads=posix --enable-gold=default --enable-plugins --enable-ld --with-plugin-ld=ld.gold --enable-bootstrap --prefix=/ccc/products/ccc_users_env/compil/Atos_7__x86_64/gcc-9.3.0/system/default --with-local-prefix=/ccc/products/ccc_users_env/compil/Atos_7__x86_64/gcc-9.3.0/system/default
Thread model: posix
gcc version 9.3.0 (GCC)

Thanks
Philippe

Dear Philippe,

the issue is with the gold linker, which FLUKA has compatibility issues with.

I modified the makefiles to force the usage of the bfd linker.

You need to replace the following files:
src/config.mk
src/makefile
with the ones extracted from ld.tgz (2.0 KB)

After the replacement, you will need to clean and compile again with the command

make clean && make

Please, let us know if this solves the problem.

Cheers,
David

Dear David,

Great thanks for you, it solved the problem, you have the script output attached.
Mu colleague will be very happy !
I am now looking to flair and geoviewer.

THANKS again.

Cheers
Philippe