Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Draft slide decks for parts 1 and 2.
- Loading branch information
1 parent
c5f1610
commit 9d533d0
Showing
19 changed files
with
1,368 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#! /usr/bin/env python | ||
|
||
import os | ||
import sys | ||
|
||
from gc3libs.cmdline import SessionBasedScript | ||
|
||
if __name__ == '__main__': | ||
from day1 import AScript | ||
AScript().run() | ||
|
||
class AScript(SessionBasedScript): | ||
""" | ||
Minimal workflow scaffolding. | ||
""" | ||
def __init__(self): | ||
super(AScript, self).__init__(version='1.0') | ||
def new_tasks(self, extra): | ||
return [] |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
from gc3libs import Application | ||
|
||
class GrayscaleApp(Application): | ||
"""Convert an image file to grayscale.""" | ||
def __init__(self, img): | ||
inp = basename(img) | ||
out = "gray-" + inp | ||
Application.__init__( | ||
self, | ||
arguments=[ | ||
"convert", inp, "-colorspace", "gray", out], | ||
inputs=[img], | ||
outputs=[out], | ||
output_dir="grayscale.d", | ||
stdout="stdout.txt", | ||
stderr="stderr.txt") |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#! /usr/bin/env python | ||
|
||
from graphviz import Digraph | ||
|
||
desc = [#('UNKNOWN', ()), | ||
('NEW', ('SUBMITTED', 'RUNNING')), | ||
('SUBMITTED', ('RUNNING',)), | ||
('RUNNING', ('TERMINATING', 'STOPPED',)), | ||
('TERMINATING', ('TERMINATED',)), | ||
('TERMINATED', ()), | ||
('STOPPED', ())] | ||
|
||
for n in range(len(desc)): | ||
refstate = desc[n][0] | ||
g = Digraph(comment='GC3Pie Application states: ' + refstate) | ||
for k, (state, transitions) in enumerate(desc): | ||
attrs = { 'shape': 'box' } | ||
if not transitions and state != 'UNKNOWN': | ||
attrs['rank'] = 'max' | ||
attrs['shape'] = 'house' | ||
if n == k: | ||
attrs['style'] = 'filled' | ||
attrs['fillcolor'] = 'antiquewhite' | ||
g.node(state, **attrs) | ||
for next_state in transitions: | ||
g.edge(state, next_state) | ||
#if state != 'UNKNOWN': | ||
# g.edge(state, 'UNKNOWN', constraint='false') | ||
|
||
out = 'states-' + refstate | ||
g.render(out, view=False, cleanup=True) |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,146 @@ | ||
\documentclass[english,serif,mathserif,xcolor=pdftex,dvipsnames,table]{beamer} | ||
\usetheme{gc3} | ||
|
||
\usepackage[T1]{fontenc} | ||
\usepackage[utf8]{inputenc} | ||
\usepackage{babel} | ||
|
||
\usepackage{gc3} | ||
|
||
\title[Introduction]{% | ||
Overview of common GC3Pie use cases | ||
} | ||
\author[R. Murri, S3IT UZH]{% | ||
Riccardo Murri \texttt{<riccardo.murri@uzh.ch>} | ||
\\[1ex] | ||
\emph{S3IT: Services and Support for Science IT} | ||
\\[1ex] | ||
University of Zurich | ||
} | ||
\date{July~11--14, 2016} | ||
|
||
\begin{document} | ||
|
||
% title frame | ||
\maketitle | ||
|
||
\begin{frame} | ||
\frametitle{What is GC3Pie?} | ||
GC3Pie is \ldots | ||
\begin{enumerate} | ||
\item \alert<1>{An \emph{opinionated} Python framework for defining and running computational workflows;} | ||
\item A \emph{rapid development toolkit} for running user applications on clusters and IaaS cloud resources; | ||
\item The worst name ever given to a middleware piece\ldots | ||
\end{enumerate} | ||
|
||
\+ | ||
As \emph{developers}, \alert<1>{you're mostly interested in this part.} | ||
\end{frame} | ||
|
||
|
||
\begin{frame}[fragile] | ||
\frametitle{Uses of GC3Pie: parameter sweep} | ||
|
||
You have a simulation code that is dependent on a number of parameters. | ||
|
||
\+ | ||
Run the code for all possible combinations of parameters. | ||
|
||
\+ | ||
Then collect all the outputs and post-process to get a | ||
statistical overview. | ||
\end{frame} | ||
|
||
|
||
\begin{frame}[fragile] | ||
\frametitle{Uses of GC3Pie: model calibration} | ||
|
||
You have a simulation code that is dependent on a number of parameters. | ||
|
||
\+ | ||
Run the code for all possible combinations of parameters, and | ||
find the ones that ``best'' approximate a given experimental result. | ||
\end{frame} | ||
|
||
|
||
\begin{frame}[fragile] | ||
\frametitle{Uses of GC3Pie: parallel processing} | ||
|
||
Run the same program over and over again, | ||
feeding it different input files each time. | ||
|
||
\+ | ||
Then collect all the outputs and post-process to get a | ||
statistical overview. | ||
\end{frame} | ||
|
||
|
||
\begin{frame}[fragile] | ||
\frametitle{Uses of GC3Pie: parallel processing} | ||
(At times, you chop a large input file into pieces and process each one separately instead.) | ||
|
||
\+ | ||
\begin{quote} | ||
``For example, say we have a de novo assembly of 100,000 | ||
contigs. If we run 1 BLAST job against NR it could take as long as | ||
50,000 minutes/35 days!! (30sec/query sequence), however if we | ||
split this job into subsets of 5,000 sequences and ran 20 jobs in | ||
"parallel" on a cluster, our total run-time is reduced to only 41 | ||
hours.'' | ||
\end{quote} | ||
\begin{references} | ||
\url{http://sfg.stanford.edu/BLAST.html} | ||
\end{references} | ||
\end{frame} | ||
|
||
|
||
\begin{frame} | ||
\frametitle{Uses of GC3Pie: workflows} | ||
|
||
\begin{center} | ||
Orchestrate execution of several applications: | ||
some steps may run in parallel, some might need to be sequenced. | ||
|
||
\+ | ||
\includegraphics[width=0.70\textwidth]{fig/warholize-wkf} | ||
\end{center} | ||
\end{frame} | ||
|
||
|
||
\begin{frame} | ||
\frametitle{A typical high-throughput script structure} | ||
|
||
\begin{enumerate} | ||
\item Initialize computational resources | ||
\item Prepare programs and inputs for submission | ||
\item Submit tasks | ||
\item Monitor task status (loop) | ||
\item Retrieve results | ||
\item Postprocess and display | ||
\end{enumerate} | ||
\end{frame} | ||
|
||
|
||
\begin{frame} | ||
\frametitle{What GC3Pie handles for you} | ||
|
||
\begin{enumerate}\small | ||
\item Resource allocation (e.g. starting new instances on | ||
ScienceCloud) | ||
\item Selection of resources for each application in the session | ||
\item Data transfer (e.g. copying input files in the new instances) | ||
\item Remote execution of the application | ||
\item Retrieval of results (e.g. copying output files from the | ||
running instance) | ||
\item De-allocation of resources | ||
\end{enumerate} | ||
|
||
\end{frame} | ||
|
||
|
||
\end{document} | ||
|
||
%%% Local Variables: | ||
%%% mode: latex | ||
%%% TeX-master: t | ||
%%% End: |
Binary file not shown.
Oops, something went wrong.