Reverse Connect

The Linaro Forge Reverse Connect feature allows you to submit your job from a shell terminal as you currently do, with a minor adjustment to your mpirun (or equivalent), to allow that job to connect back to the Linaro Forge user interface.

About this task

Reverse Connect makes it easy to debug and profile jobs with the correct environment. You can easily load the required modules and prepare all the setup steps that are necessary before launching your job.

Note

Node-locked licenses such as workstation or Linaro Forge Cluster licenses do not include the Reverse Connect feature.

Procedure

  1. Start Linaro Forge and connect to your remote system (typically a login node) with SSH.

  2. To enable Reverse Connect, modify your current (or equivalent) command line inside your interactive queue allocation, or queue submission script.

    In most of the cases it is sufficient to prefix the script with ddt/map --connect. Almost all arguments beside --offline and --profile are supported by Reverse Connect.

Example

$ mpirun -n 512 ./examples/wave_f
  1. To debug the job using Reverse Connect and Express Launch (DDT), run:

    $ ddt --connect mpirun -n 512 ./examples/wave_f
    
  2. To profile the job using Reverse Connect and Express Launch (MAP), run:

    $ map --connect mpirun -n 512 ./examples/wave_f
    

    Note

    If your MPI is not yet supported by Express Launch mode you can use Compatibility Mode.

    Debug:

    $ ddt --connect -n 512 ./examples/wave_f
    

    Profile:

    $ map --connect -n 512 ./examples/wave_f
    
  3. After a short period of time, the GUI shows the Reverse Connect request including the host from where the request was made (typically a batch compute node), and a command-line summary.

    Reverse connect request
  4. To accept the request, click Accept.

    Note

    Linaro Forge connects to the specified host and executes what you specified with the command line. If you do not want to accept the request, click Reject.

If a Reverse Connect is initiated, for example with ddt --connect, Linaro Forge starts a server listening on a port in the range between 4201 and 4240 on the remote system (typically a login node).

If this port range is not suitable for some reason, such as when ports are already taken by other services, you can override the port range with the environment variable FORGE_REMOTED_PORTS.

$ export FORGE_REMOTED_PORTS=4400-4500
$ ddt --connect

The server selects a free port between 4400 and 4500 (inclusive).

This connection is between the batch or submit node (where ddt --connect is run from) and the login node. This connection can also be to a compute node if for example, you are running ddt --connect mpirun on a single node.