List Info

Thread: LAM: undefined references to MPI functions




LAM: undefined references to MPI functions
user name
2006-07-13 14:24:40
Hi all,
I am trying to compile a little f90 program with LAM/MPI and I get these errors (ERROR 1).
Note that the function have an _ (underscore) character at the end. So I add -nus option to ifort
and i get the same kind of errors (ERROR 2).

Any idea how i can compile my little code?

F


ERROR 1:
$ ifort -o anneau anneau.f90 -I/opt/lam-7.0.6/include  -L/opt/lam-7.0.6/lib -lmpi -llam

/tmp/ifortNbrJ0Y.o(.text+0x21): In function `MAIN__':
: undefined reference to `mpi_init_'
/tmp/ifortNbrJ0Y.o(.text+0x35): In function `MAIN__':
: undefined reference to `mpi_comm_size_'
/tmp/ifortNbrJ0Y.o(.text+0x49): In function `MAIN__':
: undefined reference to `mpi_comm_rank_'
/tmp/ifortNbrJ0Y.o(.text+0x9f): In function `MAIN__':
: undefined reference to `mpi_send_'
/tmp/ifortNbrJ0Y.o(.text+0xcc): In function `MAIN__':
: undefined reference to `mpi_recv_'
/tmp/ifortNbrJ0Y.o(.text+0xfe): In function `MAIN__':
: undefined reference to `mpi_recv_'
/tmp/ifortNbrJ0Y.o(.text+0x133): In function `MAIN__':
: undefined reference to `mpi_send_'
/tmp/ifortNbrJ0Y.o(.text+0x222): In function `MAIN__':
: undefined reference to `mpi_finalize_'

ERROR 2:
$ ifort -o anneau anneau.f90 -I/opt/lam-7.0.6/include  -L/opt/lam-7.0.6/lib -lmpi -llam -nus

/tmp/ifortSslaQA.o(.text+0x21): In function `MAIN__':
: undefined reference to `mpi_init'
/tmp/ifortSslaQA.o(.text+0x35): In function `MAIN__':
: undefined reference to `mpi_comm_size'
/tmp/ifortSslaQA.o(.text+0x49): In function `MAIN__':
: undefined reference to `mpi_comm_rank'
/tmp/ifortSslaQA.o(.text+0x9f): In function `MAIN__':
: undefined reference to `mpi_send'
/tmp/ifortSslaQA.o(.text+0xcc): In function `MAIN__':
: undefined reference to `mpi_recv'
/tmp/ifortSslaQA.o(.text+0xfe): In function `MAIN__':
: undefined reference to `mpi_recv'
/tmp/ifortSslaQA.o(.text+0x133): In function `MAIN__':
: undefined reference to `mpi_send'
/tmp/ifortSslaQA.o(.text+0x222): In function `MAIN__':
: undefined reference to `mpi_finalize'

  ./laminfo
           LAM/MPI: 7.0.6
         ;   Prefix: /opt/lam-7.0.6
      Architecture: i686-redhat-linux-gnu
     Configured by: root
     Configured on: Fri May 27 22:45:13 PDT 2005
    Configure host: rhel4.bcgsc.ca
        C bindings: yes
      C++ bindings: yes
  Fortran bindings: yes
       C profiling: yes
     C++ profiling: yes
 Fortran profiling: yes
     ROMIO support: yes
      IMPI support: no
     Debug support: no
      Purify clean: no
          SSI boot: globus (Module v0.5)
          SSI boot: rsh (Module v1.0)
          SSI boot: tm (Module v1.0)
         ; SSI coll: lam_basic (Module v7.0)
          SSI coll: smp (Module v1.0)
           SSI rpi: crtcp (Module v1.0.1)
           SSI rpi: lamd (Module v7.0)
           SSI rpi: sysv (Module v7.0)
         ;  SSI rpi: tcp (Module v7.0)
           SSI rpi: usysv (Module v7.0)

LAM: undefined references to MPI functions
user name
2006-07-14 01:18:14
fujisan wrote:
> Hi all,
> I am trying to compile a little f90 program with
LAM/MPI and I get these 
> errors (ERROR 1).
> Note that the function have an _ (underscore) character
at the end. So I 
> add -nus option to ifort
> and i get the same kind of errors (ERROR 2).
> 
> Any idea how i can compile my little code?
> 
> F
> 
> 
> ERROR 1:
> $ ifort -o anneau anneau.f90 -I/opt/lam-7.0.6/include  
> -L/opt/lam-7.0.6/lib -lmpi -llam
If you haven't rebuilt lam from source, using the compilers
of your 
choice, do so.  I don't know any place where you could get
a pre-built 
ifort compatible lam.  If you have a g77 built version of
lam, it will 
expect double appended underscores.  A gfortran lam might
work with 
ifort, as both compilers use single appended underscores by
default.
_______________________________________________
This list is archived at http://www.l
am-mpi.org/MailArchives/lam/
[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )