Skip to content

Commit 533b589

Browse files
author
Marcus Walther
committed
- Added some methods to create and handle parallel informations to HpcOmSimCode.mo
- Extended the SimCode-Structure with simple parallel informations for HpcOm - An error message is now shown if the profiling-xml file is missing and the hpcom-flag is set - OpenMP based code-generation of HpcOm is now part of the Susan-C-Codegen - Added a new clock to the rtclock-structure. It is now possible to measure the time in cpu-cycles with RDTSC under Windows git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@16698 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
1 parent 336ab4b commit 533b589

File tree

14 files changed

+695
-331
lines changed

14 files changed

+695
-331
lines changed

Compiler/BackEnd/BackendQSS.mo

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1015,11 +1015,13 @@ algorithm
10151015
list<SimCode.JacobianMatrix> jacobianMatrixes;
10161016
list<SimCode.SimEqSystem> eqs;
10171017
BackendDAE.SampleLookup sampleLookup;
1018+
Option<SimCode.HpcOmParInformation> hpcOmParInformationOpt;
1019+
10181020
case (SimCode.SIMCODE(modelInfo,literals,recordDecls,externalFunctionIncludes,allEquations,odeEquations,
10191021
algebraicEquations,residualEquations,useSymbolicInitialization,useHomotopy,initialEquations,startValueEquations,
10201022
parameterEquations,inlineEquations,removedEquations,algorithmAndEquationAsserts,stateSets,constraints,classAttributes,zeroCrossings,relations,
10211023
sampleLookup,whenClauses,discreteModelVars,extObjInfo,makefileParams,
1022-
delayedExps,jacobianMatrixes,simulationSettingsOpt,fileNamePrefix,crefToSimVarHT),_)
1024+
delayedExps,jacobianMatrixes,simulationSettingsOpt,fileNamePrefix,crefToSimVarHT,hpcOmParInformationOpt),_)
10231025
equation
10241026
{eqs} = odeEquations;
10251027
eqs = List.map1(eqs,replaceZC,zc_exps);
@@ -1030,7 +1032,7 @@ algorithm
10301032
zeroCrossings, relations, sampleLookup,
10311033
whenClauses, discreteModelVars, extObjInfo,
10321034
makefileParams, delayedExps, jacobianMatrixes,
1033-
simulationSettingsOpt, fileNamePrefix, crefToSimVarHT);
1035+
simulationSettingsOpt, fileNamePrefix, crefToSimVarHT,hpcOmParInformationOpt);
10341036

10351037
end match;
10361038
end replaceDiscontsInOde;

Compiler/BackEnd/HpcOmSimCode.mo

Lines changed: 264 additions & 119 deletions
Large diffs are not rendered by default.

Compiler/BackEnd/HpcOmTaskGraph.mo

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public uniontype TaskGraphMeta // stores all the metadata for the TaskGraph
7070
array<String> nodeDescs; // a description of the nodes for the graphml generation
7171
array<tuple<Integer,Real>> exeCosts; // the execution cost for the nodes <numberOfOperations, requiredCycles
7272
array<list<tuple<Integer,Integer,Integer>>> commCosts; // the communication cost tuple(_,numberOfVars,requiredCycles) for an edge from array[parentNode] to tuple(childNode,_)
73-
array<Integer> nodeMark; // put some additional stuff in here
73+
array<Integer> nodeMark; // put some additional stuff in here -> this is currently not a nodeMark, its a componentMark
7474
end TASKGRAPHMETA;
7575
end TaskGraphMeta;
7676

@@ -2781,7 +2781,7 @@ algorithm
27812781
equation
27822782
true = arrayLength(inComps)>= compIdx;
27832783
compRow = arrayGet(inComps,compIdx);
2784-
print("component "+&intString(compIdx)+&" includes: "+&stringDelimitList(List.map(compRow,intString),", ")+&"\n");
2784+
print("node "+&intString(compIdx)+&" includes: "+&stringDelimitList(List.map(compRow,intString),", ")+&"\n");
27852785
printInComps(inComps,compIdx+1);
27862786
then
27872787
();
@@ -3586,14 +3586,27 @@ protected function convertSimEqToSccCosts1
35863586

35873587
protected
35883588
Integer simEqCalcCount, simEqIdx;
3589-
Real simEqCalcTime;
3589+
Real simEqCalcTime, realSimEqCalcCount;
35903590
array<Real> reqTime;
35913591

35923592
algorithm
3593-
(simEqCalcCount, simEqCalcTime) := iReqTimeOpSimCode;
3594-
(simEqIdx,reqTime) := iReqTimeOp;
3595-
reqTime := convertSimEqToSccCosts2(reqTime, simEqCalcTime, simEqIdx, iSimEqSccMapping);
3596-
oReqTimeOp := (simEqIdx+1,reqTime);
3593+
oReqTimeOp := matchcontinue(iReqTimeOpSimCode,iSimEqSccMapping,iReqTimeOp)
3594+
case(_,_,_)
3595+
equation
3596+
(simEqCalcCount, simEqCalcTime) = iReqTimeOpSimCode;
3597+
(simEqIdx,reqTime) = iReqTimeOp;
3598+
realSimEqCalcCount = intReal(simEqCalcCount);
3599+
true = realNe(realSimEqCalcCount,0.0);
3600+
reqTime = convertSimEqToSccCosts2(reqTime, realDiv(simEqCalcTime,realSimEqCalcCount), simEqIdx, iSimEqSccMapping);
3601+
then ((simEqIdx+1,reqTime));
3602+
else
3603+
equation
3604+
(simEqCalcCount, simEqCalcTime) = iReqTimeOpSimCode;
3605+
(simEqIdx,reqTime) = iReqTimeOp;
3606+
realSimEqCalcCount = intReal(simEqCalcCount);
3607+
reqTime = convertSimEqToSccCosts2(reqTime, 0.0, simEqIdx, iSimEqSccMapping);
3608+
then ((simEqIdx+1,reqTime));
3609+
end matchcontinue;
35973610
end convertSimEqToSccCosts1;
35983611

35993612
protected function convertSimEqToSccCosts2
@@ -3720,7 +3733,7 @@ algorithm
37203733

37213734
//print("Component: ");
37223735
//BackendDump.dumpComponent(comp);
3723-
//print("Operations: ");
3736+
//print("Cost: " +& realString(iCosts_cyc) +& "\n");
37243737
//print(tuple3ToString((costAdd,costMul,costTrig)));
37253738
//print("\n");
37263739
oCosts := (costAdd+costMul+costTrig + iCosts_op, realAdd(iCosts_cyc,reqTime));

Compiler/BackEnd/ResidualCmp.mo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ algorithm
188188
makefileParams = SimCode.MAKEFILE_PARAMS("","","","","","","","","",includeDirs,libs,"");
189189
delayexp = SimCode.DELAYED_EXPRESSIONS({},0);
190190
hashTable = SimCodeUtil.emptyHashTable();
191-
rescmp = SimCode.SIMCODE(modelInfo,{},recordDecls,externalFunctionIncludes,{},{},{},allEquations,false,false,allInitEquations,{},{},{},{},{},{},{},{},{},{},BackendDAE.SAMPLE_LOOKUP(0,{}),{},{},extObjInfo,makefileParams,delayexp,{},NONE(),filenamePrefix,hashTable);
191+
rescmp = SimCode.SIMCODE(modelInfo,{},recordDecls,externalFunctionIncludes,{},{},{},allEquations,false,false,allInitEquations,{},{},{},{},{},{},{},{},{},{},BackendDAE.SAMPLE_LOOKUP(0,{}),{},{},extObjInfo,makefileParams,delayexp,{},NONE(),filenamePrefix,hashTable,NONE());
192192
then
193193
rescmp;
194194
else

Compiler/BackEnd/SimCode.mo

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,9 @@ uniontype SimCode
107107
list<JacobianMatrix> jacobianMatrixes;
108108
Option<SimulationSettings> simulationSettingsOpt;
109109
String fileNamePrefix;
110-
111110
//*** a protected section *** not exported to SimCodeTV
112111
HashTableCrefToSimVar crefToSimVarHT "hidden from typeview - used by cref2simvar() for cref -> SIMVAR lookup available in templates.";
112+
Option<HpcOmParInformation> hpcOmParInformationOpt;
113113
end SIMCODE;
114114
end SimCode;
115115

@@ -594,4 +594,9 @@ efficient manner"
594594
end ValueArray;
595595

596596

