Repository: Parsl/parsl

Issue:
Change `public_ip` keyword arg to htex/exex
Often we don't want a public ip. We should pick a name that isn't wrong part of the time. As I think @benclifford suggested, maybe 'address'? 


Discussion:
Specifically:

*  it doesn't need to be an IP; for example, it can often usefully be a hostname, as returned by `parsl.addresses.address_by_hostname()`

* it doesn't need to be public - it needs to be reachable from everywhere that we're expecting stuff to connect from, which might be a scope more like the internal IP networks of a supercomputer.

To consider this issue resolved, we should also clarify the docstring to reflect what @benclifford summarized above. We currently say `Set the public ip of the machine on which Parsl is executing.` which isn't quite right.

Resolving patch:
diff --git a/parsl/executors/extreme_scale/executor.py b/parsl/executors/extreme_scale/executor.py
--- a/parsl/executors/extreme_scale/executor.py
+++ b/parsl/executors/extreme_scale/executor.py
@@ -79,8 +79,12 @@ class ExtremeScaleExecutor(HighThroughputExecutor, RepresentationMixin):
     launch_cmd : str
         Command line string to launch the mpi_worker_pool from the provider.
 
-    public_ip : string
-        Set the public ip of the machine on which Parsl is executing.
+    address : string
+        An address to connect to the main Parsl process which is reachable from the network in which
+        workers will be running. This can be either a hostname as returned by `hostname` or an
+        IP address. Most login nodes on clusters have several network interfaces available, only
+        some of which can be reached from the compute nodes.  Some trial and error might be
+        necessary to indentify what addresses are reachable from compute nodes.
 
     worker_ports : (int, int)
         Specify the ports to be used by workers to connect to Parsl. If this option is specified,
@@ -106,7 +110,7 @@ def __init__(self,
                  label='ExtremeScaleExecutor',
                  provider=LocalProvider(),
                  launch_cmd=None,
-                 public_ip="127.0.0.1",
+                 address="127.0.0.1",
                  worker_ports=None,
                  worker_port_range=(54000, 55000),
                  interchange_port_range=(55000, 56000),
@@ -118,7 +122,7 @@ def __init__(self,
         super().__init__(label=label,
                          provider=provider,
                          launch_cmd=launch_cmd,
-                         public_ip=public_ip,
+                         address=address,
                          worker_ports=worker_ports,
                          worker_port_range=worker_port_range,
                          interchange_port_range=interchange_port_range,
diff --git a/parsl/executors/high_throughput/executor.py b/parsl/executors/high_throughput/executor.py
--- a/parsl/executors/high_throughput/executor.py
+++ b/parsl/executors/high_throughput/executor.py
@@ -76,8 +76,12 @@ class HighThroughputExecutor(ParslExecutor, RepresentationMixin):
     launch_cmd : str
         Command line string to launch the process_worker_pool from the provider.
 
-    public_ip : string
-        Set the public ip of the machine on which Parsl is executing.
+    address : string
+        An address to connect to the main Parsl process which is reachable from the network in which
+        workers will be running. This can be either a hostname as returned by `hostname` or an
+        IP address. Most login nodes on clusters have several network interfaces available, only
+        some of which can be reached from the compute nodes.  Some trial and error might be
+        necessary to indentify what addresses are reachable from compute nodes.
 
     worker_ports : (int, int)
         Specify the ports to be used by workers to connect to Parsl. If this option is specified,
@@ -107,7 +111,7 @@ def __init__(self,
                  label='HighThroughputExecutor',
                  provider=LocalProvider(),
                  launch_cmd=None,
-                 public_ip="127.0.0.1",
+                 address="127.0.0.1",
                  worker_ports=None,
                  worker_port_range=(54000, 55000),
                  interchange_port_range=(55000, 56000),
@@ -133,7 +137,7 @@ def __init__(self,
         self.cores_per_worker = cores_per_worker
 
         self._task_counter = 0
-        self.public_ip = public_ip
+        self.address = address
         self.worker_ports = worker_ports
         self.worker_port_range = worker_port_range
         self.interchange_port_range = interchange_port_range
@@ -326,8 +330,8 @@ def _start_local_queue_process(self):
             logger.error("Interchange has not completed initialization in 120s. Aborting")
             raise Exception("Interchange failed to start")
 
-        self.worker_task_url = "tcp://{}:{}".format(self.public_ip, worker_task_port)
-        self.worker_result_url = "tcp://{}:{}".format(self.public_ip, worker_result_port)
+        self.worker_task_url = "tcp://{}:{}".format(self.address, worker_task_port)
+        self.worker_result_url = "tcp://{}:{}".format(self.address, worker_result_port)
 
     def _start_queue_management_thread(self):
         """Method to start the management thread as a daemon.


Test patch: