-
Notifications
You must be signed in to change notification settings - Fork 0
/
tbp_submod.F90
38 lines (35 loc) · 1.09 KB
/
tbp_submod.F90
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
submodule (mod_domain) diffusion_submod
contains
module procedure compute_diffusion_part2 ! ( this, es_task, ee_task )
implicit none
!$omp declare target
!class (diffusion_t), intent(in) :: this
!integer intent(in) :: es_task, ee_task
! local
integer :: m, es,ee
logical, external :: omp_is_initial_device
! Executable
es = (es_task-this%elemblk%esblk+1)
ee = (ee_task-this%elemblk%esblk+1)
write(0,*)omp_is_initial_device(),this%elemblk%esblk,es_task,es,ee
#ifdef WORKAROUND
call y(this,es_task,ee_task)
#else
call x(this,es_task,ee_task)
#endif
do m=1,6
this%rhs(es:ee,:,m) = this%rhs(es:ee,:,m) + 0.2
enddo
end procedure compute_diffusion_part2
#ifdef WORKAROUND
#else
subroutine x( this, es_task, ee_task )
implicit none
class (diffusion_t), intent(in) :: this
integer :: es_task, ee_task
logical, external :: omp_is_initial_device
!$omp declare target
write(0,*)__LINE__,omp_is_initial_device(),this%elemblk%esblk,es_task
end subroutine x
#endif
end submodule diffusion_submod