Difference between revisions of "Setup Tutorial"

From Einstein Toolkit Documentation
Jump to: navigation, search
Line 116: Line 116:
 
Once all required packages have been installed, run
 
Once all required packages have been installed, run
  
     simfactory/bin/sim setup-silent yyy
+
     simfactory/bin/sim setup-silent  
 
 
where <optionlist> and <runscript> are taken from the table above.  This will create a new "machine definition" for your machine, named after your machine hostname, in simfactory/mdb/machines/<hostname>.ini, as well as write user-specific settings to simfactory/etc/defs.local.ini.
 
-->
 
 
 
If your OS is among the ones supported, you may proceed to configure Simfactory like so.
 
 
 
cd Cactus
 
 
 
# for Debian
 
./simfactory/bin/sim setup-silent --optionlist=debian.cfg --runscript debian.sh
 
# for Ubuntu, Mint
 
./simfactory/bin/sim setup-silent --optionlist=ubuntu.cfg --runscript debian.sh
 
# for Fedora (you may have to log out and back in if you have just intalled mpich to make the module command work)
 
module load mpi
 
./simfactory/bin/sim setup-silent --optionlist=fedora.cfg --runscript debian.sh
 
 
 
# MacOS+MacPorts
 
./simfactory/bin/sim setup-silent --optionlist=osx-macports.cfg --runscript osx-macports.run
 
# MacOS+Homebrew
 
export CPATH=/usr/local/include LIBRARY_PATH=/usr/local/lib
 
./simfactory/bin/sim setup-silent --optionlist=osx-homebrew.cfg --runscript generic-mpi.run
 
 
 
# Windows10+LinuxSubsystem
 
./simfactory/bin/sim setup-silent --optionlist=ubuntu.cfg --runscript debian.sh
 
  
 
After this step is complete you will find your machine's default setup under
 
After this step is complete you will find your machine's default setup under
Line 146: Line 122:
  
 
You can edit some of these settings freely, such as "description", "basedir" etc. Some entry edits could result in simulation start-up warnings and/or errors such as "ppn" (processor-per-node meaning number of cores on your machine), "num-threads" (number of threads per core) so such edits must be done with some care.
 
You can edit some of these settings freely, such as "description", "basedir" etc. Some entry edits could result in simulation start-up warnings and/or errors such as "ppn" (processor-per-node meaning number of cores on your machine), "num-threads" (number of threads per core) so such edits must be done with some care.
 
===Compute clusters===
 
 
'''TODO (RH):''' This instructs users to download on a cluster which is not the officially suggested worksload and this thus should be changed.
 
 
SimFactory comes with support for many of the large supercomputers, and the ET is tested on these at the time of each release.  To find out if the cluster you are running on is supported by SimFactory, run
 
 
  cd Cactus 
 
  simfactory/bin/sim whoami
 
 
If this returns
 
 
    Current machine: None
 
 
then unfortunately SimFactory does not support your cluster, and you will need to configure it manually (see [[Configuring a new machine]]).
 
 
If you see
 
 
    Current machine: <name of your cluster>
 
 
then SimFactory supports your cluster.  Run
 
 
    simfactory/bin/sim setup
 
 
and answer the questions, and SimFactory will automatically detect the correct option list, submit script and run script.
 
 
<!--
 
===Unsupported clusters===
 
 
If there is no existing optionlist or runscript (for a cluster, also a submit script) for your machine, you will need to write them yourself.  It is recommended to start from one of the already-written files for another machine which is as close as possible to the machine you are trying to use.  See [[Configuring a new machine]] for help with this. First, write the option list and run script, and run
 
 
    simfactory/bin/sim setup --optionlist=<optionlist> --runscript <runscript>
 
 
with the new configuration files.  This will create a basic machine definition file in simfactory/mdb/machines named after your hostname.  For a cluster, it is unlikely that this basic file will be enough, as SimFactory needs a lot of information about the details of the cluster.
 
-->
 
  
 
==Building the Einstein Toolkit==
 
==Building the Einstein Toolkit==
Line 186: Line 127:
 
Assuming that SimFactory has been successfully set up on your machine, you should be able to build the Einstein Toolkit with
 
Assuming that SimFactory has been successfully set up on your machine, you should be able to build the Einstein Toolkit with
  
     simfactory/bin/sim build --mdbkey make 'make -j2' --thornlist manifest/einsteintoolkit.th
+
     simfactory/bin/sim build -j2 --thornlist manifest/einsteintoolkit.th
  
 
Adjust -j2 to match the number of cores your machine possesses if you want to use more or less than 2 parallel build processes. This may take a while, as it compiles all the thorns specified in manifest/einsteintoolkit.th.
 
Adjust -j2 to match the number of cores your machine possesses if you want to use more or less than 2 parallel build processes. This may take a while, as it compiles all the thorns specified in manifest/einsteintoolkit.th.
Line 195: Line 136:
 
You can now run the Einstein Toolkit with a simple test parameter file.
 
You can now run the Einstein Toolkit with a simple test parameter file.
  
     simfactory/bin/sim submit helloworld --parfile arrangements/CactusExamples/HelloWorld/par/HelloWorld.par --walltime 0:5:0
+
     simfactory/bin/sim create-submit helloworld --parfile arrangements/CactusExamples/HelloWorld/par/HelloWorld.par --walltime 0:5:0
  
 
This will submit the simulation to the queue naming it "helloworld" and ask for a 5 minutes long job time, if you are running on a cluster, or run it immediately in the background if you are on a personal laptop or workstation.  You can check the status of the simulation with
 
This will submit the simulation to the queue naming it "helloworld" and ask for a 5 minutes long job time, if you are running on a cluster, or run it immediately in the background if you are on a personal laptop or workstation.  You can check the status of the simulation with

Revision as of 12:17, 13 October 2017

Introduction

Here you will find a step by step guide to downloading, configuring, and running the Einstein Toolkit. You may use this tutorial on a workstation or laptop, or on a supported cluster. Configuring the Einstein Toolkit on an unsupported cluster is beyond the scope of this tutorial. If you find something that does not work, please feel free to edit the wiki or mail users@einsteintoolkit.org.


Prerequisites

When using the Einstein Toolkit on a laptop or workstation you will need a number of packages installed in order to download, compile and use the Einstein Toolkit components. On a Debian, Ubuntu, Linux-Mint, Fedora, Mac OS, Windows 10 based system, install them as follows:

# Debian (stretch, buster)
su -c 'apt-get install build-essential libopenmpi-dev openmpi-bin gfortran git subversion curl gnuplot gnuplot-x11'
# Ubuntu (16.04.2, 17.04)
sudo apt-get install build-essential mpich2? python libmpich2?-dev gfortran git subversion curl gnuplot gnuplot-x11
# Fedora (FC 25, 26)
sudo yum -y install mpich2 python mpich2-devel gsl gsl-devel libjpeg-devel hdf5 hdf5-mpich-devel gcc gcc-c++ gcc-gfortran patch numactl-devel numactl hwloc subversion git openssl-devel lapack-static

# MacOS+MacPorts (Yosemite)
# Install MacPorts first, then do
sudo port install subversion git gnuplot szip jpeg gcc46 fftw fftw-3 gsl openssl hdf5 +fortran +gcc46 -universal zlib openmpi +gcc46
# MacOS+Homebrew (Sierra) 
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew tap homebrew/science
brew install subversion gnuplot subversion gcc fftw gsl hdf5 --with-fortran hwloc jpeg openssl pkg-config szip open-mpi

# Windows10+LinuxSubsystem (Anniversary Update)
# Make sure to install the Linux Subsystem and you are effectively
# running a Ubuntu Linux systems but have to install a separate X11 server as 
# well as making sure that the system can resolve its own hostname
# (last tested with Windows 10 Anniversary Update)
sudo apt-get install build-essential mpich2? python libmpich2?-dev gfortran git subversion curl gnuplot gnuplot-x11
echo "127.0.0.1 $(hostname)" | sudo tee --append /etc/hosts
echo "export DISPLAY=:0.0" >>$HOME/.bashrc
export DISPLAY=:0.0
curl -o /mnt/c/Users/$USER/Downloads/vcxsrv-64.1.19.2.0.installer.exe -L https://downloads.sourceforge.net/project/vcxsrv/vcxsrv/1.19.2.0/vcxsrv-64.1.19.2.0.installer.exe
chmod a+x /mnt/c/Users/$USER/Downloads/vcxsrv-64.1.19.2.0.installer.exe
# the next two lines work in Windows Creators Update (version 1703), on older
# versions you will have to install manually using the file in your
# "Downloads" folder then start VcXsrv from the start menu
/mnt/c/Users/$USER/Downloads/vcxsrv-64.1.19.2.0.installer.exe
/mnt/c/Program\ Files/VcXsrv/vcxsrv.exe &

Installing in addition packages for (Debian package names so your mileage may vary)

pkg-config 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. Once you have downloaded the Einstein Toolkit, you can inspect the option list files in simfactory/mdb/optionlists/ which often contain a list of recommended packages at the top of the files.

Please make sure all required packages are correctly installed before proceeding with the next step.

Download

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 as follows:

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

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

./GetComponents --parallel https://bitbucket.org/einsteintoolkit/manifest/raw/ET_2017_06/einsteintoolkit.th

This thornlist checks out the entire Einstein Toolkit, including Cactus, the Simulation Factory, the Einstein Toolkit thorns, and Kranc.

Configure and build

The recommended way to compile the Einstein Toolkit is to use the Simulation Factory ("SimFactory").

Configuring SimFactory for your machine

The ET depends on various libraries, and needs to interact with machine-specific queueing systems and MPI implementations. As such, it needs to be configured for a given machine. For this, it uses SimFactory. Generally, configuring SimFactory means providing an optionlist, for specifying library locations and build options, a submit script for using the batch queueing system, and a runscript, for specifying how Cactus should be run, e.g. which mpirun command to use.

Laptop/workstation operating systems

SimFactory contains general support for specific operating systems commonly used on workstations or laptops. Currently this list includes Linux/Ubuntu, Linux/Debian, Linux/Fedora, MacOS/Homebrew, MacOS/MacPorts, Windows10/BashTerminal.