Ignore:
Timestamp:
Jun 27, 2014, 9:32:03 PM (11 years ago)
Author:
Frederik Heber <heber@…>
Branches:
Action_Thermostats, Add_AtomRandomPerturbation, Add_FitFragmentPartialChargesAction, Add_RotateAroundBondAction, Add_SelectAtomByNameAction, Added_ParseSaveFragmentResults, AddingActions_SaveParseParticleParameters, Adding_Graph_to_ChangeBondActions, Adding_MD_integration_tests, Adding_ParticleName_to_Atom, Adding_StructOpt_integration_tests, AtomFragments, Automaking_mpqc_open, AutomationFragmentation_failures, Candidate_v1.5.4, Candidate_v1.6.0, Candidate_v1.6.1, ChangeBugEmailaddress, ChangingTestPorts, ChemicalSpaceEvaluator, CombiningParticlePotentialParsing, Combining_Subpackages, Debian_Package_split, Debian_package_split_molecuildergui_only, Disabling_MemDebug, Docu_Python_wait, EmpiricalPotential_contain_HomologyGraph, EmpiricalPotential_contain_HomologyGraph_documentation, Enable_parallel_make_install, Enhance_userguide, Enhanced_StructuralOptimization, Enhanced_StructuralOptimization_continued, Example_ManyWaysToTranslateAtom, Exclude_Hydrogens_annealWithBondGraph, FitPartialCharges_GlobalError, Fix_BoundInBox_CenterInBox_MoleculeActions, Fix_ChargeSampling_PBC, Fix_ChronosMutex, Fix_FitPartialCharges, Fix_FitPotential_needs_atomicnumbers, Fix_ForceAnnealing, Fix_IndependentFragmentGrids, Fix_ParseParticles, Fix_ParseParticles_split_forward_backward_Actions, Fix_PopActions, Fix_QtFragmentList_sorted_selection, Fix_Restrictedkeyset_FragmentMolecule, Fix_StatusMsg, Fix_StepWorldTime_single_argument, Fix_Verbose_Codepatterns, Fix_fitting_potentials, Fixes, ForceAnnealing_goodresults, ForceAnnealing_oldresults, ForceAnnealing_tocheck, ForceAnnealing_with_BondGraph, ForceAnnealing_with_BondGraph_continued, ForceAnnealing_with_BondGraph_continued_betteresults, ForceAnnealing_with_BondGraph_contraction-expansion, FragmentAction_writes_AtomFragments, FragmentMolecule_checks_bonddegrees, GeometryObjects, Gui_Fixes, Gui_displays_atomic_force_velocity, ImplicitCharges, IndependentFragmentGrids, IndependentFragmentGrids_IndividualZeroInstances, IndependentFragmentGrids_IntegrationTest, IndependentFragmentGrids_Sole_NN_Calculation, JobMarket_RobustOnKillsSegFaults, JobMarket_StableWorkerPool, JobMarket_unresolvable_hostname_fix, MoreRobust_FragmentAutomation, ODR_violation_mpqc_open, PartialCharges_OrthogonalSummation, PdbParser_setsAtomName, PythonUI_with_named_parameters, QtGui_reactivate_TimeChanged_changes, Recreated_GuiChecks, Rewrite_FitPartialCharges, RotateToPrincipalAxisSystem_UndoRedo, SaturateAtoms_findBestMatching, SaturateAtoms_singleDegree, StoppableMakroAction, Subpackage_CodePatterns, Subpackage_JobMarket, Subpackage_LinearAlgebra, Subpackage_levmar, Subpackage_mpqc_open, Subpackage_vmg, Switchable_LogView, ThirdParty_MPQC_rebuilt_buildsystem, TrajectoryDependenant_MaxOrder, TremoloParser_IncreasedPrecision, TremoloParser_MultipleTimesteps, TremoloParser_setsAtomName, Ubuntu_1604_changes, stable
Children:
c73e35
Parents:
0b6b77
git-author:
Frederik Heber <heber@…> (06/19/14 13:56:27)
git-committer:
Frederik Heber <heber@…> (06/27/14 21:32:03)
Message:

All Actions now give correct failure status via STATUS() macro.

Location:
src/Actions/FragmentationAction
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • src/Actions/FragmentationAction/AnalyseFragmentationResultsAction.cpp

    r0b6b77 r26b4d62  
    525525
    526526  if (keysets.KeySets.empty()) {
    527     ELOG(2, "There are no results in the container.");
     527    STATUS("There are no results in the container.");
    528528    return Action::failure;
    529529  }
     
    613613  if (DoLongrange) {
    614614    if ( World::getInstance().getAllAtoms().size() == 0) {
    615       ELOG(1, "Please load the full molecule intostd::map<JobId_t, VMGData> longrangeData the world before starting this action.");
     615      STATUS("Please load the full molecule intostd::map<JobId_t, VMGData> longrangeData the world before starting this action.");
    616616      return Action::failure;
    617617    }
  • src/Actions/FragmentationAction/ClearFragmentationResultsAction.cpp

    r0b6b77 r26b4d62  
    5656    LOG(1, "STATUS: Fragmentation results cleared.");
    5757    return Action::success;
    58   } else
     58  } else {
     59    STATUS("Failed to clear fragmentation results.");
    5960    return Action::failure;
     61  }
    6062}
    6163
  • src/Actions/FragmentationAction/FragmentationAction.cpp

    r0b6b77 r26b4d62  
    8989  // check for selected atoms
    9090  if (world.beginAtomSelection() == world.endAtomSelection()) {
    91     ELOG(1, "There are no atoms selected for fragmentation.");
     91    STATUS("There are no atoms selected for fragmentation.");
    9292    return Action::failure;
    9393  }
     
    279279      exporter();
    280280#else
    281       ELOG(1, "No output file types specified and JobMarket support is not compiled in.");
     281      STATUS("No output file types specified and JobMarket support is not compiled in.");
    282282      return Action::failure;
    283283#endif
  • src/Actions/FragmentationAction/FragmentationAutomationAction.cpp

    r0b6b77 r26b4d62  
    152152  if (params.DoLongrange.get()) {
    153153  if ( World::getInstance().getAllAtoms().size() == 0) {
    154     ELOG(1, "Please load the full molecule into the world before starting this action.");
     154    STATUS("Please load the full molecule into the world before starting this action.");
    155155    return Action::failure;
    156156  }
     
    196196        params.DoValenceOnly.get() ? MPQCData::DoSampleValenceOnly : MPQCData::DontSampleValenceOnly,
    197197        params.DoPrintDebug.get(),
    198         OpenBoundaryConditions))
     198        OpenBoundaryConditions)) {
     199      STATUS("Could not create long-range jobs for electronic charge distribution.");
    199200      return Action::failure;
     201    }
    200202
    201203    // Phase Six a: calculate result
     
    222224          params.DoValenceOnly.get() ? MPQCData::DoSampleValenceOnly : MPQCData::DontSampleValenceOnly,
    223225          params.DoPrintDebug.get(),
    224           OpenBoundaryConditions))
     226          OpenBoundaryConditions)) {
     227        STATUS("Could not create long-range jobs for nuclei charge distribution.");
    225228        return Action::failure;
     229      }
    226230
    227231      // Phase Six b: calculate result
     
    255259        debugcontroller.setPort(params.port.get());
    256260        debugcontroller.requestIds(full_sample.size());
    257         if (!debugcontroller.createDebugJobs(full_sample, OpenBoundaryConditions))
     261        if (!debugcontroller.createDebugJobs(full_sample, OpenBoundaryConditions)) {
     262          STATUS("Could not create debug jobs.");
    258263          return Action::failure;
     264        }
    259265        debugcontroller.waitforResults(full_sample.size());
    260266        debugcontroller.getResults(debugData);
     
    286292  }
    287293
     294  if (Exitflag != 0)
     295    STATUS("Controller has returned failure.");
    288296  return (Exitflag == 0) ? Action::success : Action::failure;
    289297}
  • src/Actions/FragmentationAction/ParseFragmentJobsAction.cpp

    r0b6b77 r26b4d62  
    5353  // check for present jobs
    5454  if (params.jobfiles.get().empty()) {
    55     ELOG(2, "Given vector of jobfiles is empty!");
     55    STATUS("Given vector of jobfiles is empty!");
    5656    return Action::failure;
    5757  }
     
    6060  if(!FragmentJobQueue::getInstance().addJobsFromFiles(
    6161      params.jobfiles.get(),
    62       params.level.get()))
     62      params.level.get())) {
     63    STATUS("Could not parse all given jobs files.");
    6364    return Action::failure;
     65  }
    6466  size_t FragmentCounter = FragmentJobQueue::getInstance().size();
    6567  LOG(1, "STATUS: I parsed " << FragmentCounter << " fragment files.");
  • src/Actions/FragmentationAction/StoreSaturatedFragmentAction.cpp

    r0b6b77 r26b4d62  
    6060  // check for selected atoms
    6161  if (world.beginAtomSelection() == world.endAtomSelection()) {
    62     ELOG(1, "There are not atoms selected for storing.");
     62    STATUS("There are not atoms selected for storing.");
    6363    return Action::failure;
    6464  }
Note: See TracChangeset for help on using the changeset viewer.