Intel® Fortran Compiler 16.0 User and Reference Guide

Overview: Intel® MIC Architecture

This topic only applies to Intel® Many Integrated Core Architecture (Intel® MIC Architecture).

The Intel® Fortran Compiler provides several elements to enable programming for and building binaries to run on the Intel® Many Integrated Core Architecture (Intel® MIC Architecture), including:

Code that is defined for offloading runs on an Intel® Xeon® processor-based host, running Linux* or Windows*, and on targets supporting Intel® MIC Architecture.

Programming for Intel® MIC Architecture

You can write parallel programs that offload sections of code to run on the Intel® MIC Architecture, or alternatively, that run natively on Intel® MIC Architecture. Compiling a source file that contains extensions to facilitate programming for the Intel MIC Architecture creates what is called a fat binary which contains both the host binary and an offload binary. Fat binaries can be objects, archives, or executables depending on the options used at compilation. Refer to the documentation on the Offload Extract Tool (offload_extract) for information on how to extract the offload binary from the fat binary.

The compiler provides the following language extensions to facilitate programming for Intel® MIC Architecture:

Name

Description

OFFLOAD directive

OFFLOAD_ATTRIBUTE directive

OFFLOAD_TRANSFER directive

OFFLOAD_WAIT directive

OFFLOAD BEGIN and END OFFLOAD directive

PREFETCH/NOPREFETCH directive

Directives to control the data transfer between the CPU and the coprocessor.

ATTRIBUTES OFFLOAD directive

A directive for placing variables and functions on the coprocessor.

__MIC__ preprocessor symbol

__KNC__ preprocessor symbol

__INTEL_OFFLOAD preprocessor symbol

Predefined preprocessor symbols you can use when programming for Intel® MIC Architecture.

APIs in mic_lib.f90

A set of functions for:

  • dealing with multiple coprocessors

  • calling functions on the CPU to modify the coprocessor's execution environment

  • writing code that should not be built for CPU-only execution

Building for Intel® MIC Architecture

The compiler provides the following compiler options and environment variables that you can use when building a binary for Intel® MIC Architecture:

Compiler Option

Description

The negative form of qoffload, Qoffload

Ignores language constructs for offloading.

Qmic (Windows*)

mmic (Linux*)

Builds an application that runs natively on Intel® MIC Architecture.

Qoffload-attribute-target, qoffload-attribute-target

Flags every global routine and global data object in the source file with the offload attribute target(mic).

Qoffload-option, qoffload-option

Specifies options to be used for the specified target and tool.

Qopt-report-phase:offload, qopt-report-phase=offload

Specifies the offload optimizer phase to use when optimization reports are generated.

Qopt-assume-safe-padding, qopt-assume-safe-padding

Determines whether the compiler assumes that variables and dynamically allocated memory are padded past the end of the object.

Qopt-streaming-cache-evict, qopt-streaming-cache-evict

Specifies the cache eviction level to be used by the compiler for streaming loads and stores.

Qopt-threads-per-core, qopt-threads-per-core

Informs the compiler about the number of hardware threads per core that will be used for an application.

Qopt-gather-scatter-unroll, qopt-gather-scatter-unroll

Specifies an alternative loop unroll sequence for gather and scatter loops.

The following environment variables are only a few of the available environment variables for Intel® MIC Architecture:

Environment Variable

Description

MIC_STACKSIZE

Sets the stack size on the coprocessor.

MIC_ENV_PREFIX

Controls environment variables passed to the coprocessor.

MIC_PROXY_IO

Controls the I/O proxy of stderr and stdout.

See Also