Hi Pierre,<div><br></div><div>I found this really valuable! Unfortunately, being very new to AIMD and very unfamiliar with computation in general, I was wondering if I might be able to get some advice? We have a HPC at my university where each node has 34 processors, and ~750 GB RAM available for use. It runs on a slurm queuing system.</div><div><br></div><div>Until now, I've run all my jobs using: <font face="Courier New">mpirun -np $SLURM_NTASKS cp2k.popt -I input.inp -o output.out</font></div><div>where <font face="Courier New">$SLURM_NTASKS</font> is whatever number of processors I've allocated to the job via the <font face="Courier New">--ntasks=x</font> flag.</div><div><br></div><div>So instead, I'm thinking it might be more appropriate to use the .psmp executable, but I'm not sure what the difference between the OpenMP and the MPI threads are, and what kind of ratios between the OMP and MPI threads would be most effective for speeding up an AIMD job, and how many threads of each type you can add before the parallelisation becomes less efficient.</div><div><br></div><div>Do you (or anyone else) have any advice on the matter? Is it better to have more OMP or MPI threads? And how many OMP threads per MPI thread would be appropriate? What kinds of ratios are most effective at speeding up calculations?</div><div><div><br></div></div><div>I would really appreciate any help I can get!</div><div><br></div><div>Regards,</div><div><br></div><div>Matthew</div><div class="gmail_quote"><div dir="auto" class="gmail_attr">On Friday, September 20, 2019 at 10:45:55 PM UTC+8 pierre.an...@gmail.com wrote:<br/></div><blockquote class="gmail_quote" style="margin: 0 0 0 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div text="#000000" bgcolor="#FFFFFF">
Hello Nikhil,<br>
<br>
Withe command "mpirun -n 42 cp2k.pop -i inp.inp -o -out.out", you
are requesting 42 MPI threads and not 42 OpenMP threads. MPI usually
relies on replicated data which means that, for a poorly program
software, it will request a total amount of memory which the amount
of memory required by a scalar execution times the number of
threads. This can very quickly become problematic, in particular for
QM calculations. OpenMP, however relies on shared memory, the data
is normally not replicated but shared between threads and therefore,
in an ideal scenario, the amount of memory needed for 42 OpenMP
threads is the same as a single one.<br>
<br>
This might explains why you calculation freezes. You are out of
memory. On your workstation, you should only use the executable
"cp2k.ssmp" which is the OpenMP version. Then you don't need the
mpirun command:<br>
<br>
cp2k.ssmp -i inp.inp -o -out.out<br>
<br>
To control the number of OpenMP threads, set the env variable:
OMP_NUM_THREADS, e.g. in bash, export OMP_NUM_THREADS=48<br>
<br>
Now, if you need to balance between MPI and OpenMP, you should use
the executable named cp2k.psmp. Here is such an example:<br>
<br>
export OMP_NUM_THREADS=24<br>
mpirun -n 2 cp2k.psmp -i inp.inp -o -out.out<br>
<br>
In this example, I am requesting two MPI threads and each of them
can use up to 24 OpenMP threads.<br>
<br>
Hope this clarifies things for you.<br>
<br>
Regards,<br>
Pierre</div><div text="#000000" bgcolor="#FFFFFF"><br>
<br>
<div>On 20/09/2019 14:09, Nikhil Maroli
wrote:<br>
</div>
</div><div text="#000000" bgcolor="#FFFFFF"><blockquote type="cite">
<div dir="ltr">Dear all,
<div><br>
</div>
<div>I have installed all the versions of CP2K in my workstation
with 2 x 12 core processor, total thread=48</div>
<div><br>
</div>
<div>I wanted to run cp2k in parallel using 42 threads, can
anyone share the commands that i can use.</div>
<div><br>
</div>
<div>I have tried </div>
<div><br>
</div>
<div>mpirun -n 42 cp2k.pop -i inp.inp -o -out.out</div>
<div><br>
</div>
<div>After this command there is a rise in memory to 100 % and
the whole system freezes. (i have 128GB ram).</div>
<div><br>
</div>
<div>Any suggestion will be greatly appreciated,</div>
</div></blockquote></div><div text="#000000" bgcolor="#FFFFFF"><blockquote type="cite">
-- <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 data-email-masked rel="nofollow">cp2k+uns...@googlegroups.com</a>.<br>
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/cp2k/39284c57-f6eb-463e-81a6-3a123596a9f2%40googlegroups.com?utm_medium=email&utm_source=footer" target="_blank" rel="nofollow" data-saferedirecturl="https://www.google.com/url?hl=en&q=https://groups.google.com/d/msgid/cp2k/39284c57-f6eb-463e-81a6-3a123596a9f2%2540googlegroups.com?utm_medium%3Demail%26utm_source%3Dfooter&source=gmail&ust=1652950802491000&usg=AOvVaw1Lh3htisBKCxn3QzztKrLm">https://groups.google.com/d/msgid/cp2k/39284c57-f6eb-463e-81a6-3a123596a9f2%40googlegroups.com</a>.<br>
</blockquote>
<br>
<pre cols="72">--
Dr Pierre Cazade, PhD
AD3-023, Bernal Institute,
University of Limerick,
Plassey Park Road,
Castletroy, co. Limerick,
Ireland</pre>
</div>
</blockquote></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:cp2k+unsubscribe@googlegroups.com">cp2k+unsubscribe@googlegroups.com</a>.<br />
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/cp2k/010a2dd7-dc2c-4475-8a9b-17cdbb10d20dn%40googlegroups.com?utm_medium=email&utm_source=footer">https://groups.google.com/d/msgid/cp2k/010a2dd7-dc2c-4475-8a9b-17cdbb10d20dn%40googlegroups.com</a>.<br />