Skip to content

Commit

Permalink
Finalize part 06
Browse files Browse the repository at this point in the history
  • Loading branch information
riccardomurri committed Jul 13, 2016
1 parent 70742df commit f908fa8
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 0 deletions.
30 changes: 30 additions & 0 deletions docs/programmers/tutorials/workflows/fig/arrow.fig
@@ -0,0 +1,30 @@
#FIG 3.2 Produced by xfig version 3.2.5b
Landscape
Center
Metric
A4
100.00
Single
-2
1200 2
0 32 #9c0000
0 33 #8c8c8c
0 34 #8c8c8c
0 35 #424242
0 36 #8c8c8c
0 37 #424242
0 38 #8c8c8c
0 39 #424242
0 40 #8c8c8c
0 41 #424242
0 42 #8c8c8c
0 43 #424242
6 45 45 1845 1260
2 3 0 1 0 7 100 0 20 0.000 0 0 7 0 0 8
405 450 405 900 1260 900 1260 1260 1845 650 1260 45
1260 450 405 450
2 2 0 1 0 7 100 0 20 0.000 0 0 7 0 0 5
315 450 180 450 180 900 315 900 315 450
2 2 0 1 0 7 100 0 20 0.000 0 0 7 0 0 5
90 450 45 450 45 900 90 900 90 450
-6
Binary file modified docs/programmers/tutorials/workflows/part06.pdf
Binary file not shown.
39 changes: 39 additions & 0 deletions docs/programmers/tutorials/workflows/part06.tex
Expand Up @@ -430,6 +430,45 @@ \part{Termination status}
\end{frame}


% \begin{frame}[fragile]
% \frametitle{Global post-processing}
% To add some code which will be executed \emph{just before the script
% exits,} add a \lstinline|after_main_loop| method:

% \begin{python}
% def after_main_loop(self):
% model_names = {}
% for app in ~\HL{self.session.tasks.values()}~:
% if app.execution.state != Run.State.TERMINATED:
% return
% if app.model_name in model_names:
% model_names[app.model_name] += 1
% else:
% model_names[app.model_name] = 1
% \end{python}

% \begin{itemize}
% \item \lstinline|self.session.tasks| is a map
% \lstinline|JobID|~$\Rightarrow$~\lstinline|Application| object
% \item \lstinline|self.session.tasks.values()| thus contains a list
% of all the \textbf{Application}s created by the \lstinline|new_tasks|
% \end{itemize}
% \end{frame}


\begin{frame}
\frametitle{Global post-processing}
Further options for customizing a session-based script:
\begin{description}
\item [\texttt{before\_main\_loop(self)}] to execute some code
\emph{before} the submission of the jobs.
\item [\texttt{after\_main\_loop(self)}] to execute some code
\emph{after} the main loop. A list of all Application objects is
available in the \lstinline|self.session.tasks.values()| list.
\end{description}
\end{frame}


\end{document}

%%% Local Variables:
Expand Down

0 comments on commit f908fa8

Please sign in to comment.