Seth Shelnutt wrote:
|Alright, I'm stumped and everyone else is too. Few years ago we did
everything we are doing now and it all worked fine. Now using wine
1.2rc2 we can't get a wrapper I compiled to work. What this wrapper
does is it translates/wraps the calls made to the cuda runtime dll
(cudart.dll or nvcuda.dll, same file different names) and sends it to
the linux library. The linux library and windows are identical except
for some missing dx functions in the linux library. My sources can be
found here. http://shelnutt2.host56.com/cudart/ and
http://shelnutt2.host56.com/cufft/ (However we aren't even getting to
the second dll yet). Anytime we try to run folding at home in wine, we
are getting the following. FAH checks for nvcuda.dll first because
that comes with the driver installs on windows, if it doesn't find it,
it defaults to cudart.dll which is packaged with fah, or can be
installed separately. We have replaced all the cuda dlls with the
compiled wrapper or sum linked to the compiled wrapper, just like we
use to with the original cuda wrapper that we came up with.
err:module:import_dll Loading library nvcuda.dll (which is needed by
L"Z:\\home\\sidicas\\.FAHGPU3\\FahCore_11.exe") failed (error c0000020).
err:module:import_dll Loading library cudart.dll (which is needed by
L"Z:\\home\\sidicas\\.FAHGPU3\\FahCore_11.exe") failed (error c0000020).
|
|sidi...@belldandy:~/.FAHGPU3$ ls -al *.dll
-rw-r--r-- 1 sidicas sidicas 1617920 2010-06-03 01:48 amdcalcl.dll
-rw-r--r-- 1 sidicas sidicas 2486272 2010-06-03 01:48 amdcalrt.dll
-rw-r--r-- 1 sidicas sidicas 124540 2010-06-02 07:50
cudart32_30_14.dll
-rw-r--r-- 1 sidicas sidicas 124540 2010-06-02 07:50 cudart.dll
-rw-r--r-- 1 sidicas sidicas 82699 2010-06-01 21:39
cufft32_30_14.dll
-rw-r--r-- 1 sidicas sidicas 82699 2010-06-01 21:39 cufft.dll
lrwxrwxrwx 1 sidicas sidicas 10 2010-06-03 02:12 nvcuda.dll
-> cudart.dll
sidi...@belldandy:~/.FAHGPU3$ |
|sidi...@belldandy:~/.FAHGPU3$ uname -a
Linux Belldandy 2.6.26-2-amd64 #1 SMP Sun Jun 21 04:47:08 UTC 2009
x86_64 GNU/Linux
sidi...@belldandy:~/.FAHGPU3$ nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2009 NVIDIA Corporation
Built on Fri_Feb_19_18:18:31_PST_2010
Cuda compilation tools, release 3.0, V0.2.1221
sidi...@belldandy:~/.FAHGPU3$ ldd ./cudart.dll
linux-gate.so.1 => (0xf7ee3000)
libcudart.so.3 => /usr/local/cuda/lib/libcudart.so.3
(0xf7e83000)
libwine.so.1 => /usr/lib/libwine.so.1 (0xf7d2d000)
libm.so.6 => /lib32/libm.so.6 (0xf7d09000)
libc.so.6 => /lib32/libc.so.6 (0xf7bb6000)
libdl.so.2 => /lib32/libdl.so.2 (0xf7bb2000)
libpthread.so.0 => /lib32/libpthread.so.0 (0xf7b9b000)
librt.so.1 => /lib32/librt.so.1 (0xf7b92000)
libstdc++.so.6 => /usr/lib32/libstdc++.so.6 (0xf7aa4000)
libgcc_s.so.1 => /usr/lib32/libgcc_s.so.1 (0xf7a97000)
/lib/ld-linux.so.2 (0xf7ee4000)
sidi...@belldandy:~/.FAHGPU3$
sidi...@belldandy:~/.FAHGPU3$ ldd ./cufft.dll
linux-gate.so.1 => (0xf7f29000)
libcufft.so.3 => /usr/local/cuda/lib/libcufft.so.3
(0xf7308000)
libwine.so.1 => /usr/lib/libwine.so.1 (0xf71b2000)
libm.so.6 => /lib32/libm.so.6 (0xf718e000)
libc.so.6 => /lib32/libc.so.6 (0xf703b000)
libdl.so.2 => /lib32/libdl.so.2 (0xf7037000)
libpthread.so.0 => /lib32/libpthread.so.0 (0xf7020000)
libcudart.so.3 => /usr/local/cuda/lib/libcudart.so.3
(0xf6fdf000)
libstdc++.so.6 => /usr/lib32/libstdc++.so.6 (0xf6ef1000)
libgcc_s.so.1 => /usr/lib32/libgcc_s.so.1 (0xf6ee4000)
/lib/ld-linux.so.2 (0xf7f2a000)
librt.so.1 => /lib32/librt.so.1 (0xf6eda000)
sidi...@belldandy:~/.FAHGPU3$
sidi...@belldandy:~/.FAHGPU3$
|
More thorugh testing has been done,
http://foldingforum.org/viewtopic.php?f=54&t=14673&start=105#p146177
<http://foldingforum.org/viewtopic.php?f=54&t=14673&start=105#p146177>
. When we makes reference to gpu2 wrapper, that is our original cuda
wrapper designed for cuda 2.0-2.2 built couple years ago. The GPU3
wrapper is what we are having problems with. It is our cuda 3.0
wrapper. The .dll files are in the folder (we even tried in system32),
ldd shows they are properly linked, yet it does not work. If we use
the old wrapper compile before it works fine with cuda 2.x or with
cuda 3.0 we just have to sym link the cuda lib to the old name it's
expecting.
I've tried compiling the old wrapper and linking it to cuda 2.3
however this fails. So I am thinking that if when I compile the old
wrapper which is shown to work (when an old compiled version is used)
but does not work when I compile on my funtoo box it must be some
weird compiling issue. I have wine installed (without 64bit support),
and I installed cuda runtime from nvidia's site as the one in portage
installs to /opt/ and I wanted to make sure there wasn't any weird
issues linking with that.
I do get a few warnings when I compile but they aren't anything that
would effect this.
s.sheln...@funtoo-64 ~/gpu3/wrapper/cudart $ make
winegcc -c -mno-cygwin -m32 -I/usr/local/cuda/include/ -o cudart.o
cudart.c
In file included from /usr/local/cuda/include/cuda_runtime_api.h:53,
from /usr/local/cuda/include/crt/host_runtime.h:108,
from cudart.c:7:
/usr/local/cuda/include/host_defines.h:57:1: warning: "__cdecl" redefined
<command-line>: warning: this is the location of the previous definition
cudart.c: In function 'wine_cudaGetTextureReference':
cudart.c:430: warning: passing argument 1 of 'cudaGetTextureReference'
from incompatible pointer type
/usr/local/cuda/include/cuda_runtime_api.h:189: note: expected 'const
struct textureReference **' but argument is of type 'struct
textureReference **'
cudart.c: In function 'wine_cudaRegisterFatBinary':
cudart.c:800: warning: return makes pointer from integer without a cast
cudart.c: In function 'wine_cudaUnregisterFatBinary':
cudart.c:805: warning: 'return' with a value, in function returning void
cudart.c: In function 'wine_cudaRegisterVar':
cudart.c:810: warning: 'return' with a value, in function returning void
cudart.c: In function 'wine_cudaRegisterTexture':
cudart.c:815: warning: 'return' with a value, in function returning void
cudart.c: In function 'wine_cudaRegisterShared':
cudart.c:820: warning: 'return' with a value, in function returning void
cudart.c: In function 'wine_cudaRegisterSharedVar':
cudart.c:825: warning: 'return' with a value, in function returning void
cudart.c: In function 'wine_cudaRegisterFunction':
cudart.c:831: warning: 'return' with a value, in function returning void
winegcc -shared cudart.dll.spec -mno-cygwin -o cudart.dll.so
<http://cudart.dll.so> cudart.o -L/usr/local/cuda/lib/ -lcudart
-lodbc32 -lole32 -loleaut32 -lwinspool -lodbccp32 -luuid
If anyone has any ideas about why this doesn't work, that would be
great. I've exhausted everything I could think of.
Seth:
Does this work with Wine-1.0.1? If so, we have a regression...
You could run a mostly lengthy regression test and find the culprit if
it is.
James McKenzie