<div dir="auto">Sir,<div dir="auto">Thank you for your reply.</div><div dir="auto">I want to accelerate my cp2k calculation using gpu since my atomic system is quite big.</div><div dir="auto">As google colab provides free GPU I wish to use that. You mentioned in code the mpi which is for cpu parallel computing. Is there any way to compile it using cuda which is for gpu parallelization. </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, 12:40 pm Fabian Ducry, <<a href="mailto:fabia...@gmail.com">fabia...@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>Dear Yuvam,</div><div><br></div><div>I am not sure what your question is, what do you need help with?</div><div><br></div><div>To run cp2k in colab you can use something like this to install the tool:<br></div><div><br></div><div><div style="background-color:rgb(250,250,250);border-color:rgb(187,187,187);border-style:solid;border-width:1px"><code><div><div style="color:#000000;background-color:#fffffe;font-family:'monospace',Consolas,'Courier New',monospace;font-weight:normal;font-size:14px;line-height:19px;white-space:pre-wrap"><div><span style="color:#0000ff"><span style="color:#660">%%</span><span style="color:#000">bash</span></span></div><span style="color:#000"><br></span><div><span style="color:#008000"><span style="color:#800"># Execute this cell on Ubuntu only</span></span></div><div><span style="color:#0000ff"><span style="color:#800">if</span></span><span style="color:#000000"><span style="color:#800"> grep -e </span></span><span style="color:#a31515"><span style="color:#800">"ID=ubuntu"</span></span><span style="color:#000000"><span style="color:#800"> /etc/os-release ; </span></span><span style="color:#0000ff"><span style="color:#800">then</span></span><span style="color:#000000"><span style="color:#800"> \</span></span></div><div><span style="color:#000000"><span style="color:#800">    echo </span></span><span style="color:#a31515"><span style="color:#800">'Continue on Ubuntu'</span></span><span style="color:#000000"><span style="color:#800"> ; \</span></span></div><div><span style="color:#0000ff"><span style="color:#800">else</span></span><span style="color:#000000"><span style="color:#800"> \</span></span></div><div><span style="color:#000000"><span style="color:#800">    echo </span></span><span style="color:#a31515"><span style="color:#800">'Does not look like an Ubuntu box, exiting'</span></span><span style="color:#000000"><span style="color:#800"> ; \</span></span></div><div><span style="color:#000000"><span style="color:#800">    </span></span><span style="color:#0000ff"><span style="color:#800">exit</span></span><span style="color:#000000"><span style="color:#800"> ; \</span></span></div><div><span style="color:#0000ff"><span style="color:#800">fi</span></span></div><span style="color:#000"><br></span><div><span style="color:#000000"><span style="color:#000">apt update</span></span></div><div><span style="color:#000000"><span style="color:#000">apt</span><span style="color:#660">-</span><span style="color:#008">get</span><span style="color:#000"> install cp2k</span></span></div><div><span style="color:#000000"><span style="color:#000">pip install ase</span></span></div><span style="color:#000"><br></span><div><span style="color:#0000ff"><span style="color:#008">export</span></span><span style="color:#000000"><span style="color:#000"> ASE_CP2K_COMMAND</span><span style="color:#660">=</span></span><span style="color:#a31515"><span style="color:#080">"mpirun -np 2 cp2k_shell.popt"</span></span></div></div></div></code></div><br>an then use the following to run cp2k:<br></div><div><br></div><div><div style="background-color:rgb(250,250,250);border-color:rgb(187,187,187);border-style:solid;border-width:1px"><code><div><div style="color:#000000;background-color:#fffffe;font-family:'monospace',Consolas,'Courier New',monospace;font-weight:normal;font-size:14px;line-height:19px;white-space:pre-wrap"><div><span style="color:#af00db"><span style="color:#008">from</span></span><span style="color:#000000"><span style="color:#000"> ase</span><span style="color:#660">.</span><span style="color:#000">calculators</span><span style="color:#660">.</span><span style="color:#000">cp2k </span></span><span style="color:#af00db"><span style="color:#008">import</span></span><span style="color:#000000"><span style="color:#000"> CP2K</span></span></div><div><span style="color:#af00db"><span style="color:#000">from</span></span><span style="color:#000000"><span style="color:#000"> ase</span><span style="color:#660">.</span><span style="color:#000">build </span></span><span style="color:#af00db"><span style="color:#008">import</span></span><span style="color:#000000"><span style="color:#000"> molecule</span></span></div><div><span style="color:#000000"><span style="color:#000">calc </span><span style="color:#660">=</span><span style="color:#000"> CP2K</span><span style="color:#660">()</span></span></div><div><span style="color:#000000"><span style="color:#000">atoms </span><span style="color:#660">=</span><span style="color:#000"> molecule</span><span style="color:#660">(</span></span><span style="color:#a31515"><span style="color:#080">'H2O'</span></span><span style="color:#000000"><span style="color:#660">,</span><span style="color:#000"> calculator</span><span style="color:#660">=</span><span style="color:#000">calc</span><span style="color:#660">)</span></span></div><div><span style="color:#000000"><span style="color:#000">atoms</span><span style="color:#660">.</span><span style="color:#000">center</span><span style="color:#660">(</span><span style="color:#000">vacuum</span><span style="color:#660">=</span></span><span style="color:#09885a"><span style="color:#066">2.0</span></span><span style="color:#000000"><span style="color:#660">)</span></span></div><div><span style="color:#795e26"><span style="color:#008">print</span></span><span style="color:#000000"><span style="color:#660">(</span><span style="color:#000">atoms</span><span style="color:#660">.</span><span style="color:#000">get_potential_energy</span><span style="color:#660">())</span></span></div></div></div></code></div><br>This cannot use GPUs, however. I don't think there is a package with GPU support, you would have to compile it yourself.<br></div><div><br></div><div>Fabian<br></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/4703be55-575a-4cc2-92b4-f4fea103ed0a%40googlegroups.com?utm_medium=email&utm_source=footer" target="_blank" rel="noreferrer">https://groups.google.com/d/msgid/cp2k/4703be55-575a-4cc2-92b4-f4fea103ed0a%40googlegroups.com</a>.<br>
</blockquote></div>