#1 Release 0.3
Closed 3 years ago by ankursinha. Opened 3 years ago by sagitter.
rpms/ sagitter/arbor master  into  master

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

  /arbor-0.2.2.tar.gz

  /arbor-f12f934.tar.gz

  /arbor-fb5d4ea.tar.gz

+ /arbor-0.3.tar.gz

@@ -1,24 +0,0 @@ 

- From 015bce3b60da23b18b308c6b758b463650cff397 Mon Sep 17 00:00:00 2001

- From: "Ankur Sinha (Ankur Sinha Gmail)" <sanjay.ankur@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

- 

arbor-0001-Use-system-pybind11.patch 0001-Use-system-pybind11.patch
file renamed
+3 -9
@@ -3,15 +3,11 @@ 

  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 bf4d5f0..0057102 100644

  --- a/python/CMakeLists.txt

  +++ b/python/CMakeLists.txt

- @@ -1,18 +1,10 @@

+ @@ -1,19 +1,10 @@

   include(FindPythonModule) # required for find_python_module

   

  -# Set up pybind11 as an external project.
@@ -30,9 +26,7 @@ 

  -# instead of using find_package.

  -set(PYBIND11_CPP_STANDARD -std=c++14)

  -add_subdirectory(pybind11)

-  

+ -

   set(pyarb_source

       cells.cpp

- -- 

- 2.24.1

- 

+      config.cpp

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

+ --- 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
+45 -18
@@ -19,14 +19,13 @@ 

  

  %bcond_without tests

  

- %global commit  fb5d4ea736282dce14c3284bc5db748b082db957

- %global checkoutdate  20200225

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

+ #%%global commit  fb5d4ea736282dce14c3284bc5db748b082db957

+ #%%global checkoutdate  20200225

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

  

  Name:           arbor

- Version:        0.2.2

- 

- Release:        8.%{checkoutdate}git%{commit}%{?dist}

+ Version:        0.3

+ Release:        2%{?dist}

  Summary:        Multi-compartment neural network simulation library

  

  License:        BSD
@@ -38,10 +37,10 @@ 

  %endif

  # Use the system copy of pybind11

  # https://github.com/arbor-sim/arbor/issues/915

- Patch0:         0001-Use-system-pybind11.patch

- # Include missing header

- # https://github.com/arbor-sim/arbor/pull/963

- Patch1:         0001-Include-required-header.patch

+ 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

  

  # Random123 does not support these

  ExcludeArch:    mips64r2 mips32r2 s390 s390x
@@ -56,6 +55,8 @@ 

  BuildRequires:  python3-devel

  BuildRequires:  Random123-devel

  BuildRequires:  tclap-devel

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

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

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

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

  
@@ -87,6 +88,8 @@ 

  Requires:       mpich

  Requires:       python3-mpich

  Requires:       python3-mpi4py-mpich

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

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

  

  %description mpich %{_description}

  
@@ -108,6 +111,8 @@ 

  Requires:       openmpi

  Requires:       python3-openmpi

  Requires:       python3-mpi4py-openmpi

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

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

  

  %description openmpi %{_description}

  
@@ -123,14 +128,15 @@ 

  %if 0%{?commit:1}

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

  %else

- %autosetup -S git

+ %autosetup -p1

  %endif

  

  # Do not build external libraries

  # tclap and json and random123

- sed -i -e '/add_subdirectory(ext)/ d' -e 's/ ext-random123//' CMakeLists.txt

- # Remove ext folder

- rm -vrf ext

+ 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

  # tclap and json are both header only
@@ -159,7 +165,6 @@ 

  echo

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

  echo

- %set_build_flags

  pushd build$MPI_COMPILE_TYPE  &&

      cmake \\\

          -DCMAKE_C_FLAGS_RELEASE:STRING="-DNDEBUG" \\\
@@ -178,6 +183,9 @@ 

  %else

          -DARB_VECTORIZE:BOOL=OFF \\\

  %endif

+ %ifarch %{power64}

+         -DARB_ARCH=power8 \\\

+ %endif

          -DARB_WITH_MPI:BOOL=$MPI_YES \\\

          -DARB_WITH_GPU:BOOL=OFF \\\

          -DARB_ARCH:STRING="native" \\\
@@ -211,6 +219,10 @@ 

  export MPI_LIB=%{_libdir}

  export MPI_YES=OFF

  export MPI_COMPILE_TYPE="-serial"

+ export CFLAGS="%{build_cflags}"

+ export CXXFLAGS="%{build_cxxflags}"

+ export FFLAGS="%{build_fflags}"

+ export LDFLAGS="%{build_ldflags}"

  export MPI_PYTHON3_SITEARCH=%{python3_sitearch}

  %{do_cmake_config}

  %{do_make_build}
@@ -229,6 +241,10 @@ 

  export FC=mpif90

  export F77=mpif77

  export MPI_YES=ON

+ export CFLAGS="%{build_cflags}"

+ export CXXFLAGS="%{build_cxxflags}"

+ export FFLAGS="%{build_fflags}"

+ export LDFLAGS="%{build_ldflags}"

  export MPI_COMPILE_TYPE="-mpich"

  %{do_cmake_config}

  %{do_make_build}
@@ -244,6 +260,10 @@ 

  export FC=mpif90

  export F77=mpif77

  export MPI_YES=ON

+ export CFLAGS="%{build_cflags}"

+ export CXXFLAGS="%{build_cxxflags}"

+ export FFLAGS="%{build_fflags}"

+ export LDFLAGS="%{build_ldflags}"

  # Python 3

  export MPI_COMPILE_TYPE="-openmpi"

  %{do_cmake_config}
@@ -316,7 +336,7 @@ 

  

  

  %files

- %license LICENSE

+ %license LICENSE ext/tinyopt/LICENSE-tinyopt

  %doc README.md

  %{_bindir}/modcc

  %{python3_sitearch}/%{name}
@@ -337,7 +357,7 @@ 

  %if %{with mpich}

  %files mpich

  %doc README.md

- %license LICENSE

+ %license LICENSE ext/tinyopt/LICENSE-tinyopt

  %{_libdir}/mpich/bin/modcc_mpich

  %{python3_sitearch}/mpich/%{name}

  
@@ -352,7 +372,7 @@ 

  %if %{with openmpi}

  %files openmpi

  %doc README.md

- %license LICENSE

+ %license LICENSE ext/tinyopt/LICENSE-tinyopt

  %{_libdir}/openmpi/bin/modcc_openmpi

  %{python3_sitearch}/openmpi/%{name}

  
@@ -365,6 +385,13 @@ 

  %endif

  

  %changelog

+ * Mon Jun 08 2020 Antonio Trande <sagitter@fedoraproject.org> - 0.3-2

+ - Move Provides lines to runtime packages

+ - Add patch for using tinyopt libraries

+ 

+ * Sat Jun 06 2020 Antonio Trande <sagitter@fedoraproject.org> - 0.3-1

+ - Release 0.3

+ 

  * Tue May 26 2020 Miro HronĨok <mhroncok@redhat.com> - 0.2.2-8.20200225gitfb5d4ea736282dce14c3284bc5db748b082db957

  - Rebuilt for Python 3.9

  

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

- SHA512 (arbor-fb5d4ea.tar.gz) = d514ad36a63820cab543b19adf1f63218decfa7d6e9f8726178d90668c59952bde4daba91699c93b9678da4f42313050a8799ec58a5e78ef7d7f86a681ffc8b0

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

  • Release 0.3
  • Drop obsolete patch
  • Use bundled tinyopt header only libraries

Could you add a short comment explaining the patches please? Just so others know what these are for?

Is there an advantage of replacing %{set_build_flags} in the marco with these explicit statements everywhere?

Just noticed these: shouldn't these provide statements be in the non-devel subpackages?

Thanks @sagitter ! I've pointed out one or two things that I noticed, could you please have a look when you have a minute?

Metadata Update from @ankursinha:
- Request assigned

3 years ago

Could you add a short comment explaining the patches please? Just so others know what these are for?

Previous patch removes all third party libraries under ext/.
This new one removes all except ext/tinyopt (required during compile time) and changes ext/CMakeLists.txt for automatically using them by cmake command.

Is there an advantage of replacing %{set_build_flags} in the marco with these explicit statements everywhere?

Setting %{set_build_flags} before MPI builds overrides compiler flags (note that now mpic* compilers are used).

Just noticed these: shouldn't these provide statements be in the non-devel subpackages?

Since you listed Python files inside devel sub-packages, those Provide lines must be there; unless you create dedicated python sub-packages.

Could you add a short comment explaining the patches please? Just so others know what these are for?

Previous patch removes all third party libraries under ext/.
This new one removes all except ext/tinyopt (required during compile time) and changes ext/CMakeLists.txt for automatically using them by cmake command.

I meant in the spec :)

Is there an advantage of replacing %{set_build_flags} in the marco with these explicit statements everywhere?

Setting %{set_build_flags} before MPI builds overrides compiler flags (note that now mpic* compilers are used).

Hrm, really? Doesn't %{set_build_flags} literally just do what you're doing manually there, and it doesn't touch the export CXX=mpicxx lines either, so I'm still not seeing how moving these commands out of the macro makes a difference. What flags is it overriding and how is manually doing the exports later avoiding that?

$ rpm -E "%{set_build_flags}"

  CFLAGS="${CFLAGS:--O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection}" ; export CFLAGS ; 
  CXXFLAGS="${CXXFLAGS:--O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection}" ; export CXXFLAGS ; 
  FFLAGS="${FFLAGS:--O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -I/usr/lib64/gfortran/modules}" ; export FFLAGS ; 
  FCFLAGS="${FCFLAGS:--O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -I/usr/lib64/gfortran/modules}" ; export FCFLAGS ; 
  LDFLAGS="${LDFLAGS:--Wl,-z,relro -Wl,--as-needed  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld}" ; export LDFLAGS ; 
  LT_SYS_LIBRARY_PATH="${LT_SYS_LIBRARY_PATH:-/usr/lib64:}" ; export LT_SYS_LIBRARY_PATH

