How to: Configure and Launch the MPI Cluster Debugger
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
In Visual Studio, open the solution that contains your parallel application.
In the Project menu, click <yourProjectName> Properties. This opens the Property Pages dialog box.
Expand the Configuration Properties node, then select Debugging.
Under Debugger to launch, select MPI Cluster Debugger.
Select the nodes and number of processes to use for debugging.
In Run Environment, select Edit Hpc Node from the drop-down list. This opens the Node Selector dialog box.
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.
In Number of processes, select the number of processes to launch.
In Schedule one process per, select how to allocate your processes. You can allocate one process per Core, Socket, or Node.
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.
Optionally, to request specific nodes, select Manually select nodes to include in the allocation, then select individual nodes in the list.
Click OK to save changes and close the Node Selector dialog box.
Configure the following properties:
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:
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.
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:
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.
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.
Click OK to save changes and close the Property Pages.
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
Set one or more breakpoints in your code. For information about setting breakpoints, see Using Breakpoints and Tracepoints.
Press F5 to launch the debugger.
In the MPI Cluster Debugger, you cannot start without debugging. Pressing Ctrl+F5 (or Start without debugging on the Debug menu) also starts debugging.
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.
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.
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.