<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Indeed, it makes sense now. However, if I launch many R processes using the "parallel" package, I can easily have all the "logical" cores running. In the background, if I'm correct ,R will "fork" and not create a thread. So we have independent processes. On a 20 cores CPU for example, I have 40 "logical" cores and all the cores are running, according to htop.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">With Slurm, I can't reproduce the same behavior even if I use the <span style="font-family:Arial,Helvetica,sans-serif">SelectTypeParameters=CR_CPU.</span></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><span style="font-family:Arial,Helvetica,sans-serif"><br></span></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><span style="font-family:Arial,Helvetica,sans-serif">So, is there a config to tune, an option to use in "sbatch" to achieve the same result, or should I rather launch 20 jobs per node and have each job split in two internally (using "parallel" or "future" for example)?</span></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Oct 8, 2020 at 6:32 PM William Brown <<a href="mailto:william@signalbox.org.uk">william@signalbox.org.uk</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto">R is single threaded.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 8 Oct 2020, 07:44 Diego Zuccato, <<a href="mailto:diego.zuccato@unibo.it" target="_blank">diego.zuccato@unibo.it</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Il 08/10/20 08:19, David Bellot ha scritto:<br>
<br>
> good spot. At least, scontrol show job is now saying that each job only<br>
> requires one "CPU", so it seems all the cores are treated the same way now.<br>
> Though I still have the problem of not using more than half the cores.<br>
> So I suppose it might be due to the way I submit (batchtools in this<br>
> case) the jobs.<br>
Maybe R is generating single-threaded code? In that case, only a single<br>
process can run on a given core at a time (processes does not share<br>
memory map, threads do, and on Intel CPUs there's a single MMU per core,<br>
not one per thread as in some AMDs).<br>
<br>
-- <br>
Diego Zuccato<br>
DIFA - Dip. di Fisica e Astronomia<br>
Servizi Informatici<br>
Alma Mater Studiorum - Università di Bologna<br>
V.le Berti-Pichat 6/2 - 40127 Bologna - Italy<br>
tel.: +39 051 20 95786<br>
<br>
</blockquote></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div><table border="0" cellpadding="0" cellspacing="0" style="line-height:0px;padding:0px;border-spacing:0px;margin:0px;border-collapse:collapse"><tbody><tr><td width="90"><table border="0" cellpadding="0" cellspacing="0" style="font-family:Arial,Helvetica,sans-serif;line-height:0px;padding:0px;border-spacing:0px;margin:0px;border-collapse:collapse"><tbody><tr><td style="border-collapse:collapse;line-height:0px"><a rel="nofollow" href="https://www.lifetrading.com.au/" style="color:rgb(17,85,204);font-size:0px;line-height:0px" target="_blank"><img height="90" width="90" alt="" border="0" src="https://cdn.share-and-review.com/a4dbb7fe-109f-4836-b28a-19f584decda8/-/resize/180x180/img.png" style="max-width: 100%;"></a></td></tr></tbody></table></td><td width="7" style="border-collapse:collapse;padding-right:7px;width:7px"></td><td width="3" style="border-collapse:collapse;background-color:rgb(62,194,207);width:3px"></td><td width="9" style="border-collapse:collapse;padding-right:9px;width:9px"></td><td><table border="0" cellpadding="0" cellspacing="0" style="font-family:Arial,Helvetica,sans-serif;line-height:0px;padding:0px;border-spacing:0px;margin:0px;border-collapse:collapse"><tbody><tr><td><table border="0" cellpadding="0" cellspacing="0" style="font-family:Arial,Helvetica,sans-serif;line-height:0px;padding:0px;border-spacing:0px;margin:0px;border-collapse:collapse"><tbody><tr><td><table border="0" cellpadding="0" cellspacing="0" style="font-family:Arial,Helvetica,sans-serif;line-height:0px;padding:0px;border-spacing:0px;margin:0px;border-collapse:collapse"><tbody><tr><td style="font-family:Arial,Helvetica,sans-serif;border-collapse:collapse;font-size:18px;line-height:20px;font-weight:bold"><span style="line-height:20px;color:rgb(62,194,207)">David Bellot</span></td></tr><tr><td style="border-collapse:collapse;padding-bottom:1px;height:1px"></td></tr></tbody></table></td><td style="border-collapse:collapse;padding-right:4px;width:4px"></td><td style="border-collapse:collapse;background-color:rgb(89,89,89);width:1px"></td><td style="border-collapse:collapse;padding-right:4px;width:4px"></td><td><table border="0" cellpadding="0" cellspacing="0" style="font-family:Arial,Helvetica,sans-serif;line-height:0px;padding:0px;border-spacing:0px;margin:0px;border-collapse:collapse"><tbody><tr><td style="font-family:Arial,Helvetica,sans-serif;border-collapse:collapse;font-size:15px;font-style:italic;line-height:17px"><span style="line-height:17px;color:rgb(89,89,89)">Head of Quantitative Research</span></td></tr></tbody></table></td></tr></tbody></table></td></tr><tr><td><table border="0" cellpadding="0" cellspacing="0" style="font-family:Arial,Helvetica,sans-serif;line-height:0px;padding:0px;border-spacing:0px;margin:0px;border-collapse:collapse"><tbody><tr><td><table border="0" cellpadding="0" cellspacing="0" style="font-family:Arial,Helvetica,sans-serif;line-height:0px;padding:0px;border-spacing:0px;margin:0px;border-collapse:collapse"><tbody><tr><td style="font-family:Arial,Helvetica,sans-serif;border-collapse:collapse;font-size:11px;line-height:13px"><span style="line-height:13px;color:rgb(0,0,1)"> </span></td></tr></tbody></table></td></tr></tbody></table></td></tr><tr><td><table border="0" cellpadding="0" cellspacing="0" style="font-family:Arial,Helvetica,sans-serif;line-height:0px;padding:0px;border-spacing:0px;margin:0px;border-collapse:collapse"><tbody><tr><td><table border="0" cellpadding="0" cellspacing="0" style="font-family:Arial,Helvetica,sans-serif;line-height:0px;padding:0px;border-spacing:0px;margin:0px;border-collapse:collapse"><tbody><tr><td style="font-family:Arial,Helvetica,sans-serif;border-collapse:collapse;font-size:12px;line-height:14px"><span style="line-height:14px;font-weight:bold;color:rgb(62,194,207)">A.</span> <span style="line-height:14px;color:rgb(143,143,143)">Suite B, Level 3A, 43-45 East Esplanade, Manly, NSW 2095</span></td></tr><tr><td style="border-collapse:collapse;padding-bottom:1px;height:1px"></td></tr><tr><td style="font-family:Arial,Helvetica,sans-serif;border-collapse:collapse;font-size:12px;line-height:14px"><span style="line-height:14px;font-weight:bold;color:rgb(62,194,207)">E.</span> <span style="line-height:14px;color:rgb(143,143,143)"><a href="mailto:david.bellot@lifetrading.com.au" style="color:rgb(17,85,204)" target="_blank">david.bellot@lifetrading.com.au</a></span></td></tr><tr><td style="border-collapse:collapse;padding-bottom:1px;height:1px"></td></tr></tbody></table></td></tr></tbody></table></td></tr><tr><td><table border="0" cellpadding="0" cellspacing="0" style="font-family:Arial,Helvetica,sans-serif;line-height:0px;padding:0px;border-spacing:0px;margin:0px;border-collapse:collapse"><tbody><tr><td><table border="0" cellpadding="0" cellspacing="0" style="font-family:Arial,Helvetica,sans-serif;line-height:0px;padding:0px;border-spacing:0px;margin:0px;border-collapse:collapse"><tbody><tr><td style="font-family:Arial,Helvetica,sans-serif;border-collapse:collapse;font-size:12px;line-height:14px"><span style="line-height:14px;font-weight:bold;color:rgb(62,194,207)">P.</span> <span style="line-height:14px;color:rgb(143,143,143)">(+61) 0405 263012</span></td></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table></div></div></div></div></div></div></div></div>