Quantcast
Channel: Intel® Many Integrated Core Architecture
Viewing all articles
Browse latest Browse all 1347

Fortran module containing interfaces only - offload programming

$
0
0

What is the way to write a Fortran source file that contains only one module and that only has interface declarations to routines that are callable as either host or offload.

I tried:

module foo
  interface
    subroutine foobar
    !dir$ attributes offload : mic ::foobar
    end subroutine foobar
...
  end interface
end module foo

When I subsequently USE foo elsewhere, I found I must still add:

!dir$ attributes offload : mic :: foobar

In the routine that performs the call

If I move the !dir$ up a line in the module the compiler complains. I haven't tried adding an additional !dir$ addributes offload : mic :: for each of the routines outside the interface block. Is this the missing trick?

Jim Dempsey


Viewing all articles
Browse latest Browse all 1347

Trending Articles



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