Skip to content
This repository was archived by the owner on May 18, 2019. It is now read-only.

Commit e05d9d5

Browse files
lochelOpenModelica-Hudson
authored andcommitted
Move timings from LOG_LS to LOG_LS_V
1 parent 65dd5bc commit e05d9d5

File tree

5 files changed

+18
-26
lines changed

5 files changed

+18
-26
lines changed

SimulationRuntime/c/simulation/solver/linearSolverKlu.c

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -221,24 +221,20 @@ solveKlu(DATA *data, threadData_t *threadData, int sysNumber)
221221
}
222222
tmpJacEvalTime = rt_ext_tp_tock(&(solverData->timeClock));
223223
systemData->jacobianTime += tmpJacEvalTime;
224-
infoStreamPrint(LOG_LS, 0, "### %f time to set Matrix A and vector b.", tmpJacEvalTime);
224+
infoStreamPrint(LOG_LS_V, 0, "### %f time to set Matrix A and vector b.", tmpJacEvalTime);
225225

226226
if (ACTIVE_STREAM(LOG_LS_V))
227227
{
228-
if (ACTIVE_STREAM(LOG_LS_V))
229-
{
230-
infoStreamPrint(LOG_LS_V, 1, "Old solution x:");
231-
for(i = 0; i < solverData->n_row; ++i)
232-
infoStreamPrint(LOG_LS_V, 0, "[%d] %s = %g", i+1, modelInfoGetEquation(&data->modelData->modelDataXml,eqSystemNumber).vars[i], systemData->x[i]);
228+
infoStreamPrint(LOG_LS_V, 1, "Old solution x:");
229+
for(i = 0; i < solverData->n_row; ++i)
230+
infoStreamPrint(LOG_LS_V, 0, "[%d] %s = %g", i+1, modelInfoGetEquation(&data->modelData->modelDataXml,eqSystemNumber).vars[i], systemData->x[i]);
231+
messageClose(LOG_LS_V);
233232

234-
messageClose(LOG_LS_V);
235-
}
236233
infoStreamPrint(LOG_LS_V, 1, "Matrix A n_rows = %d", solverData->n_row);
237234
for (i=0; i<solverData->n_row; i++){
238235
infoStreamPrint(LOG_LS_V, 0, "%d. Ap => %d -> %d", i, solverData->Ap[i], solverData->Ap[i+1]);
239236
for (j=solverData->Ap[i]; j<solverData->Ap[i+1]; j++){
240237
infoStreamPrint(LOG_LS_V, 0, "A[%d,%d] = %f", i, solverData->Ai[j], solverData->Ax[j]);
241-
242238
}
243239
}
244240
messageClose(LOG_LS_V);
@@ -285,7 +281,7 @@ solveKlu(DATA *data, threadData_t *threadData, int sysNumber)
285281
}
286282
}
287283

288-
infoStreamPrint(LOG_LS, 0, "Solve System: %f", rt_ext_tp_tock(&(solverData->timeClock)));
284+
infoStreamPrint(LOG_LS_V, 0, "Solve System: %f", rt_ext_tp_tock(&(solverData->timeClock)));
289285

290286
/* print solution */
291287
if (1 == success){

SimulationRuntime/c/simulation/solver/linearSolverLapack.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ int solveLapack(DATA *data, threadData_t *threadData, int sysNumber)
208208
}
209209
tmpJacEvalTime = rt_ext_tp_tock(&(solverData->timeClock));
210210
systemData->jacobianTime += tmpJacEvalTime;
211-
infoStreamPrint(LOG_LS, 0, "### %f time to set Matrix A and vector b.", tmpJacEvalTime);
211+
infoStreamPrint(LOG_LS_V, 0, "### %f time to set Matrix A and vector b.", tmpJacEvalTime);
212212

213213
/* Log A*x=b */
214214
if(ACTIVE_STREAM(LOG_LS_V)){
@@ -229,7 +229,7 @@ int solveLapack(DATA *data, threadData_t *threadData, int sysNumber)
229229
(int*) &systemData->size,
230230
&solverData->info);
231231

232-
infoStreamPrint(LOG_LS, 0, "Solve System: %f", rt_ext_tp_tock(&(solverData->timeClock)));
232+
infoStreamPrint(LOG_LS_V, 0, "Solve System: %f", rt_ext_tp_tock(&(solverData->timeClock)));
233233

234234
if(solverData->info < 0)
235235
{

SimulationRuntime/c/simulation/solver/linearSolverLis.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,11 +246,11 @@ solveLis(DATA *data, threadData_t *threadData, int sysNumber)
246246
}
247247
tmpJacEvalTime = rt_ext_tp_tock(&(solverData->timeClock));
248248
systemData->jacobianTime += tmpJacEvalTime;
249-
infoStreamPrint(LOG_LS, 0, "### %f time to set Matrix A and vector b.", tmpJacEvalTime);
249+
infoStreamPrint(LOG_LS_V, 0, "### %f time to set Matrix A and vector b.", tmpJacEvalTime);
250250

