Skip to content
This repository has been archived by the owner on Jul 19, 2021. It is now read-only.

Commit

Permalink
Store ensemble config nodes in an ordered map
Browse files Browse the repository at this point in the history
We observe different samplings for iteration 0 in regressions tests for
deploys built internally vs deploys built on GitHub Action and then
fetched from PyPI. This commit stores the parameter nodes in an ordered
structure (map) instead of unordered_map aiming at this making the
different builds sample the parameters in the same order.
  • Loading branch information
markusdregi committed Feb 12, 2021
1 parent 1ffee39 commit d5737fc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/enkf/ensemble_config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include <pthread.h> /* must have rw locking on the config_nodes ... */

#include <unordered_map>
#include <map>
#include <string>


Expand Down Expand Up @@ -81,7 +82,7 @@ struct ensemble_config_struct {
UTIL_TYPE_ID_DECLARATION;
pthread_mutex_t mutex;
char * gen_kw_format_string; /* format string used when creating gen_kw search/replace strings. */
std::unordered_map<std::string,enkf_config_node_type*> config_nodes; /* a hash of enkf_config_node instances - which again conatin pointers to e.g. field_config objects. */
std::map<std::string,enkf_config_node_type*> config_nodes; /* a hash of enkf_config_node instances - which again conatin pointers to e.g. field_config objects. */
field_trans_table_type * field_trans_table; /* a table of the transformations which are available to apply on fields. */
bool have_forward_init;
summary_key_matcher_type * summary_key_matcher;
Expand Down

0 comments on commit d5737fc

Please sign in to comment.