-
Notifications
You must be signed in to change notification settings - Fork 98
Using BOAST for generating kernels
To generate CUDA and OpenCL kernels, we use BOAST as a source-to-source code generation tool. The informations here below are for developers who wish to modify the BOAST kernels written in ruby and generate updated kernels.
Note that we do provide all generated CUDA and OpenCL kernels in src/gpu/kernels.gen
to be able to compile the code as is with CUDA and OpenCL support.
-
github repository:
https://github.com/Nanosim-LIG/boast -
publication:
BOAST: A metaprogramming framework to produce portable and efficient computing kernels for HPC applications
Brice Videau, Kevin Pouget, Luigi Genovese, Thierry Deutsch, Dimitri Komatitsch, Frederic Desprez, Jean-Francois Mehaut
The International Journal of High Performance Computing Applications. 2018;32(1):28-44.
doi:10.1177/1094342017718068
-
installation requires ruby, see:
https://www.ruby-lang.org/en/documentation/installation/ -
install BOAST:
$ sudo gem install BOAST
-
if needed, update BOAST:
$ sudo gem update BOAST
The ruby source code files of our BOAST kernels are all here:
src/gpu/boast
To generate new CUDA and OpenCL kernels:
$ cd SPECFEM3D_GLOBE/
$ make boast_kernels
This will create the new kernels in directory src/gpu/kernels.gen/
.
Alternatively, you can also create them by:
$ cd SPECFEM3D_GLOBE/src/gpu/boast
$ ruby kernels.rb -o ../kernels.gen
To test if ruby has BOAST installed, you can run with interactive ruby:
$ irb
and type something like:
irb(main):003:0> require 'BOAST'
irb(main):003:0> a = BOAST::Int "a"
to exit ruby again, use:
irb(main):003:0> <ctrl-D>
Development wiki for SPECFEM3D_GLOBE
Development wiki
User manual
- 01_introduction
- 02_getting_started
- 03_running_the_mesher
- 04_running_the_solver
- 05_regional_simulations
- 06_adjoint_simulations
- 07_doing_tomography
- 08_noise_simulations
- 09_gravity_calculations
- 10_graphics
- 11_running_scheduler
- 12_changing_the_model
- 13_post_processing
- 14_informations_for_developers
- A_reference_frame
- B_non-dimensionalization_conventions
- C_benchmarks
- D_SAC_headers
- E_channel_codes
- F_troubleshooting
- G_license
- authors
- bug_reports
- copyright_and_version
- features
- manual_SPECFEM3D_GLOBE
- notes_and_acknowledgement
- sponsors