597+
public uniontype HpcOmParInformation "informations for the taskgraph parallelization"
598+
record HPCOMPARINFORMATION
599+
list<list<Integer>> eqsOfLevels; //The equations of the level <%listindex%>
600+
end HPCOMPARINFORMATION;
601+
end HpcOmParInformation;
597602
end SimCode;

Compiler/BackEnd/SimCodeUtil.mo

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1665,7 +1665,8 @@ algorithm
16651665
SymbolicJacs,
16661666
simSettingsOpt,
16671667
filenamePrefix,
1668-
crefToSimVarHT);
1668+
crefToSimVarHT,
1669+
NONE());
16691670
(simCode, (_, _, lits)) = traverseExpsSimCode(simCode, findLiteralsHelper, literals);
16701671
simCode = setSimCodeLiterals(simCode, listReverse(lits));
16711672
// print("*** SimCode -> collect all files started: " +& realString(clock()) +& "\n");
@@ -5375,7 +5376,7 @@ algorithm
53755376
omhome := Settings.getInstallationDirectoryPath();
53765377
omhome := System.trim(omhome, "\""); // Remove any quotation marks from omhome.
53775378
cflags := System.getCFlags();
5378-
cflags := Debug.bcallret2(Flags.isSet(Flags.OPENMP), stringAppend, cflags, " -fopenmp", cflags);
5379+
cflags := Debug.bcallret2(Flags.isSet(Flags.OPENMP) or Flags.isSet(Flags.HPCOM), stringAppend, cflags, " -fopenmp", cflags);
53795380
ldflags := System.getLDFlags();
53805381
rtlibs := System.getRTLibs();
53815382
platform := System.modelicaPlatform();
@@ -11757,6 +11758,7 @@ algorithm
1175711758
SimCode.SimVars vars;
1175811759
list<SimCode.Function> functions;
1175911760
SimCode.Files files "all the files from Absyn.Info and DAE.ELementSource";
11761+
Option<SimCode.HpcOmParInformation> hpcOmParInformationOpt;
1176011762

1176111763
case _
1176211764
equation
@@ -11765,7 +11767,7 @@ algorithm
1176511767

1176611768
case SimCode.SIMCODE(modelInfo, literals, recordDecls, externalFunctionIncludes, allEquations, odeEquations, algebraicEquations, residualEquations, useSymbolicInitialization, useHomotopy, initialEquations, startValueEquations,
1176711769
parameterEquations, inlineEquations, removedEquations, algorithmAndEquationAsserts, stateSets, constraints, classAttributes, zeroCrossings, relations, sampleLookup, whenClauses,
11768-
discreteModelVars, extObjInfo, makefileParams, delayedExps, jacobianMatrixes, simulationSettingsOpt, fileNamePrefix, crefToSimVarHT)
11770+
discreteModelVars, extObjInfo, makefileParams, delayedExps, jacobianMatrixes, simulationSettingsOpt, fileNamePrefix, crefToSimVarHT, hpcOmParInformationOpt)
1176911771
equation
1177011772
SimCode.MODELINFO(name, directory, varInfo, vars, functions, labels) = modelInfo;
1177111773
files = {};
@@ -11782,7 +11784,7 @@ algorithm
1178211784
then
1178311785
SimCode.SIMCODE(modelInfo, literals, recordDecls, externalFunctionIncludes, allEquations, odeEquations, algebraicEquations, residualEquations, useSymbolicInitialization, useHomotopy, initialEquations, startValueEquations,
1178411786
parameterEquations, inlineEquations, removedEquations, algorithmAndEquationAsserts, stateSets, constraints, classAttributes, zeroCrossings, relations, sampleLookup, whenClauses,
11785-
discreteModelVars, extObjInfo, makefileParams, delayedExps, jacobianMatrixes, simulationSettingsOpt, fileNamePrefix, crefToSimVarHT);
11787+
discreteModelVars, extObjInfo, makefileParams, delayedExps, jacobianMatrixes, simulationSettingsOpt, fileNamePrefix, crefToSimVarHT, hpcOmParInformationOpt);
1178611788

1178711789
case _
1178811790
equation
@@ -12063,6 +12065,7 @@ algorithm
1206312065
// *** a protected section *** not exported to SimCodeTV
1206412066
SimCode.HashTableCrefToSimVar crefToSimVarHT "hidden from typeview - used by cref2simvar() for cref -> SIMVAR lookup available in templates.";
1206512067
A a;
12068+
Option<SimCode.HpcOmParInformation> hpcOmParInformationOpt;
1206612069

