From 9cdd920e40dc00eaa54bbece6241a83fe35985f1 Mon Sep 17 00:00:00 2001
From: Josh Borrow <joshua.borrow@durham.ac.uk>
Date: Tue, 22 Oct 2019 15:49:02 +0100
Subject: [PATCH] Minor change to EAGLE_ICs/*/run.sh

---
 examples/EAGLE_ICs/EAGLE_12/run.sh | 33 ++++++++++++++++++++++++++++--
 examples/EAGLE_ICs/EAGLE_25/run.sh | 30 ++++++++++++++++++++++++++-
 examples/EAGLE_ICs/EAGLE_50/run.sh | 30 ++++++++++++++++++++++++++-
 3 files changed, 89 insertions(+), 4 deletions(-)

diff --git a/examples/EAGLE_ICs/EAGLE_12/run.sh b/examples/EAGLE_ICs/EAGLE_12/run.sh
index 86fe2b1db0..194e82a698 100755
--- a/examples/EAGLE_ICs/EAGLE_12/run.sh
+++ b/examples/EAGLE_ICs/EAGLE_12/run.sh
@@ -1,11 +1,40 @@
 #!/bin/bash
 
- # Generate the initial conditions if they are not present.
+# Generate the initial conditions if they are not present.
 if [ ! -e EAGLE_L0012N0188_ICs.hdf5 ]
 then
     echo "Fetching initial conditions for the EAGLE 12Mpc example..."
     ./getIC.sh
 fi
 
-../../swift --cosmology --hydro --self-gravity --stars --black-holes --cooling --star-formation --feedback --fof --threads=16 eagle_12.yml 2>&1 | tee output.log
+# Grab the cooling and yield tables if they are not present.
+if [ ! -e yieldtables ]
+then
+    echo "Fetching EAGLE yield tables..."
+    ../getEagleYieldtable.sh
+fi
+
+if [ ! -e coolingtables ]
+then
+    echo "Fetching EAGLE cooling tables..."
+    ../getEagleCoolingTable.sh
+fi
+
+# The following run-time options are broken down by line as:
+# Basic run-time options
+# Create and run with stars
+# Radiative options - run with cooling and stellar feedback
+# Run with the time-step limiter required to capture feedback
+# Run with black holes - fof is needed for the seeding
+# Threading options - run with threads and pinning (latter not required but improves performance)
+# The corresponding parameter file for this run
+
+../../swift \
+    --cosmology --hydro --self-gravity \
+    --stars --star-formation \
+    --cooling --feedback \
+    --limiter \
+    --black-holes --fof \
+    --threads=16 --pin \
+    eagle_12.yml
 
diff --git a/examples/EAGLE_ICs/EAGLE_25/run.sh b/examples/EAGLE_ICs/EAGLE_25/run.sh
index 11e9397176..9c017937f3 100755
--- a/examples/EAGLE_ICs/EAGLE_25/run.sh
+++ b/examples/EAGLE_ICs/EAGLE_25/run.sh
@@ -7,5 +7,33 @@ then
     ./getIC.sh
 fi
 
-../../swift --cosmology --hydro --self-gravity --stars --black-holes --cooling --star-formation --feedback --fof --threads=16 eagle_25.yml 2>&1 | tee output.log
+# Grab the cooling and yield tables if they are not present.
+if [ ! -e yieldtables ]
+then
+    echo "Fetching EAGLE yield tables..."
+    ../getEagleYieldtable.sh
+fi
+
+if [ ! -e coolingtables ]
+then
+    echo "Fetching EAGLE cooling tables..."
+    ../getEagleCoolingTable.sh
+fi
+
+# The following run-time options are broken down by line as:
+# Basic run-time options
+# Create and run with stars
+# Radiative options - run with cooling and stellar feedback
+# Run with the time-step limiter required to capture feedback
+# Run with black holes - fof is needed for the seeding
+# Threading options - run with threads and pinning (latter not required but improves performance)
+# The corresponding parameter file for this run
 
+../../swift \
+    --cosmology --hydro --self-gravity \
+    --stars --star-formation \
+    --cooling --feedback \
+    --limiter \
+    --black-holes --fof \
+    --threads=16 --pin \
+    eagle_25.yml
\ No newline at end of file
diff --git a/examples/EAGLE_ICs/EAGLE_50/run.sh b/examples/EAGLE_ICs/EAGLE_50/run.sh
index 492ac35ebe..1e34646d9c 100755
--- a/examples/EAGLE_ICs/EAGLE_50/run.sh
+++ b/examples/EAGLE_ICs/EAGLE_50/run.sh
@@ -7,5 +7,33 @@ then
     ./getIC.sh
 fi
 
-../../swift --cosmology --hydro --self-gravity --stars --black-holes --cooling --star-formation --feedback --fof --threads=16 eagle_50.yml 2>&1 | tee output.log
+# Grab the cooling and yield tables if they are not present.
+if [ ! -e yieldtables ]
+then
+    echo "Fetching EAGLE yield tables..."
+    ../getEagleYieldtable.sh
+fi
+
+if [ ! -e coolingtables ]
+then
+    echo "Fetching EAGLE cooling tables..."
+    ../getEagleCoolingTable.sh
+fi
+
+# The following run-time options are broken down by line as:
+# Basic run-time options
+# Create and run with stars
+# Radiative options - run with cooling and stellar feedback
+# Run with the time-step limiter required to capture feedback
+# Run with black holes - fof is needed for the seeding
+# Threading options - run with threads and pinning (latter not required but improves performance)
+# The corresponding parameter file for this run
 
+../../swift \
+    --cosmology --hydro --self-gravity \
+    --stars --star-formation \
+    --cooling --feedback \
+    --limiter \
+    --black-holes --fof \
+    --threads=16 --pin \
+    eagle_50.yml
\ No newline at end of file
-- 
GitLab