[Mesa-users] Questions about mesa-docker

Ian Foley ifoley2008 at gmail.com
Mon Nov 11 20:50:15 UTC 2024


Thanks, that's helpful.

Has the August docker update been installed?

Ian


On Tue, 12 Nov 2024 at 7:05 am, Evan Bauer <evan.bauer.astro at gmail.com>
wrote:

> Hi Ian,
>
> I don't happen to know in particular how the threading interacts with
> pgstar windows, but I think the number of windows should have negligible
> impact on runtime. There does seem to be some non-negligible overhead
> associated with connecting to the X Server for pgstar windows, but I don't
> think 1 vs N windows makes much difference.
>
> The main advantages of OpenMP come from parallelizing the most
> compute-intensive parts of the stellar evolution calculation, including
> things like EOS and opacity calls over all zones in the model, and the
> Jacobian matrix solves for the Newton iterations. You can get some sense of
> where in the code things are parallelized by looking for loops that are
> wrapped with OMP parallel instructions:
> grep "OMP PARALLEL DO" $MESA_DIR/star/private/*
>
> Cheers,
> Evan
>
>
> On Nov 8, 2024, at 5:07 PM, Ian Foley <ifoley2008 at gmail.com> wrote:
>
> Hi Evan,
>
> Thanks for this response. Hyper_V allows me to allocate up to 22 threads,
> but there is no setting for cores. When I run MESA, I have to set
> OMP_NUM_THREADS=n. With n set to 22 it ran much slower than setting it on
> 12. It seems to me that Hyper_V sets the maximum number of threads that can
> be allocated, but the actual number used depends on the OMP_NUM_THREADS set
> for the run. I don't know how many cores I am allocating to docker
> containers, only the number of threads. I'm guessing that 14 is the optimal
> number for me because there are 6 performance cores and 8 efficient ones.
> But it is a guess and I understand little about the processor architecture.
>
> I did think the advantage of more threads would depend on how the MESA
> code has been written to incorporate OpenMP and that you might know about
> that.
>
> Am I correct to assume each pgstar window would run in a different thread
> so the number of pgstar windows and using pgstar will have little impact on
> MESA execution speed if there are enough cores? Are there other components
> of a run which will execute in parallel threads? What features of the code
> can be executed in different threads and so improve speed of execution if
> there are enough cores?
>
> I don't know how to change the default settings with wsl2, and it appears
> to be better to use Hyper_V. There is some discussion about setting global
> defaults in a wslconfig file, but the format for its content is unclear.
>
> Kind regards
> Ian
>
>
>
> On Sat, 9 Nov 2024 at 07:44, Evan Bauer <evan.bauer.astro at gmail.com>
> wrote:
>
>> Hi Ian,
>>
>> Thanks for running these tests! I don't currently have a windows 11
>> machine to test all this on, so I probably don't have more concrete
>> guidance to offer on the optimal configuration.
>>
>> My intuition (similar to yours) might have been that you would want to
>> configure MESA to run on the same number of threads as you have performance
>> cores, but it sounds like it isn't quite that simple. It may be the case
>> that the OMP thread scheduling for MESA parallelization is smart enough to
>> make use of the efficient cores without starving the more powerful cores of
>> useful work to do. So perhaps the optimal number of threads for your setup
>> is 14 or 16? (I don't think it would be 22 because hyperthreading shouldn't
>> gain you much for MESA runs.)
>>
>> Do you know how many total cores you are allocating to docker containers?
>> Sometimes that defaults to a lower number than the actual hardware cores
>> that your system has.
>>
>> Cheers,
>> Evan
>>
>>
>> On Nov 6, 2024, at 3:48 PM, Ian Foley <ifoley2008 at gmail.com> wrote:
>>
>> Hi Evan,
>>
>> Main question. What is the resource configuration in a Windows 11 pro
>> container that will give the best performance when running MESA? I think
>> the answer will depend on how the MESA software has been written to take
>> advantage of multi-core processors.
>>
>>
>> My experience, reflected by the tests below, shows that the resource
>> configuration can have a big impact on performance.
>>
>>
>> My configuration is a laptop running MESA in a container set up by Evan
>> Bauer on Windows 11 Pro
>>
>> The 5 tests below raise questions about the best configuration
>>
>>
>> Run 1 – Laptop was using an i9 intel processor with 6 cores and 12
>> logical processors and 16 GB RAM. Used Mesa version 21.12.1 with
>> OMP_NUM_THREADS=6
>>
>>
>> Run 2-5 on a laptop using the intel ultra 9 185H processor with 32 GB RAM
>> Processor Specifications:
>> Total Cores 16
>> # of Performance-cores 6
>> # of Efficient-cores 8
>> # of Low Power Efficient-cores 2
>> Total Threads 22
>> Max Turbo Frequency 5.1 GHz
>> Intel® Turbo Boost Max Technology 3.0 Frequency 5.1 GHz
>> Performance-core Max Turbo Frequency 5.1 GHz
>> Efficient-core Max Turbo Frequency 3.8 GHz
>> Low Power Efficient-core Max Turbo Frequency 2.5 GHz
>>
>>
>> Performance tests were made running test suite 1M_pre_ms_to_wd.
>> I computed the times to run the 6 inlist’s in the test suite
>>
>>
>> Run 2. Set up container to use WSL2 as this was recommended by the
>> Docker Engine. I found it was quite difficult to configure the resources.
>> Roughly, the performance was twice as slow as that in Run 1 with the old
>> laptop. Really surprised as I expected a significant improvement with the
>> more powerful new laptop.
>>
>>
>> Run 3. Thought to setup container with Hyper-V. Found that it was easy to
>> configure the resoueces. Set it up with 22 threads, 15.7 GB RAM and 3GB of
>> swap space. Only did a partial run but found that the performance was about
>> the same as the old laptop. Again not the improvement I expected. I
>> wondered whether if I reduced the max number of threads it would be faster.
>>
>>
>> Run 4. Complete run with max of 12 threads. It ran twice as fast! Since
>> my new laptop has a processor with 6 performance cores, I wondered if
>> setting OMP_NUM_THREADS=6 will perform even better.
>>
>>
>> Run 5. Max of 6 threads.
>>
>>
>> inlists
>> Run 1
>> Run 2
>> Run 3
>> Run 4
>> Run 5
>> Mesa Version
>> 21.12.1
>> 24.3.1
>> 24.3.1
>> 24.3.1
>> 24.3.1
>> Configuration
>> Hyper_V
>> Wsl2
>> Hyper_V
>> Hyper_V
>> Hyper_V
>> No of threads
>> 6
>> 22
>> 22
>> 12
>> 6
>> Time unit
>> mins
>> mins
>> mins
>> mins
>> mins
>> Start
>> 0.02
>> 0.04
>> 0.02
>> 0.02
>> 0.02
>> End h burn
>> 5.67
>> 14.48
>> About 5
>> 3.92
>> 6.19
>> End he burn
>> 446.14
>> 525.24
>>
>>
>> 213.67
>> 317.75
>> He core flash
>> 117.33
>> 70.09
>>
>>
>> 34.93
>> 47.47
>> End agb
>> 29.36
>> 19.35
>>
>>
>> 10.72
>> 14.52
>> To wd
>> 11.34
>> 13.24
>>
>>
>> 4.77
>> 6.36
>> Total time
>> 609.86
>> 642.44
>> ?
>> 268.03
>> 392.31
>>
>>
>>
>>
>> Overall then using Hyper_V Manager seems to be 2 to 3 times faster than
>> wsl2.
>>
>>
>> Also, with the processor I have, around 12 threads was better than 22 or
>> 6. The reason for this is unclear and advice would be useful.
>>
>> btw, I don't think the latest release has yet been added to mesa-docker.
>>
>> Kind regards
>> Ian
>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20241112/cbd9e646/attachment.htm>


More information about the Mesa-users mailing list