From 880851a69ae39732491672580eeac1b6a3a13037 Mon Sep 17 00:00:00 2001 From: John Halley Gotway Date: Fri, 3 Nov 2023 11:40:46 -0600 Subject: [PATCH] Per #2724, OpenMP was added when both ensemble-stat and gen-ens-prod were computing NMEP outputs. That was removed from ensemble-stat in MET version 11.1 but the OpenMP setup remained there. This removes it from ensemble-stat and updates the documentation to accurately indicate that OpenMP currently applies to gen-ens-prod, grid-stat, and now mode. --- docs/Users_Guide/config_options.rst | 12 ++++++++++-- src/tools/core/ensemble_stat/ensemble_stat.cc | 5 ----- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/docs/Users_Guide/config_options.rst b/docs/Users_Guide/config_options.rst index 35805c71d3..92470cfda5 100644 --- a/docs/Users_Guide/config_options.rst +++ b/docs/Users_Guide/config_options.rst @@ -459,12 +459,20 @@ Regions of parallelized code are: * :code:`fractional_coverage (data_plane_util.cc)` + * Called by `gen_ens_prod` to compute NMEP outputs. + * Called by `grid_stat` when applying neighborhood verification methods. + + * :code:`ShapeData::conv_filter_circ() (shapedata.cc)` + + * Called by `mode` to apply a convolution smoothing operation when + defining objects. + Only the following top-level executables can presently benefit from OpenMP parallelization: * :code:`grid_stat` - * :code:`ensemble_stat` * :code:`grid_ens_prod` + * :code:`mode` **Thread Binding** @@ -474,7 +482,7 @@ guarantees that threads remain evenly distributed across the available cores. Otherwise, the operating system may migrate threads between cores during a run. OpenMP provides some environment variables to handle this: :code:`OMP_PLACES` -and :code:`OMP_PROC_BIND`. We anticipate that the effect of setting only +and :code:`OMP_PROC_BIND`. We anticipate that the effect of setting only :code:`OMP_PROC_BIND=true` would be neutral-to-positive. However, there are sometimes compiler-specific environment variables. Instead, diff --git a/src/tools/core/ensemble_stat/ensemble_stat.cc b/src/tools/core/ensemble_stat/ensemble_stat.cc index 62885a5f5e..b778e97f2f 100644 --- a/src/tools/core/ensemble_stat/ensemble_stat.cc +++ b/src/tools/core/ensemble_stat/ensemble_stat.cc @@ -99,8 +99,6 @@ using namespace netCDF; #include "nc_obs_util.h" #include "nc_point_obs_in.h" -#include "handle_openmp.h" - #ifdef WITH_PYTHON #include "data2d_nc_met.h" #include "pointdata_python.h" @@ -177,9 +175,6 @@ static void set_compress(const StringArray &); int met_main(int argc, char *argv[]) { - // Set up OpenMP (if enabled) - init_openmp(); - // Process the command line arguments process_command_line(argc, argv);