From: Mark Abraham Date: Fri, 16 May 2014 11:05:27 +0000 (+0200) Subject: Add note about correct calling of wallcycle counter X-Git-Url: http://biod.pnpi.spb.ru/gitweb/?a=commitdiff_plain;h=91c7e3a54be5e2fbfdd863156e58b3e3a1e39171;p=alexxy%2Fgromacs.git Add note about correct calling of wallcycle counter The code could be refactored to use a series of explicit OpenMP barriers so that the wallcycle_start/stop are more clearly matched, but that's too hard for now. The comments make it harder for anyone to misunderstand or mistakenly change the code. Change-Id: Iec00e50e26a60efe09afb6f5744d401a9d9c06a3 --- diff --git a/src/gromacs/mdlib/pme.c b/src/gromacs/mdlib/pme.c index 5d0893b23a..af339e7ec8 100644 --- a/src/gromacs/mdlib/pme.c +++ b/src/gromacs/mdlib/pme.c @@ -4946,6 +4946,9 @@ int gmx_pme_do(gmx_pme_t pme, inc_nrnb(nrnb, eNR_FFT, 2*npme); } + /* Note: this wallcycle region is closed below + outside an OpenMP region, so take care if + refactoring code here. */ wallcycle_start(wcycle, ewcPME_SPREADGATHER); } @@ -4991,6 +4994,8 @@ int gmx_pme_do(gmx_pme_t pme, inc_nrnb(nrnb, eNR_GATHERFBSP, pme->pme_order*pme->pme_order*pme->pme_order*pme->atc[0].n); + /* Note: this wallcycle region is opened above inside an OpenMP + region, so take care if refactoring code here. */ wallcycle_stop(wcycle, ewcPME_SPREADGATHER); }