From ec60ebbc763f789b1e22b4c91205d04c9799f253 Mon Sep 17 00:00:00 2001 From: edoapra Date: Fri, 20 Sep 2019 11:55:18 -0700 Subject: [PATCH] fixes to compile non-offload mrcc code. See https://github.com/nwchemgit/nwchem/pull/154 and https://github.com/nwchemgit/nwchem/issues/153 --- src/tce/mrcc/ccsd_t/tce_mrcc_ccsdpt_subg.F | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/src/tce/mrcc/ccsd_t/tce_mrcc_ccsdpt_subg.F b/src/tce/mrcc/ccsd_t/tce_mrcc_ccsdpt_subg.F index 869a0d320f..b98ea242ae 100644 --- a/src/tce/mrcc/ccsd_t/tce_mrcc_ccsdpt_subg.F +++ b/src/tce/mrcc/ccsd_t/tce_mrcc_ccsdpt_subg.F @@ -100,11 +100,12 @@ SUBROUTINE tce_mrcc_ccsdpt_subg(d_t1,k_t1_offset, c c MIC c +#ifdef USE_OFFLOAD triplesx_alloced=.false. - triplesx1_alloced=.false. v2sub_alloced=.false. t1sub_alloced=.false. t2sub_alloced=.false. +#endif c estimate triplesx size range_p4=0 do t_p4b = noab+1,noab+nvab @@ -115,9 +116,6 @@ SUBROUTINE tce_mrcc_ccsdpt_subg(d_t1,k_t1_offset, range_h1 = max(range_h1,int_mb(k_range+t_h1b-1)) enddo size=(range_p4**3)*(range_h1**3) - triplesx_copyback=.true. -c call util_align64(size) - triplesx_mxlgth=size if (.not.MA_PUSH_GET(mt_dbl,size,'(T) singles',l_singles, 1 k_singles)) call errquit('ccsd_t: MA error sgl', 2 size,MA_ERR) @@ -125,12 +123,9 @@ SUBROUTINE tce_mrcc_ccsdpt_subg(d_t1,k_t1_offset, 1 k_doubles)) call errquit('ccsd_t: MA error dbl', 2 size,MA_ERR) #ifdef USE_OFFLOAD -#if 0 - call offl_alloc(dbl_mb(k_singles),size) - triplesx1_alloced=.true. -#else - triplesx1_alloced=.false. -#endif + triplesx_copyback=.true. +c call util_align64(size) + triplesx_mxlgth=size call offl_alloc(dbl_mb(k_doubles),size) triplesx_alloced=.true. #endif @@ -187,12 +182,11 @@ SUBROUTINE tce_mrcc_ccsdpt_subg(d_t1,k_t1_offset, cc call dcopy(size, 0.0d0, 0, dbl_mb(k_doubles), 1) cc call offl_zerofill(dbl_mb(k_doubles),size) call dcopy(triplesx_mxlgth, 0.0d0, 0, dbl_mb(k_singles), 1) -#if 0 - call offl_zerofill(dbl_mb(k_singles),triplesx_mxlgth) -#endif call dcopy(triplesx_mxlgth, 0.0d0, 0, dbl_mb(k_doubles), 1) +#ifdef USE_OFFLOAD call offl_zerofill(dbl_mb(k_doubles),triplesx_mxlgth) +#endif c ----------- c 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, triplesx_alloced=.false. #if 0 call offl_free(dbl_mb(k_singles),size) - triplesx1_alloced=.false. #endif #endif