Closed mattooca closed 1 year ago
I've bumped into this issue a few times already in different modules - or at least I think it is the same. NJOY2016.69 actually fixes this in GROUPR. The ENDF read routines do not read the entirety of TAB1 and LIST records by default. To do that, you need to do a "do while call moreio" after calling the tab1io and listio functions. In some modules this is not done rigorously - probably because it was assumed that the data was read in entirely anyway (e.g. Legendre coefficients were limited to just a few so no need to call moreio). While these assumptions have hold up, recent evaluations have started to break this. This is why - so far - we fixed GROUPR and ACER.
I could modify the ENDF read routines but I'm not a fan of that solution since those routines handle more than just reading data (they also copy, etc.) and the code is somewhat fragile because of that.
Anyway, with that explanation out of the way I'd like to ask for an input file and the evaluation that causes it so that I can confirm that it is what I think it is - and fix it by adding "do while call moreio" in all of the appropriate places.
LLNL is testing a candidate evaluation generated by the YAHFC code and converted to ENDF-6 by FUDGE. The file causes trouble for the 'heatr' module, and it appears to be due to the detailed energy dependence for MT=91 and MT=102 outgoing photon multiplicities. For these reactions, the outgoing photon is stored in MF=6 with 198 points (MT=91) for the photon multiplicity. The outgoing distribution is then stored as an energy-angular distribution tabulated, LAW=1.
I think the problem may be related to the use of npage in tab1io (in endf.f90): the problem only shows up if the multiplicity is longer than 153 points, or npage / 2. It appears that skip6 reads the entire TAB1 multiplicity array, but then tries to use array(npage+1) as the start of the distribution data in tab2io, so it's trying to do an integer read on floating-point data.
This is happening with the latest NJOY2016 (pulled and rebuilt this morning). I have an ENDF file (and NJOY input) to demonstrate the problem, but the ENDF file is quite large. I'll try to cut it down and send a simpler example.
Here's the traceback: