-
Notifications
You must be signed in to change notification settings - Fork 40
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 Julia wrappers #62
Conversation
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.
check-spelling found more than 10 potential problems in the proposed changes. Check the Files changed tab for more details.
This comment has been minimized.
This comment has been minimized.
Salut @amontoison Alexis, Thank you so much for this nice initiative. It will be very useful. As @jschueller did, you may consider temporarily disabling the tests that are not relevant during the development, e.g., I am adding @ragonneau Tom as a reviewer, as he knows Julia, whereas I am totally ignorant about it. Let us keep in touch on this. Merci beaucoup ! A+, |
This comment has been minimized.
This comment has been minimized.
Hi @amontoison Alexis, Thanks to @jschueller Julien's efforts, the problems regarding JuliaInterop/Clang.jl#443 and #58 are both solved in v0.7.1, the latter being re-solved without introducing non-standard directives. Many thanks to both. Zaikun |
@check-spelling-bot Report🔴 Please reviewSee the 📂 files view, the 📜action log or 👼 SARIF report for details. Unrecognized words (8)ccall To accept ✔️ these unrecognized words as correct, run the following commands... in a clone of the [email protected]:amontoison/prima.git repository curl -s -S -L 'https://raw.githubusercontent.com/check-spelling/check-spelling/main/apply.pl' |
perl - 'https:/libprima/prima/actions/runs/6210866872/attempts/1' Pattern suggestions ✂️ (1)You could add these patterns to .github/actions/spelling/patterns.txt:
Warnings (1)See the 📂 files view, the 📜action log or 👼 SARIF report for details.
See ℹ️ Event descriptions for more information. If the flagged items are 🤯 false positivesIf items relate to a ...
|
@zaikunzhang |
Hi Alexis @amontoison , This is great!
Thank you very much! A+, |
If these words are false positives, then you may put them in Thanks. |
The users don't need to compile PRIMA. It's already precompiled for them. They just need to use using PRIMA_jll
include("wrappers.jl")
calfun = ...
n = ...
x = ...
f = ...
xl = ...
xu = ...
nf = ...
rhobeg = ...
rhoend = ...
ftarget = ...
maxfun = ...
npt = ...
iprint = ...
info = prima_bobyqa(calfun, n, x, f, xl, xu, nf, rhobeg, rhoend, ftarget, maxfun, npt, iprint)
I can find time to do that next week. |
Indeed, the MATLAB interface is quite sophisticated (for example, see how we interpret and preprocess the input from the user). Everything is wrapped under a single function called Coming back to your question, the user does not need to specify which solver to call --- That said, if you look at
The user only needs to define the objective function Of course, I do not expect the Julia wrapper will do something as sophisticated as the MATLAB interface in the short term --- it took months for Tom and me to code the Python and MATLAB interfaces for PDFO, from which PRIMA inherits the MATLAB interface. We can regard the current wrappers as the basis for using PRIMA in Julia, which is already extremely nice. In the future, there will be a more sophisticated and user-friendly version of Coming back to your question again, we can call Thanks. Zaikun |
Great! Do they need to install PRIMA somehow, so that the precompiled binaries are stored at the correct place and Julia can find them?
Is it standard to call it
Would there be a conflict? Sorry for my ignorance about Julia. Thanks. |
Hi @amontoison Alexis, I have elaborated my idea on interfaces here: https:/orgs/libprima/discussions/79 . I suppose we are currently working on the basic interface defined there. (But we may make it a bit easier to use, by, for example, defaulting parameters to reasonable values if they are not provided by the user.) This is a nice start and already extremely valuable. Merci ! |
Sorry for having missed this discussion so far. Two points for the discussion:
These lead me to the conclusion that a separate repository is needed for the Julia interface to PRIMA library. Based on @amontoison |
Are you sure about this? I know that e.g. GLMakie resides in a repo subdirectory (but the repo root has a Julia package, too, maybe that's the reason). I could not find a mention of this in the docs on a quick search. |
Well, this was my understanding. GLMakie (the GL backend for Makie) is part of the Makie Julia package and I guess that it needs this parent project to work. I would say that it is a sub-project of the Julia Makie project. All these are in a dedicated GIT repository. To mitigate my claim: it is simpler if the Julia API for PRIMA be a repository in its own. This is what is done by many other packages. BTW, the PRIMA.jl package now exists, is ready for a try, and depends on the |
Actually, they are dependencies of each other: https:/MakieOrg/Makie.jl/blob/2b8b8a1472f2fd8692a64a554f3b85669c297e90/GLMakie/Project.toml#L14C1-L14C7 I think all of these being hosted together mainly looks like a convenience thing (maintenance, issue tracking,...). |
Hi everyone, sorry for not answering earlier. A good idea is to move the repository into the |
I totally agree with that. How shall I proceed? |
@zaikunzhang Should add us as collaborators of the |
Hi everyone, Sorry for the slow response. I have sent the invitations. Thank you very much for contributing to libprima. As for the registration of PRIMA.jl as an official Julia package, I suggest we also do it through Thanks. Zaikun |
Thanks for the invitation! Now that I have accepted it, I am not sure how to move the repository PRIMA.jl implementing the Julia API into |
Yes, it's Transfer ownership. I suggest to do a fork with GitHub after the transfer to still have an emmt/PRIMA.jl. it will be connected to the main repo |
OK thanks for the answer and the suggestion. I still have a couple of (silly) questions:
|
Yes, all GitHub members will be able to open a PR.
Yes, because you are a member of the
The PR is not merged so it's not an issue. We can retrigger the registration when the repository is in |
Thanks for all your explanations. I am doing the transfer right now! |
@zaikunzhang
I have an issue to generate the wrappers of the 4 main functions with Clang.jl but it should be not too hard to fix.
I started a discussion here.