xref: /petsc/config/examples/arch-ci-linux-cuda-single-cxx.py (revision 6d8694c4fbab79f9439f1ad13c0386ba7ee1ca4b)
1#!/usr/bin/env python3
2
3import os
4petsc_hash_pkgs=os.path.join(os.getenv('HOME'),'petsc-hash-pkgs')
5
6if __name__ == '__main__':
7  import sys
8  import os
9  sys.path.insert(0, os.path.abspath('config'))
10  import configure
11  configure_options = [
12    '--package-prefix-hash='+petsc_hash_pkgs,
13    '--with-make-test-np=15',
14    'COPTFLAGS=-g -O',
15    'FOPTFLAGS=-g -O',
16    'CXXOPTFLAGS=-g -O',
17    '--with-fortran-bindings=0',
18    '--with-log=0',
19    '--with-info=0',
20    '--with-cuda=1',
21    '--with-precision=single',
22    '--with-clanguage=cxx',
23    '--with-single-library=0',
24    '--with-visibility=1',
25    '--download-hpddm',
26    # 28/02/2023, nvc/nvc++ would produce strange segmentation violation errors in C++20
27    # mode that could not be reproduced with any other compiler. Normally the first
28    # response would be 'there must be a bug in the code' -- and that may still be true --
29    # but no less than 3 other CI jobs reproduce the same package/env without these seg
30    # faults. So limiting to C++17 because maybe it *is* the compilers fault this time.
31    '--with-cxx-dialect=17',
32    # Note: If using nvcc with a host compiler other than the CUDA SDK default for your platform (GCC on Linux, clang
33    # on Mac OS X, MSVC on Windows), you must set -ccbin appropriately in CUDAFLAGS, as in the example for PGI below:
34    # 'CUDAFLAGS=-ccbin pgc++',
35    '--with-strict-petscerrorcode',
36  ]
37
38  configure.petsc_configure(configure_options)
39