Different RNG Seed Advancement Between Different Installations

Versions

Please provide the used software versions.

FLUKA: 4-5.2
Flair: 3.4-5.4
Operating system: Fedora 44
Compiler: GNU Fortran 16.1.1

Description

Please describe the issue. In case of reporting a bug, please provide step-by-step instructions for reproducing the error.

I am working on setting up a new computer for work, and as part of my testing process for installing FLUKA I usually compare results of a test case (attached, fgbasic.inp). Normally, I get agreement of the results (an energy deposition scoring) and the RNG seed advances the same way. It is my understanding (and in my experience) that if it is the same FLUKA version and neutron libraries, the same input file should advance the RNG the exact same way (and produce an identical result). I have compared this with WSL ubuntu installations and FLUKA compiled in AlmaLinux on a cluster and saw that they agreed exactly, so let me know if I am mistaken about this, but it seems consistent across OSes and machines, until now.

Anyways, the issue is that on my new installation (Fedora 44) I get different results and a different RNG seed advancement for my usual test case. When I compare with a known good FLUKA 4-5.2 install, I see that the RNG seeds are identical up until about the 50th history in the first cycle, but then they suddenly differ, and I don’t know why. The only anomaly I saw in my installation with the RPM file was that I had to ignore that there is no digest / verification for the FLUKA rpm files to actually do the installation.

Furthermore, on this same computer, I previously was testing out Arch Linux and installed FLUKA, and saw the same RNG advancement as I currently have. So between Arch and Fedora on this new machine, it is consistent and reproducible on the same actual machine.

So, my question is: is this actually pathological behavior? And if so, how to remedy it? Or am I mistaken about the determinism of this test case? Any help is greatly appreciated.

Input files

Please upload all relevant files. (FLUKA input file, Flair project file, user routines, and data files)

The command issued to do this test case across all devices was:

rfluka -M 5 fgbasic.inp

And the RNG seed advancement I got for the new / questionable machine, reported in cycle 1’s .err file is, around the 50th primary:

NEXT SEEDS: 778DCD6 0 0 0 0 0 181CD 3039 0 0
48 52 52 2.7100646E-01 1.0000000E+30 568
NEXT SEEDS: 79A6B76 0 0 0 0 0 181CD 3039 0 0
50 50 50 3.2422988E-01 1.0000000E+30 617
NEXT SEEDS: 95DDD46 0 0 0 0 0 181CD 3039 0 0
51 49 49 3.3504193E-01 1.0000000E+30 633
NEXT SEEDS: 9BB5BDF 0 0 0 0 0 181CD 3039 0 0

Whereas the expected seed advancement for my previous installs is:

NEXT SEEDS: 778DCD6 0 0 0 0 0 181CD 3039
48 52 52 1.9633746E-0
NEXT SEEDS: 79A6B76 0 0 0 0 0 181CD 3039
50 50 50 2.2796804E-0
NEXT SEEDS: 945410A 0 0 0 0 0 181CD 3039
51 49 49 2.2858111E-0
NEXT SEEDS: 97BE91F 0 0 0 0 0 181CD 3039

fgbasic.inp (1.1 KB)

Dear Will,

I checked with my Fedora 44 desktop, and Arch Linux on WSL2 and in both cases I get the random number sequence you get on your Fedora 44 installation.

Could you upload the fgbasic001.out file for both distributions?

Cheers,
David

Hi Dávid,

I’ve attached 3 different versions of the fgbasic001.out (with the corresponding distro used prepended to the filename). These include: the Fedora 44 one installed with the RPM package (which agreed with FLUKA built on Arch Linux, though I no longer have the .out file from Arch since the hard drive was wiped for the Fedora install), the AlmaLinux one built on a computing cluster, and more recently, one from a WSL2 Ubuntu install, which used the DEB package. Interestingly enough, all 3 of these differ at some point (the Ubuntu and Fedora ones only differ in the last two iterations of the first cycle it looks like!). For Fluka 4-5.1 and earlier I swore that I used to have agreement with the Alma Linux and Ubuntu WSL2 installs, so this is surprising to me. Glad the Fedora results agree with your installs though. Hopefully this helps, and interested to know what the explanation is.

AlmaLinux_fgbasic001.out (97.3 KB)

Fedora44_fgbasic001.out (97.3 KB)

Ubuntu_fgbasic001.out (97.3 KB)

Thank you very much for your time and help,

--Will

Dear Will,

Thank you for your patience, could you please specify the exact version of the different Linux distributions, the version of Gfortran and the output of the command ldd --version on each system?

Thanks!

Cheers,
David

Hi Dávid,

Sorry for the wait! Here is the information you requested:

AlmaLinux built from pre-compiled libraries:

Linux Version: AlmaLinux 9.8

GFortran: 11.5.0 20240719 (Red Hat 11.5.0-14)

ldd version: 2.34

Fedora 44 install from .rpm:

Linux Version: Fedora 44 (Workstation Edition)

GFortran: 16.1.1 20260515 (Red Hat 16.1.1-2)

ldd version: 2.43

WSL2 Ubuntu install from .deb:

Linux Version: Ubuntu 22.04.5 LTS

(WSL version: 2.7.8.0 Kernel: 6.18.33.1-1)

GFortran: 11.4.0 (Ubuntu 11.4.0-1ubuntu1~22.04.03)

ldd version: 2.35

Hope that helps, and sorry for the delay! Let me know if there’s any other information you’d like.

--Will

Dear Will,

thank you for the information! I was able to confirm that the difference comes from the different glibc (ldd) versions.

Glibc contains the implementations of the mathematical functions, and there can be differences in the implementation between versions. Mostly newer versions can have more accurate rounding.

This can lead – as you observed – deviation of the random number seeds on distributions, using different glibc versions.

The reason you probably didn’t see change with earlier versions of FLUKA is that in your short simulations, you likely didn’t encounter an interaction where one of the changed mathematical functions came up. However, if you run longer tests, you should see the change in the sequence.

Cheers,
David

Ah, that makes a lot of sense! Thank you very much for your help Dávid!!

--Will