From 89cd768cf2ba68342e77775e71ee70cf0be0e5cb Mon Sep 17 00:00:00 2001 From: Germann Elsa Sylvia Date: Tue, 11 Oct 2022 17:14:15 +0200 Subject: [PATCH] FIX: fix the cuda_arch on the fly and create dir --- env/merlin/HyQuas/packages/hyquas/package.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/env/merlin/HyQuas/packages/hyquas/package.py b/env/merlin/HyQuas/packages/hyquas/package.py index 0a3117f..5c0b952 100644 --- a/env/merlin/HyQuas/packages/hyquas/package.py +++ b/env/merlin/HyQuas/packages/hyquas/package.py @@ -66,12 +66,13 @@ class Hyquas(CMakePackage, CudaPackage): def build_cutt(self): cuda_arch = self.spec.variants['cuda_arch'].value[0] + # Filtering CMakefile & Makefile to change the cuda arch flags which are hardcoded CMakefile = FileFilter('CMakeLists.txt') - CMakefile.filter(r'^\s*CUDA_NVCC_FLAGS\s*=.*', 'CUDA_NVCC_FLAGS := -Xcompiler -fopenmp -std=c++14 -O2 -g -arch=compute_' + cuda_arch + '-code=sm_' + cuda_arch + '--ptxas-options=-v -lineinfo -keep' ) + CMakefile.filter("CUDA_NVCC_FLAGS .*", "CUDA_NVCC_FLAGS \"-Xcompiler -fopenmp -std=c++14 -O2 -g -arch=compute_{0} -code=sm_{0} --ptxas-options=-v -lineinfo -keep\")".format(cuda_arch)) with working_dir('./third-party/cutt'): makefile = FileFilter('Makefile') + makefile.filter("GENCODE_FLAGS := .*", "GENCODE_FLAGS := -gencode arch=compute_{0},code=sm_{0}".format(cuda_arch)) - makefile.filter(r'^\s*GENCODE_FLAGS\s*=.*', 'GENCODE_FLAGS := -gencode arch=compute_' + cuda_arch +',code=sm_' + cuda_arch ) make() def cmake_args(self): @@ -95,5 +96,7 @@ class Hyquas(CMakePackage, CudaPackage): def install(self, spec, prefix): mkdir(prefix.bin) + with working_dir(self.stage.source_path): + mkdirp('evaluator-preprocess/parameter-files') with working_dir(self.build_directory): install('main', prefix.bin)