Commit Graph

2845 Commits

Author SHA1 Message Date
Rom Walton 42d1645b82 LIB: Store the per-user log files in the local profile area instead of the roaming area. We do not need to copy the log files back up to a home directory server when roaming profiles are used. 2014-03-07 10:43:40 -05:00
Charlie Fenton d4292370e3 MGR: Fixes for fast user switching support
- Fix a crash bug which prevented "Launch another BOINC Manager" from working
 - Fix compiler warnings of possible buffer overflow due to incorrect calls to strncat()
 - Adjust directories for per-user files on Macintosh
2014-03-07 00:30:48 -08:00
Rom Walton 2f83235e0c LIB: Introduce the notion of per-user account log files. Setup the manager, tray applet, and screen saver to use per-user account log files. Technically the default screen saver should be as well.
Log Locations:
WIN   : %APPDATA%\BOINC
MAC   : $(HOME)/Library/Logs/BOINC
Linux : $(HOME)/.BOINC
2014-03-06 23:02:04 -05:00
Rom Walton 7eb0cf7f9e Merge branch 'master' of ssh://isaac.ssl.berkeley.edu/boinc-v2 2014-03-06 18:28:08 -05:00
Rom Walton afb6dcc6f3 MGR & Client: Massive code clean-up. Remove as much of the LoadLibrary/GetProcAddress stuff as we can under VS 2012. 2014-03-06 18:27:54 -05:00
David Anderson df1d8e2bde server: store and display gpu_active_frac
- gpu_active_frac is the fraction of time GPU use is allowed
  while the client is running.
  Previously the client reported it but we weren't storing it in the DB.
  We may need it in the future for batch scheduling logic.
- fix a crashing bug in scheduler
- client: minor message tweak
2014-03-06 13:23:52 -08:00
Charlie Fenton c43398afc9 lib: get RAM, CPU, etc. information about BOINC processes even if it is running as Charity Engine. 2014-02-27 01:27:45 -08:00
David Anderson 593181e196 scheduler: if gui_urls.xml or project_files.xml don't end with \n, add one
Otherwise the scheduler reply has two tags on one line,
which messes up old clients that don't use the new XML parse
2014-02-26 16:16:51 -08:00
David Anderson 3edb124ab4 client/scheduler: NVIDIA compute capability 5 GPUS have 128 cores, not 192
NVIDIA has no plans to provide an API that tells you how many cores; I've asked
2014-02-24 15:57:05 -08:00
David Anderson 144b5052ea Fix for building XP-compatible apps with VS2012, from Jon Sonntag 2014-02-13 18:46:28 -08:00
David Anderson 36460bc288 Compile fixes for Ubuntu 2014-02-06 12:17:28 -08:00
David Anderson 4b5a099f81 scheduler: create host_app_version records in NCI case 2014-02-04 15:58:01 -08:00
David Anderson ff31b9dfc8 client (Android) compile fix 2014-02-02 22:07:33 -08:00
David Anderson 389db3727a GUI RPC: make Unix domain work on Mac (hopefully) 2014-01-31 16:38:36 -08:00
Charlie Fenton d4aafeb91f GUI RPC: Fix Unix domain stuff for Mac OS X 2014-01-31 16:14:53 -08:00
David Anderson 1d85d22e73 GUI RPC: disable Unix domain stuff for Mac OS X 2014-01-31 14:44:23 -08:00
David Anderson 7e3f9d323a Win compile fixes 2014-01-30 23:15:03 -08:00
David Anderson e22ffeb377 GUI RPC: add support for RPCs over Unix domain sockets (for Android)
- If run with --gui_rpc_unix_domain, the client will listen on
  a Unix-domain socket (named "boinc_socket") rather than on a TCP port.
- Add RPC_CLIENT::init_unix_domain() function to C++ GUI RPC interface
  (Note: we'll need to add a corresponding function to the Java interface)
- boinccmd: add --unix_domain option
2014-01-30 22:57:44 -08:00
David Anderson c4f4421ff0 client/manager/server: use HTTPS for web RPCs if possible
The web RPCs done by the client during project attach
(lookup_account, create_account)
have an email address and password hash in their request.
Network sniffers could potentially see these,
so we should use HTTPS for these RPCs if possible.
However, not all BOINC projects have SSL-enabled web servers.
So I did the following:

- Change get_project_config.php to return an additional
  <web_rpc_url_base> element.
  This is SECURE_URL_BASE (if specified in the project's
  project.inc config file) or, if not, the master URL.
- This new element is parsed into the PROJECT_CONFIG structure.
- In calls to create_account and lookup_account,
  the Manager uses PROJECT_CONFIG::web_rpc_url_base
  if it's available, else the master URL.

So, the new Manager/client uses HTTPS for RPCs to projects
that have updated their get_project_config.php,
and specify a SECURE_URL_BASE with https:// prefix.

Android note: I added code to parse the new config element,
but didn't change the higher-level code;
Joachim will need to do this.
2014-01-28 13:25:59 -08:00
Rom Walton 3dbe238996 client & manager: Convert several files to UTF-8 encoding. BOINCBaseView.cpp needed to be converted on a Windows machine to properly handle the original encoding. 2014-01-28 15:29:59 -05:00
Bernd Machenschalk e2e9ecd3b3 Hotfix for MinGW build issue with Rom's commit:b9f8bea6 2014-01-28 08:42:31 -05:00
David Anderson 04327eb7e7 vboxwrapper: fix VM-launch code for UNIX 2014-01-20 23:34:35 -08:00
David Anderson 01b78c714a Remote job submission: allow efficient batch query
The batch query call used by Condor (query_batch_set(), in the C++ API)
returned info about all the jobs in the set of batches,
even those that hadn't changed.
This is potentially inefficient - a query might return info
about 10,000 jobs, only a few (or none) of which have changed state
since the last call.

Solution: add a "min_mod_time" parameter to the call.
Only jobs that have changed state since that time are reported.
Also, add a "server_time" field to the return,
giving the current time on the server
(in case there's clock skew between client and server)

Also, fix some text scrambling introduced in previous checkin;
there must have been a gremlin in my vim.
2014-01-16 10:24:10 -08:00
David Anderson 3aa9ae0e16 Manager: display notices in Helvetica font; message tweak 2014-01-14 23:30:08 -08:00
Rom Walton 283ca3fead LIB: Remove the call to SetDLLDirectory which removes the current directory from the search path on recent versions of Windows.
Also remove our copies of the Windows debug engine.  Recent version of Windows have recent enough versions of the debugger engine to generate call-stacks.
2014-01-10 15:16:40 -05:00
Rom Walton 33b5a42c92 lib: make run_on_batteries false for all platforms by default. 2014-01-07 16:39:18 -05:00
Joachim Fritzsch 9e218c25a5 android: disable preference run_on_batteries by default on Android. 2014-01-07 13:31:52 +01:00
David Anderson 86a0dc0850 client: message tweak 2013-12-11 00:35:30 -08:00
David Anderson 23df6a46f3 Merge branch 'master' of ssh://boinc.berkeley.edu/boinc-v2 2013-12-03 15:54:26 -08:00
Eric J Korpela 9ddff0880c Get rid of warning in unix_util.cpp. 2013-12-03 11:25:22 -08:00
Eric J Korpela 8537d45bdf Added replacement for ether_ntoa() on hosts that don't have it. 2013-12-03 11:10:10 -08:00
David Anderson 8f7e94ec5d Client and Manager: make notices translatable
- Add a GUI RPC ("set_language") that lets the Manager communicate
  the user's selected language code to the client at startup.
- The client stores the language code in the client state file
- The client appends a "lang=X" GET argument to the URLs from
  which notices are fetched.
- The next steps (not done) are 1) to change the get_notices.php
  script to parse the argument and do translation, and
  2) extend our Pootle system to allow volunteer translation
  of notices by all projects.
2013-12-03 10:47:56 -08:00
David Anderson 78fe4e89d5 Merge branch 'master' of ssh://boinc.berkeley.edu/boinc-v2 2013-11-30 17:55:27 -08:00
David Anderson d6da81b862 client: fix bugs with CPU throttling and GPU apps
Various bad things could happen when CPU throttling was used together w/ GPU apps.
Examples:
- on a multi-GPU system, several GPU tasks are assigned to the same GPU
- a suspended GPU task remains in memory (tying up its GPU resources)
while other tasks try to use the GPU.

The problem was that parts of the code assumed that suspended
GPU processes don't exist - i.e. that when a GPU task is suspended
it's always removed from memory.
This isn't true in the presence of CPU throttling.

So I made the following changes:
- When assigning GPUs to tasks, treat suspended tasks like running tasks
  (i.e. reserve their GPUs)
- At the end of the CPU-scheduling logic, if there are any GPU tasks
  that are suspended and not scheduled, remove them from memory,
  and trigger a reschedule so we can reallocate their GPUs.

Also, a cosmetic change: in the resource usage string shown in the GUI,
include "(device X)" even if the task is suspended (i.e. because of throttling).

Also: zero out COPROC::opencl_device_indexes[] so we don't write
a garbage number to init_data.xml for non-OpenCL jobs
2013-11-29 11:44:09 -08:00
David Anderson 99332624f3 scheduler: parse <opencl_cpu_prop> in scheduler requests correctly
The OPENCL_CPU_PROP structure was being referred to as both
"opencl_cpu_prop" and "cpu_opencl_prop", roughly 50/50,
in variable names and XML tags.
Let's standardize on "opencl_cpu_prop",
which is what current clients are sending in scheduler requests.
2013-11-28 14:11:42 -08:00
David Anderson 7f12630cd2 boinccmd: show daily xfers using %f to handle > 2 GB 2013-11-25 22:50:13 -08:00
David Anderson feb2f1971d scheduler: fix bug that prevented Intel GPU work from being sent to anonymous platform clients 2013-11-21 22:31:15 -08:00
David Anderson 634613abcc client: generate host CPID as a function of MAC address
This makes the host CPID stable; if you repeatedly install BOINC
on a particular node, it will get the same host CPID each time,
and your host table won't get lots of redundant entries.
A host can have multiple NICs;
we use the MAC address of the first Ethernet controller we find,
or the last NIC if there is none.
Of course, this will create problems if we get the same MAC address
for different hosts; in principle this shouldn't happen.

Remove the unused file hostinfo_network.h
2013-11-18 20:31:14 -08:00
David Anderson 5346ff3b7a BOINC lib: change get_mac_address to return just one address; prefer Ethernet 2013-11-18 10:20:46 -08:00
Rom Walton d384dca967 LIB: Re-introduce code to get a host's MAC address. 2013-11-15 17:52:48 -05:00
Charlie Fenton 7c70f89b80 Mac: Fixes to allow minor OS versions > 9 and major OS versions > 10 2013-11-15 05:02:04 -08:00
Rom Walton b9f8bea665 client: Give boinc_master full control of any process spawned using the service token created by the client for boinc_project.
This will allow the core client to kill VirtualBox VM's launched indirectly by vboxwrapper.  Vboxwrapper launches vboxsvc.exe which launches vboxheadless.exe.  This should also take care of the core client being able to kill child processes of the regular wrapper as well.  I don't know the full scope of this type of issue?  Maybe the default ACLs for a process changed within the last couple of versions of Windows.
2013-11-14 23:26:06 -05:00
David Anderson 0fc0f80c30 Fix win compile warnings. Let's shoot for zero warnings, OK? 2013-11-11 10:42:03 -08:00
Oliver Bock f714fda040 Fix regression in c1ee472 (not fixed in d5fdf4b) 2013-11-08 15:59:47 +01:00
David Anderson a3b2be239f Compile fixes for C++11, from Rene Ladan 2013-11-05 09:19:27 -08:00
Eric J Korpela f6bfb14433 Fix for fcgi compiles. 2013-10-28 16:19:48 -07:00
Rom Walton 35a7aff5f3 lib: Add missing entry for Charity Engine when identifying an application as a BOINC app or not. 2013-10-23 14:19:04 -04:00
David Anderson 590bbf517a Client: for VM apps, use rsc_memory_bound as the working set size.
On Windows, the working-set size reported by the OS for VM apps is too low.
Apparently the RAM usage is in fact roughly the VM size.
This can lead to running multiple VM apps,
which use more RAM than is available, causing performance problems.
Solution: use workunit.rsc_memory_bound as the working set size for VM apps.
(Note: for now, a VM app is one where the plan class includes "vbox").
2013-10-22 22:21:13 -07:00
David Anderson 438cd78b13 Remote job submission: add C++ APIs for query_batches() and query_batch()
- Add program (tools/remote_submit_test.cpp) for testing C++ API for remote job submission.
- Rename Condor-specific API to query_batch_set().
2013-10-22 15:27:34 -07:00
David Anderson 03cc6849c7 remote job submission: add C++ interface to estimate_batch function 2013-10-21 23:40:30 -07:00
David Anderson f3ffbf67f4 GUI RPC: add cpu_time (as well as elapsed_time) to OLD_RESULT 2013-10-18 00:46:48 -07:00
Eric J Korpela c80f373fde - Removed reflection of signals that appear in the incorrect thread due to
android client compile errors.
2013-10-17 11:47:45 -07:00
David Anderson 96a85b4ab6 Move thread.cpp,h from lib/ to client/, to remove dependency on pthread in libboinc 2013-10-17 09:45:49 -07:00
David Anderson b2a6a6528d linux build: add -lpthread 2013-10-11 22:17:15 -07:00
Charlie Fenton 544ed85aa0 client: fix Event Log descriptions of OpenCL CPUs:
- Show the OpenCL platform vendor for each OpenCL CPU description.
 - OpenCL may not reliably report total RAM, available RAM and max FLOPS for CPUs, so exclude these from the OpenCL CPU descriptions; that information is available elsewhere.
2013-10-11 03:47:56 -07:00
Rom Walton 8888ba6aa8 client: Detect OpenCL CPUs with the latest Intel drivers.
client: Display an OpenCL CPU event log item for every OpenCL CPU detected.
2013-10-10 14:23:30 -04:00
David Anderson 7336bfd9ba Remote job submission, C++ API: simplify 2013-10-08 17:36:45 -07:00
Rom Walton 7cca8a59eb client: Add vm_extensions_disabled as an element to APP_INIT_DAATA. We can use the additional information to selectively enable/disable hardware acceleration in VirtualBox. 2013-10-03 23:52:05 -04:00
Rom Walton 70de6a60df LIB: Provide a mechanism for BOINC client software to initialize the exception filter for secondary threads 2013-10-03 20:09:22 -04:00
Rom Walton f318ee9959 VBOX: Add code to vboxwrapper to bubble up out of memory errors for guest VM applications to the server. 2013-10-03 12:59:04 -04:00
Eric J Korpela 0bd2b91a60 Fix for MacOS signal handler problems 2013-09-27 17:57:17 -07:00
Eric J Korpela 19fcc1f6ad Implemented stackdumps for Android using libcorkscrew.so interfaces. 2013-09-26 16:13:24 -07:00
David Anderson ebde7809ce client: preliminary implementation (commented out) of sub-second throttling 2013-09-20 14:30:04 -07:00
Rom Walton f44c260e67 lib: A little code cleanup missed from the previous commit 2013-09-20 14:49:07 -04:00
Rom Walton 8428f942de lib: On Windows, if the registry key that defines where the data directory is missing, check to see if the default directory exists anyway. If the directory exists change the current working directory over to it. 2013-09-20 14:46:26 -04:00
David Anderson 3e21e8b7c4 Condor: debug set_expire_time RPC 2013-09-17 23:14:57 -07:00
David Anderson 2a2c9c4ad8 remote job submission: add notion of "expire time" for batches (for Condor)
- Batches now have optional "expire time".
  If this time passes and the batch is not retired, abort and retire it.
- Add script "expire_batches" which enforces the above.
  Run it as a periodic task.
- Add a web RPC for setting the expire time of a batch
  (it can be changed multiple times)
