\hypertarget{parallel_8c}{}\doxysection{parallel.\+c File Reference}
\label{parallel_8c}\index{parallel.c@{parallel.c}}
{\ttfamily \#include \char`\"{}form3.\+h\char`\"{}}\newline
{\ttfamily \#include \char`\"{}vector.\+h\char`\"{}}\newline
\doxysubsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \mbox{\hyperlink{structNoDe}{No\+De}}
\item 
struct \mbox{\hyperlink{structdollar__buf}{dollar\+\_\+buf}}
\item 
struct \mbox{\hyperlink{structbufIPstruct}{buf\+IPstruct}}
\end{DoxyCompactItemize}
\doxysubsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{parallel_8c_a3fc374fafc79b736038c0867ea7d0c90}\label{parallel_8c_a3fc374fafc79b736038c0867ea7d0c90}} 
\#define {\bfseries PRINTFBUF}(TEXT,  TERM,  SIZE)~\{\}
\item 
\#define \mbox{\hyperlink{parallel_8c_a5d9d454d4b9f2ff8106d5199ac0d0186}{SWAP}}(x,  y)
\item 
\#define \mbox{\hyperlink{parallel_8c_ae4b6fbeec0d3ba464f41fcf304686ee9}{PACK\+\_\+\+LONG}}(p,  n)
\item 
\#define \mbox{\hyperlink{parallel_8c_aef86a5474b444bbb12c45234b179bfc3}{UNPACK\+\_\+\+LONG}}(p,  n)
\item 
\#define \mbox{\hyperlink{parallel_8c_a3e1cfef60e774a81f30eaddf26a3a274}{CHECK}}(condition)~\+\_\+\+CHECK(condition, \+\_\+\+\_\+\+FILE\+\_\+\+\_\+, \+\_\+\+\_\+\+LINE\+\_\+\+\_\+)
\item 
\mbox{\Hypertarget{parallel_8c_a5dccc0da6b0c49787c9fd61fa1c5bbc8}\label{parallel_8c_a5dccc0da6b0c49787c9fd61fa1c5bbc8}} 
\#define {\bfseries \+\_\+\+CHECK}(condition,  file,  line)~\+\_\+\+\_\+\+CHECK(condition, file, line)
\item 
\#define {\bfseries \+\_\+\+\_\+\+CHECK}(condition,  file,  line)
\item 
\mbox{\Hypertarget{parallel_8c_ac85d281067484158ce8b456c61f98f88}\label{parallel_8c_ac85d281067484158ce8b456c61f98f88}} 
\#define {\bfseries DBGOUT}(lv1,  lv2,  a)~do \{ if ( lv1 $>$= lv2 ) \{ printf a; fflush(stdout); \} \} while (0)
\item 
\mbox{\Hypertarget{parallel_8c_a3dc9a1f5b788ea056da70e98c4f1a057}\label{parallel_8c_a3dc9a1f5b788ea056da70e98c4f1a057}} 
\#define {\bfseries DBGOUT\+\_\+\+NINTERMS}(lv,  a)
\item 
\mbox{\Hypertarget{parallel_8c_a9c6ab3028875bc173ed9c4ac576ffef4}\label{parallel_8c_a9c6ab3028875bc173ed9c4ac576ffef4}} 
\#define {\bfseries PF\+\_\+\+STATS\+\_\+\+SIZE}~5
\item 
\mbox{\Hypertarget{parallel_8c_af9bb652802927469f4b43219731bfb83}\label{parallel_8c_af9bb652802927469f4b43219731bfb83}} 
\#define {\bfseries PF\+\_\+\+SNDFILEBUFSIZE}~4096
\item 
\mbox{\Hypertarget{parallel_8c_a108d1b79d8f04b218505244d5c409ee8}\label{parallel_8c_a108d1b79d8f04b218505244d5c409ee8}} 
\#define {\bfseries recv\+Buffer}~log\+Buffer         /$\ast$ (master) The buffer for receiving messages. $\ast$/
\end{DoxyCompactItemize}
\doxysubsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
typedef struct \mbox{\hyperlink{structNoDe}{No\+De}} \mbox{\hyperlink{parallel_8c_a162c180c7bd00124c0d907f0931c6ffd}{NODE}}
\item 
\mbox{\Hypertarget{parallel_8c_aad050fa4a02dac4d6d7de76a11d48340}\label{parallel_8c_aad050fa4a02dac4d6d7de76a11d48340}} 
typedef struct \mbox{\hyperlink{structbufIPstruct}{buf\+IPstruct}} {\bfseries buf\+IPstruct\+\_\+t}
\end{DoxyCompactItemize}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
LONG \mbox{\hyperlink{parallel_8c_af78eba5ff925b121f72ac06559c621ba}{PF\+\_\+\+Real\+Time}} (int)
\item 
int \mbox{\hyperlink{parallel_8c_aca525e88c2b245234727eb51fad506be}{PF\+\_\+\+Lib\+Init}} (int $\ast$, char $\ast$$\ast$$\ast$)
\item 
int \mbox{\hyperlink{parallel_8c_aa1598f39fceb641ad8d6eadc2bb7dfa3}{PF\+\_\+\+Lib\+Terminate}} (int)
\item 
int \mbox{\hyperlink{parallel_8c_aabf3560a97f9f48bd1cd1e2127545a3e}{PF\+\_\+\+Probe}} (int $\ast$)
\item 
int \mbox{\hyperlink{parallel_8c_a6dbb2da3705f2af0fbe5593b80f64dde}{PF\+\_\+\+Recv\+Wbuf}} (WORD $\ast$, LONG $\ast$, int $\ast$)
\item 
int \mbox{\hyperlink{parallel_8c_a95a32e45db30ee18489e08beef4d3546}{PF\+\_\+\+IRecv\+Rbuf}} (\mbox{\hyperlink{structPF__BUFFER}{PF\+\_\+\+BUFFER}} $\ast$, int, int)
\item 
int \mbox{\hyperlink{parallel_8c_a07dbf6fadb59b460d5a6d630024d2473}{PF\+\_\+\+Wait\+Rbuf}} (\mbox{\hyperlink{structPF__BUFFER}{PF\+\_\+\+BUFFER}} $\ast$, int, LONG $\ast$)
\item 
int \mbox{\hyperlink{parallel_8c_aabbfc0cdb02aa09612dfc99650adee24}{PF\+\_\+\+Raw\+Send}} (int dest, void $\ast$buf, LONG l, int tag)
\item 
LONG \mbox{\hyperlink{parallel_8c_a754c5c9e131d45040b31e541e1908b8e}{PF\+\_\+\+Raw\+Recv}} (int $\ast$src, void $\ast$buf, LONG thesize, int $\ast$tag)
\item 
int \mbox{\hyperlink{parallel_8c_a8b2e58bede303502d5c8db7f52604336}{PF\+\_\+\+Raw\+Probe}} (int $\ast$src, int $\ast$tag, int $\ast$bytesize)
\item 
int \mbox{\hyperlink{parallel_8c_abc56c3ae41cd94a0ee0e1c900c2ee4d3}{PF\+\_\+\+End\+Sort}} (void)
\item 
WORD \mbox{\hyperlink{parallel_8c_a213cab9d163629d08a2681643dda6303}{PF\+\_\+\+Deferred}} (WORD $\ast$term, WORD level)
\item 
int \mbox{\hyperlink{parallel_8c_adc0832dd4fa1cb53dd551672884bcec4}{PF\+\_\+\+Processor}} (\mbox{\hyperlink{structExPrEsSiOn}{EXPRESSIONS}} e, WORD i, WORD Last\+Expression)
\item 
int \mbox{\hyperlink{parallel_8c_a2a2f2af1cf99b17a32bd8c149e4aaaa7}{PF\+\_\+\+Init}} (int $\ast$argc, char $\ast$$\ast$$\ast$argv)
\item 
int \mbox{\hyperlink{parallel_8c_a9c62cfe2b9d250a2ee224c3c7e6e7b4d}{PF\+\_\+\+Terminate}} (int errorcode)
\item 
LONG \mbox{\hyperlink{parallel_8c_a4acf9c6814b057fdc96bd1e9efdd3910}{PF\+\_\+\+Get\+Slave\+Times}} (void)
\item 
LONG \mbox{\hyperlink{parallel_8c_ab17fe2cb9406a9962b7ae46f24c8b6b8}{PF\+\_\+\+Broadcast\+Number}} (LONG x)
\item 
void \mbox{\hyperlink{parallel_8c_a706428ee6daa7eb20ffb427c50e76927}{PF\+\_\+\+Broadcast\+Buffer}} (WORD $\ast$$\ast$buffer, LONG $\ast$length)
\item 
int \mbox{\hyperlink{parallel_8c_a972f570b9bfd8ab76b113597837e9e38}{PF\+\_\+\+Broadcast\+String}} (UBYTE $\ast$str)
\item 
int \mbox{\hyperlink{parallel_8c_a51acdb267f2a3289d44558f794ff320a}{PF\+\_\+\+Broadcast\+Pre\+Dollar}} (WORD $\ast$$\ast$dbuffer, LONG $\ast$newsize, int $\ast$numterms)
\item 
int \mbox{\hyperlink{parallel_8c_a7bb2cc34f85ec08289eb6be4a16d29d1}{PF\+\_\+\+Collect\+Modified\+Dollars}} (void)
\item 
int \mbox{\hyperlink{parallel_8c_a5efb548dd947c719005be2da0d79e114}{PF\+\_\+\+Broadcast\+Modified\+Dollars}} (void)
\item 
int \mbox{\hyperlink{parallel_8c_a27b88f27e555759116cf5bf20931ae2a}{PF\+\_\+\+Broadcast\+Redefined\+Pre\+Vars}} (void)
\item 
\mbox{\Hypertarget{parallel_8c_acf1b6528ea25051874af050b50164343}\label{parallel_8c_acf1b6528ea25051874af050b50164343}} 
int {\bfseries PF\+\_\+\+Store\+Inside\+Info} (void)
\item 
\mbox{\Hypertarget{parallel_8c_aede29ec9b6e2a4fe3adbab043c1030f6}\label{parallel_8c_aede29ec9b6e2a4fe3adbab043c1030f6}} 
int {\bfseries PF\+\_\+\+Restore\+Inside\+Info} (void)
\item 
int \mbox{\hyperlink{parallel_8c_a6eca5eb317338d7f924c1b30efa3bb04}{PF\+\_\+\+Broadcast\+CBuf}} (int bufnum)
\item 
int \mbox{\hyperlink{parallel_8c_a4e4d2578b246a72a2b5ae83264e0c1eb}{PF\+\_\+\+Broadcast\+Exp\+Flags}} (void)
\item 
int \mbox{\hyperlink{parallel_8c_aef563d0e7aceb926dc0c91cc38267b79}{PF\+\_\+\+Broadcast\+Expr}} (\mbox{\hyperlink{structExPrEsSiOn}{EXPRESSIONS}} e, \mbox{\hyperlink{structs_8h_a36b8571cff77310201b5cf441466ba83}{FILEHANDLE}} $\ast$file)
\item 
int \mbox{\hyperlink{parallel_8c_a32ed894955022778e534493c98a0fc60}{PF\+\_\+\+Broadcast\+RHS}} (void)
\item 
int \mbox{\hyperlink{parallel_8c_afd64e52f1ac32149986935def83fcd41}{PF\+\_\+\+In\+Parallel\+Processor}} (void)
\item 
int \mbox{\hyperlink{parallel_8c_ad446f03e95a7832b57ee69d5d4f7e079}{PF\+\_\+\+Send\+File}} (int to, FILE $\ast$fd)
\item 
int \mbox{\hyperlink{parallel_8c_a9431f495c0a0264e23c118bd7c9c815a}{PF\+\_\+\+Recv\+File}} (int from, FILE $\ast$fd)
\item 
void \mbox{\hyperlink{parallel_8c_ad3e04b83427086402644920543c2859e}{PF\+\_\+\+MLock}} (void)
\item 
void \mbox{\hyperlink{parallel_8c_a14f85f4f370b1b4aa22c7b959af56de5}{PF\+\_\+\+MUnlock}} (void)
\item 
LONG \mbox{\hyperlink{parallel_8c_a85e0701bc8cec0f013d92ba664fe4961}{PF\+\_\+\+Write\+File\+To\+File}} (int handle, UBYTE $\ast$buffer, LONG size)
\item 
void \mbox{\hyperlink{parallel_8c_aaa6f2290ae527132b557e572636a7a20}{PF\+\_\+\+Flush\+Std\+Out\+Buffer}} (void)
\item 
void \mbox{\hyperlink{parallel_8c_a1f637c1ac8418b44621249070e9c8c6b}{PF\+\_\+\+Free\+Error\+Message\+Buffers}} (void)
\end{DoxyCompactItemize}
\doxysubsection*{Variables}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{parallel_8c_a86370d8d37efe88a80a1c006501a8c3f}\label{parallel_8c_a86370d8d37efe88a80a1c006501a8c3f}} 
\mbox{\hyperlink{structParallelVars}{PARALLELVARS}} {\bfseries PF}
\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
Message passing library independent functions of parform

This file contains functions needed for the parallel version of form3 these functions need no real link to the message passing libraries, they only need some interface dependent preprocessor definitions (check \mbox{\hyperlink{parallel_8h}{parallel.\+h}}). So there still need two different objectfiles to be compiled for mpi and pvm! 

\doxysubsection{Macro Definition Documentation}
\mbox{\Hypertarget{parallel_8c_a5d9d454d4b9f2ff8106d5199ac0d0186}\label{parallel_8c_a5d9d454d4b9f2ff8106d5199ac0d0186}} 
\index{parallel.c@{parallel.c}!SWAP@{SWAP}}
\index{SWAP@{SWAP}!parallel.c@{parallel.c}}
\doxysubsubsection{\texorpdfstring{SWAP}{SWAP}}
{\footnotesize\ttfamily \#define SWAP(\begin{DoxyParamCaption}\item[{}]{x,  }\item[{}]{y }\end{DoxyParamCaption})}

{\bfseries Value\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{    \textcolor{keywordflow}{do} \{ \(\backslash\)}
\DoxyCodeLine{        char swap\_tmp\_\_[\textcolor{keyword}{sizeof}(x) == \textcolor{keyword}{sizeof}(y) ? (int)\textcolor{keyword}{sizeof}(x) : -\/1]; \(\backslash\)}
\DoxyCodeLine{        memcpy(swap\_tmp\_\_, \&y, \textcolor{keyword}{sizeof}(x)); \(\backslash\)}
\DoxyCodeLine{        memcpy(\&y, \&x, \textcolor{keyword}{sizeof}(x)); \(\backslash\)}
\DoxyCodeLine{        memcpy(\&x, swap\_tmp\_\_, \textcolor{keyword}{sizeof}(x)); \(\backslash\)}
\DoxyCodeLine{    \} \textcolor{keywordflow}{while} (0)}

\end{DoxyCode}
Swaps the variables {\itshape x} and {\itshape y}. If sizeof(x) != sizeof(y) then a compilation error will occur. A set of memcpy calls with constant sizes is expected to be inlined by the optimisation. 

Definition at line 124 of file parallel.\+c.

\mbox{\Hypertarget{parallel_8c_ae4b6fbeec0d3ba464f41fcf304686ee9}\label{parallel_8c_ae4b6fbeec0d3ba464f41fcf304686ee9}} 
\index{parallel.c@{parallel.c}!PACK\_LONG@{PACK\_LONG}}
\index{PACK\_LONG@{PACK\_LONG}!parallel.c@{parallel.c}}
\doxysubsubsection{\texorpdfstring{PACK\_LONG}{PACK\_LONG}}
{\footnotesize\ttfamily \#define PACK\+\_\+\+LONG(\begin{DoxyParamCaption}\item[{}]{p,  }\item[{}]{n }\end{DoxyParamCaption})}

{\bfseries Value\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{    \textcolor{keywordflow}{do} \{ \(\backslash\)}
\DoxyCodeLine{        *(p)++ = (UWORD)((ULONG)(n) \& (ULONG)WORDMASK); \(\backslash\)}
\DoxyCodeLine{        *(p)++ = (UWORD)(((ULONG)(n) >> BITSINWORD) \& (ULONG)WORDMASK); \(\backslash\)}
\DoxyCodeLine{    \} \textcolor{keywordflow}{while} (0)}

\end{DoxyCode}
Packs a LONG value {\itshape n} to a WORD buffer {\itshape p}. 

Definition at line 135 of file parallel.\+c.

\mbox{\Hypertarget{parallel_8c_aef86a5474b444bbb12c45234b179bfc3}\label{parallel_8c_aef86a5474b444bbb12c45234b179bfc3}} 
\index{parallel.c@{parallel.c}!UNPACK\_LONG@{UNPACK\_LONG}}
\index{UNPACK\_LONG@{UNPACK\_LONG}!parallel.c@{parallel.c}}
\doxysubsubsection{\texorpdfstring{UNPACK\_LONG}{UNPACK\_LONG}}
{\footnotesize\ttfamily \#define UNPACK\+\_\+\+LONG(\begin{DoxyParamCaption}\item[{}]{p,  }\item[{}]{n }\end{DoxyParamCaption})}

{\bfseries Value\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{    \textcolor{keywordflow}{do} \{ \(\backslash\)}
\DoxyCodeLine{        (n) = (LONG)((((ULONG)(p)[1] \& (ULONG)WORDMASK) << BITSINWORD) | ((ULONG)(p)[0] \& (ULONG)WORDMASK)); \(\backslash\)}
\DoxyCodeLine{        (p) += 2; \(\backslash\)}
\DoxyCodeLine{    \} \textcolor{keywordflow}{while} (0)}

\end{DoxyCode}
Unpacks a LONG value {\itshape n} from a WORD buffer {\itshape p}. 

Definition at line 144 of file parallel.\+c.

\mbox{\Hypertarget{parallel_8c_a3e1cfef60e774a81f30eaddf26a3a274}\label{parallel_8c_a3e1cfef60e774a81f30eaddf26a3a274}} 
\index{parallel.c@{parallel.c}!CHECK@{CHECK}}
\index{CHECK@{CHECK}!parallel.c@{parallel.c}}
\doxysubsubsection{\texorpdfstring{CHECK}{CHECK}}
{\footnotesize\ttfamily \#define CHECK(\begin{DoxyParamCaption}\item[{}]{condition }\end{DoxyParamCaption})~\+\_\+\+CHECK(condition, \+\_\+\+\_\+\+FILE\+\_\+\+\_\+, \+\_\+\+\_\+\+LINE\+\_\+\+\_\+)}

A simple check for unrecoverable errors. 

Definition at line 153 of file parallel.\+c.

\mbox{\Hypertarget{parallel_8c_aa94d5803b99ad45b4db05ec3e82f4e47}\label{parallel_8c_aa94d5803b99ad45b4db05ec3e82f4e47}} 
\index{parallel.c@{parallel.c}!\_\_CHECK@{\_\_CHECK}}
\index{\_\_CHECK@{\_\_CHECK}!parallel.c@{parallel.c}}
\doxysubsubsection{\texorpdfstring{\_\_CHECK}{\_\_CHECK}}
{\footnotesize\ttfamily \#define \+\_\+\+\_\+\+CHECK(\begin{DoxyParamCaption}\item[{}]{condition,  }\item[{}]{file,  }\item[{}]{line }\end{DoxyParamCaption})}

{\bfseries Value\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{    \textcolor{keywordflow}{do} \{ \(\backslash\)}
\DoxyCodeLine{        if ( !(condition) ) \{ \(\backslash\)}
\DoxyCodeLine{            Error0(\textcolor{stringliteral}{"{}Fatal error at "{}} file \textcolor{stringliteral}{"{}:"{}} \#line); \(\backslash\)}
\DoxyCodeLine{            Terminate(-\/1); \(\backslash\)}
\DoxyCodeLine{        \} \(\backslash\)}
\DoxyCodeLine{    \} \textcolor{keywordflow}{while} (0)}

\end{DoxyCode}


Definition at line 155 of file parallel.\+c.



\doxysubsection{Typedef Documentation}
\mbox{\Hypertarget{parallel_8c_a162c180c7bd00124c0d907f0931c6ffd}\label{parallel_8c_a162c180c7bd00124c0d907f0931c6ffd}} 
\index{parallel.c@{parallel.c}!NODE@{NODE}}
\index{NODE@{NODE}!parallel.c@{parallel.c}}
\doxysubsubsection{\texorpdfstring{NODE}{NODE}}
{\footnotesize\ttfamily typedef struct \mbox{\hyperlink{structNoDe}{No\+De}} \mbox{\hyperlink{structnode}{NODE}}}

A node for the tree of losers in the final sorting on the master. 

\doxysubsection{Function Documentation}
\mbox{\Hypertarget{parallel_8c_af78eba5ff925b121f72ac06559c621ba}\label{parallel_8c_af78eba5ff925b121f72ac06559c621ba}} 
\index{parallel.c@{parallel.c}!PF\_RealTime@{PF\_RealTime}}
\index{PF\_RealTime@{PF\_RealTime}!parallel.c@{parallel.c}}
\doxysubsubsection{\texorpdfstring{PF\_RealTime()}{PF\_RealTime()}}
{\footnotesize\ttfamily LONG PF\+\_\+\+Real\+Time (\begin{DoxyParamCaption}\item[{int}]{i }\end{DoxyParamCaption})}

Returns the realtime in 1/100 sec. as a LONG.


\begin{DoxyParams}{Parameters}
{\em i} & the timer will be reset if i == 0. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the real elapsed time in 1/100 second. 
\end{DoxyReturn}


Definition at line 101 of file mpi.\+c.

\mbox{\Hypertarget{parallel_8c_aca525e88c2b245234727eb51fad506be}\label{parallel_8c_aca525e88c2b245234727eb51fad506be}} 
\index{parallel.c@{parallel.c}!PF\_LibInit@{PF\_LibInit}}
\index{PF\_LibInit@{PF\_LibInit}!parallel.c@{parallel.c}}
\doxysubsubsection{\texorpdfstring{PF\_LibInit()}{PF\_LibInit()}}
{\footnotesize\ttfamily int PF\+\_\+\+Lib\+Init (\begin{DoxyParamCaption}\item[{int $\ast$}]{argcp,  }\item[{char $\ast$$\ast$$\ast$}]{argvp }\end{DoxyParamCaption})}

Performs all library dependent initializations.


\begin{DoxyParams}{Parameters}
{\em argcp} & pointer to the number of arguments. \\
\hline
{\em argvp} & pointer to the arguments. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 if OK, nonzero on error. 
\end{DoxyReturn}


Definition at line 123 of file mpi.\+c.

\mbox{\Hypertarget{parallel_8c_aa1598f39fceb641ad8d6eadc2bb7dfa3}\label{parallel_8c_aa1598f39fceb641ad8d6eadc2bb7dfa3}} 
\index{parallel.c@{parallel.c}!PF\_LibTerminate@{PF\_LibTerminate}}
\index{PF\_LibTerminate@{PF\_LibTerminate}!parallel.c@{parallel.c}}
\doxysubsubsection{\texorpdfstring{PF\_LibTerminate()}{PF\_LibTerminate()}}
{\footnotesize\ttfamily int PF\+\_\+\+Lib\+Terminate (\begin{DoxyParamCaption}\item[{int}]{error }\end{DoxyParamCaption})}

Exits mpi, when there is an error either indicated or happening, returnvalue is 1, else returnvalue is 0.


\begin{DoxyParams}{Parameters}
{\em error} & an error code. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 if OK, nonzero on error. 
\end{DoxyReturn}


Definition at line 209 of file mpi.\+c.



Referenced by PF\+\_\+\+Terminate().

\mbox{\Hypertarget{parallel_8c_aabf3560a97f9f48bd1cd1e2127545a3e}\label{parallel_8c_aabf3560a97f9f48bd1cd1e2127545a3e}} 
\index{parallel.c@{parallel.c}!PF\_Probe@{PF\_Probe}}
\index{PF\_Probe@{PF\_Probe}!parallel.c@{parallel.c}}
\doxysubsubsection{\texorpdfstring{PF\_Probe()}{PF\_Probe()}}
{\footnotesize\ttfamily int PF\+\_\+\+Probe (\begin{DoxyParamCaption}\item[{int $\ast$}]{src }\end{DoxyParamCaption})}

Probes the next incoming message. If src == PF\+\_\+\+ANY\+\_\+\+SOURCE this operation is blocking, otherwise nonbloking.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em src} & the source process number. In output, the process number of actual found source. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the tag value of the next incoming message if found, 0 if a nonbloking probe (input src != PF\+\_\+\+ANY\+\_\+\+SOURCE) did not find any messages. A negative returned value indicates an error. 
\end{DoxyReturn}


Definition at line 230 of file mpi.\+c.

\mbox{\Hypertarget{parallel_8c_a6dbb2da3705f2af0fbe5593b80f64dde}\label{parallel_8c_a6dbb2da3705f2af0fbe5593b80f64dde}} 
\index{parallel.c@{parallel.c}!PF\_RecvWbuf@{PF\_RecvWbuf}}
\index{PF\_RecvWbuf@{PF\_RecvWbuf}!parallel.c@{parallel.c}}
\doxysubsubsection{\texorpdfstring{PF\_RecvWbuf()}{PF\_RecvWbuf()}}
{\footnotesize\ttfamily int PF\+\_\+\+Recv\+Wbuf (\begin{DoxyParamCaption}\item[{WORD $\ast$}]{b,  }\item[{LONG $\ast$}]{s,  }\item[{int $\ast$}]{src }\end{DoxyParamCaption})}

Blocking receive of a {\ttfamily WORD} buffer.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ out}}  & {\em b} & the buffer to store the received data. \\
\hline
\mbox{\texttt{ in,out}}  & {\em s} & the size of the buffer. The output value is the actual size of the received data. \\
\hline
\mbox{\texttt{ in,out}}  & {\em src} & the source process number. The output value is the process number of actual source. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the received message tag. A negative value indicates an error. 
\end{DoxyReturn}


Definition at line 337 of file mpi.\+c.

\mbox{\Hypertarget{parallel_8c_a95a32e45db30ee18489e08beef4d3546}\label{parallel_8c_a95a32e45db30ee18489e08beef4d3546}} 
\index{parallel.c@{parallel.c}!PF\_IRecvRbuf@{PF\_IRecvRbuf}}
\index{PF\_IRecvRbuf@{PF\_IRecvRbuf}!parallel.c@{parallel.c}}
\doxysubsubsection{\texorpdfstring{PF\_IRecvRbuf()}{PF\_IRecvRbuf()}}
{\footnotesize\ttfamily int PF\+\_\+\+IRecv\+Rbuf (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structPF__BUFFER}{PF\+\_\+\+BUFFER}} $\ast$}]{r,  }\item[{int}]{bn,  }\item[{int}]{from }\end{DoxyParamCaption})}

Posts nonblocking receive for the active receive buffer. The buffer is filled from {\ttfamily full} to {\ttfamily stop}.


\begin{DoxyParams}{Parameters}
{\em r} & the {\ttfamily \mbox{\hyperlink{structPF__BUFFER}{PF\+\_\+\+BUFFER}}} struct for the nonblocking receive. \\
\hline
{\em bn} & the index of the cyclic buffer. \\
\hline
{\em from} & the source process number. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 if OK, nonzero on error. 
\end{DoxyReturn}


Definition at line 366 of file mpi.\+c.

\mbox{\Hypertarget{parallel_8c_a07dbf6fadb59b460d5a6d630024d2473}\label{parallel_8c_a07dbf6fadb59b460d5a6d630024d2473}} 
\index{parallel.c@{parallel.c}!PF\_WaitRbuf@{PF\_WaitRbuf}}
\index{PF\_WaitRbuf@{PF\_WaitRbuf}!parallel.c@{parallel.c}}
\doxysubsubsection{\texorpdfstring{PF\_WaitRbuf()}{PF\_WaitRbuf()}}
{\footnotesize\ttfamily int PF\+\_\+\+Wait\+Rbuf (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structPF__BUFFER}{PF\+\_\+\+BUFFER}} $\ast$}]{r,  }\item[{int}]{bn,  }\item[{LONG $\ast$}]{size }\end{DoxyParamCaption})}

Waits for the buffer {\itshape bn} to finish a pending nonblocking receive. It returns the received tag and in {\ttfamily $\ast$size} the number of field received. If the receive is already finished, just return the flag and size, else wait for it to finish, but also check for other pending receives.


\begin{DoxyParams}[1]{Parameters}
 & {\em r} & the {\ttfamily \mbox{\hyperlink{structPF__BUFFER}{PF\+\_\+\+BUFFER}}} struct for the pending nonblocking receive. \\
\hline
 & {\em bn} & the index of the cyclic buffer. \\
\hline
\mbox{\texttt{ out}}  & {\em size} & the actual size of received data. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the received message tag. A negative value indicates an error. 
\end{DoxyReturn}


Definition at line 400 of file mpi.\+c.

\mbox{\Hypertarget{parallel_8c_aabbfc0cdb02aa09612dfc99650adee24}\label{parallel_8c_aabbfc0cdb02aa09612dfc99650adee24}} 
\index{parallel.c@{parallel.c}!PF\_RawSend@{PF\_RawSend}}
\index{PF\_RawSend@{PF\_RawSend}!parallel.c@{parallel.c}}
\doxysubsubsection{\texorpdfstring{PF\_RawSend()}{PF\_RawSend()}}
{\footnotesize\ttfamily int PF\+\_\+\+Raw\+Send (\begin{DoxyParamCaption}\item[{int}]{dest,  }\item[{void $\ast$}]{buf,  }\item[{LONG}]{l,  }\item[{int}]{tag }\end{DoxyParamCaption})}

Sends {\itshape l} bytes from {\itshape buf} to {\itshape dest}. Returns 0 on success, or -\/1.


\begin{DoxyParams}{Parameters}
{\em dest} & the destination process number. \\
\hline
{\em buf} & the send buffer. \\
\hline
{\em l} & the size of data in the send buffer in bytes. \\
\hline
{\em tag} & the message tag. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 if OK, nonzero on error. 
\end{DoxyReturn}


Definition at line 463 of file mpi.\+c.



Referenced by PF\+\_\+\+Send\+File().

\mbox{\Hypertarget{parallel_8c_a754c5c9e131d45040b31e541e1908b8e}\label{parallel_8c_a754c5c9e131d45040b31e541e1908b8e}} 
\index{parallel.c@{parallel.c}!PF\_RawRecv@{PF\_RawRecv}}
\index{PF\_RawRecv@{PF\_RawRecv}!parallel.c@{parallel.c}}
\doxysubsubsection{\texorpdfstring{PF\_RawRecv()}{PF\_RawRecv()}}
{\footnotesize\ttfamily LONG PF\+\_\+\+Raw\+Recv (\begin{DoxyParamCaption}\item[{int $\ast$}]{src,  }\item[{void $\ast$}]{buf,  }\item[{LONG}]{thesize,  }\item[{int $\ast$}]{tag }\end{DoxyParamCaption})}

