[FLASH-BUGS] Error when lrefine_max exceeds 20
jritter at mail.utexas.edu
jritter at mail.utexas.edu
Thu Sep 1 16:56:29 CDT 2011
Hello,
I have come across a small bug in FLASH3.3 affecting users who want to
increase lrefine_max above 20. There is an integer constant in
Grid_data:
integer, parameter :: somethingBig = 20
which is used to statically allocate an array:
real, dimension(3,somethingBig) :: gr_delta
In Grid_init.F90 near line 409, there is a loop from i=1 to
lrefine_max which sets the values of gr_delta(:,i). If lrefine_max is
greater than 20, then this loop actually exceeds the dimensions of the
array and will overwrite whatever variable is next in memory. In my
case, this happened to be gr_lrefineDel, which gets set to some
positive, nonzero value. This then affects gr_maxRefine which caused
my simulation to completely derefine to the base refinement level.
The fix is to either increase somethingBig to somethingBigger, or
produce an error when lrefine_max is greater than somethingBig.
Thanks!
-Jeremy Ritter
-University of Texas, Astronomy
More information about the flash-bugs
mailing list