From 6c0d8e93e039624bf6ec32181f952b8579e98157 Mon Sep 17 00:00:00 2001 From: yisangriB Date: Sun, 9 Nov 2025 15:22:27 -0600 Subject: [PATCH] sy - for the efficiency of postprocessing (can be critical when the QoI size is very large) --- modules/Workflow/whale/main.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/modules/Workflow/whale/main.py b/modules/Workflow/whale/main.py index e3647d5e1..2fea0757b 100644 --- a/modules/Workflow/whale/main.py +++ b/modules/Workflow/whale/main.py @@ -2575,6 +2575,14 @@ def simulate_response(self, AIM_file_path='AIM.json', asst_id=None): # noqa: C9 os.chdir(asst_id) try: + + + # Open the file and count the number of lines (rows) + with open('dakotaTab.out', 'r') as file: + num_rows = sum(1 for line in file) + if num_rows<2: + raise RuntimeError(f"dakotaTab.out is empty") + # sy, abs - added try-statement because dakota-reliability does not write DakotaTab.out dakota_out = pd.read_csv( 'dakotaTab.out', sep=r'\s+', header=0, index_col=0