How to: Configure and Launch the MPI Cluster Debugger

Visual Studio 2010

With the MPI Cluster Debugger, you can debug parallel applications that are running on a Windows HPC Server cluster and that communicate through the Message Passing Interface (MPI). In Visual Studio, you can select the cluster head node and specify the number of processes to include in the debugging session, configure advanced properties for the cluster debugging session, and then start the debugger.

Requirements for using the MPI Cluster Debugger

  • You must have an edition of Visual Studio 2010 that includes the remote debugger installed on your development computer.

  • You must have administrative permissions on the cluster.

  • Visual Studio must be able to access the compute nodes on which you want to run the debugging session. The following scenarios provide the necessary access:

    • You are developing your application on the cluster head node or on a dedicated login node.

    • You are using a cluster in which the compute nodes are connected to the enterprise network (Topology 2, 4, or 5), and your development computer is joined to the same domain or to a domain that has a trust relationship with the cluster domain.

  • To debug applications that use managed code, you must install the corresponding version of the .NET Framework on the cluster compute nodes.

  • To submit your application to an HPC cluster from a client computer, you must have Microsoft HPC Pack 2008 installed.

  • To build MPI programs by using Microsoft Message Passing Interface, you need the Windows HPC Server 2008 SDK installed on your development computer.

To configure the MPI Cluster Debugger

  1. In Visual Studio, open the solution that contains your parallel application.

  2. In the Project menu, click <yourProjectName> Properties. This opens the Property Pages dialog box.

  3. Expand the Configuration Properties node, then select Debugging.

  4. Under Debugger to launch, select MPI Cluster Debugger.

  5. Select the nodes and number of processes to use for debugging.

    1. In Run Environment, select Edit Hpc Node from the drop-down list. This opens the Node Selector dialog box.

    2. In the Head Node drop-down list, select the name of the head node to use. If you do not see your head node, then type the name or the IPv4 address of the head node.

    3. In Number of processes, select the number of processes to launch.

    4. In Schedule one process per, select how to allocate your processes. You can allocate one process per Core, Socket, or Node.

    5. Optionally, in Pick nodes from, you can specify the node group on which the debugging session should run. The nodes in the selected group appear in the node list.

    6. Optionally, to request specific nodes, select Manually select nodes to include in the allocation, then select individual nodes in the list.

    7. Click OK to save changes and close the Node Selector dialog box.

  6. Configure the following properties:

    1. Deployment Directory:

      Specify the name of a Deployment Directory. This is where the project output files are copied when the debugger starts. This should be a network shared resource, for example:

      \\myTestCluster\CcpSpoolDir\$(UserName)\$(ProjectName)

    2. Working Directory:

      Specify a local working directory on each compute node. The files from the Deployment Directory are copied into the working directories on the compute nodes.

    3. Application Command:

      Specify the application name or the application path that MPI will run on each cluster node (this is the application that you are debugging in Visual Studio). The path can be a shared resource or a local path on each compute node in the cluster. If it is a local path, the path must be identical on each node, for example:

      $(WorkDir)\$(TargetFileName)

    4. Deploy CRT:

      Select Yes to have Visual Studio deploy the C Runtime (CRT) assemblies with the application.

      If your multithreaded debug dynamic-link libraries (DLLs) are statically linked, you do not need to deploy the CRT files. If your multithreaded debug DLLs are dynamically linked, you need to deploy the CRT files.

    5. Cleanup Deployment:

      Select Yes.

      Dd560809.note(en-us,VS.100).gifNote:
      The Deployment Directory is not deleted if it contains files other than those put there by Visual Studio. For example, if your application produces output to the Deployment Directory, you should use a post-debug script to delete the directory.

  7. Click OK to save changes and close the Property Pages.

Dd560809.note(en-us,VS.100).gifNote:
When you are debugging multiple processes, a breakpoint affects all the processes that are being debugged by default. To avoid breaking processes in unintended places, deselect the Break all processes when one process breaks option. For more information about how to change break behavior, see How to: Break Execution.

To launch the MPI Cluster Debugger

  1. Set one or more breakpoints in your code. For information about setting breakpoints, see Using Breakpoints and Tracepoints.

  2. Press F5 to launch the debugger.

    Dd560809.note(en-us,VS.100).gifNote:
    In the MPI Cluster Debugger, you cannot start without debugging. Pressing Ctrl+F5 (or Start without debugging on the Debug menu) also starts debugging.

  3. Because you are submitting a job to the cluster, you are prompted to enter your password to connect to the cluster. Type your password, and then press ENTER.

  4. After the debugger is launched, look at the Processes window to verify the placement of the processes. For each process, look at the Transport Qualifier column to view the compute node on which the process is running.

Dd560809.note(en-us,VS.100).gifNote:
After you launch the debugger, you can set the active process to debug by double-clicking a process in the Processes window. To open the Processes window, on the Debug menu, click Windows, then click Processes.

See Also

Show: