xref: /petsc/config/examples/arch-olcf-crusher.py (revision e600fa544e2bb197ca2af9b6e65ea465976dec56)
1#!/usr/bin/python3
2
3#  Modules loaded by default (on login to Crusher):
4#
5# 1) craype-x86-trento                       8) cce/13.0.0
6# 2) libfabric/1.13.0.0                      9) craype/2.7.13
7# 3) craype-network-ofi                     10) cray-dsmml/0.2.2
8# 4) perftools-base/21.12.0                 11) cray-mpich/8.1.12
9# 5) xpmem/2.3.2-2.2_1.16__g9ea452c.shasta  12) cray-libsci/21.08.1.2
10# 6) cray-pmi/6.0.16                        13) PrgEnv-cray/8.2.0
11# 7) cray-pmi-lib/6.0.16                    14) DefApps/default
12#
13# Need to load additional rocm module to build with hip
14#
15# module load rocm/4.5.0
16#
17# We use Cray Programming Environment, Cray compilers, Cray-mpich.
18# To enable GPU-aware MPI, one has to also set this runtime environment variable
19#
20# export MPICH_GPU_SUPPORT_ENABLED=1
21#
22# Additional note: If "craype-accel-amd-gfx90a" module is loaded (that is
23# needed for "OpenMP offload") - it causes link errors when using 'cc or hipcc'
24# with fortran objs, hence not used
25#
26
27if __name__ == '__main__':
28  import sys
29  import os
30  sys.path.insert(0, os.path.abspath('config'))
31  import configure
32  configure_options = [
33    '--with-cc=cc',
34    '--with-cxx=CC',
35    '--with-fc=ftn',
36    'LIBS=-L{x}/gtl/lib -lmpi_gtl_hsa'.format(x=os.environ['CRAY_MPICH_ROOTDIR']),
37    '--with-debugging=0',
38    '--with-mpiexec=srun -p batch -N 1 -A csc314_crusher -t 00:10:00',
39    '--with-hip',
40    '--with-hipc=hipcc',
41    '--download-kokkos',
42    '--download-kokkos-kernels',
43  ]
44  configure.petsc_configure(configure_options)
45