xref: /petsc/config/examples/arch-alcf-polaris.py (revision 43cdf1ebbcbfa05bee08e48007ef1bae3f20f4e9)
1#!/usr/bin/python3
2
3# Due to a series of issues (nvhpc versions etc), we don't have a workaround
4# to use the Polaris default modules "PrgEnv-cray nvhpc" to build petsc
5# with Kokkos, we use PrgEnv-gnu instead. One needs to
6#
7# module load cudatoolkit-standalone PrgEnv-gnu cray-libsci
8#
9# Note cray-libsci provides BLAS etc. In summary, we have
10#
11# $ module list
12
13# Currently Loaded Modules:
14#   1) craype-x86-rome          5) cmake/3.23.2                    9) gcc/11.2.0         13) cray-pmi/6.1.2       17) PrgEnv-gnu/8.3.3
15#   2) libfabric/1.11.0.4.125   6) craype-accel-nvidia80          10) craype/2.7.15      14) cray-pmi-lib/6.0.17
16#   3) craype-network-ofi       7) cray-libsci/21.08.1.2          11) cray-dsmml/0.2.2   15) cray-pals/1.1.7
17#   4) perftools-base/22.05.0   8) cudatoolkit-standalone/11.8.0  12) cray-mpich/8.1.16  16) cray-libpals/1.1.7
18
19if __name__ == '__main__':
20  import sys
21  import os
22  sys.path.insert(0, os.path.abspath('config'))
23  import configure
24  configure_options = [
25    '--with-cc=cc',
26    '--with-cxx=CC',
27    '--with-fc=ftn',
28    '--with-debugging=0',
29    '--with-cuda',
30    '--with-cudac=nvcc',
31    '--with-cuda-arch=80', # Since there is no easy way to auto-detect the cuda arch on the gpu-less Polaris login nodes, we explicitly set it.
32    '--download-kokkos',
33    '--download-kokkos-kernels',
34  ]
35  configure.petsc_configure(configure_options)
36
37