diff options
author | Denis Davydov <davydden@gmail.com> | 2016-04-02 12:01:46 +0200 |
---|---|---|
committer | Denis Davydov <davydden@gmail.com> | 2016-04-02 12:03:57 +0200 |
commit | 624b576b1e21ea476eaf7fdc3ee38a97194e45f7 (patch) | |
tree | b1aa27b91d512839ebdff6493c85a24a5e38f057 /var | |
parent | f5a77d39580d215f8d4948b2cbe6c8d47d4fd514 (diff) | |
download | spack-624b576b1e21ea476eaf7fdc3ee38a97194e45f7.tar.gz spack-624b576b1e21ea476eaf7fdc3ee38a97194e45f7.tar.bz2 spack-624b576b1e21ea476eaf7fdc3ee38a97194e45f7.tar.xz spack-624b576b1e21ea476eaf7fdc3ee38a97194e45f7.zip |
metis: fix compilation with Clang 7.3.0, add tests
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/metis/package.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/metis/package.py b/var/spack/repos/builtin/packages/metis/package.py index 9301135f9f..d3bab554fe 100644 --- a/var/spack/repos/builtin/packages/metis/package.py +++ b/var/spack/repos/builtin/packages/metis/package.py @@ -79,10 +79,28 @@ class Metis(Package): if '+double' in spec: filter_file('REALTYPEWIDTH 32', 'REALTYPEWIDTH 64', metis_header) + # Make clang 7.3 happy. + # Prevents "ld: section __DATA/__thread_bss extends beyond end of file" + # See upstream LLVM issue https://llvm.org/bugs/show_bug.cgi?id=27059 + # Adopted from https://github.com/Homebrew/homebrew-science/blob/master/metis.rb + if spec.satisfies('%clang@7.3.0'): + filter_file('#define MAX_JBUFS 128', '#define MAX_JBUFS 24', join_path(source_directory, 'GKlib', 'error.c')) + with working_dir(build_directory, create=True): cmake(source_directory, *options) make() make("install") + # now run some tests: + for f in ["4elt", "copter2", "mdual"]: + graph = join_path(source_directory,'graphs','%s.graph' % f) + Executable(join_path(prefix.bin,'graphchk'))(graph) + Executable(join_path(prefix.bin,'gpmetis'))(graph,'2') + Executable(join_path(prefix.bin,'ndmetis'))(graph) + + graph = join_path(source_directory,'graphs','test.mgraph') + Executable(join_path(prefix.bin,'gpmetis'))(graph,'2') + graph = join_path(source_directory,'graphs','metis.mesh') + Executable(join_path(prefix.bin,'mpmetis'))(graph,'2') # install GKlib headers, which will be needed for ParMETIS GKlib_dist = join_path(prefix.include,'GKlib') |