- Timestamp:
- Nov 14, 2012, 10:01:46 AM (12 years ago)
- 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:
- 88c2c1
- Parents:
- 8a8c8c
- git-author:
- Frederik Heber <heber@…> (07/15/12 12:54:01)
- git-committer:
- Frederik Heber <heber@…> (11/14/12 10:01:46)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Actions/FragmentationAction/FragmentationAutomationAction.cpp
r8a8c8c r69c733 61 61 #include "Jobs/MPQCData.hpp" 62 62 #include "Jobs/MPQCData_printKeyNames.hpp" 63 #ifdef HAVE_VMG 64 #include "Jobs/VMGJob.hpp" 65 #endif 63 66 #include "molecule.hpp" 64 67 #include "World.hpp" … … 448 451 } 449 452 453 #ifdef HAVE_VMG 454 bool createLongRangeJobs( 455 FragmentController &controller, 456 const FragmentationFragmentationAutomationAction::FragmentationFragmentationAutomationParameters ¶ms, 457 const size_t NoJobs) 458 { 459 const int GRID = pow(2,5); 460 std::vector<FragmentJob::ptr> jobs; 461 std::vector< double > sampled_input (GRID*GRID*GRID, 0.); 462 for (size_t i=0; i< NoJobs; ++i) { 463 const JobId_t next_id = controller.getAvailableId(); 464 LOG(1, "INFO: Creating VMGJob."); 465 FragmentJob::ptr testJob( new VMGJob(next_id, sampled_input) ); 466 jobs.push_back(testJob); 467 } 468 controller.addJobs(jobs); 469 controller.sendJobs(params.host.get(), params.port.get()); 470 return true; 471 } 472 #endif 473 450 474 void WaitforResults( 451 475 boost::asio::io_service &io_service, … … 483 507 RunService(io_service, "Requesting ids"); 484 508 485 // Phase Two: create and add jobs509 // Phase Two: create and add MPQCJobs 486 510 if (!createJobsFromFiles(controller, params, jobfiles)) 487 511 return Action::failure; 488 RunService(io_service, "Adding jobs");512 RunService(io_service, "Adding MPQCJobs"); 489 513 490 514 // Phase Three: calculate result 491 515 WaitforResults(io_service, controller, params, jobfiles.size()); 492 493 // Phase Three: get result494 516 controller.receiveResults(params.host.get(), params.port.get()); 495 RunService(io_service, " Phase Four");496 497 // Final phase: print result517 RunService(io_service, "Requesting short-range results"); 518 519 // print intermediate short-range results 498 520 { 499 521 LOG(1, "INFO: Parsing fragment files from " << params.path.get() << "."); 500 std::vector<FragmentResult::ptr> results = controller.getReceivedResults();522 std::vector<FragmentResult::ptr> MPQCresults = controller.getReceivedResults(); 501 523 printReceivedMPQCResults( 502 results,524 MPQCresults, 503 525 params.path.get(), 504 526 getNoAtomsFromAdjacencyFile(params.path.get())); 505 527 } 528 529 #ifdef HAVE_VMG 530 if (params.DoLongrange.get()) { 531 // Phase Four: obtain more ids 532 requestIds(controller, params, jobfiles.size()+1); // one more for the big job 533 RunService(io_service, "Requesting ids"); 534 535 // Phase Five: create VMGJobs 536 if (!createLongRangeJobs(controller, params, jobfiles.size()+1)) 537 return Action::failure; 538 RunService(io_service, "Adding VMGJobs"); 539 540 // Phase Six: calculate result 541 WaitforResults(io_service, controller, params, jobfiles.size()+1); 542 controller.receiveResults(params.host.get(), params.port.get()); 543 RunService(io_service, "Requesting long-range results"); 544 std::vector<FragmentResult::ptr> VMGresults = controller.getReceivedResults(); 545 } 546 #endif 506 547 size_t Exitflag = controller.getExitflag(); 507 548
Note:
See TracChangeset
for help on using the changeset viewer.