Changeset f2e948cb in OpenModelica


Ignore:
Timestamp:
2016-11-14T08:22:12+01:00 (8 years ago)
Author:
hudson <openmodelica@…>
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)
Message:

Give log categories full names

Location:
SimulationRuntime/cpp
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • SimulationRuntime/cpp/Core/SimController/SimManager.cpp

    r47e1846 rf2e948cb  
    266266    try
    267267    {
    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);
    269269        runSingleProcess();
    270270        // Measure time; Output SimInfos
     
    272272        if ((status & ISolver::DONE) || (status & ISolver::USER_STOP))
    273273        {
    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);
    275275            writeProperties();
    276276        }
     
    279279    {
    280280        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);
    283283        writeProperties();
    284284        // rethrow with suppress depending on logger setting to not appear twice
    285285        throw ModelicaSimulationError(SIMMANAGER, ex.what(), "",
    286                                       LOGGER_IS_SET(LC_SOLV, LL_ERROR));
     286                                      LOGGER_IS_SET(LC_SOLVER, LL_ERROR));
    287287    }
    288288    #ifdef RUNTIME_PROFILING
     
    303303{
    304304  // 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);
    306306
    307307  LOGGER_WRITE_TUPLE("SimManager: Simulation stop time: " + to_string(_tEnd), logM);
    308308  //LOGGER_WRITE("Rechenzeit in Sekunden:                 " + to_string>(_tClockEnd-_tClockStart), logM);
    309309
    310   LOGGER_WRITE_BEGIN("Simulation info from solver:", LC_SOLV, LL_INFO);
     310  LOGGER_WRITE_BEGIN("Simulation info from solver:", LC_SOLVER, LL_INFO);
    311311  _solver->writeSimulationInfo();
    312   LOGGER_WRITE_END(LC_SOLV, LL_INFO);
     312  LOGGER_WRITE_END(LC_SOLVER, LL_INFO);
    313313/*
    314314     // Zeit
     
    567567  /* Logs temporarily disabled
    568568     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);
    570570
    571571    memset(_timeEventCounter, 0, _dimtimeevent * sizeof(int));
  • SimulationRuntime/cpp/Core/System/ContinuousEvents.cpp

    rc26746f rf2e948cb  
    104104  if (dim > 0)
    105105  {
    106     LOGGER_WRITE_VECTOR("conditions", _conditions1, dim, LC_EVT, LL_DEBUG);
     106    LOGGER_WRITE_VECTOR("conditions", _conditions1, dim, LC_EVENTS, LL_DEBUG);
    107107    crestart = !std::equal(_conditions1, _conditions1 + dim, _conditions0);
    108108  }
  • SimulationRuntime/cpp/Core/Utils/extension/logger.cpp

    rc26746f rf2e948cb  
    8484  case(LC_LS):
    8585    return "ls";
    86   case(LC_SOLV):
     86  case(LC_SOLVER):
    8787    return "solver";
    88   case(LC_OUT):
     88  case(LC_OUTPUT):
    8989    return "output";
    90   case(LC_EVT):
     90  case(LC_EVENTS):
    9191    return "events";
    92   case(LC_MOD):
     92  case(LC_MODEL):
    9393    return "model";
    9494  case(LC_OTHER):
  • SimulationRuntime/cpp/Core/Utils/extension/measure_time.cpp

    rb9f455e rf2e948cb  
    230230          if((*data)[i] == NULL)
    231231          {
    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);
    233233              continue;
    234234          }
  • SimulationRuntime/cpp/Include/Core/SimulationSettings/IGlobalSettings.h

    rf0015838 rf2e948cb  
    2626#include <vector>
    2727
    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};
     28enum 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};
    2929enum LogLevel {LL_ERROR = 0, LL_WARNING = 1, LL_INFO = 2, LL_DEBUG = 3};
    3030enum LogFormat {LF_TXT = 0, LF_XML = 1};
  • SimulationRuntime/cpp/SimCoreFactory/OMCFactory/OMCFactory.cpp

    r7c61be0e rf2e948cb  
    7575  map<string, LogCategory> logCatMap = MAP_LIST_OF
    7676    "init", LC_INIT MAP_LIST_SEP "nls", LC_NLS MAP_LIST_SEP
    77     "ls", LC_LS MAP_LIST_SEP "solver", LC_SOLV MAP_LIST_SEP
    78     "output", LC_OUT MAP_LIST_SEP "events", LC_EVT MAP_LIST_SEP
    79     "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;
    8080  map<string, LogLevel> logLvlMap = MAP_LIST_OF
    8181    "error", LL_ERROR MAP_LIST_SEP "warning", LL_WARNING MAP_LIST_SEP
     
    110110            switch (logOMEdit) {
    111111            case LOG_EVENTS:
    112               logSettings.modes[LC_EVT] = LL_DEBUG;
     112              logSettings.modes[LC_EVENTS] = LL_DEBUG;
    113113              break;
    114114            case LOG_INIT:
     
    122122              break;
    123123            case LOG_SOLVER:
    124               logSettings.modes[LC_SOLV] = LL_DEBUG;
     124              logSettings.modes[LC_SOLVER] = LL_DEBUG;
    125125              //case LOG_STATS:
    126126            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;
    129129            }
    130130          }
     
    151151    }
    152152
    153   if (vm.count("warn-all")) {
     153  if (vm.count("warn-all") && vm["warn-all"].as<bool>()) {
    154154    for (int i = 0; i < logSettings.modes.size(); i++)
    155155      if (logSettings.modes[i] < LL_WARNING)
  • SimulationRuntime/cpp/Solver/CVode/CVode.cpp

    ra1fe865 rf2e948cb  
    323323    _cvode_initialized = true;
    324324
    325     LOGGER_WRITE("Cvode: initialized",LC_SOLV,LL_DEBUG);
     325    LOGGER_WRITE("Cvode: initialized", LC_SOLVER, LL_DEBUG);
    326326  }
    327327}
     
    963963  flag = CVodeGetNonlinSolvStats(_cvodeMem, &nni, &ncfn);
    964964
    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);
    971971
    972972  //// Solver
  • SimulationRuntime/cpp/Solver/IDA/IDA.cpp

    ra1fe865 rf2e948cb  
    11#include <Core/ModelicaDefine.h>
    2  #include <Core/Modelica.h>
     2#include <Core/Modelica.h>
    33#include <Solver/IDA/IDA.h>
    44#include <Core/Math/Functions.h>
     
    10741074  flag = IDAGetNonlinSolvStats(_idaMem, &nni, &ncfn);
    10751075
    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);
    10821082}
    10831083
Note: See TracChangeset for help on using the changeset viewer.