- client: show error notice if a GPU exclusion (in cc_config.xml)

has an invalid URL, type, or app
- server, create_work() function: if a <file_info> in input template
    lists URLs, they're directories; append filename to each one
This commit is contained in:
David Anderson 2013-02-16 12:53:52 -08:00 committed by Oliver Bock
parent 21dfbb75af
commit 77ee073f58
3 changed files with 46 additions and 12 deletions

View File

@ -540,6 +540,48 @@ void process_gpu_exclusions() {
unsigned int i, j, a;
PROJECT *p;
// check the syntactic validity of the exclusions
//
for (i=0; i<config.exclude_gpus.size(); i++) {
EXCLUDE_GPU& eg = config.exclude_gpus[i];
p = gstate.lookup_project(eg.url.c_str());
if (!p) {
msg_printf(0, MSG_USER_ALERT,
"Bad URL in GPU exclusion: %s", eg.url.c_str()
);
continue;
}
if (!eg.type.empty()) {
bool found = false;
string types;
for (int k=1; k<coprocs.n_rsc; k++) {
COPROC& cp = coprocs.coprocs[k];
if (eg.type == cp.type) {
found = true;
break;
}
types += " " + string(cp.type);
}
if (!found) {
msg_printf(p, MSG_USER_ALERT,
"Bad type '%s' in GPU exclusion; valid types:%s",
eg.type.c_str(), types.c_str()
);
continue;
}
if (!eg.appname.empty()) {
APP* app = gstate.lookup_app(p, eg.appname.c_str());
if (!app) {
msg_printf(p, MSG_USER_ALERT,
"Nonexistent app '%s' in GPU exclusion",
eg.appname.c_str()
);
continue;
}
}
}
}
for (i=0; i<gstate.apps.size(); i++) {
APP* app = gstate.apps[i];
for (int k=1; k<coprocs.n_rsc; k++) {

View File

@ -1,7 +1,7 @@
<?php
// This file is part of BOINC.
// http://boinc.berkeley.edu
// Copyright (C) 2011 University of California
// Copyright (C) 2013 University of California
//
// BOINC is free software; you can redistribute it and/or modify it
// under the terms of the GNU Lesser General Public License
@ -16,16 +16,8 @@
// You should have received a copy of the GNU Lesser General Public License
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
// BOINC's remote job submission system allows users to:
// 1) manage a set of files on the server,
// with physical names that are isolated from other users
// 2) submit batches of jobs
//
// These features can be provided by a "portal" web site
// that is distinct from the BOINC server.
//
// This file contains library functions that can be used by portals.
// It communicates (using HTTP/XML) with the BOINC server.
// This file contains a PHP binding of a web-service interface
// for submitting jobs to a BOINC server.
//
// Functions:
// boinc_abort_batch(): abort a batch

View File

@ -246,7 +246,7 @@ static int process_file_info(
//
urlstr = "";
for (unsigned int i=0; i<urls.size(); i++) {
urlstr += " <url>" + urls.at(i) + "</url>\n";
urlstr += " <url>" + urls.at(i) + string(infiles[file_number]) + "</url>\n";
}
sprintf(buf,
" <name>%s</name>\n"