mirror of https://github.com/BOINC/boinc.git
- client: add --unsigned_apps_ok cmdline option
and <unsigned_apps_ok> config option. This tells the client to allow unsigned apps. For testing. No file xfers or other network traffic will be allowed if set. - client: add <exit_after_finish> option (same as cmdline flag) - client: add <skip_cpu_benchmarks> option (same as cmdline flag) - client: print message if abort past-deadline unstarted job - client: improve message when have NVIDIA drivers but no GPU svn path=/trunk/boinc/; revision=19276
This commit is contained in:
parent
45e24fb176
commit
54b078d0af
|
@ -8460,3 +8460,25 @@ David 6 Oct 2009
|
|||
|
||||
sched/
|
||||
sched_send.cpp
|
||||
|
||||
David 7 Oct 2009
|
||||
- client: add --unsigned_apps_ok cmdline option
|
||||
and <unsigned_apps_ok> config option.
|
||||
This tells the client to allow unsigned apps.
|
||||
For testing.
|
||||
No file xfers or other network traffic will be allowed if set.
|
||||
- client: add <exit_after_finish> option (same as cmdline flag)
|
||||
- client: add <skip_cpu_benchmarks> option (same as cmdline flag)
|
||||
- client: print message if abort past-deadline unstarted job
|
||||
- client: improve message when have NVIDIA drivers but no GPU
|
||||
|
||||
client/
|
||||
app_start.cpp
|
||||
client_state.cpp,h
|
||||
cs_cmdline.cpp
|
||||
cs_prefs.cpp
|
||||
log_flags.cpp
|
||||
lib/
|
||||
coproc.cpp
|
||||
samples/
|
||||
client_state_save.xml (new)
|
||||
|
|
|
@ -920,6 +920,11 @@ error:
|
|||
//
|
||||
gstate.input_files_available(result, true);
|
||||
gstate.report_result_error(*result, buf);
|
||||
if (log_flags.task_debug) {
|
||||
msg_printf(wup->project, MSG_INFO,
|
||||
"[task_debug] couldn't start app: %s", buf
|
||||
);
|
||||
}
|
||||
set_task_state(PROCESS_COULDNT_START, "start");
|
||||
return retval;
|
||||
}
|
||||
|
|
|
@ -126,6 +126,7 @@ CLIENT_STATE::CLIENT_STATE():
|
|||
disable_graphics = false;
|
||||
work_fetch_no_new_work = false;
|
||||
cant_write_state_file = false;
|
||||
unsigned_apps_ok = false;
|
||||
|
||||
debt_interval_start = 0;
|
||||
retry_shmem_time = 0;
|
||||
|
@ -864,7 +865,10 @@ int CLIENT_STATE::link_app_version(PROJECT* p, APP_VERSION* avp) {
|
|||
|
||||
// any file associated with an app version must be signed
|
||||
//
|
||||
fip->signature_required = true;
|
||||
if (!unsigned_apps_ok) {
|
||||
fip->signature_required = true;
|
||||
}
|
||||
|
||||
file_ref.file_info = fip;
|
||||
}
|
||||
return 0;
|
||||
|
@ -993,6 +997,10 @@ bool CLIENT_STATE::abort_unstarted_late_jobs() {
|
|||
RESULT* rp = results[i];
|
||||
if (!rp->not_started()) continue;
|
||||
if (rp->report_deadline > now) continue;
|
||||
msg_printf(rp->project, MSG_INFO,
|
||||
"Aborting task %s; not started and deadline has passed",
|
||||
rp->name
|
||||
);
|
||||
rp->abort_inactive(ERR_UNSTARTED_LATE);
|
||||
action = true;
|
||||
}
|
||||
|
|
|
@ -166,21 +166,22 @@ public:
|
|||
double last_wakeup_time;
|
||||
bool initialized;
|
||||
/// failed to write state file.
|
||||
|
||||
/// In this case we continue to run for 1 minute,
|
||||
/// handling GUI RPCs but doing nothing else,
|
||||
/// so that the Manager can tell the user what the problem is
|
||||
bool cant_write_state_file;
|
||||
/// accept unsigned app files (use for testing only!!)
|
||||
bool unsigned_apps_ok;
|
||||
/// use hardwired numbers rather than running benchmarks
|
||||
bool skip_cpu_benchmarks;
|
||||
private:
|
||||
bool client_state_dirty;
|
||||
int old_major_version;
|
||||
int old_minor_version;
|
||||
int old_release;
|
||||
/// if set, use hardwired numbers rather than running benchmarks
|
||||
bool skip_cpu_benchmarks;
|
||||
/// if set, run benchmarks on client startup
|
||||
bool run_cpu_benchmarks;
|
||||
/// set if a benchmark fails to start because of a process that doesn't stop.
|
||||
/// set if a benchmark fails to start because of a job that doesn't exit
|
||||
/// Persists so that the next start of BOINC runs the benchmarks.
|
||||
bool cpu_benchmarks_pending;
|
||||
|
||||
|
|
|
@ -83,6 +83,7 @@ static void print_options(char* prog) {
|
|||
" --show_projects show attached projects\n"
|
||||
" --skip_cpu_benchmarks don't run CPU benchmarks\n"
|
||||
" --start_delay X delay starting apps for X secs\n"
|
||||
" --unsigned_apps_ok allow unsigned apps (for testing)\n"
|
||||
" --update_prefs <URL> contact a project to update preferences\n"
|
||||
" --version show version info\n"
|
||||
,
|
||||
|
@ -219,6 +220,8 @@ void CLIENT_STATE::parse_cmdline(int argc, char** argv) {
|
|||
} else if (ARG(start_delay)) {
|
||||
if (i == argc-1) show_options = true;
|
||||
else config.start_delay = atof(argv[++i]);
|
||||
} else if (ARG(unsigned_apps_ok)) {
|
||||
unsigned_apps_ok = true;
|
||||
} else if (ARG(update_prefs)) {
|
||||
if (i == argc-1) show_options = true;
|
||||
else safe_strcpy(update_prefs_url, argv[++i]);
|
||||
|
|
|
@ -212,6 +212,10 @@ int CLIENT_STATE::resume_tasks(int reason) {
|
|||
}
|
||||
|
||||
int CLIENT_STATE::check_suspend_network() {
|
||||
// no network traffic if we're allowing unsigned apps
|
||||
//
|
||||
if (unsigned_apps_ok) return SUSPEND_REASON_USER_REQ;
|
||||
|
||||
switch(network_mode.get_current()) {
|
||||
case RUN_MODE_ALWAYS: return 0;
|
||||
case RUN_MODE_NEVER:
|
||||
|
|
|
@ -240,7 +240,7 @@ int CONFIG::parse_options(XML_PARSER& xp) {
|
|||
return 0;
|
||||
}
|
||||
if (xp.parse_bool(tag, "abort_jobs_on_exit", btemp)) {
|
||||
gstate.abort_jobs_on_exit = true;
|
||||
gstate.abort_jobs_on_exit = btemp;
|
||||
continue;
|
||||
}
|
||||
if (xp.parse_bool(tag, "allow_multiple_clients", allow_multiple_clients)) continue;
|
||||
|
@ -304,6 +304,18 @@ int CONFIG::parse_options(XML_PARSER& xp) {
|
|||
if (xp.parse_bool(tag, "use_certs", use_certs)) continue;
|
||||
if (xp.parse_bool(tag, "use_certs_only", use_certs_only)) continue;
|
||||
if (xp.parse_bool(tag, "zero_debts", zero_debts)) continue;
|
||||
if (xp.parse_bool(tag, "skip_cpu_benchmarks", btemp)) {
|
||||
gstate.skip_cpu_benchmarks = btemp;
|
||||
continue;
|
||||
}
|
||||
if (xp.parse_bool(tag, "unsigned_apps_ok", btemp)) {
|
||||
gstate.unsigned_apps_ok = btemp;
|
||||
continue;
|
||||
}
|
||||
if (xp.parse_bool(tag, "exit_after_finish", btemp)) {
|
||||
gstate.exit_after_finish = btemp;
|
||||
continue;
|
||||
}
|
||||
|
||||
msg_printf(NULL, MSG_USER_ERROR, "Unrecognized tag in %s: <%s>\n",
|
||||
CONFIG_FILE, tag
|
||||
|
|
|
@ -323,7 +323,7 @@ void COPROC_CUDA::get(
|
|||
|
||||
retval = (*__cuInit)(0);
|
||||
if (retval) {
|
||||
sprintf(buf, "cuInit() returned %d", retval);
|
||||
sprintf(buf, "NVIDIA drivers present but no GPUs found");
|
||||
warnings.push_back(buf);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,66 @@
|
|||
<client_state>
|
||||
<host_info>
|
||||
<p_fpops>1e9</p_fpops>
|
||||
<p_calculated>2e9</p_calculated>
|
||||
<m_nbytes>2e9</m_nbytes>
|
||||
<d_total>1e11</d_total>
|
||||
<d_free>1e11</d_free>
|
||||
</host_info>
|
||||
<project>
|
||||
<master_url>http://test.test</master_url>
|
||||
<project_name>test_project</project_name>
|
||||
</project>
|
||||
|
||||
<app>
|
||||
<name>test_app</name>
|
||||
<user_friendly_name>test_app</user_friendly_name>
|
||||
</app>
|
||||
|
||||
<file_info>
|
||||
<name>test.exe</name>
|
||||
<executable/>
|
||||
<status>1</status>
|
||||
</file_info>
|
||||
<file_info>
|
||||
<name>input.txt</name>
|
||||
<status>1</status>
|
||||
</file_info>
|
||||
<file_info>
|
||||
<name>output.txt</name>
|
||||
<generated_locally/>
|
||||
<upload_when_present/>
|
||||
<max_nbytes>1e6</max_nbytes>
|
||||
</file_info>
|
||||
|
||||
<app_version>
|
||||
<app_name>test_app</app_name>
|
||||
<api_version>6.3.0</api_version>
|
||||
<file_ref>
|
||||
<file_name>test.exe</file_name>
|
||||
<main_program/>
|
||||
</file_ref>
|
||||
</app_version>
|
||||
|
||||
<workunit>
|
||||
<name>test_wu</name>
|
||||
<app_name>test_app</app_name>
|
||||
<file_ref>
|
||||
<file_name>input.txt</file_name>
|
||||
<open_name>in</open_name>
|
||||
</file_ref>
|
||||
</workunit>
|
||||
|
||||
<result>
|
||||
<name>test_result</name>
|
||||
<wu_name>test_wu</wu_name>
|
||||
<state>2</state>
|
||||
<report_deadline>2e9</report_deadline>
|
||||
<file_ref>
|
||||
<file_name>output.txt</file_name>
|
||||
<open_name>out</open_name>
|
||||
</file_ref>
|
||||
</result>
|
||||
|
||||
<user_network_request>3</user_network_request>
|
||||
|
||||
</client_state>
|
Loading…
Reference in New Issue