permission error accessing fpga aria 10
I am getting errors running fpgabist when logged in as an unprivileged user, but it works when using the root account. Additionally, I see permission denied errors in an strace when attempting to use aocl for any purpose. The permissions look correct based on the changes made by AOCL_BOARD_PACKAGE_ROOT/linux64/libexec/setup_permissions.sh. I am unable to run aocl commands under root user until I determine all the necessary environment variables/path updates needed to successfully run them. This is installed in a shared environment, so unprivileged users would need access to use the cards.
$ ll /dev/intel-fpga*
crw-rw-rw- 1 root root 242, 0 Sep 14 12:51 /dev/intel-fpga-fme.0
crw-rw-rw- 1 root root 242, 1 Sep 14 12:51 /dev/intel-fpga-fme.1
crw-rw-rw- 1 root root 242, 2 Sep 14 12:51 /dev/intel-fpga-fme.2
crw-rw-rw- 1 root root 241, 0 Sep 14 12:51 /dev/intel-fpga-port.0
crw-rw-rw- 1 root root 241, 1 Sep 14 12:51 /dev/intel-fpga-port.1
crw-rw-rw- 1 root root 241, 2 Sep 14 12:51 /dev/intel-fpga-port.2
$ fpgabist /opt/intel/inteldevstack/hw/samples/nlb_mode_3/bin/nlb_mode_3.gbs -B 3b
Beginning FPGA Built-In Self-Test
==========================================================
Device: bus = 3b, device = 00, func = 0
//****** FME ******//
Object Id : 0xF200000
PCIe s:b:d:f : 0000:3B:00:0
Device Id : 0x09C4
Socket Id : 0x00
Ports Num : 01
Bitstream Id : 0x123456789ABCDEF
Bitstream Version : 1.2.3
Pr Interface Id : ce489693-98f0-5f33-946d-560708be108a
//****** PORT ******//
Object Id : 0xF100000
PCIe s:b:d:f : 0000:3B:00:0
Device Id : 0x09C4
Socket Id : 0x00
Ports Num : 01
Bitstream Id : 0x123456789ABCDEF
Bitstream Version : 1.2.3
Pr Interface Id : ce489693-98f0-5f33-946d-560708be108a
Accelerator Id : f7df405c-bd7a-cf72-22f1-44b0b93acd18
Accelerator GUID : f7df405c-bd7a-cf72-22f1-44b0b93acd18
//****** TEMP ******//
Object Id : 0xF200000
PCIe s:b:d:f : 0000:3B:00:0
Device Id : 0x09C4
Socket Id : 0x00
Ports Num : 01
Bitstream Id : 0x123456789ABCDEF
Bitstream Version : 1.2.3
Pr Interface Id : ce489693-98f0-5f33-946d-560708be108a
Package Temperature : 38 Centigrade
metrics_utils.c:633:enum_bmc_metrics_info() **ERROR** : Failed to load BMC SDR.
metrics.c:80:xfpga_fpgaGetNumMetrics() **ERROR** : Failed to Discover Metrics
Error getting number of metrics: not found
Error reading metrics from BMC: not found
//****** POWER ******//
....
Writing bitstream
Done
Running fpgadiag read test...
sysfs.c:1481:sync_object() **ERROR** : Error opening /sys/class/fpga/intel-fpga-dev.0/intel-fpga-fme.0/dperf/fabric/freeze: Permission denied
terminate called after throwing an instance of 'opae::fpga::types::exception'
what(): failed with return code FPGA_EXCEPTION at: sysobject.cpp:get():85
Failed Test: read
Command 'fpgadiag -B 0x3b --mode=read --read-vc=vh0 --write-vc=vh0 --multi-cl=4 --begin=1024, --end=1024 --timeout-sec=5 --cont' returned non-zero exit status 250
Running fpgadiag write test...
....
$ sudo fpgabist /opt/intel/inteldevstack/hw/samples/nlb_mode_3/bin/nlb_mode_3.gbs -B 3b
....
Done
Running fpgadiag read test...
Cachelines Read_Count Write_Count Cache_Rd_Hit Cache_Wr_Hit Cache_Rd_Miss Cache_Wr_Miss Eviction 'Clocks(@400 MHz)' Rd_Bandwidth Wr_Bandwidth
1024 540436620 0 0 0 0 0 0 2000964806 6.914 GB/s 0.000 GB/s
VH0_Rd_Count VH0_Wr_Count VH1_Rd_Count VH1_Wr_Count VL0_Rd_Count VL0_Wr_Count
540436620 1 0 0 0 0
Running fpgadiag write test...
Cachelines Read_Count Write_Count Cache_Rd_Hit Cache_Wr_Hit Cache_Rd_Miss Cache_Wr_Miss Eviction 'Clocks(@400 MHz)' Rd_Bandwidth Wr_Bandwidth
1024 0 543165164 0 0 0 0 0 2000611414 0.000 GB/s 6.950 GB/s
VH0_Rd_Count VH0_Wr_Count VH1_Rd_Count VH1_Wr_Count VL0_Rd_Count VL0_Wr_Count
0 543165165 0 0 0 0
Running fpgadiag trput test...
Cachelines Read_Count Write_Count Cache_Rd_Hit Cache_Wr_Hit Cache_Rd_Miss Cache_Wr_Miss Eviction 'Clocks(@400 MHz)' Rd_Bandwidth Wr_Bandwidth
1024 487225740 488951172 0 0 0 0 0 2001626166 6.231 GB/s 6.253 GB/s
VH0_Rd_Count VH0_Wr_Count VH1_Rd_Count VH1_Wr_Count VL0_Rd_Count VL0_Wr_Count
487225740 488951173 0 0 0 0
Finished Executing NLB (FPGA DIAG)Tests
Built-in Self-Test Completed.
$ aocl diagnose
aocl diagnose: Running diagnose from /opt/intel/inteldevstack/opencl/opencl_bsp/linux64/libexec
aocl diagnose: failed 3 times. First error below:
Vendor: Intel Corp
handle is: -2
Phys Dev Name Status Information
pac_a10_f100002Uninitialized Not configured with OpenCL BSP.
Found no active device installed on the host machine.
Please consult documentation for troubleshooting steps
DIAGNOSTIC_FAILED