I’m doing some work regarding search_for_keff and was wondering about the impact of floating point error and random number generation. This post is mostly to get other’s input on expectations for the search/suggestions from their own experiences. My curiosity comes from running the same script, with the same search settings, and seeing slight differences in the search results. For example:
first search
python pincell.py --search --tol 0.8
Iteration: 1; Guess of 2.20e+03 produced a keff of 1.00982 +/- 0.00019
Iteration: 2; Guess of 2.20e+03 produced a keff of 1.00996 +/- 0.00018
Iteration: 3; Guess of 2.19e+03 produced a keff of 1.01141 +/- 0.00019
Iteration: 4; Guess of 2.30e+03 produced a keff of 1.00022 +/- 0.00020
Iteration: 5; Guess of 2.31e+03 produced a keff of 1.00027 +/- 0.00019
Iteration: 6; Guess of 2.29e+03 produced a keff of 1.00167 +/- 0.00018
Iteration: 7; Guess of 2.31e+03 produced a keff of 1.00003 +/- 0.00018
The critical boron concentration achieved with a tolerance of 0.8 was 2310.2362875938898
second search
python pincell.py --search --tol 0.8
Iteration: 1; Guess of 2.20e+03 produced a keff of 1.00982 +/- 0.00019
Iteration: 2; Guess of 2.20e+03 produced a keff of 1.00996 +/- 0.00018
Iteration: 3; Guess of 2.19e+03 produced a keff of 1.01143 +/- 0.00019
Iteration: 4; Guess of 2.30e+03 produced a keff of 1.00075 +/- 0.00018
Iteration: 5; Guess of 2.31e+03 produced a keff of 0.99986 +/- 0.00020
Iteration: 6; Guess of 2.31e+03 produced a keff of 0.99992 +/- 0.00019
Iteration: 7; Guess of 2.31e+03 produced a keff of 1.00055 +/- 0.00020
Iteration: 8; Guess of 2.31e+03 produced a keff of 1.00029 +/- 0.00020
Iteration: 9; Guess of 2.31e+03 produced a keff of 0.99994 +/- 0.00022
The critical boron concentration achieved with a tolerance of 0.8 was 2310.714525935255
third search
python pincell.py --search --tol 0.8
Iteration: 1; Guess of 2.20e+03 produced a keff of 1.00982 +/- 0.00019
Iteration: 2; Guess of 2.20e+03 produced a keff of 1.00996 +/- 0.00018
Iteration: 3; Guess of 2.19e+03 produced a keff of 1.01127 +/- 0.00019
Iteration: 4; Guess of 2.32e+03 produced a keff of 0.99934 +/- 0.00019
Iteration: 5; Guess of 2.31e+03 produced a keff of 0.99991 +/- 0.00020
Iteration: 6; Guess of 2.31e+03 produced a keff of 1.00023 +/- 0.00019
Iteration: 7; Guess of 2.31e+03 produced a keff of 0.99993 +/- 0.00017
The critical boron concentration achieved with a tolerance of 0.8 was 2307.5171242229408
It’s interesting that the first two iterations are identical between searches but then start to have differences on guess 3. In practice, if the final value satisfies the search criterium, then it shouldn’t matter how it gets there, but ideally the fewest number of searches is desired. I think playing with the tolerance would for sure be the way to minimize searches for a given number of particles / batches / etc. Looking at the results, each case is essentially statistically equivalent considering confidence intervals, so I guess these differences don’t matter too much in the end.
I think it might be impossible to generate the same search every time due to changes in the random number stream from running in parallel and/or floating point error causing differences in the guess for each iteration. Just wondering if anyone has thoughts on this (especially which things contribute to differences in searches) and/or recommendations. It seems like erring on the side of more particles will produce searches that end close to each other. I could imagine this would be more susceptible to differences with higher uncertainty in each iteration.