[cig-commits] [commit] devel, master: translate OpenCL note in English and regenerate the PDF (466344f)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Thu Nov 6 08:16:17 PST 2014


Repository : https://github.com/geodynamics/specfem3d_globe

On branches: devel,master
Link       : https://github.com/geodynamics/specfem3d_globe/compare/bc58e579b3b0838a0968725a076f5904845437ca...be63f20cbb6f462104e949894dbe205d2398cd7f

>---------------------------------------------------------------

commit 466344f3952db53a31ef670bb61b2927aedca3b1
Author: Kevin Pouget <kevin.pouget at imag.fr>
Date:   Fri May 16 10:37:03 2014 +0200

    translate OpenCL note in English and regenerate the PDF


>---------------------------------------------------------------

466344f3952db53a31ef670bb61b2927aedca3b1
 doc/USER_MANUAL/manual_SPECFEM3D_GLOBE.pdf | Bin 24398437 -> 24400509 bytes
 doc/USER_MANUAL/manual_SPECFEM3D_GLOBE.tex |  78 ++++++++++++++++++++---------
 2 files changed, 53 insertions(+), 25 deletions(-)

diff --git a/doc/USER_MANUAL/manual_SPECFEM3D_GLOBE.pdf b/doc/USER_MANUAL/manual_SPECFEM3D_GLOBE.pdf
index aa2c22c..a28c435 100644
Binary files a/doc/USER_MANUAL/manual_SPECFEM3D_GLOBE.pdf and b/doc/USER_MANUAL/manual_SPECFEM3D_GLOBE.pdf differ
diff --git a/doc/USER_MANUAL/manual_SPECFEM3D_GLOBE.tex b/doc/USER_MANUAL/manual_SPECFEM3D_GLOBE.tex
index b116d71..18502d6 100644
--- a/doc/USER_MANUAL/manual_SPECFEM3D_GLOBE.tex
+++ b/doc/USER_MANUAL/manual_SPECFEM3D_GLOBE.tex
@@ -425,42 +425,70 @@ To do so, ask your system administrator for the option to add to your batch subm
 
 \section{Using the GPU version of the code}
 
-This was written by Kevin Pouget from Grenoble, France, in May 2014; it should be translated to English at some point (in the meantime 
-users can cut and paste it in Google Translate or similar):
+SPECFEM now supports OpenCL and NVidia Cuda GPU acceleration.
 
-We have now added OpenCL support.
-Au niveau de la configuration, OpenCL s'active de la facon suivante:
+OpenCL can be enabled with the \texttt{--with-opencl} flag, and the
+compilation can be controled through 3 variables: \texttt{OCL\_LIB=},
+\texttt{OCL\_INC=} and \texttt{OCL\_GPU\_FLAGS=}.\\
 
-    ./configure --with-opencl OCL\_LIB=.. OCL\_INC=.. OCL\_GPU\_FLAGS=..
+\noindent
+\texttt{./configure --with-opencl OCL\_LIB= OCL\_INC= OCL\_GPU\_FLAGS=
+..}\\
+    
+
+Cuda configuration can be enabled with \texttt{--with-cuda} flag and
+\texttt{CUDA\_FLAGS=}, \texttt{CUDA\_LIB=}, \texttt{CUDA\_INC=}
+and \texttt{ MPI\_INC=} variables.\\
+
+\noindent
+\texttt{./configure --with-cuda=cuda5 CUDA\_FLAGS= CUDA\_LIB= CUDA\_INC= MPI\_INC= ..}\\
+
+Both environments can be compiled simultaneously by merging these two lines.
+
+For the runtime configuration, the \texttt{GPU\_MODE} flag must be set
+to \texttt{.true.}. In addition, we use 3 parameters to select the
+environments and GPU: \\
+
+\noindent
+\texttt{GPU\_RUNTIME = 0|1|2}\\
+\texttt{GPU\_PLATFORM = filter|*}\\
+\texttt{GPU\_DEVICE = filter|*}\\
 
-La configuration avec CUDA n'a pas chang\'e,
 
