OpenMP 4.0 offloading for intelmic target. Can not find to mkoffload.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi!

I am trying to use the OpenMP to Intel MIC target, but I have a some problems:
1. The offload compiler contains only gcc binary:
[ikulagin@cnmic1 gcc-6.2.0]$ ls -l offload-x86_64-intelmic-linux-gnu/bin/
total 4424
-rwxr-xr-x 1 ikulagin ikulagin 4529723 Dec 27 04:04 gcc
2. The host compiler cannot find to mkoffload:
[ikulagin@cnmic1 ~]$ gcc -Wall -fopenmp ./1.c
lto-wrapper: fatal error: problem with building target image for
x86_64-intelmic-linux-gnu
compilation terminated.
/usr/bin/ld: lto-wrapper failed
collect2: error: ld returned 1 exit status

I have installed gcc from gcc-6_2_0-release tag (6ac74a6 commit). The
offload compiler:
[ikulagin@cnmic1 bin]$ ./gcc  -v
Using built-in specs.
COLLECT_GCC=./gcc
COLLECT_LTO_WRAPPER=/home/ikulagin/workspace/compilers/gcc-6.2.0/offload-x86_64-intelmic-linux-gnu/bin/../libexec/gcc/x86_64-pc-linux-gnu/6.2.0/accel/x86_64-intelmic-linux-gnu/lto-wrapper
Target: x86_64-intelmic-linux-gnu
Configured with: ../configure --prefix=
--build=x86_64-intelmic-linux-gnu --host=x86_64-intelmic-linux-gnu
--target=x86_64-intelmic-linux-gnu
--enable-as-accelerator-for=x86_64-pc-linux-gnu
--enable-languages=c,c++,fortran,lto
Thread model: posix
gcc version 6.2.0 (GCC)

The offload compiler has installed to
DESTDIR=/home/ikulagin/workspace/compilers/gcc-6.2.0/offload-x86_64-intelmic-linux-gnu.
The offload compiler path is specified for host compiler by configure
parameter:
--enable-offload-targets=x86_64-intelmic-linux-gnu=/home/ikulagin/workspace/compilers/gcc-6.2.0/offload-x86_64-intelmic-linux-gnu/

The host compiler has installed to
DESTDIR=/home/ikulagin/workspace/compilers/gcc-6.2.0/ and configured
in the following way:
[ikulagin@cnmic1 bin]$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/home/ikulagin/workspace/compilers/gcc-6.2.0/bin/../libexec/gcc/x86_64-pc-linux-gnu/6.2.0/lto-wrapper
OFFLOAD_TARGET_NAMES=x86_64-intelmic-linux-gnu
Target: x86_64-pc-linux-gnu
Configured with: ../configure --prefix=
--enable-languages=c,c++,fortran,lto --build=x86_64-pc-linux-gnu
--host=x86_64-pc-linux-gnu --target=x86_64-pc-linux-gnu
--enable-offload-targets=x86_64-intelmic-linux-gnu=/home/ikulagin/workspace/compilers/gcc-6.2.0/offload-x86_64-intelmic-linux-gnu/
Thread model: posix
gcc version 6.2.0 (GCC)

It is seems like host compiler doesn't know about location the offload
compiler, maybe the option “
--enable-offload-targets=x86_64-intelmic-linux-gnu=/home/ikulagin/workspace/compilers/gcc-6.2.0/offload-x86_64-intelmic-linux-gnu/”
doesn’t work?

Moreover, I have tried create symlink to needed directory for the
offload compiler (to
OFFLOAD_INSTALL_DIR/libexec/gcc/x86_64-pc-linux-gnu/6.2.0/accel/):
ln -s /home/ikulagin/workspace/compilers/gcc-6.2.0/offload-x86_64-intelmic-linux-gnu/libexec/gcc/x86_64-pc-linux-gnu/6.2.0/accel/
/home/ikulagin/workspace/compilers/gcc-6.2.0/libexec/gcc/x86_64-pc-linux-gnu/6.2.0/

In this case the offload compiler found the mkoffload, but
mkoffload-intelmic runs the host gcc unless the offload gcc, as
result:
[ikulagin@cnmic1 ~]$ gcc -Wall -fopenmp ./1.c
lto1: error: -foffload-abi option can be specified only for offload compiler
mkoffload-intelmic: fatal error: gcc returned 1 exit status
compilation terminated.
lto-wrapper: fatal error:
/home/ikulagin/workspace/compilers/gcc-6.2.0/bin/../libexec/gcc/x86_64-pc-linux-gnu/6.2.0//accel/x86_64-intelmic-linux-gnu/mkoffload
returned 1 exit status
compilation terminated.
/usr/bin/ld: lto-wrapper failed
collect2: error: ld returned 1 exit status

Then I run gcc in gdb (gcc -wrapper gdb,--args -Wall -fopenmp ./1.c)
and I had seen there are no environment variables that contain path to
the offload compiler.

Could you help me please, what i need to do?
I am sorry for absolute paths in examples, maybe it will be helpful. :)

-Ivan Kulagin




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux