From 0f7a782d0a92503c4486d7e3b00e10a44828589e Mon Sep 17 00:00:00 2001 From: mjreno Date: Thu, 29 Aug 2024 07:57:26 -0400 Subject: [PATCH 1/3] apply hdf5 build fix to linux --- meson.build | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/meson.build b/meson.build index 0857693ac68..d1c0ca1a513 100644 --- a/meson.build +++ b/meson.build @@ -194,19 +194,20 @@ endif # GCC profile options need to be netcdf aware due to HDF5 issue if fc_id == 'gcc' - if with_netcdf and build_machine.system() == 'darwin' + #if with_netcdf and build_machine.system() == 'darwin' + if with_netcdf # HDF5 1.14.3 invalid fpe trap issue: https://github.com/HDFGroup/hdf5/issues/3831 if profile == 'release' compile_args += ['-ffpe-summary=overflow', '-ffpe-trap=overflow,zero'] elif profile == 'develop' compile_args += ['-fcheck=all', '-ffpe-trap=overflow,zero'] endif - else - if profile == 'release' - compile_args += ['-ffpe-summary=overflow', '-ffpe-trap=overflow,zero,invalid'] - elif profile == 'develop' - compile_args += ['-fcheck=all', '-ffpe-trap=overflow,zero,invalid'] - endif + #else + # if profile == 'release' + # compile_args += ['-ffpe-summary=overflow', '-ffpe-trap=overflow,zero,invalid'] + # elif profile == 'develop' + # compile_args += ['-fcheck=all', '-ffpe-trap=overflow,zero,invalid'] + # endif endif endif From 0acde24deb163463e3a6b3202971720904c7ea02 Mon Sep 17 00:00:00 2001 From: mjreno Date: Thu, 29 Aug 2024 08:38:47 -0400 Subject: [PATCH 2/3] cleanup --- meson.build | 7 ------- 1 file changed, 7 deletions(-) diff --git a/meson.build b/meson.build index d1c0ca1a513..76a1473e89c 100644 --- a/meson.build +++ b/meson.build @@ -194,7 +194,6 @@ endif # GCC profile options need to be netcdf aware due to HDF5 issue if fc_id == 'gcc' - #if with_netcdf and build_machine.system() == 'darwin' if with_netcdf # HDF5 1.14.3 invalid fpe trap issue: https://github.com/HDFGroup/hdf5/issues/3831 if profile == 'release' @@ -202,12 +201,6 @@ if fc_id == 'gcc' elif profile == 'develop' compile_args += ['-fcheck=all', '-ffpe-trap=overflow,zero'] endif - #else - # if profile == 'release' - # compile_args += ['-ffpe-summary=overflow', '-ffpe-trap=overflow,zero,invalid'] - # elif profile == 'develop' - # compile_args += ['-fcheck=all', '-ffpe-trap=overflow,zero,invalid'] - # endif endif endif From b4f733f8595fb573d49dfba11a692aec6fec045f Mon Sep 17 00:00:00 2001 From: mjreno Date: Thu, 29 Aug 2024 12:29:37 -0400 Subject: [PATCH 3/3] apply expected gcc flags when netcdf not in build --- meson.build | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/meson.build b/meson.build index 76a1473e89c..a78ffe06a59 100644 --- a/meson.build +++ b/meson.build @@ -201,6 +201,12 @@ if fc_id == 'gcc' elif profile == 'develop' compile_args += ['-fcheck=all', '-ffpe-trap=overflow,zero'] endif + else + if profile == 'release' + compile_args += ['-ffpe-summary=overflow', '-ffpe-trap=overflow,zero,invalid'] + elif profile == 'develop' + compile_args += ['-fcheck=all', '-ffpe-trap=overflow,zero,invalid'] + endif endif endif