2011-04-25 03:18:26 +00:00
|
|
|
// This file is part of BOINC.
|
|
|
|
// http://boinc.berkeley.edu
|
|
|
|
// Copyright (C) 2008 University of California
|
|
|
|
//
|
|
|
|
// BOINC is free software; you can redistribute it and/or modify it
|
|
|
|
// under the terms of the GNU Lesser General Public License
|
|
|
|
// as published by the Free Software Foundation,
|
|
|
|
// either version 3 of the License, or (at your option) any later version.
|
|
|
|
//
|
|
|
|
// BOINC is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
// See the GNU Lesser General Public License for more details.
|
|
|
|
//
|
|
|
|
// You should have received a copy of the GNU Lesser General Public License
|
|
|
|
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
2012-08-01 20:04:05 +00:00
|
|
|
#include "cc_config.h"
|
|
|
|
|
2011-04-25 03:18:26 +00:00
|
|
|
#ifdef _WIN32
|
|
|
|
#include "boinc_win.h"
|
|
|
|
#else
|
|
|
|
#include "config.h"
|
|
|
|
#include <cstdio>
|
|
|
|
#include <cstring>
|
|
|
|
#include <unistd.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "common_defs.h"
|
|
|
|
#include "diagnostics.h"
|
|
|
|
#include "error_numbers.h"
|
|
|
|
#include "filesys.h"
|
|
|
|
#include "parse.h"
|
|
|
|
#include "str_util.h"
|
2011-06-24 03:33:22 +00:00
|
|
|
#include "url.h"
|
2011-04-25 03:18:26 +00:00
|
|
|
|
2012-08-11 05:47:18 +00:00
|
|
|
#include "cc_config.h"
|
|
|
|
|
2011-04-25 03:18:26 +00:00
|
|
|
using std::string;
|
|
|
|
|
|
|
|
LOG_FLAGS::LOG_FLAGS() {
|
|
|
|
init();
|
|
|
|
}
|
|
|
|
|
|
|
|
void LOG_FLAGS::init() {
|
|
|
|
memset(this, 0, sizeof(LOG_FLAGS));
|
|
|
|
// on by default (others are off by default)
|
|
|
|
//
|
|
|
|
task = true;
|
|
|
|
file_xfer = true;
|
|
|
|
sched_ops = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Parse log flag preferences
|
|
|
|
//
|
|
|
|
int LOG_FLAGS::parse(XML_PARSER& xp) {
|
2011-08-10 17:11:08 +00:00
|
|
|
while (!xp.get_tag()) {
|
|
|
|
if (!xp.is_tag) {
|
2011-04-25 03:18:26 +00:00
|
|
|
continue;
|
|
|
|
}
|
2011-08-10 17:11:08 +00:00
|
|
|
if (xp.match_tag("/log_flags")) return 0;
|
|
|
|
if (xp.parse_bool("file_xfer", file_xfer)) continue;
|
|
|
|
if (xp.parse_bool("sched_ops", sched_ops)) continue;
|
|
|
|
if (xp.parse_bool("task", task)) continue;
|
2011-04-25 03:18:26 +00:00
|
|
|
|
2013-06-04 18:25:11 +00:00
|
|
|
if (xp.parse_bool("android_debug", android_debug)) continue;
|
2011-08-10 17:11:08 +00:00
|
|
|
if (xp.parse_bool("app_msg_receive", app_msg_receive)) continue;
|
|
|
|
if (xp.parse_bool("app_msg_send", app_msg_send)) continue;
|
2012-02-09 00:47:04 +00:00
|
|
|
if (xp.parse_bool("async_file_debug", async_file_debug)) continue;
|
2011-08-10 17:11:08 +00:00
|
|
|
if (xp.parse_bool("benchmark_debug", benchmark_debug)) continue;
|
|
|
|
if (xp.parse_bool("checkpoint_debug", checkpoint_debug)) continue;
|
|
|
|
if (xp.parse_bool("coproc_debug", coproc_debug)) continue;
|
|
|
|
if (xp.parse_bool("cpu_sched", cpu_sched)) continue;
|
|
|
|
if (xp.parse_bool("cpu_sched_debug", cpu_sched_debug)) continue;
|
|
|
|
if (xp.parse_bool("cpu_sched_status", cpu_sched_status)) continue;
|
|
|
|
if (xp.parse_bool("dcf_debug", dcf_debug)) continue;
|
2012-01-02 05:53:42 +00:00
|
|
|
if (xp.parse_bool("disk_usage_debug", disk_usage_debug)) continue;
|
2011-08-10 17:11:08 +00:00
|
|
|
if (xp.parse_bool("file_xfer_debug", file_xfer_debug)) continue;
|
|
|
|
if (xp.parse_bool("gui_rpc_debug", gui_rpc_debug)) continue;
|
|
|
|
if (xp.parse_bool("heartbeat_debug", heartbeat_debug)) continue;
|
|
|
|
if (xp.parse_bool("http_debug", http_debug)) continue;
|
|
|
|
if (xp.parse_bool("http_xfer_debug", http_xfer_debug)) continue;
|
Reinstate and Improve XScreenSaver Idle Detection
The set of commits on this pull request:
https://github.com/BOINC/boinc/pull/1453
first reinstated previously existing code to utilize the XScreenSaver
(XSS) X extension when determining a system's idle state (there was
also additional DPMS code that was not reinstated).
Original removal:
https://github.com/BOINC/boinc/commit/bfae1032e5c1ac73f2d8d92f222293d8383a6cee
The code would attempt to open a connection to the display at the client
binary's DISPLAY environment variable and, if unable to connect, always
report busy (undesirable).
The original motivation for reinstating this code was that the remaining
idle detection mechanisms did not detect mouse or keyboard movement if
an Xserver was responsible for them. Only activities in terminals were
detected. Through the course of extending and improving this code, the
following changes have been made:
* As per "man Xserver", each local Xserver should have a socket file
at standard location /tmp/.X11-unix/ with standard naming scheme
"Xn", where n is the number of the DISPLAY. This code will open this
directory and parse its contents for open DISPLAYs, adding them to a
vector for later interrogation of idle time by xss_idle. If no DISPLAYs
were found, a static guess-list from DISPLAY :0 to DISPLAY :6 is set and
interrogated.
* xss_idle uses the XScreenSaver X extension's API, as documented at
"man 3 xss". Certain checks are performed to determine if the X
server is accessible, and if so, whether it has the XScreenSaver
extension. If it does, then we obtain information on the DISPLAY's idle
time and determine whether the Xserver is idle or not.
* The user running the boinc client (typically the "boinc" user for
most distributions), must have access to the Xserver for XSS idle
detection to work. Dropping an appropriate file in /etc/X11/Xsession.d/
(Debian flavours) or /etc/X11/xinit/xinitrc.d/ (Fedora and others)
should permit Xservers to run something like "xhost +SI:localuser:boinc"
on start. If the boinc client cannot access an Xserver/DISPLAY, it
simply skips it and treats it as though it is idle. If no DISPLAY is
accessible, then xss_idle is effectively passed through --xss_idle will
report the system as idle-- and idle detection is left to other
mechanisms.
* A debug logging flag "idle_detection_debug" was added. If this
flag is defined in the cc_config.xml file as "1", then verbose
debugging information related to boinc's idle detection determinations is
provided to the Event Log. This logging flag may also be utilized
by other components of idle detection as/if needed/desired.
2015-12-30 23:03:35 +00:00
|
|
|
if (xp.parse_bool("idle_detection_debug", idle_detection_debug)) continue;
|
2011-08-10 17:11:08 +00:00
|
|
|
if (xp.parse_bool("mem_usage_debug", mem_usage_debug)) continue;
|
|
|
|
if (xp.parse_bool("network_status_debug", network_status_debug)) continue;
|
2013-03-12 04:32:41 +00:00
|
|
|
if (xp.parse_bool("notice_debug", notice_debug)) continue;
|
2011-08-10 17:11:08 +00:00
|
|
|
if (xp.parse_bool("poll_debug", poll_debug)) continue;
|
2013-03-13 21:26:02 +00:00
|
|
|
if (xp.parse_bool("priority_debug", priority_debug)) continue;
|
2011-08-10 17:11:08 +00:00
|
|
|
if (xp.parse_bool("proxy_debug", proxy_debug)) continue;
|
|
|
|
if (xp.parse_bool("rr_simulation", rr_simulation)) continue;
|
2011-09-12 17:01:54 +00:00
|
|
|
if (xp.parse_bool("rrsim_detail", rrsim_detail)) continue;
|
2011-08-10 17:11:08 +00:00
|
|
|
if (xp.parse_bool("sched_op_debug", sched_op_debug)) continue;
|
|
|
|
if (xp.parse_bool("scrsave_debug", scrsave_debug)) continue;
|
|
|
|
if (xp.parse_bool("slot_debug", slot_debug)) continue;
|
|
|
|
if (xp.parse_bool("state_debug", state_debug)) continue;
|
|
|
|
if (xp.parse_bool("statefile_debug", statefile_debug)) continue;
|
2012-04-20 17:46:27 +00:00
|
|
|
if (xp.parse_bool("suspend_debug", suspend_debug)) continue;
|
2011-08-10 17:11:08 +00:00
|
|
|
if (xp.parse_bool("task_debug", task_debug)) continue;
|
|
|
|
if (xp.parse_bool("time_debug", time_debug)) continue;
|
2011-09-22 18:52:21 +00:00
|
|
|
if (xp.parse_bool("trickle_debug", trickle_debug)) continue;
|
2011-08-10 17:11:08 +00:00
|
|
|
if (xp.parse_bool("unparsed_xml", unparsed_xml)) continue;
|
|
|
|
if (xp.parse_bool("work_fetch_debug", work_fetch_debug)) continue;
|
|
|
|
xp.skip_unexpected(true, "LOG_FLAGS::parse");
|
2011-04-25 03:18:26 +00:00
|
|
|
}
|
|
|
|
return ERR_XML_PARSE;
|
|
|
|
}
|
|
|
|
|
2011-04-27 11:01:07 +00:00
|
|
|
int LOG_FLAGS::write(MIOFILE& out) {
|
|
|
|
out.printf(
|
|
|
|
" <log_flags>\n"
|
|
|
|
" <file_xfer>%d</file_xfer>\n"
|
|
|
|
" <sched_ops>%d</sched_ops>\n"
|
|
|
|
" <task>%d</task>\n"
|
2013-06-04 18:25:11 +00:00
|
|
|
" <android_debug>%d</android_debug>\n"
|
2011-04-27 11:01:07 +00:00
|
|
|
" <app_msg_receive>%d</app_msg_receive>\n"
|
|
|
|
" <app_msg_send>%d</app_msg_send>\n"
|
2012-02-09 00:47:04 +00:00
|
|
|
" <async_file_debug>%d</async_file_debug>\n"
|
2011-04-27 11:01:07 +00:00
|
|
|
" <benchmark_debug>%d</benchmark_debug>\n"
|
|
|
|
" <checkpoint_debug>%d</checkpoint_debug>\n"
|
|
|
|
" <coproc_debug>%d</coproc_debug>\n"
|
|
|
|
" <cpu_sched>%d</cpu_sched>\n"
|
|
|
|
" <cpu_sched_debug>%d</cpu_sched_debug>\n"
|
|
|
|
" <cpu_sched_status>%d</cpu_sched_status>\n"
|
|
|
|
" <dcf_debug>%d</dcf_debug>\n"
|
2012-01-02 05:53:42 +00:00
|
|
|
" <disk_usage_debug>%d</disk_usage_debug>\n"
|
2011-04-27 11:01:07 +00:00
|
|
|
" <file_xfer_debug>%d</file_xfer_debug>\n"
|
|
|
|
" <gui_rpc_debug>%d</gui_rpc_debug>\n"
|
|
|
|
" <heartbeat_debug>%d</heartbeat_debug>\n"
|
|
|
|
" <http_debug>%d</http_debug>\n"
|
|
|
|
" <http_xfer_debug>%d</http_xfer_debug>\n"
|
Reinstate and Improve XScreenSaver Idle Detection
The set of commits on this pull request:
https://github.com/BOINC/boinc/pull/1453
first reinstated previously existing code to utilize the XScreenSaver
(XSS) X extension when determining a system's idle state (there was
also additional DPMS code that was not reinstated).
Original removal:
https://github.com/BOINC/boinc/commit/bfae1032e5c1ac73f2d8d92f222293d8383a6cee
The code would attempt to open a connection to the display at the client
binary's DISPLAY environment variable and, if unable to connect, always
report busy (undesirable).
The original motivation for reinstating this code was that the remaining
idle detection mechanisms did not detect mouse or keyboard movement if
an Xserver was responsible for them. Only activities in terminals were
detected. Through the course of extending and improving this code, the
following changes have been made:
* As per "man Xserver", each local Xserver should have a socket file
at standard location /tmp/.X11-unix/ with standard naming scheme
"Xn", where n is the number of the DISPLAY. This code will open this
directory and parse its contents for open DISPLAYs, adding them to a
vector for later interrogation of idle time by xss_idle. If no DISPLAYs
were found, a static guess-list from DISPLAY :0 to DISPLAY :6 is set and
interrogated.
* xss_idle uses the XScreenSaver X extension's API, as documented at
"man 3 xss". Certain checks are performed to determine if the X
server is accessible, and if so, whether it has the XScreenSaver
extension. If it does, then we obtain information on the DISPLAY's idle
time and determine whether the Xserver is idle or not.
* The user running the boinc client (typically the "boinc" user for
most distributions), must have access to the Xserver for XSS idle
detection to work. Dropping an appropriate file in /etc/X11/Xsession.d/
(Debian flavours) or /etc/X11/xinit/xinitrc.d/ (Fedora and others)
should permit Xservers to run something like "xhost +SI:localuser:boinc"
on start. If the boinc client cannot access an Xserver/DISPLAY, it
simply skips it and treats it as though it is idle. If no DISPLAY is
accessible, then xss_idle is effectively passed through --xss_idle will
report the system as idle-- and idle detection is left to other
mechanisms.
* A debug logging flag "idle_detection_debug" was added. If this
flag is defined in the cc_config.xml file as "1", then verbose
debugging information related to boinc's idle detection determinations is
provided to the Event Log. This logging flag may also be utilized
by other components of idle detection as/if needed/desired.
2015-12-30 23:03:35 +00:00
|
|
|
" <idle_detection_debug>%d</idle_detection_debug>\n"
|
2011-04-27 11:01:07 +00:00
|
|
|
" <mem_usage_debug>%d</mem_usage_debug>\n"
|
|
|
|
" <network_status_debug>%d</network_status_debug>\n"
|
2013-03-12 04:32:41 +00:00
|
|
|
" <notice_debug>%d</notice_debug>\n"
|
2011-04-27 11:01:07 +00:00
|
|
|
" <poll_debug>%d</poll_debug>\n"
|
2013-03-13 21:26:02 +00:00
|
|
|
" <priority_debug>%d</priority_debug>\n"
|
2011-04-27 11:01:07 +00:00
|
|
|
" <proxy_debug>%d</proxy_debug>\n"
|
|
|
|
" <rr_simulation>%d</rr_simulation>\n"
|
2011-09-12 17:01:54 +00:00
|
|
|
" <rrsim_detail>%d</rrsim_detail>\n"
|
2011-04-27 11:01:07 +00:00
|
|
|
" <sched_op_debug>%d</sched_op_debug>\n"
|
|
|
|
" <scrsave_debug>%d</scrsave_debug>\n"
|
|
|
|
" <slot_debug>%d</slot_debug>\n"
|
|
|
|
" <state_debug>%d</state_debug>\n"
|
|
|
|
" <statefile_debug>%d</statefile_debug>\n"
|
2012-04-20 17:46:27 +00:00
|
|
|
" <suspend_debug>%d</suspend_debug>\n"
|
2011-04-27 11:01:07 +00:00
|
|
|
" <task_debug>%d</task_debug>\n"
|
|
|
|
" <time_debug>%d</time_debug>\n"
|
2011-09-22 18:52:21 +00:00
|
|
|
" <trickle_debug>%d</trickle_debug>\n"
|
2011-04-27 11:01:07 +00:00
|
|
|
" <unparsed_xml>%d</unparsed_xml>\n"
|
|
|
|
" <work_fetch_debug>%d</work_fetch_debug>\n"
|
|
|
|
" </log_flags>\n",
|
|
|
|
file_xfer ? 1 : 0,
|
|
|
|
sched_ops ? 1 : 0,
|
|
|
|
task ? 1 : 0,
|
2013-06-04 18:25:11 +00:00
|
|
|
android_debug ? 1 : 0,
|
2011-04-27 11:01:07 +00:00
|
|
|
app_msg_receive ? 1 : 0,
|
|
|
|
app_msg_send ? 1 : 0,
|
2012-02-09 00:47:04 +00:00
|
|
|
async_file_debug ? 1 : 0,
|
2011-04-27 11:01:07 +00:00
|
|
|
benchmark_debug ? 1 : 0,
|
|
|
|
checkpoint_debug ? 1 : 0,
|
|
|
|
coproc_debug ? 1 : 0,
|
|
|
|
cpu_sched ? 1 : 0,
|
|
|
|
cpu_sched_debug ? 1 : 0,
|
|
|
|
cpu_sched_status ? 1 : 0,
|
|
|
|
dcf_debug ? 1 : 0,
|
2012-01-02 05:53:42 +00:00
|
|
|
disk_usage_debug ? 1 : 0,
|
2011-04-27 11:01:07 +00:00
|
|
|
file_xfer_debug ? 1 : 0,
|
|
|
|
gui_rpc_debug ? 1 : 0,
|
|
|
|
heartbeat_debug ? 1 : 0,
|
|
|
|
http_debug ? 1 : 0,
|
|
|
|
http_xfer_debug ? 1 : 0,
|
Reinstate and Improve XScreenSaver Idle Detection
The set of commits on this pull request:
https://github.com/BOINC/boinc/pull/1453
first reinstated previously existing code to utilize the XScreenSaver
(XSS) X extension when determining a system's idle state (there was
also additional DPMS code that was not reinstated).
Original removal:
https://github.com/BOINC/boinc/commit/bfae1032e5c1ac73f2d8d92f222293d8383a6cee
The code would attempt to open a connection to the display at the client
binary's DISPLAY environment variable and, if unable to connect, always
report busy (undesirable).
The original motivation for reinstating this code was that the remaining
idle detection mechanisms did not detect mouse or keyboard movement if
an Xserver was responsible for them. Only activities in terminals were
detected. Through the course of extending and improving this code, the
following changes have been made:
* As per "man Xserver", each local Xserver should have a socket file
at standard location /tmp/.X11-unix/ with standard naming scheme
"Xn", where n is the number of the DISPLAY. This code will open this
directory and parse its contents for open DISPLAYs, adding them to a
vector for later interrogation of idle time by xss_idle. If no DISPLAYs
were found, a static guess-list from DISPLAY :0 to DISPLAY :6 is set and
interrogated.
* xss_idle uses the XScreenSaver X extension's API, as documented at
"man 3 xss". Certain checks are performed to determine if the X
server is accessible, and if so, whether it has the XScreenSaver
extension. If it does, then we obtain information on the DISPLAY's idle
time and determine whether the Xserver is idle or not.
* The user running the boinc client (typically the "boinc" user for
most distributions), must have access to the Xserver for XSS idle
detection to work. Dropping an appropriate file in /etc/X11/Xsession.d/
(Debian flavours) or /etc/X11/xinit/xinitrc.d/ (Fedora and others)
should permit Xservers to run something like "xhost +SI:localuser:boinc"
on start. If the boinc client cannot access an Xserver/DISPLAY, it
simply skips it and treats it as though it is idle. If no DISPLAY is
accessible, then xss_idle is effectively passed through --xss_idle will
report the system as idle-- and idle detection is left to other
mechanisms.
* A debug logging flag "idle_detection_debug" was added. If this
flag is defined in the cc_config.xml file as "1", then verbose
debugging information related to boinc's idle detection determinations is
provided to the Event Log. This logging flag may also be utilized
by other components of idle detection as/if needed/desired.
2015-12-30 23:03:35 +00:00
|
|
|
idle_detection_debug ? 1 : 0,
|
2011-04-27 11:01:07 +00:00
|
|
|
mem_usage_debug ? 1 : 0,
|
|
|
|
network_status_debug ? 1 : 0,
|
2013-03-12 04:32:41 +00:00
|
|
|
notice_debug ? 1 : 0,
|
2011-04-27 11:01:07 +00:00
|
|
|
poll_debug ? 1 : 0,
|
2013-03-13 21:26:02 +00:00
|
|
|
priority_debug ? 1 : 0,
|
2011-04-27 11:01:07 +00:00
|
|
|
proxy_debug ? 1 : 0,
|
|
|
|
rr_simulation ? 1 : 0,
|
2011-09-12 17:01:54 +00:00
|
|
|
rrsim_detail ? 1 : 0,
|
2011-04-27 11:01:07 +00:00
|
|
|
sched_op_debug ? 1 : 0,
|
|
|
|
scrsave_debug ? 1 : 0,
|
|
|
|
slot_debug ? 1 : 0,
|
|
|
|
state_debug ? 1 : 0,
|
|
|
|
statefile_debug ? 1 : 0,
|
2012-04-20 17:46:27 +00:00
|
|
|
suspend_debug ? 1 : 0,
|
2011-04-27 11:01:07 +00:00
|
|
|
task_debug ? 1 : 0,
|
|
|
|
time_debug ? 1 : 0,
|
2011-09-22 18:52:21 +00:00
|
|
|
trickle_debug ? 1 : 0,
|
2011-04-27 11:01:07 +00:00
|
|
|
unparsed_xml ? 1 : 0,
|
2013-03-12 04:32:41 +00:00
|
|
|
work_fetch_debug ? 1 : 0
|
2011-04-27 11:01:07 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2014-05-08 07:51:18 +00:00
|
|
|
CC_CONFIG::CC_CONFIG() {
|
2015-11-05 15:58:40 +00:00
|
|
|
defaults();
|
2011-04-25 03:18:26 +00:00
|
|
|
}
|
|
|
|
|
2011-04-29 12:04:07 +00:00
|
|
|
// this is called first thing by client
|
|
|
|
//
|
2014-05-08 07:51:18 +00:00
|
|
|
void CC_CONFIG::defaults() {
|
2011-04-29 12:04:07 +00:00
|
|
|
abort_jobs_on_exit = false;
|
|
|
|
allow_multiple_clients = false;
|
|
|
|
allow_remote_gui_rpc = false;
|
|
|
|
alt_platforms.clear();
|
2016-01-28 05:08:11 +00:00
|
|
|
client_download_url = "https://boinc.berkeley.edu/download.php";
|
2013-05-20 17:28:19 +00:00
|
|
|
client_new_version_text = "";
|
2016-01-28 05:08:11 +00:00
|
|
|
client_version_check_url = "https://boinc.berkeley.edu/download.php?xml=1";
|
2011-07-27 07:36:06 +00:00
|
|
|
config_coprocs.clear();
|
2011-04-29 12:04:07 +00:00
|
|
|
disallow_attach = false;
|
|
|
|
dont_check_file_sizes = false;
|
|
|
|
dont_contact_ref_site = false;
|
2015-11-25 08:52:54 +00:00
|
|
|
lower_client_priority = false;
|
2015-01-05 20:58:40 +00:00
|
|
|
dont_suspend_nci = false;
|
2014-09-25 08:28:19 +00:00
|
|
|
dont_use_vbox = false;
|
2011-06-25 05:13:56 +00:00
|
|
|
exclude_gpus.clear();
|
2011-04-29 12:04:07 +00:00
|
|
|
exclusive_apps.clear();
|
|
|
|
exclusive_gpu_apps.clear();
|
|
|
|
exit_after_finish = false;
|
2011-09-07 22:45:00 +00:00
|
|
|
exit_before_start = false;
|
2011-04-29 12:04:07 +00:00
|
|
|
exit_when_idle = false;
|
|
|
|
fetch_minimal_work = false;
|
2013-03-03 06:40:49 +00:00
|
|
|
fetch_on_update = false;
|
2011-04-29 12:04:07 +00:00
|
|
|
force_auth = "default";
|
|
|
|
http_1_0 = false;
|
2011-05-07 17:56:13 +00:00
|
|
|
http_transfer_timeout = 300;
|
|
|
|
http_transfer_timeout_bps = 10;
|
2012-12-10 12:29:14 +00:00
|
|
|
for (int i=1; i<NPROC_TYPES; i++) {
|
|
|
|
ignore_gpu_instance[i].clear();
|
|
|
|
}
|
2013-06-07 22:20:14 +00:00
|
|
|
max_event_log_lines = DEFAULT_MAX_EVENT_LOG_LINES;
|
2011-05-07 17:56:13 +00:00
|
|
|
max_file_xfers = 8;
|
|
|
|
max_file_xfers_per_project = 2;
|
2011-04-29 12:04:07 +00:00
|
|
|
max_stderr_file_size = 0;
|
|
|
|
max_stdout_file_size = 0;
|
|
|
|
max_tasks_reported = 0;
|
|
|
|
ncpus = -1;
|
2016-01-28 05:15:19 +00:00
|
|
|
network_test_url = "https://www.google.com/";
|
2011-04-29 12:04:07 +00:00
|
|
|
no_alt_platform = false;
|
|
|
|
no_gpus = false;
|
|
|
|
no_info_fetch = false;
|
2016-04-24 03:47:31 +00:00
|
|
|
no_opencl = false;
|
2011-04-29 12:04:07 +00:00
|
|
|
no_priority_change = false;
|
|
|
|
os_random_only = false;
|
2015-09-30 05:40:40 +00:00
|
|
|
process_priority = -1;
|
|
|
|
process_priority_special = -1;
|
2011-04-29 12:04:07 +00:00
|
|
|
proxy_info.clear();
|
2011-07-14 16:15:45 +00:00
|
|
|
rec_half_life = 10*86400;
|
2013-08-15 19:32:48 +00:00
|
|
|
#ifdef ANDROID
|
|
|
|
report_results_immediately = true;
|
|
|
|
#else
|
2011-04-29 12:04:07 +00:00
|
|
|
report_results_immediately = false;
|
2013-08-15 19:32:48 +00:00
|
|
|
#endif
|
2011-04-29 12:04:07 +00:00
|
|
|
run_apps_manually = false;
|
|
|
|
save_stats_days = 30;
|
|
|
|
simple_gui_only = false;
|
|
|
|
skip_cpu_benchmarks = false;
|
|
|
|
start_delay = 0;
|
|
|
|
stderr_head = false;
|
|
|
|
suppress_net_info = false;
|
|
|
|
unsigned_apps_ok = false;
|
|
|
|
use_all_gpus = false;
|
|
|
|
use_certs = false;
|
|
|
|
use_certs_only = false;
|
2012-05-18 17:38:16 +00:00
|
|
|
vbox_window = false;
|
2011-04-29 12:04:07 +00:00
|
|
|
}
|
|
|
|
|
2011-11-14 23:31:12 +00:00
|
|
|
int EXCLUDE_GPU::parse(XML_PARSER& xp) {
|
2011-06-24 03:33:22 +00:00
|
|
|
bool found_url = false;
|
2011-11-14 23:31:12 +00:00
|
|
|
type = "";
|
|
|
|
appname = "";
|
|
|
|
device_num = -1;
|
2011-08-10 17:11:08 +00:00
|
|
|
while (!xp.get_tag()) {
|
|
|
|
if (!xp.is_tag) continue;
|
|
|
|
if (xp.match_tag("/exclude_gpu")) {
|
2011-11-14 23:05:42 +00:00
|
|
|
if (!found_url) return ERR_XML_PARSE;
|
|
|
|
return 0;
|
2011-06-24 03:33:22 +00:00
|
|
|
}
|
2011-11-14 23:31:12 +00:00
|
|
|
if (xp.parse_string("url", url)) {
|
|
|
|
canonicalize_master_url(url);
|
2011-06-24 03:33:22 +00:00
|
|
|
found_url = true;
|
|
|
|
continue;
|
|
|
|
}
|
2011-11-14 23:31:12 +00:00
|
|
|
if (xp.parse_int("device_num", device_num)) continue;
|
|
|
|
if (xp.parse_string("type", type)) continue;
|
|
|
|
if (xp.parse_string("app", appname)) continue;
|
2011-06-24 03:33:22 +00:00
|
|
|
}
|
2011-11-14 23:05:42 +00:00
|
|
|
return ERR_XML_PARSE;
|
2011-06-24 03:33:22 +00:00
|
|
|
}
|
2011-04-29 12:04:07 +00:00
|
|
|
|
2011-11-14 23:31:12 +00:00
|
|
|
// This is used by GUI RPC clients, NOT by the BOINC client
|
2014-05-08 07:51:18 +00:00
|
|
|
// KEEP IN SYNCH WITH CC_CONFIG::parse_options_client()!!
|
2011-11-14 23:31:12 +00:00
|
|
|
//
|
2014-05-08 07:51:18 +00:00
|
|
|
int CC_CONFIG::parse_options(XML_PARSER& xp) {
|
2011-04-25 03:18:26 +00:00
|
|
|
string s;
|
|
|
|
int n, retval;
|
|
|
|
|
|
|
|
//clear();
|
|
|
|
// don't do this here because some options are set by cmdline args,
|
|
|
|
// which are parsed first
|
|
|
|
// but do clear these, which aren't accessable via cmdline:
|
|
|
|
//
|
|
|
|
alt_platforms.clear();
|
|
|
|
exclusive_apps.clear();
|
|
|
|
exclusive_gpu_apps.clear();
|
2012-12-10 12:29:14 +00:00
|
|
|
for (int i=1; i<NPROC_TYPES; i++) {
|
|
|
|
ignore_gpu_instance[i].clear();
|
|
|
|
}
|
2011-07-29 00:07:20 +00:00
|
|
|
exclude_gpus.clear();
|
2011-04-25 03:18:26 +00:00
|
|
|
|
2011-08-10 17:11:08 +00:00
|
|
|
while (!xp.get_tag()) {
|
|
|
|
if (!xp.is_tag) {
|
2011-04-25 03:18:26 +00:00
|
|
|
continue;
|
|
|
|
}
|
2011-08-10 17:11:08 +00:00
|
|
|
if (xp.match_tag("/options")) {
|
2011-04-25 03:18:26 +00:00
|
|
|
return 0;
|
|
|
|
}
|
2011-08-10 17:11:08 +00:00
|
|
|
if (xp.parse_bool("abort_jobs_on_exit", abort_jobs_on_exit)) continue;
|
|
|
|
if (xp.parse_bool("allow_multiple_clients", allow_multiple_clients)) continue;
|
|
|
|
if (xp.parse_bool("allow_remote_gui_rpc", allow_remote_gui_rpc)) continue;
|
|
|
|
if (xp.parse_string("alt_platform", s)) {
|
2011-04-25 03:18:26 +00:00
|
|
|
alt_platforms.push_back(s);
|
|
|
|
continue;
|
|
|
|
}
|
2011-08-10 17:11:08 +00:00
|
|
|
if (xp.parse_string("client_download_url", client_download_url)) {
|
2011-04-25 03:18:26 +00:00
|
|
|
downcase_string(client_download_url);
|
|
|
|
continue;
|
|
|
|
}
|
2013-05-20 17:28:19 +00:00
|
|
|
if (xp.parse_string("client_new_version_text", client_new_version_text)) {
|
|
|
|
continue;
|
|
|
|
}
|
2011-08-10 17:11:08 +00:00
|
|
|
if (xp.parse_string("client_version_check_url", client_version_check_url)) {
|
2011-04-25 03:18:26 +00:00
|
|
|
downcase_string(client_version_check_url);
|
|
|
|
continue;
|
|
|
|
}
|
2011-08-10 17:11:08 +00:00
|
|
|
if (xp.match_tag("coproc")) {
|
2011-04-25 03:18:26 +00:00
|
|
|
COPROC c;
|
|
|
|
retval = c.parse(xp);
|
2011-11-14 23:31:12 +00:00
|
|
|
if (retval) return retval;
|
2011-11-03 19:19:36 +00:00
|
|
|
c.specified_in_config = true;
|
|
|
|
if (!strcmp(c.type, "CPU")) continue;
|
2011-11-14 23:31:12 +00:00
|
|
|
config_coprocs.add(c);
|
2011-04-25 03:18:26 +00:00
|
|
|
continue;
|
|
|
|
}
|
2011-08-10 17:11:08 +00:00
|
|
|
if (xp.parse_bool("disallow_attach", disallow_attach)) continue;
|
|
|
|
if (xp.parse_bool("dont_check_file_sizes", dont_check_file_sizes)) continue;
|
|
|
|
if (xp.parse_bool("dont_contact_ref_site", dont_contact_ref_site)) continue;
|
2015-11-25 08:52:54 +00:00
|
|
|
if (xp.parse_bool("lower_client_priority", lower_client_priority)) continue;
|
2015-01-05 20:58:40 +00:00
|
|
|
if (xp.parse_bool("dont_suspend_nci", dont_suspend_nci)) continue;
|
2014-09-25 08:28:19 +00:00
|
|
|
if (xp.parse_bool("dont_use_vbox", dont_use_vbox)) continue;
|
2011-08-10 17:11:08 +00:00
|
|
|
if (xp.match_tag("exclude_gpu")) {
|
2011-06-25 05:13:56 +00:00
|
|
|
EXCLUDE_GPU eg;
|
2011-11-14 23:31:12 +00:00
|
|
|
retval = eg.parse(xp);
|
|
|
|
if (retval) return retval;
|
|
|
|
exclude_gpus.push_back(eg);
|
2011-06-24 03:33:22 +00:00
|
|
|
continue;
|
|
|
|
}
|
2011-08-10 17:11:08 +00:00
|
|
|
if (xp.parse_string("exclusive_app", s)) {
|
2011-04-25 03:18:26 +00:00
|
|
|
if (!strstr(s.c_str(), "boinc")) {
|
|
|
|
exclusive_apps.push_back(s);
|
|
|
|
}
|
|
|
|
continue;
|
|
|
|
}
|
2011-08-10 17:11:08 +00:00
|
|
|
if (xp.parse_string("exclusive_gpu_app", s)) {
|
2011-04-25 03:18:26 +00:00
|
|
|
if (!strstr(s.c_str(), "boinc")) {
|
|
|
|
exclusive_gpu_apps.push_back(s);
|
|
|
|
}
|
|
|
|
continue;
|
|
|
|
}
|
2011-08-10 17:11:08 +00:00
|
|
|
if (xp.parse_bool("exit_after_finish", exit_after_finish)) continue;
|
2011-09-07 22:45:00 +00:00
|
|
|
if (xp.parse_bool("exit_before_start", exit_before_start)) continue;
|
2011-08-10 17:11:08 +00:00
|
|
|
if (xp.parse_bool("exit_when_idle", exit_when_idle)) {
|
2011-04-25 03:18:26 +00:00
|
|
|
if (exit_when_idle) {
|
|
|
|
report_results_immediately = true;
|
|
|
|
}
|
|
|
|
continue;
|
|
|
|
}
|
2011-08-10 17:11:08 +00:00
|
|
|
if (xp.parse_bool("fetch_minimal_work", fetch_minimal_work)) continue;
|
2013-03-03 06:40:49 +00:00
|
|
|
if (xp.parse_bool("fetch_on_update", fetch_on_update)) continue;
|
2011-08-10 17:11:08 +00:00
|
|
|
if (xp.parse_string("force_auth", force_auth)) {
|
2011-04-25 03:18:26 +00:00
|
|
|
downcase_string(force_auth);
|
|
|
|
continue;
|
|
|
|
}
|
2011-08-10 17:11:08 +00:00
|
|
|
if (xp.parse_bool("http_1_0", http_1_0)) continue;
|
|
|
|
if (xp.parse_int("http_transfer_timeout", http_transfer_timeout)) continue;
|
|
|
|
if (xp.parse_int("http_transfer_timeout_bps", http_transfer_timeout_bps)) continue;
|
|
|
|
if (xp.parse_int("ignore_cuda_dev", n) || xp.parse_int("ignore_nvidia_dev", n)) {
|
2012-12-10 12:29:14 +00:00
|
|
|
ignore_gpu_instance[PROC_TYPE_NVIDIA_GPU].push_back(n);
|
2011-04-25 03:18:26 +00:00
|
|
|
continue;
|
|
|
|
}
|
2011-08-10 17:11:08 +00:00
|
|
|
if (xp.parse_int("ignore_ati_dev", n)) {
|
2012-12-10 12:29:14 +00:00
|
|
|
ignore_gpu_instance[PROC_TYPE_AMD_GPU].push_back(n);
|
2011-04-25 03:18:26 +00:00
|
|
|
continue;
|
|
|
|
}
|
2012-12-05 13:11:20 +00:00
|
|
|
if (xp.parse_int("ignore_intel_gpu_dev", n)) {
|
2012-12-10 12:29:14 +00:00
|
|
|
ignore_gpu_instance[PROC_TYPE_INTEL_GPU].push_back(n);
|
2012-12-05 13:11:20 +00:00
|
|
|
continue;
|
|
|
|
}
|
2013-05-29 04:19:28 +00:00
|
|
|
if (xp.parse_int("max_event_log_lines", max_event_log_lines)) continue;
|
2011-08-10 17:11:08 +00:00
|
|
|
if (xp.parse_int("max_file_xfers", max_file_xfers)) continue;
|
|
|
|
if (xp.parse_int("max_file_xfers_per_project", max_file_xfers_per_project)) continue;
|
|
|
|
if (xp.parse_int("max_stderr_file_size", max_stderr_file_size)) continue;
|
|
|
|
if (xp.parse_int("max_stdout_file_size", max_stdout_file_size)) continue;
|
|
|
|
if (xp.parse_int("max_tasks_reported", max_tasks_reported)) continue;
|
|
|
|
if (xp.parse_int("ncpus", ncpus)) continue;
|
|
|
|
if (xp.parse_string("network_test_url", network_test_url)) {
|
2011-04-25 03:18:26 +00:00
|
|
|
downcase_string(network_test_url);
|
|
|
|
continue;
|
|
|
|
}
|
2011-08-10 17:11:08 +00:00
|
|
|
if (xp.parse_bool("no_alt_platform", no_alt_platform)) continue;
|
|
|
|
if (xp.parse_bool("no_gpus", no_gpus)) continue;
|
|
|
|
if (xp.parse_bool("no_info_fetch", no_info_fetch)) continue;
|
2016-04-24 03:47:31 +00:00
|
|
|
if (xp.parse_bool("no_opencl", no_opencl)) continue;
|
2011-08-10 17:11:08 +00:00
|
|
|
if (xp.parse_bool("no_priority_change", no_priority_change)) continue;
|
|
|
|
if (xp.parse_bool("os_random_only", os_random_only)) continue;
|
2015-09-30 05:40:40 +00:00
|
|
|
if (xp.parse_int("process_priority", process_priority)) continue;
|
|
|
|
if (xp.parse_int("process_priority_special", process_priority_special)) continue;
|
2011-04-25 03:18:26 +00:00
|
|
|
#ifndef SIM
|
2011-08-10 17:11:08 +00:00
|
|
|
if (xp.match_tag("proxy_info")) {
|
2011-11-14 23:31:12 +00:00
|
|
|
proxy_info.parse_config(xp);
|
2011-04-25 03:18:26 +00:00
|
|
|
continue;
|
|
|
|
}
|
|
|
|
#endif
|
2011-08-10 17:11:08 +00:00
|
|
|
if (xp.parse_double("rec_half_life_days", rec_half_life)) {
|
2011-07-14 16:15:45 +00:00
|
|
|
if (rec_half_life <= 0) rec_half_life = 10;
|
|
|
|
rec_half_life *= 86400;
|
|
|
|
continue;
|
|
|
|
}
|
2011-08-10 17:11:08 +00:00
|
|
|
if (xp.parse_bool("report_results_immediately", report_results_immediately)) continue;
|
|
|
|
if (xp.parse_bool("run_apps_manually", run_apps_manually)) continue;
|
|
|
|
if (xp.parse_int("save_stats_days", save_stats_days)) continue;
|
|
|
|
if (xp.parse_bool("simple_gui_only", simple_gui_only)) continue;
|
|
|
|
if (xp.parse_bool("skip_cpu_benchmarks", skip_cpu_benchmarks)) continue;
|
|
|
|
if (xp.parse_double("start_delay", start_delay)) continue;
|
|
|
|
if (xp.parse_bool("stderr_head", stderr_head)) continue;
|
|
|
|
if (xp.parse_bool("suppress_net_info", suppress_net_info)) continue;
|
|
|
|
if (xp.parse_bool("unsigned_apps_ok", unsigned_apps_ok)) continue;
|
|
|
|
if (xp.parse_bool("use_all_gpus", use_all_gpus)) continue;
|
|
|
|
if (xp.parse_bool("use_certs", use_certs)) continue;
|
|
|
|
if (xp.parse_bool("use_certs_only", use_certs_only)) continue;
|
2012-05-18 17:38:16 +00:00
|
|
|
if (xp.parse_bool("vbox_window", vbox_window)) continue;
|
2011-04-25 03:18:26 +00:00
|
|
|
|
2014-05-08 07:51:18 +00:00
|
|
|
xp.skip_unexpected(true, "CC_CONFIG::parse_options");
|
2011-04-25 03:18:26 +00:00
|
|
|
}
|
|
|
|
return ERR_XML_PARSE;
|
|
|
|
}
|
2011-04-27 11:01:07 +00:00
|
|
|
|
2014-05-08 07:51:18 +00:00
|
|
|
int CC_CONFIG::parse(XML_PARSER& xp, LOG_FLAGS& log_flags) {
|
2011-08-10 17:11:08 +00:00
|
|
|
while (!xp.get_tag()) {
|
|
|
|
if (!xp.is_tag) {
|
2011-04-27 11:01:07 +00:00
|
|
|
continue;
|
|
|
|
}
|
2011-08-10 17:11:08 +00:00
|
|
|
if (xp.match_tag("/cc_config")) return 0;
|
|
|
|
if (xp.match_tag("log_flags")) {
|
2011-11-14 23:31:12 +00:00
|
|
|
log_flags.parse(xp);
|
2011-04-27 11:01:07 +00:00
|
|
|
continue;
|
|
|
|
}
|
2011-08-10 17:11:08 +00:00
|
|
|
if (xp.match_tag("options")) {
|
2011-11-14 23:31:12 +00:00
|
|
|
parse_options(xp);
|
2011-04-27 11:01:07 +00:00
|
|
|
continue;
|
|
|
|
}
|
2011-08-10 17:11:08 +00:00
|
|
|
if (xp.match_tag("options/")) continue;
|
|
|
|
if (xp.match_tag("log_flags/")) continue;
|
2011-04-27 11:01:07 +00:00
|
|
|
}
|
|
|
|
return ERR_XML_PARSE;
|
|
|
|
}
|
|
|
|
|
2014-04-02 07:54:14 +00:00
|
|
|
void EXCLUDE_GPU::write(MIOFILE& out) {
|
|
|
|
out.printf(
|
|
|
|
" <exclude_gpu>\n"
|
|
|
|
" <url>%s</url>\n"
|
|
|
|
" <device_num>%d</device_num>\n",
|
|
|
|
url.c_str(),
|
|
|
|
device_num
|
|
|
|
);
|
|
|
|
if (type.length()) {
|
|
|
|
out.printf(
|
|
|
|
" <type>%s</type>\n",
|
|
|
|
type.c_str()
|
|
|
|
);
|
|
|
|
}
|
|
|
|
if (appname.length()) {
|
|
|
|
out.printf(
|
|
|
|
" <app>%s</app>\n",
|
|
|
|
appname.c_str()
|
|
|
|
);
|
|
|
|
}
|
|
|
|
out.printf(
|
|
|
|
" </exclude_gpu>\n"
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2014-05-08 07:51:18 +00:00
|
|
|
int CC_CONFIG::write(MIOFILE& out, LOG_FLAGS& log_flags) {
|
2011-04-27 11:01:07 +00:00
|
|
|
int j;
|
2011-11-03 19:19:36 +00:00
|
|
|
unsigned int i;
|
2011-04-27 11:01:07 +00:00
|
|
|
|
2011-04-29 12:04:07 +00:00
|
|
|
out.printf("<set_cc_config>\n");
|
2011-04-27 11:01:07 +00:00
|
|
|
out.printf("<cc_config>\n");
|
|
|
|
|
|
|
|
log_flags.write(out);
|
|
|
|
|
|
|
|
out.printf(
|
|
|
|
" <options>\n"
|
|
|
|
" <abort_jobs_on_exit>%d</abort_jobs_on_exit>\n"
|
|
|
|
" <allow_multiple_clients>%d</allow_multiple_clients>\n"
|
|
|
|
" <allow_remote_gui_rpc>%d</allow_remote_gui_rpc>\n",
|
|
|
|
abort_jobs_on_exit ? 1 : 0,
|
|
|
|
allow_multiple_clients ? 1 : 0,
|
|
|
|
allow_remote_gui_rpc ? 1 : 0
|
|
|
|
);
|
|
|
|
|
|
|
|
for (i=0; i<alt_platforms.size(); ++i) {
|
|
|
|
out.printf(
|
|
|
|
" <alt_platform>%s</alt_platform>\n",
|
|
|
|
alt_platforms[i].c_str()
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
out.printf(
|
|
|
|
" <client_version_check_url>%s</client_version_check_url>\n"
|
2013-05-20 17:28:19 +00:00
|
|
|
" <client_new_version_text>%s</client_new_version_text>\n"
|
2011-04-27 11:01:07 +00:00
|
|
|
" <client_download_url>%s</client_download_url>\n",
|
|
|
|
client_version_check_url.c_str(),
|
2013-05-20 17:28:19 +00:00
|
|
|
client_new_version_text.c_str(),
|
2011-04-27 11:01:07 +00:00
|
|
|
client_download_url.c_str()
|
|
|
|
);
|
|
|
|
|
2011-11-03 19:19:36 +00:00
|
|
|
for (int k=1; k<config_coprocs.n_rsc; k++) {
|
|
|
|
if (!config_coprocs.coprocs[k].specified_in_config) continue;
|
2011-04-27 11:01:07 +00:00
|
|
|
out.printf(
|
2011-04-30 07:55:05 +00:00
|
|
|
" <coproc>\n"
|
2011-04-27 11:01:07 +00:00
|
|
|
" <type>%s</type>\n"
|
|
|
|
" <count>%d</count>\n"
|
|
|
|
" <peak_flops>%f</peak_flops>\n"
|
|
|
|
" <device_nums>",
|
2011-11-03 19:19:36 +00:00
|
|
|
config_coprocs.coprocs[k].type,
|
|
|
|
config_coprocs.coprocs[k].count,
|
|
|
|
config_coprocs.coprocs[k].peak_flops
|
2011-04-27 11:01:07 +00:00
|
|
|
);
|
2011-11-03 19:19:36 +00:00
|
|
|
for (j=0; j<config_coprocs.coprocs[k].count; j++) {
|
|
|
|
out.printf("%d", config_coprocs.coprocs[k].device_nums[j]);
|
|
|
|
if (j < (config_coprocs.coprocs[k].count - 1)) {
|
2011-04-27 11:01:07 +00:00
|
|
|
out.printf(" ");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
out.printf(
|
|
|
|
"</device_nums>\n"
|
2011-04-30 07:55:05 +00:00
|
|
|
" </coproc>\n"
|
2011-04-27 11:01:07 +00:00
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
out.printf(
|
|
|
|
" <disallow_attach>%d</disallow_attach>\n"
|
|
|
|
" <dont_check_file_sizes>%d</dont_check_file_sizes>\n"
|
2014-09-25 08:28:19 +00:00
|
|
|
" <dont_contact_ref_site>%d</dont_contact_ref_site>\n"
|
2015-11-25 08:52:54 +00:00
|
|
|
" <lower_client_priority>%d</lower_client_priority>\n"
|
2015-01-05 20:58:40 +00:00
|
|
|
" <dont_suspend_nci>%d</dont_suspend_nci>\n"
|
2014-09-25 08:28:19 +00:00
|
|
|
" <dont_use_vbox>%d</dont_use_vbox>\n",
|
2011-04-27 11:01:07 +00:00
|
|
|
disallow_attach,
|
|
|
|
dont_check_file_sizes,
|
2014-09-25 08:28:19 +00:00
|
|
|
dont_contact_ref_site,
|
2015-11-25 08:52:54 +00:00
|
|
|
lower_client_priority,
|
2015-01-05 20:58:40 +00:00
|
|
|
dont_suspend_nci,
|
2014-09-25 08:28:19 +00:00
|
|
|
dont_use_vbox
|
2011-04-27 11:01:07 +00:00
|
|
|
);
|
|
|
|
|
2014-04-02 07:54:14 +00:00
|
|
|
for (i=0; i<exclude_gpus.size(); i++) {
|
|
|
|
exclude_gpus[i].write(out);
|
|
|
|
}
|
|
|
|
|
2011-04-27 11:01:07 +00:00
|
|
|
for (i=0; i<exclusive_apps.size(); ++i) {
|
|
|
|
out.printf(
|
|
|
|
" <exclusive_app>%s</exclusive_app>\n",
|
|
|
|
exclusive_apps[i].c_str()
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2011-04-30 07:55:05 +00:00
|
|
|
for (i=0; i<exclusive_gpu_apps.size(); ++i) {
|
2011-04-27 11:01:07 +00:00
|
|
|
out.printf(
|
|
|
|
" <exclusive_gpu_app>%s</exclusive_gpu_app>\n",
|
|
|
|
exclusive_gpu_apps[i].c_str()
|
|
|
|
);
|
|
|
|
}
|
2014-04-02 07:54:14 +00:00
|
|
|
|
2011-04-27 11:01:07 +00:00
|
|
|
out.printf(
|
|
|
|
" <exit_after_finish>%d</exit_after_finish>\n"
|
2011-09-07 22:45:00 +00:00
|
|
|
" <exit_before_start>%d</exit_before_start>\n"
|
2011-04-27 11:01:07 +00:00
|
|
|
" <exit_when_idle>%d</exit_when_idle>\n"
|
|
|
|
" <fetch_minimal_work>%d</fetch_minimal_work>\n"
|
2013-03-03 06:40:49 +00:00
|
|
|
" <fetch_on_update>%d</fetch_on_update>\n"
|
2011-04-27 11:01:07 +00:00
|
|
|
" <force_auth>%s</force_auth>\n"
|
2011-05-07 17:56:13 +00:00
|
|
|
" <http_1_0>%d</http_1_0>\n"
|
|
|
|
" <http_transfer_timeout>%d</http_transfer_timeout>\n"
|
|
|
|
" <http_transfer_timeout_bps>%d</http_transfer_timeout_bps>\n",
|
2011-04-27 11:01:07 +00:00
|
|
|
exit_after_finish,
|
2011-09-07 22:45:00 +00:00
|
|
|
exit_before_start,
|
2011-04-27 11:01:07 +00:00
|
|
|
exit_when_idle,
|
|
|
|
fetch_minimal_work,
|
2013-03-03 06:40:49 +00:00
|
|
|
fetch_on_update,
|
2011-04-27 11:01:07 +00:00
|
|
|
force_auth.c_str(),
|
2011-05-07 17:56:13 +00:00
|
|
|
http_1_0,
|
|
|
|
http_transfer_timeout,
|
|
|
|
http_transfer_timeout_bps
|
2011-04-27 11:01:07 +00:00
|
|
|
);
|
|
|
|
|
2012-12-10 12:29:14 +00:00
|
|
|
for (i=0; i<ignore_gpu_instance[PROC_TYPE_NVIDIA_GPU].size(); ++i) {
|
2011-04-27 11:01:07 +00:00
|
|
|
out.printf(
|
2011-06-24 03:58:52 +00:00
|
|
|
" <ignore_nvidia_dev>%d</ignore_nvidia_dev>\n",
|
2012-12-10 12:29:14 +00:00
|
|
|
ignore_gpu_instance[PROC_TYPE_NVIDIA_GPU][i]
|
2011-04-27 11:01:07 +00:00
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2012-12-10 12:29:14 +00:00
|
|
|
for (i=0; i<ignore_gpu_instance[PROC_TYPE_AMD_GPU].size(); ++i) {
|
2011-04-27 11:01:07 +00:00
|
|
|
out.printf(
|
|
|
|
" <ignore_ati_dev>%d</ignore_ati_dev>\n",
|
2012-12-10 12:29:14 +00:00
|
|
|
ignore_gpu_instance[PROC_TYPE_AMD_GPU][i]
|
2011-04-27 11:01:07 +00:00
|
|
|
);
|
|
|
|
}
|
2012-12-05 13:11:20 +00:00
|
|
|
|
2012-12-10 12:29:14 +00:00
|
|
|
for (i=0; i<ignore_gpu_instance[PROC_TYPE_INTEL_GPU].size(); ++i) {
|
2012-12-05 13:11:20 +00:00
|
|
|
out.printf(
|
|
|
|
" <ignore_intel_gpu_dev>%d</ignore_intel_gpu_dev>\n",
|
2012-12-10 12:29:14 +00:00
|
|
|
ignore_gpu_instance[PROC_TYPE_INTEL_GPU][i]
|
2012-12-05 13:11:20 +00:00
|
|
|
);
|
|
|
|
}
|
2011-04-27 11:01:07 +00:00
|
|
|
|
|
|
|
out.printf(
|
2013-05-29 04:19:28 +00:00
|
|
|
" <max_event_log_lines>%d</max_event_log_lines>\n"
|
2011-04-27 11:01:07 +00:00
|
|
|
" <max_file_xfers>%d</max_file_xfers>\n"
|
|
|
|
" <max_file_xfers_per_project>%d</max_file_xfers_per_project>\n"
|
|
|
|
" <max_stderr_file_size>%d</max_stderr_file_size>\n"
|
|
|
|
" <max_stdout_file_size>%d</max_stdout_file_size>\n"
|
|
|
|
" <max_tasks_reported>%d</max_tasks_reported>\n"
|
|
|
|
" <ncpus>%d</ncpus>\n"
|
|
|
|
" <network_test_url>%s</network_test_url>\n"
|
|
|
|
" <no_alt_platform>%d</no_alt_platform>\n"
|
|
|
|
" <no_gpus>%d</no_gpus>\n"
|
|
|
|
" <no_info_fetch>%d</no_info_fetch>\n"
|
2016-04-24 03:47:31 +00:00
|
|
|
" <no_opencl>%d</no_opencl>\n"
|
2011-04-27 11:01:07 +00:00
|
|
|
" <no_priority_change>%d</no_priority_change>\n"
|
2015-09-30 05:40:40 +00:00
|
|
|
" <os_random_only>%d</os_random_only>\n"
|
|
|
|
" <process_priority>%d</process_priority>\n"
|
|
|
|
" <process_priority_special>%d</process_priority_special>\n",
|
2013-05-29 04:19:28 +00:00
|
|
|
max_event_log_lines,
|
2011-04-27 11:01:07 +00:00
|
|
|
max_file_xfers,
|
|
|
|
max_file_xfers_per_project,
|
|
|
|
max_stderr_file_size,
|
|
|
|
max_stdout_file_size,
|
|
|
|
max_tasks_reported,
|
|
|
|
ncpus,
|
|
|
|
network_test_url.c_str(),
|
|
|
|
no_alt_platform,
|
|
|
|
no_gpus,
|
|
|
|
no_info_fetch,
|
2016-04-24 03:47:31 +00:00
|
|
|
no_opencl,
|
2011-04-27 11:01:07 +00:00
|
|
|
no_priority_change,
|
2015-09-30 05:40:40 +00:00
|
|
|
os_random_only,
|
|
|
|
process_priority,
|
|
|
|
process_priority_special
|
2011-04-27 11:01:07 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
proxy_info.write(out);
|
|
|
|
|
|
|
|
out.printf(
|
2011-07-14 16:15:45 +00:00
|
|
|
" <rec_half_life_days>%f</rec_half_life_days>\n"
|
2011-04-27 11:01:07 +00:00
|
|
|
" <report_results_immediately>%d</report_results_immediately>\n"
|
|
|
|
" <run_apps_manually>%d</run_apps_manually>\n"
|
|
|
|
" <save_stats_days>%d</save_stats_days>\n"
|
|
|
|
" <skip_cpu_benchmarks>%d</skip_cpu_benchmarks>\n"
|
|
|
|
" <simple_gui_only>%d</simple_gui_only>\n"
|
2014-05-19 08:34:39 +00:00
|
|
|
" <start_delay>%f</start_delay>\n"
|
2011-04-27 11:01:07 +00:00
|
|
|
" <stderr_head>%d</stderr_head>\n"
|
|
|
|
" <suppress_net_info>%d</suppress_net_info>\n"
|
|
|
|
" <unsigned_apps_ok>%d</unsigned_apps_ok>\n"
|
|
|
|
" <use_all_gpus>%d</use_all_gpus>\n"
|
|
|
|
" <use_certs>%d</use_certs>\n"
|
2012-05-18 17:38:16 +00:00
|
|
|
" <use_certs_only>%d</use_certs_only>\n"
|
2015-09-30 05:40:40 +00:00
|
|
|
" <vbox_window>%d</vbox_window>\n",
|
2011-07-14 16:15:45 +00:00
|
|
|
rec_half_life/86400,
|
2011-04-27 11:01:07 +00:00
|
|
|
report_results_immediately,
|
|
|
|
run_apps_manually,
|
|
|
|
save_stats_days,
|
|
|
|
skip_cpu_benchmarks,
|
|
|
|
simple_gui_only,
|
|
|
|
start_delay,
|
|
|
|
stderr_head,
|
|
|
|
suppress_net_info,
|
|
|
|
unsigned_apps_ok,
|
|
|
|
use_all_gpus,
|
|
|
|
use_certs,
|
2012-05-18 17:38:16 +00:00
|
|
|
use_certs_only,
|
2015-09-30 05:40:40 +00:00
|
|
|
vbox_window
|
2011-04-27 11:01:07 +00:00
|
|
|
);
|
|
|
|
|
2011-04-29 12:04:07 +00:00
|
|
|
out.printf(" </options>\n</cc_config>\n");
|
|
|
|
out.printf("</set_cc_config>\n");
|
|
|
|
return 0;
|
2011-04-27 11:01:07 +00:00
|
|
|
}
|