Skip to content

Commit 968d955

Browse files
authored
Merge pull request #9079 from gem/slow_mode
Disabled SLOW MODE on macOS
2 parents 43cd4fe + 3c2c916 commit 968d955

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

debian/changelog

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
[Michele Simionato]
2+
* Disabled SLOW MODE on macOS, since the free memory is not to be trusted
23
* Speeding up `count_ruptures` for multifault sources, which gives a *huge*
34
in some calculations (like event_based for Dominican Republic)
45

openquake/calculators/base.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,10 @@ def read_inputs(self):
470470
dist = parallel.oq_distribute()
471471
avail = psutil.virtual_memory().available / 1024**3
472472
required = .5 * (1 if dist == 'no' else parallel.Starmap.num_cores)
473-
if dist == 'processpool' and avail < required:
473+
if (dist == 'processpool' and avail < required and
474+
sys.platform != 'darwin'):
475+
# macos tells that there is no memory when there is, so we
476+
# must not enter in SLOW MODE there
474477
msg = ('Entering SLOW MODE. You have %.1f GB available, but the '
475478
'engine would like at least 0.5 GB per core, i.e. %.1f GB: '
476479
'https://github.com/gem/oq-engine/blob/master/doc/faq.md'

0 commit comments

Comments
 (0)