From 293a114a1ad5db1e1293534674111a99362716ef Mon Sep 17 00:00:00 2001 From: liangjg Date: Fri, 2 Nov 2018 16:05:27 -0400 Subject: [PATCH] fix crash when a material is never used for MG mode --- src/mgxs_data.F90 | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/mgxs_data.F90 b/src/mgxs_data.F90 index 90178a015d..fee40ebcf7 100644 --- a/src/mgxs_data.F90 +++ b/src/mgxs_data.F90 @@ -126,13 +126,9 @@ contains name = trim(mat % name) // C_NULL_CHAR - ! Do not read materials which we do not actually use in the problem to - ! reduce storage - if (allocated(kTs(i_mat) % data)) then - call create_macro_xs_c(name, mat % n_nuclides, mat % nuclide, & - kTs(i_mat) % size(), kTs(i_mat) % data, mat % atom_density, & - temperature_tolerance, temperature_method) - end if + call create_macro_xs_c(name, mat % n_nuclides, mat % nuclide, & + kTs(i_mat) % size(), kTs(i_mat) % data, mat % atom_density, & + temperature_tolerance, temperature_method) end do end subroutine create_macro_xs