Commit Graph

5027 Commits

Author SHA1 Message Date
Joachim Fritzsch 520b9852d7 android: bug fix for number cpu core detection. issue #1300.
previous attempt to only read sysconf for number of cores is insufficient, due to a bug in the Android system. Bug got fixed in April 2012 but is still present on many devices.

workaround: read /sys/devices/system/cpu and parse number of cores from there. sysconf uses /proc/stat/ which gets adapted to changes in cpu throttling. Read both sources and compare higher results.
2013-07-17 14:01:39 +02:00
David Anderson 4d0109e3fb Client: add test harness for file copy (make sure we can handle > 2GB) 2013-07-16 21:40:13 -07:00
Charlie Fenton 9ff8554ee4 client: when launching the GPU detection child process, use boinc_fopen(), more checks for error returns. 2013-07-16 01:29:00 -07:00
Rom Walton 8321ef0430 client: Use get_exit_status to wait until the GPU detection process completes and log any error code. 2013-07-15 19:42:21 -04:00
Charlie Fenton 88135a7000 client: wait as long as necessary for the GPU detection child process to exit: eliminate the 3-second limit. 2013-07-15 14:43:29 -07:00
David Anderson 338487fd13 client: don't write name twice in job log 2013-07-14 22:56:37 -07:00
David Anderson 8949c04a77 client: add exit status and result name to job log entries 2013-07-14 13:19:22 -07:00
David Anderson abfd522840 client: if system clock goes backward, show details in event log 2013-07-14 11:54:20 -07:00
David Anderson f654cf947e client: parse <client_new_version_text> in cc_config.xml 2013-07-13 16:45:15 -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
Joachim Fritzsch bcaf537228 android: bug fix for changing p_ncpus in host_info. issue #1300.
previous attempt to acquire full wake lock during setup routine has not fixed this bug.

changed p_ncpus detection from sysconf(_SC_NPRROCESSORS_ONLN) to _SC_NPROCESSORS_CONF in client's get_host_info for Android devices.
2013-07-13 13:46:29 +02:00
Charlie Fenton 1d590434ea client: Fix a race condition on system reboot when using a child process for detecting GPUs, add debugging support to child process. 2013-07-12 18:35:47 -07:00
Rom Walton 07017027d5 client: Clearing the devnums_pci_slot_sort vector after the first Nvidia OpenCL device is detected causes a SIGSEGV for any subsequent Nvidia OpenCL device detections. 2013-07-11 00:52:43 -04:00
Charlie Fenton 27d611c505 client: compile fix for non-Windows builds. 2013-07-10 00:05:27 -07:00
David Anderson 4774296d1b client: API test harness tweak 2013-07-09 17:44:03 -07:00
David Anderson 78c295c5de client: compile fix 2013-07-09 16:39:04 -07:00
David Anderson faae3aac3a client: tweaks for API test harness - parse cc_config.xml 2013-07-09 16:21:33 -07:00
David Anderson b52d98b640 client: change per-project runnable job limit to a flat 1000 2013-07-09 13:52:50 -07:00
David Anderson 782a11e22f client: don't fetch work if project has > max(2000, ncpus*100) runnable jobs 2013-07-09 11:17:56 -07:00
David Anderson a8485f3d3f Various: Fix some compile warnings; from Gianfranco 2013-07-09 10:34:32 -07:00
Charlie Fenton 0feedfe811 client: Fixes for launching a child process for detecting GPUs.
We must call parse_cmdline() to set the working directory before read_config_file().
2013-07-09 07:37:01 -07:00
Charlie Fenton 3c3318a867 client: Fixes for launching a child process for detecting GPUs.
Allow relative path to the client executable.
Bug fix: last item in arg list for run_program() should be NULL, not empty string.
2013-07-09 05:55:53 -07:00
David Anderson 4d47e2f170 client: don't request work from a project w/ > 1000 runnable jobs
Because of O(N^2) algorithms, the client becomes CPU-intensive
when there are lots of jobs.
This limit could be somewhat lower.
2013-07-07 13:13:57 -07:00
David Anderson 4cb34a123a client: don't apply CPU throttling to apps that use < .5 CPUs (like GPU, NCI) 2013-07-05 20:48:35 -07:00
David Anderson 93c970f87c client: compile fix for Win 2013-07-05 14:18:45 -07:00
David Anderson 519a0bcbef API: add test harness for the runtime system
- If you run the client with --run_test_app,
  runs "test_app" in the current directory and interacts with it
  (and does nothing else).
  It can suspend/resume it with arbitrary timing;
  this is controlled in run_test_app() (app_start.cpp).
