2008-08-06 18:36:30 +00:00
|
|
|
// This file is part of BOINC.
|
2005-01-20 23:22:22 +00:00
|
|
|
// http://boinc.berkeley.edu
|
2008-08-06 18:36:30 +00:00
|
|
|
// Copyright (C) 2008 University of California
|
2002-04-30 22:22:54 +00:00
|
|
|
//
|
2008-08-06 18:36:30 +00:00
|
|
|
// 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.
|
2005-01-20 23:22:22 +00:00
|
|
|
//
|
2008-08-06 18:36:30 +00:00
|
|
|
// BOINC is distributed in the hope that it will be useful,
|
2005-01-20 23:22:22 +00:00
|
|
|
// 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.
|
|
|
|
//
|
2008-08-06 18:36:30 +00:00
|
|
|
// You should have received a copy of the GNU Lesser General Public License
|
|
|
|
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
|
2002-04-30 22:22:54 +00:00
|
|
|
|
|
|
|
// flags determining what is written to standard out.
|
|
|
|
// (errors go to stderr)
|
|
|
|
//
|
2007-08-16 17:33:41 +00:00
|
|
|
// NOTE: all writes to stdout should have an if (log_flags.*) {} around them.
|
2002-04-30 22:22:54 +00:00
|
|
|
//
|
|
|
|
|
2002-10-06 00:45:29 +00:00
|
|
|
#ifndef _LOGFLAGS_H_
|
|
|
|
#define _LOGFLAGS_H_
|
|
|
|
|
2007-10-20 16:10:57 +00:00
|
|
|
#include <vector>
|
|
|
|
#include <string>
|
|
|
|
|
2004-03-04 11:41:43 +00:00
|
|
|
#ifndef _WIN32
|
2009-02-26 00:23:23 +00:00
|
|
|
#include <cstdio>
|
2004-03-04 11:41:43 +00:00
|
|
|
#endif
|
2002-04-30 22:22:54 +00:00
|
|
|
|
2007-03-29 16:40:43 +00:00
|
|
|
#define MAX_FILE_XFERS_PER_PROJECT 2
|
|
|
|
#define MAX_FILE_XFERS 8
|
|
|
|
// kind of arbitrary
|
|
|
|
|
2006-08-21 22:25:21 +00:00
|
|
|
class XML_PARSER;
|
|
|
|
|
2006-05-21 21:11:28 +00:00
|
|
|
struct LOG_FLAGS {
|
2009-09-16 20:05:36 +00:00
|
|
|
// on by default; intended for all users
|
2002-04-30 22:22:54 +00:00
|
|
|
//
|
2008-10-04 23:44:24 +00:00
|
|
|
bool file_xfer;
|
2009-09-16 20:05:36 +00:00
|
|
|
// file transfer start and finish
|
2008-10-04 23:44:24 +00:00
|
|
|
bool sched_ops;
|
2009-09-16 20:05:36 +00:00
|
|
|
// interactions with schedulers
|
|
|
|
bool task;
|
|
|
|
// task start and finish
|
2002-04-30 22:22:54 +00:00
|
|
|
|
2006-06-22 19:40:30 +00:00
|
|
|
// off by default; intended for developers and testers
|
2002-04-30 22:22:54 +00:00
|
|
|
//
|
2009-09-16 20:05:36 +00:00
|
|
|
bool app_msg_receive;
|
|
|
|
// show shared-mem message from apps
|
|
|
|
bool app_msg_send;
|
|
|
|
// show shared-mem message to apps
|
|
|
|
bool benchmark_debug;
|
|
|
|
// debug CPU benchmarks
|
|
|
|
bool checkpoint_debug;
|
|
|
|
bool coproc_debug;
|
2009-09-24 17:23:33 +00:00
|
|
|
// show coproc reserve/free and startup msgs
|
2008-10-04 23:44:24 +00:00
|
|
|
bool cpu_sched;
|
2009-09-16 20:05:36 +00:00
|
|
|
// preemption and resumption
|
2008-10-04 23:44:24 +00:00
|
|
|
bool cpu_sched_debug;
|
2009-09-16 20:05:36 +00:00
|
|
|
// explain scheduler decisions
|
2009-11-28 00:07:39 +00:00
|
|
|
bool cpu_sched_status;
|
|
|
|
// show what's running
|
2009-09-16 20:05:36 +00:00
|
|
|
bool dcf_debug;
|
|
|
|
// show changes to duration correction factors
|
2008-10-04 23:44:24 +00:00
|
|
|
bool debt_debug;
|
2009-11-28 00:07:39 +00:00
|
|
|
// changes to long-term debt
|
2008-10-04 23:44:24 +00:00
|
|
|
bool file_xfer_debug;
|
2009-09-16 20:05:36 +00:00
|
|
|
// show completion of FILE_XFER
|
2010-04-29 20:32:51 +00:00
|
|
|
bool gui_rpc_debug;
|
2002-04-30 22:22:54 +00:00
|
|
|
bool http_debug;
|
2006-08-29 18:18:36 +00:00
|
|
|
bool http_xfer_debug;
|
2009-08-14 17:10:52 +00:00
|
|
|
bool mem_usage_debug;
|
2009-09-16 20:05:36 +00:00
|
|
|
// memory usage
|
2009-08-14 17:10:52 +00:00
|
|
|
bool network_status_debug;
|
2009-09-16 20:05:36 +00:00
|
|
|
bool poll_debug;
|
|
|
|
// show what polls are responding
|
|
|
|
bool proxy_debug;
|
|
|
|
bool rr_simulation;
|
|
|
|
// results of rr simulator
|
|
|
|
bool sched_op_debug;
|
|
|
|
bool scrsave_debug;
|
2009-05-28 19:26:27 +00:00
|
|
|
bool slot_debug;
|
2009-09-16 20:05:36 +00:00
|
|
|
// allocation of slots
|
|
|
|
bool state_debug;
|
|
|
|
// print textual summary of CLIENT_STATE initially
|
|
|
|
// and after each scheduler RPC and garbage collect
|
|
|
|
// also show actions of garbage collector
|
|
|
|
bool statefile_debug;
|
|
|
|
// show when and why state file is written
|
2010-04-29 20:32:51 +00:00
|
|
|
bool std_debug;
|
|
|
|
// changes to short-term debt
|
2009-09-16 20:05:36 +00:00
|
|
|
bool task_debug;
|
|
|
|
// task start and control details, and when apps checkpoint
|
|
|
|
bool time_debug;
|
|
|
|
// changes in on_frac, active_frac, connected_frac
|
|
|
|
bool unparsed_xml;
|
|
|
|
// show unparsed XML lines
|
|
|
|
bool work_fetch_debug;
|
|
|
|
// work fetch policy
|
2009-12-22 23:00:55 +00:00
|
|
|
bool notice_debug;
|
2002-04-30 22:22:54 +00:00
|
|
|
|
|
|
|
LOG_FLAGS();
|
2006-08-21 22:25:21 +00:00
|
|
|
int parse(XML_PARSER&);
|
2006-09-07 17:38:54 +00:00
|
|
|
void show();
|
2002-04-30 22:22:54 +00:00
|
|
|
};
|
|
|
|
|
2006-05-21 21:11:28 +00:00
|
|
|
struct CONFIG {
|
2010-04-07 21:11:15 +00:00
|
|
|
bool abort_jobs_on_exit;
|
2009-08-26 16:10:46 +00:00
|
|
|
bool allow_multiple_clients;
|
2010-04-07 21:11:15 +00:00
|
|
|
bool allow_remote_gui_rpc;
|
2009-08-26 16:10:46 +00:00
|
|
|
std::vector<std::string> alt_platforms;
|
|
|
|
std::string client_version_check_url;
|
|
|
|
std::string client_download_url;
|
|
|
|
bool disallow_attach;
|
2006-05-22 09:54:31 +00:00
|
|
|
bool dont_check_file_sizes;
|
2009-08-26 16:10:46 +00:00
|
|
|
bool dont_contact_ref_site;
|
|
|
|
std::vector<std::string> exclusive_apps;
|
2009-11-13 17:49:18 +00:00
|
|
|
std::vector<std::string> exclusive_gpu_apps;
|
2010-06-02 18:21:30 +00:00
|
|
|
bool exit_after_finish;
|
2010-06-02 17:50:47 +00:00
|
|
|
bool exit_when_idle;
|
|
|
|
bool fetch_minimal_work;
|
2009-08-26 16:10:46 +00:00
|
|
|
std::string force_auth;
|
2009-08-14 17:10:52 +00:00
|
|
|
bool http_1_0;
|
2009-11-12 23:44:49 +00:00
|
|
|
std::vector<int> ignore_cuda_dev;
|
|
|
|
std::vector<int> ignore_ati_dev;
|
2006-10-25 16:54:47 +00:00
|
|
|
int max_file_xfers;
|
|
|
|
int max_file_xfers_per_project;
|
2007-10-24 22:48:47 +00:00
|
|
|
int max_stderr_file_size;
|
2009-08-26 16:10:46 +00:00
|
|
|
int max_stdout_file_size;
|
|
|
|
int ncpus;
|
|
|
|
std::string network_test_url;
|
|
|
|
bool no_alt_platform;
|
|
|
|
bool no_gpus;
|
|
|
|
bool no_priority_change;
|
|
|
|
bool os_random_only;
|
2007-11-21 19:57:40 +00:00
|
|
|
bool report_results_immediately;
|
2008-01-13 00:12:14 +00:00
|
|
|
bool run_apps_manually;
|
2009-08-26 16:10:46 +00:00
|
|
|
int save_stats_days;
|
2010-06-02 18:21:30 +00:00
|
|
|
bool skip_cpu_benchmarks;
|
2009-08-26 16:10:46 +00:00
|
|
|
bool simple_gui_only;
|
|
|
|
double start_delay;
|
2010-01-12 18:39:59 +00:00
|
|
|
bool stderr_head;
|
2009-08-26 16:10:46 +00:00
|
|
|
bool suppress_net_info;
|
2010-06-02 18:21:30 +00:00
|
|
|
bool unsigned_apps_ok;
|
2009-08-26 16:10:46 +00:00
|
|
|
bool use_all_gpus;
|
2008-09-04 12:17:58 +00:00
|
|
|
bool use_certs;
|
|
|
|
bool use_certs_only;
|
|
|
|
// overrides use_certs
|
2009-02-20 22:16:03 +00:00
|
|
|
bool zero_debts;
|
2006-10-25 16:54:47 +00:00
|
|
|
|
2006-05-21 21:11:28 +00:00
|
|
|
CONFIG();
|
2009-08-14 16:54:45 +00:00
|
|
|
void clear();
|
2006-05-21 21:11:28 +00:00
|
|
|
int parse(FILE*);
|
2006-08-21 22:25:21 +00:00
|
|
|
int parse_options(XML_PARSER&);
|
2009-04-07 20:02:49 +00:00
|
|
|
void show();
|
2006-05-21 21:11:28 +00:00
|
|
|
};
|
|
|
|
|
2002-04-30 22:22:54 +00:00
|
|
|
extern LOG_FLAGS log_flags;
|
2006-05-21 21:11:28 +00:00
|
|
|
extern CONFIG config;
|
2008-10-10 17:23:51 +00:00
|
|
|
extern int read_config_file(bool init);
|
2002-10-06 00:45:29 +00:00
|
|
|
|
2002-10-09 18:48:26 +00:00
|
|
|
#endif
|