General Questions

How do you say MESA?

Say “MAY-sa”.

Can I use the MESA logo in a talk or presentation?

Yes. It is available in a variety of sizes for your convenience.

What happens when an instrument paper is being written?

The picture shows the intense authors hard at work making final edits.

Writing the mesa paper

A late night session working on MESA I around Bill’s dining room table with a projector, a makeshift screen, and ample red wine (left to right, Frank Timmes, Aaron Dotter, Falk Herwig, Lars Bildsten, and Bill Paxton). Photo taken by Bill’s patient wife, Kathlyn, who deserves a great deal of credit for the existence of MESA.

By MESA V, there’s a bigger room and a better screen. Left-to-right: Aaron Dotter, Jared Goldberg, Lars Bildsten, Radek Smolec, Anne Thoul, Bill Paxton, Adam Jermyn, Josiah Schwab, Frank Timmes, Croissants, Rich Townsend, Coffee, and Pablo Marchant. Photo taken by Matteo Cantiello.


Why did my inlists and/or run_star_extras stop working?

As MESA evolves, inlist options, variable names, and other aspects of the code change in ways that are not backward-compatible. Here is a list of some of the major renaming events; it is by no means exhaustive. Consult the release notes for these versions for more information.

  • r4411: major renaming and reorganization of the code
  • r8118: renaming and restructuring of controls related to winds. run_star_extras routines changed to hooks.
  • r8845: most names using “cnt” were changed to use “interval” (e.g., terminal_cnt was renamed to terminal_interval). the option photostep was renamed to photo_interval. One exception is Abundance_legend_max_cnt which remained unchanged since it is not an interval between events.

Prereqs & Installation

Why does MESA fail to build when testing the EOS module?

Errors like:

../utils/build_and_test_parallel: line 56: 151170 Killed                  ./test_quietly &> test_quietly.txt

typically arise because the build environment doesn’t have enough RAM. We’ve found that this usually happens because you’re building MESA on a virtual machine (VM) that hasn’t been allocated enough virtual memory, in which case the solution is to allocate more memory to the VM. If you aren’t using a VM, then MESA might somehow not be able to access the amount of RAM that it needs.

Can MESA be run on 32-bit machines?

MESA is no longer supported on 32-bit systems. This isn’t by design; we simply haven’t been able to get it to work! So if you REALLY want to use an antique 32-bit system for MESA, you’ll have to try to make it work yourself.

Which SVN revisions were MESA release versions?

