njoy / NJOY2016

Nuclear data processing with legacy NJOY
https://www.njoy21.io/NJOY2016
Other
96 stars 86 forks source link

Groupr FENDL3.0+ fail on multiple isotopes #278

Closed Ambr0K closed 1 year ago

Ambr0K commented 1 year ago

Dear all.

I'm trying to process FENDL3.0 XS into a multi-group format, in order to compute deterministic variance reduction parameters for MC transport of a high energy fusion problem (E<=60 MeV). I must admit, I'm a bit of a novice using NJOY, hence this might be either data or code dependent. Me and our colleagues looked both at the code and the data and nothing obvious pops up.

The data in question can be obtained here: https://www-nds.iaea.org/fendl_library/websites/fendl32b/

However, a few of the files fail to process, and they fail consistently at groupr module. I've checked the U238 endf file with the CHECKR and FIZCON utilities, as well as PREPRO's fixup utilitiy, and it seems to pass.

The code seems to fail with the following files and at following lines: ENDF file routine call line Traceback n_9237_92-U-238.endf endf.f90/tablio 1002 Bad value during integer read (my investigation points to failing some time after endf line no. 6142) n_4240_42-Mo-97.endf endf.f90/lineio 852 Bad value during floating point read n_4237_42-Mo-96.endf endf.f90/lineio 852 Bad value during floating point read n_4234_42-Mo-95.endf endf.f90/lineio 852 Bad value during floating point read n_3043_30-Zn-70.endf endf.f90/lineio 852 Bad value during floating point read n_3531_35-Br-81.endf endf.f90/lineio 852 Bad value during floating point read n_4249_42-Mo-100.endf endf.f90/lineio 852 Bad value during floating point read n_4243_42-Mo-98.endf endf.f90/lineio 852 Bad value during floating point read n_0131_1-H-3.endf Stop 77 during heatr * error in findf* mat 131 mf 4 mt 2 not on tape 13 n_4231_42-Mo-94.endf endf.f90/lineio 852 Bad value during floating point read n_5725_57-La-138.endf Stop 77 during unresr error in fdunf2** energy dependent data undefined between 7.1844e+4 and 7.1844e+4 eV n_6425_64-Gd-152.endf endf.f90/lineio 852 Bad value during floating point read n_4125_41-Nb-93.endf endf.f90/lineio 852 Bad value during floating point read n_0831_8-O-18.endf endf.f90/tablio 1002 Bad value during integer read n_0825_8-O-16.endf endf.f90/lineio 852 Bad value during floating point read n_9228_92-U-235.endf endf.f90/tablio 1002 Bad value during integer read n_3131_31-Ga-71.endf endf.f90/lineio 852 Bad value during floating point read n_4225_42-Mo-92.endf endf.f90/lineio 852 Bad value during floating point read

The generic input for Njoy:

reconr 20 21 'reconstruct point-wise cross sections for XX' 4725 / 0.001 / 0 / broadr 20 21 22 4725 1 / 0.001 / 293.6 / 0 / heatr 20 22 23 / 4725 / thermr 0 23 54 / 0 4725 32 1 1 0 0 1 221 1 / 293.6 / 0.001 5.0 / unresr 20 54 24 4725 1 8 1/ 293.6 / 1e+10 1e+04 1e+03 1e+02 10 1.0 0.1 1e-04 / 0 / groupr 20 24 0 25 4725 1 1 -8 5 1 8 1 / 'neutron xsecs for XX' / 293.6 / 1e+10 1e+04 1e+03 1e+02 10 1.0 0.1 1e-04 / 46 / 1.0000e-05 4.1400e-01 1.1200e+00 3.0600e+00 1.0700e+01 3.7300e+01 1.0100e+02 2.1400e+02 4.5400e+02 1.5800e+03 3.3500e+03 1.5000e+04 2.1900e+04 2.4200e+04 3.1800e+04 5.2500e+04 1.1100e+05 1.5800e+05 2.4700e+05 3.6800e+05 4.9800e+05 6.0800e+05 7.4300e+05 8.2100e+05 1.1100e+06 1.4200e+06 1.8300e+06 2.2300e+06 2.3500e+06 2.4700e+06 3.0100e+06 3.6800e+06 4.9700e+06 6.0600e+06 7.4100e+06 8.6100e+06 1.0000e+07 1.2200e+07 1.4200e+07 1.4900e+07 1.6900e+07 1.9600e+07 2.5000e+07 3.0000e+07 4.0000e+07 5.0000e+07 6.0000e+07 / 42 / 1.0000e+03 1.0000e+04 2.0000e+04 3.0000e+04 4.5000e+04 6.0000e+04 7.0000e+04 7.5000e+04 1.0000e+05 1.5000e+05 2.0000e+05 3.0000e+05 4.0000e+05 4.5000e+05 5.1000e+05 5.1200e+05 6.0000e+05 7.0000e+05 8.0000e+05 1.0000e+06 1.3300e+06 1.3400e+06 1.5000e+06 1.6600e+06 2.0000e+06 2.5000e+06 3.0000e+06 3.5000e+06 4.0000e+06 4.5000e+06 5.0000e+06 5.5000e+06 6.0000e+06 6.5000e+06 7.0000e+06 7.5000e+06 8.0000e+06 1.0000e+07 1.2000e+07 1.4000e+07 2.0000e+07 3.0000e+07 5.0000e+07 / 950.0 11.6137 30000 / Homogeneous Flux Calculator 3 / 3 221 / 6 / 6 221 / 16 / 0 / 0 / reconr 30 31 'reconstruct point-wise cross sections for XX' 4700 / 0.001 / 0 / gaminr 30 31 0 32 / 4700 1 3 5 1 / 'gamma xsecs for XX' / 42 1.0000e+03 1.0000e+04 2.0000e+04 3.0000e+04 4.5000e+04 6.0000e+04 7.0000e+04 7.5000e+04 1.0000e+05 1.5000e+05 2.0000e+05 3.0000e+05 4.0000e+05 4.5000e+05 5.1000e+05 5.1200e+05 6.0000e+05 7.0000e+05 8.0000e+05 1.0000e+06 1.3300e+06 1.3400e+06 1.5000e+06 1.6600e+06 2.0000e+06 2.5000e+06 3.0000e+06 3.5000e+06 4.0000e+06 4.5000e+06 5.0000e+06 5.5000e+06 6.0000e+06 6.5000e+06 7.0000e+06 7.5000e+06 8.0000e+06 1.0000e+07 1.2000e+07 1.4000e+07 2.0000e+07 3.0000e+07 5.0000e+07 / -1 / 0 / matxsr 25 32 -26 / 1 'njoy2016.44' / 2 4 1 1 / '46n42g coupled library' / 'n' 'g' / 46 42 'nscat' 'ntherm' 'ng' 'gscat' / 1 1 1 2 / 1 1 2 2/ 'XX' 4725 4700 stop

Ambr0K commented 1 year ago

Dear all.

After consulting with my colleagues more experienced with NJOY, they suggested transforming the ascii ENDF to binary using the moder module, which successfully processed all of the inputs, which gave error 'endf.f90/lineio 852 Bad value during floating point read', including H3. For La-138, I've replaced the 'unresr' module with 'purr', which seems to be working just fine.

The issue for O-18, U-235 and U-238 still remains. I've contacted one of my colleagues, who was involved in the coordination of the FENDL3.2b library (Andrej Trkov), and he confirmed that there is an issue, as written above. However, he was able to process the data with the NJOY2012 (will report the exact version asap).

nathangibson14 commented 1 year ago

Hi @Ambr0K ,

@whaeck and I just looked at this. As these evaluated files grow in size, some of the reading routines in NJOY have to be updated to accommodate the new length. We recently updated this in ACER, but it seems that there are similar issues in GROUPR. I'm guessing that in switching to binary rather than ASCII, you are able to reduce the effective size of these reads aside from the egregiously longer than expected cases.

It also appears that the IAEA has already discovered this, and the version of NJOY linked on the FENDL website includes a patch that fixes this. We at LANL were not aware of this problem, so we'll make a similar change in the official version of NJOY shortly.

Note that I only debugged U-238, but I suspect all these problems are the same.

Thanks for bringing this to our attention.

Ambr0K commented 1 year ago

@nathangibson14 thank you for the detailed explanation and for pointing out the IAEA's fork, which I completely missed. Looking forward to the new version.

whaeck commented 1 year ago

The " Bad value during floating point read" should now all be resolved. The branch fix/fendl32 contains the updated code for this fix and will be part of NJOY2016.69. Wherever missing, a do while moreio was added (instead of just fixing the particular spots where the error happened). Other modules in NJOY will most likely have this issue as well but we'll fix them when it pops up.

From the list given above, I still see two remaining issues:

Ambr0K commented 1 year ago

(Andrej Trkov), and he confirmed that there is an issue, as written above. However, he was able to process the data with the NJOY2012 (will report the exact version asap).

I've just received word on the version of NJOY 2012 used, that works with O18 ,U235 and u238 as well: NJOY2012.157 with "up155" addition for groupr module.