diff --git a/.github/workflows/test_matlab.yml b/.github/workflows/test_matlab.yml new file mode 100644 index 0000000000..d14c0012b5 --- /dev/null +++ b/.github/workflows/test_matlab.yml @@ -0,0 +1,21 @@ +name: Matlab +on: [push, pull_request, workflow_dispatch] + +jobs: + matlab: + name: Matlab + + runs-on: ubuntu-20.04 + + steps: + - uses: actions/checkout@master + - run: git fetch --prune --unshallow + + - run: echo "AMICI_DIR=$(pwd)" >> $GITHUB_ENV + + - name: Install MATLAB + uses: matlab-actions/setup-matlab@v0 + - name: Run script + uses: matlab-actions/run-command@v0 + with: + command: cd matlab; installAMICI; addpath tests; testModels diff --git a/documentation/CI.md b/documentation/CI.md index de86b0bfb1..93fd106dc2 100644 --- a/documentation/CI.md +++ b/documentation/CI.md @@ -1,6 +1,7 @@ # Continuous integration (CI) and tests -AMICI uses a continuous integration pipeline running on https://travis-ci.org/. +AMICI uses a continuous integration pipeline running via +https://github.com/features/actions. This includes the following steps: - Checking existence and format of documentation @@ -67,7 +68,7 @@ This code is to be updated whenever `amici::Model` changes. ### Regenerating C++ code of the test models -Regeneration of the model code must done whenever `amici::Model` or +Regeneration of the model code has to be done whenever `amici::Model` or the Matlab model import routines change. This is done with @@ -89,7 +90,7 @@ replace `tests/cpputest/expectedResults.h5` by Before replacing the test results, confirm that only expected datasets have changed, e.g. using - h5diff -v -r 1e-8 tests/cpputest/expectedResults.h5 tests/cpputest/writeResults.h5.bak | less + h5diff -v --relative 1e-8 tests/cpputest/expectedResults.h5 tests/cpputest/writeResults.h5.bak | less ## Adding/Updating tests diff --git a/matlab/@amimodel/amimodel.m b/matlab/@amimodel/amimodel.m index 1b77aac6bf..cef415bdfe 100644 --- a/matlab/@amimodel/amimodel.m +++ b/matlab/@amimodel/amimodel.m @@ -241,6 +241,8 @@ function updateWrapPath(this,wrap_path) generateC(this) + generateRebuildM(this) + compileC(this) generateM(this,amimodelo2) diff --git a/matlab/@amimodel/generateRebuildM.m b/matlab/@amimodel/generateRebuildM.m new file mode 100644 index 0000000000..56b213af70 --- /dev/null +++ b/matlab/@amimodel/generateRebuildM.m @@ -0,0 +1,26 @@ +function generateRebuildM(this) +% generateRebuildM generates a Matlab script for recompilation of this +% model +% +% Return values: +% void + + +filename = fullfile(this.wrap_path,'models',this.modelname,['rebuild_',this.modelname,'.m']); +% would require struct to string conversion, skipping for now +amimodelo2 = '[]'; + +fid = fopen(filename, 'w'); + +fprintf(fid, ['function ' ['rebuild_', this.modelname] '()\n']); +fprintf(fid, ['modelName = ''' this.modelname ''';\n']); +fprintf(fid, 'amimodel.compileAndLinkModel(modelName, '''', [], [], [], []);\n'); +fprintf(fid, ['amimodel.generateMatlabWrapper(' num2str(this.nx) ', ' num2str(this.ny) ... + ', ' num2str(this.np) ', ' num2str(this.nk) ', ' num2str(this.nz) ', ' num2str(this.o2flag) ', ' ... + amimodelo2 ', [''simulate_'' modelName ''.m''], ''' ... + this.modelname ''', ''' this.param ''', ' num2str(this.forward) ', ' num2str(this.adjoint) ');\n']); +fprintf(fid, 'end\n'); + +fclose(fid); +end + diff --git a/matlab/amiwrap.m b/matlab/amiwrap.m index 842b3a3a56..838d95c102 100644 --- a/matlab/amiwrap.m +++ b/matlab/amiwrap.m @@ -169,8 +169,10 @@ function amiwrap( varargin ) % generate the matlab wrapper disp('Generating M code ...') if(o2flag) + model.generateRebuildM() model.generateM(modelo2); else + model.generateRebuildM() model.generateM([]); end diff --git a/matlab/tests/testModels.m b/matlab/tests/testModels.m index a0e3516a97..baf1c57bda 100644 --- a/matlab/tests/testModels.m +++ b/matlab/tests/testModels.m @@ -4,24 +4,33 @@ function testModels() % disable specific warnings for these tests, some tests are supposed % to produce warnings warningreset = warning; - warning('off','AMICI:mex:simulation') - warning('off','AMICI:mex:CVODES:CVode:TOO_MUCH_WORK') + warning('off','AMICI:simulation') + warning('off','AMICI:CVODES:CVode:TOO_MUCH_WORK') + % second-order currently not supported via rebuild_*.m (GitHub Actions) + % only via wrapTestModels ignoredTests = {'/model_jakstat_adjoint/sensiadjointemptysensind', ... - '/model_jakstat_adjoint/sensiforwardemptysensind'}; + '/model_jakstat_adjoint/sensiforwardemptysensind', ... + '/model_jakstat_adjoint/sensi2adjoint', ... + '/model_jakstat_adjoint/sensi2forward', ... + '/model_jakstat_adjoint/sensi2forwardlogparam', ... + '/model_neuron/sensi2forward'}; + model_dir = [fileparts(mfilename('fullpath')) '/../../models/']; cd(fileparts(mfilename('fullpath'))) addpath(genpath('../../tests/cpputest')); addpath(genpath('../examples')); % wrapTestModels() - cd(fileparts(mfilename('fullpath'))) + cd(fileparts(mfilename('fullpath'))) hdf5file = fullfile(fileparts(mfilename('fullpath')), ... '../../tests/cpputest', 'expectedResults.h5'); - + info = h5info(hdf5file); for imodel = 1:length(info.Groups) - if(~isempty(regexp(info.Groups(imodel).Name(2:end),'^model_neuron'))) + modelname = info.Groups(imodel).Name(2:end); + + if(~isempty(regexp(modelname,'^model_neuron'))) model_atol = 1e-9; model_rtol = 1e-4; else @@ -29,13 +38,25 @@ function testModels() model_rtol = 1e-5; end for itest = 1:length(info.Groups(imodel).Groups) - if(ismember(info.Groups(imodel).Groups(itest).Name, ignoredTests)) + testname = info.Groups(imodel).Groups(itest).Name; + if(ismember(testname, ignoredTests)) continue end + + display(testname); [results,options,data,t,theta,kappa] = readDataFromHDF5(info.Groups(imodel).Groups(itest),hdf5file); - sol = getResults(info.Groups(imodel).Name(2:end),options,data,t,theta,kappa); + + % rebuild model + old_path = addpath([model_dir modelname]); + old_pwd = cd([model_dir modelname]); + rebuild = str2func(['rebuild_' modelname]); + rebuild(); + cd(old_pwd); + + sol = getResults(modelname,options,data,t,theta,kappa); compareResults(sol,results); + path(old_path); end end diff --git a/models/model_calvetti/model_calvetti.h b/models/model_calvetti/model_calvetti.h index 97ba91b8f4..b771544603 100644 --- a/models/model_calvetti/model_calvetti.h +++ b/models/model_calvetti/model_calvetti.h @@ -1,6 +1,6 @@ #ifndef _amici_model_calvetti_h #define _amici_model_calvetti_h -/* Generated by amiwrap (R2017b) 0a85246ec55554a1db269634c806f27f071f487f */ +/* Generated by amiwrap (R2017b) 236df9fa88b9059f699cbe6d987f5d5e5709dcfb */ #include #include #include "amici/defines.h" @@ -67,7 +67,7 @@ class Model_model_calvetti : public amici::Model_DAE { virtual amici::Model* clone() const override { return new Model_model_calvetti(*this); }; - const std::string getAmiciCommit() const override { return "0a85246ec55554a1db269634c806f27f071f487f"; }; + const std::string getAmiciCommit() const override { return "236df9fa88b9059f699cbe6d987f5d5e5709dcfb"; }; virtual 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); diff --git a/models/model_calvetti/rebuild_model_calvetti.m b/models/model_calvetti/rebuild_model_calvetti.m new file mode 100644 index 0000000000..ef44a7afcd --- /dev/null +++ b/models/model_calvetti/rebuild_model_calvetti.m @@ -0,0 +1,5 @@ +function rebuild_model_calvetti() +modelName = 'model_calvetti'; +amimodel.compileAndLinkModel(modelName, '', [], [], [], []); +amimodel.generateMatlabWrapper(6, 6, 0, 6, 0, 0, [], ['simulate_' modelName '.m'], 'model_calvetti', 'lin', 1, 1); +end diff --git a/models/model_dirac/model_dirac.h b/models/model_dirac/model_dirac.h index 5a22ab5d5f..4258ab0b13 100644 --- a/models/model_dirac/model_dirac.h +++ b/models/model_dirac/model_dirac.h @@ -1,6 +1,6 @@ #ifndef _amici_model_dirac_h #define _amici_model_dirac_h -/* Generated by amiwrap (R2017b) 0a85246ec55554a1db269634c806f27f071f487f */ +/* Generated by amiwrap (R2017b) 236df9fa88b9059f699cbe6d987f5d5e5709dcfb */ #include #include #include "amici/defines.h" @@ -67,7 +67,7 @@ class Model_model_dirac : public amici::Model_ODE { virtual amici::Model* clone() const override { return new Model_model_dirac(*this); }; - const std::string getAmiciCommit() const override { return "0a85246ec55554a1db269634c806f27f071f487f"; }; + const std::string getAmiciCommit() const override { return "236df9fa88b9059f699cbe6d987f5d5e5709dcfb"; }; virtual 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); diff --git a/models/model_dirac/rebuild_model_dirac.m b/models/model_dirac/rebuild_model_dirac.m new file mode 100644 index 0000000000..66aa6f62d9 --- /dev/null +++ b/models/model_dirac/rebuild_model_dirac.m @@ -0,0 +1,5 @@ +function rebuild_model_dirac() +modelName = 'model_dirac'; +amimodel.compileAndLinkModel(modelName, '', [], [], [], []); +amimodel.generateMatlabWrapper(2, 1, 4, 0, 0, 0, [], ['simulate_' modelName '.m'], 'model_dirac', 'log10', 1, 1); +end diff --git a/models/model_events/model_events.h b/models/model_events/model_events.h index 77c803e256..10635f7d3f 100644 --- a/models/model_events/model_events.h +++ b/models/model_events/model_events.h @@ -1,6 +1,6 @@ #ifndef _amici_model_events_h #define _amici_model_events_h -/* Generated by amiwrap (R2017b) 0a85246ec55554a1db269634c806f27f071f487f */ +/* Generated by amiwrap (R2017b) 236df9fa88b9059f699cbe6d987f5d5e5709dcfb */ #include #include #include "amici/defines.h" @@ -81,7 +81,7 @@ class Model_model_events : public amici::Model_ODE { virtual amici::Model* clone() const override { return new Model_model_events(*this); }; - const std::string getAmiciCommit() const override { return "0a85246ec55554a1db269634c806f27f071f487f"; }; + const std::string getAmiciCommit() const override { return "236df9fa88b9059f699cbe6d987f5d5e5709dcfb"; }; virtual 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); diff --git a/models/model_events/rebuild_model_events.m b/models/model_events/rebuild_model_events.m new file mode 100644 index 0000000000..bbb591694d --- /dev/null +++ b/models/model_events/rebuild_model_events.m @@ -0,0 +1,5 @@ +function rebuild_model_events() +modelName = 'model_events'; +amimodel.compileAndLinkModel(modelName, '', [], [], [], []); +amimodel.generateMatlabWrapper(3, 1, 4, 4, 2, 0, [], ['simulate_' modelName '.m'], 'model_events', 'log10', 1, 1); +end diff --git a/models/model_jakstat_adjoint/model_jakstat_adjoint.h b/models/model_jakstat_adjoint/model_jakstat_adjoint.h index b4b1d35c81..4dc4342248 100644 --- a/models/model_jakstat_adjoint/model_jakstat_adjoint.h +++ b/models/model_jakstat_adjoint/model_jakstat_adjoint.h @@ -1,6 +1,6 @@ #ifndef _amici_model_jakstat_adjoint_h #define _amici_model_jakstat_adjoint_h -/* Generated by amiwrap (R2017b) 0a85246ec55554a1db269634c806f27f071f487f */ +/* Generated by amiwrap (R2017b) 236df9fa88b9059f699cbe6d987f5d5e5709dcfb */ #include #include #include "amici/defines.h" @@ -70,7 +70,7 @@ class Model_model_jakstat_adjoint : public amici::Model_ODE { virtual amici::Model* clone() const override { return new Model_model_jakstat_adjoint(*this); }; - const std::string getAmiciCommit() const override { return "0a85246ec55554a1db269634c806f27f071f487f"; }; + const std::string getAmiciCommit() const override { return "236df9fa88b9059f699cbe6d987f5d5e5709dcfb"; }; virtual 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); diff --git a/models/model_jakstat_adjoint/rebuild_model_jakstat_adjoint.m b/models/model_jakstat_adjoint/rebuild_model_jakstat_adjoint.m new file mode 100644 index 0000000000..443952d4c4 --- /dev/null +++ b/models/model_jakstat_adjoint/rebuild_model_jakstat_adjoint.m @@ -0,0 +1,5 @@ +function rebuild_model_jakstat_adjoint() +modelName = 'model_jakstat_adjoint'; +amimodel.compileAndLinkModel(modelName, '', [], [], [], []); +amimodel.generateMatlabWrapper(9, 3, 17, 2, 0, 0, [], ['simulate_' modelName '.m'], 'model_jakstat_adjoint', 'log10', 1, 1); +end diff --git a/models/model_jakstat_adjoint_o2/model_jakstat_adjoint_o2.h b/models/model_jakstat_adjoint_o2/model_jakstat_adjoint_o2.h index f726def6e2..756d7ed0a4 100644 --- a/models/model_jakstat_adjoint_o2/model_jakstat_adjoint_o2.h +++ b/models/model_jakstat_adjoint_o2/model_jakstat_adjoint_o2.h @@ -1,6 +1,6 @@ #ifndef _amici_model_jakstat_adjoint_o2_h #define _amici_model_jakstat_adjoint_o2_h -/* Generated by amiwrap (R2017b) 0a85246ec55554a1db269634c806f27f071f487f */ +/* Generated by amiwrap (R2017b) 236df9fa88b9059f699cbe6d987f5d5e5709dcfb */ #include #include #include "amici/defines.h" @@ -70,7 +70,7 @@ class Model_model_jakstat_adjoint_o2 : public amici::Model_ODE { virtual amici::Model* clone() const override { return new Model_model_jakstat_adjoint_o2(*this); }; - const std::string getAmiciCommit() const override { return "0a85246ec55554a1db269634c806f27f071f487f"; }; + const std::string getAmiciCommit() const override { return "236df9fa88b9059f699cbe6d987f5d5e5709dcfb"; }; virtual 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); diff --git a/models/model_jakstat_adjoint_o2/rebuild_model_jakstat_adjoint_o2.m b/models/model_jakstat_adjoint_o2/rebuild_model_jakstat_adjoint_o2.m new file mode 100644 index 0000000000..b56a5383b6 Binary files /dev/null and b/models/model_jakstat_adjoint_o2/rebuild_model_jakstat_adjoint_o2.m differ diff --git a/models/model_nested_events/model_nested_events.h b/models/model_nested_events/model_nested_events.h index 0f5d294507..81c2dd324f 100644 --- a/models/model_nested_events/model_nested_events.h +++ b/models/model_nested_events/model_nested_events.h @@ -1,6 +1,6 @@ #ifndef _amici_model_nested_events_h #define _amici_model_nested_events_h -/* Generated by amiwrap (R2017b) 0a85246ec55554a1db269634c806f27f071f487f */ +/* Generated by amiwrap (R2017b) 236df9fa88b9059f699cbe6d987f5d5e5709dcfb */ #include #include #include "amici/defines.h" @@ -70,7 +70,7 @@ class Model_model_nested_events : public amici::Model_ODE { virtual amici::Model* clone() const override { return new Model_model_nested_events(*this); }; - const std::string getAmiciCommit() const override { return "0a85246ec55554a1db269634c806f27f071f487f"; }; + const std::string getAmiciCommit() const override { return "236df9fa88b9059f699cbe6d987f5d5e5709dcfb"; }; virtual 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); diff --git a/models/model_nested_events/rebuild_model_nested_events.m b/models/model_nested_events/rebuild_model_nested_events.m new file mode 100644 index 0000000000..38f3e1b9cc --- /dev/null +++ b/models/model_nested_events/rebuild_model_nested_events.m @@ -0,0 +1,5 @@ +function rebuild_model_nested_events() +modelName = 'model_nested_events'; +amimodel.compileAndLinkModel(modelName, '', [], [], [], []); +amimodel.generateMatlabWrapper(1, 1, 5, 0, 0, 0, [], ['simulate_' modelName '.m'], 'model_nested_events', 'log10', 1, 1); +end diff --git a/models/model_neuron/model_neuron.h b/models/model_neuron/model_neuron.h index df2611a594..890446e997 100644 --- a/models/model_neuron/model_neuron.h +++ b/models/model_neuron/model_neuron.h @@ -1,6 +1,6 @@ #ifndef _amici_model_neuron_h #define _amici_model_neuron_h -/* Generated by amiwrap (R2017b) 0a85246ec55554a1db269634c806f27f071f487f */ +/* Generated by amiwrap (R2017b) 236df9fa88b9059f699cbe6d987f5d5e5709dcfb */ #include #include #include "amici/defines.h" @@ -84,7 +84,7 @@ class Model_model_neuron : public amici::Model_ODE { virtual amici::Model* clone() const override { return new Model_model_neuron(*this); }; - const std::string getAmiciCommit() const override { return "0a85246ec55554a1db269634c806f27f071f487f"; }; + const std::string getAmiciCommit() const override { return "236df9fa88b9059f699cbe6d987f5d5e5709dcfb"; }; virtual 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); diff --git a/models/model_neuron/rebuild_model_neuron.m b/models/model_neuron/rebuild_model_neuron.m new file mode 100644 index 0000000000..0c368819dc --- /dev/null +++ b/models/model_neuron/rebuild_model_neuron.m @@ -0,0 +1,5 @@ +function rebuild_model_neuron() +modelName = 'model_neuron'; +amimodel.compileAndLinkModel(modelName, '', [], [], [], []); +amimodel.generateMatlabWrapper(2, 1, 4, 2, 1, 0, [], ['simulate_' modelName '.m'], 'model_neuron', 'log10', 1, 1); +end diff --git a/models/model_neuron_o2/model_neuron_o2.h b/models/model_neuron_o2/model_neuron_o2.h index 8ec152b984..77f3fb8f9c 100644 --- a/models/model_neuron_o2/model_neuron_o2.h +++ b/models/model_neuron_o2/model_neuron_o2.h @@ -1,6 +1,6 @@ #ifndef _amici_model_neuron_o2_h #define _amici_model_neuron_o2_h -/* Generated by amiwrap (R2017b) 0a85246ec55554a1db269634c806f27f071f487f */ +/* Generated by amiwrap (R2017b) 236df9fa88b9059f699cbe6d987f5d5e5709dcfb */ #include #include #include "amici/defines.h" @@ -86,7 +86,7 @@ class Model_model_neuron_o2 : public amici::Model_ODE { virtual amici::Model* clone() const override { return new Model_model_neuron_o2(*this); }; - const std::string getAmiciCommit() const override { return "0a85246ec55554a1db269634c806f27f071f487f"; }; + const std::string getAmiciCommit() const override { return "236df9fa88b9059f699cbe6d987f5d5e5709dcfb"; }; virtual 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); diff --git a/models/model_neuron_o2/rebuild_model_neuron_o2.m b/models/model_neuron_o2/rebuild_model_neuron_o2.m new file mode 100644 index 0000000000..95766f9b8c Binary files /dev/null and b/models/model_neuron_o2/rebuild_model_neuron_o2.m differ diff --git a/models/model_robertson/model_robertson.h b/models/model_robertson/model_robertson.h index bedd9e6429..b0f92f27a5 100644 --- a/models/model_robertson/model_robertson.h +++ b/models/model_robertson/model_robertson.h @@ -1,6 +1,6 @@ #ifndef _amici_model_robertson_h #define _amici_model_robertson_h -/* Generated by amiwrap (R2017b) 0a85246ec55554a1db269634c806f27f071f487f */ +/* Generated by amiwrap (R2017b) 236df9fa88b9059f699cbe6d987f5d5e5709dcfb */ #include #include #include "amici/defines.h" @@ -68,7 +68,7 @@ class Model_model_robertson : public amici::Model_DAE { virtual amici::Model* clone() const override { return new Model_model_robertson(*this); }; - const std::string getAmiciCommit() const override { return "0a85246ec55554a1db269634c806f27f071f487f"; }; + const std::string getAmiciCommit() const override { return "236df9fa88b9059f699cbe6d987f5d5e5709dcfb"; }; virtual 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); diff --git a/models/model_robertson/rebuild_model_robertson.m b/models/model_robertson/rebuild_model_robertson.m new file mode 100644 index 0000000000..3fcf9fe467 --- /dev/null +++ b/models/model_robertson/rebuild_model_robertson.m @@ -0,0 +1,5 @@ +function rebuild_model_robertson() +modelName = 'model_robertson'; +amimodel.compileAndLinkModel(modelName, '', [], [], [], []); +amimodel.generateMatlabWrapper(3, 3, 3, 1, 0, 0, [], ['simulate_' modelName '.m'], 'model_robertson', 'log10', 1, 1); +end diff --git a/models/model_steadystate/model_steadystate.h b/models/model_steadystate/model_steadystate.h index fd3e877f1a..dc3dea42e9 100644 --- a/models/model_steadystate/model_steadystate.h +++ b/models/model_steadystate/model_steadystate.h @@ -1,6 +1,6 @@ #ifndef _amici_model_steadystate_h #define _amici_model_steadystate_h -/* Generated by amiwrap (R2017b) 3ea04a1664d926c46fab5cd80a389f2b0460c053 */ +/* Generated by amiwrap (R2017b) 236df9fa88b9059f699cbe6d987f5d5e5709dcfb */ #include #include #include "amici/defines.h" @@ -67,7 +67,7 @@ class Model_model_steadystate : public amici::Model_ODE { virtual amici::Model* clone() const override { return new Model_model_steadystate(*this); }; - const std::string getAmiciCommit() const override { return "3ea04a1664d926c46fab5cd80a389f2b0460c053"; }; + const std::string getAmiciCommit() const override { return "236df9fa88b9059f699cbe6d987f5d5e5709dcfb"; }; virtual 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); diff --git a/models/model_steadystate/rebuild_model_steadystate.m b/models/model_steadystate/rebuild_model_steadystate.m new file mode 100644 index 0000000000..f7a6f63e5d --- /dev/null +++ b/models/model_steadystate/rebuild_model_steadystate.m @@ -0,0 +1,5 @@ +function rebuild_model_steadystate() +modelName = 'model_steadystate'; +amimodel.compileAndLinkModel(modelName, '', [], [], [], []); +amimodel.generateMatlabWrapper(3, 3, 5, 4, 0, 0, [], ['simulate_' modelName '.m'], 'model_steadystate', 'log10', 1, 1); +end diff --git a/tests/cpputest/expectedResults.h5 b/tests/cpputest/expectedResults.h5 index 8d993ab2c8..234bf2fd16 100644 Binary files a/tests/cpputest/expectedResults.h5 and b/tests/cpputest/expectedResults.h5 differ diff --git a/tests/cpputest/testOptions.h5 b/tests/cpputest/testOptions.h5 index 8a4df7a3e8..e2bf3f658e 100644 Binary files a/tests/cpputest/testOptions.h5 and b/tests/cpputest/testOptions.h5 differ diff --git a/tests/generateTestConfig/example_neuron.py b/tests/generateTestConfig/example_neuron.py index 8c730ff56b..97cc6c698d 100755 --- a/tests/generateTestConfig/example_neuron.py +++ b/tests/generateTestConfig/example_neuron.py @@ -21,7 +21,7 @@ def __init__(self): self.modelOptions['pscale'] = 2 self.solverOptions['atol'] = 1e-16 - self.solverOptions['maxsteps'] = 1e45 + self.solverOptions['maxsteps'] = 1e5 self.solverOptions['nmaxevent'] = 22 self.solverOptions['rtol'] = 1e-12 self.solverOptions['sens_ind'] = []