Changeset 23ad4f


Ignore:
Timestamp:
May 8, 2017, 1:51:00 PM (8 years ago)
Author:
Frederik Heber <frederik.heber@…>
Branches:
Action_Thermostats, Add_AtomRandomPerturbation, Add_RotateAroundBondAction, Add_SelectAtomByNameAction, Adding_Graph_to_ChangeBondActions, Adding_MD_integration_tests, Adding_StructOpt_integration_tests, AutomationFragmentation_failures, Candidate_v1.6.1, ChangeBugEmailaddress, ChangingTestPorts, ChemicalSpaceEvaluator, Docu_Python_wait, EmpiricalPotential_contain_HomologyGraph_documentation, Enhance_userguide, Enhanced_StructuralOptimization, Enhanced_StructuralOptimization_continued, Example_ManyWaysToTranslateAtom, Exclude_Hydrogens_annealWithBondGraph, Fix_ChronosMutex, Fix_StatusMsg, Fix_StepWorldTime_single_argument, Fix_Verbose_Codepatterns, ForceAnnealing_goodresults, ForceAnnealing_oldresults, ForceAnnealing_tocheck, ForceAnnealing_with_BondGraph, ForceAnnealing_with_BondGraph_continued, ForceAnnealing_with_BondGraph_continued_betteresults, ForceAnnealing_with_BondGraph_contraction-expansion, GeometryObjects, Gui_displays_atomic_force_velocity, IndependentFragmentGrids_IntegrationTest, JobMarket_RobustOnKillsSegFaults, JobMarket_StableWorkerPool, PythonUI_with_named_parameters, QtGui_reactivate_TimeChanged_changes, Recreated_GuiChecks, RotateToPrincipalAxisSystem_UndoRedo, StoppableMakroAction, TremoloParser_IncreasedPrecision, TremoloParser_MultipleTimesteps, Ubuntu_1604_changes
Children:
ce254c
Parents:
557b39
git-author:
Frederik Heber <frederik.heber@…> (05/04/17 11:11:31)
git-committer:
Frederik Heber <frederik.heber@…> (05/08/17 13:51:00)
Message:

FIX: boost::serialization change requires clear before async_read.

  • the problem is that boost::serialization no longer clears STL entities such as std::set before filling them with values from the archive.
  • BUG: This change in behavior causes integration test with long range results to hang because instead of just 5 results 10 results were submitted, as the first 5 jobids were still present in the member variable of FragmentScheduler's ControllerListener.
  • now, before every async_read we clear the respective structure if it is STL.
Location:
ThirdParty/JobMarket/src/JobMarket
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • ThirdParty/JobMarket/src/JobMarket/FragmentScheduler.hpp

    r557b39 r23ad4f  
    170170      JobsQueue(_JobsQueue),
    171171      jobInfo((size_t)2, 0),
     172      NumberIds(0),
    172173      choice(NoControllerOperation),
    173174      removeallWorkers(_removeallWorkers),
  • ThirdParty/JobMarket/src/JobMarket/FragmentScheduler_ControllerListener.cpp

    r557b39 r23ad4f  
    9494    {
    9595      LOG(1, "INFO: Receiving number of desired job ids from controller ...");
     96      NumberIds = 0;
    9697      conn->async_read(NumberIds,
    9798        boost::bind(&FragmentScheduler::ControllerListener_t::handle_GetNextJobIdState, this,
     
    104105      // serialize the data structure for us.
    105106      LOG(1, "INFO: Receiving bunch of jobs from a controller ...");
     107      jobs.clear();
    106108      conn->async_read(jobs,
    107109        boost::bind(&FragmentScheduler::ControllerListener_t::handle_ReceiveJobs, this,
     
    113115      // get vector of jobids
    114116      LOG(1, "INFO: Receiving bunch of jobids from a controller ...");
     117      jobids.clear();
    115118      conn->async_read(jobids,
    116119        boost::bind(&FragmentScheduler::ControllerListener_t::handle_CheckResultState, this,
     
    141144      // get vector of jobids
    142145      LOG(1, "INFO: Receiving bunch of jobids from a controller ...");
     146      jobids.clear();
    143147      conn->async_read(jobids,
    144148        boost::bind(&FragmentScheduler::ControllerListener_t::handle_SendResults, this,
  • ThirdParty/JobMarket/src/JobMarket/Operations/Controllers/CheckResultsOperation.cpp

    r557b39 r23ad4f  
    105105    // decode the data that is written to the underlying socket.
    106106    LOG(1, "INFO: Obtaining number of present and done jobs ...");
     107    jobInfo.clear();
    107108    connection_.async_read(jobInfo,
    108109      boost::bind(&CheckResultsOperation::handle_FinishOperation, this,
  • ThirdParty/JobMarket/src/JobMarket/Operations/Controllers/GetNextJobIdOperation.cpp

    r557b39 r23ad4f  
    102102    // decode the data that is written to the underlying socket.
    103103    LOG(1, "INFO: Obtaining a bunch of available job ids ...");
     104    ids.clear();
    104105    connection_.async_read(ids,
    105106      boost::bind(&GetNextJobIdOperation::handle_FinishOperation, this,
  • ThirdParty/JobMarket/src/JobMarket/Operations/Controllers/ReceiveResultsOperation.cpp

    r557b39 r23ad4f  
    106106    // The connection::async_read() function will automatically
    107107    // decode the data that is written to the underlying socket.
     108    results.clear();
    108109    connection_.async_read(results,
    109110      boost::bind(&ReceiveResultsOperation::handle_ReceivedResults, this,
Note: See TracChangeset for help on using the changeset viewer.