- example app: add --critical_section option.
  This lets you test the runtime system for apps that do
  most of their work in a critical section (like GPU apps).
- Add some logging messages (conditioned by DEBUG_BOINC_API)
  to the runtime system.
- boinc_finish() waits for the timer thread to write final messages;
  make sure it doesn't do anything else
  (like suspend the worker thread) during this period
2013-07-04 16:00:10 -07:00
David Anderson 46733f2747 Merge branch 'master' of ssh://boinc.berkeley.edu/boinc-v2 2013-07-03 11:13:54 -07:00
Charlie Fenton 4b82bac42b client: fix compiler warning. 2013-07-03 02:34:43 -07:00
David Anderson 39af029598 client: mostly revert dddf586, which could lead to way overcommitted CPU 2013-07-03 00:56:01 -07:00
David Anderson 9978c40bcb client: fix bug where <no_project_notices> from account manager didn't work 2013-07-02 20:53:50 -07:00
Rom Walton 42720dab7c client: Add the various OS compatibility shreds to the assembly manifest so we can properly detect Windows 8.1 or better. 2013-07-01 19:01:04 -04:00
Charlie Fenton e8d09695a5 client: minor housekeeping cleanup when correlating CUDA GPU reporting order with apple's OpenCL. 2013-06-30 03:02:45 -07:00
Charlie Fenton 2d1a3f8589 client: use a child process for detecting GPUs on all platforms, not just on Macs. 2013-06-29 03:30:13 -07:00
Charlie Fenton a6e276b93e client: apparently CUDA does not always report GPUs in order of ascending PCI slot number, but Apple's OpenCL does. We must take this into account win correlating NVIDIA OpenCL GPUs with CUDA GPUs.
Since NVIDIA provides drivers for both OpenCL and CUDA on Windows and Linux, I am assuming (until shown otherwise) that they will report GPUs in the same order.
2013-06-28 02:37:57 -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 3614870952 client: don't request work from NCI project if "no new work" set 2013-06-26 20:36:44 -07:00
Charlie Fenton f03c4a0393 client: tweaks to code for detecting GPUs via a child process. 2013-06-26 05:42:15 -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 5d8ee12063 client: fix bug in commit c8e1b51: matching of ATI/AMD CAL and OpenCL GPU enumeration for (most) cases where CAL supports some older GPUs but OpenCL does not. 2013-06-25 20:49:50 -07:00
Charlie Fenton e0eb88058a client: bug fix for detecting GPUs via a child process. 2013-06-25 05:03:26 -07:00
Charlie Fenton 152a1969e5 client: fix compile break on Windows 2013-06-25 04:50:33 -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
Joachim Fritzsch e11319d5b4 client(Android): removed logcat output from client_msgs, not necessary since client log is shown in GUI. 2013-06-24 12:14:41 +02: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 727f220766 client (Android): remove apps from mem when suspending and on batteries
If we're on batteries and suspending for any reason other than CPU throttling,
remove apps from memory.
This reduces battery drain in some cases.
2013-06-22 09:35:16 -07:00
David Anderson 47562339e3 client: if idle instance, fetch work even if uploading 2013-06-21 19:57:25 -07:00
David Anderson dbbe474b77 client, Android: always use mmap instead of shmget for client/app comm 2013-06-21 15:41:48 -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 cfd3ba9d13 client: AMD GPU ID tweaks, from [P3D] Crashtest 2013-06-20 12:19:36 -07:00