Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not bind process in MacOS #476

Merged
merged 2 commits into from
Oct 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@
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

Check warning on line 130 in kwave/options/simulation_execution_options.py

View check run for this annotation

Codecov / codecov/patch

kwave/options/simulation_execution_options.py#L130

Added line #L130 was not covered by tests
if PLATFORM != "darwin":
system_string += "OMP_PLACES=cores" + sys_sep_str

Check warning on line 132 in kwave/options/simulation_execution_options.py

View check run for this annotation

Codecov / codecov/patch

kwave/options/simulation_execution_options.py#L132

Added line #L132 was not covered by tests

if self.thread_binding is not None:
if PLATFORM == "darwin":
raise ValueError("Thread binding is not supported in MacOS.")

Check warning on line 136 in kwave/options/simulation_execution_options.py

View check run for this annotation

Codecov / codecov/patch

kwave/options/simulation_execution_options.py#L136

Added line #L136 was not covered by tests
# 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

Check warning on line 145 in kwave/options/simulation_execution_options.py

View check run for this annotation

Codecov / codecov/patch

kwave/options/simulation_execution_options.py#L145

Added line #L145 was not covered by tests

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