[MPICH] linking problem with mpif77/mpicc/..

Rajeev Thakur thakur at mcs.anl.gov
Wed Oct 5 13:15:51 CDT 2005


What happens if you compile a real file as "mpicc foo.c" rather than just
running mpicc?

Rajeev

> -----Original Message-----
> From: owner-mpich-discuss at mcs.anl.gov 
> [mailto:owner-mpich-discuss at mcs.anl.gov] On Behalf Of Mark Roberts
> Sent: Wednesday, October 05, 2005 11:18 AM
> To: mpich-discuss at mcs.anl.gov
> Cc: Choi Yujin; Geneviève Moguilny
> Subject: [MPICH] linking problem with mpif77/mpicc/..
> 
> Hi, I have installed mpich2-1.0.2p1 and had no error messages 
> during the
> installation process.  mpd etc all work fine.  However, when I try and
> compile a programme I get error messages like the following
> 
> [roberts at nelson ~]$ mpicc
> /usr/lib/gcc/x86_64-redhat-linux/3.4.3/../../../../lib64/crt1.o(.text
> +0x21): In function `_start':
> : undefined reference to `main'
> collect2: ld returned 1 exit status
> [roberts at nelson ~]$ mpif77
> /usr/lib/gcc/x86_64-redhat-linux/3.4.3/libfrtbegin.a(frtbegin.o)(.text
> +0x1e): In function `main':
> : undefined reference to `MAIN__'
> collect2: ld returned 1 exit status
> [roberts at nelson ~]$
> 
> Clearly something is not linked properly, but I am not sure 
> what.  I had
> the same problem trying to install the same version on 
> another machine.
> Has anyone experianced the same problem / can suggest how to fix it?
> 
> Thanks,
> 
> Mark Roberts
> 
> 
> 




More information about the mpich-discuss mailing list