[CP2K-user] [CP2K-GPU] GPU acceleration of cp2k

Fabian Ducry fabia... at gmail.com
Tue May 26 07:10:31 UTC 2020


Dear Yuvam,

I am not sure what your question is, what do you need help with?

To run cp2k in colab you can use something like this to install the tool:

%%bash

# Execute this cell on Ubuntu only
if grep -e "ID=ubuntu" /etc/os-release ; then \
   echo 'Continue on Ubuntu' ; \
else \
   echo 'Does not look like an Ubuntu box, exiting' ; \
   exit ; \
fi

apt update
apt-get install cp2k
pip install ase

export ASE_CP2K_COMMAND="mpirun -np 2 cp2k_shell.popt"

an then use the following to run cp2k:

from ase.calculators.cp2k import CP2K
from ase.build import molecule
calc = CP2K()
atoms = molecule('H2O', calculator=calc)
atoms.center(vacuum=2.0)
print(atoms.get_potential_energy())

This cannot use GPUs, however. I don't think there is a package with GPU 
support, you would have to compile it yourself.

Fabian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20200526/13cf53e1/attachment.htm>


More information about the CP2K-user mailing list