Starlab simulations with `sltoos`

You can download sltools from here.
Then create one or more simulation configuration(s), for example

	"Runs": 50,
	"Comb": 86, 
	"Ncm" : 10000,
	"Fpb" : 0.05,
	"W"   : 3,
	"Z"   : 0.10,
	"Rv": 5, 
	"EndTime" : 500,
	"Machine" : "yourCluster",
	"UserName" : "yourUserName",
	"PName": "project",  
	"BinFolder": "/home/yourUserName/bin/"


  • Runs is the number of random realizations you want to simulate
  • Comb is the number that identify of this particoular parameter set
  • Ncm is the number of center of masses
  • Fpb is the primordial binary fraction (how many stars are binaries at the beginning of the simulation
  • W is the central adimensional potential
  • Z is the metallicity in terms of the solar metallicity (only available in the Mapelli+2013 Starlab version)
  • Rv is the initial virial radius of the cluster
  • EndTime preliminary timestep when to stop the simulation, you can resume it later
  • Machine name of the machine you are running on
  • UserName is your username on that machine
  • PName is the project your hours are accounted on
  • BinFolder is the path where to find the binaries

The run

sltools createICs -v -A

Now sltools will create a folder for each parameter combination, copy the configuration file inside and create as much script files as you need to create the iitial conditions.

Each file would resemble something like:

set -xeu
makeking -n 10000 -w 5 -i -u \
| makemass -f 8  -l 0.1 -u 150 \
| makesecondary -f 0.1 -q -l 0.1 \
| add_star -R 1 -Z 0.10 \
| scale -R 3 -M 1\
| makebinary -f 2 -o 1 -l 1 -u 107836.09 \
> ics-comb87-TFno-Rv3-NCM10000-fPB01-W5-Z010-run01-rnd00.txt

Now you can run the generated script with

for RUN in $(ls create_*.sh); do bash $RUN; done


you can run them using the docker container you can build starting from this image or from this Dockerfile or following these instructions. If you plan to use the GPUs the second method is recommendend since a GPU enable docker image is system-dependent (thank you nVidia…).

Now you can upload your fresh ICs to the cluster of your choice.

Once everything is in its place, connect to the cluster and run

sltools css -A -m <machine>

to create the files needed to submit the jobs to the batch system. machine is the name of the cluster. Until now only few clusters are recognized, because I need to set few parameters to match the system configuration. I’ll be glad to add your own machine, or maybe I’ll create a template system able to read from a configuration file.

Once the batch manager scripts are created, just run everything with

sltools pbsLaunch

and wait for the jobs to complete. When they finish, you can restart the simulations to make them run untile 100 Myr is reached. To do this, simply run

sltools relaunch


sltools relaunch -e <end-time>

to specify when the simulation should end.

More Reading
comments powered by Disqus