Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Unsupported Software
  • Search

[HOWTO] Folding@Home GPU2 NVidia client with WINE

This forum covers all Gentoo-related software not officially supported by Gentoo. Ebuilds/software posted here might harm the health and stability of your system(s), and are not supported by Gentoo developers. Bugs/errors caused by ebuilds from overlays.gentoo.org are covered by this forum, too.
Post Reply
Advanced search
17 posts • Page 1 of 1
Author
Message
rada
Apprentice
Apprentice
Posts: 202
Joined: Fri Oct 21, 2005 11:39 pm
Location: Ottawa, Canada
Contact:
Contact rada
Website

[HOWTO] Folding@Home GPU2 NVidia client with WINE

  • Quote

Post by rada » Tue Jul 29, 2008 7:07 pm

Thanks to http://foldingforum.org/viewtopic.php?f=43&t=3744:

HowTo for Gentoo Linux x86-64 users: (maybe useful for others)

1. Compile and install CUDA and the thunked cudart.dll

1.1 Download the CUDA 32-bit toolkit from http://www.nvidia.com/object/thankyou_l ... 10_x86.run. Install it by making it executable then running it as root:

Code: Select all

chmod +x NVIDIA_CUDA_Toolkit_2.0beta2_Ubuntu7.10_x86.run
./NVIDIA_CUDA_Toolkit_2.0beta2_Ubuntu7.10_x86.run
Make sure to install in the default directory.

1.2 Make a new directory and put the following source files in it:
cudart.c

Code: Select all

#include <windows.h>
#include "cudart.h"
#include "wine/debug.h"

#if 0
#define __CUDA_INTERNAL_COMPILATION__
#include "crt/host_runtime.h"
#endif

#ifdef USE_SLEEPWAIT

#include <time.h>

static struct timespec sleepTime = { 0, USE_SLEEPWAIT };

#endif  /* USE_SLEEPWAIT */

WINE_DEFAULT_DEBUG_CHANNEL(cuda);

#define QUEUE_MAX       20
#define HALF_QUEUE_MAX  ((QUEUE_MAX)/2)

static unsigned int numQueued = 0;
static BOOL eventInitialized = FALSE;
static cudaEvent_t event;

static const char* cudaErrorString[] = {
    "cudaSuccess",
    "cudaErrorMissingConfiguration",
    "cudaErrorMemoryAllocation",
    "cudaErrorInitializationError",
    "cudaErrorLaunchFailure",
    "cudaErrorPriorLaunchFailure",
    "cudaErrorLaunchTimeout",
    "cudaErrorLaunchOutOfResources",
    "cudaErrorInvalidDeviceFunction",
    "cudaErrorInvalidConfiguration",
    "cudaErrorInvalidDevice",
    "cudaErrorInvalidValue",
    "cudaErrorInvalidPitchValue",
    "cudaErrorInvalidSymbol",
    "cudaErrorMapBufferObjectFailed",
    "cudaErrorUnmapBufferObjectFailed",
    "cudaErrorInvalidHostPointer",
    "cudaErrorInvalidDevicePointer",
    "cudaErrorInvalidTexture",
    "cudaErrorInvalidTextureBinding",
    "cudaErrorInvalidChannelDescriptor",
    "cudaErrorInvalidMemcpyDirection",
    "cudaErrorAddressOfConstant",
    "cudaErrorTextureFetchFailed",
    "cudaErrorTextureNotBound",
    "cudaErrorSynchronizationError",
    "cudaErrorInvalidFilterSetting",
    "cudaErrorInvalidNormSetting",
    "cudaErrorMixedDeviceExecution",
    "cudaErrorCudartUnloading",
    "cudaErrorUnknown",
    "cudaErrorNotYetImplemented",
    "cudaErrorMemoryValueTooLarge",
    "cudaErrorInvalidResourceHandle",
    "cudaErrorNotReady"
};

static const char* debug_cudaError(cudaError_t err) {
    if (cudaErrorStartupFailure == err) {
        return "cudaErrorStartupFailure";
    }

    if (cudaErrorApiFailureBase == err) {
        return "cudaErrorApiFailureBase";
    }

    if (err >= 0 && err < sizeof(cudaErrorString)/sizeof(cudaErrorString[0])) {
        return cudaErrorString[err];
    }

    WINE_TRACE("unknown error %d\n", err);
    return "unknown CUDA error";
}

BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
{
    if (DLL_PROCESS_DETACH == fdwReason)
    {
        /* Cleanup */
        if (eventInitialized) {
            WINE_TRACE("releasing event %d\n", event);

            cudaError_t err = cudaEventDestroy(event);

            if (err) {
                WINE_TRACE("cudaEventDestroy: %s\n", debug_cudaError(err));
            }
        }
    }
}

cudaError_t WINAPI wine_cudaConfigureCall(dim3 gridDim, dim3 blockDim, size_t sharedMem,
                                          cudaStream_t stream) {
    WINE_TRACE("(%d %d %d) (%d %d %d) %d %d\n", gridDim.x, gridDim.y, gridDim.z, blockDim.x,
               blockDim.y, blockDim.z, sharedMem, stream);

    cudaError_t err = cudaConfigureCall(gridDim, blockDim, sharedMem, stream);

    if (err) {
        WINE_TRACE("return %s\n", debug_cudaError(err));
    }

    return err;
}

cudaError_t WINAPI wine_cudaGetDeviceProperties(struct cudaDeviceProp *prop, int device) {
    WINE_TRACE("\n");
    return cudaGetDeviceProperties(prop, device);
}

const char* WINAPI wine_cudaGetErrorString(cudaError_t error) {
    WINE_TRACE("\n");
    return cudaGetErrorString(error);
}

cudaError_t WINAPI wine_cudaGetLastError() {
    WINE_TRACE("\n");

    cudaError_t err = cudaGetLastError();

    WINE_TRACE("return %s\n", debug_cudaError(err));

    return err;
}

cudaError_t WINAPI wine_cudaLaunch(const char *symbol) {
    WINE_TRACE("%p\n", symbol);

    if (QUEUE_MAX == numQueued) {
        cudaError_t evtErr;

        if (WINE_TRACE_ON(cuda)) {
            /* print out if event was recorded or not */
            WINE_TRACE("check event recorded %s\n", debug_cudaError(cudaEventQuery(event)));
        }

        /* wait for event */
#ifdef USE_SLEEPWAIT
        unsigned int sleepCount = 0;

        while (cudaEventQuery(event) != cudaSuccess) {
            nanosleep(&sleepTime, NULL);
            sleepCount++;
        }

        WINE_TRACE("slept %u times\n", sleepCount);
#else
        evtErr = cudaEventSynchronize(event);

        if (evtErr) {
            WINE_ERR("cudaEventSynchronize: %s\n", debug_cudaError(evtErr));
        }
#endif

        WINE_TRACE("event recorded, continuing\n");

        /* record a new event and subtract HALF_QUEUE_MAX from numQueued */
        numQueued = HALF_QUEUE_MAX;
        evtErr = cudaEventRecord(event, 0);

        if (evtErr) {
            WINE_ERR("cudaEventRecord: %s\n", debug_cudaError(evtErr));
        }
    }

    cudaError_t err = cudaLaunch(symbol);

    if (!eventInitialized) {
        /* Create an event on the first cudaLaunch call.  This is done here so the calling program
         * has a chance to select the GPU device with cudaSetDevice if desired. */
        cudaError_t evtErr = cudaEventCreate(&event);

        if (evtErr) {
            WINE_ERR("cudaEventCreate: %s\n", debug_cudaError(evtErr));
        }

        /* cudaEventCreate can return errors from previous asynchronous calls, so an error here does
         * not necessarily mean the event wasn't created.  Assume it was created for now. */
        eventInitialized = TRUE;
        WINE_TRACE("created event %d\n", event);
    }

    /* record an event at HALF_QUEUE_MAX */
    if (HALF_QUEUE_MAX == ++numQueued) {
        cudaError_t evtErr = cudaEventRecord(event, 0);  /* Assuming everything using stream 0 */

        if (evtErr) {
            WINE_ERR("cudaEventRecord: %s\n", debug_cudaError(evtErr));
        }
    }

    if (err) {
        WINE_TRACE("return %s\n", debug_cudaError(err));
    }

    return err;
}

cudaError_t WINAPI wine_cudaMemcpy(void *dst, const void *src, size_t count, enum cudaMemcpyKind kind) {
    WINE_TRACE("%p, %p, %d, %d\n", dst, src, count, kind);

    cudaError_t err = cudaMemcpy(dst, src, count, kind);

    if (err) {
        WINE_TRACE("return %s\n", debug_cudaError(err));
    }

    return err;
}

cudaError_t WINAPI wine_cudaMemcpyFromSymbol(void *dst, const char *symbol, size_t count, size_t offset,
                                             enum cudaMemcpyKind kind) {
    WINE_TRACE("\n");
    return cudaMemcpyFromSymbol(dst, symbol, count, offset, kind);
}

cudaError_t WINAPI wine_cudaMemcpyToSymbol(const char *symbol, const void *src, size_t count, size_t offset,
                                           enum cudaMemcpyKind kind) {
    WINE_TRACE("\n");
    return cudaMemcpyToSymbol(symbol, src, count, offset, kind);
}

void** WINAPI wine_cudaRegisterFatBinary(void *fatCubin) {
    WINE_TRACE("\n");
    return __cudaRegisterFatBinary(fatCubin);
}

void WINAPI wine_cudaRegisterFunction(void **fatCubinHandle, const char *hostFun, char *deviceFun,
                                      const char *deviceName, int thread_limit, uint3 *tid,
                                      uint3 *bid, dim3 *bDim, dim3 *gDim, int *wSize) {
    WINE_TRACE("\n");
    __cudaRegisterFunction(fatCubinHandle, hostFun, deviceFun, deviceName, thread_limit, tid, bid,
                           bDim, gDim, wSize);
}

void WINAPI wine_cudaRegisterVar(void **fatCubinHandle, char *hostVar, char *deviceAddress,
                                 const char  *deviceName, int ext, int size, int constant,
                                 int global) {
    WINE_TRACE("\n");
    __cudaRegisterVar(fatCubinHandle, hostVar, deviceAddress, deviceName, ext, size, constant, global);
}

void WINAPI wine_cudaRegisterShared(void **fatCubinHandle, void **devicePtr) {
    WINE_TRACE("\n");
    __cudaRegisterShared(fatCubinHandle, devicePtr);
}

void WINAPI wine_cudaRegisterSharedVar(void **fatCubinHandle, void **devicePtr, size_t size,
                                    size_t alignment, int storage) {
    WINE_TRACE("\n");
    __cudaRegisterSharedVar(fatCubinHandle, devicePtr, size, alignment, storage);
}

cudaError_t WINAPI wine_cudaSetDevice(int device) {
    WINE_TRACE("\n");
    return cudaSetDevice(device);
}

void WINAPI wine_cudaUnregisterFatBinary(void **fatCubinHandle) {
    WINE_TRACE("\n");
    __cudaUnregisterFatBinary(fatCubinHandle);
}

cudaError_t WINAPI wine_cudaFree(void *devPtr) {
    WINE_TRACE("\n");
    return cudaFree(devPtr);
}

cudaError_t WINAPI wine_cudaMalloc(void **devPtr, size_t size) {
    WINE_TRACE("\n");
    return cudaMalloc(devPtr, size);
}
cudart.dll.spec

