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

About the undefined reference to `_mm_idivrem_epi32'

zuibeidemei
Beginner
404 Views
I was trying to build a HPC model on Linux with ifort(mpif90), when it comes to the link process, it throws up "
phys_grid.F90:(.text+0x9207): undefined reference to `_mm_idivrem_epi32' , this might be a definition in ifort 's include/ia32intrin.h , can anyone tell me how to resolve that.

p.s. Platform: Linux (X86_64)
Compiler: intel fortran 11.1

0 Kudos
2 Replies
Ron_Green
Moderator
404 Views
sounds like your build of MPI is not correct for ifort.

Which MPI are you using,
did you build it yourself,
did you build it against ifort after 'source /opt/intel/Compiler/11.1/072/bin/ifortvars.sh intel64'?, setting F90 and F77 to 'ifort' in the configure?

ron
0 Kudos
TimP
Honored Contributor III
404 Views
No, Fortran doesn't use ia32intrin.h. It may use the corresponding instruction for vectorization, which could pose a problem if your binutils installation is too far out of date, or if you use something other than ifort with equivalent options to drive your link. As already advised, you want to be certain that your mpif90 is built with ifort.
If using Intel MPI, you need mpiifort, as mpif90 uses gfortran, and the mixing of gfortran and ifort will cause problems. If an open source MPI, you must follow their instructions to build an mpif90 which uses ifort, and keep your new mpif90 installation distinct from one which uses gfortran.
Among the effects you will obtain at link time with correct ifort usage is automatic linking against libsvml.
0 Kudos
Reply