Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

AdvancedNoise

AdvancedNoise

Hello,

Is the AdvancedNoise library supposed to run in the latest OpenModelica?  I tried to simulate the first example of the library and there were a boat load of build errors.  The check model was successful however.

Re: AdvancedNoise

It seems we have some issues with function inlining which generates undefined variables in the C code.
I opened a ticket about it and we'll have a look:
https://trac.openmodelica.org/OpenModelica/ticket/4239

Re: AdvancedNoise

Ok.  Thanks for the quick response.  Beats the hell out of Wolfram's so called technical support with their Modelica product! current/smile

I also tried to simulate the normalNoise component in Open Modelica which is contained in the Modelica_Noise library that came with Open Modelica and it too had build errors. 

Re: AdvancedNoise

You should not use Modelica_Noise library as is a bit outdated and we don't support it very well.
The Noise library was already included in the Modelica Standard Library (MSL) 3.2.2.
Just go to Modelica.Blocks.Noise or Modelica.Blocks.Examples.NoiseExamples to use those. To see what we support from the Noise library included in MSL go here:
https://test.openmodelica.org/libraries … rsive.html
and search for Noise. It seems all the example models are working.





Edited by: adrpo - Jan-27-17 21:10:37

Re: AdvancedNoise

I can confirm that the issue is connected to function inlining.
One can disable inlining of functions as a workaround using the following omc-flag:

Code:

-d=-inlineFunctions

.

Edited by: lochel - Jan-28-17 08:01:02

Re: AdvancedNoise

The AdvancedNoise library contains the parts of the Noise library that didn't make it into MSL due to the above mentioned issues in OpenModelica (and some other issues in other tools).

Re: AdvancedNoise

lochel,

In Peter Fritzson's book he talks about preventing inline functions with an annotation.  But, you are saying to use -d=-inlineFunctions.  Is this a Modelica language thing or is it something unique to Open Modelica?  Is this a directive? Also, where exactly in the code does one place it?

Thanks.

Roger

Re: AdvancedNoise

It's a compiler debug-flag. If you use mos-scripts, you pass it when calling omc, so "omc -d=-noinlineFunctions script.mos". In OMShell, you can use setCommandLineOptions("-d=-noinlineFunctions"). In OMEdit, it is hidden under Options->Simulation->OMC Flags

There are 0 guests and 0 other users also viewing this topic