mesa-users] Inquiry about the mesa code

Bill Paxton paxton at
Wed Apr 15 12:49:08 EDT 2009

Hi Takuma,

On Apr 15, 2009, at 8:47 AM, Takuma Suda wrote:

> Dear Prof. Paxton,

Actually, just plain "Bill" will be fine in the future.  ; - )

> My name is Takuma Suda at Keele University working on
> stellar evolution.
> I started using the mesa code recently. It is a great work
> and interesting to look into the details of the program!
> I am very interested in using and customizing the mesa code,
> but it is still hard to understand the structure of the program.

And the lack of documentation makes things difficult, I know.
Please don't hesitate to email questions, and I'll try to help.

> So far, I was successful in computing the M=7 Msun and Z=0.02 model
> in the first trial. But, it doesn't work if I tried to restart
> the program today.

What did you type on the command line to restart?

> It stops with the following message.
> -------
> loading eos data
> loading kap data
> finished loading
> read restart_photo
> star_load_zams ierr        5009
> -------
> I tried to start a new model, but it still fails.
> Could you tell me how to cope with it?

Let's check to see if it can still pass the installation test.
cd to your mesa/star/test directory and enter the command line

If it passes the test, there will be no output.

To see what the test is doing, try this command


The terminal output should match the contents of the file called

Actually, the match won't be exact, digit for digit, but it should
be numerically close.  That's why we use ndiff for checking
instead of diff.

If it fails the test, then it might be best to just reinstall and  
start over.

If it passes the test, then there is perhaps a problem in the 'inlist'  
Why don't you send me a copy of that and I'll see if it works for me.

> I spent some
> time to find what's going on, but the program is
> hard for me to understand.

It's hard for me too sometimes.  ; - )

> Could you also tell me
> if you have a brief instruction of the structure
> of the program? I would be very grateful if you help
> me to understand the program.

I've recently changed the default inlist so that it includes
all of the options with brief comments along with default values.
Do you have that version?  If not, you might want to update.

In terms of understanding the implementation, you might want
to start with the files in mesa/star/public.  The 'star_def.f' file
defines the basic data structure for a star.  The file 'star_data.dek'
has the data about the model, while 'star_controls.dek' declares
the control parameters.  The default values and comments about
the controls are in 'star_defaults.dek'.  Finally, 'star_lib.f' has
the procedures that users of the modules should call.  The actual
code that does the work is called from here; sources are in

The code in mesa/star/test/src/run_star.f is another place you
might want to start looking.  It is the top-level routine that
calls functions in star_lib to drive the evolution.

Let me know how it goes.

> Thank you very much in advance for your kind assistance.
> With best regards,
> Takuma Suda

You are very welcome!


More information about the Mesa-users mailing list