mirror of https://github.com/BOINC/boinc.git
- client: in parsing <coproc> elements in <app_version>,
use a new type COPROC_REQ for which the count field is a double. Otherwise fractional GPU jobs don't work. svn path=/trunk/boinc/; revision=18906
This commit is contained in:
parent
b3d0249ade
commit
9a8f91fb1e
|
@ -7190,3 +7190,13 @@ David 24 Aug 2009
|
|||
|
||||
lib/
|
||||
coproc.cpp
|
||||
|
||||
David 24 Aug 2009
|
||||
- client: in parsing <coproc> elements in <app_version>,
|
||||
use a new type COPROC_REQ for which the count field is a double.
|
||||
Otherwise fractional GPU jobs don't work.
|
||||
|
||||
client/
|
||||
client_types.cpp
|
||||
lib/
|
||||
coproc.cpp,h
|
||||
|
|
|
@ -1128,7 +1128,7 @@ int APP_VERSION::parse(MIOFILE& in) {
|
|||
if (parse_double(buf, "<flops>", flops)) continue;
|
||||
if (parse_str(buf, "<cmdline>", cmdline, sizeof(cmdline))) continue;
|
||||
if (match_tag(buf, "<coproc>")) {
|
||||
COPROC cp;
|
||||
COPROC_REQ cp;
|
||||
int retval = cp.parse(in);
|
||||
if (!retval) {
|
||||
if (!strcmp(cp.type, "CUDA")) {
|
||||
|
|
|
@ -61,6 +61,21 @@ void COPROC::write_xml(MIOFILE& f) {
|
|||
}
|
||||
#endif
|
||||
|
||||
int COPROC_REQ::parse(MIOFILE& fin) {
|
||||
char buf[1024];
|
||||
strcpy(type, "");
|
||||
count = 0;
|
||||
while (fin.fgets(buf, sizeof(buf))) {
|
||||
if (match_tag(buf, "</coproc>")) {
|
||||
if (!strlen(type)) return ERR_XML_PARSE;
|
||||
return 0;
|
||||
}
|
||||
if (parse_str(buf, "<type>", type, sizeof(type))) continue;
|
||||
if (parse_double(buf, "<count>", count)) continue;
|
||||
}
|
||||
return ERR_XML_PARSE;
|
||||
}
|
||||
|
||||
int COPROC::parse(MIOFILE& fin) {
|
||||
char buf[1024];
|
||||
strcpy(type, "");
|
||||
|
|
|
@ -75,6 +75,15 @@
|
|||
|
||||
#define MAX_COPROC_INSTANCES 64
|
||||
|
||||
// represents a requirement for a coproc.
|
||||
// This is a parsed version of the <coproc> elements in an <app_version>
|
||||
//
|
||||
struct COPROC_REQ {
|
||||
char type[256]; // must be unique
|
||||
double count;
|
||||
int parse(MIOFILE&);
|
||||
};
|
||||
|
||||
// represents a coproc on a particular computer.
|
||||
// The object will always be a derived class (COPROC_CUDA, COPROC_ATI)
|
||||
// Used in both client and server.
|
||||
|
|
Loading…
Reference in New Issue