add a mechanism so that apps can report sub-processes
that are not descendants (e.g., virtual machines)
These processes are then counted as part of the app,
not as "non-BOINC CPU time".
This fixes a bug where processing was incorrectly suspended
because CPU usage by VM apps exceeded the "CPU usage limit" pref.
Implementation:
- the PIDs of the processes in question
are passed from app to client via shared-memory,
in the app_status channel.
A new variant of boinc_report_app_status() supports this.
- the VBox wrapper queries the PID of the VM,
and reports it in this way.
- procinfo_app() includes a new argument: a list of PIDs
that are part of the app, although not ancestrally
related to the main process.
- in the client, ACTIVE_TASK now includes a vector "other_pids".
If this is nonempty, it's passed to procinfo_app().
svn path=/trunk/boinc/; revision=24123
could use the following for safe exit checking.
#ifdef _WIN32
//Jason: Safe exit check macro to play nicer with Cuda & MS-CRT
#ifdef USE_CUDA
#define SAFE_EXIT_CHECK do { \
if (worker_thread_exit_request) { \
fprintf(stderr,"-> Worker received exit request, syncing Cuda...");
cudaThreadSynchronize(); fprintf(stderr,"Done.\n"); \
fprintf(stderr," Worker Freeing Cuda data..."); cudaAcc_free();
fprintf(stderr,"Done.\n"); \
fprintf(stderr," Worker Acknowledging exit request, spinning->\n");
worker_thread_exit_ack = true; \
while (1) Sleep(10); \
} \
} while (0);
#else
#define SAFE_EXIT_CHECK do { \
if (worker_thread_exit_request) { \
fprintf(stderr," Worker Acknowledging exit request, spinning-> ");
worker_thread_exit_ack = true; \
while (1) Sleep(10); \
} \
} while (0);
#endif
#else // Linux or other probably have their own safe exit handling, defined as
blank, do nothing
#define SAFE_EXIT_CHECK
#endif
and install at the top of the cffft loop, and more locations if desired:
SAFE_EXIT_CHECK;
I'd like to implement these as BOINC API functions, but have not yet done so.
svn path=/trunk/boinc/; revision=23646
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
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
1) old-style apps with graphics in main program.
No one should be using these anymore.
2) writing init_data.xml in boinc_finish().
This was used by deprecated "compound app" scheme
- scheduler: if request reports results that were previously reported,
that's evidence that the previous reply was not received by client.
It may have contained results.
So set a "resend lost results" flag.
svn path=/trunk/boinc/; revision=22203
This is like boinc_init() but for multithread apps.
Unlike boinc_init(), it suspends/resumes all threads in the app,
not just one.
In Unix, this is done by forking,
and having the parent process handle suspend/resume messages
and suspend/resume the child using signals
On Win, there's some nasty code that enumerates all
threads in the whole system, and suspends/resumes
those in a particular process.
svn path=/trunk/boinc/; revision=20054
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
want to grant approximately fixed credits, but don't want to express them in
terms of FPOPS and IOPS. This API just calls boinc_ops_cumulative(N*8.64000e+11,0).
CPU intensive projects that use this API should still use the
tools/calculate_credit_multiplier script in order to adjust their credit
claims as processing times vary.
svn path=/trunk/boinc/; revision=17743
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
- web: check whether to show profile in separate function
from displaying profile; eliminate double headers
- scheduler: finish purge of redundant arguments
svn path=/trunk/boinc/; revision=16726
- 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
- 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
The design has been changed to constant #threads per app version
Various changes from Kevin Reed/WCG:
- server: add workunit.rsc_bandwidth_bound: if nonzero,
send this WU only to hosts with that much download bandwidth
- assimilators: if a handler returns DEFER_ASSIMILATION,
the WU remains in INIT state and will be handled when the
next instance completes.
Useful if you want the assimilator to see all instances.
- scheduler: when setting result.outcome = DETACHED,
set received_time to now
- scheduler: removed the reliable_time and reliable_min_avg_credit
options
- scheduler/web: add optional <allow_non_preferred_projects>
in project preferences.
If present, user will accept work from non-selected apps
if no work is available for selected apps
- scheduler: improved messages for projects with multiple apps
- scheduler: added config options
<granted_credit_weight> and <granted_credit_ramp_up>.
Used in calculating host.claimed_credit_per_cpu_sec,
but I'm not sure how.
- Added two new credit-granting formulas (validate_util.C):
stddev_credit() and two_credit()
- server DB: add rollback_transaction() and affected_rows() to DB_CONN
NOTE: DB update required
svn path=/trunk/boinc/; revision=14870
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
This was because SIGALRM always interrupts sleep()
and keeps boinc_sleep() stuck in its while loop.
Solution: change boinc_sleep() so that it works even if
rapid signals (e.g. interval timer) are happening
- API: remove deprecated graphics files from Makefile.
Old-style graphics are no longer supported.
- web: add empty show_user_donations_private() to donations.inc
svn path=/trunk/boinc/; revision=14513
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
NOTE: as of this checkin, applications built with the API
code in the trunk are assumed to do V6-type graphics.
If your app doesn't, then you must set
backwards_compatible_graphics to false
(and use boinc_init_graphics_options())
svn path=/trunk/boinc/; revision=13675
(deciding which app to use, implementing blanking interval, etc.)
This logic is all now in the screensaver itself.
- GUI RPC: removed get/set screensaver mode RPCs
- API: added a "backwards_compatible_graphics" flag to BOINC_OPTIONS.
V6 apps should set this.
If set, the runtime library checks for graphics messages
from the client, and launches/kills the graphics app (if any).
The app will then work graphically with pre-V6 clients.
- removed some old files
svn path=/trunk/boinc/; revision=13651
- API: Eric Myers reported that my 4 May checkin
(which increased worker thread stack size to the limit
returned by getrlimit())
broke his app on several Linux platforms.
So I added a worker_thread_stack_size element to BOINC_OPTIONS.
If you want an increased stack size, set this.
- web RPC: add <url> and <local_revision> elements to
the XML returned by get_project_config.php
html/user/
sample_get_project_config.php
api/
graphics_impl.C
svn path=/trunk/boinc/; revision=12664