prisms-center / phaseField

PRISMS-PF: An Open-Source Phase-Field Modeling Framework
https://prisms-center.github.io/phaseField/
Other
229 stars 119 forks source link

Would it be useful to switch to `ninja` instead of `make` #231

Open landinjm opened 2 months ago

landinjm commented 2 months ago

Ninja (https://github.com/ninja-build/ninja) seems like a good alternative to Make for compiling.

The main advantage of this is to reduce compile times when making incremental changes. I am unsure how it would affect the performance. Or if would matter for most users since the compilation time for applications is already quite fast (~1min). It would most likely save time for developers/contributors though.

landinjm commented 2 months ago

Would be worth looking into some more. Compile times added up when I was recently making changes to the equation dependency parsers ( a small change would practically cause the entire library to recompile)

landinjm commented 1 month ago

With 4 threads on my laptop make takes about 144s. Ninja takes about 144s.

That said, it may perform better with more cores. I think it is worth adding documentation for since all you have to do is:

sudo apt install ninja
cmake . -G Ninja
ninja -j n