diff options
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/fastjet/atlas.patch | 22 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/fastjet/package.py | 3 |
2 files changed, 25 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/fastjet/atlas.patch b/var/spack/repos/builtin/packages/fastjet/atlas.patch new file mode 100644 index 0000000000..66b9cc1d1f --- /dev/null +++ b/var/spack/repos/builtin/packages/fastjet/atlas.patch @@ -0,0 +1,22 @@ +--- include/fastjet/GhostedAreaSpec.hh.orig 2020-06-03 13:15:12.952183980 +0200
++++ include/fastjet/GhostedAreaSpec.hh 2020-06-03 13:16:00.676275264 +0200
+@@ -232,7 +232,7 @@
+
+
+ std::vector<int> _random_checkpoint;
+- static BasicRandom<double> _random_generator;
++ thread_local static BasicRandom<double> _random_generator;
+ //mutable BasicRandom<double> _random_generator;
+
+ static LimitedWarning _warn_fj2_placement_deprecated;
+--- src/GhostedAreaSpec.cc.orig 2020-06-04 11:37:41.196758510 +0200
++++ src/GhostedAreaSpec.cc 2020-06-04 11:38:07.499240761 +0200
+@@ -37,7 +37,7 @@
+
+ FASTJET_BEGIN_NAMESPACE // defined in fastjet/internal/base.hh
+
+-BasicRandom<double> GhostedAreaSpec::_random_generator;
++thread_local BasicRandom<double> GhostedAreaSpec::_random_generator;
+ LimitedWarning GhostedAreaSpec::_warn_fj2_placement_deprecated;
+
+ /// explicit constructor
diff --git a/var/spack/repos/builtin/packages/fastjet/package.py b/var/spack/repos/builtin/packages/fastjet/package.py index b6aec4d8e8..ea2bb05c3e 100644 --- a/var/spack/repos/builtin/packages/fastjet/package.py +++ b/var/spack/repos/builtin/packages/fastjet/package.py @@ -52,6 +52,9 @@ class Fastjet(AutotoolsPackage): variant('shared', default=True, description='Builds a shared version of the library') variant('auto-ptr', default=False, description='Use auto_ptr') + variant('atlas', default=False, description='Patch to make random generator thread_local') + + patch('atlas.patch', when='+atlas') def configure_args(self): extra_args = ["--enable-allplugins"] |