Changeset f2e948cb in OpenModelica
- Timestamp:
- 2016-11-14T08:22:12+01:00 (8 years ago)
- Branches:
- Added-citation-metadata, maintenance/v1.14, maintenance/v1.15, maintenance/v1.16, maintenance/v1.17, maintenance/v1.18, maintenance/v1.19, maintenance/v1.20, maintenance/v1.21, maintenance/v1.22, maintenance/v1.23, master, omlib-staging
- Children:
- b6a7a6d6
- Parents:
- c26746f
- git-author:
- Rüdiger Franke <rdgfranke@…> (11/14/16 07:37:29)
- git-committer:
- hudson <openmodelica@…> (11/14/16 08:22:12)
- Location:
- SimulationRuntime/cpp
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
SimulationRuntime/cpp/Core/SimController/SimManager.cpp
r47e1846 rf2e948cb 266 266 try 267 267 { 268 LOGGER_WRITE("SimManager: Start simulation at t = " + to_string(_tStart), LC_SOLV , LL_INFO);268 LOGGER_WRITE("SimManager: Start simulation at t = " + to_string(_tStart), LC_SOLVER, LL_INFO); 269 269 runSingleProcess(); 270 270 // Measure time; Output SimInfos … … 272 272 if ((status & ISolver::DONE) || (status & ISolver::USER_STOP)) 273 273 { 274 //LOGGER_WRITE("SimManager: Simulation done at t = " + to_string(_tEnd), LC_SOLV , LL_INFO);274 //LOGGER_WRITE("SimManager: Simulation done at t = " + to_string(_tEnd), LC_SOLVER, LL_INFO); 275 275 writeProperties(); 276 276 } … … 279 279 { 280 280 LOGGER_WRITE("SimManager: Simulation stopped with errors before t = " + 281 to_string(_tEnd), LC_SOLV , LL_ERROR);282 LOGGER_WRITE("SimManager: " + string(ex.what()), LC_SOLV , LL_ERROR);281 to_string(_tEnd), LC_SOLVER, LL_ERROR); 282 LOGGER_WRITE("SimManager: " + string(ex.what()), LC_SOLVER, LL_ERROR); 283 283 writeProperties(); 284 284 // rethrow with suppress depending on logger setting to not appear twice 285 285 throw ModelicaSimulationError(SIMMANAGER, ex.what(), "", 286 LOGGER_IS_SET(LC_SOLV , LL_ERROR));286 LOGGER_IS_SET(LC_SOLVER, LL_ERROR)); 287 287 } 288 288 #ifdef RUNTIME_PROFILING … … 303 303 { 304 304 // declaration for Logging 305 std::pair<LogCategory, LogLevel> logM = Logger::getLogMode(LC_SOLV , LL_INFO);305 std::pair<LogCategory, LogLevel> logM = Logger::getLogMode(LC_SOLVER, LL_INFO); 306 306 307 307 LOGGER_WRITE_TUPLE("SimManager: Simulation stop time: " + to_string(_tEnd), logM); 308 308 //LOGGER_WRITE("Rechenzeit in Sekunden: " + to_string>(_tClockEnd-_tClockStart), logM); 309 309 310 LOGGER_WRITE_BEGIN("Simulation info from solver:", LC_SOLV , LL_INFO);310 LOGGER_WRITE_BEGIN("Simulation info from solver:", LC_SOLVER, LL_INFO); 311 311 _solver->writeSimulationInfo(); 312 LOGGER_WRITE_END(LC_SOLV , LL_INFO);312 LOGGER_WRITE_END(LC_SOLVER, LL_INFO); 313 313 /* 314 314 // Zeit … … 567 567 /* Logs temporarily disabled 568 568 BOOST_LOG_SEV(simmgr_lg::get(), simmgr_normal) <<"Run single process." ; */ 569 LOGGER_WRITE("SimManager: Run single process", LC_SOLV,LL_DEBUG);569 LOGGER_WRITE("SimManager: Run single process", LC_SOLVER, LL_DEBUG); 570 570 571 571 memset(_timeEventCounter, 0, _dimtimeevent * sizeof(int)); -
SimulationRuntime/cpp/Core/System/ContinuousEvents.cpp
rc26746f rf2e948cb 104 104 if (dim > 0) 105 105 { 106 LOGGER_WRITE_VECTOR("conditions", _conditions1, dim, LC_EV T, LL_DEBUG);106 LOGGER_WRITE_VECTOR("conditions", _conditions1, dim, LC_EVENTS, LL_DEBUG); 107 107 crestart = !std::equal(_conditions1, _conditions1 + dim, _conditions0); 108 108 } -
SimulationRuntime/cpp/Core/Utils/extension/logger.cpp
rc26746f rf2e948cb 84 84 case(LC_LS): 85 85 return "ls"; 86 case(LC_SOLV ):86 case(LC_SOLVER): 87 87 return "solver"; 88 case(LC_OUT ):88 case(LC_OUTPUT): 89 89 return "output"; 90 case(LC_EV T):90 case(LC_EVENTS): 91 91 return "events"; 92 case(LC_MOD ):92 case(LC_MODEL): 93 93 return "model"; 94 94 case(LC_OTHER): -
SimulationRuntime/cpp/Core/Utils/extension/measure_time.cpp
rb9f455e rf2e948cb 230 230 if((*data)[i] == NULL) 231 231 { 232 LOGGER_WRITE("Skipped a measured block in '" + block->first + "' because it is null.", LC_OUT , LL_ERROR);232 LOGGER_WRITE("Skipped a measured block in '" + block->first + "' because it is null.", LC_OUTPUT, LL_ERROR); 233 233 continue; 234 234 } -
SimulationRuntime/cpp/Include/Core/SimulationSettings/IGlobalSettings.h
rf0015838 rf2e948cb 26 26 #include <vector> 27 27 28 enum LogCategory {LC_INIT = 0, LC_NLS = 1, LC_LS = 2, LC_SOLV = 3, LC_OUT = 4, LC_EVT = 5, LC_OTHER = 6, LC_MOD= 7};28 enum LogCategory {LC_INIT = 0, LC_NLS = 1, LC_LS = 2, LC_SOLVER = 3, LC_OUTPUT = 4, LC_EVENTS = 5, LC_OTHER = 6, LC_MODEL = 7}; 29 29 enum LogLevel {LL_ERROR = 0, LL_WARNING = 1, LL_INFO = 2, LL_DEBUG = 3}; 30 30 enum LogFormat {LF_TXT = 0, LF_XML = 1}; -
SimulationRuntime/cpp/SimCoreFactory/OMCFactory/OMCFactory.cpp
r7c61be0e rf2e948cb 75 75 map<string, LogCategory> logCatMap = MAP_LIST_OF 76 76 "init", LC_INIT MAP_LIST_SEP "nls", LC_NLS MAP_LIST_SEP 77 "ls", LC_LS MAP_LIST_SEP "solver", LC_SOLV MAP_LIST_SEP78 "output", LC_OUT MAP_LIST_SEP "events", LC_EVTMAP_LIST_SEP79 "model", LC_MOD MAP_LIST_SEP "other", LC_OTHER MAP_LIST_END;77 "ls", LC_LS MAP_LIST_SEP "solver", LC_SOLVER MAP_LIST_SEP 78 "output", LC_OUTPUT MAP_LIST_SEP "events", LC_EVENTS MAP_LIST_SEP 79 "model", LC_MODEL MAP_LIST_SEP "other", LC_OTHER MAP_LIST_END; 80 80 map<string, LogLevel> logLvlMap = MAP_LIST_OF 81 81 "error", LL_ERROR MAP_LIST_SEP "warning", LL_WARNING MAP_LIST_SEP … … 110 110 switch (logOMEdit) { 111 111 case LOG_EVENTS: 112 logSettings.modes[LC_EV T] = LL_DEBUG;112 logSettings.modes[LC_EVENTS] = LL_DEBUG; 113 113 break; 114 114 case LOG_INIT: … … 122 122 break; 123 123 case LOG_SOLVER: 124 logSettings.modes[LC_SOLV ] = LL_DEBUG;124 logSettings.modes[LC_SOLVER] = LL_DEBUG; 125 125 //case LOG_STATS: 126 126 default: 127 if (logSettings.modes[LC_SOLV ] < LL_INFO)128 logSettings.modes[LC_SOLV ] = LL_INFO;127 if (logSettings.modes[LC_SOLVER] < LL_INFO) 128 logSettings.modes[LC_SOLVER] = LL_INFO; 129 129 } 130 130 } … … 151 151 } 152 152 153 if (vm.count("warn-all") ) {153 if (vm.count("warn-all") && vm["warn-all"].as<bool>()) { 154 154 for (int i = 0; i < logSettings.modes.size(); i++) 155 155 if (logSettings.modes[i] < LL_WARNING) -
SimulationRuntime/cpp/Solver/CVode/CVode.cpp
ra1fe865 rf2e948cb 323 323 _cvode_initialized = true; 324 324 325 LOGGER_WRITE("Cvode: initialized", LC_SOLV,LL_DEBUG);325 LOGGER_WRITE("Cvode: initialized", LC_SOLVER, LL_DEBUG); 326 326 } 327 327 } … … 963 963 flag = CVodeGetNonlinSolvStats(_cvodeMem, &nni, &ncfn); 964 964 965 LOGGER_WRITE("Cvode: number steps = " + to_string(nst), LC_SOLV , LL_INFO);966 LOGGER_WRITE("Cvode: function evaluations 'f' = " + to_string(nfe), LC_SOLV , LL_INFO);967 LOGGER_WRITE("Cvode: linear solver setups 'nsetups' = " + to_string(nsetups), LC_SOLV , LL_INFO);968 LOGGER_WRITE("Cvode: nonlinear iterations 'nni' = " + to_string(nni), LC_SOLV , LL_INFO);969 LOGGER_WRITE("Cvode: convergence failures 'ncfn' = " + to_string(ncfn), LC_SOLV , LL_INFO);970 LOGGER_WRITE("Cvode: number of evaluateODE calls 'eODE' = " + to_string(_numberOfOdeEvaluations), LC_SOLV , LL_INFO);965 LOGGER_WRITE("Cvode: number steps = " + to_string(nst), LC_SOLVER, LL_INFO); 966 LOGGER_WRITE("Cvode: function evaluations 'f' = " + to_string(nfe), LC_SOLVER, LL_INFO); 967 LOGGER_WRITE("Cvode: linear solver setups 'nsetups' = " + to_string(nsetups), LC_SOLVER, LL_INFO); 968 LOGGER_WRITE("Cvode: nonlinear iterations 'nni' = " + to_string(nni), LC_SOLVER, LL_INFO); 969 LOGGER_WRITE("Cvode: convergence failures 'ncfn' = " + to_string(ncfn), LC_SOLVER, LL_INFO); 970 LOGGER_WRITE("Cvode: number of evaluateODE calls 'eODE' = " + to_string(_numberOfOdeEvaluations), LC_SOLVER, LL_INFO); 971 971 972 972 //// Solver -
SimulationRuntime/cpp/Solver/IDA/IDA.cpp
ra1fe865 rf2e948cb 1 1 #include <Core/ModelicaDefine.h> 2 2 #include <Core/Modelica.h> 3 3 #include <Solver/IDA/IDA.h> 4 4 #include <Core/Math/Functions.h> … … 1074 1074 flag = IDAGetNonlinSolvStats(_idaMem, &nni, &ncfn); 1075 1075 1076 LOGGER_WRITE("Cvode: number steps = " + to_string(nst), LC_SOLV , LL_INFO);1077 LOGGER_WRITE("Cvode: function evaluations 'f' = " + to_string(nfe), LC_SOLV , LL_INFO);1078 LOGGER_WRITE("Cvode: error test failures 'netf' = " + to_string(netfS), LC_SOLV , LL_INFO);1079 LOGGER_WRITE("Cvode: linear solver setups 'nsetups' = " + to_string(nsetups), LC_SOLV , LL_INFO);1080 LOGGER_WRITE("Cvode: nonlinear iterations 'nni' = " + to_string(nni), LC_SOLV , LL_INFO);1081 LOGGER_WRITE("Cvode: convergence failures 'ncfn' = " + to_string(ncfn), LC_SOLV , LL_INFO);1076 LOGGER_WRITE("Cvode: number steps = " + to_string(nst), LC_SOLVER, LL_INFO); 1077 LOGGER_WRITE("Cvode: function evaluations 'f' = " + to_string(nfe), LC_SOLVER, LL_INFO); 1078 LOGGER_WRITE("Cvode: error test failures 'netf' = " + to_string(netfS), LC_SOLVER, LL_INFO); 1079 LOGGER_WRITE("Cvode: linear solver setups 'nsetups' = " + to_string(nsetups), LC_SOLVER, LL_INFO); 1080 LOGGER_WRITE("Cvode: nonlinear iterations 'nni' = " + to_string(nni), LC_SOLVER, LL_INFO); 1081 LOGGER_WRITE("Cvode: convergence failures 'ncfn' = " + to_string(ncfn), LC_SOLVER, LL_INFO); 1082 1082 } 1083 1083
Note: See TracChangeset
for help on using the changeset viewer.