-
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
Problems setting up shared memory with a Python process #7
Comments
I have tried your example (beware you have some typos) on Linux: it works fine. I do not have a Mac but I will see how to use |
Thanks. I was competing with the AI for typo supremacy. |
I have inspected the code in the package, calling You may use System V shared memory which, to my knowledge, used to work more correctly (except for the automatic deletion on last detach). However note that System V and POSIX shared memory segments can coexist in a system but that they are totally independent and have no interoperability. Another possibility is to use memory mapped which is built-in Julia and certainly also in Python. |
I have tried unsuccessfully to share memory between a Python process and a Julia process on MacOS. I have been successful at doing so between two Python processes as well as Python and a different language. But the result of doing so with Julia results in a "
ERROR: stat returned zero type for a valid path
". From a search, it is suggested the problem arises from the fact thatfstat
does not work for shared memory file descriptors. The julia code tries to obtain the size of the shared memory from this file descriptor and it fails as a result. It was also suggested that the necessary information should be obtained by using the structure obtained from theshmat()
system call.When I say "suggested" I only see this explanation on an AI-generated response so I'm not sure of the validity. Here is the text that was generated:
Note that there appears to be a typo in the last printf statement!
I create the shared memory in Python as follows:
I do this in julia:
Which produces this:
The text was updated successfully, but these errors were encountered: