Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IndexError: index out of range #341

Open
a-lve opened this issue Apr 16, 2024 · 4 comments
Open

IndexError: index out of range #341

a-lve opened this issue Apr 16, 2024 · 4 comments

Comments

@a-lve
Copy link

a-lve commented Apr 16, 2024

When I run python3 benchmarks.py,I get the following error, how can I solve it?
2024-04-16 17:31:18,689 BoardTestCase ERROR: Running kyber768 - m4fspeed - stack failed with exception: Traceback (most recent call last):

File "/home/lll/pqm4/mupq/mupq.py", line 239, in run_test
output = self.interface.run(binary, self.iterations)

File "/home/lll/pqm4/mupq/platforms.py", line 100, in run
if self._dev.read_until(b'=')[-1] != b'='[0]:

IndexError: index out of range

kyber768 - m4fspeed FAILED
stack: 0%| | 0/78 [00:02<?, ?it/s, kyber768 - m4fspeed]

@mkannwischer
Copy link
Contributor

Can you please also post the contents of the log written by it (mupq.log)?

@a-lve
Copy link
Author

a-lve commented Apr 17, 2024

It's strange that after running the above command many times, multiple new documents are generated, such as mupq.log.4 and mupq.log.5, but some of the documents are empty, and some of them are shown as follows:2024-04-16 17:31:15,718 BoardTestCase INFO: Benchmarking kyber768 - m4fspeed
2024-04-16 17:31:15,718 BoardTestCase INFO: Runnning kyber768 - m4fspeed - stack
2024-04-16 17:31:15,718 Implementation INFO: Building kyber768 - m4fspeed - stack
2024-04-16 17:31:15,883 Implementation DEBUG: make stdout output:
make: “bin/crypto_kem_kyber768_m4fspeed_stack.bin”已是最新。
2024-04-16 17:31:18,689 BoardTestCase ERROR: Running kyber768 - m4fspeed - stack failed with exception: Traceback (most recent call last):

File "/home/lll/pqm4/mupq/mupq.py", line 239, in run_test
output = self.interface.run(binary, self.iterations)

File "/home/lll/pqm4/mupq/platforms.py", line 100, in run
if self._dev.read_until(b'=')[-1] != b'='[0]:

IndexError: index out of range
In addition, the model number of the development board I use is STM32F429ZI, not STM32F4Discovery, I don't know if it will also affect this

@jelliyjane
Copy link

jelliyjane commented May 17, 2024

I am encountering the same error. If you have resolved this error, could you please share the solution?
I use STM32F4Discovery board.

@a-lve
Copy link
Author

a-lve commented May 27, 2024

Hello, I encountered this problem at that time because python3 on ubuntu system reported a lot of dpkg warnings, I reinstalled the system and reinstalled python3 and it ran successfully.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants