Re: [Yade-users] [Question #699714]: Python problems in Yade 2021.01a

2021-12-20 Thread Jan Stránský
Question #699714 on Yade changed:
https://answers.launchpad.net/yade/+question/699714

Jan Stránský posted a new comment:
> the ConcretePM.cpp file for Yade 2021 is quit different from
ConcretePM.cpp file for YADE 2018

I used
git diff -w origin/2018.02:pkg/dem/ConcretePM.cpp 
origin/2021.01:pkg/dem/ConcretePM.cpp
to compare the versions. -w option ii ignoring all whitespaces

Most of the changes are formatting changes, not influencing the resulting code.
Concerning the error, the std::isnan was changed to math::isnan. I have no idea 
if it could be a problem or not.

Maybe it would be worth to check the results between 2018 and 2021 on a
simple simulations.

In this case, maybe it might be wort staying with the older version
(accepting all the nagatives it has).

Cheers
Jan

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

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


Re: [Yade-users] [Question #699714]: Python problems in Yade 2021.01a

2021-12-20 Thread Jan Stránský
Question #699714 on Yade changed:
https://answers.launchpad.net/yade/+question/699714

Status: Needs information => Answered

Jan Stránský proposed the following answer:
I have installed 2021.01a (although on Ubuntu 18.04)

> about running scripts i should say that for me there is not change and
in all cases the error exists.

to be sure, could you please post here the exact script you are using?
For me, this script
###
b=[1,2,3];c=[b,b,b,]
for kk in c:
a=[x/max(kk) for x in kk]
###
works without any error. Run as
yade-2021.01a script.py
It gives the error you reported if used in "fresh| Yade console started as 
"yade-2021.01a".

(interestingly) If I run any (even empty) script first, then also using
just the console gives no error.

> I tried to present a MWE.

yes, for the "console error" the code you provided was a perfect MWE,
thanks

> but what it might help is that the ConcretePM.cpp file for Yade 2021
is quit different from ConcretePM.cpp file for YADE 2018 as i compare
them. as you suggested previously, by decrease of time step the
simulation can continue more steps but again it interrupted with the
same error (Aborted (core dumped)).

this probably is a different issue than python 2 / 3 (although there might be 
situations leading to differences, like if there is integer division in python 
2 or python 3). Impossible to tell without a MWE, or at least the script used, 
if not minimal :-)
So probably you should open a new question concerning the CPM part of your 
problem.

Cheers
Jan

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

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


Re: [Yade-users] [Question #699714]: Python problems in Yade 2021.01a

2021-12-19 Thread mohsen
Question #699714 on Yade changed:
https://answers.launchpad.net/yade/+question/699714

mohsen posted a new comment:
Hi Jan

My script is long and hard to make a MWE! but what it might help is that the 
ConcretePM.cpp file for Yade 2021 is quit different from ConcretePM.cpp file 
for YADE 2018 as i compare them. as you suggested previously, by decrease of 
time step the simulation can continue more steps but again it interrupted with 
the same error (Aborted (core dumped)).
I tried to present a MWE.
Regards

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

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


Re: [Yade-users] [Question #699714]: Python problems in Yade 2021.01a

2021-12-15 Thread Jan Stránský
Question #699714 on Yade changed:
https://answers.launchpad.net/yade/+question/699714

Status: Open => Needs information

Jan Stránský requested more information:
> an script

please provide a link or the script

> :219: RuntimeWarning: ...

this is just a warning

> python3.8: /builds/yade-
dev/trunk/deb/yadedaily/pkg/dem/ConcretePM.cpp:447: virtual bool
yade::Law2_ScGeom_CpmPhys_Cpm::go(boost::shared_ptr&,
boost::shared_ptr&, yade::Interaction*): Assertion
`!math::isnan(sigmaT[1])' failed.

this is an error, but without the script it is impossible to tell what is the 
problem..
Or, the problem is that sigmaT if CPMPhys is NaN, but it ismpossible to tell 
why (without the script).

Cheers
Jan

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

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


Re: [Yade-users] [Question #699714]: Python problems in Yade 2021.01a

2021-12-15 Thread mohsen
Question #699714 on Yade changed:
https://answers.launchpad.net/yade/+question/699714

Status: Answered => Open

mohsen is still having a problem:
Ye Jan
This is an error for an script using cpm material for bonded agglomerates. this 
script work properly in Yade 2018. do you have any idea?
###
Welcome to Yade 20211203-6160~581d3d8~focal1 
Using python version: 3.8.10 (default, Sep 28 2021, 16:10:42) 
[GCC 9.3.0]
TCP python prompt on localhost:9000, auth cookie `cukdse'
XMLRPC info provider on http://localhost:21000
Running script TRRepSandCalRealDimConsDtNewShTandSTireCalStepCAlmMod2To3.py
:219: RuntimeWarning: to-Python converter for 
Eigen::Matrix already registered; second conversion 
method ignored.
:219: RuntimeWarning: to-Python converter for 
Eigen::Matrix already registered; second conversion 
method ignored.
:219: RuntimeWarning: to-Python converter for 
Eigen::Matrix already registered; second conversion method 
ignored.
:219: RuntimeWarning: to-Python converter for 
Eigen::Matrix already registered; second conversion 
method ignored.
:219: RuntimeWarning: to-Python converter for 
Eigen::Matrix already registered; second conversion method 
ignored.
:219: RuntimeWarning: to-Python converter for 
Eigen::Matrix already registered; second conversion 
method ignored.
:219: RuntimeWarning: to-Python converter for 
Eigen::Matrix already registered; second conversion method 
ignored.
:219: RuntimeWarning: to-Python converter for 
Eigen::Matrix already registered; second conversion 
method ignored.
:219: RuntimeWarning: to-Python converter for 
Eigen::Matrix already registered; second conversion 
method ignored.
:219: RuntimeWarning: to-Python converter for 
Eigen::Matrix already registered; second conversion 
method ignored.
:219: RuntimeWarning: to-Python converter for 
Eigen::Matrix, 2, 1, 0, 2, 1> already registered; second 
conversion method ignored.
:219: RuntimeWarning: to-Python converter for 
Eigen::Matrix, 3, 1, 0, 3, 1> already registered; second 
conversion method ignored.
:219: RuntimeWarning: to-Python converter for 
Eigen::Matrix, 6, 1, 0, 6, 1> already registered; second 
conversion method ignored.
:219: RuntimeWarning: to-Python converter for 
Eigen::Matrix, -1, 1, 0, -1, 1> already registered; second 
conversion method ignored.
:219: RuntimeWarning: to-Python converter for 
Eigen::Matrix, 3, 3, 0, 3, 3> already registered; second 
conversion method ignored.
:219: RuntimeWarning: to-Python converter for 
Eigen::Matrix, 6, 6, 0, 6, 6> already registered; second 
conversion method ignored.
:219: RuntimeWarning: to-Python converter for 
Eigen::Matrix, -1, -1, 0, -1, -1> already registered; 
second conversion method ignored.
:219: RuntimeWarning: to-Python converter for 
Eigen::Quaternion already registered; second conversion method 
ignored.
:219: RuntimeWarning: to-Python converter for 
Eigen::AlignedBox already registered; second conversion method 
ignored.
:219: RuntimeWarning: to-Python converter for 
Eigen::AlignedBox already registered; second conversion method 
ignored.
python3.8: /builds/yade-dev/trunk/deb/yadedaily/pkg/dem/ConcretePM.cpp:447: 
virtual bool yade::Law2_ScGeom_CpmPhys_Cpm::go(boost::shared_ptr&, 
boost::shared_ptr&, yade::Interaction*): Assertion 
`!math::isnan(sigmaT[1])' failed.
Aborted (core dumped)


-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

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


Re: [Yade-users] [Question #699714]: Python problems in Yade 2021.01a

2021-12-06 Thread Jan Stránský
Question #699714 on Yade changed:
https://answers.launchpad.net/yade/+question/699714

Jan Stránský requested more information:
> i have some scripts ... but showing error in 2021

What are the script?
What are the errors?

Cheers
Jan

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

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


Re: [Yade-users] [Question #699714]: Python problems in Yade 2021.01a

2021-12-05 Thread Anton Gladky
Question #699714 on Yade changed:
https://answers.launchpad.net/yade/+question/699714

Anton Gladky proposed the following answer:
Please file a bug here [1] with a minimal working example, so we will
have a change to fix it before the next release.

[1] https://gitlab.com/yade-dev/trunk/-/issues

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

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


Re: [Yade-users] [Question #699714]: Python problems in Yade 2021.01a

2021-12-05 Thread Anton Gladky
Question #699714 on Yade changed:
https://answers.launchpad.net/yade/+question/699714

Status: Open => Answered

Anton Gladky proposed the following answer:
Definitely update your scripts to 3rd python version and switch to a
newer Yade. We are not supporting older Yade version, so there is no
chance to fix an error in those versions, if they are detected.

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

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


Re: [Yade-users] [Question #699714]: Python problems in Yade 2021.01a

2021-12-05 Thread mohsen
Question #699714 on Yade changed:
https://answers.launchpad.net/yade/+question/699714

Status: Answered => Open

mohsen is still having a problem:
Thanks Jan

about running scripts i should say that for me there is not change and
in all cases the error exists.

I think the problems are more than just converting the scripts using
2to3. i have some scripts that are working in 2018b YADE version but
showing error in 2021. At this time i do not know whether stick to 2021
or come back 2018?

Regards

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

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


Re: [Yade-users] [Question #699714]: Python problems in Yade 2021.01a

2021-12-02 Thread Jan Stránský
Question #699714 on Yade changed:
https://answers.launchpad.net/yade/+question/699714

Status: Open => Answered

Jan Stránský proposed the following answer:
It is a known issue that Yade terminal has some problems with scopes,
maybe this is related to that.

If you put the code in a script and run the script, it should works OK
(works OK in my yadedaily).

Cheers
Jan

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

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


Re: [Yade-users] [Question #699714]: Python problems in Yade 2021.01a

2021-12-02 Thread Jan Stránský
Question #699714 on Yade changed:
https://answers.launchpad.net/yade/+question/699714

Jan Stránský posted a new comment:
Nice catch.
I confirming the issue with yadedaily, too.
Cheers
Jan

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

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


[Yade-users] [Question #699714]: Python problems in Yade 2021.01a

2021-12-01 Thread mohsen
New question #699714 on Yade:
https://answers.launchpad.net/yade/+question/699714

In the name of god

Hi every one.

I encountered a problem in my compiled YADE 2021.01a. i wrote a simple code to 
be run but i received an strange error:
##
In [1]: b=[1,2,3];c=[b,b,b,]
 
In [2]: for kk in c: 
   ...:  a=[x/max(kk) for x in kk] 

---
NameError Traceback (most recent call last)
~/YadeGit/master2021Hertz/install/bin/yade-2021.01a in 
  1 for kk in c:
> 2 a=[x/max(kk) for x in kk]
  3 

~/YadeGit/master2021Hertz/install/bin/yade-2021.01a in (.0)
  1 for kk in c:
> 2 a=[x/max(kk) for x in kk]
  3 

NameError: name 'kk' is not defined
##
I checked the code for both python 2 and 3 and there was no problem.

Any help?

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

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