예제 #1
0
    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)
예제 #2
0
파일: package.py 프로젝트: LLNL/spack
    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)
예제 #3
0
파일: package.py 프로젝트: scheibelp/spack
 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"))
예제 #4
0
파일: package.py 프로젝트: LLNL/spack
 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"))
예제 #5
0
파일: package.py 프로젝트: tepperly/spack
    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)
예제 #6
0
파일: package.py 프로젝트: LLNL/spack
    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)