<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
pre
{mso-style-priority:99;
mso-style-link:"HTML Preformatted Char";
margin:0in;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";}
span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-priority:99;
mso-style-link:"HTML Preformatted";
font-family:Consolas;}
span.EmailStyle20
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
/* List Definitions */
@list l0
{mso-list-id:1345399542;
mso-list-type:hybrid;
mso-list-template-ids:1380373764 67698705 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l0:level1
{mso-level-text:"%1\)";
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level2
{mso-level-number-format:alpha-lower;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level3
{mso-level-number-format:roman-lower;
mso-level-tab-stop:none;
mso-level-number-position:right;
text-indent:-9.0pt;}
@list l0:level4
{mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level5
{mso-level-number-format:alpha-lower;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level6
{mso-level-number-format:roman-lower;
mso-level-tab-stop:none;
mso-level-number-position:right;
text-indent:-9.0pt;}
@list l0:level7
{mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level8
{mso-level-number-format:alpha-lower;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level9
{mso-level-number-format:roman-lower;
mso-level-tab-stop:none;
mso-level-number-position:right;
text-indent:-9.0pt;}
ol
{margin-bottom:0in;}
ul
{margin-bottom:0in;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">Hello Mohammed,<o:p></o:p></p>
<p class="MsoNormal">This is actually a topic that I have experience with.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I run my simulations remotely on a 64-core virtual machine through Azure, but the process should be the same.<o:p></o:p></p>
<p class="MsoNormal">Here is the workflow I use:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Generate a macro that does what I want. Test it out with a small activity to make sure. Create multiple copies of the macro, each with a different output filename. You can also use different time-slices if you want to, but all other information
can be the same (volume names, etc. do not need to change). Run all the macros concurrently using a shell script like below. Each process will be put on a different core and htop will display CPU usage. It’s also possible to insert a command to send you an
email alert when all the scripts are finished. It will depend on your mail server, so I haven’t shown a specific example here.<br>
<br>
<span style="font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.25in"><span style="font-size:10.0pt;font-family:"Courier New"">#!/bin/bash<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.25in"><span style="font-size:10.0pt;font-family:"Courier New"">(<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.25in;text-indent:.25in"><span style="font-size:10.0pt;font-family:"Courier New"">(<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:10.0pt;font-family:"Courier New"">Gate macro_00.mac > macro_00_log.txt &<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:10.0pt;font-family:"Courier New"">Gate macro_01.mac > macro_01_log.txt &<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:10.0pt;font-family:"Courier New"">Gate macro_02.mac > macro_02_log.txt &<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:10.0pt;font-family:"Courier New"">Gate macro_03.mac > macro_03_log.txt &<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:10.0pt;font-family:"Courier New"">Gate macro_04.mac > macro_04_log.txt &<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:10.0pt;font-family:"Courier New"">Gate macro_05.mac > macro_05_log.txt &<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:10.0pt;font-family:"Courier New"">Gate macro_06.mac > macro_06_log.txt &<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:10.0pt;font-family:"Courier New"">Gate macro_07.mac > macro_07_log.txt &<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:10.0pt;font-family:"Courier New"">Gate macro_08.mac > macro_08_log.txt &<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:10.0pt;font-family:"Courier New"">Gate macro_09.mac > macro_09_log.txt &<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:10.0pt;font-family:"Courier New"">Gate macro_10.mac > macro_10_log.txt &<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.75in;text-indent:.25in"><span style="font-size:10.0pt;font-family:"Courier New"">wait<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.25in;text-indent:.25in"><span style="font-size:10.0pt;font-family:"Courier New"">)<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.25in"><span style="font-size:10.0pt;font-family:"Courier New""># insert command to send email here<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.25in"><span style="font-size:10.0pt;font-family:"Courier New"">) &<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.25in"><span style="font-size:10.0pt;font-family:"Courier New"">htop<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal">An alternative approach is to use parameterized macros. For this, you’d create one macro with GATE parameters as place holders using braces. Then, the script file would call that macro multiple times while changing the parameters. For instance,
you could run one simulation by splitting it over time by using parameters for timestart and timestop like this in the macro:
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-family:"Courier New"">/gate/application/setTimeSlice 0.125 s<br>
/gate/application/setTimeStart {timestart} s<br>
/gate/application/setTimeStop {timestop} s<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal">Then the script would define the parameters for each process:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.0pt;font-family:"Courier New"">#!/bin/bash<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.0pt;font-family:"Courier New"">(<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in;text-indent:.5in"><span style="font-size:10.0pt;font-family:"Courier New"">(<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.5in"><span style="font-size:10.0pt;font-family:"Courier New"">Gate -a [timestart,0.000][timestop,0.125] paramMacro.mac > output_00_log.txt &
<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.5in"><span style="font-size:10.0pt;font-family:"Courier New"">Gate -a [timestart,0.125][timestop,0.250] paramMacro.mac > output_01_log.txt &
<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.5in"><span style="font-size:10.0pt;font-family:"Courier New"">Gate -a [timestart,0.250][timestop,0.375] paramMacro.mac > output_02_log.txt &
<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.5in"><span style="font-size:10.0pt;font-family:"Courier New"">Gate -a [timestart,0.375][timestop,0.500] paramMacro.mac > output_03_log.txt &
<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.5in"><span style="font-size:10.0pt;font-family:"Courier New"">Gate -a [timestart,0.500][timestop,0.625] paramMacro.mac > output_04_log.txt &
<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.5in"><span style="font-size:10.0pt;font-family:"Courier New"">Gate -a [timestart,0.625][timestop,0.750] paramMacro.mac > output_05_log.txt &
<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.5in"><span style="font-size:10.0pt;font-family:"Courier New"">Gate -a [timestart,0.750][timestop,0.875] paramMacro.mac > output_06_log.txt &
<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.5in"><span style="font-size:10.0pt;font-family:"Courier New"">Gate -a [timestart,0.875][timestop,1.000] paramMacro.mac > output_07_log.txt &
<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.5in"><span style="font-size:10.0pt;font-family:"Courier New"">wait<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in;text-indent:.5in"><span style="font-size:10.0pt;font-family:"Courier New"">)<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.0pt;font-family:"Courier New"">wait<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.0pt;font-family:"Courier New""># insert command to send email here<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.0pt;font-family:"Courier New"">) &<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.0pt;font-family:"Courier New"">htop<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I hope that helps!<o:p></o:p></p>
<p class="MsoNormal">Josh<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b>From:</b> Gate-users <gate-users-bounces@lists.opengatecollaboration.org>
<b>On Behalf Of </b>Mohammed REZZOUG<br>
<b>Sent:</b> Wednesday, June 10, 2020 10:35 AM<br>
<b>To:</b> gate-users@lists.opengatecollaboration.org<br>
<b>Subject:</b> [Gate-users] GATE IN MULTICORE PROCESSOR STAND ALONE WORKSTATION<o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">Dear Gate users</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<pre><span style="font-family:"Arial",sans-serif">I am using the a workstation with 24 cores. The problem at hand is that when I run the code <br>and analyze my processor, I find that only one core is being used. It takes a long time for <br>the simulation to get executed even for primitive problems.<o:p></o:p></span></pre>
<pre><span style="font-family:"Arial",sans-serif"><o:p> </o:p></span></pre>
<pre><span style="font-family:"Arial",sans-serif">In the manual there are instructions about parallel processing using<o:p></o:p></span></pre>
<pre><span style="font-family:"Arial",sans-serif">clusters but there is no mention about multi core systems.<o:p></o:p></span></pre>
<pre><span style="font-family:"Arial",sans-serif"><o:p> </o:p></span></pre>
<pre><span style="font-family:"Arial",sans-serif">Is it possible to divide the work among the cores of my system like in<o:p></o:p></span></pre>
<pre><span style="font-family:"Arial",sans-serif">clusters ?<br><br><br>---</span><o:p></o:p></pre>
<pre><span style="font-family:"Arial",sans-serif">Mohammed</span><o:p></o:p></pre>
</div>
</div>
</div>
</body>
</html>