From d89125341565a7c381219576ec02a790516710e5 Mon Sep 17 00:00:00 2001 From: Craig Warren Date: Fri, 19 Aug 2016 16:56:20 +0100 Subject: [PATCH] Leave OMP_WAIT_POLICY set to active for Mac OS X. Seems to improve performance slightly. --- gprMax/input_cmds_singleuse.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gprMax/input_cmds_singleuse.py b/gprMax/input_cmds_singleuse.py index 962f0390..5e8a94cc 100644 --- a/gprMax/input_cmds_singleuse.py +++ b/gprMax/input_cmds_singleuse.py @@ -62,7 +62,8 @@ def process_singlecmds(singlecmds, G): # Number of threads (OpenMP) to use cmd = '#num_threads' - # os.environ['OMP_WAIT_POLICY'] = 'ACTIVE' # What to do with threads when they are waiting; can drastically effect performance + if sys.platform = 'darwin': + os.environ['OMP_WAIT_POLICY'] = 'ACTIVE' # What to do with threads when they are waiting; can drastically effect performance os.environ['OMP_DYNAMIC'] = 'FALSE' os.environ['OMP_PROC_BIND'] = 'TRUE' # Bind threads to physical cores