% 
%   This is a latex file that generates a reference manual for 
%   PMI
%
% The following tricky code lets us build clean Postscript and PDF versions
% from the same file (see the Makefile)
%\def\foobar{\relax}
\ifx\unknown\foobar
\def\texorpdfstring#1#2{#1}
\documentclass{article}
\usepackage{url} 
\else
\documentclass[dvipdfm]{article}
\usepackage[dvipdfm]{hyperref}
\fi

\usepackage{tpage}
\usepackage{../refman/refman}
\usepackage{epsf}
%\usepackage{psfig}
%hyperref - do not remove this comment

\textheight=9in
\textwidth=6.1in
\oddsidemargin=.2in
\topmargin=-.50in
\newread\testfile

%
% For now, let findex be the same as index.  This will allow us to
% more easily separate function and nonfunction index entries later.
\let\findex=\index
%
% Modify the way titles are handled for no breaks between pages
\def\mantitle#1#2#3{\pagerule\nobreak
\ifmancontents\addcontentsline{toc}{subsection}{#1}\fi
\index{#1}}

\makeindex

\begin{document}

\markright{PMI Reference Manual}

\def\nopound{\catcode`\#=13}
{\nopound\gdef#{{\tt \char`\#}}}
\catcode`\_=13
\def_{{\tt \char`\_}}
\catcode`\_=11
\def\code#1{{\tt #1}}
%\let\url=\code
\def\makeussubscript{\catcode`\_=8}
\def\makeustext{\catcode`\_=11}
%\tpageoneskip
\ANLTMTitle{Process Manager Interface\\
Version 1.0\\
Reference Manual\\\ \\Draft of \today}{\em 
William Gropp\\
Ewing Lusk\\
Brian R. Toonen\\
David Ashton\\
Mathematics and Computer Science Division\\
Argonne National Laboratory}{00}{\today}

\clearpage

\pagenumbering{roman}
\tableofcontents
\clearpage

\pagenumbering{arabic}
\pagestyle{headings}

\section{Introduction}

MPI needs the services of a process manager.
Many MPI implementations include their own process managers.
For greatest flexibility and usability, an MPI program should work with any
process manager, including third-party process managers (e.g., PBS).
MPICH uses a ``Process Manager Interface'' (PMI) to separate the process
management functions from the MPI implementation.
PMI should be scalable in design and functional in specification.
MPICH executables can be handled by different process managers without
recompiling or relinking.
MPICH includes multiple implementations.
We are in discussions with vendors to support PMI directly.

\section{Process group functions}
This section describes the functions that provide the basic process management
functions in PMI.  These include routines to initialize and finalize PMI,
routines to get information about a parallel program (such as size and rank),
and inquire about the topology of the parallel computer (specifically, whether
it is a cluster of SMPs, and if so, which processes share the same node).

It should be easy to implement the routines in this section in most process
managers. 

\input{pmiman/PMI_Init.tex}
\input{pmiman/PMI_Initialized.tex}
\input{pmiman/PMI_Finalize.tex}
\input{pmiman/PMI_Get_rank.tex}
\input{pmiman/PMI_Get_size.tex}
\input{pmiman/PMI_Get_universe_size.tex}
\input{pmiman/PMI_Get_id.tex}
\input{pmiman/PMI_Get_kvs_domain_id.tex}
\input{pmiman/PMI_Get_id_length_max.tex}
\input{pmiman/PMI_Get_clique_size.tex}
\input{pmiman/PMI_Get_clique_ranks.tex}
\input{pmiman/PMI_Barrier.tex}
\input{pmiman/PMI_Abort.tex}
%\input{ch3man/.tex}

\section{Keyval space functions}
This section describes the functions to provide a way for processes in a
parallel program to exchange information.  This information may be used, for
example, to discover the host and port of another process when TCP is used for
communication between those processes.  These routines are included as part of
the PMI because they are part of process management in a parallel setting and
because a process manager is well-placed to provide these services.  However,
a PMI implementation, particularly one built on top of an existing process
manager, may choose to use a separate service to support these functions.
For example, a separate process that provides a well-known host and port could
be contacted by any process requiring these keyval space services.

\input{pmiman/PMI_KVS_Get_my_name.tex}
\input{pmiman/PMI_KVS_Get.tex}
\input{pmiman/PMI_KVS_Put.tex}
\input{pmiman/PMI_KVS_Commit.tex}
\input{pmiman/PMI_KVS_Create.tex}
\input{pmiman/PMI_KVS_Destroy.tex}
\input{pmiman/PMI_KVS_Get_name_length_max.tex}
\input{pmiman/PMI_KVS_Get_key_length_max.tex}
\input{pmiman/PMI_KVS_Get_value_length_max.tex}
\input{pmiman/PMI_KVS_Iter_first.tex}
\input{pmiman/PMI_KVS_Iter_next.tex}

\section{Spawn function}
This section describes the functions that are used to create new processes and
to make them visible to the other processes in a parallel job.  


\input{pmiman/PMI_keyval_t.tex}
\input{pmiman/PMI_Spawn_multiple.tex}
\input{pmiman/PMI_Parse_option.tex}
\input{pmiman/PMI_Args_to_keyval.tex}
\input{pmiman/PMI_Free_keyvals.tex}
\input{pmiman/PMI_Get_options.tex}

\section{External interface functions}
\input{pmiman/PMI_Publish_name.tex}
\input{pmiman/PMI_Unpublish_name.tex}
\input{pmiman/PMI_Lookup_name.tex}

\section{PMI Constants}
\input{pmiman/PMI_CONSTANTS.tex}

% Index
%\openin\testfile{pmi.ind}
%\ifeof\testfile\else
\let\SaveIndex=\theindex
\long\def\theindex#1{\SaveIndex{#1}\addcontentsline{toc}{section}{Index}}
\input pmi.ind
%\fi
%\closein\testfile

\end{document}
