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

svrng linkage problem Linux

SGold21
Beginner
1,604 Views

Hi

I want to use the svrng  library. I am working with compiler ver 19.

On Windows I have succeeded to link and it works.

On Linux however, I get 

/tmp/ipo_icpcdgdVkz.o: In function `NoiseGen::CreateOutputs_svrng(short*, int)':
ipo_out.c:(.text+0x4fde7): undefined reference to `__regcall3__svrng_coreavx2_generate16_float'
/tmp/ipo_icpcdgdVkz.o: In function `NoiseGen::~NoiseGen()':
ipo_out.c:(.text+0x4fe41): undefined reference to `__regcall3__svrng_coreavx2_delete_distribution'
/tmp/ipo_icpcdgdVkz.o: In function `NoiseGen::~NoiseGen()':
ipo_out.c:(.text+0x4feb1): undefined reference to `__regcall3__svrng_coreavx2_delete_distribution'
/tmp/ipo_icpcdgdVkz.o: In function `NoiseGen::NoiseGen()':
ipo_out.c:(.text+0x4ff3a): undefined reference to `__regcall3__svrng_coreavx2_new_mt19937_engine'
ipo_out.c:(.text+0x4ff60): undefined reference to `__regcall3__svrng_coreavx2_new_normal_distribution_float'
/tmp/ipo_icpcdgdVkz.o: In function `NoiseGen::NoiseGen()':
ipo_out.c:(.text+0x4ffea): undefined reference to `__regcall3__svrng_coreavx2_new_mt19937_engine'
ipo_out.c:(.text+0x50010): undefined reference to `__regcall3__svrng_coreavx2_new_normal_distribution_float'

I have included libirng... 

What seems to be the problem?

Thanks

Sorin

 

0 Kudos
1 Solution
RahulV_intel
Moderator
1,604 Views

Hi Sorin,

In Linux, the compiler driver will automatically link "SVRNG" library. We have verified this on ICC/ICPC version 19.1(Ubuntu 18.04) and we didn't notice any issue/error. We are able to compile/run without using any additional flags. 

For more information, refer to this link: https://software.intel.com/en-us/cpp-compiler-developer-guide-and-reference-usage-model.

Could you try to compile/run the sample program mentioned in the above link and let us know if you are able to run it? Also let us know the exact command you have used for compilation.

 

--Rahul

 

View solution in original post

0 Kudos
4 Replies
RahulV_intel
Moderator
1,605 Views

Hi Sorin,

In Linux, the compiler driver will automatically link "SVRNG" library. We have verified this on ICC/ICPC version 19.1(Ubuntu 18.04) and we didn't notice any issue/error. We are able to compile/run without using any additional flags. 

For more information, refer to this link: https://software.intel.com/en-us/cpp-compiler-developer-guide-and-reference-usage-model.

Could you try to compile/run the sample program mentioned in the above link and let us know if you are able to run it? Also let us know the exact command you have used for compilation.

 

--Rahul

 

0 Kudos
RahulV_intel
Moderator
1,604 Views

Hi Sorin,

Kindly, let us know if you are able to compile/run the program from this link: https://software.intel.com/en-us/cpp-compiler-developer-guide-and-reference-usage-model.

 

--Rahul

0 Kudos
SGold21
Beginner
1,604 Views

Sorry for not updating.

The problem was we ticked the link with dynamic libraries option. As soon as we left all the relevant options unchecked it succeeded linkage.

Creating a solution with the example solved finding the problem.
Thank you!

0 Kudos
RahulV_intel
Moderator
1,604 Views

Hi Sorin,

Glad to hear that the solution provided helped. We are closing this thread. Feel free to reach to to us in case of further queries.

 

--Rahul

 

0 Kudos
Reply