Changeset bf0ff3 for src/Actions


Ignore:
Timestamp:
Jul 13, 2014, 7:41:14 AM (10 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:
2e584e
Parents:
1d17e5
git-author:
Frederik Heber <heber@…> (04/23/14 11:57:20)
git-committer:
Frederik Heber <heber@…> (07/13/14 07:41:14)
Message:

Using MPQCCommandFragmentController in FragmentationAutomationAction.

Location:
src/Actions/FragmentationAction
Files:
2 edited

Legend:

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

    r1d17e5 rbf0ff3  
    4141#include "Descriptors/AtomSelectionDescriptor.hpp"
    4242#include "Fragmentation/Exporters/ExportGraph_ToFiles.hpp"
    43 #ifdef HAVE_JOBMARKET
    4443#include "Fragmentation/Exporters/ExportGraph_ToJobs.hpp"
    45 #endif
    4644#include "Fragmentation/Fragmentation.hpp"
    4745#include "Fragmentation/Graph.hpp"
     
    273271      exporter();
    274272    } else {
    275 #ifdef HAVE_JOBMARKET
    276273      // store molecule's fragment in FragmentJobQueue
    277274      ExportGraph_ToJobs exporter(TotalGraph, treatment, saturation);
    278275      exporter.setLevel(params.level.get());
    279276      exporter();
    280 #else
    281       ELOG(1, "No output file types specified and JobMarket support is not compiled in.");
    282       return Action::failure;
    283 #endif
    284277    }
    285278  }
  • src/Actions/FragmentationAction/FragmentationAutomationAction.cpp

    r1d17e5 rbf0ff3  
    6464#include "Fragmentation/Automation/MPQCFragmentController.hpp"
    6565#else
     66#include "Fragmentation/Automation/MPQCCommandFragmentController.hpp"
    6667#endif
    6768#include "Fragmentation/Summation/Containers/FragmentationChargeDensity.hpp"
     
    156157    stop();
    157158    mpqccontroller.getResults(shortrangedata);
     159
     160    Exitflag += mpqccontroller.getExitflag();
     161  }
     162#else
     163  {
     164    const size_t NumberJobs = FragmentJobQueue::getInstance().size();
     165    MPQCCommandFragmentController mpqccontroller;
     166    // Phase One: obtain ids: not needed, we have infinite pool
     167
     168    // Phase Two: add MPQCJobs and send
     169    const size_t NoJobs = mpqccontroller.addJobsFromQueue(
     170        params.DoLongrange.get() ? MPQCData::DoSampleDensity : MPQCData::DontSampleDensity,
     171        params.DoValenceOnly.get() ? MPQCData::DoSampleValenceOnly : MPQCData::DontSampleValenceOnly
     172        );
     173    LOG(1, "INFO: Added " << NoJobs << " from FragmentJobsQueue.");
     174    mpqccontroller.run();
     175
     176    // get back the results and place them in shortrangedata
     177    mpqccontroller.getResults(shortrangedata);
     178    ASSERT( shortrangedata.size() == NumberJobs,
     179        "FragmentationFragmentationAutomationAction::performCall() - number of converted results "
     180        +toString(shortrangedata.size())+" and number of jobs "+toString(NumberJobs)+ " differ.");
    158181
    159182    Exitflag += mpqccontroller.getExitflag();
Note: See TracChangeset for help on using the changeset viewer.