Sign up for our newsletter and get the latest big data news and analysis.

Using Libraries in Offload Mode

phi2Modern systems may contain both a host CPU and coprocessors. A heterogeneous environment would consist of a host processor compilation environment as well as a coprocessor compilation environment. Within the environments would be the compiler, a linker and standard libraries that are optimized for the platform.

Code compiled for the host CPU would be compiled for that specific environment and code compiled for the coprocessor would be optimized for that environment. Each environment might have specific libraries, both on the host system and the coprocessor system. There is thus a need for libraries to be made available for both of the environments, whether running on the Intel Xeon processor or the Intel  Xeon Phi coprocessor. For example, the Intel Math Kernel Library and the Intel Performance Primitives libraries are available for both environments.

An important note on the processor and coprocessor heterogeneous systems, is that the code continues to operate properly for systems where the coprocessor is not present. If the coprocessor is available, then the executable that was generated for the coprocessor will be used at the first offload. The executable and all of the required libraries will remain in the coprocessors memory until the application is terminated.

Remember that separate copies of the libraries are linked or loaded with the host program and the offloaded coprocessor code. Thus, there are two sets of global states, one on the processor and one on the coprocessor. Each of the different sets of code only see the state on its own processing elements, as would be expected.

The ability to develop applications independent of the hardware availability at run time is a very important concept that enables developers to take advantage of the latest and greatest processing and coprocessing power. Without having to make run time checks on hardware availability is critical to a smooth running HPC environment.

Source:  Intel, USA

Transform Data into Opportunity Accelerate analysis: Intel® Data Analytics Acceleration Library.

Resource Links: