mirror of https://github.com/BOINC/boinc.git
Added some comments to code
svn path=/trunk/boinc/; revision=204
This commit is contained in:
parent
8285788396
commit
2a624974bd
3
TODO
3
TODO
|
@ -151,6 +151,9 @@ LOW-PRIORITY
|
|||
and output directly in result (blob).
|
||||
For projects with small data.
|
||||
|
||||
- add a handler for SIGTERM that calls exit_tasks and makes sure state files
|
||||
are written.
|
||||
|
||||
--------------------------
|
||||
DONE (may need test) Please document these!
|
||||
|
||||
|
|
15
api/api.h
15
api/api.h
|
@ -53,10 +53,13 @@ public:
|
|||
// - call boinc_init(APP_IN&) at startup
|
||||
// - call time_to_checkpoint() often.
|
||||
// This is cheap - it returns true if time to checkpoint.
|
||||
// - checkpoint as often as requested by core
|
||||
// - checkpoint if time_to_checkpoint() returns true
|
||||
// - call checkpoint_completed() when checkpoint is complete
|
||||
// The only member of APP_OUT that needs to be filled in is percent_done
|
||||
// - boinc_poll():
|
||||
// Call this as often as requested by core
|
||||
// - call app_completed() when the application is completed
|
||||
// The only member of APP_OUT that needs to be filled in is percent_done
|
||||
|
||||
struct APP_IN_GRAPHICS {
|
||||
int xsize;
|
||||
|
@ -77,8 +80,8 @@ struct APP_IN {
|
|||
};
|
||||
|
||||
struct APP_OUT {
|
||||
double percent_done;
|
||||
double cpu_time_at_checkpoint;
|
||||
double percent_done; //percent of work unit completed
|
||||
double cpu_time_at_checkpoint; //cpu time of current process
|
||||
bool checkpointed; // true iff checkpointed since last call
|
||||
};
|
||||
|
||||
|
@ -98,13 +101,13 @@ int boinc_resolve_link(char *file_name, char *resolved_name);
|
|||
#define BOINC_INIT_FILE "boinc_init.xml"
|
||||
|
||||
//the following are provided for implementation of the checkpoint system
|
||||
int checkpoint_completed(APP_OUT& ao);
|
||||
int app_completed(APP_OUT& ao);
|
||||
int checkpoint_completed(APP_OUT& ao); //call this when checkpoint is completed
|
||||
int app_completed(APP_OUT& ao); //call this when app is completed
|
||||
|
||||
extern bool _checkpoint;
|
||||
#define time_to_checkpoint() _checkpoint
|
||||
int set_timer(double period); //period is seconds spent in process
|
||||
void on_timer(int not_used);
|
||||
void on_timer(int not_used); //sets _checkpoint to true
|
||||
double get_cpu_time(); //return cpu time for this process
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1151,6 +1151,9 @@ David A July 15, 2002
|
|||
Michael Gary July 15, 2002
|
||||
- Fixed compile bug
|
||||
- Updated documentation
|
||||
- Fixed test script bug
|
||||
- Added comments to some .h files
|
||||
- Fixed timing bug
|
||||
doc/
|
||||
api.html
|
||||
client_debug.html
|
||||
|
@ -1162,3 +1165,13 @@ Michael Gary July 15, 2002
|
|||
test.html
|
||||
tools/
|
||||
Makefile.in
|
||||
test/
|
||||
test_uc.php
|
||||
test_rsc.php
|
||||
init.inc
|
||||
client/
|
||||
client_types.h
|
||||
hostinfo.h
|
||||
api/
|
||||
api.C
|
||||
api.h
|
||||
|
|
|
@ -46,7 +46,8 @@ public:
|
|||
// the following items come from prefs.xml
|
||||
// They are a function only of the user and the project
|
||||
//
|
||||
char master_url[256];
|
||||
char master_url[256]; // url of site that contains scheduler tags
|
||||
// for this project
|
||||
char authenticator[256]; // user's authenticator on this project
|
||||
char* project_specific_prefs;
|
||||
double resource_share; // project's resource share
|
||||
|
@ -179,7 +180,7 @@ struct RESULT {
|
|||
bool is_active; // an app is currently running for this
|
||||
bool is_compute_done; // computation finished
|
||||
bool is_server_ack; // ack received from scheduling server
|
||||
double cpu_time;
|
||||
double cpu_time; // cpu time spent completing result
|
||||
int exit_status;
|
||||
char stderr_out[STDERR_MAX_LEN];
|
||||
APP* app;
|
||||
|
|
|
@ -30,6 +30,7 @@ struct HOST_INFO {
|
|||
char serialnum[256];
|
||||
char ip_addr[256];
|
||||
|
||||
//exponentially weighted fractions
|
||||
double on_frac;
|
||||
double conn_frac;
|
||||
double active_frac;
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
<h3>Test BOINC Project</h3>
|
||||
|
||||
<scheduler>http://localhost/boinc-cgi/cgi</scheduler>
|
||||
<html>
|
||||
<head>
|
||||
</head>
|
||||
<body>
|
||||
<scheduler>jill.ssl.berkeley.edu/cgi-bin/boinc-cgi/cgi</scheduler>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -9,7 +9,8 @@
|
|||
check_env_vars(); // THIS IS ABSOLUTELY CRITICAL!!!
|
||||
clear_db();
|
||||
clear_data_dirs();
|
||||
init_client_dirs("account_sah.xml");
|
||||
create_keys(); //added
|
||||
init_client_dirs("prefs3.xml"); //"account_sah.xml");
|
||||
copy_to_download_dir("work_unit.sah");
|
||||
add_platform();
|
||||
add_core_client(null);
|
||||
|
|
|
@ -17,7 +17,9 @@
|
|||
add_app("upper_case", null, null);
|
||||
create_work("-appname upper_case -rsc_iops 180000000000.0 -rsc_fpops 0.0 -rsc_memory 1000000000000.2 -rsc_disk 1000000000000.2 -wu_name uc_wu -wu_template uc_wu -result_template uc_result -nresults 1 input");
|
||||
start_feeder();
|
||||
|
||||
//run_client("-exit_after 10");
|
||||
printf("running client\n");
|
||||
run_client("-exit_when_idle > client_stdout");
|
||||
stop_feeder();
|
||||
|
||||
|
|
|
@ -17,4 +17,5 @@
|
|||
} else {
|
||||
echo "Water marks are not working\n";
|
||||
}
|
||||
PassThru("rm -f tw_results");
|
||||
?>
|
||||
|
|
Loading…
Reference in New Issue