You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 22 Next »

This internal training event will cover the following topics with respect to using eclipse on forge:

eclipse on forge basic startup, environment, and forge resource manager setup

To start eclipse on forge ?( locally ), add forge (and tau) to your $HOME/.modules setup :

[arnoldg@forge ~]$ echo "module load tau eclipse" >> $HOME/.modules
[arnoldg@forge ~]$ grep -v '^#' .modules

module load tau eclipse

When eclipse first starts, it prompts for a workspace location.  It's ok to accept the default of $HOME/workspace/ if you don't have a directory with that name, or you may select an alternate location.


The first time entering a new workspace, eclipse loads a default screen.  To get right into eclipse and skip all the tutorials and help (which you'll come back to next time ? ), select the workbench icon.

add the PTP Contributed Resource Manager Definitions

First, you'll add the resource managers plugin from http://download.eclipse.org/tools/ptp/updates/indigo_5.0.4 .  Copy the URL into your clipboard and then in eclipse navigate as follows to add the plugin:  Help -> Install New Software -> Add (button) , then fill in the boxes with the URL.  It should look like this:


Press Next, and follow the install prompts, then allow eclipse to restart when finished.

open System Monitoring perspective and select the forge mvapich2 definition

Under Window -> Open Perspective menu, select the System Monitoring perspective to get started setting up a resource manager to use with forge.  The steps that follow will allow you to monitor the system, queues, and submit jobs to forge all from within eclipse.  It's beautiful, colorful, powerful, and sometimes runs for hours without crashing.  You'll like it.
Right click in the Resource Managers area background and add the entry for forge mvapich2.

Since we're running locally on forge, leave the Remote Service Provide and Connection Name set to local.  Normally, you'd setup new ssh connections via remote tools here, but by running locally on forge, that's not necessary.  There should now be a forge resource added to the resource managers view.

start the forge resource manager locally and impress your friends and neighbors

Right click on the forge.pbs.batch.mvapich2 resource and start it.  It should go from grey to green and bring up a display like:

You can begin exploring the wonderful world of eclipse resource managers from here.  Use the Run Configurations under the Run menu if you have an application or job script ready to run on forge.

CUDA code with eclipse

Import the code below into a new c++ project (rt click on proj.: Import->General->Filesystem), then follow the steps in the linked page below.

  • cp -R ~arnoldg/vecadd/  $HOME ; ls $HOME/vecadd/
    
  • cdt and cuda makefile projects
  • build the project with eclipse ( Project -> Build , or use the hammer icon )

TAU profiling with eclipse

CUDA profiling with TAU is not yet in eclipse, use the command line...

This URL describes using TAU with cuda code:

http://www.ncsa.illinois.edu/UserInfo/Resources/Software/Tools/TAU/#gpusupport

 cd $HOME/vecadd
 tau_exec -T serial -XrunTAU-cupti-icpc -cuda ./vectorAdd
 paraprof

Paraprof setup on forge

  • start paraprof
    • File -> Database Configuration -> accept defaults and "Save Configuration"

TAU with mpi compute pi example

Create a new project in eclipse by right clicking in the projects area of the c/c++ perspective and choosing the MPI PI C example project with the gcc toolchain.  This should create a new project with source files in the src/ directory.

The project will probably need the mpi.h include directory defined:

To profile with TAU, there are a couple steps to follow in the c/c++ perspective.   First fill out the TAU settings under the TAU tab for the profile configuration.
Then build the application.  Set the Performance Analysis tab to build-only without launch:

While building, watch the console in eclipse for the TAU compile and link commands.  These can be useful later if you run TAU outside of Eclipse:

 **** Build of configuration Debug__tau-icpc-mpi for project mpipic ****

make all
Building file: ../src/mpipic.c
Invoking: GCC C Compiler
/usr/apps/tools/tau/2.20.3-forge/x86_64/bin/tau_cc.sh  -tau_options='-optCompIns
t ' -tau_makefile=/usr/apps/tools/tau/2.20.3-forge/x86_64/lib/Makefile.tau-icpc-
mpi -I/usr/local/mpi/mvapich2/mvapich2-1.7rc1-intel-12.0.4/include -O0 -g3 -Wall
 -c -fmessage-length=0 -MMD -MP -MF"src/mpipic.d" -MT"src/mpipic.d" -o "src/mpip
ic.o" "../src/mpipic.c"

Finished building: ../src/mpipic.c
 
Building target: mpipic
Invoking: GCC C Linker
/usr/apps/tools/tau/2.20.3-forge/x86_64/bin/tau_cc.sh  -tau_options='-optCompIns
t ' -tau_makefile=/usr/apps/tools/tau/2.20.3-forge/x86_64/lib/Makefile.tau-icpc-
mpi  -o "mpipic"  ./src/mpipic.o   

Finished building target: mpipic

Building will create a new directory named similar to the TAU makefile from the TAU tab options.  Once the instrumented application is built, then fill out the Profile Configuration tabs for the Application and Arguments to point to that executable and directory:

The Arguments tab should be adjusted to point to that directory.

Then in the Performance Analysis tab, allow TAU to profile for this run by deselecting the build-only box.
Finally, once the program runs, use TAU.  Allow TAU to run in the background if the dialog box persists while the job is submitted.

  • No labels