Version Date Download links
15140 07 Dec 2020 Zenodo
12778 05 Mar 2020 Zenodo
12115 10 Sep 2019 Zenodo
11701 03 May 2019 Zenodo
11554 15 Mar 2019 Zenodo
11532 04 Mar 2019 Zenodo
10398 21 Mar 2018 Zenodo
10108 23 Oct 2017 Zenodo
10000 12 Sep 2017 Zenodo
9793 31 May 2017 Zenodo
9575 17 Feb 2017 Zenodo
8845 19 Jun 2016 Zenodo
8118 03 Feb 2016 Zenodo
7624 03 Jun 2015 Zenodo
7503 27 Mar 2015 Zenodo
7499 20 Mar 2015 Zenodo
7385 13 Jan 2015 Zenodo
7184 22 Oct 2014 Zenodo
6794 20 Jul 2014 Zenodo
6596 08 Jun 2014 Zenodo
6208 24 Mar 2014 Zenodo
6188 21 Mar 2014 Zenodo
6022 28 Feb 2014 Zenodo
5819 05 Jan 2014 Zenodo
5596 15 Nov 2013 Zenodo
5527 10 Oct 2013 Zenodo
5456 20 Sep 2013 Zenodo
5329 19 Aug 2013 Zenodo
5271 27 Jul 2013 Zenodo
5232 18 Jul 2013 Zenodo
5118 16 Jun 2013 Zenodo
4942 30 Apr 2013 Zenodo
4906 11 Apr 2013 Zenodo
4849 20 Mar 2013 Zenodo
4798 06 Feb 2013 Zenodo
4740 29 Dec 2012 Zenodo
4723 19 Dec 2012 Zenodo
4631 26 Oct 2012 Zenodo
4442 29 Aug 2012 Zenodo
4411 25 Aug 2012 Zenodo
4298 01 Aug 2012 Zenodo
4219 18 Jul 2012 Zenodo
4088 09 Jun 2012 Zenodo
4028 28 Apr 2012 Zenodo
3918 27 Feb 2012 Zenodo
3851 10 Jan 2012 Zenodo
3794 14 Dec 2011 Zenodo
3723 06 Nov 2011 Zenodo
3709 31 Oct 2011 Zenodo
3635 22 Sep 2011 Zenodo
3372 14 Jun 2011 Zenodo
3290 20 May 2011 Zenodo
3251 29 Apr 2011 Zenodo
3107 20 Mar 2011 Zenodo
3075 03 Mar 2011 Zenodo
2987 05 Feb 2011 Zenodo
2941 20 Jan 2011 Zenodo
2891 01 Jan 2011 Zenodo
2871 23 Dec 2010 Zenodo
2808 19 Nov 2010 Zenodo
2790 09 Nov 2010 Zenodo
2745 23 Oct 2010 Zenodo
2699 03 Oct 2010 Zenodo
2664 16 Sep 2010 Zenodo
2637 26 Aug 2010 Zenodo
2618 19 Aug 2010 Zenodo
2602 06 Aug 2010 Zenodo
2578 31 Jul 2010 Zenodo
2557 26 Jul 2010 Zenodo
2533 19 Jul 2010 Zenodo
2404 05 Jun 2010 Zenodo
2341 15 May 2010 Zenodo
2258 13 Apr 2010 Zenodo
2208 13 Mar 2010 Zenodo
2078 26 Jan 2010 Zenodo
1943 26 Nov 2009 Zenodo
1822 06 Oct 2009 Zenodo
1728 21 Sep 2009 Zenodo
1691 11 Sep 2009 Zenodo
1585 09 Aug 2009 Zenodo
1489 18 Jul 2009 Zenodo
1396 28 Jun 2009 Zenodo
1296 07 Jun 2009 Zenodo
1249 12 May 2009 Zenodo
1145 16 Mar 2009 Zenodo
1118 27 Feb 2009 Zenodo
0971 25 Jan 2009 Zenodo
0776 11 Nov 2008 Zenodo
0001 23 Jan 2007 First SVN revision

Why is my MESA zipfile download taking forever?

The MESA zipfiles are large (~1GB), so if you’re on a slow connection, there’s nothing to be done.

How do I obtain a non-release MESA version?

The root of the MESA git repository on GitHub corresponds to SVN revision r15140 (from December 2020). Subsequent non-release MESA versions are identified by their git commit id (SHA-1 hash) and can be obtained by using standard git operations after cloning the repository.

Previously (2010-2020), MESA was developed using SVN. An archival version of the MESA SVN repository containing the complete development history is available at Zenodo. Follow the instructions there and then use standard SVN operations to access any desired commit.

Why am I getting “wrong module version” errors?

Errors like:

Fatal Error: Wrong module version '7' (expected '5')

typically arise because you have changed the gfortran compiler since you last built MESA. (Sometimes a changed gfortran version is an indication that you forgot to activate the MESA SDK.) To fix, run ./clean in the MESA directory, and then try building again.

What do I need to do to run MESA on OS X?

It is necessary to take the following actions on recent versions of OS X (10.9 or later) , even if you had a working version of MESA on your previous version of OS X.

  • Install or reinstall the current version of Xquartz.

  • Install the command line tools, using the command:

    xcode-select -install
  • If you are using macOS 10.14 (Mojave), there has been a change in how the system headers are provided (see section “Command Line Tools” in the Xcode 10 release notes). As a workaround, Apple provides an extra package that will install the headers to the base system. At present, one must do this::

    open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg
  • Install the latest version of the MESA SDK appropriate for your version of OS X.

Why do I get the error “stdlib.h: No such file or directory”?

If yore using macOS 10.14 (Mojave), then this error indicates that you did not install the system headers (see previous FAQ or the SDK website).

Why do I get the error “C compiler cannot create executables”?

If you receive the error

