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??
|