-fPIC is not needed for simulation executables (which is the only thing libinteractive is used for). However, I will change the libinteractive Makefile to use the configured CFLAGS anyway.

--
Martin Sjölund

On 06/10/2011 01:01 PM, Timo Penndorf wrote:
Hi,

I think a stub library or new code pathes and defines are
not the best way. The problem is x86_64 specific. Maybe
libinteractive can be compiled with the -fPIC option as
libsim does.

Timo


Am Donnerstag, den 09.06.2011, 08:08 +0200 schrieb Adrian Pop:
Hi,

Jens, you will need to link with -linteractive too as -lsim
depends on it and you will get unresolved symbols.

One way would be to have a stub for -linteractiveStub
that has all the interface functions with no implementation.

Yet another better way would be to make a libsimNoInteractive
which compiles the .c files with flags -DNO_INTERACTIVE and
use this flag in the .c code to disable (ifdef) those parts.

Cheers,
Adrian Pop/

On 2011-06-08 17:05, Jens Frenkel wrote:
Hi Timo,

fixed in revision 9258. There is also fixed the problem with link FMU
with interactive.

Mit freundlichen Grüßen,
Kind regards,


Jens Frenkel

_________________________________________________________________


Dipl.-Ing.
Jens Frenkel

*****************************************************************
Technische Universität Dresden
Institut für Verarbeitungsmaschinen und Mobile Arbeitsmaschinen
D-01062 Dresden

Tel: 0351 463-39278
Fax: 0351 463-37731
eMail: [email protected]
*****************************************************************


*****************************************************************
Dresden University of Technology
Institute of Processing Machines and Mobile Machinery
D-01062 Dresden
Germany

Tel: +49 351 463-39278
Fax: +49 351 463-37731
eMail: [email protected]
*****************************************************************



Am 06.06.2011 07:16, schrieb Timo Penndorf:
Hello,

I use Revision r9248 on a 64-bit fedora linux.

There is an error if I want to access real values (with high
indices, maybe the last one in modelDescription.xml) from a fmu.


I got the following code in den XYZ_FMU.c:

// define model size
#define NUMBER_OF_STATES 18
#define NUMBER_OF_EVENT_INDICATORS 36
#define NUMBER_OF_REALS 2861
#define NUMBER_OF_INTEGERS 0
#define NUMBER_OF_STRINGS 0
#define NUMBER_OF_BOOLEANS 0
#define NUMBER_OF_EXTERNALFUNCTIONS 0


The last entry of modelDescription.xml is:

     <ScalarVariable
       name="p_arm3_aussen.sarturis_position_out_mat[3,3]"
       valueReference="2878"
       variability="continuous"
       causality="internal"
       alias="alias">
       <Real   />
     </ScalarVariable>


As you see the value reference is 2878, which means there
are 2879 values in my model (zero based). This is exactly
the NUMBER_OF_STATES + NUMBER_OF_REALS.


In /usr/include/omc/fmu_model_interface.c there is following
code (line 567)

       if (vrOutOfRange(comp, "fmiGetReal", vr[i], NUMBER_OF_REALS))
         return fmiError;

Which means that one can never access scalar variables with a
valueReference greater than NUMBER_OF_REALS. As I understand
both states and depending real values are threated as
scalar variables in fmu without distinction.


Timo










Reply via email to