I'm trying to build ngsolve with MUMPS, MPI, and MKL on two 64-bit machines running Ubuntu 20.04 and 22.04 respectively. (I'm using virtual machine instances for now, in case it matters).
I managed to get things up and running on 20.04, but not on 22. Particularly, I can configure the make file with no error, but
make raises a number of errors in
ana_orderings_wrappers_m.F. Something like the following (lines:315:39):
Error: Rank mismatch between actual argument at (1) and actual argument at (2) (scalar and rank-1)
make[6]: *** [Makefile:381: ana_orderings_wrappers_m.o] Error 1
make[5]: *** [Makefile:20: c] Error 2
make[4]: *** [Makefile:40: mumps_lib] Error 2
make[3]: *** [Makefile:18: c] Error 2
make[2]: *** [CMakeFiles/project_mumps.dir/build.make:86: dependencies/src/project_mumps-stamp/project_mumps-build] Error 2
make[1]: *** [CMakeFiles/Makefile2:254: CMakeFiles/project_mumps.dir/all] Error 2
make: *** [Makefile:156: all] Error 2
These are my steps for installing ngsolve on Ubuntu 20.04
:
- I installed the dependencies mentioned in the docs.
- In addition, I installed all MP implementations, as well as MKL as follows:
- sudo apt-get install openmpi-bin libopenmpi-dev mpich intel-mkl-full
- I added the installation locations to my path so that make can find these packages later (although, probably I could have given them as argument too)
- After a number of trials, turned out for running the example files I need to install mpi4python and mkl (in my python environment) which I did using pip3.
- python3 -m pip install mpi4py mkl
- And finally configured my makefile as follows:
-
Code:
cmake -DCMAKE_INSTALL_PREFIX=${BASEDIR}/ngsolve-install -DUSE_MKL=ON -DMKL_INCLUDE_DIR=/usr/include/mkl -DMKL_STATIC=OFF -DMKL_SDL=OFF -DMKL_MULTI_THREADED=OFF -DUSE_MPI=ON -DUSE_OCC=ON -DUSE_MUMPS=ON -DBUILD_STUB_FILES=OFF ${BASEDIR}/ngsolve-src
My questions:
1. Why isn't this procedure work in Ubuntu 22.04? It seems to me the code is not compiled. But unfortunately, my understanding of Fortran is next to nothing.
2. I had a painful experience with installing MPICH and openMP side by side, especially on a cluster, and I reckon that what I have done above is actually a bad practice. How can I avoid that?
4. I failed to installed with BLAS/LAPACK and that's why I switched to MKL. But is it necessary? Can I avoid these extra installations?
Thanks!