- Add a C++ interface for this RPC
- Add a BOINC_SET_LEASE command to the BOINC GAHP
  ("lease" is Condor term for expire time)
2013-09-17 13:35:55 -07:00
David Anderson 826ab1d945 Client (Android): add device_name field to DEVICE_STATUS, so that GUI can tell client the device name 2013-09-10 18:04:34 -07:00
David Anderson d6398b0834 Client and boinccmd: fixes for get_old_results GUI RPC
- Add binding for get_old_results GUI RPC
- Add --get_old_tasks option to boinccmd
- Compile fixes for gcc (can't have a var named "or")
2013-09-08 12:11:09 -07:00
David Anderson 5b76909f04 scheduler: parse OpenCL/CPU descriptors, and add plan class for OpenCL/CPU/Intel 2013-08-26 23:32:32 -07:00
David Anderson 3347c27532 Condor interface: fix bug if job names have '#' (URL-escape args in GET HTTP) 2013-08-26 20:52:25 -07:00
David Anderson d5fdf4b391 Fix MinGW makefile for new file 2013-08-26 11:21:54 -07:00
David Anderson 4430a2cacd Update Win project files for new .cpp file 2013-08-25 15:27:11 -07:00
David Anderson c1ee47216b Move OpenCL-related code to a separate file 2013-08-25 14:13:14 -07:00
David Anderson b10348ca1a client (Android): use random string for domain name
- parse domain_name from state file
- if it's empty, generate one of the form android_xxxxxxxx
- don't use MAC address
2013-08-22 23:50:13 -07:00
Charlie Fenton 5a81b939e2 lib: fix a comment 2013-08-22 05:20:29 -07:00
Charlie Fenton eb15b04d4a client: implement support for OpenCL detection of CPUs
Notes:
- The same CPU can have a different cpu_opencl_prop for each of multiple OpenCL platforms.  We send them all to the project server because:
   - Different OpenCL platforms report different values for the same CPU.
   - Some OpenCL CPU apps may work better with certain OpenCL platforms.
- OpenCL has only 64 bits for global_mem_size, so it can report a max of only 4GB; get the CPU RAM size from gstate.hostinfo.m_nbytes.
2013-08-22 05:06:54 -07:00
Charlie Fenton f94d1822cd Mac installer: Don't load more languages for a catalog if we've already loaded it for English 2013-08-16 21:48:18 -07:00
David Anderson 84a6f89840 client and API, Unix: code cleanup, no functional change 2013-08-16 12:20:01 -07:00
Charlie Fenton c9ccf7b402 Mac installer: More robust handling of language codes with and without region codes for translations 2013-08-16 05:11:32 -07:00
David Anderson 0950e35c10 client (Android): put default prefs in code instead of config file; make report_results_immediately the default
- the eliminates the need to include global_prefs_override.xml in the Android distribution
- defering reporting tasks confuses some Android users; since WiFi connectivity is likely to be sporadic, and jobs tend to be long, it's probably better the report them ASAP
2013-08-15 12:32:48 -07:00
Charlie Fenton 1f4aac6f87 Mac installer: fix handling of translations for some languages 2013-08-15 04:29:54 -07:00
David Anderson d980f70163 client and manager: the set_cc_config and get_cc_config GUI RPCs had nonstandard replies, which weren't parsed correctly by the calling code.
The reply from a GUI RPC that don't return info is one of:
<success/>
<error>error message</error>
<status>N</status>
2013-08-11 00:23:41 -07:00
David Anderson c3485cd6a9 client (Android): allow GUI to pass MAC address to client via set_host_info(). If domain name is "localhost" and MAC address is nonempty, use MAC address instead of domain name when showing host on project web page. 2013-08-03 18:42:11 -07:00
David Anderson e85a18289e client (win): fix typo in last commit 2013-07-30 10:47:54 -07:00
Charlie Fenton 7d372d2803 Fix warnings of class or global variables shadowed by local variables or arguments 2013-07-29 01:31:09 -07:00
Rom Walton 9d726ba0fc LIB: Simplify logic for get_exit_status(). Put caller to sleep until process exits, then check for it's exit status. 2013-07-15 19:34:25 -04:00
David Anderson 3bcf2a3530 client: fix bug that caused host CPID to change on each startup 2013-07-14 12:07:52 -07:00
David Anderson ba6fbc8071 client: if suspend for battery reasons, show parameters in event log
E.g., if suspend because battery temperature,
show current temperature and temperature limit.
Could do this for other things too, e.g. exclusive apps.
2013-07-13 16:31:25 -07:00
David Anderson 67c20e9fce API: remove logic that makes new app graphics work with version 5 clients. 2013-07-09 16:22:10 -07:00
David Anderson 1eb93fb757 Manager and GUI RPC: fix bugs that caused bad Intel GPU backoff display 2013-07-09 12:23:20 -07:00
David Anderson a8485f3d3f Various: Fix some compile warnings; from Gianfranco 2013-07-09 10:34:32 -07:00
Charlie Fenton 21b1af954e client: fix display of CUDA version. 2013-07-02 21:57:15 -07:00
Charlie Fenton 631e236b08 client: tweaks to code for detecting GPUs via a child process.
Added safety features requested by Rom Walton:
* Change COPROC_ATI::get_available_ram and  COPROC_NVIDIA::get_available_ram to static routines to prevent calling them without first loading CAL or CUDA libraries.
* Add tests for NULL library calls in these routines.
* Add comments warning about need to call from a separate child process on dual-GPU laptops, proper library initialization, etc.
2013-06-27 02:36:20 -07:00
David Anderson 9ad9c5ee13 client (Android): show "GUI not active" suspend reason 2013-06-26 16:33:32 -07:00
Charlie Fenton 4d74c5abbd client: tweaks to code for detecting GPUs via a child process and change sprintf calls to safer snprintf. 2013-06-26 05:00:25 -07:00
Charlie Fenton 737ab61bce client: tweaks to code for detecting GPUs via a child process and change sprintf calls to safer snprintf. 2013-06-26 02:24:36 -07:00
Charlie Fenton e2b2370e9d client: optionally detect GPUs via a child process, for dual_GPU laptops.
Some dual-GPU laptops (e.g., Macbook Pro) don't power down the more powerful GPU until  all applications which used them exit.  To save battery life, the client launches a second instance of the client as a child process to detect and get info about the GPUs.
The child process writes the info to a temp file which our main client then reads.
This option is enabled at compile time by defining USE_CHILD_PROCESS_TO_DETECT_GPUS as non-zero in gpu_detect.cpp
2013-06-25 04:31:34 -07:00
David Anderson 37eb54f12f client (Android): get "user active" from GUI; don't run if user active
On Android, get the "user active" state from the GUI
(as DEVICE_STATUS::user_active).
Never compute if user active (ignore preferences).
2013-06-22 09:58:39 -07:00
David Anderson 57a6d3d17a client (Android): make max battery temperature a preference
Note: internal change only; there's no GUI for this yet
2013-06-20 21:47:34 -07:00
David Anderson 4fd76ee325 boinccmd: show result states as strings instead of numbers 2013-06-18 11:33:22 -07:00
Charlie Fenton 49b8570c65 Mac installer: localize the dialog strings in the Postinstall app. 2013-06-14 04:50:06 -07:00
Charlie Fenton 8a31b7567e lib: Fix bugs and license in simplified string localization code adapted from wxWidgets. 2013-06-13 16:33:15 -07:00
Charlie Fenton f39e928b4b lib: Simplified string localization code adapted from wxWidgets.
Allows translation using BOINC's locale files without the need to link code with wxWidgets.
See comments in files for details.
2013-06-12 04:03:02 -07:00
David Anderson 276f8130a6 client: show event log line limit in event log at startup 2013-06-07 15:20:14 -07:00
David Anderson 78f7610f6e remove dependency of boinc_api.h on str_replace.h (and hence config.h)
Any files that use strlcpy() or strlcat() must directly include str_replace.h
2013-06-06 17:31:46 -07:00
David Anderson b98bc309cc API: fix bug involving suspend and critical sections
Old: if the timer thread gets a <suspend> message while we're in
a critical section, it sets a "suspend_request" flag.
The timer then periodically (10X/sec) checks whether
suspend_request is set and we're no longer in a critical section;
if so it suspends the worker thread.

Problem (pointed out by Oliver): this doesn't work if the worker thread
is almost always in a critical section
(as is the case for GPU apps, which treat GPU kernels as critical sections).
The app never gets suspended.

New:
1) boinc_end_critical_section() checks suspend_request;
    if set, it calls suspend_activities()
