[FLASH-USERS] Compile error from hy_uhd_energyFix declaration in hy_uhd_interface.F90

Klaus Weide klaus at flash.uchicago.edu
Wed May 27 13:04:40 EDT 2020


On Wed, 27 May 2020, Lewis,Sean wrote:

> A combination of setup parameters in FLASH4.6.2 has revealed a compile error.

Really FLASH4.6.2?  (See below.)

> The setup call:
> 
> ./setup Sedov -auto -3d +usm +gravMgrid
> 
> Will result in the following error:
> 
> hy_uhd_unsplit.F90:1167:80:
> 
> 
> 
>       call hy_uhd_energyFix(blockID,blkLimits,dt,dtOld,del,hy_eosModeAfter,noMHD=.TRUE.)
> 
>                                                                                 1
> 
> Error: Keyword argument 'nomhd' at (1) is not in the procedure
> 
> The error is seemingly corrected by updating source/physics/Hydro/HydroMain/unsplit/hy_uhd_interface.F90, specifically the following lines in the hy_udh_energyFix subroutine declaration:
> 
> 593: subroutine hy_uhd_energyFIx(blockID, blkLimits,dt,dtOld,del,eosMode,rangeSwitch,noMHD)
> 600: integer,OPTIONAL,intent(IN) :: rangeSwitch
> 601: logical,OPTIONAL,intent(IN) :: noMHD
> 
> I’d like to confirm that this is a proper fix and if any users or devs expect unforeseen issues stemming from this fix.

The arguments lists of subroutine hy_uhd_energyFix in these two places 
have to agree:

 1. the implementation in hy_uhd_energyFix.F90
 2. the interface block in hy_und_interface.F90

As far as I can see, such agreement has existed in recent FLASH code 
releases (at least for instances of these files under 
source/physics/Hydro/HydroMain/unsplit/). So it looks as if you were 
encountering a problem caused by mixed versions of source files;
like a v4.6.2 hy_und_unsplit.F90 with a pre-4.6.2 hy_und_interface.F90.

The changes that added two new optional arguments, 'rangeSwitch' and 
'noMHD', to subroutine hy_uhd_energyFix happened between FLASH 4.6.1 and 
FLASH 4.6.2. The following entry from RELEASE-NOTES is relevant:

* Corrected wrong order of operations in an MHD code path when using
  flux correction: energy corrections (proper accounting of magnetic
  energy in cells) could be applied too late in interior cells.  The
  problem only occurred in 1D MHD configurations (with the
  MHD_StaggeredMesh code), which could then lead to errors in results
  of 3T simulations.
 
At least the following files were affected:

  physics/Hydro/HydroMain/unsplit/hy_uhd_energyFix.F90
  physics/Hydro/HydroMain/unsplit/MHD_StaggeredMesh/hy_uhd_unsplit.F90 *
  physics/Hydro/HydroMain/unsplit/hy_uhd_interface.F90

You should make sure that these are all at a compatible level, presumably 
FLASH version 4.6.2 (plus any local modification you may have).

*Note the list does not include the non-MHD version
  physics/Hydro/HydroMain/unsplit/Hydro_Unsplit/hy_uhd_unsplit.F90 ;
even though hy_uhd_energyFix was changed v4.6.1 -> 4.6.2, calls to
it from THAT version of hy_uhd_unsplit did not have to change
(they did not need to use the new optional arguments).



Klaus


More information about the flash-users mailing list