Opened 11 years ago

Closed 11 years ago

#2414 closed discussion (fixed)

Split the generated C file for simulation further?

Reported by: Adrian Pop Owned by: Adeel Asghar
Priority: normal Milestone: 1.9.1
Component: Code Generation Version: trunk
Keywords: Cc: Willi Braun, Lennart Ochel

Description

I've been playing with splitting the generated C file for simulation further (15 additional files). See below the proposed naming.

The question is if something like this is desired.
We could compile all of them in parallel (make -jX Model.makefile)
and would also make the compilers consume less memory.

On the other hand is nicer to have a big file with everything.
Also having so many files with long names might get over the command line size limit.
Let me know what you think.

     // literals
     Model_literals.h (out of Model_functions.c)
     // external objects
     let()= textFileConvertLines(simulationFile_exo(simCode,guid), '<%fileNamePrefix%>_01exo.c')
     // non-linear systems
     let()= textFileConvertLines(simulationFile_nls(simCode,guid), '<%fileNamePrefix%>_02nls.c')
     // linear systems
     let()= textFileConvertLines(simulationFile_lsy(simCode,guid), '<%fileNamePrefix%>_03lsy.c')
     // state set
     let()= textFileConvertLines(simulationFile_set(simCode,guid), '<%fileNamePrefix%>_04set.c')
     // events: sample, zero crossings, relations 
     let()= textFileConvertLines(simulationFile_evt(simCode,guid), '<%fileNamePrefix%>_05evt.c')
     // initialization
     let()= textFileConvertLines(simulationFile_inz(simCode,guid), '<%fileNamePrefix%>_06inz.c')
     // delay
     let()= textFileConvertLines(simulationFile_dly(simCode,guid), '<%fileNamePrefix%>_07dly.c')
     // update bound start values, update bound parameters
     let()= textFileConvertLines(simulationFile_bnd(simCode,guid), '<%fileNamePrefix%>_08bnd.c')
     // algebraic
     let()= textFileConvertLines(simulationFile_alg(simCode,guid), '<%fileNamePrefix%>_09alg.c')
     // asserts
     let()= textFileConvertLines(simulationFile_asr(simCode,guid), '<%fileNamePrefix%>_10asr.c')
     // mixed systems
     let()= textFileConvertLines(simulationFile_mix(simCode,guid), '<%fileNamePrefix%>_11mix.c')
     // jacobians
     let()= textFileConvertLines(simulationFile_jac(simCode,guid), '<%fileNamePrefix%>_12jac.c')
     // optimization
     let()= textFileConvertLines(simulationFile_opt(simCode,guid), '<%fileNamePrefix%>_13opt.c')
     // linearization
     let()= textFileConvertLines(simulationFile_lnz(simCode,guid), '<%fileNamePrefix%>_14lnz.c')
     // main file
     let()= textFileConvertLines(simulationFile(simCode,guid), '<%fileNamePrefix%>.c')

Change History (4)

comment:1 by Martin Sjölund, 11 years ago

Oh yeah. I committed the files for this. But FMI on Windows remains to be fixed.

comment:2 by Adrian Pop, 11 years ago

Owner: changed from Lennart Ochel to Adeel Asghar
Status: newassigned

Maybe Adeel can help us there as I'm lost on how the FMI dll is built.
MSVC target is also broken, I'll look into that myself.

comment:3 by Martin Sjölund, 11 years ago

I believe it's just some .o-files that are missing when linking.

comment:4 by Adrian Pop, 11 years ago

Resolution: fixed
Status: assignedclosed

Fixed FMI and +target=msvc in r17700.

Note: See TracTickets for help on using tickets.