Versions Compared

Key

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

...

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.

...

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,

CUDA code with eclipse

...

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

...

Paraprof setup on forge

...

,

...

TAU with mpi compute pi example

A requirement for using TAU with eclipse locally is to setup the following directory and symbolic link to work around an Eclipse bug with TAU:
$ cd $HOME
$ mkdir -p ./uf/ncsa
$ ln -s $HOME ./uf/ncsa/$USER # workaround to handle Eclipse/TAU trying to submit jobs with $HOME/$HOME in pathname

Create a new project in eclipse by right clicking in the Project Explorer pane 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.

...

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 (or in your larger Makefile to define the compiler and linker commands ):
**** 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='-optCompInst ' -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/mpipic.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='-optCompInst ' -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
 

        • Build Finished ****

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 (deselect the default directory box and browse the path ).
Then in the Performance Analysis tab, allow TAU to profile for this run by deselecting the build-only box:
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 ?

) , 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.

...