Ignore:
Timestamp:
Jul 14, 2014, 11:16:23 AM (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:
2a03b0
Parents:
c73e35 (diff), a61dbb (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'Fragmentation_Automation_wo_JobMarket' into stable

Conflicts:

src/Actions/ActionQueue.cpp
src/Actions/FragmentationAction/FragmentationAction.cpp
src/Actions/PotentialAction/FitParticleChargesAction.cpp

Location:
src/Actions/FragmentationAction
Files:
3 edited

Legend:

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

    rc73e35 rd8821e  
    6363#include "Descriptors/AtomIdDescriptor.hpp"
    6464#include "Fragmentation/Summation/Containers/FragmentationChargeDensity.hpp"
    65 #include "Fragmentation/Summation/Containers/FragmentationLongRangeResults.hpp"
    6665#include "Fragmentation/Summation/Containers/FragmentationResultContainer.hpp"
    6766#include "Fragmentation/Summation/Containers/FragmentationShortRangeResults.hpp"
     
    7877#include "Fragmentation/Summation/writeIndexedTable.hpp"
    7978#include "Fragmentation/Summation/writeTable.hpp"
    80 #ifdef HAVE_VMG
     79#if defined(HAVE_JOBMARKET) && defined(HAVE_VMG)
     80#include "Fragmentation/Summation/Containers/FragmentationLongRangeResults.hpp"
    8181#include "Fragmentation/Summation/Containers/VMGData.hpp"
    8282#include "Fragmentation/Summation/Containers/VMGDataFused.hpp"
     
    232232
    233233
     234#if defined(HAVE_JOBMARKET) && defined(HAVE_VMG)
    234235/** Print long range energy from received results.
    235236 *
     
    261262  }
    262263}
     264#endif
    263265
    264266void appendToHomologies(
    265267    const FragmentationShortRangeResults &shortrangeresults,
     268#if defined(HAVE_JOBMARKET) && defined(HAVE_VMG)
    266269    const FragmentationLongRangeResults &longrangeresults,
     270#endif
    267271    const bool storeGrids
    268272    )
     
    311315    // only store sampled grids if desired
    312316    if (storeGrids) {
     317#if defined(HAVE_JOBMARKET) && defined(HAVE_VMG)
    313318      // obtain charge distribution
    314319      std::map<IndexSet::ptr, std::pair< MPQCDataGridMap_t, MPQCDataGridMap_t> >::const_iterator chargeiter
     
    338343//          ++iter)
    339344//        *iter -= offset;
     345#else
     346      ELOG(1, "Long-range information in homology desired but long-range analysis capability not compiled in.");
     347#endif
    340348    }
    341349    values.insert( std::make_pair( graph, value) );
     
    362370          << ", associated energy " << iter->second.energy;
    363371      if (iter->second.containsGrids)
     372#if defined(HAVE_JOBMARKET) && defined(HAVE_VMG)
    364373        output  << ", and sampled grid integral " << iter->second.charge_distribution.integral();
     374#else
     375        output << ", and there are sampled grids but capability not compiled in";
     376#endif
    365377      output << ".";
    366378      LOG(2, output.str());
     
    610622  }
    611623
    612 #ifdef HAVE_VMG
     624#if defined(HAVE_JOBMARKET) && defined(HAVE_VMG)
    613625  if (DoLongrange) {
    614626    if ( World::getInstance().getAllAtoms().size() == 0) {
     
    651663  }
    652664#else
    653   if (DoLongrange)
     665  if (DoLongrange) {
    654666    ELOG(2, "File contains long-range information but long-range analysis capability not compiled in.");
     667  }
    655668
    656669  // append all keysets to homology file with short-range info only (without grids)
    657   {
    658     std::map<JobId_t, VMGData> longrangeData;
    659     FragmentationLongRangeResults longrangeresults(
    660         shortrangedata,longrangeData,keysets, forcekeysets);
    661     appendToHomologies(shortrangeresults, longrangeresults, false);
    662   }
     670  appendToHomologies(shortrangeresults, false);
    663671#endif
    664672
  • src/Actions/FragmentationAction/FragmentationAction.cpp

    rc73e35 rd8821e  
    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       STATUS("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

    rc73e35 rd8821e  
    5353#include "CodePatterns/Info.hpp"
    5454#include "CodePatterns/Log.hpp"
     55
     56#ifdef HAVE_JOBMARKET
    5557#include "JobMarket/Jobs/FragmentJob.hpp"
     58#else
     59#include "Jobs/JobMarket/FragmentJob.hpp"
     60#endif
    5661
    5762#include "Fragmentation/Automation/FragmentJobQueue.hpp"
     63#ifdef HAVE_JOBMARKET
    5864#include "Fragmentation/Automation/MPQCFragmentController.hpp"
     65#else
     66#include "Fragmentation/Automation/MPQCCommandFragmentController.hpp"
     67#endif
    5968#include "Fragmentation/Summation/Containers/FragmentationChargeDensity.hpp"
    6069#include "Fragmentation/Summation/Containers/FragmentationLongRangeResults.hpp"
     
    6372#include "Fragmentation/Summation/Containers/MPQCData.hpp"
    6473#include "Fragmentation/KeySetsContainer.hpp"
    65 #ifdef HAVE_VMG
     74#if defined(HAVE_JOBMARKET) && defined(HAVE_VMG)
    6675#include "Fragmentation/Automation/VMGDebugGridFragmentController.hpp"
    6776#include "Fragmentation/Automation/VMGFragmentController.hpp"
     
    99108}
    100109
     110#ifdef HAVE_JOBMARKET
    101111static void updateSteps(Process &p, const size_t step, const size_t total)
    102112{
     
    104114  p.setCurrStep(step);
    105115}
     116#endif
    106117
    107118ActionState::ptr FragmentationFragmentationAutomationAction::performCall() {
     
    117128  size_t Exitflag = 0;
    118129  std::map<JobId_t, MPQCData> shortrangedata;
     130#ifdef HAVE_JOBMARKET
    119131  {
    120132    const size_t NumberJobs = FragmentJobQueue::getInstance().size();
     
    126138
    127139    // Phase Two: add MPQCJobs and send
    128     const size_t NoJobs = mpqccontroller.addJobsFromQueue(
     140    const bool AddJobsStatus = mpqccontroller.addJobsFromQueue(
    129141        params.DoLongrange.get() ? MPQCData::DoSampleDensity : MPQCData::DontSampleDensity,
    130142        params.DoValenceOnly.get() ? MPQCData::DoSampleValenceOnly : MPQCData::DontSampleValenceOnly
    131143        );
    132     LOG(1, "INFO: Added " << NoJobs << " from FragmentJobsQueue.");
     144    if (AddJobsStatus)
     145      LOG(1, "INFO: Added jobs from FragmentJobsQueue.");
     146    else {
     147      ELOG(1, "Adding jobs failed.");
     148      return Action::failure;
     149    }
    133150    mpqccontroller.run();
    134151
     
    148165    Exitflag += mpqccontroller.getExitflag();
    149166  }
    150 
    151 #ifdef HAVE_VMG
     167#else
     168  {
     169    const size_t NumberJobs = FragmentJobQueue::getInstance().size();
     170    MPQCCommandFragmentController mpqccontroller;
     171    // Phase One: obtain ids: not needed, we have infinite pool
     172
     173    // Phase Two: add MPQCJobs and send
     174    const size_t NoJobs = mpqccontroller.addJobsFromQueue(
     175        params.DoLongrange.get() ? MPQCData::DoSampleDensity : MPQCData::DontSampleDensity,
     176        params.DoValenceOnly.get() ? MPQCData::DoSampleValenceOnly : MPQCData::DontSampleValenceOnly,
     177        params.executable.get().string()
     178        );
     179    LOG(1, "INFO: Added " << NoJobs << " from FragmentJobsQueue.");
     180    mpqccontroller.run();
     181
     182    // get back the results and place them in shortrangedata
     183    mpqccontroller.getResults(shortrangedata);
     184    ASSERT( shortrangedata.size() == NumberJobs,
     185        "FragmentationFragmentationAutomationAction::performCall() - number of converted results "
     186        +toString(shortrangedata.size())+" and number of jobs "+toString(NumberJobs)+ " differ.");
     187
     188    Exitflag += mpqccontroller.getExitflag();
     189  }
     190#endif
     191
     192#if defined(HAVE_JOBMARKET) && defined(HAVE_VMG)
    152193  if (params.DoLongrange.get()) {
    153194  if ( World::getInstance().getAllAtoms().size() == 0) {
Note: See TracChangeset for help on using the changeset viewer.