cron problem

Moderators: slegrand, Site Moderators, PandeGroup

cron problem

Postby jukk » Thu Oct 07, 2010 5:24 pm

Maybe this is more a question for Wine, but I'll try anyway if somebody happens to have tried this before me.

I am successfully running a Nvidia 8800 GTS 384MB with the Windows 6.30r1 GPU client with wine. It works perfectly fine when starting from the terminal.

My system is Fedora 13 and Wine 1.3.1.

This is the basic command from my startup script that works fine in the terminal (without X11):

Code: Select all
su - <username> -c "cd /opt/fahgpu3 && nice -n 19 env WINEPREFIX=/home/<username>/.wine wine /opt/fahgpu3/Folding\@home-Win32-GPU.exe -forcegpu nvidia_g80


Here is the log file when launched in a terminal:

Code: Select all
Application tried to create a window, but no driver could be loaded.
Make sure that your X server is running and that $DISPLAY is set correctly.
err:systray:initialize_systray Could not create tray window

Note: Please read the license agreement (Folding@home-Win32-GPU.exe -license). Further
use of this software requires that you have read and accepted this agreement.

[17:14:49] Gpu type=2 species=30.

--- Opening Log file [October 7 17:14:49 UTC]

# Windows GPU Console Edition #################################################
####################################################################

                       Folding@Home Client Version 6.30r1

                          http://folding.stanford.edu

######################################################################
######################################################################

Launch directory: Z:\opt\fahgpu3
Executable: Z:\opt\fahgpu3\Folding@home-Win32-GPU.exe
Arguments: -forcegpu nvidia_g80

[17:14:49] - Ask before connecting: No
[17:14:49] - User name: jukk (Team 169313)
[17:14:49] - User ID: 111560B0581B092C
[17:14:49] - Machine ID: 2
[17:14:49]
[17:14:49] Gpu type=2 species=30.
[17:14:49] Loaded queue successfully.
[17:14:49]
[17:14:49] + Processing work unit
[17:14:49] Core required: FahCore_11.exe
[17:14:49] Core found.
[17:14:49] Working on queue slot 07 [October 7 17:14:49 UTC]
[17:14:49] + Working ...
Warning: Ignoring unknown arg
Warning: Ignoring unknown arg
[17:14:49]
[17:14:49] *------------------------------*
[17:14:49] Folding@Home GPU Core
[17:14:49] Version 1.31 (Tue Sep 15 10:57:42 PDT 2009)
[17:14:49]
[17:14:49] Compiler  : Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 14.00.50727.762 for 80x86
[17:14:49] Build host: amoeba
[17:14:49] Board Type: Nvidia
[17:14:49] Core      :
[17:14:49] Preparing to commence simulation
[17:14:49] - Looking at optimizations...
[17:14:49] - Files status OK
[17:14:49] - Expanded 83430 -> 424319 (decompressed 508.5 percent)
[17:14:49] Called DecompressByteArray: compressed_data_size=83430 data_size=424319, decompressed_data_size=424319 diff=0
[17:14:50] - Digital signature verified
[17:14:50]
[17:14:50] Project: 10109 (Run 352, Clone 0, Gen 23)
[17:14:50]
[17:14:50] Assembly optimizations on if available.
[17:14:50] Entering M.D.
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
[17:14:56] Will resume from checkpoint file
...


As you can see, it complains about no X display, but it works fine anyway.

The problem is when I try to launch the same startup script through cron.

Then I get the error:

Code: Select all
Application tried to create a window, but no driver could be loaded.
Make sure that your X server is running and that $DISPLAY is set correctly.
err:systray:initialize_systray Could not create tray window

Note: Please read the license agreement (Folding@home-Win32-GPU.exe -license). Further
use of this software requires that you have read and accepted this agreement.

[16:53:02] [b]cudaRuntime lib not found.[/b]
[16:53:02] Gpu species not recognized.

--- Opening Log file [October 7 16:53:02 UTC]

# Windows GPU Console Edition #################################################
####################################################################

                       Folding@Home Client Version 6.30r1

                          http://folding.stanford.edu

####################################################################
####################################################################

Launch directory: Z:\opt\fahgpu3
Executable: Z:\opt\fahgpu3\Folding@home-Win32-GPU.exe
Arguments: -forcegpu nvidia_g80

[16:53:02] - Ask before connecting: No
[16:53:02] - User name: xxx (Team xxxx)
[16:53:02] - User ID: xxxxxxxxxxxxx
[16:53:02] - Machine ID: 2
[16:53:02]
[16:53:02] Gpu species not recognized.
[16:53:02] Loaded queue successfully.
[16:53:02]
[16:53:02] + Processing work unit
[16:53:02] Core required: FahCore_11.exe
[16:53:02] Core found.
[16:53:02] Working on queue slot 07 [October 7 16:53:02 UTC]
[16:53:02] + Working ...
err:module:import_dll Loading library nvcuda.dll (which is needed by L"Z:\\opt\\fahgpu3\\FahCore_11.exe") failed (error c0000020).
err:module:import_dll Loading library cudart.dll (which is needed by L"Z:\\opt\\fahgpu3\\FahCore_11.exe") failed (error c0000020).
err:module:LdrInitializeThunk Main exe initialization for L"Z:\\opt\\fahgpu3\\FahCore_11.exe" failed, status c0000135
[16:53:06] CoreStatus = C0000135 (-1073741515)
[16:53:06] Client-core communications error: ERROR 0xc0000135
[16:53:06] This is a sign of more serious problems, shutting down.
Application tried to create a window, but no driver could be loaded.
Make sure that your X server is running and that $DISPLAY is set correctly.


The rows about not being able to create a window and X server can be ignored, because it also says that when running successfully from the terminal.

Apparently the current wine version (1.3.1) is fine with running on the tty only, with no $DISPLAY set. I've tested with other wine console programs (e.g. wine cmd.exe /c echo whatever >> file.txt) and they run fine when started through cron.

The thing is it does not find the cudaRuntime lib. I have no idea why. I also added

Code: Select all
export PATH=$PATH:/usr/local/cuda/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/lib


to the startup script. It didn't change anything.

Running the following command in cron gives the following output, exactly the same as in the terminal:

Code: Select all
ldd /home/jukk/.wine/drive_c/windows/system32/cudart.dll


Code: Select all
        linux-gate.so.1 =>  (0x005fc000)
        libcudart.so.3 => /usr/local/cuda/lib/libcudart.so.3 (0x002c9000)
        libwine.so.1 => /usr/lib/libwine.so.1 (0x008f0000)
        libm.so.6 => /lib/libm.so.6 (0x00b46000)
        libc.so.6 => /lib/libc.so.6 (0x0030a000)
        libdl.so.2 => /lib/libdl.so.2 (0x005ce000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x0082d000)
        librt.so.1 => /lib/librt.so.1 (0x00fb5000)
        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00110000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00eef000)
        /lib/ld-linux.so.2 (0x00287000)


So that means that the cron environment does not have any problems finding the library.

So why does wine have problems finding the library?

I tried adding environment variables when launching wine, e.g. WINEDLLPATH, but it didn't help.

Any ideas that I could try are appreciated. Thanks.
jukk
 
Posts: 9
Joined: Sat Aug 15, 2009 6:26 pm

Re: cron problem

Postby jukk » Thu Oct 07, 2010 5:43 pm

I also added the paths to the cuda libraries to the DOS/Windows PATH variable (with wine regedit). It didn't help.
jukk
 
Posts: 9
Joined: Sat Aug 15, 2009 6:26 pm

Re: cron problem

Postby jukk » Thu Oct 07, 2010 6:12 pm

OK, one step further. SELinux was enabled in Fedora. It prevented the access of the cuda libraries.

Turning it off by
/usr/sbin/setenforce 0
solved it.

But now I get UNSTABLE machine...
jukk
 
Posts: 9
Joined: Sat Aug 15, 2009 6:26 pm

Re: cron problem

Postby jukk » Thu Oct 07, 2010 6:52 pm

Success!

I feel like talking to myself here. :-) But at least it helped me to work through the problem.

It was only SElinux that prevented wine from accessing the cuda libraries.

The UNSTABLE Machine came from using WINEDEBUG, for some reason.

But it is good to know that wine can be started through cron. This was certainly not possible in the past (due to wine needing an X display).
jukk
 
Posts: 9
Joined: Sat Aug 15, 2009 6:26 pm


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

Who is online

Users browsing this forum: No registered users and 0 guests