Intel® C++ Compiler
Support and discussions for creating C++ code that runs on platforms based on Intel® processors.
Announcements
This community is designed for sharing of public information. Please do not share Intel or third-party confidential information here.
7679 Discussions

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

Royi
Novice
527 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
527 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
527 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
527 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

Vladimir_P_Intel2
527 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