Intel® C++ Compiler 16.0 User and Reference Guide
Controls printing offload execution time and the amount of data transferred. This function only applies to Intel® MIC Architecture.
_Offload_report(integer)
Name |
Type |
Description |
---|---|---|
integer |
integer |
Possible values: 1, 2 or 3. 1: Prints the offload computation time, in seconds. 2: In addition to the information produced with value 1, adds the amount of data transferred between the CPU and the coprocessor, in bytes. 3: In addition to the information produced at value 2, gives additional details on offload activity, including device initialization, and individual variable transfers. |
This API enables you to time offload regions and measure the amount of data transferred during their execution.
Using this API is equivalent to setting the environment variable OFFLOAD_REPORT.
In the following example if the OFFLOAD_REPORT environment variable is set, the report is produced for offloads before line 20 but suppressed from line 20 to line 30.
Reporting is turned back on at line 30, and subsequent offloads have reporting enabled.
01 int main() 02 { // By default reporting is on and level is controlled by OFFLOAD_REPORT value … 10 #pragma offload target(mic) … … 20 _Offload_report(0); // Turns off offload report 21 #pragma offload target(mic) … … 30 _Offload_report(1); // Turns offload report back on … 90 }
The following examples of output are just to give you an idea of the type of output you can expect for each setting. These output examples are not connected to the code examples above.
Here is an example of output for _Offload_report(1):
[Offload] [MIC 0] [File] test.f90 [Offload] [MIC 0] [Line] 5 [Offload] [MIC 0] [Tag] Tag0 sub #1, initial pc: 12345678910 [Offload] [MIC 0] [CPU Time] 0.000000 (seconds) [Offload] [MIC 0] [MIC Time] 0.000876 (seconds)
Here is an example of output for _Offload_report(2):
[Offload] [MIC 0] [File] test.f90 [Offload] [MIC 0] [Line] 5 [Offload] [MIC 0] [Tag] Tag0 sub #1, initial pc: 12345678910 [Offload] [MIC 0] [CPU Time] 0.000000 (seconds) [Offload] [MIC 0] [CPU->MIC Data] 44 (bytes) [Offload] [MIC 0] [MIC Time] 0.001131 (seconds) [Offload] [MIC 0] [MIC->CPU Data] 4 (bytes)
Here is an example of output for _Offload_report(3):
[Offload] [MIC 0] [File] sampleC14.c [Offload] [MIC 0] [Line] 104 [Offload] [MIC 0] [Tag] Tag626 [Offload] [HOST] [Tag 626] [State] Start Offload [Offload] [HOST] [Tag 626] [State] Initialize function __offload_entry_sampleC14_c_104sample14 [Offload] [HOST] [Tag 626] [State] Send pointer data [Offload] [HOST] [Tag 626] [State] CPU->MIC pointer data 100 [Offload] [HOST] [Tag 626] [State] Gather copyin data [Offload] [HOST] [Tag 626] [State] CPU->MIC copyin data 0 [Offload] [HOST] [Tag 626] [State] Compute task on MIC [Offload] [HOST] [Tag 626] [State] Receive pointer data [Offload] [HOST] [Tag 626] [State] MIC->CPU pointer data 100 [Offload] [MIC 0] [Tag 626] [State] Start target function __offload_entry_sampleC14_c_104sample14 [Offload] [MIC 0] [Tag 626] [Var] inp_14_V$1 IN [Offload] [MIC 0] [Tag 626] [Var] micp_14_V$2 OUT [Offload] [MIC 0] [Tag 626] [Var] i OUT [Offload] [MIC 0] [Tag 626] [State] Scatter copyin data [Offload] [MIC 0] [Tag 626] [State] Gather copyout data [Offload] [MIC 0] [Tag 626] [State] MIC->CPU copyout data 4 [Offload] [HOST] [Tag 626] [State] Scatter copyout data [Offload] [MIC 0] [CPU Time] 0.000000 (seconds) [Offload] [MIC 0] [CPU->MIC Data] 100 (bytes) [Offload] [MIC 0] [MIC Time] 0.000173 (seconds) [Offload] [MIC 0] [MIC->CPU Data] 104 (bytes) PASS Sample14 Samples complete