I am a data scientist coming from the macOS world planning to setup an Ubuntu server machine for data analysis.
In the macOS world there are also package managers. My favorite one,
variants when installing packages. This is how it works: let's take as example the
Pnetcdf package, which are libraries to write Netcdf files in parallel, speeding up the I/O process.
Pnetcdf requires a parallel compiler in the system, which can be either
MacPorts I can choose to install
Pnetcdf using my preferred parallel compiler, for example
sudo ports install pnetcdf +openmpi (using OpenMPI), or
sudo ports install pnetcdf +mpich (using MPICH).
Similarly, I can also choose the compiler version when installing some package: I can install some package with the command
sudo install <package> +gcc5 to install it with GCC 5 or
sudo install <package> +gcc7 to install it with GCC 7.
So this is my question: is there a similar feature in Ubuntu? Still considering the
Pnetcdf example, I see that there's a package available in the repositories (https://packages.ubuntu.com/bionic/pnetcdf-bin). However, that binary seems to have been built with the OpenMPI compiler.
Is there any way I can choose to install
Pnetcdf using MPICH from the official repositories? Or would I have to compile to source code myself?
Please note that I am using
Pnetcdf as example for the question but it could really be any other of the few dozen libraries I use in my workflow.