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

clara clarazhang at gmail.com
Thu Jun 23 22:53:40 CDT 2011


Thanks so much, Pavan.
If I only use shared memory communication among processes on a single node,
how can I configure the mpich2.1.4 (except --with-pm=gforker) in order to
link libraries as little as possible?

- Clara

On Thu, Jun 23, 2011 at 10:33 PM, Pavan Balaji <balaji at mcs.anl.gov> wrote:

>
> Please see "mpicc -show" for the list of libraries you need to link with.
>
>  -- Pavan
>
>
> On 06/23/2011 09:26 PM, clara wrote:
>
>> 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
>>
>>
>>
>> ______________________________**_________________
>> mpich-discuss mailing list
>> mpich-discuss at mcs.anl.gov
>> https://lists.mcs.anl.gov/**mailman/listinfo/mpich-discuss<https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss>
>>
>
> --
> Pavan Balaji
> http://www.mcs.anl.gov/~balaji
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/mpich-discuss/attachments/20110623/c47f7f60/attachment.htm>


More information about the mpich-discuss mailing list