<filename>docs/cheetah_savanna/latex/namespacecodar_1_1cheetah_1_1pbs.tex
\hypertarget{namespacecodar_1_1cheetah_1_1pbs}{}\section{codar.\+cheetah.\+pbs Namespace Reference}
\label{namespacecodar_1_1cheetah_1_1pbs}\index{codar.\+cheetah.\+pbs@{codar.\+cheetah.\+pbs}}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
def \hyperlink{namespacecodar_1_1cheetah_1_1pbs_a2d1652f1349a664f93598c2ea3c20896}{open\+\_\+pbs\+\_\+file} (scheduler\+\_\+dir\+\_\+path, name, project, nodes, walltime)
\item 
def \hyperlink{namespacecodar_1_1cheetah_1_1pbs_a911aa8a83bd8b0fd8f750ea66d410851}{write\+\_\+run\+\_\+script} (script\+\_\+out\+\_\+path, scheduler\+\_\+dir\+\_\+path)
\end{DoxyCompactItemize}
\subsection*{Variables}
\begin{DoxyCompactItemize}
\item 
string \hyperlink{namespacecodar_1_1cheetah_1_1pbs_a19167ffbdc5b9b468b3368c09ba8fe1f}{P\+B\+S\+\_\+\+N\+A\+ME} = \textquotesingle{}job.\+pbs\textquotesingle{}
\item 
string \hyperlink{namespacecodar_1_1cheetah_1_1pbs_a076dd2388cec6ba878adff6363356c1f}{P\+B\+S\+\_\+\+F\+O\+R\+M\+A\+T\+\_\+\+T\+E\+M\+P\+L\+A\+TE}
\item 
string \hyperlink{namespacecodar_1_1cheetah_1_1pbs_af0456cd6c62ec9db8b9fdfafc248b940}{S\+U\+B\+M\+I\+T\+\_\+\+F\+O\+R\+M\+A\+T\+\_\+\+T\+E\+M\+P\+L\+A\+TE}
\end{DoxyCompactItemize}


\subsection{Detailed Description}
\begin{DoxyVerb}Module for generating PBS files for executing many jobs with the same
number of nodes.

TODO: define a common interface for schedulers, that works with at least
SLURM and PBS.

TODO: codify dir structure - scheduler dir contains scheduler script, has
subdir for each set of experiment parameters.
\end{DoxyVerb}
 

\subsection{Function Documentation}
\mbox{\Hypertarget{namespacecodar_1_1cheetah_1_1pbs_a2d1652f1349a664f93598c2ea3c20896}\label{namespacecodar_1_1cheetah_1_1pbs_a2d1652f1349a664f93598c2ea3c20896}} 
\index{codar\+::cheetah\+::pbs@{codar\+::cheetah\+::pbs}!open\+\_\+pbs\+\_\+file@{open\+\_\+pbs\+\_\+file}}
\index{open\+\_\+pbs\+\_\+file@{open\+\_\+pbs\+\_\+file}!codar\+::cheetah\+::pbs@{codar\+::cheetah\+::pbs}}
\subsubsection{\texorpdfstring{open\+\_\+pbs\+\_\+file()}{open\_pbs\_file()}}
{\footnotesize\ttfamily def codar.\+cheetah.\+pbs.\+open\+\_\+pbs\+\_\+file (\begin{DoxyParamCaption}\item[{}]{scheduler\+\_\+dir\+\_\+path,  }\item[{}]{name,  }\item[{}]{project,  }\item[{}]{nodes,  }\item[{}]{walltime }\end{DoxyParamCaption})}

\begin{DoxyVerb}Open and write a PBS file to the specified path and return the open file
object for further writing. Caller is responsible for closing the file.

TODO: rather than passing back a file, this should probably return
an object with an 'add_run' function. There should also be a template
for the run output dir set somewhere - maybe other modules handle that,
it should not be scheduler specific.
\end{DoxyVerb}
 

Definition at line 38 of file pbs.\+py.

\mbox{\Hypertarget{namespacecodar_1_1cheetah_1_1pbs_a911aa8a83bd8b0fd8f750ea66d410851}\label{namespacecodar_1_1cheetah_1_1pbs_a911aa8a83bd8b0fd8f750ea66d410851}} 
\index{codar\+::cheetah\+::pbs@{codar\+::cheetah\+::pbs}!write\+\_\+run\+\_\+script@{write\+\_\+run\+\_\+script}}
\index{write\+\_\+run\+\_\+script@{write\+\_\+run\+\_\+script}!codar\+::cheetah\+::pbs@{codar\+::cheetah\+::pbs}}
\subsubsection{\texorpdfstring{write\+\_\+run\+\_\+script()}{write\_run\_script()}}
{\footnotesize\ttfamily def codar.\+cheetah.\+pbs.\+write\+\_\+run\+\_\+script (\begin{DoxyParamCaption}\item[{}]{script\+\_\+out\+\_\+path,  }\item[{}]{scheduler\+\_\+dir\+\_\+path }\end{DoxyParamCaption})}

\begin{DoxyVerb}Write a bash script that will submit a PBS file generated by
`open_pbs_file` with the correct working directory and enironment.
This is the end user (experiment runner)'s entry point to start the
experiment.
\end{DoxyVerb}
 

Definition at line 55 of file pbs.\+py.



\subsection{Variable Documentation}
\mbox{\Hypertarget{namespacecodar_1_1cheetah_1_1pbs_a076dd2388cec6ba878adff6363356c1f}\label{namespacecodar_1_1cheetah_1_1pbs_a076dd2388cec6ba878adff6363356c1f}} 
\index{codar\+::cheetah\+::pbs@{codar\+::cheetah\+::pbs}!P\+B\+S\+\_\+\+F\+O\+R\+M\+A\+T\+\_\+\+T\+E\+M\+P\+L\+A\+TE@{P\+B\+S\+\_\+\+F\+O\+R\+M\+A\+T\+\_\+\+T\+E\+M\+P\+L\+A\+TE}}
\index{P\+B\+S\+\_\+\+F\+O\+R\+M\+A\+T\+\_\+\+T\+E\+M\+P\+L\+A\+TE@{P\+B\+S\+\_\+\+F\+O\+R\+M\+A\+T\+\_\+\+T\+E\+M\+P\+L\+A\+TE}!codar\+::cheetah\+::pbs@{codar\+::cheetah\+::pbs}}
\subsubsection{\texorpdfstring{P\+B\+S\+\_\+\+F\+O\+R\+M\+A\+T\+\_\+\+T\+E\+M\+P\+L\+A\+TE}{PBS\_FORMAT\_TEMPLATE}}
{\footnotesize\ttfamily string codar.\+cheetah.\+pbs.\+P\+B\+S\+\_\+\+F\+O\+R\+M\+A\+T\+\_\+\+T\+E\+M\+P\+L\+A\+TE}

{\bfseries Initial value\+:}
\begin{DoxyCode}
1 =  \textcolor{stringliteral}{"""}
2 \textcolor{stringliteral}{#!/bin/bash}
3 \textcolor{stringliteral}{#PBS -N \{name\}}
4 \textcolor{stringliteral}{#PBS -A \{project\}}
5 \textcolor{stringliteral}{#PBS -l nodes=\{nodes\}}
6 \textcolor{stringliteral}{#PBS -l walltime=\{walltime\}}
7 \textcolor{stringliteral}{}
8 \textcolor{stringliteral}{"""}
\end{DoxyCode}


Definition at line 18 of file pbs.\+py.

\mbox{\Hypertarget{namespacecodar_1_1cheetah_1_1pbs_a19167ffbdc5b9b468b3368c09ba8fe1f}\label{namespacecodar_1_1cheetah_1_1pbs_a19167ffbdc5b9b468b3368c09ba8fe1f}} 
\index{codar\+::cheetah\+::pbs@{codar\+::cheetah\+::pbs}!P\+B\+S\+\_\+\+N\+A\+ME@{P\+B\+S\+\_\+\+N\+A\+ME}}
\index{P\+B\+S\+\_\+\+N\+A\+ME@{P\+B\+S\+\_\+\+N\+A\+ME}!codar\+::cheetah\+::pbs@{codar\+::cheetah\+::pbs}}
\subsubsection{\texorpdfstring{P\+B\+S\+\_\+\+N\+A\+ME}{PBS\_NAME}}
{\footnotesize\ttfamily string codar.\+cheetah.\+pbs.\+P\+B\+S\+\_\+\+N\+A\+ME = \textquotesingle{}job.\+pbs\textquotesingle{}}



Definition at line 15 of file pbs.\+py.

\mbox{\Hypertarget{namespacecodar_1_1cheetah_1_1pbs_af0456cd6c62ec9db8b9fdfafc248b940}\label{namespacecodar_1_1cheetah_1_1pbs_af0456cd6c62ec9db8b9fdfafc248b940}} 
\index{codar\+::cheetah\+::pbs@{codar\+::cheetah\+::pbs}!S\+U\+B\+M\+I\+T\+\_\+\+F\+O\+R\+M\+A\+T\+\_\+\+T\+E\+M\+P\+L\+A\+TE@{S\+U\+B\+M\+I\+T\+\_\+\+F\+O\+R\+M\+A\+T\+\_\+\+T\+E\+M\+P\+L\+A\+TE}}
\index{S\+U\+B\+M\+I\+T\+\_\+\+F\+O\+R\+M\+A\+T\+\_\+\+T\+E\+M\+P\+L\+A\+TE@{S\+U\+B\+M\+I\+T\+\_\+\+F\+O\+R\+M\+A\+T\+\_\+\+T\+E\+M\+P\+L\+A\+TE}!codar\+::cheetah\+::pbs@{codar\+::cheetah\+::pbs}}
\subsubsection{\texorpdfstring{S\+U\+B\+M\+I\+T\+\_\+\+F\+O\+R\+M\+A\+T\+\_\+\+T\+E\+M\+P\+L\+A\+TE}{SUBMIT\_FORMAT\_TEMPLATE}}
{\footnotesize\ttfamily string codar.\+cheetah.\+pbs.\+S\+U\+B\+M\+I\+T\+\_\+\+F\+O\+R\+M\+A\+T\+\_\+\+T\+E\+M\+P\+L\+A\+TE}

{\bfseries Initial value\+:}
\begin{DoxyCode}
1 =  \textcolor{stringliteral}{"""}
2 \textcolor{stringliteral}{#!/bin/bash}
3 \textcolor{stringliteral}{}
4 \textcolor{stringliteral}{cd "\{scheduler\_directory\}"}
5 \textcolor{stringliteral}{qsub \{pbs\_name\}}
6 \textcolor{stringliteral}{"""}
\end{DoxyCode}


Definition at line 30 of file pbs.\+py.

