Skip to content

Commit 1437c4c

Browse files
Add AMD GPU support, resized images and LICENSE file
1 parent 4453c46 commit 1437c4c

File tree

5 files changed

+56
-23
lines changed

5 files changed

+56
-23
lines changed

cloud-infrastructure/ai-infra-gpu/ai-infrastructure/opm-flow-gpu/README.md

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,13 @@ Oracle Cloud Infrastructure offers GPU shapes for all kinds of workloads, includ
2626
- BM with 8 GPUs, NVLink and RDMA cluster networking
2727
- AMD MI300X 192GB
2828
- BM with 8 GPUs, HIP and RDMA cluster networking
29-
This tutorial covers NVIDIA GPU shapes only but can be easily adapted for AMD GPU shapes. A single A100 80 GB virtual machine (VM.GPU.A100.80GB.1) with a Cannonical Ubuntu 22.04 image is used.
3029

31-
It is necessary to install the NVIDIA CUDA Compiler (NVCC) to build Flow:
30+
This tutorial covers both NVIDIA and AMD GPU shapes. More specifically, we use here:
31+
- A 1 x A100 80 GB virtual machine (VM.GPU.A100.80GB.1),
32+
- A 8 x MI300X 192 GB bare metal (BM.GPU.MI300X.8),
33+
both with a Cannonical Ubuntu 22.04 image with respectively CUDA and ROCm preinstaled.
34+
35+
On the NVIDIA GPU shapes, it is necessary to install the NVIDIA CUDA Compiler (NVCC) to build Flow:
3236
```
3337
sudo apt-get install -y nvidia-cuda-toolkit
3438
```
@@ -71,7 +75,7 @@ However, for `opm-simulators` it is necessary to turn off the `USE_GPU_BRIDGE` o
7175
```
7276
git clone https://github.com/OPM/opm-simulators.git
7377
mkdir opm-simulators/build && cd opm-simulators/build
74-
cmake .. -DUSE_GPU_BRIDGE=OFF
78+
cmake .. -DUSE_GPU_BRIDGE=OFF # add the -DCONVERT_CUDA_TO_HIP=ON option for AMD GPUs
7579
make
7680
```
7781
The following error might occur at the `make` stage:
@@ -134,7 +138,7 @@ Running the Flow simulator on one or more GPUs requires to use GPU-specific solv
134138
}
135139
}
136140
```
137-
To run the simulation, open datasets are available [here](git clone https://github.com/OPM/opm-data.git). For example, to run the Norne use case, simply execute:
141+
To run the simulation, open datasets are available [here](https://github.com/OPM/opm-data.git). For example, to run the Norne use case, simply execute:
138142
```
139143
/home/ubuntu/opm-simulators/build/bin/flow NORNE_ATW2013.DATA --output-dir=out_gpu --matrix-add-well-contributions=true --linear-solver=/home/ubuntu/gpu-solver.json
140144
```
@@ -149,9 +153,18 @@ for N GPUs.
149153
Here are a few comments to take into account when considering running Flow on GPUs:
150154
* The options `--matrix-add-well-contributions=true` and `--threads-per-process=1` are recommended by OPM.
151155
* Because of the import CPU/GPU traffic, running Flow on GPU is only relevant for models above a certain size (few hundreds of thousands of cells).
152-
* Using a CUDA-aware version of Open MPI may improve the overall performance of the simulation.
156+
* Using a CUDA-aware or ROCm-aware version of Open MPI may improve the overall performance of the simulation.
153157

154158
## External Links
155159

156160
* [The Open Porous Media Initiative](https://opm-project.org/)
157-
* [Building CUDA-aware Open MPI](https://www.open-mpi.org/faq/?category=buildcuda)
161+
* [The Best Public Cloud for Oil and Gas Reservoir Simulation](https://blogs.oracle.com/cloud-infrastructure/post/the-best-public-cloud-for-oil-and-gas-reservoir-simulation)
162+
* [Building CUDA-aware Open MPI](https://www.open-mpi.org/faq/?category=buildcuda)
163+
164+
## License
165+
166+
Copyright (c) 2024 Oracle and/or its affiliates.
167+
168+
Licensed under the Universal Permissive License (UPL), Version 1.0.
169+
170+
See [LICENSE](https://github.com/oracle-devrel/technology-engineering/blob/main/LICENSE) for more details.
-239 KB
Loading
Loading
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
Copyright (c) 2024 Oracle and/or its affiliates.
2+
3+
The Universal Permissive License (UPL), Version 1.0
4+
5+
Subject to the condition set forth below, permission is hereby granted to any
6+
person obtaining a copy of this software, associated documentation and/or data
7+
(collectively the "Software"), free of charge and under any and all copyright
8+
rights in the Software, and any and all patent rights owned or freely
9+
licensable by each licensor hereunder covering either (i) the unmodified
10+
Software as contributed to or provided by such licensor, or (ii) the Larger
11+
Works (as defined below), to deal in both
12+
13+
(a) the Software, and
14+
(b) any piece of software and/or hardware listed in the lrgrwrks.txt file if
15+
one is included with the Software (each a "Larger Work" to which the Software
16+
is contributed by such licensors),
17+
18+
without restriction, including without limitation the rights to copy, create
19+
derivative works of, display, perform, and distribute the Software and make,
20+
use, sell, offer for sale, import, export, have made, and have sold the
21+
Software and the Larger Work(s), and to sublicense the foregoing rights on
22+
either these or other terms.
23+
24+
This license is subject to the following condition:
25+
The above copyright notice and either this complete permission notice or at
26+
a minimum a reference to the UPL must be included in all copies or
27+
substantial portions of the Software.
28+
29+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
30+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
31+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
32+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
33+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
34+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
35+
SOFTWARE.

cloud-infrastructure/ai-infra-gpu/ai-infrastructure/opm-flow-gpu/assets/scripts/build_flow_gpu.sh

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -11,27 +11,12 @@ done
1111

1212
git clone https://github.com/OPM/opm-simulators.git
1313
mkdir opm-simulators/build && cd opm-simulators/build
14-
cmake .. -DUSE_GPU_BRIDGE=OFF
14+
cmake .. -DUSE_GPU_BRIDGE=OFF # add the -DCONVERT_CUDA_TO_HIP=ON option for AMD GPUs
1515
make -j 8
1616
cd ../..
1717

1818
git clone https://github.com/OPM/opm-upscaling.git
1919
mkdir opm-upscaling/build && cd opm-upscaling/build
2020
cmake ..
2121
make -j 8
22-
cd ../..
23-
24-
25-
26-
/usr/include/c++/11/bits/std_function.h:435:145: error: parameter packs not expanded with ‘...’:
27-
435 | function(_Functor&& __f)
28-
| ^
29-
/usr/include/c++/11/bits/std_function.h:435:145: note: ‘_ArgTypes’
30-
/usr/include/c++/11/bits/std_function.h:530:146: error: parameter packs not expanded with ‘...’:
31-
530 | operator=(_Functor&& __f)
32-
| ^
33-
/usr/include/c++/11/bits/std_function.h:530:146: note: ‘_ArgTypes’
34-
make[2]: *** [CMakeFiles/opmsimulators.dir/build.make:2680: CMakeFiles/opmsimulators.dir/opm/simulators/linalg/gpuistl/detail/vector_operations.cu.o] Error 1
35-
make[2]: *** Waiting for unfinished jobs....
36-
make[1]: *** [CMakeFiles/Makefile2:530: CMakeFiles/opmsimulators.dir/all] Error 2
37-
make: *** [Makefile:146: all] Error 2
22+
cd ../..

0 commit comments

Comments
 (0)