def install_test(self): source_file = join_path(os.path.dirname(self.module.__file__), 'test_cblas_dgemm.c') blessed_file = join_path(os.path.dirname(self.module.__file__), 'test_cblas_dgemm.output') include_flags = ["-I%s" % self.spec.prefix.include] link_flags = self.spec['atlas'].libs.ld_flags.split() output = compile_c_and_execute(source_file, include_flags, link_flags) compare_output_file(output, blessed_file)
def install_test(self): source_file = join_path(os.path.dirname(self.module.__file__), 'test_cblas_dgemm.c') blessed_file = join_path(os.path.dirname(self.module.__file__), 'test_cblas_dgemm.output') include_flags = ["-I%s" % self.spec.prefix.include] link_flags = self.libs.ld_flags.split() output = compile_c_and_execute(source_file, include_flags, link_flags) compare_output_file(output, blessed_file)
def check_install(self): # Build and run a small program to test the installed OpenCL library spec = self.spec print("Checking pocl installation...") checkdir = "spack-check" with working_dir(checkdir, create=True): source = join_path(os.path.dirname(self.module.__file__), "example1.c") cflags = spec["pocl"].headers.cpp_flags.split() # ldflags = spec["pocl"].libs.ld_flags.split() ldflags = ["-L%s" % spec["pocl"].prefix.lib, "-lOpenCL", "-lpoclu"] output = compile_c_and_execute(source, cflags, ldflags) compare_output_file( output, join_path(os.path.dirname(self.module.__file__), "example1.out"))
def check_install(self): spec = self.spec # Openblas may pass its own test but still fail to compile Lapack # symbols. To make sure we get working Blas and Lapack, do a small # test. source_file = join_path(os.path.dirname(self.module.__file__), 'test_cblas_dgemm.c') blessed_file = join_path(os.path.dirname(self.module.__file__), 'test_cblas_dgemm.output') include_flags = spec['openblas'].headers.cpp_flags link_flags = spec['openblas'].libs.ld_flags if self.compiler.name == 'intel': link_flags += ' -lifcore' if self.spec.satisfies('threads=pthreads'): link_flags += ' -lpthread' if spec.satisfies('threads=openmp'): link_flags += ' -lpthread ' + self.compiler.openmp_flag output = compile_c_and_execute(source_file, [include_flags], link_flags.split()) compare_output_file(output, blessed_file)
def check_install(self): spec = self.spec # Openblas may pass its own test but still fail to compile Lapack # symbols. To make sure we get working Blas and Lapack, do a small # test. source_file = join_path(os.path.dirname(self.module.__file__), 'test_cblas_dgemm.c') blessed_file = join_path(os.path.dirname(self.module.__file__), 'test_cblas_dgemm.output') include_flags = spec['openblas'].headers.cpp_flags link_flags = spec['openblas'].libs.ld_flags if self.compiler.name == 'intel': link_flags += ' -lifcore' if self.spec.satisfies('threads=pthreads'): link_flags += ' -lpthread' if spec.satisfies('threads=openmp'): link_flags += ' -lpthread ' + self.compiler.openmp_flag output = compile_c_and_execute( source_file, [include_flags], link_flags.split() ) compare_output_file(output, blessed_file)