1206712070
case (SimCode.SIMCODE(modelInfo, literals, recordDecls, externalFunctionIncludes,
1206812071
allEquations, odeEquations, algebraicEquations, residualEquations,
@@ -12071,7 +12074,7 @@ algorithm
1207112074
constraints, classAttributes, zeroCrossings, relations, sampleLookup,
1207212075
whenClauses, discreteModelVars, extObjInfo, makefileParams,
1207312076
delayedExps, jacobianMatrixes, simulationSettingsOpt, fileNamePrefix,
12074-
crefToSimVarHT), _, a)
12077+
crefToSimVarHT, hpcOmParInformationOpt), _, a)
1207512078
equation
1207612079
(literals, a) = List.mapFoldTuple(literals, func, a);
1207712080
(allEquations, a) = traverseExpsEqSystems(allEquations, func, a, {});
@@ -12096,7 +12099,7 @@ algorithm
1209612099
constraints, classAttributes, zeroCrossings, relations, sampleLookup,
1209712100
whenClauses, discreteModelVars, extObjInfo, makefileParams,
1209812101
delayedExps, jacobianMatrixes, simulationSettingsOpt, fileNamePrefix,
12099-
crefToSimVarHT), a);
12102+
crefToSimVarHT, hpcOmParInformationOpt), a);
1210012103
end match;
1210112104
end traverseExpsSimCode;
1210212105

@@ -12264,21 +12267,22 @@ algorithm
1226412267
String fileNamePrefix;
1226512268
// *** a protected section *** not exported to SimCodeTV
1226612269
SimCode.HashTableCrefToSimVar crefToSimVarHT "hidden from typeview - used by cref2simvar() for cref -> SIMVAR lookup available in templates.";
12267-
12270+
Option<SimCode.HpcOmParInformation> hpcOmParInformationOpt;
12271+
1226812272
case (SimCode.SIMCODE(modelInfo, _, recordDecls, externalFunctionIncludes,
1226912273
allEquations, odeEquations, algebraicEquations, residualEquations,
1227012274
useSymbolicInitialization, useHomotopy, initialEquations, startValueEquations,
1227112275
parameterEquations, inlineEquations, removedEquations, algorithmAndEquationAsserts, stateSets,
1227212276
constraints, classAttributes, zeroCrossings, relations, sampleLookup,
1227312277
whenClauses, discreteModelVars, extObjInfo, makefileParams,
12274-
delayedExps, jacobianMatrixes, simulationSettingsOpt, fileNamePrefix, crefToSimVarHT), _)
12278+
delayedExps, jacobianMatrixes, simulationSettingsOpt, fileNamePrefix, crefToSimVarHT, hpcOmParInformationOpt), _)
1227512279
then SimCode.SIMCODE(modelInfo, literals, recordDecls, externalFunctionIncludes,
1227612280
allEquations, odeEquations, algebraicEquations, residualEquations,
1227712281
useSymbolicInitialization, useHomotopy, initialEquations, startValueEquations,
1227812282
parameterEquations, inlineEquations, removedEquations, algorithmAndEquationAsserts, stateSets,
1227912283
constraints, classAttributes, zeroCrossings, relations, sampleLookup,
1228012284
whenClauses, discreteModelVars, extObjInfo, makefileParams,
12281-
delayedExps, jacobianMatrixes, simulationSettingsOpt, fileNamePrefix, crefToSimVarHT);
12285+
delayedExps, jacobianMatrixes, simulationSettingsOpt, fileNamePrefix, crefToSimVarHT, hpcOmParInformationOpt);
1228212286
end match;
1228312287
end setSimCodeLiterals;
1228412288

Compiler/Template/CodegenC.tpl

Lines changed: 136 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -140,13 +140,26 @@ template simulationFile(SimCode simCode, String guid)
140140
int measure_time_flag = 0;
141141
#endif
142142
143-
143+
<%if Flags.isSet(HPCOM) then "#define HPCOM"%>
144+
145+
#ifdef HPCOM
146+
#include <omp.h>
147+
#endif
148+
144149
#ifdef _OPENMP
145-
#include <omp.h>
146-
#include <omp_perform_simulation.c>
150+
#ifndef HPCOM
151+
#include <omp.h>
152+
#include <omp_perform_simulation.c>
153+
#else
154+
#include <perform_simulation.c>
155+
#endif
147156
#else
148-
#include <perform_simulation.c>
149-
#define omp_get_max_threads() 1
157+
#ifndef HPCOM
158+
#include <perform_simulation.c>
159+
#define omp_get_max_threads() 1
160+
#else
161+
#include <perform_simulation.c>
162+
#endif
150163
#endif
151164
152165
@@ -198,7 +211,7 @@ template simulationFile(SimCode simCode, String guid)
198211
199212
<%functionDAE(allEquations, whenClauses)%>
200213
201-
<%functionODE(odeEquations,(match simulationSettingsOpt case SOME(settings as SIMULATION_SETTINGS(__)) then settings.method else ""))%>
214+
<%functionODE(odeEquations,(match simulationSettingsOpt case SOME(settings as SIMULATION_SETTINGS(__)) then settings.method else ""),hpcOmParInformationOpt)%>
202215
203216
<%functionAlgebraic(algebraicEquations)%>
204217
@@ -1523,6 +1536,119 @@ end functionWhenReinitStatementThen;
15231536
// >>
15241537
//end functionWhenReinitStatementElse;
15251538

1539+
//------------------------------------
1540+
// Begin: Modified functions for HpcOm
1541+
//------------------------------------
1542+
1543+
template functionXXX_systems_HPCOM(list<list<SimEqSystem>> eqs, String name, Text &loop, Text &varDecls, Option<HpcOmParInformation> hpcOmParInformationOpt)
1544+
::=
1545+
match hpcOmParInformationOpt
1546+
case SOME(info as HPCOMPARINFORMATION(__)) then
1547+
let funcs = (eqs |> eq hasindex i0 fromindex 0 => functionXXX_system_HPCOM(eq,name,i0,info.eqsOfLevels) ; separator="\n")
1548+
match listLength(eqs)
1549+
case 0 then //empty case
1550+
let &loop +=
1551+
<<
1552+
/* no <%name%> systems */
1553+
>>
1554+
""
1555+
case 1 then //1 function
1556+
let &loop +=
1557+
<<
1558+
function<%name%>_system0(data);
1559+
>>
1560+
funcs //just the one function
1561+
case nFuncs then //2 and more
1562+
let funcNames = eqs |> e hasindex i0 fromindex 0 => 'function<%name%>_system<%i0%>' ; separator=",\n"
1563+
let head = if Flags.isSet(Flags.OPENMP) then '#pragma omp parallel for private(id) schedule(<%match noProc() case 0 then "dynamic" else "static"%>)'
1564+
let &varDecls += 'int id;<%\n%>'
1565+
1566+
let &loop +=
1567+
/* Text for the loop body that calls the equations */
1568+
<<
1569+
<%head%>
1570+
for(id=0; id<<%nFuncs%>; id++) {
1571+
function<%name%>_systems[id](data);
1572+
}
1573+
>>
1574+
/* Text before the function head */
1575+
<<
1576+
<%funcs%>
1577+
static void (*function<%name%>_systems[<%nFuncs%>])(DATA *) = {
1578+
<%funcNames%>
1579+
};
1580+
>>
1581+
else (error(sourceInfo(), ' MISSING PARALLEL INFORMATIONS FOR HPCOM '))
1582+
end functionXXX_systems_HPCOM;
1583+
1584+
template functionXXX_system_HPCOM(list<SimEqSystem> derivativEquations, String name, Integer n, list<list<Integer>> eqsOfLevel)
1585+
::=
1586+
let odeEqs = eqsOfLevel |> eqs => functionXXX_system0_HPCOM(derivativEquations,name,eqs); separator="\n"
1587+
<<
1588+
static void function<%name%>_system<%n%>(DATA *data)
1589+
{
1590+
state mem_state;
1591+
mem_state = get_memory_state();
1592+
<%odeEqs%>
1593+
restore_memory_state(mem_state);
1594+
}
1595+
>>
1596+
end functionXXX_system_HPCOM;
1597+
1598+
template functionXXX_system0_HPCOM(list<SimEqSystem> derivativEquations, String name, list<Integer> eqsOfLevel)
1599+
::=
1600+
//let odeEqs = "#pragma omp parallel sections\n{"
1601+
let odeEqs = eqsOfLevel |> eq => equationNamesHPCOM_(eq,derivativEquations,contextSimulationNonDiscrete); separator="\n"
1602+
<<
1603+
#pragma omp parallel sections
1604+
{
1605+
<%odeEqs%>
1606+
}
1607+
>>
1608+
end functionXXX_system0_HPCOM;
1609+
1610+
template equationNamesHPCOM_(Integer idx, list<SimEqSystem> derivativEquations, Context context)
1611+
"Generates an equation.
1612+
This template should not be used for a SES_RESIDUAL.
1613+
Residual equations are handled differently."
1614+
::=
1615+
match context
1616+
case SIMULATION(genDiscrete=true) then
1617+
match getSimCodeEqByIndex(derivativEquations, idx)
1618+
case e as SES_ALGORITHM(statements={})
1619+
then ""
1620+
else
1621+
let ix = equationIndex(getSimCodeEqByIndex(derivativEquations, idx))
1622+
<<
1623+
#ifdef _OMC_MEASURE_TIME
1624+
SIM_PROF_TICK_EQEXT(<%ix%>);
1625+
#endif
1626+
eqFunction_<%ix%>(data);
1627+
#ifdef _OMC_MEASURE_TIME
1628+
SIM_PROF_ACC_EQEXT(<%ix%>);
1629+
#endif
1630+
>>
1631+
else
1632+
match getSimCodeEqByIndex(derivativEquations, idx)
1633+
case e as SES_ALGORITHM(statements={})
1634+
then ""
1635+
else
1636+
let ix = equationIndex(getSimCodeEqByIndex(derivativEquations, idx))
1637+
<<
1638+
#ifdef _OMC_MEASURE_TIME
1639+
SIM_PROF_TICK_EQEXT(<%ix%>);
1640+
#endif
1641+
eqFunction_<%ix%>(data);
1642+
#ifdef _OMC_MEASURE_TIME
1643+
SIM_PROF_ACC_EQEXT(<%ix%>);
1644+
#endif
1645+
>>
1646+
end equationNamesHPCOM_;
1647+
1648+
//----------------------------------
1649+
// End: Modified functions for HpcOm
1650+
//----------------------------------
1651+
15261652
template functionXXX_system(list<SimEqSystem> derivativEquations, String name, Integer n)
15271653
::=
15281654
let odeEqs = derivativEquations |> eq => equationNames_(eq,contextSimulationNonDiscrete); separator="\n"
@@ -1539,7 +1665,7 @@ end functionXXX_system;
15391665
15401666
template functionXXX_systems(list<list<SimEqSystem>> eqs, String name, Text &loop, Text &varDecls)
15411667
::=
1542-
let funcs = eqs |> eq hasindex i0 fromindex 0 => functionXXX_system(eq,name,i0) ; separator="\n"
1668+
let funcs = (eqs |> eq hasindex i0 fromindex 0 => functionXXX_system(eq,name,i0) ; separator="\n")
15431669
match listLength(eqs)
15441670
case 0 then //empty case
15451671
let &loop +=
@@ -1575,14 +1701,15 @@ template functionXXX_systems(list<list<SimEqSystem>> eqs, String name, Text &loo
15751701
>>
15761702
end functionXXX_systems;
15771703
1578-
template functionODE(list<list<SimEqSystem>> derivativEquations, Text method)
1704+
template functionODE(list<list<SimEqSystem>> derivativEquations, Text method, Option<HpcOmParInformation> hpcOmParInformationOpt)
15791705
"Generates function in simulation file."
15801706
::=
15811707
let () = System.tmpTickReset(0)
15821708
let &varDecls2 = buffer "" /*BUFD*/
15831709
let &varDecls = buffer ""
15841710
let &loop = buffer ""
1585-
let systems = functionXXX_systems(derivativEquations, "ODE", &loop, &varDecls)
1711+
let systems = if Flags.isSet(Flags.HPCOM) then (functionXXX_systems_HPCOM(derivativEquations, "ODE", &loop, &varDecls, hpcOmParInformationOpt)) else (functionXXX_systems(derivativEquations, "ODE", &loop, &varDecls))
1712+
/* let systems = functionXXX_systems(derivativEquations, "ODE", &loop, &varDecls) */
15861713
let &tmp = buffer ""
15871714
let stateContPartInline = (derivativEquations |> eqs => (eqs |> eq =>
15881715
equation_(eq, contextInlineSolver, &varDecls2 /*BUFC*/, &tmp); separator="\n")

0 commit comments

Comments
 (0)