A list for the developers of CellML tools

Text archives Help


[cellml-dev] cellml api problem


Chronological Thread 
  • From: ak.miller at auckland.ac.nz (Andrew Miller)
  • Subject: [cellml-dev] cellml api problem
  • Date: Tue, 12 Oct 2010 09:41:26 +1300

On 12/10/10 05:09, Paolo Pannarale wrote:
> I was forgetting that the problem in make install happens also with
> the configuration with all the enable but enable-java..

Hi Paolo,

The make test compile error looks like it is due to a different compiler
version to what we are using - probably a more recent gcc than we have
tested the API with (at least on 64 bit). The error you hit is in debug
code for the RDF source that is not compiled anyway. I've opened a
tracker item on this to remind us - see
https://tracker.physiomeproject.org/show_bug.cgi?id=2731 and feel free
to register and CC yourself so you will get notifications when it is fixed.

If you are building the API for use with Java, I would recommend not
doing make install - we haven't tested that, mainly because we haven't
decided where to install Java jars, and so on - and because it requires
the path be specified to your JRE when running your Java program anyway.

...
>>
>> But if i run the IterateElementTest on the bugbuster model i get an error:
>>
>> Model Name:BugbusterModel_SVBM
>> ...etc etc
>>
>> Component Name:ChassisBacillus
>> Exception in thread "main" java.lang.RuntimeException: Native code
>> threw exception
>> at pjm2pcm.cellml_api.CellMLComponent.getVariables(Native Method)
>> at
>> it.poliba.sysbio.svpowl.IterateElementTest.iterateModelElements(IterateElementTest.java:41)
>> at
>> it.poliba.sysbio.svpowl.IterateElementTest.main(IterateElementTest.java:75)
>>
>> Could you figure out which component generate the make error and if
>> there's a solution?
>> What cause the runtime error?

That is because IterateElementTest was written for a CellML 1.0 model,
and BugBuster is a CellML 1.1 model which imports components from other
models. To access the variable list of an imported component, the
imported has to be loaded into memory first.

You could make this example work by calling fullyInstantiateImports() - see
http://cellml-api.hg.sourceforge.net/hgweb/cellml-api/cellml-api/file/c315984491d0/interfaces/CellML_APISPEC.idl#l484
and assuming that call succeeds, you won't get an exception later on.

e.g. at this line:
http://cellml-api.hg.sourceforge.net/hgweb/cellml-api/cellml-api/file/137d486a38ab/examples/javaexample/src/example/IterateElementTest.java#l32
Insert:
model.fullyInstantiateImports();

(in a production application, you would want to trap exceptions there,
because if there is a network error and a model fails to load, you will
get an exception there). Also note that fullyInstiatateImports() is
synchronous - the program will access the network and the call won't
return until it is done.

If you wanted more control over how URIs were loaded, and not block your
user interface, you can also manually instantiate them from a text
version of the model - this is what OpenCell does, for example. If you
want to do this, you'll need to use wasInstantiated and
instantiateFromText, as well as the xlinkHref on the CellMLImport interface.

Best wishes,
Andrew

>>
>> Best regards, Paolo
>>
>> On Mon, Oct 11, 2010 at 12:23 PM, Paolo Pannarale<p.pannarale at
>> poliba.it> wrote:
>>> Dear Mr. Miller, I'm developing a synthetic biology application which
>>> uses cellmlapi, but I'm facing installation issues.
>>> I'm using a platform provided with Ubuntu 10.04 and I'm following the
>>> procedure in doxygen documentation.
>>> I noticed that compilation work out only with jdk1.6.0_14 (not
>>> jdk1.6.0_16, not openjdk, not jdk1.6.0_21) but the installation
>>> doesn't work out in any way...
>>> In attachment you have the command history and the make check and make
>>> install outputs.
>>> Could pls help me?
>>> Best regards, Paolo Pannarale
>>>
>>> --
>>> ?[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)
>>> ___________________________________
>>>
>>> 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.
>>>
>>
>>
>>
>> --
>> ?[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)
>> ___________________________________
>>
>> 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] cellml api problem, Andrew Miller, 10/12/2010

Archive powered by MHonArc 2.6.18.

Top of page