Commit Graph

152 Commits

Author SHA1 Message Date
Rom Walton 673271c618 WRAPPER: Conditionally include pthread based on what platform we are compiling for. 2014-04-18 16:02:17 -04:00
Rom Walton 04eb8512fd WRAPPER: Use the correct C++ compiler 2014-04-18 15:41:41 -04:00
Rom Walton 3bde3f7d60 ANDROID: Introduce build scripts for building the wrapper on Android. 2014-04-18 15:19:31 -04:00
Rom Walton 433edcf847 wrapper: Simplify error reporting paths. 2013-09-18 18:21:40 -04:00
Rom Walton ecba0e9d73 wrapper: CreateFile returns INVALID_HANDLE_VALUE when something fails instead of NULL. 2013-09-18 16:59:17 -04:00
Rom Walton cbf76dd0b0 wrapper: fix build break on Windows 2013-09-18 16:19:38 -04:00
Rom Walton ff7e173690 wrapper: Use _get_osfhandle() to determine the OS handle for stdout/stderr. Redirect child processes stdout to the wrapper's stderr pipe. 2013-09-18 15:57:38 -04:00
Rom Walton 7fb2c00289 WRAPPER: Simplify the task run logic for Windows. Display the actual command line used by CreateProcess. 2013-09-18 13:09:56 -04:00
Rom Walton 93001d48db wrapper: Adjust how cmd.exe is launched when the task launches a batch file. Support the cmd file extension as well. 2013-09-18 12:00:46 -04:00
David Anderson e674006bcd fix wrapper build script for Android 2013-08-23 09:55:46 -07:00
David Anderson e0a8ac2427 Wrapper (Android): don't get the CPU time of tasks. The function sometimes crashes (under investigation), and the GUI doesn't show CPU time anyway. 2013-08-10 22:20:17 -07:00
David Anderson 8e2524f55f Unix build: Makefile changes for "make install", from Steffen Moeller
"make install" followed by make_project should now work
2013-05-20 15:19:13 -07:00
David Anderson bb2ee893d3 wrapper: add task time limit feature 2013-05-08 22:38:44 -07:00
David Anderson 767054fa87 wrapper: resolve names of zip and unzip files 2013-05-06 01:48:06 -07:00
David Anderson f1dd8cec18 - comment tweaks 2013-05-03 15:14:00 -07:00
David Anderson 4ad5cf05f6 Improve Makefiles for sample apps. From Gianfranco. 2013-04-26 13:46:28 -07:00
David Anderson 2d8e1c39b6 Improve sample application Makefiles
Use CXXFLAGS, CPPFLAGS, LDFLAGS if they're defined in the environment.
From Guo Yixuan.
2013-04-25 01:26:24 -07:00
David Anderson 47d3c9ffff - wrapper: eliminate spurious error message in zip parsing;
make it work if stderr.txt is one of the files being zipped.
- user web: show GPU driver version as 341.07
2013-03-05 17:11:23 +01:00
Rom Walton 0efd0b2738 wrapper: remove unneeded debug code from the wrapper 2013-03-05 14:17:54 +01:00
David Anderson 98fbd13a9e - Wrapper: CPU time account was broken on Windows 2013-03-05 14:17:54 +01:00
Rom Walton 32f8e130a9 android: Add environment variables for CC and CFLAGS. The regex stuff in the wrapper was using the Linux(x86) compiler instead of the Android (ARM) cross-compiler. 2013-03-05 14:17:54 +01:00
David Anderson 3321837b01 - wrapper: fix CPU time accounting on Unix 2013-03-05 14:05:04 +01:00
David Anderson 6108deb7b0 - wrapper: use waitpid() instead of wait4(), which is missing on Android. 2013-03-05 14:05:04 +01:00
David Anderson 0d07e872bd android: Add execute permissions to shell scripts 2013-03-05 13:53:58 +01:00
Rom Walton 4fd40b9c9c android: order dependent 2013-03-05 13:39:42 +01:00
Rom Walton d34bee8759 android: pthread is bundled within the Android libc implementation. We do not need to specify it as an external lib. 2013-03-05 13:39:42 +01:00
Rom Walton bd087f006f android: another time 2013-03-05 13:39:42 +01:00
Rom Walton d8a78b5e4a android: ugh, one more time 2013-03-05 13:39:42 +01:00
Rom Walton 6f55b792a9 android: round three of makefile fixes for wrapper on android 2013-03-05 13:39:42 +01:00
Rom Walton 4d9d3fd4a0 android: lets try this a different way 2013-03-05 13:39:42 +01:00
Rom Walton 6d2ef43306 android: modify makefile to get around build errors when building for android 2013-03-05 13:39:42 +01:00
Rom Walton 4b3cd5e293 android: bug fix for build scripts 2013-03-05 13:39:42 +01:00
Rom Walton e95265a1aa android: commit shell scripts to build uppercase and wrapper for use on Android. 2013-03-05 13:39:42 +01:00
Rom Walton 41af56d679 Wrapper: Add trace statements to debug problems CAS@Home is having with the wrapper. 2013-03-04 17:39:24 +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
Charlie Fenton b8293bc457 wrapper: Fix build script and Makefile on Mac 2013-03-04 17:19:38 +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 ce47010dbb - client: if <dont_check_file_sizes> is set, don't check file existence at startup
- wrapper: open files in shared mode so you can look at them while wrapper is running
2013-03-04 15:23:37 +01:00
David Anderson 374ee55113 - wrapper: compile fixes for Win 2013-03-04 15:04:51 +01:00
David Anderson d8b7e4347f - wrapper: add feature for unzipping input files and zipping output files 2013-03-04 15:04:51 +01:00
David Anderson bb0ced01ba - wrapper: add source files for a regular expression library
(too be used soon)
- boinc_zip: add makefile for test program
2013-03-04 15:04:51 +01:00
Eric J Korpela 2151abc147 - wrapper: fix for likely compile problems on non-linux or older gcc caused by
commit 9223fd2.  The macros necessary to fix it already existed in config.h
2013-03-01 16:08:52 +01:00
David Anderson b3e244c9c3 - wrapper: compile fix for new gcc 2013-03-01 16:08:52 +01:00
Charlie Fenton 17db492473 Mac: update sample code to allow building with Xcode 4.4 GM seed under OS 10.8 GM seed
svn path=/trunk/boinc/; revision=25867
2012-07-12 12:45:42 +00:00
Charlie Fenton 72007821b7 Mac: update sample code to allow building with Xcode 4.3 and to eliminate compiler warnings
svn path=/trunk/boinc/; revision=25862
2012-07-11 10:32:09 +00:00
David Anderson fc2af21221 - client: add missing end tag for <pci_info>. Doh!
- validator: add some sanity-checking for credit,
    to prevent granting 1e38 credit.
    max_granted_credit now defaults to the equivalent of 1 TeraFLOP-year.
    Instances that exceed this are not counted in the credit
    calculation, and a critical-mode log message is written
- wrapper: remove wall_cpu_time; not used anymore


svn path=/trunk/boinc/; revision=25825
2012-06-29 22:24:07 +00:00
Wenjing Wu ccad62b912 - wrapper: when reading fraction-done file, read the last line
(or at least the last double).
    This accommodates a particular application (LAMMPS)
    that can only append to this file.
- CAS@home stuff


svn path=/trunk/boinc/; revision=25557
2012-04-13 09:44:01 +00:00
David Anderson 4a50b2b2e2 - wrapper: compute final CPU time correctly for multi-process apps
- storage stuff


svn path=/trunk/boinc/; revision=25356
2012-02-29 20:58:45 +00:00
David Anderson 4111916c4f - wrapper: measure CPU time of app's process tree,
not just the top-level process
- wrapper: handle fraction-done files correctly


svn path=/trunk/boinc/; revision=24664
2011-11-29 15:06:08 +00:00
David Anderson a95c8a3858 - wrapper: typo fix
svn path=/trunk/boinc/; revision=24520
2011-11-03 19:45:34 +00:00
David Anderson c9302ae532 - wrapper: handle Windows .bat files as main programs
svn path=/trunk/boinc/; revision=24519
2011-11-03 19:36:28 +00:00
Charlie Fenton 3ae3bb1099 wrapper: Update Mac build script for XCode 4.1 and OS 10.7 (supports Intel Macs only)
svn path=/trunk/boinc/; revision=24231
2011-09-16 23:51:43 +00:00
David Anderson e9c5bfe7a8 - wrapper: don't delete task-level checkpoint file when starting task;
that defeats the purpose.  From Uwe Becker.


svn path=/trunk/boinc/; revision=24183
2011-09-13 21:21:40 +00:00
David Anderson 3fe4507e37 - client: make exit_before_start a cc_config.xml option
(as well as a cmdline option)
- wrapper: print error messages if stdin/out/err files don't exist


svn path=/trunk/boinc/; revision=24143
2011-09-07 22:45:00 +00:00
David Anderson 4778836022 - Win compile fixes
svn path=/trunk/boinc/; revision=24122
2011-09-02 18:47:15 +00:00
David Anderson 696d380254 - wrapper compile fixes
svn path=/trunk/boinc/; revision=24110
2011-09-01 22:48:29 +00:00
David Anderson 94e8c48220 - client: change --detach_phase_two (??) to --detach_console
- eliminate compiler warnings (e.g. shadowed vars)
    in various places, mostly in client


svn path=/trunk/boinc/; revision=23710
2011-06-12 20:58:43 +00:00
David Anderson 2385c00b67 - wrapper: tell the client when we checkpoint
(else checkpoint_elapsed_time etc. don't get set)
- make_project: enable update_stats by default
- update_stats: add --min_age option


svn path=/trunk/boinc/; revision=23509
2011-05-06 12:33:12 +00:00
David Anderson bddd0d45db Win compile fixes
svn path=/trunk/boinc/; revision=23370
2011-04-14 22:48:04 +00:00
David Anderson 7cb3400459 - API: add support for multi-process apps,
i.e. those that create subprocesses.
    Previously, the client's job control options (suspend/resume/quit)
    would not work for subprocesses.
    Multiprocess apps must initialize with something like:
        BOINC_OPTIONS options;
        boinc_options_defaults(options);
        options.multi_process = true;
        boinc_init_options(&options);
    Note: an application can be both multi-thread and multi-process.
    In this case set options.multi_thread as well.
- wrapper: add support for multi-process apps.
    Previously, suspend/resume operations did not work for subprocesses.
    If a task is multi-process, you must include
        <multi_process>1</multi_process>
    in its descriptor.


svn path=/trunk/boinc/; revision=23369
2011-04-14 22:25:38 +00:00
David Anderson 64187672cc - wrapper: macro-substitute $NTHREADS with the --nthreads option value
in job.xml


svn path=/trunk/boinc/; revision=23244
2011-03-21 09:30:29 +00:00
David Anderson eaff1b16cc - wrapper: improved subprocess cleanup, Unix
svn path=/trunk/boinc/; revision=23240
2011-03-17 05:56:54 +00:00
David Anderson c168971770 - API: get rid of BOINC_OPTIONS::backwards_compatible_graphics.
Not necessary.
- wrapper: add optional <append_cmdline_args/> element to
    task descriptor.
    If set, pass the wrapper's cmdline args to that task.
    NOTE: previously they were always passed.
    If you want this behavior, you now must set this.


svn path=/trunk/boinc/; revision=23232
2011-03-14 17:28:52 +00:00
David Anderson 90a1348a10 - wrapper: fixes from Carl
svn path=/trunk/boinc/; revision=23105
2011-02-24 23:21:55 +00:00
David Anderson d63d67c968 - wrapper: daemon fix
svn path=/trunk/boinc/; revision=23102
2011-02-24 21:55:17 +00:00
David Anderson d331ca86ed - wrapper: add "daemon" feature.
A task descriptor may contain <daemon>.
    Daemons are started before regular tasks,
    run concurrently with them, and are killed on exit.


svn path=/trunk/boinc/; revision=23101
2011-02-24 21:39:07 +00:00
David Anderson 0856304497 win compile fixes
svn path=/trunk/boinc/; revision=23089
2011-02-23 00:41:34 +00:00
David Anderson b3f00f94f7 - wrapper: compile fix
svn path=/trunk/boinc/; revision=23088
2011-02-23 00:31:15 +00:00
David Anderson a0fd3445fc - wrapper: improve and bullet-proof the way we kill apps.
Win: enumerate all descendants, and kill them all TerminateProcess().
    Unix:
        send the main process a SIGTERM.
        Check once a sec for existence of descendants.
        if none, done
        If any still exist after 10 sec, kill all descendants
- wrapper fix bug in Win env var stuff
- scheduler: check for VBox version 3.2+ in app_plan()
    

svn path=/trunk/boinc/; revision=23085
2011-02-22 23:11:34 +00:00
David Anderson 01a1ec33c3 - client: add cpu_sched debug messages for anti-domino-effect
and anti-thrasing mechanisms
- wrapper: to kill an app, use SIGTERM instead of SIGKILL
    

svn path=/trunk/boinc/; revision=23082
2011-02-22 21:05:21 +00:00
David Anderson faddad7bbb - wrapper: Windows fixes
svn path=/trunk/boinc/; revision=23078
2011-02-21 06:40:22 +00:00
David Anderson cf9b7ef4a2 - client: make "wait 30 sec after exclusive app exits" apply to network too
- client: fix bug in "wait 30 sec after exclusive app exits" logic
	- client: fix compile warning and possible bug in is_remote_desktop()
	- win: remove wrappture_example from solution
		(until Hubzereo guys get their win lib working)

svn path=/trunk/boinc/; revision=23077
2011-02-21 00:09:18 +00:00
David Anderson 13c2cf2fa8 - wrapper: add optional <setenv> element in <task> elements;
specifies an environment variable assignment;
    macro-substitute project dir for $PROJECT_DIR.
    From Carl Christensen

svn path=/trunk/boinc/; revision=23076
2011-02-20 23:46:28 +00:00
David Anderson 7ae1e2357d - wrapper: add optional <exec_dir> element in <task> elements;
specifies a directory to run app in.
    macro-substitute project dir for $PROJECT_DIR.
    From Carl Christensen, more or less


svn path=/trunk/boinc/; revision=23075
2011-02-20 04:01:04 +00:00
David Anderson 5bbafef4b0 - fix some bad file permissions
- delist defunct stats site


svn path=/trunk/boinc/; revision=22859
2011-01-02 03:07:14 +00:00
David Anderson bedfeafbee - add support for making wrappers for Rappture:
https://nanohub.org/infrastructure/rappture/


svn path=/trunk/boinc/; revision=22775
2010-11-29 22:27:26 +00:00
Charlie Fenton 0dcd647250 Mac: Update build scripts, build examples and documentation
svn path=/trunk/boinc/; revision=22489
2010-10-11 11:59:05 +00:00
Charlie Fenton 9e41e0b521 Mac: Update build scripts and documentation
svn path=/trunk/boinc/; revision=22480
2010-10-08 10:15:40 +00:00
David Anderson 1637c19e08 - API and sample apps: pass buf length arg to boinc_msg_prefix()
and use snprintf() to avoid overrun.
    Can't see why this could ever happen.
    Attempt to fix crash in E@h apps.

svn path=/trunk/boinc/; revision=22363
2010-09-15 23:03:30 +00:00
David Anderson c2444c5206 - apps: compile fix
svn path=/trunk/boinc/; revision=21785
2010-06-21 23:29:37 +00:00
David Anderson 7078c411a2 - wrapper: print more detailed msgs if process creation fails
svn path=/trunk/boinc/; revision=20631
2010-02-18 19:37:25 +00:00
Charlie Fenton 8f0f0ef0dc Mac wrapper: add build script and make file to build wrapper on Mac
svn path=/trunk/boinc/; revision=20589
2010-02-16 12:57:01 +00:00
Charlie Fenton dc0cd9f956 Mac wrapper: add build script and make file to buuild wrapper on Mac
svn path=/trunk/boinc/; revision=20583
2010-02-16 02:42:12 +00:00
Charlie Fenton 47528cb253 Mac wrapper: add build script and make file to buuild wrapper on Mac
svn path=/trunk/boinc/; revision=20580
2010-02-16 00:56:59 +00:00
David Anderson 9e1644e588 svn path=/trunk/boinc/; revision=20055 2010-01-01 05:03:13 +00:00
David Anderson 04ea096e62 - wrapper: fix fraction-done bug
svn path=/trunk/boinc/; revision=19880
2009-12-13 18:06:04 +00:00
David Anderson 12dc1852a7 - wrapper: fix fraction done feature
svn path=/trunk/boinc/; revision=19231
2009-10-02 18:48:50 +00:00
David Anderson 1ecfcd9575 - wrapper: add a mechanism so that sub-tasks can report fraction done.
Write your apps so that they periodically write their
    fraction done (0..1) to a file.
    Then include <fraction_done_filename> in the job description.

svn path=/trunk/boinc/; revision=19159
2009-09-24 20:51:32 +00:00
David Anderson 9925988c77 - wrapper: compile fix
svn path=/trunk/boinc/; revision=18882
2009-08-20 05:11:42 +00:00
David Anderson 9a94db0bbb - wrapper: fix bug in passing wrapper's args to subjobs
svn path=/trunk/boinc/; revision=18425
2009-06-15 23:27:37 +00:00
David Anderson 68e2530b3a - API: add function boinc_msg_prefix() that returns
time of day and process ID.
    This should prefix all messages written to stderr
    by applications or by the runtime system.

svn path=/trunk/boinc/; revision=17687
2009-03-27 23:42:47 +00:00
David Anderson c1dce6425e - small code shuffle
- fix manager build on unix

svn path=/trunk/boinc/; revision=17650
2009-03-24 17:18:09 +00:00
David Anderson 86cfca0b44 - manager: clamp percentages at [0,100] in prefs dialog
fixes #794
- wrapper: if app checkpoints, write CPU time to checkpoint file
    fixes #792 (I hope)

svn path=/trunk/boinc/; revision=16645
2008-12-08 04:47:57 +00:00
David Anderson 1a409685e5 - make "make distclean" work in all directories
svn path=/trunk/boinc/; revision=16245
2008-10-21 21:13:52 +00:00
David Anderson 44f4c9d840 - add distclean target for samples/ makefiles
svn path=/trunk/boinc/; revision=16143
2008-10-06 20:24:58 +00:00
David Anderson 5a1e97c349 - Unix build system: build samples/example_app/,
and change the samples/ makefiles so that they automatically
    create the symbolic link to libstdc++.a
    Fixes #725

svn path=/trunk/boinc/; revision=16129
2008-10-04 18:51:38 +00:00
David Anderson 7019bb3192 - Makefile fix
- client: remove extraneous message
- wrapper: open stderr/stdout in append mode, not write

svn path=/trunk/boinc/; revision=16118
2008-10-03 05:13:25 +00:00
David Anderson 98cfb8d3b0 - rename .C files to .cpp so that Doxygen will work
svn path=/trunk/boinc/; revision=16069
2008-09-26 18:20:24 +00:00
Rom Walton b6b14154fe Rom 13 Aug 2008
- SAMPLES: Add all the samples to the BOINC solution and delete the
        old solution.
    - LIB: Clean up a bunch of warnings.
    
    api/
        texfont.C
    lib/
        crypt.C
    lib/
        filesys.C
    samples/wrapper/
        wrapper.C
    win_build/
        boinc.sln
        glut.vcproj
        image_libs.vcproj
        jpeglib.vcproj
        libboinc_staticcrt.vcproj
        libboincapi.vcproj
        libboincapi_staticcrt.vcproj
        libgraphics2.vcproj
        multi_thread.vcproj
        sleeper.vcproj
        uc2.vcproj
        uc2_graphics.vcproj
        upper_case.vcproj
        worker.vcproj
        wrapper.vcproj

svn path=/trunk/boinc/; revision=15819
2008-08-13 17:26:26 +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