Can't running noFlowScenario.py with yade or yadedaily

Asked by Ziyu Wang

Dear all,
I have asked a few questions about [2] in [1].However,I found that the script still cannot be run successfully, and the errors in yade and yadedaily are different.

1.When running in yade, an error occurs:
  The 'verts' kwarg was deprecated in Matplotlib 3.0 and will be removed in 3.2. Use 'marker' instead.
  scatter=pylab.scatter(scatterPt[0] if not math.isnan(scatterPt[0]) else 0,scatterPt[1] if not math.isnan(scatterPt[1]) else 0,s=scatterSize,color=line.get_color(),**scatterMarkerKw)

2.When running in yadedaily,another error occurs:
  python3.8: /build/vtk6-9ueea8/vtk6-6.3.0+dfsg2/IO/XML/vtkXMLOffsetsManager.h:142:void OffsetsManagerGroup::Allocate(int, int):Assertion `numElements > 0' failed.
Aborted (core dumped)

The following is the version related information in printAllVersions() in yadedaily:

Yade version : 20210909-5909~5b11526~focal1
Yade features : LOGGER USEFUL_ERRORS REAL_HP COMPLEX_MP VTK OPENMP GTS QT5 CGAL PFVFLOW PFVFLOW LINSOLV MPI TWOPHASEFLOW FEMLIKE GL2PS LBMFLOW THERMAL PARTIALSAT POTENTIAL_PARTICLES POTENTIAL_BLOCKS
Yade config dir: ~/.yadedaily
Yade precision : 53 bits, 15 decimal places, with mpmath, PrecisionDouble
Yade RealHP<…> : (15, 33, 45, 60, 120, 150, 300) decimal digits in C++, (15, 33) decimal digits accessible from python
```

Libraries used :

| library | cmake | C++ |
| ------------- | -------------------- | ------------------ |
| boost | 107100 | 1.71.0 |
| cgal | | 5.0.2 |
| clp | 1.17.5 | 1.17.5 |
| cmake | 3.16.3 | |
| coinutils | 2.11.4 | 2.11.4 |
| compiler | /usr/bin/c++ 9.3.0 | gcc 9.3.0 |
| eigen | 3.3.7 | 3.3.7 |
| freeglut | 2.8.1 | |
| gl | | 20190805 |
| ipython | 7.13.0 | |
| metis | | 5.1.0 |
| mpi | 3.1 | ompi:4.0.3 |
| mpi4py | 3.0.3 | |
| mpmath | 1.1.0 | |
| openblas | | OpenBLAS 0.3.8 |
| python | 3.8.10 | 3.8.10 |
| qglviewer | | 2.6.3 |
| qt | | 5.12.8 |
| sqlite | | 3.31.1 |
| suitesparse | 5.7.1 | 5.7.1 |
| vtk | 6.3.0 | 6.3.0 |

```
Linux version : Ubuntu 20.04.3 LTS
Architecture : amd64
Little endian : True

Thanks for your help!
Best regards.

[1]https://answers.launchpad.net/yade/+question/698776
[2]https://gitlab.com/yade-dev/trunk/-/blob/master/examples/ThermalEngine/noFlowScenario.py

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Ziyu Wang
Solved:
Last query:
Last reply:
Revision history for this message
Robert Caulk (rcaulk) said :
#1

Hello,

1.) is a common warning, which is a deprecation warning. Can you confirm that the script still runs and plots as expected?

2.) appears to be a VTK problem. Can you remove the VTKRecorder and the flow.saveVTK from the simulation and try again? Please report what happens.

Cheers,

Robert

Revision history for this message
Ziyu Wang (ziyuwang1) said (last edit ):
#2

Thanks Robert for your prompt reply!

>1.I did not make any changes to the sample script.Unfortunately,the script can run while there is no data on the plot (the plot is blank).

>2.When I remove the VTKRecorder and the flow.saveVTK from the simulation and run the script again,the script runs normally.Unfortunately,like the >1. ,there is no data on the plot (the plot is blank).And there is a CHOLMOD warning: matrix not positive definite. file: ../Supernodal/t_cholmod_super_numeric.c line: 911,what is the meaning?

Looking forward to getting more help from you!

Revision history for this message
Robert Caulk (rcaulk) said :
#3

Hello,

Ok, I suspect ThermalEngine has some issues on 20.04. But first can you please run oedometer.py [1] and report your results?

Next, can you install ubuntu 18.04 and run the thermalengine sample script? The two quickest options for this are to install ubuntu 18.04 on a virtual machine or to boot 18.04 from a USB.

At least this will verify to us that ThermalEngine has issues on 20.04.

Finally, if you want to try some alternative installations on 20.04 you can:

* try running docker [2]
* try compiling from source [3]

At the moment, I have not run ThermalEngine on Ubuntu 20.04 so I cannot bug test this directly. But I will try to spin up a virtual machine or boot from USB in the coming week.

Cheers,

Robert

[1]https://gitlab.com/yade-dev/trunk/-/blob/master/examples/FluidCouplingPFV/oedometer.py
[2]https://yade-dem.org/doc/installation.html#docker
[3]https://yade-dem.org/doc/installation.html#source-code

Revision history for this message
Ziyu Wang (ziyuwang1) said :
#4

Hello Robert!

I have run the script oedometer.py on ubuntu 20.04 as you said, and everything is normal.

And then,I have installed ubuntu 18.04 and ran noFlowScenario.py, unfortunately, it still did not succeed.There are different errors on yade and yadedaily:

yade:On ubuntu 18.04, the version of yade can only use 2018.02b, but it seems that ThermalEngine is not defined on this version.So I install yadedaily.

yadedaily:python3.6: /build/vtk6-VHOYAG/vtk6-6.3.0+dfsg1/IO/XML/vtkXMLOffsetsManager.h:142:void OffsetsManagerGroup::Allocate(int, int):Assertion `numElements > 0' failed.
Aborted (core dumped)

printAllVersions() in yadedaily as follows:
Yade version : 20210923-5934~44b94a0~bionic1
Yade features : LOGGER USEFUL_ERRORS VTK OPENMP GTS QT5 CGAL PFVFLOW PFVFLOW LINSOLV MPI TWOPHASEFLOW FEMLIKE GL2PS LBMFLOW THERMAL PARTIALSAT POTENTIAL_PARTICLES POTENTIAL_BLOCKS
Yade config dir: ~/.yadedaily
Yade precision : 53 bits, 15 decimal places, without mpmath, PrecisionDouble
```

Libraries used :

| library | cmake | C++ |
| ------------- | -------------------- | ------------------- |
| boost | 106501 | 1.65.1 |
| cgal | | 4.11 |
| clp | 1.16.11 | 1.16.11 |
| cmake | 3.10.2 | |
| coinutils | 2.10.14 | 2.10.14 |
| compiler | /usr/bin/c++ 7.5.0 | gcc 7.5.0 |
| eigen | 3.3.4 | 3.3.4 |
| freeglut | 2.8.1 | |
| gl | | 20190911 |
| ipython | 5.5.0 | |
| metis | | 5.1.0 |
| mpi | 3.1 | ompi:2.1.1 |
| mpi4py | 2.0.0 | |
| mpmath | 1.0.0 | |
| openblas | | OpenBLAS 0.2.20 |
| python | 3.6.9 | 3.6.9 |
| qglviewer | | 2.6.3 |
| qt | | 5.9.5 |
| sqlite | | 3.22.0 |
| suitesparse | 5.1.2 | 5.1.2 |
| vtk | 6.3.0 | 6.3.0 |

```
Linux version : Ubuntu 18.04.6 LTS
Architecture : amd64
Little endian : True

Looking forward to your reply!

Revision history for this message
Robert Caulk (rcaulk) said (last edit ):
#5

Thank you for your information,

It appears a bug snuck into ThermalEngine in a recent merge request (my apologies). I am going to push a fix for it, which will make its way to yadedaily in a matter of days. However, if you need to have a working version now, you can compile a working branch as follows:

Assuming you have the standard folder structure [1], in your terminal type:

cd trunk
git checkout -b working_state 61c90697
cd ../build
cmake -DCMAKE_INSTALL_PREFIX=../install ../trunk
make -j4 install

Then you can run that from install/bin on the example script.

I will update this thread with a link to the merge request so you can track progress.

cheers,

Robert

[1]https://yade-dem.org/doc/installation.html#compilation

Revision history for this message
Robert Caulk (rcaulk) said :
#6
Revision history for this message
Ziyu Wang (ziyuwang1) said :
#7

Thanks Robert for your kindly help!

Sorry,I'm not sure if I understand what you mean correctly as a new user of yade.You will update yadedaily in the near future to fix this error, am I right?

And then,Your suggestion is: install the current development version of yade and run the command you gave above?

I have installed the current development version of yade and execute the command.Then I run the script through the following:

'/home/wzy/Docx/YadeSources/install/bin/yade-2021-03-16.git-61c9069' -j 16 '/home/wzy/Docx/yade/By_myself/ThermalEngine/Noflow1/noFlowScenario.py'
(ps:Is it this way to run the script?)

Unfortunately, the following prompt appeared:
/home/wzy/Docx/YadeSources/install/lib/x86_64-linux-gnu/yade-2021-03-16.git-61c9069/py/yade/plot.py:463: MatplotlibDeprecationWarning:
The 'verts' kwarg was deprecated in Matplotlib 3.0 and will be removed in 3.2. Use 'marker' instead.
  scatter=pylab.scatter(scatterPt[0] if not math.isnan(scatterPt[0]) else 0,scatterPt[1] if not math.isnan(scatterPt[1]) else 0,s=scatterSize,color=line.get_color(),**scatterMarkerKw)

As you said, this seems to be a warning rather than an error so the simulation running.But when I check Body.state.temp, the value is Nan!What is the problem...

There is my PrintAllVersions():
Yade version : 2021-03-16.git-61c9069
Yade features : BoostLog RealHP mpmath PrecisionDouble Odeint VTK OpenMP GTS GUI-Qt5 CGAL PFVFLOW PFVFLOW LINSOLV MPI TWOPHASEFLOW FEMLIKE GL2PS LBMFLOW THERMAL PARTIALSAT PotentialParticles PotentialBlocks
Yade config dir: ~/.yade-2021-03-16.git-61c9069
Yade precision : 53 bits, 15 decimal places, with mpmath
Yade RealHP<…> : (15, 33, 45, 60, 120, 150, 300) decimal digits in C++, (15, 33) decimal digits accessible from python
```

Libraries used :

| library | cmake | C++ |
| ------------- | -------------------- | ------------------ |
| boost | 107100 | 1.71.0 |
| cgal | | 5.1.5 |
| clp | 1.17.5 | 1.17.5 |
| cmake | 3.16.3 | |
| coinutils | 2.11.4 | 2.11.4 |
| compiler | /usr/bin/c++ 9.3.0 | gcc 9.3.0 |
| eigen | 3.3.7 | 3.3.7 |
| freeglut | 2.8.1 | |
| gl | | 20190805 |
| ipython | 7.13.0 | |
| metis | | 5.1.0 |
| mpi | 3.1 | ompi:4.0.3 |
| mpi4py | 3.0.3 | |
| mpmath | 1.1.0 | |
| openblas | | OpenBLAS 0.3.8 |
| python | 3.8.10 | 3.8.10 |
| qglviewer | | 2.6.3 |
| qt | | 5.12.8 |
| sphinx | 1.8.5-final-0 | |
| sqlite | | 3.31.1 |
| suitesparse | 5.7.1 | 5.7.1 |
| vtk | 6.3.0 | 6.3.0 |

```
Linux version : Ubuntu 20.04.3 LTS
Architecture : amd64
Little endian : True

Thanks for your help again!

Revision history for this message
Robert Caulk (rcaulk) said :
#8

>> I have installed the current development version of yade and execute the
command.Then I run the script through the following:
>> '/home/wzy/Docx/YadeSources/install/bin/yade-2021-03-16.git-61c9069' -j
16 '/home/wzy/Docx/yade/By_myself/ThermalEngine/Noflow1/noFlowScenario.py'
>> (ps:Is it this way to run the script?)

To be technical, you are reverting to the code state that existed just
before the bug was added. So this would not constitute "current development
version." But nonetheless, you appear to have compiled the correct version
of sources, based on the naming structure of your install/bin executable.
So yes, you are running it correctly based on the command you are providing
here.

This is exactly the procedure I used to test and find the bug - in
otherwords, this git version 61c90697 works for me on my computer with
18.04 and runs the example scripts correctly. Can you confirm you are
running this on 18.04? If no, can you check it on 18.04?

As for waiting on the fix, I am finding now that a VTK bug was introduced
during a VTK file split last month. I am working on fixing it, but your
best bet is to continue using 61c90697 until I solve the issue. The
ThermalEngine functionality of that branch is the most uptodate anyways so
it doesnt matter if you are on that branch or the most recent branch.

Thanks again for your patience,

Robert

On Mon, Sep 27, 2021 at 11:36 AM Ziyu Wang <
<email address hidden>> wrote:

> Question #698830 on Yade changed:
> https://answers.launchpad.net/yade/+question/698830
>
> Status: Answered => Open
>
> Ziyu Wang is still having a problem:
> Thanks Robert for your kindly help!
>
> Sorry,I'm not sure if I understand what you mean correctly as a new user
> of yade.You will update yadedaily in the near future to fix this error,
> am I right?
>
> And then,Your suggestion is: install the current development version of
> yade and run the command you gave above?
>
> I have installed the current development version of yade and execute the
> command.Then I run the script through the following:
>
> '/home/wzy/Docx/YadeSources/install/bin/yade-2021-03-16.git-61c9069' -j 16
> '/home/wzy/Docx/yade/By_myself/ThermalEngine/Noflow1/noFlowScenario.py'
> (ps:Is it this way to run the script?)
>
> Unfortunately, the following prompt appeared:
> /home/wzy/Docx/YadeSources/install/lib/x86_64-linux-gnu/yade-2021-03-16.git-61c9069/py/yade/plot.py:463:
> MatplotlibDeprecationWarning:
> The 'verts' kwarg was deprecated in Matplotlib 3.0 and will be removed in
> 3.2. Use 'marker' instead.
> scatter=pylab.scatter(scatterPt[0] if not math.isnan(scatterPt[0]) else
> 0,scatterPt[1] if not math.isnan(scatterPt[1]) else
> 0,s=scatterSize,color=line.get_color(),**scatterMarkerKw)
>
> As you said, this seems to be a warning rather than an error so the
> simulation running.But when I check Body.state.temp, the value is
> Nan!What is the problem...
>
> There is my PrintAllVersions():
> Yade version : 2021-03-16.git-61c9069
> Yade features : BoostLog RealHP mpmath PrecisionDouble Odeint VTK OpenMP
> GTS GUI-Qt5 CGAL PFVFLOW PFVFLOW LINSOLV MPI TWOPHASEFLOW FEMLIKE GL2PS
> LBMFLOW THERMAL PARTIALSAT PotentialParticles PotentialBlocks
> Yade config dir: ~/.yade-2021-03-16.git-61c9069
> Yade precision : 53 bits, 15 decimal places, with mpmath
> Yade RealHP<…> : (15, 33, 45, 60, 120, 150, 300) decimal digits in C++,
> (15, 33) decimal digits accessible from python
> ```
>
> Libraries used :
>
> | library | cmake | C++ |
> | ------------- | -------------------- | ------------------ |
> | boost | 107100 | 1.71.0 |
> | cgal | | 5.1.5 |
> | clp | 1.17.5 | 1.17.5 |
> | cmake | 3.16.3 | |
> | coinutils | 2.11.4 | 2.11.4 |
> | compiler | /usr/bin/c++ 9.3.0 | gcc 9.3.0 |
> | eigen | 3.3.7 | 3.3.7 |
> | freeglut | 2.8.1 | |
> | gl | | 20190805 |
> | ipython | 7.13.0 | |
> | metis | | 5.1.0 |
> | mpi | 3.1 | ompi:4.0.3 |
> | mpi4py | 3.0.3 | |
> | mpmath | 1.1.0 | |
> | openblas | | OpenBLAS 0.3.8 |
> | python | 3.8.10 | 3.8.10 |
> | qglviewer | | 2.6.3 |
> | qt | | 5.12.8 |
> | sphinx | 1.8.5-final-0 | |
> | sqlite | | 3.31.1 |
> | suitesparse | 5.7.1 | 5.7.1 |
> | vtk | 6.3.0 | 6.3.0 |
>
> ```
> Linux version : Ubuntu 20.04.3 LTS
> Architecture : amd64
> Little endian : True
>
> Thanks for your help again!
>
> --
> 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 : <email address hidden>
> Unsubscribe : https://launchpad.net/~yade-users
> More help : https://help.launchpad.net/ListHelp
>

Revision history for this message
Ziyu Wang (ziyuwang1) said :
#9

Hello Robert!

The version of yade I used before was Stable packages and Daily packages.I installed the Source code following the steps in[1].I have almost no knowledge about compilation and source code.So I don’t quite understand. Can I run the sample script with git version 61c90697 I used.

Actually,the ubuntu I used is 20.04.I will try it on 18.04 and give feedback in time.
(ps:So for future use, do you suggest me to use 20.04 or 18.04?)

Thank you for your prompt reply!

[1]https://yade-dem.org/doc/installation.html#compilation

Revision history for this message
Robert Caulk (rcaulk) said :
#10

You should be able to run the example script with git version 61c90697.

On Mon, Sep 27, 2021 at 4:36 PM Ziyu Wang <
<email address hidden>> wrote:

> Question #698830 on Yade changed:
> https://answers.launchpad.net/yade/+question/698830
>
> Ziyu Wang posted a new comment:
> Hello Robert!
>
> The version of yade I used before was Stable packages and Daily
> packages.I installed the Source code following the steps in[1].I have
> almost no knowledge about compilation and source code.So I don’t quite
> understand. Can I run the sample script with git version 61c90697 I
> used.
>
> Actually,the ubuntu I used is 20.04.I will try it on 18.04 and give
> feedback in time.
> (ps:So for future use, do you suggest me to use 20.04 or 18.04?)
>
> Thank you for your prompt reply!
>
> [1]https://yade-dem.org/doc/installation.html#compilation
>
> --
> 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 : <email address hidden>
> Unsubscribe : https://launchpad.net/~yade-users
> More help : https://help.launchpad.net/ListHelp
>

Revision history for this message
Ziyu Wang (ziyuwang1) said :
#11

Hello Robert.

I'm sorry, but on ubuntu 20.04 and ubuntu 18.04, I failed to run the script successfully using git-61c9069.What a pity!
I have followed your suggestion and tried it on 18.04, but it still doesn’t work.The error message is as follows:

CHOLMOD warning: matrix not positive definite. file: ../Supernodal/t_cholmod_super_numeric.c line: 911
/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. F8 plot. ]]

In [1]: python3.6: /build/vtk6-VHOYAG/vtk6-6.3.0+dfsg1/IO/XML/vtkXMLOffsetsManager.h:142: void OffsetsManagerGroup::Allocate(int, int): Assertion `numElements > 0' failed.

In fact, I think part of the error is caused by my unfamiliarity with the installation of source code.Some errors that I can’t understand may have occurred during the source code installation.
So,Can I wait for you to fix the ThermalEngine in yadedaily.(ps:I'm sorry to trouble you so much....)

Thanks again!

Revision history for this message
Robert Caulk (rcaulk) said :
#12

Hello,

The bug was just fixed by Janek [1], and yadedaily should be updated within two days.

Cheers,

Robert

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

Revision history for this message
Ziyu Wang (ziyuwang1) said :
#13

Thanks a lot,Robert!
Thank you for your efforts and look forward to yade can be used in a wider range of purposes.
I have no problems with this thread!