Receives not more than {\itshape thesize} bytes from {\itshape src}, returns the actual number of received bytes, or -\/1 on failure.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em src} & the source process number. In output, that of the actual received message. \\
\hline
\mbox{\texttt{ out}}  & {\em buf} & the receive buffer. \\
\hline
 & {\em thesize} & the size of the receive buffer in bytes. \\
\hline
\mbox{\texttt{ out}}  & {\em tag} & the message tag of the actual received message. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the actual sizeof received data in bytes, or -\/1 on failure. 
\end{DoxyReturn}


Definition at line 484 of file mpi.\+c.

\mbox{\Hypertarget{parallel_8c_a8b2e58bede303502d5c8db7f52604336}\label{parallel_8c_a8b2e58bede303502d5c8db7f52604336}} 
\index{parallel.c@{parallel.c}!PF\_RawProbe@{PF\_RawProbe}}
\index{PF\_RawProbe@{PF\_RawProbe}!parallel.c@{parallel.c}}
\doxysubsubsection{\texorpdfstring{PF\_RawProbe()}{PF\_RawProbe()}}
{\footnotesize\ttfamily int PF\+\_\+\+Raw\+Probe (\begin{DoxyParamCaption}\item[{int $\ast$}]{src,  }\item[{int $\ast$}]{tag,  }\item[{int $\ast$}]{bytesize }\end{DoxyParamCaption})}

Probes an incoming message.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em src} & the source process number. In output, that of the actual received message. \\
\hline
\mbox{\texttt{ in,out}}  & {\em tag} & the message tag. In output, that of the actual received message. \\
\hline
\mbox{\texttt{ out}}  & {\em bytesize} & the size of incoming data in bytes. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 if OK, nonzero on error. 
\end{DoxyReturn}


Definition at line 508 of file mpi.\+c.

\mbox{\Hypertarget{parallel_8c_abc56c3ae41cd94a0ee0e1c900c2ee4d3}\label{parallel_8c_abc56c3ae41cd94a0ee0e1c900c2ee4d3}} 
\index{parallel.c@{parallel.c}!PF\_EndSort@{PF\_EndSort}}
\index{PF\_EndSort@{PF\_EndSort}!parallel.c@{parallel.c}}
\doxysubsubsection{\texorpdfstring{PF\_EndSort()}{PF\_EndSort()}}
{\footnotesize\ttfamily int PF\+\_\+\+End\+Sort (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}

Finishes a master sorting with collecting terms from slaves. Called by \mbox{\hyperlink{declare_8h_a541b2f6087dafa3f4c964d1a7dc055f0}{End\+Sort()}}.

If this is not the masterprocess, just initialize the sendbuffers and return 0, else \mbox{\hyperlink{parallel_8c_abc56c3ae41cd94a0ee0e1c900c2ee4d3}{PF\+\_\+\+End\+Sort()}} sends the rest of the terms in the sendbuffer to the next slave and a dummy message to all slaves with tag PF\+\_\+\+ENDSORT\+\_\+\+MSGTAG. Then it receives the sorted terms, sorts them using a recursive \textquotesingle{}tree of losers\textquotesingle{} (PF\+\_\+\+Get\+Loser()) and writes them to the outputfile.

\begin{DoxyReturn}{Returns}
1 if the sorting on the master was done. 0 if \mbox{\hyperlink{declare_8h_a541b2f6087dafa3f4c964d1a7dc055f0}{End\+Sort()}} still must perform a regular sorting becuase it is not at the ground level or not on the master or in the sequential mode or in the In\+Parallel mode. -\/1 if an error occured.
\end{DoxyReturn}
\begin{DoxyRemark}{Remarks}
The slaves will send the sorted terms back to the master in the regular sorting (after the initialization of the send buffer in \mbox{\hyperlink{parallel_8c_abc56c3ae41cd94a0ee0e1c900c2ee4d3}{PF\+\_\+\+End\+Sort()}}). See \mbox{\hyperlink{declare_8h_a44770ed698bf9bf084656622978cccf7}{Put\+Out()}} and \mbox{\hyperlink{declare_8h_aceb7b03b4b4e8ec7c2e0f943545b5000}{Flush\+Out()}}.

This function has been changed such that when it returns 1, AM.\+S0-\/$>$Terms\+Left is set correctly. But AM.\+S0-\/$>$Gen\+Terms is not set\+: it will be set after collecting the statistics from the slaves at the end of \mbox{\hyperlink{parallel_8c_adc0832dd4fa1cb53dd551672884bcec4}{PF\+\_\+\+Processor()}}. (TU 30 Jun 2011) 
\end{DoxyRemark}


Definition at line 864 of file parallel.\+c.

\mbox{\Hypertarget{parallel_8c_a213cab9d163629d08a2681643dda6303}\label{parallel_8c_a213cab9d163629d08a2681643dda6303}} 
\index{parallel.c@{parallel.c}!PF\_Deferred@{PF\_Deferred}}
\index{PF\_Deferred@{PF\_Deferred}!parallel.c@{parallel.c}}
\doxysubsubsection{\texorpdfstring{PF\_Deferred()}{PF\_Deferred()}}
{\footnotesize\ttfamily WORD PF\+\_\+\+Deferred (\begin{DoxyParamCaption}\item[{WORD $\ast$}]{term,  }\item[{WORD}]{level }\end{DoxyParamCaption})}

Replaces \mbox{\hyperlink{declare_8h_aff571680b6ebbaed4fcd87b1bcf8c983}{Deferred()}} on the slaves.


\begin{DoxyParams}{Parameters}
{\em term} & the term that must be multiplied by the contents of the current bracket. \\
\hline
{\em level} & the compiler level. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 if OK, nonzero on error. 
\end{DoxyReturn}


Definition at line 1208 of file parallel.\+c.

\mbox{\Hypertarget{parallel_8c_adc0832dd4fa1cb53dd551672884bcec4}\label{parallel_8c_adc0832dd4fa1cb53dd551672884bcec4}} 
\index{parallel.c@{parallel.c}!PF\_Processor@{PF\_Processor}}
\index{PF\_Processor@{PF\_Processor}!parallel.c@{parallel.c}}
\doxysubsubsection{\texorpdfstring{PF\_Processor()}{PF\_Processor()}}
{\footnotesize\ttfamily int PF\+\_\+\+Processor (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structExPrEsSiOn}{EXPRESSIONS}}}]{e,  }\item[{WORD}]{i,  }\item[{WORD}]{Last\+Expression }\end{DoxyParamCaption})}

Replaces parts of \mbox{\hyperlink{proces_8c_a338d382ea9b88287382c9cfb22707735}{Processor()}} on the masters and slaves. On the master \mbox{\hyperlink{parallel_8c_adc0832dd4fa1cb53dd551672884bcec4}{PF\+\_\+\+Processor()}} is responsible for proper distribution of terms from the input file to the slaves. On the slaves it calls \mbox{\hyperlink{declare_8h_a7852613b76ed504381c6dab10c47714b}{Generator()}} for all the terms that this process gets, but PF\+\_\+\+Get\+Term() gets terms from the master (not directly from infile).


\begin{DoxyParams}{Parameters}
{\em e} & The pointer to the current expression. \\
\hline
{\em i} & The index for the current expression. \\
\hline
{\em Last\+Expression} & The flag indicating whether it is the last expression. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 if OK, nonzero on error. 
\end{DoxyReturn}


Definition at line 1540 of file parallel.\+c.

\mbox{\Hypertarget{parallel_8c_a2a2f2af1cf99b17a32bd8c149e4aaaa7}\label{parallel_8c_a2a2f2af1cf99b17a32bd8c149e4aaaa7}} 
\index{parallel.c@{parallel.c}!PF\_Init@{PF\_Init}}
\index{PF\_Init@{PF\_Init}!parallel.c@{parallel.c}}
\doxysubsubsection{\texorpdfstring{PF\_Init()}{PF\_Init()}}
{\footnotesize\ttfamily int PF\+\_\+\+Init (\begin{DoxyParamCaption}\item[{int $\ast$}]{argc,  }\item[{char $\ast$$\ast$$\ast$}]{argv }\end{DoxyParamCaption})}

All the library independent stuff. \mbox{\hyperlink{parallel_8c_aca525e88c2b245234727eb51fad506be}{PF\+\_\+\+Lib\+Init()}} should do all library dependent initializations.


\begin{DoxyParams}{Parameters}
{\em argc} & pointer to the number of arguments. \\
\hline
{\em argv} & pointer to the arguments. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 if OK, nonzero on error. 
\end{DoxyReturn}


Definition at line 1953 of file parallel.\+c.

\mbox{\Hypertarget{parallel_8c_a9c62cfe2b9d250a2ee224c3c7e6e7b4d}\label{parallel_8c_a9c62cfe2b9d250a2ee224c3c7e6e7b4d}} 
\index{parallel.c@{parallel.c}!PF\_Terminate@{PF\_Terminate}}
\index{PF\_Terminate@{PF\_Terminate}!parallel.c@{parallel.c}}
\doxysubsubsection{\texorpdfstring{PF\_Terminate()}{PF\_Terminate()}}
{\footnotesize\ttfamily int PF\+\_\+\+Terminate (\begin{DoxyParamCaption}\item[{int}]{errorcode }\end{DoxyParamCaption})}

Performs the finalization of Par\+FORM. To be called by Terminate().


\begin{DoxyParams}{Parameters}
{\em error} & an error code. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 if OK, nonzero on error. 
\end{DoxyReturn}


Definition at line 2047 of file parallel.\+c.



References PF\+\_\+\+Lib\+Terminate().

\mbox{\Hypertarget{parallel_8c_a4acf9c6814b057fdc96bd1e9efdd3910}\label{parallel_8c_a4acf9c6814b057fdc96bd1e9efdd3910}} 
\index{parallel.c@{parallel.c}!PF\_GetSlaveTimes@{PF\_GetSlaveTimes}}
\index{PF\_GetSlaveTimes@{PF\_GetSlaveTimes}!parallel.c@{parallel.c}}
\doxysubsubsection{\texorpdfstring{PF\_GetSlaveTimes()}{PF\_GetSlaveTimes()}}
{\footnotesize\ttfamily LONG PF\+\_\+\+Get\+Slave\+Times (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}

Returns the total CPU time of all slaves together. This function must be called on the master and all slaves.

\begin{DoxyReturn}{Returns}
on the master, the sum of CPU times on all slaves. 
\end{DoxyReturn}


Definition at line 2063 of file parallel.\+c.

\mbox{\Hypertarget{parallel_8c_ab17fe2cb9406a9962b7ae46f24c8b6b8}\label{parallel_8c_ab17fe2cb9406a9962b7ae46f24c8b6b8}} 
\index{parallel.c@{parallel.c}!PF\_BroadcastNumber@{PF\_BroadcastNumber}}
\index{PF\_BroadcastNumber@{PF\_BroadcastNumber}!parallel.c@{parallel.c}}
\doxysubsubsection{\texorpdfstring{PF\_BroadcastNumber()}{PF\_BroadcastNumber()}}
{\footnotesize\ttfamily LONG PF\+\_\+\+Broadcast\+Number (\begin{DoxyParamCaption}\item[{LONG}]{x }\end{DoxyParamCaption})}

Broadcasts a LONG value from the master to the all slaves.


\begin{DoxyParams}{Parameters}
{\em x} & the number to be broadcast (set on the master). \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the synchronised result. 
\end{DoxyReturn}


Definition at line 2083 of file parallel.\+c.

\mbox{\Hypertarget{parallel_8c_a706428ee6daa7eb20ffb427c50e76927}\label{parallel_8c_a706428ee6daa7eb20ffb427c50e76927}} 
\index{parallel.c@{parallel.c}!PF\_BroadcastBuffer@{PF\_BroadcastBuffer}}
\index{PF\_BroadcastBuffer@{PF\_BroadcastBuffer}!parallel.c@{parallel.c}}
\doxysubsubsection{\texorpdfstring{PF\_BroadcastBuffer()}{PF\_BroadcastBuffer()}}
{\footnotesize\ttfamily void PF\+\_\+\+Broadcast\+Buffer (\begin{DoxyParamCaption}\item[{WORD $\ast$$\ast$}]{buffer,  }\item[{LONG $\ast$}]{length }\end{DoxyParamCaption})}

Broadcasts a buffer from the master to all the slaves.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em buffer} & on the master, the buffer to be broadcast. On the slaves, the buffer will be allocated if the length is greater than 0. The caller must free it.\\
\hline
\mbox{\texttt{ in,out}}  & {\em length} & on the master, the length of the buffer to be broadcast. On the slaves, it receives the length of transfered buffer. The actual transfer occurs only if the length is greater than 0. \\
\hline
\end{DoxyParams}


Definition at line 2110 of file parallel.\+c.

\mbox{\Hypertarget{parallel_8c_a972f570b9bfd8ab76b113597837e9e38}\label{parallel_8c_a972f570b9bfd8ab76b113597837e9e38}} 
\index{parallel.c@{parallel.c}!PF\_BroadcastString@{PF\_BroadcastString}}
\index{PF\_BroadcastString@{PF\_BroadcastString}!parallel.c@{parallel.c}}
\doxysubsubsection{\texorpdfstring{PF\_BroadcastString()}{PF\_BroadcastString()}}
{\footnotesize\ttfamily int PF\+\_\+\+Broadcast\+String (\begin{DoxyParamCaption}\item[{UBYTE $\ast$}]{str }\end{DoxyParamCaption})}

Broadcasts a string from the master to all slaves.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em str} & The pointer to a null-\/terminated string. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 if OK, nonzero on error. 
\end{DoxyReturn}


Definition at line 2152 of file parallel.\+c.

\mbox{\Hypertarget{parallel_8c_a51acdb267f2a3289d44558f794ff320a}\label{parallel_8c_a51acdb267f2a3289d44558f794ff320a}} 
\index{parallel.c@{parallel.c}!PF\_BroadcastPreDollar@{PF\_BroadcastPreDollar}}
\index{PF\_BroadcastPreDollar@{PF\_BroadcastPreDollar}!parallel.c@{parallel.c}}
\doxysubsubsection{\texorpdfstring{PF\_BroadcastPreDollar()}{PF\_BroadcastPreDollar()}}
{\footnotesize\ttfamily int PF\+\_\+\+Broadcast\+Pre\+Dollar (\begin{DoxyParamCaption}\item[{WORD $\ast$$\ast$}]{dbuffer,  }\item[{LONG $\ast$}]{newsize,  }\item[{int $\ast$}]{numterms }\end{DoxyParamCaption})}

Broadcasts dollar variables set as a preprocessor variables. Only the master is able to make an assignment like \#\$a=g; where g is an expression\+: only the master has an access to the expression. So, the master broadcasts the result to slaves.

The result is in $\ast$dbuffer of the size is $\ast$newsize (in number of WORDs), +1 for trailing zero. For slave newsize and numterms are output parameters.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em dbuffer} & the buffer for a dollar variable. \\
\hline
\mbox{\texttt{ in,out}}  & {\em newsize} & the size of the dollar variable in WORDs. \\
\hline
\mbox{\texttt{ in,out}}  & {\em numterms} & the number of terms in the dollar variable. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 if OK, nonzero on error. 
\end{DoxyReturn}


Definition at line 2207 of file parallel.\+c.

\mbox{\Hypertarget{parallel_8c_a7bb2cc34f85ec08289eb6be4a16d29d1}\label{parallel_8c_a7bb2cc34f85ec08289eb6be4a16d29d1}} 
\index{parallel.c@{parallel.c}!PF\_CollectModifiedDollars@{PF\_CollectModifiedDollars}}
\index{PF\_CollectModifiedDollars@{PF\_CollectModifiedDollars}!parallel.c@{parallel.c}}
\doxysubsubsection{\texorpdfstring{PF\_CollectModifiedDollars()}{PF\_CollectModifiedDollars()}}
{\footnotesize\ttfamily int PF\+\_\+\+Collect\+Modified\+Dollars (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}

Combines modified dollar variables on the all slaves, and store them into those on the master.

The potentially modified dollar variables are given in Pot\+Moddollars, and the number of them is given by Num\+Pot\+Moddollars.

The current module could be executed in parallel only if all potentially modified variables are listed in Mod\+Optdollars, otherwise the module was switched to the sequential mode.

\begin{DoxyReturn}{Returns}
0 if OK, nonzero on error. 
\end{DoxyReturn}


Definition at line 2495 of file parallel.\+c.

\mbox{\Hypertarget{parallel_8c_a5efb548dd947c719005be2da0d79e114}\label{parallel_8c_a5efb548dd947c719005be2da0d79e114}} 
\index{parallel.c@{parallel.c}!PF\_BroadcastModifiedDollars@{PF\_BroadcastModifiedDollars}}
\index{PF\_BroadcastModifiedDollars@{PF\_BroadcastModifiedDollars}!parallel.c@{parallel.c}}
\doxysubsubsection{\texorpdfstring{PF\_BroadcastModifiedDollars()}{PF\_BroadcastModifiedDollars()}}
{\footnotesize\ttfamily int PF\+\_\+\+Broadcast\+Modified\+Dollars (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}

Broadcasts modified dollar variables on the master to the all slaves.

The potentially modified dollar variables are given in Pot\+Moddollars, and the number of them is given by Num\+Pot\+Moddollars.

The current module could be executed in parallel only if all potentially modified variables are listed in Mod\+Optdollars, otherwise the module was switched to the sequential mode. In either cases, we need to broadcast them.

\begin{DoxyReturn}{Returns}
0 if OK, nonzero on error. 
\end{DoxyReturn}


Definition at line 2774 of file parallel.\+c.

\mbox{\Hypertarget{parallel_8c_a27b88f27e555759116cf5bf20931ae2a}\label{parallel_8c_a27b88f27e555759116cf5bf20931ae2a}} 
\index{parallel.c@{parallel.c}!PF\_BroadcastRedefinedPreVars@{PF\_BroadcastRedefinedPreVars}}
\index{PF\_BroadcastRedefinedPreVars@{PF\_BroadcastRedefinedPreVars}!parallel.c@{parallel.c}}
\doxysubsubsection{\texorpdfstring{PF\_BroadcastRedefinedPreVars()}{PF\_BroadcastRedefinedPreVars()}}
{\footnotesize\ttfamily int PF\+\_\+\+Broadcast\+Redefined\+Pre\+Vars (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}

Broadcasts preprocessor variables, which were changed by the Redefine statements in the current module, from the master to the all slaves.

The potentially redefined preprocessor variables are given in AC.\+pfirstnum, and the number of them is given by AC.\+numpfirstnum. For an actually redefined variable, the corresponding value in AC.\+inputnumbers is non-\/negative.

\begin{DoxyReturn}{Returns}
0 if OK, nonzero on error. 
\end{DoxyReturn}


Definition at line 2991 of file parallel.\+c.

\mbox{\Hypertarget{parallel_8c_a6eca5eb317338d7f924c1b30efa3bb04}\label{parallel_8c_a6eca5eb317338d7f924c1b30efa3bb04}} 
\index{parallel.c@{parallel.c}!PF\_BroadcastCBuf@{PF\_BroadcastCBuf}}
\index{PF\_BroadcastCBuf@{PF\_BroadcastCBuf}!parallel.c@{parallel.c}}
\doxysubsubsection{\texorpdfstring{PF\_BroadcastCBuf()}{PF\_BroadcastCBuf()}}
{\footnotesize\ttfamily int PF\+\_\+\+Broadcast\+CBuf (\begin{DoxyParamCaption}\item[{int}]{bufnum }\end{DoxyParamCaption})}

Broadcasts a compiler buffer specified by {\itshape bufnum} from the master to the all slaves.


\begin{DoxyParams}{Parameters}
{\em bufnum} & The index of the compiler buffer to be broadcast. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 if OK, nonzero on error. 
\end{DoxyReturn}


Definition at line 3133 of file parallel.\+c.

\mbox{\Hypertarget{parallel_8c_a4e4d2578b246a72a2b5ae83264e0c1eb}\label{parallel_8c_a4e4d2578b246a72a2b5ae83264e0c1eb}} 
\index{parallel.c@{parallel.c}!PF\_BroadcastExpFlags@{PF\_BroadcastExpFlags}}
\index{PF\_BroadcastExpFlags@{PF\_BroadcastExpFlags}!parallel.c@{parallel.c}}
\doxysubsubsection{\texorpdfstring{PF\_BroadcastExpFlags()}{PF\_BroadcastExpFlags()}}
{\footnotesize\ttfamily int PF\+\_\+\+Broadcast\+Exp\+Flags (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}

Broadcasts AR.\+expflags and several properties of each expression, e.\+g., e-\/$>$vflags, from the master to all slaves.

\begin{DoxyReturn}{Returns}
0 if OK, nonzero on error. 
\end{DoxyReturn}


Definition at line 3244 of file parallel.\+c.

\mbox{\Hypertarget{parallel_8c_aef563d0e7aceb926dc0c91cc38267b79}\label{parallel_8c_aef563d0e7aceb926dc0c91cc38267b79}} 
\index{parallel.c@{parallel.c}!PF\_BroadcastExpr@{PF\_BroadcastExpr}}
\index{PF\_BroadcastExpr@{PF\_BroadcastExpr}!parallel.c@{parallel.c}}
\doxysubsubsection{\texorpdfstring{PF\_BroadcastExpr()}{PF\_BroadcastExpr()}}
{\footnotesize\ttfamily int PF\+\_\+\+Broadcast\+Expr (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structExPrEsSiOn}{EXPRESSIONS}}}]{e,  }\item[{\mbox{\hyperlink{structs_8h_a36b8571cff77310201b5cf441466ba83}{FILEHANDLE}} $\ast$}]{file }\end{DoxyParamCaption})}

Broadcasts an expression from the master to the all slaves.


\begin{DoxyParams}{Parameters}
{\em e} & The expression to be broadcast. \\
\hline
{\em file} & The file in which the expression is sitting. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 if OK, nonzero on error. 
\end{DoxyReturn}


Definition at line 3536 of file parallel.\+c.

