devito icon indicating copy to clipboard operation
devito copied to clipboard

Autotuning breaks on Windows

Open chiefenne opened this issue 4 years ago • 3 comments

Hi, I'd like to use devito on Windows 10. In autotuning.py a Unix only module (resource) is imported, which breaks it running on Windows. I have Anaconda Python installed and run a dedicated devito environment. Any suggestions?

chiefenne avatar Oct 11 '19 12:10 chiefenne

Hi,

I'd accept a patch that changes this line

to something along the lines of

try:
     import resource
     options['stack_limit'] = resource.getrlimit(resource.RLIMIT_STACK)[0] / 4
except ImportError:
     warning(...)
     options['stack_limit'] = <some sensible values> (2 MB? 1MB?)

Any other alternative to obtaining the RLIMIT_STACK would be welcome

Thanks for pointing this out!

FabioLuporini avatar Oct 11 '19 20:10 FabioLuporini

Hi, thank you this would be good. Though I have no clue what would be a meaningful default.

chiefenne avatar Oct 12 '19 09:10 chiefenne

here it says 1 MB, so perhaps 0.75 ? with a brief comment explaining why

FabioLuporini avatar Oct 12 '19 12:10 FabioLuporini

We don't (and likely we never will) support pure Conda on Windows. However, to run on Windows, we recommend one of the three approaches here: https://github.com/devitocodes/devito/wiki/Installation-Issues#windows

Definitely WSL doesn't have the issue documented here, hence closing.

FabioLuporini avatar Aug 21 '23 12:08 FabioLuporini