configure: error: C compiler cannot create executables
See `config.log' for more details.

during the MESA installation of crlibm, please check that you are not using an unsupported 32-bit system. If you’re using macOS, make sure you’ve installed Xcode and the command line tools.

If you’re using Linux and you see an error message in config.log like

In file included from /opt/mesasdk/lib/gcc/x86_64-pc-linux-gnu/5.3.1/include-fixed/features.h:338:0,
                 from /usr/include/bits/libc-header-start.h:33,
                 from /usr/include/stdio.h:28,
                 from test.c:1:
/usr/include/sys/cdefs.h:481:49: error: missing binary operator before token "("
 #if __GNUC_PREREQ (4,8) || __glibc_clang_prereq (3,5)
In file included from test.c:1:0:
/usr/include/stdio.h:320:43: error: missing binary operator before token "("
 #if defined __USE_XOPEN2K8 || __GLIBC_USE (LIB_EXT2)
/usr/include/stdio.h:399:17: error: missing binary operator before token "("
/usr/include/stdio.h:657:43: error: missing binary operator before token "("
 #if defined __USE_XOPEN2K8 || __GLIBC_USE (LIB_EXT2)

you may need to tell gcc to regenerate its fixed header files.

You can do so with the commands:

GCC_VERSION=`gcc --version | grep ^gcc | sed 's/^.* //g'`
$MESASDK_ROOT/libexec/gcc/x86_64-pc-linux-gnu/$GCC_VERSION/install-tools/mkheaders $MESASDK_ROOT

If the error persists, please email mesa-users@lists.mesastar.org. Follow the instructions for posting a question to mesa-users and also attach the file $MESA_DIR/crlibm/crlibm/config.log.

Why do I get the error “Cannot utime: Function not implemented”?

This signifies that you are using WSL1 and not the newer WSL2. Please update your WSL to the newest version

Why do I get an error “0xc03a001a”?

You need to disable disk compression on the folder that stores the Linux distribution you are using with WSL2.

Using file explorer navigate to the folder C:\Users\USERNAME\AppData\Local\Packages\, where USERNAME is your windows username. If you installed Ubuntu, then you need to find the folder CanonicalGroupLimited.Ubuntu, other distributions will have different names. Once you find this folder right click on its name to open it properties, go to Advanced and unclick Compress contents to save disk space

More information can be found here

Why do I get an error “#000: H5F.c line 444 in H5Fcreate(): unable to create file”?

You need to turn off HDF5 file locking:


Why do I get an error like “is smaller than expected for a file tracked by git LFS”?

First check that you have git lfs installed and then try running:

git lfs pull

If you are checking out MESA on a network file system you may find setting a short delay during the install step to give time for the files transferred by git lfs to properly sync.


Installing Older Versions of MESA

Older versions of MESA may fail to compile with more recent versions of the MESA SDK. There are a few possible solutions:

  1. Use the contemporary version of the SDK. There is a list of old MESA SDKs that indicates which version of MESA was current when each was released.
  2. Work in a Docker container configured to set up an environment appropriate for the desired MESA version. NuGrid’s NuDocker project provides a convenient interface for MESA versions as far back as 4942.
  3. Fix the individual compilation errors (there are typically only a handful to work through). The basic workflow is
  • ./install until an error turns up,
  • cd to that module and edit and ./mk until it compiles, then
  • go back to ./install and repeat until everything works before
  • a final ./touch and ./install.

The following FAQs give examples of specific errors.

Why do I get an error like “Error: ‘time0’ may be used uninitialized in this function”?

This sort of error typically occurs when using an older MESA release with a newer SDK. These warnings (which are treated as errors) can safely be ignored. To do so, edit the file utils/makefile_header and add -Wno-uninitialized to FCbasic.

Why do I get an error like “Error: Blank required in STOP statement near (1)”?

This sort of error typically occurs when using an older MESA release with a newer SDK. To work around this, simply insert the blank space as requested. i.e. change stop'fixup' to stop 'fixup'.

Why do I get an error like “Error: Array reference at (1) out of bounds (0 < 1) in loop beginning at (2) [-Werror=do-subscript]”?

This sort of error typically occurs when using an older MESA release with a newer SDK. These warnings (which are treated as errors) can safely be ignored. To do so, edit the file utils/makefile_header and delete -Werror from FCwarn.

Why do I get an error like “Error: ‘__builtin_memset’ specified size between 9223372036854775808 and 18446744073709551615 exceeds maximum object size 9223372036854775807 [-Werror=stringop-overflow=]”?

This sort of error typically occurs when using an older MESA release with a newer SDK. These warnings (which are treated as errors) can safely be ignored. To do so, edit the file utils/makefile_header and delete -Werror from FCwarn.

Why do I get a segfault in do_history_info?

This sort of error typically occurs when using an older MESA release (r10398 or before) with a newer SDK (that includes gfortran 7.3 or later).

Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

Backtrace for this error:
#0  0x7f28c0a93a7f in ???
#1  0x54313f in do_history_info
       at ../private/history.f90:383

To work around this, edit $MESA_DIR/star/private/history.f90 and replace the line

if (open_close_log) close(io)
if (open_close_log .and. write_flag) close(io)

Note that this only applies to this specific segfault and not segfaults in general.

When I install MESA from a zipfile, why do I get svn errors?

Older versions of MESA (r6794 or earlier) assumed that they would be installed from the subversion repository. Therefore, if you install these versions from a zipfile, you will see messages like

svn: E155007: '/Users/fxt/mesa/mesa-r6794' is not a working copy

when you run MESA. These messages are safe to ignore.

PGPLOT and pgstar

Why don’t I see any PGPLOT output when I run MESA?

Make sure you have the option pgstar_flag = .TRUE. in the &star_job section of your input file. Also, if you’re not using the SDK, make sure you enabled PGPLOT in your utils/makefile_header file (when using the SDK, PGPLOT is enabled by default).

How can I make a movie from my pgstar output?

As of the 20140713 release, the MESA SDK includes the ffmpeg encoder and a simple script, images_to_movie.sh, which uses ffmpeg to create movies from PNG files produced by MESA.

To make use of this capability, consult Rich’s instructions.


What programming language is MESA written in?

Fortran. But MESA is written using advanced features of modern Fortran which make it very different from Fortran 77 codes you might have previously seen (or written!). If you are not already familiar with the new and wonderful things that have been added, there are good resources available on the web - here’s one: Fortran 95 language features.

What does “thread-safe” mean?

“Thread-safe” simply means that users can take advantage of multicore processors.

For example, during stellar evolution, you need to evaluate the eos at lots of points:

do k = 1, num_zones
  call eos(T(k), rho(k), ...)
end do

Most fortran compilers (ifort and gfortran and others) support OpenMP, so the loop can be made to run in parallel by adding 2 lines of magic:

do k = 1, num_zones
  call eos(T(k), rho(k), ...)
end do

Now, if I have 4 cores, I’ll have 4 threads of execution evaluating the eos.

However, for it to work, the implementation needs to be thread-safe. In practice this means, making shared data read-only after initialization. Working memory must be allocated from the stack (as local variables of routines) or allocated dynamically (using fortran95’s allocate primitive). So, basically it boils down to avoiding common blocks and save’s. It’s easy to arrange for this in new code; it can be nasty converting old code however. Stellar evolution is a good candidate for making use of many cores. Just wrapping “parallel” directives around some loops does it if the system is designed with that in mind - and MESA is. But there is still much to be done to make good use of more than 3 or 4 cores in MESA/star. It will be an ongoing effort to improve the design of the code in that area; help with that is welcomed!

How can I use an individual MESA module?

The easiest way to get the idea is to look at a sample, and in the MESA directory you will find a subdirectory called “sample”. Make a copy of the sample directory anywhere you’d like and give it whatever name you want. Follow the instructions in the README file to make and test the sample. You may also want to look at the following information from previous MESA summer schools:

Third-party Tools

How can I read and/or plot MESA data using language X?

Users have posted numerous useful scripts in a variety of languages on the MESA marketplace.

How can I include the effects of chemical enhancements on the opacities?

Ehsan Moravveji has developed a package available for free access on bitbucket to recompute OP opacities for any desired mixture (that MESA supports) and for any user-specified iron and nickel enhancement factors.


Why am I having difficulty receiving mesa-users messages?

If you are using an address hosted at qq.com, this domain is blocked by our mail host. Due to a deluge of spam, no mail will be accepted from or delivered to qq.com.