-
Notifications
You must be signed in to change notification settings - Fork 47
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
No malloc bliss #282
No malloc bliss #282
Conversation
The failing test is the one using the external bliss, which I'd expect because I didn't account for that yet. |
Cool. |
becfd6a
to
1a50012
Compare
I'm done with this, it's ready for review, I suggest squashing and creating a merge commit when ready. |
I had a quick glance at this looks reasonable. I think this would make digraphs behave very badly in HPC-GAP, if someone calculated graphs in multiple threads. For that reason, it might be worth trying to keep support for an external bliss, if it isn't too much pain, just in case HPC-GAP ever gets going/released. |
Thanks @ChrisJefferson, the homomorphism finder in Digraphs (which is the only part of Digraphs that can take advantage of these changes at present) is already highly non-thread safe, and I don't think this change makes it any worse. It'd be easy enough to make it thread-safe in the future in any case, but I didn't see any reason to do it just yet. |
The purpose of this PR is to remove the use of
malloc
in the version of bliss that's vendored by Digraphs. The rationale behind this is the same as in PR #281:Another thing that stands out when profiling this is that the top three or four things in the profile are all related to bliss mallocing and freeing memory. This PR will make it possible for the homomorphism finding code in GAP to modify a bliss graph in-place (without any memory allocation or deallocation), and repeatedly reuse that graph and all of its associated data structures in
bliss
for finding the automorphism group.With this PR (in its current unfinished state):
in the
stable-1.0
branch:This PR is work in progress, I'm just pushing now to see what happens with the CI, and to ask for comments.