summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordarmac <xiaojun2@hisilicon.com>2020-08-07 14:51:47 +0800
committerGitHub <noreply@github.com>2020-08-06 23:51:47 -0700
commit6fc6f1ea9d8d7142ea3374b9a54d053b1f0d1dd4 (patch)
treef5c7b154074e8e94bf0dd8c1b25d665a2eb5788b
parent463aaef092443563c8ae6f9a5ee559f064ff9bc3 (diff)
downloadspack-6fc6f1ea9d8d7142ea3374b9a54d053b1f0d1dd4.tar.gz
spack-6fc6f1ea9d8d7142ea3374b9a54d053b1f0d1dd4.tar.bz2
spack-6fc6f1ea9d8d7142ea3374b9a54d053b1f0d1dd4.tar.xz
spack-6fc6f1ea9d8d7142ea3374b9a54d053b1f0d1dd4.zip
activeharmony: add version 4.6.0 (#17867)
-rw-r--r--var/spack/repos/builtin/packages/activeharmony/fix_logical_bug_in_slave_list_parsing.patch29
-rw-r--r--var/spack/repos/builtin/packages/activeharmony/package.py27
2 files changed, 52 insertions, 4 deletions
diff --git a/var/spack/repos/builtin/packages/activeharmony/fix_logical_bug_in_slave_list_parsing.patch b/var/spack/repos/builtin/packages/activeharmony/fix_logical_bug_in_slave_list_parsing.patch
new file mode 100644
index 0000000000..08141143d9
--- /dev/null
+++ b/var/spack/repos/builtin/packages/activeharmony/fix_logical_bug_in_slave_list_parsing.patch
@@ -0,0 +1,29 @@
+diff --git a/code-server/code_generator.cxx b/code-server/code_generator.cxx
+index df25400..1c213f7 100644
+--- a/code-server/code_generator.cxx
++++ b/code-server/code_generator.cxx
+@@ -574,13 +574,13 @@ int parse_slave_list(const char* hostlist)
+ }
+
+ // Skip leading whitespace.
+- while (head < tail && (head == '\0' || isspace(*head))) {
++ while (head < tail && (*head == '\0' || isspace(*head))) {
+ ++head;
+ }
+ host_ptr = head;
+
+ // Find host boundary whitespace.
+- while (head < tail && (head != '\0' && !isspace(*head))) {
++ while (head < tail && (*head != '\0' && !isspace(*head))) {
+ ++head;
+ }
+ host = string(host_ptr, head++);
+@@ -596,7 +596,7 @@ int parse_slave_list(const char* hostlist)
+ }
+
+ // Skip trailing whitespace.
+- while (head < tail && (head == '\0' || isspace(*head))) {
++ while (head < tail && (*head == '\0' || isspace(*head))) {
+ ++head;
+ }
+
diff --git a/var/spack/repos/builtin/packages/activeharmony/package.py b/var/spack/repos/builtin/packages/activeharmony/package.py
index 179a5a68cc..45a55e5600 100644
--- a/var/spack/repos/builtin/packages/activeharmony/package.py
+++ b/var/spack/repos/builtin/packages/activeharmony/package.py
@@ -6,14 +6,33 @@
from spack import *
-class Activeharmony(Package):
+class Activeharmony(MakefilePackage):
"""Active Harmony: a framework for auto-tuning (the automated search for
- values to improve the performance of a target application)."""
+ values to improve the performance of a target application)."""
+
homepage = "http://www.dyninst.org/harmony"
url = "http://www.dyninst.org/sites/default/files/downloads/harmony/ah-4.5.tar.gz"
- version('4.5', sha256='31d9990c8dd36724d336707d260aa4d976e11eaa899c4c7cc11f80a56cdac684')
+ version('4.6.0', sha256='9ce5009cfd8e2f4cf5f3536e1fea9993414fc25920fc90d0a2cb56f044787dbb')
+ version('4.5', sha256='31d9990c8dd36724d336707d260aa4d976e11eaa899c4c7cc11f80a56cdac684')
+
+ patch('fix_logical_bug_in_slave_list_parsing.patch', sha256='3e000616f84de80b262efcae7559d65eed0efcd53e915580dab63b0ffbbb8bf2', when='@4.6.0')
+
+ cflags = ['-O3', '-fPIC']
+ def setup_build_environment(self, spack_env):
+ spack_env.set('CFLAGS', ' '.join(self.cflags))
+
+ @when('@:4.5')
def install(self, spec, prefix):
- make("CFLAGS=-O3")
make("install", 'PREFIX=%s' % prefix)
+
+ @when('@4.6.0:')
+ def install(self, spec, prefix):
+ make("install")
+ install_tree("./bin", prefix.bin)
+ install("./src/harmony.cfg", prefix.bin)
+ install_tree("./lib", prefix.lib)
+ install_tree("./libexec", prefix.libexec)
+ install_tree("./include", prefix.include)
+ install_tree("./doc", prefix.doc)