The package rpms/nest.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/nest.git/commit/?id=90ec03a3aa5b84e6....
Change: -%ifarch armv7hl
Thanks.
Full change: ============
commit 9f269677394e52d31c91421dfab266904ebb7e15 Author: Ankur Sinha (Ankur Sinha Gmail) sanjay.ankur@gmail.com Date: Mon Dec 27 15:59:38 2021 +0000
feat: use rpmautospec
diff --git a/changelog b/changelog new file mode 100644 index 0000000..6521997 --- /dev/null +++ b/changelog @@ -0,0 +1,137 @@ +* Thu Dec 23 2021 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 3.1-1 +- Update to 3.1 +- Reduce parallel runs for arm +- Disable lto for arm + +* Thu Dec 23 2021 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 3.0-1 +- Update to new version +- Disable GLIBCXX_ASSERTIONS for the time being +- https://github.com/nest/nest-simulator/issues/2101 + +* Thu Jul 22 2021 Fedora Release Engineering releng@fedoraproject.org - 2.20.1-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Fri Jun 04 2021 Python Maint python-maint@redhat.com - 2.20.1-8 +- Rebuilt for Python 3.10 + +* Tue Jan 26 2021 Fedora Release Engineering releng@fedoraproject.org - 2.20.1-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Fri Jan 08 2021 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 2.20.1-6 +- Make headers arch specific + +* Mon Aug 10 2020 Jeff Law law@redhat.com - 2.20.0-5 +- Disable LTO on armv7hl for now + +* Sat Aug 01 2020 Fedora Release Engineering releng@fedoraproject.org - 2.20.0-4 +- Second attempt - Rebuilt for + https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Tue Jul 28 2020 Fedora Release Engineering releng@fedoraproject.org - 2.20.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Tue May 26 2020 Miro Hrončok mhroncok@redhat.com - 2.20.0-2 +- Rebuilt for Python 3.9 + +* Sat Feb 01 2020 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 2.20.0-1 +- Update to 2.20.0 + +* Wed Jan 29 2020 Fedora Release Engineering releng@fedoraproject.org - 2.18.0-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Wed Oct 16 2019 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 2.18.0-7 +- Rebuild with MUSIC support +- MUSIC requires MPI support to be enabled + +* Thu Oct 03 2019 Miro Hrončok mhroncok@redhat.com - 2.18.0-6 +- Rebuilt for Python 3.8.0rc1 (#1748018) + +* Wed Aug 21 2019 Miro Hrončok mhroncok@redhat.com - 2.18.0-5 +- Rebuilt for Python 3.8 + +* Tue Aug 20 2019 Susi Lehtola jussilehtola@fedoraproject.org - 2.18.0-4 +- Rebuilt for GSL 2.6. + +* Mon Aug 19 2019 Miro Hrončok mhroncok@redhat.com - 2.18.0-3 +- Rebuilt for Python 3.8 + +* Thu Jul 25 2019 Fedora Release Engineering releng@fedoraproject.org - 2.18.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Fri Jul 19 2019 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 2.18.0-1 +- Update to 2.18 +- Re-enable 32bit arches +- Update patch +- Drop py2 support + +* Sun Feb 17 2019 Igor Gnatenko ignatenkobrain@fedoraproject.org - 2.16.0-11 +- Rebuild for readline 8.0 + +* Thu Feb 14 2019 Orion Poplawski orion@nwra.com +- Rebuild for openmpi 3.1.3 + +* Fri Feb 01 2019 Fedora Release Engineering releng@fedoraproject.org - 2.16.0-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Wed Jan 23 2019 Björn Esser besser82@fedoraproject.org - 2.16.0-8 +- Append curdir to CMake invokation. (#1668512) + +* Sat Dec 29 2018 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 2.16.0-7 +- Move matplotlib and ipython to weak deps + +* Mon Dec 17 2018 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 2.16.0-6 +- Correct location of MPI headers +- Use CMAKE directives to specify lib location + +* Fri Dec 14 2018 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 2.16.0-5 +- Add required suffixes to MPI binaries +- Explicitly mention all shared objects + +* Sat Nov 24 2018 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 2.16.0-4 +- Use bcond +- Enable libneurosim support + +* Sun Oct 28 2018 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 2.16.0-3 +- Spec improvements +- Use release conditional for uniformity +- Create source directories in the build directory + +* Thu Oct 18 2018 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 2.16.0-2 +- Make py3 default build +- Disable py2 build +- Use README file instead of creating it in the spec. +- Correct NEST_DOC_DIR to point to correct doc files for all variants (#1639678) + +* Fri Oct 05 2018 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 2.16.0-1 +- Exclude 32 bit architectures: https://github.com/nest/nest-simulator/issues/1031 +- Use python version specific shebangs +- Update to latest upstream release +- Place headers in separate packages + +* Fri Jul 27 2018 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 2.14.0-4 +- Improve readme +- Disable tests for the time being while I check builds + +* Thu Jul 26 2018 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 2.14.0-3 +- Enable tests +- Use autosetup +- Improve description +- Improve make usage + +* Tue Jul 24 2018 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 2.14.0-2 +- Enable mpi builds +- Do not make mpi packages noarch, since MPI_HOME is arch dependent +- Do not remove nest config files---the environment variables are used by programs + +* Sun Jun 24 2018 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 2.14.0-1 +- Update to latest release +- remove developer docs +- fix build +- improve commands + +* Mon Apr 25 2016 Ankur Sinha <ankursinha AT fedoraproject DOT org> 2.10.0-22.git79b2f01 +- Update to latest commit - test tammioppen changes + +* Mon Apr 25 2016 Ankur Sinha <ankursinha AT fedoraproject DOT org> 2.10.0-21.git58fcecb +- Update to latest commit + diff --git a/nest.spec b/nest.spec index 12f03f6..9a22978 100644 --- a/nest.spec +++ b/nest.spec @@ -44,7 +44,7 @@ Name: nest Version: 3.1
-Release: 1%{?dist} +Release: %autorelease Summary: The neural simulation tool
# thirdparty/compose is LGPLv2.1+ @@ -650,139 +650,4 @@ rm -rf $RPM_BUILD_ROOT/$MPI_HOME/share/nest/testsuite/ %endif
%changelog -* Thu Dec 23 2021 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 3.1-1 -- Update to 3.1 -- Reduce parallel runs for arm -- Disable lto for arm - -* Thu Dec 23 2021 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 3.0-1 -- Update to new version -- Disable GLIBCXX_ASSERTIONS for the time being -- https://github.com/nest/nest-simulator/issues/2101 - -* Thu Jul 22 2021 Fedora Release Engineering releng@fedoraproject.org - 2.20.1-9 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild - -* Fri Jun 04 2021 Python Maint python-maint@redhat.com - 2.20.1-8 -- Rebuilt for Python 3.10 - -* Tue Jan 26 2021 Fedora Release Engineering releng@fedoraproject.org - 2.20.1-7 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - -* Fri Jan 08 2021 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 2.20.1-6 -- Make headers arch specific - -* Mon Aug 10 2020 Jeff Law law@redhat.com - 2.20.0-5 -- Disable LTO on armv7hl for now - -* Sat Aug 01 2020 Fedora Release Engineering releng@fedoraproject.org - 2.20.0-4 -- Second attempt - Rebuilt for - https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Tue Jul 28 2020 Fedora Release Engineering releng@fedoraproject.org - 2.20.0-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Tue May 26 2020 Miro Hrončok mhroncok@redhat.com - 2.20.0-2 -- Rebuilt for Python 3.9 - -* Sat Feb 01 2020 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 2.20.0-1 -- Update to 2.20.0 - -* Wed Jan 29 2020 Fedora Release Engineering releng@fedoraproject.org - 2.18.0-8 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild - -* Wed Oct 16 2019 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 2.18.0-7 -- Rebuild with MUSIC support -- MUSIC requires MPI support to be enabled - -* Thu Oct 03 2019 Miro Hrončok mhroncok@redhat.com - 2.18.0-6 -- Rebuilt for Python 3.8.0rc1 (#1748018) - -* Wed Aug 21 2019 Miro Hrončok mhroncok@redhat.com - 2.18.0-5 -- Rebuilt for Python 3.8 - -* Tue Aug 20 2019 Susi Lehtola jussilehtola@fedoraproject.org - 2.18.0-4 -- Rebuilt for GSL 2.6. - -* Mon Aug 19 2019 Miro Hrončok mhroncok@redhat.com - 2.18.0-3 -- Rebuilt for Python 3.8 - -* Thu Jul 25 2019 Fedora Release Engineering releng@fedoraproject.org - 2.18.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild - -* Fri Jul 19 2019 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 2.18.0-1 -- Update to 2.18 -- Re-enable 32bit arches -- Update patch -- Drop py2 support - -* Sun Feb 17 2019 Igor Gnatenko ignatenkobrain@fedoraproject.org - 2.16.0-11 -- Rebuild for readline 8.0 - -* Thu Feb 14 2019 Orion Poplawski orion@nwra.com -- Rebuild for openmpi 3.1.3 - -* Fri Feb 01 2019 Fedora Release Engineering releng@fedoraproject.org - 2.16.0-9 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - -* Wed Jan 23 2019 Björn Esser besser82@fedoraproject.org - 2.16.0-8 -- Append curdir to CMake invokation. (#1668512) - -* Sat Dec 29 2018 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 2.16.0-7 -- Move matplotlib and ipython to weak deps - -* Mon Dec 17 2018 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 2.16.0-6 -- Correct location of MPI headers -- Use CMAKE directives to specify lib location - -* Fri Dec 14 2018 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 2.16.0-5 -- Add required suffixes to MPI binaries -- Explicitly mention all shared objects - -* Sat Nov 24 2018 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 2.16.0-4 -- Use bcond -- Enable libneurosim support - -* Sun Oct 28 2018 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 2.16.0-3 -- Spec improvements -- Use release conditional for uniformity -- Create source directories in the build directory - -* Thu Oct 18 2018 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 2.16.0-2 -- Make py3 default build -- Disable py2 build -- Use README file instead of creating it in the spec. -- Correct NEST_DOC_DIR to point to correct doc files for all variants (#1639678) - -* Fri Oct 05 2018 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 2.16.0-1 -- Exclude 32 bit architectures: https://github.com/nest/nest-simulator/issues/1031 -- Use python version specific shebangs -- Update to latest upstream release -- Place headers in separate packages - -* Fri Jul 27 2018 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 2.14.0-4 -- Improve readme -- Disable tests for the time being while I check builds - -* Thu Jul 26 2018 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 2.14.0-3 -- Enable tests -- Use autosetup -- Improve description -- Improve make usage - -* Tue Jul 24 2018 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 2.14.0-2 -- Enable mpi builds -- Do not make mpi packages noarch, since MPI_HOME is arch dependent -- Do not remove nest config files---the environment variables are used by programs - -* Sun Jun 24 2018 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 2.14.0-1 -- Update to latest release -- remove developer docs -- fix build -- improve commands - -* Mon Apr 25 2016 Ankur Sinha <ankursinha AT fedoraproject DOT org> 2.10.0-22.git79b2f01 -- Update to latest commit - test tammioppen changes - -* Mon Apr 25 2016 Ankur Sinha <ankursinha AT fedoraproject DOT org> 2.10.0-21.git58fcecb -- Update to latest commit +%autochangelog
commit 433c95c24cf676163a97e6d50678a09bd1c491e2 Author: Ankur Sinha (Ankur Sinha Gmail) sanjay.ankur@gmail.com Date: Mon Dec 27 15:57:13 2021 +0000
chore: tweak readme
diff --git a/README-Fedora.md b/README-Fedora.md index 792fe90..0a8ae9f 100644 --- a/README-Fedora.md +++ b/README-Fedora.md @@ -3,7 +3,7 @@ The neural simulation tool.
This documentation is also provided with each nest package variant as -`README.Fedora` (`nest`, `nest-mpich`, `nest-openmpi`): +`README-Fedora.md` (`nest`, `nest-mpich`, `nest-openmpi`):
The Fedora packages of the NEST simulator are built to cover various configurations and installs their files in the standard locations: @@ -24,18 +24,11 @@ The `nest_vars.sh` must be sourced to set up the environment correctly for NEST, which makes use of a few environment variables:
-The `nest_vars.sh` file is located in: +The `nest_vars.sh` file can be sourced:
-For MPICH builds: - -`source /usr/lib64/mpich/bin/nest_vars_mpich.sh` - -For OpenMPI builds: -`source /usr/lib64/openmpi/bin/nest_vars_openmpi.sh` - - -For non MPI builds: -`source /usr/bin/nest_vars.sh` +- for MPICH builds: `source /usr/lib64/mpich/bin/nest_vars_mpich.sh` +- for OpenMPI builds: `source /usr/lib64/openmpi/bin/nest_vars_openmpi.sh` +- for non MPI builds: `source /usr/bin/nest_vars.sh`
To use an MPI build of NEST, one must also load the appropriate module. For MPICH builds: @@ -73,11 +66,11 @@ nest_indirect_openmpi sli_openmpi ``````
-Documentation -------------- +More information on using MPI builds can be found in the NeuroFedora documentation here: https://docs.fedoraproject.org/en-US/neurofedora/mpi/ + +Package documentation +---------------------- The generated documentation is provided in the nest-doc package, and is common for all builds.
Official documentation can be found at http://nest-simulator.org/ - -For issues with this package, please contact the [NeuroFedora SIG](https://fedoraproject.org/wiki/SIGs/NeuroFedora#Communication_and_getting_he...).
commit cae1b7e2e1536081b514e5da807c1040124b6c6c Author: Ankur Sinha (Ankur Sinha Gmail) sanjay.ankur@gmail.com Date: Mon Dec 27 15:46:22 2021 +0000
feat: reduce debuginfo level to reduce memory consumption
diff --git a/nest.spec b/nest.spec index e8f0257..12f03f6 100644 --- a/nest.spec +++ b/nest.spec @@ -16,12 +16,12 @@
# On armv7 we get a failure with LTO. The log has no useful information in it # but my guess is we ran out of memory on the builder. Disable LTO for armv7 -# Also runs out of memory without lto. Seems to need about 20Gigs per thread, +# Also runs out of memory without lto. Seems to need about 25Gigs per thread, # so limit the number of threads %ifarch armv7hl %global _lto_cflags %{nil}
-%global numthreads %(awk '/MemTotal:/ {print int($2/20e6)}' /proc/meminfo) +%global numthreads %(awk '/MemTotal:/ {print int($2/25e6)}' /proc/meminfo)
%if 0%{numthreads} > 0%{?_smp_build_ncpus} %global numthreads %{?_smp_build_ncpus} @@ -32,10 +32,14 @@ %global numthreads 1 %endif
-%endif +# also reduce debuginfo level +%global optflags %(echo "%optflags" | sed -e 's/-Wp,-D_GLIBCXX_ASSERTIONS//' -e 's/-g /-g1 /') + +%else
# https://github.com/nest/nest-simulator/issues/2101 %global optflags %(echo "%optflags" | sed -e 's/-Wp,-D_GLIBCXX_ASSERTIONS//') +%endif
Name: nest Version: 3.1
commit 90ec03a3aa5b84e6da78838e2d656317b7c91756 Author: Ankur Sinha (Ankur Sinha Gmail) sanjay.ankur@gmail.com Date: Mon Dec 27 11:27:56 2021 +0000
feat: fixes for arm where it runs out of memory
diff --git a/nest.spec b/nest.spec index da9aec9..e8f0257 100644 --- a/nest.spec +++ b/nest.spec @@ -11,6 +11,29 @@ # of vera and clang and so forth, so we simply rely on upstream CI here %bcond_with tests
+# Default for numthreads +%global numthreads %{?_smp_build_ncpus} + +# On armv7 we get a failure with LTO. The log has no useful information in it +# but my guess is we ran out of memory on the builder. Disable LTO for armv7 +# Also runs out of memory without lto. Seems to need about 20Gigs per thread, +# so limit the number of threads +%ifarch armv7hl +%global _lto_cflags %{nil} + +%global numthreads %(awk '/MemTotal:/ {print int($2/20e6)}' /proc/meminfo) + +%if 0%{numthreads} > 0%{?_smp_build_ncpus} +%global numthreads %{?_smp_build_ncpus} +%endif + +# ensure that it's > 0 +%if 0%{numthreads} == 0 +%global numthreads 1 +%endif + +%endif + # https://github.com/nest/nest-simulator/issues/2101 %global optflags %(echo "%optflags" | sed -e 's/-Wp,-D_GLIBCXX_ASSERTIONS//')
@@ -227,14 +250,6 @@ find %{name}-simulator-%{version}/ -name "*.py" -exec sed -i 's|#!/usr/bin/env p %endif
%build -# On armv7 we get a failure with LTO. The log has no useful information in it -# but my guess is we ran out of memory on the builder. Disable LTO for armv7 -# Also runs out of memory without lto. Seems to need about 8Gigs per thread, so -# limit the number of threads -%ifarch armv7hl -%define _lto_cflags %{nil} -%define _smp_build_cpus %(awk '/MemTotal:/ {print int($2/8e6)}' /proc/meminfo) -%endif
%global do_cmake_config \ echo \ @@ -269,7 +284,7 @@ pushd %{name}-simulator-%{version}$MPI_COMPILE_TYPE && \ -DHAVE_RANDOM_123:BOOL=ON \\ %if %{music} \ -Dwith-music:BOOL=ON \\ - -DMUSIC_INCLUDE_DIR:PATH=$MPI_INCLUDE/music.hh \\ + -DMUSIC_INCLUDE_DIR:PATH=$MPI_INCLUDE \\ -DMUSIC_LIBRARY:PATH=$MPI_LIB/libmusic.so \\ -DMUSIC_EXECUTABLE:PATH=$MPI_BIN/music$MPI_SUFFIX \\ %else \ @@ -283,7 +298,7 @@ pushd %{name}-simulator-%{version}$MPI_COMPILE_TYPE && \ popd || exit -1;
%global do_make_build \ - %make_build -C %{name}-simulator-%{version}$MPI_COMPILE_TYPE || exit -1 + %make_build -j%{numthreads} -C %{name}-simulator-%{version}$MPI_COMPILE_TYPE || exit -1
%global do_pybuild \ pushd %{name}-simulator-%{version}$MPI_COMPILE_TYPE && \ @@ -633,6 +648,8 @@ rm -rf $RPM_BUILD_ROOT/$MPI_HOME/share/nest/testsuite/ %changelog * Thu Dec 23 2021 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 3.1-1 - Update to 3.1 +- Reduce parallel runs for arm +- Disable lto for arm
* Thu Dec 23 2021 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 3.0-1 - Update to new version
commit e7b6b219698580350b0fdfcbae54d9a3ebd36b19 Author: Ankur Sinha (Ankur Sinha Gmail) sanjay.ankur@gmail.com Date: Fri Dec 24 18:21:09 2021 +0000
fix: remove rpath
diff --git a/0004-Remove-rpath.patch b/0004-Remove-rpath.patch new file mode 100644 index 0000000..549242f --- /dev/null +++ b/0004-Remove-rpath.patch @@ -0,0 +1,80 @@ +From 48556f23656273d263e7c17b9b12f6ca33421d28 Mon Sep 17 00:00:00 2001 +From: "Ankur Sinha (Ankur Sinha Gmail)" sanjay.ankur@gmail.com +Date: Thu, 23 Dec 2021 15:01:25 +0000 +Subject: [PATCH 4/4] Remove rpath + +--- + cmake/ProcessOptions.cmake | 50 -------------------------------------- + 1 file changed, 50 deletions(-) + +diff --git a/cmake/ProcessOptions.cmake b/cmake/ProcessOptions.cmake +index 4bba64870..2815f9ee3 100644 +--- a/cmake/ProcessOptions.cmake ++++ b/cmake/ProcessOptions.cmake +@@ -184,8 +184,6 @@ function( NEST_PROCESS_STATIC_LIBRARIES ) + endif () + + set( BUILD_SHARED_LIBS OFF PARENT_SCOPE ) +- # set RPATH stuff +- set( CMAKE_SKIP_RPATH TRUE PARENT_SCOPE ) + + if ( UNIX OR APPLE ) + # On Linux .a is the static library suffix, on Mac OS X .lib can also +@@ -202,54 +200,6 @@ function( NEST_PROCESS_STATIC_LIBRARIES ) + else () + set( BUILD_SHARED_LIBS ON PARENT_SCOPE ) + +- # set RPATH stuff +- set( CMAKE_SKIP_RPATH FALSE PARENT_SCOPE ) +- # use, i.e. don't skip the full RPATH for the build tree +- set( CMAKE_SKIP_BUILD_RPATH FALSE PARENT_SCOPE ) +- # on OS X +- set( CMAKE_MACOSX_RPATH ON PARENT_SCOPE ) +- +- # when building, don't use the install RPATH already +- # (but later on when installing) +- set( CMAKE_BUILD_WITH_INSTALL_RPATH FALSE PARENT_SCOPE ) +- +- # set run-time search path (RPATH) so that dynamic libraries in ``lib/nest`` can be located +- +- # Note: "$ORIGIN" (on Linux) and "@loader_path" (on MacOS) are not CMake variables, but special keywords for the +- # Linux resp. the macOS dynamic loader. They refer to the path in which the object is located, e.g. +- # ``${CMAKE_INSTALL_PREFIX}/bin`` for the nest and sli executables, ``${CMAKE_INSTALL_PREFIX}/lib/nest`` for all +- # dynamic libraries except PyNEST (libnestkernel.so, etc.), and something like +- # ``${CMAKE_INSTALL_PREFIX}/lib/python3.x/site-packages/nest`` for ``pynestkernel.so``. The RPATH is relative to +- # this origin, so the binary ``bin/nest`` can find the files in the relative location ``../lib/nest``, and +- # similarly for PyNEST and the other libraries. For simplicity, we set all the possibilities on all generated +- # objects. +- +- # PyNEST can only act as an entry point; it does not need to be included in the other objects' RPATH itself. +- +- if ( APPLE ) +- set( CMAKE_INSTALL_RPATH +- # for binaries +- "@loader_path/../${CMAKE_INSTALL_LIBDIR}/nest" +- # for libraries (except pynestkernel) +- "@loader_path/../../${CMAKE_INSTALL_LIBDIR}/nest" +- # for pynestkernel: origin at <prefix>/lib/python3.x/site-packages/nest +- "@loader_path/../../../nest" +- PARENT_SCOPE ) +- else () +- set( CMAKE_INSTALL_RPATH +- # for binaries +- "$ORIGIN/../${CMAKE_INSTALL_LIBDIR}/nest" +- # for libraries (except pynestkernel) +- "$ORIGIN/../../${CMAKE_INSTALL_LIBDIR}/nest" +- # for pynestkernel: origin at <prefix>/lib/python3.x/site-packages/nest +- "$ORIGIN/../../../nest" +- PARENT_SCOPE ) +- endif () +- +- # add the automatically determined parts of the RPATH +- # which point to directories outside the build tree to the install RPATH +- set( CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE PARENT_SCOPE ) +- + if ( UNIX OR APPLE ) + # reverse the search order for lib extensions + set( CMAKE_FIND_LIBRARY_SUFFIXES ".so;.dylib;.a;.lib" PARENT_SCOPE ) +-- +2.33.1 + diff --git a/nest.spec b/nest.spec index dcc0617..da9aec9 100644 --- a/nest.spec +++ b/nest.spec @@ -38,9 +38,12 @@ Patch0: 0001-Disable-python-setups.patch Patch1: 0002-tweak-PYEXECDIR.patch # Use system Random123 Patch2: 0003-Use-system-Random123.patch +# Remove rpath +Patch3: 0004-Remove-rpath.patch
BuildRequires: boost-devel BuildRequires: cmake +BuildRequires: chrpath BuildRequires: doxygen BuildRequires: graphviz BuildRequires: gcc-c++ @@ -253,7 +256,7 @@ pushd %{name}-simulator-%{version}$MPI_COMPILE_TYPE && \ -DCMAKE_SKIP_RPATH:BOOL=ON \\ -DCMAKE_SKIP_BUILD_RPATH:BOOL=ON \\ -DCMAKE_SKIP_INSTALL_RPATH:BOOL=ON \\ - -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=ON \\ + -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=OFF \\ -Dwith-mpi:BOOL=$MPI_YES \\ -Dwith-gsl:BOOL=ON \\ -Dwith-boost:BOOL=ON \\ @@ -425,6 +428,16 @@ pushd $RPM_BUILD_ROOT/$MPI_BIN/ mv -v sli{,$MPI_SUFFIX} popd
+# Remove rpath +chrpath --delete $RPM_BUILD_ROOT/$MPI_PYTHON3_SITEARCH/nest/pynestkernel.so +chrpath --delete $RPM_BUILD_ROOT/$MPI_BIN/sli_mpich +chrpath --delete $RPM_BUILD_ROOT/$MPI_BIN/nest_mpich +chrpath --delete $RPM_BUILD_ROOT/$MPI_LIB/nest/libmodels.so +chrpath --delete $RPM_BUILD_ROOT/$MPI_LIB/nest/libsli_readline.so +chrpath --delete $RPM_BUILD_ROOT/$MPI_LIB/nest/libsli.so +chrpath --delete $RPM_BUILD_ROOT/$MPI_LIB/nest/libnest.so +chrpath --delete $RPM_BUILD_ROOT/$MPI_LIB/nest/libnestkernel.so + %{_mpich_unload} %endif
@@ -456,6 +469,17 @@ pushd $RPM_BUILD_ROOT/$MPI_BIN/ mv -v %{name}_indirect{,$MPI_SUFFIX} mv -v sli{,$MPI_SUFFIX} popd + +# Remove rpath +chrpath --delete $RPM_BUILD_ROOT/$MPI_PYTHON3_SITEARCH/nest/pynestkernel.so +chrpath --delete $RPM_BUILD_ROOT/$MPI_BIN/sli_openmpi +chrpath --delete $RPM_BUILD_ROOT/$MPI_BIN/nest_openmpi +chrpath --delete $RPM_BUILD_ROOT/$MPI_LIB/nest/libmodels.so +chrpath --delete $RPM_BUILD_ROOT/$MPI_LIB/nest/libsli_readline.so +chrpath --delete $RPM_BUILD_ROOT/$MPI_LIB/nest/libsli.so +chrpath --delete $RPM_BUILD_ROOT/$MPI_LIB/nest/libnest.so +chrpath --delete $RPM_BUILD_ROOT/$MPI_LIB/nest/libnestkernel.so + %{_openmpi_unload} %endif
commit eed5430670fa73dc4b11304f161635a0ab8b1f94 Author: Ankur Sinha (Ankur Sinha Gmail) sanjay.ankur@gmail.com Date: Thu Dec 23 17:39:32 2021 +0000
feat: update to 3.1
diff --git a/.gitignore b/.gitignore index 630292c..1eebf2a 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ /nest-2.20.0.tar.gz /nest-2.20.1.tar.gz /nest-3.0.tar.gz +/nest-3.1.tar.gz diff --git a/0001-Disable-python-setups.patch b/0001-Disable-python-setups.patch index 160aa1a..4284106 100644 --- a/0001-Disable-python-setups.patch +++ b/0001-Disable-python-setups.patch @@ -1,16 +1,16 @@ -From d451b9a2c14cbe60d25f0ad3ce4a1920c05b3887 Mon Sep 17 00:00:00 2001 +From 72ad030b1eeca2ce8cd59545671d41150dac97d5 Mon Sep 17 00:00:00 2001 From: "Ankur Sinha (Ankur Sinha Gmail)" sanjay.ankur@gmail.com -Date: Sat, 3 Jul 2021 15:29:52 +0100 -Subject: [PATCH 1/3] Disable python setups +Date: Thu, 23 Dec 2021 08:49:07 +0000 +Subject: [PATCH 1/4] Disable python setups
--- - doc/CMakeLists.txt | 12 ++++---- - extras/ConnPlotter/CMakeLists.txt | 18 ++++++------ - pynest/CMakeLists.txt | 46 +++++++++++++++---------------- - 3 files changed, 38 insertions(+), 38 deletions(-) + doc/CMakeLists.txt | 12 ++++++------ + extras/ConnPlotter/CMakeLists.txt | 16 ++++++++-------- + pynest/CMakeLists.txt | 30 +++++++++++++++--------------- + 3 files changed, 29 insertions(+), 29 deletions(-)
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt -index f6b694a64..5a52a9ad8 100644 +index f6b694a64..4c883f34d 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -45,12 +45,12 @@ if ( NOT CMAKE_CROSSCOMPILING ) @@ -23,20 +23,20 @@ index f6b694a64..5a52a9ad8 100644 - WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}/extras/help_generator" - )" - ) -+ # install( CODE -+ # "execute_process( -+ # COMMAND ${Python_EXECUTABLE} -B generate_helpindex.py "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DOCDIR}" -+ # WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}/extras/help_generator" -+ # )" -+ # ) ++ #install( CODE ++ # "execute_process( ++ # COMMAND ${Python_EXECUTABLE} -B generate_helpindex.py "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DOCDIR}" ++ # WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}/extras/help_generator" ++ # )" ++ # )
endif ()
diff --git a/extras/ConnPlotter/CMakeLists.txt b/extras/ConnPlotter/CMakeLists.txt -index 1f7c2b32d..e9a6c3e29 100644 +index 1f7c2b32d..56a0374c6 100644 --- a/extras/ConnPlotter/CMakeLists.txt +++ b/extras/ConnPlotter/CMakeLists.txt -@@ -18,15 +18,15 @@ +@@ -18,14 +18,14 @@ # along with NEST. If not, see http://www.gnu.org/licenses/.
if ( HAVE_PYTHON ) @@ -48,25 +48,23 @@ index 1f7c2b32d..e9a6c3e29 100644 - --install-data=${CMAKE_INSTALL_FULL_DATADIR} - WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")" - ) -- -+ # install( CODE "execute_process( -+ # COMMAND ${PYTHON} setup.py build --build-base=${CMAKE_CURRENT_BINARY_DIR}/build -+ # install --prefix=${CMAKE_INSTALL_PREFIX} -+ # --install-lib=${CMAKE_INSTALL_PREFIX}/${PYEXECDIR} -+ # --install-scripts=${CMAKE_INSTALL_FULL_BINDIR} -+ # --install-data=${CMAKE_INSTALL_FULL_DATADIR} -+ # WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")" -+ # ) -+# ++ #install( CODE "execute_process( ++ #COMMAND ${PYTHON} setup.py build --build-base=${CMAKE_CURRENT_BINARY_DIR}/build ++ # install --prefix=${CMAKE_INSTALL_PREFIX} ++ # --install-lib=${CMAKE_INSTALL_PREFIX}/${PYEXECDIR} ++ # --install-scripts=${CMAKE_INSTALL_FULL_BINDIR} ++ # --install-data=${CMAKE_INSTALL_FULL_DATADIR} ++ # WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")" ++ # ) + install( FILES examples/connplotter_tutorial.py DESTINATION ${CMAKE_INSTALL_DOCDIR}/examples/ConnPlotter - ) diff --git a/pynest/CMakeLists.txt b/pynest/CMakeLists.txt -index 8913f2ef7..e956298b6 100644 +index 1815f7870..f3b0218c4 100644 --- a/pynest/CMakeLists.txt +++ b/pynest/CMakeLists.txt -@@ -78,32 +78,32 @@ if ( HAVE_PYTHON ) - DESTINATION ${CMAKE_INSTALL_PREFIX}/${PYEXECDIR}/nest +@@ -79,21 +79,21 @@ if ( HAVE_PYTHON ) + PATTERN "versionchecker.py.in" EXCLUDE ) install( TARGETS pynestkernel DESTINATION ${PYEXECDIR}/nest/ ) - install( CODE " @@ -79,48 +77,29 @@ index 8913f2ef7..e956298b6 100644 - # the install requirements of `nest` as specified in `setup.py`. - # Then feed them into the stdin pipe of `pip install`. - execute_process( -- COMMAND ${PYTHON} -c "import pkg_resources as pkg; print('\\n'.join(str(r) for r in pkg.get_distribution('nest').requires()))" +- COMMAND ${PYTHON} -c "import pkg_resources as pkg; print('\\n'.join(str(r) for r in pkg.get_distribution('nest-simulator').requires()))" - COMMAND ${PYTHON} -m pip install -r /dev/stdin - ) - " - ) -+ # install( CODE " -+ # execute_process( -+ # COMMAND ${PYTHON} ${CMAKE_CURRENT_BINARY_DIR}/setup.py install_egg_info -+ # --install-dir=${CMAKE_INSTALL_PREFIX}/${PYEXECDIR} -+ # WORKING_DIRECTORY "${CMAKE_INSTALL_PREFIX}/${PYEXECDIR}" -+ # ) -+ # # Use Python's standard library `pkg_resources` module to find -+ # # the install requirements of `nest` as specified in `setup.py`. -+ # # Then feed them into the stdin pipe of `pip install`. -+ # execute_process( -+ # COMMAND ${PYTHON} -c "import pkg_resources as pkg; print('\\n'.join(str(r) for r in pkg.get_distribution('nest').requires()))" -+ # COMMAND ${PYTHON} -m pip install -r /dev/stdin -+ # ) -+ # " -+ # ) ++ #install( CODE " ++ # execute_process( ++ # COMMAND ${PYTHON} ${CMAKE_CURRENT_BINARY_DIR}/setup.py install_egg_info ++ # --install-dir=${CMAKE_INSTALL_PREFIX}/${PYEXECDIR} ++ # WORKING_DIRECTORY "${CMAKE_INSTALL_PREFIX}/${PYEXECDIR}" ++ # ) ++ # # Use Python's standard library `pkg_resources` module to find ++ # # the install requirements of `nest` as specified in `setup.py`. ++ # # Then feed them into the stdin pipe of `pip install`. ++ # execute_process( ++ # COMMAND ${PYTHON} -c "import pkg_resources as pkg; print('\\n'.join(str(r) for r in pkg.get_distribution('nest-simulator').requires()))" ++ # COMMAND ${PYTHON} -m pip install -r /dev/stdin ++ # ) ++ # " ++ #)
install( DIRECTORY examples/ DESTINATION ${CMAKE_INSTALL_DOCDIR}/examples/pynest - ) - -- find_program( NOSETESTS nosetests ) -- if ( NOT NOSETESTS STREQUAL "NOSETESTS-NOTFOUND" ) -- add_test( NAME PyNEST -- COMMAND ${NOSETESTS} -v --with-xunit -- --xunit-file=${PROJECT_BINARY_DIR}/reports/pynest_tests.xml -- ${CMAKE_INSTALL_PREFIX}/${PYEXECDIR}/nest/tests -- ) -- endif () -+ # find_program( NOSETESTS nosetests ) -+ # if ( NOT NOSETESTS STREQUAL "NOSETESTS-NOTFOUND" ) -+ # add_test( NAME PyNEST -+ # COMMAND ${NOSETESTS} -v --with-xunit -+ # --xunit-file=${PROJECT_BINARY_DIR}/reports/pynest_tests.xml -+ # ${CMAKE_INSTALL_PREFIX}/${PYEXECDIR}/nest/tests -+ # ) -+ # endif () - endif () -- -2.31.1 +2.33.1
diff --git a/0002-tweak-PYEXEDIR.patch b/0002-tweak-PYEXECDIR.patch similarity index 80% rename from 0002-tweak-PYEXEDIR.patch rename to 0002-tweak-PYEXECDIR.patch index ff1a9c7..54eec73 100644 --- a/0002-tweak-PYEXEDIR.patch +++ b/0002-tweak-PYEXECDIR.patch @@ -1,9 +1,8 @@ -From 0d7127ce44ae218f21bfe47fe8b3742b93a893f7 Mon Sep 17 00:00:00 2001 +From 15d60e4404c8246f008c0e83b7faf4db018e2d4d Mon Sep 17 00:00:00 2001 From: "Ankur Sinha (Ankur Sinha Gmail)" sanjay.ankur@gmail.com -Date: Sat, 3 Jul 2021 17:24:12 +0100 -Subject: [PATCH 2/3] tweak PYEXEDIR +Date: Thu, 23 Dec 2021 08:50:57 +0000 +Subject: [PATCH 2/4] tweak PYEXECDIR
-Makes it easier for us to install the MPICH builds --- cmake/ConfigureSummary.cmake | 2 +- extras/nest_vars.sh.in | 2 +- @@ -11,10 +10,10 @@ Makes it easier for us to install the MPICH builds 3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/cmake/ConfigureSummary.cmake b/cmake/ConfigureSummary.cmake -index cab9c524a..58bbd2b7d 100644 +index 133558fd3..1e14bd474 100644 --- a/cmake/ConfigureSummary.cmake +++ b/cmake/ConfigureSummary.cmake -@@ -210,7 +210,7 @@ function( NEST_PRINT_CONFIG_SUMMARY ) +@@ -204,7 +204,7 @@ function( NEST_PRINT_CONFIG_SUMMARY ) message( "" ) if ( HAVE_PYTHON ) message( "PyNEST will be installed to:" ) @@ -37,18 +36,18 @@ index 6e33190cd..bc07787ce 100644 # Make NEST executables available by prepending their path to PATH. export PATH="@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_BINDIR@:${PATH}" diff --git a/pynest/CMakeLists.txt b/pynest/CMakeLists.txt -index e956298b6..f25be0e4e 100644 +index f3b0218c4..92367dc04 100644 --- a/pynest/CMakeLists.txt +++ b/pynest/CMakeLists.txt @@ -75,7 +75,7 @@ if ( HAVE_PYTHON ) )
- install(DIRECTORY nest/ + install(DIRECTORY nest/ ${PROJECT_BINARY_DIR}/pynest/nest/ - DESTINATION ${CMAKE_INSTALL_PREFIX}/${PYEXECDIR}/nest + DESTINATION ${PYEXECDIR}/nest + PATTERN "versionchecker.py.in" EXCLUDE ) install( TARGETS pynestkernel DESTINATION ${PYEXECDIR}/nest/ ) - # install( CODE " -- -2.31.1 +2.33.1
diff --git a/0003-Use-system-Random123.patch b/0003-Use-system-Random123.patch index dc0cc37..5564d51 100644 --- a/0003-Use-system-Random123.patch +++ b/0003-Use-system-Random123.patch @@ -1,18 +1,18 @@ -From 6994525dbe678f8819f8e8cc8e2a86b8cccab0bd Mon Sep 17 00:00:00 2001 +From 7baebea44501f8e7f56a305b0147abab3a8d79f5 Mon Sep 17 00:00:00 2001 From: "Ankur Sinha (Ankur Sinha Gmail)" sanjay.ankur@gmail.com -Date: Sun, 4 Jul 2021 00:43:35 +0100 -Subject: [PATCH 3/3] Use system Random123 +Date: Thu, 23 Dec 2021 08:53:51 +0000 +Subject: [PATCH 3/4] Use system Random123
--- CMakeLists.txt | 1 - - thirdparty/CMakeLists.txt | 23 ----------------------- - 2 files changed, 24 deletions(-) + thirdparty/CMakeLists.txt | 24 ------------------------ + 2 files changed, 25 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt -index d879164a8..ef65f5fc6 100644 +index 5ad79fcd2..493a7f8b3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -179,7 +179,6 @@ nest_check_have_stl_vector_capacity_doubling() +@@ -178,7 +178,6 @@ nest_check_have_stl_vector_capacity_doubling() nest_check_have_xlc_ice_on_using() nest_check_have_std_nan() nest_check_have_std_isnan() @@ -21,10 +21,10 @@ index d879164a8..ef65f5fc6 100644 ################################################################################ ################## Create version string ################## diff --git a/thirdparty/CMakeLists.txt b/thirdparty/CMakeLists.txt -index 6db0ad5d2..804c4b436 100644 +index 6db0ad5d2..94bbdfc55 100644 --- a/thirdparty/CMakeLists.txt +++ b/thirdparty/CMakeLists.txt -@@ -20,31 +20,8 @@ +@@ -20,31 +20,7 @@ set( thirdparty_headers compose.hpp randutils.hpp @@ -55,7 +55,7 @@ index 6db0ad5d2..804c4b436 100644 install( FILES compose.hpp randutils.hpp DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/nest) -install( DIRECTORY Random123/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/nest/Random123 - FILES_MATCHING PATTERN "*.h" ) - +- -- -2.31.1 +2.33.1
diff --git a/nest.spec b/nest.spec index ded209c..dcc0617 100644 --- a/nest.spec +++ b/nest.spec @@ -15,7 +15,7 @@ %global optflags %(echo "%optflags" | sed -e 's/-Wp,-D_GLIBCXX_ASSERTIONS//')
Name: nest -Version: 3.0 +Version: 3.1
Release: 1%{?dist} Summary: The neural simulation tool @@ -35,11 +35,10 @@ Source1: README-Fedora.md # respect rpmbuildroot and so on Patch0: 0001-Disable-python-setups.patch # Tweak PYEXECDIR -Patch1: 0002-tweak-PYEXEDIR.patch +Patch1: 0002-tweak-PYEXECDIR.patch # Use system Random123 Patch2: 0003-Use-system-Random123.patch
- BuildRequires: boost-devel BuildRequires: cmake BuildRequires: doxygen @@ -252,6 +251,9 @@ pushd %{name}-simulator-%{version}$MPI_COMPILE_TYPE && \ -DSHARE_INSTALL_PREFIX:PATH=%{_prefix} \\ -Dwith-optimize:BOOL=OFF \\ -DCMAKE_SKIP_RPATH:BOOL=ON \\ + -DCMAKE_SKIP_BUILD_RPATH:BOOL=ON \\ + -DCMAKE_SKIP_INSTALL_RPATH:BOOL=ON \\ + -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=ON \\ -Dwith-mpi:BOOL=$MPI_YES \\ -Dwith-gsl:BOOL=ON \\ -Dwith-boost:BOOL=ON \\ @@ -305,7 +307,7 @@ export PY_MPI4PY=OFF # Python 3 export MPI_COMPILE_TYPE="" export PYTHON_VERSION="3" -export PYTHON_BIN="%{__python3}" +export PYTHON_BIN="%{python3}" export MPI_SITEARCH=$MPI_PYTHON3_SITEARCH %{do_cmake_config} %{do_make_build} @@ -324,7 +326,7 @@ export MPI_YES=ON # Python 3 export MPI_COMPILE_TYPE="-mpich" export PYTHON_VERSION="3" -export PYTHON_BIN="%{__python3}" +export PYTHON_BIN="%{python3}" export MPI_SITEARCH=$MPI_PYTHON3_SITEARCH export PY_MPI4PY=$MPI_PYTHON3_SITEARCH/mpi4py %{do_cmake_config} @@ -345,7 +347,7 @@ export MPI_YES=ON # Python 3 export MPI_COMPILE_TYPE="-openmpi" export PYTHON_VERSION="3" -export PYTHON_BIN="%{__python3}" +export PYTHON_BIN="%{python3}" export MPI_SITEARCH=$MPI_PYTHON3_SITEARCH export PY_MPI4PY=$MPI_PYTHON3_SITEARCH/mpi4py %{do_cmake_config} @@ -384,27 +386,23 @@ export MPI_YES=OFF # Python 3 export MPI_COMPILE_TYPE="" export MPI_SITEARCH="%{python3_sitearch}" -export PYTHON_BIN="%{__python3}" +export PYTHON_BIN="%{python3}" %{do_install} %{do_pyinstall}
# Update the helpindex manually # Should this go in %%post of the doc package maybe? pushd %{name}-simulator-%{version}/extras/help_generator - %{__python3} -B generate_helpindex.py $RPM_BUILD_ROOT/%{_docdir}/%{name}/ + %{python3} -B generate_helpindex.py $RPM_BUILD_ROOT/%{_docdir}/%{name}/ popd
-# Remove checker binary that is not meant for users -rm -f %{_bindir}/run_all_cpptests - - # Install MPICH version %if %{with mpich} %{_mpich_load} # Python 3 export MPI_COMPILE_TYPE="-mpich" export MPI_SITEARCH=$MPI_PYTHON3_SITEARCH -export PYTHON_BIN="%{__python3}" +export PYTHON_BIN="%{python3}" %{do_install} %{do_pyinstall}
@@ -436,7 +434,7 @@ popd # Python 3 export MPI_COMPILE_TYPE="-openmpi" export MPI_SITEARCH=$MPI_PYTHON3_SITEARCH -export PYTHON_BIN="%{__python3}" +export PYTHON_BIN="%{python3}" %{do_install} %{do_pyinstall}
@@ -461,12 +459,6 @@ popd %{_openmpi_unload} %endif
- -# Some issues pointed out by rpmlint -pushd $RPM_BUILD_ROOT/%{_pkgdocdir}/examples/pynest/arbor_cosim_example/ - iconv -f iso8859-1 -t utf-8 README.md > README.md.conv && mv -f README.md.conv README.md -popd - pushd $RPM_BUILD_ROOT/%{_datadir}/%{name}/help_generator/ sed -i '/#!/usr/bin/python/ d' generate_help.py sed -i '/#!/usr/bin/python/ d' generate_helpindex.py @@ -489,7 +481,7 @@ PATH=$RPM_BUILD_ROOT/$NEST_BINDIR/:$PATH $RPM_BUILD_ROOT/$NEST_DATA_DIR/extras/d export MPI_COMPILE_TYPE="" export NEST_BINDIR="%{_bindir}" export PYTHON_VERSION="3" -export PYTHON_BIN="%{__python3}" +export PYTHON_BIN="%{python3}" export NEST_PYTHONDIR=%{python3_sitearch} %{do_tests_3}
@@ -500,7 +492,7 @@ export MPI_COMPILE_TYPE="-mpich" export NEST_BINDIR=$MPI_BIN export NEST_PYTHONDIR=$MPI_PYTHON3_SITEARCH export PYTHON_VERSION="3" -export PYTHON_BIN="%{__python3}" +export PYTHON_BIN="%{python3}" %{do_tests_3}
%{_mpich_unload} @@ -511,7 +503,7 @@ export PYTHON_BIN="%{__python3}" %{_openmpi_load} export MPI_COMPILE_TYPE="-openmpi" export PYTHON_VERSION="3" -export PYTHON_BIN="%{__python3}" +export PYTHON_BIN="%{python3}" export MPI_SITEARCH=$MPI_PYTHON3_SITEARCH %{do_tests_3}
@@ -519,6 +511,21 @@ export MPI_SITEARCH=$MPI_PYTHON3_SITEARCH %endif %endif
+# Remove test suite so that it isn't included in the package +rm -rf $RPM_BUILD_ROOT/%{_datadir}/nest/testsuite/ +rm -rf $RPM_BUILD_ROOT/%{_bindir}/run_all_cpptests +%if %{with mpich} +%{_mpich_load} +rm -rf $RPM_BUILD_ROOT/$MPI_HOME/share/nest/testsuite/ +%{_mpich_unload} +%endif +%if %{with openmpi} +%{_openmpi_load} +rm -rf $RPM_BUILD_ROOT/$MPI_HOME/share/nest/testsuite/ +%{_openmpi_unload} +%endif + + %files %license LICENSE %doc README-Fedora.md SECURITY.md ACKNOWLEDGMENTS.md README.md CHANGES CONTRIBUTING.md @@ -526,7 +533,6 @@ export MPI_SITEARCH=$MPI_PYTHON3_SITEARCH %{_bindir}/%{name}-server %{_bindir}/%{name}-server-mpi %{_bindir}/sli -%{_bindir}/run_all_cpptests %{_bindir}/%{name}_vars.sh %{_bindir}/%{name}-config %{_bindir}/%{name}_serial @@ -601,6 +607,9 @@ export MPI_SITEARCH=$MPI_PYTHON3_SITEARCH %endif
%changelog +* Thu Dec 23 2021 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 3.1-1 +- Update to 3.1 + * Thu Dec 23 2021 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 3.0-1 - Update to new version - Disable GLIBCXX_ASSERTIONS for the time being diff --git a/sources b/sources index 6130376..98da629 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (nest-3.0.tar.gz) = 6895b19ca079e1aa9f96dca7896838bcb2ae521287e461fe39efe66a7049785220d11c5361748758d580128c0834b1964bec42391cb3918d9f8c1d6b7ef21e04 +SHA512 (nest-3.1.tar.gz) = ede7c27b55233063bc8fceb1ecedc84627450217b6e5ac46ecc178bbb255e4aaff151835b6a52522cec6d9ef6c72dd6b3c3b96c884e3d88f5a6ae4a0c467b644
commit 6f25e81d2be03b3fa158905c37fc624d2d99a318 Author: Ankur Sinha (Ankur Sinha Gmail) sanjay.ankur@gmail.com Date: Sun Jul 4 19:13:41 2021 +0100
feat: limit number of threads on arm
Runs out of memory otherwise
diff --git a/nest.spec b/nest.spec index 9bfc4bf..ded209c 100644 --- a/nest.spec +++ b/nest.spec @@ -227,8 +227,11 @@ find %{name}-simulator-%{version}/ -name "*.py" -exec sed -i 's|#!/usr/bin/env p %build # On armv7 we get a failure with LTO. The log has no useful information in it # but my guess is we ran out of memory on the builder. Disable LTO for armv7 +# Also runs out of memory without lto. Seems to need about 8Gigs per thread, so +# limit the number of threads %ifarch armv7hl %define _lto_cflags %{nil} +%define _smp_build_cpus %(awk '/MemTotal:/ {print int($2/8e6)}' /proc/meminfo) %endif
%global do_cmake_config \
commit 5c9b4b39e9a2fb99a9a12fc58fadcefb4450dae8 Author: Ankur Sinha (Ankur Sinha Gmail) sanjay.ankur@gmail.com Date: Sun Jul 4 16:39:35 2021 +0100
feat: disable GLIBCXX_ASSERTIONS to prevent aborts
diff --git a/nest.spec b/nest.spec index 0d85ab9..9bfc4bf 100644 --- a/nest.spec +++ b/nest.spec @@ -11,11 +11,12 @@ # of vera and clang and so forth, so we simply rely on upstream CI here %bcond_with tests
+# https://github.com/nest/nest-simulator/issues/2101 +%global optflags %(echo "%optflags" | sed -e 's/-Wp,-D_GLIBCXX_ASSERTIONS//') + Name: nest Version: 3.0
-%global gittag v%{version} - Release: 1%{?dist} Summary: The neural simulation tool
@@ -23,7 +24,7 @@ Summary: The neural simulation tool # thirdparty/randutils.hpp is MIT License: GPLv2+ and MIT and LGPLv2+ URL: http://www.nest-simulator.org/ -Source0: https://github.com/%%7Bname%7D/%%7Bname%7D-simulator/archive/%%7Bgittag%7D/%... +Source0: https://github.com/%%7Bname%7D/%%7Bname%7D-simulator/archive/v%%7Bversion%7D... Source1: README-Fedora.md
# 1. Let it build and install the cythonised shared object But we still build @@ -230,16 +231,12 @@ find %{name}-simulator-%{version}/ -name "*.py" -exec sed -i 's|#!/usr/bin/env p %define _lto_cflags %{nil} %endif
-%set_build_flags - %global do_cmake_config \ echo \ echo "*** BUILDING %{name}-simulator-%{version}$MPI_COMPILE_TYPE ***" \ -echo \ export PYEXECDIR=$MPI_SITEARCH \ -export PYNEST_CFLAGS="%{optflags}" \ -export PYNEST_CXXFLAGS="%{optflags}" \ %set_build_flags \ +echo \ pushd %{name}-simulator-%{version}$MPI_COMPILE_TYPE && \ cmake \\ -DCMAKE_C_FLAGS_RELEASE:STRING="-DNDEBUG" \\ @@ -250,9 +247,11 @@ pushd %{name}-simulator-%{version}$MPI_COMPILE_TYPE && \ -DCMAKE_INSTALL_LIBDIR:PATH=$MPI_LIB \\ -DSYSCONF_INSTALL_DIR:PATH=%{_sysconfdir} \\ -DSHARE_INSTALL_PREFIX:PATH=%{_prefix} \\ + -Dwith-optimize:BOOL=OFF \\ -DCMAKE_SKIP_RPATH:BOOL=ON \\ -Dwith-mpi:BOOL=$MPI_YES \\ -Dwith-gsl:BOOL=ON \\ + -Dwith-boost:BOOL=ON \\ -Dwith-libneurosim:PATH=$MPI_HOME \\ -Dwith-python:BOOL=ON \\ -DPYEXECDIR:PATH=$MPI_SITEARCH \\ @@ -601,6 +600,8 @@ export MPI_SITEARCH=$MPI_PYTHON3_SITEARCH %changelog * Thu Dec 23 2021 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 3.0-1 - Update to new version +- Disable GLIBCXX_ASSERTIONS for the time being +- https://github.com/nest/nest-simulator/issues/2101
* Thu Jul 22 2021 Fedora Release Engineering releng@fedoraproject.org - 2.20.1-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
commit a8cb2ee452307110a8f59406113fee9fc752c0b0 Author: Ankur Sinha (Ankur Sinha Gmail) sanjay.ankur@gmail.com Date: Sun Jul 4 12:28:20 2021 +0100
feat: update for NEST v3
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1970668
diff --git a/.gitignore b/.gitignore index 464db82..630292c 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /nest-2.18.0.tar.gz /nest-2.20.0.tar.gz /nest-2.20.1.tar.gz +/nest-3.0.tar.gz diff --git a/0001-Disable-python-setups.patch b/0001-Disable-python-setups.patch index 3d6fcb8..160aa1a 100644 --- a/0001-Disable-python-setups.patch +++ b/0001-Disable-python-setups.patch @@ -1,25 +1,36 @@ +From d451b9a2c14cbe60d25f0ad3ce4a1920c05b3887 Mon Sep 17 00:00:00 2001 +From: "Ankur Sinha (Ankur Sinha Gmail)" sanjay.ankur@gmail.com +Date: Sat, 3 Jul 2021 15:29:52 +0100 +Subject: [PATCH 1/3] Disable python setups + +--- + doc/CMakeLists.txt | 12 ++++---- + extras/ConnPlotter/CMakeLists.txt | 18 ++++++------ + pynest/CMakeLists.txt | 46 +++++++++++++++---------------- + 3 files changed, 38 insertions(+), 38 deletions(-) + diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt -index 95b7a1157..14f20daca 100644 +index f6b694a64..5a52a9ad8 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt -@@ -52,12 +52,12 @@ if ( NOT CMAKE_CROSSCOMPILING ) +@@ -45,12 +45,12 @@ if ( NOT CMAKE_CROSSCOMPILING )
- # Update the global help index to include all help files in - # the global installation directory for documentation. -- install( CODE -- "execute_process( -- COMMAND ${PYTHON_EXECUTABLE} -B generate_helpindex.py "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DOCDIR}" -- WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}/extras/help_generator" -- )" -- ) -+ # install( CODE -+ # "execute_process( -+ # COMMAND ${PYTHON_EXECUTABLE} -B generate_helpindex.py "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DOCDIR}" -+ # WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}/extras/help_generator" -+ # )" -+ # ) + # Update the global help index to include all help files in + # the global installation directory for documentation. +- install( CODE +- "execute_process( +- COMMAND ${Python_EXECUTABLE} -B generate_helpindex.py "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DOCDIR}" +- WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}/extras/help_generator" +- )" +- ) ++ # install( CODE ++ # "execute_process( ++ # COMMAND ${Python_EXECUTABLE} -B generate_helpindex.py "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DOCDIR}" ++ # WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}/extras/help_generator" ++ # )" ++ # )
- endif () + endif ()
diff --git a/extras/ConnPlotter/CMakeLists.txt b/extras/ConnPlotter/CMakeLists.txt index 1f7c2b32d..e9a6c3e29 100644 @@ -51,56 +62,65 @@ index 1f7c2b32d..e9a6c3e29 100644 DESTINATION ${CMAKE_INSTALL_DOCDIR}/examples/ConnPlotter ) diff --git a/pynest/CMakeLists.txt b/pynest/CMakeLists.txt -index 6464dc6e2..82d8ab0eb 100644 +index 8913f2ef7..e956298b6 100644 --- a/pynest/CMakeLists.txt +++ b/pynest/CMakeLists.txt -@@ -73,14 +73,14 @@ if ( HAVE_PYTHON ) - -D_IS_PYNEST - ) - -- install( CODE "execute_process( -- COMMAND ${PYTHON} setup.py build --build-base=${CMAKE_CURRENT_BINARY_DIR}/build -- install --prefix=${CMAKE_INSTALL_PREFIX} -- --install-lib=${CMAKE_INSTALL_PREFIX}/${PYEXECDIR} -- --install-scripts=${CMAKE_INSTALL_FULL_BINDIR} -- --install-data=${CMAKE_INSTALL_FULL_DATADIR} -- WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")" -- ) -+ # install( CODE "execute_process( -+ # COMMAND ${PYTHON} setup.py build --build-base=${CMAKE_CURRENT_BINARY_DIR}/build -+ # install --prefix=${CMAKE_INSTALL_PREFIX} -+ # --install-lib=${CMAKE_INSTALL_PREFIX}/${PYEXECDIR} -+ # --install-scripts=${CMAKE_INSTALL_FULL_BINDIR} -+ # --install-data=${CMAKE_INSTALL_FULL_DATADIR} -+ # WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")" -+ # ) +@@ -78,32 +78,32 @@ if ( HAVE_PYTHON ) + DESTINATION ${CMAKE_INSTALL_PREFIX}/${PYEXECDIR}/nest + ) install( TARGETS pynestkernel DESTINATION ${PYEXECDIR}/nest/ ) - install( FILES ${PROJECT_BINARY_DIR}/pynest/do_tests.py - DESTINATION ${CMAKE_INSTALL_DATADIR}/extras -diff --git a/topology/CMakeLists.txt b/topology/CMakeLists.txt -index d9575d630..c42df40d1 100644 ---- a/topology/CMakeLists.txt -+++ b/topology/CMakeLists.txt -@@ -82,14 +82,14 @@ install( FILES ${install_headers} - DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/nest) - - if ( HAVE_PYTHON ) -- install( CODE "execute_process( -- COMMAND ${PYTHON} setup.py build --build-base=${CMAKE_CURRENT_BINARY_DIR}/build -- install --prefix=${CMAKE_INSTALL_PREFIX} -- --install-lib=${CMAKE_INSTALL_PREFIX}/${PYEXECDIR} -- --install-scripts=${CMAKE_INSTALL_FULL_BINDIR} -- --install-data=${CMAKE_INSTALL_FULL_DATADIR} -- WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")" +- install( CODE " +- execute_process( +- COMMAND ${PYTHON} ${CMAKE_CURRENT_BINARY_DIR}/setup.py install_egg_info +- --install-dir=${CMAKE_INSTALL_PREFIX}/${PYEXECDIR} +- WORKING_DIRECTORY "${CMAKE_INSTALL_PREFIX}/${PYEXECDIR}" - ) -+ # install( CODE "execute_process( -+ # COMMAND ${PYTHON} setup.py build --build-base=${CMAKE_CURRENT_BINARY_DIR}/build -+ # install --prefix=${CMAKE_INSTALL_PREFIX} -+ # --install-lib=${CMAKE_INSTALL_PREFIX}/${PYEXECDIR} -+ # --install-scripts=${CMAKE_INSTALL_FULL_BINDIR} -+ # --install-data=${CMAKE_INSTALL_FULL_DATADIR} -+ # WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")" +- # Use Python's standard library `pkg_resources` module to find +- # the install requirements of `nest` as specified in `setup.py`. +- # Then feed them into the stdin pipe of `pip install`. +- execute_process( +- COMMAND ${PYTHON} -c "import pkg_resources as pkg; print('\\n'.join(str(r) for r in pkg.get_distribution('nest').requires()))" +- COMMAND ${PYTHON} -m pip install -r /dev/stdin +- ) +- " +- ) ++ # install( CODE " ++ # execute_process( ++ # COMMAND ${PYTHON} ${CMAKE_CURRENT_BINARY_DIR}/setup.py install_egg_info ++ # --install-dir=${CMAKE_INSTALL_PREFIX}/${PYEXECDIR} ++ # WORKING_DIRECTORY "${CMAKE_INSTALL_PREFIX}/${PYEXECDIR}" ++ # ) ++ # # Use Python's standard library `pkg_resources` module to find ++ # # the install requirements of `nest` as specified in `setup.py`. ++ # # Then feed them into the stdin pipe of `pip install`. ++ # execute_process( ++ # COMMAND ${PYTHON} -c "import pkg_resources as pkg; print('\\n'.join(str(r) for r in pkg.get_distribution('nest').requires()))" ++ # COMMAND ${PYTHON} -m pip install -r /dev/stdin + # ) ++ # " ++ # ) + + install( DIRECTORY examples/ + DESTINATION ${CMAKE_INSTALL_DOCDIR}/examples/pynest + )
- file( GLOB topo_examples "examples/*" ) - install( FILES ${topo_examples} +- find_program( NOSETESTS nosetests ) +- if ( NOT NOSETESTS STREQUAL "NOSETESTS-NOTFOUND" ) +- add_test( NAME PyNEST +- COMMAND ${NOSETESTS} -v --with-xunit +- --xunit-file=${PROJECT_BINARY_DIR}/reports/pynest_tests.xml +- ${CMAKE_INSTALL_PREFIX}/${PYEXECDIR}/nest/tests +- ) +- endif () ++ # find_program( NOSETESTS nosetests ) ++ # if ( NOT NOSETESTS STREQUAL "NOSETESTS-NOTFOUND" ) ++ # add_test( NAME PyNEST ++ # COMMAND ${NOSETESTS} -v --with-xunit ++ # --xunit-file=${PROJECT_BINARY_DIR}/reports/pynest_tests.xml ++ # ${CMAKE_INSTALL_PREFIX}/${PYEXECDIR}/nest/tests ++ # ) ++ # endif () + endif () +-- +2.31.1 + diff --git a/0002-tweak-PYEXEDIR.patch b/0002-tweak-PYEXEDIR.patch new file mode 100644 index 0000000..ff1a9c7 --- /dev/null +++ b/0002-tweak-PYEXEDIR.patch @@ -0,0 +1,54 @@ +From 0d7127ce44ae218f21bfe47fe8b3742b93a893f7 Mon Sep 17 00:00:00 2001 +From: "Ankur Sinha (Ankur Sinha Gmail)" sanjay.ankur@gmail.com +Date: Sat, 3 Jul 2021 17:24:12 +0100 +Subject: [PATCH 2/3] tweak PYEXEDIR + +Makes it easier for us to install the MPICH builds +--- + cmake/ConfigureSummary.cmake | 2 +- + extras/nest_vars.sh.in | 2 +- + pynest/CMakeLists.txt | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/cmake/ConfigureSummary.cmake b/cmake/ConfigureSummary.cmake +index cab9c524a..58bbd2b7d 100644 +--- a/cmake/ConfigureSummary.cmake ++++ b/cmake/ConfigureSummary.cmake +@@ -210,7 +210,7 @@ function( NEST_PRINT_CONFIG_SUMMARY ) + message( "" ) + if ( HAVE_PYTHON ) + message( "PyNEST will be installed to:" ) +- message( " ${CMAKE_INSTALL_PREFIX}/${PYEXECDIR}" ) ++ message( " ${PYEXECDIR}" ) + message( "" ) + endif () + message( "To set necessary environment variables, add the following line" ) +diff --git a/extras/nest_vars.sh.in b/extras/nest_vars.sh.in +index 6e33190cd..bc07787ce 100644 +--- a/extras/nest_vars.sh.in ++++ b/extras/nest_vars.sh.in +@@ -1,7 +1,7 @@ + #!/bin/sh + + # Make PyNEST available by prepending its path to PYTHONPATH in a safe way. +-export PYTHONPATH="@CMAKE_INSTALL_PREFIX@/@PYEXECDIR@${PYTHONPATH:+:$PYTHONPATH}" ++export PYTHONPATH="@PYEXECDIR@${PYTHONPATH:+:$PYTHONPATH}" + + # Make NEST executables available by prepending their path to PATH. + export PATH="@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_BINDIR@:${PATH}" +diff --git a/pynest/CMakeLists.txt b/pynest/CMakeLists.txt +index e956298b6..f25be0e4e 100644 +--- a/pynest/CMakeLists.txt ++++ b/pynest/CMakeLists.txt +@@ -75,7 +75,7 @@ if ( HAVE_PYTHON ) + ) + + install(DIRECTORY nest/ +- DESTINATION ${CMAKE_INSTALL_PREFIX}/${PYEXECDIR}/nest ++ DESTINATION ${PYEXECDIR}/nest + ) + install( TARGETS pynestkernel DESTINATION ${PYEXECDIR}/nest/ ) + # install( CODE " +-- +2.31.1 + diff --git a/0003-Use-system-Random123.patch b/0003-Use-system-Random123.patch new file mode 100644 index 0000000..dc0cc37 --- /dev/null +++ b/0003-Use-system-Random123.patch @@ -0,0 +1,61 @@ +From 6994525dbe678f8819f8e8cc8e2a86b8cccab0bd Mon Sep 17 00:00:00 2001 +From: "Ankur Sinha (Ankur Sinha Gmail)" sanjay.ankur@gmail.com +Date: Sun, 4 Jul 2021 00:43:35 +0100 +Subject: [PATCH 3/3] Use system Random123 + +--- + CMakeLists.txt | 1 - + thirdparty/CMakeLists.txt | 23 ----------------------- + 2 files changed, 24 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index d879164a8..ef65f5fc6 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -179,7 +179,6 @@ nest_check_have_stl_vector_capacity_doubling() + nest_check_have_xlc_ice_on_using() + nest_check_have_std_nan() + nest_check_have_std_isnan() +-nest_check_random123() + + ################################################################################ + ################## Create version string ################## +diff --git a/thirdparty/CMakeLists.txt b/thirdparty/CMakeLists.txt +index 6db0ad5d2..804c4b436 100644 +--- a/thirdparty/CMakeLists.txt ++++ b/thirdparty/CMakeLists.txt +@@ -20,31 +20,8 @@ + set( thirdparty_headers + compose.hpp + randutils.hpp +- Random123/gsl_microrng.h +- Random123/aes.h +- Random123/array.h +- Random123/u01fixedpt.h +- Random123/philox.h +- Random123/threefry.h +- Random123/ars.h +- Random123/conventional/gsl_cbrng.h +- Random123/features/open64features.h +- Random123/features/xlcfeatures.h +- Random123/features/nvccfeatures.h +- Random123/features/metalfeatures.h +- Random123/features/sunprofeatures.h +- Random123/features/sse.h +- Random123/features/pgccfeatures.h +- Random123/features/openclfeatures.h +- Random123/features/iccfeatures.h +- Random123/features/compilerfeatures.h +- Random123/features/clangfeatures.h +- Random123/features/msvcfeatures.h +- Random123/features/gccfeatures.h + ) + + + install( FILES compose.hpp randutils.hpp DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/nest) +-install( DIRECTORY Random123/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/nest/Random123 +- FILES_MATCHING PATTERN "*.h" ) + +-- +2.31.1 + diff --git a/README-Fedora.md b/README-Fedora.md index 2d53fcf..792fe90 100644 --- a/README-Fedora.md +++ b/README-Fedora.md @@ -2,9 +2,6 @@
The neural simulation tool.
-Note: it is not yet built with `libneurosim` support, so all models may not be -available in `PyNN`. - This documentation is also provided with each nest package variant as `README.Fedora` (`nest`, `nest-mpich`, `nest-openmpi`):
@@ -26,11 +23,6 @@ Usage The `nest_vars.sh` must be sourced to set up the environment correctly for NEST, which makes use of a few environment variables:
-- `NEST_INSTALL_DIR` -- `NEST_DATA_DIR` -- `NEST_MODULE_PATH` -- `NEST_PYTHON_PREFIX` -- `NEST_DOC_DIR`
The `nest_vars.sh` file is located in:
diff --git a/nest.spec b/nest.spec index 5c523d1..0d85ab9 100644 --- a/nest.spec +++ b/nest.spec @@ -12,14 +12,16 @@ %bcond_with tests
Name: nest -Version: 2.20.1 +Version: 3.0
%global gittag v%{version}
-Release: 9%{?dist} +Release: 1%{?dist} Summary: The neural simulation tool
-License: GPLv2+ +# thirdparty/compose is LGPLv2.1+ +# thirdparty/randutils.hpp is MIT +License: GPLv2+ and MIT and LGPLv2+ URL: http://www.nest-simulator.org/ Source0: https://github.com/%%7Bname%7D/%%7Bname%7D-simulator/archive/%%7Bgittag%7D/%... Source1: README-Fedora.md @@ -30,24 +32,29 @@ Source1: README-Fedora.md # 2. The helpindex must be generated after the help files have been installed # to the install location, so we do this manually because the script doesn't # respect rpmbuildroot and so on -# Patch0: %%{name}-0000-disable-pybits.patch Patch0: 0001-Disable-python-setups.patch +# Tweak PYEXECDIR +Patch1: 0002-tweak-PYEXEDIR.patch +# Use system Random123 +Patch2: 0003-Use-system-Random123.patch
-BuildRequires: make -BuildRequires: ncurses-devel -BuildRequires: gsl-devel -BuildRequires: readline-devel -BuildRequires: python3-devel -BuildRequires: python3-Cython -BuildRequires: python3-nose -BuildRequires: libtool-ltdl-devel +BuildRequires: boost-devel BuildRequires: cmake -BuildRequires: libtool BuildRequires: doxygen BuildRequires: graphviz BuildRequires: gcc-c++ +BuildRequires: make +BuildRequires: ncurses-devel +BuildRequires: gsl-devel +BuildRequires: libtool +BuildRequires: libtool-ltdl-devel BuildRequires: libneurosim-devel +BuildRequires: python3-devel +BuildRequires: python3-Cython +BuildRequires: python3-pytest +BuildRequires: readline-devel +BuildRequires: Random123-devel Requires: %{name}-common
%global _description %{expand: @@ -174,27 +181,25 @@ Recommends: %{py3_dist ipython} %prep %autosetup -c -n %{name}-simulator-%{version} -N cp %{SOURCE1} ./ -v -cp %{name}-simulator-%{version}/LICENSE . -v +cp %{name}-simulator-%{version}/{LICENSE,SECURITY.md,ACKNOWLEDGMENTS.md,CHANGES,CONTRIBUTING.md,README.md} . -v
# Tweaks pushd %{name}-simulator-%{version} # Apply the patch %patch0 -p1 +%patch1 -p1 +%patch2 -p1 # We'll set it ourselves - easier for mpi implementations sed -i.orig '/PYEXECDIR/ d' cmake/ProcessOptions.cmake # These files are all in standard locations so we don't need them # Loading an MPI module sets up PATH correctly sed -i '/PATH=/ d' extras/nest_vars.sh.in -# Set the correct PYTHONPATH using nest_vars.sh -# loading an MPI module DOES NOT seem to set the python path -sed -i 's|NEST_PYTHON_PREFIX=$NEST_INSTALL_DIR/@PYEXECDIR@|NEST_PYTHON_PREFIX=@PYEXECDIR@|' extras/nest_vars.sh.in +# Delete bundled Random123 copy +rm -rf thirdparty/Random123 popd
-# Find py3 version of libneurosim in the py3 builds/packages -sed -i 's/pyneurosim/py3neurosim/' %{name}-simulator-%{version}/cmake/FindLibNeurosim.cmake - # Correct shebangs for py3 -find %{name}-simulator-%{version}/ -name "*.py" -exec sed -i 's|#!/usr/bin/env python|#!/usr/bin/env python3|' '{}' ; +find %{name}-simulator-%{version}/ -name "*.py" -exec sed -i 's|#!/usr/bin/env python.*|#!/usr/bin/python3|' '{}' ;
%if %{with mpich} cp -a %{name}-simulator-%{version} %{name}-simulator-%{version}-mpich @@ -244,15 +249,17 @@ pushd %{name}-simulator-%{version}$MPI_COMPILE_TYPE && \ -DCMAKE_INSTALL_INCLUDEDIR:PATH=$MPI_INCLUDE \\ -DCMAKE_INSTALL_LIBDIR:PATH=$MPI_LIB \\ -DSYSCONF_INSTALL_DIR:PATH=%{_sysconfdir} \\ - -DSHARE_INSTALL_PREFIX:PATH=%{_datadir} \\ + -DSHARE_INSTALL_PREFIX:PATH=%{_prefix} \\ -DCMAKE_SKIP_RPATH:BOOL=ON \\ -Dwith-mpi:BOOL=$MPI_YES \\ -Dwith-gsl:BOOL=ON \\ -Dwith-libneurosim:PATH=$MPI_HOME \\ - -Dwith-python:STRING=$PYTHON_VERSION \\ + -Dwith-python:BOOL=ON \\ -DPYEXECDIR:PATH=$MPI_SITEARCH \\ -DCMAKE_INSTALL_PREFIX:PATH=$MPI_HOME \\ -DBUILD_SHARED_LIBS:BOOL=ON \\ + -DPY_MPI4PY:PATH=$PY_MPI4PY \\ + -DHAVE_RANDOM_123:BOOL=ON \\ %if %{music} \ -Dwith-music:BOOL=ON \\ -DMUSIC_INCLUDE_DIR:PATH=$MPI_INCLUDE/music.hh \\ @@ -276,9 +283,6 @@ pushd %{name}-simulator-%{version}$MPI_COMPILE_TYPE && \ pushd pynest && \ $PYTHON_BIN setup.py build \ popd && \ - pushd topology && \ - $PYTHON_BIN setup.py build \ - popd && \ pushd extras/ConnPlotter && \ $PYTHON_BIN setup.py build \ popd && \ @@ -295,6 +299,7 @@ export MPI_BIN=%{_bindir} export MPI_INCLUDE=%{_includedir} export MPI_LIB=%{_libdir} export MPI_YES=OFF +export PY_MPI4PY=OFF # Python 3 export MPI_COMPILE_TYPE="" export PYTHON_VERSION="3" @@ -319,6 +324,7 @@ export MPI_COMPILE_TYPE="-mpich" export PYTHON_VERSION="3" export PYTHON_BIN="%{__python3}" export MPI_SITEARCH=$MPI_PYTHON3_SITEARCH +export PY_MPI4PY=$MPI_PYTHON3_SITEARCH/mpi4py %{do_cmake_config} %{do_make_build} %{do_pybuild} @@ -339,6 +345,7 @@ export MPI_COMPILE_TYPE="-openmpi" export PYTHON_VERSION="3" export PYTHON_BIN="%{__python3}" export MPI_SITEARCH=$MPI_PYTHON3_SITEARCH +export PY_MPI4PY=$MPI_PYTHON3_SITEARCH/mpi4py %{do_cmake_config} %{do_make_build} %{do_pybuild} @@ -355,23 +362,12 @@ echo \ %make_install -C %{name}-simulator-%{version}$MPI_COMPILE_TYPE || exit -1
-# Only install the pynestkernel -%global do_pynestkernel_install \ -pushd %{name}-simulator-%{version}$MPI_COMPILE_TYPE && \ - pushd pynest && \ - install -m 0755 -p -D -t $RPM_BUILD_ROOT/$MPI_SITEARCH/%{name} pynestkernel.so \ - popd && \ -popd || exit -1; - # Install the other python bits %global do_pyinstall \ pushd %{name}-simulator-%{version}$MPI_COMPILE_TYPE && \ pushd pynest && \ $PYTHON_BIN setup.py install --skip-build --root $RPM_BUILD_ROOT --install-lib=$MPI_SITEARCH && \ popd && \ - pushd topology && \ - $PYTHON_BIN setup.py install --skip-build --root $RPM_BUILD_ROOT --install-lib=$MPI_SITEARCH && \ - popd && \ pushd extras/ConnPlotter && \ $PYTHON_BIN setup.py install --skip-build --root $RPM_BUILD_ROOT && \ popd && \ @@ -396,6 +392,9 @@ pushd %{name}-simulator-%{version}/extras/help_generator %{__python3} -B generate_helpindex.py $RPM_BUILD_ROOT/%{_docdir}/%{name}/ popd
+# Remove checker binary that is not meant for users +rm -f %{_bindir}/run_all_cpptests +
# Install MPICH version %if %{with mpich} @@ -417,6 +416,8 @@ rm -rf $RPM_BUILD_ROOT/%{_libdir}/mpich/share/%{name}/{extras,help_generator} # Rename binaries to add MPI suffix pushd $RPM_BUILD_ROOT/$MPI_BIN/ mv -v %{name}{,$MPI_SUFFIX} + mv -v %{name}-server{,$MPI_SUFFIX} + mv -v %{name}-server-mpi{,$MPI_SUFFIX} mv -v %{name}_vars{,$MPI_SUFFIX}.sh mv -v %{name}-config{,$MPI_SUFFIX} mv -v %{name}_serial{,$MPI_SUFFIX} @@ -447,6 +448,8 @@ rm -rf $RPM_BUILD_ROOT/%{_libdir}/openmpi/share/%{name}/{extras,help_generator} # Rename binaries to add MPI suffix pushd $RPM_BUILD_ROOT/$MPI_BIN/ mv -v %{name}{,$MPI_SUFFIX} + mv -v %{name}-server{,$MPI_SUFFIX} + mv -v %{name}-server-mpi{,$MPI_SUFFIX} mv -v %{name}_vars{,$MPI_SUFFIX}.sh mv -v %{name}-config{,$MPI_SUFFIX} mv -v %{name}_serial{,$MPI_SUFFIX} @@ -457,9 +460,20 @@ popd %endif
+# Some issues pointed out by rpmlint +pushd $RPM_BUILD_ROOT/%{_pkgdocdir}/examples/pynest/arbor_cosim_example/ + iconv -f iso8859-1 -t utf-8 README.md > README.md.conv && mv -f README.md.conv README.md +popd + +pushd $RPM_BUILD_ROOT/%{_datadir}/%{name}/help_generator/ + sed -i '/#!/usr/bin/python/ d' generate_help.py + sed -i '/#!/usr/bin/python/ d' generate_helpindex.py +popd + + %if %{with tests} %check -%global do_tests \ +%global do_tests_3 \ echo \ echo "*** TESTING %{name}-simulator-%{version}$MPI_COMPILE_TYPE ***" \ echo \ @@ -467,14 +481,7 @@ source $RPM_BUILD_ROOT/$NEST_BINDIR/nest_vars.sh \ export NEST_DOC_DIR=$RPM_BUILD_ROOT/$NEST_DOC_DIR export NEST_DATA_DIR=$RPM_BUILD_ROOT/$NEST_DATA_DIR PATH=$RPM_BUILD_ROOT/$NEST_BINDIR/:$PATH $RPM_BUILD_ROOT/$NEST_DATA_DIR/extras/do_tests.sh --source-dir=SKIP \ -nosetests $NEST_PYTHONDIR/nest/tests $NEST_PYTHONDIR/nest/topology/tests - -# No sli suite here, since we didn't build it for py3 -%global do_tests_3 \ -echo \ -echo "*** TESTING %{name}-simulator-%{version}$MPI_COMPILE_TYPE ***" \ -echo \ -nosetests-3 $NEST_PYTHONDIR/nest/tests $NEST_PYTHONDIR/nest/topology/tests +%{pytest} $NEST_PYTHONDIR/nest/tests
export MPI_COMPILE_TYPE="" @@ -512,23 +519,17 @@ export MPI_SITEARCH=$MPI_PYTHON3_SITEARCH
%files %license LICENSE -%doc README-Fedora.md +%doc README-Fedora.md SECURITY.md ACKNOWLEDGMENTS.md README.md CHANGES CONTRIBUTING.md %{_bindir}/%{name} +%{_bindir}/%{name}-server +%{_bindir}/%{name}-server-mpi %{_bindir}/sli +%{_bindir}/run_all_cpptests %{_bindir}/%{name}_vars.sh %{_bindir}/%{name}-config %{_bindir}/%{name}_serial %{_bindir}/%{name}_indirect -%{_libdir}/libconngen.so -%{_libdir}/libmodels.so -%{_libdir}/libnest.so -%{_libdir}/libnestkernel.so -%{_libdir}/libnestutil.so -%{_libdir}/libprecise.so -%{_libdir}/librandom.so -%{_libdir}/libsli.so -%{_libdir}/libsli_readline.so -%{_libdir}/libtopology.so +%{_libdir}/%{name}
%files common %{_datadir}/%{name} @@ -541,31 +542,23 @@ export MPI_SITEARCH=$MPI_PYTHON3_SITEARCH
%files -n python3-%{name} %{python3_sitearch}/%{name} -%{python3_sitearch}/PyNEST-nest_%{version}-py%{python3_version}.egg-info -%{python3_sitearch}/Topology-nest_%{version}-py%{python3_version}.egg-info +%{python3_sitearch}/nest_simulator-%{version}-py%{python3_version}.egg-info %{python3_sitelib}/ConnPlotter -%{python3_sitelib}/ConnPlotter-0.7a-py%{python3_version}.egg-info +%{python3_sitelib}/ConnPlotter-0.7a0-py%{python3_version}.egg-info
%if %{with mpich} %files mpich %license LICENSE -%doc README-Fedora.md +%doc README-Fedora.md SECURITY.md ACKNOWLEDGMENTS.md README.md CHANGES CONTRIBUTING.md %{_libdir}/mpich/bin/%{name}_mpich +%{_libdir}/mpich/bin/%{name}-server_mpich +%{_libdir}/mpich/bin/%{name}-server-mpi_mpich %{_libdir}/mpich/bin/%{name}_vars_mpich.sh %{_libdir}/mpich/bin/%{name}-config_mpich %{_libdir}/mpich/bin/%{name}_serial_mpich %{_libdir}/mpich/bin/%{name}_indirect_mpich %{_libdir}/mpich/bin/sli_mpich -%{_libdir}/mpich/lib/libconngen.so -%{_libdir}/mpich/lib/libmodels.so -%{_libdir}/mpich/lib/libnest.so -%{_libdir}/mpich/lib/libnestkernel.so -%{_libdir}/mpich/lib/libnestutil.so -%{_libdir}/mpich/lib/libprecise.so -%{_libdir}/mpich/lib/librandom.so -%{_libdir}/mpich/lib/libsli.so -%{_libdir}/mpich/lib/libsli_readline.so -%{_libdir}/mpich/lib/libtopology.so +%{_libdir}/mpich/lib/%{name}
%files mpich-common %{_libdir}/mpich/share/%{name} @@ -576,31 +569,22 @@ export MPI_SITEARCH=$MPI_PYTHON3_SITEARCH %files -n python3-%{name}-mpich %license LICENSE %{python3_sitearch}/mpich/%{name} -%{python3_sitearch}/mpich/PyNEST-nest_%{version}-py%{python3_version}.egg-info -%{python3_sitearch}/mpich/Topology-nest_%{version}-py%{python3_version}.egg-info +%{python3_sitearch}/mpich/nest_simulator-%{version}-py%{python3_version}.egg-info %endif
%if %{with openmpi} %files openmpi %license LICENSE -%doc README-Fedora.md +%doc README-Fedora.md SECURITY.md ACKNOWLEDGMENTS.md README.md CHANGES CONTRIBUTING.md %{_libdir}/openmpi/bin/%{name}_openmpi +%{_libdir}/openmpi/bin/%{name}-server_openmpi +%{_libdir}/openmpi/bin/%{name}-server-mpi_openmpi %{_libdir}/openmpi/bin/%{name}_vars_openmpi.sh %{_libdir}/openmpi/bin/%{name}-config_openmpi %{_libdir}/openmpi/bin/%{name}_serial_openmpi %{_libdir}/openmpi/bin/%{name}_indirect_openmpi %{_libdir}/openmpi/bin/sli_openmpi -%{_libdir}/openmpi/lib/libconngen.so -%{_libdir}/openmpi/lib/libmodels.so -%{_libdir}/openmpi/lib/libnest.so -%{_libdir}/openmpi/lib/libnestkernel.so -%{_libdir}/openmpi/lib/libnestutil.so -%{_libdir}/openmpi/lib/libprecise.so -%{_libdir}/openmpi/lib/librandom.so -%{_libdir}/openmpi/lib/libsli.so -%{_libdir}/openmpi/lib/libsli_readline.so -%{_libdir}/openmpi/lib/libtopology.so - +%{_libdir}/openmpi/lib/%{name}
%files openmpi-common %{_libdir}/openmpi/share/%{name} @@ -611,11 +595,13 @@ export MPI_SITEARCH=$MPI_PYTHON3_SITEARCH %files -n python3-%{name}-openmpi %license LICENSE %{python3_sitearch}/openmpi/%{name} -%{python3_sitearch}/openmpi/PyNEST-nest_%{version}-py%{python3_version}.egg-info -%{python3_sitearch}/openmpi/Topology-nest_%{version}-py%{python3_version}.egg-info +%{python3_sitearch}/openmpi/nest_simulator-%{version}-py%{python3_version}.egg-info %endif
%changelog +* Thu Dec 23 2021 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 3.0-1 +- Update to new version + * Thu Jul 22 2021 Fedora Release Engineering releng@fedoraproject.org - 2.20.1-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
diff --git a/sources b/sources index 2e0fb41..6130376 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (nest-2.20.1.tar.gz) = d227e5822ece2c213a6841d75b536aea387a5e25b16751cf4f46e2b72c382969a9b42ae93d4b8101a90690ba3d18854459e4f2fcaa8d28ab8499ddd558ea7889 +SHA512 (nest-3.0.tar.gz) = 6895b19ca079e1aa9f96dca7896838bcb2ae521287e461fe39efe66a7049785220d11c5361748758d580128c0834b1964bec42391cb3918d9f8c1d6b7ef21e04
arch-excludes@lists.fedoraproject.org