Try using FCC=g95, not FC. LAM doesn't support the Fortran 90
bindings, so it only recognizes the F77 environment variable for the
Fortran 77 compiler.
On Jul 10, 2007, at 11:37 AM, Viding Markus wrote:
> Hi,
>
>
> I am running LAM/MPI 7.1.3 with a Linux 2.4.21-27 kernel. The
> compiler I am using is an Absoft Fortran 95 10.0. Trying to run a
> simple Hello world:
>
>
> PROGRAM HELLO
>
> INCLUDE 'mpif.h'
>
>
> INTEGER :: RANK, SIZE, IERR
>
>
> CALL MPI_INIT(IERR)
>
> CALL MPI_COMM_RANK(MPI_COMM_WORLD,RANK,IERR)
>
> CALL MPI_COMM_SIZE(MPI_COMM_WORLD,SIZE,IERR)
>
>
> PRINT *, 'Hello! I am ', RANK, 'of', SIZE
>
>
> CALL MPI_FINALIZE(IERR)
>
> STOP
>
> END PROGRAM
>
>
> ------------------------------------
>
>
> When running mpif77 -showme, I get:
>
>
> F95 -I/opt/lam/lam-7_1_3/include -L/opt/lam/lam-7_1_3/lib -llammpio
> -llamf77mpi -lmpi -llam -laio -laio -lutil -lpthread -pthread -ldl
>
>
>
> When trying to compile the application this is what happens.
>
>
> [mavi4915_at_tor10 Multi]$ mpif77 Hello.f90
>
> /tmp/a9IZW7/Hello.o(.text+0x2f): In function `MAIN__':
>
> : undefined reference to `MPI_INIT'
>
> /tmp/a9IZW7/Hello.o(.text+0x4d): In function `MAIN__':
>
> : undefined reference to `MPI_COMM_RANK'
>
> /tmp/a9IZW7/Hello.o(.text+0x6b): In function `MAIN__':
>
> : undefined reference to `MPI_COMM_SIZE'
>
> /tmp/a9IZW7/Hello.o(.text+0x1bf): In function `MAIN__':
>
> : undefined reference to `MPI_FINALIZE'
>
> collect2: ld returned 1 exit status
>
> link failed.
>
> mpif77: No such file or directory
>
>
> I read that it could have to do with the compiler used when
> installing LAM and the compiler used when compiling the
> application. So, I installed LAM forcing it to use f95 when
> configuring:
>
>
> ./configure FC=f95 -with-fc=f95 -prefix=/opt/lam/lam-7_1_3/
>
>
> Any suggestions what to try next??
>
> _______________________________________________
> This list is archived at http://www.lam-mpi.org/MailArchives/lam/
--
Jeff Squyres
Cisco Systems
|