[Mesa-users] Question about running many similar simulations on a cluster
Rob Farmer
robert.j.farmer37 at gmail.com
Tue Oct 26 12:44:34 UTC 2021
Hi
There is also my guide here
http://cococubed.asu.edu/mesa_market/many_jobs.html on how I structure
inlists for running big grids.
>I.e. If I have access to two nodes each with 20 cores each and need to run
10 simulations, would it be faster to run 1 simulation on each node using
all 20 cores, and do that 5 times, or to run 5 simulations per node using 4
cores each and do that once?
In this case the best bet is to run 10 jobs with 2 cores each. MESA does
not scale perfectly with the number of cores (there are always things that
need to be done serially like file reading and writing, memory allocations
etc) so by running as many jobs as possible at once you'll get better
overall performance (even if each job individually takes longer). I have in
the past ran ~1000 jobs just giving each model 1 core only to maximise this.
Rob
On Mon, 25 Oct 2021 at 02:12, Jeremy Sakstein <sakstein at hawaii.edu> wrote:
> Hi Connor,
>
> If you really don't want multiple directories you can update
> run_star_extras.f to take controls directly from the terminal. This means
> you can submit multiple jobs by e.g. running a bash script that loops over
> a command such as
>
> ./star your_base_inlist your_parameter_1 your_parameter_2 ....
>
> where your_base_interest is the inlist with controls you don't want to
> vary and your_parameter_i are parameters that you do want to vary. This
> means your bash script would loop over every independent your_parameter_i.
> If you do go down this route you need to make sure that the bash script
> also places the temporary cache files in separate directories that are
> deleted at the end.
>
> An example of how to get MESA to take commands from the terminal can be
> found in e.g.
>
> https://zenodo.org/record/4037390#.YXXzodnMIdU
>
> Have a look at the extras_controls in run_star_extras.f.
>
> Cheers,
>
> Jeremy
>
> On Sun, Oct 24, 2021 at 1:43 PM Mitchell Dennis <mtde226 at hawaii.edu>
> wrote:
>
>> Hello Connor,
>>
>>
>>
>> I second Aaron Dotter’s suggestion about number cores.
>>
>>
>>
>> As to your other query, I am doing as you originally suggested, creating
>> separate log folders for each data run. This is helpful for me because the
>> data files each simulation outputs would ordinarily have the same name, and
>> I can label each output folder with the parameters values to distinguish
>> them (as opposed to having to label 2 or 3 output files with the
>> paramters). Alternatively you could either manually or via bash alter the
>> name of the output data file in the inlist. For my work, I use bash scripts
>> to submit all the jobs at once and have automated it so I never have to
>> modify the inlist file manually. The cluster I am using uses the slurm
>> management system, but I have attached my scripts to this email in case you
>> find them useful. The “runNew.slurm” runs a new instance of MESA and the
>> “runAll.slurm” file calls “runNew.slurm” across my grid space.
>>
>>
>>
>> Note: the scripts are labelled as .slurm files, but the uncommented lines
>> essentially execute as a bash script. The commented lined with a “##”
>> prefix are comments the others with a single “#” are slurm commands.
>>
>>
>>
>> If you have questions about how the scripts work or how to modify them
>> for your project, I would be more than happy to assist.
>>
>>
>>
>> Best Regards,
>>
>> Mitchell T Dennis
>>
>> Graduate Student
>>
>> University of Hawaii - Institute for Astronomy
>>
>>
>>
>> *From: *Connor Jennings <cjennings2023 at berkeley.edu>
>> *Sent: *Sunday, October 24, 2021 1:05 PM
>> *To: *mesa-users at lists.mesastar.org
>> *Subject: *[Mesa-users] Question about running many similar simulations
>> on a cluster
>>
>>
>>
>> Hello,
>>
>> My name is Connor Jennings. I'm a student at UC Berkeley using MESA in a
>> research project. I want to run a lot MESA (I'm using version r15140)
>> simulations for RR Lyrae stars on the Savio cluster (which runs on Linux)
>> here at Berkeley, and I have a few questions about the best way to do this.
>>
>> Our plan is to generate a grid of initial parameters, and then run a
>> simulation for each space on the grid so we can run each simulation in
>> parallel. My current understanding is that we would have to create a new
>> folder for each simulation, even though the only thing different in the
>> folders would be a few lines in the inlist file. Is there a more efficient
>> way to do this, or do we expect to need to create 1000 folders for 1000
>> simulations, etc. ?
>>
>> Additionally, Savio has the ability to run multiple programs on the same
>> node, so I am wondering how MESA's speed scales with its number of cores.
>> I.e. If I have access to two nodes each with 20 cores each and need to run
>> 10 simulations, would it be faster to run 1 simulation on each node using
>> all 20 cores, and do that 5 times, or to run 5 simulations per node using 4
>> cores each and do that once?
>>
>> Thank You,
>>
>> Connor Jennings
>>
>>
>> _______________________________________________
>> mesa-users at lists.mesastar.org
>> https://lists.mesastar.org/mailman/listinfo/mesa-users
>>
>>
>
> --
> Jeremy Sakstein (He/Him/His)
> Assistant Professor of Theoretical Physics
> Department of Physics & Astronomy
> University of Hawaiʻi at Mānoa
> Watanabe Hall
> 2505 Correa Road
> Honolulu, HI, 96822, USA
> http://www.jeremysakstein.com
> _______________________________________________
> mesa-users at lists.mesastar.org
> https://lists.mesastar.org/mailman/listinfo/mesa-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20211026/da3c1f71/attachment.htm>
More information about the Mesa-users
mailing list