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

Segfault with asynchronous offload

$
0
0

Hi

I am facing a segmentation fault problem when I try to perform asynchronous offload at a later point which I believe is the time when the function returned.

here is the code

functionA

real :: WORKN(X,Y,Z)

!dir$ offload begin target(MIC:0)signal(1)out(WORKN)
   do k=1,km
           .
           !Lots of code
!dir$ end offload

end function A


functionB

real :: Dummy

.
.
! Do Whatever

.
.
.
end function B




program run

!$OMP PARALLEL DO DEFAULT(SHARED) !this OMP is dummy i.e num_blockblock is 1, can be removed

do iblock=1,num_blocks

      call functionA(iblock) !here is the async offload

enddo

!$OMP END PARALLEL DO


!$OMP PARALLEL DO DEFAULT(SHARED)

do iblock=1,num_blocks

      call functionB(iblock) get segfault when B is running

enddo

!$OMP END PARALLEL DO

end program run
    

 
 

 


Viewing all articles
Browse latest Browse all 1347

Trending Articles



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