Hi All,
We received a user report that there is memory leakage in running “dual-boost” GaMD simulations with pmemd.CUDA over long time (like 800-1000 ns) in one job. As I looked into the problem with valgrind, it seems about two code lines in the cuda/gpu.cpp : “gpu_calculate_gamd_dihedral_energy_weight” function:
gpu->pbEnergyBuffer->Download();
totdih = (PMEDouble)gpu->pbEnergyBuffer->_pSysData[GAMD_E_DIHEDRAL_OFFSET] / ENERGYSCALE;
It’s strange that similar code is used in direct MD simulations, say in the “gpu_pme_ene” function:
gpu->pbEnergyBuffer->Download();
PMEDouble energy[EXTENDED_ENERGY_TERMS];
for (int i = 0; i < EXTENDED_ENERGY_TERMS; i++) {
energy[i] = 0.0;
}
pEnergy->total = 0.0;
for (int i = 0; i < VIRIAL_OFFSET; i++) {
unsigned long long int val = gpu->pbEnergyBuffer->_pSysData[i];
if (val >= 0x8000000000000000ull) {
energy[i] = -(PMEDouble)(val ^ 0xffffffffffffffffull) / ENERGYSCALE;
}
else {
energy[i] = (PMEDouble)val / ENERGYSCALE;
}
pEnergy->total += energy[i];
}
Is there any problem about how we download the pbEnergyBuffer and extract the GaMD dihedral energy with the two lines shown above?
It seems ok to me as I checked the data structure and functions of pbEnergyBuffer in cuda/gpuBuffer.h. Any suggestions will be much appreciated!
Thanks,
Yinglong
Yinglong Miao, Ph.D.
Assistant Professor
Center for Computational Biology and
Department of Molecular Biosciences
Department of Medicinal Chemistry (courtesy)
University of Kansas
Tel: 1-785-864-8298
http://miaolab.org
_______________________________________________
AMBER-Developers mailing list
AMBER-Developers.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber-developers
Received on Fri Aug 05 2022 - 11:30:08 PDT