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

odb: write_odb fails with not so pretty iostream message #6120

Closed
titan73 opened this issue Nov 7, 2024 · 10 comments
Closed

odb: write_odb fails with not so pretty iostream message #6120

titan73 opened this issue Nov 7, 2024 · 10 comments
Assignees
Labels
odb OpenDB

Comments

@titan73
Copy link
Contributor

titan73 commented Nov 7, 2024

Describe the bug

See title.

Expected Behavior

write_db should succeed.

Environment

v2.0-16855-ga15114a95

To Reproduce

openroad test.tcl

write_db.zip

Relevant log output

No response

Screenshots

No response

Additional Context

No response

@eder-matheus
Copy link
Collaborator

@titan73 If I manually create the dbs directory, the command don't fail. I'm not sure if any of our write commands should create directories. @maliberty any comments?

@eder-matheus eder-matheus added the odb OpenDB label Nov 7, 2024
@titan73
Copy link
Contributor Author

titan73 commented Nov 7, 2024

@eder-matheus yeah indeed I've just figured out that dbs folder was removed but the error message was not very helpful and I couldn't pinpoint the problem. I don't expect write_db to create the folder but that would propably be good to have a error message complaining about the missing "dbs" folder.

@maliberty
Copy link
Member

What was the message?

@maliberty
Copy link
Member

I don't think there is any change here so "anymore" seems inaccurate.

@eder-matheus
Copy link
Collaborator

What was the message?

@maliberty This: Error: test.tcl, 8 basic_ios::clear: iostream error (failed to open 'dbs/floorplan.odb.1'): iostream error.

My guess is that we are not checking if the file was properly created before trying to write to it.

@maliberty
Copy link
Member

"failed to open" is pretty clear that it is a file system error but we could make it prettier.

@titan73 titan73 changed the title odb: write_odb does not work work anymore odb: write_odb fails with not so pretty iostream message Nov 8, 2024
@titan73
Copy link
Contributor Author

titan73 commented Nov 8, 2024

Updated title.

Indeed the message says what's wrong. I got confused with its complicated message (like an assert) and thought there was a bug.
So nothing wrong actually but yes a better message could be nice.
Btw is this message sent to the logger?
And I don't understand. The message refers to file 'dbs/floorplan.odb.1' but the file is 'dbs/floorplan.odb'. What is this '.1'?

@titan73
Copy link
Contributor Author

titan73 commented Nov 8, 2024

It actually goes to the logger.

@titan73
Copy link
Contributor Author

titan73 commented Nov 8, 2024

read_db has a better error message:

>>> read_db foo/bar
[ERROR ORD-0007] foo/bar does not exist.

You can assigned this issue to me. I'll send a PR.

@titan73
Copy link
Contributor Author

titan73 commented Nov 11, 2024

Fixed by merged PR #6133.

@titan73 titan73 closed this as completed Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
odb OpenDB
Projects
None yet
Development

No branches or pull requests

3 participants