Quantcast
Channel: Intermédiaire
Viewing all articles
Browse latest Browse all 677

Using the Fortran 2008 BLOCK construct with the Intel® Xeon Phi™ coprocessor

$
0
0

The Intel® Parallel Studio XE 2015 Composer Editions for Fortran Windows* and Linux* have a feature enhancement supporting the Fortran 2008 standard BLOCK construct.

This feature support includes use with the Intel® Xeon Phi™ coprocessor where the use is within code that executes exclusively on the coprocessor but excluding inside a structured block of an OpenMP* directive. It is a general usage restriction applicable on the host and coprocessor that a BLOCK construct cannot appear inside a structured block of an OpenMP* directive and such attempted use evokes a compile-time error.

For the Intel® Xeon Phi™ coprocessor and use with offloaded code, this feature only supports use of a BLOCK construct within a the target of an offload execution, meaning inside an offloaded subprogram.

A BLOCK construct cannot appear inside a structured block of a !DIR$ OFFLOAD OMP directive or !DIR$ OFFLOAD BEGIN / END OFFLOAD directives. Use with the former (OMP specific) directive evokes a compile-time error. Use with the latter directive pair does not evoke any compile-time diagnostics; however, the use should not be considered safe and program behavior involving such use is unpredictable.

The use of a BLOCK construct with offloading should be restricted to within the target of an offload execution (i.e inside an offloaded subprogram).

For example:

          subroutine adj_temp
          !dir$ attributes offload : mic :: calc_temp…
          !  Offload call of calc_temp
          !dir$ offload begin target (mic:0)
                 call calc_temp
           …
           end subroutine adj_temp

           !dir$ attributes offload : mic :: calc_temp
           subroutine calc_temp
           …

           !  Use within an offloaded subprogram but outside a
           !  structured block of an OpenMP* directive is supported
           block
                   integer :: iTemp
                   iTemp=20
                   print "(A,I2)",”In block, iTemp=',iTemp
           end block…
           end subroutine calc_temp

Code compiled to execute natively (/Qmic [-mmic]) on the Intel® Xeon Phi™ coprocessor can use a BLOCK construct under the same usage requirement as the host CPU, that is, a BLOCK construct cannot appear inside a structured block of an OpenMP* directive.

This feature enhancement is available in the Fortran Intel® 15.0 compiler.

Refer to the Intel® Parallel Studio XE 2015 Composer Edition for Fortran product documentation for additional details.

  • Développeurs
  • Linux*
  • Microsoft Windows* (XP, Vista, 7)
  • Microsoft Windows* 8
  • Fortran
  • Intermédiaire
  • Intel® Composer XE
  • Compilateur Intel® Fortran
  • Intel® Fortran Composer XE
  • Intel® Parallel Composer
  • Intel® Visual Fortran Composer XE
  • Outils de développement
  • Intel® Many Integrated Core Architecture
  • Serveur
  • URL
  • Zone des thèmes: 

    IDZone

    Viewing all articles
    Browse latest Browse all 677

    Trending Articles



    <script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>