251251
rt_ext_tp_tick(&(solverData->timeClock));
252252
err = lis_solve(solverData->A,solverData->b,solverData->x,solverData->solver);
253-
infoStreamPrint(LOG_LS, 0, "Solve System: %f", rt_ext_tp_tock(&(solverData->timeClock)));
253+
infoStreamPrint(LOG_LS_V, 0, "Solve System: %f", rt_ext_tp_tock(&(solverData->timeClock)));
254254

255255
if (err){
256256
warningStreamPrint(LOG_LS_V, 0, "lis_solve : %s(code=%d)\n\n ", lis_returncode[err], err);

SimulationRuntime/c/simulation/solver/linearSolverTotalPivot.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -432,12 +432,12 @@ int solveTotalPivot(DATA *data, threadData_t *threadData, int sysNumber)
432432
}
433433
tmpJacEvalTime = rt_ext_tp_tock(&(solverData->timeClock));
434434
systemData->jacobianTime += tmpJacEvalTime;
435-
infoStreamPrint(LOG_LS, 0, "### %f time to set Matrix A and vector b.", tmpJacEvalTime);
435+
infoStreamPrint(LOG_LS_V, 0, "### %f time to set Matrix A and vector b.", tmpJacEvalTime);
436436
debugMatrixDoubleLS(LOG_LS_V,"LGS: matrix Ab",solverData->Ab, n, n+1);
437437

438438
rt_ext_tp_tick(&(solverData->timeClock));
439439
status = solveSystemWithTotalPivotSearchLS(n, solverData->x, solverData->Ab, solverData->indRow, solverData->indCol, &rank);
440-
infoStreamPrint(LOG_LS, 0, "Solve System: %f", rt_ext_tp_tock(&(solverData->timeClock)));
440+
infoStreamPrint(LOG_LS_V, 0, "Solve System: %f", rt_ext_tp_tock(&(solverData->timeClock)));
441441

442442
if (status != 0)
443443
{

SimulationRuntime/c/simulation/solver/linearSolverUmfpack.c

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -238,24 +238,20 @@ solveUmfPack(DATA *data, threadData_t *threadData, int sysNumber)
238238
}
239239
tmpJacEvalTime = rt_ext_tp_tock(&(solverData->timeClock));
240240
systemData->jacobianTime += tmpJacEvalTime;
241-
infoStreamPrint(LOG_LS, 0, "### %f time to set Matrix A and vector b.", tmpJacEvalTime);
241+
infoStreamPrint(LOG_LS_V, 0, "### %f time to set Matrix A and vector b.", tmpJacEvalTime);
242242

243243
if (ACTIVE_STREAM(LOG_LS_V))
244244
{
245-
if (ACTIVE_STREAM(LOG_LS_V))
246-
{
247-
infoStreamPrint(LOG_LS_V, 1, "Old solution x:");
248-
for(i = 0; i < solverData->n_row; ++i)
249-
infoStreamPrint(LOG_LS_V, 0, "[%d] %s = %g", i+1, modelInfoGetEquation(&data->modelData->modelDataXml,eqSystemNumber).vars[i], systemData->x[i]);
245+
infoStreamPrint(LOG_LS_V, 1, "Old solution x:");
246+
for(i = 0; i < solverData->n_row; ++i)
247+
infoStreamPrint(LOG_LS_V, 0, "[%d] %s = %g", i+1, modelInfoGetEquation(&data->modelData->modelDataXml,eqSystemNumber).vars[i], systemData->x[i]);
248+
messageClose(LOG_LS_V);
250249

251-
messageClose(LOG_LS_V);
252-
}
253250
infoStreamPrint(LOG_LS_V, 1, "Matrix A n_rows = %d", solverData->n_row);
254251
for (i=0; i<solverData->n_row; i++){
255252
infoStreamPrint(LOG_LS_V, 0, "%d. Ap => %d -> %d", i, solverData->Ap[i], solverData->Ap[i+1]);
256253
for (j=solverData->Ap[i]; j<solverData->Ap[i+1]; j++){
257254
infoStreamPrint(LOG_LS_V, 0, "A[%d,%d] = %f", i, solverData->Ai[j], solverData->Ax[j]);
258-
259255
}
260256
}
261257
messageClose(LOG_LS_V);
@@ -295,7 +291,7 @@ solveUmfPack(DATA *data, threadData_t *threadData, int sysNumber)
295291
success = 1;
296292
}
297293
}
298-
infoStreamPrint(LOG_LS, 0, "Solve System: %f", rt_ext_tp_tock(&(solverData->timeClock)));
294+
infoStreamPrint(LOG_LS_V, 0, "Solve System: %f", rt_ext_tp_tock(&(solverData->timeClock)));
299295

300296
/* print solution */
301297
if (1 == success){

0 commit comments

Comments
 (0)