-program. The following example shows where and when the EPSA algorithm is called
-in the MPI program :
-\begin{minipage}{\textwidth}
-\AG{Use the same format as for Algorithm~\ref{EPSA}}
-\begin{lstlisting}[frame=tb]
-FOR J:=1 to Some_iterations Do
- -Computations Section.
- -Communications Section.
- IF (J==1) THEN
- -Gather all times of computation and communication
- from each node.
- -Call EPSA with these times.
- -Calculate the new frequency from optimal scale.
- -Set the new frequency to the system.
- ENDIF
-ENDFOR
-\end{lstlisting}
-\end{minipage}
+program. The DVFS algorithm~(\ref{dvfs}) shows where and when the EPSA algorithm is called
+in the MPI program.
+%\begin{minipage}{\textwidth}
+%\AG{Use the same format as for Algorithm~\ref{EPSA}}
+
+\begin{algorithm}[tp]
+ \caption{DVFS}
+ \label{dvfs}
+ \begin{algorithmic}
+ \For {$J:=1$ to $Some-Iterations \; $}
+ \State -Computations Section.
+ \State -Communications Section.
+ \If {$(J==1)$}
+ \State -Gather all times of computation and\par
+ \State communication from each node.
+ \State -Call EPSA with these times.
+ \State -Calculate the new frequency from optimal scale.
+ \State -Set the new frequency to the system.
+ \EndIf
+\EndFor
+\end{algorithmic}
+\end{algorithm}
+