I just wanted to point out that, as of today, the latest FPM build on conda-forge is now built with openmp so will compile your code in parallel. This update is courtesy of @awvwgk. So, now for large projects things compile way faster!
Get it with conda install fpm or pixi add fpm.
12 Likes
This is excellent news! One question though, do you know if other distribution channels could profit from that? For instance, on windows I usually prefere winget to conda to install fpm as it provides an install that is directly visible OS-user wise instead of only for the conda terminal.
And something I was wondering. Is the number of threads fixed to the available threads on the machine or can one adjust it in the fpm build CLI?
That’s a question for the FPM developers. I think you have to use the OMP_NUM_THREADS env variable? A -j argument would be nice…but i don’t think that works?
1 Like
Sure, just curious if you knew.
Exactly what I would love to see.
BTW, I uninstalled in my personal PC the fpm I had from winget and got it on conda to test the parallel build and yes, it is so much faster. Usually building stdlib with fpm was painstakingly slow, thus I was mainly building with cmake+ninja, I now see all my cores busy and the console moving forward very fast 
2 Likes
yep, OMP_NUM_THREADS is the knob here. the parallel build in fpm is openmp based, so that env var sets how many files compile at once. export it before running fpm and it should cap the thread count just fine.