From 5e8237aa563d870dea01250d0f8f0f36dc6eab34 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Mon, 23 Mar 2009 19:25:38 +0000 Subject: [PATCH] - client (linux): if don't find libcudart.so in the current dir, look for it in the library search path. Fixes #863 svn path=/trunk/boinc/; revision=17648 --- checkin_notes | 7 +++++++ lib/coproc.cpp | 8 ++++++++ 2 files changed, 15 insertions(+) diff --git a/checkin_notes b/checkin_notes index 3c13364353..f2347b6c0b 100644 --- a/checkin_notes +++ b/checkin_notes @@ -3244,3 +3244,10 @@ David 23 Mar 2009 filesys.cpp api/ boinc_api.cpp + +David 23 Mar 2009 + - client (linux): if don't find libcudart.so in the current dir, + look for it in the library search path. Fixes #863 + + lib/ + coproc.cpp diff --git a/lib/coproc.cpp b/lib/coproc.cpp index 4ef2a1993e..6ec54d48be 100644 --- a/lib/coproc.cpp +++ b/lib/coproc.cpp @@ -194,7 +194,15 @@ string COPROC_CUDA::get(COPROCS& coprocs) { #ifdef __APPLE__ cudalib = dlopen("/usr/local/cuda/lib/libcudart.dylib", RTLD_NOW); #else + // libcudart.so is included with the BOINC install for linux, + // so look for it in the current dir. + // cudalib = dlopen("./libcudart.so", RTLD_NOW); + if (!cudalib) { + // If that fails, look for it in the library search path + // + cudalib = dlopen("libcudart.so", RTLD_NOW); + } #endif if (!cudalib) { return "Can't load library libcudart";