Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 15 Jun 2015 21:11:06 +0200
From: Agnieszka Bielec <bielecagnieszka8@...il.com>
To: john-dev@...ts.openwall.com
Subject: Re: PHC: Lyra2 on CPU

2015-06-15 20:29 GMT+02:00 magnum <john.magnum@...hmail.com>:
> On 2015-06-15 20:15, Agnieszka Bielec wrote:
>>
>> I had strange problems with openmp, even when I created my own barrier
>> I noticed that speed is decreased but I discovered later that it has
>> normal speed with --skip-self-test and I was noticing strange things
>> in another cases. I used pthread barrier for lyra2-lm
>> I ported both lyra and lyra-lm where lm means low memory and uploaded
>> to my bleeding-jumbo branch
>
>
>> I need openmp for version b) but when I add in the beginning of
>> Lyra2_lm_fmt_plug.c #ifdef _OPENMP, make doesn't see
>> Lyra2_lm_fmt_plug.c
>
>
> Does your configure summary show OpenMP? Eg:
> ...
> Fork support ................................ yes
> OpenMP support .............................. yes (not for fast formats)
> OpenCL support .............................. yes
> ...

Of course
and I did now an experiment. added #ifdfef _OPENMP and after make this
format was recognized but after make clean; ./configure make doesn't
work.
now _OPENMP doesn't work. I removed #ifdef _OPENMP and make still
doesn't work, after make clean; ./configure; make lyra2-lm is
recognized
but this is strange, it is lyra2_lm_fmt_plug.c in makefile

>> ./configure must be modified to make this working
>
>
> Nope, something else is wrong. If you run 'make Lyra2_lm_fmt_plug.o' you
> should already see "-fopenmp" being added, and that means _OPENMP will be
> defined.
>
> Here's an example:
>
> $ touch idea_plug.c && make idea_plug.o
> gcc -DAC_BUILT -march=native -mavx -c -g -O2 -I/usr/local/include
> -DARCH_LITTLE_ENDIAN=1   -Wall -Wdeclaration-after-statement
> -fomit-frame-pointer --param allow-store-data-races=0
> -Wno-deprecated-declarations -Wno-format-extra-args -std=gnu89 -fopenmp
> -D_THREAD_SAFE -pthread  -I/usr/local/include -DHAVE_OPENCL -D_THREAD_SAFE
> -pthread -funroll-loops idea_plug.c -o idea_plug.o

looks normal

none@...e ~/Desktop/conn/src $ touch Lyra2_lm_fmt_plug.c
none@...e ~/Desktop/conn/src $ make Lyra2_lm_fmt_plug.o
gcc -DAC_BUILT -march=native -mavx2 -c -g -O2 -I/usr/local/include
-I/usr/local/cuda/include -DARCH_LITTLE_ENDIAN=1   -Wall
-Wdeclaration-after-statement -fomit-frame-pointer --param
allow-store-data-races=0 -Wno-deprecated-declarations
-Wno-format-extra-args -std=gnu89 -D_GNU_SOURCE -D_ISOC11_SOURCE
-DHAVE_CUDA   -fopenmp  -pthread  -I/usr/local/include
-I/usr/local/cuda/include -DHAVE_OPENCL -pthread -funroll-loops
Lyra2_lm_fmt_plug.c -o Lyra2_lm_fmt_plug.o


>
> Now copy the gcc options above and list macros - grep for OPENMP:
>
> $ gcc -DAC_BUILT -march=native -mavx -c -g -O2 -I/usr/local/include
> -DARCH_LITTLE_ENDIAN=1   -Wall -Wdeclaration-after-statement
> -fomit-frame-pointer --param allow-store-data-races=0
> -Wno-deprecated-declarations -Wno-format-extra-args -std=gnu89 -fopenmp
> -D_THREAD_SAFE -pthread  -I/usr/local/include -DHAVE_OPENCL -D_THREAD_SAFE
> -pthread -funroll-loops -dM -E -x c /dev/null | grep OPENMP
> #define _OPENMP 201307

sorry, I don't know what I have to do with this

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.