Debian Codegraph @

packages/stk/stk_integration_tests/cmake_install_test/README_spack_cuda_recipe

raw
1
2 # recipe for creating a spack env and building trilinos/stk,
3 # then building a stk-test-app using the spack-installed trilinos/stk
4 #
5 # Note: this is on ascicgpu057 as of March 27, 2024
6 # Note2: edit user-specific paths below
7
8 mkdir -p /fgs/william/sandbox_spack
9 cd /fgs/william/sandbox_spack
10
11 git clone --depth=100 --branch=releases/v0.21 https://github.com/spack/spack.git
12 source ./spack/share/spack/setup-env.sh
13
14 spack env create mystkcudaenv
15 spack env activate mystkcudaenv
16 module load aue/gcc/10.3.0
17 spack compiler add
18 #optionally remove old compilers that spack found
19 spack compiler remove [email protected]
20 spack compiler remove [email protected]
21
22 spack add [email protected]~shared
23 spack add zlib
24 spack add [email protected]
25 spack add [email protected]+cuda+wrapper+cuda_constexpr+cuda_lambda+cuda_relocatable_device_code~shared cuda_arch=70
26 spack add trilinos@master+cuda+cuda_rdc+exodus+stk+kokkos+wrapper~shared~boost cuda_arch=70 cxxstd=17
27
28 spack external find
29 # if spack didn't find [email protected], add these lines in `spack config edit`:
30 # openmpi:
31 # externals:
32 # - spec: [email protected]
33 # modules:
34 # - aue/openmpi/4.1.6-gcc-10.3.0
35 # buildable: false
36
37 spack concretize -f
38 spack install
39
40 spack load cmake
41 spack load openmpi
42
43 # this is necessary on our ascicgpu057 machine, perhaps not in general
44 export OMPI_CXX=$(find $(spack location -i kokkos) -name nvcc_wrapper)
45
46 cp -r /fgs/william/code/stk/stk_integration_tests/cmake_install_test/stk_test_app .
47 cd stk_test_app
48 source run_cmake_in_spack_cuda_env
49 #note: the run_cmake_in_spack_cuda_env script also did 'cd build' so you're now in build subdir
50 make
51 mpirun --np 4 ./test_stk_app
52