undefined reference to acc_get_current_opencl_context

7 views
Skip to first unread message

Noriyuki Kushida

unread,
Jul 30, 2020, 6:24:10 AM7/30/20
to omni-c...@googlegroups.com
Hi,

Sorry for nagging you again, but if you come up with an idea to solve my issue, please help me.
I am trying to build OMNI compiler with XACC/OpenACC, on Intel's OpenCL SDK.
Build looks completed, but xmpcc/xmpf90 cannot find acc_get_current_opencl_context in "make tests".
I get the same error for my own code.

I have tried several compilers (gcc,icc,pgi) and MPI libraries, but the error message does not change.
I am using nightly (20200709) version.
1.3.2 fails at the configuration stage (CUDA relevant header files are required.)

I am attaching the error message of GCC 7.3.0 + OpenMPI as an example.

Best regards,
Noriyuki Kushida

[nkushi@master omnicompiler-20200709]$ make tests
make[1]: Entering directory `/home/nkushi/OMNI-Compiler/omnicompiler-20200709/tests/XMP/global-view/array/C'
xmpcc -o 516.x 516.c
/home/nkushi/SPACK/spack/opt/spack/linux-centos7-skylake_avx512/gcc-7.3.0/binutils-2.34-4qtn4y3y6jmypnlqswreenlbzohojzae/bin/ld: /home/nkushi/OMNI-Compiler/1.3.3/lib/libxmp.a(xacc_util_cl.o): in function `_XACC_queue_create':
xacc_util_cl.c:(.text+0xdc): undefined reference to `acc_get_current_opencl_context'
/home/nkushi/SPACK/spack/opt/spack/linux-centos7-skylake_avx512/gcc-7.3.0/binutils-2.34-4qtn4y3y6jmypnlqswreenlbzohojzae/bin/ld: xacc_util_cl.c:(.text+0xe6): undefined reference to `acc_get_current_opencl_device'
/home/nkushi/SPACK/spack/opt/spack/linux-centos7-skylake_avx512/gcc-7.3.0/binutils-2.34-4qtn4y3y6jmypnlqswreenlbzohojzae/bin/ld: /home/nkushi/OMNI-Compiler/1.3.3/lib/libxmp.a(xacc_util_cl.o): in function `_XACC_memory_alloc':
xacc_util_cl.c:(.text+0x20f): undefined reference to `acc_get_current_opencl_context'
/home/nkushi/SPACK/spack/opt/spack/linux-centos7-skylake_avx512/gcc-7.3.0/binutils-2.34-4qtn4y3y6jmypnlqswreenlbzohojzae/bin/ld: /home/nkushi/OMNI-Compiler/1.3.3/lib/libxmp.a(xacc_util_cl.o): in function `_XACC_util_init':
xacc_util_cl.c:(.text+0x566): undefined reference to `acc_get_current_opencl_context'
/home/nkushi/SPACK/spack/opt/spack/linux-centos7-skylake_avx512/gcc-7.3.0/binutils-2.34-4qtn4y3y6jmypnlqswreenlbzohojzae/bin/ld: xacc_util_cl.c:(.text+0x570): undefined reference to `acc_get_current_opencl_device'

Noriyuki Kushida

unread,
Aug 3, 2020, 10:36:57 AM8/3/20
to omni-c...@googlegroups.com
Hi,

Eventually, I have just succeeded to make a binary with Intel OpenCL SDK.
XcalableACC should be compiled with the "--enable-shared" option, and the program should be linked with "-lacc_cl -lacc" explicitly.
However, as far as I can see, CPU is not expected to be used as an OpenCL device.
If there is a way to use CPU, please let me know what I need to do.
I think XACC runs on an integrated GPU of an Intel CPU.

Best regards,
Noriyuki Kushida

Hitoshi Murai

unread,
Sep 1, 2020, 3:22:31 AM9/1/20
to omni-c...@googlegroups.com
Dear Kushida-san,

Sorry for the delayed reply.

Unfortunately, we are not able to provide you with the information
because we've had little experience in the combination of XACC and
OpenCL so far.

Regards,
Hitoshi Murai
--
村井 <h-m...@riken.jp>
Reply all
Reply to author
Forward
0 new messages