petsc: pass in 'cuda_arch' to configure via --with-cuda-gencodearch [or CUDAFLAGS for older releases] (#24962)
This commit is contained in:
parent
330507f329
commit
2c87992506
@ -431,6 +431,15 @@ def install(self, spec, prefix):
|
||||
library=petsclibname, path=spec[library].prefix)
|
||||
)
|
||||
|
||||
if '+cuda' in spec:
|
||||
if not spec.satisfies('cuda_arch=none'):
|
||||
cuda_arch = spec.variants['cuda_arch'].value
|
||||
if spec.satisfies('@3.14:'):
|
||||
options.append('--with-cuda-gencodearch={0}'.format(cuda_arch[0]))
|
||||
else:
|
||||
options.append('CUDAFLAGS=-gencode arch=compute_{0},code=sm_{0}'
|
||||
.format(cuda_arch[0]))
|
||||
|
||||
# PETSc does not pick up SuperluDist from the dir as they look for
|
||||
# superlu_dist_4.1.a
|
||||
if 'superlu-dist' in spec:
|
||||
|
Loading…
Reference in New Issue
Block a user