#2 feat: update to 0.5.2
Merged 2 years ago by ankursinha. Opened 2 years ago by ankursinha.
rpms/ ankursinha/arbor feat/0.5.2  into  rawhide

file modified
+1
@@ -2,3 +2,4 @@ 

  /arbor-f12f934.tar.gz

  /arbor-fb5d4ea.tar.gz

  /arbor-0.3.tar.gz

+ /arbor-0.5.2.tar.gz

@@ -1,32 +0,0 @@ 

- From 26f74e228ebd1840befa4122d4f36840104a2380 Mon Sep 17 00:00:00 2001

- From: "Ankur Sinha (Ankur Sinha Gmail)" <sanjay.ankur@gmail.com>

- Date: Sat, 7 Dec 2019 16:58:38 +0000

- Subject: [PATCH] Use system pybind11

- 

- diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt

- index bf4d5f0..0057102 100644

- --- a/python/CMakeLists.txt

- +++ b/python/CMakeLists.txt

- @@ -1,19 +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)

- -

-  set(pyarb_source

-      cells.cpp

-      config.cpp

@@ -1,66 +0,0 @@ 

- --- a/ext/CMakeLists.orig.txt	2020-06-06 20:38:54.795020000 +0200

- +++ b/ext/CMakeLists.txt	2020-06-06 20:41:11.429317416 +0200

- @@ -1,63 +1,6 @@

-  # Niels Lohmann's json library (single-header version).

-  

- -add_library(ext-json INTERFACE)

- -target_include_directories(ext-json INTERFACE json/single_include)

- -

-  # tinyopt command line parsing libary (header-only).

-  

-  add_library(ext-tinyopt INTERFACE)

-  target_include_directories(ext-tinyopt INTERFACE tinyopt/include)

- -

- -# Random123 (DE Shaw Research) counter-based random number generators (header-only)

- -

- -add_library(ext-random123 INTERFACE)

- -target_include_directories(ext-random123 INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>/random123/include)

- -install(TARGETS ext-random123 EXPORT arbor-targets)

- -

- -# Google benchmark for microbenchmarks:

- -

- -check_git_submodule(gbench google-benchmark)

- -if(gbench_avail)

- -    # Set up google benchmark as an external project.

- -

- -    include(ExternalProject)

- -    set(gbench_src_dir "${CMAKE_CURRENT_SOURCE_DIR}/google-benchmark")

- -    set(gbench_install_dir "${CMAKE_CURRENT_BINARY_DIR}/google-benchmark")

- -    set(gbench_cmake_args

- -        "-DCMAKE_BUILD_TYPE=release"

- -        "-DCMAKE_INSTALL_PREFIX=${gbench_install_dir}"

- -        "-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}"

- -        "-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}")

- -

- -    ExternalProject_Add(gbench-build

- -        # Add dummy DOWNLOAD_COMMAND to stop ExternalProject_Add terminating CMake if the

- -        # git submodule had not been udpated.

- -        DOWNLOAD_COMMAND "${CMAKE_COMMAND}" -E echo "Warning: ${gbench_src_dir} empty or missing."

- -        SOURCE_DIR "${gbench_src_dir}"

- -        CMAKE_ARGS "${gbench_cmake_args}"

- -        INSTALL_DIR "${gbench_install_dir}"

- -    )

- -    set_target_properties(gbench-build PROPERTIES EXCLUDE_FROM_ALL TRUE)

- -

- -else()

- -    add_error_target(gbench-build

- -        "Building Google benchmark library"

- -        "The git submodule for google benchmark is not available")

- -endif()

- -

- -add_library(ext-benchmark INTERFACE)

- -add_dependencies(ext-benchmark gbench-build)

- -target_include_directories(ext-benchmark INTERFACE "${gbench_install_dir}/include")

- -target_link_libraries(ext-benchmark INTERFACE "${gbench_install_dir}/lib/libbenchmark.a")

- -

- -# Sphinx RTD theme

- -

- -check_git_submodule(rtdtheme sphinx_rtd_theme)

- -add_target_if(rtdtheme_avail

- -    check-sphinx_rtd_theme

- -    "Checking for Read the Docs Sphinx theme"

- -    "The git submodule for read the docs is not available")

- -

- -add_library(ext-sphinx_rtd_theme INTERFACE)

- -add_dependencies(ext-sphinx_rtd_theme check-sphinx_rtd_theme)

- -target_include_directories(ext-sphinx_rtd_theme INTERFACE sphinx_rtd_theme)

file modified
+133 -67
@@ -19,36 +19,34 @@ 

  

  %bcond_without tests

  

- #%%global commit  fb5d4ea736282dce14c3284bc5db748b082db957

- #%%global checkoutdate  20200225

- #%%global shortcommit %%(c=%%{commit}; echo ${c:0:7})

+ %global forgeurl            https://github.com/arbor-sim/arbor

  

  Name:           arbor

- Version:        0.3

- Release:        10%{?dist}

+ Version:        0.5.2

+ Release:        %autorelease

  Summary:        Multi-compartment neural network simulation library

  

+ %forgemeta

+ 

+ URL:            %forgeurl

+ Source0:        %forgesource

+ # script to run examples

+ Source1:        https://raw.githubusercontent.com/arbor-sim/arbor/master/scripts/run_python_examples.sh

+ Source2:        https://raw.githubusercontent.com/arbor-sim/arbor/master/scripts/run_cpp_examples.sh

  License:        BSD

- URL:            https://github.com/arbor-sim/%{name}

- %if 0%{?commit:1}

- 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:         %{name}-0001-Use-system-pybind11.patch

  

  # This patch changes ext/CMakeLists.txt for automatically using tinyopt libraries by cmake command.

- Patch1:         %{name}-tinyopt_cmake.patch

+ #Patch1:         arbor-tinyopt_cmake.patch

  

  # Random123 does not support these

- ExcludeArch:    mips64r2 mips32r2 s390 s390x

+ ExcludeArch:    mips64r2 mips32r2 s390

  

  BuildRequires:  cmake

+ BuildRequires:  make

  BuildRequires:  gcc-c++

  BuildRequires:  git-core

  BuildRequires:  gtest-devel

+ BuildRequires:  google-benchmark-devel

  BuildRequires:  json-devel

  BuildRequires:  libunwind-devel

  BuildRequires:  pybind11-devel
@@ -56,32 +54,42 @@ 

  BuildRequires:  python3-setuptools

  BuildRequires:  Random123-devel

  BuildRequires:  tclap-devel

- Provides:       python3-%{name} = %{version}-%{release}

- %{?python_provide:%python_provide python3-%{name}}

+ Provides:       python3-arbor = %{version}-%{release}

+ 

  # For validation, but we don't have these BRs

  # BuildRequires:  julia julia-sundials julia-unitful julia-JSON

  

+ %if %{with tests}

+ BuildRequires:  %{py3_dist numpy}

+ BuildRequires:  %{py3_dist pandas}

+ BuildRequires:  %{py3_dist seaborn}

+ %endif

+ 

+ # Required by arbor

+ Requires:       %{py3_dist numpy}

+ 

  %description %{_description}

  

  %package devel

- Summary:    Development files for %{name}

- Requires:   %{name}%{?_isa} = %{version}-%{release}

- Provides:   %{name}-static = %{version}-%{release}

+ Summary:    Development files for arbor

+ Requires:   arbor%{?_isa} = %{version}-%{release}

+ Provides:   arbor-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}

+ Summary:    Documentation for arbor

  BuildRequires:  python3-sphinx

  BuildRequires:  python3-sphinx_rtd_theme

+ BuildRequires:  python3-svgwrite

  

  %description doc %{_description}

  

  %if %{with mpich}

  %package mpich

- Summary:        MPICH build for %{name}

+ Summary:        MPICH build for arbor

  BuildRequires:  mpich-devel

  BuildRequires:  rpm-mpi-hooks

  BuildRequires:  python3-mpi4py-mpich
@@ -89,65 +97,74 @@ 

  Requires:       mpich

  Requires:       python3-mpich

  Requires:       python3-mpi4py-mpich

- Provides:       python3-%{name}-mpich = %{version}-%{release}

- %{?python_provide:%python_provide python3-%{name}-mpich}

+ Requires:       %{py3_dist numpy}

+ Provides:       python3-arbor-mpich = %{version}-%{release}

  

  %description mpich %{_description}

  

  %package mpich-devel

- Summary:    Development files for %{name}-mpich

- Requires:   %{name}-mpich%{?_isa} = %{version}-%{release}

- Provides:   %{name}-mpich-static = %{version}-%{release}

+ Summary:    Development files for arbor-mpich

+ Requires:   arbor-mpich%{?_isa} = %{version}-%{release}

+ Provides:   arbor-mpich-static = %{version}-%{release}

  

  %description mpich-devel %{_description}

  %endif

  

  %if %{with openmpi}

  %package openmpi

- Summary:        OpenMPI build for %{name}

