This section describes how to launch a parallel program that you wish to debug. A description of how to actually debug the application is provided in another section.
If you have already created normal parallel launch configuration and configured the Debug tab you are ready to launch a debug session. Simply select Run > Debug, the debug icon, or choose a configuration from the debug icon menu on the toolbar.
Topics include:
Note: At least one resource manager must have been configured and started before it is possible to create a parallel launch configuration.
Open the run configuration dialog using Run > Open Debug Dialog... or click the debug icon menu on the tool bar and select Open Debug Dialog...
Create a new parallel launch configuration by clicking Parallel Application and then clicking on the New button icon.
Enter a name for the configuration in the Name: field. Here we use the same name as the project.
The Resources tab is used to specify the resources required for the job execution. The contents of this tab will vary for different resource managers. This description only applys to the Open MPI and MPICH2 resource managers.
Select a resource manager from the drop-down (Note: a resource manager must be running for it to appear in the list. If there is only one resource manager running, then it will be automatically selected.)
Some resource managers require a job queue to be selected using a Queue: drop-down. If there is no drop-down, then this resource manager does not support multiple queues.
Enter a value in the Number of Processes field. This field must be greater than 0 in order to launch a job, and specifies the number of processes to use for the application launch.
The Application tab is used to specify the application (executable) to be launched.
Ensure that the correct the Parallel Project is selected. This is the project containing the source and binaries for the application.
Select the Application Program (executable) that you wish to launch by clicking on the Browse button. If you are running the application on the local machine, you will need to navigate to the workspace and project directory. In this case, and if you are using a debug configuration, the executable will be located in the Debug folder of your project.
If you are running the application on a remote machine you will need to navigate to the location of the executable on that machine. If the project was built locally, then you will have to manually copy the executable to the remote machine first.
If you wish to have the output from all processes in a single output console, check the Display combined output in a console view option.
Select a debugger from the Debugger drop-down. This is the debugger that will control the parallel debug session. Currently only SDM is supported (SDM stands for Scalable Debug Manager), so select this.
If you wish the debugger to automatically suspend the application on launch, make sure Stop in main() on startup is checked
Under Debugger options, make sure that the path to debugger executable is correct.
If you are debugging on the local machine, this path should point to the sdm
executable in your Ecilpse installation's plugins/org.eclipse.ptp.os.arch_version/bin
directory,
where os.arch_version
is your operating system (linux
, macosx
, or aix
),
architecture (x86
, x86_64
, or ppc
), and version number of the plugin (e.g. 2.1.0.200810311901
).
If you are debugging remotely, then this path will be the path to where the sdm
executable
was installed on the remote machine.
Set the Debugger session address. This is the address that the debugger will connect to when it starts, and will depend on where you are launching the application:
If you are launching onto the local machine, use localhost
(some systems will
accept localhost.localdomain
).
If you are launching onto a remote machine without using port forwarding (as specified in the resource manager configuration), then this should be the address of the local machine (the one running Eclipse) as viewed from one of the nodes of the parallel machine. Note that if the parallel machine configuration precludes nodes accessing your local machine, you will need to reconfigure the resource manager to use port forwarding.
If you are launching onto a remote machine using port forwarding, this is the address of the
remote machine as viewed from one of its nodes. Note that you will need to have the GatewayPorts
option set to yes
in the sshd
configuration file on the remote system (see the manual page for sshd_config
) for this to work.
Enter any program arguments.
Select a different working directory if desired. Note that for a remote launch, this will be the location of the exeuction on the remote machine.
The launch configuration is now complete. Click on the Debug button to start debugging the program. Eclipse will, by default, switch to the PTP Debug perspective, and you can begin debugging the application. The Parallel Debugging section will show you how to use the debugger.