[mpich-discuss] ndefined reference to `MPI_Send'

Dave Goodell goodell at mcs.anl.gov
Tue Sep 13 09:37:49 CDT 2011


You have several problems here.  One is that you should be using the mpicc/mpif90/etc compiler wrappers if at all possible.  Otherwise, use "mpicc -show" to show all of the various libraries and other flags that you need to also link with.

Another major problem that you have is there are references to ompi_mpi_* symbols.  This means that you have somehow mixed your MPICH2 installation with some other Open MPI installation.  You must be very careful with your include paths and link paths in order to prevent problems from mixing MPI implementations.  Headers and libraries will *not* be compatible between the two.

-Dave

On Sep 13, 2011, at 1:56 AM CDT, Omid Alizadeh Choobari wrote:

> Dear Sir/Madam,
> 
> I have installed mpich2-1.4.1p1 with PGI compiler at /home/oal14/mpich. 
> I need to install Prep_sources_chem with PGI compiler which needs mpich libraries:
> These are the addresses of MPICH that I set in the /home/oal14/prep_new/Prep_sources_chem_cptec_wrf/utils/bin/include.mk  before make:
> #---------------LINUX Portland Group pgf77/gcc--------------------
> PI_PATH=/home/oal14/mpich 
> PAR_INCS=-I$(MPI_PATH)/include
> PAR_LIBS=-L$(MPI_PATH)/lib -lmpich
> PAR_DEFS=-DRAMS_MPI
> 
> The firs step ws successful and as expected "libutils-2.0-opt.a" is built.
> Then I went to /home/oal14/prep_new/Prep_sources_chem_cptec_wrf/bin directory and typed make
> 
> I have worked more than two weeks on it, but all the time it gets error about undefined reference to `MPI_Send' 
> 
> undefined reference to `MPI_Bsend'
> and so on. I have attached make.log for your consideration. It seems to me it cannot find mpich libraries, but I set the path of both in the "include,mk" and in .bashrc
> I really appreciate if you could advise me if you know a solution for this problem.
> 
> Kindest regards,
> Omid
> 
> 
> This email may be confidential and subject to legal privilege, it may
> not reflect the views of the University of Canterbury, and it is not
> guaranteed to be virus free. If you are not an intended recipient,
> please notify the sender immediately and erase all copies of the message
> and any attachments.
> 
> Please refer to http://www.canterbury.ac.nz/emaildisclaimer for more
> information.
> <make.log>_______________________________________________
> mpich-discuss mailing list     mpich-discuss at mcs.anl.gov
> To manage subscription options or unsubscribe:
> https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss



More information about the mpich-discuss mailing list