-
Notifications
You must be signed in to change notification settings - Fork 141
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
Fix track_order
usage in do block
#982
Conversation
62e2216
to
0f187c0
Compare
3ebb5a4
to
d4e8810
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did the method definitions need to move?
Yes, because Line 208 in ccdb3e9
|
We may eventually want to move |
Not needed, I'm reworking the pr to remove unsafe globals |
Honestly, I think this is pretty close to mergeable. Perhaps this second refactor should be another pull request? Here, I'm mainly waiting on someone else, perhaps @musm to review before merging. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is close to mergeable. The one thing that is missing is checking the reversion of IDX_TYPE
after the do
syntax.
Currently stuck on one failing test. Will continue tomorrow. |
Thus you need to have a distinct implementation of the track_order accessors for dataset creation property lists. This makes me wonder what happens when link track order and attribute track order differ. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Conflating attribute and link order seems a bit problematic. We might need to address that in the next minor version.
Yes, or support I'm currently struggling with the property lists for Line 35 in ccdb3e9
thus the track_order property of fcpl is lost when reading.
It doesn't seem to be possible to modify the property list after the call to Line 43 in ccdb3e9
This is why I've added a fcpl or gcpl named field to the File and Group structs and try to work with that now.
What remains is a failing test which occurs when Line 25 in ccdb3e9
|
Generally looks good, still reviewing some of the PR. Could you give a brief summary of how the task local changes are an improvement and operate? One crude way to probe the value of the order would be to have global const refs, but I could easily imagine those values getting garbled with repeated calls in independent threads, even if things don't work 100% in multi-threaded contexts yet when using HDF5 |
My biggest issue at the moment is that the Instead I might create an internal API to query the context directly. If the context property list is invalid, we can always initialize it to obtain a default value. |
The task local storage (TLS) is actually my idea, so I'll explain it. The (TLS) is basically a global namespace specific to each In our case, we need to temporarily change the global space for some fixed duration. To do so we can launch a new Specifically in our case those local variables are property lists and their properties. In this PR, we are mainly thinking about index order. In the future, I think we should use these property lists as a template when creating new property lists. When we need a new property list, we copy it from the local context rather than creating one de novo. This is better than using a global constant I have a working draft here of what I think this should look like: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Merge master to get #993 if you have not already. #993 auto-initializes the property lists. Thus we do not need a fallback to the object's property list since the context will always have a valid property list on demand.
If someone wants to change the global index type or order, they can modify the global CONTEXT
. Otherwise, they can use the do
syntax for h5open
to locally change the value.
963e6b8
to
f68a50e
Compare
Looks like the failure on
Even with the same failure, outcome of 1. is a passing test. |
That method error seems real though. |
Yes, but unrelated to this PR, since also present on master: |
I'm going to try to squash the test failure on this branch. |
Do you plan on opening a PR after this is merged with your working draft as I find that those changes are important improvements? |
@t-bltg I'd recommend rebasing on master and cleaning up the commits. Then we can finally finalize merging in this PR. I'm not sure it would be best to squash all the commits or preserve the logical changes into several commits with more descriptive names. In either case a rebase would be helpful. |
I would probably start another branch and send that in. I would also like to try implementing some of the applications. In particular, copying the context property lists to create default property lists for object creation. For now, I've just documented this as an internal API that's under development. |
I would just squash it. |
Co-authored-by: Mark Kittisopikul <[email protected]>
Thanks for sticking to this and sorry for the long review! |
Thanks all for helping finalizing this PR. |
Follow up of #912.
track_order
only used withFileIO
&OrderedDict
#939;task_local_storage
as a context instead of global state. #985.Remove
IDX_TYPE
andORDER
globals (non thread safe global states).And a little cleanup / simplifications.