Accessing regions through raw ptr documentation and data coherency.

10 views
Skip to first unread message

Daniel Guilder

unread,
Dec 20, 2022, 12:12:01 PM12/20/22
to Legion Users
Hi, 

I am currently looking into legion to convert existing C++ code to be run on distributed systems and we will most likely need to call various c libraries for signal processing and mathematical operations.  Ideally we would want to be able to call the functions directly on regions for their input and outputs but I don't know if that is possible.  I have been mostly looking into regent as it seems easier to manage and be maintained by non software engineers. 

In lines 106-114 of the cholesky.rg example there are various steps to access the raw ptr of a region. This is then used to call a c function. Is there any documentation describing what these lines are doing?  I was testing some programs and wanted to see how to call c functions on regions like running an fft on a region without having to copy the data to an array to generate the pointer.  I ended up finding this example which seems to be able to get the raw pointer to the region and treats that as a pointer to an array for other functions.  However I wasn't sure if this is the "correct" method or if this is "safe" as I could find no documentation describing this process. If the c function were to write data to the ptr would that data be coherent with all other logical regions? I don't understand how legion manages the coherency of regions between different tasks on different nodes but using the raw pointer to write to the region with a shared library function seems "dangerous". 


Let me know if you have any other questions or need clarification.

Thanks,

Daniel Guilder 
Reply all
Reply to author
Forward
0 new messages