Opened 10 years ago

Closed 10 years ago

#2918 closed defect (worksforme)

Problem with arrays

Reported by: andre.montib@… Owned by: Andre Montibeller
Priority: high Milestone:
Component: Frontend Version: 1.9.0Beta
Keywords: Cc:

Description

I'm running a model which contains 4 arrays of size n. It runs perfectly fine on Dymola, but for some reason I can't make it run on OpenModelica UNLESS I take out these arrays, which are not essential to the computation, but instead are storage arrays for local properties. However I need these arrays as an output of this simulation, and even though I've double checked my array syntax, I can't figure what is going wrong. the error message goes as follows:

Capilar_simples.main_functions.c: In function 'omc_Capilarsimples_HEX':
Capilar_simples.main_functions.c:426: error: 'UNKNOWN_SUBSCRIPT' undeclared (first use in this function)
Capilar_simples.main_functions.c:426: error: (Each undeclared identifier is reported only once
Capilar_simples.main_functions.c:426: error: for each function it appears in.)
mingw32-make: * [Capilar_simples.main_functions.o] Error 1
mingw32-make:
* Waiting for unfinished jobs....
Compilation process exited with code 2

(Capilar_simples is my package name, main is the model I have to run, and HEX is a function which generates said arrays)

Any ideas?

Cordially,
Andre Montibeller

Change History (6)

comment:1 by Adrian Pop, 10 years ago

Can you give a minimal model? If is not public you can send it to us at OpenModelica @ ida.liu.se and we will only use it for debugging.

comment:2 by Martin Sjölund, 10 years ago

Which revision of omc is this? The model (and function) generate good code using the nightly builds. (The model also simulates without error)

in reply to:  2 comment:3 by montibeller, 10 years ago

Replying to sjoelund.se:

Which revision of omc is this? The model (and function) generate good code using the nightly builds. (The model also simulates without error)

I am using OpenModelica 1.9.1+dev (r22233) (RML version).

Please note that I sent you two versions so they could be compared - one of them works, but without said arrays, while the other one shows the error message, even though it runs fine on Dymola, for example. There is no other difference between the two versions.

Thanks for your assistance!

comment:4 by Martin Sjölund, 10 years ago

I noted that. They both work using 1.9.1+dev (r22828)

in reply to:  4 comment:5 by montibeller, 10 years ago

Replying to sjoelund.se:

I noted that. They both work using 1.9.1+dev (r22828)

Yes, it actually works. Thanks for bringing this to my attention. I clearly neglected the importance of updating, so I'm sorry for taking your time.

comment:6 by Martin Sjölund, 10 years ago

Component: UnknownFrontend
Resolution: worksforme
Status: newclosed
Note: See TracTickets for help on using tickets.