Quantcast
Channel: Recent posts
Viewing all articles
Browse latest Browse all 415

Allocating parts of arrays on coprocessor

$
0
0

Hi, 

I'm trying to figure out how parts of arrays can be allocated on coprocessors.  Following the user guide and an example, I tried compiling the following test code but failed.

program main
  implicit none
  double precision :: a(15)

  print *,'size on host:',size(a)
  !dir$ offload begin target(mic:0) in(a(4:8): alloc(3:10))
  print *,'size on mic:',size(a)
  !dir$ end offload

end program main

It seems that although the guide suggests to specify "a list of array section triplets" in a alloc() modifier, the compilers (ver 16.0.0) don't accept that. As far as I tried so far, the only specification which is accepted is like alloc(a(3:10)). However, when I executed the code, the size of the array on coprocessors is the same as in the host. 

Any suggestions are welcome.

Thanks, T


Viewing all articles
Browse latest Browse all 415

Trending Articles



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