From ebd5d80da1a4283de5258620010b1ba859df15fb Mon Sep 17 00:00:00 2001 From: sagitter Date: Nov 08 2018 20:36:36 +0000 Subject: Release 2.4.0 --- diff --git a/.gitignore b/.gitignore index b6efd76..6587b54 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /BioNetGen-2.2.5-stable.zip /BioNetGen-2.2.6-stable.tar.gz /bionetgen-BioNetGen-2.3.0.tar.gz +/bionetgen-BioNetGen-2.4.0.tar.gz diff --git a/bionetgen-isnan.patch b/bionetgen-isnan.patch deleted file mode 100644 index 15b4c73..0000000 --- a/bionetgen-isnan.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git bionetgen-BioNetGen-2.2.6-stable/bng2/Network3/src/network.h~ bionetgen-BioNetGen-2.2.6-stable/bng2/Network3/src/network.h -index 0191fca85c..5292d9fa7d 100644 ---- bionetgen-BioNetGen-2.2.6-stable/bng2/Network3/src/network.h~ -+++ bionetgen-BioNetGen-2.2.6-stable/bng2/Network3/src/network.h -@@ -39,8 +39,6 @@ using namespace std; - - #include - --extern "C" int isnan(double); -- - // Reaction types - enum {ELEMENTARY, SATURATION, MICHAELIS_MENTEN, HILL, FUNCTIONAL}; - diff --git a/bionetgen-network-solver.patch b/bionetgen-network-solver.patch new file mode 100644 index 0000000..3fcf2bf --- /dev/null +++ b/bionetgen-network-solver.patch @@ -0,0 +1,63 @@ +diff --git var/lib/mock/fedora-rawhide-x86_64/root/builddir/build/BUILD/bionetgen-BioNetGen-2.3.0/bng2/Network3/src/network.cpp.orig var/lib/mock/fedora-rawhide-x86_64/root/builddir/build/BUILD/bionetgen-BioNetGen-2.3.0/bng2/Network3/src/network.cpp +index a53a138ae7..b437797ca9 100644 +--- bionetgen-BioNetGen-2.3.0/bng2/Network3/src/network.cpp.orig ++++ bionetgen-BioNetGen-2.3.0/bng2/Network3/src/network.cpp +@@ -2627,14 +2627,17 @@ int print_rates_network(FILE* out, int discrete) { + + #include "sundials/sundials_types.h" + #include "cvode/cvode.h" ++#include "cvode/cvode_direct.h" + #include "nvector/nvector_serial.h" + +-#include "cvode/cvode_dense.h" + #include "sundials/sundials_dense.h" + #include "sundials/sundials_direct.h" ++#include "sunmatrix/sunmatrix_sparse.h" ++ ++#include "sunlinsol/sunlinsol_dense.h" ++#include "sunlinsol/sunlinsol_spgmr.h" ++ + +-#include "cvode/cvode_spgmr.h" +-#include "sundials/sundials_spgmr.h" + + typedef struct jacnode* jacnode_ref; + +@@ -2986,6 +2989,8 @@ int propagate_cvode_network(double* t, double delta_t, double* n_steps, double* + static N_Vector y; + static void* cvode_mem; + static int initflag = 0; ++ static SUNMatrix A; ++ static SUNLinearSolver LS; + long int cvode_maxnumsteps = 2000; + + /* Initializations at the beginning of new propagation */ +@@ -3018,18 +3023,26 @@ int propagate_cvode_network(double* t, double delta_t, double* n_steps, double* + * Jacobian vs finite difference + */ + if (SOLVER == GMRES || SOLVER == GMRES_J) { +- CVSpgmr(cvode_mem, PREC_NONE, 0); + if (SOLVER == GMRES_J) { + cout << "ERROR: Jacobian no longer supported for GMRES solver" << endl; + exit(1); + } ++ ++ // CVSpgmr(cvode_mem, PREC_NONE, 0); ++ A = SUNSparseMatrix(n_species, n_species, 0, CSC_MAT); ++ LS = SUNSPGMR(y, PREC_NONE, 0); ++ CVDlsSetLinearSolver(cvode_mem, LS, A); + } + else if (SOLVER == DENSE || SOLVER == DENSE_J) { +- CVDense(cvode_mem, n_species); + if (SOLVER == DENSE_J) { + cout << "ERROR: Jacobian no longer supported for dense solver" << endl; + exit(1); + } ++ ++ // CVDense(cvode_mem, n_species); ++ A = SUNDenseMatrix(n_species, n_species); ++ LS = SUNDenseLinearSolver(y, A); ++ CVDlsSetLinearSolver(cvode_mem, LS, A); + } + else { + fprintf(stderr, "ERROR: Invalid CVODE solver.\n"); diff --git a/bionetgen.spec b/bionetgen.spec index 5f6ac75..a4d4efe 100644 --- a/bionetgen.spec +++ b/bionetgen.spec @@ -1,18 +1,16 @@ Name: bionetgen -Version: 2.3.0 -Release: 9%{?dist} +Version: 2.4.0 +Release: 1%{?dist} Summary: Software for rule-based modeling of biochemical systems - License: GPLv3 URL: https://github.com/RuleWorld/bionetgen -Source0: https://github.com/RuleWorld/bionetgen/archive/BioNetGen-%{version}.tar.gz#/bionetgen-BioNetGen-%{version}.tar.gz -Patch0: bionetgen-isnan.patch +Source0: https://github.com/RuleWorld/bionetgen/archive/bionetgen-BioNetGen-%{version}.tar.gz # patch based on example in # http://sundials.2283335.n4.nabble.com/Usage-notes-lead-to-the-example-that-uses-the-non-existent-header-cvode-cvode-dense-h-td4654260.html -Patch1: network-solver.diff +Patch0: %{name}-network-solver.patch -BuildRequires: muParser-devel >= 2.2.3-6 +BuildRequires: muParser-devel BuildRequires: perl-generators BuildRequires: sundials-devel BuildRequires: openmpi-devel @@ -47,7 +45,10 @@ Requires: bionetgen = %{version}-%{release} %{summary}. %prep -%autosetup -n bionetgen-BioNetGen-%{version} -p1 +%setup -q -n bionetgen-BioNetGen-%{version} +%if 0%{?fedora} +%autopatch -p1 +%endif rm bng2/libsource/* pushd bng2/Network3 @@ -58,27 +59,33 @@ sed -i -r 's/(run_network_LDADD =).*/\1 libmathutils.la -lmuparser -lsundials_nv %build pushd bng2/Network3 autoreconf -iv -%_openmpi_load +%{_openmpi_load} warnings="-Wno-unused-variable -Wno-unused-function -Wno-unused-but-set-variable -Wno-maybe-uninitialized" -CXXFLAGS="%{__global_cxxflags} $warnings" %configure +CXXFLAGS="%{optflags} $warnings" %configure %make_build -C src +%{_openmpi_unload} +popd %install %make_install -C bng2/Network3/src -mkdir -vp %{buildroot}/%{perl_vendorlib}/BioNetGen -cp -r bng2/Perl2 %{buildroot}/%{perl_vendorlib}/BioNetGen/ -cp bng2/BNG2.pl %{buildroot}/%{perl_vendorlib}/BioNetGen/ +mkdir -vp %{buildroot}%{perl_vendorlib}/BioNetGen +cp -r bng2/Perl2 %{buildroot}%{perl_vendorlib}/BioNetGen/ +cp bng2/BNG2.pl %{buildroot}%{perl_vendorlib}/BioNetGen/ %files -%license bng2/LICENSE.txt -%doc README.md bng2/CREDITS.txt bng2/CHANGES.txt bng2/README_FIRST.txt +%license LICENSE +%doc README.md bng2/CREDITS.txt bng2/CHANGES.txt bng2/VERSION %{_bindir}/run_network %files perl %{perl_vendorlib}/BioNetGen %changelog +* Thu Nov 08 2018 Antonio Trande - 2.4.0-1 +- Release 2.4.0 +- Drop obsolete patch + * Thu Jul 12 2018 Fedora Release Engineering - 2.3.0-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild diff --git a/network-solver.diff b/network-solver.diff deleted file mode 100644 index 3fcf2bf..0000000 --- a/network-solver.diff +++ /dev/null @@ -1,63 +0,0 @@ -diff --git var/lib/mock/fedora-rawhide-x86_64/root/builddir/build/BUILD/bionetgen-BioNetGen-2.3.0/bng2/Network3/src/network.cpp.orig var/lib/mock/fedora-rawhide-x86_64/root/builddir/build/BUILD/bionetgen-BioNetGen-2.3.0/bng2/Network3/src/network.cpp -index a53a138ae7..b437797ca9 100644 ---- bionetgen-BioNetGen-2.3.0/bng2/Network3/src/network.cpp.orig -+++ bionetgen-BioNetGen-2.3.0/bng2/Network3/src/network.cpp -@@ -2627,14 +2627,17 @@ int print_rates_network(FILE* out, int discrete) { - - #include "sundials/sundials_types.h" - #include "cvode/cvode.h" -+#include "cvode/cvode_direct.h" - #include "nvector/nvector_serial.h" - --#include "cvode/cvode_dense.h" - #include "sundials/sundials_dense.h" - #include "sundials/sundials_direct.h" -+#include "sunmatrix/sunmatrix_sparse.h" -+ -+#include "sunlinsol/sunlinsol_dense.h" -+#include "sunlinsol/sunlinsol_spgmr.h" -+ - --#include "cvode/cvode_spgmr.h" --#include "sundials/sundials_spgmr.h" - - typedef struct jacnode* jacnode_ref; - -@@ -2986,6 +2989,8 @@ int propagate_cvode_network(double* t, double delta_t, double* n_steps, double* - static N_Vector y; - static void* cvode_mem; - static int initflag = 0; -+ static SUNMatrix A; -+ static SUNLinearSolver LS; - long int cvode_maxnumsteps = 2000; - - /* Initializations at the beginning of new propagation */ -@@ -3018,18 +3023,26 @@ int propagate_cvode_network(double* t, double delta_t, double* n_steps, double* - * Jacobian vs finite difference - */ - if (SOLVER == GMRES || SOLVER == GMRES_J) { -- CVSpgmr(cvode_mem, PREC_NONE, 0); - if (SOLVER == GMRES_J) { - cout << "ERROR: Jacobian no longer supported for GMRES solver" << endl; - exit(1); - } -+ -+ // CVSpgmr(cvode_mem, PREC_NONE, 0); -+ A = SUNSparseMatrix(n_species, n_species, 0, CSC_MAT); -+ LS = SUNSPGMR(y, PREC_NONE, 0); -+ CVDlsSetLinearSolver(cvode_mem, LS, A); - } - else if (SOLVER == DENSE || SOLVER == DENSE_J) { -- CVDense(cvode_mem, n_species); - if (SOLVER == DENSE_J) { - cout << "ERROR: Jacobian no longer supported for dense solver" << endl; - exit(1); - } -+ -+ // CVDense(cvode_mem, n_species); -+ A = SUNDenseMatrix(n_species, n_species); -+ LS = SUNDenseLinearSolver(y, A); -+ CVDlsSetLinearSolver(cvode_mem, LS, A); - } - else { - fprintf(stderr, "ERROR: Invalid CVODE solver.\n"); diff --git a/sources b/sources index 538e51c..5daf55d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (bionetgen-BioNetGen-2.3.0.tar.gz) = 73bb7e1de2d5401a45736f04dfa6ef7c799acef459071bf6d34c5efa97360a17e72fc91386f372ab07ccae569dc7d8e93b9ba2f8925b998a06ff7b585a9d7703 +SHA512 (bionetgen-BioNetGen-2.4.0.tar.gz) = 0288d365e1c5b949d78e323e5d8ab319b30bb2b6b987e57be49ac158422c6837beb12854fa772da43ff42be65036ead7839b703d9c119a3b079e0a256cfe35e2