Skip to content

Commit

Permalink
- client: change some unsigned int to size_t in our versions
Browse files Browse the repository at this point in the history
    of NVIDIA APIs.  This apparently caused crashes
    (in app, not client, which I don't understand) for Einstein@Home.
    From Steffen Moller.


svn path=/trunk/boinc/; revision=25527
  • Loading branch information
davidpanderson committed Apr 2, 2012
1 parent 45ec33f commit 36529da
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 32 deletions.
13 changes: 13 additions & 0 deletions checkin_notes
Original file line number Diff line number Diff line change
Expand Up @@ -3178,3 +3178,16 @@ Charlie 31 Mar 2012
BOINCTaskBar.cpp,.h
mac/
MacSysMenu.cpp,.h

David 2 Apr 2012
- client: change some unsigned int to size_t in our versions
of NVIDIA APIs. This apparently caused crashes
(in app, not client, which I don't understand) for Einstein@Home.
From Steffen Moller.

html/ops/
db_update.php
lib/
coproc.h
client/
coproc_detect.cpp
14 changes: 7 additions & 7 deletions client/coproc_detect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -845,13 +845,13 @@ int (*__cuDriverGetVersion)(int*);
int (*__cuDeviceGet)(int*, int);
int (*__cuDeviceGetAttribute)(int*, int, int);
int (*__cuDeviceGetName)(char*, int, int);
int (*__cuDeviceTotalMem)(unsigned int*, int);
int (*__cuDeviceTotalMem)(size_t*, int);
int (*__cuDeviceComputeCapability)(int*, int*, int);
int (*__cuCtxCreate)(void**, unsigned int, unsigned int);
int (*__cuCtxDestroy)(void*);
int (*__cuMemAlloc)(unsigned int*, unsigned int);
int (*__cuMemAlloc)(unsigned int*, size_t);
int (*__cuMemFree)(unsigned int);
int (*__cuMemGetInfo)(unsigned int*, unsigned int*);
int (*__cuMemGetInfo)(size_t*, size_t*);
#endif

// NVIDIA interfaces are documented here:
Expand Down Expand Up @@ -911,13 +911,13 @@ void COPROC_NVIDIA::get(
__cuDeviceGet = (int(*)(int*, int)) dlsym( cudalib, "cuDeviceGet" );
__cuDeviceGetAttribute = (int(*)(int*, int, int)) dlsym( cudalib, "cuDeviceGetAttribute" );
__cuDeviceGetName = (int(*)(char*, int, int)) dlsym( cudalib, "cuDeviceGetName" );
__cuDeviceTotalMem = (int(*)(unsigned int*, int)) dlsym( cudalib, "cuDeviceTotalMem" );
__cuDeviceTotalMem = (int(*)(size_t*, int)) dlsym( cudalib, "cuDeviceTotalMem" );
__cuDeviceComputeCapability = (int(*)(int*, int*, int)) dlsym( cudalib, "cuDeviceComputeCapability" );
__cuCtxCreate = (int(*)(void**, unsigned int, unsigned int)) dlsym( cudalib, "cuCtxCreate" );
__cuCtxDestroy = (int(*)(void*)) dlsym( cudalib, "cuCtxDestroy" );
__cuMemAlloc = (int(*)(unsigned int*, unsigned int)) dlsym( cudalib, "cuMemAlloc" );
__cuMemAlloc = (int(*)(unsigned int*, size_t)) dlsym( cudalib, "cuMemAlloc" );
__cuMemFree = (int(*)(unsigned int)) dlsym( cudalib, "cuMemFree" );
__cuMemGetInfo = (int(*)(unsigned int*, unsigned int*)) dlsym( cudalib, "cuMemGetInfo" );
__cuMemGetInfo = (int(*)(size_t*, size_t*)) dlsym( cudalib, "cuMemGetInfo" );
#endif

if (!__cuDriverGetVersion) {
Expand Down Expand Up @@ -1134,7 +1134,7 @@ void COPROC_NVIDIA::fake(
//
void COPROC_NVIDIA::get_available_ram() {
int retval;
unsigned int memfree, memtotal;
size_t memfree, memtotal;
int device;
void* ctx;

Expand Down
22 changes: 0 additions & 22 deletions doc/flops.php

This file was deleted.

2 changes: 0 additions & 2 deletions html/ops/db_update.php
Original file line number Diff line number Diff line change
Expand Up @@ -833,6 +833,4 @@ function update_1_30_2012() {
array(25169, "update_1_30_2012"),
);



?>
2 changes: 1 addition & 1 deletion lib/coproc.h
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ struct COPROC {
struct CUDA_DEVICE_PROP {
char name[256];
int deviceHandle;
unsigned int totalGlobalMem;
size_t totalGlobalMem;
// not used on the server; dtotalGlobalMem is used instead
// (since some boards have >= 4GB)
int sharedMemPerBlock;
Expand Down

0 comments on commit 36529da

Please sign in to comment.