source: src/Actions/FragmentationAction/FragmentationAutomationAction.cpp@ 82034f1

Action_Thermostats Add_AtomRandomPerturbation Add_FitFragmentPartialChargesAction Add_RotateAroundBondAction Add_SelectAtomByNameAction Adding_Graph_to_ChangeBondActions Adding_MD_integration_tests Adding_StructOpt_integration_tests Automaking_mpqc_open AutomationFragmentation_failures Candidate_v1.5.4 Candidate_v1.6.0 Candidate_v1.6.1 ChangeBugEmailaddress ChangingTestPorts ChemicalSpaceEvaluator 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_ChargeSampling_PBC Fix_ChronosMutex Fix_FitPartialCharges Fix_FitPotential_needs_atomicnumbers Fix_ForceAnnealing Fix_IndependentFragmentGrids Fix_ParseParticles Fix_ParseParticles_split_forward_backward_Actions 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_IndividualZeroInstances IndependentFragmentGrids_IntegrationTest IndependentFragmentGrids_Sole_NN_Calculation JobMarket_RobustOnKillsSegFaults JobMarket_StableWorkerPool JobMarket_unresolvable_hostname_fix ODR_violation_mpqc_open PartialCharges_OrthogonalSummation PythonUI_with_named_parameters QtGui_reactivate_TimeChanged_changes Recreated_GuiChecks RotateToPrincipalAxisSystem_UndoRedo StoppableMakroAction Subpackage_CodePatterns Subpackage_JobMarket Subpackage_LinearAlgebra Subpackage_levmar Subpackage_mpqc_open Subpackage_vmg ThirdParty_MPQC_rebuilt_buildsystem TrajectoryDependenant_MaxOrder TremoloParser_IncreasedPrecision TremoloParser_MultipleTimesteps Ubuntu_1604_changes stable
Last change on this file since 82034f1 was 82034f1, checked in by Frederik Heber <heber@…>, 9 years ago

Added currently inactive alternative NN contribution calculation from direct summation.

  • direct summation is exact and should alleviate problems with how to choose nfc. The both_sampled_potential is still required for fitting partial charges, hence we cannot remove it. Also, we need the multigrid summation for the full_sample grids (all charges).
  • it is difficult to remove, as sampling requires touching all grid points per nuclei (!) due to with 1/r slow decay. Also, we need it for periodic boundary conditions.
  • the direct calculation is implemented to check against the fragment results obtained via multigrid calculation (if correct e and not e_long is used). But is commented out.
  • Property mode set to 100644
File size: 20.6 KB
Line 
1/*
2 * Project: MoleCuilder
3 * Description: creates and alters molecular systems
4 * Copyright (C) 2010-2012 University of Bonn. All rights reserved.
5 * Copyright (C) 2013 Frederik Heber. All rights reserved.
6 *
7 *
8 * This file is part of MoleCuilder.
9 *
10 * MoleCuilder is free software: you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation, either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * MoleCuilder is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with MoleCuilder. If not, see <http://www.gnu.org/licenses/>.
22 */
23
24/*
25 * FragmentationAutomationAction.cpp
26 *
27 * Created on: May 18, 2012
28 * Author: heber
29 */
30
31// include config.h
32#ifdef HAVE_CONFIG_H
33#include <config.h>
34#endif
35
36#include <boost/archive/text_iarchive.hpp>
37// boost asio needs specific operator new
38#include <boost/asio.hpp>
39
40#include "CodePatterns/MemDebug.hpp"
41
42//// include headers that implement a archive in simple text format
43#include <boost/archive/text_oarchive.hpp>
44#include <boost/archive/text_iarchive.hpp>
45
46//
47//#include <boost/mpl/remove.hpp>
48//#include <boost/lambda/lambda.hpp>
49
50//#include <iostream>
51
52#include "CodePatterns/Assert.hpp"
53#include "CodePatterns/Info.hpp"
54#include "CodePatterns/Log.hpp"
55
56#ifdef HAVE_JOBMARKET
57#include "JobMarket/Jobs/FragmentJob.hpp"
58#else
59#include "Jobs/JobMarket/FragmentJob.hpp"
60#endif
61
62#include "Fragmentation/Automation/FragmentJobQueue.hpp"
63#ifdef HAVE_JOBMARKET
64#include "Fragmentation/Automation/MPQCFragmentController.hpp"
65#else
66#include "Fragmentation/Automation/MPQCCommandFragmentController.hpp"
67#endif
68#include "Fragmentation/Exporters/ExportGraph_ToJobs.hpp"
69#include "Fragmentation/Summation/Containers/FragmentationChargeDensity.hpp"
70#include "Fragmentation/Summation/Containers/FragmentationLongRangeResults.hpp"
71#include "Fragmentation/Summation/Containers/FragmentationResultContainer.hpp"
72#include "Fragmentation/Summation/Containers/FragmentationShortRangeResults.hpp"
73#include "Fragmentation/Summation/Containers/MPQCData.hpp"
74#include "Fragmentation/KeySetsContainer.hpp"
75#if defined(HAVE_JOBMARKET) && defined(HAVE_VMG)
76#include "Fragmentation/Automation/VMGDebugGridFragmentController.hpp"
77#include "Fragmentation/Automation/VMGFragmentController.hpp"
78#include "Fragmentation/Summation/Containers/GridDownsampler.hpp"
79#include "Fragmentation/Summation/Containers/VMGData.hpp"
80#include "Fragmentation/Summation/Containers/VMGDataFused.hpp"
81#include "Fragmentation/Summation/Containers/VMGDataMap.hpp"
82#include "Fragmentation/Summation/Containers/VMGData_printKeyNames.hpp"
83#endif
84#include "World.hpp"
85
86#include <boost/bind.hpp>
87#include <boost/thread.hpp>
88#include <fstream>
89#include <iostream>
90#include <string>
91#include <vector>
92
93#include <boost/mpl/for_each.hpp>
94
95#include "Actions/FragmentationAction/FragmentationAutomationAction.hpp"
96
97using namespace MoleCuilder;
98
99// and construct the stuff
100#include "FragmentationAutomationAction.def"
101#include "Action_impl_pre.hpp"
102/** =========== define the function ====================== */
103
104class controller_AddOn;
105
106// needs to be defined for using the FragmentController
107controller_AddOn *getAddOn()
108{
109 return NULL;
110}
111
112static void updateSteps(Process &p, const size_t step, const size_t total)
113{
114 LOG(1, "There are " << step << " steps out of " << total << " done.");
115 p.setCurrStep(step);
116}
117
118template <class ResultClass>
119std::pair<double, double> getResiduals(const ResultClass &_result)
120{ return std::pair<double, double>(0.,0.); }
121
122std::pair<double, double> getResiduals(const MPQCData &_result)
123{ return std::make_pair(_result.accuracy, _result.desired_accuracy); }
124
125std::pair<double, double> getResiduals(const VMGData &_result)
126{
127 // sensibility check on absolute residual
128 if (_result.residual > 1e-5)
129 ELOG(2, "Encountered absolute residual greater than 1e-5: " << _result.residual);
130 // take smaller value of the two as just one of them needs to be less than precision
131 const double residual = std::min(_result.relative_residual, _result.residual);
132 return std::make_pair(residual, _result.precision);
133}
134
135template <class ResultClass>
136bool checkResults(const typename std::map<JobId_t, ResultClass> &_results)
137{
138 bool result = true;
139 for (typename std::map<JobId_t, ResultClass>::const_iterator iter = _results.begin();
140 iter != _results.end(); ++iter) {
141 std::pair<double, double> residuals = getResiduals(iter->second);
142 if (residuals.second != 0.) {
143 if (residuals.first >= residuals.second) {
144 ELOG(1, "Fragment Job " << iter->first << " converged to " << residuals.first
145 << " instead of " << residuals.second);
146 result = false;
147 }
148 } else {
149 LOG(4, "DEBUG: Not checking accuracy because desired precision not given.");
150 }
151 }
152 return result;
153}
154
155
156#ifdef HAVE_JOBMARKET
157/** This performs a direct sum calculation for the nuclei-nuclei interaction energy
158 * and forces for each fragment contained in \a shortrangedata.
159 *
160 * Results are (re)placed in \a _longrangedata.
161 *
162 * \warning This is only valid for fully open boundary conditions.
163 *
164 * \param _shortrangedata containing information on position and charges per fragment
165 * \param _longrangedata containing energy and forces on return
166 */
167static void calculateNucleiNucleiLongRangeContribution(
168 const std::map<JobId_t, MPQCData> &_shortrangedata,
169 std::map<JobId_t, VMGData>& _longrangedata
170 )
171{
172 ASSERT( _shortrangedata.size() == _longrangedata.size(),
173 "calculateNucleiNucleiLongRangeContribution() - shortrange and longrange data have inequal size.");
174 std::map<JobId_t, VMGData>::iterator longrangeiter = _longrangedata.begin();
175 std::map<JobId_t, MPQCData>::const_iterator iter = _shortrangedata.begin();
176 for (;iter != _shortrangedata.end(); ++iter, ++longrangeiter) {
177 const MPQCData &data = iter->second;
178 VMGData &longrange_data = longrangeiter->second;
179 // set long-range contributions to zero
180 longrange_data.nuclei_long = 0.;
181 longrange_data.forces.clear();
182 longrange_data.forces.resize(data.positions.size(), FragmentForces::force_t(3,0.));
183 longrange_data.hasForces = true;
184 // go through positions and evaluate sum naively
185 ASSERT( data.positions.size() == data.charges.size(),
186 "calculateNucleiNucleiLongRangeContribution() - positions and charges differ in size.");
187 std::vector< std::vector<double> >::const_iterator positer = data.positions.begin();
188 std::vector< double >::const_iterator chargeiter = data.charges.begin();
189 FragmentForces::iterator forceiter = longrange_data.forces.begin();
190 for (; (positer != data.positions.end()) && (chargeiter != data.charges.end());
191 ++positer, ++chargeiter, ++forceiter) {
192 ASSERT( positer->size() == NDIM,
193 "calculateNucleiNucleiLongRangeContribution() - position "
194 +toString(std::distance(data.positions.begin(), positer))+" has not 3 components.");
195 const Vector position((*positer)[0], (*positer)[1], (*positer)[2]);
196
197 std::vector< std::vector<double> >::const_iterator otherpositer = data.positions.begin();
198 std::vector< double >::const_iterator otherchargeiter = data.charges.begin();
199 for (; (otherpositer != data.positions.end()) && (otherchargeiter != data.charges.end());
200 ++otherpositer, ++otherchargeiter) {
201 if ((positer == otherpositer) || (chargeiter == otherchargeiter))
202 continue;
203 ASSERT( otherpositer->size() == NDIM,
204 "calculateNucleiNucleiLongRangeContribution() - other position "
205 +toString(std::distance(data.positions.begin(), otherpositer))+" has not 3 components.");
206 const Vector otherposition((*otherpositer)[0], (*otherpositer)[1], (*otherpositer)[2]);
207 const Vector distance = position - otherposition;
208 const double invsqrdist = 1./distance.Norm();
209 const double factor = (*otherchargeiter)*invsqrdist*invsqrdist*invsqrdist;
210 (*forceiter)[0] = factor*distance[0];
211 (*forceiter)[1] = factor*distance[1];
212 (*forceiter)[2] = factor*distance[2];
213 longrange_data.nuclei_long += 0.5*(*chargeiter)*(*otherchargeiter)*invsqrdist;
214 }
215 }
216 }
217}
218#endif
219
220ActionState::ptr FragmentationFragmentationAutomationAction::performCall() {
221 boost::asio::io_service io_service;
222
223 // TODO: Have io_service run in second thread and merge with current again eventually
224
225 FragmentationResultContainer &container =
226 FragmentationResultContainer::getInstance();
227 const KeySetsContainer& keysets = FragmentJobQueue::getInstance().getKeySets();
228 const KeySetsContainer& forcekeysets = FragmentJobQueue::getInstance().getFullKeySets();
229
230 size_t Exitflag = 0;
231 std::map<JobId_t, MPQCData> shortrangedata;
232#ifdef HAVE_JOBMARKET
233 {
234 const size_t NumberJobs = FragmentJobQueue::getInstance().size();
235 MPQCFragmentController mpqccontroller(io_service);
236 mpqccontroller.setHost(params.host.get());
237 mpqccontroller.setPort(params.port.get());
238 // Phase One: obtain ids
239 mpqccontroller.requestIds(NumberJobs);
240 if (mpqccontroller.getExitflag() != 0)
241 return Action::failure;
242
243 // Phase Two: add MPQCJobs and send
244 const bool AddJobsStatus = mpqccontroller.addJobsFromQueue(
245 params.DoLongrange.get() ? MPQCData::DoSampleDensity : MPQCData::DontSampleDensity,
246 params.DoValenceOnly.get() ? MPQCData::DoSampleValenceOnly : MPQCData::DontSampleValenceOnly
247 );
248 if (AddJobsStatus)
249 LOG(1, "INFO: Added jobs from FragmentJobsQueue.");
250 else {
251 ELOG(1, "Adding jobs failed.");
252 return Action::failure;
253 }
254 mpqccontroller.run();
255
256 // Phase Three: calculate result
257 setMaxSteps(NumberJobs);
258 mpqccontroller.setUpdateHandler(
259 boost::bind(&updateSteps, boost::ref(*this), _1, _2)
260 );
261 start();
262 boost::thread wait_thread(
263 boost::bind(&MPQCFragmentController::waitforResults, boost::ref(mpqccontroller), boost::cref(NumberJobs))
264 );
265 wait_thread.join();
266 stop();
267 if (mpqccontroller.getExitflag() != 0)
268 return Action::failure;
269
270 mpqccontroller.getResults(shortrangedata);
271 if (!checkResults(shortrangedata)) {
272 ELOG(1, "At least one of the fragments' energy could not be properly minimized.");
273 return Action::failure;
274 }
275 if (mpqccontroller.getExitflag() != 0) {
276 ELOG(1, "MPQCCommandFragmentController returned non-zero exit flag.");
277 return Action::failure;
278 }
279
280 Exitflag += mpqccontroller.getExitflag();
281 }
282#else
283 {
284 const size_t NumberJobs = FragmentJobQueue::getInstance().size();
285 MPQCCommandFragmentController mpqccontroller;
286 // Phase One: obtain ids: not needed, we have infinite pool
287
288 // Phase Two: add MPQCJobs and send
289 const size_t NoJobs = mpqccontroller.addJobsFromQueue(
290 params.DoLongrange.get() ? MPQCData::DoSampleDensity : MPQCData::DontSampleDensity,
291 params.DoValenceOnly.get() ? MPQCData::DoSampleValenceOnly : MPQCData::DontSampleValenceOnly,
292 params.executable.get().string()
293 );
294 if (NoJobs != NumberJobs) {
295 ELOG(1, "Not all jobs were added succesfully.");
296 return Action::failure;
297 }
298 LOG(1, "INFO: Added " << NoJobs << " from FragmentJobsQueue.");
299
300 // prepare process
301 setMaxSteps(NumberJobs);
302 mpqccontroller.setUpdateHandler(
303 boost::bind(&updateSteps, boost::ref(*this), _1, _2)
304 );
305 start();
306 mpqccontroller.run();
307 stop();
308 if (mpqccontroller.getExitflag() != 0) {
309 ELOG(1, "MPQCCommandFragmentController returned non-zero exit flag before getting results.");
310 return Action::failure;
311 }
312
313 // get back the results and place them in shortrangedata
314 mpqccontroller.getResults(shortrangedata);
315 ASSERT( shortrangedata.size() == NumberJobs,
316 "FragmentationFragmentationAutomationAction::performCall() - number of converted results "
317 +toString(shortrangedata.size())+" and number of jobs "+toString(NumberJobs)+ " differ.");
318 if (!checkResults(shortrangedata)) {
319 ELOG(1, "At least one of the fragments' energy could not be properly minimized.");
320 return Action::failure;
321 }
322 if (mpqccontroller.getExitflag() != 0) {
323 ELOG(1, "MPQCCommandFragmentController returned non-zero exit flag after getting results.");
324 return Action::failure;
325 }
326
327 Exitflag += mpqccontroller.getExitflag();
328 }
329#endif
330
331#if defined(HAVE_JOBMARKET) && defined(HAVE_VMG)
332 if (params.DoLongrange.get()) {
333 if ( const_cast<const World &>(World::getInstance()).getAllAtoms().size() == 0) {
334 STATUS("Please load the full molecule into the world before starting this action.");
335 return Action::failure;
336 }
337
338 // obtain combined charge density
339 std::map<JobId_t, MPQCData> shortrangedata_downsampled;
340 SamplingGridProperties domain(ExportGraph_ToJobs::getDomainGrid(params.level.get()));
341 FragmentationChargeDensity summedChargeDensity(
342 shortrangedata);
343 {
344 SamplingGrid zero_globalgrid(domain);
345 summedChargeDensity(
346 shortrangedata,
347 FragmentJobQueue::getInstance().getKeySets(),
348 zero_globalgrid);
349 }
350 const std::vector<SamplingGrid> full_sample = summedChargeDensity.getFullSampledGrid();
351 LOG(1, "INFO: There are " << shortrangedata.size() << " short-range and "
352 << full_sample.size() << " level-wise long-range jobs.");
353
354 // check boundary conditions
355 const BoundaryConditions::Conditions_t &conditions =
356 World::getInstance().getDomain().getConditions();
357 const bool OpenBoundaryConditions =
358 !((conditions[0] == BoundaryConditions::Wrap) &&
359 (conditions[1] == BoundaryConditions::Wrap) &&
360 (conditions[2] == BoundaryConditions::Wrap));
361 LOG(1, std::string("INFO: Using ")
362 << (OpenBoundaryConditions ? "open" : "periodic")
363 << " boundary conditions.");
364
365 // Phase Four: obtain more ids
366 std::map<JobId_t, VMGData> longrangedata;
367 {
368 VMGFragmentController vmgcontroller(io_service);
369 vmgcontroller.setHost(params.host.get());
370 vmgcontroller.setPort(params.port.get());
371 const size_t NoJobs = shortrangedata.size()+full_sample.size();
372 vmgcontroller.requestIds(2*NoJobs);
373 if (vmgcontroller.getExitflag() != 0) {
374 ELOG(1, "VMGFragmentController returned non-zero exit flag on requesting long-range ids.");
375 return Action::failure;
376 }
377
378 // Phase Five a: create VMGJobs for electronic charge distribution
379 const size_t near_field_cells = params.near_field_cells.get();
380 const size_t interpolation_degree = params.interpolation_degree.get();
381 if (!vmgcontroller.createLongRangeJobs(
382 shortrangedata,
383 full_sample,
384 near_field_cells,
385 interpolation_degree,
386 VMGFragmentController::DontSampleParticles,
387 VMGFragmentController::DoTreatGrid,
388 params.DoValenceOnly.get() ? MPQCData::DoSampleValenceOnly : MPQCData::DontSampleValenceOnly,
389 params.DoPrintDebug.get(),
390 OpenBoundaryConditions,
391 params.DoSmearCharges.get(),
392 false)) {
393 STATUS("Could not create long-range jobs for electronic charge distribution.");
394 return Action::failure;
395 }
396
397 // Phase Six a: calculate result
398 vmgcontroller.waitforResults(NoJobs);
399 if (vmgcontroller.getExitflag() != 0) {
400 ELOG(1, "VMGFragmentController returned non-zero exit flag before getting results.");
401 return Action::failure;
402 }
403 vmgcontroller.getResults(longrangedata);
404 ASSERT( NoJobs == longrangedata.size(),
405 "FragmentationFragmentationAutomationAction::performCall() - number of MPQCresults+"
406 +toString(full_sample.size())+"="+toString(NoJobs)
407 +" and first VMGresults "+toString(longrangedata.size())+" don't match.");
408 if (!checkResults(longrangedata)) {
409 ELOG(1, "At least one of the fragments' electronic long-range potential could not be properly minimized.");
410 return Action::failure;
411 }
412 Exitflag += vmgcontroller.getExitflag();
413
414 {
415 std::map<JobId_t, VMGData> longrangedata_both;
416 // Phase Five b: create VMGJobs for nuclei charge distributions
417 const size_t near_field_cells = params.near_field_cells.get();
418 const size_t interpolation_degree = params.interpolation_degree.get();
419 if (!vmgcontroller.createLongRangeJobs(
420 shortrangedata,
421 full_sample,
422 near_field_cells,
423 interpolation_degree,
424 VMGFragmentController::DoSampleParticles,
425 VMGFragmentController::DoTreatGrid,
426 params.DoValenceOnly.get() ? MPQCData::DoSampleValenceOnly : MPQCData::DontSampleValenceOnly,
427 params.DoPrintDebug.get(),
428 OpenBoundaryConditions,
429 params.DoSmearCharges.get(),
430 params.UseImplicitCharges.get())) {
431 STATUS("Could not create long-range jobs for nuclei charge distribution.");
432 return Action::failure;
433 }
434
435 // Phase Six b: calculate result
436 vmgcontroller.waitforResults(NoJobs);
437 if (vmgcontroller.getExitflag() != 0)
438 return Action::failure;
439 vmgcontroller.getResults(longrangedata_both);
440 ASSERT( NoJobs == longrangedata_both.size(),
441 "FragmentationFragmentationAutomationAction::performCall() - number of MPQCresults+"
442 +toString(full_sample.size())+"="+toString(NoJobs)
443 +" and second VMGresults "+toString(longrangedata_both.size())+" don't match.");
444 if (!checkResults(longrangedata_both)) {
445 ELOG(1, "At least one of the fragments' nuclei long-range potential could not be properly minimized.");
446 return Action::failure;
447 }
448 if (vmgcontroller.getExitflag() != 0) {
449 ELOG(1, "VMGFragmentController returned non-zero exit flag after getting results.");
450 return Action::failure;
451 }
452 Exitflag += vmgcontroller.getExitflag();
453
454 // now replace nuclei-nuclei contribution with values from direct summation (is exact for
455 // open boundary conditions
456 //
457 // NOTE: We need to calculate both_sampled_potential for fitting partial charges,
458 // nowhere else is this quantity needed.
459 //if (OpenBoundaryConditions)
460 // calculateNucleiNucleiLongRangeContribution(shortrangedata, longrangedata_both);
461
462 // go through either data and replace nuclei_long with contribution from both
463 ASSERT( longrangedata.size() == longrangedata_both.size(),
464 "FragmentationFragmentationAutomationAction::performCall() - longrange results have different sizes.");
465 std::map<JobId_t, VMGData>::iterator destiter = longrangedata.begin();
466 std::map<JobId_t, VMGData>::const_iterator srciter = longrangedata_both.begin();
467 for (;destiter != longrangedata.end(); ++srciter, ++destiter) {
468 destiter->second.both_sampled_potential = srciter->second.sampled_potential;
469 destiter->second.nuclei_long = srciter->second.nuclei_long;
470 destiter->second.forces = srciter->second.forces;
471 destiter->second.hasForces = srciter->second.hasForces;
472 }
473 }
474 }
475
476 if (params.DoPrintDebug.get()) {
477 std::map<JobId_t, std::string> debugData;
478 {
479 if (!full_sample.empty()) {
480 // create debug jobs for each level to print the summed-up potential to vtk files
481 VMGDebugGridFragmentController debugcontroller(io_service);
482 debugcontroller.setHost(params.host.get());
483 debugcontroller.setPort(params.port.get());
484 debugcontroller.requestIds(full_sample.size());
485 if (!debugcontroller.createDebugJobs(full_sample, OpenBoundaryConditions)) {
486 STATUS("Could not create debug jobs.");
487 return Action::failure;
488 }
489 debugcontroller.waitforResults(full_sample.size());
490 debugcontroller.getResults(debugData);
491 Exitflag += debugcontroller.getExitflag();
492 }
493 }
494 }
495 container.clear();
496 container.addFullResults(keysets, forcekeysets, shortrangedata, longrangedata);
497 } else {
498 container.clear();
499 container.addShortRangeResults(keysets, forcekeysets, shortrangedata);
500 }
501#else
502 container.clear();
503 container.addShortRangeResults(keysets, forcekeysets, shortrangedata);
504#endif
505
506 // now clear all present jobs as we are done
507 FragmentJobQueue::getInstance().clear();
508
509 if (Exitflag != 0)
510 STATUS("Controller has returned failure.");
511 return (Exitflag == 0) ? Action::success : Action::failure;
512}
513
514ActionState::ptr FragmentationFragmentationAutomationAction::performUndo(ActionState::ptr _state) {
515 return Action::success;
516}
517
518ActionState::ptr FragmentationFragmentationAutomationAction::performRedo(ActionState::ptr _state){
519 return Action::success;
520}
521
522bool FragmentationFragmentationAutomationAction::canUndo() {
523 return false;
524}
525
526bool FragmentationFragmentationAutomationAction::shouldUndo() {
527 return false;
528}
529/** =========== end of function ====================== */
Note: See TracBrowser for help on using the repository browser.