-\linespread{1.2} The proposed EPSA algorithm works online during the execution
-time of the MPI program. It selects the optimal scaling factor by gathering some
-information from the program after one iteration. This algorithm has small
-execution time (between 0.00152 $ms$ for 4 nodes to 0.00665 $ms$ for 32
-nodes). The data required by this algorithm is the computation time and the
-communication time for each task from the first iteration only. When these times
-are measured, the MPI program calls the EPSA algorithm to choose the new
-frequency using the optimal scaling factor. Then the program set the new
-frequency to the system. The algorithm is called just one time during the
-execution of the program. The following example shows where and when the EPSA
-algorithm is called in the MPI program : \clearpage
-\begin{lstlisting}
-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}
+The proposed EPSA algorithm works online during the execution time of the MPI
+program. It selects the optimal scaling factor by gathering some information
+from the program after one iteration. This algorithm has small execution time
+(between 0.00152 $ms$ for 4 nodes to 0.00665 $ms$ for 32 nodes). The data
+required by this algorithm is the computation time and the communication time
+for each task from the first iteration only. When these times are measured, the
+MPI program calls the EPSA algorithm to choose the new frequency using the
+optimal scaling factor. Then the program set the new frequency to the
+system. The algorithm is called just one time during the execution of the
+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 communication from\par 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}
+