summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xvar/spack/repos/builtin/packages/mt-metis/non_x8664.patch14
-rw-r--r--var/spack/repos/builtin/packages/mt-metis/package.py37
2 files changed, 51 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/mt-metis/non_x8664.patch b/var/spack/repos/builtin/packages/mt-metis/non_x8664.patch
new file mode 100755
index 0000000000..8eb305e5c2
--- /dev/null
+++ b/var/spack/repos/builtin/packages/mt-metis/non_x8664.patch
@@ -0,0 +1,14 @@
+diff --git a/domlib/dlmacros.h b/domlib/dlmacros.h
+index 2cbca90..d231b75 100644
+--- a/domlib/dlmacros.h
++++ b/domlib/dlmacros.h
+@@ -211,7 +211,9 @@
+ #else
+ static inline void _mm_pause(void)
+ {
++#ifdef _x86_64__
+ __asm__ ( "pause;" );
++#endif
+ }
+ #endif
+
diff --git a/var/spack/repos/builtin/packages/mt-metis/package.py b/var/spack/repos/builtin/packages/mt-metis/package.py
new file mode 100644
index 0000000000..805c86836c
--- /dev/null
+++ b/var/spack/repos/builtin/packages/mt-metis/package.py
@@ -0,0 +1,37 @@
+# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
+# Spack Project Developers. See the top-level COPYRIGHT file for details.
+#
+# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+
+from spack import *
+
+
+class MtMetis(CMakePackage):
+ """
+ mt-Metis is a multithreaded multilevel graph partitioning an ordering
+ tool. It is based on the algorithms used in Metis and ParMetis
+ """
+
+ homepage = "http://glaros.dtc.umn.edu/gkhome/views/metis"
+ url = "http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/mt-metis-0.6.0.tar.gz"
+
+ version('0.6.0', sha256='cb8fb836b630a899edbeca4e1da19ec9eb47e89903bda83e7ec62cb0ffdcc284')
+
+ # avoid asm('pause') for no x86_64 familly.
+ patch('non_x8664.patch')
+
+ variant('shared', default=True, description='Enable build of shared libraries')
+
+ def cmake_args(self):
+ define = CMakePackage.define
+ cmake_args = [
+ define('DOMLIB_PATH', 'domlib'),
+ define('WILDRIVER_PATH', 'wildriver'),
+ define('METIS_PATH', 'metis'),
+ self.define_from_variant('SHARED', 'shared'),
+ ]
+ return cmake_args
+
+ @property
+ def libs(self):
+ return find_libraries(['libmtmetis', 'libwildriver'], self.prefix.lib)