Commit Graph

92 Commits

Author SHA1 Message Date
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
Bernd Machenschalk 579ed0bd92 - API: fix #2 for C-mode compilation of boinc_api.h
app_ipc.h didn't cleanly compile in C-mode either,
had to fix this, too.

svn path=/trunk/boinc/; revision=25753
2012-06-11 12:51:30 +00:00
David Anderson b2a4cd4d91 svn path=/trunk/boinc/; revision=25691 2012-05-18 17:38:16 +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
David Anderson dd93780787 - API and client: add "ncpus" field to APP_INIT_DATA.
Tells multicore apps how many cores to use.
    The --nthreads command line arg to the app is now deprecated
    though we'll keep it around for the time being.


svn path=/trunk/boinc/; revision=24708
2011-12-01 18:44:19 +00:00
David Anderson 53af2ae778 - client/API: pass bool using_sandbox in APP_INIT_DATA;
says whether the client is using account-based sandboxing.
    Needed by vboxwrapper.
- web: don't show authenticator in Your Account page.
    The problem with authenticators is that if a bad guys gets yours,
    they can log in to your account even if you change your password.
    Eventually we should not use them at all
    (i.e. in cookies and sent to client).
- make_project: copy python stuff (e.g. bin/start) for web-only projects;
    generate appropriate project.readme file for web-only projects.


svn path=/trunk/boinc/; revision=24447
2011-10-21 06:58:35 +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 a858fe79d7 - client: don't pass --gpu_type to GPU apps;
this breaks many existing apps.
    Instead, pass the GPU type (and the device number)
    in app_init_data.xml


svn path=/trunk/boinc/; revision=24155
2011-09-11 03:28:22 +00:00
David Anderson c152968f53 - scheduler/client/API: pass user ID and team ID from scheduler to client,
and from client to app (host ID is already passed).
    E@h asked for this, not sure why.

svn path=/trunk/boinc/; revision=22902
2011-01-13 22:40:48 +00:00
David Anderson e0cea31781 - API: add result name to APP_INFO_DATA structure (for Volpex)
- scheduler: add max_download_urls_per_file config option
    (to limit the length of workunit.xml_doc,
    which is currently capped at 64KB).
    From Bernd.

svn path=/trunk/boinc/; revision=22082
2010-07-30 21:43:23 +00:00
David Anderson 3db80eb5c1 - API: fix crashing bug. Don't memset(0) APP_INIT_DATA;
it contains HOST_INFO, which now contains COPROCS,
    which has a vector.
    Define a clear() for APP_INIT_DATA.

svn path=/trunk/boinc/; revision=20191
2010-01-18 23:01:43 +00:00
David Anderson a3f80676b7 - API and client: add an API function boinc_temporary_exit(dt).
This exits the app with status zero and no finish file,
    so the client will restart it.
    It creates a file "temporary_exit" containing dt.
    The (new) client reads this file and will postpone
    scheduling the job again for dt seconds.
    Old clients will treat it as a premature exit,
    and potentially try to reschedule the job immediately.

    This function is intended for GPU applications that
    fail to allocate GPU RAM,
    presumably because a non-GPU application has it allocated.
    We don't want the job to fail,
    and we want to wait for a while before trying the allocation again.

svn path=/trunk/boinc/; revision=19879
2009-12-13 05:16:40 +00:00
David Anderson a24410c659 - code shuffling; not significant
svn path=/trunk/boinc/; revision=19183
2009-09-25 21:56:13 +00:00
David Anderson 1dba786d7b - API: add boinc_elapsed_time() to get elapsed time since start of episode;
add APP_INIT_DATA::starting_elapsed_time to get
    elapsed time from previous episodes

svn path=/trunk/boinc/; revision=18535
2009-07-01 17:35:56 +00:00
David Anderson 017b61283b - client, API: populate APP_INIT_DATA::hostid.
Remove userid and teamid fields, since the client doesn't know these.

svn path=/trunk/boinc/; revision=17216
2009-02-11 23:01:21 +00:00
David Anderson 2c068b76dc - lib: implement APP_INIT_DATA::copy() with assignments instead of
memcpy().  This protects against any future double-free bugs.

svn path=/trunk/boinc/; revision=17212
2009-02-11 22:36:33 +00:00
Eric J. Korpela a782d6bc83 Fixed potential memory leak and other minor problems with APP_INIT_DATA
structure.

svn path=/trunk/boinc/; revision=15886
2008-08-19 00:08:01 +00:00
David Anderson 4f66bb4c95 - added copyright and license info to .C, .cpp, .h files
- scheduler: fix bug in adaptive replication:
    if send an unreplicated job to untrusted host,
    set both wu.target_nresults and wu.min_quorum to app.target_nresults.

svn path=/trunk/boinc/; revision=15762
2008-08-06 18:36:30 +00:00
David Anderson 77c7ff3649 - client/API: add "computation_deadline" to APP_INIT_DATA.
This supports apps that can do variable amounts of computing;
    they can boinc_finish() if their deadline is near.
    Rom: please back-port.

svn path=/trunk/boinc/; revision=15395
2008-06-12 19:05:14 +00:00
David Anderson 3eaff2b345 - API/runtime system: remove "fraction done update period" stuff.
This was always 1 second, which is fine.


svn path=/trunk/boinc/; revision=15394
2008-06-12 18:35:19 +00:00
David Anderson 13400c9516 Changes for multithread app support:
- update_versions: use __ (not :) as separator for plan class
- client: add plan_class to APP_VERSION;
    an app version is now identified by platform/version/plan_class
- client CPU scheduler: don't assume apps use 1 CPU
- client: add avg_ncpus, max_cpus, flops, cmdline to RESULT
- scheduler: implement app planning scheme

Other changes:

- client: if symlink() fails, make a XML soft link instead
    (for Unix running off a FAT32 FS)
- client: don't accept nonpositive resource share from AMS
- daemons and DB: check for error returns from enumerations,
    and exit if so.  Thus, if the MySQL server goes down,
    all the daemons will soon exit.
    The cron script will restart them every 5 min,
    so when the DB server comes back up so will the project.
- web: show empty max CPU % as ---
- API: get rid of all_threads_cpu_time option (always the case now)


svn path=/trunk/boinc/; revision=14966
2008-03-27 18:25:29 +00:00
David Anderson aefe4ee18b svn path=/trunk/boinc/; revision=14914 2008-03-14 19:55:32 +00:00
David Anderson 2be6f8e53a - Client: add <run_apps_manually> config flag.
This is for debugging apps (currently works only in Unix).
    What it does: when running an app,
    the client does everything except actually fork/exec the app,
    i.e. it sets up the slot dir, creates shared mem segment etc.
    It then continues as if the app were actually running,
    and you can then manually run your app under a debugger
    in the slot directory.
    Note: the client won't notice the termination of your app.
- API, Unix: in situations where the timer thread wants to exit
    (e.g. it notices a missing heartbeat).
    don't directly call boinc_exit(),
    since this touches data structures that the worker thread
    may be using concurrently.
    Instead, set a flag telling the worker thread to call boinc_exit()
    (which it will do from its signal handler)
    This is an attempt to fix problems reported by Bernd;
    I haven't tested it.
- scheduler: add config flag for uploading usage data
- web: show account key and weak account key on user page
- added some code for multithread support (not finished)

api/
    boinc_api.C


svn path=/trunk/boinc/; revision=14542
2008-01-13 00:12:14 +00:00
David Anderson 74c2782624 - API: code cleanup
removed references to "graphics thread"
    removed HANDLE timer_quit_event
    removed enable_heartbeat/disable_heartbeat messages
        (not sure what the ideas was, but no longer exists)
    removed heartbeat_active flag (use options.check_heartbeat instead)
    read heartbeat-channel messages even if heartbeat disabled
        (since we use that channel for WSS messages too)
- client: remove ACTIVE_TASK::thread_handle (not used)

svn path=/trunk/boinc/; revision=14323
2007-11-29 19:48:04 +00:00
Frank Thomas fbcfeaf456 - Removed the svn:executable property from files that should not be executable,
like source code and text files. I skipped to check most files in html/
  and mac_*/ though.
