c_example.c (from mumps-5.1.2/examples) compiles but breaks at run-time:
> $ cc c_example.c -I /usr/local/include/ -L /usr/local/lib -ldmumps -lmpich
> $ sudo ./a.out
> ld-elf.so.1: /usr/local/lib/libdmumps.so.5: Undefined symbol "mpi_bcast_"
libdmumps.so seems to need to be linked with MPI libraries.
When MUMPS is built without the MPI option, it installs the library libmpiseq.so, which provides the missing symbols for the sequential mode.
How did you install the port and compile this example?
(In reply to Thierry Thomas from comment #1)
> How did you install the port and compile this example?
I installed it using a package. I compiled this example manually using this command line.
> [...] it installs the library libmpiseq.so, which provides the missing symbols for the sequential mode.
This means that libmumps.so is missing the link to libmpiseq.so which can be worked around by always adding -lmpiseq.
IMO this is a bug that the project fails to link their internal libraries between them.
There is also an chance that this is intended - perhaps such example can work without MPI and never trigger this error (?) and not even need the MPI libs installed.
I asked the MUMPS upstream through their ML.