[MPICH] issues in linking stage when trying to compile one of our apps.

Greg Lindahl lindahl at pathscale.com
Tue Feb 28 01:21:49 CST 2006


Er, mpi_init_ isn't defined in mpi.h, it's a Fortran call. Does mpicxx
include the Fortran mpi library?

> My guess would be that the source file that you are trying to compile is 
> unable to locate and include mpi.h file. All these MPI calls are defined 
> in the mpi.h file. Have you included the mpi.h file in the source files?
> 
> Regards,
> Rajesh
> 
> Clements, Brent M (SAIC) wrote:
> >Hello I am getting a number of undefined references including
> > 
> >: undefined reference to `mpi_init_'
> >
> >undefined reference to `mpi_finalize_'
> >
> >and so on and so on, basically every mpi function call in our code keeps 
> >getting "undefined references"
> > 
> >Here is our command line.
> > 
> >mpicxx -ldl -lpthread -g2c -lm -I/opt/intel/fce/9.0/include -o 
> >/tmp/exec.exe *.o \
> >           /home/vip/code_vip/v2003d8/LINUX/exec_em_mpi.a\
> >           -L/home/vip/code_vip/LINUX_lib_em_mpi\
> >           -lblitzpakv2003r5\
> >           -lexcelv14r0\
> >           -lslatec\
> >           -lLINUXvdbapi\
> >           -ldbtools\
> >           -lprolib\
> >           -ls_xandcdum\
> >           -lxerces-c1_5_1\
> >           -lflex\
> >           -lLGC_CommonLicensing_pic\
> >           /opt/intel/fce/9.0/lib/libifport.a 
> >           /opt/intel/fce/9.0/lib/libifcore.a 
> >           /opt/intel/fce/9.0/lib/libimf.a  /opt/intel/fce/9.0/lib/libirc.a
> >
> >Don't mind the intel fortran library calls, we do this on purpose and 
> >we've determined that they are not the cause of the issues. 
> >Am I missing anything in the compile commandline or does it appear that 
> >anything is out of order?
> > 
> >Thanks,
> >Brent
> > 
> >
> >
> >  




More information about the mpich-discuss mailing list