Re: [Yade-dev] Python inheritance

2019-10-10 Thread William Chèvremont

Ok got it.

The problem come from the Global Interpreter Lock from Python. run() 
seems to run the code in an other thread as step() run the code in the 
same thread as python. So, when calling the function via step(), the 
lock is already acquired by the thread. On the other hand, run() is into 
a different thread, and the lock has to be acquired manually.


Using boost, I was expecting an exception instead of crash for this kind 
of error.


Functions should look like:

virtual Real contactForce(Real const& u) const {
    TRACE;
    gilLock lock; // Acquire GIL. (from pyutils/gil.hpp)
    LOG_TRACE("GIL State: " << PyGILState_Check());
    return get_override("contactForce")(u);
    }

I'll update the doc about subclassing c++ in python, as this is 
mandatory for all python code called from C++ while running O.run().

William.



On 08/10/2019 13:22, William Chèvremont wrote:


Hi,

Yes, there are the same behaviour with and without wait.

William


On 08/10/2019 12:57, Bruno Chareyre wrote:

Hi William,
I don't know precisely but in case it can help I would raise that the 
main difference between step() and run() is Py_BEGIN_ALLOW_THREADS, 
at least if O.run(...,wait=True).

Do you have the same problem with and without "wait"?

Simply passing to c++ a python expression (just a string with python 
commands) or a python function returning a value - instead of a 
derived class object - could be a simple workaround maybe.


Bruno








On Tue, 8 Oct 2019 at 10:56, William Chèvremont 
<mailto:william.chevrem...@univ-grenoble-alpes.fr>> wrote:


Hi,

@Janek

Yes, I'm aware of the doc about subclassing types in python.
There are
no problem about that, since it works when calling O.step()
instead of
O.run().

@Anton

The complete backtrace is attached to this mail. Functions of
interests
are around line 400.

Best Regards,

William


On 07/10/2019 18:19, Janek Kozicki (yade) wrote:
> Only a quick question to make sure - you have read
https://yade-dem.org/doc/prog.html#subclassing-c-types-in-python
in documentation?
>
>
> best regards
> Janek
>
> ___
> Mailing list: https://launchpad.net/~yade-dev
> Post to     : yade-dev@lists.launchpad.net
<mailto: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
<mailto: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
Lab. 3SR
BP 53
38041 Grenoble cedex 9
Tél : +33 4 56 52 86 21


Email too brief?
Here's why: email charter 
<https://marcuselliott.co.uk/wp-content/uploads/2017/04/emailCharter.jpg> 



___
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] Python inheritance

2019-10-08 Thread William Chèvremont

Hi,

Yes, there are the same behaviour with and without wait.

William


On 08/10/2019 12:57, Bruno Chareyre wrote:

Hi William,
I don't know precisely but in case it can help I would raise that the 
main difference between step() and run() is Py_BEGIN_ALLOW_THREADS, at 
least if O.run(...,wait=True).

Do you have the same problem with and without "wait"?

Simply passing to c++ a python expression (just a string with python 
commands) or a python function returning a value - instead of a 
derived class object - could be a simple workaround maybe.


Bruno








On Tue, 8 Oct 2019 at 10:56, William Chèvremont 
<mailto:william.chevrem...@univ-grenoble-alpes.fr>> wrote:


Hi,

@Janek

Yes, I'm aware of the doc about subclassing types in python. There
are
no problem about that, since it works when calling O.step()
instead of
O.run().

@Anton

The complete backtrace is attached to this mail. Functions of
interests
are around line 400.

Best Regards,

William


On 07/10/2019 18:19, Janek Kozicki (yade) wrote:
> Only a quick question to make sure - you have read
https://yade-dem.org/doc/prog.html#subclassing-c-types-in-python
in documentation?
>
>
> best regards
> Janek
>
> ___
> Mailing list: https://launchpad.net/~yade-dev
> Post to     : yade-dev@lists.launchpad.net
<mailto: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
<mailto: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
Lab. 3SR
BP 53
38041 Grenoble cedex 9
Tél : +33 4 56 52 86 21


Email too brief?
Here's why: email charter 
<https://marcuselliott.co.uk/wp-content/uploads/2017/04/emailCharter.jpg>
___
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] Python inheritance

2019-10-08 Thread William Chèvremont

Hi,

@Janek

Yes, I'm aware of the doc about subclassing types in python. There are 
no problem about that, since it works when calling O.step() instead of 
O.run().


@Anton

The complete backtrace is attached to this mail. Functions of interests 
are around line 400.


Best Regards,

William


On 07/10/2019 18:19, Janek Kozicki (yade) wrote:

Only a quick question to make sure - you have read 
https://yade-dem.org/doc/prog.html#subclassing-c-types-in-python in 
documentation?


best regards
Janek

___
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
william@LaptopUGA:/media/datas/These/Script/potential$ yade-mybuild -f6 
sedimentingSphere_withPotential.py
Welcome to Yade 2019-10-03.git-b45f39e 
Using python version: 3.6.8 (default, Aug 20 2019, 17:12:48) 
[GCC 8.3.0]
 _log.cpp:49 void setLevel(std::__cxx11::string, int): filter log level 
for Default has been set to 6
 Logging:187 void Logging::setNamedLogLevel(const string&, short int): 
setting "Default" log level to 6
 _log.cpp:49 void setLevel(std::__cxx11::string, int): filter log level 
for Default has been set to 6
TCP python prompt on localhost:9000, auth cookie `seacks'
XMLRPC info provider on http://localhost:21000
 OpenGLRenderer:66 void OpenGLRenderer::initgl(): (re)initializing GL 
for gldraw methods.

Running script sedimentingSphere_withPotential.py
/usr/lib/python3/dist-packages/matplotlib/__init__.py:831: 
MatplotlibDeprecationWarning: axes.color_cycle is deprecated and replaced with 
axes.prop_cycle; please use the latter.
  mplDeprecation)
/usr/lib/python3/dist-packages/matplotlib/__init__.py:801: 
MatplotlibDeprecationWarning: axes.color_cycle is deprecated and replaced with 
axes.prop_cycle; please use the latter.
  mplDeprecation)
[[ ^L clears screen, ^U kills line. F12 controller, F11 3D view (press "h" in 
3D view for help), F10 both, F9 generator, F8 plot. ]]

In [1]: O.step();
 InsertionSortCollider:227 virtual void InsertionSortCollider::action(): 
Resize bounds containers from 0 to 4, will std::sort.
 GenericPotential:836 virtual Real pyGenericPotential::potential(const 
Real&, const LubricationPhys&) const: Been here
 GenericPotential:848 virtual Real 
pyGenericPotential::contactForce(const Real&) const: Been here
 GenericPotential:853 virtual Real 
pyGenericPotential::potentialForce(const Real&) const: Been here
 GenericPotential:836 virtual Real pyGenericPotential::potential(const 
Real&, const LubricationPhys&) const: Been here
 GenericPotential:848 virtual Real 
pyGenericPotential::contactForce(const Real&) const: Been here
 GenericPotential:853 virtual Real 
pyGenericPotential::potentialForce(const Real&) const: Been here
 GenericPotential:836 virtual Real pyGenericPotential::potential(const 
Real&, const LubricationPhys&) const: Been here
 GenericPotential:848 virtual Real 
pyGenericPotential::contactForce(const Real&) const: Been here
 GenericPotential:853 virtual Real 
pyGenericPotential::potentialForce(const Real&) const: Been here
 GenericPotential:836 virtual Real pyGenericPotential::potential(const 
Real&, const LubricationPhys&) const: Been here
 GenericPotential:848 virtual Real 
pyGenericPotential::contactForce(const Real&) const: Been here
 GenericPotential:853 virtual Real 
pyGenericPotential::potentialForce(const Real&) const: Been here
 GenericPotential:836 virtual Real pyGenericPotential::potential(const 
Real&, const LubricationPhys&) const: Been here
 GenericPotential:848 virtual Real 
pyGenericPotential::contactForce(const Real&) const: Been here
 GenericPotential:853 virtual Real 
pyGenericPotential::potentialForce(const Real&) const: Been here
 GenericPotential:836 virtual Real pyGenericPotential::potential(const 
Real&, const LubricationPhys&) const: Been here
 GenericPotential:848 virtual Real 
pyGenericPotential::contactForce(const Real&) const: Been here
 GenericPotential:853 virtual Real 
pyGenericPotential::potentialForce(const Real&) const: Been here
 GenericPotential:836 virtual Real pyGenericPotential::potential(const 
Real&, const LubricationPhys&) const: Been here
 GenericPotential:848 virtual Real 
pyGenericPotential::contactForce(const Real&) const: Been here
 GenericPotential:853 virtual Real 
pyGenericPotential::potentialForce(const Real&) const: Been here
 GenericPotential:836 virtual Real pyGenericPotential::potential(const 
Real&, const LubricationPhys&) const: Been here
 GenericPotential:848 virtual Real 
pyGenericPotential::contactForce(const Real&) const: Been here
 GenericPotential:853 virtual Real 
pyGenericPotential::potentialForce(const Real&) const: Been here
 GenericPotential:836 virtual Real pyGenericPotential::potential(const 
Real&, const LubricationPhys&) const: Been here
 GenericPotential:848 virtual Real 
pyGenericPotential::contactForce(const Real&) const: Been here
 GenericPotential:853 

[Yade-dev] Python inheritance

2019-10-07 Thread William Chèvremont

Dear Yade dev,

I'm facing an issue implementing a new interaction law into Yade.

To be quick, I would like to provide normal force norm from python and 
integrate this value into the lubrication law.


The current state of my work is on branch 'potential' on gitlab. What's 
new in this branch:


- pkg/dem/LubricationWithPotential.{cpp, hpp} : Lubrication law with 
arbitraty contact law + potential solver, and some potential coded in 
c++. This part work perfectly.


- py/wrapper/yadeWrapper.cpp: I've written a wrapping class and 
boost.python exposing expressions. I want to inherit this class in 
python in order to provide the value to the solver above.


It works perfectly if I call O.step();. Problems are coming as soon as I 
launch O.run(), I got a segfault signal when the c++ code call the 
python overrided function.


What's wrong???

Summary of the code:

:::python:::

classSimplePotential(GenericPotential):
    def contactForce(self, u):
#    print("pyContactForce!");
    return 0;
    def potentialForce(self, u):
#    print("pyPotentialForce!");
    return 1;
    def hasContact(sefl, u):
    return False;

:::C++:::


class pyGenericPotential : public GenericPotential, public 
py::wrapper {

public:

    Real potential(Real const& u, LubricationPhys const&) const {
    TRACE;
    return contactForce(u) + potentialForce(u);
    }

    void applyPotential(Real const& u, LubricationPhys& phys, Vector3r 
const) {

    TRACE;
    phys.normalContactForce = contactForce(u)*n;
    phys.normalPotentialForce = potentialForce(u)*n;
    phys.contact = hasContact(u);
    }

    virtual Real contactForce(Real const& u) const {
    TRACE;
    return get_override("contactForce")(u);
    }

    virtual Real potentialForce(Real const& u) const {
    TRACE;
    return get_override("potentialForce")(u);
    }

    virtual bool hasContact(Real const& u) const {
    TRACE;
    return get_override("hasContact")(u);
    }
};


    py::class_("GenericPotential")
.def("contactForce",py::pure_virtual(::contactForce),"This 
function should return contact force norm.")
.def("potentialForce",py::pure_virtual(::potentialForce),"This 
function should return potential force norm.")
.def("hasContact",py::pure_virtual(::hasContact),"This 
function should return true if there are contact.");


--
<http://www.univ-grenoble-alpes.fr>


William Chèvremont

Doctorant, PhD student
04 56 52 01 86

Laboratoire de Rhéologie et Procédés
Bureau Bureau B-365
363 Rue de la chimie - bâtiment B
Domaine Universitaire - BP 53 - 38041 Grenoble cedex 9
www.univ-grenoble-alpes.fr <http://www.univ-grenoble-alpes.fr/>
http://www.laboratoire-rheologie-et-procedes.fr/

___
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] [Yade-users] [Question #665387]: Compile error JointedCohesiveFrictionalPM

2018-03-14 Thread William Chèvremont
6_64-linux-gnu/libcholmod.so
-- Found OpenBlas: /usr/lib/x86_64-linux-gnu/libopenblas.so
-- Found Metis: /usr/include
-- Found Cholmod in /usr/lib/x86_64-linux-gnu/libcholmod.so
-- Found OpenBlas in /usr/lib/x86_64-linux-gnu/libopenblas.so
-- Found Metis in /usr/lib/x86_64-linux-gnu/libmetis.so
-- Found GL2PS
LBMFLOW is still experimental, building and running LBM engine are at 
your own risk!

Yade will be installed to /media/datas/Yade/install
-- Suffix is set to -2018-03-14.git-45c88e0
-- LIBRARY_OUTPUT_PATH is set to lib/x86_64-linux-gnu
-- runtimePREFIX is set to /media/datas/Yade2/install
-- Found gts: /usr/lib/python2.7/dist-packages/gts
-- Use system gts version
-- Found minieigen: /usr/lib/python2.7/dist-packages/minieigen.so
-- Found Tkinter: /usr/lib/python2.7/lib-tk/Tkinter.pyc
-- VTK version >5 is found
-- ===
-- Yade configured with following features: Odeint VTK OpenMP GTS 
GUI-Qt5 CGAL PFVFLOW TWOPHASEFLOW LINSOLV GL2PS LBMFLOW
-- Disabled features: CHOLMOD_GPU SPH DEFORM LIQMIGRATION 
MASK_ARBITRARY PROFILING PotentialParticles PotentialBlocks

-- Debug build
-- ===
-- Configuring done
-- Generating done
-- Build files have been written to: /media/datas/Yade/build


William.


Le 14/03/2018 à 18:35, Robert Caulk a écrit :

Hello William,

There seems to be a deeper issue and the #include  is no more 
than a bandaid that helps us narrow down the possible causes. I have a 
feeling this might track back to CMakeLists.txt. Do you mind providing 
the output of your:


cmake -DCMAKE_INSTALL_PREFIX=../install ../trunk

command?

Cheers,

Robert

On Tue, Mar 13, 2018 at 2:06 AM, William Chèvremont 
<william.chevrem...@univ-grenoble-alpes.fr 
<mailto:william.chevrem...@univ-grenoble-alpes.fr>> wrote:


Thanks Robert, that solved my issue.


Le 12/03/2018 à 18:27, Robert Caulk a écrit :

Hey Will,

Looks like Thomas Chauve is encountering the same issue. I am
unable to recreate this problem so will one of you please try adding:

#include 

to JointedCohesiveFrictionalpm.hpp and then recompiling?

Thanks!

Robert


On Fri, Mar 9, 2018 at 10:51 AM, William Chèvremont
<william.chevrem...@univ-grenoble-alpes.fr
<mailto:william.chevrem...@univ-grenoble-alpes.fr>> wrote:

In fact, for the git rebase, I updade py computer and forget
to run this command again. Now fixed.

For the compile error, my linux and compiler are following:

>$ gcc --version
gcc (Ubuntu 7.2.0-8ubuntu3.2) 7.2.0

>$ lsb_release -a
LSB Version:

core-9.20160110ubuntu5-amd64:core-9.20160110ubuntu5-noarch:security-9.20160110ubuntu5-amd64:security-9.20160110ubuntu5-noarch
Distributor ID: Ubuntu
Description:    Ubuntu 17.10
Release:    17.10
Codename:   artful

I also get the same error on the cluster with this compiler:
gcc (Debian 5.4.1-3) 5.4.1 20161019

William.


Le 09/03/2018 à 18:42, Bruno Chareyre a écrit :

This being said I don't think the merge can be the cause of
William's compile error.
The question is why gcc can't find std::random_device.
Just weird.
B
/
/
On 03/09/2018 06:35 PM, Bruno Chareyre wrote:

Let us continue the discussion here on yade-dev, William is
member.
Merge commits are painful, as you suggest Robert it applies
the upstream changes on the local trunk then it commits the
merged code.
In the log it looks like reapplying the same changes, the
problem is if it's not reapplying exactly the same thing it
can go unnoticed.
This is known as "merge bubble" on the git forums.

It can be avoided manually or, more simply, by changing the
default behavior of git once for all (on a given machine):|
git config branch.autosetuprebase always|

Please always consider the above command before any commit
to yade trunk.

Cheers

Bruno



On 03/09/2018 06:08 PM, Robert Caulk wrote:

Question #665387 on Yade changed:
https://answers.launchpad.net/yade/+question/665387
<https://answers.launchpad.net/yade/+question/665387>

 Status: Open => Answered

Robert Caulk proposed the following answer:
Hello William,

Which linux distribution are you running? Which compiler are you using
(gcc --version)?

As Bruno mentions on yade-dev, your most recent build passes the
buildbot [1] - so it may be a local problem. (I think Bruno's message
[2] was not posted here as intended. He suggests you join yade-dev list
serv [3] and send compiler questions there).

Although it seems unlikely - is it possible thi

Re: [Yade-dev] [Yade-users] [Question #665387]: Compile error JointedCohesiveFrictionalPM

2018-03-13 Thread William Chèvremont

Thanks Robert, that solved my issue.


Le 12/03/2018 à 18:27, Robert Caulk a écrit :

Hey Will,

Looks like Thomas Chauve is encountering the same issue. I am unable 
to recreate this problem so will one of you please try adding:


#include 

to JointedCohesiveFrictionalpm.hpp and then recompiling?

Thanks!

Robert


On Fri, Mar 9, 2018 at 10:51 AM, William Chèvremont 
<william.chevrem...@univ-grenoble-alpes.fr 
<mailto:william.chevrem...@univ-grenoble-alpes.fr>> wrote:


In fact, for the git rebase, I updade py computer and forget to
run this command again. Now fixed.

For the compile error, my linux and compiler are following:

>$ gcc --version
gcc (Ubuntu 7.2.0-8ubuntu3.2) 7.2.0

>$ lsb_release -a
LSB Version:

core-9.20160110ubuntu5-amd64:core-9.20160110ubuntu5-noarch:security-9.20160110ubuntu5-amd64:security-9.20160110ubuntu5-noarch
Distributor ID: Ubuntu
Description:    Ubuntu 17.10
Release:    17.10
Codename:   artful

I also get the same error on the cluster with this compiler: gcc
(Debian 5.4.1-3) 5.4.1 20161019

William.


Le 09/03/2018 à 18:42, Bruno Chareyre a écrit :

This being said I don't think the merge can be the cause of
William's compile error.
The question is why gcc can't find std::random_device.
Just weird.
B
/
/
On 03/09/2018 06:35 PM, Bruno Chareyre wrote:

Let us continue the discussion here on yade-dev, William is member.
Merge commits are painful, as you suggest Robert it applies the
upstream changes on the local trunk then it commits the merged code.
In the log it looks like reapplying the same changes, the
problem is if it's not reapplying exactly the same thing it can
go unnoticed.
This is known as "merge bubble" on the git forums.

It can be avoided manually or, more simply, by changing the
default behavior of git once for all (on a given machine):|
git config branch.autosetuprebase always|

Please always consider the above command before any commit to
yade trunk.

Cheers

Bruno



On 03/09/2018 06:08 PM, Robert Caulk wrote:

Question #665387 on Yade changed:
https://answers.launchpad.net/yade/+question/665387
<https://answers.launchpad.net/yade/+question/665387>

 Status: Open => Answered

Robert Caulk proposed the following answer:
Hello William,

Which linux distribution are you running? Which compiler are you using
(gcc --version)?

As Bruno mentions on yade-dev, your most recent build passes the
buildbot [1] - so it may be a local problem. (I think Bruno's message
[2] was not posted here as intended. He suggests you join yade-dev list
serv [3] and send compiler questions there).

Although it seems unlikely - is it possible this has something to do
with this unusual merge of master with itself [4]? Is that a merge into
your local repository? Perhaps you are you working off a read-only
clone? Do you have duplicated commits on your local machine? I can't
quite figure out what is going on there, the "merge" seems to simply add
commits that are already committed to the repository.

Cheers,

Robert

[1]https://yade-dem.org/buildbot/builders/yade-full/builds/4507
<https://yade-dem.org/buildbot/builders/yade-full/builds/4507>
[2]https://lists.launchpad.net/yade-dev/msg13755.html
<https://lists.launchpad.net/yade-dev/msg13755.html>
[3]https://launchpad.net/~yade-dev <https://launchpad.net/%7Eyade-dev>

[4]https://github.com/yade/trunk/commit/921bb17079fea51385fe620526f9bc48c055918e

<https://github.com/yade/trunk/commit/921bb17079fea51385fe620526f9bc48c055918e>





___
Mailing list:https://launchpad.net/~yade-dev 
<https://launchpad.net/%7Eyade-dev>
Post to :yade-dev@lists.launchpad.net 
<mailto:yade-dev@lists.launchpad.net>
Unsubscribe :https://launchpad.net/~yade-dev 
<https://launchpad.net/%7Eyade-dev>
More help   :https://help.launchpad.net/ListHelp
<https://help.launchpad.net/ListHelp>




___
Mailing list:https://launchpad.net/~yade-dev 
<https://launchpad.net/%7Eyade-dev>
Post to :yade-dev@lists.launchpad.net 
<mailto:yade-dev@lists.launchpad.net>
Unsubscribe :https://launchpad.net/~yade-dev 
<https://launchpad.net/%7Eyade-dev>
More help   :https://help.launchpad.net/ListHelp
<https://help.launchpad.net/ListHelp>



___
Mailing list: https://launchpad.net/~yade-dev
<https://launchpad.net/%7Eyade-dev>
Post to     : yade-dev@lists.launchpad.net
<mailto:yade-dev@lists.launchpad.net>
Unsubscribe : https://launchpad.net/~yade-dev
   

Re: [Yade-dev] [Yade-users] [Question #665387]: Compile error JointedCohesiveFrictionalPM

2018-03-09 Thread William Chèvremont
In fact, for the git rebase, I updade py computer and forget to run this 
command again. Now fixed.


For the compile error, my linux and compiler are following:

>$ gcc --version
gcc (Ubuntu 7.2.0-8ubuntu3.2) 7.2.0

>$ lsb_release -a
LSB Version: 
core-9.20160110ubuntu5-amd64:core-9.20160110ubuntu5-noarch:security-9.20160110ubuntu5-amd64:security-9.20160110ubuntu5-noarch

Distributor ID: Ubuntu
Description:    Ubuntu 17.10
Release:    17.10
Codename:   artful

I also get the same error on the cluster with this compiler: gcc (Debian 
5.4.1-3) 5.4.1 20161019


William.


Le 09/03/2018 à 18:42, Bruno Chareyre a écrit :
This being said I don't think the merge can be the cause of William's 
compile error.

The question is why gcc can't find std::random_device.
Just weird.
B
/
/
On 03/09/2018 06:35 PM, Bruno Chareyre wrote:

Let us continue the discussion here on yade-dev, William is member.
Merge commits are painful, as you suggest Robert it applies the 
upstream changes on the local trunk then it commits the merged code.
In the log it looks like reapplying the same changes, the problem is 
if it's not reapplying exactly the same thing it can go unnoticed.

This is known as "merge bubble" on the git forums.

It can be avoided manually or, more simply, by changing the default 
behavior of git once for all (on a given machine):|

git config branch.autosetuprebase always|

Please always consider the above command before any commit to yade trunk.

Cheers

Bruno



On 03/09/2018 06:08 PM, Robert Caulk wrote:

Question #665387 on Yade changed:
https://answers.launchpad.net/yade/+question/665387

 Status: Open => Answered

Robert Caulk proposed the following answer:
Hello William,

Which linux distribution are you running? Which compiler are you using
(gcc --version)?

As Bruno mentions on yade-dev, your most recent build passes the
buildbot [1] - so it may be a local problem. (I think Bruno's message
[2] was not posted here as intended. He suggests you join yade-dev list
serv [3] and send compiler questions there).

Although it seems unlikely - is it possible this has something to do
with this unusual merge of master with itself [4]? Is that a merge into
your local repository? Perhaps you are you working off a read-only
clone? Do you have duplicated commits on your local machine? I can't
quite figure out what is going on there, the "merge" seems to simply add
commits that are already committed to the repository.

Cheers,

Robert

[1]https://yade-dem.org/buildbot/builders/yade-full/builds/4507
[2]https://lists.launchpad.net/yade-dev/msg13755.html
[3]https://launchpad.net/~yade-dev
[4]https://github.com/yade/trunk/commit/921bb17079fea51385fe620526f9bc48c055918e





___
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


[Yade-dev] [Bug 1685735] Re: Exception KeyError

2017-05-05 Thread William Chèvremont
Nota: O.stop() doesn't exist. I use instead O.stopAtIter = O.iter+1;

-- 
You received this bug notification because you are a member of Yade
developers, which is subscribed to Yade.
https://bugs.launchpad.net/bugs/1685735

Title:
  Exception KeyError

Status in Yade:
  Won't Fix

Bug description:
  I run parametric studies using yade-batch.

  I have a stop-condition that I check regularly. If the stop-condition
  is reach, I exit the script using sys.exit(0); (see attached script).

  The script exit well but when I look at the log, I have:

  Exception KeyError: KeyError(140414846273280,) in  ignored

  Yade version: yade-2017-03-30.git-5528a5c
  Available features: ['Odeint', 'VTK', 'OpenMP','GTS', 'CGAL', 'PFVFLOW', 
'LINSOLV', 'GL2PS', 'LBMFLOW']

  Full output:
  TCP python prompt on localhost:9013, auth cookie `**'
  Welcome to Yade 2017-03-30.git-5528a5c 
  XMLRPC info provider on http://localhost:21013
  Running script scriptV4c.py
  /usr/lib/python2.7/dist-packages/matplotlib/artist.py:221: 
