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
  • Index
  • » Users
  • » ravi
  • » Profile

Posts

Posts

Oct-01-18 06:36:29
Unable to buuild OMEdit without OMSimulator

I have been successfully builiding OMC, OMEdit etc without any difficulty from git repos with submodules until version 12.
Now I find that OMEdit requires some components of OMSimulator ...
I am just wondering if  my observation is right. If so the documentation on OMEdit build does not reflect it.

DAE (Differential Algebraic Equations) is used when you a have a mix of Ordinary differential equations and algebraic equations that describe the system you are modelling. But you if you simply have pure ODE (Ordinary differential Equations) set you don't need a DAE solver.

Nov-03-16 05:27:51
How to restart a Mixied DAE system

I am able to restart a Mixed DAE system (Discrete and Continuous variables, with clock events)

with the following command  (here plant is my compiled binary of the model being simulated)

Code:

   ./plant  --iif=oldResult.mat --iit=prevEndTime   -r=continued.mat  -override="startTime=prevEndTime, stopTime=newEndTime"

However, there is one issue. The clock tick count is reset to zero, and I could not get the timed events as desired.
My question is  as to why discrete variable information is not read back from form my oldResult.mat just as it does for continuous variables.

I would much appreciate if one can provide a simple example of I can achieve my goal.

Aug-08-16 04:15:57
Changing OPC UA Server Port

I don't think you can change the port number through any configuration at this stage. But if you are compiling OpenModelica compiler (omc) from sources then you can easily change the port number

refer to the source code  under OMCompiler/SimulationRuntime/opc/ua

client.c:141:
                                          "opc.tcp://localhost:4841");
omc_opc_ua.c:458:                         state->nl = UA_ServerNetworkLayerTCP(UA_ConnectionConfig_standard, 4841);


you can change the above two lines in corresponding lines and recompile your omc.

Hope this helps.

Jul-12-16 08:44:11
Modelica 3.2.2 Library MixtureGasNasa bug
Category: Programming

1. The redecalred function setStat_phX in MixtureGasNasa package (in Modelica 3.2.2) has logic to enable
setting  the state composition vector (full) properly if user passes the    reduced vector as its input.

state := if size(X,1) == 0 then
689                  ThermodynamicState(p=p,T=T_hX(h,reference_X),X=reference_X)
690                else if size(X,1) == nX then
691                  ThermodynamicState(p=p,T=T_hX(h,X),X=X)
692                else
693                  ThermodynamicState(p=p,T=T_hX(h,X), X=cat(1,X,{1-sum(X)}));


But the code  (colored in red) ... when executed is executed ...  the argument X in the function call T_hX appears to be incorrectly passed.
Either it should have just passed original reduced size vector X or the concatenated( the full) vector. It appears to send a vector of size that is full, but with the end component composition set to zero.

To illustrate the point, I am attaching the "total.mo" for consideration. Here is the output I get when I compile and execute the model. I modified "Modelica 3.2.2/Media/IdealGases/Common/package.mo to provide some debug messages that help. One should expect Xfull to be {0.1,0,1,0.1,0.1,0.1,0.5}

The fix is to change the input argument line in T_hX in the package to
input MassFraction[:] X "Mass fractions of composition";






My compiler version is v1.11.0-dev.23+g1a9bdf2
gcc (GCC) 5.1.1 20150618 (Red Hat 5.1.1-4)
Linux vishnu 4.2.3-200.fc22.x86_64 #1 SMP Thu Oct 8 03:23:55 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux


Output from the model execution
record SimulationResult
    resultFile = "/home/ravi/DSTO/projects/Om/testing/valve/bug2/work/plant_res.mat",
    simulationOptions = "startTime = 0.0, stopTime = 10.0, numberOfIntervals = 500, tolerance = 1e-06,
            method = 'dassl', fileNamePrefix = 'plant', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''",
    messages = "assert            | warning |
                calling setState_phX   ==> nX=6, p=100000, h=100000, X=[0.1, 0.1, 0.1, 0.1, 0.1]
assert            | warning
              |[b] T_hX Called  h  = 100000(J/kg) nX = 6 X  = [0.1, 0.1, 0.1, 0.1, 0.1, 0]  Xfull  = [0.1, 0.1, 0.1, 0.1, 0.1, 0] [/b]
",
    timeFrontend = 1.455699987,
    timeBackend = 0.002906534,
    timeSimCode = 0.002218748,
    timeTemplates = 0.015725235,
    timeCompile = 0.37132361,
    timeSimulation = 0.008871003000000001,
    timeTotal = 1.856828653
end SimulationResult;
"Warning: Assuming fixed start value for the following 1 variables:
         h:VARIABLE(start = 100000.0 unit = "J/kg" )  type: Real
