summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorToyohisa Kameyama <kameyama@riken.jp>2020-05-02 00:51:27 +0900
committerGitHub <noreply@github.com>2020-05-01 10:51:27 -0500
commit40f70c4d4f99e806d0d5671f8098783a99bd9691 (patch)
tree97df7f9b196bac02a35f1b85a718b5f685df7ba6 /var
parent69a0fbd2cbb0774f832b8a37a07542ef57991dbf (diff)
downloadspack-40f70c4d4f99e806d0d5671f8098783a99bd9691.tar.gz
spack-40f70c4d4f99e806d0d5671f8098783a99bd9691.tar.bz2
spack-40f70c4d4f99e806d0d5671f8098783a99bd9691.tar.xz
spack-40f70c4d4f99e806d0d5671f8098783a99bd9691.zip
mt-metis: New package. (#16380)
* mt-metis: New package. * variant to 1 line. * delete useless lines.
Diffstat (limited to 'var')
-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)