2) On Unix, if suspend_activities() is called from the worker thread,
    it calls sleep() in a loop until the suspension is over.
    (Note: pthreads has no suspend/resume).
3) Add a mutex to protect the data structures shared between
    the timer and worker threads.

Oliver pointed out that
2013-06-05 15:22:39 -07:00
David Anderson 1446fdddbe client: add <android_debug> log flag; shows battery/wifi RPC info 2013-06-04 11:25:11 -07:00
Charlie Fenton 33191c7f8a Mac installer: Fix build breaks due to recent changes for strcpy -> strlcpy. 2013-06-04 00:55:57 -07:00
David Anderson 846b8c7757 all components: change strcpy() to strlcpy() when possible.
This commit should cover the client and manager code.
2013-06-03 20:24:48 -07:00
David Anderson 213bb934a7 Condor interface changes
BOINC_QUERY_BATCHES now prints, for each queried batch,
    a count of jobs followed by the jobs
BOINC_ABORT_JOBS takes a list of jobs, which may belong to different batches.
    The handler for this looks up the batches and makes sure
    the jobs belong to the user.
2013-05-30 23:38:33 -07:00
David Anderson ff261cb6df Condor interface: bug fixes; add request_gen script; add retire_batch command 2013-05-30 09:44:58 -07:00
David Anderson 48e044fa76 Condor interface: bug fixes, and set WU names correctly 2013-05-28 23:14:17 -07:00
Charlie Fenton 3eb430eaec client & MGR: when writing cc_config.xml, put <max_event_log_lines> in correct alphabetical order 2013-05-28 21:19:28 -07:00
David Anderson 9c50abaffa Manager and GUI RPC interface: fix possible buffer overruns
If the user typed an extremely long URL into the
Attach to Account Manager wizard, a buffer overrun could result.
There were several places in the code that assumed user-entered
URLs are small (e.g. 256 chars):
- canonicalize_master_url.cpp()
- several GUI RPC interfaces, when generating XML request message
- URL-escaping (not relevant here, but fix anyway)
Change all these to stay within buffers regardless of URL size.
Note: do this by truncation.
This will cause error messages like "can't connect to project"
rather than saying the URL is too long.  That's OK.
2013-05-27 23:08:02 -07:00
David Anderson f25cf0836a Include <cmath> instead of <math.h> various places 2013-05-27 16:44:22 -07:00
David Anderson 8009a8cecb Condor interface: various fixes, mostly from Jaime Frey
- XML parser: for parse_string(), malloc the 256KB buffer instead of
    allocating it on the stack; the latter crashes threads with 32KB stacks.
    However, do the malloc() only if we've actually seen the start tag
    (this required a bit of code shuffle).
