openmm / openmm-plumed

OpenMM plugin to interface with PLUMED
55 stars 23 forks source link

Fix type of argument to plumed_cmd #71

Closed GiovanniBussi closed 8 months ago

GiovanniBussi commented 8 months ago

Recent plumed versions (>=2.8) do typechecking on the arguments passed to the plumed_cmd function.

plumed_cmd(plumedmain, "setVirial", XX);

expects XX to be convertible to const double*. The type of &virial is void* instead (though referring to the same memory location).

To avoid false errors, &virial should be replaced with &virial[0]. Actually, virial would work as well.

See this thread on the PLUMED forum.

peastman commented 8 months ago

Thanks! I started the tests running.

peastman commented 8 months ago

The builds are failing with this error:

++ sudo apt-get update -qq
W: GPG error: http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64  InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A4B469963BF863CC
E: The repository 'http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64  InRelease' is not signed.

It comes from

https://github.com/openmm/openmm-plumed/blob/5406068b5a36b1208f1340180cfc5b8e4ee7aff9/devtools/scripts/install_cuda.sh#L15-L17

I'm not sure what the problem is. Possibly we need to update the URL? Once we merge #70 this won't be an issue since there won't be any CUDA code anymore and we won't need to install CUDA libraries.

GiovanniBussi commented 8 months ago

I guess this is not plumed related. I don't know if I can help

peastman commented 8 months ago

I hopefully have the other problems fixed in #73. Sorry for taking a while. I'll go ahead and merge this, and then we can see if that PR passes.

GiovanniBussi commented 8 months ago

Thanks!