Commit Graph

72 Commits

Author SHA1 Message Date
David Anderson a7376343cf - client: fix a bug that caused GPU apps to fail on startup
in the following situation.
    Suppose GPU job A is running,
    and GPU job B (which has never run before) preempts it.
    Then
    1) an ACTIVE_TASK and slot dir are allocated for B (slot dir is empty)
    2) A is told to quit; B isn't started until A exits
        (because they're GPU jobs)
    3) before A exits, B is suspended
    4) eventually B is started.
        Its scheduler state is SUSPENDED rather than UNINITIALIZED,
        so the scheduler thinks it slot dir has already been populated.
        But it hasn't, and when the app starts it fails immediately
        because no files are there.

    Fix: decide whether a slot dir needs to be populated by
    seeing whether it's empty,
    rather than looking at the scheduler state of the task.


svn path=/trunk/boinc/; revision=22206
2010-08-11 23:03:09 +00:00
Bernd Machenschalk 325fc46261 include sys/types.h for gid_t
svn path=/trunk/boinc/; revision=20800
2010-03-05 12:43:52 +00:00
David Anderson 92294d06e7 - client: fix bug in insufficient video RAM feature
- client: improve CPU sched debug msgs
	- client: fix "temporary exit" feature

svn path=/trunk/boinc/; revision=19900
2009-12-14 19:24:06 +00:00
David Anderson 3d129f9788 - lib: compile fix for C
svn path=/trunk/boinc/; revision=18212
2009-05-27 17:23:08 +00:00
David Anderson 3de3a033d1 svn path=/trunk/boinc/; revision=18211 2009-05-26 22:57:03 +00:00
Bernd Machenschalk 097a70d308 <cstdio> is a C++ haeder - moved it to __cplusplus section (lib/filesys.h)
svn path=/trunk/boinc/; revision=18044
2009-05-07 14:25:05 +00:00
David Anderson 6c4cc20aa1 - API: don't try to unlock lockfile if we failed to lock it
- API: more detailed message if failed to lock

