-
Notifications
You must be signed in to change notification settings - Fork 3
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
BB-4: Macro to identify the library implementation #2
Comments
We need a macro GrB_IMPLEMENTATION and GrB_VERSION or GrB_DATE We also need to think about the platform issue so I can mix two different GraphBLAS libraries in a single program. |
GrB_VERSION already in use (it is the spec version implemented)...GrB_IMPLEMENTATION_VERSION perhaps. |
This very important, as is a run-time query for the name and version of the library. I run into linking problems because SS:GraphBLAS is too successful... I can accidentally link against a libgraphblas.so version 1.0 that comes built in to Linux. It's my own library, SuiteSparse:GraphBLAS, but version 1.0. MATLAB has SuiteSparse:GraphBLAS v3.3 built in. If I can query the name and version of the library at both compile-time and at run time, then I can more easily catch these errors. Adding this functionality as both macros and user-callable functions (both) is simple to do but would save a lot of headache. I don't recommend allowing the mix of 2 different GraphBLAS libraries in a single program. Who owns GrB_mxm? Is it me or someone else? C has no namespace management like C++ has. |
Isn't the suggestion contrary to the very idea of having a standard API for portability of application across libraries being used? Are we giving application programmers freedom to implement non-portable code by putting library specific calls? The question really is whether the C-API version (such as 2.0, 2.1, ...) supported by the library needs query-able, in which case it should be a function call. |
As mentioned in last committee meeting we must have this feature in get/set in order to support implementation specific hints/fields. Without that we can easily get silent wrong behavior if two extensions While yes, it's ideal to avoid implementation specific behavior we can't be too strict and suffocate extensions to the spec. For instance Tim has a type hint for bitmap, which we won't be adding to the spec. If another library defines a type hint for ELL or DIA and accidentally |
Will, that is the question. Doesn't implementation specificity make the program non-portable across graphBLAS libraries, and constraint the libraries from evolving. I think we just need to be careful about what we are getting and setting. For getting C_API version, GrB_getVersion( ) is there. |
No. Implementations are already non-portable, and Julia, pygraphblas, and LAGraph are non-portable due (in part) to the lack of this feature. The purpose is to allow users and other library authors to ensure that extensions can be used portably. That is you can say:
We should define both a compile time macro and a runtime As it stands now one cannot use SuiteSparse extensions, or more importantly, |
This will be part of the get/set proposal, but also needs a macro. |
Each library should define a macro that declares itself to the user, such as
GrB_XXX_GRAPHBLAS
, whereXXX
is the name of implementation. So the user can write this, if needed:The text was updated successfully, but these errors were encountered: