A list for the developers of CellML tools

Text archives Help


[cellml-dev] CellML2C test program & imports - answer to Paolo's question


Chronological Thread 
  • From: ak.miller at auckland.ac.nz (Andrew Miller)
  • Subject: [cellml-dev] CellML2C test program & imports - answer to Paolo's question
  • Date: Fri, 30 Dec 2011 15:39:29 +1300

On 30/12/11 06:07, Paolo Pannarale wrote:
> Dear colleagues, I'm asking your help because I'm stuck in this point in
> my project where I try to simulate a model through the cellml api.
> I'm trying to run the cellml2c.cpp test in the cellml api ccgs src and i
> can run it on a single file model (the elowitz_liebler_2000 in the
> repository) but it fails on my model (available at
> http://www.megaupload.com/?d=NF3DTVQF) and on a Cooling's one
> (Bugbuster). The test throws an exception at mod->fullyinstantiateimports().
> The same models are correctly opened and simulated in opencell.
> Do you have any suggestion?

Hi Paolo,

This means it is trying to load the imports but failing.

With CellML 1.1 models and the test programs that come with the API, a
common cause of the problem is invoking CellML2C without giving it a
full URL; it expects a URL, and while libxml2 will process filenames as
URLs relative to the current directory, the CellML API doesn't have this
logic built in when it needs to manipulate URLs, so it runs into
difficulty trying to work out relative URLs if you don't start off with
an absolute URL.

With your model:

$ ~/Documents/cellml-api/CellML2C target.cellml
terminate called after throwing an instance of
'iface::cellml_api::CellMLException'
what(): std::exception
Aborted

$ ~/Documents/cellml-api/CellML2C file:///tmp/cellml_model/target.cellml
/* Model is correctly constrained.
* No equations needed Newton-Raphson evaluation.
* The rate and state arrays need 12 entries.
* The algebraic variables array needs 37 entries.
* The constant array needs 42 entries.
* Variable storage is as follows:
* * Target J in component Template_ProteinCDS
* * * Variable type: algebraic variable
...

Best wishes,
Andrew

> BR, Paolo
>
> ---------- Forwarded message ----------
> From: ** <cellml-tools-developers-request at cellml.org
> <mailto:cellml-tools-developers-request at cellml.org>>
> Date: Thu, Dec 22, 2011 at 10:20 PM
> Subject: cellml-tools-developers Digest, Vol 46, Issue 6
> To: cellml-tools-developers at cellml.org
> <mailto:cellml-tools-developers at cellml.org>
>
>
> Send cellml-tools-developers mailing list submissions to
> cellml-tools-developers at cellml.org
> <mailto:cellml-tools-developers at cellml.org>
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://lists.cellml.org/mailman/listinfo/cellml-tools-developers
> or, via email, send a message with subject or body 'help' to
> cellml-tools-developers-request at cellml.org
> <mailto:cellml-tools-developers-request at cellml.org>
>
> You can reach the person managing the list at
> cellml-tools-developers-owner at cellml.org
> <mailto:cellml-tools-developers-owner at cellml.org>
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of cellml-tools-developers digest..."
>
>
> Today's Topics:
>
> 1. Programmatically solving models (Paolo Pannarale)
> 2. Re: Programmatically solving models (Alan Garny)
> 3. Re: Programmatically solving models (Alan Garny)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Thu, 22 Dec 2011 17:55:31 +0100
> From: Paolo Pannarale <p.pannarale at gmail.com <mailto:p.pannarale at
> gmail.com>>
> Subject: [cellml-dev] Programmatically solving models
> To: cellml-tools-developers at cellml.org
> <mailto:cellml-tools-developers at cellml.org>
> Message-ID:
> <CAB5pjwbPm-RLjJF-LQR-Q6bJUENNdV36OUJ-P2bYnN8tofkEtw at mail.gmail.com
> <mailto:CAB5pjwbPm-RLjJF-LQR-Q6bJUENNdV36OUJ-P2bYnN8tofkEtw at
> mail.gmail.com>>
> Content-Type: text/plain; charset="windows-1252"
>
> Dear developers, I'm trying to solve some problems I faced programmatically
> simulating a model in java with the cellmlapi.
> Following your suggestions (vol 46 issue 5) I'm trying to use ccgs first,
> in c++.
> I can run the test Cellml2C.cpp in the ccgs api tests on the
> elowitz_leibler_2000 model.
> The same test fails on my model (available at
> http://www.megaupload.com/?d=NF3DTVQF) at mod->fullyInstantiateImports()
> throwing an "unknown exception". I'm using the cellml-sdk-1.10-Win32-MSVC10
> api.
> I can correctly load the model and simulate it in opencell.
> The model is validated correctly in opencell apart from throwing some
> warnings.
> Can you help me?
> Do you know any easier method to programmatically simulate a model other
> than using the api? (e.g. commandline opencell or similar)
> Thanks, Paolo
>
> Happy xmas!
>
> --
> ?[M]y work, which I?ve done for a long time, was not pursued in order to
> gain the praise I now enjoy, but chiefly from a craving after knowledge,
> which I notice resides in me more than in most other men. And
> wherewithal, whenever I found out anything remarkable, I have thought it my
> duty to put down my discovery on paper, so that all ingenious people might
> be informed thereof.?
> (van Leeuwenhoek, Letter to the Royal Society, June 12 1716)
>
> ?Make it as simple as possible. But not simpler?.
> (Albert Einstein)
>
> "The best way to predict the future is to invent it".
> (Alan Kay)
>
> ___________________________________
>
> Questo documento ? indirizzato esclusivamente al destinatario.
> Tutte le informazioni ivi contenute, compresi eventuali allegati,
> sono soggette a riservatezza secondo i termini del D.Lgs. 196/2003
> in materia di "privacy" e ne ? proibito l'utilizzo da parte di
> altri soggetti. Se avesse ricevuto per errore questo messaggio,
> La preghiamo cortesemente di contattare il mittente al pi? presto
> e di cancellare il messaggio subito dopo. Grazie.
> ----
> This document is exclusively intended for the stated addressee.
> All information therein, including any attachment, are reserved
> as per Italian D.Lgs. 196/2003 about privacy, and cannot be used
> by third parties. In case you received this message by mistake,
> please inform the sender and delete the message afterward.
> Thank you.
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> <http://lists.cellml.org/pipermail/cellml-tools-developers/attachments/20111222/8b0f63a7/attachment-0001.htm>
>
> ------------------------------
>
> Message: 2
> Date: Thu, 22 Dec 2011 22:16:40 +0100
> From: "Alan Garny" <alan.garny at dpag.ox.ac.uk
> <mailto:alan.garny at dpag.ox.ac.uk>>
> Subject: Re: [cellml-dev] Programmatically solving models
> To: "'A list for the developers of CellML tools'"
> <cellml-tools-developers at cellml.org
> <mailto:cellml-tools-developers at cellml.org>>
> Message-ID: <013d01ccc0ef$002da590$0088f0b0$@dpag.ox.ac.uk
> <http://dpag.ox.ac.uk>>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Ciao Paolo,
>
>
>
> I don?t know about the Elowitz & Leibler 2000 model, but I have just tried
> your model (Megaupload? Hmm?!) in OpenCell 0.8 and though I could indeed
> load it and run it, if you switch to the ?Show equations? view you will see
> a message that reads ?Error: Could not fully instantiate imports.? I must
> confess that I am rather puzzled by what OpenCell reports and don?t know
> what to think of it (since I could run your model).
>
>
>
> Otherwise, I have tried to open your model in OpenCOR
> <http://www.opencor.ws/> which uses version 1.10 of the CellML API, and it
> seemed to be able to load it fine and the call to fullyInstantiateImports()
> didn?t generate any exception. However, OpenCOR is still very much work in
> progress, so I am not able to do much more at this point, even though I can
> (using the CellML API) generate some C code.
>
>
>
> So, sorry, this is not very helpful. Maybe Andrew Miller (the person behind
> the CellML API) can help on this one?
>
>
>
> Best regards, Alan.
>
>
>
> From: cellml-tools-developers-bounces at cellml.org
> <mailto:cellml-tools-developers-bounces at cellml.org>
> [mailto:cellml-tools-developers-bounces at cellml.org
> <mailto:cellml-tools-developers-bounces at cellml.org>] On Behalf Of Paolo
> Pannarale
> Sent: 22 December 2011 17:56
> To: cellml-tools-developers at cellml.org
> <mailto:cellml-tools-developers at cellml.org>
> Subject: [cellml-dev] Programmatically solving models
>
>
>
> Dear developers, I'm trying to solve some problems I faced programmatically
> simulating a model in java with the cellmlapi.
> Following your suggestions (vol 46 issue 5) I'm trying to use ccgs first, in
> c++.
> I can run the test Cellml2C.cpp in the ccgs api tests on the
> elowitz_leibler_2000 model.
> The same test fails on my model (available at
> http://www.megaupload.com/?d=NF3DTVQF) at mod->fullyInstantiateImports()
> throwing an "unknown exception". I'm using the cellml-sdk-1.10-Win32-MSVC10
> api.
> I can correctly load the model and simulate it in opencell.
> The model is validated correctly in opencell apart from throwing some
> warnings.
> Can you help me?
> Do you know any easier method to programmatically simulate a model other
> than using the api? (e.g. commandline opencell or similar)
> Thanks, Paolo
>
> Happy xmas!
>
> --
> ?[M]y work, which I?ve done for a long time, was not pursued in order to
> gain the praise I now enjoy, but chiefly from a craving after knowledge,
> which I notice resides in me more than in most other men. And
> wherewithal, whenever I found out anything remarkable, I have thought it my
> duty to put down my discovery on paper, so that all ingenious people might
> be informed thereof.?
> (van Leeuwenhoek, Letter to the Royal Society, June 12 1716)
>
> ?Make it as simple as possible. But not simpler?.
> (Albert Einstein)
>
> "The best way to predict the future is to invent it".
> (Alan Kay)
>
> ___________________________________
>
> Questo documento ? indirizzato esclusivamente al destinatario.
> Tutte le informazioni ivi contenute, compresi eventuali allegati,
> sono soggette a riservatezza secondo i termini del D.Lgs. 196/2003
> in materia di "privacy" e ne ? proibito l'utilizzo da parte di
> altri soggetti. Se avesse ricevuto per errore questo messaggio,
> La preghiamo cortesemente di contattare il mittente al pi? presto
> e di cancellare il messaggio subito dopo. Grazie.
> ----
> This document is exclusively intended for the stated addressee.
> All information therein, including any attachment, are reserved
> as per Italian D.Lgs. 196/2003 about privacy, and cannot be used
> by third parties. In case you received this message by mistake,
> please inform the sender and delete the message afterward.
> Thank you.
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> <http://lists.cellml.org/pipermail/cellml-tools-developers/attachments/20111222/6c61653b/attachment-0001.htm>
>
> ------------------------------
>
> Message: 3
> Date: Thu, 22 Dec 2011 22:20:22 +0100
> From: "Alan Garny" <alan.garny at dpag.ox.ac.uk
> <mailto:alan.garny at dpag.ox.ac.uk>>
> Subject: Re: [cellml-dev] Programmatically solving models
> To: "'A list for the developers of CellML tools'"
> <cellml-tools-developers at cellml.org
> <mailto:cellml-tools-developers at cellml.org>>
> Message-ID: <014801ccc0ef$85b414b0$911c3e10$@dpag.ox.ac.uk
> <http://dpag.ox.ac.uk>>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Oh, I forgot to comment on your last point: I intend to make OpenCOR usable
> both from the command line and from within a graphical user interface. I am
> not there yet though?
>
>
>
> Alan
>
>
>
> From: cellml-tools-developers-bounces at cellml.org
> <mailto:cellml-tools-developers-bounces at cellml.org>
> [mailto:cellml-tools-developers-bounces at cellml.org
> <mailto:cellml-tools-developers-bounces at cellml.org>] On Behalf Of Alan
> Garny
> Sent: 22 December 2011 22:17
> To: 'A list for the developers of CellML tools'
> Subject: Re: [cellml-dev] Programmatically solving models
>
>
>
> Ciao Paolo,
>
>
>
> I don?t know about the Elowitz & Leibler 2000 model, but I have just tried
> your model (Megaupload? Hmm?!) in OpenCell 0.8 and though I could indeed
> load it and run it, if you switch to the ?Show equations? view you will see
> a message that reads ?Error: Could not fully instantiate imports.? I must
> confess that I am rather puzzled by what OpenCell reports and don?t know
> what to think of it (since I could run your model).
>
>
>
> Otherwise, I have tried to open your model in OpenCOR
> <http://www.opencor.ws/> which uses version 1.10 of the CellML API, and it
> seemed to be able to load it fine and the call to fullyInstantiateImports()
> didn?t generate any exception. However, OpenCOR is still very much work in
> progress, so I am not able to do much more at this point, even though I can
> (using the CellML API) generate some C code.
>
>
>
> So, sorry, this is not very helpful. Maybe Andrew Miller (the person behind
> the CellML API) can help on this one?
>
>
>
> Best regards, Alan.
>
>
>
> From: cellml-tools-developers-bounces at cellml.org
> <mailto:cellml-tools-developers-bounces at cellml.org>
> [mailto:cellml-tools-developers-bounces at cellml.org
> <mailto:cellml-tools-developers-bounces at cellml.org>] On Behalf Of Paolo
> Pannarale
> Sent: 22 December 2011 17:56
> To: cellml-tools-developers at cellml.org
> <mailto:cellml-tools-developers at cellml.org>
> Subject: [cellml-dev] Programmatically solving models
>
>
>
> Dear developers, I'm trying to solve some problems I faced programmatically
> simulating a model in java with the cellmlapi.
> Following your suggestions (vol 46 issue 5) I'm trying to use ccgs first, in
> c++.
> I can run the test Cellml2C.cpp in the ccgs api tests on the
> elowitz_leibler_2000 model.
> The same test fails on my model (available at
> http://www.megaupload.com/?d=NF3DTVQF) at mod->fullyInstantiateImports()
> throwing an "unknown exception". I'm using the cellml-sdk-1.10-Win32-MSVC10
> api.
> I can correctly load the model and simulate it in opencell.
> The model is validated correctly in opencell apart from throwing some
> warnings.
> Can you help me?
> Do you know any easier method to programmatically simulate a model other
> than using the api? (e.g. commandline opencell or similar)
> Thanks, Paolo
>
> Happy xmas!
>
> --
> ?[M]y work, which I?ve done for a long time, was not pursued in order to
> gain the praise I now enjoy, but chiefly from a craving after knowledge,
> which I notice resides in me more than in most other men. And
> wherewithal, whenever I found out anything remarkable, I have thought it my
> duty to put down my discovery on paper, so that all ingenious people might
> be informed thereof.?
> (van Leeuwenhoek, Letter to the Royal Society, June 12 1716)
>
> ?Make it as simple as possible. But not simpler?.
> (Albert Einstein)
>
> "The best way to predict the future is to invent it".
> (Alan Kay)
>
> ___________________________________
>
> Questo documento ? indirizzato esclusivamente al destinatario.
> Tutte le informazioni ivi contenute, compresi eventuali allegati,
> sono soggette a riservatezza secondo i termini del D.Lgs. 196/2003
> in materia di "privacy" e ne ? proibito l'utilizzo da parte di
> altri soggetti. Se avesse ricevuto per errore questo messaggio,
> La preghiamo cortesemente di contattare il mittente al pi? presto
> e di cancellare il messaggio subito dopo. Grazie.
> ----
> This document is exclusively intended for the stated addressee.
> All information therein, including any attachment, are reserved
> as per Italian D.Lgs. 196/2003 about privacy, and cannot be used
> by third parties. In case you received this message by mistake,
> please inform the sender and delete the message afterward.
> Thank you.
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> <http://lists.cellml.org/pipermail/cellml-tools-developers/attachments/20111222/41d5a2b9/attachment.htm>
>
> ------------------------------
>
> _______________________________________________
> cellml-tools-developers mailing list
> cellml-tools-developers at cellml.org
> <mailto:cellml-tools-developers at cellml.org>
> http://lists.cellml.org/mailman/listinfo/cellml-tools-developers
>
>
> End of cellml-tools-developers Digest, Vol 46, Issue 6
> ******************************************************
>
>
>
> --
> ?[M]y work, which I?ve done for a long time, was not pursued in order
> to gain the praise I now enjoy, but chiefly from a craving after
> knowledge, which I notice resides in me more than in most other
> men. And wherewithal, whenever I found out anything remarkable, I have
> thought it my duty to put down my discovery on paper, so that all
> ingenious people might be informed thereof.?
> (van Leeuwenhoek, Letter to the Royal Society, June 12 1716)
>
> ?Make it as simple as possible. But not simpler?.
> (Albert Einstein)
>
> "The best way to predict the future is to invent it".
> (Alan Kay)
>
> ___________________________________
>
> Questo documento ? indirizzato esclusivamente al destinatario.
> Tutte le informazioni ivi contenute, compresi eventuali allegati,
> sono soggette a riservatezza secondo i termini del D.Lgs. 196/2003
> in materia di "privacy" e ne ? proibito l'utilizzo da parte di
> altri soggetti. Se avesse ricevuto per errore questo messaggio,
> La preghiamo cortesemente di contattare il mittente al pi? presto
> e di cancellare il messaggio subito dopo. Grazie.
> ----
> This document is exclusively intended for the stated addressee.
> All information therein, including any attachment, are reserved
> as per Italian D.Lgs. 196/2003 about privacy, and cannot be used
> by third parties. In case you received this message by mistake,
> please inform the sender and delete the message afterward.
> Thank you.




  • [cellml-dev] CellML2C test program & imports - answer to Paolo's question, Andrew Miller, 12/30/2011

Archive powered by MHonArc 2.6.18.

Top of page