Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 17 Jul 2015 20:41:09 +0200
From: magnum <john.magnum@...hmail.com>
To: john-dev@...ts.openwall.com
Subject: Re: PHC: Lyra2 on GPU

On 2015-07-17 20:03, Agnieszka Bielec wrote:
> 2015-07-17 18:29 GMT+02:00 magnum <john.magnum@...hmail.com>:
>> I tried building your code but it's broken for OSX:
>>
>> In file included from Lyra2_fmt_plug.c:21:0:
>> Lyra2.h:75:262: error: unknown type name 'pthread_barrier_t'
>>   int LYRA2_LM_(void *K, unsigned int kLen, const void *pwd, unsigned int
>> pwdlen, const void *salt, unsigned int saltlen, unsigned int timeCost,
>> unsigned int nRows, unsigned int nCols, unsigned int nThreads, int
>> threadNumber,struct lyra2_lm_allocation *allocated,pthread_barrier_t
>> *barrier);
>>
>>
>>
>>                                                   ^
>> Lyra2.h:77:225: error: unknown type name 'pthread_barrier_t'
>>   int LYRA2_LM(void *out, size_t outlen, const void *in, size_t inlen, const
>> void *salt, size_t saltlen, unsigned int t_cost, unsigned int m_cost,
>> unsigned int nThreads, int threadNumber,struct lyra2_lm_allocation
>> *allocated, pthread_barrier_t *barrier);
>>
>>
>>
>>              ^
>> make[1]: *** [Lyra2_fmt_plug.o] Error 1
>> make[1]: *** Waiting for unfinished jobs....
>> make: *** [default] Error 2
>>
>> magnum
>
> OS X doesn't have pthread_barrier_t but I had problems with speed on
> lyra2-lm on super when I was using barriers in openmp, and only this
> change made that the speed is normal, I will decide what I will do
> with this error, if you want to test my code I recommend you to switch
> to commit e6a532b40e4c98418913075b5407e50765f2298a because my newest
> commit works on super on both cards but in my laptop doesn't work when
> LWS=GWS (cmp_all(1) failed) and I don't know if this is bug in my code
> or somewhere else. and to make my code compiling it's enough to remove
> files whose name begin with "Lyra2"

I'll try that.

Perhaps you can use the pthread barrier stuff "#ifndef APPLE", with a 
fallback to OpenMP barriers. Or we could check for it in autoconf.

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.