- BOINC GAHP: escape spaces in error msgs
2013-05-27 11:45:10 -07:00
David Anderson a132fcba02 client: parse product_name from state file only on Android 2013-05-23 23:29:44 -07:00
David Anderson 0983315cdb use MAXPATHLEN and sizeof() a few places; from Gianfranco 2013-05-22 13:56:48 -07:00
David Anderson 1a6a7128a1 client: get product name in Android
We want to track the product name (e.g. "HTC One X") of Android devices.
On Android, the API to get this is Java,
so we need to do it in the GUI rather than the client.
- Add product_name field to HOST_INFO
- Add a GUI RPC for passing this info from the GUI to the client.
- Store it in client_state.xml, so that the client knows it initially.

The product name is included in scheduler RPC requests, as part of <host_info>.
TODO: add server-side support for parsing it and storing in DB.

Also: move DEVICE_STATUS out of HOST_INFO; it didn't belong there.
2013-05-21 13:20:56 -07:00
David Anderson 078087985c client: add battery_charge_min_pct preference (currently for Android) 2013-05-21 10:26:45 -07:00
David Anderson 8e2524f55f Unix build: Makefile changes for "make install", from Steffen Moeller
"make install" followed by make_project should now work
2013-05-20 15:19:13 -07:00
David Anderson f1c7b6a97d fix some Clang warnings; from Steffen Moeller 2013-05-20 12:58:52 -07:00
David Anderson e12e1d0138 client: add <client_new_version_text> config option
Lets you customize the notice that's generated when a new client version is available
2013-05-20 10:28:19 -07:00
Charlie Fenton 7ae25cb76d client & MGR: add support for <max_event_log_lines>N</max_event_log_lines> in cc_config.xml (fix typo)
Default is 2000
0 means unlimited
2013-05-18 03:50:21 -07:00
Charlie Fenton 93aad6826c client & MGR: add support for <max_event_log_lines>N</max_event_log_lines> in cc_config.xml
Default is 2000
0 means unlimited
2013-05-18 03:25:44 -07:00
David Anderson c6d79d1172 client: fix bug that could cause client to never contact project
if a project sends us <no_rsc_apps> flags for all processor types,
then by default the client will never do a scheduler RPC to that project again.
This could happen because of a transient condition in the project,
e.g. it deprecates all its app versions for a while.

To avoid this situation, the client now checks whether the no_rsc_apps flags
are set for all processor types.
If they are, it clears them all.
This will cause work fetch to use backoff,
and the client will occasionally contact the project.
2013-05-17 10:25:03 -07:00
David Anderson 61913b181f client (Android): GUI reports battery and wifi status to client
Previously the client had (C++) code to
- check whether on AC or USB power
- get battery status and temperature
- check whether on wifi
These functions looked in various places under /sys.
Problem: the paths are system-dependent,
so whatever we do won't work on all devices.

The Android APIs for getting this info are in Java,
so we can't call them from the client.

Solution: have the GUI periodically get this info
and report it to the client via a GUI RPC.
The GUI must make this RPC periodically:
if the client doesn't get one within some period of time
(currently 30 sec) it suspends computing and network.

Also: if suspending jobs because of battery charge level
or temperature, leave them in memory.
2013-05-14 12:28:09 -07:00
David Anderson 4927acf25a scheduler: fix bug in copying long XML elements 2013-05-08 15:34:37 -07:00
David Anderson 98751b9046 - remote job submission (i.e. Condor interface): add missing fclose() 2013-05-03 22:40:46 -07:00
David Anderson f1dd8cec18 - comment tweaks 2013-05-03 15:14:00 -07:00
David Anderson 735e2ef394 - client emulator: show jobs in summary file 2013-05-03 15:08:06 -07:00
David Anderson ecfd6d8a63 - boinccmd: check RPC replies for errors; show them. 2013-05-03 15:05:30 -07:00
Eric J Korpela 24353261c4 Fixed problems with FCGI compiles introduced in recent checkins. 2013-04-25 12:46:22 -07:00
David Anderson aa07305eeb - GUI RPC: add "project_dir" field to PROJECT struct.
GUIs can look for image files (stat_icon etc.) in this directory.
2013-04-18 12:43:17 -07:00
David Anderson 35390ef974 - client: add support for CPU OpenCL apps.
Add OPENCL_DEVICE_PROP cpu_opencl_prop to HOST_INFO;
    this store info about the host's ability to run CPU OpenCL apps.
    Detect this, and report it in scheduler requests.
