LAM/MPI logo

LAM/MPI General User's Mailing List Archives

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

From: Christophe Peyret (christophe.peyret_at_[hidden])
Date: 2007-11-01 11:25:43


Here is a simple example:

I am trying to compile the folowing fortran program stored in file mpi1.f90

program who_am_i
  !----------------------------------
  implicit none
  include 'mpif.h'
  integer :: nb_procs,rang,code
  !----------------------------------
  call mpi_init(code)
  call mpi_comm_size(MPI_COMM_WORLD,nb_procs,code)
  call mpi_comm_rank(MPI_COMM_WORLD,rang,code)
  print *,'I am process number ',rang,'/',nb_procs
  call mpi_finalize(code)
end program who_am_i

this program compiles nicelly with lam-mpi on Mac OS X 10.4 (Tiger) and of
course, it runs.

On Leopard, things are different, compilation fails:

mpif77 mpi1.f90 -o mpi1

gives:

Royal-Gala:Examples chris$ mpif77 mpi1.f90
Undefined symbols:
  "_lam_f77init", referenced from:
      _lam_f77init$non_lazy_ptr in liblamf77mpi.a(init_f.o)
  "_lam_darwin_malloc_linker_hack", referenced from:
  "_lam_F_handles", referenced from:
      _lam_F_handles$non_lazy_ptr in liblamf77mpi.a(crank_f.o)
      _lam_F_handles$non_lazy_ptr in liblamf77mpi.a(csize_f.o)
ld: symbol(s) not found

Christophe

>>Unfortunately, I don't have access to a 10.5 machine with the intel
>>compilers, so I can't try to replicate the problem. Could you send
>>the entire error message from the compiler? It's possible (but
>>unlikely) that there's something important towards the top of the
>>error message.
>>Also, Leopard does introduce some interesting symbol mangling
>>issues. Do you have any other mixed Fortran / C codes you can try --
>>I'd be interested to see if this is just something Intel's going to
>>have to fix.
>