GPU2 in Linux via WINE

Moderators: slegrand, Site Moderators, PandeGroup

GPU2 in Linux via WINE

Postby Shelnutt2 » Fri Jul 04, 2008 3:11 am

Some of us over at overclockers (T32), are looking into running the GPU2 client in Linux via WINE. Having the 173-177 linux driver installed mean we have CUDA support and if WINE can translate the direct3d calls into opengl then there is a good chance it will work. Now the problem we have right up front is that the GPU2 client will not run as it is saying we don't have a compatible card. Which is understandable as it is seeing the wine emulation not the Nvidia 8800. Now the question for you guys is, how does the GPU2 client detect the cards? Is it via checking some registry keys? If you would tell us this then we know what we have to change in order to get the client to start. If not then I guess ever possible method will have to be checked.

Thanks
OCforums, T32

Linux Lober!
Shelnutt2
 
Posts: 150
Joined: Sun Dec 02, 2007 5:37 pm

Re: GPU2 in Linux via WINE

Postby bruce » Fri Jul 04, 2008 3:34 am

I can't answer your questions, but I do know that there will be a Linux version at some point. First there will need to be a stable Windows version before they try to port it to Linux, but I have faith that it's going to happen.

I'm quite sure that there also will be some driver upgrades required to support the proper CAL/CUDA calls in native Linux. (Just look at the number of posts that focus on Windows native drivers.) I can't imagine that those calls are supported by the WINE emulated drivers.
bruce
 
Posts: 22369
Joined: Thu Nov 29, 2007 10:13 pm
Location: So. Cal.

Re: GPU2 in Linux via WINE

Postby leexgx » Fri Jul 04, 2008 5:59 pm

GPU2 does not use DX any more or openGL
Image
leexgx
 
Posts: 552
Joined: Mon Dec 03, 2007 8:05 am

Re: GPU2 in Linux via WINE

Postby Oak37 » Fri Jul 04, 2008 6:12 pm

Shelnutt2 wrote:Some of us over at overclockers (T32), are looking into running the GPU2 client in Linux via WINE. Having the 173-177 linux driver installed mean we have CUDA support and if WINE can translate the direct3d calls into opengl then there is a good chance it will work. Now the problem we have right up front is that the GPU2 client will not run as it is saying we don't have a compatible card. Which is understandable as it is seeing the wine emulation not the Nvidia 8800. Now the question for you guys is, how does the GPU2 client detect the cards? Is it via checking some registry keys? If you would tell us this then we know what we have to change in order to get the client to start. If not then I guess ever possible method will have to be checked.

Thanks

Out of interest, how are you installing it? Wine (at least the version I have) only recognises executable files and the GPU client is a .msi
Image
User avatar
Oak37
 
Posts: 134
Joined: Tue Dec 04, 2007 6:21 pm
Location: Ireland

Re: GPU2 in Linux via WINE

Postby uncle_fungus » Fri Jul 04, 2008 6:15 pm

You can run
Code: Select all
msiexec /i installer.msi
User avatar
uncle_fungus
Site Admin
 
Posts: 1682
Joined: Fri Nov 30, 2007 9:37 am
Location: Oxfordshire, UK

Re: GPU2 in Linux via WINE

Postby Shelnutt2 » Sun Jul 06, 2008 9:15 pm

Well we got the client starting but CUDA fails.

Code: Select all
zerix01@DeepThought:~/.wine/drive_c/Program Files/Folding@home/Folding@home-gpu$ wine Folding@home.exe                                                                                           
fixme:d3d:IWineD3DImpl_FillGLCaps OpenGL implementation supports 32 vertex samplers and 32 total samplers                                                                                         
fixme:d3d:IWineD3DImpl_FillGLCaps Expected vertex samplers + MAX_TEXTURES(=8) > combined_samplers
fixme:win:EnumDisplayDevicesW ((null),0,0x32f40c,0x00000000), stub!                             
Reading file work/wudata_06.tpr, VERSION 3.1.4 (single precision)                               
Reading file work/wudata_06.tpr, VERSION 3.1.4 (single precision)
Reading sasa-enabled ir 0 0
Initializing Nvidia gpu library
cudaMalloc CUDAStream::Allocate failed feature is not yet implemented
Reading file work/wudata_07.tpr, VERSION 3.1.4 (single precision)
Reading file work/wudata_07.tpr, VERSION 3.1.4 (single precision)
Reading sasa-enabled ir 0 0
Initializing Nvidia gpu library
cudaMalloc CUDAStream::Allocate failed feature is not yet implemented


I am going to attempt to write a wrapper for CUDA. The problem is that Wine as of yet can't translate the calls from cudart.dll to libcudart.so . It simply doesn't know what to do. The fact is though that there is support there we just need a wrapper. It would be of great help if you could list off the calls and cuda functions you use that way I only have to write a wrapper for what FAH uses and not the entire cudart API. I'm not asking for source code, not at all, I know the policy on that. I've just asking for a list of functions in no order so that I don't have to translate every single function if there are a bunch that aren't used by FAH.
Shelnutt2
 
Posts: 150
Joined: Sun Dec 02, 2007 5:37 pm

Re: GPU2 in Linux via WINE

Postby actong » Tue Jul 15, 2008 4:58 pm

Well this piqued my interest so I created a thunk for cudart.dll to see how well it would run with wine. I've run a couple of WUs and performance seems to be on par with windows (~4600ppd with a 8800gt) though it does seem to make X sluggish. My question now is, is there some way to verify if it's giving correct results?

It would be of great help if you could list off the calls and cuda functions you use that way I only have to write a wrapper for what FAH uses and not the entire cudart API. I'm not asking for source code, not at all, I know the policy on that. I've just asking for a list of functions in no order so that I don't have to translate every single function if there are a bunch that aren't used by FAH.


You can do
Code: Select all
strings FahCore_11.exe | grep cuda
to find all the functions you'd need to wrap.
actong
 
Posts: 18
Joined: Tue Jul 15, 2008 4:28 pm

Re: GPU2 in Linux via WINE

Postby Shelnutt2 » Tue Jul 15, 2008 5:05 pm

actong wrote:Well this piqued my interest so I created a thunk for cudart.dll to see how well it would run with wine. I've run a couple of WUs and performance seems to be on par with windows (~4600ppd with a 8800gt) though it does seem to make X sluggish. My question now is, is there some way to verify if it's giving correct results?



How did you get it to run? I've been working on a CUDA wrapper for a little bit now and as of yet it still produces a seg fault. You can read the wine dev mailing list and see the prgoress we've made, but if you have a working solution now, please share it with us all.
Shelnutt2
 
Posts: 150
Joined: Sun Dec 02, 2007 5:37 pm

Re: GPU2 in Linux via WINE

Postby theo343 » Tue Jul 15, 2008 10:41 pm

I was thinking about moving most of my CPU folders to Linux but no support for GPU2 made me wait, so if there is a working solution with Wine, please share :)
Image
theo343
 
Posts: 448
Joined: Thu Jul 03, 2008 12:43 pm
Location: Norway

Re: GPU2 in Linux via WINE

Postby actong » Tue Jul 15, 2008 10:55 pm

I haven't tried running your version, but from the spec file it looks like you're missing implementations for cudaMemcpyToSymbol, cudaMemcpyFromSymbol, __cudaRegisterFatBinary, __cudaRegisterFunction, __cudaRegisterVar, __cudaRegisterSharedVar, __cudaRegisterShared, and __cudaUnregisterFatBinary. The declarations for the latter can be found in crt/host_runtime.h. Here's my source (it assumes cuda toolkit installed in /usr/local/cuda):

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);


cudart.c
Code: Select all
#include <windows.h>
#include "cudart.h"

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

cudaError_t WINAPI wine_cudaConfigureCall(dim3 gridDim, dim3 blockDim, size_t sharedMem,
                                          cudaStream_t stream) {
    return cudaConfigureCall(gridDim, blockDim, sharedMem, stream);
}

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

const char* WINAPI wine_cudaGetErrorString(cudaError_t error) {
    return cudaGetErrorString(error);
}

cudaError_t WINAPI wine_cudaGetLastError() {
    return cudaGetLastError();
}

cudaError_t WINAPI wine_cudaLaunch(const char *symbol) {
    return cudaLaunch(symbol);
}

cudaError_t WINAPI wine_cudaMemcpy(void *dst, const void *src, size_t count, enum cudaMemcpyKind kind) {
    return cudaMemcpy(dst, src, count, kind);
}

cudaError_t WINAPI wine_cudaMemcpyFromSymbol(void *dst, const char *symbol, size_t count, size_t offset,
                                             enum cudaMemcpyKind kind) {
    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) {
    return cudaMemcpyToSymbol(symbol, src, count, offset, kind);
}

void** WINAPI wine_cudaRegisterFatBinary(void *fatCubin) {
    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) {
    __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) {
    __cudaRegisterVar(fatCubinHandle, hostVar, deviceAddress, deviceName, ext, size, constant, global);
}

void WINAPI wine_cudaRegisterShared(void **fatCubinHandle, void **devicePtr) {
    __cudaRegisterShared(fatCubinHandle, devicePtr);
}

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

cudaError_t WINAPI wine_cudaSetDevice(int device) {
    return cudaSetDevice(device);
}

void WINAPI wine_cudaUnregisterFatBinary(void **fatCubinHandle) {
    __cudaUnregisterFatBinary(fatCubinHandle);
}

cudaError_t WINAPI wine_cudaFree(void *devPtr) {
    return cudaFree(devPtr);
}

cudaError_t WINAPI wine_cudaMalloc(void **devPtr, size_t size) {
    return cudaMalloc(devPtr, size);
}


Makefile
Code: Select all
### Generated by Winemaker


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



### Common settings

CEXTRA                = -mno-cygwin
CXXEXTRA              = -mno-cygwin
RCEXTRA               =
INCLUDE_PATH          = -I/usr/local/cuda/include
DLL_PATH              =
LIBRARY_PATH          = -L/usr/local/cuda/lib
LIBRARIES             = -lcudart


### 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) \
                        -mno-cygwin
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
CXX = wineg++
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%)
actong
 
Posts: 18
Joined: Tue Jul 15, 2008 4:28 pm

Re: GPU2 in Linux via WINE

Postby Shelnutt2 » Tue Jul 15, 2008 11:44 pm

actong wrote:I haven't tried running your version, but from the spec file it looks like you're missing implementations for cudaMemcpyToSymbol, cudaMemcpyFromSymbol, __cudaRegisterFatBinary, __cudaRegisterFunction, __cudaRegisterVar, __cudaRegisterSharedVar, __cudaRegisterShared, and __cudaUnregisterFatBinary. The declarations for the latter can be found in crt/host_runtime.h. Here's my source (it assumes cuda toolkit installed in /usr/local/cuda):

<snip>




Yes as you point out I did not implement those 6 functions. I commented out the lines of code because as you say they contained c++ not c code. I chose to ignore this until I got a working wrapper and then I'd go back and implement the 6 and also the direct3d calls.

I get an error when trying to user your makefile. But I was able to manually compile the file. I've sent the binary to a fellow to be tested as I don't actually have a GPU capable of CUDA.

Code: Select all
shelnutt@Ubuntu32-L:~/wine/patches/cuda-his$ make
winegcc -c  -mno-cygwin -I/usr/local/cuda/include   -o cudart.o cudart.c
winegcc  -o cudart.dll.so   -L/usr/local/cuda/lib -lcudart   
/usr/local/lib/wine/libwinecrt0.a(exe_main.o): In function `main':
/home/shelnutt/wine/dlls/winecrt0/exe_main.c:48: undefined reference to `WinMain'
collect2: ld returned 1 exit status
winegcc: gcc failed
make: *** [cudart.dll.so] Error 2



Now I see your changes you made to the files and I see you implemented only the functions that were used by FaH.
What license have you released this code under? I would like you go a head and implement the missing 6 functions the way you have into my code and then minus the direct3d calls I would have a complete wrapper for all functions of cudart.dll. My code is released under the LGPL v2.1 or late in order to be compatible with Wine..personally I'd prefer to release all my work under the GPL. I'm more than happy to include your name (real or just fah username) in the heading of the files in order to give credit where credit is due for the 6 functions.
Shelnutt2
 
Posts: 150
Joined: Sun Dec 02, 2007 5:37 pm

Re: GPU2 in Linux via WINE

Postby actong » Wed Jul 16, 2008 12:26 am

winegcc -o cudart.dll.so -L/usr/local/cuda/lib -lcudart


Strange, it should have had a "-shared" to make it build a dll. It's in the makefile, so I'm not sure what's going on.

I'm not really too familiar with licenses. LGPL v2.1 sounds fine though.
actong
 
Posts: 18
Joined: Tue Jul 15, 2008 4:28 pm

Re: GPU2 in Linux via WINE

Postby Shelnutt2 » Wed Jul 16, 2008 1:13 am

actong wrote:
winegcc -o cudart.dll.so -L/usr/local/cuda/lib -lcudart


Strange, it should have had a "-shared" to make it build a dll. It's in the makefile, so I'm not sure what's going on.

I'm not really too familiar with licenses. LGPL v2.1 sounds fine though.


Ok, and we are getting an error with your code about not being able to find the libcudart.so.2.0.

I was looking through your code and I'm wondering what the purpose of these functions are. They are not part of the functions in the cudart reference manual and I can't see any relevance to having them..

Code: Select all
void** WINAPI wine_cudaRegisterFatBinary(void *fatCubin) {
        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) {
        __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) {
        __cudaRegisterVar(fatCubinHandle, hostVar, deviceAddress, deviceName, ext, size, constant, global);
    }

    void WINAPI wine_cudaRegisterShared(void **fatCubinHandle, void **devicePtr) {
        __cudaRegisterShared(fatCubinHandle, devicePtr);
    }

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

    void WINAPI wine_cudaUnregisterFatBinary(void **fatCubinHandle) {
        __cudaUnregisterFatBinary(fatCubinHandle);
    }
Shelnutt2
 
Posts: 150
Joined: Sun Dec 02, 2007 5:37 pm

Re: GPU2 in Linux via WINE

Postby actong » Wed Jul 16, 2008 2:51 am

Ok, and we are getting an error with your code about not being able to find the libcudart.so.2.0.


You need to have a working cuda installation for it to work. If you do have it installed, then maybe you just need to add /usr/local/cuda/lib to your LD_LIBRARY_PATH before you run the client.

I was looking through your code and I'm wondering what the purpose of these functions are. They are not part of the functions in the cudart reference manual and I can't see any relevance to having them.


They're exported by cudart.dll/libcudart.so and are referenced by the gpu2 core (and I imagine by any cuda program). They look to be part of the cuda internals and are not meant to be called directly by the user code. References to those functions are probably automatically added by the nvcc compiler. In any case, the thunk library needs to forward those calls to the native library, otherwise you're just going to get some undefined function errors.
actong
 
Posts: 18
Joined: Tue Jul 15, 2008 4:28 pm

Re: GPU2 in Linux via WINE

Postby Mindmatter » Wed Jul 16, 2008 9:23 am

actong wrote: My question now is, is there some way to verify if it's giving correct results?


Is the console showing any F@H status? Are you running FAHMon to show the current WU status? Did you get credit for those WU's?

I would assume that if anything was off the client would detect the error and give some sort of error, EUE, or start and finish WU's in a really short amount of time (like download, try to start, error, download new WU). Also does the client have a log for current and past WU's that could give any hint of issues?

Nvidia made Cuda to be cross platform compatible, so as long as we are sending the correct information to the cuda driver and the client is getting back what it is asking for then there should be no problems with the science side of this.
Mindmatter
 
Posts: 47
Joined: Tue May 27, 2008 1:53 pm

Next

Return to unOfficial Linux GPU (WINE wrapper) (3rd party support)

Who is online

Users browsing this forum: No registered users and 0 guests

cron