Difference between revisions of "Simplified Tutorial for New Users"

From Einstein Toolkit Documentation
Jump to: navigation, search
(add Ubuntu 14.04)
(merge FC 19 and FC 20)
Line 44: Line 44:
 
  # for Ubuntu, Mint
 
  # for Ubuntu, Mint
 
  ./simfactory/bin/sim setup --optionlist=ubuntu.cfg --runscript debian.sh
 
  ./simfactory/bin/sim setup --optionlist=ubuntu.cfg --runscript debian.sh
  # for Fedora 19
+
  # for Fedora 19, 20
 
  ./simfactory/bin/sim setup --optionlist=fedora.cfg --runscript debian.sh
 
  ./simfactory/bin/sim setup --optionlist=fedora.cfg --runscript debian.sh
# for Fedora 20
 
# change MPI paths in simfactory/mdb/optionlists/fedora.cfg from mpich2 to mpich since Fedora moved them
 
sed -e 's/mpich2/mpich/g' simfactory/mdb/optionlists/fedora.cfg >simfactory/mdb/optionlists/fedora20.cfg
 
./simfactory/bin/sim setup --optionlist=fedora20.cfg --runscript debian.sh
 
  
 
  # OSX+MacPorts (Mountain Lion)
 
  # OSX+MacPorts (Mountain Lion)

Revision as of 10:09, 29 April 2014

Here you will find a concise and straightforward guide to downloading, installing, and running the Einstein Toolkit. For a more detailed tutorial, view the Tutorial for New Users.

Prerequisites

You will need a number of packages installed in order to download the Einstein Toolkit components, and if you follow the instructions in this tutorial. On a Debian, Ubuntu, Linux-Mint or Fedora-based system, install them as follows:

# Debian (wheezy)
su -c 'apt-get install build-essential libopenmpi-dev openmpi-bin gfortran git subversion curl gnuplot'
# Ubuntu (12.04, 13.04, 14.04), Linux Mint 13
sudo apt-get install build-essential mpich2 gfortran git subversion curl gnuplot
# Fedora (FC 19, 20)
sudo yum install perl-Data-Dumper perl-Thread-Queue git subversion curl gnuplot gcc gcc-c++ gcc-gfortran patch mpich2-devel hdf5-devel gsl-devel libjpeg-devel openssl-devel
# OSX+MacPorts (Mountain Lion)
sudo port install szip jpeg gcc46 fftw fftw-3 gsl openssl hdf5-18 +fortran +gcc46 -universal zlib openmpi +gcc46

Installing in addition packages for

 libfftw3-dev libgsl0-dev libatlas-base-dev libjpeg-dev libssl-dev libhdf5-serial-dev libhwloc-dev hwloc-nox

can speed up the compilation, since Cactus will try and use the system provided versions rather than compile its own.

Downloading

A script called GetComponents is used to fetch the components of the Einstein Toolkit. GetComponents serves as convenient wrapper around lower level tools like git and svn to download the codes that make up the Einstein toolkit from their individual repositories. You may download and make it executable it as follows:

curl -O -L https://raw.githubusercontent.com/gridaphobe/CRL/ET_2013_11/GetComponents
chmod a+x GetComponents

GetComponents accepts a thorn list as an argument. To check out the needed components:

./GetComponents --parallel https://svn.einsteintoolkit.org/manifest/branches/ET_2013_11/einsteintoolkit.th


which downloads the master thorn list from the Einstein toolkit server and proceeds to download all thorns. This thornlist checks out Cactus, the Einstein Toolkit, and Simulation Factory.

Configuring

You may proceed to configure Simfactory which requires some changes for some OS.

# create folder where simulations are run (only required one time)
mkdir -p ~/simulations
cd Cactus
# for Debian
./simfactory/bin/sim setup --optionlist=debian.cfg --runscript debian.sh
# for Ubuntu, Mint
./simfactory/bin/sim setup --optionlist=ubuntu.cfg --runscript debian.sh
# for Fedora 19, 20
./simfactory/bin/sim setup --optionlist=fedora.cfg --runscript debian.sh
# OSX+MacPorts (Mountain Lion)
./simfactory/bin/sim setup --optionlist=osx-mountain-lion-macports-gcc.cfg --runscript osx-mountain-lion-macports.run

Accept the default values for all options.

Building

Now that you have configured Simfactory, you may build:

./simfactory/bin/sim build --thornlist=manifest/einsteintoolkit.th

This may take a while, as it compiles all the thorns specified in manifest/einsteintoolkit.th.

Running

The example files provided at for the most part too large to run on a single machine. You can try however to run the static_tov example which is smallest and requires about 1.3GB of RAM to run and will run for about 24 hours using a single core. To speed up the run, you can try and reduce the resolution by increasing the parameters "CoordBase::dx", "CoordBase::dy", and "CoordBase::dz" from 8 to 12 which will reduce runtime to roughly 5 hours and memory consumption to 800MB.

 # modify parameter file for smaller memory footprint using sed
 sed '/CoordBase::d[xyz]/s/8/12/' <par/static_tov.par >par/static_tov_small.par
 # start simulation, watch log output
 ./simfactory/bin/sim submit static_tov --parfile=par/static_tov_small.par --procs=1 --walltime=8:0:0
 ./simfactory/bin/sim show-output --follow static_tov

Look at Results

When the simulation is complete (ie. when "All done" appears in the output), stop simfactory by pressing CTRL-C and move to the output directory. The command should be:

cd ~/simulations/static_tov/output-0000/static_tov

You should see a number of files with the extenstion .asc. These are 0-D (reductions of 3-D grid functions to scalar values) and 1-D ASCII output files that can be plotted with gnuplot.

In this case it's interesting to look at the maximum of the density (in the file hydrobase::rho.maximum.asc). Start gnuplot with the command:

gnuplot

and at the gnuplot prompt type:

plot 'hydrobase::rho.maximum.asc' using 2:3 with linespoints

This plots the data in column 3 (rho) as a function of the data in column 2 (time).

rho of time.png

As can be seen from the plot, the maximum of the density oscillates with decreasing amplitude around the initial value with a small drift upwards. Even though the initial model is supposed to be in equilibrium, numerical errors means that the numerical model is not exactly in equilibrium and it starts to oscillate. The oscillation energy is slowly dissipated by shocks, decreasing the oscillation amplitude, while the star contracts in response, increasing the maximum density.

A consistent picture can be seen by plotting the minimum of the lapse:

p 'admbase::lapse.minimum.asc' u 2:3 w lp

Lapse of time.png

The quantity shows the same features as the maximum of the density, except the drift is downwards. The downwards trend stems from the contraction of the star. As the star contracts, the curvature of spacetime increases slightly. In response, the singularity avoiding lapse condition used here decreases the lapse.

As the oscillations and subsequent drift of the density and the lapse are caused by numerical error, increasing the numerical resolution will decrease these effects.

Further reading

The following resources provide more in-depth explanations of the tools and concepts used in this tutorial

  • Cactus users guide containing detailed information on a thorn structure and the support routines offered by Cactus. Also available in the 'doc' folder of your Cactus checkout in the file 'doc/UsersGuide.pdf'
  • Simfactory users guide which describes the available command for simfactory
  • visualization the visualization lecture of the new user's tutorial held at the APS meeting in Atlanta 2012
  • course page of the new user's tutorial held at the APS meeting in Atlanta 2012