Forum Message

 

 

We have moved the forum to https://forum.ngsolve.org . This is an archived version of the topics until 05/05/23. All the topics were moved to the new forum and conversations can be continued there. This forum is just kept as legacy to not invalidate old links. If you want to continue a conversation just look for the topic in the new forum.

Notice

The forum is in read only mode.

pickling.py not working?

More
6 years 8 months ago #148 by janfp
Hi all,
is it possible that the pickling example is currently not working?
I ran it inside a ipython3-shell. After the script finished, I looked at loaded_data which is indeed an array of BaseVectors, however, taking the first of these it turns out to have size

In [4]: loaded_data[0].size
Out[4]: 140545872919416

which does not seem to be correct ;)
Trying to print the vector causes a segfault.

I also tried plain pickler, not NgsPickler, yet with the same result.

thx,
Jan
More
6 years 8 months ago #149 by christopher
Yes pickling was indeed broken for BaseVectors since the move to pybind11. This has been fixed in this commit:
github.com/NGSolve/ngsolve/commit/a128c3...c75d9dd6afc91a7228b7

Thanks for reporting
The following user(s) said Thank You: janfp
Time to create page: 0.118 seconds