Using Tau and PDT with Pooma
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Using Tau and PDT with Pooma



These are the steps I used to install Tau on my sequential Linux
computer.

Visit http://www.acl.lanl.gov/tau to download Tau 2.9.19.  (Note the
version number!)  Visit http://www.acl.lanl.gov/pdtoolkit to download
PDToolkit.

After extracting the PDToolkit files, perform the following commands:

  ./configure -GNU	 # use g++ to compile the library
			   # alternatively use -KCC
  make
  make install		# How does one specify installation in a
			  # different directory?

After extracting the Tau files,

  Apply the source code patch.
  ./configure -gnu -noex -PROFILE -pdt=${HOME}/pooma/pdtoolkit-1.3
	  # Pooma's default is no exceptions.
	  # -gnu = use g++ and gcc
	  # Alternatively, s/-gnu/-c++=KCC/
	  # -pdt specifies the location of the PDToolkit
	  # I also added '-useropt='-static -g -DTAU_DOT_H_LESS_HEADERS' '
	  #   to ensure, among other things, '.h'-less header files are used.
  make install
  make tests
  cd i386_linux/lib	# Modify according to your architecture.
  mv Makefile.tau-noex Makefile.tau-gcc-noex

The last two commands rename a Makefile to record the associated
compiler, as needed by Pooma.  For example, one can replace "gcc" with
?"KCC"?.

The Tau and Pooma configuration files have diverged.  If using Linux,
patch the appropriate Pooma config/arch configuration file: Add a line
defining '$profile_archtype' to "i386_linux" (including quotation
marks) and modify '$profile_lib_subdir' to use '$profile_archtype'
instead of the hard-coded string.

First, make set the environment variables TAUDIR and PDTDIR to the
appropriate source locations.  For example, I added these two lines to
my ${HOME}/.profile:
  export TAUDIR=${HOME}/pooma/tau-2.9.19
  export PDTDIR=${HOME}/pooma/pdtoolkit-1.3
I also added '${TAUDIR}/i386_linux/bin:${PDTDIR}/linux/bin' to
${PATH}.  By default, Pooma will use PDToolkit to instrument all .cpp
files.  To do so, provide '--profile' as a configuration option:

  ./configure --arch LINUXgcc --bounds --debug --profile

Some Pooma source code changes will be necessary because the PDT
parser is old.  Sameer will send a new parser soon.

Thanks,
Jeffrey D. Oldham
oldham@xxxxxxxxxxxxxxxx
diff -r -C 2 /home/oldham/tmp/tau-2.9.19/include/Profile/FunctionInfo.h /home/oldham/pooma/tau-2.9.19/include/Profile/FunctionInfo.h
*** /home/oldham/tmp/tau-2.9.19/include/Profile/FunctionInfo.h	Tue Aug 28 11:42:44 2001
--- /home/oldham/pooma/tau-2.9.19/include/Profile/FunctionInfo.h	Wed Oct  3 12:37:34 2001
***************
*** 58,70 ****
  	  const char *ProfileGroupName = "TAU_DEFAULT", bool InitData = false,
  	  int tid = RtsLayer::myThread());
! 	FunctionInfo(const char* name, string& type, 
  	  TauGroup_t ProfileGroup = TAU_DEFAULT,
  	  const char *ProfileGroupName = "TAU_DEFAULT", bool InitData = false,
  	  int tid = RtsLayer::myThread());
! 	FunctionInfo(string& name, string& type, 
  	  TauGroup_t ProfileGroup = TAU_DEFAULT,
  	  const char *ProfileGroupName = "TAU_DEFAULT", bool InitData = false,
  	  int tid = RtsLayer::myThread());
! 	FunctionInfo(string& name, const char * type, 
  	  TauGroup_t ProfileGroup = TAU_DEFAULT,
  	  const char *ProfileGroupName = "TAU_DEFAULT", bool InitData = false,
--- 58,70 ----
  	  const char *ProfileGroupName = "TAU_DEFAULT", bool InitData = false,
  	  int tid = RtsLayer::myThread());
