-
Notifications
You must be signed in to change notification settings - Fork 262
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
GraphBLAS: Avoid warnings about undefined _OPENMP
#482
GraphBLAS: Avoid warnings about undefined _OPENMP
#482
Conversation
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 good idea, but there are 2 glitches below.
The compilation is more silent now. But the demos still spew out warnings like before:
Where does that come from? Does it need to be changed somewhere else, too? |
If the source of GraphBLAS changes then a "make" is required inside the JITpackage folder. That is a compressed set of source files that gets added to the libgraphblas.so so the JIT can find its source at run time. Then add that to the PR. The runner doesn't keep /home/username/.SuiteSparse/GrB8.2.1 I assume, or the LOCALAPPDATA/SuiteSparse/GrB8.2.1 folder I assume. But you would need to delete your copies of that folder. The end user doesn't need to do this because if a new version of GraphBLAS is installed, the old arc folder and old compiled jit kernels are abandoned (because the GrB version is in the name of the folder). |
Thank you for the clear instructions. I wasn't aware of that. |
Yes, it's an unusual mechanism. The GraphBLAS JIT needs access to its own source code. Rather than relying on source files outside of libgraphblas.so (which might not be available or perhaps stale), I incorporate compressed source code into libgraphblas.so itself. When GraphBLAS starts, GrB_Init looks in ~/.SuiteSparse/GrB8.2.1 (or whatever version is being used) and ensures the src/* files are valid. It can then create new JIT kernels in the c/* directories at run time, compile them, and load them in, on the fly. The JIT kernels allow the end user to define new operators at run time, for me to use inside my kernels. With the JIT, these kernels are just as fast as built-in kernels. |
Would it make sense to make that part of the default build process? I.e., update the compressed JIT source whenever GraphBLAS is built? |
Yes, that would make sense. I wasn't sure how to go about doing that in a portable way. It's rather like a very complex "configure_file (...)" process, but it needs to first compile the grb_jitpackage.c main program, which uses the GraphBLAS/zstd source code for the ZSTD compression package. |
I guess that should be possible. I'll try to look into it after this PR is merged. |
04f494d
into
DrTimothyAldenDavis:dev2
When building GraphBLAS without OpenMP,
gcc
emits a lot of preprocessor warnings about_OPENMP
not being defined. The same happens for the JIT compiler.Re-order some conditions in
GB_atomics.h
to omit these warnings.