Intel® High Level Design
Support for Intel® High Level Synthesis Compiler, DSP Builder, OneAPI for Intel® FPGAs, Intel® FPGA SDK for OpenCL™
661 Discussions

Configuring for non-root-user access without "Error opening AFC: insufficient privileges"

ndevenish
New Contributor I
597 Views

We have a new machine with two PAC D5005 cards, which we intend to use both for compilation and running. Because the oneAPI toolkit requires Red Hat 8, and the PAC drivers only support Red Hat 7, I have installed the toolkit according to the instructions here: https://www.intel.com/content/www/us/en/developer/articles/technical/oneapi-dpcpp-fpga-designs-on-rhel-7.html.

 

When running as root, this works fine - compiled programs can enumerate the cards, aocl list-devices lists devices.

 

When running as a non-root normal user, running aocl list-devices, or many other programs, prints "Error opening AFC: insufficient privileges". A bare bones enumerator:

int main(void) {
// Loop through the available platforms
for (auto const& platform : platform::get_platforms()) {
}
}

crashes with:

% ./enumerate
Error opening AFC: insufficient privileges
terminate called after throwing an instance of 'cl::sycl::runtime_error'
what(): Native API failed. Native API returns: -2 (CL_DEVICE_NOT_AVAILABLE) -2 (CL_DEVICE_NOT_AVAILABLE)
zsh: abort ./enumerate

however, running it undersudo works fine.

 

I have used devcloud and other systems intel has lent, and this has worked fine as a normal non-root user account. How can I configure oneAPI or the FPGA drivers so that other users can use the devices?

0 Kudos
1 Solution
ndevenish
New Contributor I
577 Views

Hi @BoonBengT_Intel ,

 

This didn't work directly - however it did lead me to discover that I needed to change the permissions on /dev/intel-fpga-fme.0 and /dev/intel-fpga-port.0 to 0666 (chmod a+rw). This now works from other users (and I could change the group details if I needed finer control).

 

Thank you.

 

Nick

View solution in original post

0 Kudos
3 Replies
BoonBengT_Intel
Moderator
583 Views

Hi @ndevenish,


Thank you for posting in Intel community forum and hope all is well.

For Intel GPU driver, would recommend to look into the instruction in the link below:

https://www.intel.com/content/www/us/en/develop/documentation/installation-guide-for-intel-oneapi-toolkits-linux/top/prerequisites/install-intel-gpu-drivers.html#install-intel-gpu-drivers

Hope that clarify.


Best Wishes

BB


0 Kudos
ndevenish
New Contributor I
578 Views

Hi @BoonBengT_Intel ,

 

This didn't work directly - however it did lead me to discover that I needed to change the permissions on /dev/intel-fpga-fme.0 and /dev/intel-fpga-port.0 to 0666 (chmod a+rw). This now works from other users (and I could change the group details if I needed finer control).

 

Thank you.

 

Nick

0 Kudos
BoonBengT_Intel
Moderator
561 Views

Hi @ndevenish,


Great! Good to know that it is working now and thanks for sharing the workaround for that.

My guess is that there might be some different in granting access based on the hardware and platform setup.

With no further clarification on this thread, it will be transitioned to community support for further help on doubts in this thread.

Thank you for the questions and as always pleasure having you here.


Best Wishes

BB


0 Kudos
Reply