I looked for the difference between the Linux Environment Modules or Conda Environment, but I am not clear how are these different. Basically, I want to install OpenMPI and Mpich both in my Ubuntu, but they share the several compiler wrappers. To be on safe side, I want to isolate them, so what should I use - Modules or Conda Environment or any other alternative?
Also, if I use Conda Environment, can I limit the compiled software binary to the environment? I am surprised that I have installed some software in the base environment but I am able to access is from another environment.
Environment Modules is designed to enable users with software not available in the default environment. In your situation, you can install both OpenMPI and Mpich in isolated paths, then with modulefiles users can enable the MPI flavor of their choice.
This is what is provided by default when you install openmpi and mpich on a Fedora system for instance:
$ module show mpi/mpich-x86_64
-------------------------------------------------------------------
/etc/modulefiles/mpi/mpich-x86_64:
conflict mpi
setenv MPI_BIN /usr/lib64/mpich/bin
setenv MPI_SYSCONFIG /etc/mpich-x86_64
setenv MPI_FORTRAN_MOD_DIR /usr/lib64/gfortran/modules/mpich
setenv MPI_INCLUDE /usr/include/mpich-x86_64
setenv MPI_LIB /usr/lib64/mpich/lib
setenv MPI_MAN /usr/share/man/mpich-x86_64
setenv MPI_PYTHON_SITEARCH /usr/lib64/python2.7/site-packages/mpich
setenv MPI_PYTHON2_SITEARCH /usr/lib64/python2.7/site-packages/mpich
setenv MPI_PYTHON3_SITEARCH /usr/lib64/python3.6/site-packages/mpich
setenv MPI_COMPILER mpich-x86_64
setenv MPI_SUFFIX _mpich
setenv MPI_HOME /usr/lib64/mpich
prepend-path PATH /usr/lib64/mpich/bin
prepend-path LD_LIBRARY_PATH /usr/lib64/mpich/lib
prepend-path MANPATH /usr/share/man/mpich-x86_64
prepend-path PKG_CONFIG_PATH /usr/lib64/mpich/lib/pkgconfig
-------------------------------------------------------------------
$ module show mpi/openmpi-x86_64
-------------------------------------------------------------------
/usr/share/modulefiles/mpi/openmpi-x86_64:
conflict mpi
prepend-path PATH /usr/lib64/openmpi/bin
prepend-path LD_LIBRARY_PATH /usr/lib64/openmpi/lib
prepend-path PKG_CONFIG_PATH /usr/lib64/openmpi/lib/pkgconfig
prepend-path MANPATH /usr/share/man/openmpi-x86_64
setenv MPI_BIN /usr/lib64/openmpi/bin
setenv MPI_SYSCONFIG /etc/openmpi-x86_64
setenv MPI_FORTRAN_MOD_DIR /usr/lib64/gfortran/modules/openmpi
setenv MPI_INCLUDE /usr/include/openmpi-x86_64
setenv MPI_LIB /usr/lib64/openmpi/lib
setenv MPI_MAN /usr/share/man/openmpi-x86_64
setenv MPI_PYTHON_SITEARCH /usr/lib64/python2.7/site-packages/openmpi
setenv MPI_PYTHON2_SITEARCH /usr/lib64/python2.7/site-packages/openmpi
setenv MPI_PYTHON3_SITEARCH /usr/lib64/python3.6/site-packages/openmpi
setenv MPI_COMPILER openmpi-x86_64
setenv MPI_SUFFIX _openmpi
setenv MPI_HOME /usr/lib64/openmpi
-------------------------------------------------------------------
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With