[mesa-users] question

Willie Strickland cwskas at gmail.com
Wed Oct 22 12:33:48 EDT 2014


$MESA_DIR is the environment (global) variable indicating the location where you installed Mesa.  It is either set everytime you start the Terminal program (if you have put it in your .bashrc file) or you must set it manually everytime you start the Terminal program.  We do not need to modify it at any other time.  But we can use it to indicate the path to that directory instead of having to remember the path and type it each time we want to use it.

You can check the value of the variable with

	echo $MESA_DIR

On my machine I get

	% echo $MESA_DIR
	/users/willie/mesa 

That is the location of the Mesa installation.  I put my work files in a different directory and do not modify the originals.  In my case

	/users/willie/Documents/mesa

for example.


So to copy the test_suite case    1M_pre_ms_to_wd    and modify it for my own run, I do the following

	cd ~/Documents/mesa
	cp -vr $MESA_DIR/star/test_suite/1M_pre_ms_to_wd 1M_pre_ms_to_wd
	cd 1M_pre_ms_to_wd/make
	vim makefile

use vim to insert a ! before the line which says

	MESA_DIR=../../../.. 

Now the line reads

	!MESA_DIR=../../../.. 

The ! means that all which follows on that line if simply a comment and is to be ignored except by the humans reading it.  You could simply delete the line, but I prefer to keep the original lines for reference and just insert the comment character.


Save the file, then

	cd ..
	./mk
	./rn

I hope this is more clear.

Willie



On Oct 22, 2014, at 5:41 AM, sanaz <sanaz.lotfiani at gmail.com> wrote:

> Dear Willi
> 
> thank you for advising me, 
> 
> sh-3.2$ cd 1M_pre_ms_to_wd
> sh-3.2$ MESA_DIR=newdirectory/make/makefile
> sh-3.2$ cd 1M_pre_ms_to_wd/make
> sh-3.2$ vim makefile
> sh-3.2$ ls -la
> total 8
> drwxr-xr-x   3 User  staff  102 Oct 22 13:04 .
> drwxr-xr-x  22 User  staff  748 Oct 22 11:12 ..
> -rw-r--r--   1 User  staff   97 Oct 22 12:55 makefile
> sh-3.2$ vim makefile
> sh-3.2$ chmod +x makefile
> sh-3.2$ ./makefile
> ./makefile: line 2: MESA_DIR: command not found
> ./makefile: line 4: STAR: command not found
> ./makefile: line 6: MESA_DIR: command not found
> ./makefile: line 6: include: command not found
> sh-3.2$ ls -la
> drwxr-xr-x   3 User  staff  102 Oct 22 14:07 .
> drwxr-xr-x  22 User  staff  748 Oct 22 13:59 ..
> -rwxr-xr-x   1 User  staff   97 Oct 22 13:38 makefile
> but don’t it run.
>  best wishes
> Sanaz 
> 
> On Mehr 30, 1393 AP, at 11:23, Willie Strickland <cwskas at gmail.com> wrote:
> 
>> cd 1M_pre_ms_to_wd/make
>> vim makefile
>> 
>> 
>> On Oct 22, 2014, at 2:50 AM, sanaz <sanaz.lotfiani at gmail.com> wrote:
>> 
>>> Dear will
>>> 
>>> if write as follows instead  MESA_DIR=../../../.. ,  would it be correct?
>>> 
>>> cp -vr $MESA_DIR/star/test_suite/1M_pre_ms_to_wd 1M_pre_ms_to_wd
>>> cd 1M_pre_ms_to_wd
>>> vim 1M_pre_ms_to_wd
>>> vim inlist_1.0
>>> ./inlist_1.0
>>> 
>>> but these commands don’t run
>>> best regards
>>> Sanaz
>>> 
>>>> There are many test cases in $MESA_DIR/star/test_suite/
>>>> 
>>>> For example you can use 1M_pre_ms_to_wd as a starting point by doing the following.  cd to where you do your test cases, for me it is ~/Documents/mesa.
>>>> 
>>>> 	cp -vr $MESA_DIR/star/test_suite/1M_pre_ms_to_wd 1M_pre_ms_to_wd
>>>> 	cd 1M_pre_ms_to_wd
>>>> 
>>>> When using test_suite examples as a starting point, you must edit the make file to either comment out the line
>>>> 
>>>> 	MESA_DIR = ../../../..
>>>> 
>>>> or edit it to
>>>> 
>>>> 	MESA_DIR = ' '
>>>> 
>>>> I always comment the line.
>>>> 
>>>> 	! MESA_DIR = ../../../..
>>>> 
>>>> Then
>>>> 
>>>> 	./mk
>>>> 	./rn
>>>> 
>>>> and watch it go.
>>>> 
>>>> Willie
>>>> 
>>>> 
>>>> On Oct 21, 2014, at 5:30 AM, sanaz <sanaz.lotfiani at gmail.com> wrote:
>>>> 
>>>>> Dear willie
>>>>> 
>>>>> after I run pre-main-sequance,I intend to  extend the calculation as long as possible beyond Red-giant stage,
>>>>> thermal-pulse stage and final white dwarf stage, but I don’t know what do it.
>>>>> would you help me please,
>>>>> best wishes 
>>>>> sanaz
>>>>> 
>>>>>> Im glad you got it going and am looking forward to seeing your research.
>>>>>> 
>>>>>> Willie
>>>>>> 
>>>>>> 
>>>>>> On Oct 9, 2014, at 11:37 AM, sanaz <sanaz.lotfiani at gmail.com> wrote:
>>>>>> 
>>>>>>> Dear will 
>>>>>>> Thank you for guiding.
>>>>>>> finally I can run from mesa-test
>>>>>>> 
>>>>>>> 
>>>>>>> On Mehr 16, 1393 AP, at 14:25, Willie Strickland <cwskas at gmail.com> wrote:
>>>>>>> 
>>>>>>>> http://mesa.sourceforge.net/starting.html
>>>>>>> 
>>>>>> 
>>>>> 
>>>> 
>>> 
>> 
> 





More information about the Mesa-users mailing list