-    ./configure --with-cuda=cuda5 CUDA\_FLAGS=.. CUDA\_LIB=.. CUDA\_INC=.. MPI\_INC=.. ..
+\texttt{GPU\_RUNTIME} sets the runtime environments: $2$ for OpenCL,
+$1$ for Cuda and 0 for compile-time decision (hence, SPECFEM should
+have been compiled with \texttt{--with-opencl} xor/exclusive or
+\texttt{--with-cuda}).
 
-et les deux runtimes peuvent \^etre compile simultan\'ement en mergeant les deux lignes.
+\texttt{GPU\_PLATFORM} and \texttt{GPU\_DEVICE} are (case-insensitive)
+filters on the platform and device name in OpenCL, device name only in
+Cuda. In multiprocessor (MPI)runs, each process will pick a GPU in
+this filtered subset, in round-robin. The star filter (\texttt{*})
+will match the first platform and all its devices.
 
-Au niveau de la configuration runtime, nous avons ajoute 3 options en plus du GPU\_MODE:
+\texttt{GPU\_RUNTIME}, \texttt{GPU\_PLATFORM} and \texttt{GPU\_DEVICE}
+are not read if \texttt{GPU\_MODE} was not activated.
 
-    GPU\_MODE = .true.
-    GPU\_RUNTIME = 2
-    GPU\_PLATFORM = NVIDIA
-    GPU\_DEVICE = Tesla
+Regarding the filesystem structure, directory \texttt{src/cuda}  is now called
+\texttt{src/gpu} and, likewise, Fortran/C wrappers are now suffixed
+with \texttt{\_gpu} instead of \texttt{\_cuda}.
 
-    GPU\_RUNTIME, GPU\_PLATFORM, GPU\_DEVICE ne sont pas parse si le GPU\_MODE n'est pas active
-    GPU\_RUNTIME peut prendre les valeurs 2 (OpenCL), 1 (Cuda) ou 0 (Compile-time, qui ne marche pas si specfem a ete compile avec --with-opencl et --with-cuda)
-    GPU\_PLATFORM et GPU\_DEVICE sont des filtres (case insensitive) sur le nom de la plate-forme et du device en OpenCL, et uniquement le nom du device en Cuda
-        en multi-processeur (MPI), chaqu'un des processus prendra un GPU dans ce sous ensemble, en round-robin
-        un filtre "*" matchera toutes les plate-formes/devices
+Regarding the code, \texttt{--with-opencl} defines the
+macro-processor flag \texttt{USE\_OPENCL} and \texttt{--with-cuda}
+defines \texttt{USE\_CUDA}; and \texttt{GPU\_RUNTIME} set the global
+variable \texttt{run\_opencl} or \texttt{run\_cuda}.
 
-Sinon pas de modification importante je pense, le dossier src/cuda s'appelle maintenant src/gpu et, pareil, les wrappers Fortran/C ont \'et\'e renommes \_gpu au lieu de \_cuda.
-Dans le code, --with-opencl active la macro pr\'eprocesseur USE\_OPENCL, et --with-cuda active USE\_CUDA ; et GPU\_RUNTIME va activer la variable globale run\_opencl ou run\_cuda.
-Et comme le disait Brice, le support des textures n'a pas ete valide en OpenCL. Le code est ecrit et compile, mais il faudra finir le debugging quand les plate-formes
-supporteront OpenCL 1.2.
+Texture support has not been validated in OpenCL, but works as
+expected in Cuda. The code was written and compiles, but the debugging
+phase remains, until we have access to an OpenCL 1.2 enabled platform.
 
-Nous avons test\'e l'ex\'ecution sur les exemples regional\_Greece\_small et global\_s362ani\_small, et les sismogrammes sont identiques a ceux g\'en\'er\'es par la version d'origine.
+We tested the execution on examples \texttt{regional\_Greece\_small}
+and \texttt{global\_s362ani\_small} from the git tree, and the
+seismographs are identical the one generated by the original version.
 
-Note about the OpenCL version: the OpenCL calculation kernels were created by Brice Videau and Kevin Pouget from Grenoble, France, using their software package called
-BOAST; see:
+Note about the OpenCL version: the OpenCL calculation kernels were
+created by Brice Videau and Kevin Pouget from Grenoble, France, using
+their software package called BOAST; see:
 
 Title	BOAST: Bringing Optimization through Automatic Source-to-Source Tranformations
 Publication Type	Conference Proceedings



More information about the CIG-COMMITS mailing list