<div dir="auto">Sir,<div dir="auto">I wanted to link cp2k with ase too. But I want to use the GPU of google colab.</div><div dir="auto"><br></div><div dir="auto">How canĀ I do that to accelerate my calculation using the GPU?</div><div dir="auto"><br></div><div dir="auto">Regards</div><div dir="auto">Yuvam Bhateja</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 26 May 2020, 10:33 am Maxime Van den Bossche, <<a href="mailto:maxime.cp....@gmail.com">maxime.cp....@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>OK, let's take it from the beginning --  after logging in to your remote machine<br></div><div>(which needs to have ASE and CP2K installed), please try the example</div><div>shown on <a href="https://www.cp2k.org/tools:ase" target="_blank" rel="noreferrer">https://www.cp2k.org/tools:ase</a>, substituting the <code><span lang="plaintext">/path/to/cp2k_shell.popt</span></code></div><div><code><span lang="plaintext"></span></code>with the actual path to that executable on your machine:<br></div><div><br></div><div></div><div></div><div><code><span lang="plaintext">export ASE_CP2K_COMMAND="mpirun -np 2 /path/to/cp2k_shell.popt"</span></code></div><div><code><span lang="plaintext"></span></code></div><code>python</code><br><div><pre><span>>>></span> from ase.calculators.cp2k import CP2K
<span>>>></span> from ase.build import molecule
<span>>>></span> calc = CP2K<span>(</span><span>)</span>
<span>>>></span> atoms = molecule<span>(</span><span>'H2O'</span>, <span>calculator</span>=calc<span>)</span>
<span>>>></span> atoms.center<span>(</span><span>vacuum</span>=<span>2.0</span><span>)</span>
<span>>>></span> print<span>(</span>atoms.get_potential_energy<span>(</span><span>)</span><span>)<br></span></pre></div><br><div>If this raises an AssertionError like the one you got earlier, then try to exclude that openib component in OpenMPI:<br></div><div><br></div><div><div><code><span lang="plaintext">export ASE_CP2K_COMMAND="mpirun -np 2 -mca btl ^openib /path/to/cp2k_shell.popt"</span></code></div><div><br>and try the python commands again.<br></div></div></div>

<p></p>

-- <br>
You received this message because you are subscribed to the Google Groups "cp2k" group.<br>
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="mailto:cp...@googlegroups.com" target="_blank" rel="noreferrer">cp...@googlegroups.com</a>.<br>
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/cp2k/e7abf45f-22c8-40d7-9bba-c5787ab5a688%40googlegroups.com?utm_medium=email&utm_source=footer" target="_blank" rel="noreferrer">https://groups.google.com/d/msgid/cp2k/e7abf45f-22c8-40d7-9bba-c5787ab5a688%40googlegroups.com</a>.<br>
</blockquote></div>