Commit Graph

1081 Commits

Author SHA1 Message Date
David Anderson e393203ff7 - API: improve log messages when detect dead client 2013-03-04 17:24:19 +01:00
David Anderson be553882bd - API: fix Unix bug when checking if client is alive based on PID.
Can't use waitpid() here; works only for children.
    Use kill(pid, 0) instead.
2013-03-04 17:24:19 +01:00
David Anderson 17a4ab8db9 David 11 Dec 2012
- Win process control (affects API and wrapper):
		Since Win doesn't have an API for process suspend/resume,
		we were suspending processes by
			1) enumerating all the threads in the system (typically several thousand)
			2) suspending those belonging to the given process
		The problem: for each thread, the code was calling a function
		in diagnostics_win.cpp to see if the thread was exempted from suspension.
		This check (which is unnecessary anyway if we're suspending another process)
		was surrounded by a semaphore acquire/release.
		The result: performance problems.
		It could take a minute to suspend the threads.
		Solution:
			1) do the check for exemption only if we're suspending threads
				in our own process (i.e. from the API)
			2) if we're suspending multiple processes, enumerate the threads
				only once, and see if each one belongs to any of the processes
			3) have the wrapper elevate itself to normal priority.
				Otherwise it can get preempted for long periods,
				sometimes in the middle of scanning the threads.
		Note: post-9x versions of Win have a process group API that includes suspend/resume.
		We'll switch to this soon.
2013-03-04 17:02:40 +01:00
David Anderson 5ad78a8b9d - client: replace ignore_nvidia_dev etc. with an array.
PRINCIPLE: AVOID PER-GPU-TYPE VARIABLES
- get rid of alloca() stuff in gutil.cpp; almost certainly not needed
- don't include malloc.h; it doesn't exist on BSD systems
2013-03-04 16:44:52 +01:00
Charlie Fenton 6314d1c7ea OpenCL: Change type argument of new boinc_get_opencl_ids() API from char* to int; it now accepts PROC_TYPE_NVIDIA_GPU, PROC_TYPE_AMD_GPU or PROC_TYPE_INTEL_GPU 2013-03-04 15:23:38 +01:00
David Anderson 865d50623e - code formatting 2013-03-04 15:23:38 +01:00
Charlie Fenton ed35d78490 OpenCL: Add a second API for boinc_get_opencl_ids() which is compatible with older clients (before BOINC 7.0.12) 2013-03-04 15:23:38 +01:00
Charlie Fenton e8abd328d1 OpenCL: Add a second API for boinc_get_opencl_ids() which is compatible with older clients (before BOINC 7.0.12) 2013-03-04 15:23:38 +01:00
Charlie Fenton b98fee99b3 OpenCL: Add a second API for boinc_get_opencl_ids() which is compatible with older clients (before BOINC 7.0.12) 2013-03-04 15:23:38 +01:00
Eric J Korpela 6f342d7c8a Another out-of-tree build fix 2013-03-01 16:19:16 +01:00
Rom Walton e3327452e3 - API: Use CloseWindow() to respond to the API Defined WM_SHUTDOWNGFX event just in case CloseWindow() does something more than just send the WM_CLOSE event to the window proc. 2013-03-01 16:03:32 +01:00
Rom Walton d4cf16944e - API: Remove the call to SendMessage(WM_QUIT, ...) after destroying the window.
There is no guarantee what order the event queue will be processed in and if
        WM_QUIT is processed before WM_DESTROY something might linger around.
2013-03-01 15:51:33 +01:00
David Anderson 76282d0a20 - Win compile fixes.
For now, include psapi.lib in various project properties.
		Try to figure out a different way.

