rodluger / starry

Tools for mapping stars and planets.
https://starry.readthedocs.io
MIT License
144 stars 33 forks source link

Out of heap space when compiling on Windows #250

Closed rodluger closed 4 years ago

rodluger commented 4 years ago

Installing starry using the MSVC C++ compiler fails because the compiler runs out of heap space:

https://dev.azure.com/rodluger/starry/_build/results?buildId=1175&view=logs&j=2d2b3007-3c5c-5840-9bb0-2b1ea49925f3&t=168f295b-0553-5364-35f7-923225ecd8b3&l=420

@dfm have you run into this before? This seems to be a limitation of MSVC for code that relies heavily on templating (as starry does). Most of the posts online suggest either breaking the code up into separate modules or doing away with some of the templates, neither of which is satisfying.

dfm commented 4 years ago

I don't remember hitting exactly this one before, but I've had some issues with Windows complaining about the depths of my templates. I don't know that I have any useful advice here though - sorry!

rodluger commented 4 years ago

OK, I found that adding the compiler flag /Zm10 (see here) solves the issue on Azure. I got the windows wheels to build, so I think we're all set!