mirror of https://github.com/BOINC/boinc.git
David 20 Apr 2007
- make_project: add periodic tasks to default config.xml: dp_dump, update_uotd, update_forum_activities, update_stats, update_profile_pages - backend_lib.C: refuse to create a job for which some necessary parameter (rsc_fpops_est, rsc_fpops_bound, etc.) is missing - Unix build: don't include std_fixes.h in config.h. std_fixes.h is (I think) deprecated - sched_util: default sched log level is MSG_NORMAL - client: add ".txt" to job log filename - compile fixes configure.ac api/ reduce_main.C client/ file_names.C lib/ str_util.h sched/ sample_work_generator.C sched_msgs.h tools/ backend_lib.C svn path=/trunk/boinc/; revision=12430
This commit is contained in:
parent
2d804927f3
commit
b686f89d85
|
@ -44,7 +44,6 @@
|
|||
#endif
|
||||
#endif
|
||||
|
||||
//#include "std_fixes.h"
|
||||
#include "boinc_gl.h"
|
||||
#include "gutil.h"
|
||||
#include "reduce.h"
|
||||
|
|
|
@ -3827,3 +3827,28 @@ Rom 19 Apr 2007 (HEAD)
|
|||
- Tag for 5.9.4 release, all platforms
|
||||
boinc_core_release_5_9_4
|
||||
|
||||
David 20 Apr 2007
|
||||
- make_project: add periodic tasks to default config.xml:
|
||||
dp_dump, update_uotd, update_forum_activities, update_stats,
|
||||
update_profile_pages
|
||||
- backend_lib.C: refuse to create a job for which some necessary
|
||||
parameter (rsc_fpops_est, rsc_fpops_bound, etc.) is missing
|
||||
- Unix build: don't include std_fixes.h in config.h.
|
||||
std_fixes.h is (I think) deprecated
|
||||
- sched_util: default sched log level is MSG_NORMAL
|
||||
- client: add ".txt" to job log filename
|
||||
- compile fixes
|
||||
|
||||
configure.ac
|
||||
api/
|
||||
reduce_main.C
|
||||
client/
|
||||
file_names.C
|
||||
lib/
|
||||
str_util.h
|
||||
sched/
|
||||
sample_work_generator.C
|
||||
sched_msgs.h
|
||||
tools/
|
||||
backend_lib.C
|
||||
make_project
|
||||
|
|
|
@ -91,7 +91,7 @@ void job_log_filename(PROJECT& project, char* buf, int len) {
|
|||
char url[1024];
|
||||
|
||||
escape_project_url(project.master_url, url);
|
||||
snprintf(buf, len, "%s%s", JOB_LOG_BASE, url);
|
||||
snprintf(buf, len, "%s%s.txt", JOB_LOG_BASE, url);
|
||||
}
|
||||
|
||||
// Returns the location of a numbered slot directory
|
||||
|
|
|
@ -397,8 +397,6 @@ AH_TOP([
|
|||
|
||||
])
|
||||
AH_BOTTOM([
|
||||
/* include fixes for the most common problems */
|
||||
#include "std_fixes.h"
|
||||
|
||||
/* end double-inclusion protection for config.h */
|
||||
#endif /* #ifndef BOINC_CONFIG_H */
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#include <cstring>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
|
||||
#define MEGA (1048576.0)
|
||||
#define GIGA (1024.*1048576.0)
|
||||
|
|
|
@ -34,9 +34,9 @@
|
|||
#include "backend_lib.h"
|
||||
#include "parse.h"
|
||||
|
||||
#include "sched_msgs.h"
|
||||
#include "sched_config.h"
|
||||
#include "sched_util.h"
|
||||
#include "sched_msgs.h"
|
||||
|
||||
#define CUSHION 100
|
||||
// maintain at least this many unsent results
|
||||
|
@ -113,14 +113,25 @@ void main_loop() {
|
|||
log_messages.printf(SCHED_MSG_LOG::MSG_CRITICAL,
|
||||
"can't make job: %d\n", retval
|
||||
);
|
||||
exit(retval);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int main() {
|
||||
int retval;
|
||||
int main(int argc, char** argv) {
|
||||
int i, retval;
|
||||
|
||||
for (i=1; i<argc; i++) {
|
||||
if (!strcmp(argv[i], "-d")) {
|
||||
log_messages.set_debug_level(atoi(argv[++i]));
|
||||
} else {
|
||||
log_messages.printf(SCHED_MSG_LOG::MSG_CRITICAL,
|
||||
"bad cmdline arg: %s", argv[i]
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if (config.parse_file("..")) {
|
||||
log_messages.printf(SCHED_MSG_LOG::MSG_CRITICAL,
|
||||
|
|
|
@ -32,7 +32,7 @@ public:
|
|||
MSG_NORMAL=2,
|
||||
MSG_DEBUG=3
|
||||
};
|
||||
SCHED_MSG_LOG(): MSG_LOG(stderr) {}
|
||||
SCHED_MSG_LOG(): MSG_LOG(stderr) { debug_level = MSG_NORMAL; }
|
||||
void set_debug_level(int new_level) { debug_level = new_level; }
|
||||
};
|
||||
|
||||
|
|
|
@ -534,6 +534,34 @@ int create_work(
|
|||
}
|
||||
strlcpy(wu.result_template_file, result_template_filename, sizeof(wu.result_template_file));
|
||||
|
||||
if (wu.rsc_fpops_est == 0) {
|
||||
fprintf(stderr, "no rsc_fpops_est given; can't create job\n");
|
||||
return ERR_NO_OPTION;
|
||||
}
|
||||
if (wu.rsc_fpops_bound == 0) {
|
||||
fprintf(stderr, "no rsc_fpops_bound given; can't create job\n");
|
||||
return ERR_NO_OPTION;
|
||||
}
|
||||
if (wu.rsc_disk_bound == 0) {
|
||||
fprintf(stderr, "no rsc_disk_bound given; can't create job\n");
|
||||
return ERR_NO_OPTION;
|
||||
}
|
||||
if (wu.target_nresults == 0) {
|
||||
fprintf(stderr, "no target_nresults given; can't create job\n");
|
||||
return ERR_NO_OPTION;
|
||||
}
|
||||
if (wu.max_error_results == 0) {
|
||||
fprintf(stderr, "no max_error_results given; can't create job\n");
|
||||
return ERR_NO_OPTION;
|
||||
}
|
||||
if (wu.max_total_results == 0) {
|
||||
fprintf(stderr, "no max_total_results given; can't create job\n");
|
||||
return ERR_NO_OPTION;
|
||||
}
|
||||
if (wu.max_success_results == 0) {
|
||||
fprintf(stderr, "no max_success_results given; can't create job\n");
|
||||
return ERR_NO_OPTION;
|
||||
}
|
||||
wu.transition_time = time(0);
|
||||
retval = wu.insert();
|
||||
if (retval) {
|
||||
|
|
|
@ -220,7 +220,35 @@ if not options.no_test_app:
|
|||
project.config.daemons.make_node_and_append("daemon").cmd = 'sample_work_generator -d 3'
|
||||
project.config.daemons.make_node_and_append("daemon").cmd = 'sample_bitwise_validator -d 3 -app uppercase'
|
||||
project.config.daemons.make_node_and_append("daemon").cmd = 'sample_assimilator -d 3 -app uppercase'
|
||||
project.config.write()
|
||||
|
||||
# set up default tasks
|
||||
|
||||
t = project.config.tasks.make_node_and_append("task")
|
||||
t.period = '24 hours'
|
||||
t.output = 'db_dump.out'
|
||||
t.cmd = 'db_dump -d 2 -dump_spec ../db_dump_spec.xml'
|
||||
|
||||
t = project.config.tasks.make_node_and_append("task")
|
||||
t.period = '1 days'
|
||||
t.output = 'update_uotd.out'
|
||||
t.cmd = 'run_in_ops update_uotd.php'
|
||||
|
||||
t = project.config.tasks.make_node_and_append("task")
|
||||
t.period = '1 hour'
|
||||
t.output = 'update_forum_activities.out'
|
||||
t.cmd = 'run_in_ops update_forum_activities.php'
|
||||
|
||||
t = project.config.tasks.make_node_and_append("task")
|
||||
t.period = '7 days'
|
||||
t.output = 'update_stats.out'
|
||||
t.cmd = 'update_stats'
|
||||
|
||||
t = project.config.tasks.make_node_and_append("task")
|
||||
t.period = '24 hours'
|
||||
t.output = 'update_profile_pages.out'
|
||||
t.cmd = 'run_in_ops update_profile_pages.php'
|
||||
|
||||
project.config.write()
|
||||
|
||||
print '''Done installing default daemons.'''
|
||||
|
||||
|
|
Loading…
Reference in New Issue