Opened 7 years ago

Last modified 3 years ago

#4851 new enhancement

Split the 16dae.c source file into multiple files

Reported by: Francesco Casella Owned by: Willi Braun
Priority: high Milestone:
Component: Code Generation Version:
Keywords: Cc: Martin Sjölund

Description (last modified by Francesco Casella)

When compiling large models with -daeMode=new, the lion's share of the compilation time on machines with multiple cores is taken by the 16dae.c file. This contains

  • a large number of simple functions, each computing a residual
  • the evaluateDAEResiduals function
  • the getAlgebraicDAEVarNominals function
  • the setAlgebraicDAEVars function
  • the getAlgebraicDAEVars function
  • the initializeDAEmodeData function

I would recommend at the very least to put each of the last five functions in separate C source files. It would also be good to split the first part of the file, containing the residual functions, in multiple chunks, as already done for the 06inz.c file, see ticket:3963#comment:6. This would dramatically speed up the code generation for large models, where C compilation is currently the bottleneck.

Change History (8)

comment:1 by Francesco Casella, 7 years ago

Description: modified (diff)

comment:2 by Francesco Casella, 7 years ago

In fact, also the 12jac.c and 02nls.c files can take a very long time and should be split as well.

comment:3 by Willi Braun, 7 years ago

Probably it would be also worth to push all static information into an xml file and just read it once at runtime, here e.g. the sparsity pattern and the algebraic variables.
While splitting the equations in separated files should be done anyway.

comment:4 by Francesco Casella, 6 years ago

Milestone: 1.13.01.14.0

Rescheduled to 1.14.0 after 1.13.0 releasee

comment:5 by Francesco Casella, 5 years ago

Milestone: 1.14.01.16.0

Releasing 1.14.0 which is stable and has many improvements w.r.t. 1.13.2. This issue is rescheduled to 1.16.0

comment:6 by Francesco Casella, 4 years ago

Milestone: 1.16.01.17.0

Retargeted to 1.17.0 after 1.16.0 release

comment:7 by Francesco Casella, 4 years ago

Milestone: 1.17.01.18.0

Retargeted to 1.18.0 because of 1.17.0 timed release.

comment:8 by Francesco Casella, 3 years ago

Milestone: 1.18.0

Ticket retargeted after milestone closed

Note: See TracTickets for help on using tickets.