Assimilator Program
From Unofficial BOINC Wiki
[edit] General
BOINC Powered Projects must create one Assimilator Program per Application in their Project. This is done by linking the program sched/assimilate.C with an application-specific function of the form
int assimilate_handler(
WORKUNIT& wu, vector<RESULT>& results, RESULT& canononical_result
);
This is called when either
- The Work Unit has a nonzero Work Unit Error Mask (indicating, for example, too many Error Results). In this case the Assimilator Handler Function might write a message to a log or send an email to the application developer.
- The Work Unit has a Canonical Result. In this case wu.canonical_resultid will be nonzero, canonical_result will contain the Canonical Result. Your handler might, for example, parse the Canonical Result Data File and write its contents to a separate database (which is normally off-line to normal Participants).
In both cases the 'results' vector will be populated with all the Work Unit's results (including unsuccessful and unsent ones). All files (both input and output) will generally be on disk.
It's possible that both conditions might hold.
If assimilate_handler() returns zero, the Work Unit record will be marked as assimilated. If assimilate_handler() returns nonzero, the Assimilator will log an error message and exit. Typically the function should return nonzero for any error condition. This way the system administrator can fix the problem before any completed or erroneous Work Units are mis-handled by BOINC.
You can use BOINC's Back-End Utility Functions to get file pathnames and open files.
[edit] UCB Source
[edit] Copyright ©
- 2005 University of California
- 2005 Paul D. Buck
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.

