-
Notifications
You must be signed in to change notification settings - Fork 6
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
Add access to libsc #73
Conversation
Fix calling sc_ functions on Windows and allow access to global C variables in libsc.
Codecov Report
@@ Coverage Diff @@
## main #73 +/- ##
==========================================
+ Coverage 15.02% 15.42% +0.40%
==========================================
Files 3 3
Lines 1511 1511
==========================================
+ Hits 227 233 +6
+ Misses 1284 1278 -6
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
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.
Thanks a lot for the contribution, @lcw! I just have a few questions.
- Which change fixed calling libsc functions on Windows?
- As far as I understand, we need to specify also a path to libsc if we want to use a custom build of MPI (and
p4est
), correct? Thus, this would be a breaking change since it was enough to specify the path to thep4est
library before, correct?
I'm writing this on my phone, so I can't test it myself right now.
I don't know windows well, but it seems you need to use This is not needed on Linux, I am guessing that is because the libp4est shared library brings in libsc. See the following
On all platforms you need to load libsc to get global variables defined in that library. So, it is useful in general to have libsc available. For example, this can be used to see if libsc has been initialized.
Yes, this is a breaking change as you do need to specify a path to libsc for a custom build of p4est (and libsc). |
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.
Great, thanks a lot, @lcw!
@sloede @JoshuaLampert: If you don't object, I will merge this and create a breaking release.
Right now, we handle setting custom p4est/sc library versions by using a manual mechanism to change what I didn't see it as a critical change, but now that we're creating a breaking change that addresses the way in which we set custom library paths, I thought I'd bring it up. IMHO it's fine to continue with this PR here. Should it be clear that overriding the JLL packages would be clearly superior to our current way of doing it, I would suggest to apply that change as well before creating the breaking release. |
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.
Thanks for the nice improvement, @lcw!
Thanks, @sloede! I didn't know about this feature of JLL packages. We should meet soon to discuss what to include in the next breaking release of P4est.jl. Anyway, I like the improvements from this PR. |
Indeed, this looks like a nice improvement! As far as I understand, after merging this, on Linux you could set libsc to the same path as libp4est (or to a custom build of libsc if you like), right? So maybe it would be convenient to set the default value of |
Interesting. In that case it wouldn't be a breaking change, since existing code should continue to work, or am I missing something? |
Yes, it wouldn't be a breaking change anymore. But on Windows you still need to set libsc to get things work including calling sc_ functions. |
That's a nice observation! So this will be non-breaking (it works where it worked before) but fixes problems on Windows 👍 I will go ahead and merge this now. |
Thanks everyone! |
Fix calling sc_ functions on Windows (closes #32) and allow access to global C variables in libsc.