From 09e11fba0045270eef9487652cdde91d1a3b7e72 Mon Sep 17 00:00:00 2001 From: Nicolas Stauff <67026396+nstauff@users.noreply.github.com> Date: Thu, 24 Aug 2023 14:00:41 -0500 Subject: [PATCH] Update plugin_dakota.py Update with fix to plugin-dakota executable --- src/watts/plugin_dakota.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/watts/plugin_dakota.py b/src/watts/plugin_dakota.py index 06136d0..fcba5ba 100644 --- a/src/watts/plugin_dakota.py +++ b/src/watts/plugin_dakota.py @@ -3,6 +3,7 @@ import csv import json +import sys import os from pathlib import Path import pickle @@ -215,7 +216,7 @@ def _run_coupled_code(coupled_code_exec: str) -> dict: if not os.path.exists(coupled_code_exec): raise FileNotFoundError("Coupled-code script missing.") - subprocess.check_output(["python", coupled_code_exec]) + subprocess.check_output([sys.executable, coupled_code_exec]) # Read the 'opt_res.out' pickle file and # store the results to 'res_output' for data