diff options
author | rhaas <rhaas@c83d129a-5a75-4d5a-9c4d-ed3a5855bf45> | 2011-11-21 15:45:12 +0000 |
---|---|---|
committer | rhaas <rhaas@c83d129a-5a75-4d5a-9c4d-ed3a5855bf45> | 2011-11-21 15:45:12 +0000 |
commit | 1849ffd65e2fe0ea4210cd92102d07061fce28d4 (patch) | |
tree | fe17b7769ebb62b7daf0309fb32bd027471aaf58 | |
parent | 692f32ab5152ae7a0a2d289b278da86e60028e51 (diff) |
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
git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinEvolve/GRHydro/trunk@301 c83d129a-5a75-4d5a-9c4d-ed3a5855bf45
-rw-r--r-- | schedule.ccl | 2 | ||||
-rw-r--r-- | src/GRHydro_ENOReconstruct.F90 | 7 |
2 files changed, 7 insertions, 2 deletions
diff --git a/schedule.ccl b/schedule.ccl index 311dcf4..409f216 100644 --- a/schedule.ccl +++ b/schedule.ccl @@ -377,11 +377,13 @@ if (CCTK_Equals(recon_method,"eno")) 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" diff --git a/src/GRHydro_ENOReconstruct.F90 b/src/GRHydro_ENOReconstruct.F90 index a4a9e10..904181e 100644 --- a/src/GRHydro_ENOReconstruct.F90 +++ b/src/GRHydro_ENOReconstruct.F90 @@ -128,8 +128,11 @@ subroutine GRHydro_ENOShutdown(CCTK_ARGUMENTS) 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 |