At line 712 of file /gpfs/home/ebreard/miniforge3/envs/mfix-25.3/share/mfix/src/model/des/sq_calc_force_superdem.f
Fortran runtime error: Index ‘2251’ of dimension 1 of array ‘fchain_midpoint’ outside of expected range (1:2250)
@jeff.dietiker , it takes 1.5h on HPC to see the error (at about 0.3s).
Hey @ebreard, didn’t you write the force chain code?
Looking quickly at the section of sq_calc_force_superdem
IF(WRITE_FORCE_CHAIN) THEN
! Resize arrays if needed
IF(FCHAINC>=FCHAINC_OLD.AND.MOD(FCHAINC,100)==0) THEN
old_size = size(FCHAIN_MIDPOINT,1)
IF(FCHAINC>=INT(0.9*old_size)) THEN
new_size = INT(1.5*old_size)
call real_grow2_reverse(FCHAIN_MIDPOINT,new_size)
FCHAIN_MIDPOINT(old_size+1:new_size,:) = UNDEFINED
....
The line
IF(FCHAINC>=FCHAINC_OLD.AND.MOD(FCHAINC,100)==0) THEN
seems questionable to me. If we need to resize, we need to resize. Why are we only doing it when FCHAINC is a multiple of 100? Can you try taking out that condition and see if the problem goes away? Change line 669 to
IF(FCHAINC>=FCHAINC_OLD) THEN
Just a hunch, but something smells fishy with that resize code.
I just ran into an issue where restart_1 failed on a SQP sim pointing to the same part of the code, replacing the line as Charles mentioned allowed the restart to go ON.