\mbox{\Hypertarget{parallel_8c_a32ed894955022778e534493c98a0fc60}\label{parallel_8c_a32ed894955022778e534493c98a0fc60}} 
\index{parallel.c@{parallel.c}!PF\_BroadcastRHS@{PF\_BroadcastRHS}}
\index{PF\_BroadcastRHS@{PF\_BroadcastRHS}!parallel.c@{parallel.c}}
\doxysubsubsection{\texorpdfstring{PF\_BroadcastRHS()}{PF\_BroadcastRHS()}}
{\footnotesize\ttfamily int PF\+\_\+\+Broadcast\+RHS (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}

Broadcasts expressions appearing in the right-\/hand side from the master to the all slaves.

\begin{DoxyReturn}{Returns}
0 if OK, nonzero on error. 
\end{DoxyReturn}


Definition at line 3564 of file parallel.\+c.

\mbox{\Hypertarget{parallel_8c_afd64e52f1ac32149986935def83fcd41}\label{parallel_8c_afd64e52f1ac32149986935def83fcd41}} 
\index{parallel.c@{parallel.c}!PF\_InParallelProcessor@{PF\_InParallelProcessor}}
\index{PF\_InParallelProcessor@{PF\_InParallelProcessor}!parallel.c@{parallel.c}}
\doxysubsubsection{\texorpdfstring{PF\_InParallelProcessor()}{PF\_InParallelProcessor()}}
{\footnotesize\ttfamily int PF\+\_\+\+In\+Parallel\+Processor (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}

Processes expressions in the In\+Parallel mode, i.\+e., dividing expressions marked by partodo over the slaves.

\begin{DoxyReturn}{Returns}
0 if OK, nonzero on error. 
\end{DoxyReturn}


Definition at line 3611 of file parallel.\+c.

\mbox{\Hypertarget{parallel_8c_ad446f03e95a7832b57ee69d5d4f7e079}\label{parallel_8c_ad446f03e95a7832b57ee69d5d4f7e079}} 
\index{parallel.c@{parallel.c}!PF\_SendFile@{PF\_SendFile}}
\index{PF\_SendFile@{PF\_SendFile}!parallel.c@{parallel.c}}
\doxysubsubsection{\texorpdfstring{PF\_SendFile()}{PF\_SendFile()}}
{\footnotesize\ttfamily int PF\+\_\+\+Send\+File (\begin{DoxyParamCaption}\item[{int}]{to,  }\item[{FILE $\ast$}]{fd }\end{DoxyParamCaption})}

Sends a file to the process specified by {\itshape to}.


\begin{DoxyParams}{Parameters}
{\em to} & the destination process number. \\
\hline
{\em fd} & the file to be sent. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the size of sent data in bytes, or -\/1 on error. 
\end{DoxyReturn}


Definition at line 4207 of file parallel.\+c.



References PF\+\_\+\+Raw\+Send().

\mbox{\Hypertarget{parallel_8c_a9431f495c0a0264e23c118bd7c9c815a}\label{parallel_8c_a9431f495c0a0264e23c118bd7c9c815a}} 
\index{parallel.c@{parallel.c}!PF\_RecvFile@{PF\_RecvFile}}
\index{PF\_RecvFile@{PF\_RecvFile}!parallel.c@{parallel.c}}
\doxysubsubsection{\texorpdfstring{PF\_RecvFile()}{PF\_RecvFile()}}
{\footnotesize\ttfamily int PF\+\_\+\+Recv\+File (\begin{DoxyParamCaption}\item[{int}]{from,  }\item[{FILE $\ast$}]{fd }\end{DoxyParamCaption})}

Receives a file from the process specified by {\itshape from}.


\begin{DoxyParams}{Parameters}
{\em from} & the source process number. \\
\hline
{\em fd} & the file to save the received data. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the size of received data in bytes, or -\/1 on error. 
\end{DoxyReturn}


Definition at line 4245 of file parallel.\+c.

\mbox{\Hypertarget{parallel_8c_ad3e04b83427086402644920543c2859e}\label{parallel_8c_ad3e04b83427086402644920543c2859e}} 
\index{parallel.c@{parallel.c}!PF\_MLock@{PF\_MLock}}
\index{PF\_MLock@{PF\_MLock}!parallel.c@{parallel.c}}
\doxysubsubsection{\texorpdfstring{PF\_MLock()}{PF\_MLock()}}
{\footnotesize\ttfamily void PF\+\_\+\+MLock (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}

A function called by MLOCK(\+Error\+Message\+Lock) for slaves. 

Definition at line 4326 of file parallel.\+c.

\mbox{\Hypertarget{parallel_8c_a14f85f4f370b1b4aa22c7b959af56de5}\label{parallel_8c_a14f85f4f370b1b4aa22c7b959af56de5}} 
\index{parallel.c@{parallel.c}!PF\_MUnlock@{PF\_MUnlock}}
\index{PF\_MUnlock@{PF\_MUnlock}!parallel.c@{parallel.c}}
\doxysubsubsection{\texorpdfstring{PF\_MUnlock()}{PF\_MUnlock()}}
{\footnotesize\ttfamily void PF\+\_\+\+MUnlock (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}

A function called by MUNLOCK(\+Error\+Message\+Lock) for slaves. 

Definition at line 4342 of file parallel.\+c.

\mbox{\Hypertarget{parallel_8c_a85e0701bc8cec0f013d92ba664fe4961}\label{parallel_8c_a85e0701bc8cec0f013d92ba664fe4961}} 
\index{parallel.c@{parallel.c}!PF\_WriteFileToFile@{PF\_WriteFileToFile}}
\index{PF\_WriteFileToFile@{PF\_WriteFileToFile}!parallel.c@{parallel.c}}
\doxysubsubsection{\texorpdfstring{PF\_WriteFileToFile()}{PF\_WriteFileToFile()}}
{\footnotesize\ttfamily LONG PF\+\_\+\+Write\+File\+To\+File (\begin{DoxyParamCaption}\item[{int}]{handle,  }\item[{UBYTE $\ast$}]{buffer,  }\item[{LONG}]{size }\end{DoxyParamCaption})}

Replaces Write\+File\+To\+File() on the master and slaves.

It copies the given buffer into internal buffers if called between MLOCK(\+Error\+Message\+Lock) and MUNLOCK(\+Error\+Message\+Lock) for slaves and handle is Std\+Out or Log\+Handle, otherwise calls Write\+File\+To\+File().


\begin{DoxyParams}{Parameters}
{\em handle} & a file handle that specifies the output. \\
\hline
{\em buffer} & a pointer to the source buffer containing the data to be written. \\
\hline
{\em size} & the size of data to be written in bytes. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the actual size of data written to the output in bytes. 
\end{DoxyReturn}


Definition at line 4371 of file parallel.\+c.

\mbox{\Hypertarget{parallel_8c_aaa6f2290ae527132b557e572636a7a20}\label{parallel_8c_aaa6f2290ae527132b557e572636a7a20}} 
\index{parallel.c@{parallel.c}!PF\_FlushStdOutBuffer@{PF\_FlushStdOutBuffer}}
\index{PF\_FlushStdOutBuffer@{PF\_FlushStdOutBuffer}!parallel.c@{parallel.c}}
\doxysubsubsection{\texorpdfstring{PF\_FlushStdOutBuffer()}{PF\_FlushStdOutBuffer()}}
{\footnotesize\ttfamily void PF\+\_\+\+Flush\+Std\+Out\+Buffer (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}

Explicitly Flushes the buffer for the standard output on the master, which is used if PF\+\_\+\+ENABLE\+\_\+\+STDOUT\+\_\+\+BUFFERING is defined. 

Definition at line 4465 of file parallel.\+c.

\mbox{\Hypertarget{parallel_8c_a1f637c1ac8418b44621249070e9c8c6b}\label{parallel_8c_a1f637c1ac8418b44621249070e9c8c6b}} 
\index{parallel.c@{parallel.c}!PF\_FreeErrorMessageBuffers@{PF\_FreeErrorMessageBuffers}}
\index{PF\_FreeErrorMessageBuffers@{PF\_FreeErrorMessageBuffers}!parallel.c@{parallel.c}}
\doxysubsubsection{\texorpdfstring{PF\_FreeErrorMessageBuffers()}{PF\_FreeErrorMessageBuffers()}}
{\footnotesize\ttfamily void PF\+\_\+\+Free\+Error\+Message\+Buffers (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}

Frees the buffers allocated for the synchronized output.

Currently, not used anywhere, but could be used in \mbox{\hyperlink{parallel_8c_a9c62cfe2b9d250a2ee224c3c7e6e7b4d}{PF\+\_\+\+Terminate()}}. 

Definition at line 4601 of file parallel.\+c.



References Vector\+Free.

