Re: [Yade-dev] Strange behaviour of function unbalancedForce

2011-10-17 Thread Bruno Chareyre
Yes, I'm happy. ;)

B.

On 17/10/11 08:51, Klaus Thoeni wrote:
> Hi Bruno,
>
> I derived my WireMat from NormShearPhys and indeed it is working fine now. I 
> think for now it's the best solution. Let me know if you are happy with this 
> solution.
> If in the future we have more cases with normal forces only it might be 
> better 
> to introduce the boolean you mentioned. But we would have to check it in 
> several lines inthe code.
>
> Regarding the results I got previously. All results where wrong, although 
> they 
> where the same if I used one threat. Well, in debug mode the simulation was 
> not running because of the assert.
>
> Thanks,
> Klaus
>
> On Wed, 12 Oct 2011 12:06:39 AM Bruno Chareyre wrote:
>> Yes, deriving from NormShear would do the "trick". It is suboptimal in
>> terms of memory usage but the impact will be small.
>> There could be other ways, like passing an optional bool "hasShear" to
>> the unbalancedForce function, but it would solve only one specific
>> problem and if normShearPhys is used everywhere you will indeed hit the
>> same problem again with other functions.
>>
>> Something I still don't get is why it works _sometimes_, and why your
>> interactions don't simply give a crash on the typecasting:
>> shared_ptr nsi=YADE_PTR_CAST(I->phys);
>>
>> Any idea?
>>
>> Bruno
>>
>> p.s. Please, don't send mails to me+yade-dev (it makes duplicates in my
>> mbox and it disables the reply-to-list feature of thunderbird), yade-dev
>> alone will be enough.
>>
>> On 11/10/11 09:50, Klaus Thoeni wrote:
>>> Hi Bruno,
>>>
>>> I just had a look at the code and NormShearPhys is used in many other
>>> places as well. This means that it is always assumend that there is a
>>> normal and a shear force. So probably I should derive WirePhys from
>>> NormSherPhys and set ks and Fs equal to zero.
>>>
>>> What do you think?
>>>
>>> Klaus
>>>
>>> On Mon, 10 Oct 2011 11:51:40 PM Bruno Chareyre wrote:
 Hi,

 If you can get 0 after pausing, then it's a good starting point for
 debugging. In release build, you may try and check if there are forces
 on the bodies.
 In debug build (does it give 0 too?) you could set a breakpoint at
 Shop.cpp:162 and see what happens line by line, surely the best way.

 Bruno

 On 10/10/11 14:16, Klaus Thoeni wrote:
> Hi,
>
> yes, if you pause the simulation unbalancedForce() is still exactly 0.
>
> Regarding the results for displacements:
> - if I run the same file with -j1 I will get exactly the same
> deformation, however the the unbalancedForce is not exactly the same
> - if I compare the displacements of a case where I used
> multi-threading the displacements are exactly the same for a certain
> amount of iterations then the slightly differ (even if unbalancedForce
> is 0 from beginning)
>
> I am still trying to find out what's going on. Any hints are welcome!
>
> Thanks,
> Klaus
>
>
>
> On Fri, Oct 7, 2011 at 9:35 PM, Bruno Chareyre
>
> mailto:bruno.chare...@hmg.inpg.fr>> wrote:
> I can't imagine any explanation yet. It is strange.
> I wonder if the unbalanced force will also be exactly 0 if you
> pause the
> simulation and type unbalancedForce() in the terminal.
> Are you sure that the results in terms of positions and deformation
> of the net are always the same? else it could mean that there is
> another problem that the unbalanced force is only reflecting.
> 
> Bruno
> 
> On 07/10/11 07:08, Klaus Thoeni wrote:
> > Hi guys,
> > 
> > yes, you have to try it several times in order to reproduce the
> 
> strange
> 
> > behaviour.
> > 
> > However, I found out a bit more. Actually it might be a problem
> 
> with multi-
> 
> > threading. Maybe someone can try to reproduce the behaviour. The
> 
> following
> 
> > link provides a slightly modified version my script and a bash
> 
> script which
> 
> > allows for several executions for -j1 and -j2 (before running the
> 
> script make
> 
> > sure it is executable 'chmod +x runscript'). In addition I
> 
> included as well my
> 
> > results.
> > 
> > http://bit.ly/rtN0w3
> > 
> > Something very strange is that my desktop has the same problem
> 
> even with -j1
> 
> > (eaven cpu usage is more than 100% and I have no idea why)
> 
> whereas my notebook
> 
> > gives the right results in that case (cpu usage is max 100%) just
> 
> have a look
> 
> > at the graphs. It would be good to find out if this problem
> 
> effects just me or
> 
> 

Re: [Yade-dev] Strange behaviour of function unbalancedForce

2011-10-16 Thread Klaus Thoeni
Hi Bruno,

I derived my WireMat from NormShearPhys and indeed it is working fine now. I 
think for now it's the best solution. Let me know if you are happy with this 
solution.
If in the future we have more cases with normal forces only it might be better 
to introduce the boolean you mentioned. But we would have to check it in 
several lines inthe code.

Regarding the results I got previously. All results where wrong, although they 
where the same if I used one threat. Well, in debug mode the simulation was 
not running because of the assert.

Thanks,
Klaus

On Wed, 12 Oct 2011 12:06:39 AM Bruno Chareyre wrote:
> Yes, deriving from NormShear would do the "trick". It is suboptimal in
> terms of memory usage but the impact will be small.
> There could be other ways, like passing an optional bool "hasShear" to
> the unbalancedForce function, but it would solve only one specific
> problem and if normShearPhys is used everywhere you will indeed hit the
> same problem again with other functions.
> 
> Something I still don't get is why it works _sometimes_, and why your
> interactions don't simply give a crash on the typecasting:
> shared_ptr nsi=YADE_PTR_CAST(I->phys);
> 
> Any idea?
> 
> Bruno
> 
> p.s. Please, don't send mails to me+yade-dev (it makes duplicates in my
> mbox and it disables the reply-to-list feature of thunderbird), yade-dev
> alone will be enough.
> 
> On 11/10/11 09:50, Klaus Thoeni wrote:
> > Hi Bruno,
> > 
> > I just had a look at the code and NormShearPhys is used in many other
> > places as well. This means that it is always assumend that there is a
> > normal and a shear force. So probably I should derive WirePhys from
> > NormSherPhys and set ks and Fs equal to zero.
> > 
> > What do you think?
> > 
> > Klaus
> > 
> > On Mon, 10 Oct 2011 11:51:40 PM Bruno Chareyre wrote:
> >> Hi,
> >> 
> >> If you can get 0 after pausing, then it's a good starting point for
> >> debugging. In release build, you may try and check if there are forces
> >> on the bodies.
> >> In debug build (does it give 0 too?) you could set a breakpoint at
> >> Shop.cpp:162 and see what happens line by line, surely the best way.
> >> 
> >> Bruno
> >> 
> >> On 10/10/11 14:16, Klaus Thoeni wrote:
> >>> Hi,
> >>> 
> >>> yes, if you pause the simulation unbalancedForce() is still exactly 0.
> >>> 
> >>> Regarding the results for displacements:
> >>> - if I run the same file with -j1 I will get exactly the same
> >>> deformation, however the the unbalancedForce is not exactly the same
> >>> - if I compare the displacements of a case where I used
> >>> multi-threading the displacements are exactly the same for a certain
> >>> amount of iterations then the slightly differ (even if unbalancedForce
> >>> is 0 from beginning)
> >>> 
> >>> I am still trying to find out what's going on. Any hints are welcome!
> >>> 
> >>> Thanks,
> >>> Klaus
> >>> 
> >>> 
> >>> 
> >>> On Fri, Oct 7, 2011 at 9:35 PM, Bruno Chareyre
> >>> 
> >>> mailto:bruno.chare...@hmg.inpg.fr>> wrote:
> >>> I can't imagine any explanation yet. It is strange.
> >>> I wonder if the unbalanced force will also be exactly 0 if you
> >>> pause the
> >>> simulation and type unbalancedForce() in the terminal.
> >>> Are you sure that the results in terms of positions and deformation
> >>> of the net are always the same? else it could mean that there is
> >>> another problem that the unbalanced force is only reflecting.
> >>> 
> >>> Bruno
> >>> 
> >>> On 07/10/11 07:08, Klaus Thoeni wrote:
> >>> > Hi guys,
> >>> > 
> >>> > yes, you have to try it several times in order to reproduce the
> >>> 
> >>> strange
> >>> 
> >>> > behaviour.
> >>> > 
> >>> > However, I found out a bit more. Actually it might be a problem
> >>> 
> >>> with multi-
> >>> 
> >>> > threading. Maybe someone can try to reproduce the behaviour. The
> >>> 
> >>> following
> >>> 
> >>> > link provides a slightly modified version my script and a bash
> >>> 
> >>> script which
> >>> 
> >>> > allows for several executions for -j1 and -j2 (before running the
> >>> 
> >>> script make
> >>> 
> >>> > sure it is executable 'chmod +x runscript'). In addition I
> >>> 
> >>> included as well my
> >>> 
> >>> > results.
> >>> > 
> >>> > http://bit.ly/rtN0w3
> >>> > 
> >>> > Something very strange is that my desktop has the same problem
> >>> 
> >>> even with -j1
> >>> 
> >>> > (eaven cpu usage is more than 100% and I have no idea why)
> >>> 
> >>> whereas my notebook
> >>> 
> >>> > gives the right results in that case (cpu usage is max 100%) just
> >>> 
> >>> have a look
> >>> 
> >>> > at the graphs. It would be good to find out if this problem
> >>> 
> >>> effects just me or
> >>> 
> >>> > if it is a general problem in YADE. Any hints are welcome and I
> >>> 
> >>> really
> >>>

Re: [Yade-dev] Strange behaviour of function unbalancedForce

2011-10-11 Thread Bruno Chareyre
Yes, deriving from NormShear would do the "trick". It is suboptimal in
terms of memory usage but the impact will be small.
There could be other ways, like passing an optional bool "hasShear" to
the unbalancedForce function, but it would solve only one specific
problem and if normShearPhys is used everywhere you will indeed hit the
same problem again with other functions.

