Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AANLkTi=jb-kqEMHDUX9qATq3uvKCVdsCFky581hZ0GPe@mail.gmail.com>
Date: Thu, 17 Feb 2011 00:39:41 -0600
From: Tim Yardley <yardley@...il.com>
To: john-users@...ts.openwall.com
Cc: Solar Designer <solar@...nwall.com>
Subject: Re: OpenMP patch/DES SSE key setup patch

Solar,

Sorry, I should have spent a moment looking at it before I sent that
out.  You are probably correct, clean more than likely wasn't called
before the rebuild after modifying the flags.  Btw, I chose to modify
it just under the linux-x86-sse2 target, rather than globally.  Wasn't
sure if there were side effects to that being brought in elsewhere.

$ GOMP_SPINCOUNT=100000 ./john -test
Benchmarking: Traditional DES [128/128 BS SSE2]... DONE
Many salts:     1622K c/s real, 406944 c/s virtual
Only one salt:  1426K c/s real, 360975 c/s virtual

Benchmarking: BSDI DES (x725) [128/128 BS SSE2]... DONE
Many salts:     54311 c/s real, 13615 c/s virtual
Only one salt:  52851 c/s real, 13497 c/s virtual

Benchmarking: FreeBSD MD5 [32/32]... DONE
Raw:    5714 c/s real, 5714 c/s virtual

Benchmarking: OpenBSD Blowfish (x32) [32/32 X2]... DONE
Raw:    665 c/s real, 184 c/s virtual

Benchmarking: Kerberos AFS DES [48/64 4K MMX]... DONE
Short:  214681 c/s real, 214681 c/s virtual
Long:   579123 c/s real, 579123 c/s virtual

Benchmarking: LM DES [128/128 BS SSE2]... DONE
Raw:    12985K c/s real, 3290K c/s virtual

Benchmarking: generic crypt(3) [?/32]... DONE
Many salts:     292147 c/s real, 73109 c/s virtual
Only one salt:  285696 c/s real, 71495 c/s virtual

/tmy

On Wed, Feb 16, 2011 at 7:08 PM, Solar Designer <solar@...nwall.com> wrote:
> Tim,
>
> On Thu, Dec 16, 2010 at 01:36:21PM -0600, Tim Yardley wrote:
>> I decided to play around with the new DES/OpenMP patch on x86 (32bit)
>> architectures with SSE2.  A simple CFLAGS change of adding -msse2 will
>> get it to pass your compile checks.  After that though, the code fails
>> to actually run correctly.
>>
>> a john -test outputs the following:
>>
>> Benchmarking: Traditional DES [128/128 BS SSE2]... FAILED (get_hash[0](0))
>> Benchmarking: BSDI DES (x725) [128/128 BS SSE2]... FAILED (get_hash[0](0))
>
> I've just tried this with gcc 4.5.0 (a custom build I made last year).
> You're correct that -msse2 needs to be added.  I added it to OMPFLAGS:
>
> OMPFLAGS = -fopenmp -msse2
>
> Then john-1.7.6-omp-des-7 compiled and ran just fine, albeit a lot
> slower than it does on the same machine with an x86-64 build, as
> expected.  I am getting something like 6.5M c/s for 32-bit build vs.
> 10M c/s for 64-bit with 8 threads on the same Core i7 machine
> (quad-core with HT).  This is for DES-based crypt(3).  For LM hashes,
> the difference is smaller: either does over 40M c/s, which is unoptimal
> in either case (you're better off using john-1.7.6-fast-des-key-setup-3
> instead, without OpenMP but maybe with multiple instances).
>
> john-1.7.6-omp-des-4 also builds and works "fine", but shows no speedup
> from the use of multiple threads at all.  There must be some data layout
> issue only affecting 32-bit builds, since this same patch works well and
> sometimes outperforms -omp-des-7 on x86-64 (which is why I keep both
> patches on the wiki).
>
> In short, I am unable to reproduce the problem.  WORKSFORME.  But I did
> not specifically try "your" version of gcc, etc.  What we do know from
> this reliably is that these patches are not "fundamentally" x86-64 only.
> (But you do need x86-64 for decent performance anyway.)
>
> ...Oh, here's a guess: maybe you forgot to "make clean" after making
> some change, such as a Makefile edit?  An inconsistent build can fail
> like you describe, of course.
>
> Alexander
>

Powered by blists - more mailing lists

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