<div dir="ltr"><div>Dear Bryan,<br></div><div><br></div><div>According to the comment you mentioned, I personally I used -march=native for my <span id="gmail-m_-631510637349765021:vv.3">MacBook</span>, which brought a 3% speed increase only. I did so by adding this flag in the following <span id="gmail-m_-631510637349765021:vv.4">CMake</span> entries (they can be found in advanced mode using <span id="gmail-m_-631510637349765021:vv.5">ccmake</span>): <span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0);font-family:Menlo;font-size:11px"><span id="gmail-m_-631510637349765021:vv.6">CMAKE</span>_C_FLAGS_RELEASE and </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0);font-family:Menlo;font-size:11px"><span id="gmail-m_-631510637349765021:vv.7">CMAKE</span>_<span id="gmail-m_-631510637349765021:vv.8">CXX</span>_FLAGS_RELEASE. A</span><span id="gmail-m_-631510637349765021:vv.9">ccording</span> to your build type, you might want to use in it in DEBUG or other (instead of RELEASE).</div><div><br></div><div>Best regards,</div><div>Antoine</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Feb 3, 2020 at 4:27 PM Bryan McIntosh <<a href="mailto:mcintoshster@gmail.com">mcintoshster@gmail.com</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="ltr"><div>Dear Maxime and Antoine,</div><div><br></div><div>A few weeks ago, I saw on the GATE mailing list that Maxime has used the GCC flag -march=skylake-avx515 to increase performance on newer Intel CPUs that support hardware-accelerated AVX-512 instructions. After a bit of research I found that similar flags exist for taking advantage of AVX and AVX2 acceleration on AMD Ryzen CPUs (znver1 and znver2, depending on the CPU), and I am interested to see if these lead to a performance increase as well.</div><div><br></div><div>One problem that I have, though, is I am not sure where to place these flags during the compilation process. Do they go in CMakeLists.txt, or somewhere else? And if the former, where in the file do they need to go?</div><div><br></div><div>Thank you very much for your time,</div><div><br></div><div>-Bryan McIntosh</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jan 10, 2020 at 5:21 AM <<a href="mailto:gate-users-request@lists.opengatecollaboration.org" target="_blank">gate-users-request@lists.opengatecollaboration.org</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">Send Gate-users mailing list submissions to<br>
<a href="mailto:gate-users@lists.opengatecollaboration.org" target="_blank">gate-users@lists.opengatecollaboration.org</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
<a href="http://lists.opengatecollaboration.org/mailman/listinfo/gate-users" rel="noreferrer" target="_blank">http://lists.opengatecollaboration.org/mailman/listinfo/gate-users</a><br>
or, via email, send a message with subject or body 'help' to<br>
<a href="mailto:gate-users-request@lists.opengatecollaboration.org" target="_blank">gate-users-request@lists.opengatecollaboration.org</a><br>
<br>
You can reach the person managing the list at<br>
<a href="mailto:gate-users-owner@lists.opengatecollaboration.org" target="_blank">gate-users-owner@lists.opengatecollaboration.org</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of Gate-users digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
1. Re: Performances: vGate vs Gate on macOS (maxime)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Fri, 10 Jan 2020 11:04:25 +0100<br>
From: maxime <<a href="mailto:maxime.chauvin@inserm.fr" target="_blank">maxime.chauvin@inserm.fr</a>><br>
To: Antoine Merlet <<a href="mailto:ant.merlet@gmail.com" target="_blank">ant.merlet@gmail.com</a>><br>
Cc: <a href="mailto:gate-users@lists.opengatecollaboration.org" target="_blank">gate-users@lists.opengatecollaboration.org</a><br>
Subject: Re: [Gate-users] Performances: vGate vs Gate on macOS<br>
Message-ID: <<a href="mailto:1B5C3CB4-EDE1-44A6-96D4-3E1E4A29F1F4@inserm.fr" target="_blank">1B5C3CB4-EDE1-44A6-96D4-3E1E4A29F1F4@inserm.fr</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
Dear Antoine,<br>
<br>
yes this is expected. I have seen the same on my macbook, GATE being slightly faster in the vGATE compared to the host (MacOS) with the standard compiling options.<br>
<br>
Virtual machines are quite good at using the full CPU power, it is a different story for GPU…<br>
<br>
So in the end, the only thing that matters (VM or not) is the clock speed of your CPU. You can slightly increase the performance with compiler options related to your CPU architecture. <br>
<br>
For example, we have seen an increase of performance of ~20% on an HPC (<a href="https://www.calmip.univ-toulouse.fr/" rel="noreferrer" target="_blank">https://www.calmip.univ-toulouse.fr/</a> <<a href="https://www.calmip.univ-toulouse.fr/" rel="noreferrer" target="_blank">https://www.calmip.univ-toulouse.fr/</a>>) with the compiler option "-march=skylake-avx512” for Intel Skylake processors. For this you need to compile both Geant4 and GATE with the compiler optimisation option.<br>
<br>
Of course we are talking about performance on a single CPU. You can speed up your simulation by running several sub-simulations on many CPUs.<br>
<br>
Best regards,<br>
Maxime Chauvin<br>
<br>
> On 10 Jan 2020, at 10:38, Antoine Merlet <<a href="mailto:ant.merlet@gmail.com" target="_blank">ant.merlet@gmail.com</a>> wrote:<br>
> <br>
> Dear Gate users,<br>
> <br>
> I have compiled the latest develop version of Gate with Geant4-10.05.p01 under macOS Mojave. Previously using vGate on the same MacBook, I was hoping for decreased simulation time after removing the virtual machine intermediary. However, tests shows nearly no differences - vGate is even a bit faster - regardless of the simulation duration (minutes / dozens of hours). <br>
> <br>
> Therefore, I would like to know if anyone had similar experiences, and if this kind of results are to be expected. Also, is there any way of increasing the performances of Gate on macOS by optimizing the compilation parameters?<br>
> <br>
> You can find enclosed a simple test file which has been adapted from GateContrib Cylindrical PET example (<a href="https://github.com/OpenGATE/GateContrib/tree/master/imaging/PET" rel="noreferrer" target="_blank">https://github.com/OpenGATE/GateContrib/tree/master/imaging/PET</a> <<a href="https://github.com/OpenGATE/GateContrib/tree/master/imaging/PET" rel="noreferrer" target="_blank">https://github.com/OpenGATE/GateContrib/tree/master/imaging/PET</a>>). The resulting simulation time is 8min44s when using vGate and 8min50sec when using Gate under macOS.<br>
> <br>
> Best regards,<br>
> Antoine<br>
> <main.mac><GateMaterials.db>_______________________________________________<br>
> Gate-users mailing list<br>
> <a href="mailto:Gate-users@lists.opengatecollaboration.org" target="_blank">Gate-users@lists.opengatecollaboration.org</a><br>
> <a href="http://lists.opengatecollaboration.org/mailman/listinfo/gate-users" rel="noreferrer" target="_blank">http://lists.opengatecollaboration.org/mailman/listinfo/gate-users</a><br>
<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://lists.opengatecollaboration.org/pipermail/gate-users/attachments/20200110/07185d90/attachment-0001.html" rel="noreferrer" target="_blank">http://lists.opengatecollaboration.org/pipermail/gate-users/attachments/20200110/07185d90/attachment-0001.html</a>><br>
<br>
------------------------------<br>
<br>
Subject: Digest Footer<br>
<br>
_______________________________________________<br>
Gate-users mailing list<br>
<a href="mailto:Gate-users@lists.opengatecollaboration.org" target="_blank">Gate-users@lists.opengatecollaboration.org</a><br>
<a href="http://lists.opengatecollaboration.org/mailman/listinfo/gate-users" rel="noreferrer" target="_blank">http://lists.opengatecollaboration.org/mailman/listinfo/gate-users</a><br>
<br>
------------------------------<br>
<br>
End of Gate-users Digest, Vol 164, Issue 11<br>
*******************************************<br>
</blockquote></div></div>
</blockquote></div>