@@ -91,20 +91,9 @@ contains
9191
9292 subroutine s_initialize_igr_module ()
9393#ifdef __NVCOMPILER_GPU_UNIFIED_MEM
94- integer :: igr_temps_total
95- integer :: igr_temps_on_gpu
96- integer :: igr_temps_on_cpu
94+ integer :: igr_temps_on_gpu = 3
9795 character (len= 10 ) :: igr_temps_on_gpu_str
9896
99- ! initialize
100- if (igr_iter_solver == 1 ) then ! Jacobi iteration
101- igr_temps_total = 3
102- else
103- igr_temps_total = 2
104- end if
105- igr_temps_on_gpu = igr_temps_total
106- igr_temps_on_cpu = 0
107-
10897 call get_environment_variable(" NVIDIA_IGR_TEMPS_ON_GPU" , igr_temps_on_gpu_str)
10998
11099 if (trim (igr_temps_on_gpu_str) == " 0" ) then
@@ -119,17 +108,10 @@ contains
119108 igr_temps_on_gpu = 3
120109 end if
121110
122- ! trim if needed
123- if ( igr_temps_on_gpu > igr_temps_total ) then
124- igr_temps_on_gpu = igr_temps_total
125- end if
126- igr_temps_on_cpu = igr_temps_total - igr_temps_on_gpu
127-
128111 ! create map
129- temp_on_gpu(1 :3 ) = - 1
130- temp_on_gpu(1 :igr_temps_total) = 0
112+ temp_on_gpu(1 :3 ) = 0
131113 temp_on_gpu(1 :igr_temps_on_gpu) = 1
132- print * , temp_on_gpu(1 :3 )
114+ ! print * , temp_on_gpu(1 :3 )
133115#endif
134116
135117 if (viscous) then
@@ -148,16 +130,12 @@ contains
148130 @:ALLOCATE(jac(idwbuff(1 )%beg:idwbuff(1 )%end, &
149131 idwbuff(2 )%beg:idwbuff(2 )%end, &
150132 idwbuff(3 )%beg:idwbuff(3 )%end))
151- @:PREFER_GPU(jac)
152-
153133 @:ALLOCATE(jac_rhs(- 1 :m,- 1 :n,- 1 :p))
154- @:PREFER_GPU(jac_rhs)
155134
156135 if (igr_iter_solver == 1 ) then ! Jacobi iteration
157136 @:ALLOCATE(jac_old(idwbuff(1 )%beg:idwbuff(1 )%end, &
158137 idwbuff(2 )%beg:idwbuff(2 )%end, &
159138 idwbuff(3 )%beg:idwbuff(3 )%end))
160- @:PREFER_GPU(jac_old)
161139 end if
162140#else
163141
@@ -167,8 +145,7 @@ contains
167145 idwbuff(3 )%beg:idwbuff(3 )%end))
168146 @:PREFER_GPU(jac)
169147 else
170- print * , ' jac on CPU'
171-
148+ !print * , ' jac on CPU'
172149 allocate(pool_host1(idwbuff(1 )%beg:idwbuff(1 )%end, &
173150 idwbuff(2 )%beg:idwbuff(2 )%end, &
174151 idwbuff(3 )%beg:idwbuff(3 )%end))
@@ -182,8 +159,7 @@ contains
182159 @:ALLOCATE(jac_rhs(- 1 :m,- 1 :n,- 1 :p))
183160 @:PREFER_GPU(jac_rhs)
184161 else
185- print * , ' jac_rhs on CPU'
186-
162+ !print * , ' jac_rhs on CPU'
187163 allocate(pool_host2(- 1 :m,- 1 :n,- 1 :p))
188164
189165 jac_rhs(- 1 :m,- 1 :n,- 1 :p) = > pool_host2(:,:,:)
@@ -196,8 +172,7 @@ contains
196172 idwbuff(3 )%beg:idwbuff(3 )%end))
197173 @:PREFER_GPU(jac_old)
198174 else
199- print * , ' jac_old on CPU'
200-
175+ !print * , ' jac_old on CPU'
201176 allocate(pool_host3(idwbuff(1 )%beg:idwbuff(1 )%end, &
202177 idwbuff(2 )%beg:idwbuff(2 )%end, &
203178 idwbuff(3 )%beg:idwbuff(3 )%end))
0 commit comments