certi-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [certi-dev] Size of Constants


From: Eric Noulard
Subject: Re: [certi-dev] Size of Constants
Date: Mon, 21 Apr 2008 15:45:12 +0200

2008/4/21, Christian Stenzel <address@hidden>:
> Hello,
>
>  we want to use CERTI for a project in our research group.
>
>  One federate computes in each sim-loop a grid of 300x300 double values
> (->270000 bytes)
>  and sends this to another federate.

Do you send this as a SINGLE value?
or do you send UAV with a 9 000 000 attribute
whose value is a single double value?

>
>  This worked with pRTI and DMSO RTI.
>
>  CERTI uses preprocessor defines to limit the size of certain values in
> include/certi.hh
>  (https://savannah.nongnu.org/bugs/?21399,
> https://savannah.nongnu.org/bugs/?21423)
>
>  So, I manually changed the constant MAX_BYTES_PER_VALUE to the required
> value (270000) and  recompiler CERTI.

As far as I remember the MAX_BYTES_PER_VALUE is the limit
for a single attribute value.

You may have to change the value of
MAX_ATTRIBUTES_PER_CLASS (see in certi.hh) from 50 up to the
needed size.

>  This leads to a segmentation violation when starting any federate.

Like I said we may allocate an array whose size is:

MAX_BYTES_PER_VALUE*MAX_ATTRIBUTES_PER_CLASS

so may be 270000*50 is too much?
or you need to resize not only MAX_BYTES_PER_VALUE
but MAX_ATTRIBUTES_PER_CLASS too.

>
>  Furhter on, I changed BUFFER_SIZE_DEFAULT to 270000+36.

this should be sized to the maximum UAV size in your case
the preceding value should be something like:

36 (header size) + 270000 + EXTRA_SPACE

EXTRA_SPACE depending on the fact that UAV transport values
AND metadata.

>
>  The same error occurs.
>
>  Is there an upper limit for these values?

Upper limit should be the memory you have.

>
>  I've seen that the files
>  SocketTCP.hh, SocketUDP.hh and SocketUN.hh contain also different
> preprocessor
>  constants.
>
>  E.g. in SocketUN.hh a constant called SOCKUN_BUFFER_LENGTH is defined. The
> value
>  is 4096. The above comment says that the buffer size have to be as long as
> any data
>  ever received by the socket.
>
>  Have these constants something to do with that behaviour?

Don't really know.

I may promise you that as soon as I manage to end my "heterogeneous"
handling work for CERTI you won't have anymore constant on
the "NetworkMessage" side :=)

Moreover I firmly convinced that we should get rid of most
of the other constant.

Patches are welcomed :=)
[may be more welcomed after the heterogeneous merge-in]

-- 
Erk




reply via email to

[Prev in Thread] Current Thread [Next in Thread]