-
Notifications
You must be signed in to change notification settings - Fork 117
[bugfix] Fix incomplete processor info object when processor topology is auto-detected #2168
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
[bugfix] Fix incomplete processor info object when processor topology is auto-detected #2168
Conversation
|
Hello @ekouts, Thank you for updating! Cheers! There are no PEP8 issues in this Pull Request!Do see the ReFrame Coding Style Guide Comment last updated at 2021-09-04 21:02:21 UTC |
Codecov Report
@@ Coverage Diff @@
## master #2168 +/- ##
==========================================
+ Coverage 86.29% 86.31% +0.02%
==========================================
Files 53 53
Lines 9571 9557 -14
==========================================
- Hits 8259 8249 -10
+ Misses 1312 1308 -4
Continue to review full report at Codecov.
|
vkarak
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a serious one! Thanks for catching it @ekouts! I would suggest and alternative design altogether, though, for both the ProcessorType and the DeviceType. I would just make them simple wrappers of their underlying dictionary. All the properties should simply do return self._processor_info.get('propname', None) and both ProcessorType and DeviceType should provide an update(info) method that would update the underlying dictionary.
|
So just to make sure I get this right:
I will change the
Should this |
|
@ekouts You raise good points:
That's a good idea.
I would vote for returning
I would keep them as properties that do
We should point to the configuration description for the standard properties and document here only the derived ones.
What if works in an additive way but the target dictionary (the one that comes from the conf file) takes precedence? If the inserted/autodetected value is already there, then we simply use the existing one. Something like a |
Now if the processor dictionary in the configuration is not an empty dictionary in the configuration we don't try the auto-detection at all. For me it's better (and obviously much easier) to keep this behavior since you might prefer to have little "reliable" information than ReFrame's guess. But if you think it's worth it I can try that. |
|
Ok, let's keep it as is for the moment and bring it up for discussion. |
|
@jenkins-cscs retry all |
|
I changed a bit the implementation, because the |
When we detect automatically the topology we used to set directly only the
_infoattribute of the processor of the partition. As a result the other attributes of theProcessorTypewere not set and we would get for exampleself.current_partition.processor.num_cpusasNonewhileself.current_partition.processor.infois a non empty dictionary. The other attributes were only set in the_init_: https://github.com/eth-cscs/reframe/blob/34ee3d0bc91f7c9f5e56db1c6b46a49e8e5ee623/reframe/core/systems.py#L38Same for the devices, we should set
self.current_partition._devicesto a list ofDeviceTypeobjects and not dictionaries.