Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.
7108 Discussions

Composer 2019 up2 -- Link error: _powf already defined in mkl_core.lib

Guillaume_A_
New Contributor I
2,683 Views

Hello,

Since I upgraded Composer from 2018 up3 to 2019 up2 I am getting linker errors such as: libmmd.lib(libmmd.dll) : : error LNK2005: _powf already defined in mkl_core.lib(_avx512_dgetri_small.obj). 

It appears when I am try to compile with ICC in 32bit (/Qm32) and disable optimization (/QOd). It compiles and links well with /Qm32 and optimization options (/O3, or /O2, ...). It also compiles and links fine in 64bit (/Qm64) with or without optimization.

You may reproduce with this simple code:

void AvxCopulaFunction::claytonCopulaIterationF(float* correlatedUniforms,const float* notCorrelatedUniforms,const float coeff1,const int length)
{
  __pragma(ivdep)
  for (int i = 0; i < length; i++)
  {
    correlatedUniforms = pow(1.0f + notCorrelatedUniforms, coeff1);
    // double precision version of "pow" works fine !
    //correlatedUniforms = pow(1.0 + (double)notCorrelatedUniforms, (double)coeff1);
  }
}

int AvxCopulaFunction::inverseLUFactoredSquareMatrix(double* matrixToOverwrite,int* inputPivotVector,const int matrixRank)
{
  return LAPACKE_dgetri( LAPACK_ROW_MAJOR, matrixRank, matrixToOverwrite, matrixRank, inputPivotVector );
}

Could you please have a look ?

My command lines are in attachment, let me know if you need more information.

I found this topic, it is maybe related: Linker errors with Visual Fortran Compiler 19.0.1.144

My config: Win10 x64, Visual Studio 2013, Composer 2019 up2

Regards,

Guillaume A.

0 Kudos
9 Replies
Gennady_F_Intel
Moderator
2,683 Views

Guillaume, are you linking with 32 bit version of MKL?

0 Kudos
Guillaume_A_
New Contributor I
2,683 Views

Hello Gennady,

According to my command line (in attachment of my first post), I use xilink from "C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2019\windows\bin\intel64\xilink.exe". I guess it is the 64bit version indeed. But I set the Path to the 32bit libs:

 /LIBPATH:"C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2019.2.190\windows\mkl\lib\ia32_win"

I will try to link with "C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2019\windows\bin\intel64_ia32\xilink.exe"

Guillaume A.

0 Kudos
Guillaume_A_
New Contributor I
2,683 Views

Same link error with : "...intel64_ia32\xilink.exe"

0 Kudos
Gennady_F_Intel
Moderator
2,683 Views

as a work around this problem, could you please try to uncomment the following definitions in math.h:

//# define ldexpf _MS_ldexpf

and

//#define powf _MS_powf

0 Kudos
Guillaume_A_
New Contributor I
2,683 Views

Thanks, your workaround works fine Gennady. But it is unsuitable for an industrial usage :)

Could you please confirm that there is something to fix on your (Intel) side ?

Guillaume A.

0 Kudos
Gennady_F_Intel
Moderator
2,683 Views

this compiler related problem has been escalated and we will update this thread as soon as the problem will be fixed.

0 Kudos
Guillaume_A_
New Contributor I
2,683 Views

Hello,

The exact same problem appears now with Composer 2019 update 5 and Visual 2017 (BasePlatformToolset = V141).

Could you fix it again please ?

My config: Win10 x64, Visual Studio 2017, Composer 2019 up5. MKL on sequential Mode.

Regards,

Guillaume A.

 

0 Kudos
Gennady_F_Intel
Moderator
2,683 Views

Guillaume,

the fix of the problem is targeted to be fixed the nearest MKL 2020 coming very soon. We will announce this release at the top of this forum. 

thanks

 

0 Kudos
Riccardo
Beginner
2,504 Views

Dear Gennady,

I'm having this error in a Fortran project. I've updated from Parallel Studio XE 2019 to 2020 up0, but the error is still there. Has it been fixed afterwards? And if not, how can I apply the workaround?

Thanks for your reply.

Best regards,

Riccardo

0 Kudos
Reply