xref: /petsc/config/examples/arch-olcf-spock.py (revision adec9d8e278f0fa385245782b7af1f5f640c16b8)
1#!/usr/bin/python3
2
3#  Modules loaded by default (on login to spock):
4#
5#  1) craype-x86-rome                          8) cce/12.0.3
6#  2) libfabric/1.11.0.4.75                    9) craype/2.7.11
7#  3) craype-network-ofi                      10) cray-dsmml/0.2.2
8#  4) perftools-base/21.10.0                  11) cray-mpich/8.1.10
9#  5) xpmem/2.2.40-2.1_2.44__g3cf3325.shasta  12) cray-libsci/21.08.1.2
10#  6) cray-pmi/6.0.14                         13) PrgEnv-cray/8.2.0
11#  7) cray-pmi-lib/6.0.14                     14) DefApps/default
12#
13# Need to load additional rocm module to build with hip
14#
15# module load rocm/4.3.0
16#
17# Note: LIBS option below is needed to use GPU enabled MPI. It also requires
18# the following env variables to be set at runtime
19#
20# export MPIR_CVAR_GPU_EAGER_DEVICE_MEM=0
21# export MPICH_GPU_SUPPORT_ENABLED=1
22# export MPICH_SMP_SINGLE_COPY_MODE=CMA
23#
24# Additional note: If "craype-accel-amd-gfx908" module is loaded (that is
25# needed for "OpenMP offload") - it causes link errors when using 'cc or hipcc'
26# with fortran objs, hence not used
27#
28
29if __name__ == '__main__':
30  import sys
31  import os
32  sys.path.insert(0, os.path.abspath('config'))
33  import configure
34  configure_options = [
35    '--with-cc=cc',
36    '--with-cxx=CC',
37    '--with-fc=ftn',
38    'LIBS=-L{x}/gtl/lib -lmpi_gtl_hsa'.format(x=os.environ['CRAY_MPICH_ROOTDIR']),
39    '--with-debugging=0',
40    '--with-mpiexec=srun -p ecp -N 1 -A csc314 -t 00:10:00',
41    '--with-hip=1',
42    '--with-hipc=hipcc',
43    '--download-kokkos=1',
44    '--download-kokkos-kernels=1',
45    '--download-magma=1',
46    '--with-magma-gputarget=gfx908',
47  ]
48  configure.petsc_configure(configure_options)
49