Using a process transport protocol with distributed parallel MIP

Shows how to run distributed parallel MIP with a process transport protocol.

Note:

Distributed parallel optimization of mixed integer programming (MIP) models has been deprecated in CPLEX 20.1.0 and will be removed in a future release.

This topic shows how to run distributed parallel MIP optimization with a process as the transport protocol to manage communication between the master and workers. Specifically, this example uses a secure shell (ssh) for the master to connect to the workers. For simplicity, the example assumes that this secure shell has been set up to use no password on the remote machines.

Prerequisites

  • Your CPLEX installation
  • A network share or other network file-sharing system, such as Network File System (NFS), accessible for all the machines, both master and workers, that you plan to use; for clarification about this prerequisite, see Before you begin, especially the point about a "network share" not being a hard requirement.

Procedure

The procedure for using a process transport protocol for communication is slightly simpler than for using a message passing transport protocol since you do not need to declare a message passing cluster. However, the declarations in the Virtual Machine Configuration file configuration.vmc are more detailed.

  1. Find the bin folder or directory of your CPLEX installation.

  2. Put the cplex binary file and object files (that is, all files in the bin folder or directory) on the accessible network share. On many platforms, the object files are designated by the .so file extension. On Windows platforms, these equivalent files are designated by the .dll file extension. On MacOS, the suffix is .dyld.

    For the purpose of this example, all the files from the bin directory of your CPLEX installation are now in /nfs/CPLEX.

  3. Create a Virtual Machine Configuration file, configuration.vmc, to define the available workers. Here is a sample of such a file for a secure shell as the process.

     
    <?xml version="1.0"?>
    <vmc>
      <machine name="host2">
        <transport type="process">
          <cmdline>
             <item value="ssh"/>
             <item value="host2"/>
             <item value="/nfs/CPLEX/cplex"/>
             <item value="-worker=process"/>
             <item value="-stdio"/>
             <item value="-libpath=/nfs/CPLEX"/>
          </cmdline>
        </transport>
      </machine>
    
      <machine name="host3">
        <transport type="process">
          <cmdline>
             <item value="ssh"/>
             <item value="host3"/>
             <item value="/nfs/CPLEX/cplex"/>
             <item value="-worker=process"/>
             <item value="-stdio"/>
             <item value="-libpath=/nfs/CPLEX"/>
          </cmdline>
        </transport>
      </machine>
    </vmc>
    
  4. On the master (host1 in this example), start a session in the CPLEX Interactive Optimizer.
  5. In your interactive session, execute the command to read the configuration file that you created.
    
    CPLEX> read configuration.vmc
    

    After that read command, CPLEX is set up for solving distributed parallel MIP models.

  6. Still in your interactive session, enter a model or read it from a file, and then solve it, like this:

    
    CPLEX> read model.lp
    CPLEX> mipopt
    
  7. All the usual commands of the Interactive Optimizer are available to access and analyze your results.