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

Is Pyjulia thread safe now? #519

Open
p-oorja opened this issue Jan 5, 2023 · 1 comment
Open

Is Pyjulia thread safe now? #519

p-oorja opened this issue Jan 5, 2023 · 1 comment

Comments

@p-oorja
Copy link

p-oorja commented Jan 5, 2023

We are working on SaaS based platform implemented using Flask and Celery.
In the backend, we have some part of the implementation written in julia.
We integrated julia using a python library called julia==0.6.0
In the flask we are able to run the julia code.
However we are not able to run the same code inside the celery task. The error that we get is

celery_worker_1 | signal (4): Illegal instruction
celery_worker_1 | in expression starting at none:2
celery_worker_1 | unknown function (ip: 0xffff727d6cec)
celery_worker_1 | _jl_invoke at /cache/build/default-awsarm-5/julialang/julia-release-1-dot-8/src/gf.c:2365 [inlined]
celery_worker_1 | ijl_apply_generic at /cache/build/default-awsarm-5/julialang/julia-release-1-dot-8/src/gf.c:2547
celery_worker_1 | Allocations: 3462340 (Pool: 3459082; Big: 3258); GC: 4
celery_worker_1 | [2022-12-18

You can replicate the error using the following repository:
https://github.com/p-oorja/p-oorja

We are using julia v1.8.3 (even we have tried v1.9.0-alpha1 but we are getting the same error).

Is there any workaround to use pyjulia in threaded environment?

@mkitti
Copy link
Member

mkitti commented Jan 5, 2023

I'm a bit confused about what you are doing and how celery works.

There is certainly a way interact with Julia in a thread safe way, but I'm not sure why you would want to do it via pyjulia.

Could you bring your question to Julia Discourse?
https://discourse.julialang.org/

Also see this documentation on embedding Julia:
https://docs.julialang.org/en/v1/manual/embedding/

https://docs.julialang.org/en/v1/devdocs/init/

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

No branches or pull requests

2 participants