Visible to Intel only — GUID: GUID-9F333E92-2672-4F15-9261-AD29FE9DD3AE
Visible to Intel only — GUID: GUID-9F333E92-2672-4F15-9261-AD29FE9DD3AE
Redistribute Libraries When Deploying Applications
When you deploy your application to systems that do not have a compiler installed, you need to redistribute certain Intel® libraries which your application has dependency on. You can address this in one of the following ways:
Statically link your application:
An application built with statically-linked libraries eliminates the need to distribute runtime libraries with the application executable. By linking the application to the static libraries, you are not dependent on the dynamic shared libraries.
Dynamically link your application:
If you build your application with dynamically linked (or shared) compiler libraries, you should address the following requirements:
Determine which shared or dynamic libraries your application needs.
Build your application with shared or dynamic libraries that are redistributable.
Pay attention to the directory where the redistributables are installed and how the OS finds them.
The redistributable library installation packages are available at the following locations:
Shared Library Deployment
If your application relies on shared libraries distributed with Intel® oneAPI tools, you must make sure that your users have these shared libraries on their systems. You have two options for deploying the shared libraries from the Intel oneAPI toolkit that your application depends on:
- Private Model
-
Copy the shared libraries from the Intel oneAPI toolkit into your application environment, and then package and deploy them with your application. Review the license and third-party files associated with the Intel oneAPI toolkits and/or components you have installed to determine which files that you can redistribute.
- The advantage to this model is that you have control over your library and version choice, so you only package and deploy the libraries that you have tested.
- The disadvantage is that the end users may see multiple libraries installed on their system if multiple installed applications all use the private model. You are also responsible for updating these libraries whenever updates are required.
See Resolve Shared Library Dependencies for Private Model for details.
- Public Model
-
You direct your users to download and install runtime library packages provided by Intel. Your users install these packages on their system when they install your application. The runtime packages install to a fixed, accessible location, so all applications built with Intel oneAPI tools can find the libraries on which they depend.
- The advantage is that one copy of each library is shared by all applications. You can rely on updates to the runtime packages to resolve issues with libraries independently from when you update your application.
- The disadvantage is that the footprint of the runtime package is larger than the selected subset of libraries used in the private model. Another disadvantage is that your tested versions of the runtime libraries may not be the same as your end user's versions.
See Resolve Shared Library Dependencies for Public Model for details.
Select the model that best fits your environment, your needs, and the needs of your users.
Resolve Shared Library Dependencies for Private Model
Use these general steps to resolve application references to shared libraries in preparation for deployment using the private model.
- Determine runtime dependencies.
Use one of the following commands for each of your programs and components to list the shared libraries your application depends on:
Linux
ldd programOrComponentName
Windows
dumpbin /DEPENDENTS programOrComponentName
NOTE:These commands are adequate to list dependencies for most programs.For applications that use SYCL or OpenMP offload, additionally refer to the list of offload dependencies in Shared Library Dependencies for Device Offload to complete your list of application dependencies.
- Locate the shared libraries for redistribution. The compiler runtime package installs the shared libraries at the following locations.
Runtime libraries for applications targeting CPU natively:
Linux
<oneAPI-install-dir>/compiler/<version>/linux/compiler/lib/intel64_lin/
Windows
<oneAPI-install-dir>\compiler\<version>\windows\redist\intel64_win\compiler
Runtime libraries for applications using SYCL or OpenMP offload:
Linux
<oneAPI-install-dir>/compiler/<version>/linux/lib/
Windows
<oneAPI-install-dir>\compiler\<version>\windows\lib\
- Decide where to package your dependencies. The main requirement for this decision is to consider the ability to resolve the dependencies during the run of the application. This can be dependent on the OS and on any defined search paths that are embedded in the application or resolved with environment variables.
Resolve Shared Library Dependencies for Public Model
The following information is useful to help your users install the runtime packages provided by Intel when using the public model of deployment.
- Runtime packages are available from the oneAPI Standalone Components page
- Runtime packages instal to a fixed location:
Linux
/opt/intel/oneapi/lib
Windows
C:\Program Files (x86)\Common Files\intel\Shared Libraries
- Set application environment variables.
Linux
Depending on the location determined by the installed package, the dependencies can be resolved by setting the LD_LIBRARY_PATH environment variable or embedding the search locations via RPATH related constructs.
On macOS, Intel compilers statically link all the Intel libraries except for the OpenMP runtime library. Therefore, the Intel runtime libraries are only required for OpenMP application support. For OpenMP applications, install the appropriate C++ and/or Fortran Compiler classic runtime for macOS and set DYLD_LIBRARY_PATH=/opt/intel/oneapi/lib.
Windows
Resolution of a given dll is typically done by setting the appropriate PATH or locating the dll in the executable location. System registration is also an option.
Shared Library Dependencies for Device Offload
If your application uses offload, you need to:
- Redistribute the shared libraries that your application depends on (listed as a result of step one in section Resolve Shared Library Dependencies for Private Model).
- Redistribute the shared libraries for each target that you are programming for.
Use the following lists to identify which shared libraries are required for offload targets:
SYCL
OpenMP
Compatibility in the Minor Releases of the Intel oneAPI Products
For Intel oneAPI products, each minor version of the product is compatible with the other minor version from the same release (for example, 2021). When there are breaking changes in API or ABI, the major version is increased. For example, if you tested your application with an Intel oneAPI product with a 2021.1 version, it will work with all 2021.x versions. It is not guaranteed that it will work with 2022.x or 19.x versions.