eembc / energyrunner

The EEMBC EnergyRunner application framework for the MLPerf Tiny benchmark.
14 stars 5 forks source link

Running Energy Runner app in Docker container #35

Open arkadiuszpalinski opened 5 months ago

arkadiuszpalinski commented 5 months ago

Hi,

I'm trying to run Energy Runner app in Docker container, but it can't detect any device, though com ports are visible.

The container is run with --privileged=true, inside the container I can connect with DUT with minicom and DUT responds to name%:

m-timestamp-mode-performance
m-lap-us-2689
m-init-done
m-ready
m-name-dut-[STMicroelectronics]
m-ready

Outside of the container I can run Energy Runner app, it detects all devices and I can run measurements:

./benchmark-framework --script=script_perf.sync
Failed to load VISA library 'librsvisa.so': ENOENT: no such file or directory, open 'librsvisa.so'
No VISA driver was loaded
00000.320 framework: Package version: 3.0.10
00000.320 framework: Mode: production
00000.320 framework: User home directory is /home/arek
00000.320 framework: Session storage directory is /home/arek/eembc/runner/sessions
00000.320 framework: Temporary storage directory is /home/arek/eembc/runner/temp
00000.320 pnp: m-scan-start
00000.320 pnp: Looking for 'EEMBC Serial' devices...
00000.416 framework: Serial scan using 115200 baud
00002.427 pnp: m-device-added-uid[/dev/ttyACM2]-driverName[eeserial]-deviceType[dut]
00005.470 pnp: m-device-added-uid[/dev/ttyACM0]-driverName[eeserial]-deviceType[ioman]
00005.470 framework: Serial /dev/ttyACM1 uses another driver, skipping
00005.471 framework: Serial /dev/ttyS4 failed name check, skipping
00005.471 pnp: Looking for 'Joulescope' devices...
00005.471 pnp: Looking for 'STMicroelectronics LPM01A' devices...
00005.564 pnp: m-device-added-uid[/dev/ttyACM1]-driverName[lpm01a]-deviceType[emon]
00005.564 pnp: Looking for 'Keysight N6705 VISA' devices...
00005.564 pnp: m-scan-stop
00005.565 parser: Command "run "/home/arek/work/arrowml/tools/eembc/EnergyRunner_MLPerfTiny_Linux/script_perf.sync""
00005.565 parser: Command "bm init ulp-mlperf"
00005.566 sequencer: m-sequencer-start
00005.566 sequencer: m-sequencing-i[1]-command[umount]-ack[/parser: m-ready/]-ms[5000]-acc[0]-total_ms[15000]
00005.566 parser: Command "umount"
00005.566 parser: Nothing to unmount
00005.566 parser: m-umount-done
00005.566 parser: m-ready-finished[umount]
[rest is cut as the run itself is not important]

However, when I run Energy Runner app inside the container (the container has access to the same path, so Energy Runner files are exactly the same), it doesn't see any of the devices, regardless if I run it in CLI or GUI mode:

./benchmark-framework --script=script_perf.sync
Failed to load VISA library 'librsvisa.so': ENOENT: no such file or directory, open 'librsvisa.so'
No VISA driver was loaded
00000.321 framework: Package version: 3.0.10
00000.322 framework: Mode: production
00000.322 framework: User home directory is /home/arek
00000.322 framework: Session storage directory is /home/arek/eembc/runner/sessions
00000.322 framework: Temporary storage directory is /home/arek/eembc/runner/temp
00000.322 pnp: m-scan-start
00000.322 pnp: Looking for 'EEMBC Serial' devices...
00000.408 framework: Serial scan using 115200 baud
00000.408 pnp: Looking for 'Joulescope' devices...
00000.409 pnp: Looking for 'STMicroelectronics LPM01A' devices...
00000.480 pnp: Looking for 'Keysight N6705 VISA' devices...
00000.481 pnp: m-scan-stop
00000.482 parser: Command "run "/workspaces/arrowml/tools/eembc/EnergyRunner_MLPerfTiny_Linux/script_perf.sync""
00000.482 parser: Command "bm init ulp-mlperf"
00000.482 sequencer: m-sequencer-start
00000.482 sequencer: m-sequencing-i[1]-command[umount]-ack[/parser: m-ready/]-ms[5000]-acc[0]-total_ms[15000]
00000.483 parser: Command "umount"
00000.483 parser: Nothing to unmount
00000.483 parser: m-umount-done
00000.483 parser: m-ready-finished[umount]
[rest is cut as measurements failed because of lack of device]

The contents of eembc.ini (identical inside and outside of the container, everything is default):

vim ~/.eembc.ini
default-timeout-ms=5000
dut-baud=115200
dut-boot-mv=3000
emon-drop-thresh-pct=0.1
root=/home/arek
timestamp-hold-us=50
umount-on-error=true
use-crlf=false
use-visa=true
n6705-set-vio=true
disable-mute=false

As I understand, Energy Runner opens a com port and sends name% command to DUT, which works through minicom in the container. Is Energy Runner doing something else before opening com ports for scanning devices, that could fail? Is there a way to enable more logs to debug this issue?