Skip to content
11 changes: 9 additions & 2 deletions .github/workflows/test_python_cplusplus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,20 +143,27 @@ jobs:
runs-on: macos-latest

steps:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.8

- uses: actions/checkout@v3
- run: git fetch --prune --unshallow

- run: echo "AMICI_DIR=$(pwd)" >> $GITHUB_ENV
- run: echo "BNGPATH=${AMICI_DIR}/ThirdParty/BioNetGen-2.7.0" >> $GITHUB_ENV
# Ensure CMake is using the python version that we will use for the python tests later on
- run: echo "PYTHON_EXECUTABLE=${Python3_ROOT_DIR}/bin/python3" >> $GITHUB_ENV

# install amici dependencies
- name: homebrew
run: |
brew install hdf5 swig gcc cppcheck libomp boost \
&& brew ls -v boost \
&& brew ls -v libomp \
&& echo LDFLAGS="-L/usr/local/lib/ -L/usr/local/Cellar/boost/1.78.0_1/lib/" >> $GITHUB_ENV \
&& echo CPPFLAGS="-I/usr/local/Cellar/boost/1.78.0_1/include/" >> $GITHUB_ENV
&& echo LDFLAGS="-L/usr/local/lib/ -L/usr/local/Cellar/boost/1.80.0/lib/" >> $GITHUB_ENV \
&& echo CPPFLAGS="-I/usr/local/Cellar/boost/1.80.0/include/" >> $GITHUB_ENV

- name: Build AMICI
run: |
Expand Down
4 changes: 2 additions & 2 deletions models/model_calvetti/model_calvetti.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#ifndef _amici_model_calvetti_h
#define _amici_model_calvetti_h
/* Generated by amiwrap (R2017b) fee0d5a069aba864a92ded7da50ae68ea7ea43cc */
/* Generated by amiwrap (R2017b) b04ab2326fb34f3721a15806d9783ff22b6a015a */
#include <cmath>
#include <memory>
#include "amici/defines.h"
Expand Down Expand Up @@ -70,7 +70,7 @@ class Model_model_calvetti : public amici::Model_DAE {

amici::Model* clone() const override { return new Model_model_calvetti(*this); };

std::string getAmiciCommit() const override { return "fee0d5a069aba864a92ded7da50ae68ea7ea43cc"; };
std::string getAmiciCommit() const override { return "b04ab2326fb34f3721a15806d9783ff22b6a015a"; };

void fJSparse(SUNMatrixContent_Sparse JSparse, const realtype t, const realtype *x, const realtype *p, const realtype *k, const realtype *h, const realtype cj, const realtype *dx, const realtype *w, const realtype *dwdx) override {
JSparse_model_calvetti(JSparse, t, x, p, k, h, cj, dx, w, dwdx);
Expand Down
5 changes: 4 additions & 1 deletion models/model_calvetti/swig/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,15 @@ endif(POLICY CMP0086)
find_package(SWIG REQUIRED)
include(${SWIG_USE_FILE})

if(DEFINED ENV{PYTHON_EXECUTABLE})
set(Python3_EXECUTABLE $ENV{PYTHON_EXECUTABLE})
endif()
if(${CMAKE_VERSION} VERSION_LESS "3.12.0")
find_package(PythonLibs REQUIRED)
include_directories(${PYTHON_INCLUDE_DIRS})
set(Python3_LIBRARIES ${PYTHON_LIBRARIES})
else()
find_package (Python3 COMPONENTS Development)
find_package(Python3 COMPONENTS Interpreter Development)
include_directories(${Python3_INCLUDE_DIRS})
endif()

Expand Down
4 changes: 2 additions & 2 deletions models/model_dirac/model_dirac.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#ifndef _amici_model_dirac_h
#define _amici_model_dirac_h
/* Generated by amiwrap (R2017b) fee0d5a069aba864a92ded7da50ae68ea7ea43cc */
/* Generated by amiwrap (R2017b) b04ab2326fb34f3721a15806d9783ff22b6a015a */
#include <cmath>
#include <memory>
#include "amici/defines.h"
Expand Down Expand Up @@ -70,7 +70,7 @@ class Model_model_dirac : public amici::Model_ODE {

amici::Model* clone() const override { return new Model_model_dirac(*this); };

std::string getAmiciCommit() const override { return "fee0d5a069aba864a92ded7da50ae68ea7ea43cc"; };
std::string getAmiciCommit() const override { return "b04ab2326fb34f3721a15806d9783ff22b6a015a"; };

void fJSparse(SUNMatrixContent_Sparse JSparse, const realtype t, const realtype *x, const realtype *p, const realtype *k, const realtype *h, const realtype *w, const realtype *dwdx) override {
JSparse_model_dirac(JSparse, t, x, p, k, h, w, dwdx);
Expand Down
5 changes: 4 additions & 1 deletion models/model_dirac/swig/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,15 @@ endif(POLICY CMP0086)
find_package(SWIG REQUIRED)
include(${SWIG_USE_FILE})

if(DEFINED ENV{PYTHON_EXECUTABLE})
set(Python3_EXECUTABLE $ENV{PYTHON_EXECUTABLE})
endif()
if(${CMAKE_VERSION} VERSION_LESS "3.12.0")
find_package(PythonLibs REQUIRED)
include_directories(${PYTHON_INCLUDE_DIRS})
set(Python3_LIBRARIES ${PYTHON_LIBRARIES})
else()
find_package (Python3 COMPONENTS Development)
find_package(Python3 COMPONENTS Interpreter Development)
include_directories(${Python3_INCLUDE_DIRS})
endif()

Expand Down
4 changes: 2 additions & 2 deletions models/model_events/model_events.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#ifndef _amici_model_events_h
#define _amici_model_events_h
/* Generated by amiwrap (R2017b) fee0d5a069aba864a92ded7da50ae68ea7ea43cc */
/* Generated by amiwrap (R2017b) b04ab2326fb34f3721a15806d9783ff22b6a015a */
#include <cmath>
#include <memory>
#include "amici/defines.h"
Expand Down Expand Up @@ -84,7 +84,7 @@ class Model_model_events : public amici::Model_ODE {

amici::Model* clone() const override { return new Model_model_events(*this); };

std::string getAmiciCommit() const override { return "fee0d5a069aba864a92ded7da50ae68ea7ea43cc"; };
std::string getAmiciCommit() const override { return "b04ab2326fb34f3721a15806d9783ff22b6a015a"; };

void fJSparse(SUNMatrixContent_Sparse JSparse, const realtype t, const realtype *x, const realtype *p, const realtype *k, const realtype *h, const realtype *w, const realtype *dwdx) override {
JSparse_model_events(JSparse, t, x, p, k, h, w, dwdx);
Expand Down
5 changes: 4 additions & 1 deletion models/model_events/swig/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,15 @@ endif(POLICY CMP0086)
find_package(SWIG REQUIRED)
include(${SWIG_USE_FILE})

if(DEFINED ENV{PYTHON_EXECUTABLE})
set(Python3_EXECUTABLE $ENV{PYTHON_EXECUTABLE})
endif()
if(${CMAKE_VERSION} VERSION_LESS "3.12.0")
find_package(PythonLibs REQUIRED)
include_directories(${PYTHON_INCLUDE_DIRS})
set(Python3_LIBRARIES ${PYTHON_LIBRARIES})
else()
find_package (Python3 COMPONENTS Development)
find_package(Python3 COMPONENTS Interpreter Development)
include_directories(${Python3_INCLUDE_DIRS})
endif()

Expand Down
4 changes: 2 additions & 2 deletions models/model_jakstat_adjoint/model_jakstat_adjoint.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#ifndef _amici_model_jakstat_adjoint_h
#define _amici_model_jakstat_adjoint_h
/* Generated by amiwrap (R2017b) fee0d5a069aba864a92ded7da50ae68ea7ea43cc */
/* Generated by amiwrap (R2017b) b04ab2326fb34f3721a15806d9783ff22b6a015a */
#include <cmath>
#include <memory>
#include "amici/defines.h"
Expand Down Expand Up @@ -73,7 +73,7 @@ class Model_model_jakstat_adjoint : public amici::Model_ODE {

amici::Model* clone() const override { return new Model_model_jakstat_adjoint(*this); };

std::string getAmiciCommit() const override { return "fee0d5a069aba864a92ded7da50ae68ea7ea43cc"; };
std::string getAmiciCommit() const override { return "b04ab2326fb34f3721a15806d9783ff22b6a015a"; };

void fJSparse(SUNMatrixContent_Sparse JSparse, const realtype t, const realtype *x, const realtype *p, const realtype *k, const realtype *h, const realtype *w, const realtype *dwdx) override {
JSparse_model_jakstat_adjoint(JSparse, t, x, p, k, h, w, dwdx);
Expand Down
5 changes: 4 additions & 1 deletion models/model_jakstat_adjoint/swig/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,15 @@ endif(POLICY CMP0086)
find_package(SWIG REQUIRED)
include(${SWIG_USE_FILE})

if(DEFINED ENV{PYTHON_EXECUTABLE})
set(Python3_EXECUTABLE $ENV{PYTHON_EXECUTABLE})
endif()
if(${CMAKE_VERSION} VERSION_LESS "3.12.0")
find_package(PythonLibs REQUIRED)
include_directories(${PYTHON_INCLUDE_DIRS})
set(Python3_LIBRARIES ${PYTHON_LIBRARIES})
else()
find_package (Python3 COMPONENTS Development)
find_package(Python3 COMPONENTS Interpreter Development)
include_directories(${Python3_INCLUDE_DIRS})
endif()

Expand Down
4 changes: 2 additions & 2 deletions models/model_jakstat_adjoint_o2/model_jakstat_adjoint_o2.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#ifndef _amici_model_jakstat_adjoint_o2_h
#define _amici_model_jakstat_adjoint_o2_h
/* Generated by amiwrap (R2017b) fee0d5a069aba864a92ded7da50ae68ea7ea43cc */
/* Generated by amiwrap (R2017b) b04ab2326fb34f3721a15806d9783ff22b6a015a */
#include <cmath>
#include <memory>
#include "amici/defines.h"
Expand Down Expand Up @@ -73,7 +73,7 @@ class Model_model_jakstat_adjoint_o2 : public amici::Model_ODE {

amici::Model* clone() const override { return new Model_model_jakstat_adjoint_o2(*this); };

std::string getAmiciCommit() const override { return "fee0d5a069aba864a92ded7da50ae68ea7ea43cc"; };
std::string getAmiciCommit() const override { return "b04ab2326fb34f3721a15806d9783ff22b6a015a"; };

void fJSparse(SUNMatrixContent_Sparse JSparse, const realtype t, const realtype *x, const realtype *p, const realtype *k, const realtype *h, const realtype *w, const realtype *dwdx) override {
JSparse_model_jakstat_adjoint_o2(JSparse, t, x, p, k, h, w, dwdx);
Expand Down
5 changes: 4 additions & 1 deletion models/model_jakstat_adjoint_o2/swig/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,15 @@ endif(POLICY CMP0086)
find_package(SWIG REQUIRED)
include(${SWIG_USE_FILE})

if(DEFINED ENV{PYTHON_EXECUTABLE})
set(Python3_EXECUTABLE $ENV{PYTHON_EXECUTABLE})
endif()
if(${CMAKE_VERSION} VERSION_LESS "3.12.0")
find_package(PythonLibs REQUIRED)
include_directories(${PYTHON_INCLUDE_DIRS})
set(Python3_LIBRARIES ${PYTHON_LIBRARIES})
else()
find_package (Python3 COMPONENTS Development)
find_package(Python3 COMPONENTS Interpreter Development)
include_directories(${Python3_INCLUDE_DIRS})
endif()

Expand Down
4 changes: 2 additions & 2 deletions models/model_nested_events/model_nested_events.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#ifndef _amici_model_nested_events_h
#define _amici_model_nested_events_h
/* Generated by amiwrap (R2017b) fee0d5a069aba864a92ded7da50ae68ea7ea43cc */
/* Generated by amiwrap (R2017b) b04ab2326fb34f3721a15806d9783ff22b6a015a */
#include <cmath>
#include <memory>
#include "amici/defines.h"
Expand Down Expand Up @@ -73,7 +73,7 @@ class Model_model_nested_events : public amici::Model_ODE {

amici::Model* clone() const override { return new Model_model_nested_events(*this); };

std::string getAmiciCommit() const override { return "fee0d5a069aba864a92ded7da50ae68ea7ea43cc"; };
std::string getAmiciCommit() const override { return "b04ab2326fb34f3721a15806d9783ff22b6a015a"; };

void fJSparse(SUNMatrixContent_Sparse JSparse, const realtype t, const realtype *x, const realtype *p, const realtype *k, const realtype *h, const realtype *w, const realtype *dwdx) override {
JSparse_model_nested_events(JSparse, t, x, p, k, h, w, dwdx);
Expand Down
5 changes: 4 additions & 1 deletion models/model_nested_events/swig/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,15 @@ endif(POLICY CMP0086)
find_package(SWIG REQUIRED)
include(${SWIG_USE_FILE})

if(DEFINED ENV{PYTHON_EXECUTABLE})
set(Python3_EXECUTABLE $ENV{PYTHON_EXECUTABLE})
endif()
if(${CMAKE_VERSION} VERSION_LESS "3.12.0")
find_package(PythonLibs REQUIRED)
include_directories(${PYTHON_INCLUDE_DIRS})
set(Python3_LIBRARIES ${PYTHON_LIBRARIES})
else()
find_package (Python3 COMPONENTS Development)
find_package(Python3 COMPONENTS Interpreter Development)
include_directories(${Python3_INCLUDE_DIRS})
endif()

Expand Down
4 changes: 2 additions & 2 deletions models/model_neuron/model_neuron.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#ifndef _amici_model_neuron_h
#define _amici_model_neuron_h
/* Generated by amiwrap (R2017b) fee0d5a069aba864a92ded7da50ae68ea7ea43cc */
/* Generated by amiwrap (R2017b) b04ab2326fb34f3721a15806d9783ff22b6a015a */
#include <cmath>
#include <memory>
#include "amici/defines.h"
Expand Down Expand Up @@ -87,7 +87,7 @@ class Model_model_neuron : public amici::Model_ODE {

amici::Model* clone() const override { return new Model_model_neuron(*this); };

std::string getAmiciCommit() const override { return "fee0d5a069aba864a92ded7da50ae68ea7ea43cc"; };
std::string getAmiciCommit() const override { return "b04ab2326fb34f3721a15806d9783ff22b6a015a"; };

void fJSparse(SUNMatrixContent_Sparse JSparse, const realtype t, const realtype *x, const realtype *p, const realtype *k, const realtype *h, const realtype *w, const realtype *dwdx) override {
JSparse_model_neuron(JSparse, t, x, p, k, h, w, dwdx);
Expand Down
5 changes: 4 additions & 1 deletion models/model_neuron/swig/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,15 @@ endif(POLICY CMP0086)
find_package(SWIG REQUIRED)
include(${SWIG_USE_FILE})

if(DEFINED ENV{PYTHON_EXECUTABLE})
set(Python3_EXECUTABLE $ENV{PYTHON_EXECUTABLE})
endif()
if(${CMAKE_VERSION} VERSION_LESS "3.12.0")
find_package(PythonLibs REQUIRED)
include_directories(${PYTHON_INCLUDE_DIRS})
set(Python3_LIBRARIES ${PYTHON_LIBRARIES})
else()
find_package (Python3 COMPONENTS Development)
find_package(Python3 COMPONENTS Interpreter Development)
include_directories(${Python3_INCLUDE_DIRS})
endif()

Expand Down
4 changes: 2 additions & 2 deletions models/model_neuron_o2/model_neuron_o2.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#ifndef _amici_model_neuron_o2_h
#define _amici_model_neuron_o2_h
/* Generated by amiwrap (R2017b) fee0d5a069aba864a92ded7da50ae68ea7ea43cc */
/* Generated by amiwrap (R2017b) b04ab2326fb34f3721a15806d9783ff22b6a015a */
#include <cmath>
#include <memory>
#include "amici/defines.h"
Expand Down Expand Up @@ -89,7 +89,7 @@ class Model_model_neuron_o2 : public amici::Model_ODE {

amici::Model* clone() const override { return new Model_model_neuron_o2(*this); };

std::string getAmiciCommit() const override { return "fee0d5a069aba864a92ded7da50ae68ea7ea43cc"; };
std::string getAmiciCommit() const override { return "b04ab2326fb34f3721a15806d9783ff22b6a015a"; };

void fJSparse(SUNMatrixContent_Sparse JSparse, const realtype t, const realtype *x, const realtype *p, const realtype *k, const realtype *h, const realtype *w, const realtype *dwdx) override {
JSparse_model_neuron_o2(JSparse, t, x, p, k, h, w, dwdx);
Expand Down
5 changes: 4 additions & 1 deletion models/model_neuron_o2/swig/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,15 @@ endif(POLICY CMP0086)
find_package(SWIG REQUIRED)
include(${SWIG_USE_FILE})

if(DEFINED ENV{PYTHON_EXECUTABLE})
set(Python3_EXECUTABLE $ENV{PYTHON_EXECUTABLE})
endif()
if(${CMAKE_VERSION} VERSION_LESS "3.12.0")
find_package(PythonLibs REQUIRED)
include_directories(${PYTHON_INCLUDE_DIRS})
set(Python3_LIBRARIES ${PYTHON_LIBRARIES})
else()
find_package (Python3 COMPONENTS Development)
find_package(Python3 COMPONENTS Interpreter Development)
include_directories(${Python3_INCLUDE_DIRS})
endif()

Expand Down
4 changes: 2 additions & 2 deletions models/model_robertson/model_robertson.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#ifndef _amici_model_robertson_h
#define _amici_model_robertson_h
/* Generated by amiwrap (R2017b) fee0d5a069aba864a92ded7da50ae68ea7ea43cc */
/* Generated by amiwrap (R2017b) b04ab2326fb34f3721a15806d9783ff22b6a015a */
#include <cmath>
#include <memory>
#include "amici/defines.h"
Expand Down Expand Up @@ -71,7 +71,7 @@ class Model_model_robertson : public amici::Model_DAE {

amici::Model* clone() const override { return new Model_model_robertson(*this); };

std::string getAmiciCommit() const override { return "fee0d5a069aba864a92ded7da50ae68ea7ea43cc"; };
std::string getAmiciCommit() const override { return "b04ab2326fb34f3721a15806d9783ff22b6a015a"; };

void fJSparse(SUNMatrixContent_Sparse JSparse, const realtype t, const realtype *x, const realtype *p, const realtype *k, const realtype *h, const realtype cj, const realtype *dx, const realtype *w, const realtype *dwdx) override {
JSparse_model_robertson(JSparse, t, x, p, k, h, cj, dx, w, dwdx);
Expand Down
5 changes: 4 additions & 1 deletion models/model_robertson/swig/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,15 @@ endif(POLICY CMP0086)
find_package(SWIG REQUIRED)
include(${SWIG_USE_FILE})

if(DEFINED ENV{PYTHON_EXECUTABLE})
set(Python3_EXECUTABLE $ENV{PYTHON_EXECUTABLE})
endif()
if(${CMAKE_VERSION} VERSION_LESS "3.12.0")
find_package(PythonLibs REQUIRED)
include_directories(${PYTHON_INCLUDE_DIRS})
set(Python3_LIBRARIES ${PYTHON_LIBRARIES})
else()
find_package (Python3 COMPONENTS Development)
find_package(Python3 COMPONENTS Interpreter Development)
include_directories(${Python3_INCLUDE_DIRS})
endif()

Expand Down
4 changes: 2 additions & 2 deletions models/model_steadystate/model_steadystate.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#ifndef _amici_model_steadystate_h
#define _amici_model_steadystate_h
/* Generated by amiwrap (R2017b) fee0d5a069aba864a92ded7da50ae68ea7ea43cc */
/* Generated by amiwrap (R2017b) b04ab2326fb34f3721a15806d9783ff22b6a015a */
#include <cmath>
#include <memory>
#include "amici/defines.h"
Expand Down Expand Up @@ -70,7 +70,7 @@ class Model_model_steadystate : public amici::Model_ODE {

amici::Model* clone() const override { return new Model_model_steadystate(*this); };

std::string getAmiciCommit() const override { return "fee0d5a069aba864a92ded7da50ae68ea7ea43cc"; };
std::string getAmiciCommit() const override { return "b04ab2326fb34f3721a15806d9783ff22b6a015a"; };

void fJSparse(SUNMatrixContent_Sparse JSparse, const realtype t, const realtype *x, const realtype *p, const realtype *k, const realtype *h, const realtype *w, const realtype *dwdx) override {
JSparse_model_steadystate(JSparse, t, x, p, k, h, w, dwdx);
Expand Down
5 changes: 4 additions & 1 deletion models/model_steadystate/swig/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,15 @@ endif(POLICY CMP0086)
find_package(SWIG REQUIRED)
include(${SWIG_USE_FILE})

if(DEFINED ENV{PYTHON_EXECUTABLE})
set(Python3_EXECUTABLE $ENV{PYTHON_EXECUTABLE})
endif()
if(${CMAKE_VERSION} VERSION_LESS "3.12.0")
find_package(PythonLibs REQUIRED)
include_directories(${PYTHON_INCLUDE_DIRS})
set(Python3_LIBRARIES ${PYTHON_LIBRARIES})
else()
find_package (Python3 COMPONENTS Development)
find_package(Python3 COMPONENTS Interpreter Development)
include_directories(${Python3_INCLUDE_DIRS})
endif()

Expand Down
9 changes: 4 additions & 5 deletions python/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
if(DEFINED ENV{PYTHON_EXECUTABLE})
set(Python3_EXECUTABLE $ENV{PYTHON_EXECUTABLE})
endif()
if(${CMAKE_VERSION} VERSION_LESS "3.12.0")
if(DEFINED ENV{PYTHON_EXECUTABLE})
set( PYTHON_EXECUTABLE $ENV{PYTHON_EXECUTABLE} )
endif()
find_package(PythonInterp 3.8 REQUIRED)
set(Python3_EXECUTABLE ${PYTHON_EXECUTABLE})
else()
find_package (Python3 COMPONENTS Interpreter)
find_package(Python3 COMPONENTS Interpreter)
endif()


Expand Down
Loading