Como: Depurar um aplicativo de Cluster remoto
This topic applies to:
Edition |
Visual Basic |
C# |
F# |
C++ |
Web Developer |
---|---|---|---|---|---|
Express |
|||||
Pro, Premium e Ultimate |
Visual Studio now supports MPI Cluster Debugging. This feature allows you to debug parallel programs that run on a cluster of computers communicating through the Message Passing Interface (MPI).
Pré-requisitos para depuração MPI:
MPI must be installed and configured on each machine in the cluster. MPI is included with Windows Server 2003, Compute Cluster Edition. Other MPI implementations are available.
MPIShim.exedeve ser instalado em cada máquina no cluster. MPIShim está incluído no Visual Studio 2005e é instalado com os componentes de depuração remota para ativar a depuração paralela. MPIShim can be installed in any directory, but must be in the same directory on each machine in the cluster. One possible path is:
c:\windows\system32\mpishim
Alternatively, it can be installed in a directory local to the debug target.
The Remote Debugging Monitor (msvsmon) must be on each machine in the cluster. See Como: Execute o Monitor de depuração remota.
The Visual Studio host (the machine you are debugging from) must be set up with an account that has the proper privileges to debug the cluster machines. (See Permissões de depuração remota.)
To prepare a Visual Studio project for MPI debugging
Open the solution containing your parallel application in Visual Studio.
In Solution Explorer, right-click the project and choose Properties from the shortcut menu.
In the Project Properties dialog box, select Debugging.
In the Debugger to Launch listbox, choose MPI Cluster Debugging.
No comando MPIRun , digite o local do MPIRun ou MPIExec (que inicia o aplicativo MPI) na máquina de cluster. For example:
c:\windows\system32\mpiexec.exe
No Argumentos MPIRun , digite quaisquer argumentos que você deseja passar para MPIRun ou MPIExec. For example:
-np 2
No MPIRun working directory , digite o diretório de trabalho para MPIRun ou MPIExec. For example:
c:\temp
In the Application Command box, enter the path to the application that MPI will execute on each cluster machine execute (which is also the application whose project you have open in Visual Studio). The path can be a share or a local path on each machine in the cluster. If it is a local path, the path must be identical on each machine. For example:
$(TargetPath)
In the Application Arguments box, enter any arguments you want to pass to the application.
No MPIShim location , digite o caminho para o MPIShim.exe. For example:
c:\windows\system32\mpishim
You can leave the Debugger Type listbox set to auto (the default) and the debugger will choose the correct debugger type for the code you are executing. Alternatively, you can choose the correct type (native, managed, or mixed code) for your application.
Close the Project Properties dialog box.
From the Tools menu, choose Options.
No Opções caixa de diálogo, selecione o depuração nó, Geral categoria.
Find the checkbox When one process breaks, break all other processes. Select or clear the checkbox depending on the behavior you want during your debugging session. (Because this is a Tools option, this setting will remain in effect for all projects until you change it.) For more information, see Como: Interromper a execução.
Click OK to close the Options dialog box.
To debug your parallel application
On the Debug menu, click Start to begin debugging.
If you have set up your project correctly, the application begins running on all machines in the cluster.
If you have set breakpoints in your code, execution will break at the first breakpoint.
On the Debug menu, click Windows, and click Processes.
The Processes window. You can use this window to set an active process. To step only the single active process, use the step buttons at the top of this window.
You can use DataTips to get variable values while debugging a parallel application. The variable values you see in DataTips will be based on the current active process set in the Processes window.
Consulte também
Tarefas
Como: Use a janela de processos