-
Notifications
You must be signed in to change notification settings - Fork 22
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
Using argodsm in a server client style application #145
Comments
I am not sure I understand the question correctly.
would be my first attempt. This would ensure all nodes call
I hope this helps, and if it does not please feel free to ask again. |
I see. So if I understand this correctly, and if I just want a big, shared memory region, I can just do this: auto my_shm = argo::new_(1G);
if (argo::node_id() == 0) {
call_server_code(my_shm);
} else {
call_client_code(my_shm);
} Now, in the client and the server, I can just do writes to Thanks. |
If each node executes |
It would still be "distributed and shared memory", right? That is, I can access that allocated region as long as I have a pointer to it in the client or the server. -- From what I understand, allocating a region with new_() and sharing the pointer with other nodes over TCP or something accomplishes the same end result as conew_(), but with extra steps. I guess I'm misunderstanding something here, or maybe I am not familiar with HPC-style programming. So, the reason I specifically want to do it this way is to make sure I can map it to the same address across applications and can run my own allocator in the region (imagine a simple bump allocator). Thank you so much for the help! |
Yes
Yes, I guess I just don't see a good reason to do TCP communication when
This should indeed work
If your custom allocator performs better than just calling |
@suyashmahar hi,friend。did you access your goal at last?now we face the same situation,and we are consuing how to solve it。 |
I was wondering if argodsm can be used to do SHM-style communication between server and client apps which don't share code? For example, I want to create a complex graph in an application, pass the pointer to another application and traverse that graph. In a node-local SHM, I would just memory map the same region in both the application, can I do this in argodsm?
One way of doing this that I see is to allocate some memory that I want to share, and send the pointer over, but I was a little confused by the tutorial.
The tutorial explains that
conew_()
returns the same pointer on every instance of a parallel program:But I don't understand how the implementation know which call corresponds to which pointer?
Appreciate any help!
The text was updated successfully, but these errors were encountered: