Skip to content

Commit

Permalink
- server: create a harness for testing validator code.
Browse files Browse the repository at this point in the history
    If you link your functions (init_result(), compare_results(),
    cleanup_result()) with validate_test.cpp,
    you'll get a program that you can run as
        validate_test file1 file2
    and it will compare the two files
    (this works only for validators that expect 1 file per result).

    I added a makefile, sched/makefile_validator_test,
    that you can use for this.
- server: shuffle code so that the above doesn't need to
    link MySQL libraries
- client: if we fetch a master file and it contains no scheduler URLs,
    show a message of class INTERNAL_ERROR
- client/scheduler: make CUDA_DEVICE_PROP.totalGlobalMem a double,
    and remove dtotalGlobalMem.
    Although NVIDIA reports RAM size as a size_t,
    there's no reason to store it as an integer after that.


svn path=/trunk/boinc/; revision=25542
  • Loading branch information
davidpanderson committed Apr 10, 2012
1 parent 5df455b commit 759c23e
Show file tree
Hide file tree
Showing 15 changed files with 829 additions and 680 deletions.
39 changes: 39 additions & 0 deletions checkin_notes
Original file line number Diff line number Diff line change
Expand Up @@ -3209,3 +3209,42 @@ David 5 Apr 2012
sched_version.cpp
html/ops/
app_reset.php

David 9 Apr 2012
- server: create a harness for testing validator code.
If you link your functions (init_result(), compare_results(),
cleanup_result()) with validate_test.cpp,
you'll get a program that you can run as
validate_test file1 file2
and it will compare the two files
(this works only for validators that expect 1 file per result).

I added a makefile, sched/makefile_validator_test,
that you can use for this.
- server: shuffle code so that the above doesn't need to
link MySQL libraries
- client: if we fetch a master file and it contains no scheduler URLs,
show a message of class INTERNAL_ERROR
- client/scheduler: make CUDA_DEVICE_PROP.totalGlobalMem a double,
and remove dtotalGlobalMem.
Although NVIDIA reports RAM size as a size_t,
there's no reason to store it as an integer after that.

db/
boinc_db.h
boinc_db_types.h
sched/
validate_util2.h
validate_util.h
makefile_validator_test
plan_class_spec.cpp
sched_send.cpp
validator_test.cpp
validator.cpp
html/inc/
stats_sites.inc
lib/
coproc.cpp,h
client/
coproc_detect.cpp
scheduler_op.cpp
8 changes: 5 additions & 3 deletions client/coproc_detect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -994,6 +994,7 @@ void COPROC_NVIDIA::get(

int j;
unsigned int i;
size_t global_mem;
COPROC_NVIDIA cc;
string s;
for (j=0; j<cuda_ndevs; j++) {
Expand All @@ -1020,7 +1021,8 @@ if (j == 0) {
return;
}
(*__cuDeviceComputeCapability)(&cc.prop.major, &cc.prop.minor, device);
(*__cuDeviceTotalMem)(&cc.prop.totalGlobalMem, device);
(*__cuDeviceTotalMem)(&global_mem, device);
cc.prop.totalGlobalMem = (double) global_mem;
(*__cuDeviceGetAttribute)(&cc.prop.sharedMemPerBlock, CU_DEVICE_ATTRIBUTE_SHARED_MEMORY_PER_BLOCK, device);
(*__cuDeviceGetAttribute)(&cc.prop.regsPerBlock, CU_DEVICE_ATTRIBUTE_REGISTERS_PER_BLOCK, device);
(*__cuDeviceGetAttribute)(&cc.prop.warpSize, CU_DEVICE_ATTRIBUTE_WARP_SIZE, device);
Expand Down Expand Up @@ -1106,7 +1108,7 @@ void COPROC_NVIDIA::fake(
display_driver_version = driver_version;
cuda_version = 2020;
strcpy(prop.name, "Fake NVIDIA GPU");
prop.totalGlobalMem = (unsigned int)ram;
prop.totalGlobalMem = ram;
prop.sharedMemPerBlock = 100;
prop.regsPerBlock = 8;
prop.warpSize = 10;
Expand Down Expand Up @@ -1138,7 +1140,7 @@ void COPROC_NVIDIA::get_available_ram() {
int device;
void* ctx;

available_ram = prop.dtotalGlobalMem;
available_ram = prop.totalGlobalMem;
retval = (*__cuDeviceGet)(&device, device_num);
if (retval) {
if (log_flags.coproc_debug) {
Expand Down
3 changes: 3 additions & 0 deletions client/scheduler_op.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,9 @@ int SCHEDULER_OP::parse_master_file(PROJECT* p, vector<std::string> &urls) {
// couldn't find any scheduler URLs in the master file?
//
if ((int) urls.size() == 0) {
msg_printf(p, MSG_INTERNAL_ERROR,
"No scheduler URLs found in master file\n"
);
p->sched_rpc_pending = 0;
return ERR_XML_PARSE;
}
Expand Down
Loading

0 comments on commit 759c23e

Please sign in to comment.