|
9 | 9 | GPU
|
10 | 10 | ==========================
|
11 | 11 |
|
12 |
| -The tutorials in ``amrex-tutorials/ExampleCodes/GPU`` demonstrate the implementation |
13 |
| -of AMReX's GPU toolkit as well as provide GPU ported versions of CPU |
14 |
| -tutorials to help applications convert to GPUs. |
15 |
| - |
16 |
| -**Your first AMReX GPU application** |
17 |
| ------------------------------------- |
18 |
| - |
19 |
| -This is a step-by-step guide to preparing, compiling and running your first |
20 |
| -AMReX GPU program. This guide will use ``Tutorials/GPU/Launch``, |
21 |
| -and instructions will focus on ORNL's systems: |
22 |
| - |
23 |
| -1. Before compiling, the ``pgi`` and ``cuda`` software must be available. |
24 |
| - On ORNL systems, the modules can be loaded directly by typing: |
25 |
| - |
26 |
| -.. highlight:: console |
27 |
| - |
28 |
| -:: |
29 |
| - |
30 |
| - module load pgi cuda |
31 |
| - |
32 |
| -2. Go to ``Tutorials/GPU/Launch`` to compile the executable. Compile with |
33 |
| - ``make USE_CUDA=TRUE COMP=pgi USE_MPI=TRUE USE_OMP=FALSE``, or edit the |
34 |
| - ``GNUmakefile`` to match this configuration and run ``make``. This |
35 |
| - should result in an executable: ``main3d.pgi.MPI.CUDA.ex``. |
36 |
| - |
37 |
| -3. On Summit systems, this executable can be submitted by using one of the run |
38 |
| - scripts found in ``Tutorials/GPU``. ``run.script`` can be used to run on |
39 |
| - Summitdev, and ``run.summit`` can be used for Summit. To change the number |
40 |
| - of ranks and GPUs used in the simulation, change the number of resource sets, |
41 |
| - ``n`` in the ``jsrun`` line. For the first ``Launch`` tutorial, use ``n=1`` |
42 |
| - and set ``INPUTS=""`` because no input file is used in this example. |
43 |
| - |
44 |
| -When ready, submit the job script (on Summit: ``bsub run.script``). |
45 |
| -Congratulations! You've accelerated AMReX using GPUs! |
46 |
| - |
47 |
| -**Launch** |
48 |
| ----------- |
49 |
| - |
50 |
| -Launch shows multiple examples of how GPU work can be offloaded using the tools |
51 |
| -available in AMReX. It includes examples of multiple AMReX macro launch methods, |
52 |
| -launching a Fortran function using CUDA and launching work using OpenACC and |
53 |
| -OpenMP offloading. This tutorial will be regularly updated with AMReX's |
54 |
| -preferred GPU launch methodologies. |
| 12 | +The tutorial in ``amrex-tutorials/ExampleCodes/GPU`` demonstrates how to implement a |
| 13 | +performance-portable application using AMReX's GPU offloading capabilities. |
55 | 14 |
|
56 | 15 | **CNS**
|
57 | 16 | -------
|
58 | 17 |
|
59 |
| -CNS is a direct GPU port of the ``ExampleCodes/EB/CNS`` example. |
60 |
| - |
61 |
| -**AmrCore** |
62 |
| ------------ |
63 |
| - |
64 |
| -AmrCore is a direct GPU port of the ``ExampleCodes/Amr/Advection_AmrCore`` tutorial |
65 |
| -that advects a single scalar field with a velocity field specified on faces, using |
66 |
| -strategies similar to HeatEquation and CNS. |
67 |
| - |
| 18 | +CNS solves the compressible Navier-Stokes equations on GPUs. |
0 commit comments