Date: Tue, 28 Apr 2015 15:47:10 +0300 From: Shinnok <admin@...nnok.com> To: john-dev@...ts.openwall.com Subject: [Johnny] Task 1.4.2 fork and OpenMP Amassed two e-mails bellow: (was "Johnny further development proposal") >> BTW >> Version 1.5 >> 1. Add the –fork option to the UI so that we can use multi core >> -fork is not the only option for multi threading (openmp, mpi). > > Solar Designer wrote: > MPI is not needed. Only --fork and OpenMP, please. > (was "timeline in melange") > On Apr 23, 2015, at 5:21 PM, Frank Dittrich <frank.dittrich@...lbox.org> wrote: > > On 04/23/2015 03:45 PM, Mathieu Laprise wrote: >> Also, my reading make me believe that not all JtR builds supports >> OpenMP, so I'll have to find a way to detect that and show this option >> if platform is Linux and build supports OpenMP. Is using OpenMP a >> synonym of using --node to specify the number of thread per process or >> is it something else ? > > You are right. Core john's usage output doesn't indicate whether or not > you have an OpenMP build. > > The only way I can think of is to parse stderr output of a format test > (this also works for jumbo versions): > > (master)run $ ./john --test=0 --format=descrypt > /dev/null > Will run 8 OpenMP threads > > For jumbo versions, you'll find "_omp" in the first line of john's usage > output: > > (bleeding-jumbo)run $ ./john |head -n 1 > John the Ripper password cracker, version 220.127.116.11-jumbo-1-bleeding_omp > [linux-gnu 64-bit AVX-autoconf] > > For jumbo versions, this works as well: > (bleeding-jumbo)run $ ./john --list=build-info | head -n 1 > Version: 18.104.22.168-jumbo-1-bleeding_omp > > > The default number of threads will depend on the number of processors: > (bleeding-jumbo)src $ cat /proc/cpuinfo |grep -c "^processor" > 8 > > But you can specify a different number of threads: > (bleeding-jumbo)run $ OMP_NUM_THREADS=4 ./john --test=0 --format=descrypt > Will run 4 OpenMP threads > Testing: descrypt, traditional crypt(3) [DES 128/128 AVX-16]... (4xOMP) PASS > > OpenMP is not a synonym for using --node. > You could call --fork an alternative for OpenMP, except that --fork uses > separate processes instead of threads, and --fork uses N .rec files > instead of one. > OTOH, not all formats have OpenMP support, or they don't scale well with > OpenMP. In this case, --fork might be better. > You might also prefer --fork over OpenMP if there is other load on the > system. > You would use --node if you want to split a cracking job across multiple > systems, so it can be used instead of OpenMPI. > > But for now I don't think that you need to care about these details too > much. > > Frank I switched tasks between 1.4.2(tooltips) and 1.4.4(fork). The tooltips task is better handled later, after Mathieu will get the chance to experience more of JtR and thus subsequently be able to formulate informative tooltips for users. Thus, Mathieu, your next task is: 1.4.2 Add the –fork and OpenMP support so that we can use multi core (an option should be available for selecting how many cores should be used) Let's see how we can handle that. I think --fork is pretty clear. We need: 1. One setting in the Options pane, allowing us to pass a value via --fork. The config widget should be a QSpinbox with max and default set to QThread::idealThreadCount(). 2. A QCheckBox should control if the option is used. We don't send --fork if the user doesn't ask us to explicitly. 3. Maybe default the QSpinBox to 1 when the checkbox is disabled, so as to not confuse users how many cores will JtR actually use? Aleksey, Frank, is it my understanding that OpenMP is handled via environment args? In this case, what exactly does Johnny need to support in regards to that? (OMP_NUM_THREADS?) Shinnok 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.