Hi, I tried to compile the examples of mpich in the mpich-doc package, but the fortran sample doesn't build: [goetz@klama basic]$ mpif77 -o fpi fpi.f fpi.o: In function `MAIN__': fpi.o(.text+0x3b): undefined reference to `mpi_init__' collect2: ld returned 1 exit status
Either it doesn't link to the right library, or the libraries are broken. This is the verbose output: [goetz@klama basic]$ mpif77 -echo -o fpi fpi.f + '[' 0 = 1 ']' + allargs= -o + '[' 0 = 1 ']' + linkargs= -o + compileargs= -c + gettinglinkarg=1 + DoLink=1 + '[' 1 = 1 ']' + linkargs= -o fpi + gettinglinkarg=0 + outputfilename=fpi + continue + '[' 0 = 1 ']' + allargs= -o fpi.f + '[' -s fpi.f ']' ++ expr fpi.f : '.*\(\..*\)' + ext=.f + '[' .f = .f -o .f = .F -o .f = .for -o .f = .FOR ']' + DoCompile=1 + compileargs= -c fpi.f ++ basename fpi.f .f + fname=fpi + linkobjs= fpi.o + added_link=0 + '[' -z -I ']' + FINC=-I/usr/include + status=0 + '[' 1 = 1 -o 0 = 1 ']' + '[' 0 '!=' 1 ']' + compileargs=-c -c fpi.f + eval f77 -I/usr/include -c -c fpi.f ++ f77 -I/usr/include -c -c fpi.f + status=0 + '[' 0 '!=' 0 ']' + '[' 1 = 1 -o 0 = 1 ']' + '[' -z '' ']' + LDFLAGS= + '[' mpich = mpich ']' + mpilibs=-lmpich + '[' -n '' -o '!' -s /usr/lib/libpmpich.a ']' + '[' no = yes -a '' '!=' yes ']' + '[' -n -lpmpich ']' + mpilibs=-lpmpich -lmpich -lpmpich -lmpich + '[' gcc '!=' ignore -a no = yes -a -s /usr/lib/libmpichfarg.a ']' + '[' f77 '!=' 'f77 ' ']' + F77_LAST_LDFLAGS= + eval f77 -L/usr/lib fpi.o -o fpi -lpmpich -lmpich -lpmpich -lmpich ++ f77 -L/usr/lib fpi.o -o fpi -lpmpich -lmpich -lpmpich -lmpich fpi.o: In function `MAIN__': fpi.o(.text+0x3b): undefined reference to `mpi_init__' collect2: ld returned 1 exit status + status=1 + '[' 0 = 1 ']' + exit 1 -- G�tz Waschk <> master of computer science <> University of Rostock http://wwwtec.informatik.uni-rostock.de/~waschk/waschk.asc for PGP key --> Logout Fascism! <--
