User: rhaas Date: 2011/11/21 09:45 AM
Modified: /trunk/ schedule.ccl /trunk/src/ GRHydro_ENOReconstruct.F90
Log: allocate/deallocate ENO scalars in global mode
really all I need is that this happens only once. Allocation was already protected by a grid scalar, unfortunately deallocation did not check/reset this scalar
File Changes:
Directory: /trunk/src/ ======================
File [modified]: GRHydro_ENOReconstruct.F90 Delta lines: +5 -2 =================================================================== --- trunk/src/GRHydro_ENOReconstruct.F90 2011-11-21 15:43:52 UTC (rev 300) +++ trunk/src/GRHydro_ENOReconstruct.F90 2011-11-21 15:45:12 UTC (rev 301) @@ -128,8 +128,11 @@
CCTK_INT :: deallocstat
- deallocate(eno_coeffs, STAT = deallocstat) - if (deallocstat .ne. 0) call CCTK_WARN(0, "Failed to deallocate ENO coefficients.") + if(coeffs_allocated) then + deallocate(eno_coeffs, STAT = deallocstat) + if (deallocstat .ne. 0) call CCTK_WARN(0, "Failed to deallocate ENO coefficients.") + coeffs_allocated = .false. + endif
end subroutine GRHydro_ENOShutdown
Directory: /trunk/ ==================
File [modified]: schedule.ccl Delta lines: +2 -0 =================================================================== --- trunk/schedule.ccl 2011-11-21 15:43:52 UTC (rev 300) +++ trunk/schedule.ccl 2011-11-21 15:45:12 UTC (rev 301) @@ -377,11 +377,13 @@
schedule GRHydro_ENOSetup AT CCTK_Basegrid { + OPTIONS: global LANG:Fortran } "Coefficients for ENO reconstruction"
schedule GRHydro_ENOShutdown AT CCTK_Terminate BEFORE Driver_Terminate { + OPTIONS: global LANG:Fortran } "Deallocate ENO coefficients"
commits@lists.einsteintoolkit.org