你已经派生过 gprMax
镜像自地址
https://gitee.com/sunhf/gprMax.git
已同步 2025-08-08 07:24:19 +08:00
Added options for Apple M1 CPUs and OpenMp
这个提交包含在:
@@ -187,7 +187,11 @@ def set_omp_threads(nthreads=None):
|
|||||||
if sys.platform == 'darwin':
|
if sys.platform == 'darwin':
|
||||||
# Should waiting threads consume CPU power (can drastically effect
|
# Should waiting threads consume CPU power (can drastically effect
|
||||||
# performance)
|
# performance)
|
||||||
os.environ['OMP_WAIT_POLICY'] = 'ACTIVE'
|
if 'Apple' in config.sim_config.hostinfo['cpuID']:
|
||||||
|
# https://developer.apple.com/documentation/apple-silicon/tuning-your-code-s-performance-for-apple-silicon
|
||||||
|
os.environ['OMP_WAIT_POLICY'] = 'PASSIVE'
|
||||||
|
else:
|
||||||
|
os.environ['OMP_WAIT_POLICY'] = 'ACTIVE'
|
||||||
|
|
||||||
# Number of threads may be adjusted by the run time environment to best
|
# Number of threads may be adjusted by the run time environment to best
|
||||||
# utilize system resources
|
# utilize system resources
|
||||||
|
在新工单中引用
屏蔽一个用户