Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 15 Jun 2015 20:29:22 +0200
From: magnum <john.magnum@...hmail.com>
To: john-dev@...ts.openwall.com
Subject: Re: PHC: Lyra2 on CPU

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
...

> ./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

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

magnum

Powered by blists - more mailing lists

Your e-mail address:

Powered by Openwall GNU/*/Linux - Powered by OpenVZ