Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 11 Mar 2014 21:13:44 +0100
From: magnum <john.magnum@...hmail.com>
To: john-users@...ts.openwall.com
Subject: Re: Help needed on CUDA / OpenCL on OS X 10.9

On 2014-03-11 18:27, K Zug wrote:
> CUDA won't compile properly, and OpenCL, even though compiling will either
> hang, freeze, or return a "Warning: salt() returned misaligned pointer" or
> gives a "Abort trap: 6" when working on Jeff's DMG.
> Please note that when benchmarking,  the dmg-opencl benchmark correctly.

The misaligned pointer warning is more often than not just a red 
herring. And on x86 it's no problem anyway, since it can handle 
unaligned data.

The hang/freeze problems are likely due to the fact this format does not 
auto-tune and the default GWS of 9216 will hang most GPU's weaker than 
state-of-the-art, and often takes the whole system down as collateral 
damage. Export GWS=512 (or so) or add a line in john.conf, section 
[Options:OpenCL] that says dmg_GWS = 512 (or so).


> I tried as far as I could, even installed GCC 4.2 via homebrew to no avail.

If you install a real gcc (which I do recommend for OSX), why not use a 
much newer version? For best performance, use eg. 4.7 and the -native 
build target. See bottom section of doc/INSTALL.


> I am ready to sacrifice a rooster or wear a necklace of garlic if
> necessary.

Only a last resort.


> $ make clean macosx-x86-64-cuda
> (...)
> /usr/bin/llvm-gcc-4.2: No such file or directory
> make[1]: *** [cuda_common.o] Error 1
> make: *** [macosx-x86-64-gpu] Error 2

Hm, so this was what you meant with gcc 4.2. Try this:
$ brew install llvm-gcc-28
$ sudo ln -s /usr/local/Cellar/llvm-gcc28/2.8/bin/llvm-gcc 
/usr/bin/llvm-gcc-4.2

Works like a champ here with default Makefile. But I *only* use that 
bastard for CUDA. My normal "gcc" is a symlink in /usr/local/bin/gcc 
that points to (Homebrew) gcc-4.7 in the same directory - and 
/usr/local/bin is first in my path. And I build 
macosx-x86-64-native-gpu, which give me both CUDA and OpenCL support at 
once.


> $ make clean macosx-x86-64-opencl
> (...)
> ld: warning: directory not found for option '-L/usr/local/ssl/lib'

This hints about the ancient native OpenSSL being used instad of a 
decent version. I don't think it matters for DMG but you can fix it like 
this:

$ brew install openssl
$ ln -s /usr/local/opt/openssl/ /usr/local/ssl

Phew. I should update that OSX section of doc/INSTALL.


> $ ./john  --format=dmg-opencl  --wordlist=/WList/run/output_single.txt
> /Users/kris/Dropbox/Public/jeff-sparsebundle-hash/hash
> Device 1: GeForce GT 750M
> Local worksize (LWS) 64, Global worksize (GWS) 9216
> Loaded 1 password hash (dmg-opencl, Apple DMG [PBKDF2-SHA1 3DES/AES OpenCL])
> Press 'q' or Ctrl-C to abort, almost any other key for status
> Abort trap: 6

Like I said, it's probably the GWS figure that's too high. try this:

$ GWS=128 ./john  --format=dmg-opencl  --wordlist=/WList 
/run/output_single.txt 
/Users/kris/Dropbox/Public/jeff-sparsebundle-hash/hash

Check for lag of response when pressing a key for status. If it's 
immediate, try doubling that GWS value. If response lags more than 5-10 
seconds the GWS is too high.

magnum

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.