Open mariodirenzo opened 2 years ago
@mariodirenzo What machine are you hitting this on?
@magnatelee has a workaround, but it seems to be a LuaJIT bug.
or a Terra bug, if Terra was messing with tokens from the lexer.
I pushed this workaround to master and control replication: https://gitlab.com/StanfordLegion/legion/-/commit/07a5d195e6d644f772fba6da4e443969d9479107. Let me know if this still doesn't fix your issue.
Here's a new reproducer. This is the shortest one I've been able to make, and (fortunately) does not require HDF5.
import 'regent'
terra f(x : &int64)
return 123
end
__demand(__inline)
task g()
var out : int64
var res = f(&out)
end
task main()
g()
end
main:compile()
I'm suspecting Wonchan may be right about the Terra parser, but just for posterity: I reproduced on Moonjit and two versions of LuaJIT (most recent v2.1, and a version about 2 years old that's currently checked in to Terra).
What machine are you hitting this on?
I discovered it on my mac with Moonjit.
Let me know if this still doesn't fix your issue.
The problem seems solved. Thanks!
Should we leave this issue open until you find out if this is a LuaJIT or Terra bug?
It's looking like this is a Terra issue, but I'm not sure how to move forward with debugging because—even with the minimal reproducer program—we're effectively debugging the Terra parser against the entire Regent compiler code base. Even if I add diagnostics to Terra to show the parser state, there will be far too much to look through if I run it past the entire compiler.
Anyway, let's leave this open for now. I'll deprioritize it in #1189.
The following script
fails with the error
if executed with the command
INCLUDE_PATH=$HDF_ROOT/include $LEGION_DIR/language/regent.py RegentInlinerBug.rg
. If the taskreadIspaceFromHDF5
is not inlined or if the call toH5Aread
is commented out, the script is executed correctly.