Skip to content

Commit

Permalink
- scheduler: if sending GPU description to pre-7.0 client,
Browse files Browse the repository at this point in the history
    call it CUDA instead of NVIDIA


svn path=/trunk/boinc/; revision=26042
  • Loading branch information
davidpanderson committed Aug 17, 2012
1 parent 0d42a4a commit b029e35
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 12 deletions.
13 changes: 13 additions & 0 deletions checkin_notes
Original file line number Diff line number Diff line change
Expand Up @@ -5569,3 +5569,16 @@ David 15 Aug 2012
schema_vda.sql
sched/
file_upload_handler.cpp

David 16 Aug 2012
- scheduler: if sending GPU description to pre-7.0 client,
call it CUDA instead of NVIDIA

sched/
sched_types.cpp
db/
boinc_db.cpp
vda/
vda.cpp
sched_vda.cpp
vda_lib2.cpp
2 changes: 1 addition & 1 deletion db/boinc_db.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2350,7 +2350,7 @@ void DB_VDA_FILE::db_print(char* buf){
"chunk_size=%f, "
"need_update=%d, "
"initialized=%d, "
"retrieving=%d"
"retrieving=%d, "
"retrieved=%d",
create_time,
dir,
Expand Down
14 changes: 13 additions & 1 deletion sched/sched_types.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1031,12 +1031,24 @@ int APP_VERSION::write(FILE* fout) {
}
int pt = bavp->host_usage.proc_type;
if (pt != PROC_TYPE_CPU) {
const char* nm;
if (pt == PROC_TYPE_NVIDIA_GPU) {
// KLUDGE: older clients use "CUDA", newer ones use "NVIDIA"
//
if (g_request->core_client_version < 70000) {
nm = "CUDA";
} else {
nm = proc_type_name_xml(pt);
}
} else {
nm = proc_type_name_xml(pt);
}
fprintf(fout,
" <coproc>\n"
" <type>%s</type>\n"
" <count>%f</count>\n"
" </coproc>\n",
proc_type_name_xml(pt),
nm,
bavp->host_usage.gpu_usage
);
}
Expand Down
11 changes: 4 additions & 7 deletions vda/sched_vda.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -246,14 +246,11 @@ static void process_chunk_present_on_client(FILE_INFO& fi, CHUNK_LIST& chunks) {
DB_VDA_CHUNK_HOST* chp = &(cli->second);
chp->found = true;

// if file wasn't previously on host, a download has completed
//
if (!chp->present_on_host) {
mark_for_update(vf.id);
}

if (chp->transfer_in_progress
|| chp->transfer_wait
|| chp->present_on_host
) {
chp->transfer_in_progress = false;
chp->transfer_wait = false;
chp->present_on_host = true;
Expand Down Expand Up @@ -460,8 +457,8 @@ void handle_vda() {
//
for (i=0; i<g_request->file_xfer_results.size(); i++) {
RESULT& r = g_request->file_xfer_results[i];
if (strstr(r.name, "vda_upload")) {
char* chunk_file_name = r.name + strlen("vda_upload_");
if (strstr(r.name, "upload_vda_")) {
char* chunk_file_name = r.name + strlen("upload_vda_");
if (config.debug_vda) {
log_messages.printf(MSG_NORMAL,
"[vda] DB: completed upload %s\n", chunk_file_name
Expand Down
10 changes: 9 additions & 1 deletion vda/vda.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ int handle_add(const char* path) {
vf.need_update = 1;
vf.initialized = 0;
vf.retrieving = 0;
vf.retrieved = 0;
retval = vf.insert();
if (retval) {
printf("Can't insert DB record\n");
Expand Down Expand Up @@ -202,11 +203,18 @@ int handle_status(const char* name) {
log_messages.printf(MSG_CRITICAL, "Can't get file state: %d\n", retval);
return retval;
}
printf("status for file %s:", vf.file_name);
printf("status for file %s:\n", vf.file_name);
vf.meta_chunk->recovery_plan();
vf.meta_chunk->compute_min_failures();
vf.meta_chunk->print_status(0);
printf("fault tolerance level: %d\n", vf.meta_chunk->min_failures-1);
if (vf.retrieving) {
if (vf.retrieved) {
printf("Retrieving: completed\n");
} else {
printf("Retrieving: in progress\n");
}
}

return 0;
}
Expand Down
9 changes: 7 additions & 2 deletions vda/vda_lib2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -366,15 +366,20 @@ int CHUNK::assign() {
int CHUNK::start_upload_from_host(VDA_CHUNK_HOST& ch) {
DB_VDA_CHUNK_HOST dch;
char set_clause[256], where_clause[256];

log_messages.printf(MSG_NORMAL,
" requesting upload of %s from host %d\n", name, ch.host_id
);

sprintf(set_clause,
"transfer_in_progress=1, transfer_wait=1, transfer_request_time=%f",
dtime()
);
sprintf(where_clause,
"where vda_file_id=%d and host_id=%d and name='%s'",
"vda_file_id=%d and host_id=%d and physical_file_name='%s'",
ch.vda_file_id,
ch.host_id,
name
ch.physical_file_name
);
return dch.update_fields_noid(set_clause, where_clause);
}
Expand Down

0 comments on commit b029e35

Please sign in to comment.