When using runtime_mode_connect, find the correct localhost public ip… #1654
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
… address
If using --hpx::connect, the worker needs to know the public ip address
of itself so that it can send it to the hpx:agas root where it is used
for communication. If the user does not specify the hpx parcel address
then 127.0.0.1 is assumed, but this only works for localities ilaunched
on the same node.
This patch finds the public ip address and uses that instead.
It may still fail if multiple ip addresses exist for the node,
but it is a better guess than before - providing those ip addresses
support tcp connections then all should be ok.
This is particularly useful when the worker is spawned using
where the user does not know which node srun will spawn the worker on
so cannot easily put the correct ip address on the command line.