DAE - Sundials parallel capabilities access through sundials.jl or DifferentialEquation.jl

Hi People.

I am implementing a code for solving a DAE system using sundials and IDA (through the DifferentialEquation.jl interface). However, as my simulation requires the solution of several equations > 500. It is taking a long time for ending each simulation. So, I am wondering, if it is possible to use the native sundials capabilities to achieve a parallel solution. It is possible from the Julia sundials or DifferentialEquation.jl wrappers?

Thanks in advance.

Someone would have to implement it. Right now it’s all setup to use NVectorSerial

Thank you for your response. I am new in Julia and C++ but I am really interested to use this functionality. So, there is an similar implementation that I could use as a guide?

This unfortunately isn’t the most trivial thing to implement. The steps are:

  1. Update the generator in order to get the other NVector type APIs wrapped (Sundials.jl/generate.jl at master · SciML/Sundials.jl · GitHub) into (Sundials.jl/libsundials_api.jl at master · SciML/Sundials.jl · GitHub).
  2. Improve the Yggdrasil build GitHub - JuliaPackaging/Yggdrasil: Collection of builder repositories for BinaryBuilder.jl so that the binaries are built with the right parallelism extensions.
  3. Make the SciML common interface part be generic to the NVector choice and make a new high level alg.

3, the Julia code part, is relatively easy. 1 and 2 are the hard parts.

1 Like

Hi! For now I am getting some parallel capabilities after using linear_solver=:LapackDense. However, I am wondering if there is a way to increase the number of threads. Because, I have the impression that the solver didn’t use all the computer threads. So there is some kind of configuration key that I can use through the DifferentialEquation.jl wrapper?

Thank you so much for your help!

For BLAS that’s done via Julia’s BLAS commands. BLAS.set_num_threads(n)