BOINC Server component – work generator demon

BOINC Server component – work generator demon
[code lang=”cpp”]#include “backend_lib.h”
int main() {
DB_APP app;
DB_WORKUNIT wu;
char wu_template[LARGE_BLOB_SIZE];
char* infiles[] = {“infile”};SCHED_CONFIG config;
config.parse_file();
boinc_db.open(config.db_name, config.db_host, config.db_user, config.db_passwd);
app.lookup(“where name=’myappname'”);
wu.clear(); // zeroes all fields
wu.appid = app.id;
wu.min_quorum = 2;
wu.target_nresults = 2;
wu.max_error_results = 5;
wu.max_total_results = 5;
wu.max_success_results = 5;
wu.rsc_fpops_est = 1e10;
wu.rsc_fpops_bound = 1e11;
wu.rsc_memory_bound = 1e8;
wu.rsc_disk_bound = 1e8;
wu.delay_bound = 7*86400;
read_filename(“templates/wu_template.xml”, wu_template, sizeof(wu_template));
create_work(
wu,
wu_template,
“templates/results_template.xml”,
“templates/results_template.xml”,
infiles,
1,
config
);
return 0;
}[/code]

Leave a Reply