Commit Graph

69 Commits

Author SHA1 Message Date
Eric J Korpela 05b6bfdfa1 Fix for signal handler type change. 2013-09-27 17:41:44 -07: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
David Anderson faae3aac3a client: tweaks for API test harness - parse cc_config.xml 2013-07-09 16:21:33 -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 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
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 e0eb88058a client: bug fix for detecting GPUs via a child process. 2013-06-25 05:03:26 -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 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 6c4b23e7d0 client: fix compile warnings
From Gianfranco Costamagna
2013-04-25 01:39:03 -07:00
David Anderson 3fe5da73bd - client: if a job's finish file has been there > 10 sec,
do atp->abort_task() rather than atp->kill_task();
    the latter will restart it infinitely on Unix
- client: prefix timestamp to stderr messages
2013-04-11 01:18:57 -07:00
Rom Walton 20208a61e9 - client: add timestamps to output that is written to the console/syslog/windows event log before BOINC has had a chance to initialize its own logging mechanism. 2013-04-10 18:51:35 -04:00
Rom Walton 27bca08d69 client: Make the detach console stuff backwards compatible with BOINCTasks. 2013-04-09 13:12:34 -04:00
Rom Walton 2b95c65555 client: Revert my changes for the --detach_console functionality back to the original implementation. 2013-03-07 11:31:38 +01:00
Rom Walton 3ffc712961 client: Another typo 2013-03-05 16:31:08 +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
David Anderson e711309357 - client: get proxy info before attempting project list fetch
or any other HTTP op
2013-03-05 13:38:06 +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
Rom Walton 5a6b02985d - client: streamline the console detach process under Windows.
svn path=/trunk/boinc/; revision=26057
2012-08-22 21:58:55 +00:00
David Anderson afb86208d3 - client: Android-related tweaks, from Joachim
svn path=/trunk/boinc/; revision=26007
2012-08-11 04:52:53 +00:00
David Anderson 22f93cf009 - Client: initial checkin for Android version. From Joachim Fritzsch.
svn path=/trunk/boinc/; revision=25982
2012-08-04 00:27:32 +00:00
David Anderson 19458ba4de - Compile fixes for Fedora core 17. From Christian B. Fixes #1194.
- Fix various #include issues.

CODING STYLE LAW (minimal inclusion principle):
    If foo.cpp requires <blah.h>,
    #include <blah.h> in foo.cpp, NOT foo.h


svn path=/trunk/boinc/; revision=25837
2012-07-02 18:51:02 +00:00
David Anderson f8c1665722 - client: keep track of the fraction of time that
1) a network connection is available and
    2) network communication is allowed and
    3) CPU computation is allowed
- If an app version is marked as needs_network,
    use the above fraction in estimating its rate of progress
- replace "core client" with "client" in comments.
- scheduler: message tweaks


svn path=/trunk/boinc/; revision=25803
2012-06-26 20:30:56 +00:00
David Anderson 2206e86bb4 - client: free mem on exit if debug mode
svn path=/trunk/boinc/; revision=24475
2011-10-24 23:39:21 +00:00
David Anderson 56492aaeac - client: fix bug in writing daily xfer history file
svn path=/trunk/boinc/; revision=24341
2011-10-06 17:39:13 +00:00
David Anderson 115ca46730 - GUI RPC: add get_daily_xfer_history() RPC for getting
the daily records of #bytes uploaded and downloaded


svn path=/trunk/boinc/; revision=24340
2011-10-06 17:23:16 +00:00
David Anderson e279b59913 - Updates Linux notifications to use current libnotify.
- Fix build problems on Mac OS X using autotools
- Consistently use #if HAVE_X for platform checks,
    rather than #ifdef HAVE_X or #if defined(HAVE_X)
- In Unix build, make lots of compiler checks standard
- Fix some compile warnings

From Matt Arsenault.

Note: there are now lots of compile warnings in clientgui/ on Unix,
    mostly in WxWidgets code


svn path=/trunk/boinc/; revision=24303
2011-09-27 19:45:27 +00:00
David Anderson 4763f5c1a0 - client: don't call CLIENT_STATE::free_mem() on shutdown.
This is for debugging only, and it can cause crashes.


svn path=/trunk/boinc/; revision=24281
2011-09-23 22:27:50 +00:00
David Anderson 382905661f svn path=/trunk/boinc/; revision=23478 2011-04-28 21:54:42 +00:00
David Anderson 0ba3cc2d7b - client: shuffle code to move CONFIG and LOG_FLAGS
into lib/cc_config.h,
    in preparation for adding GUI RPCS


svn path=/trunk/boinc/; revision=23432
2011-04-25 03:18:26 +00:00
David Anderson 17c2dd9ae6 - client: don't use the Snooze mechanism to handle
OS-requested suspension
    (especially with a 1-hour snooze period).
    Instead, handle them directly.


svn path=/trunk/boinc/; revision=23420
2011-04-23 19:02:17 +00:00
David Anderson 3b906a191c - client: generalize the GPU framework so that
- new GPU types can be added easily
		- users can specify GPUs in cc_config.xml,
			referred to by app_info.xml,
			and they will be scheduled by BOINC
			and passed --device N options
			Note: the parsing of cc_config.xml is not done yet.
		- RPC protocols (account manager and scheduler)
			can now specify GPU types in separate elements
			rather than embedding them in tag names
			e.g. <no_rsc>NVIDIA</no_rsc> rather than <no_cuda/>
	- client: in account manager replies, parse elements of the form
		<no_rsc>NAME</no_rsc>
		indicating the GPUs of type NAME should not be used.
		This allows account managers to control GPU types
		not hardwired into the client.
		Note: <no_cuda/> and <no_ati/> will continue to be supported.
	- scheduler RPC reply: add
		<no_rsc_apps>NAME</no_rsc_apps>
		(NAME = GPU name)
		to indicate that the project has no jobs for the indicated GPU type.
		<no_cuda_apps> etc. are still supported 
	- client/lib: remove set_debts() GUI RPC
	- client/scheduler RPC
		remove <cuda_backoff> etc. (superceded by no_app)
		Exception: <ip_result> elements in sched request
		still have <ncudas> and <natis>.
		Fix this later.

	Implementation notes:
	- client/lib: change "CUDA" to "NVIDIA" in type/variable names, and in XML
		Continue to recognize "CUDA" for compatibility
	- host_info.coprocs no longer used within the client;
		use a global var (COPROCS coprocs) instead.
		COPROCS now has an array of COPROCs;
		GPUs types are identified by the array index.
		Index zero means CPU.
	- a bunch of other resource-specific structs (like RSC_WORK_FETCH)
		are now stored in arrays, with same indices as COPROCS
		(i.e. index 0 is CPU)
	- COPROCS still has COPROC_NVIDIA and COPROC_ATI structs to hold vendor-specific info
	- APP_VERSION now has a struct GPU_USAGE to describe its GPU usage

svn path=/trunk/boinc/; revision=23253
2011-03-25 03:44:09 +00:00
David Anderson 6784283211 - user web: fix bugs in server status page
- fix some indentation


svn path=/trunk/boinc/; revision=22890
2011-01-06 23:09:13 +00:00
David Anderson 3de1406265 - scheduler: in app_plan_sse3(): check for CPU features in
p_model as well as p_features;
    pre-6.x clients report them in p_model.
- client: fix bug where "reread config file" didn't update
    the max log file sizes

svn path=/trunk/boinc/; revision=22838
2010-12-09 23:27:11 +00:00
David Anderson 33713781d1 - client: distinguish between messages to be displayed as HTML
(e.g. "Download new client here" link) and others
		(e.g. "Bad tag in cc_config.xml: <foo>").
	- code cleanup; move show_message from main.cpp to client_msgs.cpp

svn path=/trunk/boinc/; revision=22548
2010-10-18 20:09:51 +00:00
David Anderson ef044d6841 - client/manager: add the ability to associate URLs with
client-generated notices.
    Use this as appropriate: e.g., for errors about cc_config.xml syntax,
    direct user to the web page describing this syntax.

