LAM/MPI logo

LAM/MPI General User's Mailing List Archives

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

From: Timothy C Prince (tprince_at_[hidden])
Date: 2006-06-19 18:25:26


-----Original Message-----
From: "Isaac Keeheon Ye" <isaac1115_at_[hidden]>
To: lam_at_[hidden]
Date: Mon, 19 Jun 2006 16:37:11 -0400
Subject: LAM: Changing the existing compiler (from f77 -> ifort)

Hi,

I've been using lam/mpi ver.6.5.6 with f77 compiler. However, I am looking
for a easy way to change my fortran compiler from f77 to ifort.
When I compile with ifort and link with '-lmpi', it shows a lot of errors
like

[isaac_at_cfdpc8 MPI_NRBB2]$ make
ifort -r8 stream.o matrix.o gridgn.o grid.o ovel_g.o init.o cvol.o area.o
strech.o calcu.o ovel_q.o bcmod.o sip3d.o value_area.o bc_comm.o bc_pcomm.o
quick.o calcv.o calcw.o calcp.o lisolv.o calcin.o florat.o calcsm.o
umist.o-o pstream -lmpi
stream.o: In function `MAIN__':
stream.o(.text+0x36): undefined reference to `mpi_init_'
stream.o(.text+0x4d): undefined reference to `mpi_comm_rank_'
stream.o(.text+0x12a7): undefined reference to `mpi_reduce_'
stream.o(.text+0x133c): undefined reference to `mpi_bcast_'
stream.o(.text+0x1594): undefined reference to `mpi_bcast_'
stream.o(.text+0x38c3): undefined reference to `mpi_reduce_'
stream.o(.text+0x60a8): undefined reference to `mpi_finalize_'

It seems that ifort couldn't be linked with lam/mpi library. Anyone advise
me how to treat this ? do I have to reinstall lam-mpi again ?

Generally, lam must be configured and built from source, to give satisfactory operation with ifort. It may be as simple as setting the ifort environment variables by the ifortvars.[c]sh script and running lam configure, setting ifort as the Fortran compiler. You can allow lam to default to use gcc/g++, if your versions of those are consistent with your ifort version. You may be better off with a more recent version of lam, as any recent gcc will balk at the anachronisms in 6.5.6. You should find plenty of advice in the FAQ and mailing list archives.
Tim Prince