! 	FunctionInfo(const char* name, const string& type, 
  	  TauGroup_t ProfileGroup = TAU_DEFAULT,
  	  const char *ProfileGroupName = "TAU_DEFAULT", bool InitData = false,
  	  int tid = RtsLayer::myThread());
! 	FunctionInfo(const string& name, const string& type, 
  	  TauGroup_t ProfileGroup = TAU_DEFAULT,
  	  const char *ProfileGroupName = "TAU_DEFAULT", bool InitData = false,
  	  int tid = RtsLayer::myThread());
! 	FunctionInfo(const string& name, const char * type, 
  	  TauGroup_t ProfileGroup = TAU_DEFAULT,
  	  const char *ProfileGroupName = "TAU_DEFAULT", bool InitData = false,
diff -r -C 2 /home/oldham/tmp/tau-2.9.19/include/Profile/TauAPI.h /home/oldham/pooma/tau-2.9.19/include/Profile/TauAPI.h
*** /home/oldham/tmp/tau-2.9.19/include/Profile/TauAPI.h	Tue Aug 28 11:42:44 2001
--- /home/oldham/pooma/tau-2.9.19/include/Profile/TauAPI.h	Wed Oct  3 11:45:29 2001
***************
*** 95,100 ****
  
  #ifdef NO_RTTI
! /* #define CT(obj) string(#obj) */
! #define CT(obj) " "
  #else // RTTI is present
  #define CT(obj) string(RtsLayer::CheckNotNull(typeid(obj).name())) 
--- 95,100 ----
  
  #ifdef NO_RTTI
! #define CT(obj) string(#obj)
! /* TMP #define CT(obj) " " */
  #else // RTTI is present
  #define CT(obj) string(RtsLayer::CheckNotNull(typeid(obj).name())) 
diff -r -C 2 /home/oldham/tmp/tau-2.9.19/src/Profile/FunctionInfo.cpp /home/oldham/pooma/tau-2.9.19/src/Profile/FunctionInfo.cpp
*** /home/oldham/tmp/tau-2.9.19/src/Profile/FunctionInfo.cpp	Wed Jun 20 13:26:45 2001
--- /home/oldham/pooma/tau-2.9.19/src/Profile/FunctionInfo.cpp	Wed Oct  3 12:37:07 2001
***************
*** 172,176 ****
  //////////////////////////////////////////////////////////////////////
  
! FunctionInfo::FunctionInfo(const char *name, string& type, 
  	TauGroup_t ProfileGroup , const char *ProfileGroupName, bool InitData,
  	int tid)
--- 172,176 ----
  //////////////////////////////////////////////////////////////////////
  
! FunctionInfo::FunctionInfo(const char *name, const string& type, 
  	TauGroup_t ProfileGroup , const char *ProfileGroupName, bool InitData,
  	int tid)
***************
*** 184,188 ****
  //////////////////////////////////////////////////////////////////////
  
! FunctionInfo::FunctionInfo(string& name, const char * type, 
  	TauGroup_t ProfileGroup , const char *ProfileGroupName, bool InitData,
  	int tid)
--- 184,188 ----
  //////////////////////////////////////////////////////////////////////
  
! FunctionInfo::FunctionInfo(const string& name, const char * type, 
  	TauGroup_t ProfileGroup , const char *ProfileGroupName, bool InitData,
  	int tid)
***************
*** 196,200 ****
  //////////////////////////////////////////////////////////////////////
  
! FunctionInfo::FunctionInfo(string& name, string& type, 
  	TauGroup_t ProfileGroup , const char *ProfileGroupName, bool InitData,
  	int tid)
--- 196,200 ----
  //////////////////////////////////////////////////////////////////////
  
! FunctionInfo::FunctionInfo(const string& name, const string& type, 
  	TauGroup_t ProfileGroup , const char *ProfileGroupName, bool InitData,
  	int tid)