On Windows and with VS what I do is:

- Build the external library in debug mode (if not possible, game over)

- On the VS IDE load julia.exe in "Tools -> Attach to process"

- run the julia command

in case of crashes the IDE pops up right on the offending line. If 
sometimes this does not work, load the C source code in the IDE and set 
break-points as usual. When the julia command is executed the program flow 
will stop at the break-point.

quarta-feira, 16 de Dezembro de 2015 às 10:28:34 UTC, Kristoffer Carlsson 
escreveu:
>
> Hello, I've been looking at embedding some material models written in 
> Julia in a larger FEM project written in C++ (https://www.dealii.org/).
>
> I have a few questions that would make improve my workflow.
>
> 1.) To ease with debugging I would want to get the back trace with line 
> numbers from C when an exception is raised. Right now I use:
>
> void check_exception() {
>  if (jl_exception_occurred()) {
>  jl_show(jl_stderr_obj(), jl_exception_occurred());
>  jl_printf(jl_stderr_stream(), "\n");
>  return -1;
>  }
>  return 0;
> }
>
> but this only gives me for example:
> DimensionMismatch("A has dimensions (2,1) but B has dimensions (6,6)")
> without any extra information.
>
> Is there a convenient way to also print out the back trace?
>
> 2. What is the status of thread safety when calling function with jl_call 
> from c(++)? deal.ii has very good support for implementing multithreading 
> so it would be nice if I could use julia multithreaded. I know that there 
> has been a lot of progress w.r.t thread safety on master but I am not sure 
> what the current status is.
>
> Thanks
> // Kristoffer
>

Reply via email to