debugging with sdm

18
PTP Parallel Tools Platform The Parallel Tools Platform (PTP) is an Eclipse extention for parallel development. Paired with Mojave, it is useful for debugging parallel Cactus applications. Obtaining PTP Software. Click Help - Install New Software, select Available Software Sites, and in the text filter type PTP. Select the first site from the list. The Cactus team Introduction to the Cactus Framework Mar 30 2011

Upload: dangliem

Post on 14-Jan-2017

241 views

Category:

Documents


0 download

TRANSCRIPT

PTP

Parallel Tools Platform

The Parallel Tools Platform (PTP) is an Eclipse extention for paralleldevelopment. Paired with Mojave, it is useful for debugging parallelCactus applications.

Obtaining PTPSoftware.

Click Help - Install New Software,select Available Software Sites, andin the text filter type PTP. Select thefirst site from the list.

The Cactus team Introduction to the Cactus Framework Mar 30 2011

PTP

Parallel Tools Platform

The Parallel Tools Platform (PTP) is an Eclipse extention for paralleldevelopment. Paired with Mojave, it is useful for debugging parallelCactus applications.

Installing PTPSoftware.

Click Help - Install New Software,select Available Software Sites, andin the text filter type PTP. Select thefirst site from the list.

Back in the software install dialogue,type in the text filter PTP, select thefirst site, mark the three softwarepackages from the list, then click Next.

The Cactus team Introduction to the Cactus Framework Mar 30 2011

PTP

Building the Scalable Debug Manager

Installing PTPSoftware.

In a terminal window, locate the pluginsdirectory under Eclipse.

In that directory, locate a platformspecific directory similiar to one ofthese:

org.eclipse.ptp.linux.x86 4.0.6.201102161000org.eclipse.ptp.linux.x86 64 4.0.6.201102161000org.eclipse.ptp.macosx.ppc 4.0.6.201102161000org.eclipse.ptp.macosx.x86 4.0.6.201102161000org.eclipse.ptp.aix.ppc 4.0.6.201102161000...

Change to that directory, then type ”sh./BUILD”.

The Cactus team Introduction to the Cactus Framework Mar 30 2011

PTP

MPICH2

MPICH2 is a standard for the Message Passing Interface (MPI) which canbe used in the development of Cactus applications.

Message PassingDaemon.

Install the mpich2 and mpich2-develpackages.

Ensure $PATH includes the new mpich2bin/ folder.

Re-build Cactus for parallel architecture.

Run mpd in a terminal to start themessage passing daemon.

The Cactus team Introduction to the Cactus Framework Mar 30 2011

PTP

MPICH2 as a Resource Manager

To use MPICH2 as a Resource Manager in Eclipse, it must first be addedto the list of Resource Managers.

Viewing ResourceManagers.

Go to Window - Show View - Other.

The Cactus team Introduction to the Cactus Framework Mar 30 2011

PTP

MPICH2 as a Resource Manager

To use MPICH2 as a Resource Manager in Eclipse, it must first be addedto the list of Resource Managers.

Viewing ResourceManagers.

Go to Window - Show View - Other.

Select Resource Managers underParallel Tools and click OK.

The Cactus team Introduction to the Cactus Framework Mar 30 2011

PTP

MPICH2 as a Resource Manager

To use MPICH2 as a Resource Manager in Eclipse, it must first be addedto the list of Resource Managers.

Adding a ResourceManager.

Select the Resource Managers tab,right-click in the area beneath it, thenclick Add Resource Manager.

The Cactus team Introduction to the Cactus Framework Mar 30 2011

PTP

MPICH2 as a Resource Manager

To use MPICH2 as a Resource Manager in Eclipse, it must first be addedto the list of Resource Managers.

Adding a ResourceManager.

Select the Resource Managers tab,right-click in the area beneath it, thenclick Add Resource Manager.

Select MPICH2 from the list, clickNext, then Finish.

The Cactus team Introduction to the Cactus Framework Mar 30 2011

PTP

MPICH2 as a Resource Manager

Now it is time to start MPICH2.

Running a ResourceManager.

Right-click the MPICH2 resourcemanager, then select Start ResourceManager. If all goes well, the bulb tothe left of the MPICH2 resourcemanager entry will turn green.

The Cactus team Introduction to the Cactus Framework Mar 30 2011

PTP

Configuring the Debugger

The dubugger requires some configuration before use.

Locating theDebugger Options.

Go to Run - Debug Configuration.

The Cactus team Introduction to the Cactus Framework Mar 30 2011

PTP

Configuring the Debugger

The dubugger requires some configuration before use.

Adding a NewConfiguration.

Go to Run - Debug Configuration.

Under Parallel Application, right-clickto add a new configuration.

The Cactus team Introduction to the Cactus Framework Mar 30 2011

PTP

Configuring the Debugger

The dubugger requires some configuration before use. The information forthe tabs Application, Arguments, Resources, and Debugger must befilled in.

Resources.

Select MPICH2 from the drop-downbox of resources.

The Cactus team Introduction to the Cactus Framework Mar 30 2011

PTP

Configuring the Debugger

The dubugger requires some configuration before use. The information forthe tabs Application, Arguments, Resources, and Debugger must befilled in.

Application.

Browse for the project.

Browse for the Cactus/exe/cactus Cfg1executable located under the workbenchdirectory within the project directory.

The Cactus team Introduction to the Cactus Framework Mar 30 2011

PTP

Configuring the Debugger

The dubugger requires some configuration before use. The information forthe tabs Application, Arguments, Resources, and Debugger must befilled in.

Arguments.

Specify for the arguments list thelocation to the .par file to be used. Itshould be located in Cactus/par underthe workbench directory within theproject directory.

The Cactus team Introduction to the Cactus Framework Mar 30 2011

PTP

Configuring the Debugger

The dubugger requires some configuration before use. The information forthe tabs Application, Arguments, Resources, and Debugger must befilled in.

Debugging.

Hit the double-right arrow next to thetabs to bring up the debug tab.

Select SDM from the list of debuggersand Browse for the executable.

Once finished, click the Debug button.

The Cactus team Introduction to the Cactus Framework Mar 30 2011

PTP

Running the Debugger

The debugger can be run now.

The Debugger.

Hit the Step-Over-Group button tocause the program to advance and stepover the current function.

Hit the Step-Into-Group button tocause the program to advance and stepinto the current function.

Hit the Resume button to allow theprogram to advance to the end or thenext breakpoint.

The Cactus team Introduction to the Cactus Framework Mar 30 2011

PTP

Running the Debugger

Variables can be viewed in the variables screen.

The Debugger.

The PTP Debug view allows you tographically browse the current variablesavailable for viewing. Other typical

Dark blue highlight shows which line iscurrently executing.

The Cactus team Introduction to the Cactus Framework Mar 30 2011

PTP

Running the Debugger

Setting Breakpoints

The Debugger.

Right click on a line number to toggle abreakpoint.

In the example at left, the green ball atline 70 is an example of a breakpoint.

The Cactus team Introduction to the Cactus Framework Mar 30 2011