Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#3521 closed defect (fixed)

Problems when writing data to file in when section

Reported by: Christian Kral <dr.christian.kral@…> Owned by: Lennart Ochel
Priority: high Milestone: 1.9.4
Component: Backend Version:
Keywords: Cc:

Description

Please consider the attached example. A simple R-L circuit is switched on. Data shall be written to a data file "output.dat" at different times. The compilation fails with error:

make -j2 -f WhenPackage.WhenExample.makefile
clang   -fPIC -O0 -falign-functions -march=native      -I"/usr/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME  -c -o WhenPackage.WhenExample.o WhenPackage.WhenExample.c
clang   -fPIC -O0 -falign-functions -march=native      -I"/usr/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME  -c -o WhenPackage.WhenExample_functions.o WhenPackage.WhenExample_functions.c
clang   -fPIC -O0 -falign-functions -march=native      -I"/usr/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME  -c -o WhenPackage.WhenExample_records.o WhenPackage.WhenExample_records.c
WhenPackage.WhenExample.c:334:61: error: use of undeclared identifier '$Presistor1$Pi'
    array_alloc_scalar_real_array(&tmp35, 1, (modelica_real)$Presistor1$Pi);
                                                            ^
WhenPackage.WhenExample.c:357:61: error: use of undeclared identifier '$Presistor1$Pi'
    array_alloc_scalar_real_array(&tmp38, 1, (modelica_real)$Presistor1$Pi);
                                                            ^
WhenPackage.WhenExample.c:380:61: error: use of undeclared identifier '$Presistor1$Pi'
    array_alloc_scalar_real_array(&tmp41, 1, (modelica_real)$Presistor1$Pi);
                                                            ^
3 errors generated.
make: *** [WhenPackage.WhenExample.o] Error 1
make: *** Waiting for unfinished jobs....
Compilation process failed. Exited with code 2.

The issues applies to

  • OpenModelica 1.9.4~dev-227-g9738428
  • Ubuntu 14.04 32bit

Attachments (1)

WhenPackage.mo (4.1 KB ) - added by Christian Kral <dr.christian.kral@…> 9 years ago.
Example showing the issue

Download all attachments as: .zip

Change History (10)

by Christian Kral <dr.christian.kral@…>, 9 years ago

Attachment: WhenPackage.mo added

Example showing the issue

comment:1 by Christian Kral <dr.christian.kral@…>, 9 years ago

Component: UnknownOMEdit
Owner: changed from somebody to Adeel Asghar

comment:2 by Adeel Asghar, 9 years ago

Component: OMEditRun-time
Owner: changed from Adeel Asghar to wbraun, lochel
Status: newassigned

comment:3 by Lennart Ochel, 9 years ago

Owner: changed from wbraun, lochel to Lennart Ochel

I will have a look.

comment:4 by Lennart Ochel, 9 years ago

Cc: Mahder Alemseged Gebremedhin added

comment:5 by Lennart Ochel, 9 years ago

Cc: Mahder Alemseged Gebremedhin removed

This is an issue with alias variables. I am already working on a similar issue - should be fixed soon.

comment:6 by Lennart Ochel, 9 years ago

Component: Run-timeBackend
Milestone: Future1.9.4
Status: assignedaccepted

comment:7 by Lennart Ochel, 9 years ago

Resolution: fixed
Status: acceptedclosed

Fixed in 069f34.

comment:8 by Martin Sjölund, 9 years ago

Milestone: 1.9.41.9.4-1.9.x

Milestone renamed

comment:9 by Martin Sjölund, 9 years ago

Milestone: 1.9.4-1.9.x1.9.4

Milestone renamed

Note: See TracTickets for help on using tickets.