Reputation: 1017
I am trying to develop a C++ dynamic library for number crunching operations on an Intel Core i7 machine with Ubuntu 24.04 as the OS.
I use fast math libraries like Intel MKL and Intel IPP to achieve the speed. As my machine supports AVX 512, I enable the corresponding flag to achieve the computation gain using vectorization.
However, after generating the dynamic library (*.so file), when I try to develop an application that uses it, the program crashes if I use a different set of compilation flags. The application works if I use the same set of compilation flags that were used while compiling the library.
We cannot assume that a user will use the same set of flags when they compile it. What could be the reason? Is it possible to create a dynamic library that is portable across different hardware but on the same OS?
Is it possible to use the library on an Intel machine where AVX 512 is not available? We use CMake as the build system.
Upvotes: 1
Views: 86