OpenModelica


Forgot password? | Forgot username? | Register

installation on Ubuntu 12.04 or 14.04

installation on Ubuntu 12.04 or 14.04

Hi,
I was looking into TravisCI and possibilities how to use it for testing Modelica libraries. They allow installing packages using apt-get, so installing omc was straight forward. But, unfortunately, they are using Ubuntu 12.04 LTS (precise pangolin) as default, 14.04 LTS (trusty tahr) can be used also:
https://github.com/travis-ci/travis-ci/issues/5821
https://docs.travis-ci.com/user/ci-envi … vironments

The latest omc release on 12.04 LTS is 1.9.2,
the latest omc release on 14.04 LTS is 1.9.7.
https://travis-ci.org/thorade/ExtraMath/builds
https://github.com/thorade/ExtraMath/commits/travisCI

Would it be possible to also build releases (not the nightlies) for older LTS releases? Especially one of the two mentioned ones?
Thaks for considering, I understand this has not a hgh priority.
Matthis

Administrator has disabled public posting. Please login or register in order to proceed.

Re: installation on Ubuntu 12.04 or 14.04

The latest OMC release for 16.04 LTS is also 1.9.7... For 12.04, we will not build anything anymore. There were too many changes to Ubuntu to bother supporting it. 14.04 we still build the release tag (release), maintenance branch (stable) and master branch (nightly). Use "stable" instead of "release" if you want to use 1.11.0 beta and release candidates (there is no 1.10.0 release).

Administrator has disabled public posting. Please login or register in order to proceed.

Re: installation on Ubuntu 12.04 or 14.04

Thanks, so that was easy, I am now using stable on 14.04 LTS.

Administrator has disabled public posting. Please login or register in order to proceed.

Re: installation on Ubuntu 12.04 or 14.04

Martin, may I ask one more questions:
I have a simulation that fails and is supposed to fail, but when I run it from a mos script like omc test_Failure.mos, omc returns code 0, so the CI build is marked as successful. What command do I have to add/edit? Something like getErrorString()?
Thanks

Administrator has disabled public posting. Please login or register in order to proceed.

Re: installation on Ubuntu 12.04 or 14.04

You need to check the output of the OMC commands and call exit(1) if you want an exit code. For example, this fails because loadString is commented out:

Code:

//loadString("model M end M;");getErrorString();

res:=simulate(M); getErrorString();
res:=res.resultFile;
if res=="" then
  exit(1);
end if;

Administrator has disabled public posting. Please login or register in order to proceed.

Re: installation on Ubuntu 12.04 or 14.04

Thanks once again, this works.
I guess I have to check the result file for every simulation, if I run multiple simulations like in the below script? Or is there a more elegant way?

Code:


loadFile("ExtraMath/package.mo");
loadFile("ExtraMathTest/package.mo");

res1:=simulate(ExtraMathTest.test_Exponential);
res2:=simulate(ExtraMathTest.test_Power);
res3:=simulate(ExtraMathTest.test_ErrorGamma);
res4:=simulate(ExtraMathTest.test_Success);
res5:=simulate(ExtraMathTest.test_Failure);

resF:=res4.resultFile;
if resF=="" then
  exit(1);
end if;

And, last not least: The CI script is downloading omc and the MSL from the OpenModelica server on every push (or if configured accordingly, on every pull request only). That might be noticeable traffic. Do you consider that acceptable?

Administrator has disabled public posting. Please login or register in order to proceed.

Re: installation on Ubuntu 12.04 or 14.04

We have a 100 Mbit/s connection and the OMC package is small. I would assume travis-ci fetches through an apt cacher (proxy) anyway (I do when building, and my build machine is connected to the same switch as the maching hosting the packages).

Administrator has disabled public posting. Please login or register in order to proceed.
There are 0 guests and 0 other users also viewing this topic
You are here: