Skip to content

Passing in Dynamically Sized User Data into Load Balancing #3250

Answered by rbuch
jacobfen asked this question in Q&A
Discussion options

You must be logged in to vote

This is unsupported currently, the LB framework has no awareness of what your user data type is (as you can tell from LBRegisterObjUserData(sizeof(LBUserDataStruct) + (3 * sizeof(int))), it only allows a size to be passed in, not a type). The user data is stored as one big flat buffer with offsets that are provided at registration, which you can interpret as an object or struct by casting it a la LBUserDataStruct* udata = (LBUserDataStruct*)odata.getUserData(CkpvAccess(_lb_obj_index)) (_lb_obj_index is the provided offset).

Thus. the PUP routine that you write in your type is never executed (since the runtime doesn't know about your type); instead, it is PUP'd as a char array of the speci…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@jacobfen
Comment options

Answer selected by rbuch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants