SEGV Running any emulator examples on RHEL7 Machine
Trying to use oneAPI 2023.0.0, building and running anything that tries to use the emulated FPGA:
% ./fpga_compile.fpga_emu
Running on device: Intel(R) FPGA Emulation Device
zsh: segmentation fault ./fpga_compile.fpga_emu
Including my own code. The stack trace indicates this is happening somewhere in TBB:
* thread #1, name = 'fpga_compile.fp', stop reason = signal SIGSEGV: invalid address (fault address: 0x0)
* frame #0: 0x00007ffff475de62 libtask_executor_emu.so.2022.15.12.0`Intel::OpenCL::TaskExecutor::TEDevice::on_scheduler_entry(bool, Intel::OpenCL::TaskExecutor::ArenaHandler&) + 66
frame #1: 0x00007ffff3f59e08 libtbb.so.12`tbb::detail::r1::observer_list::do_notify_entry_observers(this=<unavailable>, last=<unavailable>, worker=<unavailable>) at observer_proxy.cpp:199
frame #2: 0x00007ffff3f73ba8 libtbb.so.12`tbb::detail::r1::nested_arena_context::nested_arena_context(tbb::detail::r1::thread_data&, tbb::detail::r1::arena&, unsigned long) [inlined] tbb::detail::r1::observer_list::notify_entry_observers(this=<unavailable>, last=<unavailable>, worker=<unavailable>) at observer_proxy.h:135
frame #3: 0x00007ffff3f73b96 libtbb.so.12`tbb::detail::r1::nested_arena_context::nested_arena_context(this=<unavailable>, td=<unavailable>, nested_arena=<unavailable>, slot_index=<unavailable>) at arena.cpp:537
frame #4: 0x00007ffff3f5c1a8 libtbb.so.12`tbb::detail::r1::task_arena_impl::execute(ta=<unavailable>, d=<unavailable>) at arena.cpp:690
frame #5: 0x00007ffff4763243 libtask_executor_emu.so.2022.15.12.0`Intel::OpenCL::TaskExecutor::immediate_command_list::LaunchExecutorTask(bool, Intel::OpenCL::Utils::SharedPtr<Intel::OpenCL::TaskExecutor::ITaskBase> const&) + 371
frame #6: 0x00007ffff4ac4dd6 libintelocl_emu.so`Intel::OpenCL::Framework::FrameworkProxy::ExecuteImmediate(Intel::OpenCL::Utils::SharedPtr<Intel::OpenCL::TaskExecutor::ITaskBase> const&) const + 22
frame #7: 0x00007ffff4b100be libintelocl_emu.so`Intel::OpenCL::Framework::BuildTask::Launch() + 158
frame #8: 0x00007ffff4b1bd62 libintelocl_emu.so`Intel::OpenCL::Framework::ProgramService::BuildProgram(Intel::OpenCL::Utils::SharedPtr<Intel::OpenCL::Framework::Program>&, unsigned int, _cl_device_id* const*, char const*, void (*)(_cl_program*, void*), void*) + 6978
frame #9: 0x00007ffff4af296a libintelocl_emu.so`Intel::OpenCL::Framework::Context::BuildProgram(_cl_program*, unsigned int, _cl_device_id* const*, char const*, void (*)(_cl_program*, void*), void*) + 346
frame #10: 0x00007ffff4ad5a49 libintelocl_emu.so`Intel::OpenCL::Framework::ContextModule::BuildProgram(_cl_program*, unsigned int, _cl_device_id* const*, char const*, void (*)(_cl_program*, void*), void*) + 409
frame #11: 0x00007ffff4a8061c libintelocl_emu.so`clBuildProgram + 2396
frame #12: 0x00007ffff75f5707 libsycl.so.6`_pi_result sycl::_V1::detail::plugin::call_nocheck<(sycl::_V1::detail::PiApiKind)42, _pi_program*, int, _pi_device* const*, char const*, std::nullptr_t, std::nullptr_t>(_pi_program*, int, _pi_device* const*, char const*, std::nullptr_t, std::nullptr_t) const + 391
frame #13: 0x00007ffff75f456c libsycl.so.6`sycl::_V1::detail::ProgramManager::build(std::unique_ptr<_pi_program, _pi_result (*)(_pi_program*)>, std::shared_ptr<sycl::_V1::detail::context_impl>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, _pi_device* const&, unsigned int) + 4908
frame #14: 0x00007ffff75ef2bb libsycl.so.6`sycl::_V1::detail::ProgramManager::getBuiltPIProgram(long, std::shared_ptr<sycl::_V1::detail::context_impl> const&, std::shared_ptr<sycl::_V1::detail::device_impl> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, sycl::_V1::detail::program_impl const*, bool) + 3547
frame #15: 0x00007ffff75f0832 libsycl.so.6`sycl::_V1::detail::ProgramManager::getOrCreateKernel(long, std::shared_ptr<sycl::_V1::detail::context_impl> const&, std::shared_ptr<sycl::_V1::detail::device_impl> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, sycl::_V1::detail::program_impl const*) + 1170
frame #16: 0x00007ffff763c3e5 libsycl.so.6`sycl::_V1::detail::enqueueImpKernel(std::shared_ptr<sycl::_V1::detail::queue_impl> const&, sycl::_V1::detail::NDRDescT&, std::vector<sycl::_V1::detail::ArgDesc, std::allocator<sycl::_V1::detail::ArgDesc> >&, std::shared_ptr<sycl::_V1::detail::kernel_bundle_impl> const&, std::shared_ptr<sycl::_V1::detail::kernel_impl> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, long const&, std::vector<_pi_event*, std::allocator<_pi_event*> >&, _pi_event**, std::function<void* (sycl::_V1::detail::AccessorImplHost*)> const&) + 309
frame #17: 0x00007ffff763fbe2 libsycl.so.6`sycl::_V1::detail::ExecCGCommand::enqueueImp() + 10082
frame #18: 0x00007ffff762bcd9 libsycl.so.6`sycl::_V1::detail::Command::enqueue(sycl::_V1::detail::EnqueueResultT&, sycl::_V1::detail::BlockingT, std::vector<sycl::_V1::detail::Command*, std::allocator<sycl::_V1::detail::Command*> >&) + 1017
frame #19: 0x00007ffff764b4a2 libsycl.so.6`sycl::_V1::detail::Scheduler::addCG(std::unique_ptr<sycl::_V1::detail::CG, std::default_delete<sycl::_V1::detail::CG> >, std::shared_ptr<sycl::_V1::detail::queue_impl>) + 1794
frame #20: 0x00007ffff76831b2 libsycl.so.6`sycl::_V1::handler::finalize() + 8626
frame #21: 0x00007ffff76b087a libsycl.so.6`void sycl::_V1::detail::queue_impl::finalizeHandler<sycl::_V1::handler>(sycl::_V1::handler&, sycl::_V1::detail::CG::CGTYPE const&, sycl::_V1::event&) + 202
frame #22: 0x00007ffff76b04f1 libsycl.so.6`sycl::_V1::detail::queue_impl::submit_impl(std::function<void (sycl::_V1::handler&)> const&, std::shared_ptr<sycl::_V1::detail::queue_impl> const&, std::shared_ptr<sycl::_V1::detail::queue_impl> const&, std::shared_ptr<sycl::_V1::detail::queue_impl> const&, sycl::_V1::detail::code_location const&, std::function<void (bool, bool, sycl::_V1::event&)> const*) + 929
frame #23: 0x00007ffff76af945 libsycl.so.6`sycl::_V1::detail::queue_impl::submit(std::function<void (sycl::_V1::handler&)> const&, std::shared_ptr<sycl::_V1::detail::queue_impl> const&, sycl::_V1::detail::code_location const&, std::function<void (bool, bool, sycl::_V1::event&)> const*) + 53
frame #24: 0x00007ffff76af905 libsycl.so.6`sycl::_V1::queue::submit_impl(std::function<void (sycl::_V1::handler&)>, sycl::_V1::detail::code_location const&) + 21
frame #25: 0x0000000000404241 fpga_compile.fpga_emu`main [inlined] sycl::_V1::event sycl::_V1::queue::submit<main::'lambda'(sycl::_V1::handler&)>(this=0x00007fffffffb380, CGF=_ZTSZ4mainEUlRN4sycl3_V17handlerEE_ @ 0x000055f5b83b2d60, CodeLoc=0x00007fffffffb448), sycl::_V1::detail::code_location const&) at queue.hpp:318:18
frame #26: 0x00000000004041e2 fpga_compile.fpga_emu`main at fpga_compile.cpp:62
frame #27: 0x00007ffff702e555 libc.so.6`__libc_start_main + 245
frame #28: 0x0000000000403766 fpga_compile.fpga_emu`_start + 41
Now... we were advised by Intel that the PAC only worked on Red Hat 7 - this seems to be corroborated by the documentation here. , which clearly specifies that only Red Hat 7 and kernel 3.10.0 were supported.
Previously, there were instructions at https://www.intel.com/content/www/us/en/developer/articles/technical/oneapi-dpcpp-fpga-designs-on-rhel-7.html which described how to solve this using a separately built GCC (and an internal intel machine that we were given access to did indeed have this process done already, albeit for an old 2021 installation of oneAPI). This documentation has disappeared now, and points back to the FPGA front-page, like a lot of the documentation links.
Is this likely to be the cause of the issue? Is this use case not supported any more? How can I use these cards if oneAPI doesn't support the operating system that the cards must be installed on?
Is there anything else I can do to fix this?