From 592936f21f24dc9ca64d9662bab3d3dfcf32c12f Mon Sep 17 00:00:00 2001 From: Daniel Otto de Mentock Date: Fri, 14 Oct 2022 11:44:42 +0200 Subject: [PATCH 1/2] missing allocation statement was causing gnu and intel debug compiler to fail --- src/grid/grid_thermal_spectral.f90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/grid/grid_thermal_spectral.f90 b/src/grid/grid_thermal_spectral.f90 index c313fe1fa..a63da30f1 100644 --- a/src/grid/grid_thermal_spectral.f90 +++ b/src/grid/grid_thermal_spectral.f90 @@ -110,7 +110,7 @@ subroutine grid_thermal_spectral_init() T_current = discretization_grid_getInitialCondition('T') T_lastInc = T_current T_stagInc = T_current - dotT_lastInc = 0.0_pReal + allocate(dotT_lastInc(size(T_current,1),size(T_current,2),size(T_current,3)), source=0.0_pReal) !-------------------------------------------------------------------------------------------------- ! initialize solver specific parts of PETSc From d315aac163dc94268b2f81afee1d31d4b1b70be2 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Sat, 15 Oct 2022 21:54:03 +0200 Subject: [PATCH 2/2] use sourced allocation --- src/grid/grid_thermal_spectral.f90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/grid/grid_thermal_spectral.f90 b/src/grid/grid_thermal_spectral.f90 index a63da30f1..6192420df 100644 --- a/src/grid/grid_thermal_spectral.f90 +++ b/src/grid/grid_thermal_spectral.f90 @@ -110,7 +110,7 @@ subroutine grid_thermal_spectral_init() T_current = discretization_grid_getInitialCondition('T') T_lastInc = T_current T_stagInc = T_current - allocate(dotT_lastInc(size(T_current,1),size(T_current,2),size(T_current,3)), source=0.0_pReal) + dotT_lastInc = 0.0_pReal * T_current !-------------------------------------------------------------------------------------------------- ! initialize solver specific parts of PETSc