MatplotlibDeprecationWarning: This has been deprecated in mpl 1.5, please use 
the
  axes property.  A removal date has not been set.
warnings.warn(_get_axes_msg, mplDeprecation, stacklevel=1)
  Nombre de spheres:  4189
  glue
  reverse
  reverse
  reverse
  reverse
  reverse
  reverse
  reverse
  reverse
  reverse
  reverse
  reverse
  reverse
  reverse
  reverse
  reverse
  reverse
  reverse
  reverse
  reverse
  reverse
  reverse
  reverse
  reverse
  reverse
  reverse
  reverse
  reverse
  reverse
  reverse
  reverse
  reverse
  done
  Exception KeyError: KeyError(140414846273280,) in  ignored

  === JOB SUMMARY 
  id  : OMP_NUM_THREADS=1,shearVel=0.01,volfrac=0.52,frictDegree=50
  status  : 0 (OK)
  duration: 23:30:54
  command : YADE_BATCH=2017_04_12_friction.table:19 DISPLAY=  
/data/yade/install/bin/yade-2017-03-30.git-5528a5c --threads=1 --nice=10 -x 
scriptV4c.py> 
2017_04_05_frictcoef/scriptV4c.py.OMP_NUM_THREADS=1,shearVel=0.01,volfrac=0.52,frictDegree=50.log
 2>&1
  started : Thu Apr 13 11:45:03 2017
  finished: Fri Apr 14 11:15:57 2017

