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 Changed 10 years ago by adrpo

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 follow-up: Changed 10 years ago by 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)

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

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 follow-up: Changed 10 years ago by sjoelund.se

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

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

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 Changed 10 years ago by sjoelund.se

  • Component changed from Unknown to Frontend
  • Resolution set to worksforme
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.