OpenACC parallel directives fail to run, libgomp error
stuberl@laposte.net
stuberl@laposte.net
Tue Apr 26 12:42:00 GMT 2016
I manage to compile simple openACC programs with gcc on POWER8 + Nvidia K40.
But when launching the executable, I get this error:
libgomp: Cannot map target functions or variables (expected 0, have 1)
More specifically, this error is triggered everytime the directives
#pragma acc parallel
#pragma acc kernels
are met at runtime.
for example this code won't work:
#pragma acc parallel loop
for(int i=0;i<10;i++) a[i]=0;
However I succesfully managed to use other acc functions: acc_get_num_devices,
acc_malloc, #pragma acc enter data, #pragma acc update. They have the correct
behaviour (update for example will correctly update data on GPU).
Strangely, #pragma acc enter data crashes when there is a parallel directive in
the same code, but works otherwise. (See test.cpp for details)
My command line to compile is
gcc -fopenacc -foffload=nvptx-none main.c /lib/gcc/powerpc64le-unknown-linux-gnu/6.0.0/crtoffloadbegin.o /lib/gcc/powerpc64le-unknown-linux-gnu/6.0.0/crtoffloadend.o
The libgomp.so.1 used by the executable is the right one. I can see it with ldd.
(it is in [gcc 6 install dir]/lib64)
I installed gcc using the April 23th release candidate.
nvptx with configure --target=nvptx-none
configure --target=nvptx-none --enable-as-accelerator-for="powerpc64le-unknown-linux-gnu"
configure --enable-offload-targets=nvptx-none=$GCC6ROOT/install\
Any clue what can be wrong ?
Thanks !
Louis
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.cpp
Type: text/x-c++src
Size: 744 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-help/attachments/20160426/b2789239/attachment.bin>
More information about the Gcc-help
mailing list