Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add OpenCL support to SPECFEM3D_GLOBE #89

Merged
merged 18 commits into from May 15, 2014

Conversation

Projects
None yet
3 participants
@kpouget
Copy link
Contributor

kpouget commented May 15, 2014

Bonjour,

On vient de terminer la mise en place du support OpenCL dans la branche devel (commit 7be81d6 du 05/05) du GIT specfem3d_globe.

Au niveau de la configuration, OpenCL s'active de la façon suivante:

./configure --with-opencl OCL_LIB=.. OCL_INC=.. OCL_GPU_FLAGS=..

La configuration Cuda n'a pas changee,

./configure --with-cuda=cuda5 CUDA_FLAGS=.. CUDA_LIB=.. CUDA_INC=.. MPI_INC=.. ..

et les deux runtimes peuvent être compile simultanément en mergeant les deux lignes.

Au niveau de la configuration runtime, nous avons ajoute 3 options en plus du GPU_MODE:

GPU_MODE = .true.
GPU_RUNTIME = 2
GPU_PLATFORM = NVIDIA
GPU_DEVICE = Tesla

  • 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

Sinon pas de modification importante je pense, le dossier src/cuda s'appelle maintenant src/gpu et, pareil, les wrappers Fortran/C ont été renommes _gpu au lieu de _cuda.
Dans le code, --with-opencl active la macro préprocesseur 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.

Nous avons teste l’exécution sur les exemples regional_Greece_small et global_s362ani_small, et les sismogrammes sont identiques a ceux générés par la version d'origine.

@komatits komatits changed the title add Opencl support to SPECFEM3D add OpenCL support to SPECFEM3D_GLOBE May 15, 2014

@komatits

This comment has been minimized.

Copy link
Member

komatits commented May 15, 2014

Great, thanks a lot. Very useful. Let me inform @danielpeter @QuLogic @mpbl @jeroentromp that OpenCL support is now merged.

To @danielpeter : @kpouget et al used a software package called BOAST that they developed to automatically generate the OpenCL or CUDA kernels ; @kpouget and Brice Videau can give you more details about this

komatits added a commit that referenced this pull request May 15, 2014

Merge pull request #89 from Nanosim-LIG/opencl
add OpenCL support to SPECFEM3D_GLOBE

@komatits komatits merged commit 6acd7dc into geodynamics:devel May 15, 2014

@QuLogic

This comment has been minimized.

Copy link
Member

QuLogic commented May 15, 2014

You need to open a PR for the changes to the autoconf repository, and then fix the submodule here so it points back the geodynamics repo and not yours.

@QuLogic

This comment has been minimized.

Copy link
Member

QuLogic commented May 15, 2014

OK, I see that the PR was sent, but you just forgot to change back the submodule URL here.

@komatits

This comment has been minimized.

Copy link
Member

komatits commented May 15, 2014

please also make sure you git update the submodules, in particular the
DATA directory (you are using an older one; I fixed that in
#90

Thanks,
Dimitri.

On 16/05/2014 00:58, Elliott Sales de Andrade wrote:

You need to open a PR for the changes to the |autoconf| repository, and
then fix the submodule here so it points back the geodynamics repo and
not yours.


Reply to this email directly or view it on GitHub
#89 (comment).

Dimitri Komatitsch
CNRS Research Director (DR CNRS), Laboratory of Mechanics and Acoustics,
UPR 7051, Marseille, France http://komatitsch.free.fr

@QuLogic

This comment has been minimized.

Copy link
Member

QuLogic commented May 15, 2014

No, I'm referring to the m4 directory.

@komatits

This comment has been minimized.

Copy link
Member

komatits commented May 15, 2014

yes, but DATA also had problems (Kevin forgot to update it)

On 16/05/2014 01:24, Elliott Sales de Andrade wrote:

No, I'm referring to the |m4| directory.


Reply to this email directly or view it on GitHub
#89 (comment).

Dimitri Komatitsch
CNRS Research Director (DR CNRS), Laboratory of Mechanics and Acoustics,
UPR 7051, Marseille, France http://komatitsch.free.fr

@komatits

This comment has been minimized.

Copy link
Member

komatits commented May 15, 2014

@kpouget If possible let us use English for all the comments left on GitHub (most SPECFEM developers and users will have a hard time using HOWTOs written in French)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.