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

Improve rudimentary platform check #103

Closed
snim2 opened this issue Nov 10, 2015 · 3 comments · Fixed by #114
Closed

Improve rudimentary platform check #103

snim2 opened this issue Nov 10, 2015 · 3 comments · Fixed by #114

Comments

@snim2
Copy link
Collaborator

snim2 commented Nov 10, 2015

When using resume-model, Krun performs a rudimentary checks to determine whether the benchmark is being resumed on the same machine that it was started on. Currently, this check only checks that the uname of the two machines is identical.

This test should differ between platforms, and it would make sense to refactor it into the classes in platform.py. This may happen as part of #75

For Linux, we could use a strong check such as blkid, which returns a unique ID of the root file system. I guess someone could have installed more RAM between resumes, so this doesn't catch every case, but anyhow @ltratt felt this was overkill and suggested we use hostname, which is available on most (all?) Unix like platforms.

A more detailed fix would check every value in the audit dictionary. However, platform.audit() returns a str, but the audit in the JSON file is a unicode. On my machine I have packages with names that contain acutes and other accents, and a == between "this" platform and the previous one always returned False. The Internet contains a wide variety of solutions to this problem, and I didn't get any of them to quite work: hence the current hack.

@ltratt
Copy link
Member

ltratt commented Nov 10, 2015

I must admit, I was never unconvinced that this is either necessary or feasible; and your travails have probably reinforced that feeling!

@vext01
Copy link
Member

vext01 commented Nov 10, 2015

You mean you were never convinced, right? I think so :)

@ltratt
Copy link
Member

ltratt commented Nov 10, 2015

Oops, yes!

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

Successfully merging a pull request may close this issue.

3 participants