To manage notifications about this bug go to:
https://bugs.launchpad.net/yade/+bug/1685735/+subscriptions

___
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


[Yade-dev] [Bug 1685735] Re: Exception KeyError

2017-04-28 Thread William Chèvremont
Yes, I get the expected result from the batch, as the exception appear
after I've called "exit()". I'll try to change the way I stop the
computation.

William.

-- 
You received this bug notification because you are a member of Yade
developers, which is subscribed to Yade.
https://bugs.launchpad.net/bugs/1685735

Title:
  Exception KeyError

Status in Yade:
  New

Bug description:
  I run parametric studies using yade-batch.

  I have a stop-condition that I check regularly. If the stop-condition
  is reach, I exit the script using sys.exit(0); (see attached script).

  The script exit well but when I look at the log, I have:

  Exception KeyError: KeyError(140414846273280,) in  ignored

  Yade version: yade-2017-03-30.git-5528a5c
  Available features: ['Odeint', 'VTK', 'OpenMP','GTS', 'CGAL', 'PFVFLOW', 
'LINSOLV', 'GL2PS', 'LBMFLOW']

  Full output:
  TCP python prompt on localhost:9013, auth cookie `**'
  Welcome to Yade 2017-03-30.git-5528a5c 
  XMLRPC info provider on http://localhost:21013
  Running script scriptV4c.py
  /usr/lib/python2.7/dist-packages/matplotlib/artist.py:221: 
MatplotlibDeprecationWarning: This has been deprecated in mpl 1.5, please use 
the
  axes property.  A removal date has not been set.
warnings.warn(_get_axes_msg, mplDeprecation, stacklevel=1)
  Nombre de spheres:  4189
  glue
  reverse
  reverse
  reverse
  reverse
  reverse
  reverse
  reverse
  reverse
  reverse
  reverse
  reverse
  reverse
  reverse
  reverse
  reverse
  reverse
  reverse
  reverse
  reverse
  reverse
  reverse
  reverse
  reverse
  reverse
  reverse
  reverse
  reverse
  reverse
  reverse
  reverse
  reverse
  done
  Exception KeyError: KeyError(140414846273280,) in  ignored

  === JOB SUMMARY 
  id  : OMP_NUM_THREADS=1,shearVel=0.01,volfrac=0.52,frictDegree=50
  status  : 0 (OK)
  duration: 23:30:54
  command : YADE_BATCH=2017_04_12_friction.table:19 DISPLAY=  
/data/yade/install/bin/yade-2017-03-30.git-5528a5c --threads=1 --nice=10 -x 
scriptV4c.py> 
2017_04_05_frictcoef/scriptV4c.py.OMP_NUM_THREADS=1,shearVel=0.01,volfrac=0.52,frictDegree=50.log
 2>&1
  started : Thu Apr 13 11:45:03 2017
  finished: Fri Apr 14 11:15:57 2017

To manage notifications about this bug go to:
https://bugs.launchpad.net/yade/+bug/1685735/+subscriptions

___
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


[Yade-dev] [Bug 1685735] [NEW] Exception KeyError

2017-04-24 Thread William Chèvremont
Public bug reported:

I run parametric studies using yade-batch.

I have a stop-condition that I check regularly. If the stop-condition is
reach, I exit the script using sys.exit(0); (see attached script).

The script exit well but when I look at the log, I have:

Exception KeyError: KeyError(140414846273280,) in  ignored

Yade version: yade-2017-03-30.git-5528a5c
Available features: ['Odeint', 'VTK', 'OpenMP','GTS', 'CGAL', 'PFVFLOW', 
'LINSOLV', 'GL2PS', 'LBMFLOW']

Full output:
TCP python prompt on localhost:9013, auth cookie `**'
Welcome to Yade 2017-03-30.git-5528a5c 
XMLRPC info provider on http://localhost:21013
Running script scriptV4c.py
/usr/lib/python2.7/dist-packages/matplotlib/artist.py:221: 
MatplotlibDeprecationWarning: This has been deprecated in mpl 1.5, please use 
the
axes property.  A removal date has not been set.
  warnings.warn(_get_axes_msg, mplDeprecation, stacklevel=1)
