X-Git-Url: http://biod.pnpi.spb.ru/gitweb/?a=blobdiff_plain;f=src%2Fgromacs%2Fmdlib%2Fnbnxn_cuda%2Fnbnxn_cuda_data_mgmt.cu;h=6612d13097c1625da9b67b864b5581ec51179fa3;hb=982993423b348095df0e550ec9d7e6163a270b4f;hp=9200773cb8e349d68f069a76af3d6833517ac3be;hpb=28bb38b9b5c10bff38e5e2fe0cd2b0c00433b382;p=alexxy%2Fgromacs.git diff --git a/src/gromacs/mdlib/nbnxn_cuda/nbnxn_cuda_data_mgmt.cu b/src/gromacs/mdlib/nbnxn_cuda/nbnxn_cuda_data_mgmt.cu index 9200773cb8..6612d13097 100644 --- a/src/gromacs/mdlib/nbnxn_cuda/nbnxn_cuda_data_mgmt.cu +++ b/src/gromacs/mdlib/nbnxn_cuda/nbnxn_cuda_data_mgmt.cu @@ -32,35 +32,37 @@ * To help us fund GROMACS development, we humbly ask that you cite * the research papers on the package. Check out http://www.gromacs.org. */ -#ifdef HAVE_CONFIG_H -#include -#endif +#include "gmxpre.h" + +#include "nbnxn_cuda_data_mgmt.h" + +#include "config.h" #include #include -#include #include +#include #include -#include "gmx_fatal.h" +#include "gromacs/gmxlib/cuda_tools/cudautils.cuh" +#include "gromacs/legacyheaders/gmx_detect_hardware.h" +#include "gromacs/legacyheaders/gpu_utils.h" +#include "gromacs/legacyheaders/pmalloc_cuda.h" +#include "gromacs/legacyheaders/tables.h" +#include "gromacs/legacyheaders/typedefs.h" +#include "gromacs/legacyheaders/types/enums.h" +#include "gromacs/legacyheaders/types/force_flags.h" +#include "gromacs/legacyheaders/types/interaction_const.h" +#include "gromacs/mdlib/nb_verlet.h" +#include "gromacs/mdlib/nbnxn_consts.h" +#include "gromacs/pbcutil/ishift.h" +#include "gromacs/utility/common.h" +#include "gromacs/utility/cstringutil.h" +#include "gromacs/utility/fatalerror.h" #include "gromacs/utility/smalloc.h" -#include "tables.h" -#include "typedefs.h" -#include "types/enums.h" -#include "types/nb_verlet.h" -#include "types/interaction_const.h" -#include "types/force_flags.h" -#include "../nbnxn_consts.h" -#include "gmx_detect_hardware.h" #include "nbnxn_cuda_types.h" -#include "../../gmxlib/cuda_tools/cudautils.cuh" -#include "nbnxn_cuda_data_mgmt.h" -#include "pmalloc_cuda.h" -#include "gpu_utils.h" - -#include "gromacs/utility/common.h" static bool bUseCudaEventBlockingSync = false; /* makes the CPU thread block */ @@ -426,10 +428,15 @@ static void init_nbparam(cu_nbparam_t *nbp, /*! Re-generate the GPU Ewald force table, resets rlist, and update the * electrostatic type switching to twin cut-off (or back) if needed. */ -void nbnxn_cuda_pme_loadbal_update_param(nbnxn_cuda_ptr_t cu_nb, - const interaction_const_t *ic) +void nbnxn_cuda_pme_loadbal_update_param(const nonbonded_verlet_t *nbv, + const interaction_const_t *ic) { - cu_nbparam_t *nbp = cu_nb->nbparam; + if (!nbv || nbv->grp[0].kernel_type != nbnxnk8x8x8_CUDA) + { + return; + } + nbnxn_cuda_ptr_t cu_nb = nbv->cu_nbv; + cu_nbparam_t *nbp = cu_nb->nbparam; set_cutoff_parameters(nbp, ic); @@ -1077,11 +1084,11 @@ wallclock_gpu_t * nbnxn_cuda_get_timings(nbnxn_cuda_ptr_t cu_nb) return (cu_nb != NULL && cu_nb->bDoTime) ? cu_nb->timings : NULL; } -void nbnxn_cuda_reset_timings(nbnxn_cuda_ptr_t cu_nb) +void nbnxn_cuda_reset_timings(nonbonded_verlet_t* nbv) { - if (cu_nb->bDoTime) + if (nbv->cu_nbv && nbv->cu_nbv->bDoTime) { - init_timings(cu_nb->timings); + init_timings(nbv->cu_nbv->timings); } }