svn path=/trunk/boinc/; revision=17645
2009-03-23 17:00:34 +00:00
Eric J. Korpela 8f3abcc835 - Added checks for net/*.h, arpa/*.h, netinet/*.h and code to figure out
which of those files to include
    - Modified MAC address check to work on some non-Linux unixes.
      (mac_address.cpp)
    - Added suggested change to "already attached to project" checking.
      (ProjectInfoPage.cpp)
    - changed includes of standard c header files to their c++ equivalents
      (i.e. replaced <stdio.h> with <cstdio>) for namespace protection.
    - replaced "using namespace std;" with more explicit "using std::function" in
      several files.
    - Fixed bug in checking whether the os is OS/2 and added conditional OS_OS2
      to the build environment. (boinc_platform.m4,configure.ac)
    - Changed build environment to not use -nostandardlibs unless we are using
      G++ and static linkage is specified. (configure.ac)
    - Added makefiles and package building files for solaris CSW package manager.
    - Fixed bug with attempting to find login name using logname. (configure.ac)
    - Added ifdef HAVE_* protection around some include files commonly found in
      sys.
    - Added support for unified binary for x86_64/i686-pc-solaris.
      (cs_platforms.cpp)
    - generate_host_cpid() now uses MAC address on non-linux unix.
      (hostinfo_network.cpp)
    - Macro BOINC_SET_COMPILE_FLAGS now doesn't check gcc only flags on non-gcc
      compilers. (boinc_set_compile_flags.m4)
    - Library compiles no longer depend upon the library extension or require
      the library to be prefixed with lib.
    - More fixes for fcgi builds.
    - Added declaration of "struct ether_addr" and ether_ntoa().  Have not yet
      implemented ether_ntoa() for machines that don't have it, or where it is
      buggy.  (unix_util.h)
    - Added FCGI::perror() which calls FCGI_perror(). (boinc_fcgi.{h,cpp})
    - Fixed library Makefiles so that all required headers get installed.


svn path=/trunk/boinc/; revision=17388
2009-02-26 00:23:23 +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 e584774f08 - API: change boinc_resolve_filename() so that it detects symbolic links
and treats them as a special case.
    Also, if the virtual file doesn't exist (as in the standalone case)
    just return zero; otherwise if the app is running standalone
    and checks the return value, it will error out.

    NOTE: apps that check the return value of boinc_resolve_filename()
    won't work on 6.12+ under Unix;
    recompiling with this change will fix the problem.

svn path=/trunk/boinc/; revision=15012
2008-04-03 21:59:05 +00:00
David Anderson 2080d9dcc0 - Library: switch from lstat() back to stat() most places;
this broke some projects' back-end code.
    Make a new function (boinc_file_or_symlink_exists())
    for use by the client when clearing out slot dirs

svn path=/trunk/boinc/; revision=14968
2008-03-27 20:30:19 +00:00
David Anderson d0241d359c - renamed clean_out_dir() to client_clean_out_dir(),
and put the original clean_out_dir() back in lib/filesys.C

svn path=/trunk/boinc/; revision=14549
2008-01-14 18:32:20 +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
Charlie Fenton 3158d103ab client/manager/API: Finish & fix bugs in code cleanup to disentangle sandbox code from lib/.
svn path=/trunk/boinc/; revision=13798
2007-10-09 00:34:38 +00:00
David Anderson d302a5e107 - client/manager/API: code cleanup to disentangle sandbox code from lib/.
- move client sandbox-specific code to a new file, sandbox.C
    - remove g_use_sandbox from util.C; move to MainDocument.cpp (manager)
        and sandbox.C (client)
    - don't declare check_security() in util.h; it's not in util.C
    - don't call remove_project_owned_file_or_dir() in
        boinc_delete_file_aux() or boinc_rmdir();
        rather, at the points in the client that delete
        dirs that are usually owned by boinc_projects,
        call remove_project_owned_file_or_dir() first,
        then clean_out_dir().
    - rename boinc_exec() to switcher_exec() and move it to sandbox.C

Note: this change was sparked by needing to remove a call to getgrnam()
from boinclib, to avoid requiring the same version of glibc
on both compile and target hosts

svn path=/trunk/boinc/; revision=13784
2007-10-05 16:47:07 +00:00
David Anderson c0c6cf779d - file upload handler:
in get_file_size() RPC, check if volume has < 1MB available space
    and if so return transient error.
    This prevents client from trying upload,
    which apparently sends entire file even if
    handler fails at the beginning
- API, Win: remove use of GetTickCount(); use dtime() instead
- use new BOINC logo in sample project home page

svn path=/trunk/boinc/; revision=13574
2007-09-12 08:25:22 +00:00
Charlie Fenton 82f1708512 Create boinc_exec() function for invoking switcher and setprojectgrp utilities instead of calling system()
svn path=/trunk/boinc/; revision=13311
2007-08-14 10:08:36 +00:00
David Anderson c08eddf7fe - GUI RPC: add new element d_boinc to DISK_USAGE;
tells how much disk space BOINC is using
        (not including projects).
    - added project.max_infeasible_count to client simulator

    client/
        gui_rpc_server_ops.C
        sim.C,h
        sim_util.C
    clientgui/
        ViewResources.cpp
    lib/
        filesys.C
        bui_rpc_client.h
        bui_rpc_client_ops.C

svn path=/trunk/boinc/; revision=12615
2007-05-08 23:12:40 +00:00
David Anderson 46695c2155 *** empty log message ***
svn path=/trunk/boinc/; revision=11683
2006-12-14 20:44:39 +00:00
David Anderson 913bc77221 *** empty log message ***
svn path=/trunk/boinc/; revision=10649
2006-07-13 16:48:44 +00:00
Charlie Fenton a4896c49c4 *** empty log message ***
svn path=/trunk/boinc/; revision=10590
2006-07-06 11:44:47 +00:00
David Anderson c5bb5fb0dc *** empty log message ***
svn path=/trunk/boinc/; revision=10320
2006-06-12 21:53:18 +00:00
David Anderson f5ce6cacff sandbox
svn path=/trunk/boinc/; revision=10310
2006-06-12 04:05:10 +00:00
David Anderson 4052efbaf7 don't clear project dir if app_info.xml found
svn path=/trunk/boinc/; revision=9598
2006-03-03 21:34:03 +00:00
David Anderson e4ee999059 bool -> int
svn path=/trunk/boinc/; revision=9266
2006-01-18 23:04:05 +00:00
David Anderson ba9ba5ff01 proxy download bug
svn path=/trunk/boinc/; revision=9263
2006-01-18 22:12:55 +00:00
Eric J. Korpela 6e30e66599 Added #ifdefs and explicit inclusion of "boinc_win.h" to files to help those
trying to compile under windows with alternate compilers.

svn path=/trunk/boinc/; revision=9077
2005-12-16 03:35:15 +00:00
David Anderson 38e9a6370b *** empty log message ***
svn path=/trunk/boinc/; revision=8574
2005-10-09 21:03:11 +00:00
David Anderson c1a29fe26a show app versions as single ints
svn path=/trunk/boinc/; revision=7734
2005-09-02 20:37:26 +00:00
Bruce Allen 042bfde576 when using locality scheduler, have transitioner or backend
lib advertise data file when new result is created.
code organization: create new lib function boinc_touch_file()
      from code that was in locality scheduler module.

svn path=/trunk/boinc/; revision=6456
2005-06-27 16:31:49 +00:00
David Anderson 1b0439c9a9 *** empty log message ***
svn path=/trunk/boinc/; revision=5840
2005-04-12 21:54:40 +00:00
David Anderson 971b58e501 *** empty log message ***
svn path=/trunk/boinc/; revision=5821
2005-04-11 05:47:41 +00:00
David Anderson 67f6558e04 *** empty log message ***
svn path=/trunk/boinc/; revision=5785
2005-04-06 19:41:31 +00:00
David Anderson 7df8f71988 *** empty log message ***
svn path=/trunk/boinc/; revision=5570
2005-03-05 23:12:31 +00:00
David Anderson 8d0ab453b3 *** empty log message ***
svn path=/trunk/boinc/; revision=5443
2005-02-16 23:17:43 +00:00
David Anderson 435f8edd47 *** empty log message ***
svn path=/trunk/boinc/; revision=5161
2005-01-20 23:22:22 +00:00
Bruce Allen a447159e31 Added is_dir() prototype -- generally useful function.
svn path=/trunk/boinc/; revision=5143
2005-01-19 17:53:27 +00:00
David Anderson 7a3f2d4939 *** empty log message ***
svn path=/trunk/boinc/; revision=4809
2004-12-10 19:17:32 +00:00
Rom Walton fbff81f9d2 Fix stupid CRLF problems with the latest header file update.
svn path=/trunk/boinc/; revision=4789
2004-12-08 07:38:22 +00:00
Rom Walton 1c2350d39f *** empty log message ***
svn path=/trunk/boinc/; revision=4783
2004-12-07 23:04:12 +00:00
Bruce Allen 2540d049ec [thanks to Bernd Machenschalk!]
Fixed 'time to checkpoint' problem under Win32 with pure C code.
It turns out that MS VC++ up to version 4.2 defines bool as INT.
But more recent VC++ defines bool as CHAR.  This broke
boinc_time_to_checkpoint() under Win32, when used within pure ANSI
C code, if you treated the return value as a bool. So this patch
defines bool as char if using C under recent MS compilers.

David, a better solution for API functions that should be
callable from C is to make them return 'int' not 'bool'.
Probably ditto for Fortran. Sigh.

svn path=/trunk/boinc/; revision=4767
2004-12-06 16:03:13 +00:00
Bruce Allen d11fe55856 Thanks, Reinhard!
-   C extern statements so that 'API' header files can be included in C
        programs as well as C++.
-   Make install now only installs the header files needed for building
        the external APIs.

svn path=/trunk/boinc/; revision=4755
2004-12-04 00:56:22 +00:00
Rom Walton 369fe9f965 *** empty log message ***
svn path=/trunk/boinc/; revision=4554
2004-11-14 08:29:32 +00:00
David Anderson 652d4c090b *** empty log message ***
svn path=/trunk/boinc/; revision=4342
2004-10-19 06:29:26 +00:00
David Anderson d67a52bd2c *** empty log message ***
svn path=/trunk/boinc/; revision=4317
2004-10-12 00:27:48 +00:00
Karl Chen afd778de8a *** empty log message ***
svn path=/trunk/boinc/; revision=3863
2004-07-13 13:54:09 +00:00
Eric J. Korpela 7cd5c7911a *** empty log message ***
svn path=/trunk/boinc/; revision=3725
2004-06-30 18:17:21 +00:00
David Anderson f0827f0137 *** empty log message ***
svn path=/trunk/boinc/; revision=3429
2004-05-24 19:00:26 +00:00
David Anderson 561afe08e4 *** empty log message ***
svn path=/trunk/boinc/; revision=3292
2004-04-23 00:05:16 +00:00