summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--var/spack/repos/builtin/packages/intel-mpi-benchmarks/add_const.patch13
-rw-r--r--var/spack/repos/builtin/packages/intel-mpi-benchmarks/package.py5
-rw-r--r--var/spack/repos/builtin/packages/intel-mpi-benchmarks/reorder_benchmark_macros.patch108
3 files changed, 126 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/intel-mpi-benchmarks/add_const.patch b/var/spack/repos/builtin/packages/intel-mpi-benchmarks/add_const.patch
new file mode 100644
index 0000000000..6b807f2c9d
--- /dev/null
+++ b/var/spack/repos/builtin/packages/intel-mpi-benchmarks/add_const.patch
@@ -0,0 +1,13 @@
+diff --git a/src_cpp/args_parser.h b/src_cpp/args_parser.h
+index 0a6c748..cfd6a89 100644
+--- a/src_cpp/args_parser.h
++++ b/src_cpp/args_parser.h
+@@ -216,7 +216,7 @@ class args_parser {
+ protected:
+ std::set<flag_t> flags;
+ std::string current_group;
+- std::map<std::string, std::vector<smart_ptr<option> > > expected_args;
++ std::map<const std::string, std::vector<smart_ptr<option> > > expected_args;
+ std::vector<std::string> unknown_args;
+ option *prev_option;
+ error_t last_error;
diff --git a/var/spack/repos/builtin/packages/intel-mpi-benchmarks/package.py b/var/spack/repos/builtin/packages/intel-mpi-benchmarks/package.py
index 4dba8e74d7..f93b04d343 100644
--- a/var/spack/repos/builtin/packages/intel-mpi-benchmarks/package.py
+++ b/var/spack/repos/builtin/packages/intel-mpi-benchmarks/package.py
@@ -27,6 +27,11 @@ class IntelMpiBenchmarks(MakefilePackage):
depends_on('mpi')
+ # https://github.com/intel/mpi-benchmarks/pull/19
+ patch('add_const.patch', when='@:2019.6')
+ # https://github.com/intel/mpi-benchmarks/pull/20
+ patch('reorder_benchmark_macros.patch', when='@:2019.6')
+
variant(
'benchmark', default='all',
values=('mpi1', 'ext', 'io', 'nbc',
diff --git a/var/spack/repos/builtin/packages/intel-mpi-benchmarks/reorder_benchmark_macros.patch b/var/spack/repos/builtin/packages/intel-mpi-benchmarks/reorder_benchmark_macros.patch
new file mode 100644
index 0000000000..2d77bce886
--- /dev/null
+++ b/var/spack/repos/builtin/packages/intel-mpi-benchmarks/reorder_benchmark_macros.patch
@@ -0,0 +1,108 @@
+diff --git a/src_cpp/EXT/EXT_benchmark.cpp b/src_cpp/EXT/EXT_benchmark.cpp
+index b5179ca..62abd64 100644
+--- a/src_cpp/EXT/EXT_benchmark.cpp
++++ b/src_cpp/EXT/EXT_benchmark.cpp
+@@ -70,9 +70,10 @@ extern "C" {
+
+ using namespace std;
+
+-#define BENCHMARK(BMRK_FN, BMRK_NAME) template class OriginalBenchmark<BenchmarkSuite<BS_EXT>, BMRK_FN>; \
+-DECLARE_INHERITED_TEMPLATE(GLUE_TYPENAME(OriginalBenchmark<BenchmarkSuite<BS_EXT>, BMRK_FN>), BMRK_NAME) \
++#define BENCHMARK(BMRK_FN, BMRK_NAME) \
+ template<> smart_ptr<Bmark_descr> OriginalBenchmark<BenchmarkSuite<BS_EXT>, BMRK_FN>::descr = NULL; \
++DECLARE_INHERITED_TEMPLATE(GLUE_TYPENAME(OriginalBenchmark<BenchmarkSuite<BS_EXT>, BMRK_FN>), BMRK_NAME) \
++template class OriginalBenchmark<BenchmarkSuite<BS_EXT>, BMRK_FN>; \
+ template<> bool OriginalBenchmark<BenchmarkSuite<BS_EXT>, BMRK_FN>::init_description()
+
+ BENCHMARK(IMB_window, Window)
+diff --git a/src_cpp/IO/IO_benchmark.cpp b/src_cpp/IO/IO_benchmark.cpp
+index 6a99612..27f9771 100644
+--- a/src_cpp/IO/IO_benchmark.cpp
++++ b/src_cpp/IO/IO_benchmark.cpp
+@@ -70,9 +70,10 @@ extern "C" {
+
+ using namespace std;
+
+-#define BENCHMARK(BMRK_FN, BMRK_NAME) template class OriginalBenchmark<BenchmarkSuite<BS_IO>, BMRK_FN>; \
+-DECLARE_INHERITED_TEMPLATE(GLUE_TYPENAME(OriginalBenchmark<BenchmarkSuite<BS_IO>, BMRK_FN>), BMRK_NAME) \
++#define BENCHMARK(BMRK_FN, BMRK_NAME) \
+ template<> smart_ptr<Bmark_descr> OriginalBenchmark<BenchmarkSuite<BS_IO>, BMRK_FN>::descr = NULL; \
++DECLARE_INHERITED_TEMPLATE(GLUE_TYPENAME(OriginalBenchmark<BenchmarkSuite<BS_IO>, BMRK_FN>), BMRK_NAME) \
++template class OriginalBenchmark<BenchmarkSuite<BS_IO>, BMRK_FN>; \
+ template<> bool OriginalBenchmark<BenchmarkSuite<BS_IO>, BMRK_FN>::init_description()
+
+ BENCHMARK(IMB_write_indv, S_Write_Indv)
+diff --git a/src_cpp/MPI1/MPI1_benchmark.cpp b/src_cpp/MPI1/MPI1_benchmark.cpp
+index 9f7da65..57a6ceb 100644
+--- a/src_cpp/MPI1/MPI1_benchmark.cpp
++++ b/src_cpp/MPI1/MPI1_benchmark.cpp
+@@ -70,10 +70,11 @@ extern "C" {
+
+ using namespace std;
+
+-#define BENCHMARK(BMRK_FN, BMRK_NAME) template class OriginalBenchmark<BenchmarkSuite<BS_MPI1>, BMRK_FN>; \
+-DECLARE_INHERITED_TEMPLATE(GLUE_TYPENAME(OriginalBenchmark<BenchmarkSuite<BS_MPI1>, BMRK_FN>), BMRK_NAME) \
++#define BENCHMARK(BMRK_FN, BMRK_NAME) \
+ template<> smart_ptr<Bmark_descr> OriginalBenchmark<BenchmarkSuite<BS_MPI1>, BMRK_FN>::descr = NULL; \
+-template<> bool OriginalBenchmark<BenchmarkSuite<BS_MPI1>, BMRK_FN>::init_description()
++DECLARE_INHERITED_TEMPLATE(GLUE_TYPENAME(OriginalBenchmark<BenchmarkSuite<BS_MPI1>, BMRK_FN>), BMRK_NAME) \
++template class OriginalBenchmark<BenchmarkSuite<BS_MPI1>, BMRK_FN>; \
++template<> bool OriginalBenchmark<BenchmarkSuite<BS_MPI1>, BMRK_FN>::init_description()
+
+
+ BENCHMARK(IMB_pingpong, PingPong)
+diff --git a/src_cpp/MT/MT_benchmark.cpp b/src_cpp/MT/MT_benchmark.cpp
+index 2378fbd..9041364 100644
+--- a/src_cpp/MT/MT_benchmark.cpp
++++ b/src_cpp/MT/MT_benchmark.cpp
+@@ -73,12 +73,14 @@ goods and services.
+ return OLDNAME(repeat, skip, in, out, count, type, comm, rank, size, idata, odata); \
+ }
+
+-#define DECLARE_INHERITED_BENCHMARKMT2(BS, FUNC, NAME) template class BenchmarkMT<BS, FUNC>; \
++#define DECLARE_INHERITED_BENCHMARKMT2(BS, FUNC, NAME) \
+ DECLARE_INHERITED_TEMPLATE(GLUE_TYPENAME3(BenchmarkMT<BS, FUNC>), NAME) \
++ template class BenchmarkMT<BS, FUNC>; \
+ template <> void BenchmarkMT<BS, FUNC >::init_flags()
+
+-#define DECLARE_INHERITED_BENCHMARKMT(BS, FUNC, NAME) template class BenchmarkMT<BS, FUNC>; \
++#define DECLARE_INHERITED_BENCHMARKMT(BS, FUNC, NAME) \
+ DECLARE_INHERITED_TEMPLATE(GLUE_TYPENAME2(BenchmarkMT<BS, FUNC>), NAME) \
++ template class BenchmarkMT<BS, FUNC>; \
+ template <> void BenchmarkMT<BS, FUNC >::init_flags()
+
+
+diff --git a/src_cpp/NBC/NBC_benchmark.cpp b/src_cpp/NBC/NBC_benchmark.cpp
+index 94548fd..fa9101d 100644
+--- a/src_cpp/NBC/NBC_benchmark.cpp
++++ b/src_cpp/NBC/NBC_benchmark.cpp
+@@ -70,9 +70,10 @@ extern "C" {
+
+ using namespace std;
+
+-#define BENCHMARK(BMRK_FN, BMRK_NAME) template class OriginalBenchmark<BenchmarkSuite<BS_NBC>, BMRK_FN>; \
+-DECLARE_INHERITED_TEMPLATE(GLUE_TYPENAME(OriginalBenchmark<BenchmarkSuite<BS_NBC>, BMRK_FN>), BMRK_NAME) \
++#define BENCHMARK(BMRK_FN, BMRK_NAME) \
+ template<> smart_ptr<Bmark_descr> OriginalBenchmark<BenchmarkSuite<BS_NBC>, BMRK_FN>::descr = NULL; \
++DECLARE_INHERITED_TEMPLATE(GLUE_TYPENAME(OriginalBenchmark<BenchmarkSuite<BS_NBC>, BMRK_FN>), BMRK_NAME) \
++template class OriginalBenchmark<BenchmarkSuite<BS_NBC>, BMRK_FN>; \
+ template<> bool OriginalBenchmark<BenchmarkSuite<BS_NBC>, BMRK_FN>::init_description()
+
+ BENCHMARK(IMB_ibcast, Ibcast)
+diff --git a/src_cpp/RMA/RMA_benchmark.cpp b/src_cpp/RMA/RMA_benchmark.cpp
+index b33553a..1ed4ce9 100644
+--- a/src_cpp/RMA/RMA_benchmark.cpp
++++ b/src_cpp/RMA/RMA_benchmark.cpp
+@@ -70,9 +70,10 @@ extern "C" {
+
+ using namespace std;
+
+-#define BENCHMARK(BMRK_FN, BMRK_NAME) template class OriginalBenchmark<BenchmarkSuite<BS_RMA>, BMRK_FN>; \
+-DECLARE_INHERITED_TEMPLATE(GLUE_TYPENAME(OriginalBenchmark<BenchmarkSuite<BS_RMA>, BMRK_FN>), BMRK_NAME) \
++#define BENCHMARK(BMRK_FN, BMRK_NAME) \
+ template<> smart_ptr<Bmark_descr> OriginalBenchmark<BenchmarkSuite<BS_RMA>, BMRK_FN>::descr = NULL; \
++DECLARE_INHERITED_TEMPLATE(GLUE_TYPENAME(OriginalBenchmark<BenchmarkSuite<BS_RMA>, BMRK_FN>), BMRK_NAME) \
++template class OriginalBenchmark<BenchmarkSuite<BS_RMA>, BMRK_FN>; \
+ template<> bool OriginalBenchmark<BenchmarkSuite<BS_RMA>, BMRK_FN>::init_description()
+
+