+ Summary:        OpenMPI build for arbor

  BuildRequires:  openmpi-devel

  BuildRequires:  rpm-mpi-hooks

  BuildRequires:  python3-mpi4py-openmpi

- BuildRequires: make

  

  Requires:       openmpi

  Requires:       python3-openmpi

  Requires:       python3-mpi4py-openmpi

- Provides:       python3-%{name}-openmpi = %{version}-%{release}

- %{?python_provide:%python_provide python3-%{name}-openmpi}

+ Requires:       %{py3_dist numpy}

+ Provides:       python3-arbor-openmpi = %{version}-%{release}

  

  %description openmpi %{_description}

  

  %package openmpi-devel

- Summary:    Development files for %{name}-openmpi

- Requires:   %{name}-openmpi%{?_isa} = %{version}-%{release}

- Provides:   %{name}-openmpi-static = %{version}-%{release}

+ Summary:    Development files for arbor-openmpi

+ Requires:   arbor-openmpi%{?_isa} = %{version}-%{release}

+ Provides:   arbor-openmpi-static = %{version}-%{release}

  

  %description openmpi-devel %{_description}

  %endif

  

  %prep

- %if 0%{?commit:1}

- %autosetup -n %{name}-%{commit} -S git

- %else

- %autosetup -p1

- %endif

+ %forgesetup

  

+ # Disable failing padded test

+ sed -i '/test_padded.cpp/ d' test/unit/CMakeLists.txt

+ 

+ # should always be included, but is currently included only if bundled pybind11

+ # is used

+ sed -i '/add_subdirectory(python)/i \

+ include(FindPythonModule)' CMakeLists.txt

  # Do not build external libraries

- # tclap and json and random123

  sed -i -e 's/ ext-random123//' CMakeLists.txt

- # Remove ext folders, unbundle libraries

- rm -vrf ext/google-benchmark ext/json ext/random123 ext/sphinx_rtd_theme

- mv ext/tinyopt/LICENSE ext/tinyopt/LICENSE-tinyopt

+ 

  # Disable doc build: we built it ourselves

  sed -i '/add_subdirectory(doc)/ d' CMakeLists.txt

+ 

+ # Remove ext folders, unbundle libraries

+ rm -vrf ext/google-benchmark ext/json ext/random123

+ mv ext/tinyopt/LICENSE ext/tinyopt/LICENSE-tinyopt

+ 

  # 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

+ 

+ # test scripts

+ cp %{SOURCE1} scripts/

+ cp %{SOURCE2} scripts/

+ chmod +x scripts/*.sh

+ sed -i 's/ python / python3 /' scripts/run_python_examples.sh

+ sed -i 's|build/|./|' scripts/run_cpp_examples.sh

  

  # builddir for serial

  mkdir build-serial
@@ -165,7 +182,7 @@ 

  # straight away

  %global do_cmake_config %{expand: \

  echo

- echo "*** BUILDING %{name}-%{version}$MPI_COMPILE_TYPE ***"

+ echo "*** BUILDING arbor-%{version}$MPI_COMPILE_TYPE ***"

  echo

  pushd build$MPI_COMPILE_TYPE  &&

      cmake \\\
@@ -180,22 +197,23 @@ 

          -DSHARE_INSTALL_PREFIX:PATH=%{_datadir} \\\

          -DCMAKE_SKIP_RPATH:BOOL=ON \\\

          -DCMAKE_BUILD_TYPE:STRING="release" \\\

+         -DARB_USE_BUNDLED_LIBS:BOOL=OFF \\\

+         -DARB_USE_BUNDLED_PYBIND11:BOOL=OFF \\\

  %ifarch x86_64 i686 aarch64

          -DARB_VECTORIZE:BOOL=ON \\\

  %else

          -DARB_VECTORIZE:BOOL=OFF \\\

  %endif

- %ifarch %{power64}

-         -DARB_ARCH=power8 \\\

- %endif

          -DARB_WITH_MPI:BOOL=$MPI_YES \\\

          -DARB_WITH_GPU:BOOL=OFF \\\

- %ifnarch armv7hl

+ %ifnarch s390x s390

          -DARB_ARCH:STRING="native" \\\

+ %else

+         -DARB_ARCH:STRING="none" \\\

  %endif

          -DCMAKE_INSTALL_LIBDIR=%{_lib} \\\

          -DARB_WITH_PYTHON:BOOL=ON \\\

-         -Darb_pyexecdir:STRING=$MPI_PYTHON3_SITEARCH \\\

+         -DARB_PYTHON_LIB_PATH:STRING=$MPI_PYTHON3_SITEARCH \\\

  %if "%{_lib}" == "lib64"

          -DLIB_SUFFIX=64 .. &&

  %else
@@ -212,7 +230,10 @@ 

  

  %global do_make_build %{expand: \

      %make_build -C build$MPI_COMPILE_TYPE || exit -1

+     %make_build -C build$MPI_COMPILE_TYPE examples || exit -1

+ %if %{with tests}

      %make_build -C build$MPI_COMPILE_TYPE tests || exit -1

+ %endif

  }

  

  # Build serial version, dummy arguments
@@ -276,7 +297,7 @@ 

  # Install everything

  %global do_install %{expand: \

  echo

- echo "*** INSTALLING %{name}-%{version}$MPI_COMPILE_TYPE ***"

+ echo "*** INSTALLING arbor-%{version}$MPI_COMPILE_TYPE ***"

  echo

      %make_install -C build$MPI_COMPILE_TYPE || exit -1

  }
@@ -325,13 +346,50 @@ 

  %endif

  

  

+ # https://github.com/arbor-sim/arbor/blob/master/.github/workflows/basic.yml

  %if %{with tests}

  %check

- # Run for serial only. our builders are not using MPI

+ # General tests

+ export PYTHONPATH="%{buildroot}%{python3_sitearch}:%{buildroot}%{python3_sitelib}"

+ 

  # these tests segfault, filter out

  pushd build-serial

-     ./bin/unit --gtest_filter=-*mc_event_delivery*:*fvm_lowered*:*mc_cell_group*

+     %{python3} ../python/test/unit/runner.py -v2

+     ./bin/unit

+     ./bin/unit-modcc

+     cp ../scripts/run_cpp_examples.sh .

+     ./run_cpp_examples.sh

+ popd

+ ./scripts/run_python_examples.sh

+ 

+ # MPICH

+ %if %{with mpich}

+ %{_mpich_load}

+ export PYTHONPATH="%{buildroot}/$MPI_PYTHON3_SITEARCH"

+ pushd build-mpich

+     #./bin/unit --gtest_filter=-*mc_event_delivery*:*fvm_lowered*:*mc_cell_group*

+     mpirun -n %{_smp_build_ncpus} %{python3} ../python/test/unit_distributed/runner.py -v2

+     mpirun -n %{_smp_build_ncpus} ./bin/unit-mpi

+     cp ../scripts/run_cpp_examples.sh .

+     ./run_cpp_examples.sh "mpirun -n %{_smp_build_ncpus}"

  popd

+ ./scripts/run_python_examples.sh  "mpirun -n %{_smp_build_ncpus}"

+ %{_mpich_unload}

+ %endif

+ 

+ # OpenMPI

+ %if %{with openmpi}

+ %{_openmpi_load}

+ export PYTHONPATH="%{buildroot}/$MPI_PYTHON3_SITEARCH"

+ pushd build-openmpi

+     mpirun -n %{_smp_build_ncpus} %{python3} ../python/test/unit_distributed/runner.py -v2

+     mpirun -n %{_smp_build_ncpus} ./bin/unit-mpi

+     cp ../scripts/run_cpp_examples.sh .

+     ./run_cpp_examples.sh "mpirun -n %{_smp_build_ncpus}"

+ popd

+ ./scripts/run_python_examples.sh  "mpirun -n %{_smp_build_ncpus}"

+ %{_openmpi_unload}

+ %endif

  %endif

  

  
@@ -339,14 +397,16 @@ 

  %license LICENSE ext/tinyopt/LICENSE-tinyopt

  %doc README.md

  %{_bindir}/modcc

- %{python3_sitearch}/%{name}

+ %{python3_sitearch}/arbor

  

  

  %files devel

- %{_includedir}/%{name}

- %{_includedir}/%{name}env

- %{_libdir}/cmake/%{name}

+ %{_includedir}/arborio

+ %{_includedir}/arbor

+ %{_includedir}/arborenv

+ %{_libdir}/cmake/arbor

  %{_libdir}/libarbor.a

+ %{_libdir}/libarborio.a

  %{_libdir}/libarborenv.a

  

  %files doc
@@ -359,13 +419,15 @@ 

  %doc README.md

  %license LICENSE ext/tinyopt/LICENSE-tinyopt

  %{_libdir}/mpich/bin/modcc_mpich

- %{python3_sitearch}/mpich/%{name}

+ %{python3_sitearch}/mpich/arbor

  

  %files mpich-devel

- %{_libdir}/mpich/include/%{name}

- %{_libdir}/mpich/include/%{name}env

- %{_libdir}/mpich/lib/cmake/%{name}

+ %{_libdir}/mpich/include/arbor

+ %{_libdir}/mpich/include/arborio

+ %{_libdir}/mpich/include/arborenv

+ %{_libdir}/mpich/lib/cmake/arbor

  %{_libdir}/mpich/lib/libarbor.a

+ %{_libdir}/mpich/lib/libarborio.a

  %{_libdir}/mpich/lib/libarborenv.a

  %endif

  
@@ -374,17 +436,21 @@ 

  %doc README.md

  %license LICENSE ext/tinyopt/LICENSE-tinyopt

  %{_libdir}/openmpi/bin/modcc_openmpi

- %{python3_sitearch}/openmpi/%{name}

+ %{python3_sitearch}/openmpi/arbor

  

  %files openmpi-devel

- %{_libdir}/openmpi/include/%{name}

- %{_libdir}/openmpi/include/%{name}env

- %{_libdir}/openmpi/lib/cmake/%{name}

+ %{_libdir}/openmpi/include/arbor

+ %{_libdir}/openmpi/include/arborio

+ %{_libdir}/openmpi/include/arborenv

+ %{_libdir}/openmpi/lib/cmake/arbor

  %{_libdir}/openmpi/lib/libarbor.a

+ %{_libdir}/openmpi/lib/libarborio.a

  %{_libdir}/openmpi/lib/libarborenv.a

  %endif

  

  %changelog

+ %autochangelog

+ 

  * Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.3-10

  - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild

  

file added
+21
@@ -0,0 +1,21 @@ 

+ #!/usr/bin/env bash

+ # Runs all C++ examples

+ 

+ set -Eeuo pipefail

+ 

+ if [[ "$#" -gt 1 ]]; then

+     echo "usage: run_cpp_examples.sh <prefix, e.g., mpirun -n 4 -oversubscribe>"

+ 	exit 1

+ fi

+ 

+ PREFIX=${1:-}

+ 

+ $PREFIX build/bin/bench

+ $PREFIX build/bin/brunel

+ $PREFIX build/bin/dryrun

+ $PREFIX build/bin/gap_junctions

+ $PREFIX build/bin/generators

+ $PREFIX build/bin/lfp

+ $PREFIX build/bin/probe-demo v

+ $PREFIX build/bin/ring

+ $PREFIX build/bin/single-cell

@@ -0,0 +1,21 @@ 

+ #!/usr/bin/env bash

+ # Runs all Python examples

+ 

+ set -Eeuo pipefail

+ 

+ if [[ "$#" -gt 1 ]]; then

+     echo "usage: run_python_examples.sh <prefix>"

+ 	exit 1

+ fi

+ 

+ PREFIX=${1:-}

+ 

+ $PREFIX python python/example/network_ring.py

+ $PREFIX python python/example/single_cell_model.py

+ $PREFIX python python/example/single_cell_recipe.py

+ $PREFIX python python/example/single_cell_stdp.py

+ $PREFIX python python/example/brunel.py -n 400 -m 100 -e 20 -p 0.1 -w 1.2 -d 1 -g 0.5 -l 5 -t 100 -s 1 -G 50 -S 123

+ $PREFIX python python/example/single_cell_swc.py python/example/single_cell_detailed.swc

+ $PREFIX python python/example/single_cell_detailed.py python/example/single_cell_detailed.swc

+ $PREFIX python python/example/single_cell_detailed_recipe.py python/example/single_cell_detailed.swc

+ $PREFIX python python/example/single_cell_cable.py

file modified
+1 -1
@@ -1,1 +1,1 @@ 

- SHA512 (arbor-0.3.tar.gz) = d81438e6b0474615d383b9a401a0ff32b3039e19b9ff9be2648c27cf96c72951f74959dd6213579ae6f2a158579cf2e1ea325fe60ec6b9c8decd800e9a171ebc

+ SHA512 (arbor-0.5.2.tar.gz) = f53ff1d1e2fb5a00c941e5e44db73ca4cd96db1d7f22b88473b8c65569e3e50a73126d04c2fa1b583730c0760362b1172b114fccb49becd10daa8dc5d1ec07be

no initial comment

1 new commit added

  • chore: remove unused patch
2 years ago

1 new commit added

  • feat: correct flags for s390 builds
2 years ago

1 new commit added

  • chore: remove second unneeded patch
2 years ago

Pull-Request has been merged by ankursinha

2 years ago