2013-04-16 22:42:29 -07:00
David Anderson 229be73d2b - client: check return value of FormatMessageW()
so we don't print garbage
2013-04-11 01:22:43 -07:00
Eric J Korpela 9f1205f627 Merge branch 'master' of ssh://boinc.berkeley.edu/boinc-v2 2013-04-10 18:23:31 -07:00
Eric J Korpela 61609281c1 - added opencl_driver_revision to OPENCL_DEVICE_PROP and PLAN_CLASS_SPEC. This
was necessary because ATI is releasing OpenCL drivers that don't work.
2013-04-10 18:20:22 -07:00
David Anderson fb5199e9f6 - client: improve message text for battery conditions 2013-04-10 15:52:00 -07:00
David Anderson 2ea7f44f22 - boinccmd: show correct error message if auth failure 2013-04-08 11:35:49 -07:00
Eric J Korpela 0eb9551084 Merge branch 'master' of ssh://boinc.berkeley.edu/boinc-v2 2013-04-03 09:57:03 -07:00
Eric J Korpela 7b8fae6b1e Fix for "make clean" not removing .a files in lib/ 2013-04-03 09:56:25 -07:00
David Anderson 24e8133e4b - tabs -> spaces 2013-04-02 17:23:37 -07:00
David Anderson 93b8289b60 - XML parser: return error if string exceeds buffer size.
- client: when parsing MD5, use 64 instead of 33 char buffer.
    When the XML parser reads a string,
    it enforces the buffer size limit BEFORE it strips whitespace.
    So if a project put whitespaces before or after the MD5,
    it would fail to parse.
2013-03-29 22:36:53 -07:00
David Anderson fae5fc45be - alphabetize fields in prefs structure
- client emulator: simulate project-requested backoff after work fetch
2013-03-29 22:26:38 -07:00
David Anderson b93e80c6f5 - client: code cleanup. Some variable/function/constant names
contained "debt" when they actually refer to REC.
    Change these names to use "rec".
2013-03-24 11:22:01 -07:00
David Anderson a78705a8d4 - client emulator: ignore non-CPU-intensive apps
- remote job submission:
    - prefix error messages with "BOINC server:"
      so higher levels can tell where the error is coming from
    - "get templates" RPC can take job name instead of app name
- Condor interface
    - add BOINC_SELECT_PROJECT function
    - BOINC_SUBMIT no longer has info about output files
    - Change BOINC_FETCH_OUTPUT semantics
2013-03-22 22:04:35 -07:00
David Anderson 6cbaefba91 - client and API: add gpu_usage field to APP_INIT_DATA,
so an app can find out what GPU fraction it's expected to use
2013-03-22 10:39:52 +01:00
David Anderson 39780bd105 - XML parser: when skipping unrecognized elements,
don't read them into memory.
2013-03-22 10:32:57 +01:00
David Anderson eb7e3af7ed - client and wrapper (Linux): when parsing /proc/x/stat entries,
handle command names that contains white space
2013-03-22 10:28:20 +01:00
David Anderson 4fbac17647 - client: alphabetize log flags 2013-03-22 10:25:39 +01:00
David Anderson d95da0f75c - Condor integration:
- change "query_batch" to "query_batches"; allow multiple batches
    - add "ping server" web RPC and GAHP function
    - change BoincDb::get() so that it generates XML error message if needed
2013-03-22 10:25:39 +01:00
David Anderson cff84a8ae2 - server: remove debugging printf from XML parser 2013-03-15 13:38:45 +01:00
David Anderson 033a47691b - client: write log flags in alpha order 2013-03-15 13:38:44 +01:00
David Anderson e07fa5e28c - client (and maybe others): fix XML parsing bug when skipping large
unrecognized elements
2013-03-15 13:38:44 +01:00
David Anderson bd8ecb1b00 - Condor integration:
- add Web RPC for querying a completed job (returns status,
        stderr out, run times, etc.)
    - support Jaime's changes to GAHP protocol
    - support for zipped output files
2013-03-15 13:38:44 +01:00
David Anderson 72d38818b4 - BOINC/Condor stuff
- C++ interfaces to remote functions: add error_msg argument,
    so caller can get textual description of error
2013-03-07 11:31:39 +01:00
David Anderson 00d9a22779 - Manager (and possibly other components): XML parsing fix 2013-03-07 11:31:38 +01:00
David Anderson 29444b3edb - remote job submission: add a web RPC for getting an app's templates
(can use this to consistency-check job submission info)
2013-03-07 11:31:38 +01:00
David Anderson 71b6508313 - client: add <fetch_on_update> config option;
requests work when you update a project
    even if it's not highest priority
2013-03-07 11:28:43 +01:00
David Anderson 69b0748ada Client/manager: isspace() throws an exception on Win for non-ASCII chars.
Check isascii() first.
2013-03-07 11:28:43 +01:00
David Anderson 2fea038249 - Scheduler: fix security vulnerabilities 2013-03-07 11:28:42 +01:00
David Anderson 9a670c88a5 - web: change var names 2013-03-07 11:22:27 +01:00
David Anderson d6c92d870c - Code cleanup for remote job submission
- Add abort_jobs operation to BOINC GAHP
- Change batch-related RPCs so that you can identify batch
    either by database ID or name
