(1)!dec$ offload begin target(mic:n) in(mbc_n:length(len) alloc_if(.true) free_if(.false.)) …
(2)!dec$ end offload
(3)repeat
(4) ……
(5) !dec$ offload target(mic:n) nocopy(mbc_n:length(len) alloc_if(.false.) free_if(.false.))
(6) !$omp parallel do private (ik, i, k)
(7)do ik = 1, ik_total
(8)  
(9)  
(10)  call Fluxj_mic(mbc_n, i, k, ……)
(11)end do
(12) !$omp end parallel do
(13) ……
(14)until convergence
(15)!dec$ offload begin target(mic:n) nocopy(mbc_n:length(len) alloc_if(.false.) free_if(.false.))
(16)!dec$ end offload
Listing 2: Memory arrangement on MIC.