"
simulation done
No. of Plant Variables = 12



1468312980_total.mo

Jul-11-16 05:52:35
How to set StateSelct flag for part of a vector

I can see that we can set the entire vector elements as preferred states from the following syntax

Code:

Real [N, 2]  Vec (each stateSelect=StateSelect.prefer)   

But let us say I only want Vec[1:N-2, 1] elements of the above vector to be set  as preferred states. How can this be accomplished??

Jul-08-16 02:02:21
Looking for best practice to keep my OpenModelica upto date with tthe trunk ... with optimal...
Category: Developer

I have been using OpenModelica for a while.  I would like my OpenModelica version updated reasonably frequently.  I always compile the source tree (obtained from read only Git repo.)  on my Linux box.

What is the optimal procedure to reduce build time?
Is it necessary to use   --without-omc  flag every time the OMCompiler is updated? 
I use "git submodule foreach --recursive "git pull" to update my sources.
Can I avoid "make clean" to reduce the build time?  ... because only few sources files would have changed.

Some pointers will be much appreciated.


               

             

Jan-25-16 00:21:03
When simulation fails "mat" fails is left currepted and is unusable.

When I use  simulate(amodel)  the mat file appears to be left in corrupted state when the simulation either aborted or when the solver fails to converge and aborts the integration.  If I use csv output however, I am able to read the results upto the point where the integration was successful.

I suspect that with "mat" file format unclean closure of the file and this probably can be addressed if the results file is closed between writes on each successful time step is written.

Any comments on this matter would be much appreciated.


The behavior I refer to is on a Linux platform.  I have no idea if this happens in windows environment.

Dec-15-15 06:49:30
Simulation aborts with Got number xxxx expected yyyy
Category: Developer

I have a model that builds and compiles OK. But when I run it I get the above error and execution aborts.
from my gdb session (after recompiling with -g flag). 
To me there appears to be some malformed  "<model>_info.json"  file.I need some pointers as to what this error is possibly due to.
I am attaching the "total.mo" file should that be required.

Code:

#2  0x00007ffff7b99b54 in assertNumber (expected=1172, str=<optimized out>) at simulation/simulation_info_json.c:184

#3  readEquation (str=<optimized out>, xml=0xddd1c0, i=i@entry=1172) at simulation/simulation_info_json.c:219
#4  0x00007ffff7b9a6a6 in readEquations (xml=0x7fffffffd440, str=<optimized out>) at simulation/simulation_info_json.c:289
#5  readInfoJson (xml=0x7fffffffd440, str=<optimized out>) at simulation/simulation_info_json.c:360
#6  modelInfoInit (xml=xml@entry=0x7fffffffd440) at simulation/simulation_info_json.c:389
#7  0x00007ffff7b9ad6f in modelInfoGetEquation (xml=0x7fffffffd440, ix=450) at simulation/simulation_info_json.c:407
#8  0x00007ffff7b5bdb3 in getNumericalJacobian (f=0xd86520, x=0xd861f0, jac=0xd86960, dataAndSysNum=0x7fffffff9e80)
    at simulation/solver/nonlinearSolverHybrd.c:234

1450161842_total.mo

Aug-27-15 04:17:04
Event does not fire as expeced

The following model snippet, I was trying did not work as expected.  The code snippet was based on publication
"Modelling of mixed Continuous/Discrete Systems in Modelica" by Martin et.al.

Code:


model tick
 
parameter Real sampleTime = 0.1 ;
Real x(start=0, fixed=true) ;
 
discrete Real nextTime(start=0) ;
 
  equation
 
    when  time  >= pre(nextTime) then   
       nextTime = time + sampleTime ;
    end when; 
   
     x = nextTime ;
end tick;

The above code produces no change in x at all. It remains at zero. But then when I change the when expression to  " time > pre(nextTime)" it works. I get the stair step changes in x.  Is this expected or is it a bug? Some explanation of this behavior would be much appreciated. I am using omc verison v1.9.3-dev.1258+gf9a05a1.

Jul-24-15 07:50:28
buildModel call from OMShell-terminal or OMEdit fails with template error
Category: Developer

Since I last submitted the post I found the source of the problem in buildModel phase. It appears that the translated (replaceable) function "solve: from the Media.Common.OneNonLinearEquation package has a stray statement that fails compilation of the translated function. Below is the short segment of the code snipped from the "plant_functions.c" file.


