Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.

Intel Compiler - Statically Linking SVML (Link the SVML Library in Static Link)

Royi
Novice
1,520 Views

Hello,

I use Intel Compiler to optimize simple loop:

void InitOmegaArrays(float* mCOmega, float* mSOmega, float* mI, int numRows, int numCols, float paramOmega) {

	int ii;

#ifdef __GCC__
#pragma omp parallel for simd
#pragma vector aligned always
#pragma ivdep
#else
#pragma omp parallel for
#endif
	for (ii = 0; ii < numRows * numCols; ii++)
	{
		mCOmega[ii] = cosf(paramOmega * mI[ii]);
		mSOmega[ii] = sinf(paramOmega * mI[ii]);
	}

}

I use the /fp:fast=2 flag.
As expected ICC uses SVML (Even use `sincos()`) yet it creates a dependency on svml_dispmd.dll.

Is there a way to prevent this dependency and make it link the SVML function statically?

I'm using Intel Compiler (ICC) 18.

Thank You.

0 Kudos
4 Replies
Viet_H_Intel
Moderator
1,520 Views

On Linux we have -static-intel flag, causes Intel-provided libraries to be linked in statically. If, your ENV is Linux, can you try out the option?

Thanks,

Viet

0 Kudos
Royi
Novice
1,520 Views

Hi,

I'm not on Linux (As you can see, the dependency is for DLL).

Is there anything for Windows?
Why would the compiler do that, it will be hell for those who distribute files.

0 Kudos
Viet_H_Intel
Moderator
1,520 Views

Yes, I saw you mentioned DLL but also mentioned ICC (not ICL). ICC is a driver for Linux.

We don't have the same option for Windows.

Regards,

Viet

0 Kudos
Vladimir_P_1234567890
1,520 Views

if you built with /MT static SVML library should be picket up. At least this has worked before: https://software.intel.com/en-us/articles/libraries-provided-by-intelr-c-compiler-for-windows-and-intel-parallel-composer

Or you can try to link with svml_dispmt.lib directly instead of default svml_dispmd.lib import library.

cheers,
Vladimir

0 Kudos
Reply