Code: Select all

    @ stdcall __cudaRegisterFatBinary(ptr) wine_cudaRegisterFatBinary
    @ stdcall __cudaRegisterFunction(ptr ptr ptr ptr long ptr ptr ptr ptr ptr) wine_cudaRegisterFunction
    @ stdcall __cudaRegisterVar(ptr ptr ptr ptr long long long long) wine_cudaRegisterVar
    @ stdcall __cudaRegisterShared(ptr ptr) wine_cudaRegisterShared
    @ stdcall __cudaRegisterSharedVar(ptr ptr long long long) wine_cudaRegisterSharedVar
    @ stdcall __cudaUnregisterFatBinary(ptr) wine_cudaUnregisterFatBinary
    @ stub cudaBindTexture
    @ stub cudaBindTextureToArray
    @ stub cudaChooseDevice
    @ stdcall cudaConfigureCall(ptr ptr long long) wine_cudaConfigureCall
    @ stub cudaCreateChannelDesc
    @ stub cudaD3D9Begin
    @ stub cudaD3D9End
    @ stub cudaD3D9GetDevice
    @ stub cudaD3D9GetDirect3DDevice
    @ stub cudaD3D9MapResources
    @ stub cudaD3D9MapVertexBuffer
    @ stub cudaD3D9RegisterResource
    @ stub cudaD3D9RegisterVertexBuffer
    @ stub cudaD3D9ResourceGetMappedPitch
    @ stub cudaD3D9ResourceGetMappedPointer
    @ stub cudaD3D9ResourceGetMappedSize
    @ stub cudaD3D9ResourceGetSurfaceDimensions
    @ stub cudaD3D9ResourceSetMapFlags
    @ stub cudaD3D9SetDirect3DDevice
    @ stub cudaD3D9UnmapResources
    @ stub cudaD3D9UnmapVertexBuffer
    @ stub cudaD3D9UnregisterResource
    @ stub cudaD3D9UnregisterVertexBuffer
    @ stub cudaEventCreate
    @ stub cudaEventDestroy
    @ stub cudaEventElapsedTime
    @ stub cudaEventQuery
    @ stub cudaEventRecord
    @ stub cudaEventSynchronize
    @ stdcall cudaFree(ptr) wine_cudaFree
    @ stub cudaFreeArray

    @ stub cudaFreeHost
    @ stub cudaGetChannelDesc
    @ stub cudaGetDevice
    @ stub cudaGetDeviceCount
    @ stdcall cudaGetDeviceProperties(ptr long) wine_cudaGetDeviceProperties
    @ stdcall cudaGetErrorString(long) wine_cudaGetErrorString
    @ stdcall cudaGetLastError() wine_cudaGetLastError
    @ stub cudaGetSymbolAddress
    @ stub cudaGetSymbolSize
    @ stub cudaGetTextureAlignmentOffset
    @ stub cudaGetTextureReference
    @ stub cudaGLMapBufferObject
    @ stub cudaGLRegisterBufferObject
    @ stub cudaGLSetGLDevice
    @ stub cudaGLUnmapBufferObject
    @ stub cudaGLUnregisterBufferObject
    @ stdcall cudaLaunch(ptr) wine_cudaLaunch
    @ stdcall cudaMalloc(ptr long) wine_cudaMalloc
    @ stub cudaMalloc3D
    @ stub cudaMalloc3DArray
    @ stub cudaMallocArray
    @ stub cudaMallocHost
    @ stub cudaMallocPitch
    @ stdcall cudaMemcpy(ptr ptr long long) wine_cudaMemcpy
    @ stub cudaMemcpy2D
    @ stub cudaMemcpy2DArrayToArray
    @ stub cudaMemcpy2DFromArray
    @ stub cudaMemcpy2DToArray
    @ stub cudaMemcpy3D
    @ stub cudaMemcpyArrayToArray
    @ stub cudaMemcpyFromArray
    @ stdcall cudaMemcpyFromSymbol(ptr ptr long long long) wine_cudaMemcpyFromSymbol
    @ stub cudaMemcpyToArray
    @ stdcall cudaMemcpyToSymbol(ptr ptr long long long) wine_cudaMemcpyToSymbol
    @ stub cudaMemset
    @ stub cudaMemset2D
    @ stub cudaMemset3D
    @ stub cudaRegisterFatBinary
    @ stdcall cudaSetDevice(long) wine_cudaSetDevice
    @ stub cudaSetupArgument
    @ stub cudaStreamCreate
    @ stub cudaStreamDestroy
    @ stub cudaStreamQuery
    @ stub cudaStreamSynchronize
    @ stub cudaThreadExit
    @ stub cudaThreadSynchronize
    @ stub cudaUnbindTexture
cudart.h

Code: Select all

    #include "cuda_runtime_api.h"

    void** __cudaRegisterFatBinary(void *fatCubin);
    void __cudaUnregisterFatBinary(void **fatCubinHandle);

    void __cudaRegisterFunction(void **fatCubinHandle, const char *hostFun, char *deviceFun,
                                const char *deviceName, int thread_limit, uint3 *tid,
                                uint3 *bid, dim3 *bDim, dim3 *gDim, int *wSize);

    void __cudaRegisterVar(void **fatCubinHandle, char *hostVar, char *deviceAddress,
                           const char  *deviceName, int ext, int size, int constant,
                           int global);

    void __cudaRegisterShared(void **fatCubinHandle, void **devicePtr);

    void __cudaRegisterSharedVar(void **fatCubinHandle, void **devicePtr, size_t size,
                                 size_t alignment, int storage);
Makefile

Code: Select all

### Generated by Winemaker


SRCDIR                = .
SUBDIRS               =
DLLS                  = cudart.dll
EXES                  =



### Common settings

CEXTRA                =
CXXEXTRA              =
RCEXTRA               =
INCLUDE_PATH          = -I/usr/local/cuda/include
DLL_PATH              =
LIBRARY_PATH          = -L/usr/local/cuda/lib
LIBRARIES             = -lcudart
DEFINES               = -DUSE_SLEEPWAIT=300000    # 300 usecs seems to give reasonable results


### cudart.dll sources and settings

cudart_dll_MODULE     = cudart.dll
cudart_dll_C_SRCS     = cudart.c
cudart_dll_CXX_SRCS   =
cudart_dll_RC_SRCS    =
cudart_dll_LDFLAGS    = -shared \
         $(cudart_dll_MODULE:%=%.spec)
cudart_dll_DLL_PATH   =
cudart_dll_DLLS       = odbc32 \
         ole32 \
         oleaut32 \
         winspool
cudart_dll_LIBRARY_PATH=
cudart_dll_LIBRARIES  = uuid

cudart_dll_OBJS       = $(cudart_dll_C_SRCS:.c=.o) \
         $(cudart_dll_CXX_SRCS:.cpp=.o) \
         $(cudart_dll_RC_SRCS:.rc=.res)



### Global source lists

C_SRCS                = $(cudart_dll_C_SRCS)
CXX_SRCS              = $(cudart_dll_CXX_SRCS)
RC_SRCS               = $(cudart_dll_RC_SRCS)


### Tools

CC = winegcc -m32
CXX = wineg++ -m32
RC = wrc


### Generic targets

all: $(SUBDIRS) $(DLLS:%=%.so) $(EXES:%=%.so)

### Build rules

.PHONY: all clean dummy

$(SUBDIRS): dummy
	@cd $@ && $(MAKE)

# Implicit rules

.SUFFIXES: .cpp .rc .res
DEFINCL = $(INCLUDE_PATH) $(DEFINES) $(OPTIONS)

.c.o:
	$(CC) -c $(CFLAGS) $(CEXTRA) $(DEFINCL) -o $@ $<

.cpp.o:
	$(CXX) -c $(CXXFLAGS) $(CXXEXTRA) $(DEFINCL) -o $@ $<

.cxx.o:
	$(CXX) -c $(CXXFLAGS) $(CXXEXTRA) $(DEFINCL) -o $@ $<

.rc.res:
	$(RC) $(RCFLAGS) $(RCEXTRA) $(DEFINCL) -fo$@ $<

# Rules for cleaning

CLEAN_FILES     = y.tab.c y.tab.h lex.yy.c core *.orig *.rej \
                  \\\#*\\\# *~ *% .\\\#*

clean:: $(SUBDIRS:%=%/__clean__) $(EXTRASUBDIRS:%=%/__clean__)
	$(RM) $(CLEAN_FILES) $(RC_SRCS:.rc=.res) $(C_SRCS:.c=.o) $(CXX_SRCS:.cpp=.o)
	$(RM) $(DLLS:%=%.so) $(EXES:%=%.so) $(EXES:%.exe=%)

$(SUBDIRS:%=%/__clean__): dummy
	cd `dirname $@` && $(MAKE) clean

$(EXTRASUBDIRS:%=%/__clean__): dummy
	-cd `dirname $@` && $(RM) $(CLEAN_FILES)

### Target specific build rules
DEFLIB = $(LIBRARY_PATH) $(LIBRARIES) $(DLL_PATH)

$(cudart_dll_MODULE).so: $(cudart_dll_OBJS)
	$(CC) $(cudart_dll_LDFLAGS) -o $@ $(cudart_dll_OBJS) $(cudart_dll_LIBRARY_PATH) $(DEFLIB) $(cudart_dll_DLLS:%=-l%) $(cudart_dll_LIBRARIES:%=-l%)
1.3 Go into the directory and run make:

Code: Select all

make
You will likely get errors like:
Makefile:68: *** missing separator. Stop.
The errors are due to the code tags in the forum. To fix this, change the spaces at the beginning of the line for a tab, on every line you get this error.

1.4 Rename the newly compiled cudart.dll.so to nvcuda.dll and copy it to 'drive_c/windows/system32'

Code: Select all

cp -a cudart.dll.so ~/drive_c/windows/system32/nvcuda.dll
1.5 As root, copy the CUDA libraries to the lib32 folder:

Code: Select all

cp -a /usr/local/cuda/lib/* /usr/lib32
2. Download and install the F@H GPU Client

2.1 Goto http://folding.stanford.edu/English/DownloadWinOther and get the XP console client. Unzip it to a folder.

2.2 Change into the directory you extracted the zip to and run

Code: Select all

nice -n18 wine folding@home-Win32-GPU.exe -forcegpu nvidia_g80
The GPU client should now be running. Thanks to actong, andromeda and everyone else who contributed in the folding forums.

EDIT: Updated, no need to recompile wine.
EDIT: Clarified a bit
Last edited by rada on Wed Sep 03, 2008 4:13 pm, edited 4 times in total.
Top
rada
Apprentice
Apprentice
Posts: 202
Joined: Fri Oct 21, 2005 11:39 pm
Location: Ottawa, Canada
Contact:
Contact rada
Website

  • Quote

Post by rada » Tue Jul 29, 2008 7:14 pm

For 32-bit users the tutorial is the exact same but there are two small modifications:

1. In the makefile, remove the two instances of -m32.

2. Instead of copying the cuda libraries to the lib32 folder, copy them to the lib folder:

Code: Select all

cp -a /usr/local/cuda/lib/* /usr/lib
Top
rada
Apprentice
Apprentice
Posts: 202
Joined: Fri Oct 21, 2005 11:39 pm
Location: Ottawa, Canada
Contact:
Contact rada
Website

  • Quote

Post by rada » Mon Aug 04, 2008 6:59 pm

So has this been useful for anyone?
Top
rada
Apprentice
Apprentice
Posts: 202
Joined: Fri Oct 21, 2005 11:39 pm
Location: Ottawa, Canada
Contact:
Contact rada
Website

  • Quote

Post by rada » Sat Aug 16, 2008 6:27 pm

updated.
Top
myceliv
Apprentice
Apprentice
User avatar
Posts: 178
Joined: Thu Nov 29, 2007 4:17 pm

  • Quote

Post by myceliv » Wed Sep 03, 2008 3:53 am

Thanks! This is very cool. Since cutting way back on gaming, 8800 has been sort of wasted. Now it is doing something more useful. Guess will keep it around a while longer. You could make it clear that only steps 1.1 and 1.5 require root. Tried to think of a way to do this completely as user, but couldn't work it out. Thanks again.
Top
rada
Apprentice
Apprentice
Posts: 202
Joined: Fri Oct 21, 2005 11:39 pm
Location: Ottawa, Canada
Contact:
Contact rada
Website

  • Quote

Post by rada » Wed Sep 03, 2008 4:14 pm

done. happy this was of help :)
Top
shadowknight
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 142
Joined: Sat Aug 03, 2002 7:13 pm

  • Quote

Post by shadowknight » Fri Jul 17, 2009 4:46 am

I can't believe this post isn't more popular.... You have my thanks. I know I'm a bit late in regards to the original post date, but the information was still useful and accurate. I hate the cpu clients, and until now didn't realize the GPU client would run in wine.... So again, a big thank you!
Top
Alanceil
n00b
n00b
User avatar
Posts: 36
Joined: Tue Aug 14, 2007 10:25 pm
Location: Regensburg, Germany

  • Quote

Post by Alanceil » Tue Sep 01, 2009 1:23 pm

Just a note for anyone else trying this out and using Nvidia GPUs:
If you get the dreaded UNSTABLE_MACHINE error, make sure to use =x11-drivers/nvidia-drivers-180.60 . Any newer version failed for me, using a GeForce GTX 275.

You might also want to enable Powermizer to underclock your graphics card - full speed caused around 90C GPU Temperature on my rig. Setting Powermizer to medium got it down to a much better 65C. For this you'll have to add a line to your /etc/X11/xorg.conf Device section:

Code: Select all

Option   "RegistryDwords"   "PowerMizerEnable=0x1; PerfLevelSrc=0x2222; PowerMizerDefault=0x2; PowerMizerDefaultAC=0x2"
Source: http://tutanhamon.com.ua/technovodstvo/ ... IX-driver/

I found some other reports about a PowerMizerLevel=0x2 setting, this didn't work for me. You can check your current temperature and GPU frequency by running nvidia-settings (media-video/nvidia-settings).

Happy crunching,
Alan
Top
jimerickson
n00b
n00b
Posts: 11
Joined: Sat Jul 19, 2008 11:43 pm

nvclock

  • Quote

Post by jimerickson » Fri Sep 11, 2009 9:53 pm

if your card is getting that hot you may want to try nvclock to speed up your fan. just use:

nvclock -f -F 100

the -i switch will display everything you could want to know about your card. i am using a gtx8800 and its fan only runs at 60% by default and never seems to speed up unless i use nvclock. happy folding and best regards.
Top
Jagaer
n00b
n00b
Posts: 16
Joined: Fri Feb 27, 2004 4:53 am
Location: Kingston, On, Canada

  • Quote

Post by Jagaer » Fri Oct 23, 2009 4:46 pm

Working, thanks

Although there is a performance hit, to be expected running through wine, I guess.
Top
rada
Apprentice
Apprentice
Posts: 202
Joined: Fri Oct 21, 2005 11:39 pm
Location: Ottawa, Canada
Contact:
Contact rada
Website

  • Quote

Post by rada » Sat Oct 24, 2009 6:26 pm

which drivers do you have it working with?
Top
SandStar
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 77
Joined: Mon Jan 24, 2005 11:09 pm

  • Quote

Post by SandStar » Mon Nov 02, 2009 7:37 pm

rada wrote:which drivers do you have it working with?
Drivers >180.06 don't work with folding
Top
SteveBallmersChair
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 84
Joined: Wed Jul 12, 2006 3:18 am
Location: Being thrown around in Redmond

  • Quote

Post by SteveBallmersChair » Tue Jun 08, 2010 2:21 pm

I managed to get this to work with just a few tweaks on amd64 on my new GTS250 with the current stable 195.36.24 drivers. Here's what I needed to change:

1. The most current version of CUDA is 3.0, which is not compatible with the wrappers used here, you will need to use CUDA 2.x. Unfortunately the posted link to the Ubuntu 7.04 CUDA 2.0 beta does not work any more. I managed to extract the address for the latest CUDA 2.x series for x86 from the nvidia-cuda-toolkit ebuild, and it is the following: http://www.nvidia.com/object/thankyou.h ... hel5.3.run

2. The Makefile bugs out on my system even after correcting the spaces to tabs. However, somebody has successfully compiled and posted the cudart.dll.so at http://www.hyperchronos.org/cudart.dll.so . Put this in place of the cudart.dll.so that you were supposed to compile with the Makefile and it works perfectly.

That's it!

NB: This guide has the niceness of the GPU client set at 18, which means it will run at a higher priority than the CPU client (default niceness of 19) if you haven't mucked with the core priority in the CPU client. If you have set the priority in the CPU client to "low" rather than "idle," the CPU client then runs with a niceness of 13 and will starve the GPU client of CPU cycles and kill GPU performance without adding much to CPU client performance. You will either want to start the GPU client with "nice -n12" instead of "-nice -n18" or reset the CPU client core priority to idle.
Unix is user friendly- it is just picky who its friends are.
Top
rada
Apprentice
Apprentice
Posts: 202
Joined: Fri Oct 21, 2005 11:39 pm
Location: Ottawa, Canada
Contact:
Contact rada
Website

  • Quote

Post by rada » Sat Jun 12, 2010 12:15 pm

Nice, I got it working in Linux again. Happy to see there's still interest in this topic. Thanks guys!

Unfortunately using a binary cudart.dll.so means that the wrapper is now not open source and if there are any bugs in the future, we'll hope whoever coded this one will patch it.
Top
while1
n00b
n00b
User avatar
Posts: 17
Joined: Tue Sep 18, 2007 6:19 pm
Location: Lund, Sweden

  • Quote

Post by while1 » Fri Nov 12, 2010 8:16 am

Anyone got this to work recently? I tried the above binary dll as suggested but it complains about a nvcuda.dll when trying to run it which isn't even mentioned here. I tried copying the cudart.dll to nvcuda.dll but it still doesn't work. I've got a GTX 470. Could this be the problem? Its a quite new card so maybe it isnt supported yet or something?

So sad to have a new, really fast gpu just wasting cycles. Any help would be greatly appreciated!
Top
while1
n00b
n00b
User avatar
Posts: 17
Joined: Tue Sep 18, 2007 6:19 pm
Location: Lund, Sweden

  • Quote

Post by while1 » Fri Dec 10, 2010 4:28 pm

Got this working on my GTX 470 btw.

If someone wants to know, you need to use the 32bit cuda toolkit, even if you're on amd64, so you get the right lib files for the client. I installed this manually using this script for ubuntu:

Code: Select all

wget http://developer.download.nvidia.com/compute/cuda/3_0/toolkit/cudatoolkit_3.0_linux_32_ubuntu9.04.run
I ran this file and added the lib file dir bu creating /etc/ld.so.conf.d/cuda.conf and adding the dir to the file.

You can check if the dll's are linked properly using

Code: Select all

ldd .wine/drive_c/windows/system32/cudart.dll
ldd .wine/drive_c/windows/system32/cufft.dll
where libcudart.so.3 and libcufft.so.3 should point to your manually installed lib files

I use "-forcegpu nvidia_fermi" instead of "nvidia_g80" as well. Should go for all newer nvidia cards that support fermi I guess.

Otherwise I think I followed the guide above...
Top
JanErik
Guru
Guru
Posts: 488
Joined: Mon Oct 28, 2002 9:02 pm
Location: Finland

  • Quote

Post by JanErik » Mon Feb 14, 2011 11:55 am

I followed this guide and it worked right away: http://linuxfah.info/index.php?title=Main_Page .
Top
Post Reply

17 posts • Page 1 of 1

Return to “Unsupported Software”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic