From dc208ade1a6bdda59c895862f70990ccca1d9f81 Mon Sep 17 00:00:00 2001
From: Pedro Gonnet <gonnet@google.com>
Date: Fri, 27 Mar 2015 20:31:55 +0000
Subject: [PATCH] runs.sh now also generates the input files if they are not
 present.

Former-commit-id: f70103fbcb4a34cbb07fa69a448cc7046d9c0ea4
---
 examples/CosmoVolume/getIC.sh |  0
 examples/runs.sh              | 24 ++++++++++++++++++++++++
 2 files changed, 24 insertions(+)
 mode change 100644 => 100755 examples/CosmoVolume/getIC.sh
 mode change 100644 => 100755 examples/runs.sh

diff --git a/examples/CosmoVolume/getIC.sh b/examples/CosmoVolume/getIC.sh
old mode 100644
new mode 100755
diff --git a/examples/runs.sh b/examples/runs.sh
old mode 100644
new mode 100755
index 48234cd8a4..04adb84311
--- a/examples/runs.sh
+++ b/examples/runs.sh
@@ -3,6 +3,30 @@
 # Set some global stuff
 export OMP_WAIT_POLICY=PASSIVE
 
+# Generate the initial conditions if they are not present.
+if [ ! -e SodShock/sodShock.hdf5 ]
+then
+    echo "Generating initial conditions for the SodShock example..."
+    cd SodShock
+    python makeIC.py
+    cd ..
+fi
+if [ ! -e SedovBlast/sedov.hdf5 ]
+then
+    echo "Generating initial conditions for the SedovBlast example..."
+    cd SedovBlast/
+    python makeIC_fcc.py
+    cd ..
+fi
+if [ ! -e CosmoVolume/cosmoVolume.hdf5 ]
+then
+    echo "Downloading initial conditions for the CosmoVolume example..."
+    cd CosmoVolume
+    ./getIC.sh
+    cd ..
+fi
+
+
 # Loop over number of cores
 for cpu in {1..32}
 do
-- 
GitLab