Skip to content

Commit

Permalink
ORCA settings: oversubscribe and set host (#101)
Browse files Browse the repository at this point in the history
* Oversubscribe ORCA

* Ruff formatting for pull request
  • Loading branch information
alex-l-m authored Dec 20, 2024
1 parent 5ab0138 commit e5995f4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion bluephos/modules/dft_calculators.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import logging
import multiprocessing
import os
import socket
import subprocess
from textwrap import dedent

Expand Down Expand Up @@ -114,7 +115,10 @@ def run_orca_command(input_file, output_file, orca_path):
"""
Run the ORCA command and log outputs.
"""
command = [orca_path, input_file]
this_host = socket.gethostname()
mpi_options = f"--oversubscribe --host {this_host}"
command = [orca_path, input_file, mpi_options]
logging.info(f"Running ORCA command: {command}")
with open(output_file, "w") as output:
result = subprocess.run(command, stdout=output, stderr=subprocess.PIPE, check=True, text=True)
if result.stderr: # Check if stderr is not empty
Expand Down

0 comments on commit e5995f4

Please sign in to comment.