问题不是 OMC,而是 GCC。在 Windows 64 位 OMC 中,最大消耗 4.1G,n=22500 并生成文件。然后 GCC 在文件上运行并耗尽内存。也使用 -n=1 来不并行运行 GCC,因为这会消耗更多的内存。
我运行了这个脚本:fmu.mos
loadFile("BigModel.mo"); getErrorString();
translateModelFMU(BigModel); getErrorString();
使用命令行:
adrpo33@ida-0030 MINGW64 /c/home/adrpo33/dev/OMTesting/test
$ time ~/dev/OpenModelica/build/bin/omc -n=1 -d=execstat fmu.mos > trace.txt 2>&1
有了这个结果:
true
"Notification: Performance of loadFile(BigModel.mo): time 0.001069/0.00107, allocations: 19.95 kB / 3.378 MB, free: 1.066 MB / 4.402 MB
"
""
"Notification: Performance of FrontEnd - loaded program: time 2.53e-005/2.53e-005, allocations: 8.109 kB / 3.803 MB, free: 0.6406 MB / 4.402 MB
Notification: Performance of FrontEnd - Absyn->SCode: time 8.684e-006/8.08e-005, allocations: 4.109 kB / 3.807 MB, free: 0.6367 MB / 4.402 MB
Notification: Performance of FrontEnd - scodeFlatten: time 0.008003/0.008111, allocations: 2.238 MB / 6.045 MB, free: 1.133 MB / 5.871 MB
Notification: Performance of FrontEnd - mkProgramGraph: time 5.286e-005/0.008211, allocations: 36.11 kB / 6.08 MB, free: 1.098 MB / 5.871 MB
Notification: Performance of FrontEnd: time 130.7/130.7, allocations: -1064517280 / -1058141792, free: 24 MB / 383.5 MB
Notification: Performance of Transformations before backend: time 0.03745/130.7, allocations: 6.872 MB / -1050935456, free: 24 MB / 383.5 MB
Notification: Performance of Generate backend data structure: time 3.862/134.6, allocations: 339.6 MB / -694807840, free: 0 / 0.5191 GB
Notification: Performance of prepare preOptimizeDAE: time 9.779e-005/134.6, allocations: 14.38 kB / -694793120, free: 0 / 0.5191 GB
Notification: Performance of preOpt normalInlineFunction (simulation): time 0.4386/135, allocations: 37.08 MB / -655909072, free: 101.4 MB / 0.5191 GB
Notification: Performance of preOpt evaluateParameters (simulation): time 1.076/136.1, allocations: 95.27 MB / -556013488, free: 68.34 MB / 0.5191 GB
Notification: Performance of preOpt simplifyIfEquations (simulation): time 0.0443/136.2, allocations: 13.73 MB / -541611840, free: 54.61 MB / 0.5191 GB
Notification: Performance of preOpt expandDerOperator (simulation): time 0.324/136.5, allocations: 46.69 MB / -492650352, free: 9.816 MB / 0.5191 GB
Notification: Performance of preOpt removeEqualFunctionCalls (simulation): time 3.973/140.4, allocations: 434.9 MB / -36674560, free: 6.402 MB / 0.5347 GB
Notification: Performance of preOpt clockPartitioning (simulation): time 4.345/144.8, allocations: 0.5446 GB / 0.5105 GB, free: 7.621 MB / 0.7378 GB
Notification: Performance of preOpt findStateOrder (simulation): time 0.1166/144.9, allocations: 3.431 MB / 0.5138 GB, free: 5.531 MB / 0.7378 GB
Notification: Performance of preOpt replaceEdgeChange (simulation): time 0.2595/145.2, allocations: 2.064 MB / 0.5158 GB, free: 5.527 MB / 0.7378 GB
Notification: Performance of preOpt inlineArrayEqn (simulation): time 0.0404/145.2, allocations: 12.36 MB / 0.5279 GB, free: 5.527 MB / 0.7378 GB
Notification: Performance of preOpt removeSimpleEquations (simulation): time 3.416/148.6, allocations: 449.9 MB / 0.9673 GB, free: 29.4 MB / 0.9097 GB
Notification: Performance of preOpt comSubExp (simulation): time 7.473/156.1, allocations: 1.242 GB / -1922531216, free: 230.5 MB / 0.9722 GB
Notification: Performance of preOpt resolveLoops (simulation): time 2.721/158.8, allocations: 403.8 MB / -1499167600, free: 219.4 MB / 0.9722 GB
Notification: Performance of preOpt evalFunc (simulation): time 0.1624/159, allocations: 20.26 MB / -1477922608, free: 219.4 MB / 0.9722 GB
Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.07544/159.1, allocations: 39.34 MB / -1436668032, free: 211.6 MB / 0.9722 GB
Notification: Performance of pre-optimization done (n=112500): time 0.01513/159.1, allocations: 0 / -1436668032, free: 211.6 MB / 0.9722 GB
Notification: Performance of matching and sorting (n=112500): time 6.358/165.4, allocations: 0.7035 GB / -681302800, free: 57.4 MB / 0.9722 GB
Notification: Performance of inlineWhenForInitialization (initialization): time 0.8272/166.3, allocations: 0.5764 GB / -62439520, free: 133.4 MB / 1.3 GB
Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.03557/166.3, allocations: 102.6 kB / -62334496, free: 133.3 MB / 1.3 GB
Notification: Performance of collectPreVariables (initialization): time 0.198/166.5, allocations: 1.402 MB / -60864704, free: 133.3 MB / 1.3 GB
Notification: Performance of collectInitialEqns (initialization): time 0.01097/166.5, allocations: 1.795 MB / -58982608, free: 131.5 MB / 1.3 GB
Notification: Performance of collectInitialBindings (initialization): time 1.716/168.2, allocations: 425.5 MB / 369.2 MB, free: 332.3 MB / 1.3 GB
Notification: Performance of simplifyInitialFunctions (initialization): time 0.2769/168.5, allocations: 0 / 369.2 MB, free: 332.3 MB / 1.3 GB
Notification: Performance of setup shared object (initialization): time 0.2535/168.8, allocations: 51.25 MB / 420.5 MB, free: 329.1 MB / 1.3 GB
Notification: Performance of preBalanceInitialSystem (initialization): time 3.38/172.1, allocations: 352.8 MB / 0.7552 GB, free: 336.1 MB / 1.3 GB
Notification: Performance of partitionIndependentBlocks (initialization): time 4.389/176.5, allocations: 0.5341 GB / 1.289 GB, free: 124.8 MB / 1.3 GB
Notification: Performance of analyzeInitialSystem (initialization): time 4.051/180.6, allocations: 468.3 MB / 1.747 GB, free: 140.9 MB / 1.3 GB
Notification: Performance of solveInitialSystemEqSystem (initialization): time 0.03169/180.6, allocations: 1.374 MB / 1.748 GB, free: 140.9 MB / 1.3 GB
Notification: Performance of matching and sorting (n=157500) (initialization): time 8.06/188.7, allocations: 0.9828 GB / -1362827296, free: 35.2 MB / 1.378 GB
Notification: Performance of prepare postOptimizeDAE: time 3.512e-005/188.7, allocations: 5.625 kB / -1362821536, free: 35.2 MB / 1.378 GB
Notification: Performance of postOpt simplifyComplexFunction (initialization): time 0.05533/188.7, allocations: 4.807 MB / -1357780960, free: 35.2 MB / 1.378 GB
Notification: Performance of postOpt tearingSystem (initialization): time 0.07246/188.8, allocations: 10.99 MB / -1346260768, free: 35.2 MB / 1.378 GB
Notification: Performance of postOpt solveSimpleEquations (initialization): time 4.998/193.8, allocations: 315.5 MB / -1015414128, free: 94.34 MB / 1.472 GB
Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 0.06548/193.9, allocations: 13.39 MB / -1001371280, free: 94.34 MB / 1.472 GB
Notification: Performance of postOpt simplifyAllExpressions (initialization): time 1.557/195.4, allocations: 59.39 MB / -939091840, free: 74.02 MB / 1.472 GB
Notification: Performance of postOpt collapseArrayExpressions (initialization): time 0.3376/195.7, allocations: 40.51 MB / -896611008, free: 74.02 MB / 1.472 GB
Notification: Performance of prepare postOptimizeDAE: time 0.2474/196, allocations: 1.451 MB / -895089264, free: 73.95 MB / 1.472 GB
Notification: Performance of postOpt createAliasVarsForOutputStates (simulation): time 7.001/203, allocations: 0.718 GB / -124186368, free: 158.8 MB / 1.472 GB
Notification: Performance of postOpt lateInlineFunction (simulation): time 0.465/203.5, allocations: 44.3 MB / -77732736, free: 143.9 MB / 1.472 GB
Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.4331/203.9, allocations: 71.41 MB / -2853904, free: 143.9 MB / 1.472 GB
Notification: Performance of postOpt inlineArrayEqn (simulation): time 0.04548/203.9, allocations: 15.79 MB / 13.07 MB, free: 143.9 MB / 1.472 GB
Notification: Performance of postOpt constantLinearSystem (simulation): time 0.04134/204, allocations: 6.181 MB / 19.25 MB, free: 143.9 MB / 1.472 GB
Notification: Performance of postOpt simplifysemiLinear (simulation): time 0.06582/204, allocations: 10.65 MB / 29.91 MB, free: 143.9 MB / 1.472 GB
Notification: Performance of postOpt removeSimpleEquations (simulation): time 4.006/208.1, allocations: 339 MB / 369 MB, free: 156 MB / 1.472 GB
Notification: Performance of postOpt simplifyComplexFunction (simulation): time 0.03146/208.1, allocations: 4.805 MB / 373.8 MB, free: 156 MB / 1.472 GB
Notification: Performance of postOpt solveSimpleEquations (simulation): time 5.964/214.1, allocations: 316.5 MB / 0.6741 GB, free: 151.8 MB / 1.472 GB
Notification: Performance of postOpt tearingSystem (simulation): time 0.06915/214.1, allocations: 9.619 MB / 0.6835 GB, free: 148.4 MB / 1.472 GB
Notification: Performance of postOpt inputDerivativesUsed (simulation): time 0.4287/214.5, allocations: 30.9 MB / 0.7137 GB, free: 128.5 MB / 1.472 GB
Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 0.04856/214.6, allocations: 12.02 MB / 0.7254 GB, free: 117.5 MB / 1.472 GB
Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 0.02431/214.6, allocations: 7.555 MB / 0.7328 GB, free: 109.9 MB / 1.472 GB
Notification: Performance of postOpt detectJacobianSparsePattern (simulation): time 37.72/252.3, allocations: -1209710736 / -422866672, free: 0.7053 GB / -1724342272
Notification: Performance of postOpt removeConstants (simulation): time 1.288/253.6, allocations: 113.4 MB / -303983904, free: 0.5939 GB / -1724342272
Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 0.5424/254.2, allocations: 24.38 MB / -278421456, free: 0.57 GB / -1724342272
Notification: Performance of postOpt simplifyAllExpressions (simulation): time 1.631/255.8, allocations: 4.121 MB / -274100176, free: 0.566 GB / -1724342272
Notification: Performance of postOpt findZeroCrossings (simulation): time 0.9685/256.8, allocations: 69.35 MB / -201383472, free: 0.9268 GB / -1724342272
Notification: Performance of postOpt collapseArrayExpressions (simulation): time 0.2593/257, allocations: 34.33 MB / -165385120, free: 0.9268 GB / -1724342272
Notification: Performance of sort global known variables: time 8.42e-005/257, allocations: 84.09 kB / -165299008, free: 0.9268 GB / -1724342272
Notification: Performance of remove unused functions: time 1.37/258.4, allocations: 116.7 MB / -42898336, free: 0.9268 GB / -1724342272
Notification: Performance of Backend phase and start with SimCode phase: time 39.46/297.9, allocations: 393.4 MB / 352.5 MB, free: 0.89 GB / -1715953664
Notification: Performance of simCode: created initialization part: time 5.951/303.8, allocations: 0.8172 GB / 1.161 GB, free: 0.8811 GB / -1715953664
Notification: Performance of simCode: created event and clocks part: time 0.00486/303.8, allocations: 0.6865 MB / 1.162 GB, free: 0.8811 GB / -1715953664
Notification: Performance of simCode: created simulation system equations: time 2.295/306.1, allocations: 397.2 MB / 1.55 GB, free: 0.8525 GB / -1715953664
Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 1.112/307.2, allocations: 12.37 MB / 1.562 GB, free: 0.8525 GB / -1715953664
Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 11.74/319, allocations: -2053937424 / -376601600, free: 0.7194 GB / -1699176448
Notification: Performance of simCode: all other stuff during SimCode phase: time 3.699/322.7, allocations: 480.8 MB / 121.6 MB, free: 0.7004 GB / -1699176448
Notification: Performance of SimCode: time 2.643e-006/322.7, allocations: 3.594 kB / 121.6 MB, free: 0.7004 GB / -1699176448
Notification: Performance of buildModelFMU: Generate the FMI files: time 63.56/386.2, allocations: -2089164704 / -1961640176, free: 7.172 MB / -843538432
Notification: Performance of buildModelFMU: configured platform dynamic using cached values: time 0.008376/386.2, allocations: 145.7 kB / -1961490976, free: 6.98 MB / -843538432
Error: Error building simulator. Build log: gcc -falign-functions -msse2 -mfpmath=sse -Iinclude/ -Iinclude/fmi2 -I. -DOMC_MODEL_PREFIX=BigModel -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o BigModel_FMU.o BigModel_FMU.c
gcc -falign-functions -msse2 -mfpmath=sse -Iinclude/ -Iinclude/fmi2 -I. -DOMC_MODEL_PREFIX=BigModel -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o BigModel.o BigModel.c
gcc -falign-functions -msse2 -mfpmath=sse -Iinclude/ -Iinclude/fmi2 -I. -DOMC_MODEL_PREFIX=BigModel -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o BigModel_functions.o BigModel_functions.c
gcc -falign-functions -msse2 -mfpmath=sse -Iinclude/ -Iinclude/fmi2 -I. -DOMC_MODEL_PREFIX=BigModel -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o BigModel_records.o BigModel_records.c
gcc -falign-functions -msse2 -mfpmath=sse -Iinclude/ -Iinclude/fmi2 -I. -DOMC_MODEL_PREFIX=BigModel -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o BigModel_01exo.o BigModel_01exo.c
gcc -falign-functions -msse2 -mfpmath=sse -Iinclude/ -Iinclude/fmi2 -I. -DOMC_MODEL_PREFIX=BigModel -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o BigModel_02nls.o BigModel_02nls.c
gcc -falign-functions -msse2 -mfpmath=sse -Iinclude/ -Iinclude/fmi2 -I. -DOMC_MODEL_PREFIX=BigModel -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o BigModel_03lsy.o BigModel_03lsy.c
gcc -falign-functions -msse2 -mfpmath=sse -Iinclude/ -Iinclude/fmi2 -I. -DOMC_MODEL_PREFIX=BigModel -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o BigModel_04set.o BigModel_04set.c
gcc -falign-functions -msse2 -mfpmath=sse -Iinclude/ -Iinclude/fmi2 -I. -DOMC_MODEL_PREFIX=BigModel -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o BigModel_05evt.o BigModel_05evt.c
gcc -falign-functions -msse2 -mfpmath=sse -Iinclude/ -Iinclude/fmi2 -I. -DOMC_MODEL_PREFIX=BigModel -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o BigModel_06inz.o BigModel_06inz.c
gcc -falign-functions -msse2 -mfpmath=sse -Iinclude/ -Iinclude/fmi2 -I. -DOMC_MODEL_PREFIX=BigModel -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o BigModel_07dly.o BigModel_07dly.c
gcc -falign-functions -msse2 -mfpmath=sse -Iinclude/ -Iinclude/fmi2 -I. -DOMC_MODEL_PREFIX=BigModel -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o BigModel_08bnd.o BigModel_08bnd.c
gcc -falign-functions -msse2 -mfpmath=sse -Iinclude/ -Iinclude/fmi2 -I. -DOMC_MODEL_PREFIX=BigModel -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o BigModel_09alg.o BigModel_09alg.c
gcc -falign-functions -msse2 -mfpmath=sse -Iinclude/ -Iinclude/fmi2 -I. -DOMC_MODEL_PREFIX=BigModel -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o BigModel_10asr.o BigModel_10asr.c
gcc -falign-functions -msse2 -mfpmath=sse -Iinclude/ -Iinclude/fmi2 -I. -DOMC_MODEL_PREFIX=BigModel -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o BigModel_11mix.o BigModel_11mix.c
gcc -falign-functions -msse2 -mfpmath=sse -Iinclude/ -Iinclude/fmi2 -I. -DOMC_MODEL_PREFIX=BigModel -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o BigModel_12jac.o BigModel_12jac.c
gcc -falign-functions -msse2 -mfpmath=sse -Iinclude/ -Iinclude/fmi2 -I. -DOMC_MODEL_PREFIX=BigModel -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o BigModel_13opt.o BigModel_13opt.c
gcc -falign-functions -msse2 -mfpmath=sse -Iinclude/ -Iinclude/fmi2 -I. -DOMC_MODEL_PREFIX=BigModel -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o BigModel_14lnz.o BigModel_14lnz.c
gcc -falign-functions -msse2 -mfpmath=sse -Iinclude/ -Iinclude/fmi2 -I. -DOMC_MODEL_PREFIX=BigModel -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o BigModel_15syn.o BigModel_15syn.c
gcc -falign-functions -msse2 -mfpmath=sse -Iinclude/ -Iinclude/fmi2 -I. -DOMC_MODEL_PREFIX=BigModel -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o BigModel_16dae.o BigModel_16dae.c
gcc -falign-functions -msse2 -mfpmath=sse -Iinclude/ -Iinclude/fmi2 -I. -DOMC_MODEL_PREFIX=BigModel -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o BigModel_17inl.o BigModel_17inl.c
gcc -falign-functions -msse2 -mfpmath=sse -Iinclude/ -Iinclude/fmi2 -I. -DOMC_MODEL_PREFIX=BigModel -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o BigModel_init_fmu.o BigModel_init_fmu.c
gcc -falign-functions -msse2 -mfpmath=sse -Iinclude/ -Iinclude/fmi2 -I. -DOMC_MODEL_PREFIX=BigModel -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o BigModel_06inz_part0.o BigModel_06inz_part0.c
gcc -falign-functions -msse2 -mfpmath=sse -Iinclude/ -Iinclude/fmi2 -I. -DOMC_MODEL_PREFIX=BigModel -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o BigModel_06inz_part1.o BigModel_06inz_part1.c
gcc -falign-functions -msse2 -mfpmath=sse -Iinclude/ -Iinclude/fmi2 -I. -DOMC_MODEL_PREFIX=BigModel -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o BigModel_06inz_part2.o BigModel_06inz_part2.c
cc1.exe: out of memory allocating 16777144 bytes
<builtin>: recipe for target 'BigModel_12jac.o' failed
mingw32-make: *** [BigModel_12jac.o] Error 1
mingw32-make: *** Waiting for unfinished jobs....
cc1.exe: out of memory allocating 142198032 bytes
<builtin>: recipe for target 'BigModel.o' failed
mingw32-make: *** [BigModel.o] Error 1
cc1.exe: out of memory allocating 65536 bytes
<builtin>: recipe for target 'BigModel_init_fmu.o' failed
mingw32-make: *** [BigModel_init_fmu.o] Error 1
RESULT: 2
Error: Error opening file: BigModel.log: No such file or directory.
"
在 Linux 中我们使用 CLANG,而在 Windows 中我们使用 GCC,似乎 GCC 更需要内存。
应该可以达到 n=22500 但可能使用较新的 GCC,因为我们在 OMC 中拥有的 GCC 似乎正在崩溃:
adrpo33@ida-0030 MINGW64 /c/home/adrpo33/dev/OMTesting/test/BigModel.fmutmp/sources
$ make SIM_OR_DYNLOAD_OPT_LEVEL=-O0
gcc -O0 -falign-functions -msse2 -mfpmath=sse -Iinclude/ -Iinclude/fmi2 -I. -DOMC_MODEL_PREFIX=BigModel -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o BigModel.o BigModel.c
BigModel.c: In function 'BigModel_eqFunction_228127':
BigModel.c:847581:1: internal compiler error: Segmentation fault