Opened 6 years ago

Last modified 3 years ago

#4851 new enhancement

Split the 16dae.c source file into multiple files

Reported by: casella Owned by: wbraun
Priority: high Milestone:
Component: Code Generation Version:
Keywords: Cc: sjoelund.se

Description (last modified by 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 Changed 6 years ago by casella

  • Description modified (diff)

comment:2 Changed 6 years ago by casella

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

comment:3 Changed 6 years ago by wbraun

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 Changed 5 years ago by casella

  • Milestone changed from 1.13.0 to 1.14.0

Rescheduled to 1.14.0 after 1.13.0 releasee

comment:5 Changed 5 years ago by casella

  • Milestone changed from 1.14.0 to 1.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 Changed 4 years ago by casella

  • Milestone changed from 1.16.0 to 1.17.0

Retargeted to 1.17.0 after 1.16.0 release

comment:7 Changed 3 years ago by casella

  • Milestone changed from 1.17.0 to 1.18.0

Retargeted to 1.18.0 because of 1.17.0 timed release.

comment:8 Changed 3 years ago by casella

  • Milestone 1.18.0 deleted

Ticket retargeted after milestone closed

Note: See TracTickets for help on using tickets.