As instructed in the INSTALL file in the top directory of the tarball, I executed
cp Make.inc/Makefile.debian.PAR ./Makefile.inc
Then I ran make. However, i ran into the following error.
make[1]: Entering directory '../MUMPS_5.2.1/examples'
mpif90 -O -fopenmp -I. -I../include -I../src -c dsimpletest.F -o dsimpletest.o
mpif90 -o dsimpletest -O -fopenmp dsimpletest.o ../lib/libdmumps.a ../lib/libmumps_common.a
-L/usr/lib -lmetis -L../PORD/lib/ -lpord -L/usr/lib -lesmumps -lscotch -lscotcherr -lscalapack-
openmpi -llapack -lblas -lpthread
/usr/bin/ld: ../lib/libdmumps.a(dend_driver.o): undefined reference to symbol 'blacs_gridexit_'
//usr/lib/libblacs-openmpi.so.1: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Makefile:36: recipe for target 'dsimpletest' failed
make[1]: *** [dsimpletest] Error 1
make[1]: Leaving directory '/.../MUMPS_5.2.1/examples'
Makefile:52: recipe for target 'dexamples' failed
make: *** [dexamples] Error 2
To hunt down the source of the error, i tried each of the precisions in turn
make s # single precision real
make d # double precision real
make c # complex
make z # double complex
Each of them ran to completion. It's only the examples that were not compiling None of the following commands worked. They all failed with the same error
make sexamples
make dexamples
make cexamples
make zexamples
Common error :
mpif90 -o dsimpletest -O -fopenmp dsimpletest.o ../lib/libdmumps.a ../lib/libmumps_common.a
-L/usr/lib -lmetis -L../PORD/lib/ -lpord -L/usr/lib -lesmumps -lscotch -lscotcherr -lscalapack-
openmpi -llapack -lblas -lpthread
/usr/bin/ld: ../lib/libdmumps.a(dend_driver.o): undefined reference to symbol 'blacs_gridexit_'
//usr/lib/libblacs-openmpi.so.1: error adding symbols: DSO missing from command line
I installed all these packages that contain blacs, but still did not work
sudo apt install libscalapack-openmpi1
sudo apt install libscalapack-mpi-dev
sudo apt install libblacs-mpi-dev
sudo apt install libblacs-openmpi1
sudo apt install blacs-mpi-test blacs-test-common
What to do next ?
The examples directory inside the tarball has its own Makefile. It imports the Makefile.inc from the toplevel directory
The original Makefile.inc
If you've installed all the blacs package above, your /usr/lib will look something like this
Change the lines in Makefile.inc to
Everything started working for me. The executed compiler command is now
... as opposed to the original command without the -lblacs-openmpi linker command.
Now the examples directory contains all the built executable examples.