Intel® Fortran Compiler 17.0 Developer Guide and Reference
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 19 but suppressed from line 19 to line 28.
Reporting is turned back on at line 28, and subsequent offloads have reporting enabled.
01 subroutine foo() 02 !dir$ ATTRIBUTES OFFLOAD:mic:: foo … 13 !dir$ offload begin target(mic:0) in(SIZ) & 14 in(pc: length(SIZ) alloc_if(.true.) free_if(.false.)) … 19 call Offload_report(0) ! turn off Offload_report 21 !dir$ offload begin target(mic:0) & … … 28 call Offload_report(1) ! turn on Offload_report 29 !dir$ offload_transfer target(mic:0) & … … 40 end
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] [HOST] [State] Initialize logical card 0 = physical card 0 [Offload] [HOST] [State] Initialize logical card 1 = physical card 1 [Offload] [MIC 0] [File] test.f90 [Offload] [MIC 0] [Line] 5 [Offload] [MIC 0] [Tag] Tag0 [Offload] [HOST] [Tag 0] [State] Start Offload [Offload] [HOST] [Tag 0] [State] Initialize function __offload_entry_test_f90_5sub_ [Offload] [HOST] [Tag 0] [State] Create buffer from Host memory [Offload] [HOST] [Tag 0] [State] Create buffer from MIC memory [Offload] [HOST] [Tag 0] [State] Create buffer from Host memory [Offload] [HOST] [Tag 0] [State] Create buffer from MIC memory [Offload] [HOST] [Tag 0] [State] Send pointer data [Offload] [HOST] [Tag 0] [State] CPU->MIC pointer data 44 [Offload] [HOST] [Tag 0] [State] Gather copyin data [Offload] [HOST] [Tag 0] [State] CPU->MIC copyin data 0 [Offload] [HOST] [Tag 0] [State] Compute task on MIC [Offload] [HOST] [Tag 0] [State] Receive pointer data [Offload] [HOST] [Tag 0] [State] MIC->CPU pointer data 0 [Offload] [MIC 0] [Tag 0] [State] Start target function __offload_entry_test_f90_5sub_ [Offload] [MIC 0] [Tag 0] [Var] sub_$SIZ_V$9 IN [Offload] [MIC 0] [Tag 0] [Var] sub_$PC_V$8 IN [Offload] [MIC 0] [Tag 0] [Var] sub_$I_V$a OUT [Offload] [MIC 0] [Tag 0] [State] Scatter copyin data sub #1, initial pc: 12345678910 [Offload] [HOST] [Tag 0] [State] Scatter copyout data [Offload] [MIC 0] [Tag 0] [State] Gather copyout data [Offload] [MIC 0] [Tag 0] [State] MIC->CPU copyout data 4 [Offload] [MIC 0] [CPU Time] 0.000000 (seconds) [Offload] [MIC 0] [CPU->MIC Data] 44 (bytes) [Offload] [MIC 0] [MIC Time] 0.000957 (seconds) [Offload] [MIC 0] [MIC->CPU Data] 4 (bytes) [Offload] [MIC 1] [State] Unregister data tables [Offload] [MIC 0] [State] Unregister data tables [Offload] [HOST] [State] Unregister data tables