-
Notifications
You must be signed in to change notification settings - Fork 145
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
Regent: Detect how many dimensions Legion was compiled with #466
Comments
As a workaround I've added a flag |
Would it help if you had a runtime call to query this value from the runtime? |
Unfortunately no, any autodetect mechanism has to work without actually loading the runtime because: (a) on platforms like Summit we just can't do that right now (b) even then we need to set LEGION_MAX_DIM at the point where we include the Legion header file. So if you need to load Legion in order to include that header, you've got a circular dependency. In my opinion the most promising approach is to have legion_defines.h be generated as part of the build in both Make and CMake. That way any build-influencing variables can always be depended on being set, which is the simplest way for users (most won't even have to think about this at all) and makes this future proof as well. |
What about a static method on the runtime so you can call it without having actually started the runtime? |
No, we can't even load Futhermore, the static method still doesn't resolve the cyclic dependency, because presumably the way I call the static method is by running |
@elliottslaughter why can't terra just include |
This doesn't work because @lightsighter had a partial patch for this but it's currently disabled because it is very inefficient in the current implementation. |
To be clear, the partial patch is for #496 . |
As of ff00fb8 we generate |
To properly interface with Legion's newly implemented support for a variable number of index space dimensions, Regent needs to know the value of the
LEGION_MAX_DIM
constant that Legion was compiled against when it callsterralib.includec
onlegion_c.h
.One option would be to autodetect this by inspecting
libregent.so
, the way it's done for CUDA and OpenMP, and add an-f
flag so the user can set it manually when auto-detection isn't available (and do a dynamic consistency check, when the code starts running).A cleaner option might be to have the Makefile generate a
legion_defines.h
header, like the one generated by CMake. This has also been suggested as a way to communicate the link flags that Legion'sruntime.mk
infers to the compiler (see #341).The text was updated successfully, but these errors were encountered: