{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "
%%bash are executed in a bash shell. If you wish to run these commands outside the notebook and in a bash shell, cut and paste only the part after the initial %%bash. "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Optimized Download/Build Experience\n",
"Downloading the source code from github in a classroom setting, where lots of users are doing the same thing at the same time, can create network problems, and compiling the complete ET from scratch can take up to half an hour.\n",
"\n",
"The next cell will create a complete pre-built ET checkout in your home directory, speeding up subsequent cells. This step is optional, but should allow you to execute the notebook in less time.\n",
"\n",
"**Note:** This will only work in the docker image or on the tutorial server."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"%%bash\n",
"[ -r ~etuser/Cactus.tar.gz ] && ! [ -d ~/Cactus ] && tar -xzf ~etuser/Cactus.tar.gz -C ~/"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"INFO (HelloWorld): Hello World!anywhere in the above output, then congratulations, you have successfully downloaded, compiled and run the Einstein Toolkit! You may now want to try some of the other tutorials to explore some interesting physics examples." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "
[ACTIVE (FINISHED)...as its state. Prior to that, it may show up as QUEUED or RUNNING." ] }, { "cell_type": "code", "execution_count": null, "metadata": { "scrolled": true }, "outputs": [], "source": [ "%%bash\n", "./simfactory/bin/sim list-simulations tov_ET" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ " To watch a simulation's log output use the `show-output` command of simfactory. **Interrupt the kernel** (or press `CTRL-C` if copying & pasting these commands to a terminal) if you wish to stop watching." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "%%bash\n", "# watch log output, following along as new output is produced\n", "./simfactory/bin/sim show-output --follow tov_ET" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "You can leave out the `--follow` option if you would like to see all output up to this point." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Managing submitted simulations\n", "\n", "Since the `submit` command was used to start the simulation, it is running in the background and you have to use simfactory commands to interact with it. The next cell shows how to list simulations." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "**Remember** that you have to interrupt the kernel to stop `show-output` and be able to execute the cells below." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "%%bash\n", "./simfactory/bin/sim list-simulations" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Simfactory offers a `stop` command to abort a running simulation. The next cell has the command intentionally commented out to prevent accidental stopping of your very first simulation." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "%%bash\n", "#./simfactory/bin/sim stop tov_ET" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "after this the simulation changes to the \"FINISHED\" state indicating it is no longer running." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Simulations that are no longer needed are removed using the `purge` command. The next cell has the command intentionally commented out to prevent accidental removing of your very first simulation." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "%%bash\n", "#./simfactory/bin/sim purge tov_ET" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Simfactory creates all output for a simulation in a set of output directories, one for each restart from a checkpoint. You can find out its location using `get-output-dir`." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "%%bash\n", "./simfactory/bin/sim get-output-dir tov_ET" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "