0

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, MacPorts, allows 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 OpenMPI or MPICH. In 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.

  • 1
    Someone else may be able to provide another way, but packages provide binaries (for different architectures), or source-code. The source option would allow you to compile however you want (though the code itself is likely only tested with one compiler), but the binaries are pre-built. If there are different alternative packages, they'll have different names so as to allow updates work without a hitch. – guiverc Jan 17 at 6:58

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.