Skip to content

Commit

Permalink
(Temp) print everything
Browse files Browse the repository at this point in the history
  • Loading branch information
yngve-sk committed Oct 3, 2024
1 parent 018c14a commit ab84e95
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/everest/bin/everest_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,9 @@ def _build_args_parser():


def _run_everest(options, ert_config, storage):
print("Entering site config env thingy")
with PluginSiteConfigEnv():
print("_run_everest(options, ert_config, storage):")
context = start_server(options.config, ert_config, storage)
print("Waiting for server ...")
wait_for_server(options.config, timeout=600, context=context)
Expand All @@ -91,8 +93,11 @@ def _run_everest(options, ert_config, storage):


def run_everest(options):
print(f"run_everest({options})")
breakpoint()
logger = logging.getLogger("everest_main")
server_state = everserver_status(options.config)
print(f"server_state = {everserver_status(options.config)}")

if server_is_running(options.config):
config_file = options.config.config_file
Expand All @@ -105,10 +110,10 @@ def run_everest(options):
)
elif server_state["status"] == ServerStatus.never_run or options.new_run:
config_dict = options.config.to_dict()
logger.info("Running everest with config info\n {}".format(config_dict))
print("Running everest with config info\n {}".format(config_dict))
for fm_job in options.config.forward_model or []:
job_name = fm_job.split()[0]
logger.info("Everest forward model contains job {}".format(job_name))
print("Everest forward model contains job {}".format(job_name))

with PluginSiteConfigEnv():
ert_config = ErtConfig.with_plugins().from_dict(
Expand All @@ -123,6 +128,7 @@ def run_everest(options):
_run_everest(options, ert_config, storage)

server_state = everserver_status(options.config)
print(f"server_state = {everserver_status(options.config)}")
server_state_info = server_state["message"]
if server_state["status"] == ServerStatus.failed:
logger.error("Everest run failed with: {}".format(server_state_info))
Expand Down
1 change: 1 addition & 0 deletions src/everest/detached/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ def start_server(config: EverestConfig, ert_config: ErtConfig, storage):
file_path=os.path.join(log_dir, "simulations.log"),
log_level=logging.INFO,
)
print("Configured loggers")

global _server # noqa: PLW0603
global _context # noqa: PLW0603
Expand Down

0 comments on commit ab84e95

Please sign in to comment.