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

Cannot detect available memory on OSX #232

Closed
jenniportman opened this issue Aug 15, 2019 · 3 comments
Closed

Cannot detect available memory on OSX #232

jenniportman opened this issue Aug 15, 2019 · 3 comments

Comments

@jenniportman
Copy link

The detect_available_mem function in the wrapper script uses SC_PHYS_PAGES which is not available on OSX:

>>> import os
>>> os.sysconf('SC_PAGE_SIZE')
4096
>>> os.sysconf('SC_PHYS_PAGES')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: unrecognized configuration name

Problematic line is:

pcount = os.sysconf('SC_PHYS_PAGES')

@voutcn
Copy link
Owner

voutcn commented Aug 16, 2019

It works with newer versions of MacOS. You can still use -m to run it.
For example, if you have 16G memory, you may try -m 15e9.

@jenniportman
Copy link
Author

It doesn't work for me on Mojave/2017 Macbook Pro.

I have been using the -m option to run it, but it would be nice to have a fix for this.

@voutcn
Copy link
Owner

voutcn commented Oct 15, 2019

Should have been fixed in https://github.com/voutcn/megahit/releases/tag/v1.2.9

@voutcn voutcn closed this as completed Oct 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants