 \documentclass{beamer}
\usepackage{beamerthemefemto}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\DeclareGraphicsExtensions{.jpg, .png , .pdf, .bmp, .pdftex}
\usepackage{algorithm,algorithmicx,algpseudocode}
\usepackage{graphicx,graphics}
\usepackage{subfig}
\usepackage{listings}
\usepackage{colortbl}
\usepackage{amsmath}
\usepackage{xspace}
 \usepackage{movie15}
 \usepackage{animate}
\usepackage{xmpmulti} 
 \newcommand{\AG}[2][inline]{%
  \todo[color=green!50,#1]{\sffamily\textbf{AG:} #2}\xspace}
\newcommand{\JC}[2][inline]{%
  \todo[color=red!10,#1]{\sffamily\textbf{JC:} #2}\xspace}
\definecolor{myblue}{RGB}{0,29,119}
\newcommand{\Xsub}[2]{{\ensuremath{#1_\mathit{#2}}}}

%% used to put some subscripts lower, and make them more legible
\newcommand{\fxheight}[1]{\ifx#1\relax\relax\else\rule{0pt}{1.52ex}#1\fi}

\newcommand{\CL}{\Xsub{C}{L}}
\newcommand{\Dist}{\mathit{Dist}}
\newcommand{\EdNew}{\Xsub{E}{dNew}}
\newcommand{\Eind}{\Xsub{E}{ind}}
\newcommand{\Enorm}{\Xsub{E}{Norm}}
\newcommand{\Eoriginal}{\Xsub{E}{Original}}
\newcommand{\Ereduced}{\Xsub{E}{Reduced}}
\newcommand{\Es}{\Xsub{E}{S}}
\newcommand{\Fdiff}[1][]{\Xsub{F}{diff}_{\!#1}}
\newcommand{\Fmax}[1][]{\Xsub{F}{max}_{\fxheight{#1}}}
\newcommand{\Fnew}{\Xsub{F}{new}}
\newcommand{\Vnew}{\Xsub{V}{new}}
\newcommand{\Vmax}{\Xsub{V}{max}}
\newcommand{\Ileak}{\Xsub{I}{leak}}
\newcommand{\Kdesign}{\Xsub{K}{design}}
\newcommand{\MaxDist}{\mathit{Max}\Dist}
\newcommand{\MinTcm}{\mathit{Min}\Tcm}
\newcommand{\Ntrans}{\Xsub{N}{trans}}
\newcommand{\Pd}[1][]{\Xsub{P}{d}_{\fxheight{#1}}}
\newcommand{\PdNew}{\Xsub{P}{dNew}}

\newcommand{\PdOld}{\Xsub{P}{dOld}}
\newcommand{\Pnorm}{\Xsub{P}{Norm}}
\newcommand{\Tnorm}{\Xsub{T}{Norm}}
\newcommand{\Ps}[1][]{\Xsub{P}{s}_{\fxheight{#1}}}
\newcommand{\Scp}[1][]{\Xsub{S}{cp}_{#1}}
\newcommand{\Sopt}[1][]{\Xsub{S}{opt}_{#1}}
\newcommand{\Tcm}[1][]{\Xsub{T}{cm}_{\fxheight{#1}}}
\newcommand{\Tcp}[1][]{\Xsub{T}{cp}_{#1}}
\newcommand{\TcpOld}[1][]{\Xsub{T}{cpOld}_{#1}}
\newcommand{\Tnew}{\Xsub{T}{New}}
\newcommand{\Told}{\Xsub{T}{Old}}
\newcommand{\Ltcm}[1][]{\Xsub{L}{tcm}_{\fxheight{#1}}}
\newcommand{\Etcm}[1][]{\Xsub{E}{tcm}_{\fxheight{#1}}}
\newcommand{\Niter}[1][]{\Xsub{N}{iter}_{\fxheight{#1}}}
\newcommand{\Pmax}[1][]{\Xsub{P}{max}_{\fxheight{#1}}}
\newcommand{\Pidle}[1][]{\Xsub{P}{idle}_{\fxheight{#1}}}
 \usepackage{pifont}
\usepackage{xcolor}
\definecolor{myblue}{RGB}{0,29,119}
\usepackage[textsize=footnotesize]{todonotes}
\newcommand{\bsquare}{\item[\color{myblue}\ding{110}]} 
\newcommand{\barrow}{\item[\color{myblue}\ding{228}]}
\newcommand{\bwarrow}{\item[\color{myblue}\ding{227}]}
\DeclareGraphicsExtensions{.jpg, .png , .pdf, .bmp, .pdftex}



%\title{Energy Consumption Optimization of Parallel Applications with
%Iterations using CPU Frequency Scaling} 
\vspace{2cm}

\title{   \textbf{Energy Consumption Optimization of   Parallel Applications with Iterations   using CPU Frequency Scaling} \\ \vspace{0.2cm} \hspace{1.8cm}\textbf{\textcolor{cyan}{\small PhD Dissertation Defense}}}\vspace{-1cm}
\author{ \textbf{Ahmed Badri Muslim Fanfakh} \\ \vspace{0.5cm}\small Under Supervision: \textcolor{cyan}{\small  Raphaël COUTURIER and Jean-Claude CHARR} \\\vspace{0.1cm} \textcolor{blue}{ University of Franche-Comté - FEMTO-ST - DISC Dept.  - AND Team} \\ ~~~~~~~~~~~~~~~~~~~~~ \textbf{\textcolor{blue}{ 17 October 2016 }}} 

\date{}
\vspace{-3cm}
%  ____  _____ ____  _   _ _____ 
% |  _ \| ____| __ )| | | |_   _|
% | | | |  _| |  _ \| | | | | |  
% | |_| | |___| |_) | |_| | | |  
% |____/|_____|____/ \___/  |_|  
% 
\begin{document}
\setbeamertemplate{background}{\titrefemto}

%%%%%%%%%%%%%%%%%%%%
%%    SLIDE 01    %%
%%%%%%%%%%%%%%%%%%%% 
\begin{frame}[plain]
\vspace{1cm}
\centering
   \titlepage
\end{frame}


%%%%%%%%%%%%%%%%%%%%
%%    SLIDE 02    %%
%%%%%%%%%%%%%%%%%%%% 
\setbeamertemplate{background}{\pagefemto}
\begin{frame}{Outline}

\setbeamertemplate{section in toc}[sections numbered] 
\tableofcontents
\end{frame}


%%%%%%%%%%%%%%%%%%%%
%%    SLIDE 03    %%
%%%%%%%%%%%%%%%%%%%% 
\begin{frame}{Introduction and problem definition}
 \section{\small {Introduction and Problem definition}}
   \bf \textcolor{blue}{Approaches to increase the computing power:}
     \begin{minipage}{0.5\textwidth} 
      \textcolor{blue}{1)} \small  \bf \textcolor{black}{Increasing the frequency of processor}
    \end{minipage}%
    \begin{minipage}{0.6\textwidth} 
    
\begin{figure}[h!]
        
    \includegraphics[width=0.7\textwidth]{fig/freq-years} 
    \end{figure}
    \end{minipage}%
    \vspace{0.2cm}
    \begin{minipage}{0.5\textwidth} 
     \textcolor{blue}{2)} \small \bf \textcolor{black}{Increasing the number of nodes}        
    \end{minipage}%
    \begin{minipage}{0.6\textwidth} 
    \begin{figure}[h!]
     \includegraphics[width=0.7\textwidth]{fig/clusters} 
    \end{figure}
    \end{minipage}%
 \end{frame}
 
 
 
%%%%%%%%%%%%%%%%%%%%
%%    SLIDE 04    %%
%%%%%%%%%%%%%%%%%%%% 
\begin{frame}{Introduction and problem definition}
 \bf \textcolor{blue}{Processor frequency and its energy consumption}
 \vspace{0.4cm}
   \begin{minipage}{0.5\textwidth} 
   \textcolor{blue}{$\blacktriangleright$} 
  \small  \bf \textcolor{black}{ The power consumption of a processor increases exponentially  when its    
      frequency is increased}
    \end{minipage}%
    \begin{minipage}{0.5\textwidth} 
    \begin{figure}[h!]
     \includegraphics[width=0.7\textwidth]{fig/freq-power} 
    \end{figure}
    \end{minipage}%
       
    \begin{minipage}{0.5\textwidth} 
     \textcolor{blue}{$\blacktriangleright$} 
     \small \bf \textcolor{black}{The biggest power consumption is consumed by a processor in the computing node}
      
    \end{minipage}%
    \begin{minipage}{0.6\textwidth} 
    \begin{figure}[h!]
     \includegraphics[width=0.9\textwidth]{fig/node-power} 
    \end{figure}
    \end{minipage}%
    
 \end{frame}
 
 %%%%%%%%%%%%%%%%%%%
%%    SLIDE 05   %%
%%%%%%%%%%%%%%%%%%%% 
\begin{frame}{Introduction and problem definition}
 \vspace{0.1cm}
 \bf \textcolor{blue}{Techniques for energy consumption reduction}
 
     \textcolor{blue}{1)} \bf \textcolor{black}{Switch-off idle nodes method}  
    \vspace{-0.9cm}
    \begin{figure}
     \animategraphics[autopause,loop,controls,scale=0.25,buttonsize=0.2cm]{200}{on-off/a-}{0}{69}
    \end{figure}
 \end{frame}

%%%%%%%%%%%%%%%%%%%%
%%    SLIDE 06    %%
%%%%%%%%%%%%%%%%%%%% 
\begin{frame}{Techniques for energy consumption reduction}
 
  \textcolor{blue}{2)} \bf \textcolor{black}{Dynamic voltage and frequency Scaling (DVFS)}
     \vspace{-0.5cm}
    \begin{figure}
     \animategraphics[autopause,controls,scale=0.25,buttonsize=0.2cm]{10}{DVFS-meq/a-}{0}{109}
    \end{figure}
    \end{frame}
 


%%%%%%%%%%%%%%%%%%%%
%%    SLIDE 07    %%
%%%%%%%%%%%%%%%%%%%% 
\begin{frame}{Using the energy reduction method}
\section{\small {Using the energy reduction method}}
\begin{block}{\textcolor{white}{Why we used DVFS method:}}
\begin{itemize}
  		\item \textcolor{black}{It used to reduce the energy while keeping all node working, thus  it is more conventional with parallel computing.}
  		\item \textcolor{black}{It has a very small overhead compared to switch-off idle nodes method.}
 	 \end{itemize}
\end{block}

 \vspace{0.1cm}
 \begin{block}{\textcolor{white}{Challenge and Objective}}

  		\textcolor{blue}{Challenge:} \textcolor{black}{DVFS is used to reduce the energy, \textcolor{blue}{but} it degrades the performance simultaneously.}
  		
  		\vspace{0.1cm}
 	 \textcolor{blue}{Objective:} \textcolor{black}{Optimizing both energy consumption and performance of a parallel application at the same time when DVFS is used.}
\end{block}

    \end{frame}



%%%%%%%%%%%%%%%%%%%%
%%    SLIDE 08    %%
%%%%%%%%%%%%%%%%%%%% 


\begin{frame}{Contributions}
\section{\small {Contributions}}
\subsection{\small {3.1 Energy optimization of homogeneous platform}}
\begin{center}
\bf \textcolor{black}{First contribution} \\ 
\vspace{1cm}
\bf  \Large \textcolor{blue}{Energy optimization of homogeneous platform}
\end{center}
 \end{frame}



%%%%%%%%%%%%%%%%%%%%
%%    SLIDE 09    %%
%%%%%%%%%%%%%%%%%%%% 
 
\begin{frame}{Objectives}
        \begin{femtoBlock}{} \vspace{-12 mm}
                \begin{itemize} \small
                   \item  Study the effect of the scaling factor $S$ on \textbf{energy consumption} of parallel iterative applications such as NAS 
                          Benchmarks. \includegraphics[width=.06\textwidth]{c1/nasa.pdf} \medskip
                   \item  Study the effect of the scaling factor $S$ on \textbf{performance} of these benchmarks.\medskip
                   \item  Discovering the \textbf{energy-performance trade-off relation} when changing the frequency.\medskip
                   \item  We propose an algorithm for selecting the scaling factor $S$ producing \textbf {optimal trade-off} between the energy and performance. \medskip
                   \item  Improving Rauber and Rünger's\footnote{\tiny Thomas Rauber and Gudula Rünger. Analytical modeling and simulation of the  
                          energy consumption \\  \quad ~ ~\quad    of  independent tasks. In Proceedings of the Winter Simulation Conference, 2012.} method that our method best on. 
                \end{itemize}
                 \let\thefootnote\relax\footnote{}
          \vspace{-10 mm}
        \end{femtoBlock}      
\end{frame}



%%%%%%%%%%%%%%%%%%%%
%%    SLIDE 10    %%
%%%%%%%%%%%%%%%%%%%% 


\begin{frame}{Parallel tasks execution over Homo. Platform}
\vspace{-0.5 cm}
\begin{figure}
  \centering
  \subfloat[Sync. imbalanced communications]{%
    \includegraphics[scale=0.49]{c1/commtasks}\label{fig:h1}}
  \subfloat[Sync. imbalanced computations]{%
    \includegraphics[scale=0.49]{c1/compt}\label{fig:h2}}
  \caption{Parallel tasks on homogeneous platform}
  \label{fig:homo}
\end{figure}

 \end{frame}
 
 
 

%%%%%%%%%%%%%%%%%%%%
%%    SLIDE 11   %%
%%%%%%%%%%%%%%%%%%%% 
\begin{frame}{Energy model for homogeneous platform}    
      The power consumed by a processor divided into two power metrics: the dynamic (\textcolor{red}{$P_d$}) and static   
       (\textcolor{red}{$P_s$}) power. 
    \begin{equation}
     \label{eq:pd}
     \textcolor{red}{ P_d} = \textcolor{blue}{\alpha \cdot CL \cdot V^2 \cdot F}
   \end{equation}
    \scriptsize \underline{Where}: \\ 
    \scriptsize {\textcolor{blue}{$\alpha$}: switching activity \hspace{15 mm}  \textcolor{blue}{$CL$}: load capacitance\\     
    \textcolor{blue}{$V$} the supply voltage \hspace{14 mm} \textcolor{blue}{$F$}: operational frequency}
   \begin{equation}
     \label{eq:ps}
     \small \textcolor{red}{P_s} = \textcolor{blue}{V \cdot N_{trans} \cdot K_{design} \cdot I_{Leak}}
   \end{equation}
    \underline{Where}:\\ 
   	\scriptsize{ \textcolor{blue}{$V$}: the supply voltage.  \hspace{28 mm}   \textcolor{blue}{$N_{trans}$}: number of transistors. \\   
   	\textcolor{blue}{$K_{design}$}: design dependent parameter. \hspace{8 mm} \textcolor{blue}{$I_{leak}$}: technology dependent  
   	     parameter.} 
\end{frame}

%%%%%%%%%%%%%%%%%%%%
%%    SLIDE 12   %%
%%%%%%%%%%%%%%%%%%%% 

\begin{frame}{Energy model for homogeneous platform}
       
          The frequency scaling factor is the ratio between the maximum and the new frequency, \textcolor{blue}{$S = \frac{F_{max}}{F_{new}}$}.  \medskip     
              
              
              
        \begin{block}{\small Rauber and Rünger's energy model}
         $ E = P_{d} \cdot S_1^{-2} \cdot
         \left( T_1 + \sum_{i=2}^{N} \frac{T_i^3}{T_1^2} \right) +
            P_{s} \cdot S_1  \cdot T_1 \cdot N$
        \end{block}     
           \textcolor{blue}{$S_1$}: the max. scaling factor\\ 
           \textcolor{blue}{$P_{d}$}: the dynamic power\\
           \textcolor{blue}{$P_{s}$}: the static power\\
           \textcolor{blue}{$T_I$}: the time of the slower task\\ 
           \textcolor{blue}{$T_i$}: the time of the other tasks\\ 
           \textcolor{blue}{$N$}:  the number of  nodes
       
\end{frame}
  
  
%%%%%%%%%%%%%%%%%%%%
%%    SLIDE 13   %%
%%%%%%%%%%%%%%%%%%%% 
\begin{frame}{Performance evaluation of MPI programs}      
        \begin{femtoBlock}{}
              \vspace{-5 mm}
              \begin{block}{\small Execution time prediction model}
                     \centering{ $ \textcolor{red}{T_{new}} = \textcolor{blue}{T_{Max Comp Old} \cdot S + T_{{Min Comm Old}}}$}
          \end{block}   
          \vspace{10 mm}
           \centering{\includegraphics[width=.4\textwidth]{c1/cg_per}
           \quad%
           \includegraphics[width=.4\textwidth]{c1/lu_pre}}
            \vspace{5 mm}
            
           \small The maximum normalized error for CG=0.0073 \textbf{(the smallest)} and LU=0.031 \textbf{(the worst)}.
           \end{femtoBlock}
\end{frame}




 %%%%%%%%%%%%%%%%%%%%
%%    SLIDE 14   %%
%%%%%%%%%%%%%%%%%%%%  
\begin{frame}{Performance and energy reduction trade-off}      
        \begin{femtoBlock}{} \vspace{-15 mm}
               \begin{figure}
     \centering
     \subfloat[\small  Real relation.]{%
     \includegraphics[width=.43\textwidth]{c1/file3}\label{fig:r2}}
     \quad%
     \subfloat[\small Converted relation.]{%
     \includegraphics[width=.43\textwidth]{c1/file}\label{fig:r1}}%
  \label{fig:rel}
 % \caption{The energy and performance relation}
\end{figure}

 Where:~~~ $\textcolor{blue}{Performance} = execution~time^{-1}$

%\vspace{-0.3cm}
      \small 
         \begin{block}{\small Our objective function}
         \centering{$\textbf{\emph {MaxDist}} = \max_{j=1,2,\dots ,F}             
                    (\overbrace{P_{Norm}(S_j)}^{{Maximize}} - 
                     \overbrace{E_{Norm}(S_j)}^{{Minimize}} )$}
                                         
        \end{block}                
        \end{femtoBlock}
       
\end{frame}

%%%%%%%%%%%%%%%%%%%%
%%    SLIDE 15   %%
%%%%%%%%%%%%%%%%%%%% 
 \begin{frame}{Scaling factor selection algorithm}
\vspace{-0.75cm}
     \begin{center}
      \includegraphics[width=.56 \textwidth]{c1/algo-homo}
     \end{center}
     
\end{frame}


%%%%%%%%%%%%%%%%%%%%
%%    SLIDE 16   %%
%%%%%%%%%%%%%%%%%%%% 
\begin{frame}{Scaling algorithm example}
\vspace{-0.75cm}
     
     \begin{figure}
  \animategraphics[autopause,controls,scale=0.28,buttonsize=0.2cm]{10}{dvfs-homo/a-}{0}{159}

  \end{figure}
\end{frame}

%%%%%%%%%%%%%%%%%%%%
%%    SLIDE 17   %%
%%%%%%%%%%%%%%%%%%%% 
\begin{frame}{Experimental results }
      \begin{femtoBlock}{}      
        \begin{itemize}
         \small
           \item Our experiments are executed on the simulator SimGrid/SMPI v3.10.\medskip
           \item Our algorithm is applied to  NAS parallel benchmarks.\medskip
           \item Each node in the cluster has 18 frequency values from \textbf{2.5$GHz$} to \textbf{800$MHz$}.\medskip
           \item We run the classes A, B and C on 4, 8 or 9 and 16 nodes respectively.\medskip
           \item The dynamic power with the highest frequency is equal to \textbf{20 $W$} and the power static is equal to \textbf{4 $W$}.
                \end{itemize}
        \end{femtoBlock}
\end{frame}


%%%%%%%%%%%%%%%%%%%%
%%    SLIDE 18   %%
%%%%%%%%%%%%%%%%%%%% 
\begin{frame}{Experimental results}
  \begin{femtoBlock}{}  
      \centering { 
     \includegraphics[width=.35\textwidth]{c1/ep}
     \includegraphics[width=.35\textwidth]{c1/cg}
     \includegraphics[width=.35\textwidth]{c1/bt}}
     
     \centering {\includegraphics[width=.55\textwidth]{c1/results.pdf}}
 \end{femtoBlock}
\end{frame}


  %%%%%%%%%%%%%%%%%%%%
%%    SLIDE 19   %%
%%%%%%%%%%%%%%%%%%%% 
\begin{frame}{Results comparison}
         \begin{block}{\small Rauber and Rünger's optimal scaling factor} 
           $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{block}   
    \centering {
         %\includegraphics[width=.33\textwidth]{c1/c1.pdf}
         %\qquad
         %\includegraphics[width=.33\textwidth]{c1/c2.pdf}}
           
         
            \includegraphics[width=.55\textwidth]{c1/compare_c.pdf}}
        
\end{frame}


%%%%%%%%%%%%%%%%%%%%
%%    SLIDE 20   %%
%%%%%%%%%%%%%%%%%%%% 
\begin{frame}{The proposed new energy model}
    \vspace{-0.75cm}     
  \begin{figure}
  \animategraphics[autopause,controls,scale=0.28,buttonsize=0.2cm]{10}{homo-model/a-}{0}{356}
  \end{figure}
\end{frame}


%%%%%%%%%%%%%%%%%%%%
%%    SLIDE 21   %%
%%%%%%%%%%%%%%%%%%%% 
\begin{frame}{Comparing the new model with Rauber model }
 \vspace{0.1cm}    
 \centering
    \includegraphics[width=.45\textwidth]{c1/energy_con}
    
    \includegraphics[width=.5\textwidth]{c1/compare-scales}
\end{frame}




   % \begin{frame}{Summary}
     % \begin{femtoBlock}{}    
     % \begin{itemize}
      %\small
       %\item  We have presented a new online scaling factor selection method that  \textcolor{blue}{optimizes simultaneously the energy and performance}.\medskip
       % \item It predicts \textcolor{blue}{ the energy consumption and the performance} of the parallel applications. \medskip
         %\item Our algorithm  \textcolor{blue}{saves more energy} when the communication and the other slacks times are big.     \medskip    
         %\item It gives the  \textcolor{blue}{best trade-off between energy reduction and
               % performance}. \medskip
         %\item  Our method \ \textcolor{blue}{outperforms Rauber and Rünger's method} in terms of  energy-performance ratio.
         %\item The proposed new energy model is  \textcolor{blue}{more accurate} then Rauber energy model.
         %\end{itemize}      
         
        %\end{femtoBlock}
%\end{frame}


%%%%%%%%%%%%%%%%%%%%
%%    SLIDE 22    %%
%%%%%%%%%%%%%%%%%%%% 


\begin{frame}{Contribution}

\subsection{\small {3.2 Energy optimization of heterogeneous platform}}
\begin{center}
\bf \textcolor{black}{Second contribution} \\ 
\vspace{1cm}
\bf  \Large \textcolor{blue}{Energy optimization of Heterogeneous platform}
\end{center}
 \end{frame}
 


%%%%%%%%%%%%%%%%%%%%
%%    SLIDE 23    %%
%%%%%%%%%%%%%%%%%%%% 
 
\begin{frame}{Objectives}
        \begin{femtoBlock}{} \vspace{-12 mm}
                \begin{itemize} \small
                  \item   Evaluating the  \textcolor{blue}{new energy and performance models} of message passing  applications with iterations running  
                          over a heterogeneous platform (cluster and Grid). \medskip
                   \item  Study the effect of the scaling factor $S$ on both \textcolor{blue}{energy consumption  and the performance} of
                          message passing iterative applications.    \medskip                      
                   
                   \item  Computing  the vector of scaling factors ($S_1, S_2, ..., S_n$)  producing \textcolor{blue} {optimal trade-off} between
                           energy consumption and performance. 
                \end{itemize}
                 
          \vspace{-10 mm}
        \end{femtoBlock}      
\end{frame}


%%%%%%%%%%%%%%%%%%%%
%%    SLIDE 24    %%
%%%%%%%%%%%%%%%%%%%%
\begin{frame}{The execution time model}    
      \vspace{-8 mm}
     \begin{figure}[!t]
       \centering
       \includegraphics[scale=0.5]{c2/commtasks}
       \label{fig:heter}
     \end{figure}     
       \vspace{-12 mm}
       \medskip
       
    \begin{block}{\small The execution time prediction model}
    \begin{equation}
     \label{eq:perf}
     \small\textcolor{red}{ T_{new}} = \textcolor{blue}{\max_{i=1,2,\dots,N} ({TcpOld_i} \cdot S_{i}) + \min_{i=1,2,\dots,N} (Tcm_i)}
    \end{equation}
    \end{block}   
 \small  Where: $ \textcolor{red}{Tcm} = \textcolor{blue}{communication~times + slack~times}$
  
\end{frame}
 
 %%%%%%%%%%%%%%%%%%%%
%%    SLIDE 25    %%
%%%%%%%%%%%%%%%%%%%%
 \begin{frame}{The energy consumption model} 
    -The overall energy consumption of a message passing synchronous distributed application executed over a
    heterogeneous platform is computed as  follows:
    \begin{multline}
     \label{eq:energy}
     \textcolor{red}{E} = \textcolor{blue}{\sum_{i=1}^{N} {(S_i^{-2} \cdot Pd_i \cdot  Tcp_i)}} + {} \\
     \textcolor{blue}{\sum_{i=1}^{N} (Ps_i \cdot (\max_{i=1,2,\dots,N} (Tcp_i \cdot S_{i}) + {\min_{i=1,2,\dots,N} (Tcm_i))}}   
      \hspace{10 mm}
    \end{multline}
    \underline{where}:\\
    \textcolor{blue}{N} : is the number of nodes.
\end{frame}
 
 
%%%%%%%%%%%%%%%%%%%%
%%    SLIDE 26    %%
%%%%%%%%%%%%%%%%%%%%
  \begin{frame}{The  energy  model example for heter. cluster}
  \vspace{-0.5cm}
 \begin{figure}
  \animategraphics[autopause,controls,scale=0.28,buttonsize=0.2cm]{10}{heter-model/a-}{0}{272}
  \end{figure}
 \end{frame}
 
 
 
 
%%%%%%%%%%%%%%%%%%%%
%%    SLIDE 27    %%
%%%%%%%%%%%%%%%%%%%%
\begin{frame}{The trade-off between energy  and performance}
    \vspace{-7 mm}
    \begin{figure}
     \centering{ \includegraphics[width=.4\textwidth]{c2/heter}}
    \end{figure}
    \vspace{-7 mm}
    \textcolor{red}{\underline{Step1}}: computing the normalized energy \textcolor{blue}{$E_{norm} = \frac{E_{reduced}} 
     {E_{Max}}$}. \\
     \textcolor{red}{\underline{Step2}}: computing the normalized performance \textcolor{blue}{$P_{norm} = \frac{T_{Max}}{T_{new}}$}.
   
     \begin{block}{\small The tradeoff model}
     \begin{equation}
      \label{eq:max}
      \textcolor{red}{MaxDist} =
      \mathop {\max_{i=1,\dots F}}_{j=1,\dots,N}
       (\overbrace{P_{norm}(S_{ij})}^{\text{\textcolor{blue}{Maximize}}} -
       \overbrace{E_{norm}(S_{ij})}^{\text{\textcolor{blue}{Minimize}}} )
      \end{equation}
     \end{block}  
\end{frame}
   
 
%%%%%%%%%%%%%%%%%%%%
%%    SLIDE 28    %%
%%%%%%%%%%%%%%%%%%%%
 \begin{frame}{The scaling algorithm for heter. cluster}

 \centering
   \includegraphics[width=.52\textwidth]{algo-heter}
 \end{frame}
 
 
 %%%%%%%%%%%%%%%%%%%%
%%    SLIDE 29    %%
%%%%%%%%%%%%%%%%%%%%
 \begin{frame}{The scaling algorithm example}
 \vspace{-0.5cm}
 \centering
 
  \begin{figure}
  \animategraphics[autopause,controls,scale=0.28,buttonsize=0.2cm]{10}{dvfs-heter/a-}{0}{650}
  \end{figure}
\end{frame}




%%%%%%%%%%%%%%%%%%%%
%%    SLIDE 30    %%
%%%%%%%%%%%%%%%%%%%%
\begin{frame}{Experiments over heterogeneous cluster  }   
        \begin{itemize}
         \small
           \item The experiments executed on the simulator SimGrid/SMPI v3.10.\medskip
           \item The scaling algorithm was applied to the NAS parallel benchmarks class C.\medskip
           \item Four types of processors with different computing powers were used.\medskip
           \item We ran the benchmarks on different number of nodes ranging from 4 to 144 nodes.\medskip
           \item The total power consumption of the chosen CPUs  is composed of $80\%$ for dynamic power and $20\%$ for static power.
                  \medskip
         
        \end{itemize}

\end{frame}  


%%%%%%%%%%%%%%%%%%%%
%%    SLIDE 31    %%
%%%%%%%%%%%%%%%%%%%%
\begin{frame}{The experimental results}
   \vspace{-5 mm}
   \begin{figure}[!t]
   \centering
    \includegraphics[width=0.8\textwidth]{c2/energy_saving.pdf}
    
    \textcolor{blue}{On average, it saves the energy consumption by \textcolor{red}{29\%} 
     of NAS benchmarks class C executed over 8 nodes}
    
   \end{figure}
\end{frame} 
 
 
 
%%%%%%%%%%%%%%%%%%%%
%%    SLIDE 32    %%
%%%%%%%%%%%%%%%%%%%%
\begin{frame}{The experimental results}
   \vspace{-5 mm}
   \begin{figure}[!t]
   \centering
    
    \includegraphics[width=.8\textwidth]{c2/perf_degra.pdf}
   
   \textcolor{blue}{On average, it degrades the performance by \textcolor{red}{3.8\%} 
     of NAS benchmarks class C executed over 8 nodes}
     \end{figure}
\end{frame} 
 
 
 
%%%%%%%%%%%%%%%%%%%%
%%    SLIDE 33    %%
%%%%%%%%%%%%%%%%%%%%
\begin{frame}{The results of the three powers scenarios}
   \vspace{-5 mm}
   \begin{figure}[!t]
   \centering
   \includegraphics[width=.55\textwidth]{c2/three_power.pdf}
   \vspace{10 mm}
   \includegraphics[width=.55\textwidth]{c2/three_scenarios.pdf}
   \end{figure}
\end{frame}  



%%%%%%%%%%%%%%%%%%%%
%%    SLIDE 34    %%
%%%%%%%%%%%%%%%%%%%%
\begin{frame}{The comparing our method}
    The proposed method (MaxDist) was compared to the EDP algorithm that minimizes  the \textcolor{blue}{
    $\mathit{energy}\times \mathit{delay}$} value.
    \vspace{-5 mm}
    \begin{figure}[!t]
    \centering
    \includegraphics[width=.55\textwidth]{c2/avg_compare.pdf}
    
    \includegraphics[width=.55\textwidth]{c2/compare_with_EDP.pdf}
    \end{figure}
\end{frame} 




%%%%%%%%%%%%%%%%%%%%
%%    SLIDE 35    %%
%%%%%%%%%%%%%%%%%%%%
\begin{frame}{Energy optimization of grid platform} 
   \begin{figure}[!t]
    \centering
             \includegraphics[width=.6\textwidth]{c2/grid5000.pdf}
             
           \small  10 sites distributed over France and Luxembourg
        \end{figure}
\end{frame} 


%%%%%%%%%%%%%%%%%%%%
%%    SLIDE 36    %%
%%%%%%%%%%%%%%%%%%%%
 \begin{frame}{Performance, Energy and trade-off models} \small
  \begin{block}{\small The performance model of grid}
    \begin{equation}
  \label{eq:perf}
  \Tnew = \mathop{\max_{i=1,\dots N}}_{j=1,\dots,M_i}({\TcpOld[ij]} \cdot S_{ij}) 
  +\mathop{\min_{j=1,\dots,M_h}}  (\Tcm[hj])
\end{equation}
    \end{block}   
 
 
 \begin{block}{\small The energy model of grid}\small
    \begin{equation}
  \label{eq:energy}
 E = \sum_{i=1}^{N} \sum_{i=1}^{M_i} {(S_{ij}^{-2} \cdot \Pd[ij] \cdot  \Tcp[ij])} +  
 \sum_{i=1}^{N} \sum_{j=1}^{M_i} (\Ps[ij] \cdot \Tnew)
\end{equation}
    \end{block}  

\begin{block}{\small The trade-off model of grid}
\small
    \begin{equation}
   \label{eq:max}
  \MaxDist =
  \mathop{  \mathop{\max_{i=1,\dots N}}_{j=1,\dots,M_i}}_{k=1,\dots,F_j}
      (\overbrace{\Pnorm(S_{ijk})}^{\text{Maximize}} -
       \overbrace{\Enorm(S_{ijk})}^{\text{Minimize}} )
\end{equation}
    \end{block}  
     
 \end{frame}
  
  
  
%%%%%%%%%%%%%%%%%%%%
%%    SLIDE 37    %%
%%%%%%%%%%%%%%%%%%%%
 \begin{frame}{Experiments over Grid'5000}
  \centering

          \includegraphics[width=.5\textwidth]{c2/grid5000-2.pdf}
          
          \vspace{-3 mm}
          \textcolor{blue}{The experiments executed over one site and two sites scenarios}
          
              \vspace{1mm}

          \includegraphics[width=.5\textwidth]{c2/power_consumption.pdf}
          
        \textcolor{blue}{We used Grid'5000 power measurement tools} 
\end{frame}   




%%%%%%%%%%%%%%%%%%%%
%%    SLIDE 38    %%
%%%%%%%%%%%%%%%%%%%%
\begin{frame}{Experiments over Grid'5000}

   \begin{minipage}{0.4\textwidth}
       \textcolor{blue}{Execution the NAS class D on 16 nodes saves the energy by  
        \textcolor{red}{30\%}}
   \end{minipage}  
     \begin{minipage}{0.55\textwidth}
        \begin{figure}[h!]
          \includegraphics[width=0.83 \textwidth]{c2/eng_s.eps}
     \end{figure}
\end{minipage}

         \begin{minipage}{0.4\textwidth}
           \textcolor{blue}{Execution the NAS class D on 16 nodes degrades the 
                performance by \textcolor{red}{3.2\%}}
        \end{minipage}
       \begin{minipage}{0.55\textwidth}
         \begin{figure}[h!] 
           \includegraphics[width=.83\textwidth]{c2/per_d.eps}
         \end{figure}  
          \end{minipage}
 \end{frame}



%%%%%%%%%%%%%%%%%%%%
%%    SLIDE 39    %%
%%%%%%%%%%%%%%%%%%%%
\begin{frame}{Experiments over Grid'5000}
   \textcolor{blue}{One core  and Multi-cores per node results:}
   
  \begin{figure}[h!] 
  \includegraphics[width=.48\textwidth]{c2/eng_s_mc.eps}
  \hspace{0.3cm}
  \includegraphics[width=.48\textwidth]{c2/per_d_mc.eps}
  \end{figure} 
  
  \centering \small \textcolor{blue}{Using multi-core per node scenario decreases the computations to communications ratio}.
\end{frame}



%\begin{frame}{Summary}
%\begin{itemize}
     % \small
        % \item  Two scaling algorithm were applies to \textcolor{blue}{heterogeneous %cluster} and \textcolor{blue}{grid}.
        % \item  A new \textcolor{blue}{energy} and \textcolor{blue}{performance} models were proposed.
      %   \item  The experimental results ere conducted over \textcolor{blue}{SimGrid}  simulators and real 
          %test-bed \textcolor{blue}{Grid'5000}.
         
         %\item The algorithm saves the energy by \textcolor{blue}{29\%} and only
        %  degrades the performance by \textcolor{blue}{3.8\%} for simulated  heterogeneous
      %    clusters.
         
         %\item The algorithm saves the energy by \textcolor{blue}{30\%} and only
        % degrades the performance by \textcolor{blue}{3.2\%} for  Grid'5000 results.
         
       %  \item  The proposed method \textcolor{blue}{outperforms the EDP method} in terms of  energy-performance ratio.
     %    \end{itemize}   
%\end{frame}


%%%%%%%%%%%%%%%%%%%%
%%    SLIDE 40    %%
%%%%%%%%%%%%%%%%%%%%
\begin{frame}{Continuation}
\subsection{\small {3.3 Energy optimization of asynchronous applications}}
\begin{center}
\bf \textcolor{black}{Third contribution} \\ 
\vspace{1cm}
\bf  \Large \textcolor{blue}{Energy optimization of asynchronous applications}
\end{center}
 \end{frame}



%%%%%%%%%%%%%%%%%%%%
%%    SLIDE 41   %%
%%%%%%%%%%%%%%%%%%%%
\begin{frame}{Problem definition}\vspace{0.8 mm}
\textcolor{blue}{Execution the parallel iterative application with synchronous communications }
\vspace{-8 mm}
\begin{figure}
  \animategraphics[autopause,controls,scale=0.25,buttonsize=0.2cm]{10}{syn/a-}{0}{503}
  \end{figure}
\end{frame}



%%%%%%%%%%%%%%%%%%%%
%%    SLIDE 42   %%
%%%%%%%%%%%%%%%%%%%%
\begin{frame}{Problem definition}\vspace{0.8 mm}
\textcolor{blue}{Execution the parallel iterative application with synchronous communications }
\vspace{-8 mm}
\begin{figure}
  \animategraphics[autopause,controls,scale=0.25,buttonsize=0.2cm]{10}{asyn/a-}{0}{440}
  \end{figure}
\end{frame}



%%%%%%%%%%%%%%%%%%%%
%%    SLIDE 43   %%
%%%%%%%%%%%%%%%%%%%%
\begin{frame}{Solution}\vspace{0.8mm}
\textcolor{blue}{Using asynchronous communications with DVFS }
\vspace{-8 mm}
\begin{figure}
  \animategraphics[autopause,controls,scale=0.25,buttonsize=0.2cm]{10}{asyn+dvfs/a-}{0}{314}
  \end{figure}
\end{frame}




%%%%%%%%%%%%%%%%%%%%
%%    SLIDE 44   %%
%%%%%%%%%%%%%%%%%%%%
\begin{frame}{The performance models}

\begin{block}{\small The performance model of Asynch. Applications}\small
\begin{equation}
  \label{eq:asyn_time}
  \Tnew =  \frac{\sum_{i=1}^{N} \sum_{j=1}^{M_i}({\TcpOld[ij]} \cdot S_{ij})} {N  \cdot M_i }
\end{equation}
\end{block}


\begin{block}{\small The performance model of Hybrid Applications}\small
\begin{equation}
  \label{eq:asyn_perf}
  \Tnew =  \frac{\sum_{i=1}^{N} (\max_{j=1,\dots, M_i} ({\TcpOld[ij]} \cdot S_{ij}) +  
   \min_{j=1,\dots,M_i} ({\Ltcm[ij]}))}{N}
\end{equation}
\end{block}


\end{frame}



%%%%%%%%%%%%%%%%%%%%
%%    SLIDE 45   %%
%%%%%%%%%%%%%%%%%%%%
\begin{frame}{The energy consumption models}

\begin{block}{\small The energy model of Asynch. Applications}\small
\begin{equation}
  \label{eq:asyn_energy1}
 E = \sum_{i=1}^{N} \sum_{j=1}^{M_i} {(S_{ij}^{-2} \cdot  \Tcp[ij] \cdot (\Pd[ij]+\Ps[ij]) )} 
\end{equation} 
\end{block}


\begin{block}{\small The energy model of Hybrid Applications}\small
\begin{multline}
  \label{eq:asyn_energy}
 E = \sum_{i=1}^{N} \sum_{j=1}^{M_i} {(S_{ij}^{-2} \cdot \Pd[ij] \cdot  \Tcp[ij])} +  \sum_{i=1}^{N} \sum_{j=1}^{M_i} (\Ps[ij] \cdot \\
 ( \mathop{\max_{j=1,\dots,M_i}} ({\Tcp[ij]} \cdot S_{ij}) + \mathop{\min_{j=1,\dots,M_i}} ({\Ltcm[ij]}))) 
\end{multline}
\end{block}
\end{frame}



%%%%%%%%%%%%%%%%%%%%
%%    SLIDE 46   %%
%%%%%%%%%%%%%%%%%%%%
\begin{frame}{The scaling algorithm for Asynch.  applications}
\vspace{-0.1 mm}
\centering
\includegraphics[width=0.55\textwidth]{algo-hybrid.pdf}
\end{frame}



%%%%%%%%%%%%%%%%%%%%
%%    SLIDE 47   %%
%%%%%%%%%%%%%%%%%%%%
\begin{frame}{The experimental results}
   \vspace{-5 mm}
   \begin{figure}[!t]
   \centering
    \includegraphics[width=0.5\textwidth]{c3/hybrid-model.pdf} 
   \end{figure}
   \begin{itemize}
      \small
        \item Execution the iterative multi-splitting method over simulated Grid.
        \item Execution the iterative multi-splitting method over Grid'5000 test-bed.
   \end{itemize}
\end{frame} 



%%%%%%%%%%%%%%%%%%%%
%%    SLIDE 48   %%
%%%%%%%%%%%%%%%%%%%%
\begin{frame}{The simulation results}
\centering \small \textcolor{blue}{The best scenario in term of energy and performance  is the Async. MS with Sync. DVFS}

\centering
    \includegraphics[scale=0.46]{c3/energy_saving.eps}

 \centering  The average of energy saving  = \textcolor{red}{22\%}
\end{frame} 



%%%%%%%%%%%%%%%%%%%%
%%    SLIDE 49   %%
%%%%%%%%%%%%%%%%%%%%
\begin{frame}{The simulation results}
\centering
   
     \includegraphics[scale=0.46]{c3/perf_degra.eps}
     
 \centering    The average of  speed-up  = \textcolor{red}{5.72\%}
\end{frame} 



%%%%%%%%%%%%%%%%%%%%
%%    SLIDE 50   %%
%%%%%%%%%%%%%%%%%%%%
 \begin{frame}{The Grid'5000 results}
   \vspace{-20 mm}
   \begin{figure}[!t]
   \centering
   \hspace{-8 mm}
    \includegraphics[width=0.53\textwidth]{c3/energy-s-compare.eps}                    
    \includegraphics[width=0.53\textwidth]{c3/perf-deg-compare.eps}
   \end{figure}
    \vspace{-5 mm}
     \centering
   The energy saving = \textcolor{red}{26.93\%}, speeds up =  \textcolor{red}{21.48\%}
\end{frame} 


%%%%%%%%%%%%%%%%%%%%
%%    SLIDE 51   %%
%%%%%%%%%%%%%%%%%%%%
\begin{frame}{The comparison results}
 \centering
    \includegraphics[width=.5\textwidth]{c3/compare.eps}
    
    \includegraphics[width=.5\textwidth]{c3/compare_scales.eps}
\end{frame} 




%%%%%%%%%%%%%%%%%%%%
%%    SLIDE 52  %%
%%%%%%%%%%%%%%%%%%%%
\begin{frame}{Conclusions}
\section{Conclusions}
\begin{itemize}

\small  \barrow  We have proposed \textcolor{blue}{a new energy consumption and performance} models for 
     synchronous and asynchronous parallel applications with iterations.
     
      
\small \barrow The parallel applications with iterations were executed over different parallel architectures such as: \textcolor{blue}{homogeneous  cluster, heterogeneous  cluster and
grid}.

\small \barrow We have proposed \textcolor{blue}{new objective function} to optimize both the energy consumption and the performance.

\small \barrow \textcolor{blue}{New online frequency selecting algorithms} for clusters and grids were developed.

\small \barrow The proposed algorithms were applied to the \textcolor{blue}{NAS parallel benchmarks} and \textcolor{blue}{the
Multi-splitting} method.

\small \barrow The proposed algorithms were evaluated over the \textcolor{blue}{SimGrid simulator and over  Grid'5000 testbed}.

\small  \barrow All the proposed methods were compared with either \textcolor{blue}{Rauber and Rünger  method} or  \textcolor{blue}{EDP objective function}.


\end{itemize}
\end{frame}



%%%%%%%%%%%%%%%%%%%%
%%    SLIDE 53   %%
%%%%%%%%%%%%%%%%%%%%
\begin{frame}{Publication}

\begin{block}{\small Journal Articles }\scriptsize
\begin{enumerate}[$\lbrack$1$\rbrack$]

\item Ahmed Fanfakh, Jean-Claude Charr, Raphaël Couturier,  Arnaud Giersch. Optimizing the energy consumption of message passing applications with iterations executed over grids. \textit{Journal of Computational 
      Science}, 2016.

\item Ahmed Fanfakh, Jean-Claude Charr, Raphaël Couturier,  Arnaud Giersch. Energy Consumption Reduction for     
      Asynchronous Message Passing Applications.  \textit{Journal of Supercomputing}, 2016, (Submitted)
 
\end{enumerate}
\end{block}


\begin{block}{\small Conference Articles }\scriptsize

\begin{enumerate}[$\lbrack$1$\rbrack$]

\item Jean-Claude Charr, Raphaël Couturier, Ahmed Fanfakh, Arnaud Giersch. Dynamic Frequency Scaling for
      Energy Consumption Reduction in Distributed MPI Programs. \textit{ISPA 2014}, pp.
      225-230. IEEE Computer Society, Milan, Italy (2014).

\item Jean-Claude Charr, Raphaël Couturier, Ahmed Fanfakh, Arnaud Giersch. Energy Consumption Reduction
      with DVFS for Message Passing Iterative Applications on Heterogeneous Architectures.
      \textit{The $16^{th}$ PDSEC}. pp. 922-931. IEEE Computer Society, INDIA (2015).

\item Ahmed Fanfakh, Jean-Claude Charr, Raphaël Couturier,  Arnaud Giersch. CPUs Energy Consumption
      Reduction for Asynchronous Parallel Methods Running over Grids. \textit{The $19^{th}$ CSE conference}. IEEE Computer Society, 
      Paris (2016).  

\end{enumerate}

\end{block}
\end{frame}


%%%%%%%%%%%%%%%%%%%%
%%    SLIDE 54   %%
%%%%%%%%%%%%%%%%%%%%
\begin{frame}{Perspectives}
\section{Perspectives}

\begin{itemize}

\small  \barrow We will adapt the proposed algorithms to take into consideration the
\textcolor{blue}{variability between some iterations}.

\small  \barrow The proposed algorithms should be applied to \textcolor{blue}{other message passing methods with iterations} in order to see how they adapt to the characteristics of these methods.

\small \barrow The proposed algorithms for heterogeneous platforms should be applied to heterogeneous platforms composed of \textcolor{blue}{CPUs and GPUs}.

\small \barrow Comparing the results returned by the energy models to the values given by  \textcolor{blue}{real instruments that measure the energy consumptions} of CPUs during the execution time.
\end{itemize}

\end{frame}

%%%%%%%%%%%%%%%%%%%%
%%    SLIDE 55  %%
%%%%%%%%%%%%%%%%%%%%
\begin{frame}{Fin} \vspace{-10 mm}

            \centering \Large \textcolor{blue}{Thanks for Your Listening}
            
            \vspace{2cm}
            \centering \textcolor{blue}{ {\Large Questions?}}
        
\end{frame}
\end{document}
%  _____ ___ _   _ 
% |  ___|_ _| \ | |
% | |_   | ||  \| |
% |  _|  | || |\  |
% |_|   |___|_| \_|
%
