xref: /petsc/config/examples/arch-ci-linux-hip-double.py (revision d5b43468fb8780a8feea140ccd6fa3e6a50411cc)
1#!/usr/bin/env python3
2
3import os
4petsc_hash_pkgs=os.path.join(os.getenv('HOME'),'petsc-hash-pkgs')
5
6import platform
7if platform.node() == 'instinct':
8  opts = [
9    '--with-mpi-dir=/home/users/balay/soft/mpich-4.0',
10    '--with-blaslapack-dir=/home/users/balay/soft/fblaslapack',
11    '--with-make-np=24',
12    '--with-make-test-np=8',
13    '--with-hipc=/opt/rocm-5.1.0/bin/hipcc',
14    '--with-hip-dir=/opt/rocm-5.1.0',
15  ]
16else:
17  opts = [
18    'LDFLAGS=-L/opt/rh/devtoolset-7/root/usr/lib/gcc/x86_64-redhat-linux/7/lib -lquadmath',
19    '--with-mpi-dir=/scratch/soft/mpich',
20    '--download-fblaslapack',
21    '--download-hypre',
22    '--with-hipc=/opt/rocm/bin/hipcc',
23    '--with-hip-dir=/opt/rocm',
24  ]
25
26if __name__ == '__main__':
27  import sys
28  import os
29  sys.path.insert(0, os.path.abspath('config'))
30  import configure
31  configure_options = opts + [
32    '--package-prefix-hash='+petsc_hash_pkgs,
33    '--download-cmake',
34    'COPTFLAGS=-g -O',
35    'FOPTFLAGS=-g -O',
36    'CXXOPTFLAGS=-g -O',
37    'HIPOPTFLAGS=-g -O',
38    '--with-cuda=0',
39    '--with-hip=1',
40    '--with-precision=double',
41    '--with-clanguage=c',
42    '--download-kokkos',
43    '--download-kokkos-kernels',
44    '--download-hypre-configure-arguments=--enable-unified-memory',
45    '--download-magma',
46    '--with-magma-fortran-bindings=0',
47  ]
48
49  configure.petsc_configure(configure_options)
50