if(((fabs(_m) <= _tol) || (_fb == 0.0)))
    {
      _found = 1;

      // 0.0 = 1;                ..... This is the stray line  I had to comment out for the "make" to succeed,

      _x_zero = _b;


I am able identify the corresponding Modelica code in the function is shown .(Attaching a small screenshot of OMEdit session) .

My gut feeling says that it is a bug in the translator. 
https://openmodelica.org/images/agorapro/attachments/2421/mini_solvefunctionListing.png

Jul-22-15 06:34:55
buildModel call from OMShell-terminal or OMEdit fails with template error
Category: Developer

I get the following error trying to build this model. And I am struggling to find the source of the problem with no success.

Please let me know how I can resolve this error.

(I built OpenModelica from svn sources - rev. 1.9.3+dev (r25926) - on a Linux box - "Linux vishnu 3.19.8-100.fc20.x86_64 #1 SMP Tue May 12 17:08:50 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux", with gcc (GCC) 4.8.3 20140911 (Red Hat 4.8.3-7)

Attached please find "total.mo" file

Trace from OMShell-terminal
total.mo

>>> buildModel(plant_total)       
{"",""}
>>> getErrorString()
"Warning: Alias set with several free start values
* candidate: adsorber.outlet_outState.p(start = 100000.0)
* candidate: adsorber.outlet.p(start = 1000000.0)
* candidate: v2.inlet.p(start = 1000000.0)
* candidate: adsorber.outlet_State.p(start = 100000.0)
=> select value from adsorber.outlet_outState.p(start = 100000.0) for variable: adsorber.outlet_outState.p
Warning: Alias set with several free start values
* candidate: adsorber.inlet_outState.p(start = 100000.0)
* candidate: adsorber.inlet.p(start = 1000000.0)
* candidate: v1.outlet.p(start = 1000000.0)
* candidate: adsorber.inlet_State.p(start = 100000.0)
=> select value from adsorber.inlet_outState.p(start = 100000.0) for variable: adsorber.inlet_outState.p
Warning: There are iteration variables with default zero start attribute. Use +d=initialization for more information.
[b][CodegenUtil.tpl:207:16-207:16:writable] Error: Template error: ScalarVariableType: Real[2][/b]

"

Jan-06-15 05:49:22
How to check a user library without using OMEdit

Is there a way one  can check integrity of a user library containing packages/sub packages, without using a script file? ie. with just "omc"

Adrian,
             I am glad that a similar query I made earlier was answered here. All along I have been relying on the following reference documentation on scripting
https://build.openmodelica.org/Document … ulate.html for help on the use of parameters and options on scripting commands.

But that switches such as " override , iif" exist is a revelation to me.  I wish these were included in the above documentation. Anyway, out of curiosity, I have executed the compiled model in the interactive bash shell (command window for Windows users)    with  -- help  switch.  and lo and behold it showed me all the options one could specify for subsequent execution . I hope this helps others.


|                 | |       | | <-clock=value> or <-clock value>
|                 | |       | |   selects the type of clock to use -clock=RT, -clock=CYC or -clock=CPU
|                 | |       | | <-cpu>
|                 | |       | |   dumps the cpu-time into the results-file
|                 | |       | | <-f=value> or <-f value>
|                 | |       | |   value specifies a new setup XML file to the generated simulation code
|                 | |       | | <-help=value> or <-help value>
|                 | |       | |   get detailed information that specifies the command-line flag
|                 | |       | | <-iif=value> or <-iif value>
|                 | |       | |   value specifies an external file for the initialization of the model
|                 | |       | | <-iim=value> or <-iim value>
|                 | |       | |   value specifies the initialization method
|                 | |       | | <-iit=value> or <-iit value>
|                 | |       | |   [double] value specifies a time for the initialization of the model
|                 | |       | | <-ils=value> or <-ils value>
|                 | |       | |   [int] default: 1
|                 | |       | | <-interactive>
|                 | |       | |   specify interactive simulation
|                 | |       | | <-iom=value> or <-iom value>
|                 | |       | |   value specifies the initialization optimization method
|                 | |       | | <-ipopt_hesse=value> or <-ipopt_hesse value>
|                 | |       | |   value specifies the hessematrix for Ipopt
|                 | |       | | <-ipopt_init=value> or <-ipopt_init value>
|                 | |       | |   value specifies the initial guess for optimization
|                 | |       | | <-l=value> or <-l value>
|                 | |       | |   value specifies a time where the linearization of the model should be performed
|                 | |       | | <-logFormat=value> or <-logFormat value>
|                 | |       | |   value specifies the log format of the executable. -logFormat=text (default) or -logFormat=xml
|                 | |       | | <-ls=value> or <-ls value>
|                 | |       | |   value specifies the linear solver method
|                 | |       | | <-ls_ipopt=value> or <-ls_ipopt value>
|                 | |       | |   value specifies the linear solver method for ipopt
|                 | |       | | <-lv=value> or <-lv value>
|                 | |       | |   [string list] value specifies the logging level
|                 | |       | | <-measureTimePlotFormat=value> or <-measureTimePlotFormat value>
|                 | |       | |   value specifies the output format of the measure time functionality
|                 | |       | | <-nls=value> or <-nls value>
|                 | |       | |   value specifies the nonlinear solver
|                 | |       | | <-noemit>
|                 | |       | |   do not emit any results to the result file
|                 | |       | | <-noEventEmit>
|                 | |       | |   do not emit event points to the result file
|                 | |       | | <-output=value> or <-output value>
|                 | |       | |   output the variables a, b and c at the end of the simulation to the standard output
|                 | |       | | <-override=value> or <-override value>
|                 | |       | |   override the variables or the simulation settings in the XML setup file
|                 | |       | | <-overrideFile=value> or <-overrideFile value>
|                 | |       | |   will override the variables or the simulation settings in the XML setup file with the values from the file
|                 | |       | | <-port=value> or <-port value>
|                 | |       | |   value specifies interactive simulation port
|                 | |       | | <-r=value> or <-r value>
|                 | |       | |   value specifies a new result file than the default Model_res.mat
|                 | |       | | <-s=value> or <-s value>
|                 | |       | |   value specifies the solver
|                 | |       | | <-w>
|                 | |       | |   shows all warnings even if a related log-stream is inactive

Feb-12-14 08:55:59
How to start simulations from previously stored result file

I have a model that successfully ran from   startTime=0 to endTime=10 say ... and the results are saved in    OldResult.mat
Now I want to rerun the model starting with results   at  T=5,   and continue to run it for another 10 seconds from that initial condition and the new results saved in a different output file.

How can this be done?

Feb-12-14 07:57:42
An enhanced Octave script to import OpenModelica Results file
Category: Developer

I am including the Octave script to import Modelica results file (from .mat format) which was originally developed by Christian Schaad, ingenieurbuero@christian-schaad.de
Hope this helps others.


Code:


function omimport(modelname) 
%
% Read OpenModelica Result File into Workspace
%
%
% Feedback/problems: Christian Schaad, ingenieurbuero@christian-schaad.de
% Modified by R. Saripalli,
%            to handle
%         Array variables of form X[i] with  (renamed to X_i) 
%            and to discard trailing non-ascii chars from variable names.
%  Tested on Octave 
%  4th Dec. 2013


load ([modelname,'_res.mat']);

%Sort out double times
times = data_2(1,:) ;
deltat0=find(diff(times)==0); %Vector of indecides with duplicate time stamp
disp(['Removed same time values: ',num2str(length(deltat0)),'/',num2str(length(data_2(1,:)))])

assignin('base','data_2',data_2);
assignin('base','dataInfo',dataInfo);
assignin('base','name',name);
assignin('base','deltat0',deltat0);

name=name';
disp(['Number of Variables:', num2str(length(name))]);
for i=1:length(name)
        tmp =  strfind( name(i,:),  'der('  );
    if (isempty(tmp))    % when der is absent

                [S,iendchar]=(regexp(name(i,:),"^[-_.a-zA-Z0-9 [\\]]*"));

          %dataInfo second row holds row index of data_2
                  %  which holds variable i data.
          %  its sign is assigned to data values. (why all this fuss??)
          %  and this data is assigned to varVals.
        if dataInfo(2,i) <0  %dataInfo second row holds row index of data_2
              assignin('base','varVals',-data_2(-dataInfo(2,i),:));
            else
               assignin( 'base', 'varVals', data_2(dataInfo(2,i),:) );
                endif 
           
        evalin( 'base', (['varVals(deltat0)=[];']) )  %We ignore the data if dup. time stamp

        varName = num2str(name(i,1:iendchar));      % Grab the variable name
        varName = strrep(varName, "[","_");
                varName = strrep(varName, "]","");  %Handle variables of array type

        evalin( 'base', ([varName,'=varVals;']) );
    endif
endfor  % end of loop over all variables

clear data_1 data_2 Aclass description modelname i dataInfo varVals deltat0 varName;
evalin('base',(['clear name data_2 dataInfo iendchar varVals']));

endfunction

Feb-06-14 03:27:27
f2c header file not configured properly for 64bit architecture .

Thanks for the prompt response. Yes ... I will add it to the bug tracker. But it was down. I am eager to know if others had issues like this.

Anyway, attached find the orignial f2c.h in the repository versus the one I tweaked.  Unfortunately I can't upload files through this form but here is the diff output between the f2c.h (I tweaked) and the original f2c.h. (output in column mode). I am behind a firewall which does not allow upload of files.

.... Scroll down to see the table below .....


              f2c.h (modified)                            f2c.h (original)
#if defined(__alpha__) || defined(__sparc64__) || defined(__x <
typedef int integer;                        < 
typedef unsigned int uinteger;       <
#else                                  <
#endif                                  <
#if defined(__alpha__) || defined(__sparc64__) || defined(__x <
typedef int logical;                          <
#else                                  <
#endif                                  <
#if defined(__alpha__) || defined(__sparc64__) || defined(__x |typedef long long longint;        /* system-dependent *
typedef long longint;    /* system-dependent */              |typedef unsigned long long ulongint;    /* system-dependent *
typedef unsigned long ulongint;  /* system-dependent */          <
#else                                  <
typedef long long longint;              /* system-dependent - <
typedef unsigned long long ulongint;    /* system-dependent - <
#endif                                  <
#if defined(__alpha__) || defined(__sparc64__) || defined(__x <
typedef int flag;                          <
typedef int ftnlen;                          <
typedef int ftnint;                          <
#else                                  <
#endif                                  <
#ifndef __cplusplus                          <
#endif   

Feb-05-14 05:31:56
f2c header file not configured properly for 64bit architecture .

I have been building OpenModelica for a while on Linux with x86_64 architecture. Although the build is successful, I run into run time errors during solver phase which were traced to improper typedefs in f2c.h.  I noticed that some how the config and make files generated do not make  the necessary (changes to f2c.h ... replacing  "long long" to "long" for 64bit machine).

Once I followed the README instructions in f2clib source tree as to how to massage the f2c.h,   before building OpenModelica things work fine.  My earlier post related DASSL solver crashing on all examples is also related to this. I am not sure if OS on similar architecture have issues similar to this.


Perhaps there exists a case for making the build process more robust either by waning the users of  the need to customize f2c.h for specific architecture or automating changes through make. Otherwise, novice users will have difficulty tracking down as to why the models fail during execution, even though build process completed well.

Feb-03-14 03:30:24
Need some documentation on how Modelica results file data structure
Category: Developer

I am wishing you use octave to plot data from results file. Although I can import the mat file successfully, the data structures are not clear
for me to figure out all my variables appropriately. I known " ingenieurbuero@christian-schaad.de" has developed a script but it
does not work if you have variables of array type.

Can some one please point me to a description of   "dataInfo",  "data_1" and "data_2" structures.

Jan-20-14 04:30:19
Adding if equations makes the Valve model under determined

I think I figured out what the problem is. Looks as though if equations  work only on variables with variability of  "parameter". For dynamic variables, one need to resort to if expressions. When I modified the above code with these lines the model compiled and worked fine.


Code:


     state = if (inlet.p > outlet.p) then Medium.setState_phX(inlet.p, inStream(inlet.h_outflow), inStream(inlet.Xi_outflow))
                                                     else Medium.setState_phX(outlet.p, inStream(outlet.h_outflow), inStream(outlet.Xi_outflow));
 
    inlet.m_flow = if (inlet.p > outlet.p)  then  Medium.density(state)  * cv * sqrt(inlet.p - outlet.p)
                                                                 else  - Medium.density(state)  * cv * sqrt(outlet.p - inlet.p);

I am not sure if this was made clear in the manuals.   Would appreciate if Modelica experts confirm my observation. It would have been more appropriate for omc to  spew out an error message explicitly stating that it is ignoring the if eqns. when conditional variable has higher variability than "parameter".

Jan-17-14 04:54:15
Adding if equations makes the Valve model under determined

Here is a  Valve model that is giving me problem when I try if equations in it to allow  reverse flows. I am aware concepts related to flow reversals have been covered extensively in many of Modelica presentations that explain Streams. This is my attempt to understand them through simple examples.

When I try to use this model "omc" complains that the system is under determined .... needing two more equations. But I am unable to see what other eqns. are needed here.

The model works fine if I replaced the conditional equations with the equations that are in the (deltaP>0) case.  (as long as I don't get into reverse flow conditions and that is what I expected).

My aim is to make the valve work in both flow directions. 



[model Valve
  // A simple Valve (that permits bidirectional flow)
 
  replaceable package Medium = PartialSimpleIdealGasMedium ;

FluidPort     inlet (redeclare package Medium = Medium)  ;
  FluidPort     outlet (redeclare package Medium = Medium)  ;

  parameter Real   cv = 1.0 / sqrt(1e5)     ;   
Medium.ThermodynamicState    state ;
 

  equation
    // No change in Enthalpy in the Valve

     inlet.h_outflow = inStream(outlet.h_outflow) ;  // when flow from out to in
     outlet.h_outflow = inStream(inlet.h_outflow) ;  //      inlet to outlet
     inlet.Xi_outflow = inStream(outlet.Xi_outflow) ;  // pass composition un_altered
     outlet.Xi_outflow = inStream(inlet.Xi_outflow) ;  //     

  // Mass balance
     inlet.m_flow + outlet.m_flow = 0  ;

    // Pressure difference drives the flow
    if ( inlet.p > outlet.p ) then
        state = Medium.setState_phX(inlet.p, inStream(inlet.h_outflow), inStream(inlet.Xi_outflow)) ;
        inlet.m_flow =  Medium.density(state)  * cv * sqrt(inlet.p - outlet.p) ;
    else
        state = Medium.setState_phX(outlet.p, inStream(outlet.h_outflow), inStream(outlet.Xi_outflow)) ;
        outlet.m_flow =  Medium.density(state)  * cv * sqrt(outlet.p - inlet.p) ; // Typical valve behaviour
     end if ;
end Valve;

Jan-09-14 07:29:54
Simulation fails when initialized arrays are modfied

A trivial example code to illustrate this.

Code:


model tryme
Real y ;

equation
   y = myfun(3.4) * y + 2 ;

end tryme;

function myfun
input Real x ;
output Real y ;

//  protected Real  z[3 ]= {1,2,3} ;  // This Falis (why ??)
    protected  Real  z[3] ;                  // Works

algorithm
  z[1] := x ;
  y    := 2 * z[1] ;
end myfun;


Nov-06-13 04:25:54
Minimal OM installation requirements

I am interested in compiling minimal Open Modelica
                without any GUI,
                             optimisation
                             test and verification suits and am happy to use just the latest version of the modelica library.

I did use  ./configure switches to disable the features I did not want. But the make appears to look for sub directories "OMEdit", "OMShell", "OMNote".
My idea is to checkout bare minimum of source tree from the svn trunk and compile it. Any suggestions in this regards is much appreciated.

Also, I notice that the new revision 18017 has no "3rdParty" directory any more under the main trunk. I see this is now under branches/requirements. Does it mean that we no longer require this 3rdParty resource. When I tried to make the new version after update make fails with message that this directory does not exist. Any suggestions?

I have tried "svn cleanup ; svn update ; make clean ; make".   But no luck. What should I be doing??

Nov-06-13 03:49:24
omc fails to compile with error "unbound variable info" (Ceval.mo)

I finally figured this out. The problem was the f2c source tree. Its include files are configured for 32 bit machine. Replaced "long int" to "int"
as suggested in f2c README. Things worked fine from then on.

Hope this helps others who had similar issue. Hopefully, this f2c header files are modified to make sure this need not be done by the user compiling from the source.

Aug-15-13 09:58:37
omc fails to compile with error "unbound variable info" (Ceval.mo)

I have explore this further. The trouble seems to be that   after info array is passed to the _dassrt routine, the contents of that array are different to that
the GUI function passes to it.   

In
RuntimeSimulation om/SimulationRuntime/c/simulation/solverdssl.c   
   I checked the values of  "info"  vector   in the  dasrt_step function. And they are 15 values are legitimate [ 0 or 1]
But when the function call DDASRT (alias _dassrt)  is made,

in the called function the passed pointer address is correct. But the vector
although correct up to some values, spurious numbers  { eg. info[10] = 33 }
( I put some debug statements in  /SimulationRuntime/c/math-support/ddasrt.c file
  at the start of the _dassrt  function call.  I am aware that the function rolls back the pointer by one count (fortran array indexing stuff I think)
So I print the values after the pointer is decremented)

I have no f2c installed on my computer. Include and library files are generated from the source provided in the trunk.
Is there an issue with f2c and gcc  .....

In short I don't believe the problem is the Blas or Lapack since we have not yet begun to initialize the solver ....

My suspicion is that somehow the info vector is getting corrupted when called by (f2c translated function)

Let me know what your thoughts are

Aug-13-13 08:11:32
omc fails to compile with error "unbound variable info" (Ceval.mo)

Thanks for the tip.  Make clean did fix the problem. But I have not made any changes to code
except changing the rml library. (I did run ldconfig after that)


But now I have problem with DASSL solvers. I can run example files successfully with all other solvers excepting the
DASSL solvers.  I get the following error with simulate command.



LOG_SOLVER        | info    | Start numerical solver from 0 to 1
LOG_SOLVER        | info    | call solver from 0 to 0.002 (stepSize: 0.002)
LOG_DDASRT        | info    | Calling DDASRT from 0 to 0.002
LOG_SOLVER        | info    | | Start step 0 to 0.002
DASSL--  SOME ELEMENT OF INFO VECTOR IS NOT ZERO OR ONE
stdout            | warning | The code has encountered trouble from which it cannot recover.
stdout            | warning | can't continue. time = 0.000000



My first attempt to use Modelica 1.8 had similar issue and I posted the debug log then. I gave up after struggling to
find the root cause of it. Now even with Modelica 1.9  the issue persists. At least this time I have a bit more sensible
log description. Any suggestion as to where my problem could lie???

Aug-12-13 02:55:43
omc fails to compile with error "unbound variable info" (Ceval.mo)

Trying to build Revison 16775 trunk .. on my 64 bit linux
Linux localhost.localdomain 2.6.43.8-1.fc15.x86_64 #1 SMP Mon Jun 4 20:33:44 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

I get the following error while building omc
  Ceval.mo:6158.77-6158.81 Error: unbound variable info
      Error: StaticElaborationError[/i]

Tried to follow earlier recommendations on such an issue ... that is to use the  latest  "rml" version.
Downloaded the latest version from svn.

Here is the output of the version detail from that build
rml+mmc compiler version 2.5.0 built 2011-06-15 17:10 using MLton or SML.NET or SMLNJ

But this did not fix the problem.

Any help to get over this problem is much appreciated.

Aug-31-12 01:55:22
DASSL solver SEGFAULTs at parse_f() under X86_64 (Fedora 15)
Category: Developer

I am running OMEdit on Fedora 15 (64bit), (compiled with latest svn source tree     r 12467).
OMEdit - OpenModelica Connection Editor Version: 1.8.1
(I built it with ./configure --prefix=/usr/local --with-lapack --with-qwt --with-omniORB=/usr  --without-paradiseo)

SYMPTOM:
All solvers work fine excepting "dassl" and "dassl2" for some reason. These two solvers always crash with the following debug info.

Running under "gdb"   I see that the SEGFAULT occurs during  parse_f()  function call. It looks as though it is f2c issue ..  there are some
blurbs about having to tweek the f2c.h  to ensure that the typedefs are consistent with machine architecture.

1.  Initially I did not have any "f2c" rpms installed. And configure was using "f2clib" from Modelica source (OpenModelica/SimulationRuntime/c/simulation/libf2c)
     Selecting "dassl or dass2" segfaults during parse_f()
2.  Susequently, installed f2c rpms for Fedora (64bit) ... from Fedora Repo.  make clean, rerun config and make again. This time  no segfault. But the integrator results with dassl
     are garbage.

Any suggestion to solve this issue would be helpful.

Aug-17-12 03:16:50
DASSL solver crash

I am running OMEdit on Fedora 15 (64bit), (compiled with latest svn source tree     r 12467).
OMEdit - OpenModelica Connection Editor Version: 1.8.1
(I built it with ./configure --prefix=/usr/local --with-lapack --with-qwt --with-omniORB=/usr  --without-paradiseo)

SYMPTOM:
All solvers work fine excepting "dassl" and "dassl2" for some reason. These two solvers always crash with the following debug info.
Here is the output simulating "SimpleIntegrator.mo" from Examples.

Can someone please let me know how I can track down the cause of this.

Here is the debug window output

Process crashed debug   | NO override given on the command line.
debug   | read all the DefaultExperiment values:
        | | startTime = 0
        | | stopTime = 1
        | | stepSize = 0.002
        | | tolerance = 0.001
        | | solver method: dassl
        | | output format: mat
        | | variable filter: .*
debug   | read xml file for states:
        | | Real x(start=2, fixed=false, {nominal=1}, min=-1.79769e+308, max=1.79769e+308)
debug   | read xml file for stateDerivatives:
        | | Real der(x)({start=0}, fixed=false, {nominal=1}, min=-1.79769e+308, max=1.79769e+308)
debug   | read xml file for real algebraic:
        | | Real u(start=1, fixed=false, {nominal=1}, min=-1.79769e+308, max=1.79769e+308)
debug   | read xml file for integer algebraic:
debug   | read xml file for boolean algebraic:
debug   | read xml file for string algebraic:
debug   | read xml file for real parameters:
debug   | read xml file for integer parameters:
debug   | read xml file for boolean parameters:
debug   | read xml file for string parameters:
Allocated simulation result data storage for method 'mat' and file='SimpleIntegrator_res.mat'
Recognized solver: dassl.
debug   | *** Initializing DASSL
debug   | Wrote parameters to the file after initialization (for output formats that support this)
debug   | Performed initial value calculation.
debug   | Start numerical solver from 0 to 1
debug   | Call Solver from 0.000000 to 0.002000
debug   | **Calling DDASRT from 0 to 0.002
debug   | **Start step 0 to 0.002

Aug-14-12 07:40:20
OMEdit fails to start after successful compilation on Fedora 15
Category: Developer

Now I am able to get everything working but with some irksome issues  that need some attention for future builds.

The problem was

1. my first install went OK with previous build without ominORB which does not use python interface.
2. But I could not "uninstall" as make does not have such a target current/sad
3. With new config I hoped to overwrite original install but failed as it  was failing due to unrecognized layout (I think it is debian centric)
4. I installed new binaries manually, but forgot to update the library files. (that is what GOT ME current/sad()


Anyway here are some issues that need to be addressed with install
   1.         /home/ravi/software/om/OpenModelica/PythonInterface/Makefile  failing with ....  option --install-layout not recognized
   2.         adding "uninstall" target
   3.         OpenModelica/OMOptim/Core/Optim/EA/SA1/SA1explorer.h (line 71 ... update method call does not provide second boolean argument
               needed as per the abstract class definition). I supplied default "false" value to complete make. Pl. advise as to what this ought to be.


Finally, I was wondering if I could choose "with-omniORB  and without-PythonInterface" combination to enable proper install.  What is the advantage of having python
interface????

Thank you once again for your kind advice.

Aug-13-12 09:37:07
OMEdit fails to start after successful compilation on Fedora 15
Category: Developer

Thanks for the prompt reply.
Here are the results of your suggestions.

omc +d=interactiveCorba gives
CORBA disabled. Configure with --with-CORBA and recompile for enabling.
CORBA disabled. Configure with --with-CORBA and recompile for enabling.

Buth there is no such switch (shown with ./configure --help)


Some how it thinks CORBA is not enabled.
record OpenModelica.Scripting.CheckSettingsResult
    OPENMODELICAHOME = "/usr/local",
    OPENMODELICALIBRARY = "/usr/local/lib/omlibrary",
    OMC_PATH = "/usr/local/bin/omc",
    OMDEV_PATH = "",
    OMC_FOUND = true,
    MODELICAUSERCFLAGS = "",
    WORKING_DIRECTORY = "/home/ravi/software/om/OpenModelica/build/bin",
    CREATE_FILE_WORKS = true,
    REMOVE_FILE_WORKS = true,
    OS = "linux",
    SYSTEM_INFO = "Linux localhost.localdomain 2.6.43.8-1.fc15.x86_64 #1 SMP Mon Jun 4 20:33:44 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
",
    RTLIBS = "-lrt -lsundials_kinsol -lsundials_nvecserial -llapack  -lpthread",
    C_COMPILER = "gcc",
    C_COMPILER_RESPONDING = true,
    CONFIGURE_CMDLINE = "Configured 2012-08-09 18:14:36 using arguments: '--with-lapack --with-qwt --without-ipopt --without-paradiseo --prefix=/usr/local/'"
end OpenModelica.Scripting.CheckSettingsResult;

Aug-13-12 06:11:04
OMEdit fails to start after successful compilation on Fedora 15
Category: Developer

Hi,

     I have been struggling to get OpenModelica working on my Fedora 15 (64bit machine) without much success. I am able to build required components but
having difficulty omniORB connection (I think..).

SYMPTOMS:

a.)   When I use OMEDit, I get the splash screen but after that I get a dialog box with "Unable to find OMEdit server,
object reference file /tmp/openmodelica.ravi.objid.OMEdit.....

b.)  When I try OMNotebook I get the following on console (and it hangs there)

trying to read the corba IOR file /tmp/openmodelica.ravi.objid
Starting omc: /usr/local/bin/omc
trying to read the corba IOR file /tmp/openmodelica.ravi.objid

Any help to resolve this problem is much appreciated.

b.t.w. I have tried configuring without omni-ORB but even that sockets thing does not seem to work.


More Details should you they be needed:

I am using omniORB the following versions of omniORB rpms

omniORB-utils-4.1.6-2.fc15.x86_64
omniORB-4.1.6-2.fc15.x86_64
omniORB-servers-4.1.6-2.fc15.x86_64
omniORB-devel-4.1.6-2.fc15.x86_64


  I am using svn source trunk (detals given below)

1. My config options are as follows
$ ./configure --prefix=/usr/local --with-lapack --with-qwt --with-omniORB=/usr --with-ipopt --with-paradiseo=/usr/local

3.. SVN source tree details
URL: https://openmodelica.org/svn/OpenModelica/trunk
Repository Root: https://openmodelica.org/svn/OpenModelica
Repository UUID: f25d12d1-65f4-0310-ae8a-bbce733d8d8e
Revision: 12467
Node Kind: directory
Schedule: normal
Last Changed Author: adeas31
Last Changed Rev: 12467
Last Changed Date: 2012-08-10 12:43:25 +1000 (Fri, 10 Aug 2012)

  • Index
  • » Users
  • » ravi
  • » Profile
You are here: