-
Notifications
You must be signed in to change notification settings - Fork 188
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Collision detection not able to checkpoint #1943
Comments
Any ideas as to why that is?
…On Tue, Apr 10, 2018, 08:59 Kai Szuttor ***@***.***> wrote:
see https://travis-ci.org/espressomd/espresso/jobs/364132063
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1943>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AA2i38N_ejNuehX-M-whu__Fm02nZyIMks5tnFhJgaJpZM4TNs3y>
.
|
It might not be the case, but it is possible that you run into this problem at some point, so I wanted to make you aware of it. Python 3 strings are not compatible with C++ // Make pickle work
// https://stackoverflow.com/questions/9310053/how-to-make-my-swig-extension-module-work-with-pickle
// remark: passing as std::stringstream does not work because swig calls the implicitly-deleted copy constructor of std::stringstream instead of the move constructor
%define %boost_picklable(cls...)
%extend cls {
PyObject* __getstate__() {
std::stringstream ss;
boost::archive::binary_oarchive ar(ss);
ar << *($self);
return PyBytes_FromStringAndSize(ss.str().data(), ss.str().length());
}
void __setstate_internal(PyObject* const sState) {
char *buffer;
Py_ssize_t len;
PyBytes_AsStringAndSize(sState, &buffer, &len);
boost::iostreams::array_source asource(buffer, static_cast<size_t>(len)); // prevents from copying
boost::iostreams::stream<boost::iostreams::array_source> ss(asource);
boost::archive::binary_iarchive ar(ss);
ar >> *($self);
}
}
%enddef |
Wouldn't you use |
This also depends on being able to control the order of restoring stuff, because the bonds used in the collision deteciton have to be present |
see https://travis-ci.org/espressomd/espresso/jobs/364132063
The text was updated successfully, but these errors were encountered: