<div dir="ltr">Thank you very much</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le mer. 10 juin 2020 à 15:06, Josh Knowland <<a href="mailto:jknowland@lucernodynamics.com">jknowland@lucernodynamics.com</a>> a écrit :<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 lang="EN-US">
<div class="gmail-m_6499355751115703732WordSection1">
<p class="MsoNormal">I forgot to add that my process does result in multiple output files, so you will likely need to combine them afterwards. I use singles data, so it’s a simple matter of combining the text files. I’m not sure how you would combine different
output files (root, etc.)<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div style="border-color:rgb(225,225,225) currentcolor currentcolor;border-style:solid none none;border-width:1pt medium medium;padding:3pt 0in 0in">
<p class="MsoNormal"><b>From:</b> Gate-users <<a href="mailto:gate-users-bounces@lists.opengatecollaboration.org" target="_blank">gate-users-bounces@lists.opengatecollaboration.org</a>>
<b>On Behalf Of </b>Josh Knowland<br>
<b>Sent:</b> Wednesday, June 10, 2020 10:03 AM<br>
<b>To:</b> Mohammed REZZOUG <<a href="mailto:nmedrezz@gmail.com" target="_blank">nmedrezz@gmail.com</a>>; <a href="mailto:gate-users@lists.opengatecollaboration.org" target="_blank">gate-users@lists.opengatecollaboration.org</a><br>
<b>Subject:</b> Re: [Gate-users] GATE IN MULTICORE PROCESSOR STAND ALONE WORKSTATION<u></u><u></u></p>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Hello Mohammed,<u></u><u></u></p>
<p class="MsoNormal">This is actually a topic that I have experience with.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I run my simulations remotely on a 64-core virtual machine through Azure, but the process should be the same.<u></u><u></u></p>
<p class="MsoNormal">Here is the workflow I use:<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal" style="margin-bottom:12pt">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.<span style="font-family:"Courier New""><u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:0.25in"><span style="font-size:10pt;font-family:"Courier New"">#!/bin/bash<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:0.25in"><span style="font-size:10pt;font-family:"Courier New"">(<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:0.25in;text-indent:0.25in"><span style="font-size:10pt;font-family:"Courier New"">(<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:1in"><span style="font-size:10pt;font-family:"Courier New"">Gate macro_00.mac > macro_00_log.txt &<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:1in"><span style="font-size:10pt;font-family:"Courier New"">Gate macro_01.mac > macro_01_log.txt &<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:1in"><span style="font-size:10pt;font-family:"Courier New"">Gate macro_02.mac > macro_02_log.txt &<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:1in"><span style="font-size:10pt;font-family:"Courier New"">Gate macro_03.mac > macro_03_log.txt &<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:1in"><span style="font-size:10pt;font-family:"Courier New"">Gate macro_04.mac > macro_04_log.txt &<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:1in"><span style="font-size:10pt;font-family:"Courier New"">Gate macro_05.mac > macro_05_log.txt &<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:1in"><span style="font-size:10pt;font-family:"Courier New"">Gate macro_06.mac > macro_06_log.txt &<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:1in"><span style="font-size:10pt;font-family:"Courier New"">Gate macro_07.mac > macro_07_log.txt &<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:1in"><span style="font-size:10pt;font-family:"Courier New"">Gate macro_08.mac > macro_08_log.txt &<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:1in"><span style="font-size:10pt;font-family:"Courier New"">Gate macro_09.mac > macro_09_log.txt &<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:1in"><span style="font-size:10pt;font-family:"Courier New"">Gate macro_10.mac > macro_10_log.txt &<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:0.75in;text-indent:0.25in"><span style="font-size:10pt;font-family:"Courier New"">wait<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:0.25in;text-indent:0.25in"><span style="font-size:10pt;font-family:"Courier New"">)<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:0.25in"><span style="font-size:10pt;font-family:"Courier New""># insert command to send email here<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:0.25in"><span style="font-size:10pt;font-family:"Courier New"">) &<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:0.25in"><span style="font-size:10pt;font-family:"Courier New"">htop<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""><u></u> <u></u></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:
<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal" style="margin-left:0.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<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""><u></u> <u></u></span></p>
<p class="MsoNormal">Then the script would define the parameters for each process:<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal" style="margin-left:0.5in"><span style="font-size:10pt;font-family:"Courier New"">#!/bin/bash<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:0.5in"><span style="font-size:10pt;font-family:"Courier New"">(<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:0.5in;text-indent:0.5in"><span style="font-size:10pt;font-family:"Courier New"">(<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:1.5in"><span style="font-size:10pt;font-family:"Courier New"">Gate -a [timestart,0.000][timestop,0.125] paramMacro.mac > output_00_log.txt &
<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:1.5in"><span style="font-size:10pt;font-family:"Courier New"">Gate -a [timestart,0.125][timestop,0.250] paramMacro.mac > output_01_log.txt &
<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:1.5in"><span style="font-size:10pt;font-family:"Courier New"">Gate -a [timestart,0.250][timestop,0.375] paramMacro.mac > output_02_log.txt &
<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:1.5in"><span style="font-size:10pt;font-family:"Courier New"">Gate -a [timestart,0.375][timestop,0.500] paramMacro.mac > output_03_log.txt &
<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:1.5in"><span style="font-size:10pt;font-family:"Courier New"">Gate -a [timestart,0.500][timestop,0.625] paramMacro.mac > output_04_log.txt &
<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:1.5in"><span style="font-size:10pt;font-family:"Courier New"">Gate -a [timestart,0.625][timestop,0.750] paramMacro.mac > output_05_log.txt &
<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:1.5in"><span style="font-size:10pt;font-family:"Courier New"">Gate -a [timestart,0.750][timestop,0.875] paramMacro.mac > output_06_log.txt &
<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:1.5in"><span style="font-size:10pt;font-family:"Courier New"">Gate -a [timestart,0.875][timestop,1.000] paramMacro.mac > output_07_log.txt &
<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:1.5in"><span style="font-size:10pt;font-family:"Courier New"">wait<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:0.5in;text-indent:0.5in"><span style="font-size:10pt;font-family:"Courier New"">)<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:0.5in"><span style="font-size:10pt;font-family:"Courier New"">wait<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:0.5in"><span style="font-size:10pt;font-family:"Courier New""># insert command to send email here<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:0.5in"><span style="font-size:10pt;font-family:"Courier New"">) &<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:0.5in"><span style="font-size:10pt;font-family:"Courier New"">htop<u></u><u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I hope that helps!<u></u><u></u></p>
<p class="MsoNormal">Josh<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<div style="border-color:rgb(225,225,225) currentcolor currentcolor;border-style:solid none none;border-width:1pt medium medium;padding:3pt 0in 0in">
<p class="MsoNormal"><b>From:</b> Gate-users <<a href="mailto:gate-users-bounces@lists.opengatecollaboration.org" target="_blank">gate-users-bounces@lists.opengatecollaboration.org</a>>
<b>On Behalf Of </b>Mohammed REZZOUG<br>
<b>Sent:</b> Wednesday, June 10, 2020 10:35 AM<br>
<b>To:</b> <a href="mailto:gate-users@lists.opengatecollaboration.org" target="_blank">gate-users@lists.opengatecollaboration.org</a><br>
<b>Subject:</b> [Gate-users] GATE IN MULTICORE PROCESSOR STAND ALONE WORKSTATION<u></u><u></u></p>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal"><span style="font-size:10pt;font-family:"Arial",sans-serif">Dear Gate users</span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></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.<u></u><u></u></span></pre>
<pre><span style="font-family:"Arial",sans-serif"><u></u> <u></u></span></pre>
<pre><span style="font-family:"Arial",sans-serif">In the manual there are instructions about parallel processing using<u></u><u></u></span></pre>
<pre><span style="font-family:"Arial",sans-serif">clusters but there is no mention about multi core systems.<u></u><u></u></span></pre>
<pre><span style="font-family:"Arial",sans-serif"><u></u> <u></u></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<u></u><u></u></span></pre>
<pre><span style="font-family:"Arial",sans-serif">clusters ?<br><br><br>---</span><u></u><u></u></pre>
<pre><span style="font-family:"Arial",sans-serif">Mohammed</span><u></u><u></u></pre>
</div>
</div>
</div>
</div>
</blockquote></div>