2013-03-05 17:15:18 +01:00
Oliver Bock 1c65db4a76 Merge branch 'master' of ssh://boinc.berkeley.edu/boinc 2013-03-05 17:11:45 +01:00
David Anderson b95e0dc728 - scheduler and web: store OpenCL version along with other GPU info
in host.serialnum.  Display it on web.
2013-03-05 17:11:33 +01:00
David Anderson 9ff0f0daeb - include OpenCL info when faking an NVIDIA GPU 2013-03-05 17:01:21 +01:00
David Anderson c3ec0e91de - client: show nvidia driver version as 314.07 instead of 314.7 2013-03-05 16:58:44 +01:00
Charlie Fenton af10fb6cdd MGR: Limit event log to 2000 messages, deleting oldest if necessary 2013-03-05 16:42:45 +01:00
Eric J Korpela ed4daff659 Fix for FCGI compile problem in lib/filesys.cpp 2013-03-05 16:38:41 +01:00
Oliver Bock 1efdd8b896 Merge branch 'master' of ssh://boinc.berkeley.edu/boinc 2013-03-05 16:34:03 +01:00
Oliver Bock 5cd587789f Merge branch 'master' of ssh://boinc.berkeley.edu/boinc 2013-03-05 16:31:53 +01:00
David Anderson 4bf3f7f51a - client: fix copy_element_contents() to remove assumption that the
end tag is on a line by itself.  (this broke things if gui_urls.xml
    didn't end with a CRLF).
2013-03-05 16:31:44 +01:00
Rom Walton af7948910e client: Adjust logging on Android so that all messages that show up in the event log are also dumped to LogCat, things were originally setup with that intent but I don't think __VA_ARGS__ was having the desired effect. 2013-03-05 15:57:34 +01:00
Oliver Bock eb79b9e78b Merge branch 'master' of ssh://boinc.berkeley.edu/boinc
Conflicts:
	client/hostinfo_unix.cpp
2013-03-05 15:45:13 +01:00
Rom Walton d2df80a859 client: Fix typos for Android 2013-03-05 15:40:04 +01:00
David Anderson 3b18584cb3 - client (Android): change battery-status function so that it
keeps file descriptors open
    (slight simplification and performance enhancement).
2013-03-05 15:33:54 +01:00
David Anderson 21f580d9ef - client (Android): suspend processing if battery temperature > 45 C.
We can adjust this or make it configurable later.
2013-03-05 15:28:00 +01:00
David Anderson d37feb9da9 - lib: typo fix 2013-03-05 15:24:10 +01:00
David Anderson 607060ffaa - client (Android)
- Don't compute if the battery is overheated
    - Don't compute until the batter is 95% charged.
        Then stop computing if it falls below 90%.
        (On some devices, computing causes the batter to drain
        even while it's recharging).
2013-03-05 15:24:01 +01:00
David Anderson b4cfda52e5 - improvements to Makefile for lib for MinGW, from Bernd 2013-03-05 15:12:52 +01:00
Rom Walton 9ce39485b5 client: Basic detection of the battery state for a given host for Windows and Android. Useful for detecting if the battery is overheating. 2013-03-05 15:12:52 +01:00
Rom Walton 759b3b8078 client: Basic detection of how much capacity a host's battery has on Android and Windows. 2013-03-05 15:12:52 +01:00
David Anderson e1014a047d - API: fix MinGW Makefile for boinc_zip; from Bernd M. 2013-03-05 15:07:22 +01:00
David Anderson 3a530a4c34 - client: check return value of the function (statfs or statvfs)
used to find disk space and usage.
    This may be failing for in-memory filesystems on Linux.
2013-03-05 15:05:29 +01:00
Rom Walton 0bc567d8c3 lib: Remove duplicate GPU text in the OpenCL description 2013-03-05 14:17:54 +01:00
Rom Walton c448732249 lib: Only process FormatMessage output if the function succeeds. The CC calls windows_format_error_string() for all non-zero returns. 2013-03-05 14:17:54 +01:00
Eric J Korpela 9b191c409a - Modifications to autoconf scripts for non-standard openssl installs 2013-03-05 14:17:54 +01:00
David Anderson c17d20ccd9 - client: show sysmon messages correctly.
This was supposed to be in my 507cd79 commit, but it got botched somehow.
- client: the <task> debug flag enables suspend/resume messages
    for both CPU and GPU.
    Previously CPU messages were always shown,
    and GPU messages were shown if <cpu_sched_debug> was set.
- client: fix bug where reschedule wasn't being done on GPU suspend or resume.
2013-03-05 14:05:04 +01:00
David Anderson 9817ee5850 - scheduler: fix typo in sticky file deletion code 2013-03-05 13:53:58 +01:00
David Anderson 994f4d6b4c - Manager: fix case where the client has only an Intel GPU,
and the manager was acting as if it had no GPUs.
2013-03-05 13:39:42 +01:00
Oliver Bock 527eb40691 Merge branch 'master' of ssh://boinc.berkeley.edu/boinc 2013-03-05 13:36:01 +01:00
Eric J Korpela 9eece8663d Fixed FCGI build problem 2013-03-05 13:34:43 +01:00
David Anderson 10f8baca5b - lib: function name tweak 2013-03-05 13:33:27 +01:00
David Anderson 35608c434b - fix Android compile warnings
- intermediate checkin for Condor stuff
2013-03-05 13:33:27 +01:00
Rom Walton 186beb241c LIB: Call FormatMessageW directly and skip an extra string encoding conversion step. 2013-03-04 17:39:24 +01:00
Rom Walton 076858a729 LIB: Standardize on using windows_format_error_string and drop windows_error_string.
* Move the windows_format_error_string function to win_util.cpp, .h instead of it being scattered between util.h and str_util.cpp.
* Convert the Windows error string into UTF8 before allowing it to be used by the caller
* Remove windows_error_string from library
2013-03-04 17:39:24 +01:00
David Anderson 13925d7c7b - compile fixes. Fixes #1219 2013-03-04 17:39:24 +01:00
David Anderson 96358c5e9e - lib: compile fix 2013-03-04 17:39:23 +01:00