From: Bruno on
Greetings,

I'm solving an optimization problem in real time recurring to xPc target. As I increase the number of optimization variables, every once in a while I get the error "CPU OVERLOAD" in the target computer.

My first thoughts went to the possibility that the CPU did not have enough time to solve the optimization problem for the selected sample time. To my surprise, given that I'm using a sampling time of 0.01sec, upon checking the plot generated by "plot(tg.tetlog)", it was possible to see that the maximum task execution time was 1.5*10^-5 sec. For what I understand this means that time was not an issue, because the highest TET was smaller than the sample time of 0.01sec. What could be the problem then?

I'm using Matlab version 7.1.0.246(R14) Service Pack 3. The target computer is running xPC target version 2.8.

Thank you for your attention,
Bruno
From: Gordon Weast on
Bruno,

Your 10 millisecond time step sure looks slow enough to avoid
most causes of a CPU Overload. From what you've said so far,
I can't determine what might be happening.

That release is quite old. We've made quite a few improvements
since that release.

Overloads that are as unlikely as this one can occur with some
target machines. Do you have another machine you can try to
use as a target to see if it fails on different hardware?

Since I don't know anything about your machine I'm stuck.
Depending on the type of CPU, there can be things in the BIOS
that can cause unexpected overloads.

You should call tech support to push further on this.

Gordon Weast
xPC Target Development
The MathWorks

Bruno wrote:
> Greetings,
>
> I'm solving an optimization problem in real time recurring to xPc
> target. As I increase the number of optimization variables, every once
> in a while I get the error "CPU OVERLOAD" in the target computer.
> My first thoughts went to the possibility that the CPU did not have
> enough time to solve the optimization problem for the selected sample
> time. To my surprise, given that I'm using a sampling time of 0.01sec,
> upon checking the plot generated by "plot(tg.tetlog)", it was possible
> to see that the maximum task execution time was 1.5*10^-5 sec. For what
> I understand this means that time was not an issue, because the highest
> TET was smaller than the sample time of 0.01sec. What could be the
> problem then?
>
> I'm using Matlab version 7.1.0.246(R14) Service Pack 3. The target
> computer is running xPC target version 2.8.
> Thank you for your attention,
> Bruno
From: Bruno on
Gordon Weast <gweast(a)mathworks.com> wrote in message <hl1bnr$gt$1(a)fred.mathworks.com>...
> Bruno,
>
> Your 10 millisecond time step sure looks slow enough to avoid
> most causes of a CPU Overload. From what you've said so far,
> I can't determine what might be happening.
>
> That release is quite old. We've made quite a few improvements
> since that release.
>
> Overloads that are as unlikely as this one can occur with some
> target machines. Do you have another machine you can try to
> use as a target to see if it fails on different hardware?
>
> Since I don't know anything about your machine I'm stuck.
> Depending on the type of CPU, there can be things in the BIOS
> that can cause unexpected overloads.
>
> You should call tech support to push further on this.
>
> Gordon Weast
> xPC Target Development
> The MathWorks
>
> Bruno wrote:
> > Greetings,
> >
> > I'm solving an optimization problem in real time recurring to xPc
> > target. As I increase the number of optimization variables, every once
> > in a while I get the error "CPU OVERLOAD" in the target computer.
> > My first thoughts went to the possibility that the CPU did not have
> > enough time to solve the optimization problem for the selected sample
> > time. To my surprise, given that I'm using a sampling time of 0.01sec,
> > upon checking the plot generated by "plot(tg.tetlog)", it was possible
> > to see that the maximum task execution time was 1.5*10^-5 sec. For what
> > I understand this means that time was not an issue, because the highest
> > TET was smaller than the sample time of 0.01sec. What could be the
> > problem then?
> >
> > I'm using Matlab version 7.1.0.246(R14) Service Pack 3. The target
> > computer is running xPC target version 2.8.
> > Thank you for your attention,
> > Bruno

Thanks for your quick reply. Unfortunately all the computers I have available are exactly like the one I'm using or are not that good, CPU-wise. In what concerns the possibility your suggesting, about the bios causing sometimes overload, wouldn't that be represented by a large value of TET as well?

I would like to have your opinion on one idea I'm considering right now. The simulation I'm running uses a lot of memory given the huge number of variables. Currently I allocate some space in the Heap to save all my big variables, because in the past this caused the same problem as now, "CPU OVERLOAD".

Do you think that the current problem might be caused by lack of memory just as the old one? If so, and since I'm already allocating space in the heap, does this mean I used up all available memory?

Thank you for your help,
Bruno