Why does mpich not install correctly


Answer: 1

24 hours ago

I'm on 16.04. When I

sudo apt-get install mpich

and check the lib directory


it contains the include dir as expected, but the lib directory within it:


is a symbolic link to:


So as far as I can tell, there are no lib files and I can't compile code because it doesn't find the mpich libraries.

/usr/lib/mpich$ readlink -f lib



Here are the compilation and link commands:

ifort -warn none -O2 -I/usr/include/mpich/ -c boundary.F90 -o boundary.o

ifort -o boundary.o -lmpi

and the error is:

boundary.F90:(.text+0xaa): undefined reference to `mpi_sendrecv_'

and the link directory is


Added by: Monte Feil

Answer: 2

12 hours ago

The mpich package only contains the program binaries necessary to run MPICH programs.

You will need to install the libmpich-dev package which includes the MPICH headers and static libraries, as well as the compiler wrappers needed to build MPICH programs.

Based on the error message you provided, the issue is not that mpich is not installed correctly, but that you are failing to link the necessary library for the function in question, which appears to be libmpichfort

i.e. you need to add


to your link command.

Added by: Marian Donnelly IV

Popular Search

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 1 2 3 4 5 6 7 8 9