DARMA-tasking / vt

DARMA/vt => Virtual Transport
Other
33 stars 8 forks source link

`lb_iter` example sometimes produce an LBDatafile with incorrectly formatted `time` field. #2307

Closed thearusable closed 1 week ago

thearusable commented 2 weeks ago

Error produced by JSON validator:

[JSON_data_files_validator] SchemaError Key 'phases' error:
Or({'id': <class 'int'>, 'tasks': [{'entity': {Optional('collection_id'): <class 'int'>, 'home': <class 'int'>, 'id': <class 'int'>, Optional('index'): [<class 'int'>], 'type': <class 'str'>, 'migratable': <class 'bool'>, Optional('objgroup_id'): <class 'int'>}, 'node': <class 'int'>, 'resource': <class 'str'>, Optional('subphases'): [{'id': <class 'int'>, 'time': <class 'float'>}], 'time': <class 'float'>, Optional('user_defined'): <class 'dict'>, Optional('attributes'): <class 'dict'>}], Optional('communications'): [{'type': <class 'str'>, 'to': {'type': <class 'str'>, 'id': <class 'int'>, Optional('home'): <class 'int'>, Optional('collection_id'): <class 'int'>, Optional('migratable'): <class 'bool'>, Optional('index'): [<class 'int'>], Optional('objgroup_id'): <class 'int'>}, 'messages': <class 'int'>, 'from': {'type': <class 'str'>, 'id': <class 'int'>, Optional('home'): <class 'int'>, Optional('collection_id'): <class 'int'>, Optional('migratable'): <class 'bool'>, Optional('index'): [<class 'int'>], Optional('objgroup_id'): <class 'int'>}, 'bytes': <class 'float'>}], Optional('user_defined'): <class 'dict'>}) did not validate {'id': 0, 'tasks': [{'entity': {'collection_id': 7, 'home': 0, 'id': 262147, 'index': [0], 'migratable': True, 'type': 'object'}, 'node': 0, 'resource': 'cpu', 'subphases': [{'id': 0, 'time': 0.037242}, {'id': 1, 'time': 0.03718499999999997}, {'id': 2, 'time': 0.03715999999999997}], 'time': 0.11158699999999994}, {'entity': {'collection_id': 7, 'home': 0, 'id': 524291, 'index': [1], 'migratable': True, 'type': 'object'}, 'node': 0, 'resource': 'cpu', 'subphases': [{'id': 0, 'time': 0.037272}, {'id': 1, 'time': 0.03724400000000003}, {'id': 2, 'time': 0.037127999999999994}], 'time': 0.11164400000000002}, {'entity': {'home': 0, 'id': 3145740, 'migratable': False, 'objgroup_id': 786435, 'type': 'object'}, 'node': 0, 'resource': 'cpu', 'time': 0.0}, {'entity': {'collection_id': 7, 'home': 0, 'id': 1048579, 'index': [3], 'migratable': True, 'type': 'object'}, 'node': 0, 'resource': 'cpu', 'subphases': [{'id': 0, 'time': 0.037580999999999996}, {'id': 1, 'time': 0.037215}, {'id': 2, 'time': 0.037173999999999985}], 'time': 0.11196999999999999}, {'entity': {'home': 0, 'id': 1, 'migratable': False, 'type': 'object'}, 'node': 0, 'resource': 'cpu', 'subphases': [{'id': 0, 'time': 2.1999999999999884e-05}], 'time': 2.1999999999999884e-05}, {'entity': {'collection_id': 7, 'home': 0, 'id': 786435, 'index': [2], 'migratable': True, 'type': 'object'}, 'node': 0, 'resource': 'cpu', 'subphases': [{'id': 0, 'time': 0.03727900000000001}, {'id': 1, 'time': 0.037498000000000004}, {'id': 2, 'time': 0.03705200000000003}], 'time': 0.11182900000000004}, {'entity': {'home': 0, 'id': 4194316, 'migratable': False, 'objgroup_id': 1048579, 'type': 'object'}, 'node': 0, 'resource': 'cpu', 'time': 0.0}, {'entity': {'home': 0, 'id': 0, 'migratable': False, 'type': 'object'}, 'node': 0, 'resource': 'cpu', 'time': 0}]}
Key 'tasks' error:
Or({'entity': {Optional('collection_id'): <class 'int'>, 'home': <class 'int'>, 'id': <class 'int'>, Optional('index'): [<class 'int'>], 'type': <class 'str'>, 'migratable': <class 'bool'>, Optional('objgroup_id'): <class 'int'>}, 'node': <class 'int'>, 'resource': <class 'str'>, Optional('subphases'): [{'id': <class 'int'>, 'time': <class 'float'>}], 'time': <class 'float'>, Optional('user_defined'): <class 'dict'>, Optional('attributes'): <class 'dict'>}) did not validate {'entity': {'home': 0, 'id': 0, 'migratable': False, 'type': 'object'}, 'node': 0, 'resource': 'cpu', 'time': 0}
Key 'time' error:
0 should be instance of 'float'
thearusable commented 2 weeks ago

Those were the parameters I used:

lb_iter 4 1.0 1 --vt_lb --vt_lb_interval=1 --vt_lb_name=RotateLB --vt_lb_data --vt_lb_data_compress=false --vt_lb_data_dir=... --vt_lb_data_file=...

Looks like entire entity is not valid:

{
   "entity": {
      "home": 0,
      "id": 0,
      "migratable": false,
      "type": "object"
   },
   "node": 0,
   "resource": "cpu",
   "time": 0
}

After some testing I see it always happens for the last entity in phase 0.