diff --git a/platforms/cuda/src/CudaPlumedKernels.cpp b/platforms/cuda/src/CudaPlumedKernels.cpp index cee0948..e4a0e79 100644 --- a/platforms/cuda/src/CudaPlumedKernels.cpp +++ b/platforms/cuda/src/CudaPlumedKernels.cpp @@ -236,7 +236,7 @@ void CudaCalcPlumedForceKernel::executeOnWorkerThread() { plumed_cmd(plumedmain, "setBox", &boxVectors[0][0]); } double virial[9]; - plumed_cmd(plumedmain, "setVirial", &virial); + plumed_cmd(plumedmain, "setVirial", &virial[0]); // Calculate the forces and energy. diff --git a/platforms/opencl/src/OpenCLPlumedKernels.cpp b/platforms/opencl/src/OpenCLPlumedKernels.cpp index 29e40c1..c253fab 100644 --- a/platforms/opencl/src/OpenCLPlumedKernels.cpp +++ b/platforms/opencl/src/OpenCLPlumedKernels.cpp @@ -195,7 +195,7 @@ void OpenCLCalcPlumedForceKernel::executeOnWorkerThread() { plumed_cmd(plumedmain, "setBox", &boxVectors[0][0]); } double virial[9]; - plumed_cmd(plumedmain, "setVirial", &virial); + plumed_cmd(plumedmain, "setVirial", &virial[0]); // Calculate the forces and energy. diff --git a/platforms/reference/src/ReferencePlumedKernels.cpp b/platforms/reference/src/ReferencePlumedKernels.cpp index 0a60d05..7212d76 100644 --- a/platforms/reference/src/ReferencePlumedKernels.cpp +++ b/platforms/reference/src/ReferencePlumedKernels.cpp @@ -152,7 +152,7 @@ double ReferenceCalcPlumedForceKernel::execute(ContextImpl& context, bool includ plumed_cmd(plumedmain, "setBox", &boxVectors[0][0]); } double virial[9]; - plumed_cmd(plumedmain, "setVirial", &virial); + plumed_cmd(plumedmain, "setVirial", &virial[0]); // Calculate the forces and energy.