[mpich-discuss] Fwd: compiling parallel programms with ifort

Anthony Chan chan at mcs.anl.gov
Wed Apr 27 13:33:50 CDT 2011


You should use mpif90 to compile and link your f90 program.
mpif90 will take care of include path and linking of various
MPICH2 internal libraries...

----- Original Message -----
> Dear there
> 
> I have installed MPICH2-1.3.2p1 on ubuntu and the installation was
> ended and
> tested successfully, When i try to compile a parallel program with
> ifort,
> it gives me error. i use this command for compiling:
> ifort heat_mpi.f90 hi.out -o
> 
> the errors that appear are as follows:
> /tmp/ifortYgvRCy.o: In function `MAIN__':
> heat_mpi.f90:(.text+0x1f8): undefined reference to `mpi_init_'
> heat_mpi.f90:(.text+0x214): undefined reference to `mpi_comm_rank_'
> heat_mpi.f90:(.text+0x230): undefined reference to `mpi_comm_size_'
> heat_mpi.f90:(.text+0x255): undefined reference to `mpi_wtime_'
> heat_mpi.f90:(.text+0x1166): undefined reference to `mpi_send_'
> heat_mpi.f90:(.text+0x11ce): undefined reference to `mpi_recv_'
> heat_mpi.f90:(.text+0x1236): undefined reference to `mpi_send_'
> heat_mpi.f90:(.text+0x1294): undefined reference to `mpi_recv_'
> heat_mpi.f90:(.text+0x149f): undefined reference to `mpi_wtime_'
> heat_mpi.f90:(.text+0x1590): undefined reference to `mpi_finalize_'
> /tmp/ifortYgvRCy.o: In function `update_':
> heat_mpi.f90:(.text+0x27f9): undefined reference to `mpi_send_'
> heat_mpi.f90:(.text+0x2858): undefined reference to `mpi_recv_'
> heat_mpi.f90:(.text+0x28b7): undefined reference to `mpi_send_'
> heat_mpi.f90:(.text+0x2911): undefined reference to `mpi_r
> 
> i have included the mpif.h file in the same directory and i added the
> paths
> of mpich2/include and mpich2/lib to the PATH variable. should i change
> some
> thing in my command? or do some thing to define the mpich2 to ifort. I
> had
> the ifort installed befor mpich2.
> 
> thanks,
> Ali.
> 
> _______________________________________________
> mpich-discuss mailing list
> mpich-discuss at mcs.anl.gov
> https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss


More information about the mpich-discuss mailing list