svn path=/trunk/boinc/; revision=22024
2010-07-21 19:04:46 +00:00
David Anderson 0c948a656a - client: init gstate.now early so that initial msgs have timestamps
- lib: fix the above

svn path=/trunk/boinc/; revision=22012
2010-07-20 04:19:22 +00:00
Rom Walton 2179576c93 - WINSETUP: Update validate install procedure to account for the
removal of boinc.dll and addition of boinclog.exe.
    - MGR: Move auto-proxy detection code into its own thread.
    
    client/
        main.cpp
        sysmon_win.cpp
    win_build/installerv2/
        BOINC.ism
        BOINCx64.ism
    win_build/installerv2/redist/Windows/src/boinccas/
        CAValidateInstall.cpp
    win_build/installerv2/redist/Windows/Win32/
        boinccas.dll
        boinccas95.dll
    win_build/installerv2/redist/Windows/x64/
        boinccas.dll
        boinccas95.dll

svn path=/trunk/boinc/; revision=22009
2010-07-19 22:09:45 +00:00
David Anderson 6511e1f8e8 - client: let fake CUDA specify driver version
- client: restore call to diagnostics_finish() on exit.
	(should print mem info, but doesn't)
- manager: notices display tweak 

svn path=/trunk/boinc/; revision=21759
2010-06-16 21:57:28 +00:00
David Anderson 5a28b5672e - client: user-visible text (message body, notice title and description)
are now translatable,
    using the convention that any substring enclosed in _(" ... ")
    should be passed throughh wxGetTranslation() or the equivalent.
- client: when writing messages to stdout, strip out _(...)
- manager: translate strings from client
- scheduler: message tweaks

svn path=/trunk/boinc/; revision=21706
2010-06-08 18:56:53 +00:00
Rom Walton c9e02b7370 - client: leave template for causing the debugger to break on a
specific memory allocation.
        
    client/
        main.cpp

svn path=/trunk/boinc/; revision=21465
2010-05-11 20:54:55 +00:00
David Anderson b8df52bc8a - client: temporarily enable logic that deallocates memory on exit,
so that we can look for memory leaks.
- client: enable bandwidth quota limit only if both
    #MB and #days are nonzero.
- scheduler: when resending work, don't send more than
    client is requesting
- scheduler: restore Cobblestone factor to 100

svn path=/trunk/boinc/; revision=21460
2010-05-11 19:50:14 +00:00
Rom Walton 29efaefc5d - client: re-enable memory leak detection on Windows.
client/
        main.cpp

svn path=/trunk/boinc/; revision=21458
2010-05-11 19:18:55 +00:00
Rom Walton 9cb3e6ffc7 - client & lib: bring header inclusion up-to-date for the CC to begin
hunting down a memory leak.
        
    client/
        <Various Files>
    lib/
        <Various Files>

svn path=/trunk/boinc/; revision=21457
2010-05-11 19:10:29 +00:00
David Anderson 9f9d98fff1 - client: write daily net history on shutdown
- client: remove extraneous calls to calShutdown()
    in ATIs available-RAM code.


svn path=/trunk/boinc/; revision=21304
2010-04-27 17:54:29 +00:00
David Anderson 7a4edbafab - client: "allow_remote_gui_rpc" is available via cc_config.xml
as well as command-line.
- client: show allow_remote_gui_rpc option,
    and contents of remote_host.cfg, in message log on startup
- client: code cleanup: move some options from
    CLIENT_STATE to OPTIONS

svn path=/trunk/boinc/; revision=21142
2010-04-07 21:11:15 +00:00
David Anderson e5ac873205 - boinccmd: add --set_gpu_mode command
- fix some compile warnings


svn path=/trunk/boinc/; revision=21002
2010-03-25 23:48:58 +00:00
Rom Walton e14e1cad34 - Remove BOINC_RCSID tags from source files, we are doing branching and tagging
properly.
        
    <Various Files>

svn path=/trunk/boinc/; revision=20873
2010-03-12 16:51:57 +00:00
David Anderson 13fe6a468c - client: code cleanup: most message code into a class
svn path=/trunk/boinc/; revision=20029
2009-12-23 19:52:34 +00:00