I just had a look at the latest build too. The mpic* compilers are used there for the mpi builds already:
https://kojipkgs.fedoraproject.org//packages/arbor/0.2.2/8.20200225gitfb5d4ea736282dce14c3284bc5db748b082db957.fc33/data/logs/x86_64/build.log

For example:

cd /builddir/build/BUILD/arbor-fb5d4ea736282dce14c3284bc5db748b082db957/build-mpich/modcc && /usr/lib64/mpich/bin/mpicxx   -I/builddir/build/BUILD/arbor-fb5d4ea736282dce14c3284bc5db748b082db957/modcc/.  -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -DNDEBUG -fPIC   -g -Wall -Wno-maybe-uninitialized -std=gnu++14 -o CMakeFiles/libmodcc.dir/blocks.cpp.o -c /builddir/build/BUILD/arbor-fb5d4ea736282dce14c3284bc5db748b082db957/modcc/blocks.cpp

So could you please explain the difference with your changes now? (Sorry, I'm being dense but I just don't see it :laughing: )

Just noticed these: shouldn't these provide statements be in the non-devel subpackages?

Since you listed Python files inside devel sub-packages, those Provide lines must be there; unless you create dedicated python sub-packages.

No, the python files are in the non-devel subpackages:

https://src.fedoraproject.org/rpms/arbor/blob/master/f/arbor.spec#_322
https://src.fedoraproject.org/rpms/arbor/blob/master/f/arbor.spec#_342
https://src.fedoraproject.org/rpms/arbor/blob/master/f/arbor.spec#_357

I just had a look at the latest build too. The mpic* compilers are used there for the mpi builds already:
No, the python files are in the non-devel subpackages:

I had read something else therefore. :)
Sorry, nevermind.

I just had a look at the latest build too. The mpic* compilers are used there for the mpi builds already:

However, try to build the release 0.3 with your settings before.

1 new commit added

  • Move Provides lines to runtime packages
3 years ago

Thanks! If you could just double-check the flags bit. I'm still not sure if that change is required. I'll try and run a test build this week to see how the two things are different too.

Pull-Request has been closed by ankursinha

3 years ago

I've merged manually (pagure doesn't detect those). Thanks very much :)