Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

This internal training event tutorial will cover the following topics with respect to using eclipse on forge:basic setup and use of Eclipse with forge.ncsa.illinois.edu.  At the end of the tutorial, you should be comfortable with the following tasks:

  • start eclipse and view the forge resource manager for your preferred version of MPI
  • submit a batch job to forge via eclipse
  • build code with eclipse and the c/c++ perspective (we'll ignore fortran for this tutorial, but can show you the perspective for it)
  • use TAU to profile a basic GPU code
  • use Eclipse to drive TAU performance analysis

Contents.

Table of Contents

eclipse on forge

...

startup, environment, and forge resource manager setup

To start eclipse on forge ?( locally ), add eclipse (and tau) to your $HOME/.modules setup.  This is also the place where you'd select an alternate MPI implementation if you want to stray from the pack and create confusion in this tutorial from the very beginning (openmpi users step forward) .  The modules on forge are displayed with the "module avail" command.  The prerequisite for running eclipse on forge is X-windows support and ssh X11 forwarding in your ssh client (ssh -Y or ssh -X for linux clients ).  Now is the time to find a linux or Mac user with X-windows and ssh (working in pairs) if you don't have that capability on your windows PC:

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

module load tau eclipse
[arnoldg@forge ~]$ eclipse -Xms512m -Xmx512m -XX:PermSize=256m -XX:MaxPermSize=512m &

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.

...


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.

Code Block

 [jlong@forge ~]$  qsub  -I -l nodes=2:ppn=4,flags=ADVRES:eclipse   # sample qsub command line showing access to the tutorial reservation

CUDA code with eclipse

Import the code below into a new c++ project (rt click in the open area under c/c++ perspective's  Project Explorer pane.  Name your project and select the Makefile and Empty Project for it's type, then when the project appears in the pane right click on your project and : Import->General->Filesystem) and bring in the vecadd/ code from your $HOME.  Then follow the steps in the 2nd bullet link (or attached PDF) below.

...

Code Block
 $ cd $HOME/vecadd
 $ tau_exec -T serial -XrunTAU-cupti-icpc -cuda ./vectorAdd
 $    # press return to exit the vectorAdd program
 $ paraprof &
 $ less /usr/apps/tools/tau/README.gpu  # experiment with TAU_METRICS set in your environment

Image Added

Note for the bored: the dev/ directory contains trial1.cvp created by computeprof--the Nvidia-CUDA profiler that ships with CUDA.  You can visualize it with the computeprof command on forge.

Paraprof setup on forge

  • start paraprof  from the ssh command line (not in Eclipse )
    • File -> Database Configuration -> accept defaults , confirm new perfdmf database/schema and "Save Configuration"
  • Exit paraprof (important because there can not be 2 paraprof processes trying to access your database at the same time...Eclipse will be starting one in the steps that follow)

TAU with mpi compute pi example

...

You will need to fill out the Resources tab to describe the job you want to run.  Select a queue (debug), Number of Nodes (1:ppn=4,flags=ADVRES:eclipse) , Mpirun command (mpirun_rsh), Number of cores (should be nodes*ppn or 4), and wall time (ten minutes = 00:10:00  ).
Finally, once the program runs, use TAU.  Allow TAU to run in the background if the dialog box persists while the job is submitted.

Homework questions.

How could you use Eclipse with TAU and a Makefile project ?

Can you manipulate jobs (cancel ) in the Systems Monitoring perspective ?

Does the Systems Monitoring perspective support more than one running resource manager ?