LAM/MPI logo

LAM/MPI General User's Mailing List Archives

  |   Home   |   Download   |   Documentation   |   FAQ   |   all just in this list

From: Nihar Sanghvi (nsanghvi_at_[hidden])
Date: 2004-04-17 10:00:53


Hi,

LAM/MPI currently does not support Fortran 90. That is the reason you get
the errors.

Nihar

On Fri, 16 Apr 2004, Yiyang Sun wrote:

>Dear LAM users,
>
>I installed LAM on my dual-xeon Linux box as root, then logged in as a
>common user.
>Firstly, I "export PATH=$PATH:/opt/lam/bin". "mpif77 -showme" gives the
>following
>ifort -I/opt/lam/include -pthread -L/opt/lam/lib -llamf77mpi -lmpi -llam
>-lutil
>
>Then I compiled my first MPI program (attached below) using "mpif77
>first.f90".
>I got:
>
>/usr/bin/ld:first.f90: file format not recognized; treating as linker script
>/usr/bin/ld:first.f90:1: parse error
>collect2: ld returned 1 exit status
>mpif77: No such file or directory
>
>Seems mpif77 is trying to call g77 to compile my free-format F90 program.
>But I did "export FC=ifort" before I compile lam.
>Anyway, I "export LAMHF77=ifort". This time I got:
>
>/tmp/ifortI9TJ6x.o(.text+0x21): In function `MAIN__':
>: undefined reference to `mpi_init_'
>/tmp/ifortI9TJ6x.o(.text+0x35): In function `MAIN__':
>: undefined reference to `mpi_comm_rank_'
>/tmp/ifortI9TJ6x.o(.text+0x49): In function `MAIN__':
>: undefined reference to `mpi_comm_size_'
>/tmp/ifortI9TJ6x.o(.text+0x62): In function `MAIN__':
>: undefined reference to `mpi_type_contiguous_'
>/tmp/ifortI9TJ6x.o(.text+0x71): In function `MAIN__':
>: undefined reference to `mpi_type_commit_'
>/tmp/ifortI9TJ6x.o(.text+0xd6): In function `MAIN__':
>: undefined reference to `mpi_send_'
>/tmp/ifortI9TJ6x.o(.text+0x12f): In function `MAIN__':
>: undefined reference to `mpi_recv_'
>/tmp/ifortI9TJ6x.o(.text+0x208): In function `MAIN__':
>: undefined reference to `mpi_finalize_'
>
>Seems the libmpi.a is not linked.
>What may cause the above error messages?
>Thanks in advance.
>
>YY Sun
>
>===============================================
>first.f90
>===============================================
>PROGRAM MAIN
>include "mpif.h"
>INTEGER :: ierr,irank,nproc,ides,itag,i
>INTEGER :: istat(MPI_STATUS_SIZE)
>DOUBLE COMPLEX :: pi
>DOUBLE PRECISION :: a,b,tmp
>
>a=4.0
>b=1.0
>
>call MPI_INIT(ierr)
>call MPI_COMM_RANK(MPI_COMM_WORLD,irank,ierr)
>call MPI_COMM_SIZE(MPI_COMM_WORLD,nproc,ierr)
>
>call MPI_TYPE_CONTIGUOUS(2,MPI_DOUBLE_PRECISION,MPI_DOUBLE_COMPLEX,ierr)
>call MPI_TYPE_COMMIT(MPI_DOUBLE_COMPLEX,ierr)
>
>IF (irank.NE.0) THEN
> ides=0
> itag=irank
> tmp=a*ATAN(b)
> pi=CMPLX(tmp,tmp+b)
> call MPI_SEND(pi,1,MPI_DOUBLE_COMPLEX,ides,itag,MPI_COMM_WORLD,ierr)
>ELSE
> DO i=1,nproc-1
> itag=i
> call
>MPI_RECV(pi,1,MPI_DOUBLE_COMPLEX,MPI_ANY_SOURCE,itag,MPI_COMM_WORLD,istat,ierr)
> print *, 'message from process ',i
> print *, ' pi = ',pi
> END DO
>END IF
>
>call MPI_FINALIZE(ierr)
>
>END PROGRAM MAIN
>
>_________________________________________________________________
>Download games, logos, wallpapers and lots more at MSN Mobile!
>http://www.msn.com.sg/mobile/
>
>_______________________________________________
>This list is archived at http://www.lam-mpi.org/MailArchives/lam/
>

Powered by LAM/MPI...
---------------------------------------
Nihar Sanghvi
LAM/MPI Team
Graduate Student (Indiana University)
http://www.lam-mpi.org
--------------------------------------