Commit Graph

2626 Commits

Author SHA1 Message Date
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