Skip to content

Commit ec60ebb

Browse files
committed
fixes to compile non-offload mrcc code. See #154 and #153
1 parent 7809124 commit ec60ebb

File tree

1 file changed

+7
-14
lines changed

1 file changed

+7
-14
lines changed

src/tce/mrcc/ccsd_t/tce_mrcc_ccsdpt_subg.F

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,12 @@ SUBROUTINE tce_mrcc_ccsdpt_subg(d_t1,k_t1_offset,
100100
c
101101
c MIC
102102
c
103+
#ifdef USE_OFFLOAD
103104
triplesx_alloced=.false.
104-
triplesx1_alloced=.false.
105105
v2sub_alloced=.false.
106106
t1sub_alloced=.false.
107107
t2sub_alloced=.false.
108+
#endif
108109
c estimate triplesx size
109110
range_p4=0
110111
do t_p4b = noab+1,noab+nvab
@@ -115,22 +116,16 @@ SUBROUTINE tce_mrcc_ccsdpt_subg(d_t1,k_t1_offset,
115116
range_h1 = max(range_h1,int_mb(k_range+t_h1b-1))
116117
enddo
117118
size=(range_p4**3)*(range_h1**3)
118-
triplesx_copyback=.true.
119-
c call util_align64(size)
120-
triplesx_mxlgth=size
121119
if (.not.MA_PUSH_GET(mt_dbl,size,'(T) singles',l_singles,
122120
1 k_singles)) call errquit('ccsd_t: MA error sgl',
123121
2 size,MA_ERR)
124122
if (.not.MA_PUSH_GET(mt_dbl,size,'(T) doubles',l_doubles,
125123
1 k_doubles)) call errquit('ccsd_t: MA error dbl',
126124
2 size,MA_ERR)
127125
#ifdef USE_OFFLOAD
128-
#if 0
129-
call offl_alloc(dbl_mb(k_singles),size)
130-
triplesx1_alloced=.true.
131-
#else
132-
triplesx1_alloced=.false.
133-
#endif
126+
triplesx_copyback=.true.
127+
c call util_align64(size)
128+
triplesx_mxlgth=size
134129
call offl_alloc(dbl_mb(k_doubles),size)
135130
triplesx_alloced=.true.
136131
#endif
@@ -187,12 +182,11 @@ SUBROUTINE tce_mrcc_ccsdpt_subg(d_t1,k_t1_offset,
187182
cc call dcopy(size, 0.0d0, 0, dbl_mb(k_doubles), 1)
188183
cc call offl_zerofill(dbl_mb(k_doubles),size)
189184
call dcopy(triplesx_mxlgth, 0.0d0, 0, dbl_mb(k_singles), 1)
190-
#if 0
191-
call offl_zerofill(dbl_mb(k_singles),triplesx_mxlgth)
192-
#endif
193185

194186
call dcopy(triplesx_mxlgth, 0.0d0, 0, dbl_mb(k_doubles), 1)
187+
#ifdef USE_OFFLOAD
195188
call offl_zerofill(dbl_mb(k_doubles),triplesx_mxlgth)
189+
#endif
196190
c -----------
197191
c
198192
ccx if (.not.MA_PUSH_GET(mt_dbl,size,'(T) singles',l_singles,
@@ -385,7 +379,6 @@ SUBROUTINE tce_mrcc_ccsdpt_subg(d_t1,k_t1_offset,
385379
triplesx_alloced=.false.
386380
#if 0
387381
call offl_free(dbl_mb(k_singles),size)
388-
triplesx1_alloced=.false.
389382
#endif
390383
#endif
391384

0 commit comments

Comments
 (0)