Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKGDhHVyuiNx142mh05cn37aJ+67-gZZ+Zdd3++2kX3EQFZrBA@mail.gmail.com>
Date: Mon, 1 Jun 2015 23:57:34 +0200
From: Agnieszka Bielec <bielecagnieszka8@...il.com>
To: john-dev@...ts.openwall.com
Subject: PHC: Lyra2 on CPU

Lyra 2 uses by default openmp threads in one hashing function.
nPARALLEL option determines how many omp threads are running. and if
nPARALLEL changes, output also changes.
nPARALLEL by default equals to 2

I implemented omp in Lyra2 in 3 different ways and I am including tests below

a) I used nested omp
b) I am using omp only in crypt_all() function and one hash is
computed by nPARALLEL number of threads
c) I am using omp only in crypt_all() function and one hash is
computed by only one thread


a)
Will run 8 OpenMP threads
Benchmarking: Lyra2, Generic Lyra2 [ ]... (8xOMP) DONE
Speed for cost 1 (t) of 8, cost 2 (m) of 8
Many salts:     4896 c/s real, 848 c/s virtual
Only one salt:  5005 c/s real, 856 c/s virtual

b)
Will run 8 OpenMP threads
Benchmarking: Lyra2, Generic Lyra2 [ ]... (8xOMP) DONE
Speed for cost 1 (t) of 8, cost 2 (m) of 8
Many salts:     6608 c/s real, 876 c/s virtual
Only one salt:  7120 c/s real, 935 c/s virtu

c)
Will run 8 OpenMP threads
Benchmarking: Lyra2, Generic Lyra2 [ ]... (8xOMP) DONE
Speed for cost 1 (t) of 8, cost 2 (m) of 8
Many salts:     7032 c/s real, 943 c/s virtual
Only one salt:  7872 c/s real, 1035 c/s virtual

without openmp)
Benchmarking: Lyra2, Generic Lyra2 [ ]... DONE
Speed for cost 1 (t) of 8, cost 2 (m) of 8
Many salts:     2130 c/s real, 2152 c/s virtual
Only one salt:  2160 c/s real, 2138 c/s virtual

drawback of method b)
-running_threads%nPARALLER must be equal to 0
drawback of method c)
-we are using memory nPARALLEL times as many as in method b)


I think that method b) is slower because we are using synchronization
many times and we have barriers  for all omp threads. I couldn't find
a way how to do it for only x threads.

I am leaving to you to decide which method to implement to jtr.

and also I have a question.
Lyra2 has also options like nPARALLEL, which are passed during
compilation. but every of these option has default value
I don't know if should also add these options to parameters passed in
my hashing functions or should I make a function only for default of
these values

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.