svn path=/trunk/boinc/; revision=26149
2012-10-11 19:22:34 +00:00
David Anderson 7d40c46923 - client and API: improve the way an app checks for the death of the client
Old: heartbeat mechanism
    Problem: if the client is blocked for > 30 secs
        (e.g. because it takes a long time to write the state file,
        of because it's stopped in a debugger)
        then apps exit.
        This is bad is the app doesn't checkpoint and has been
        running for a long time.
    New: the client passes its PID to the app.
        The app periodically (10 sec) checks that the process still exists.
    Notes:
    - For backward compatibility (e.g. new API w/ old client,
        or vice versa) the client still sends heartbeats,
        and the API checks heartbeats if the client doesn't pass a PID.
    - The new mechanism works only if the client's PID isn't assigned
        to a new process within 10 secs of the client exiting.
        Windows 2000 reuses PIDs immediately, so check for Win2K
        and don't use this mechanism if so.

TODO: For Unix multithread apps,
    critical sections aren't currently being enforced.
    Need to fix this by masking signals.


svn path=/trunk/boinc/; revision=26147
2012-10-11 16:41:31 +00:00
David Anderson be540c8318 - API: if get a resume message from client while in a critical section,
clear the suspend_request flag.
    Otherwise we'll end up doing two suspends,
    and on Win the app will be suspended forever.


svn path=/trunk/boinc/; revision=26143
2012-09-30 20:30:58 +00:00
David Anderson aa289f0916 - A bunch of tweaks from Steffen Moller, e.g. using MAXPATHLEN
svn path=/trunk/boinc/; revision=26133
2012-09-21 03:52:24 +00:00
David Anderson 9ccb8fa38d - scheduler: add support for limited locality scheduling
- API: remove support for PPM files


svn path=/trunk/boinc/; revision=26062
2012-08-27 17:00:43 +00:00
David Anderson 25c2f6b49c - client: treat all 4xx HTTP errors as permanent
- code cleanup
- API: increase a buffer in timer_handler() from 256 to 512.


svn path=/trunk/boinc/; revision=26012
2012-08-13 18:23:20 +00:00
David Anderson cd1f79fbbc - API: add boinc_set_min_checkpoint_period(int).
Lets application specify a min checkpoint interval.
    The actual min checkpoint interval is the max of this
    and the user-specified pref for min disk interval.


svn path=/trunk/boinc/; revision=26005
2012-08-10 22:20:41 +00:00
Rom Walton fd631016cb - API: Remove ttfont.cpp from Makefile.am. Apps should include it
in there Makefile as needed.

svn path=/trunk/boinc/; revision=25989
2012-08-07 18:11:38 +00:00
Charlie Fenton 74452bfbd0 API: remove references to removed files bmplib.h and tgalib.h
svn path=/trunk/boinc/; revision=25977
2012-08-03 22:07:04 +00:00
David Anderson 2b2e7c5cf9 - API: remove support for BMP and TGA image files;
the code to parse these had no license info.
    Only JPEG is supported now.


svn path=/trunk/boinc/; revision=25976
2012-08-03 21:56:42 +00:00
Charlie Fenton 857324f5f9 Fix mixed line endings
svn path=/trunk/boinc/; revision=25963
2012-08-03 02:02:05 +00:00
Rom Walton 832386c4e0 - SS: Update project files to use FreeType and FTGL on Windows.
api/
        ttfont.cpp, .h
    clientscr/
        ss_app.cpp
    win_build/
        boinc_ss.vcproj
        libgraphics2.vcproj

svn path=/trunk/boinc/; revision=25962
2012-08-03 01:18:20 +00:00
Charlie Fenton 79a201ce33 API, SCR: Switch from *.txf fonts to TrueType fonts in graphics apps, ensuring that all related files have no licensing issues
svn path=/trunk/boinc/; revision=25945
2012-08-02 07:21:03 +00:00
Charlie Fenton a49e933d7e API, SCR: Switch from *.txf fonts to TrueType fonts in graphics apps, ensuring that all related files have no licensing issues
svn path=/trunk/boinc/; revision=25944
2012-08-02 07:19:11 +00:00
Charlie Fenton 0a3bf2c1f4 API, SCR: Switch from *.txf fonts to TrueType fonts in graphics apps, ensuring that all related files have no licensing issues
svn path=/trunk/boinc/; revision=25940
2012-08-02 06:59:49 +00:00
Charlie Fenton 6acb88ca81 API, SCR: Switch from *.txf fonts to TrueType fonts in graphics apps, ensuring that all related files have no licensing issues
svn path=/trunk/boinc/; revision=25939
2012-08-02 06:53:11 +00:00
David Anderson aedbf28981 - compile fix (from Oliver)
svn path=/trunk/boinc/; revision=25877
2012-07-17 16:42:06 +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 9f6fa7c1ad - API, Linux: increase timer thread stack size from 16K to 32K.
Apparently new use of MAXPATHLEN can cause overflow.
    Fixes #1191


svn path=/trunk/boinc/; revision=25781
2012-06-21 19:13:49 +00:00
Bernd Machenschalk 4c5014416d - API: fix for C-mode compilation of boinc_api.h
moved app_ipc.h inclusion outside __cplusplus                                                                                                                                                                                  
        since it contains important C mode prototypes                                                                                                                                                                                  
        (boinc_resolve_filename() etc.)

svn path=/trunk/boinc/; revision=25752
2012-06-10 13:44:01 +00:00
David Anderson 72ab18c0f8 typo
svn path=/trunk/boinc/; revision=25751
2012-06-10 05:47:09 +00:00
David Anderson 54078e92c4 - fixes of various (non-critical) fd and memory leaks.
Fixes #1188.  From Julien.
- fix bugs in setting scheduler output buffer size
- code formatting


svn path=/trunk/boinc/; revision=25750
2012-06-10 05:38:34 +00:00
David Anderson 13f51d42e5 - API: add boinc_network_usage();
lets an application report its network usage to BOINC,
    and hence take it into account with monthly limits etc.
- API: get rid of deprecated boinc_ops_per_cpu_sec(),
    boinc_ops_cumulative(), and
    boinc_set_credit_claim();
- admin web: update manage_apps.php;
    add the ability to set homogeneous app version


svn path=/trunk/boinc/; revision=25700
2012-05-20 23:02:12 +00:00
David Anderson ed414c26f0 - compile fix
svn path=/trunk/boinc/; revision=25664
2012-05-09 20:03:15 +00:00
David Anderson 24c0fcc9bf - another MAXPATHLEN
svn path=/trunk/boinc/; revision=25660
2012-05-09 18:16:15 +00:00
David Anderson 32a08d27d9 - C++ code: use MAXPATHLEN for char arrays that hold paths
svn path=/trunk/boinc/; revision=25659
2012-05-09 16:11:50 +00:00
Eric J. Korpela 6e65ae4df1 Added NVIDIA GPU platform detection to boinc_get_opencl_ids_aux()
svn path=/trunk/boinc/; revision=25592
2012-04-23 21:23:40 +00:00
David Anderson 8b9c871002 - API: fix C compile error
- initial checkin of remote job stuff for app from ICT


svn path=/trunk/boinc/; revision=25543
2012-04-10 06:11:19 +00:00
David Anderson ea4613214a - client: fix bug where if we sent app a <quit> message,
and it timed out and we killed it, we'd treat it as a job error.
    (This was a major bug).
- API: remove BOINC_STATUS::suspend_request.
    I meant to do this before.


svn path=/trunk/boinc/; revision=25498
2012-03-27 19:23:26 +00:00
David Anderson dfacf7d1c1 - API: remove BOINC_STATUS::suspend_request;
it's an implementation thing, not intended for export.
    Fix a related bug.


svn path=/trunk/boinc/; revision=25396
2012-03-09 19:46:49 +00:00
David Anderson fe2f589ae2 - API: fix various bugs related to process control and critical sections.
- client: code cleanup (no functional change)



svn path=/trunk/boinc/; revision=25393
2012-03-08 22:42:44 +00:00
Charlie Fenton 4a8d57ec95 API: fix compile error on Mac
svn path=/trunk/boinc/; revision=25318
2012-02-23 00:37:30 +00:00
David Anderson 7c3bc68a05 - API, client, and Manager: add an optional "reason" argument to
boinc_temporary_exit(),
        explaining why the app is exiting.
        Convey this to the client, and then to the Manager,
        and display it there and in the log.

    clientgui/
        MainDocument.cpp
    lib/
        gui_rpc_client_ops.cpp
        gui_rpc_client.h
    api/
        boinc_api.cpp,h
    client/
        client_types.cpp,h
        app.h
        app_control.cpp

svn path=/trunk/boinc/; revision=25315
2012-02-22 22:56:05 +00:00
Charlie Fenton 9cebe4bb35 API: Remove apparently unnecessary include of carbon.h
svn path=/trunk/boinc/; revision=25262
2012-02-15 01:33:51 +00:00
Charlie Fenton fd999fc652 OpenCL: workaround for GPUs reported by CUDA but not by Mac OpenCL
svn path=/trunk/boinc/; revision=25109
2012-01-20 13:30:47 +00:00
David Anderson 81b29b0cc9 - API: fix queueing problem for graphics-related messages
(web graphics URL and remote desktop addr)
- GUI RPC and API:
    change "remote_desktop_connection" to "remote_desktop_addr" everywhere.
    It's an address, not a connection.
- vboxwrapper: log message cleanup


svn path=/trunk/boinc/; revision=25044
2012-01-13 19:00:16 +00:00
Rom Walton ce4650ecbb - VBOX: Cleanup a few messages stating port numbers in the stderr spew.
- VBOX: Send configuration settings in one message instead of piece meal.
    
    api/
        boinc_api.cpp, .h
    samples/vboxwrapper
        vboxwrapper.cpp

svn path=/trunk/boinc/; revision=25041
2012-01-13 15:21:00 +00:00
Rom Walton 2c54c9735a - VBOX: Report the remote desktop connection information to the
core client.  Next commit will create an extra "VM Console"
        button in the manager when detected.  Volunteers will just have
        to click the button to see what is going on with the VM.

    api/
        boinc_api.cpp, .h
    samples/vboxwrapper
        vbox.cpp, .h
        vboxwrapper.cpp, .h

svn path=/trunk/boinc/; revision=25035
2012-01-12 20:57:23 +00:00