Something I still don't get is why it works _sometimes_, and why your
interactions don't simply give a crash on the typecasting:
shared_ptr nsi=YADE_PTR_CAST(I->phys);

Any idea?

Bruno

p.s. Please, don't send mails to me+yade-dev (it makes duplicates in my
mbox and it disables the reply-to-list feature of thunderbird), yade-dev
alone will be enough.


On 11/10/11 09:50, Klaus Thoeni wrote:
> Hi Bruno,
>
> I just had a look at the code and NormShearPhys is used in many other places 
> as well. This means that it is always assumend that there is a normal and a 
> shear force. So probably I should derive WirePhys from NormSherPhys and set 
> ks 
> and Fs equal to zero.
>
> What do you think?
>
> Klaus
>
> On Mon, 10 Oct 2011 11:51:40 PM Bruno Chareyre wrote:
>> Hi,
>>
>> If you can get 0 after pausing, then it's a good starting point for
>> debugging. In release build, you may try and check if there are forces
>> on the bodies.
>> In debug build (does it give 0 too?) you could set a breakpoint at
>> Shop.cpp:162 and see what happens line by line, surely the best way.
>>
>> Bruno
>>
>> On 10/10/11 14:16, Klaus Thoeni wrote:
>>> Hi,
>>>
>>> yes, if you pause the simulation unbalancedForce() is still exactly 0.
>>>
>>> Regarding the results for displacements:
>>> - if I run the same file with -j1 I will get exactly the same
>>> deformation, however the the unbalancedForce is not exactly the same
>>> - if I compare the displacements of a case where I used
>>> multi-threading the displacements are exactly the same for a certain
>>> amount of iterations then the slightly differ (even if unbalancedForce
>>> is 0 from beginning)
>>>
>>> I am still trying to find out what's going on. Any hints are welcome!
>>>
>>> Thanks,
>>> Klaus
>>>
>>>
>>>
>>> On Fri, Oct 7, 2011 at 9:35 PM, Bruno Chareyre
>>>
>>> mailto:bruno.chare...@hmg.inpg.fr>> wrote:
>>> I can't imagine any explanation yet. It is strange.
>>> I wonder if the unbalanced force will also be exactly 0 if you
>>> pause the
>>> simulation and type unbalancedForce() in the terminal.
>>> Are you sure that the results in terms of positions and deformation
>>> of the net are always the same? else it could mean that there is
>>> another problem that the unbalanced force is only reflecting.
>>> 
>>> Bruno
>>> 
>>> On 07/10/11 07:08, Klaus Thoeni wrote:
>>> > Hi guys,
>>> > 
>>> > yes, you have to try it several times in order to reproduce the
>>> 
>>> strange
>>> 
>>> > behaviour.
>>> > 
>>> > However, I found out a bit more. Actually it might be a problem
>>> 
>>> with multi-
>>> 
>>> > threading. Maybe someone can try to reproduce the behaviour. The
>>> 
>>> following
>>> 
>>> > link provides a slightly modified version my script and a bash
>>> 
>>> script which
>>> 
>>> > allows for several executions for -j1 and -j2 (before running the
>>> 
>>> script make
>>> 
>>> > sure it is executable 'chmod +x runscript'). In addition I
>>> 
>>> included as well my
>>> 
>>> > results.
>>> > 
>>> > http://bit.ly/rtN0w3
>>> > 
>>> > Something very strange is that my desktop has the same problem
>>> 
>>> even with -j1
>>> 
>>> > (eaven cpu usage is more than 100% and I have no idea why)
>>> 
>>> whereas my notebook
>>> 
>>> > gives the right results in that case (cpu usage is max 100%) just
>>> 
>>> have a look
>>> 
>>> > at the graphs. It would be good to find out if this problem
>>> 
>>> effects just me or
>>> 
>>> > if it is a general problem in YADE. Any hints are welcome and I
>>> 
>>> really
>>> 
>>> > appreciate your help!
>>> > 
>>> > Thanks
>>> > 
>>> > Klaus
>>> > 
>>> > On Thu, 6 Oct 2011 07:58:24 PM Bruno Chareyre wrote:
>>> >> I tried the script and didn't find the problem. It needs more runs
>>> >> maybe. But first, could you explain how you use the function (in a
>>> >> periodic engine/ live typing/a command in the script)? It would
>>> >> help understanding what happens.
>>> >> 
>>> >> Bruno
>>> >> 
>>> >> On 06/10/11 07:53, Klaus Thoeni wrote:
>>> >>> Hi Anton,
>>> >>> 
>>> >>> I tired it already (I know this issue), still the same
>>> 
>>> behaviour. And now
>>> 
>>> >>> actually I got zero for Bruno's branch as well. Very strange :-(
>>> >>> Not sure what the problem is. Would be great if someone could
>>> 
>>> try if
>>> 
>>> >>> he/she g

Re: [Yade-dev] Strange behaviour of function unbalancedForce

