The RPC handler wasn't looking in per-job templates for rsc_fpops_est.
This commit alters the API for job submission. Please see
https://boinc.berkeley.edu/trac/wiki/RemoteJobs for the current API
details
After freopen() stream is fully buffered. In this mode client's log
messages are written to stdoutdae.txt BUFSIZ (typically 512) bytes
at a time.
Set stdout to line buffered mode after freopen() so that messages
are written one line at a time.
Set stderr's buffering mode after making sure freopen() succeeded.
Fixes#2141.
There were a few places, like copy_element_contents() type functions,
that used fgets() and looked for end tag on that line.
The problem is this wipes out next tag if it's on same line.
Change the submit_batch RPC, and the various bindings of it (PHP, Python, C++)
to support an app_version_num arg,
specifying which app version number should be used to process the jobs in the batch.
- use std::string instead of malloced array for ACCT_MGR_OP::global_prefs_xml
- use copy_element_contents() instead of dup_element_contents()
to get global prefs.
The latter uses fgets instead of fgetc,
so it requires that close tag be on a line by itself.
TODO: don't use fgets anywhere in XML parsing.
- fix a bug in copy_element_contents() where it consumes an extra character
The function is documented to check if anything exists at the given path. The client depends on this behavior. If the function checks only for regular files the client will fail to clean up slot directories before using them for another task.
Fix the function to match the documentation.
- This adds overhead to the get_state() call,
but this happens only once per minute with the Manager.
- rename things so that "keyword_ids" refers to lists of keyword IDs
and "keywords" refers to full KEYWORD objects
- have boinccmd include keywords in workunit properties
- add DB field for storing job keywords: workunit.keywords
add this to various DB parse/write functions
- add --keywords option to create_work for specifying job keywords
- add <keyword_sched> option in config.xml for enabling keyword score
(it's disabled by default).
If set, increment score for "yes" keyword matches,
and disallow jobs with "no" matches
- in scheduler, add array job_keywords_array for parsed versions
of job keywords (vector<int>)
also:
- use symbols instead of numbers for slow_check() return values
- parse unused fields in req message to remove unparsed-XML warnings
The client flushes stdout and stderr at every iteration of the main loop. On Windows, stderr is opened in commit mode and this results in a write to NTFS $Log every time the stream is flushed even if nothing was written to the stream since last flush. These unnecessary writes totals to several hundred megabytes per day. Some users are concerned that this shortens the lifespan of their hardware.
Fix this by removing the flushes from main loop. stderr is unbuffered so it never needed the flush. After freopen() in diagnostics_init() stdout is fully buffered. Change stdout to line buffered mode so that log messages are visible in log files immediately.
MSVCRT doesn't support line buffered streams. It treats them as fully buffered. Emulate line buffered stream by flushing stdout in logging functions when compiling with Visual C++.
new keyword model:
- keywords as identified by integer IDs
- instead of being treated as opaque data,
the keyword XML is now parsed by the client.
This is a first step: pass keywords from AM to client to scheduler,
so that they can be used in job filtering.
Displaying keywords in the client will come later.
RPC_CLIENT::send_request() had a local char[100000] variable.
I got a stack trace from a crash on entry to this function, in __chkstk(),
presumably a stack overflow.
Shouldn't happen on a modern system, but may as well eliminate the possibility.