Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

mpicc errors while linking

Tabrez_Ali
Beginner
760 Views

Hello

I am using mpich/intel9.0 to compile a code which uses the ParMetis and Pyramid Libraries (which I have already compiled and installed). Now mpicc compiles fine but while linking I have a lot of undefined references to some fortran calls as shown below.

Any ideas as to what could be wrong here (btw the output of printenv is also attached)

Thanks in advance
Tabrez


mpicc -DCOMPLETION -I../Pyramid/adapter/include -I../Pyramid/adapter/include/Intel -Wall -std=c99 -O2 -tpp5 -c generat.c
mpicc -DCOMPLETION -I../Pyramid/adapter/include -I../Pyramid/adapter/include/Intel -Wall -std=c99 -O2 -tpp5 -c inphase.c
mpicc -DCOMPLETION -I../Pyramid/adapter/include -I../Pyramid/adapter/include/Intel -Wall -std=c99 -O2 -tpp5 -c stiff.c
mpicc -DCOMPLETION -I../Pyramid/adapter/include -I../Pyramid/adapter/include/Intel -Wall -std=c99 -O2 -tpp5 -c strain.c
mpicc -DCOMPLETION -I../Pyramid/adapter/include -I../Pyramid/adapter/include/Intel -Wall -std=c99 -O2 -tpp5 -c solver.c
mpicc -DCOMPLETION -I../Pyramid/adapter/include -I../Pyramid/adapter/include/Intel -Wall -std=c99 -O2 -tpp5 -c utility.c
mpicc -DCOMPLETION -I../Pyramid/adapter/include -I../Pyramid/adapter/include/Intel -Wall -std=c99 -O2 -tpp5 -c main.c
mpicc -v -L../Pyramid/adapter/lib -L../Pyramid/Pyramid/lib -L../Pyramid/Pyramid/ParMetis -L/opt/mpich-1.2.6/p4-intel-9.0.025/lib -L/opt/intel/compiler70/ia32/lib -o GeoFEST generat.o inphase.o stiff.o strain.o solver.o utility.o main.o -ladapter -lpyramid -lparmetis -lmetis -lfmpich -lCEPCF90 -lPEPCF90 -lintrins -lF90 -lm -i_dynamic
mpicc for 1.2.6 (release) of : 2004/08/04 11:10:38
IPO Error: unresolved : for_dealloc_allocatable
Referenced in libadapter.a(pamr_help.o)
Referenced in libpyramid.a(amr_driver.o)
Referenced in libpyramid.a(migration3D.o)
Referenced in libpyramid.a(amr_comm_mod.o)
Referenced in libpyramid.a(malloc_mod.o)
IPO Error: unresolved : for_check_mult_overflow
Referenced in libadapter.a(pamr_help.o)
Referenced in libpyramid.a(amr_driver.o)
Referenced in libpyramid.a(migration3D.o)
Referenced in libpyramid.a(err_est_mod.o)
Referenced in libpyramid.a(amr_phy_mod.o)
Referenced in libpyramid.a(amr_comm_mod.o)
Referenced in libpyramid.a(malloc_mod.o)
IPO Error: unresolved : for_allocate
Referenced in libadapter.a(pamr_help.o)
Referenced in libpyramid.a(amr_driver.o)
Referenced in libpyramid.a(migration3D.o)
Referenced in libpyramid.a(err_est_mod.o)
Referenced in libpyramid.a(amr_phy_mod.o)
Referenced in libpyramid.a(amr_comm_mod.o)
Referenced in libpyramid.a(malloc_mod.o)
IPO Error: unresolved : for_write_seq_lis
Referenced in libpyramid.a(amr_driver.o)
Referenced in libpyrami d.a(migration3D.o)
Referenced in libpyramid.a(amr_mod.o)
Referenced in libpyramid.a(amr_phy_mod.o)
Referenced in libpyramid.a(amr_comm_mod.o)
Referenced in libpyramid.a(util_shared_mod.o)
Referenced in libpyramid.a(malloc_mod.o)
Referenced in libpyramid.a(amr_util_mod.o)
IPO Error: unresolved : for_write_seq_lis_xmit
Referenced in libpyramid.a(amr_driver.o)
Referenced in libpyramid.a(migration3D.o)
Referenced in libpyramid.a(amr_mod.o)
Referenced in libpyramid.a(amr_phy_mod.o)
Referenced in libpyramid.a(amr_comm_mod.o)
Referenced in libpyramid.a(util_shared_mod.o)
Referenced in libpyramid.a(amr_util_mod.o)
IPO Error: unresolved : for_alloc_allocatable
Referenced in libpyramid.a(amr_driver.o)
Referenced in libpyramid.a(migration3D.o)
IPO Error: unresolved : for_deallocate
Referenced in libpyramid.a(amr_driver.o)
Referenced in libpyramid.a(migration3D.o)
IPO Error: unresolved : for_open
  ; Referenced in libpyramid.a(amr_driver.o)
