You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a generic logging callback that tried to log the "thread" identifier so is called in many different contexts and one of the things it does is call ABT_self_get_thread_id(), however that fails if called outside of a argobots context, so before we call that we call ABT_self_get_type() which appears to do exactly what we want.
Looking at the code we're don't have ABT_CONFIG_ENABLE_VER_20_API set, so we're seeing log messages of "[self.c:300] ABT_self_get_type: 4" printed every time we call this function, and it's then returning ABT_ERR_INV_XSTREAM and setting type to ABT_UNIT_TYPE_EXT.
Other than the debug printf when using --enable-debug everything is working as we expect, but it seems that calling this function in this context is OK so the message should not be printed in this case.
One fix would be to create a new ABTI_SETUP_LOCAL_XSTREAM_SILENT() macro to remove the print and call it from self_get_type, there would be the possibility to use this in ABT_self_get_thread_id() as well which would work for our use-case but I can see why you might not want this generally.
The text was updated successfully, but these errors were encountered:
Thank you for reporting the issue! I agree. those messages look annoying. I would like to change this error behavior since it is not an "error", but while we are maintaining this 1.x API, we should suppress this error message for some functions that return error codes users might use.
I will create a PR soon.
The following does not fix this issue, but just tips:
Workaround for Argobots 1.1 (latest stable):
Neither event log nor error message, but -g -Wall:
./configure --enable-debug=yes
Both event log and error message.
./configure --enable-debug=all
Workaround for Argobots > 1.1 (main branch):
This --enable-debug options are cleaned up by #332.
Neither event log nor error message, but -g -Wall.
./configure --enable-debug=yes
Only event log.
./configure --enable-debug=yes,log,ub_assert
Both event log and error message.
# --enable-debug=all is equal to --enable-debug=yes,err,log,ub_assert
./configure --enable-debug=all
Thank you. Whilst the messages are annoying they're not causing a problem so I don't think we need any immediate workarounds but that's good information.
Currently we're using 1.1 and not supplying any debug options, as part of investigating #333 I've been trying tip of main and using --enable-debug=most which is where I saw the issue. It's likely that we'll be testing with at least some debugging turned on in future, if only to get -g enabled.
We have a generic logging callback that tried to log the "thread" identifier so is called in many different contexts and one of the things it does is call ABT_self_get_thread_id(), however that fails if called outside of a argobots context, so before we call that we call ABT_self_get_type() which appears to do exactly what we want.
Looking at the code we're don't have ABT_CONFIG_ENABLE_VER_20_API set, so we're seeing log messages of "[self.c:300] ABT_self_get_type: 4" printed every time we call this function, and it's then returning ABT_ERR_INV_XSTREAM and setting type to ABT_UNIT_TYPE_EXT.
Other than the debug printf when using --enable-debug everything is working as we expect, but it seems that calling this function in this context is OK so the message should not be printed in this case.
One fix would be to create a new ABTI_SETUP_LOCAL_XSTREAM_SILENT() macro to remove the print and call it from self_get_type, there would be the possibility to use this in ABT_self_get_thread_id() as well which would work for our use-case but I can see why you might not want this generally.
The text was updated successfully, but these errors were encountered: