-
Notifications
You must be signed in to change notification settings - Fork 76
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
Connectable #1249
base: master
Are you sure you want to change the base?
Connectable #1249
Conversation
Ok, I think the main problem is that the way HPX TCP connections work is not documented adequately. Here are the basics: Every HPX locality needs to listen to a unique TCP/IP address (IP-address/hostname + port number). Most of the time, HPX can make sure this condition is met (in SLURM or PBS batch environments, for instance), but sometimes you need to help by providing the necessary information. If the HPX localities run on different nodes this is easily achieved, as every locality uses If the localities run on the same node, locality zero uses Connecting localities use To have a second locality or more, you will have to make sure they use a unique port, for instance HPX has two command-line options to specify the IP addresses to bind their sockets to: That said, to run a base locality and two connecting localities on the same node, you could do:
(note, some of the options could be left out to utilize the built-in defaults, but I have listed the full set to clarify things). By the way, there is also the command-line option
(note, all three launch the same executable) and it should still work. |
This is probably what you're looking for: https://hpx-docs.stellar-group.org/latest/html/libs/init_runtime/api.html?highlight=init_params#_CPPv4N3hpx4initEiPPcRK11init_params
See my comment above for some explanations.
Correct, I don't think we should do that. We need a simpler way to add primitives (we have one, but I don't like it ;-), so I'll think about it (see #1250). |
@hkaiser
Also exits instantly. Somehow, the hpx arguments are not compatible with the physl arguments. Not sure why. |
I don't know anything about the |
@hkaiser the connect option was something I added for the PR, so that I could call finalize instead of disconnect, etc. |
I now see that the modification to physl wasn't needed, the option |
OK, I can connect localities, but I cannot use them. So I have a main process which waits for 4 localties, then tries to run a cannon product (which requires 4 localities) using this script
Then I have some other processes which just run
I then try to orchestrate things by calling this script:
The 4 localities are obtained, but when the cannon product is attempted, the code hangs. Thoughts? |
@hkaiser I also attempted to have all localities run the same code, i.e. |
That's progress, I guess ;-) |
Make it possible to connect new resources to a running Phylanx calculation.
This doesn't actually work. I need guidance.
Problems:
(1) Not sure how to use params with the longer version of hpx::init()
(2) I can only use it to add one locality
./build.Release/bin/physl --connect sleep.p # works
./build.Release/bin/physl --hpx:hpx=127.0.0.1:7910 --connect sleep.p # dies instantly
(3) My guess is you don't want sleep() implemented as a math function, though it works fine.