From 14453827e8d71d2904f30cf8e1b867548d0cf8a1 Mon Sep 17 00:00:00 2001 From: Mahesh Madhav <67384846+heshpdx@users.noreply.github.com> Date: Tue, 3 Jan 2023 20:03:26 -0800 Subject: [PATCH] Convert integer cast to round() Fix for a verification error on AMD EPYC system using a Cray compiler version 15. Building with -Ofast exposed the problem. --- src/init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/init.c b/src/init.c index 61b7f5b..b5cd794 100644 --- a/src/init.c +++ b/src/init.c @@ -20,7 +20,7 @@ void calculate_derived_inputs( Input * I ) I->ntracks_2D = 2 * ( I->ntracks_2D / 2 ); - I->z_stacked = (int) ( I->height / (I->axial_z_sep * I->decomp_assemblies_ax)); + I->z_stacked = round ( I->height / (I->axial_z_sep * I->decomp_assemblies_ax)); I->ntracks = I->ntracks_2D * I->n_polar_angles * I->z_stacked; I->domain_height = I->height / I->decomp_assemblies_ax;