Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
92 Views

Failed to make any examples to compile in Centos 7

We recently purchased DELL R740 with Intel xeron GOLD CPU and 2 Intel PAC Aria10 GX FPGA installed. We install Centos 7 as the operating system.

Now, we have tried to install the latest Intel OneAPI Base Toolkit and Intel FPGA add-on toolkit Beta06 by following the installation guide. As the guide suggested, we built gcc 7.4.0 from the source which is required by Intel FPGA add-on toolkit. After installation, we tried to validate the installation,

1. source /opt/intel/inteloneapi/setvars.sh and we get the output as below:

::  initializing environment ...
   compiler -- latest
/opt/intel/inteloneapi/compiler/2021.1-beta06/linux/lib/oclfpga/host/linux64/bin/aocl-get-platform-diagnose: error while loading shared libraries: libOpenCL.so.1: cannot open shared object file: No such file or directory
Error initializing DMA: invalid parameter
Error initializing mmd dma
eventfd : Bad file descriptorterminate called after throwing an instance of 'std::system_error'
  what():  No such process
Error initializing DMA: invalid parameter
Error initializing mmd dma
eventfd : Bad file descriptorterminate called after throwing an instance of 'std::system_error'
  what():  No such process
Error initializing DMA: invalid parameter
Error initializing mmd dma
eventfd : Bad file descriptorterminate called after throwing an instance of 'std::system_error'
  what():  No such process
/opt/intel/inteloneapi/compiler/2021.1-beta06/linux/lib/oclfpga/host/linux64/bin/aocl-get-platform-diagnose: error while loading shared libraries: libOpenCL.so.1: cannot open shared object file: No such file or directory
Error initializing DMA: invalid parameter
Error initializing mmd dma
eventfd : Bad file descriptorterminate called after throwing an instance of 'std::system_error'
  what():  Invalid argument
Error initializing DMA: invalid parameter
Error initializing mmd dma
eventfd : Bad file descriptorterminate called after throwing an instance of 'std::system_error'
  what():  Invalid argument
Error initializing DMA: invalid parameter
Error initializing mmd dma
eventfd : Bad file descriptorterminate called after throwing an instance of 'std::system_error'
  what():  No such process
   debugger -- latest
   dev-utilities -- latest
   intelfpgadpcpp -- latest
   tbb -- latest
:: oneAPI environment initialized ::

2. run /opt/intel/inteloneapi/sys_check.sh and we get the output as below:

Checking system, will report any issues.  Pass in the -v flag for verbose output
--------------------------------------------------------------------
ICD System Diagnostics                                              
--------------------------------------------------------------------

Using the following location for ICD installation:
    /etc/OpenCL/vendors

Found 3 icd entry at that location:
    /etc/OpenCL/vendors/intel-cpu.icd
    /etc/OpenCL/vendors/Altera.icd
    /etc/OpenCL/vendors/Intel_FPGA_SSG_Emulator.icd

The following OpenCL libraries are referenced in the icd files:
    libintelocl.so
    libalteracl.so
    libintelocl_emu.so

Checking LD_LIBRARY_PATH for registered libraries:
    libintelocl_emu.so was registered on the system at /opt/intel/inteloneapi/compiler/2021.1-beta06/linux/lib/oclfpga/host/linux64/lib
    libintelocl_emu.so was registered on the system at /opt/intel/inteloneapi/compiler/2021.1-beta06/linux/lib/oclfpga/host/linux64/lib
    libalteracl.so was registered on the system at /opt/intel/inteloneapi/compiler/2021.1-beta06/linux/lib/oclfpga/host/linux64/lib
    /opt/intel/inteloneapi/compiler/latest/linux/lib/x64/libintelocl.so was registered on the system.

Using the following location for fcd installations:
    /opt/Intel/OpenCLFPGA/oneAPI/Boards

Found 1 fcd entry at that location:
    /opt/Intel/OpenCLFPGA/oneAPI/Boards/dcp_bsp.fcd

The following OpenCL libraries are referenced in the fcd files:
    /opt/intel/inteloneapi/intelfpgadpcpp/2021.1-beta06/board/intel_a10gx_pac/linux64/lib/libintel_opae_mmd.so

Checking LD_LIBRARY_PATH for registered libraries:
    /opt/intel/inteloneapi/intelfpgadpcpp/2021.1-beta06/board/intel_a10gx_pac/linux64/lib/libintel_opae_mmd.so was registered on the system.
    libintelocl_emu.so was registered on the system at /opt/intel/inteloneapi/compiler/2021.1-beta06/linux/lib/oclfpga/host/linux64/lib
    libalteracl.so was registered on the system at /opt/intel/inteloneapi/compiler/2021.1-beta06/linux/lib/oclfpga/host/linux64/lib
    /opt/intel/inteloneapi/compiler/latest/linux/lib/x64/libintelocl.so was registered on the system.

Number of Platforms = 3
    1. Intel(R) FPGA Emulation Platform for OpenCL(TM)              | Intel(R) Corporation           | OpenCL 1.2 Intel(R) FPGA SDK for OpenCL(TM), Version 19.2
    2. Intel(R) FPGA SDK for OpenCL(TM)                             | Intel(R) Corporation           | OpenCL 1.0 Intel(R) FPGA SDK for OpenCL(TM), Version 20.1
    3. Intel(R) OpenCL                                              | Intel(R) Corporation           | OpenCL 2.1 LINUX              
--------------------------------------------------------------------
ICD diagnostics PASSED                                              
--------------------------------------------------------------------
--------------------------------------------------------------------
BSP Diagnostics                                                     
--------------------------------------------------------------------
--------------------------------------------------------------------
Warning:
No devices attached for package:
/opt/intel/inteloneapi/intelfpgadpcpp/2021.1-beta06/board/intel_a10gx_pac
--------------------------------------------------------------------
Vendor: Intel Corp
--------------------------------------------------------------------

Call "aocl diagnose <device-names>" to run diagnose for specified devices
Call "aocl diagnose all" to run diagnose for all devices

3. Now, we try to run a FPGA example - CRR contained in the toolkit, when run cmake .., we get alot of errors
 

- The CXX compiler identification is Clang 11.0.0
-- Check for working CXX compiler: /opt/intel/inteloneapi/compiler/latest/linux/bin/dpcpp
-- Check for working CXX compiler: /opt/intel/inteloneapi/compiler/latest/linux/bin/dpcpp - broken
CMake Error at /usr/local/share/cmake-3.17/Modules/CMakeTestCXXCompiler.cmake:53 (message):
  The C++ compiler

    "/opt/intel/inteloneapi/compiler/latest/linux/bin/dpcpp"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: /home/sargen.yung/Development/OneAPI/crr/build/CMakeFiles/CMakeTmp
    
    Run Build Command(s):/bin/gmake cmTC_43eaa/fast && /bin/gmake  -f CMakeFiles/cmTC_43eaa.dir/build.make CMakeFiles/cmTC_43eaa.dir/build
    gmake[1]: Entering directory `/home/sargen.yung/Development/OneAPI/crr/build/CMakeFiles/CMakeTmp'
    Building CXX object CMakeFiles/cmTC_43eaa.dir/testCXXCompiler.cxx.o
    /opt/intel/inteloneapi/compiler/latest/linux/bin/dpcpp     -o CMakeFiles/cmTC_43eaa.dir/testCXXCompiler.cxx.o -c /home/sargen.yung/Development/OneAPI/crr/build/CMakeFiles/CMakeTmp/testCXXCompiler.cxx
    Linking CXX executable cmTC_43eaa
    /usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_43eaa.dir/link.txt --verbose=1
    /opt/intel/inteloneapi/compiler/latest/linux/bin/dpcpp       -rdynamic CMakeFiles/cmTC_43eaa.dir/testCXXCompiler.cxx.o  -o cmTC_43eaa
    /opt/intel/inteloneapi/compiler/2021.1-beta06/linux/bin/../lib/libsycl.so: undefined reference to `VTT for std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >@GLIBCXX_3.4.21'
    /opt/intel/inteloneapi/compiler/2021.1-beta06/linux/bin/../lib/libsycl.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_assign(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@GLIBCXX_3.4.21'
    /opt/intel/inteloneapi/compiler/2021.1-beta06/linux/bin/../lib/libsycl.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::reserve(unsigned long)@GLIBCXX_3.4.21'
    /opt/intel/inteloneapi/compiler/2021.1-beta06/linux/bin/../lib/libsycl.so: undefined reference to `std::runtime_error::runtime_error(char const*)@GLIBCXX_3.4.21'
    /opt/intel/inteloneapi/compiler/2021.1-beta06/linux/bin/../lib/libsycl.so: undefined reference to `std::basic_ofstream<char, std::char_traits<char> >::basic_ofstream(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::_Ios_Openmode)@GLIBCXX_3.4.21'
    /opt/intel/inteloneapi/compiler/2021.1-beta06/linux/bin/../lib/libsycl.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::resize(unsigned long, char)@GLIBCXX_3.4.21'
    /opt/intel/inteloneapi/compiler/2021.1-beta06/linux/bin/../lib/libsycl.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_erase(unsigned long, unsigned long)@GLIBCXX_3.4.21'
    /opt/intel/inteloneapi/compiler/2021.1-beta06/linux/bin/../lib/libsycl.so: undefined reference to `std::__throw_out_of_range_fmt(char const*, ...)@GLIBCXX_3.4.20'
    /opt/intel/inteloneapi/compiler/2021.1-beta06/linux/bin/../lib/libsycl.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_append(char const*, unsigned long)@GLIBCXX_3.4.21'
    /opt/intel/inteloneapi/compiler/2021.1-beta06/linux/bin/../lib/libsycl.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct(unsigned long, char)@GLIBCXX_3.4.21'
    /opt/intel/inteloneapi/compiler/2021.1-beta06/linux/bin/../lib/libsycl.so: undefined reference to `vtable for std::__cxx11::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> >@GLIBCXX_3.4.21'
    /opt/intel/inteloneapi/compiler/2021.1-beta06/linux/bin/../lib/libsycl.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_create(unsigned long&, unsigned long)@GLIBCXX_3.4.21'
    /opt/intel/inteloneapi/compiler/2021.1-beta06/linux/bin/../lib/libsycl.so: undefined reference to `std::__cxx11::collate<char> const& std::use_facet<std::__cxx11::collate<char> >(std::locale const&)@GLIBCXX_3.4.21'
    /opt/intel/inteloneapi/compiler/2021.1-beta06/linux/bin/../lib/libsycl.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_replace_aux(unsigned long, unsigned long, unsigned long, char)@GLIBCXX_3.4.21'
    /opt/intel/inteloneapi/compiler/2021.1-beta06/linux/bin/../lib/libsycl.so: undefined reference to `std::__cxx11::basic_istringstream<char, std::char_traits<char>, std::allocator<char> >::basic_istringstream(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::_Ios_Openmode)@GLIBCXX_3.4.21'
    /opt/intel/inteloneapi/compiler/2021.1-beta06/linux/bin/../lib/libsycl.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()@GLIBCXX_3.4.21'
    /opt/intel/inteloneapi/compiler/2021.1-beta06/linux/bin/../lib/libsycl.so: undefined reference to `std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >::basic_stringstream(std::_Ios_Openmode)@GLIBCXX_3.4.21'
    /opt/intel/inteloneapi/compiler/2021.1-beta06/linux/bin/../lib/libsycl.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::compare(char const*) const@GLIBCXX_3.4.21'
    /opt/intel/inteloneapi/compiler/2021.1-beta06/linux/bin/../lib/libsycl.so: undefined reference to `std::__cxx11::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> >::str() const@GLIBCXX_3.4.21'
    /opt/intel/inteloneapi/compiler/2021.1-beta06/linux/bin/../lib/libsycl.so: undefined reference to `std::basic_fstream<char, std::char_traits<char> >::basic_fstream(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::_Ios_Openmode)@GLIBCXX_3.4.21'
    /opt/intel/inteloneapi/compiler/2021.1-beta06/linux/bin/../lib/libsycl.so: undefined reference to `VTT for std::__cxx11::basic_istringstream<char, std::char_traits<char>, std::allocator<char> >@GLIBCXX_3.4.21'
    /opt/intel/inteloneapi/compiler/2021.1-beta06/linux/bin/../lib/libsycl.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_mutate(unsigned long, unsigned long, char const*, unsigned long)@GLIBCXX_3.4.21'
    /opt/intel/inteloneapi/compiler/2021.1-beta06/linux/bin/../lib/libsycl.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_replace(unsigned long, unsigned long, char const*, unsigned long)@GLIBCXX_3.4.21'
    /opt/intel/inteloneapi/compiler/2021.1-beta06/linux/bin/../lib/libsycl.so: undefined reference to `std::basic_ifstream<char, std::char_traits<char> >::basic_ifstream(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::_Ios_Openmode)@GLIBCXX_3.4.21'
    /opt/intel/inteloneapi/compiler/2021.1-beta06/linux/bin/../lib/libsycl.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::find(char const*, unsigned long, unsigned long) const@GLIBCXX_3.4.21'
    clang++: error: linker command failed with exit code 1 (use -v to see invocation)
    gmake[1]: *** [cmTC_43eaa] Error 1
    gmake[1]: Leaving directory `/home/sargen.yung/Development/OneAPI/crr/build/CMakeFiles/CMakeTmp'
    gmake: *** [cmTC_43eaa/fast] Error 2

  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:9 (project)

Would someone please tell what might be the problems that the example is not compilable? Anything might be missing in the installation process? Please help give some hints on the issue, thank you!

 

Tags (1)
0 Kudos
5 Replies
Highlighted
Moderator
92 Views

Hi,

Hi,

As per oneAPI beta06 release notes, centOS 7 is not officially supported.

Link for your reference: https://software.intel.com/content/www/us/en/develop/articles/intel-oneapi-dpcpp-system-requirements...

You might want to consider upgrading your Cent OS version to 8.x and see if that helps.

 

--Rahul

0 Kudos
Highlighted
Beginner
92 Views

Thanks for the replay.

Thanks for the replay.

We can upgrade to Centos 8. However, according to the release not (the same link you provided), FPGA  Add-on kit only supports Centos 7 (RHEL 7 with Linux kernel version 3.10). How can we make both Base kit and FPGA Add-on Kit working in the same machine?

 

0 Kudos
Highlighted
Moderator
92 Views

Hi,

Hi,

That's right.

Other oneAPI base toolkit samples might work after upgrading but FPGA samples might not work as expected since its not supported. (Only Ubuntu 18.04.3 and RHEL 7.0 is supported at the moment).

 

--Rahul

0 Kudos
Highlighted
Moderator
81 Views

Re:Failed to make any examples to compile in Centos 7

Hi,

 

I'm escalating this query to the concerned team.

 

--Rahul


0 Kudos
Highlighted
Novice
56 Views

No luck for CenOS 7 users

Sounds like this is not an OS problem but a gcc version problem. Or may be the problem is with how dpcpp tries to search for gcc. After installing latest new gcc version from source into /usr/local as per GNU build instructions on the server running CentOS 7 and exporting PATH and LD_LIBRARY_PATH:

export PATH=/usr/local/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/lib64:$LD_LIBRARY_PATH

dcpp still searches (use -v option) in the old directoty and selects default gcc which comes with CentOS 7:

Intel(R) oneAPI DPC++ Compiler 2021.1-beta07 (2020.5.0.0604)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /opt/intel/inteloneapi/compiler/latest/linux/bin
Found candidate GCC installation: /usr/lib/gcc/x86_64-redhat-linux/4.8.2
Found candidate GCC installation: /usr/lib/gcc/x86_64-redhat-linux/4.8.5
Selected GCC installation: /usr/lib/gcc/x86_64-redhat-linux/4.8.5=

Please note that on the DevCloud it is selecting a newer version:

Intel(R) oneAPI DPC++ Compiler 2021.1-beta07 (2020.5.0.0604)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /glob/development-tools/versions/oneapi/beta07/inteloneapi/compiler/latest/linux/bin
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7.4.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/8
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7.4.0

The requirement for newer gcc is present in 20.2 OpenCL SDK Programming guide:

"The emulator in Intel® FPGA SDK for OpenCL Pro Edition is built with GCC 7.2.0 as part of the offline compiler. When executing the host program for an emulated OpenCL device, the version of libstdc++.so must be at least that of GCC 7.2.0. In other words, the LD_LIBRARY_PATH environment variable must ensure that the correct version of libstdc++.so is found."

However instructions for installing new gcc for CenOS 7 users are not provided in Getting Stated Guide:"

CentOS and Red Hat Enterprise Linux Versions 6 and 7Note: Unfortunately, installing the Developer Toolset* (for example, devtoolset-7), does notprovide the desired result because it does not include a newer libstdc++.so.6library. The Developer Toolset* provides a custom version of the GCC that uses theolder libstdc++.so.6 library originally installed on the system.For CentOS and Red Hat Enterprise Linux versions 6 and 7, Intel recommends that you compile GCC from source and install it.

I think a good installation binary is in order to support local CentOS 7 installations.

0 Kudos