
\subsection{Introduction}

A set of perl scripts allow you to compile and execute \textsc{PaStiX}.\\
Those scripts are used for our tests on our machines but it can be
adapted to other machines.\\

\subsection{How to use it}

First edit \texttt{Scripts/Modules/Common.pm} and copy the text in top
between ``\texttt{\#\# Options Par defaut si conf.pm n'existe pas}'' and
``\texttt{\#\# Options perso}'' to a new file : ``\texttt{Scripts/Modules/Conf.pm}''.\\
In \texttt{Conf.pm} change the options as you want.

Examples of possible \texttt{Conf.pm} can be found in
\texttt{Scripts/Modules/Conf-petites-matrices.pm} or 
\texttt{Scripts/Modules/Conf-Weekend.pm}.


\subsubsection{Compilation}

The strings of the array \texttt{liste\_runs{'libnames'}} will determine
the compilation options.\\


\begin{tabular}{|l|l|}
  \hline
  Option                               & Tag\\
  \hline
  \texttt{-DFORCE\_LONG}               & \texttt{\_long}\\
  \texttt{-DFORCE\_DOUBLE}             & \texttt{\_double}\\
  \texttt{-DFORCE\_COMPLEX}            & \texttt{\_complex}\\
  \texttt{-DFORCE\_NOMPI}              & \texttt{\_nompi}\\
  \texttt{-DFORCE\_NOSMP}              & \texttt{\_nosmp}\\
  \hline
  \texttt{-DMETIS}                     & \texttt{\_metis}\\
  \hline
  \texttt{-DNUMA\_ALLOC}               & \texttt{\_Numa}\\
  \texttt{-DNO\_MPI\_TYPE}             & \texttt{\_notypes}\\
  \texttt{-DTEST\_IRECV}               & \texttt{\_IRecv}\\
  \texttt{-DTHREAD\_COMM}              & \texttt{\_ThComm}\\
  \texttt{-DPASTIX\_FUNNELED}          & \texttt{\_Funneled}\\
  \hline
  Marcel Usage                         & \texttt{\_Marcel or \_UseBubble}\\
  Marcel Falvor                        & \texttt{\_FL\textit{flavorname}FL}\\
  \texttt{-DPASTIX\_BUBBLE}            & \texttt{Bubble}\\
  \texttt{-DPASTIX\_USE\_BUBBLE}       & \texttt{\_UseBubble}\\
  \hline
  \texttt{-DMEMORY\_USAGE}             & \texttt{\_mem}\\
  \texttt{-DSTATS\_SOPALIN}            & \texttt{\_ovh}\\
  \texttt{-DTRACE\_SOPALIN}            & \texttt{\_trace}\\
  \hline
  \texttt{-DONLY\_LOAD\_SYMBMTX}       & \texttt{\_symbmtx}\\
  \texttt{-DNOSMP\_RAFF}               & \texttt{\_noSMPRaff}\\
  \texttt{-DCOMPACT\_SMX}              & \texttt{\_compact}\\
  \hline
\end{tabular}

Using the executable name, the config.in will be created from
\texttt{/template/config.tpl}.\\
All \texttt{\_KEYWORD\_} in file config.tpl will be replaced by the
value of \texttt{\$param\_exec\{\_KEYWORD\_\}} defined in
\texttt{Scripts/Modules/Compilation.pl}. 

Then you can run the script \texttt{Pastix.pl} to compile
(\texttt{-c}).\\
If you have issues compiling you can edit the
\texttt{Modules/Compilation.pl} file.\\
There you can add specific compilation options for your machine after
the line : \\
``\texttt{\# Adaptation des options de compilation à chaque machine}''.
 
\subsubsection{Creation of the directories for the execution}

Before the execution, you have to run \texttt{Pastix -f}.\\
All files will be created into the results path specified in
\texttt{Conf.pm}\\
The file tree follows this model : \\
\texttt{/executableName/MatriceName/AAP\_BBT\_levelCC\_amalgEE/YYYYMMDD-HHMM/},
where \texttt{AA} is the number of MPI process, \texttt{BB} the number
of thread, \texttt{CC} the level of fill, \texttt{EE} the level of
amalgamation, and \texttt{YYYYMMDD-HHMM} the date and hour.

\subsubsection{Execution}

For execution, you have to run \texttt{Pastix -e}.\\
You may have to modify the function ExecuteJobs from
\texttt{Pastix.pl}, probably after the line
``\texttt{\# Execution du job}'' .\\
You may to have to add your machine to one of the current \texttt{if}
or \texttt{elif} or to had your proper one and maybe a new tpl to
execute your job if your batch scheduler command is different from
llsubmit, bsub or oarsub.


\subsection{Scripts}

\subsubsection{Pastix.pl}

It's the bench launching thread.\\
You can use it with several options :
\begin{verbatim}
Pastix.pl [ -h ] [ -A | -cfe ]
   -h   Print help
   -A   Equivalent to -cfe
   -c   Compile
   -f   Create directories
   -e   Exécute
   -g   Génère latex tabular
   -p   Show what options where set in Conf.pm.
\end{verbatim}

\subsubsection{Makerelease.pl}
Create the release (get the SVN without .svn directories, had the licence and suppress some files.)
\begin{verbatim}
MakeRelease.pl [ -h ][ -d=Directory ] [ -f=headerfile ]
   -h   Print help
   -d   Choose directory for release
   -f   Choose header file
\end{verbatim}

\subsubsection{GetAllRes.pl}
Show all results.
\begin{verbatim}
GetAllRes.pl [ -hebr ][ -d=Directory ] [ -g=patern ]
   -h   Print help
   -b   Print only best times
   -r   Don't print directory
   -e   Don't print errors
   -d   Choose directory result (not the conf.pm one, if you did archive results)
   -g   limits result following patern
   -f   format affichage
\end{verbatim}

\subsubsection{Archiver.pl}
Copy all log files in a new directory.\\
The new directory contains the same directory trees, with no core files, no binaries, only logs.\\
Careful : no option...\\

\subsubsection{fillDB.pl}

Add new entries in the database from the directory set in \texttt{Conf.pm}.\\
You have to had a directory named as your login and copy the result
directory renamed with the machine name in the directory from
Conf.pm.\\ 

\subsection{Modules}

\subsubsection{Common.pm}

Contains global parameters and functions used by all scripts.

\subsubsection{Compilation.pm}

Contains the function which compute compilation options depending on
the Conf.pm file and the machine.

\subsubsection{Conf.pm}

This file must be create by the user. It is a copy of the beginning of
the Common.pm file that you can change as you want.\\


