From 77ba9d53c2a1fa7c4fd1db7eccb1578b5b5960c4 Mon Sep 17 00:00:00 2001 From: edoapra Date: Thu, 22 Mar 2018 18:06:39 -0700 Subject: [PATCH] same as commit 76d5bddd5c3dfdef76beaab8222231624eb75e89: Split ga_acc in smaller ga_acc on MPI-PR since gives large performance improvement on NERSC Cori --- src/ccsd/GNUmakefile | 4 ++++ src/ccsd/moints_trp.F | 16 +++++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/src/ccsd/GNUmakefile b/src/ccsd/GNUmakefile index dcac6a4d85..acba2a3793 100644 --- a/src/ccsd/GNUmakefile +++ b/src/ccsd/GNUmakefile @@ -110,6 +110,10 @@ ifeq ($(HAVE_SET_GA_PROPERTY),Y) endif +ifeq ($(ARMCI_NETWORK),MPI-PR) + LIB_DEFINES += -DACC_STRIPS +endif + LIBRARY = libccsd.a include ../config/makelib.h diff --git a/src/ccsd/moints_trp.F b/src/ccsd/moints_trp.F index 875f0fc650..3e274fff62 100644 --- a/src/ccsd/moints_trp.F +++ b/src/ccsd/moints_trp.F @@ -532,7 +532,14 @@ cstaggering to avoid congestion in ga-acc #endif #ifndef NOCOMMS ab = (a-olo)*nocc+b-ostart+1 +#ifdef ACC_STRIPS + do i=ilo,ihi + call ga_acc(g_exch,(i-1)*nvir + 1,i*nvir,ab,ab, + C h1(1,i),nni,1.d0) + enddo +#else call ga_acc(g_exch,ivlo,ivhi,ab,ab,h1,nni,1.d0) +#endif #endif enddo do b=ostart,ostart+nocc-1 @@ -581,7 +588,14 @@ cstaggering to avoid congestion in ga-acc #endif #ifndef NOCOMMS ab = (a-olo)*nocc+b-ostart+1 - call ga_acc(g_exch,jvlo,jvhi,ab,ab,h2,nnj,1.d0) +#ifdef ACC_STRIPS + do j=jlo,jhi + call ga_acc(g_exch,(j-1)*nvir + 1,j*nvir,ab,ab, + C h2(1,j),nnj,1.d0) + enddo +#else + call ga_acc(g_exch,jvlo,jvhi,ab,ab,h2,nnj,1.d0) +#endif #endif enddo enddo