Nombre de spheres:  4189
glue
reverse
reverse
reverse
reverse
reverse
reverse
reverse
reverse
reverse
reverse
reverse
reverse
reverse
reverse
reverse
reverse
reverse
reverse
reverse
reverse
reverse
reverse
reverse
reverse
reverse
reverse
reverse
reverse
reverse
reverse
reverse
done
Exception KeyError: KeyError(140414846273280,) in  ignored

=== JOB SUMMARY 
id  : OMP_NUM_THREADS=1,shearVel=0.01,volfrac=0.52,frictDegree=50
status  : 0 (OK)
duration: 23:30:54
command : YADE_BATCH=2017_04_12_friction.table:19 DISPLAY=  
/data/yade/install/bin/yade-2017-03-30.git-5528a5c --threads=1 --nice=10 -x 
scriptV4c.py> 
2017_04_05_frictcoef/scriptV4c.py.OMP_NUM_THREADS=1,shearVel=0.01,volfrac=0.52,frictDegree=50.log
 2>&1
started : Thu Apr 13 11:45:03 2017
finished: Fri Apr 14 11:15:57 2017

** Affects: yade
 Importance: Undecided
 Status: New

** Attachment added: "scriptV4c.py"
   
https://bugs.launchpad.net/bugs/1685735/+attachment/4867198/+files/scriptV4c.py

-- 
You received this bug notification because you are a member of Yade
developers, which is subscribed to Yade.
https://bugs.launchpad.net/bugs/1685735

Title:
  Exception KeyError

Status in Yade:
  New

Bug description:
  I run parametric studies using yade-batch.

  I have a stop-condition that I check regularly. If the stop-condition
  is reach, I exit the script using sys.exit(0); (see attached script).

  The script exit well but when I look at the log, I have:

  Exception KeyError: KeyError(140414846273280,) in  ignored

  Yade version: yade-2017-03-30.git-5528a5c
  Available features: ['Odeint', 'VTK', 'OpenMP','GTS', 'CGAL', 'PFVFLOW', 
'LINSOLV', 'GL2PS', 'LBMFLOW']

  Full output:
  TCP python prompt on localhost:9013, auth cookie `**'
  Welcome to Yade 2017-03-30.git-5528a5c 
  XMLRPC info provider on http://localhost:21013
  Running script scriptV4c.py
  /usr/lib/python2.7/dist-packages/matplotlib/artist.py:221: 
MatplotlibDeprecationWarning: This has been deprecated in mpl 1.5, please use 
the
  axes property.  A removal date has not been set.
warnings.warn(_get_axes_msg, mplDeprecation, stacklevel=1)
  Nombre de spheres:  4189
  glue
  reverse
  reverse
  reverse
  reverse
  reverse
  reverse
  reverse
  reverse
  reverse
  reverse
  reverse
  reverse
  reverse
  reverse
  reverse
  reverse
  reverse
  reverse
  reverse
  reverse
  reverse
  reverse
  reverse
  reverse
  reverse
  reverse
  reverse
  reverse
  reverse
  reverse
  reverse
  done
  Exception KeyError: KeyError(140414846273280,) in  ignored

  === JOB SUMMARY 
  id  : OMP_NUM_THREADS=1,shearVel=0.01,volfrac=0.52,frictDegree=50
  status  : 0 (OK)
  duration: 23:30:54
  command : YADE_BATCH=2017_04_12_friction.table:19 DISPLAY=  
/data/yade/install/bin/yade-2017-03-30.git-5528a5c --threads=1 --nice=10 -x 
scriptV4c.py> 
2017_04_05_frictcoef/scriptV4c.py.OMP_NUM_THREADS=1,shearVel=0.01,volfrac=0.52,frictDegree=50.log
 2>&1
  started : Thu Apr 13 11:45:03 2017
  finished: Fri Apr 14 11:15:57 2017

To manage notifications about this bug go to:
https://bugs.launchpad.net/yade/+bug/1685735/+subscriptions

___
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