<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<div id="divtagdefaultwrapper" dir="ltr" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, "EmojiFont", "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">
<p>This went a long way towards clearing up my confusion, thanks again. I will try starting an MPI-parallel calculations for 4 nodes with 16 cores each using the following .machines-file:<br>
<br>
<font style="font-family:Calibri,Arial,Helvetica,sans-serif,serif,"EmojiFont"" size="3" face="Calibri,Arial,Helvetica,sans-serif" color="black"><span dir="ltr" style="font-size:12pt; background-color:white"></span></font></p>
<font style="font-family:Calibri,Arial,Helvetica,sans-serif,serif,"EmojiFont"" size="3" face="Calibri,Arial,Helvetica,sans-serif" color="black">
<div style="margin-top:0; margin-bottom:0">1:g008:16</div>
<div style="margin-top:0; margin-bottom:0">1:g021:16</div>
<div style="margin-top:0; margin-bottom:0">1:g025:16</div>
<div style="margin-top:0; margin-bottom:0">1:g028:16</div>
</font><font style="font-family:Calibri,Arial,Helvetica,sans-serif,serif,"EmojiFont"" size="3" face="Calibri,Arial,Helvetica,sans-serif" color="black"><span dir="ltr" style="font-size:12pt; background-color:white">lapw0: g008:8</span></font> g021:8 g025:8 g028:8
<p>dstart: <font style="font-family:Calibri,Arial,Helvetica,sans-serif,serif,"EmojiFont"" size="3" face="Calibri,Arial,Helvetica,sans-serif" color="black">
<span dir="ltr" style="font-size:12pt; background-color:white">g008:8</span></font> g021:8 g025:8 g028:8</p>
<p><br>
</p>
<p>... and see how it performs. If the matrix sizes are small, I understand that I could also have each node work on 2 (or more) k-points at the same time, by specifying:</p>
<p><br>
</p>
<p><font style="font-family:Calibri,Arial,Helvetica,sans-serif,serif,"EmojiFont"" size="3" face="Calibri,Arial,Helvetica,sans-serif" color="black"><span dir="ltr" style="font-size:12pt; background-color:white"></span></font></p>
<font style="font-family:Calibri,Arial,Helvetica,sans-serif,serif,"EmojiFont"" size="3" face="Calibri,Arial,Helvetica,sans-serif" color="black">
<div style="margin-top:0; margin-bottom:0">1:g008:8</div>
<div style="margin-top:0; margin-bottom:0"><font style="font-family:Calibri,Arial,Helvetica,sans-serif,serif,"EmojiFont"" size="3" face="Calibri,Arial,Helvetica,sans-serif" color="black">1:g008:8</font></div>
<div style="margin-top:0; margin-bottom:0">1:g021:8</div>
<div style="margin-top:0; margin-bottom:0"><font style="font-family:Calibri,Arial,Helvetica,sans-serif,serif,"EmojiFont"" size="3" face="Calibri,Arial,Helvetica,sans-serif" color="black">1:g021:8</font><br>
</div>
<div style="margin-top:0; margin-bottom:0">1:g025:8<br>
</div>
<div style="margin-top:0; margin-bottom:0"><font style="font-family:Calibri,Arial,Helvetica,sans-serif,serif,"EmojiFont"" size="3" face="Calibri,Arial,Helvetica,sans-serif" color="black">1:g025:8</font><br>
</div>
<div style="margin-top:0; margin-bottom:0">1:g028:8</div>
</font><font style="font-family:Calibri,Arial,Helvetica,sans-serif,serif,"EmojiFont"" size="3" face="Calibri,Arial,Helvetica,sans-serif" color="black"><span dir="ltr" style="font-size:12pt; background-color:white"></span></font><font style="font-family:Calibri,Arial,Helvetica,sans-serif,serif,"EmojiFont"" size="3" face="Calibri,Arial,Helvetica,sans-serif" color="black">1:g028:8</font></div>
<div dir="ltr" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, "EmojiFont", "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">
<br>
</div>
<div dir="ltr" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, "EmojiFont", "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">
so that for instance g008 will work on 2 kpoints using 8 cores for each k point, am I right? And a (hopefully) final question, since qtl according to the manual runs in k-point parallel, is it also affected by the parallellization scheme specified for lapw1
 and lapw2 (unless I deliberately change it)?<br>
<p></p>
<p><br>
</p>
<p><br>
</p>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>Fra:</b> Wien <wien-bounces@zeus.theochem.tuwien.ac.at> på vegne af Ruh, Thomas <thomas.ruh@tuwien.ac.at><br>
<b>Sendt:</b> 12. oktober 2020 10:59:09<br>
<b>Til:</b> A Mailing list for WIEN2k users<br>
<b>Emne:</b> Re: [Wien] .machines for several nodes</font>
<div> </div>
</div>
<div>
<p>I am afraid, there is still some confusion.</p>
<p><br>
</p>
<p>First about <em>lapw1</em>:</p>
<p>Sorry for my unclear statement - I meant that you need one line per k-parallel job in the sense that #lines k-points are run simultaneously, i. e. if you speficify this part of the machines file like this:</p>
<p><br>
</p>
<p>1:g008:16</p>
<p>1:g021:16</p>
<p>1:g025:16</p>
<p>1:g028:16</p>
<p><br>
</p>
<p>your k-point list will be split into 4 parts of 56 k-points each [1] , which will be processed step-by-step. Node g008 will work in its first k-point, while node g021 will do the same for its first k-point, and so on</p>
<p>You need the ":16" after the name of the node. Otherwise, on every node only <strong>
one</strong> core would be used. If it is useful to use 16 mpi-parallel jobs per k-point (meaning that the matrices will distributed on 16 cores with each core getting only 1/16 of the matrix elements) depends on your matrix sizes (which in turn depend on your
 rkmax). You should check that by grepping :rkm in your case.scf file. If the matrix size there is small, using OMP_NUM_THREADS 16 might be much faster (since MPI adds overhead to your calculation).<br>
</p>
<p><br>
</p>
<p><br>
</p>
<p>Regarding <em>lapw0/dstart</em>:</p>
<p>The way you set the calculation up could lead to (possible severe) overloading of your nodes: WIEN2k will start 24 jobs on each node (so 1.5 times the number of cores) at the same time doing the calculation for 1 atom each.
</p>
<p>As one possible alternative, you specify only 8 cores per node (i.e. for example "lapw0: g008:8" and so on) 8 jobs per node, which would lead to step-by-step calculations for 3 atoms per core.
</p>
<p>Which option is faster is hard to tell and depends a lot on your hardware. </p>
<p><br>
</p>
<p>So what you could do - in principle - is to test multiple configurations (you can modify your .machines file on the fly during a SCF run) in the first cycles, compare the times (in case.dayfile), and use the faster one for the rest of the run.<br>
</p>
<p><br>
</p>
<p><br>
</p>
<p>Regards,<br>
Thomas</p>
<p><br>
</p>
<p>[1] Sidenote: This splitting is controlled by the first number - in this case 4 equal sublists will be set-up - you could also specifiy different "weights", for instance, if your nodes are of different speeds, the machinesfile could then read for example:</p>
<p><br>
</p>
<p>3:g008:16</p>
<p>2:g021:16</p>
<p>2:g025:16</p>
<p>1:g028:16</p>
<p><br>
</p>
<p>In this case, the first node would "get" 3/8 of the k-points (84), nodes g021 and g025 would geht 2/8 each (56), and the last one (because it is very slow) would get only 28 k-points.<br>
</p>
<p><br>
</p>
<div dir="ltr" style="font-size:12pt; color:#000000; background-color:#FFFFFF; font-family:Calibri,Arial,Helvetica,sans-serif">
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>Von:</b> Wien <wien-bounces@zeus.theochem.tuwien.ac.at> im Auftrag von Christian Søndergaard Pedersen <chrsop@dtu.dk><br>
<b>Gesendet:</b> Montag, 12. Oktober 2020 10:24<br>
<b>An:</b> A Mailing list for WIEN2k users<br>
<b>Betreff:</b> Re: [Wien] .machines for several nodes</font>
<div> </div>
</div>
<div><style type="text/css" style="">
<!--
p
        {margin-top:0;
        margin-bottom:0}
-->
</style>
<div id="divtagdefaultwrapper" dir="ltr" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, "EmojiFont", "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">
<p>Thanks a lot for your answer. After re-reading the relevant pages in the User Guide, I am still left with some questions. Specifically, I am working with a system containing 96 atoms (as described in the case.struct-file) and 224 inequivalent k points; i.e.
 500 kpoints distributed as a 7x8x8 grid (448 total) reduced to 224 kpoints. Running on 4 nodes each with 16 cores, I want each of the 4 nodes to calculate 56 k points (224/4 = 56). Meanwhile, each node should handle 24 atoms (96/4 = 24).</p>
<p><br>
</p>
<p>Part of my confusion stems from your suggestion that I repeat the line "1:g008:4 [...]" a number of times equal to the number of k points I want to run in parallel, and that each repetition should refer to a different node. The reason is that the line in
 question already contains the names of all four nodes that were assigned to the job. However, combining your advice with the example on page 86, the lines should read:</p>
<p><br>
</p>
<p><span style="font-family:"Courier New",monospace">1:g008</span></p>
<p><span style="font-family:"Courier New",monospace">1:g021</span></p>
<p><span style="font-family:"Courier New",monospace">1:g025</span></p>
<p><span style="font-family:"Courier New",monospace">1:g028 # k points distributed over 4 jobs, running on 1 node each</span><br>
</p>
<p><span style="font-family:"Courier New",monospace">extrafine:1</span></p>
<p><br>
</p>
<p>As for the parallellization over atoms for dstart and lapw0, I understand that the numbers assigned to each individual node should sum up to the number of atoms in the system, like this:</p>
<p><br>
</p>
<p><span style="font-family:"Courier New",monospace">dstart:g008:24 g021:24 g025:24 g028:24</span><br>
</p>
<p><span style="font-family:"Courier New",monospace">lapw0</span><span style="font-family:"Courier New",monospace">:g008:24 g021:24 g025:24 g028:24</span><br>
</p>
<p><br>
</p>
<p>so the final .machines-file would be a combination of the above pieces. Have I understood this correctly, or am I missing the mark? Also, is there any difference between distributing the k points across four jobs (1 for each node), and across 224 jobs (by
 repeating each of the 1:gxxx lines 56 times)?</p>
<p><br>
</p>
<p>Best regards</p>
<p>Christian<br>
</p>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>Fra:</b> Wien <wien-bounces@zeus.theochem.tuwien.ac.at> på vegne af Ruh, Thomas <thomas.ruh@tuwien.ac.at><br>
<b>Sendt:</b> 12. oktober 2020 09:29:37<br>
<b>Til:</b> A Mailing list for WIEN2k users<br>
<b>Emne:</b> Re: [Wien] .machines for several nodes</font>
<div> </div>
</div>
<div>
<p>Hi,</p>
<p><br>
</p>
<p>your .machines is wrong.</p>
<p><br>
</p>
<p>The nodes for <em>lapw1 </em>are prefaced not with "lapw1:" but only with "1:".
<em>lapw2 </em>needs no line, as it takes the same nodes as lapw1 before.</p>
<p><br>
</p>
<p>So an example for your usecase would be:</p>
<p><br>
</p>
<span style="font-family:"Courier New",monospace">#</span>
<p><span style="font-family:"Courier New",monospace">dstart:g008:4 g021:4 g025:4 g028:4</span></p>
<p><span style="font-family:"Courier New",monospace">lapw0:g008:4 g021:4 g025:4 g028:4</span><br>
</p>
<p><span style="font-family:"Courier New",monospace">1:g008:4 g021:4 g025:4 g028:4</span></p>
<p><span style="font-family:"Courier New",monospace">granularity:1</span></p>
<p><span style="font-family:"Courier New",monospace">extrafine:1<br>
</span></p>
<p><br>
</p>
<p>The line starting with "1:" has to be repeated (with different nodes, of course) x times, if you want to run x k-points in parallel (you can find more details about this in the usersguide, pages 84-91).<span style="font-family:"Courier New",monospace"></span></p>
<p><br>
</p>
<p>Regards,</p>
<p>Thomas<br>
</p>
<p><br>
</p>
<p>PS: As a sidenote: Both <em>dstart </em>and <em>lapw0 </em>parallelize over atoms, so 16 nodes might not be the best choice for your example.<br>
</p>
<div dir="ltr" style="color:rgb(33,33,33)">
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>Von:</b> Wien <wien-bounces@zeus.theochem.tuwien.ac.at> im Auftrag von Christian Søndergaard Pedersen <chrsop@dtu.dk><br>
<b>Gesendet:</b> Montag, 12. Oktober 2020 09:06<br>
<b>An:</b> wien@zeus.theochem.tuwien.ac.at<br>
<b>Betreff:</b> [Wien] .machines for several nodes</font>
<div> </div>
</div>
<div>
<div id="divtagdefaultwrapper" dir="ltr" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, "EmojiFont", "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">
<p>Hello everybody</p>
<p><br>
</p>
<p>I am new to WIEN2k, and am struggling with parallellizing calculations on our HPC cluster beyond what can be achieved using OMP. In particular, I want to execute run_lapw and/or runsp_lapw running on four identical nodes (16 cores each), parallellizing over
 k points (unless there's a more efficient scheme). To achieve this, I try to mimic the example from the User Guide (without the extra Alpha node), but my .machines-file does not work the way I intended. This is what I have:</p>
<p><br>
</p>
<p><span style="font-family:"Courier New",monospace">#</span></p>
<p><span style="font-family:"Courier New",monospace">dstart:g008:4 g021:4 g025:4 g028:4</span></p>
<p><span style="font-family:"Courier New",monospace">lapw0:g008:4 g021:4 g025:4 g028:4</span><br>
</p>
<p><span style="font-family:"Courier New",monospace">lapw1:g008:4 g021:4 g025:4 g028:4</span></p>
<p><span style="font-family:"Courier New",monospace">lapw2:g008:4 g021:4 g025:4 g028:4</span><br>
</p>
<p><span style="font-family:"Courier New",monospace">granularity:1</span></p>
<p><span style="font-family:"Courier New",monospace">extrafine:1</span><br>
</p>
<p><br>
</p>
<p>The node names gxxx are read from SLURM_JOB_NODELIST in the submit script, and a couple of regular expressions generate the above lines. Afterwards, my job script does the following:<br>
</p>
<p><br>
</p>
<p><span style="font-family:"Courier New",monospace">srun hostname -s > slurm.hosts</span><br>
<span style="font-family:"Courier New",monospace">run_lapw -p</span><br>
<br>
which results in a job that idles for the entire walltime and finishes with a CPU efficiency of 0.00%. I would appreciate any help in figuring out where I've gone wrong.<br>
</p>
<p><br>
</p>
<p>Best regards<br>
Christian<br>
</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>