Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 16 Nov 2012 23:10:16 +0100
From: magnum <john.magnum@...hmail.com>
To: john-users@...ts.openwall.com
Subject: Re: scalar mode

On 16 Nov, 2012, at 9:11 , Marc Brinkmann <marc.brinkmann@...il.com> wrote:

> Thank you for the explanation =) i tried to apply your changes this time.

> Oh, it fails :(
> "marc@...berd:~/JohnTheRipper/run$ ./john --test --format=office2010-opencl
> OpenCL platform 0: AMD Accelerated Parallel Processing, 2 device(s).
> Using device 0: Juniper
> Compilation log: "/tmp/OCL2cJ41l.cl", line 29: error: expected a declaration
>  {
>  ^
...
> 8 errors detected in the compilation of "/tmp/OCL2cJ41l.cl".
> 
> Internal error: clc compiler invocation failed.
> 
> Error building kernel. Returned build code: -11. DEVICE_INFO=4162
> OpenCL error (CL_BUILD_PROGRAM_FAILURE) in file (common-opencl.c) at line
> (151) - (clBuildProgram failed.)
> marc@...berd:~/JohnTheRipper/run$
> "
> 
> I guess i simplay wait for your patch, as the older version is running fine.
> Sorry, that it is not working :(

Try latest commit. The office2007/2010/2013 and ntlmv2 OpenCL formats will now default to scalar mode on any device, including CPU. You can now add --request-vectorize to your command line and see if vectorizing triggers the bug, or if it gets faster or slower. Office actually gets a tad faster on some nvidias, I've never seen that before.

If/when I re-enable defaulting to vectorized on some devices, the new complementary option --request-scalar will do the opposite. These two new options currently only affect the four mentioned formats but I will probably support them from now on and I may add vectorizing to some other existing formats.

Or maybe I'll drop all vectorizing support as well as the new options, curse the driver authors and never try to use vectorized code again...

magnum



> 
> BR Marc
> 
> 2012/11/16 magnum <john.magnum@...hmail.com>
> 
>> On 16 Nov, 2012, at 7:00 , Marc Brinkmann <marc.brinkmann@...il.com>
>> wrote:
>>> Based on our discussion here
>>> 
>> https://github.com/magnumripper/JohnTheRipper/commit/6a3aa3c7ffa148e9a24d52039609bcb5fb444b84
>> ;
>>> may i kindly ask you to repeat the instrctions for scalar mode?
>>> 
>>> I just joind the Mailinglist some weeks ago, and i cannot even find via
>>> google, what you are refereing to.
>>> 
>>> I only find that post from john-dev but honestly, i don't know what do i
>>> need to perform to enable scalar mode
>>> http://www.openwall.com/lists/john-dev/2012/09/26/2
>> 
>> 
>> The post you mention does show the two code blocks involved, but I meant
>> this:
>> http://www.openwall.com/lists/john-users/2012/11/09/3
>> 
>> But I can re-write it a little longer here: The Office 2007/2010 OpenCL
>> formats will currently run in scalar mode on nvidias and on AMD GCN
>> (Tahiti), because scalar mode faster on those. On everything else (ie. CPU
>> or older AMD's) they will currently use vectorizing. Due to register
>> pressure, Office2013 will currently only run vectorized on CPU, not on any
>> GPU. When vectorized mode is used, the format name is printed with "[OpenCL
>> 4x]" as opposed to just "[OpenCL]".
>> 
>> To force scalar mode, you need to edit the host source (eg.
>> src/opencl_office2010_fmt.c), search for "VF = 4" and comment out (or #if
>> 0...#endif) that whole conditional block, so VF is never changed from its
>> initial value of 1. Then you need to edit the corresponding OpenCL kernel
>> (eg. src/opencl/office2010_kernel.cl) and modify the very first #ifdef so
>> that we always #define SCALAR. Then re-build and retry. Please report the
>> outcome.
>> 
>> Or, just wait until tomorrow and I'll post a patch that adds two options
>> to GPU builds of JtR: --request-scalar and --request-vectorized. This will
>> let you do it without hacking the code. With some luck this will also let
>> me find any bug in my code (forcing vectorized on the Tahiti just to
>> trigger the bug) but I strongly suspect we are dealing with driver bugs
>> here as usual.
>> 
>> magnum
>> 


Powered by blists - more mailing lists

Your e-mail address:

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.