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

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


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[i] = pow(1.0f + notCorrelatedUniforms[i], coeff1);
    // double precision version of "pow" works fine !
    //correlatedUniforms[i] = pow(1.0 + (double)notCorrelatedUniforms[i], (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.

9 posts / 0 new

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


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.


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


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


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.


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


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.

 


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

 

Leave a Comment

Please sign in to add a comment. Not a member? Join today