Skip to content

Commit

Permalink
Runtime error if RMS in Julia does not complete
Browse files Browse the repository at this point in the history
  • Loading branch information
calvinp0 committed Apr 11, 2023
1 parent f300174 commit 334cd61
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions t3/runners/rmg_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,14 @@ def run_rmg_incore(rmg_input_file_path: str,
stdout, stderr = execute_command(commands, shell=True, no_fail=True, executable='/bin/bash')
if 'RMG threw an exception and did not converge.\n' in stderr:
return True
# Check for err file that can be generated by Julia
# Todo: Improve the error checking. This situation arose from Julia having a TypeError issue from a recent commit.
if os.path.isfile(os.path.join(project_directory, 'err.txt')):
with open(os.path.join(project_directory, 'err.txt'), 'r') as f:
lines = f.readlines()
if 'Traceback (most recent call last):\n' in lines:
# Raise an error that will inform the user that Julia has failed
raise RuntimeError('Julia has raised an error with RMS and therefore RMG cannot complete. Please check your Julia installation\n')
return False


Expand Down

0 comments on commit 334cd61

Please sign in to comment.