- Added svn:executable to tools/watch_tcp because it has a shebang.


svn path=/trunk/boinc/; revision=13819
2007-10-10 09:25:40 +00:00
Frank Thomas 3bfc78b511 Updated the postal address of the Free Software Foundation in all license headers. See http://lists.ssl.berkeley.edu/pipermail/boinc_dev/2007-October/008939.html for reference.
svn path=/trunk/boinc/; revision=13804
2007-10-09 11:35:47 +00:00
David Anderson 984c5a635e *** empty log message ***
svn path=/trunk/boinc/; revision=11702
2006-12-19 22:52:58 +00:00
David Anderson 3d43d682bf *** empty log message ***
svn path=/trunk/boinc/; revision=11640
2006-12-09 00:10:53 +00:00
David Anderson ecc969a351 *** empty log message ***
svn path=/trunk/boinc/; revision=11558
2006-11-21 00:45:22 +00:00
David Anderson 7ce1144b73 *** empty log message ***
svn path=/trunk/boinc/; revision=11076
2006-09-01 21:06:30 +00:00
David Anderson 986e2e5047 *** empty log message ***
svn path=/trunk/boinc/; revision=10665
2006-07-18 01:46:55 +00:00
Rom Walton 00256701b8 *** empty log message ***
svn path=/trunk/boinc/; revision=10660
2006-07-17 22:29:02 +00:00
Rom Walton 626ac2cc5e *** empty log message ***
svn path=/trunk/boinc/; revision=10658
2006-07-17 22:11:59 +00:00
Rom Walton 2fd44af4b5 *** empty log message ***
svn path=/trunk/boinc/; revision=10657
2006-07-17 21:06:56 +00:00
Rom Walton 85e5b1e702 *** empty log message ***
svn path=/trunk/boinc/; revision=10656
2006-07-17 20:02:12 +00:00
David Anderson 15fa53c622 *** empty log message ***
svn path=/trunk/boinc/; revision=10514
2006-06-26 17:09:23 +00:00
David Anderson d1caa3b689 pass rsc_fpops_est to app
svn path=/trunk/boinc/; revision=10276
2006-06-09 02:33:00 +00:00
David Anderson 7f563832b0 *** empty log message ***
svn path=/trunk/boinc/; revision=10214
2006-05-28 14:45:29 +00:00
David Anderson 85be4593fa symstore support
svn path=/trunk/boinc/; revision=10174
2006-05-22 09:54:31 +00:00
David Anderson 270c583dcf app version in window title
svn path=/trunk/boinc/; revision=8663
2005-10-12 18:40:53 +00:00
David Anderson 99c9679b63 versions are major/minor/release
svn path=/trunk/boinc/; revision=7614
2005-08-31 00:18:36 +00:00
David Anderson 0d4fae3a35 boinc_not_using_cpu() API
svn path=/trunk/boinc/; revision=7410
2005-08-17 21:05:26 +00:00
Rom Walton 5ab65d0173 *** empty log message ***
svn path=/trunk/boinc/; revision=6360
2005-06-16 01:59:33 +00:00
David Anderson 279c95f246 *** empty log message ***
svn path=/trunk/boinc/; revision=6351
2005-06-15 19:27:09 +00:00
David Anderson 64b871f819 *** empty log message ***
svn path=/trunk/boinc/; revision=5962
2005-04-28 23:19:58 +00:00
David Anderson 8d0ab453b3 *** empty log message ***
svn path=/trunk/boinc/; revision=5443
2005-02-16 23:17:43 +00:00
David Anderson 0b495765c4 *** empty log message ***
svn path=/trunk/boinc/; revision=5427
2005-02-15 06:32:43 +00:00
David Anderson 435f8edd47 *** empty log message ***
svn path=/trunk/boinc/; revision=5161
2005-01-20 23:22:22 +00:00
Rom Walton 17594cc118 *** empty log message ***
svn path=/trunk/boinc/; revision=4581
2004-11-17 20:06:44 +00:00