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

Martin Siegert siegert at sfu.ca
Wed Oct 5 12:27:34 CDT 2005


On Wed, Oct 05, 2005 at 06:18:25PM +0200, Mark Roberts wrote:
> 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

Hi Mark,

mpicc and mpif77 require at least one argument: the program that you
want to compile. Try "mpicc prog.c" or "mpif77 prog.f".

Cheers,
Martin

-- 
Martin Siegert
Head, HPC at SFU
WestGrid Site Manager
Academic Computing Services                        phone: (604) 291-4691
Simon Fraser University                            fax:   (604) 291-4242
Burnaby, British Columbia                          email: siegert at sfu.ca
Canada  V5A 1S6




More information about the mpich-discuss mailing list