2011-10-11 Thread Klaus Thoeni
Hi Bruno,

I just had a look at the code and NormShearPhys is used in many other places 
as well. This means that it is always assumend that there is a normal and a 
shear force. So probably I should derive WirePhys from NormSherPhys and set ks 
and Fs equal to zero.

What do you think?

Klaus

On Mon, 10 Oct 2011 11:51:40 PM Bruno Chareyre wrote:
> Hi,
> 
> If you can get 0 after pausing, then it's a good starting point for
> debugging. In release build, you may try and check if there are forces
> on the bodies.
> In debug build (does it give 0 too?) you could set a breakpoint at
> Shop.cpp:162 and see what happens line by line, surely the best way.
> 
> Bruno
> 
> On 10/10/11 14:16, Klaus Thoeni wrote:
> > Hi,
> > 
> > yes, if you pause the simulation unbalancedForce() is still exactly 0.
> > 
> > Regarding the results for displacements:
> > - if I run the same file with -j1 I will get exactly the same
> > deformation, however the the unbalancedForce is not exactly the same
> > - if I compare the displacements of a case where I used
> > multi-threading the displacements are exactly the same for a certain
> > amount of iterations then the slightly differ (even if unbalancedForce
> > is 0 from beginning)
> > 
> > I am still trying to find out what's going on. Any hints are welcome!
> > 
> > Thanks,
> > Klaus
> > 
> > 
> > 
> > On Fri, Oct 7, 2011 at 9:35 PM, Bruno Chareyre
> > 
> > mailto:bruno.chare...@hmg.inpg.fr>> wrote:
> > I can't imagine any explanation yet. It is strange.
> > I wonder if the unbalanced force will also be exactly 0 if you
> > pause the
> > simulation and type unbalancedForce() in the terminal.
> > Are you sure that the results in terms of positions and deformation
> > of the net are always the same? else it could mean that there is
> > another problem that the unbalanced force is only reflecting.
> > 
> > Bruno
> > 
> > On 07/10/11 07:08, Klaus Thoeni wrote:
> > > Hi guys,
> > > 
> > > yes, you have to try it several times in order to reproduce the
> > 
> > strange
> > 
> > > behaviour.
> > > 
> > > However, I found out a bit more. Actually it might be a problem
> > 
> > with multi-
> > 
> > > threading. Maybe someone can try to reproduce the behaviour. The
> > 
> > following
> > 
> > > link provides a slightly modified version my script and a bash
> > 
> > script which
> > 
> > > allows for several executions for -j1 and -j2 (before running the
> > 
> > script make
> > 
> > > sure it is executable 'chmod +x runscript'). In addition I
> > 
> > included as well my
> > 
> > > results.
> > > 
> > > http://bit.ly/rtN0w3
> > > 
> > > Something very strange is that my desktop has the same problem
> > 
> > even with -j1
> > 
> > > (eaven cpu usage is more than 100% and I have no idea why)
> > 
> > whereas my notebook
> > 
> > > gives the right results in that case (cpu usage is max 100%) just
> > 
> > have a look
> > 
> > > at the graphs. It would be good to find out if this problem
> > 
> > effects just me or
> > 
> > > if it is a general problem in YADE. Any hints are welcome and I
> > 
> > really
> > 
> > > appreciate your help!
> > > 
> > > Thanks
> > > 
> > > Klaus
> > > 
> > > On Thu, 6 Oct 2011 07:58:24 PM Bruno Chareyre wrote:
> > >> I tried the script and didn't find the problem. It needs more runs
> > >> maybe. But first, could you explain how you use the function (in a
> > >> periodic engine/ live typing/a command in the script)? It would
> > >> help understanding what happens.
> > >> 
> > >> Bruno
> > >> 
> > >> On 06/10/11 07:53, Klaus Thoeni wrote:
> > >>> Hi Anton,
> > >>> 
> > >>> I tired it already (I know this issue), still the same
> > 
> > behaviour. And now
> > 
> > >>> actually I got zero for Bruno's branch as well. Very strange :-(
> > >>> Not sure what the problem is. Would be great if someone could
> > 
> > try if
> > 
> > >>> he/she gets the same behaviour.
> > >>> 
> > >>> Thanks,
> > >>> Klaus
> > >>> 
> > >>> On Thu, 6 Oct 2011 04:30:53 PM Anton Gladky wrote:
> >  Hi Klaus,
> >  try to start your script with -j1 option.
> >  There are sometimes some issues with "numerical" error in
> > 
> > multi-thread
> > 
> >  mode.
> >  
> >  Anton
> >  
> >  On Thu, Oct 6, 2011 at 6:40 AM, Klaus Thoeni
> > 
> > mailto:klaus.tho...@gmail.com>>
> > 
> > > wrote:
> > > Hi guys,
> > > 
> > > I just wanted to use the function unbalancedForce in one of
> > 
> > my scripts.
> > 
> > > And look what is happening: running the same simulation
> > 
> > several times
> > 

Re: [Yade-dev] Strange behaviour of function unbalancedForce

2011-10-10 Thread Klaus Thoeni
Hi Bruno,