Referenced in libpyramid.a(migration3D.o)
IPO Error: unresolved : for_write_seq_fmt
Referenced in libpyramid.a(amr_driver.o)
Referenced in libpyramid.a(migration3D.o)
IPO Error: unresolved : for_write_seq_fmt_xmit
Referenced in libpyramid.a(amr_driver.o)
Referenced in libpyramid.a(migration3D.o)
IPO Error: unresolved : for_close
Referenced in libpyramid.a(amr_driver.o)
Referenced in libpyramid.a(migration3D.o)
IPO Error: unresolved : for_stop_core
Referenced in libpyramid.a(amr_driver.o)
Referenced in libpyramid.a(migration3D.o)
Referenced in libpyramid.a(amr_mod.o)
Referenced in libpyramid.a(amr_phy_mod.o)
Referenced in libpyramid.a(amr_comm_mod.o)
Referenced in libpyramid.a(util_shared_mod.o)
Referenced in libpyramid.a(malloc_mod.o)
Referenced in libpyramid.a(amr_util_mod.o)
IPO Error: unresolved : for_date_and_time
Referenced in libpyramid.a(amr_driver.o)
IPO Error: unresolved : for_inqu ire
Referenced in libpyramid.a(migration3D.o)
IPO Error: unresolved : for_read_seq_lis
Referenced in libpyramid.a(migration3D.o)
IPO Error: unresolved : for_read_seq_lis_xmit
Referenced in libpyramid.a(migration3D.o)
IPO Error: unresolved : for_write_int_fmt
Referenced in libpyramid.a(migration3D.o)
IPO Error: unresolved : for_trim
Referenced in libpyramid.a(migration3D.o)
IPO Error: unresolved : for_concat
Referenced in libpyramid.a(migration3D.o)
Referenced in libpyramid.a(malloc_mod.o)
IPO Error: unresolved : for_adjustl
Referenced in libpyramid.a(migration3D.o)
IPO Error: unresolved : for_iargc
Referenced in libfmpich.a(farg.o)
 

0 Kudos
2 Replies
TimP
Honored Contributor III
760 Views
It looks like you have taken a link script intended for a combination of gcc and Intel Fortran 7.0. The 7.0 libraries will not work with 9.0; you must use libraries no older than those which come with the compiler.
You don't show any Fortran compilation; if you are trying to use old libraries built with ifc 7, you will not be able to link them with ifort 9.
If the main program is in Fortran, it would be better to use an mpi Fortran script (mpif77 or mpif90), set up for ifort, which knows all the compiler and mpi libraries normally required. If you want to fix this script without such a change, you will have to change the library path and figure out the corresponding library name changes. You could get hints by linking a stand-alone Fortran program with the additional option -# set.
0 Kudos
Tabrez_Ali
Beginner
760 Views
Thanks for the reply. What was confusing were certain references in the Makefiles to libCEPCF90, libF90, libIEPCF90 etc. (/opt/intel/compiler70/lib) which is why I was trying to include the 7.1 libs

Specifying the correct 9.0 lib path along with -lifcore took care of everything

Tabrez

0 Kudos
Reply