1
1
# meshFields
2
2
GPU friendly unstructured mesh field storage and interface
3
3
4
- ## build dependencies
4
+ ## build dependencies for GPU
5
5
6
- The following commands were tested on a SCOREC workstation running RHEL7 with a
7
- Nvidia Turing GPU.
6
+ The following commands were tested on a SCOREC workstation running RHEL9 with a
7
+ Nvidia Ampere GPU.
8
8
9
9
` cd ` to a working directory that will contain * all* your source code (including
10
10
this directory) and build directories. That directory is referred to as ` root `
11
11
in the following bash scripts.
12
12
13
- Create a file named ` envRhel7_turing .sh` with the following contents:
13
+ Create a file named ` envRhel7_ampere .sh` with the following contents:
14
14
15
15
```
16
16
export root=$PWD
17
- module unuse /opt/scorec/spack/lmod/linux-rhel7-x86_64/Core
18
- module use /opt/scorec/spack/v0154_2/lmod/linux-rhel7-x86_64/Core
19
- module load gcc/10.1.0 cmake cuda/11.4
17
+ module use /opt/scorec/spack/rhel9/v0201_4/lmod/linux-rhel9-x86_64/Core/
18
+ module load gcc/12.3.0-iil3lno mpich/4.1.1-xpoyz4t cuda/12.1.1-zxa4msk
20
19
21
20
function getname() {
22
21
name=$1
@@ -35,7 +34,7 @@ echo "kokkos install dir: $kk"
35
34
```
36
35
37
36
38
- Create a file named ` buildAll_turing .sh` with the following contents:
37
+ Create a file named ` buildAll_ampere .sh` with the following contents:
39
38
40
39
```
41
40
#!/bin/bash -e
@@ -48,7 +47,7 @@ mkdir -p $kk
48
47
cd $_/..
49
48
cmake ../kokkos \
50
49
-DCMAKE_CXX_COMPILER=$root/kokkos/bin/nvcc_wrapper \
51
- -DKokkos_ARCH_TURING75 =ON \
50
+ -DKokkos_ARCH_AMPERE86 =ON \
52
51
-DKokkos_ENABLE_SERIAL=ON \
53
52
-DKokkos_ENABLE_OPENMP=off \
54
53
-DKokkos_ENABLE_CUDA=on \
@@ -60,7 +59,7 @@ make -j 24 install
60
59
61
60
#omegah
62
61
cd $root
63
- git clone [email protected] :sandialabs /omega_h.git
62
+ git clone [email protected] :scorec /omega_h.git
64
63
[ -d $oh ] && rm -rf ${oh%%install}
65
64
mkdir -p $oh
66
65
cd ${oh%%install}
@@ -69,7 +68,7 @@ cmake ../omega_h \
69
68
-DBUILD_SHARED_LIBS=OFF \
70
69
-DOmega_h_USE_Kokkos=ON \
71
70
-DOmega_h_USE_CUDA=on \
72
- -DOmega_h_CUDA_ARCH=75 \
71
+ -DOmega_h_CUDA_ARCH=86 \
73
72
-DOmega_h_USE_MPI=OFF \
74
73
-DBUILD_TESTING=on \
75
74
-DCMAKE_CXX_COMPILER=g++ \
@@ -98,29 +97,27 @@ make -j 24 install
98
97
Make the script executable:
99
98
100
99
```
101
- chmod +x buildAll_turing .sh
100
+ chmod +x buildAll_ampere .sh
102
101
```
103
102
104
103
105
104
Source the environment script from this work directory:
106
105
107
106
```
108
- source envRhel7_turing .sh
107
+ source envRhel7_ampere .sh
109
108
```
110
109
111
110
Run the build script:
112
111
113
112
```
114
- ./buildAll_turing .sh
113
+ ./buildAll_ampere .sh
115
114
```
116
115
117
116
## build dependencies for CPU
118
117
119
118
This build serves to help debugging, check for memory leaks via valgrind, and
120
- run tests for coverage. (GPU code is not registered as having been run by GCOV
121
- and subsequently LCOV.) These commands can be run in your root directory but you
122
- will need to re-source the enviornment script and re-run the build script for the
123
- GPU build when you want to return to it.
119
+ run tests for coverage. GPU code is not registered as having been run by GCOV
120
+ and subsequently LCOV.
124
121
125
122
` cd ` to a working directory that will contain * all* your source code (including
126
123
this directory) and build directories. That directory is referred to as ` root `
@@ -130,12 +127,9 @@ Create a file named `envCpu.sh` with the following contents:
130
127
131
128
```
132
129
export root=$PWD
133
- module unuse /opt/scorec/spack/lmod/linux-rhel7-x86_64/Core
134
- module use /opt/scorec/spack/v0154_2/lmod/linux-rhel7-x86_64/Core
135
- module load lcov/1.16 py-gcovr/4.2
136
- module load gcc/10.1.0 cmake
137
- module load perl/5.30.3
138
- module load perl-io-compress/2.081
130
+ module use /opt/scorec/spack/rhel9/v0201_4/lmod/linux-rhel9-x86_64/Core/
131
+ module load gcc/12.3.0-iil3lno mpich/4.1.1-xpoyz4t
132
+
139
133
function getname() {
140
134
name=$1
141
135
machine=`hostname -s`
@@ -173,7 +167,7 @@ cmake ../kokkos \
173
167
make -j 24 install
174
168
#omegah
175
169
cd $root
176
- git clone https:// github.com/sandialabs /omega_h.git
170
+ git clone git@ github.com:scorec /omega_h.git
177
171
[ -d $ohCpu ] && rm -rf ${ohCpu%%install}
178
172
mkdir -p $ohCpu
179
173
cd ${ohCpu%%install}
@@ -225,14 +219,14 @@ Run the build script:
225
219
226
220
## build meshFields
227
221
228
- The following assumes that the environment is already setup (see above) and the
222
+ The following assumes that the environment is already setup (see above, either CPU or GPU ) and the
229
223
` root ` directory is the same directory used to build the dependencies.
230
224
231
225
```
232
226
cd $root
233
227
git clone [email protected] :SCOREC/meshFields
234
- cmake -S meshFields -B build-meshFields-cuda
235
- cmake --build build-meshFields-cuda
228
+ cmake -S meshFields -B build-meshFields-[CPU|GPU]
229
+ cmake --build build-meshFields-[CPU|GPU]
236
230
```
237
231
238
232
## rebuild meshFields
0 commit comments