summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorketsubouchi <kenta.tsubouchi@hac-inc.co.jp>2021-01-06 13:24:50 +0900
committerGitHub <noreply@github.com>2021-01-05 22:24:50 -0600
commit15a7723645b31b3c48551f53deba34af293c33dc (patch)
tree845d9a1fe4b8ea22b742ab37e3a06abe7d19ee85 /var
parent0111a18b23e847021f0ef17fdcb2d3dca25005d6 (diff)
downloadspack-15a7723645b31b3c48551f53deba34af293c33dc.tar.gz
spack-15a7723645b31b3c48551f53deba34af293c33dc.tar.bz2
spack-15a7723645b31b3c48551f53deba34af293c33dc.tar.xz
spack-15a7723645b31b3c48551f53deba34af293c33dc.zip
alps: fix for latest gcc and test bug (#20462)
* gcc build OK * gcc mc-01 OK * time test problem * remove comment and debug * use climit * TAB to spaces * comment
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/alps/alps_climit.patch11
-rw-r--r--var/spack/repos/builtin/packages/alps/alps_cmake_time.patch11
-rw-r--r--var/spack/repos/builtin/packages/alps/alps_newgcc.patch59
-rw-r--r--var/spack/repos/builtin/packages/alps/package.py10
4 files changed, 89 insertions, 2 deletions
diff --git a/var/spack/repos/builtin/packages/alps/alps_climit.patch b/var/spack/repos/builtin/packages/alps/alps_climit.patch
new file mode 100644
index 0000000000..63a45a069a
--- /dev/null
+++ b/var/spack/repos/builtin/packages/alps/alps_climit.patch
@@ -0,0 +1,11 @@
+diff -u -r -N e/alps/src/alps/osiris/xdrcore.C h/alps/src/alps/osiris/xdrcore.C
+--- e/alps/src/alps/osiris/xdrcore.C 2020-11-04 12:59:46.000000000 +0900
++++ h/alps/src/alps/osiris/xdrcore.C 2020-12-16 11:45:16.000000000 +0900
+@@ -66,6 +66,7 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <stdlib.h>
++#include <climits>
+
+ #include <alps/osiris/xdrcore.h>
+
diff --git a/var/spack/repos/builtin/packages/alps/alps_cmake_time.patch b/var/spack/repos/builtin/packages/alps/alps_cmake_time.patch
new file mode 100644
index 0000000000..0b64d830bd
--- /dev/null
+++ b/var/spack/repos/builtin/packages/alps/alps_cmake_time.patch
@@ -0,0 +1,11 @@
+--- a/alps/config/run_test.cmake 2020-12-10 10:05:48.925076699 +0900
++++ b/alps/config/run_test.cmake 2020-12-10 11:37:18.180959480 +0900
+@@ -3,7 +3,7 @@
+ # (See accompanying file LICENSE_1_0.txt or copy at
+ # http://www.boost.org/LICENSE_1_0.txt)
+
+-find_program(cmd_path ${cmd} ${binarydir} ${dllexedir})
++find_program(cmd_path ${cmd} ${binarydir} ${dllexedir} NO_SYSTEM_ENVIRONMENT_PATH)
+
+ find_file(input_path ${input}.input ${binarydir} ${sourcedir})
+ if(NOT input_path)
diff --git a/var/spack/repos/builtin/packages/alps/alps_newgcc.patch b/var/spack/repos/builtin/packages/alps/alps_newgcc.patch
new file mode 100644
index 0000000000..27e89ad90f
--- /dev/null
+++ b/var/spack/repos/builtin/packages/alps/alps_newgcc.patch
@@ -0,0 +1,59 @@
+diff -u -r -N a/alps/applications/dmrg/dmrg/dmtk/system.h b/alps/applications/dmrg/dmrg/dmtk/system.h
+--- a/alps/applications/dmrg/dmrg/dmtk/system.h 2020-10-20 15:38:28.000000000 +0900
++++ b/alps/applications/dmrg/dmrg/dmtk/system.h 2020-10-20 15:40:15.000000000 +0900
+@@ -577,8 +577,11 @@
+ {
+ s.write((const char *)&_numsweeps, sizeof(size_t));
+ for(int i = 1; i <= _numsweeps; i++){
+- s.write((const char *)&_sweeps(0,i), sizeof(double));
+- s.write((const char *)&_sweeps(1,i), sizeof(double));
++ double x;
++ x = _sweeps(0,i);
++ s.write((const char *)&x, sizeof(double));
++ x = _sweeps(1,i);
++ s.write((const char *)&x, sizeof(double));
+ }
+ s.write((const char *)&_in_warmup, sizeof(bool));
+ s.write((const char *)&_sweep, sizeof(int));
+diff -u -r -N a/alps/applications/dmrg/mps/framework/dmrg/mp_tensors/twositetensor.hpp b/alps/applications/dmrg/mps/framework/dmrg/mp_tensors/twositetensor.hpp
+--- a/alps/applications/dmrg/mps/framework/dmrg/mp_tensors/twositetensor.hpp 2020-10-20 14:47:06.000000000 +0900
++++ b/alps/applications/dmrg/mps/framework/dmrg/mp_tensors/twositetensor.hpp 2020-10-20 14:47:53.000000000 +0900
+@@ -216,8 +216,8 @@
+ swap(this->left_i, b.left_i);
+ swap(this->right_i, b.right_i);
+ swap(this->data_, b.data_);
+- swap(this->cur_storage, b.cur_storage);
+- swap(this->cur_normalization, b.cur_normalization);
++ this->swap(this->cur_storage, b.cur_storage);
++ this->swap(this->cur_normalization, b.cur_normalization);
+ }
+
+ template<class Matrix, class SymmGroup>
+diff -u -r -N a/alps/applications/qmc/sse4/model.h b/alps/applications/qmc/sse4/model.h
+--- a/alps/applications/qmc/sse4/model.h 2020-10-20 15:12:20.000000000 +0900
++++ b/alps/applications/qmc/sse4/model.h 2020-12-15 14:56:27.000000000 +0900
+@@ -140,11 +140,6 @@
+ return diag_vertex_indices[e_index(state, utype, sites)];
+ }
+
+- double max_diag_me() const
+- {
+- return _max_diag_me;
+- }
+-
+ double c(unsigned unit_type) const
+ {
+ return epsilon + _max_diag_me[unit_type];
+diff -u -r -N a/alps/src/alps/alea/histogram.h b/alps/src/alps/alea/histogram.h
+--- a/alps/src/alps/alea/histogram.h 2020-10-20 14:49:19.000000000 +0900
++++ b/alps/src/alps/alea/histogram.h 2020-12-15 14:56:59.000000000 +0900
+@@ -85,9 +85,7 @@
+ // forward a few things from container
+
+ const_iterator begin() const { return histogram_.begin();}
+- const_iterator rbegin() const { return histogram_.rbegin();}
+ const_iterator end() const { return histogram_.end();}
+- const_iterator rend() const { return histogram_.rend();}
+ size_type size() const { return histogram_.size();}
+ value_type operator[](size_type i) const { return histogram_[i];}
+ value_type at(size_type i) const { return histogram_.at(i);}
diff --git a/var/spack/repos/builtin/packages/alps/package.py b/var/spack/repos/builtin/packages/alps/package.py
index 4e3e1ca092..e0a5cb5c16 100644
--- a/var/spack/repos/builtin/packages/alps/package.py
+++ b/var/spack/repos/builtin/packages/alps/package.py
@@ -33,12 +33,18 @@ class Alps(CMakePackage):
depends_on('py-scipy', type=('build', 'run'))
depends_on('py-matplotlib', type=('build', 'run'))
- # build fails with gcc@7:
- conflicts('%gcc@7:')
+ # fix for gcc@7:
+ patch('alps_newgcc.patch', when='%gcc@7:')
# remove a problematic build variable
patch('mpi.patch')
+ # include climits to use INT_MAX
+ patch('alps_climit.patch')
+
+ # ctest tries to test '/usr/bin/time'
+ patch('alps_cmake_time.patch')
+
extends('python')
root_cmakelists_dir = 'alps'