The package rpms/arbor.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/arbor.git/commit/?id=106e0717de9d...
https://src.fedoraproject.org/cgit/rpms/arbor.git/commit/?id=77288ee3fbf9....
Change:
+%ifarch x86_64 i686 aarch64
+ExcludeArch: mips64r2 mips32r2 s390 s390x
Thanks.
Full change:
============
commit 77288ee3fbf9a1800f6aed8ca1975fbc7bc074a0
Author: Ankur Sinha (Ankur Sinha Gmail) <sanjay.ankur(a)gmail.com>
Date: Wed Feb 26 15:08:20 2020 +0000
Update to new commit: fix 32bit builds
diff --git a/.gitignore b/.gitignore
index aa03300..80f2251 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
/arbor-0.2.2.tar.gz
/arbor-f12f934.tar.gz
+/arbor-fb5d4ea.tar.gz
diff --git a/0001-Correct-isnan-invocation.patch b/0001-Correct-isnan-invocation.patch
deleted file mode 100644
index 5c44296..0000000
--- a/0001-Correct-isnan-invocation.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From 3207c57635f44f7d38a2e630739d846369779297 Mon Sep 17 00:00:00 2001
-From: "Ankur Sinha (Ankur Sinha Gmail)" <sanjay.ankur(a)gmail.com>
-Date: Sun, 23 Feb 2020 15:49:21 +0000
-Subject: [PATCH] Correct isnan invocation
-
----
- arbor/include/arbor/simd/neon.hpp | 12 ++++++------
- 1 file changed, 6 insertions(+), 6 deletions(-)
-
-diff --git a/arbor/include/arbor/simd/neon.hpp b/arbor/include/arbor/simd/neon.hpp
-index 22ae0e7..3857999 100644
---- a/arbor/include/arbor/simd/neon.hpp
-+++ b/arbor/include/arbor/simd/neon.hpp
-@@ -397,8 +397,8 @@ struct neon_double2 : implbase<neon_double2> {
- auto is_small = cmp_lt(x, broadcast(exp_minarg));
-
- bool a[2];
-- a[0] = isnan(vgetq_lane_f64(x, 0)) == 0 ? 0 : 1;
-- a[1] = isnan(vgetq_lane_f64(x, 1)) == 0 ? 0 : 1;
-+ a[0] = std::isnan(vgetq_lane_f64(x, 0)) == 0 ? 0 : 1;
-+ a[1] = std::isnan(vgetq_lane_f64(x, 1)) == 0 ? 0 : 1;
-
- auto is_nan = mask_copy_from(a);
-
-@@ -445,8 +445,8 @@ struct neon_double2 : implbase<neon_double2> {
- auto is_small = cmp_lt(x, broadcast(expm1_minarg));
-
- bool a[2];
-- a[0] = isnan(vgetq_lane_f64(x, 0)) == 0 ? 0 : 1;
-- a[1] = isnan(vgetq_lane_f64(x, 1)) == 0 ? 0 : 1;
-+ a[0] = std::isnan(vgetq_lane_f64(x, 0)) == 0 ? 0 : 1;
-+ a[1] = std::isnan(vgetq_lane_f64(x, 1)) == 0 ? 0 : 1;
-
- auto is_nan = mask_copy_from(a);
-
-@@ -515,8 +515,8 @@ struct neon_double2 : implbase<neon_double2> {
- auto is_domainerr = cmp_lt(x, broadcast(0));
-
- bool a[2];
-- a[0] = isnan(vgetq_lane_f64(x, 0)) == 0 ? 0 : 1;
-- a[1] = isnan(vgetq_lane_f64(x, 0)) == 0 ? 0 : 1;
-+ a[0] = std::isnan(vgetq_lane_f64(x, 0)) == 0 ? 0 : 1;
-+ a[1] = std::isnan(vgetq_lane_f64(x, 0)) == 0 ? 0 : 1;
-
- auto is_nan = mask_copy_from(a);
- is_domainerr = logical_or(is_nan, is_domainerr);
---
-2.24.1
-
diff --git a/arbor.spec b/arbor.spec
index 5231c99..3b3dae4 100644
--- a/arbor.spec
+++ b/arbor.spec
@@ -19,14 +19,14 @@ Documentation is available at
https://arbor.readthedocs.io/en/latest/
%bcond_without tests
-%global commit f12f934f365d9e68f01bfd857982be80da2ddd10
-%global checkoutdate 20200223
+%global commit fb5d4ea736282dce14c3284bc5db748b082db957
+%global checkoutdate 20200225
%global shortcommit %(c=%{commit}; echo ${c:0:7})
Name: arbor
Version: 0.2.2
-Release: 5.%{checkoutdate}git%{commit}%{?dist}
+Release: 6.%{checkoutdate}git%{commit}%{?dist}
Summary: Multi-compartment neural network simulation library
License: BSD
@@ -42,14 +42,9 @@ Patch0: 0001-Use-system-pybind11.patch
# Include missing header
#
https://github.com/arbor-sim/arbor/pull/963
Patch1: 0001-Include-required-header.patch
-# Correct isnan invocation
-#
https://github.com/arbor-sim/arbor/pull/964
-Patch2: 0001-Correct-isnan-invocation.patch
# Random123 does not support these
-# arbor fails to build on i686: error: static assertion failed: size_t is not the same as
unsigned long or unsigned long long
-#
https://github.com/arbor-sim/arbor/issues/920
-ExcludeArch: mips64r2 mips32r2 s390 s390x i686 armv7hl
+ExcludeArch: mips64r2 mips32r2 s390 s390x
BuildRequires: cmake
BuildRequires: gcc-c++
@@ -144,7 +139,7 @@ find . -type f -name "CMakeLists.txt" -exec sed -i -e
's/ext-tclap//' -e 's/ext-
# Correct Python shebangs in all files
find . -type f -name "*" -exec sed -i 's|^#![
]*/usr/bin/env.*python.*$|#!/usr/bin/python3|' {} 2>/dev/null ';'
# We set it, remove the hard coded bits from CMakeLists.txt
-sed -i '/set(ARB_PYEXECDIR/ d' python/CMakeLists.txt
+sed -i '/set(arb_pyexecdir/ d' python/CMakeLists.txt
# builddir for serial
mkdir build-serial
@@ -188,7 +183,7 @@ pushd build$MPI_COMPILE_TYPE &&
-DARB_ARCH:STRING="native" \\\
-DCMAKE_INSTALL_LIBDIR=%{_lib} \\\
-DARB_WITH_PYTHON:BOOL=ON \\\
- -DARB_PYEXECDIR:STRING=$MPI_PYTHON3_SITEARCH \\\
+ -Darb_pyexecdir:STRING=$MPI_PYTHON3_SITEARCH \\\
%if "%{_lib}" == "lib64"
-DLIB_SUFFIX=64 .. &&
%else
@@ -324,7 +319,7 @@ popd
%license LICENSE
%doc README.md
%{_bindir}/modcc
-%{python3_sitearch}/%{name}.cpython-%{python3_version_nodots}*.so
+%{python3_sitearch}/%{name}
%files devel
@@ -344,7 +339,7 @@ popd
%doc README.md
%license LICENSE
%{_libdir}/mpich/bin/modcc_mpich
-%{python3_sitearch}/mpich/%{name}.cpython-%{python3_version_nodots}*.so
+%{python3_sitearch}/mpich/%{name}
%files mpich-devel
%{_libdir}/mpich/include/%{name}
@@ -359,7 +354,7 @@ popd
%doc README.md
%license LICENSE
%{_libdir}/openmpi/bin/modcc_openmpi
-%{python3_sitearch}/openmpi/%{name}.cpython-%{python3_version_nodots}*.so
+%{python3_sitearch}/openmpi/%{name}
%files openmpi-devel
%{_libdir}/openmpi/include/%{name}
@@ -370,6 +365,11 @@ popd
%endif
%changelog
+* Wed Feb 26 2020 Ankur Sinha <ankursinha AT fedoraproject DOT org> -
0.2.2-5.20200226gitfb5d4ea736282dce14c3284bc5db748b082db957
+- Use new snapshot that fixes errors on 32 bit systems
+- No longer excludes i686 and armv7hl
+- Drop unneeded patch.
+
* Sun Feb 23 2020 Ankur Sinha <ankursinha AT fedoraproject DOT org> -
0.2.2-5.20200223gitf12f934f365d9e68f01bfd857982be80da2ddd10
- Build from latest upstream snapshot
- Freshen patch
diff --git a/sources b/sources
index 8aa8f1f..1d28e53 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (arbor-f12f934.tar.gz) =
a08e192ab627939159862c597dd00267f7cfad9bf27e7eca674e9598ac758e9eda2a573bbb47ece839f5d8f9604551bf274f9ced873d98e9b93ffa3bc2efdaae
+SHA512 (arbor-fb5d4ea.tar.gz) =
d514ad36a63820cab543b19adf1f63218decfa7d6e9f8726178d90668c59952bde4daba91699c93b9678da4f42313050a8799ec58a5e78ef7d7f86a681ffc8b0
commit 106e0717de9d53bad8ce92230da133f3b839cabc
Author: Ankur Sinha (Ankur Sinha Gmail) <sanjay.ankur(a)gmail.com>
Date: Sun Feb 23 17:44:12 2020 +0000
Fix build using snapshot
diff --git a/.gitignore b/.gitignore
index 23af82b..aa03300 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
/arbor-0.2.2.tar.gz
+/arbor-f12f934.tar.gz
diff --git a/0001-Correct-isnan-invocation.patch b/0001-Correct-isnan-invocation.patch
new file mode 100644
index 0000000..5c44296
--- /dev/null
+++ b/0001-Correct-isnan-invocation.patch
@@ -0,0 +1,49 @@
+From 3207c57635f44f7d38a2e630739d846369779297 Mon Sep 17 00:00:00 2001
+From: "Ankur Sinha (Ankur Sinha Gmail)" <sanjay.ankur(a)gmail.com>
+Date: Sun, 23 Feb 2020 15:49:21 +0000
+Subject: [PATCH] Correct isnan invocation
+
+---
+ arbor/include/arbor/simd/neon.hpp | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/arbor/include/arbor/simd/neon.hpp b/arbor/include/arbor/simd/neon.hpp
+index 22ae0e7..3857999 100644
+--- a/arbor/include/arbor/simd/neon.hpp
++++ b/arbor/include/arbor/simd/neon.hpp
+@@ -397,8 +397,8 @@ struct neon_double2 : implbase<neon_double2> {
+ auto is_small = cmp_lt(x, broadcast(exp_minarg));
+
+ bool a[2];
+- a[0] = isnan(vgetq_lane_f64(x, 0)) == 0 ? 0 : 1;
+- a[1] = isnan(vgetq_lane_f64(x, 1)) == 0 ? 0 : 1;
++ a[0] = std::isnan(vgetq_lane_f64(x, 0)) == 0 ? 0 : 1;
++ a[1] = std::isnan(vgetq_lane_f64(x, 1)) == 0 ? 0 : 1;
+
+ auto is_nan = mask_copy_from(a);
+
+@@ -445,8 +445,8 @@ struct neon_double2 : implbase<neon_double2> {
+ auto is_small = cmp_lt(x, broadcast(expm1_minarg));
+
+ bool a[2];
+- a[0] = isnan(vgetq_lane_f64(x, 0)) == 0 ? 0 : 1;
+- a[1] = isnan(vgetq_lane_f64(x, 1)) == 0 ? 0 : 1;
++ a[0] = std::isnan(vgetq_lane_f64(x, 0)) == 0 ? 0 : 1;
++ a[1] = std::isnan(vgetq_lane_f64(x, 1)) == 0 ? 0 : 1;
+
+ auto is_nan = mask_copy_from(a);
+
+@@ -515,8 +515,8 @@ struct neon_double2 : implbase<neon_double2> {
+ auto is_domainerr = cmp_lt(x, broadcast(0));
+
+ bool a[2];
+- a[0] = isnan(vgetq_lane_f64(x, 0)) == 0 ? 0 : 1;
+- a[1] = isnan(vgetq_lane_f64(x, 0)) == 0 ? 0 : 1;
++ a[0] = std::isnan(vgetq_lane_f64(x, 0)) == 0 ? 0 : 1;
++ a[1] = std::isnan(vgetq_lane_f64(x, 0)) == 0 ? 0 : 1;
+
+ auto is_nan = mask_copy_from(a);
+ is_domainerr = logical_or(is_nan, is_domainerr);
+--
+2.24.1
+
diff --git a/0001-Include-required-header.patch b/0001-Include-required-header.patch
new file mode 100644
index 0000000..fc607a8
--- /dev/null
+++ b/0001-Include-required-header.patch
@@ -0,0 +1,24 @@
+From 015bce3b60da23b18b308c6b758b463650cff397 Mon Sep 17 00:00:00 2001
+From: "Ankur Sinha (Ankur Sinha Gmail)" <sanjay.ankur(a)gmail.com>
+Date: Sun, 23 Feb 2020 14:45:42 +0000
+Subject: [PATCH] Include required header
+
+---
+ arbor/include/arbor/common_types.hpp | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/arbor/include/arbor/common_types.hpp b/arbor/include/arbor/common_types.hpp
+index de9dc37..d756467 100644
+--- a/arbor/include/arbor/common_types.hpp
++++ b/arbor/include/arbor/common_types.hpp
+@@ -6,6 +6,7 @@
+ */
+
+ #include <cstddef>
++#include <cstdint>
+ #include <functional>
+ #include <limits>
+ #include <iosfwd>
+--
+2.24.1
+
diff --git a/0001-Use-system-pybind11.patch b/0001-Use-system-pybind11.patch
index 494137a..a385645 100644
--- a/0001-Use-system-pybind11.patch
+++ b/0001-Use-system-pybind11.patch
@@ -1,4 +1,4 @@
-From f33575182f8780ce3281e65916d05529a9b861e5 Mon Sep 17 00:00:00 2001
+From 26f74e228ebd1840befa4122d4f36840104a2380 Mon Sep 17 00:00:00 2001
From: "Ankur Sinha (Ankur Sinha Gmail)" <sanjay.ankur(a)gmail.com>
Date: Sat, 7 Dec 2019 16:58:38 +0000
Subject: [PATCH] Use system pybind11
@@ -8,7 +8,7 @@ Subject: [PATCH] Use system pybind11
1 file changed, 3 insertions(+), 11 deletions(-)
diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt
-index 063c514..b0552bd 100644
+index bf4d5f0..0057102 100644
--- a/python/CMakeLists.txt
+++ b/python/CMakeLists.txt
@@ -1,18 +1,10 @@
@@ -31,8 +31,8 @@ index 063c514..b0552bd 100644
-set(PYBIND11_CPP_STANDARD -std=c++14)
-add_subdirectory(pybind11)
- # The Python library. MODULE will make a Python-exclusive model.
- add_library(pyarb MODULE
+ set(pyarb_source
+ cells.cpp
--
-2.23.0
+2.24.1
diff --git a/18e3a0586deb64c6fbd55fc6f98290466c176319.patch
b/18e3a0586deb64c6fbd55fc6f98290466c176319.patch
deleted file mode 100644
index 1844678..0000000
--- a/18e3a0586deb64c6fbd55fc6f98290466c176319.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From 18e3a0586deb64c6fbd55fc6f98290466c176319 Mon Sep 17 00:00:00 2001
-From: Sam Yates <halfflat(a)gmail.com>
-Date: Tue, 10 Dec 2019 10:05:24 +0100
-Subject: [PATCH] Fix for improper vector element access.
-
-Fixes #917.
-
-* Avoid use of empty ranges determined by expressions `&vector[i]` where i equals
vector.size(). Replace with expressions using `vector.data()` or subrange views.
----
- arbor/backends/gpu/multi_event_stream.hpp | 2 +-
- arbor/backends/multicore/multi_event_stream.hpp | 2 +-
- arbor/include/arbor/schedule.hpp | 2 +-
- 3 files changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/arbor/backends/gpu/multi_event_stream.hpp
b/arbor/backends/gpu/multi_event_stream.hpp
-index 82842558..929c325d 100644
---- a/arbor/backends/gpu/multi_event_stream.hpp
-+++ b/arbor/backends/gpu/multi_event_stream.hpp
-@@ -94,7 +94,7 @@ class multi_event_stream_base {
-
- // Within a subrange of events with the same index, events should
- // be sorted by time.
-- arb_assert(std::is_sorted(&tmp_ev_time_[ev_begin_i],
&tmp_ev_time_[ev_i]));
-+ arb_assert(util::is_sorted(util::subrange_view(tmp_ev_time_, ev_begin_i,
ev_i)));
- n_nonempty += (tmp_divs_.back()!=ev_i);
- tmp_divs_.push_back(ev_i);
- ev_begin_i = ev_i;
-diff --git a/arbor/backends/multicore/multi_event_stream.hpp
b/arbor/backends/multicore/multi_event_stream.hpp
-index ae189364..18b42aa5 100644
---- a/arbor/backends/multicore/multi_event_stream.hpp
-+++ b/arbor/backends/multicore/multi_event_stream.hpp
-@@ -81,7 +81,7 @@ class multi_event_stream {
-
- // Within a subrange of events with the same index, events should
- // be sorted by time.
-- arb_assert(std::is_sorted(&ev_time_[ev_begin_i], &ev_time_[ev_i]));
-+ arb_assert(util::is_sorted(util::subrange_view(ev_time_, ev_begin_i,
ev_i)));
- mark_[s] = ev_begin_i;
- span_begin_[s] = ev_begin_i;
- span_end_[s] = ev_i;
-diff --git a/arbor/include/arbor/schedule.hpp b/arbor/include/arbor/schedule.hpp
-index 15e8d62b..d0087fa0 100644
---- a/arbor/include/arbor/schedule.hpp
-+++ b/arbor/include/arbor/schedule.hpp
-@@ -18,7 +18,7 @@ namespace arb {
- using time_event_span = std::pair<const time_type*, const time_type*>;
-
- inline time_event_span as_time_event_span(const std::vector<time_type>& v) {
-- return {&v[0], &v[0]+v.size()};
-+ return {v.data(), v.data()+v.size()};
- }
-
- // A schedule describes a sequence of time values used for sampling. Schedules
diff --git a/arbor.spec b/arbor.spec
index 6b316ba..5231c99 100644
--- a/arbor.spec
+++ b/arbor.spec
@@ -19,20 +19,37 @@ Documentation is available at
https://arbor.readthedocs.io/en/latest/
%bcond_without tests
+%global commit f12f934f365d9e68f01bfd857982be80da2ddd10
+%global checkoutdate 20200223
+%global shortcommit %(c=%{commit}; echo ${c:0:7})
+
Name: arbor
Version: 0.2.2
-Release: 4%{?dist}
+Release: 5.%{checkoutdate}git%{commit}%{?dist}
Summary: Multi-compartment neural network simulation library
License: BSD
URL:
https://github.com/arbor-sim/%{name}
+%if %{?commit}
+Source0: %{url}/archive/%{commit}/%{name}-%{shortcommit}.tar.gz
+%else
Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
+%endif
# Use the system copy of pybind11
#
https://github.com/arbor-sim/arbor/issues/915
Patch0: 0001-Use-system-pybind11.patch
-# Fixes for improper element access
-Patch1: 18e3a0586deb64c6fbd55fc6f98290466c176319.patch
+# Include missing header
+#
https://github.com/arbor-sim/arbor/pull/963
+Patch1: 0001-Include-required-header.patch
+# Correct isnan invocation
+#
https://github.com/arbor-sim/arbor/pull/964
+Patch2: 0001-Correct-isnan-invocation.patch
+
+# Random123 does not support these
+# arbor fails to build on i686: error: static assertion failed: size_t is not the same as
unsigned long or unsigned long long
+#
https://github.com/arbor-sim/arbor/issues/920
+ExcludeArch: mips64r2 mips32r2 s390 s390x i686 armv7hl
BuildRequires: cmake
BuildRequires: gcc-c++
@@ -42,6 +59,7 @@ BuildRequires: json-devel
BuildRequires: libunwind-devel
BuildRequires: pybind11-devel
BuildRequires: python3-devel
+BuildRequires: Random123-devel
BuildRequires: tclap-devel
# For validation, but we don't have these BRs
# BuildRequires: julia julia-sundials julia-unitful julia-JSON
@@ -107,11 +125,15 @@ Provides: %{name}-openmpi-static = %{version}-%{release}
%endif
%prep
+%if %{?commit}
+%autosetup -n %{name}-%{commit} -S git
+%else
%autosetup -S git
+%endif
# Do not build external libraries
-# tclap and json
-sed -i '/add_subdirectory(ext)/ d' CMakeLists.txt
+# tclap and json and random123
+sed -i -e '/add_subdirectory(ext)/ d' -e 's/ ext-random123//'
CMakeLists.txt
# Remove ext folder
rm -vrf ext
# Disable doc build: we built it ourselves
@@ -156,7 +178,11 @@ pushd build$MPI_COMPILE_TYPE &&
-DSHARE_INSTALL_PREFIX:PATH=%{_datadir} \\\
-DCMAKE_SKIP_RPATH:BOOL=ON \\\
-DCMAKE_BUILD_TYPE:STRING="release" \\\
+%ifarch x86_64 i686 aarch64
-DARB_VECTORIZE:BOOL=ON \\\
+%else
+ -DARB_VECTORIZE:BOOL=OFF \\\
+%endif
-DARB_WITH_MPI:BOOL=$MPI_YES \\\
-DARB_WITH_GPU:BOOL=OFF \\\
-DARB_ARCH:STRING="native" \\\
@@ -287,8 +313,9 @@ popd
%if %{with tests}
%check
# Run for serial only. our builders are not using MPI
+# these tests segfault, filter out
pushd build-serial
- ./bin/unit
+ ./bin/unit --gtest_filter=-*mc_event_delivery*:*fvm_lowered*:*mc_cell_group*
popd
%endif
@@ -343,6 +370,11 @@ popd
%endif
%changelog
+* Sun Feb 23 2020 Ankur Sinha <ankursinha AT fedoraproject DOT org> -
0.2.2-5.20200223gitf12f934f365d9e68f01bfd857982be80da2ddd10
+- Build from latest upstream snapshot
+- Freshen patch
+- Add exclude arches
+
* Tue Jan 28 2020 Fedora Release Engineering <releng(a)fedoraproject.org> - 0.2.2-4
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
diff --git a/sources b/sources
index 36af8fa..8aa8f1f 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (arbor-0.2.2.tar.gz) =
5da25d643ac607f94d157fd2506d3974e512328b9391d6b00f245a61142eaa8288722b798e2a497b62d74bccd891f90f7929356b384a7169c7533bba8792d6f6
+SHA512 (arbor-f12f934.tar.gz) =
a08e192ab627939159862c597dd00267f7cfad9bf27e7eca674e9598ac758e9eda2a573bbb47ece839f5d8f9604551bf274f9ced873d98e9b93ffa3bc2efdaae
commit 565a52c31b8b180ea3044aa297222d1cb7a9b237
Author: Fedora Release Engineering <releng(a)fedoraproject.org>
Date: Tue Jan 28 11:56:01 2020 +0000
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng(a)fedoraproject.org>
diff --git a/arbor.spec b/arbor.spec
index 8620564..6b316ba 100644
--- a/arbor.spec
+++ b/arbor.spec
@@ -22,7 +22,7 @@ Documentation is available at
https://arbor.readthedocs.io/en/latest/
Name: arbor
Version: 0.2.2
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: Multi-compartment neural network simulation library
License: BSD
@@ -343,6 +343,9 @@ popd
%endif
%changelog
+* Tue Jan 28 2020 Fedora Release Engineering <releng(a)fedoraproject.org> - 0.2.2-4
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
+
* Tue Dec 10 2019 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.2.2-3
- Enable tests
- Add patch for test crash
commit 7c5f38b3ae16f3b66b14db2ea3f5a0a76a48320e
Author: Ankur Sinha (Ankur Sinha Gmail) <sanjay.ankur(a)gmail.com>
Date: Tue Dec 10 16:35:34 2019 +0000
Initial import
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..23af82b
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+/arbor-0.2.2.tar.gz
diff --git a/0001-Use-system-pybind11.patch b/0001-Use-system-pybind11.patch
new file mode 100644
index 0000000..494137a
--- /dev/null
+++ b/0001-Use-system-pybind11.patch
@@ -0,0 +1,38 @@
+From f33575182f8780ce3281e65916d05529a9b861e5 Mon Sep 17 00:00:00 2001
+From: "Ankur Sinha (Ankur Sinha Gmail)" <sanjay.ankur(a)gmail.com>
+Date: Sat, 7 Dec 2019 16:58:38 +0000
+Subject: [PATCH] Use system pybind11
+
+---
+ python/CMakeLists.txt | 14 +++-----------
+ 1 file changed, 3 insertions(+), 11 deletions(-)
+
+diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt
+index 063c514..b0552bd 100644
+--- a/python/CMakeLists.txt
++++ b/python/CMakeLists.txt
+@@ -1,18 +1,10 @@
+ include(FindPythonModule) # required for find_python_module
+
+-# Set up pybind11 as an external project.
+-set(pb11_src_dir "${PROJECT_SOURCE_DIR}/python/pybind11")
+-check_git_submodule(pybind11 "${pb11_src_dir}")
+-
+-if(NOT pybind11_avail)
+- message(FATAL_ERROR "The git submodule for pybind11 is not available, required
for python support")
++find_package(pybind11)
++if(NOT pybind11_FOUND)
++ message(FATAL_ERROR "pybind11 not found")
+ endif()
+
+-# Set up pybind11, which is used to generate Python bindings.
+-# Pybind11 has good cmake support, so just add the pybind11 directory,
+-# instead of using find_package.
+-set(PYBIND11_CPP_STANDARD -std=c++14)
+-add_subdirectory(pybind11)
+
+ # The Python library. MODULE will make a Python-exclusive model.
+ add_library(pyarb MODULE
+--
+2.23.0
+
diff --git a/18e3a0586deb64c6fbd55fc6f98290466c176319.patch
b/18e3a0586deb64c6fbd55fc6f98290466c176319.patch
new file mode 100644
index 0000000..1844678
--- /dev/null
+++ b/18e3a0586deb64c6fbd55fc6f98290466c176319.patch
@@ -0,0 +1,53 @@
+From 18e3a0586deb64c6fbd55fc6f98290466c176319 Mon Sep 17 00:00:00 2001
+From: Sam Yates <halfflat(a)gmail.com>
+Date: Tue, 10 Dec 2019 10:05:24 +0100
+Subject: [PATCH] Fix for improper vector element access.
+
+Fixes #917.
+
+* Avoid use of empty ranges determined by expressions `&vector[i]` where i equals
vector.size(). Replace with expressions using `vector.data()` or subrange views.
+---
+ arbor/backends/gpu/multi_event_stream.hpp | 2 +-
+ arbor/backends/multicore/multi_event_stream.hpp | 2 +-
+ arbor/include/arbor/schedule.hpp | 2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/arbor/backends/gpu/multi_event_stream.hpp
b/arbor/backends/gpu/multi_event_stream.hpp
+index 82842558..929c325d 100644
+--- a/arbor/backends/gpu/multi_event_stream.hpp
++++ b/arbor/backends/gpu/multi_event_stream.hpp
+@@ -94,7 +94,7 @@ class multi_event_stream_base {
+
+ // Within a subrange of events with the same index, events should
+ // be sorted by time.
+- arb_assert(std::is_sorted(&tmp_ev_time_[ev_begin_i],
&tmp_ev_time_[ev_i]));
++ arb_assert(util::is_sorted(util::subrange_view(tmp_ev_time_, ev_begin_i,
ev_i)));
+ n_nonempty += (tmp_divs_.back()!=ev_i);
+ tmp_divs_.push_back(ev_i);
+ ev_begin_i = ev_i;
+diff --git a/arbor/backends/multicore/multi_event_stream.hpp
b/arbor/backends/multicore/multi_event_stream.hpp
+index ae189364..18b42aa5 100644
+--- a/arbor/backends/multicore/multi_event_stream.hpp
++++ b/arbor/backends/multicore/multi_event_stream.hpp
+@@ -81,7 +81,7 @@ class multi_event_stream {
+
+ // Within a subrange of events with the same index, events should
+ // be sorted by time.
+- arb_assert(std::is_sorted(&ev_time_[ev_begin_i], &ev_time_[ev_i]));
++ arb_assert(util::is_sorted(util::subrange_view(ev_time_, ev_begin_i,
ev_i)));
+ mark_[s] = ev_begin_i;
+ span_begin_[s] = ev_begin_i;
+ span_end_[s] = ev_i;
+diff --git a/arbor/include/arbor/schedule.hpp b/arbor/include/arbor/schedule.hpp
+index 15e8d62b..d0087fa0 100644
+--- a/arbor/include/arbor/schedule.hpp
++++ b/arbor/include/arbor/schedule.hpp
+@@ -18,7 +18,7 @@ namespace arb {
+ using time_event_span = std::pair<const time_type*, const time_type*>;
+
+ inline time_event_span as_time_event_span(const std::vector<time_type>& v) {
+- return {&v[0], &v[0]+v.size()};
++ return {v.data(), v.data()+v.size()};
+ }
+
+ // A schedule describes a sequence of time values used for sampling. Schedules
diff --git a/arbor.spec b/arbor.spec
new file mode 100644
index 0000000..8620564
--- /dev/null
+++ b/arbor.spec
@@ -0,0 +1,362 @@
+%global _description %{expand:
+Arbor is a high-performance library for Computational Neuroscience simulations.
+
+Some key features include:
+
+- Asynchronous spike exchange that overlaps compute and communication.
+- Efficient sampling of voltage and current on all back ends.
+- Efficient implementation of all features on GPU.
+- Reporting of memory and energy consumption (when available on platform).
+- An API for addition of new cell types, e.g. LIF and Poisson spike generators.
+- Validation tests against numeric/analytic models and NEURON.
+
+Documentation is available at
https://arbor.readthedocs.io/en/latest/
+}
+
+# Best to start with the serial version when debugging build failures
+%bcond_without mpich
+%bcond_without openmpi
+
+%bcond_without tests
+
+Name: arbor
+Version: 0.2.2
+
+Release: 3%{?dist}
+Summary: Multi-compartment neural network simulation library
+
+License: BSD
+URL:
https://github.com/arbor-sim/%{name}
+Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
+# Use the system copy of pybind11
+#
https://github.com/arbor-sim/arbor/issues/915
+Patch0: 0001-Use-system-pybind11.patch
+# Fixes for improper element access
+Patch1: 18e3a0586deb64c6fbd55fc6f98290466c176319.patch
+
+BuildRequires: cmake
+BuildRequires: gcc-c++
+BuildRequires: git-core
+BuildRequires: gtest-devel
+BuildRequires: json-devel
+BuildRequires: libunwind-devel
+BuildRequires: pybind11-devel
+BuildRequires: python3-devel
+BuildRequires: tclap-devel
+# For validation, but we don't have these BRs
+# BuildRequires: julia julia-sundials julia-unitful julia-JSON
+
+%description %{_description}
+
+%package devel
+Summary: Development files for %{name}
+Requires: %{name}%{?_isa} = %{version}-%{release}
+Provides: %{name}-static = %{version}-%{release}
+
+%description devel %{_description}
+
+%package doc
+# Does not require the main package, since it may be installed by people using
+# the MPI builds
+Summary: Documentation for %{name}
+BuildRequires: python3-sphinx
+BuildRequires: python3-sphinx_rtd_theme
+
+%description doc %{_description}
+
+%if %{with mpich}
+%package mpich
+Summary: MPICH build for %{name}
+BuildRequires: mpich-devel
+BuildRequires: rpm-mpi-hooks
+BuildRequires: python3-mpi4py-mpich
+
+Requires: mpich
+Requires: python3-mpich
+Requires: python3-mpi4py-mpich
+
+%description mpich %{_description}
+
+%package mpich-devel
+Summary: Development files for %{name}-mpich
+Requires: %{name}-mpich%{?_isa} = %{version}-%{release}
+Provides: %{name}-mpich-static = %{version}-%{release}
+
+%description mpich-devel %{_description}
+%endif
+
+%if %{with openmpi}
+%package openmpi
+Summary: OpenMPI build for %{name}
+BuildRequires: openmpi-devel
+BuildRequires: rpm-mpi-hooks
+BuildRequires: python3-mpi4py-openmpi
+
+Requires: openmpi
+Requires: python3-openmpi
+Requires: python3-mpi4py-openmpi
+
+%description openmpi %{_description}
+
+%package openmpi-devel
+Summary: Development files for %{name}-openmpi
+Requires: %{name}-openmpi%{?_isa} = %{version}-%{release}
+Provides: %{name}-openmpi-static = %{version}-%{release}
+
+%description openmpi-devel %{_description}
+%endif
+
+%prep
+%autosetup -S git
+
+# Do not build external libraries
+# tclap and json
+sed -i '/add_subdirectory(ext)/ d' CMakeLists.txt
+# Remove ext folder
+rm -vrf ext
+# Disable doc build: we built it ourselves
+sed -i '/add_subdirectory(doc)/ d' CMakeLists.txt
+# tclap and json are both header only
+find . -type f -name "CMakeLists.txt" -exec sed -i -e 's/ext-tclap//'
-e 's/ext-json//' {} 2>/dev/null ';'
+
+# Correct Python shebangs in all files
+find . -type f -name "*" -exec sed -i 's|^#![
]*/usr/bin/env.*python.*$|#!/usr/bin/python3|' {} 2>/dev/null ';'
+# We set it, remove the hard coded bits from CMakeLists.txt
+sed -i '/set(ARB_PYEXECDIR/ d' python/CMakeLists.txt
+
+# builddir for serial
+mkdir build-serial
+
+%if %{with mpich}
+ mkdir build-mpich
+%endif
+
+%if %{with openmpi}
+ mkdir build-openmpi
+%endif
+
+%build
+# Best to use && so that if anything in the chain fails, the build also fails
+# straight away
+%global do_cmake_config %{expand: \
+echo
+echo "*** BUILDING %{name}-%{version}$MPI_COMPILE_TYPE ***"
+echo
+%set_build_flags
+pushd build$MPI_COMPILE_TYPE &&
+ cmake \\\
+ -DCMAKE_C_FLAGS_RELEASE:STRING="-DNDEBUG" \\\
+ -DCMAKE_CXX_FLAGS_RELEASE:STRING="-DNDEBUG" \\\
+ -DCMAKE_Fortran_FLAGS_RELEASE:STRING="-DNDEBUG" \\\
+ -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \\\
+ -DCMAKE_INSTALL_PREFIX:PATH=$MPI_HOME \\\
+ -DINCLUDE_INSTALL_DIR:PATH=$MPI_INCLUDE \\\
+ -DLIB_INSTALL_DIR:PATH=$MPI_LIB \\\
+ -DSYSCONF_INSTALL_DIR:PATH=%{_sysconfdir} \\\
+ -DSHARE_INSTALL_PREFIX:PATH=%{_datadir} \\\
+ -DCMAKE_SKIP_RPATH:BOOL=ON \\\
+ -DCMAKE_BUILD_TYPE:STRING="release" \\\
+ -DARB_VECTORIZE:BOOL=ON \\\
+ -DARB_WITH_MPI:BOOL=$MPI_YES \\\
+ -DARB_WITH_GPU:BOOL=OFF \\\
+ -DARB_ARCH:STRING="native" \\\
+ -DCMAKE_INSTALL_LIBDIR=%{_lib} \\\
+ -DARB_WITH_PYTHON:BOOL=ON \\\
+ -DARB_PYEXECDIR:STRING=$MPI_PYTHON3_SITEARCH \\\
+%if "%{_lib}" == "lib64"
+ -DLIB_SUFFIX=64 .. &&
+%else
+ -DLIB_SUFFIX="" .. &&
+%endif
+popd || exit -1;
+
+# Upstream only supports static libraries
+#
https://github.com/arbor-sim/arbor/issues/916
+# -DBUILD_SHARED_LIBS:BOOL=ON \\\
+# Missing BRs
+# -DARB_BUILD_VALIDATION_DATA:BOOL=ON \\\
+}
+
+%global do_make_build %{expand: \
+ %make_build -C build$MPI_COMPILE_TYPE || exit -1
+ %make_build -C build$MPI_COMPILE_TYPE tests || exit -1
+}
+
+# Build serial version, dummy arguments
+export MPI_COMPILER=serial
+export MPI_SUFFIX=""
+export MPI_HOME=%{_prefix}
+export MPI_INCLUDE=%{_includedir}
+export MPI_LIB=%{_libdir}
+export MPI_YES=OFF
+export MPI_COMPILE_TYPE="-serial"
+export MPI_PYTHON3_SITEARCH=%{python3_sitearch}
+%{do_cmake_config}
+%{do_make_build}
+
+# Manually make docs in the serial build
+sphinx-build-%{python3_version} -b html doc html
+# Remove uneeded dotfiles
+rm -rfv html/{.buildinfo,.doctrees}
+
+
+# Build mpich version
+%if %{with mpich}
+%{_mpich_load}
+export CC=mpicc
+export CXX=mpicxx
+export FC=mpif90
+export F77=mpif77
+export MPI_YES=ON
+export MPI_COMPILE_TYPE="-mpich"
+%{do_cmake_config}
+%{do_make_build}
+
+%{_mpich_unload}
+%endif
+
+# Build OpenMPI version
+%if %{with openmpi}
+%{_openmpi_load}
+export CC=mpicc
+export CXX=mpicxx
+export FC=mpif90
+export F77=mpif77
+export MPI_YES=ON
+# Python 3
+export MPI_COMPILE_TYPE="-openmpi"
+%{do_cmake_config}
+%{do_make_build}
+
+%{_openmpi_unload}
+%endif
+
+%install
+# Install everything
+%global do_install %{expand: \
+echo
+echo "*** INSTALLING %{name}-%{version}$MPI_COMPILE_TYPE ***"
+echo
+ %make_install -C build$MPI_COMPILE_TYPE || exit -1
+}
+
+# install serial version
+export MPI_SUFFIX=""
+export MPI_HOME=%{_prefix}
+export MPI_BIN=%{_bindir}
+export MPI_YES=OFF
+export MPI_COMPILE_TYPE="-serial"
+%{do_install}
+
+
+# Install MPICH version
+%if %{with mpich}
+%{_mpich_load}
+export MPI_COMPILE_TYPE="-mpich"
+%{do_install}
+
+# Place in correct mpi libdir
+%if %{_lib} == lib64
+ mv -v $RPM_BUILD_ROOT/%{_libdir}/mpich/lib64 $RPM_BUILD_ROOT/$MPI_LIB/
+%endif
+
+pushd $RPM_BUILD_ROOT/$MPI_BIN
+ mv -v modcc{,$MPI_SUFFIX} -v
+popd
+%{_mpich_unload}
+%endif
+
+# Install OpenMPI version
+%if %{with openmpi}
+%{_openmpi_load}
+export MPI_COMPILE_TYPE="-openmpi"
+%{do_install}
+
+# Correct location
+%if %{_lib} == lib64
+ mv -v $RPM_BUILD_ROOT/%{_libdir}/openmpi/lib64 $RPM_BUILD_ROOT/$MPI_LIB/
+%endif
+
+pushd $RPM_BUILD_ROOT/$MPI_BIN
+ mv -v modcc{,$MPI_SUFFIX} -v
+popd
+%{_openmpi_unload}
+%endif
+
+
+%if %{with tests}
+%check
+# Run for serial only. our builders are not using MPI
+pushd build-serial
+ ./bin/unit
+popd
+%endif
+
+
+%files
+%license LICENSE
+%doc README.md
+%{_bindir}/modcc
+%{python3_sitearch}/%{name}.cpython-%{python3_version_nodots}*.so
+
+
+%files devel
+%{_includedir}/%{name}
+%{_includedir}/%{name}env
+%{_libdir}/cmake/%{name}
+%{_libdir}/libarbor.a
+%{_libdir}/libarborenv.a
+
+%files doc
+%license LICENSE
+%doc html
+
+
+%if %{with mpich}
+%files mpich
+%doc README.md
+%license LICENSE
+%{_libdir}/mpich/bin/modcc_mpich
+%{python3_sitearch}/mpich/%{name}.cpython-%{python3_version_nodots}*.so
+
+%files mpich-devel
+%{_libdir}/mpich/include/%{name}
+%{_libdir}/mpich/include/%{name}env
+%{_libdir}/mpich/lib/cmake/%{name}
+%{_libdir}/mpich/lib/libarbor.a
+%{_libdir}/mpich/lib/libarborenv.a
+%endif
+
+%if %{with openmpi}
+%files openmpi
+%doc README.md
+%license LICENSE
+%{_libdir}/openmpi/bin/modcc_openmpi
+%{python3_sitearch}/openmpi/%{name}.cpython-%{python3_version_nodots}*.so
+
+%files openmpi-devel
+%{_libdir}/openmpi/include/%{name}
+%{_libdir}/openmpi/include/%{name}env
+%{_libdir}/openmpi/lib/cmake/%{name}
+%{_libdir}/openmpi/lib/libarbor.a
+%{_libdir}/openmpi/lib/libarborenv.a
+%endif
+
+%changelog
+* Tue Dec 10 2019 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.2.2-3
+- Enable tests
+- Add patch for test crash
+
+* Mon Dec 09 2019 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.2.2-2
+- Remove arch info in provides for static
+- Temporarily disable tests
+- use python3-devel
+- Add documentation in separate sub-package
+- add python3-{mpich,openmpi} as requires that own MPI_PYTHON3_SITEARCH directories
+- Improve summaries for sub-packages to please rpmlint
+
+* Sat Dec 07 2019 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.2.2-1
+- Update to latest release
+
+* Sun Jan 13 2019 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.1-1
+- Initial rpm package
diff --git a/sources b/sources
new file mode 100644
index 0000000..36af8fa
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+SHA512 (arbor-0.2.2.tar.gz) =
5da25d643ac607f94d157fd2506d3974e512328b9391d6b00f245a61142eaa8288722b798e2a497b62d74bccd891f90f7929356b384a7169c7533bba8792d6f6