Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <51E1DFB2.7010108@gmail.com>
Date: Sat, 13 Jul 2013 20:16:02 -0300
From: Claudio André <claudioandre.br@...il.com>
To: john-dev@...ts.openwall.com
Subject: Re: bug: GPU use in CPU-only formats

> magnum, Claudio -
>
> This problem is still present, and it manifests itself in an even worse
> way than I had thought.  Not only is there some use of the first GPU
> during CPU-only runs with an OpenCL-enabled build, but also CPU time is
> being wasted by some OpenCL-related overhead, which slows down CPU-based
> cracking (in some of my tests, by more than a factor of 2 - that's when
> OpenMP is also in use).  This is easily reproducible on our new dev box
> (which I'll create you accounts on shortly), where several ksoftirqd
> kernel threads appear high in "top" when running a CPU-only format in an
> OpenCL-enabled build of JtR.
>
> Alexander

Is it possible to reproduce this on bull easily? What i saw is listed 
below: -opencl is slower than -gpu? Doesn't make sense. But it is, even 
after the attached patch (no more OpenCL code). I saw nothing inside 
Makefile. Have you tried unstable?

I tried -native, -gpu, -opencl: ../run/john -form:sha512crypt -t=20

-native
Benchmarking: sha512crypt, crypt(3) $6$ (rounds=5000) [SHA512 64/64 
OpenSSL]... (8xOMP) DONE
Raw:    2055 c/s real, 257 c/s virtual

-gpu
Benchmarking: sha512crypt, crypt(3) $6$ (rounds=5000) [SHA512 64/64 
OpenSSL]... (8xOMP) DONE
Raw:    2051 c/s real, 256 c/s virtual

-opencl (the best)
Benchmarking: sha512crypt, crypt(3) $6$ (rounds=5000) [SHA512 64/64 
OpenSSL]... (8xOMP) DONE
Raw:    2018 c/s real, 252 c/s virtual

Claudio
----

diff --git a/src/Makefile b/src/Makefile
index 7efd253..d5e9e6a 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -32,7 +32,7 @@ SORT = sort

  OMPFLAGS =
  # gcc with OpenMP
-#OMPFLAGS = -fopenmp
+OMPFLAGS = -fopenmp
  # gcc with OpenMP on 32-bit x86 with SSE2
  #OMPFLAGS = -fopenmp -msse2
  # Mac OS X (llvm-gcc) with OpenMP
diff --git a/src/john.c b/src/john.c
index 689b282..4dbdb3f 100644
--- a/src/john.c
+++ b/src/john.c
@@ -1068,7 +1068,7 @@ static void john_init(char *name, int argc, char 
**argv)
                 listconf_parse_late();

  #ifdef HAVE_OPENCL
-       opencl_preinit();
+//     opencl_preinit();
  #endif

         common_init();
@@ -1212,8 +1212,8 @@ static void john_done(void)
         }
         log_done();
  #ifdef HAVE_OPENCL
-       if (!(options.flags & FLG_FORK) || john_main_process)
-               opencl_done();
+//     if (!(options.flags & FLG_FORK) || john_main_process)
+//             opencl_done();
  #endif

         path_done();


Content of type "text/html" skipped

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.