I think I finally found something. The unbalancedForce is calculated by summing 
the noremal and shear forces stored in NormShearPhys. My WireMatPM has just 
normal forces so I used NormPhys. Strange that I can get some values.

I fixed it locally by using NormPhys and the noremal force only. Of course, 
this is not what we want in general.

Any idea how we can fix this problem permanently? I could derive the WirePhys 
from NormShearPhys but it wouldn't be a nice solution. I ccould as well put an 
if statement in unalancedForce, something like:

if I->phys == WirePhys
  only normal force
else
  normal and shear force

Any other idea?

Thanks,
Klaus 


On Mon, 10 Oct 2011 11:51:40 PM Bruno Chareyre wrote:
> Hi,
> 
> If you can get 0 after pausing, then it's a good starting point for
> debugging. In release build, you may try and check if there are forces
> on the bodies.
> In debug build (does it give 0 too?) you could set a breakpoint at
> Shop.cpp:162 and see what happens line by line, surely the best way.
> 
> Bruno
> 
> On 10/10/11 14:16, Klaus Thoeni wrote:
> > Hi,
> > 
> > yes, if you pause the simulation unbalancedForce() is still exactly 0.
> > 
> > Regarding the results for displacements:
> > - if I run the same file with -j1 I will get exactly the same
> > deformation, however the the unbalancedForce is not exactly the same
> > - if I compare the displacements of a case where I used
> > multi-threading the displacements are exactly the same for a certain
> > amount of iterations then the slightly differ (even if unbalancedForce
> > is 0 from beginning)
> > 
> > I am still trying to find out what's going on. Any hints are welcome!
> > 
> > Thanks,
> > Klaus
> > 
> > 
> > 
> > On Fri, Oct 7, 2011 at 9:35 PM, Bruno Chareyre
> > 
> > mailto:bruno.chare...@hmg.inpg.fr>> wrote:
> > I can't imagine any explanation yet. It is strange.
> > I wonder if the unbalanced force will also be exactly 0 if you
> > pause the
> > simulation and type unbalancedForce() in the terminal.
> > Are you sure that the results in terms of positions and deformation
> > of the net are always the same? else it could mean that there is
> > another problem that the unbalanced force is only reflecting.
> > 
> > Bruno
> > 
> > On 07/10/11 07:08, Klaus Thoeni wrote:
> > > Hi guys,
> > > 
> > > yes, you have to try it several times in order to reproduce the
> > 
> > strange
> > 
> > > behaviour.
> > > 
> > > However, I found out a bit more. Actually it might be a problem
> > 
> > with multi-
> > 
> > > threading. Maybe someone can try to reproduce the behaviour. The
> > 
> > following
> > 
> > > link provides a slightly modified version my script and a bash
> > 
> > script which
> > 
> > > allows for several executions for -j1 and -j2 (before running the
> > 
> > script make
> > 
> > > sure it is executable 'chmod +x runscript'). In addition I
> > 
> > included as well my
> > 
> > > results.
> > > 
> > > http://bit.ly/rtN0w3
> > > 
> > > Something very strange is that my desktop has the same problem
> > 
> > even with -j1
> > 
> > > (eaven cpu usage is more than 100% and I have no idea why)
> > 
> > whereas my notebook
> > 
> > > gives the right results in that case (cpu usage is max 100%) just
> > 
> > have a look
> > 
> > > at the graphs. It would be good to find out if this problem
> > 
> > effects just me or
> > 
> > > if it is a general problem in YADE. Any hints are welcome and I
> > 
> > really
> > 
> > > appreciate your help!
> > > 
> > > Thanks
> > > 
> > > Klaus
> > > 
> > > On Thu, 6 Oct 2011 07:58:24 PM Bruno Chareyre wrote:
> > >> I tried the script and didn't find the problem. It needs more runs
> > >> maybe. But first, could you explain how you use the function (in a
> > >> periodic engine/ live typing/a command in the script)? It would
> > >> help understanding what happens.
> > >> 
> > >> Bruno
> > >> 
> > >> On 06/10/11 07:53, Klaus Thoeni wrote:
> > >>> Hi Anton,
> > >>> 
> > >>> I tired it already (I know this issue), still the same
> > 
> > behaviour. And now
> > 
> > >>> actually I got zero for Bruno's branch as well. Very strange :-(
> > >>> Not sure what the problem is. Would be great if someone could
> > 
> > try if
> > 
> > >>> he/she gets the same behaviour.
> > >>> 
> > >>> Thanks,
> > >>> Klaus
> > >>> 
> > >>> On Thu, 6 Oct 2011 04:30:53 PM Anton Gladky wrote:
> >  Hi Klaus,
> >  try to start your script with -j1 option.
> >  There are sometimes some issues with "numerical" error in
> > 
> > multi-thread
> > 
> >  mode.
> >  
> >  Anton
> >  
> >  

Re: [Yade-dev] Strange behaviour of function unbalancedForce

2011-10-10 Thread Bruno Chareyre
Hi,

If you can get 0 after pausing, then it's a good starting point for
debugging. In release build, you may try and check if there are forces
on the bodies.
In debug build (does it give 0 too?) you could set a breakpoint at
Shop.cpp:162 and see what happens line by line, surely the best way.

Bruno

On 10/10/11 14:16, Klaus Thoeni wrote:
> Hi,
>
> yes, if you pause the simulation unbalancedForce() is still exactly 0.
>
> Regarding the results for displacements:
> - if I run the same file with -j1 I will get exactly the same
> deformation, however the the unbalancedForce is not exactly the same
> - if I compare the displacements of a case where I used
> multi-threading the displacements are exactly the same for a certain
> amount of iterations then the slightly differ (even if unbalancedForce
> is 0 from beginning)
>
> I am still trying to find out what's going on. Any hints are welcome!
>
> Thanks,
> Klaus
>
>
>
> On Fri, Oct 7, 2011 at 9:35 PM, Bruno Chareyre
> mailto:bruno.chare...@hmg.inpg.fr>> wrote:
>
> I can't imagine any explanation yet. It is strange.
> I wonder if the unbalanced force will also be exactly 0 if you
> pause the
> simulation and type unbalancedForce() in the terminal.
> Are you sure that the results in terms of positions and deformation of
> the net are always the same? else it could mean that there is another
> problem that the unbalanced force is only reflecting.
>
> Bruno
>
>
> On 07/10/11 07:08, Klaus Thoeni wrote:
> > Hi guys,
> >
> > yes, you have to try it several times in order to reproduce the
> strange
> > behaviour.
> >
> > However, I found out a bit more. Actually it might be a problem
> with multi-
> > threading. Maybe someone can try to reproduce the behaviour. The
> following
> > link provides a slightly modified version my script and a bash
> script which
> > allows for several executions for -j1 and -j2 (before running the
> script make
> > sure it is executable 'chmod +x runscript'). In addition I
> included as well my
> > results.
> >
> > http://bit.ly/rtN0w3
> >
> > Something very strange is that my desktop has the same problem
> even with -j1
> > (eaven cpu usage is more than 100% and I have no idea why)
> whereas my notebook
> > gives the right results in that case (cpu usage is max 100%) just
> have a look
> > at the graphs. It would be good to find out if this problem
> effects just me or
> > if it is a general problem in YADE. Any hints are welcome and I
> really
> > appreciate your help!
> >
> > Thanks
> >
> > Klaus
> >
> > On Thu, 6 Oct 2011 07:58:24 PM Bruno Chareyre wrote:
> >> I tried the script and didn't find the problem. It needs more runs
> >> maybe. But first, could you explain how you use the function (in a
> >> periodic engine/ live typing/a command in the script)? It would help
> >> understanding what happens.
> >>
> >> Bruno
> >>
> >> On 06/10/11 07:53, Klaus Thoeni wrote:
> >>> Hi Anton,
> >>>
> >>> I tired it already (I know this issue), still the same
> behaviour. And now
> >>> actually I got zero for Bruno's branch as well. Very strange :-(
> >>> Not sure what the problem is. Would be great if someone could
> try if
> >>> he/she gets the same behaviour.
> >>>
> >>> Thanks,
> >>> Klaus
> >>>
> >>> On Thu, 6 Oct 2011 04:30:53 PM Anton Gladky wrote:
>  Hi Klaus,
>  try to start your script with -j1 option.
>  There are sometimes some issues with "numerical" error in
> multi-thread
>  mode.
> 
>  Anton
> 
>  On Thu, Oct 6, 2011 at 6:40 AM, Klaus Thoeni
> mailto:klaus.tho...@gmail.com>>
> > wrote:
> > Hi guys,
> >
> > I just wanted to use the function unbalancedForce in one of
> my scripts.
> > And look what is happening: running the same simulation
> several times
> > after each other gives different results for the
> unbalancedForce. Well
> > either some values which seem all right or just zero. The
> script I used
> > is:
> > examples/WireMatPM/wirecontacttest.py
> >
> > Even using different computers and different versions of yade
> gives
> > this problem. However, it doesn't happen all the time. It
> seems like
> > you have to try several times to get the wrog value (which is
> zero)
> > for unbalancedForce and if I use Bruno's collide2 branch it
> seems to
> > work all the time.
> >
> > So I don't know if it is a problem with my script or a
> problem of the
> > current trunk version. Can anyone reproduce this problem?
> >
> > Thanks
> > Klaus
> >
> > ___

Re: [Yade-dev] Strange behaviour of function unbalancedForce

2011-10-10 Thread Klaus Thoeni
Hi,

yes, if you pause the simulation unbalancedForce() is still exactly 0.

Regarding the results for displacements:
- if I run the same file with -j1 I will get exactly the same deformation,
however the the unbalancedForce is not exactly the same
- if I compare the displacements of a case where I used multi-threading the
displacements are exactly the same for a certain amount of iterations then
the slightly differ (even if unbalancedForce is 0 from beginning)

I am still trying to find out what's going on. Any hints are welcome!

Thanks,
Klaus



On Fri, Oct 7, 2011 at 9:35 PM, Bruno Chareyre
wrote:

> I can't imagine any explanation yet. It is strange.
> I wonder if the unbalanced force will also be exactly 0 if you pause the
> simulation and type unbalancedForce() in the terminal.
> Are you sure that the results in terms of positions and deformation of
> the net are always the same? else it could mean that there is another
> problem that the unbalanced force is only reflecting.
>
> Bruno
>
>
> On 07/10/11 07:08, Klaus Thoeni wrote:
> > Hi guys,
> >
> > yes, you have to try it several times in order to reproduce the strange
> > behaviour.
> >
> > However, I found out a bit more. Actually it might be a problem with
> multi-
> > threading. Maybe someone can try to reproduce the behaviour. The
> following
> > link provides a slightly modified version my script and a bash script
> which
> > allows for several executions for -j1 and -j2 (before running the script
> make
> > sure it is executable 'chmod +x runscript'). In addition I included as
> well my
> > results.
> >
> > http://bit.ly/rtN0w3
> >
> > Something very strange is that my desktop has the same problem even with
> -j1
> > (eaven cpu usage is more than 100% and I have no idea why) whereas my
> notebook
> > gives the right results in that case (cpu usage is max 100%) just have a
> look
> > at the graphs. It would be good to find out if this problem effects just
> me or
> > if it is a general problem in YADE. Any hints are welcome and I really
> > appreciate your help!
> >
> > Thanks
> >
> > Klaus
> >
> > On Thu, 6 Oct 2011 07:58:24 PM Bruno Chareyre wrote:
> >> I tried the script and didn't find the problem. It needs more runs
> >> maybe. But first, could you explain how you use the function (in a
> >> periodic engine/ live typing/a command in the script)? It would help
> >> understanding what happens.
> >>
> >> Bruno
> >>
> >> On 06/10/11 07:53, Klaus Thoeni wrote:
> >>> Hi Anton,
> >>>
> >>> I tired it already (I know this issue), still the same behaviour. And
> now
> >>> actually I got zero for Bruno's branch as well. Very strange :-(
> >>> Not sure what the problem is. Would be great if someone could try if
> >>> he/she gets the same behaviour.
> >>>
> >>> Thanks,
> >>> Klaus
> >>>
> >>> On Thu, 6 Oct 2011 04:30:53 PM Anton Gladky wrote:
>  Hi Klaus,
>  try to start your script with -j1 option.
>  There are sometimes some issues with "numerical" error in multi-thread
>  mode.
> 
>  Anton
> 
>  On Thu, Oct 6, 2011 at 6:40 AM, Klaus Thoeni 
> > wrote:
> > Hi guys,
> >
> > I just wanted to use the function unbalancedForce in one of my
> scripts.
> > And look what is happening: running the same simulation several times
> > after each other gives different results for the unbalancedForce.
> Well
> > either some values which seem all right or just zero. The script I
> used
> > is:
> > examples/WireMatPM/wirecontacttest.py
> >
> > Even using different computers and different versions of yade gives
> > this problem. However, it doesn't happen all the time. It seems like
> > you have to try several times to get the wrog value (which is zero)
> > for unbalancedForce and if I use Bruno's collide2 branch it seems to
> > work all the time.
> >
> > So I don't know if it is a problem with my script or a problem of the
> > current trunk version. Can anyone reproduce this problem?
> >
> > Thanks
> > Klaus
> >
> > ___
> > Mailing list: https://launchpad.net/~yade-dev
> > Post to : yade-dev@lists.launchpad.net
> > Unsubscribe : https://launchpad.net/~yade-dev
> > More help   : https://help.launchpad.net/ListHelp
>  ___
>  Mailing list: https://launchpad.net/~yade-dev
>  Post to : yade-dev@lists.launchpad.net
>  Unsubscribe : https://launchpad.net/~yade-dev
>  More help   : https://help.launchpad.net/ListHelp
> >>> ___
> >>> Mailing list: https://launchpad.net/~yade-dev
> >>> Post to : yade-dev@lists.launchpad.net
> >>> Unsubscribe : https://launchpad.net/~yade-dev
> >>> More help   : https://help.launchpad.net/ListHelp
>
>
> --
> ___
> Bruno Chareyre
> Associate Professor
> ENSE³ - Grenoble INP
> 11, rue des Mathématiques
> BP 46
> 38402 St Martin d'Hères, 

Re: [Yade-dev] Strange behaviour of function unbalancedForce

2011-10-06 Thread Bruno Chareyre
I tried the script and didn't find the problem. It needs more runs
maybe. But first, could you explain how you use the function (in a
periodic engine/ live typing/a command in the script)? It would help
understanding what happens.

Bruno


On 06/10/11 07:53, Klaus Thoeni wrote:
> Hi Anton,
>
> I tired it already (I know this issue), still the same behaviour. And now 
> actually I got zero for Bruno's branch as well. Very strange :-(
> Not sure what the problem is. Would be great if someone could try if he/she 
> gets the same behaviour.
>
> Thanks,
> Klaus
>
> On Thu, 6 Oct 2011 04:30:53 PM Anton Gladky wrote:
>> Hi Klaus,
>> try to start your script with -j1 option.
>> There are sometimes some issues with "numerical" error in multi-thread
>> mode.
>>
>> Anton
>>
>> On Thu, Oct 6, 2011 at 6:40 AM, Klaus Thoeni  wrote:
>>> Hi guys,
>>>
>>> I just wanted to use the function unbalancedForce in one of my scripts.
>>> And look what is happening: running the same simulation several times
>>> after each other gives different results for the unbalancedForce. Well
>>> either some values which seem all right or just zero. The script I used
>>> is:
>>> examples/WireMatPM/wirecontacttest.py
>>>
>>> Even using different computers and different versions of yade gives this
>>> problem. However, it doesn't happen all the time. It seems like you have
>>> to try several times to get the wrog value (which is zero) for
>>> unbalancedForce and if I use Bruno's collide2 branch it seems to work
>>> all the time.
>>>
>>> So I don't know if it is a problem with my script or a problem of the
>>> current trunk version. Can anyone reproduce this problem?
>>>
>>> Thanks
>>> Klaus
>>>
>>> ___
>>> Mailing list: https://launchpad.net/~yade-dev
>>> Post to : yade-dev@lists.launchpad.net
>>> Unsubscribe : https://launchpad.net/~yade-dev
>>> More help   : https://help.launchpad.net/ListHelp
>> ___
>> Mailing list: https://launchpad.net/~yade-dev
>> Post to : yade-dev@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~yade-dev
>> More help   : https://help.launchpad.net/ListHelp
> ___
> Mailing list: https://launchpad.net/~yade-dev
> Post to : yade-dev@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~yade-dev
> More help   : https://help.launchpad.net/ListHelp
>


-- 
___
Bruno Chareyre
Associate Professor
ENSE³ - Grenoble INP
11, rue des Mathématiques
BP 46
38402 St Martin d'Hères, France
Tél : +33 4 56 52 86 21
Fax : +33 4 76 82 70 43



___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-dev] Strange behaviour of function unbalancedForce

2011-10-05 Thread Klaus Thoeni
Hi Anton,

I tired it already (I know this issue), still the same behaviour. And now 
actually I got zero for Bruno's branch as well. Very strange :-(
Not sure what the problem is. Would be great if someone could try if he/she 
gets the same behaviour.

Thanks,
Klaus

On Thu, 6 Oct 2011 04:30:53 PM Anton Gladky wrote:
> Hi Klaus,
> try to start your script with -j1 option.
> There are sometimes some issues with "numerical" error in multi-thread
> mode.
> 
> Anton
> 
> On Thu, Oct 6, 2011 at 6:40 AM, Klaus Thoeni  wrote:
> > Hi guys,
> > 
> > I just wanted to use the function unbalancedForce in one of my scripts.
> > And look what is happening: running the same simulation several times
> > after each other gives different results for the unbalancedForce. Well
> > either some values which seem all right or just zero. The script I used
> > is:
> > examples/WireMatPM/wirecontacttest.py
> > 
> > Even using different computers and different versions of yade gives this
> > problem. However, it doesn't happen all the time. It seems like you have
> > to try several times to get the wrog value (which is zero) for
> > unbalancedForce and if I use Bruno's collide2 branch it seems to work
> > all the time.
> > 
> > So I don't know if it is a problem with my script or a problem of the
> > current trunk version. Can anyone reproduce this problem?
> > 
> > Thanks
> > Klaus
> > 
> > ___
> > Mailing list: https://launchpad.net/~yade-dev
> > Post to : yade-dev@lists.launchpad.net
> > Unsubscribe : https://launchpad.net/~yade-dev
> > More help   : https://help.launchpad.net/ListHelp
> 
> ___
> Mailing list: https://launchpad.net/~yade-dev
> Post to : yade-dev@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~yade-dev
> More help   : https://help.launchpad.net/ListHelp

___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-dev] Strange behaviour of function unbalancedForce

2011-10-05 Thread Anton Gladky
Hi Klaus,
try to start your script with -j1 option.
There are sometimes some issues with "numerical" error in multi-thread mode.

Anton




On Thu, Oct 6, 2011 at 6:40 AM, Klaus Thoeni  wrote:
> Hi guys,
>
> I just wanted to use the function unbalancedForce in one of my scripts. And
> look what is happening: running the same simulation several times after each
> other gives different results for the unbalancedForce. Well either some values
> which seem all right or just zero. The script I used is:
> examples/WireMatPM/wirecontacttest.py
>
> Even using different computers and different versions of yade gives this
> problem. However, it doesn't happen all the time. It seems like you have to
> try several times to get the wrog value (which is zero) for unbalancedForce
> and if I use Bruno's collide2 branch it seems to work all the time.
>
> So I don't know if it is a problem with my script or a problem of the current
> trunk version. Can anyone reproduce this problem?
>
> Thanks
> Klaus
>
> ___
> Mailing list: https://launchpad.net/~yade-dev
> Post to     : yade-dev@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~yade-dev
> More help   : https://help.launchpad.net/ListHelp
>

___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp