Index: palm/trunk/TUTORIAL/SOURCE/parallelization.tex
===================================================================
--- palm/trunk/TUTORIAL/SOURCE/parallelization.tex	(revision 945)
+++ palm/trunk/TUTORIAL/SOURCE/parallelization.tex	(revision 973)
@@ -108,5 +108,5 @@
 
          \node (center) at (0,1) {};
-         \onslide<2-> \node (Network) at (-3.5,1) [ellipse,fill=green!20] {Network};
+         \onslide<2-> \node (Network) at (-3.5,1) [draw, ellipse,fill=green!20] {Network};
          \node (dis_mem) at (-3.5,-1) [text width=0.28\textwidth] {\footnotesize \textbf{distributed} memory\\(Cray-T3E)};
          \onslide<3-> \node (add_mem) at (3.5,1) [rectangle, draw] {adressable memory};
@@ -116,5 +116,5 @@
          \onslide<6-> \node (clustered_systems) at (0,-3) [draw, text width=0.15\textwidth] {clustered systems};
          \node (cs_info) at (0,-4.2) [text width=0.4\textwidth] {\footnotesize (IBM-Regatta, Linux-Cluster,
-NEC-SX, SGI-ICE, Cray-XT4)};
+NEC-SX, SGI-ICE, Cray-XE6)};
 
 % Adressable memory node (big)
@@ -138,31 +138,34 @@
 % Adressable memory node (small)    
          \onslide<4->
-         \draw[->, thick] (1.5,0.2) -- (0.4,0.2) ;    
-         \node at (0,0.2) [scale=0.2] {%
-         \begin{tikzpicture}
+           
+         \node (small_node) at (-2,0.6) [scale=0.2] {%
+            \begin{tikzpicture}
+
+               \node (add_mem_small) at (3.5,0.9) [ultra thick, rectangle, draw, minimum width=3cm] {};
+
+               \node (p1_small) at (2,-0.05) [ultra thick, draw,circle, scale=0.9] {};
+               \node (p2_small) at (2.6,-0.05) [ultra thick, draw,circle, scale=0.9] {};
+               \node (p3_small) at (3.2,-0.05) [ultra thick, draw,circle, scale=0.9] {};
+               \node (p4_small) at (3.8,-0.05) [ultra thick, draw,circle, scale=0.9] {};
+               \node (p5_small) at (4.4,-0.05) [ultra thick, draw,circle, scale=0.9] {};
+               \node (p6_small) at (5,-0.05) [ultra thick, draw,circle, scale=0.9] {};
             
-            \node (add_mem_small) at (3.5,0.9) [ultra thick, rectangle, draw, minimum width=3cm] {};
-            \node (p1_small) at (2,-0.05) [ultra thick, draw,circle, scale=0.9] {};
-            \node (p2_small) at (2.6,-0.05) [ultra thick, draw,circle, scale=0.9] {};
-            \node (p3_small) at (3.2,-0.05) [ultra thick, draw,circle, scale=0.9] {};
-            \node (p4_small) at (3.8,-0.05) [ultra thick, draw,circle, scale=0.9] {};
-            \node (p5_small) at (4.4,-0.05) [ultra thick, draw,circle, scale=0.9] {};
-            \node (p6_small) at (5,-0.05) [ultra thick, draw,circle, scale=0.9] {};
-         
-            \draw[-, ultra thick] (add_mem_small.south) -- (3.5,0.4);
-            \draw[-, ultra thick] (2,0.4) -- (5,0.4);
-            \draw[-, ultra thick] (2,0.4) -- (p1_small);
-            \draw[-, ultra thick] (2.6,0.4) -- (p2_small);
-            \draw[-, ultra thick] (3.2,0.4) -- (p3_small);         
-            \draw[-, ultra thick] (3.8,0.4) -- (p4_small);
-            \draw[-, ultra thick] (4.4,0.4) -- (p5_small);         
-            \draw[-, ultra thick] (5,0.4) -- (p6_small);
+               \draw[-, ultra thick] (add_mem_small.south) -- (3.5,0.4);
+               \draw[-, ultra thick] (2,0.4) -- (5,0.4);
+               \draw[-, ultra thick] (2,0.4) -- (p1_small);
+               \draw[-, ultra thick] (2.6,0.4) -- (p2_small);
+               \draw[-, ultra thick] (3.2,0.4) -- (p3_small);         
+               \draw[-, ultra thick] (3.8,0.4) -- (p4_small);
+               \draw[-, ultra thick] (4.4,0.4) -- (p5_small);         
+               \draw[-, ultra thick] (5,0.4) -- (p6_small);
+               
+               
+            \end{tikzpicture}
+            } ;
             
-            
-         \end{tikzpicture}
-         } ;
-         
+         \draw[->, thick] (1.5,0.2) -- (small_node) ;  
+         \draw[-] (-2.7,0.75) -- (-2.3,0.725);
          \onslide<5->
-         \node (add_info) at (0,-0.1) [scale=0.9] {\scriptsize node};
+         \node[below=-0.1cm of small_node] (add_info) [scale=0.9] {\scriptsize node};
 
 % Black Arrows
@@ -177,5 +180,5 @@
 % OpenMP Arrows         
          \onslide<8-> \draw[->, ultra thick, color=yellow] (3.5,-2.6) -- (3.5,-1.5) ;
-         \draw[->, ultra thick, color=yellow] (2.5,-2.8) -- (-2.5,0.7) ;
+         \draw[->, ultra thick, color=yellow] (2.5,-2.8) -- (-2.0,0.1) ;
          
 % Network decorations
@@ -209,5 +212,6 @@
          \draw[-] (-2.45,1.0) -- (pr6);
          \draw[-] (mem6) -- (pr6);    
-                           
+               
+         \onslide<1->            
       \end{tikzpicture}
    \end{center}
@@ -245,5 +249,7 @@
    \begin{itemize}
       \item<10-> Alternatively, a 1D-decomposition along $x$ or $y$ may be used in case of slow networks, but this generally doesn't scale for processor numbers $>$ 256.
+      \vspace{2mm}
       \item<11-> Message passing is realized using MPI.
+      \vspace{2mm}
       \item<12-> OpenMP parallelization as well as mixed usage of OpenMP and
 MPI is also possible. (OpenMP tests and optimization is under way)
@@ -279,5 +285,5 @@
          \onslide<5-> \includegraphics[width=0.8\textwidth]{parallelization_figures/fft.png} \end{center}
          \vspace{-4mm}
-         \textbf{Example: transpositions for solving the poisson equation}
+         \textbf{Example: transpositions for solving the Poisson\\ \hspace{4em}equation}
       \end{column}
    \end{columns}   
@@ -353,24 +359,33 @@
 \begin{frame}
    \frametitle{Virtual Processor Grid Used in PALM}   
-   \footnotesize
-   The processor grid and special data types are defined in file \texttt{init\_pegrid.f90}
+   \scriptsize
+   \vspace{2mm}
+   The processor grid and special data types are defined in file \texttt{init\_pegrid.f90}\\
+   \ \\
    \begin{itemize}
       \item<2-> PALM uses a two-dimensional virtual processor grid (in case of a 1D-decomposition, it has only one element along $y$). It is defined by a so called communicator (here: \texttt{comm2d}):\\
-      \scriptsize
+      \tiny
+      \vspace{1.5mm}
       \quad \texttt{ndim = 2}\\
-	   \quad \texttt{pdims(1) = npex    ! \# of processors along x}\\
-	   \quad \texttt{pdims(2) = npey    ! \# of processors along y}\\
+	   \quad \texttt{pdims(1) = npex  \quad  ! \# of processors along x}\\
+	   \quad \texttt{pdims(2) = npey  \quad  ! \# of processors along y}\\
 	   \quad \texttt{cyclic(1) = .TRUE.}\\
 	   \quad \texttt{cyclic(2) = .TRUE.}\\
-
-	   \quad \texttt{CALL MPI\underline{\ }CART\underline{\ }CREATE( MPI\underline{\ }COMM\underline{\ }WORLD, ndim, pdims, cyclic,  \&}\\
-	   \quad \texttt{\hspace{10.5em} reorder, \textcolor{blue}{comm2d}, ierr )}  
+      \ \\
+	   \quad \texttt{CALL MPI\underline{\ }CART\underline{\ }CREATE( MPI\underline{\ }COMM\underline{\ }WORLD, ndim, pdims, cyclic, reorder, \&}\\
+	   \quad \texttt{\hspace{10.5em} \textcolor{blue}{comm2d}, ierr )} 
+	   \scriptsize
+      \vspace{4mm} 
       \item<3-> The processor number (id) with respect to this processor grid, \texttt{myid}, is given by:\\
-      \scriptsize
-      \quad \texttt{CALL MPI\underline{\ }COMM\underline{\ }RANK( comm2d, \textcolor{blue}{myid}, ierr )}      
+      \tiny
+      \vspace{1.5mm}
+      \quad \texttt{CALL MPI\underline{\ }COMM\underline{\ }RANK( comm2d, \textcolor{blue}{myid}, ierr )}   
+      \scriptsize   
+      \vspace{4mm}
       \item<4-> The ids of the neighbouring PEs are determined by:\\
-      \scriptsize
+      \tiny
+      \vspace{1.5mm}
       \quad \texttt{CALL MPI\underline{\ }CARD\underline{\ }SHIFT( comm2d, 0, 1, \textcolor{blue}{pleft},  \textcolor{blue}{pright}, ierr )}\\
-      \quad \texttt{CALL MPI\underline{\ }CARD\underline{\ }SHIFT( comm2d, 1, 1, \textcolor{blue}{psouth}, \textcolor{blue}{pnorth}, ierr )}
+      \quad \texttt{CALL MPI\underline{\ }CARD\underline{\ }SHIFT( comm2d, 1, 1, \textcolor{blue}{psouth}, \textcolor{blue}{pnorth}, ierr )}\\
    \end{itemize}
 \end{frame}
@@ -383,19 +398,22 @@
             \item<1-> Ghost points are stored in additional array elements added at the horizontal boundaries of the subdomains, e.g.\\
             \tiny
+            \vspace{2mm}
             \quad \texttt{u(:,:,nxl\textcolor{blue}{-ngl}), u(:,:,nxr\textcolor{blue}{+ngl})    ! left and right boundary}\\
             \quad \texttt{u(:,nys\textcolor{blue}{-ngl},:), u(:,nyn\textcolor{blue}{+ngl},:)    ! south and north boundary}\\
-            \hspace{3mm}
+            \vspace{4mm}
             \item<2-> \scriptsize The exchange of ghost points is done in file \texttt{exchange\underline{\ }horiz.f90}\\
             \textbf{\underline{Simplified} example:} synchroneous exchange of ghost points along $x$ ($yz$-planes, send left, receive right plane):\\
             \tiny
+            \vspace{2mm}
             \quad \texttt{CALL MPI\underline{\ }SENDRECV( ar(nzb,nys-\textcolor{blue}{ngl},nxl),   ngp\underline{\ }yz, MPI\underline{\ }REAL, pleft,  0,}\\
             \quad \texttt{\hspace{9.5em}ar(nzb,nys-\textcolor{blue}{ngl},nxr+1), ngp\underline{\ }yz, MPI\underline{\ }REAL, pright, 0,}\\
             \quad \texttt{\hspace{9.5em}comm2d, status, ierr )}\\
-            \hspace{3mm}
+            \vspace{4mm}
             \item<3-> \scriptsize In the real code special MPI data types (vectors) are defined for exchange of $yz$/$xz$-planes for performance reasons and because array elements to be exchanged are not consecutively stored in memory for $xz$-planes:\\
             \tiny
+            \vspace{2mm}
             \quad \texttt{ngp\underline{\ }yz(0) = (nzt - nzb + 2) * (nyn - nys + 1 + 2 * \textcolor{blue}{ngl} )}\\
             \quad \texttt{CALL MPI\underline{\ }TYPE\underline{\ }VECTOR( \textcolor{blue}{ngl}, ngp\underline{\ }yz(0), ngp\underline{\ }yz(0), MPI\underline{\ }REAL, type\underline{\ }yz(0), ierr )}\\ 
-            \quad \texttt{CALL MPI\underline{\ }TYPE\underline{\ }COMMIT( type\underline{\ }xz(0), ierr )   ! see file init\underline{\ }pegrid.f90}\\
+            \quad \texttt{CALL MPI\underline{\ }TYPE\underline{\ }COMMIT( type\underline{\ }yz(0), ierr )   ! see file init\underline{\ }pegrid.f90}\\
             \ \\
             \quad \texttt{CALL MPI\underline{\ }SENDRECV( ar(nzb,nys-ngl,nxl), type\underline{\ }yz(grid\underline{\ }level), MPI\underline{\ }REAL, pleft, 0, ...}\\
@@ -431,4 +449,5 @@
    \frametitle{Parallel I/O} 
    \scriptsize
+   \vspace{-2mm}
    \begin{columns}[T]
       \begin{column}{1.1\textwidth}
@@ -449,5 +468,5 @@
          \onslide<4-> \textbf{General comment:}
          \begin{itemize}
-            \item Parallel I/O on a large number of files ($>$1000) currently may cause severe file system problems (e.g. on Lustre file systems). A workaround for this problem will\\ be available soon. 
+            \item Parallel I/O on a large number of files ($>$1000) currently may cause severe file system problems (e.g. on Lustre file systems).\\ \textbf{Workaround:} reduce the maximum number of parallel I/O streams\\ \hspace{5.75em}(see \texttt{mrun}-options)
          \end{itemize}
       \end{column}
