Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Royi
Novice
249 Views

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

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
249 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

Royi
Novice
249 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.

Viet_H_Intel
Moderator
249 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

249 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-in...

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

cheers,
Vladimir

Reply