Skip to content

Commit

Permalink
Do not bind process in MacOS (#476)
Browse files Browse the repository at this point in the history
  • Loading branch information
faridyagubbayli authored Oct 8, 2024
1 parent 781e4d1 commit 9bf2cfe
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions kwave/options/simulation_execution_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,17 +127,22 @@ def system_string(self):
sys_sep_str = " & "

# set system string to define domain for thread migration
system_string = env_set_str + "OMP_PLACES=cores" + sys_sep_str
system_string = env_set_str
if PLATFORM != "darwin":
system_string += "OMP_PLACES=cores" + sys_sep_str

if self.thread_binding is not None:
if PLATFORM == "darwin":
raise ValueError("Thread binding is not supported in MacOS.")
# read the parameters and update the system options
if self.thread_binding:
system_string = system_string + " " + env_set_str + "OMP_PROC_BIND=SPREAD" + sys_sep_str
else:
system_string = system_string + " " + env_set_str + "OMP_PROC_BIND=CLOSE" + sys_sep_str
else:
# set to round-robin over places
system_string = system_string + " " + env_set_str + "OMP_PROC_BIND=SPREAD" + sys_sep_str
if PLATFORM != "darwin":
# set to round-robin over places
system_string = system_string + " " + env_set_str + "OMP_PROC_BIND=SPREAD" + sys_sep_str

if self.system_call:
system_string = system_string + " " + self.system_call + sys_sep_str
Expand Down

0 comments on commit 9bf2cfe

Please sign in to comment.