Skip to content
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

Support parallelization #1

Open
giordano opened this issue Apr 10, 2016 · 7 comments
Open

Support parallelization #1

giordano opened this issue Apr 10, 2016 · 7 comments

Comments

@giordano
Copy link
Owner

I'm not sure it's actually feasible, but it would be great if Cuba.jl could take advantage of parallelization capability of Cuba Library. Concurrency is achieved using fork and wait, but trying to increase the number of Cuba cores in Cuba.jl, after having increased the number of Julia processes with addprocs (without this, Cuba will spawn useless Julia processes), results in an undefined reference to fork function.

@tshort
Copy link

tshort commented Jul 18, 2016

Following up on your comment to JuliaLang/julia#8295, Stefan once suggested one could use ccall to call fork. Maybe that would work for you.

@giordano
Copy link
Owner Author

giordano commented Jul 18, 2016

Thanks for your comment, but I don't think your suggestion is feasible in this case as I never call directly fork, but functions that internally spawn slave processes.

@amitmurthy
Copy link

A hack using fork with Julia is https://github.com/amitmurthy/PTools.jl#pfork - though I don't see how this will be useful in your scenario with fork being called from within the library.

@giordano
Copy link
Owner Author

Thanks to you as well. As I said in the Julia issue, I'm not sure that supporting fork in Julia would solve this problem, but what I'm experiencing is that if Cuba.jl tries to use fork new processes it crashes due to undefined reference to fork function.

@ChrisRackauckas
Copy link

For now there's a pure Julia vegas method here which supports parallelization: https://github.com/ranjanan/MonteCarloIntegration.jl

@ChrisRackauckas
Copy link

Instead of parallelizing on the binary side, could it instead have a batch interface to let the user parallelize over the evaluation points?

@giordano
Copy link
Owner Author

giordano commented Aug 5, 2019

It does already support vectorisation: https://giordano.github.io/Cuba.jl/stable/#Vectorization-1. Example here: https://giordano.github.io/Cuba.jl/stable/#Vectorized-Function-1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants