From 9e9b9bd8e5b94281a9b41b63ac53bc9d92039d67 Mon Sep 17 00:00:00 2001 From: Rom Walton Date: Wed, 17 Apr 2013 12:05:59 -0400 Subject: [PATCH 1/3] Updates for 7.0.64/65 --- doc/versions.inc | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/doc/versions.inc b/doc/versions.inc index 348724daec..e807cabd7a 100644 --- a/doc/versions.inc +++ b/doc/versions.inc @@ -44,10 +44,10 @@ function linux_info() { } $w70dev = array( - "num"=>"7.0.62", + "num"=>"7.0.64", "status"=>"Development version", - "file"=>"boinc_7.0.62_windows_intelx86.exe", - "date"=>"9 Apr 2013", + "file"=>"boinc_7.0.64_windows_intelx86.exe", + "date"=>"17 Apr 2013", "type"=>"win_new", ); @@ -84,10 +84,10 @@ $w5816 = array( ); $w70x64dev = array( - "num"=>"7.0.62", + "num"=>"7.0.64", "status"=>"Development version", - "file"=>"boinc_7.0.62_windows_x86_64.exe", - "date"=>"9 Apr 2013", + "file"=>"boinc_7.0.64_windows_x86_64.exe", + "date"=>"17 Apr 2013", "type"=>"win_new", ); @@ -108,10 +108,10 @@ $w612x64 = array( ); $m70dev = array( - "num"=>"7.0.62", + "num"=>"7.0.65", "status"=>"Development version (standard GUI)", - "file"=>"boinc_7.0.62_macOSX_i686.zip", - "date"=>"10 Apr 2013", + "file"=>"boinc_7.0.65_macOSX_i686.zip", + "date"=>"17 Apr 2013", "type"=>"mac_advanced", ); @@ -148,10 +148,10 @@ $m66 = array( ); $m70cdev = array( - "num"=>"7.0.62", + "num"=>"7.0.65", "status"=>"Development version (Unix command-line version)", - "file"=>"boinc_7.0.62_i686-apple-darwin.zip", - "date"=>"10 Apr 2013", + "file"=>"boinc_7.0.65_i686-apple-darwin.zip", + "date"=>"17 Apr 2013", "type"=>"bare_core", ); @@ -204,10 +204,10 @@ $l66 = array( ); $l70ubuntudev = array( - "num"=>"7.0.62", + "num"=>"7.0.65", "status"=>"Development version", - "file"=>"boinc_7.0.62_i686-pc-linux-gnu.sh", - "date"=>"9 Apr 2013", + "file"=>"boinc_7.0.65_i686-pc-linux-gnu.sh", + "date"=>"17 Apr 2013", "type"=>"sea", ); @@ -228,10 +228,10 @@ $l612ubuntu = array( ); $l70ubuntux64dev = array( - "num"=>"7.0.62", + "num"=>"7.0.65", "status"=>"Development version", - "file"=>"boinc_7.0.62_x86_64-pc-linux-gnu.sh", - "date"=>"9 Apr 2013", + "file"=>"boinc_7.0.65_x86_64-pc-linux-gnu.sh", + "date"=>"17 Apr 2013", "type"=>"sea", ); From 3610a334aa7c69ca05256b337f4b8f0c4fe39faf Mon Sep 17 00:00:00 2001 From: David Anderson Date: Wed, 17 Apr 2013 11:33:53 -0700 Subject: [PATCH 2/3] - client: minor code cleanup --- client/gpu_opencl.cpp | 128 +++++++++++++++++++++++------------------- 1 file changed, 70 insertions(+), 58 deletions(-) diff --git a/client/gpu_opencl.cpp b/client/gpu_opencl.cpp index d128aec482..9fa6cc4246 100644 --- a/client/gpu_opencl.cpp +++ b/client/gpu_opencl.cpp @@ -15,7 +15,7 @@ // You should have received a copy of the GNU Lesser General Public License // along with BOINC. If not, see . -// Detection of GPUs using OpenCL +// Detection of GPUs using OpenCL #ifdef _WIN32 #include "boinc_win.h" @@ -91,12 +91,21 @@ cl_int (*__clGetDeviceInfo)( #endif static bool is_AMD(char *vendor) { - if ((strstr(vendor, GPU_TYPE_ATI)) || - (strstr(vendor, "AMD")) || - (strstr(vendor, "Advanced Micro Devices, Inc.")) - ) return true; - - return false; + if (strstr(vendor, "ATI")) return true; + if (strstr(vendor, "AMD")) return true; + if (strstr(vendor, "Advanced Micro Devices, Inc.")) return true; + + return false; +} + +static bool is_NVIDIA(char* vendor) { + if (strstr(vendor, "NVIDIA")) return true; + return false; +} + +static bool is_intel(char* vendor) { + if (strcasestr(vendor, "intel")) return true; + return false; } // If "loose", tolerate small diff @@ -117,7 +126,7 @@ int opencl_compare(OPENCL_DEVICE_PROP& c1, OPENCL_DEVICE_PROP& c2, bool loose) { } // OpenCL interfaces are documented here: -// http://www.khronos.org/registry/cl/sdk/1.0/docs/man/xhtml/ and +// http://www.khronos.org/registry/cl/sdk/1.0/docs/man/xhtml/ and // http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/ void COPROCS::get_opencl( @@ -189,7 +198,7 @@ void COPROCS::get_opencl( warnings.push_back("clGetPlatformIDs() failed to return any OpenCL platforms"); return; } - + for (platform_index=0; platform_index= (int)(nvidia_gpus.size())) { if (log_flags.coproc_debug) { msg_printf(0, MSG_INFO, - "[coproc] OpenCL NVIDIA index #%d does not match any CUDA device", - device_index + "[coproc] OpenCL NVIDIA index #%d does not match any CUDA device", + device_index ); } return; // Should never happen @@ -339,23 +348,23 @@ void COPROCS::get_opencl( nvidia_opencls.push_back(prop); ++current_CUDA_index; } - + //////////// AMD / ATI ////////////// if (is_AMD(prop.vendor)) { prop.opencl_device_index = device_index; - + if (ati.have_cal) { // AMD OpenCL does not recognize all AMD GPUs returned by // CAL but we assume that OpenCL and CAL return devices in - // the same order. See additional comments earlier in + // the same order. See additional comments earlier in // this source file for more details. // while (1) { if (current_CAL_index >= num_CAL_devices) { if (log_flags.coproc_debug) { msg_printf(0, MSG_INFO, - "[coproc] OpenCL ATI device #%d does not match any CAL device", - device_index + "[coproc] OpenCL ATI device #%d does not match any CAL device", + device_index ); } return; // Should never happen @@ -369,14 +378,14 @@ void COPROCS::get_opencl( ++current_CAL_index; } prop.device_num = current_CAL_index; - - // Always use GPU model name from CAL if + + // Always use GPU model name from CAL if // available for ATI / AMD GPUs because // (we believe) it is more user-friendly. // strcpy(prop.name, ati_gpus[prop.device_num].name); - // Work around a bug in OpenCL which returns only + // Work around a bug in OpenCL which returns only // 1/2 of total global RAM size: use the value from CAL. // This bug applies only to ATI GPUs, not to NVIDIA // See also further workaround code for Macs. @@ -390,7 +399,7 @@ void COPROCS::get_opencl( c.set_peak_flops(); prop.peak_flops = c.peak_flops; } - + if (ati_gpus.size()) { prop.opencl_available_ram = ati_gpus[prop.device_num].available_ram; } else { @@ -398,11 +407,12 @@ void COPROCS::get_opencl( } ati_opencls.push_back(prop); } - + //////////// INTEL GPU ////////////// - if (strcasestr(prop.vendor, "intel")) { + // + if (is_intel(prop.vendor)) { cl_device_type device_type; - + ciErrNum = (*__clGetDeviceInfo)( prop.device_id, CL_DEVICE_TYPE, sizeof(device_type), &device_type, NULL @@ -419,7 +429,7 @@ void COPROCS::get_opencl( prop.device_num = (int)(intel_gpu_opencls.size()); prop.opencl_device_index = device_index; - + COPROC_INTEL c; c.opencl_prop = prop; c.is_used = COPROC_UNUSED; @@ -433,9 +443,11 @@ void COPROCS::get_opencl( intel_gpu_opencls.push_back(prop); - // At present Intel GPUs only support OpenCL and do not have a native - // GPGPU framework, so treat each detected Intel OpenCL GPU device as + // At present Intel GPUs only support OpenCL + // and do not have a native GPGPU framework, + // so treat each detected Intel OpenCL GPU device as // a native device. + // intel_gpus.push_back(c); } } @@ -444,9 +456,9 @@ void COPROCS::get_opencl( #ifdef __APPLE__ // Work around a bug in OpenCL which returns only - // 1/2 of total global RAM size. + // 1/2 of total global RAM size. // This bug applies only to ATI GPUs, not to NVIDIA - // This has already been fixed on latest Catalyst + // This has already been fixed on latest Catalyst // drivers, but Mac does not use Catalyst drivers. if (ati_opencls.size() > 0) { opencl_get_ati_mem_size_from_opengl(); @@ -462,7 +474,7 @@ void COPROCS::get_opencl( ); return; } - + if (nvidia.have_cuda) { // If CUDA already found the "best" NVIDIA GPU nvidia.merge_opencl( nvidia_opencls, ignore_gpu_instance[PROC_TYPE_NVIDIA_GPU] @@ -495,8 +507,8 @@ void COPROCS::get_opencl( } cl_int COPROCS::get_opencl_info( - OPENCL_DEVICE_PROP& prop, - cl_uint device_index, + OPENCL_DEVICE_PROP& prop, + cl_uint device_index, vector&warnings ) { cl_int ciErrNum; @@ -655,17 +667,17 @@ cl_int COPROCS::get_opencl_info( return CL_SUCCESS; } -// This is called for ATI GPUs with CAL or NVIDIA GPUs with CUDA, to merge +// This is called for ATI GPUs with CAL or NVIDIA GPUs with CUDA, to merge // the OpenCL info into the CAL or CUDA data for the "best" CAL or CUDA GPU. -// This assumes that, for each GPU, we have previously correlated its CAL +// This assumes that, for each GPU, we have previously correlated its CAL // or CUDA device_num with its opencl_device_index. // void COPROC::merge_opencl( - vector &opencls, + vector &opencls, vector& ignore_dev ) { unsigned int i, j; - + for (i=0; i &opencls, + vector &opencls, vector& ignore_dev ) { unsigned int i; - + // identify the most capable ATI or NVIDIA OpenCL GPU // bool first = true; @@ -727,7 +739,7 @@ void COPROC::find_best_opencls( } } - // see which other instances are equivalent, and set the count, + // see which other instances are equivalent, and set the count, // device_nums, opencl_device_count and opencl_device_ids fields // count = 0; @@ -748,7 +760,7 @@ void COPROC::find_best_opencls( #ifdef __APPLE__ -// OpenCL returns incorrect total RAM size for some +// OpenCL returns incorrect total RAM size for some // ATI GPUs so we get that info from OpenGL on Macs #include @@ -773,16 +785,16 @@ void COPROCS::opencl_get_ati_mem_size_from_opengl() { for (i=0; i<32; ++i) { rendererIDs[i] = 0; modelName[i] = NULL; - + CGOpenGLDisplayMask myMask = 1 << i; CGDirectDisplayID displayID = CGOpenGLDisplayMaskToDisplayID(myMask); - theErr2 = CGLQueryRendererInfo(myMask, &info, &numRenderers); + theErr2 = CGLQueryRendererInfo(myMask, &info, &numRenderers); if ((displayID != kCGNullDirectDisplay) && (theErr2 == kCGLNoError)) { // Get the I/O Kit service port for the display io_registry_entry_t dspPort = CGDisplayIOServicePort(displayID); for (j = 0; j < numRenderers; j++) { // find accelerated renderer (assume only one) - CGLDescribeRenderer (info, j, kCGLRPAcceleratedCompute, &rv); + CGLDescribeRenderer (info, j, kCGLRPAcceleratedCompute, &rv); if (true == rv) { // if openCL-capable // what is the renderer ID CGLDescribeRenderer (info, j, kCGLRPRendererID, &rendererIDs[i]); @@ -805,8 +817,8 @@ void COPROCS::opencl_get_ati_mem_size_from_opengl() { if (ati_gpu_index >= (int)ati_opencls.size()) { break; } - - CGLDescribeRenderer (info, i, kCGLRPAcceleratedCompute, &rv); + + CGLDescribeRenderer (info, i, kCGLRPAcceleratedCompute, &rv); if (true == rv) { // if openCL-capable // what is the renderer ID CGLDescribeRenderer (info, i, kCGLRPRendererID, &rendererID); @@ -816,7 +828,7 @@ void COPROCS::opencl_get_ati_mem_size_from_opengl() { // build context and context specific info CGLPixelFormatAttribute attribs[] = { kCGLPFARendererID, - (CGLPixelFormatAttribute)rendererID, + (CGLPixelFormatAttribute)rendererID, kCGLPFAAllowOfflineRenderers, (CGLPixelFormatAttribute)0 }; @@ -844,7 +856,7 @@ void COPROCS::opencl_get_ati_mem_size_from_opengl() { *++p='M'; *++p='D'; } - + for (j=0; j<32; j++) { if ((rendererID == rendererIDs[j]) && (modelName[j] != NULL)) { break; @@ -872,8 +884,8 @@ void COPROCS::opencl_get_ati_mem_size_from_opengl() { *++p='D'; } } - - if ((strRend == NULL) || + + if ((strRend == NULL) || (!strstr(iokit_name, opencl_name))) { msg_printf(0, MSG_INFO, "[coproc] opencl_get_ati_mem_size_from_opengl model name to renderer mismatch: %s vs %s\n", @@ -885,7 +897,7 @@ void COPROCS::opencl_get_ati_mem_size_from_opengl() { ati_gpu_index++; } // End if ATI / AMD GPU - + CGLDestroyContext (cglContext); } else { if (log_flags.coproc_debug) { @@ -905,14 +917,14 @@ void COPROCS::opencl_get_ati_mem_size_from_opengl() { } // End loop: for (i = 0; i < numRenderers; i++) CGLDestroyRendererInfo (info); } - + if (log_flags.coproc_debug) { for (j=0; j<32; j++) { if (modelName[j] != NULL) { CFRelease(modelName[j]); } } - } + } CGLSetCurrentContext (curr_ctx); // restore current CGL context } #endif From 81d64892b63f8238f19873f363266526816cf9b3 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Thu, 18 Apr 2013 00:36:03 -0700 Subject: [PATCH 3/3] - client: msg tweak --- client/app_config.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/app_config.cpp b/client/app_config.cpp index 56c223ee01..1043179385 100644 --- a/client/app_config.cpp +++ b/client/app_config.cpp @@ -94,7 +94,8 @@ void APP_CONFIGS::config_app_versions(PROJECT* p) { APP* app = gstate.lookup_app(p, ac.name); if (!app) { msg_printf(p, MSG_USER_ALERT, - "app %s not found in app_config.xml", ac.name + "Your app_config.xml file includes settings for application %s, which does not exist", + ac.name ); continue; }