[mpich-discuss] issues when writing a simple makefile to build MPI programs

clara clarazhang at gmail.com
Thu Jun 23 21:26:05 CDT 2011


I am trying to write my makefile to build MPI programs, not use mpicc.

The gcc command line and the output error messages are below, can anyone
help me? Thanks.

gcc -Wall -O3 -g -I/usr/include/mpich2  -o cpi cpi.c  -L/usr/lib -lmpich

/usr/lib/libmpich.so: undefined reference to `MPL_trfree'
/usr/lib/libmpich.so: undefined reference to `MPL_env2str'
/usr/lib/libmpich.so: undefined reference to `MPL_trlevel'
/usr/lib/libmpich.so: undefined reference to `MPL_trvalid'
/usr/lib/libmpich.so: undefined reference to `MPL_trmalloc'
/usr/lib/libmpich.so: undefined reference to `MPL_trspace'
/usr/lib/libmpich.so: undefined reference to `MPL_env2range'
/usr/lib/libmpich.so: undefined reference to `MPL_trcalloc'
/usr/lib/libmpich.so: undefined reference to `MPL_env2int'
/usr/lib/libmpich.so: undefined reference to `MPL_trdump'
/usr/lib/libmpich.so: undefined reference to `MPL_putenv'
/usr/lib/libmpich.so: undefined reference to `MPL_env2bool'
/usr/lib/libmpich.so: undefined reference to `MPL_trstrdup'
/usr/lib/libmpich.so: undefined reference to `MPL_trrealloc'
/usr/lib/libmpich.so: undefined reference to `MPL_TrSetMaxMem'
/usr/lib/libmpich.so: undefined reference to `MPL_trinit'
/usr/lib/libmpich.so: undefined reference to `MPL_trDebugLevel'
/usr/lib/libmpich.so: undefined reference to `MPL_trid'
collect2: ld returned 1 exit status
make: *** [mpi] Error 1

-Clara
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/mpich-discuss/attachments/20110623/056d84be/attachment.htm>


More information about the mpich-discuss mailing list