Skip to content

Commit

Permalink
Per #2724, OpenMP was added when both ensemble-stat and gen-ens-prod …
Browse files Browse the repository at this point in the history
…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.
  • Loading branch information
JohnHalleyGotway committed Nov 3, 2023
1 parent f297e29 commit 880851a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
12 changes: 10 additions & 2 deletions docs/Users_Guide/config_options.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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**

Expand All @@ -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,
Expand Down
5 changes: 0 additions & 5 deletions src/tools/core/ensemble_stat/ensemble_stat.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit 880851a

Please sign in to comment.