From: Arnaud Giersch Date: Thu, 13 Mar 2014 13:07:01 +0000 (+0100) Subject: Improve typesetting of equations. X-Git-Tag: ispa14_submission~50 X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/mpi-energy.git/commitdiff_plain/d8a273b8e73d09a77669ac723652f4d51e856e0f?ds=sidebyside Improve typesetting of equations. --- diff --git a/paper.tex b/paper.tex index 2ec1b17..efe0e3e 100644 --- a/paper.tex +++ b/paper.tex @@ -9,6 +9,7 @@ \usepackage{subfig} \usepackage{listings} \usepackage{colortbl} +\usepackage{amsmath} % \usepackage{sectsty} % \usepackage{titlesec} % \usepackage{secdot} @@ -148,8 +149,9 @@ amounts of data on each processor as an example see figure~(\ref{fig:h2}). In this case the fastest tasks have to wait at the synchronous barrier for the slowest tasks to finish their job. In both two cases the overall execution time of the program is the execution time of the slowest task as : -\begin{equation} \label{eq:T1} - Program Time=MAX_{i=1,2,..,N} (T_i) \hfill +\begin{equation} + \label{eq:T1} + \textit{Program Time} = \max_{i=1,2,\dots,N} T_i \end{equation} where $T_i$ is the execution time of process $i$. @@ -160,21 +162,24 @@ dynamic and the static power. This general power formulation is used by many researchers see ~\cite{9,3,15,26}. The dynamic power of the CMOS processors $P_{dyn}$ is related to the switching activity $\alpha$, load capacitance $C_L$, the supply voltage $V$ and operational frequency $f$ respectively as follow : -\begin{equation} \label{eq:pd} - \displaystyle P_{dyn} = \alpha . C_L . V^2 . f +\begin{equation} + \label{eq:pd} + P_{dyn} = \alpha \cdot C_L \cdot V^2 \cdot f \end{equation} The static power $P_{static}$ captures the leakage power consumption as well as the power consumption of peripheral devices like the I/O subsystem. -\begin{equation} \label{eq:ps} - \displaystyle P_{static} = V . N . K_{design} . I_{leak} +\begin{equation} + \label{eq:ps} + P_{static} = V \cdot N \cdot K_{design} \cdot I_{leak} \end{equation} where V is the supply voltage, N is the number of transistors, $K_{design}$ is a design dependent parameter and $I_{leak}$ is a technology-dependent parameter. Energy consumed by an individual processor $E_{ind}$ is the summation of the dynamic and the static power multiply by the execution time for example see~\cite{36,15} . -\begin{equation} \label{eq:eind} - \displaystyle E_{ind} = (P_{dyn} + P_{static} ) . T +\begin{equation} + \label{eq:eind} + E_{ind} = ( P_{dyn} + P_{static} ) \cdot T \end{equation} The dynamic voltage and frequency scaling (DVFS) is a process that allowed in modern processors to reduce the dynamic power by scaling down the voltage and @@ -185,8 +190,9 @@ equation is used to study the change of the dynamic voltage with respect to various frequency values in~\cite{3}. The reduction process of the frequency are expressed by scaling factor \emph S. The scale \emph S is the ratio between the maximum and the new frequency as in EQ~(\ref{eq:s}). -\begin{equation} \label{eq:s} - S=\:\frac{F_{max}}{F_{new}} \hfill \newline +\begin{equation} + \label{eq:s} + S = \frac{F_{max}}{F_{new}} \end{equation} The value of the scale \emph S is grater than 1 when changing the frequency to any new frequency value(\emph {P-state}) in governor. It is equal to 1 when the @@ -199,8 +205,11 @@ for any number of concurrent tasks develops by Rauber~\cite{3}. This model consider the two powers metric for measuring the energy of the parallel tasks as in EQ~(\ref{eq:energy}). -\begin{equation} \label{eq:energy} - E= \displaystyle \;P_{dyn}\,.\,S_1^{-2}\;.\,(T_1+\sum\limits_{i=2}^{N}\frac{T_i^3}{T_1^2})+\;P_{static}\,.\,T_1\,.\,S_1\;\,.\,N +\begin{equation} + \label{eq:energy} + E = P_{dyn} \cdot S_1^{-2} \cdot + \left( T_1 + \sum_{i=2}^{N} \frac{T_i^3}{T_1^2} \right) + + P_{static} \cdot T_1 \cdot S_1 \cdot N \hfill \end{equation} Where \emph N is the number of parallel nodes, $T_1 $ is the time of the slower @@ -208,11 +217,14 @@ task, $T_i$ is the time of the task $i$ and $S_1$ is the maximum scaling factor for the slower task. The scaling factor $S_1$, as in EQ~(\ref{eq:s1}), selects from the set of scales values $S_i$. Each of these scales are proportional to the time value $T_i$ depends on the new frequency value as in EQ~(\ref{eq:si}). -\begin{equation} \label{eq:s1} - S_1=MAX_{i=1,2,..,F} (S_i) \hfill +\begin{equation} + \label{eq:s1} + S_1 = \max_{i=1,2,\dots,F} S_i \end{equation} -\begin{equation} \label{eq:si} - S_i=\:S\: .\:(\frac{T_1}{T_i})=\: (\frac{F_{max}}{F_{new}}).(\frac{T_1}{T_i}) \hfill +\begin{equation} + \label{eq:si} + S_i = S \cdot \frac{T_1}{T_i} + = \frac{F_{max}}{F_{new}} \cdot \frac{T_1}{T_i} \end{equation} Where $F$ is the number of available frequencies. In this paper we depend on Rauber's energy model EQ~(\ref{eq:energy}) for two reasons : 1-this model used @@ -221,10 +233,11 @@ algorithm with Rauber's scaling model. Rauber's optimal scaling factor for optimal energy reduction derived from the EQ~(\ref{eq:energy}). He takes the derivation for this equation (to be minimized) and set it to zero to produce the scaling factor as in EQ~(\ref{eq:sopt}). -\begin{equation} \label{eq:sopt} - S_{opt}= {\sqrt [3~]{\frac{2}{n} \frac{P_{dyn}}{P_{static}} \Big(1+\sum\limits_{i=2}^{N}\frac{T_i^3}{T_1^3}\Big) }} \hfill +\begin{equation} + \label{eq:sopt} + S_{opt} = \sqrt[3]{\frac{2}{n} \cdot \frac{P_{dyn}}{P_{static}} \cdot + \left( 1 + \sum_{i=2}^{N} \frac{T_i^3}{T_1^3} \right) } \end{equation} -%[\Big 3] \section{Performance Evaluation of MPI Programs} @@ -252,9 +265,9 @@ must be precisely specifying communication time and the computation time for the slower task. Secondly, we use these times for predicting the execution time for any MPI program as a function of the new scaling factor as in the EQ~(\ref{eq:tnew}). -\begin{equation} \label{eq:tnew} - \displaystyle T_{new}= T_{Max \:Comp \:Old} \; . \:S \;+ \;T_{Max\: Comm\: Old} - \hfill +\begin{equation} + \label{eq:tnew} + T_{new} = T_{\textit{Max Comp Old}} \cdot S + T_{\textit{Max Comm Old}} \end{equation} The above equation shows that the scaling factor \emph S has linear relation with the computation time without affecting the communication time. The @@ -306,12 +319,21 @@ is not straightforward. Moreover, they are not measured using the same metric. For solving this problem, we normalize the energy by calculating the ratio between the consumed energy with scaled frequency and the consumed energy without scaled frequency : -\begin{equation} \label{eq:enorm} - E_{Norm}=\displaystyle\frac{E_{Reduced}}{E_{Orginal}}= \frac{\displaystyle \;P_{dyn}\,.\,S_i^{-2}\,.\,(T_1+\sum\limits_{i=2}^{N}\frac{T_i^3}{T_1^2})+\;P_{static}\,.\,T_1\,.\,S_i\;\,.\,N }{\displaystyle \;P_{dyn}\,.\,(T_1+\sum\limits_{i=2}^{N}\frac{T_i^3}{T_1^2})+\;P_{static}\,.\,T_1\,\,.\,N } +\begin{equation} + \label{eq:enorm} + E_{Norm} = \frac{E_{Reduced}}{E_{Orginal}} + = \frac{ P_{dyn} \cdot S_i^{-2} \cdot + \left( T_1 + \sum_{i=2}^{N}\frac{T_i^3}{T_1^2}\right) + + P_{static} \cdot T_1 \cdot S_i \cdot N }{ + P_{dyn} \cdot \left(T_1+\sum_{i=2}^{N}\frac{T_i^3}{T_1^2}\right) + + P_{static} \cdot T_1\, \cdot N } \end{equation} By the same way we can normalize the performance as follows : -\begin{equation} \label{eq:pnorm} - P_{Norm}=\displaystyle \frac{T_{New}}{T_{Old}}=\frac{T_{Max \:Comp \:Old} \;. \:S \;+ \;T_{Max\: Comm\: Old}}{T_{Old}} \;\; +\begin{equation} + \label{eq:pnorm} + P_{Norm} = \frac{T_{New}}{T_{Old}} + = \frac{T_{\textit{Max Comp Old}} \cdot S + + T_{\textit{Max Comm Old}}}{T_{Old}} \end{equation} The second problem is the optimization operation for both energy and performance is not in the same direction. In other words, the normalized energy and the @@ -328,8 +350,11 @@ optimize both energy and performance simultaneously without adding big overheads. Our solution for this problem is to make the optimization process have the same direction. Therefore, we inverse the equation of normalize performance as follows : -\begin{equation} \label{eq:pnorm_en} - \displaystyle P^{-1}_{Norm}= \frac{T_{Old}}{T_{New}}=\frac{T_{Old}}{T_{Max \:Comp \:Old} \;. \:S \;+ \;T_{Max\: Comm\: Old}} +\begin{equation} + \label{eq:pnorm_en} + P^{-1}_{Norm} = \frac{T_{Old}}{T_{New}} + = \frac{T_{Old}}{T_{\textit{Max Comp Old}} \cdot S + + T_{\textit{Max Comm Old}}} \end{equation} \begin{figure} \centering @@ -344,8 +369,10 @@ curve EQ~(\ref{eq:pnorm_en}) over all available scaling factors. This represent the minimum energy consumption with minimum execution time (better performance) in the same time, see figure~(\ref{fig:r1}). Then our objective function has the following form: -\begin{equation} \label{eq:max} - \displaystyle MaxDist = Max \;(\;\overbrace{P^{-1}_{Norm}}^{Maximize}\; -\; \overbrace{E_{Norm}}^{Minimize} \;) +\begin{equation} + \label{eq:max} + \textit{MaxDist} = \max (\overbrace{P^{-1}_{Norm}}^{\text{Maximize}} - + \overbrace{E_{Norm}}^{\text{Minimize}} ) \end{equation} Then we can select the optimal scaling factor that satisfy the EQ~(\ref{eq:max}). Our objective function can works with any energy model or @@ -377,11 +404,10 @@ scaling factor for both energy and performance at the same time. \State - Calculate all available scales $S_i$ depend on $S$ as in EQ~(\ref{eq:si}). \State - Select the maximum scale factor $S_1$ from the set of scales $S_i$. \State - Calculate the normalize energy $E_{Norm}=E_{R}/E_{O}$ as in EQ~(\ref{eq:enorm}). - \State - Calculate the normalize inverse of performance $P_{NormInv}=T_{old}/T_{new}$ - - as in EQ~(\ref{eq:pnorm_en}). - \If{ $(P_{NormInv}-E_{Norm}$ $>$ $Dist$) } - \State $S_{optimal}=S$ + \State - Calculate the normalize inverse of performance\par + $P_{NormInv}=T_{old}/T_{new}$ as in EQ~(\ref{eq:pnorm_en}). + \If{ $(P_{NormInv}-E_{Norm} > Dist$) } + \State $S_{optimal} = S$ \State $Dist = P_{NormInv} - E_{Norm}$ \EndIf \EndFor @@ -418,8 +444,9 @@ After obtaining the optimal scale factor from the EPSA algorithm. The program calculates the new frequency $F_i$ for each task proportionally to its time value $T_i$. By substitution of the EQ~(\ref{eq:s}) in the EQ~(\ref{eq:si}), we can calculate the new frequency $F_i$ as follows : -\begin{equation} \label{eq:fi} - F_i=\frac{F_{max} \; . \;T_i}{S_{optimal} \; . \;T_{max}} \hfill +\begin{equation} + \label{eq:fi} + F_i = \frac{F_{max} \cdot T_i}{S_{optimal} \cdot T_{max}} \end{equation} According to this equation all the nodes may have the same frequency value if they have balanced workloads. Otherwise, they take different frequencies when