[Mesa-users] Giving MESA parameters from the command line
Jeremy Sakstein
sakstein at hawaii.edu
Tue Jan 28 14:59:10 EST 2020
Thanks Rob,
Is there anyway of removing the rest of the terminal output?
On Tue, Jan 28, 2020 at 9:58 AM Rob Farmer <r.j.farmer at uva.nl> wrote:
> I would suggest though it's easier to write the output to you own file.
> That way you don't get all of mesa other terminal output mixed in. That
> will then make post processing alot easier.
>
> Rob
>
>
> On Tue, 28 Jan 2020, 20:27 Adam Jermyn via Mesa-users, <
> mesa-users at lists.mesastar.org> wrote:
>
>> Yep! If you run MESA using python’s subprocess module you can have the
>> terminal output returned as a string. Then you can parse that string to
>> pick out the values you want.
>>
>> -Adam
>> On Jan 28, 2020, 2:25 PM -0500, Jeremy Sakstein <sakstein at hawaii.edu>,
>> wrote:
>>
>> Thanks everyone.
>>
>> If I do go the run_star_extras route and print the values to the screen.
>> Is it possible for python to pick these directly out as returned values for
>> further processing?
>>
>> Cheers,
>>
>> Jeremy
>>
>> On Tue, Jan 28, 2020 at 8:56 AM Francis Timmes <fxt44 at mac.com> wrote:
>>
>>> also maybe checkout the collected guidance on running many mesa models
>>> on a cluster at
>>>
>>> http://cococubed.asu.edu/mesa_market/guides.html
>>>
>>>
>>> fxt
>>>
>>>
>>>
>>>
>>>
>>> > On Jan 28, 2020, at 11:51 AM, Adam Jermyn via Mesa-users <
>>> mesa-users at lists.mesastar.org> wrote:
>>> >
>>> > Hi Jeremy,
>>> >
>>> > You can write a wrapper script to start up MESA runs with specific
>>> parameters. I usually make a ‘prototype’ MESA directory with inlists
>>> containing the parameters I’ll be changing. In the prototype directory I
>>> set those to some placeholder like <<MASS>>. At runtime I copy the
>>> prototype directory and then use sed to replace each placeholder with the
>>> value I want.
>>> >
>>> > If you want to get output directly from MESA without going through the
>>> history/profile files you can always add write statements to your
>>> run_star_extras.f. When I do this I usually add an identifiable string
>>> before the output so that I can easily search for the lines I need.
>>> >
>>> > Hope this helps,
>>> >
>>> > -Adam
>>> > On Jan 28, 2020, 1:45 PM -0500, Jeremy Sakstein <sakstein at hawaii.edu>,
>>> wrote:
>>> >> Hi Everyone,
>>> >>
>>> >> I am planning on using MESA as part of an MCMC chain and will likely
>>> have 100+ instances running in parallel.
>>> >>
>>> >> It would be a great help if it were possible to
>>> >>
>>> >> 1) Give MESA parameters form the command line rather than altering an
>>> inlist and
>>> >> 2) Having MESA spit out one or two outputs that I need (I only need
>>> three or four quantities from the first time step)
>>> >>
>>> >> Has anyone had any experience with this before? Is this possible or
>>> do I need to generate a bunch of inlists?
>>> >>
>>> >> Cheers,
>>> >>
>>> >> Jeremy
>>> >> _______________________________________________
>>> >> mesa-users at lists.mesastar.org
>>> >> https://lists.mesastar.org/mailman/listinfo/mesa-users
>>> >>
>>> > _______________________________________________
>>> > mesa-users at lists.mesastar.org
>>> > https://lists.mesastar.org/mailman/listinfo/mesa-users
>>> >
>>>
>>> _______________________________________________
>> 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/20200128/13abbc88/attachment.htm>
More information about the Mesa-users
mailing list