Skip to content

Commit

Permalink
Initialization and simulation success messages on stdout
Browse files Browse the repository at this point in the history
ticket:4486
  • Loading branch information
ptaeuber authored and OpenModelica-Hudson committed Aug 9, 2017
1 parent e988ea4 commit dc49b6e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Expand Up @@ -200,6 +200,7 @@ static int symbolic_initialization(DATA *data, threadData_t *threadData)
if (data->callback->useHomotopy == 0 || init_lambda_steps < 2){
data->simulationInfo->lambda = 1.0;
data->callback->functionInitialEquations(data, threadData);
infoStreamPrint(LOG_STDOUT, 0, "The initialization finished successfully without homotopy method.");

/* If there is homotopy in the model and global homotopy is activated
and homotopy on first try is deactivated,
Expand All @@ -214,14 +215,14 @@ static int symbolic_initialization(DATA *data, threadData_t *threadData)
infoStreamPrint(LOG_INIT, 0, "Try to solve the initialization problem without homotopy first.");
data->callback->functionInitialEquations(data, threadData);
init_lambda_steps = 0;
infoStreamPrint(LOG_INIT, 0, "Initialization finished without homotopy.");
infoStreamPrint(LOG_STDOUT, 0, "The initialization finished successfully without homotopy method.");

/* catch */
#ifndef OMC_EMCC
MMC_CATCH_INTERNAL(simulationJumpBuffer)
#endif
if(init_lambda_steps > 0)
warningStreamPrint(LOG_ASSERT, 0, "Failed to solve the initial system without homotopy. If homotopy is available the homotopy method is now used.");
warningStreamPrint(LOG_ASSERT, 0, "Failed to solve the initial system without homotopy method. If homotopy is available the homotopy method is used now.");
}

/* If there is homotopy in the model and global homotopy is activated
Expand Down Expand Up @@ -276,6 +277,7 @@ static int symbolic_initialization(DATA *data, threadData_t *threadData)
check_mixed_solutions(data, 0))
break;
}
infoStreamPrint(LOG_STDOUT, 0, "The initialization finished successfully with homotopy method.");
messageClose(LOG_INIT);
}

Expand Down
1 change: 1 addition & 0 deletions SimulationRuntime/c/simulation/solver/solver_main.c
Expand Up @@ -789,6 +789,7 @@ int solver_main(DATA* data, threadData_t *threadData, const char* init_initMetho
{
freeSolverData(data, &solverInfo);
}
infoStreamPrint(LOG_STDOUT, 0, "The simulation finished successfully.");

TRACE_POP
return retVal;
Expand Down

0 comments on commit dc49b6e

Please sign in to comment.