Tutorials - Geodels/eSCAPE GitHub Wiki

About | Input file | Dependency | Docker | Local Installation | HPC Installation | Tutorials

← Previous topic: HPC Installation


eSCAPE

To get some additional info in regards to how to use eSCAPE a series of examples and tutorials is provided in the docker container (Geodels escape-docker) and is also available for download from the eSCAPE-demo repository.

The proposed examples require to create input files and the easiest and recommended way for creating them is to use the Jupyter Notebooks available in the (Geodels escape-docker) container. 👍

Content

Examples on the Docker container

Four examples are available from the notebooks folder in the docker container. These examples illustrate how to setup input files and run the code either in serial or in parallel.

Even if you are planning to run eSCAPE on HPC you should install the container on your local machine to generate the inputs required by the code to run.

Requirements for running eSCAPE-demo

In cases where you don't want to use the provided Docker container here is a list of the dependencies that will be needed for your local installation:

basemap==1.0.7
Cartopy==0.16.0
descartes==1.1.0
GDAL==1.11.3
litho1pt0==0.4.2
matplotlib==2.2.3
netCDF4==1.4.1
obspy==1.1.0
Pillow==3.1.2
pyevtk==1.1.0
pygeotools==0.5.0
pygmsh==4.3.6
pyproj==1.9.5.1
pyshp==1.2.12
python-dateutil==2.4.2
rasterio==0.36.0
seaborn==0.9.0
Shapely==1.6.4.post2
stripy==0.5.1

Running eSCAPE

Either via jupyter notebooks or python files.

python run_eSCAPE.py -i input.yml -v

where the run_eSCAPE.py script takes one required argument the input filename and an optional verbose command (-v). To run the script in parallel simply use the mpirun command. As an example with N processors it will look like:

mpirun -np N python run_eSCAPE.py -i input.yml

run_eSCAPE.py consists of a limited number of calls to eSCAPE

import eSCAPE
model = eSCAPE.LandscapeEvolutionModel(***)
model.runProcesses()
model.destroy()

as shown below:

import argparse
import eSCAPE as sim

# Parsing command line arguments
parser = argparse.ArgumentParser(description='This is a simple entry to run eSCAPE model.',add_help=True)
parser.add_argument('-i','--input', help='Input file name (YAML file)',required=True)
parser.add_argument('-v','--verbose',help='True/false option for verbose', required=False,action="store_true",default=False)
parser.add_argument('-l','--log',help='True/false option for PETSC log', required=False,action="store_true",default=False)

args = parser.parse_args()
if args.verbose:
  print("Input file: {}".format(args.input))
  print(" Verbose is on? {}".format(args.verbose))
  print(" PETSC log is on? {}".format(args.log))

# Reading input file
model = sim.LandscapeEvolutionModel(args.input,args.verbose,args.log)

# Running model
model.runProcesses()

# Cleaning model
model.destroy()

Example running scripts used on specific HPC platforms

Here is an example of PBS job for Artemis HPC Platform (USyD):

#!/bin/bash

# Project
#PBS -P BGH

# 64 CPUs
#PBS -l select=8:ncpus=8:mpiprocs=8:mem=8GB

# Time limit
#PBS -l walltime=10:00:00
#PBS -q alloc-dm

# Set up environment
module load python/2.7.15-intel petsc-intel-mpi hdf5

cd $PBS_O_WORKDIR
cd earth

# Launching the job!
mpirun -np 64 python run_escape.py

with run_escape.py a python script calling eSCAPE function:

import eSCAPE as sim

# Reading input file
model = sim.LandscapeEvolutionModel('input_globe.yml',False,False)

# Running model
model.runProcesses()

# Cleaning model
model.destroy()

Use qsub command to launch.

⚠️ **GitHub.com Fallback** ⚠️