[FLASH-BUGS] Species Flux Handling with USM MHD in FLASH 4.3

Klaus Weide klaus at flash.uchicago.edu
Wed Jan 6 16:15:40 CST 2016


On Tue, 5 Jan 2016, Jason Galyardt wrote:

> Klaus,
> 
> I have had a chance to try the remaining two experiments you requested; the
> results are below. I've reverted hy_uhd_unsplit.F90 to the release version
> in FLASH 4.3. The short answer is that I'm still perplexed, but it might be
> a problem with undefined pointers (i.e. invalid targets). Do you have any
> other experiments to try?

Jason,

I am suggesting some more experiments that may help isolate the cause of 
the "ungraceful behavior" you reported.


1)
I assume you have not changed the default of runtime 
parameter use_3dFullCTU, which is TRUE.
If that is correct, please try setting it to false.

2)
If you have set use_hybridOrder to TRUE, or perhaps have changed some 
other obscure Hydro runtime parameter from the default, please revert to 
the default for testing. I am thinking of something like shockLowerCFL;
not "RiemannSolver" or "order" or "slopeLimiter" which are commonly 
adjusted.

3)
Try to change the declaration of some of the dummy arguments of subroutine
hy_uhd_DataReconstructNormalDir_MH: change

       real,intent(OUT),dimension(HY_NSPEC),   optional :: Sr,Sl

to

       real,intent(OUT),dimension(:),   optional :: Sr,Sl

You'll have to make the change consistently in
hy_uhd_DataReconstructNormalDir_MH.F90 and in hy_uhd_interface.F90.

3b)
Try to change the declaration of some of the dummy arguments of subroutine
hy_uhd_DataReconstructNormalDir_MH: change 'intent(OUT)' for Sr,Sl, and/or 
SpcSig to 'intent(INOUT)', or omit the intent completely.

Again, you will ll have to make the change consistently in
hy_uhd_DataReconstructNormalDir_MH.F90 and in hy_uhd_interface.F90.

4) There is a new attribute, CONTIGUOUS, in Fortran 2008 (I think). Your 
compiler likely supports it. If so, try marking hy_SpcR, hy_spcR, and 
hy_SpcSig as CONTIGUOUS in hy_uhd_dataReconstOneStep.F90, again with a 
corresponding change in hy_uhd_interface.F90. Maybe do the same thing in 
hy_uhd_getRiemannState.F90. Maybe even in hy_uhd_unsplit.F90. And/or for 
Sr,Sl in hy_uhd_DataReconstructNormalDir_MH.F90.

I have no experience with using this, but it looks like it could be used 
to influence when the compiler generates array temporaries for subroutine 
calls, and I suspect that the runtime error has something to do with 
automatically generated array temporaries (as per your 'var$746' message).

5)
If you have any routines in your simulation directory, 
maybe hy_uhd_addGravityUnsplit or other hy_uhd_*, that override 
regular implementations from the FLASH code, make very sure that
their interfaces agree exactly with explicit interfaces in the FLASH code, 
as in hy_uhd_interface.F90 and other *[Ii]nterface.F90 files.
Compilers may not be able to detect mismatches and silently generate
garbage.

6)
Can you run your problem without Gravity, at least for 1 time step?
(Ideally with Gravity completely omitted from the setup.)


If you try any of these suggestions, let me know how it goes!

If you can provide a small demonstration of this problem, without 
unnecessary code changes in SimulationMain and ideally in 1D or 2D,
I'll try some debugging myself, or at least check whether some other 
compilers also have the problem.

Klaus


More information about the flash-bugs mailing list