Skip to content

Commit

Permalink
Add progress tracking into a file
Browse files Browse the repository at this point in the history
This changeset adds progress tracking for
CERN's next Computing Challenge https://test4theory.cern.ch/challenge/

openMalaria now creates a file named "progress" and writes a number into it,
which represents progress of a workunit.

For more information see: https://boinc.berkeley.edu/trac/wiki/BasicApi#progress
  • Loading branch information
tph-thuering committed May 20, 2015
1 parent 432d1d8 commit 115ae2c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions model/util/BoincWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,15 @@ namespace BoincWrapper {

void reportProgress (double progress) {
boinc_fraction_done (progress);
// Changeset for CERN Compute Challenge 2015 (below)
//
// this writes a number which represents the progress
// into a file named progress
// progress should be a double with range 0 to 1
// see https://boinc.berkeley.edu/trac/wiki/BasicApi#progress for further reference
ofstream outfile ("progress");
outfile << progress << endl;
outfile.close();
}

int timeToCheckpoint() {
Expand Down

1 comment on commit 115ae2c

@tph-thuering
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Related to #77

Please sign in to comment.