So I am looking to use nix and nixos in some HPC environments and a common question that comes up is if the software is optimized for the architecture. Often times this involves using a proprietary compiler (portland group compiler, intel compiler, cray compiler etc.) and numerical libraries such as intel MKL. As far as I am aware nix by default uses
gcc as a compiler. I am not so much asking for a full fledged solutions but rather if others have tried to do this before and what a good approach would be? Is this a big undertaking if I what to change the compiler for a small subset of packages?
I still consider myself a beginner with Nix but I am comfortable with the programming language itself and have contributed several packages to nix. What would a sane approach be? Would an overlay be used to change the default compiler and replace openblas with intel mkl? This would only require that a fraction of nix packages to be rebuilt. I see nix as a HUGE win for HPC systems especially now that nix allows the store to be in an arbitrary locations, not require root, and can use the binary cache.