Getting Started

This page has information to help you get started using MESA. It includes a sketch of the overall organization of the modules, then gives steps for downloading, installing, and using them.


MESA organization
Downloading MESA (5329 is current as of August 20, 2013)
Installing MESA
Using MESA modules in your project
Previous releases





MESA is under construction—and probably will be for the indefinite future.

Before you use MESA, you should at least skim the “instrument papers”.

MESA instrument paper 1
MESA instrument paper 2

The “how-to” documentation is largely embedded in the experience of the community of users. If you have requests for help, you should join the mailing list and post your questions to mesa-users. And once you begin to know how to use mesa, please help by responding to posts on the list.

You should also visit the MESA Forum at http://mesastar.org/. Registration (upper right corner) is not mandatory to view pages, but is required to post material on pages.

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.

MESA organization

When you download MESA, you’ll get a directory with lots of subdirectories. You can name the top level directory whatever you’d like and put it anyplace that’s convenient. But don’t mess with the names of the subdirectories or their contents. In the following, I’ll refer to this top level directory as “the MESA directory”.

Each MESA module has its own directory with a standard set of subdirectories and scripts. The standard subdirectories for each module are “make”, “private”, “public”, and “test”. The test directory has “make” and “src” directories for the program that tests the module when it is created. The make directory has the makefile for the library and will hold the object files and “mod” files that are created by the compiler. The public directory has the sources for the interface to the library, while the private directory has sources for the parts of the implementation that are meant for internal use only. For example, if you want to see what’s available in the eos module, look in eos/public/eos_lib.f for the routines and eos/public/eos_def.f for the data.

In addition to the directories for the various modules, the MESA directory also has several directories that hold shared information. The “data” directory holds tables for eos and opacities in both text and cached binary formats. The “include” directory holds interface information needed by the compiler, and the “lib” directory holds the library files for the modules.

Finally, the MESA directory contains several useful scripts that will be discussed below.

Downloading MESA

Before you download MESA, please join the MESA-users mailing list.

After you have joined mesa-users, the next step is to “checkout” the MESA project using the svn version control system. (Binaries for svn are available from the downloads page of the subversion website. The first two chapters of the on-line Subversion Book will tell you all you need to know to use svn for MESA.)

The following command line will install the most recent officially released version. Note that there might be newer versions out there in the svn repository, but they are probably untested, unstable, and generally not at all what you want, so please stick to the officially released ones.

svn co -r 5329 svn://svn.code.sf.net/p/mesa/code/trunk mesa

To repeat: always use “-r”, and to make sure that you get an officially released version, always use it with a version number from this page.

NOTE: beware of incomplete svn operations! You might find the transfer has been terminated with a message like the following:

svn: GET of ’/svnroot/mesa/!svn/bc/2021/trunk/star/test/data/neutrino-data’: Could not read response body: Connection reset by peer (http://mesa.svn.sourceforge.net)

That means you’ve been cut off and must restart svn to complete the transfer. On particularly bad days, I’ve had to do several restarts of the svn transfer in order to get a complete version transferred. Luckily, it seems to be okay to do updates—i.e., you don’t need to start over with a complete checkout (thank goodness!). Instead you can do repeated updates as follows:

cd mesa; svn up -r 5329

Installing MESA

Before you can do an install for mesa, you need to get the prerequisites. Unless you are a masochist, you’ll probably want to use the mesasdk provided by Rich Townsend. It provides a prebuilt set of compilers and run-time libraries that should make your MESA install go smoothly. You can find a tar.gz of the mesasdk in the mesa/utils directory. You should visit the mesasdk website for details of setting it up.

NOTE: 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-really want to use an antique 32-bit system for mesa, you’ll have to try to make it work yourself. But I think you’d be better off switching to a 64-bit machine.

If you are using the mesasdk, then you can use the standard utils/makefile_header. If for some reason you don’t want to use the mesasdk, then edit your utils/makefile_header to give the relevant information about your system. You’ll need to have an up-to-date version of gfortran or ifort (recent versions of mesa have required reduced optimization in order to work with ifort; we suggest using gfortran instead of ifort if possible).

Once you have finished with your makefile_header, start the installation of the mesa code. In the top-level mesa directory, do to following:

./clean ; ./install

Using MESA modules in your project

The use of the stellar evolution package is covered in How to use MESA star. Here, we consider the case in which you want to use a module such as MESA eos in your project. 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.

Hopefully this little example will be enough to show you how to modify your own project makefile in order to use MESA. If not, consult the MESA-users mailing list for help. Please sign up before sending mail!

MESA-users—questions, comments, and discussion

Previous releases

5271 (July 29, 2013)
5232 (July 18, 2013)
5118 (June 17, 2013)
4942 (April 30, 2013)
4906 (April 11, 2013)
4849 (March 21, 2013)
4798 (February 7, 2013)
4740 (December 30, 2012)
4723 (December 20, 2012)
4631 (October 26, 2012)
4442 (August 30, 2012)
4411 (August 26, 2012)
4298 (August 3, 2012)
4219 (July 19, 2012)
4088 (June 8, 2012)
4028 (Apr 28, 2012)
3918 (Feb 28, 2012)
3851 (Jan 11, 2012)
3794 (Dec 14, 2011)
3723 (Nov 7, 2011)
3709 (Oct 31, 2011)
3635 (Sept 23, 2011)
3372 (June 15, 2011)
3290 (May 21, 2011)
3251 (April 30, 2011)
3107 (March 20, 2011)
3075 (March 3, 2011)
2987 (2011-02-05)
2941 (2011-01-21)
2891 (2011-01-02)
2871 (2010-12-24)
2808 (2010-11-20)
2790 (2010-11-10)
2745 (2010-10-24)
2699 (2010-10-04)
2664 (2010-09-16)
2637 (2010-08-27)
2618 (2010-08-19)
2602 (2010-08-07)
2578 (2010-07-31)
2557 (2010-07-26)
2533 (2010-07-20)
2404 (2010-06-21)
2341 (2010-05-15)
2258 (2010-04-13)
2208 (2010-03-13)
2078 (2010-01-27)
1943 (2009-11-26)
1822 (2009-10-10)
1728 (2009-09-21)
1691 (2009-09-11)
1585 (2009-08-09)
1489 (2009-07-18)
1396 (2009-06-28)
1296 (2009-06-07)
1249 (2009-05-12)
1145 (2009-03-16)
1118 (2009-02-27)
0971 (2009-01-25)
0776 (2008-11-11)
0001 (2007-01-23)



web traffic stats SourceForge.net Logo Generated by webgen website design by
Andreas Viklund