Replies: 3 comments 1 reply
-
I don't know, but should this be at discourse.julialang.org? I think you might get answers (quicker) there. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Julia needs to catch signals for the same reasons... If you are okay with not using Julia's multi-threading you might be okay, but YMMW. |
Beta Was this translation helpful? Give feedback.
0 replies
-
I had no response, usually Julia is not used via C. I am a rare poor guy
with this :)
But to respond to you and Valentin Churavy, it was in fact very simple.
Since after loading libjulia.so I can "populate" myself jl_options
structure before calling jl_init() it was as simple as:
void jl_init_env(void){
jl_options.handle_signals = JL_OPTIONS_HANDLE_SIGNALS_OFF;
jl_init();
jl_complex64_type = (jl_value_t *) jl_eval_string("ComplexF64");
And as you can also see it's a pity the ComplexF64 type is not defined for
C users of libjulia.so.
Nevertheless that works relatively nicely. For Clozure CL I do not
encounter any problems whereas some remain for SBCL.
For example, I have to bypass several floating point related exceptions,
principally generated by the Plots module.
And the other, they seem related to SBCL, but only when Julia is
initialized. Running an external process for example or even compiling a
Lisp file. This is relatively difficult to debug, one day I will succeed I
hope. But I have absolutely no idea how to solve this for now. But, this
may be thread related as Valentin suggests for using Julia this way. In
fact, I will try. Good idea, thank you.
Regards,
__
Greg
PS: even if this is related to multi-threading, I will keep the
multi-threading possibility and try another solution. But I will try single
threaded Julia setting.
Le mar. 27 juin 2023 à 17:10, Páll Haraldsson ***@***.***> a
écrit :
… I don't know, but should this be at discource.julialang.org? I think you
might get answers (quicker) there.
—
Reply to this email directly, view it on GitHub
<#48378 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AKGLAMFZFEWADBTRLSMPADLXNLZV7ANCNFSM6AAAAAAUC5PEPM>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I’m interfacing Julia for a CAS called FriCAS, which is built on top of a Common LISP environment, in my case SBCL.
SBCL needs to catch signals for memory management and other things and I wonder how to use the jl_parse_opts or jl_set_ARGS, having in mind that at least libsupport needs to be initialized I think. I can dirty hack Julia source code (really dirty, modify the source code and the build process) but my question is how to bypass Julia signals handling when using libjulia.so.
Any ideas or hints?
Greg
PS: Do I have to internally rewrite a jl_init or julia_init routine? Or...
Beta Was this translation helpful? Give feedback.
All reactions