Skip to content

Commit

Permalink
Merge branch 'master' of git.nic.uoregon.edu:/gitroot/tau2
Browse files Browse the repository at this point in the history
Former-commit-id: 3def942cc67be9a2d2b65e6c75365b624a86dfda
  • Loading branch information
Scott Biersdorff committed Aug 21, 2012
2 parents 198bba4 + 562a3c3 commit ff10680
Show file tree
Hide file tree
Showing 8 changed files with 149 additions and 35 deletions.
6 changes: 6 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ Version 2.21 changes (from 2.20):
35. Reduced MPI overhead using a hash table, fixed BGP & BGQTIMERS.
36. Added support for ARM (arm_linux) and Intel MIC.
37. Added support for OTF2 (tau2otf2 -> tau2otf).
38. Added support for UPC wrapper generator with communication tracking.
39. Improved ParaProf 3D displays with wraparound torus configurations.
40. Added support for Fujitsu FX10.
41. Added support MPC.
42. Added support for LLVM.
43. Added support for TAU_LITE=1 for reduced overhead profiling.



Expand Down
30 changes: 20 additions & 10 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -1904,11 +1904,11 @@ if [ "x$upcnetwork" == "x" ] ; then
echo "NOTE: UPC network and MPI not specified. Assuming -upcnetwork=smp."
upcnetwork=smp
else
echo "NOTE: UPC network not specified. Assuming -upcnetwork=mpi."
#echo "NOTE: UPC network not specified. Assuming -upcnetwork=mpi."
upcnetwork=mpi
fi
else
if [ "$mpi" == "no" ] ; then
if [ "$upcnetwork" == mpi ] && [ "$mpi" == "no" ] ; then
echo "NOTE: Assuming -mpi because -upcnetwork=mpi."
mpi=yes
fi
Expand Down Expand Up @@ -3091,6 +3091,9 @@ then
if [ $f90loaded = 1 ]
then
fortran_compiler=`mpif90 -show | awk '{ print $1;}' | sed -e 's@/.*/@@g'`
if [ $fortran_compiler = ifort ]; then
fortran_compiler=intel
fi
else
fortran_compiler=no
fi
Expand Down Expand Up @@ -3874,21 +3877,23 @@ then
*)
if [ $mpc = yes ]
then
mpiinc=`which mpcrun | sed -e 's/\/bin\/mpcrun$//'`/include
mpiinc=`which mpcrun | sed -e 's/\/bin\/mpcrun$//' -e 's/\/bin64\/mpcrun$//'`/include
else
mpiinc=`which mpirun | sed -e 's/\/bin\/mpirun$//'`/include
if [ -d $mpiinc ]
mpiinc=`which mpirun | sed -e 's/\/bin\/mpirun$//' -e 's/\/bin64\/mpcrun$//'`/include
if [ -d $mpiinc -a -r $mpiinc/mpi.h ]
then
echo "Using MPI include directory $mpiinc"
echo "machine is $machine"
else
mpiinc=`which mpiexec | sed -e 's/\/bin\/mpiexec$//'`/include
if [ -d $mpiinc ]
mpiinc=`which mpiexec | sed -e 's/\/bin\/mpiexec$//' -e 's/\/bin64\/mpiexec$//'`/include
if [ -d $mpiinc -a -r $mpiinc/mpi.h ]
then
echo "Using MPI include directory $mpiinc"
else
mpiinc=""
fi
fi
if [ ! -r $mpiinc/mpi.h -a $mpiinc/mpich2/mpi.h ] ; then
if [ ! -r $mpiinc/mpi.h -a -r $mpiinc/mpich2/mpi.h ] ; then
mpiinc=$mpiinc/mpich2
echo "Correction: Using MPI include directory $mpiinc instead"
fi
Expand Down Expand Up @@ -4015,13 +4020,15 @@ then
then
mpilib=`which mpcrun | sed -e 's/\/bin\/mpcrun$//'`/lib
else
mpilib=`which mpirun | sed -e 's/\/bin\/mpirun$//'`/lib
mpilib=`which mpirun | sed -e 's/\/bin\/mpirun$//' -e 's/\/bin64\/mpirun$//'`/lib
if [ ! -d $mpilib ] ; then
# Try the ".../lib64" directory instead of ".../lib"
mpilib=`which mpirun | sed -e 's/\/bin\/mpirun$//'`/lib64
mpilib=`which mpirun | sed -e 's/\/bin\/mpirun$//' -e 's/\/bin64\/mpirun$//'`/lib64
fi
if [ -d $mpilib ] ; then
echo "Using MPI lib directory $mpilib"
else
mpilib=""
fi
fi
;;
Expand Down Expand Up @@ -5321,6 +5328,9 @@ EOF
echo "yes"
if [ -r $mpilib/libmpi.so -a -r $mpilib/libmpi++.so -a -r $mpilib/libsma.so -a -r $mpilib/libxmpi.so ] ; then
# Don't enable this for SGI Altix. Their MPI2 is not complete
# SGI MPI2 is ok now. We can enable it. Perhaps...
useropt="$useropt#-DTAU_MPI_F_STATUSES_IGNORE_ABSENT"
fixmakeargs="$fixmakeargs MPI2 useropt=$useropt"
echo "SGI MPI detected. Disabling MPI2 wrappers for SGI MPI"
elif [ -r $mpilib/libfmpi.so -a -r $mpilib/libmpio.so -a -r $mpilib/libtvscampi.so ] ; then
# Scali does not use MPI2 PMPI interface properly.
Expand Down
3 changes: 2 additions & 1 deletion examples/upc/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
UPC=tau_upc.sh -tau_makefile=../../include/Makefile
UPC=tau_upc.sh -tau_makefile=../../include/Makefile -optTrackUPCR -optTauSelectFile=select.tau #
#-g -optCompInst
APP=CAMEL
# APP=upctest

Expand Down
1 change: 1 addition & 0 deletions examples/upc/key
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0x4925e232
2 changes: 2 additions & 0 deletions include/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ TAU_OPENMP_OPTION =
#COMPAQCXX_OPENMP#TAU_OPENMP_OPTION = -omp #ENDIF#
#IBMXLC_OPENMP#TAU_OPENMP_OPTION = -qsmp=omp -qthreaded #ENDIF#
#OPEN64_OPENMP#TAU_OPENMP_OPTION = -mp #ENDIF#
#OPEN64_OPENMP#TAU_OPARI2_OPTION = --nodecl #ENDIF#
#GUIDE#TAU_OPENMP_OPTION = #ENDIF#
#PGIOPENMP#TAU_OPENMP_OPTION = -mp #ENDIF#
#INTELOPENMP#TAU_OPENMP_OPTION = -openmp #ENDIF#
Expand Down Expand Up @@ -1162,6 +1163,7 @@ TAUCOMPILEROPTS= -optPdtDir="$(PDTDIR)/${PDTARCHDIR}"\
-optTauInstr="$(TAU_BIN_DIR)/tau_instrumentor" \
-optNoMpi \
-optOpariDir="$(OPARIDIR)" -optOpari2Tool="$(TAU_OPARI2_TOOL)" -optOpari2ConfigTool="$(TAU_OPARI_CONFIG_TOOL)" \
-optOpari2Opts="$(TAU_OPARI2_OPTION)" \
-optOpariTool="$(TAU_OPARI_TOOL)" \
-optTauCC="$(TAU_CCOMPILER)" \
-optTauIncludes="$(TAU_INCLUDE) $(TAU_MPI_INCLUDE) $(TAU_SHMEM_INCLUDE) $(OPARIINCDIR)" \
Expand Down
42 changes: 25 additions & 17 deletions src/Profile/TauMpiExtensions.c
Original file line number Diff line number Diff line change
Expand Up @@ -2879,43 +2879,47 @@ int MPI_File_open( MPI_Comm comm, char * filename, int amode, MPI_Info info, MPI
/******************************************************
*** MPI_File_open wrapper function
******************************************************/
void MPI_FILE_OPEN( MPI_Fint * comm, char * filename, MPI_Fint * amode, MPI_Fint * info, MPI_Fint * fh, MPI_Fint * ierr)
void MPI_FILE_OPEN( MPI_Fint * comm, char * filename, MPI_Fint * amode, MPI_Fint * info, MPI_Fint * fh, MPI_Fint * ierr, int file_len)
{
MPI_Comm local_comm;
MPI_Info local_info;
MPI_File local_fh;
char *newfilename = (char *) malloc ((file_len +1) * sizeof(char));
strncpy(newfilename, filename, file_len);
newfilename[file_len] = '\0';
local_comm = MPI_Comm_f2c(*comm);
local_info = MPI_Info_f2c(*info);

*ierr = MPI_File_open( local_comm, filename, *amode, local_info, &local_fh) ;
*ierr = MPI_File_open( local_comm, newfilename, *amode, local_info, &local_fh) ;
free(newfilename);
*fh = MPI_File_c2f(local_fh);
return ;
}

/******************************************************
*** MPI_File_open wrapper function
******************************************************/
void mpi_file_open( MPI_Fint * comm, char * filename, MPI_Fint * amode, MPI_Fint * info, MPI_Fint * fh, MPI_Fint * ierr)
void mpi_file_open( MPI_Fint * comm, char * filename, MPI_Fint * amode, MPI_Fint * info, MPI_Fint * fh, MPI_Fint * ierr, int filename_len)
{
MPI_FILE_OPEN( comm, filename, amode, info, fh, ierr) ;
MPI_FILE_OPEN( comm, filename, amode, info, fh, ierr, filename_len) ;
return ;
}

/******************************************************
*** MPI_File_open wrapper function
******************************************************/
void mpi_file_open_( MPI_Fint * comm, char * filename, MPI_Fint * amode, MPI_Fint * info, MPI_Fint * fh, MPI_Fint * ierr)
void mpi_file_open_( MPI_Fint * comm, char * filename, MPI_Fint * amode, MPI_Fint * info, MPI_Fint * fh, MPI_Fint * ierr, int filename_len)
{
MPI_FILE_OPEN( comm, filename, amode, info, fh, ierr) ;
MPI_FILE_OPEN( comm, filename, amode, info, fh, ierr, filename_len) ;
return ;
}

/******************************************************
*** MPI_File_open wrapper function
******************************************************/
void mpi_file_open__( MPI_Fint * comm, char * filename, MPI_Fint * amode, MPI_Fint * info, MPI_Fint * fh, MPI_Fint * ierr)
void mpi_file_open__( MPI_Fint * comm, char * filename, MPI_Fint * amode, MPI_Fint * info, MPI_Fint * fh, MPI_Fint * ierr, int filename_len)
{
MPI_FILE_OPEN( comm, filename, amode, info, fh, ierr) ;
MPI_FILE_OPEN( comm, filename, amode, info, fh, ierr, filename_len) ;
return ;
}

Expand Down Expand Up @@ -2994,37 +2998,41 @@ int MPI_File_delete( char * filename, MPI_Info info)
/******************************************************
*** MPI_File_delete wrapper function
******************************************************/
void MPI_FILE_DELETE( char * filename, MPI_Fint * info, MPI_Fint * ierr)
void MPI_FILE_DELETE( char * filename, MPI_Fint * info, MPI_Fint * ierr, int filename_length)
{
MPI_Info local_info = MPI_Info_f2c(*info);
*ierr = MPI_File_delete( filename, local_info) ;
MPI_Info local_info = PMPI_Info_f2c(*info);
char *newfilename = (char *) malloc((filename_length + 1) * sizeof(char));
strncpy (newfilename, filename, filename_length);
newfilename[filename_length] = '\0';
*ierr = MPI_File_delete( newfilename, local_info) ;
free (newfilename);
return ;
}

/******************************************************
*** MPI_File_delete wrapper function
******************************************************/
void mpi_file_delete( char * filename, MPI_Fint * info, MPI_Fint * ierr)
void mpi_file_delete( char * filename, MPI_Fint * info, MPI_Fint * ierr, int filename_length)
{
MPI_FILE_DELETE( filename, info, ierr) ;
MPI_FILE_DELETE( filename, info, ierr, filename_length) ;
return ;
}

/******************************************************
*** MPI_File_delete wrapper function
******************************************************/
void mpi_file_delete_( char * filename, MPI_Fint * info, MPI_Fint * ierr)
void mpi_file_delete_( char * filename, MPI_Fint * info, MPI_Fint * ierr, int filename_length)
{
MPI_FILE_DELETE( filename, info, ierr) ;
MPI_FILE_DELETE( filename, info, ierr, filename_length) ;
return ;
}

/******************************************************
*** MPI_File_delete wrapper function
******************************************************/
void mpi_file_delete__( char * filename, MPI_Fint * info, MPI_Fint * ierr)
void mpi_file_delete__( char * filename, MPI_Fint * info, MPI_Fint * ierr, int filename_length)
{
MPI_FILE_DELETE( filename, info, ierr) ;
MPI_FILE_DELETE( filename, info, ierr, filename_length) ;
return ;
}

Expand Down
15 changes: 15 additions & 0 deletions src/Profile/TauSampling.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1317,6 +1317,21 @@ int Tau_sampling_init(int tid) {

static struct itimerval itval;

#ifdef TAU_BGQ
static bool warningPrinted = false;
// *CWL* - Vesta is having issues translating PC addresses now.
// This warning is issued as a part of a punt for EBS
// support on the BGQ for the August 2012 release.
//
// Please remove this check after the problem is fixed.
int myNode = RtsLayer::TheNode();
if ((myNode <= 0) && (tid == 0)) {
// Only one process will print this warning exactly once on thread 0. (Node 0 or -1).
printf("Warning: No current EBS support for the BlueGene/Q. No Samples will be recorded.\n");
warningPrinted = true;
return -1;
}
#endif /* TAU_BGQ */

Tau_global_incr_insideTAU_tid(tid);

Expand Down
85 changes: 78 additions & 7 deletions tools/src/tau_gen_wrapper
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ usage()
echo ""
echo " $cmd - Generates a wrapper library that can intercept "
echo " at link time or at runtime routines specified in a header file"
echo " Usage: $cmd <headerfile> <library> [-w (default) | -d | -r] "
echo " Usage: $cmd <headerfile> <library> [-w (default) | -d | -r] [-upc={berkeley,gnu,cray}]"
echo " -w (default): generates wrappers for re-linking the application"
echo " -d : generates wrappers by redefining routines during compilation in header files"
echo " -r : generates wrappers that may be pre-loaded using tau_exec at runtime"
echo " -upc: generates UPC runtime wrapper for use with -optTrackUPCR"
echo "NOTE: $cmd reads the TAU_MAKEFILE environment variable to get PDT settings"
echo " Example: "
echo " % $cmd hdf5.h /usr/lib/libhdf5.a "
Expand All @@ -22,6 +23,7 @@ header_redirection_specified=0;
headerfile=""
library=""
modarg=""
upc=""
if [ $# = 0 ] ; then
usage
fi
Expand All @@ -36,12 +38,19 @@ fi
for arg in "$@"; do
case $arg in
-r)
runtime_specified=1;
shift;
runtime_specified=1
shift
;;
-d)
header_redirection_specified=1;
shift;
header_redirection_specified=1
shift
;;
-upc=*)
upc="`echo $1 | sed 's/-upc=//'`"
shift
;;
-h|-help|--help)
usage
;;
esac
done
Expand All @@ -56,9 +65,71 @@ if [ ! -r $TAU_MAKEFILE ] ;then
exit 1
fi

if ! which tau-config > /dev/null 2>&1 ; then
echo "ERROR: tau-config is not in your path."
exit 1
fi

pdtdir="`grep PDTDIR= $TAU_MAKEFILE | sed -e 's/PDTDIR=//g' `"
tauarch="`tau-config | grep TAUARCH | sed -e 's@TAUARCH=@@g' `"
tauroot="`tau-config | grep TAUROOT | sed -e 's@TAUROOT=@@g' `"
basedir="`tau-config | grep BASEDIR | sed -e 's@BASEDIR=@@g' `"

if [ "x$upc" != "x" ] ; then
gasnetdir="`grep TAU_GASNET_DIR= $TAU_MAKEFILE | sed -e 's/TAU_GASNET_DIR=//g' `"
upcnetwork="`grep UPCNETWORK= $TAU_MAKEFILE | sed -e 's/UPCNETWORK=//g' `"
case $upc in
berkeley)
if ! which upcc > /dev/null 2>&1 ; then
echo "ERROR: upcc is not in your path."
exit 1
fi
upcdir="`which upcc | sed -e 's@bin/upcc@@g'`"
if [ -d $upcdir/opt_inst ] ; then
upcdir="$upcdir/opt_inst"
elif [ -d "$upcdir/inst/opt" ] ; then
upcdir="$upcdir/inst/opt"
else
echo "ERROR: Cannot locate instrumented Berkeley configuration at $upcdir"
exit 1
fi
echo PATH="$basedir/bin:$PATH" $tauroot/src/wrappers/upc/bupc/upcr/tau_upc_runtime_wrapper "$headerfile" -lm -gasnet="$gasnetdir" -gasnetconduit=$upcnetwork -upc="$upcdir"
PATH="$basedir/bin:$PATH" $tauroot/src/wrappers/upc/bupc/upcr/tau_upc_runtime_wrapper "$headerfile" "$library" -gasnet="$gasnetdir" -gasnetconduit=$upcnetwork -upc="$upcdir"
retval=$?
mv select.tau `basename "$headerfile" .h`_wrapper
exit $retval
;;
gnu)
if ! which upc > /dev/null 2>&1 ; then
echo "ERROR: upc is not in your path."
exit 1
else
upcdir="`which upc | sed -e 's@bin/upc@@g'`"
fi
echo PATH="$basedir/bin:$PATH" $tauroot/src/wrappers/upc/gupc/tau_upc_wrapper "$headerfile" "$library" -gasnet="$gasnetdir" -gasnetconduit=$upcnetwork -upc="$upcdir"
PATH="$basedir/bin:$PATH" $tauroot/src/wrappers/upc/gupc/tau_upc_wrapper "$headerfile" "$library" -gasnet="$gasnetdir" -gasnetconduit=$upcnetwork -upc="$upcdir"
retval=$?
mv select.tau `basename "$headerfile" .h`_wrapper
exit $retval
;;
cray)
if ! which cc > /dev/null 2>&1 ; then
echo "ERROR: cc is not in your path."
exit 1
fi
PATH="$basedir/bin:$PATH" $tauroot/src/wrappers/upc/crayupc/tau_upc_wrapper "$headerfile" "$library"
retval=$?
mv select.tau `basename "$headerfile" .h`_wrapper
exit $retval
;;
*)
echo "ERROR: Unknown UPC family: $upc"
exit 1
exit $?
;;
esac
fi

pdtdir=`grep PDTDIR= $TAU_MAKEFILE | sed -e 's/PDTDIR=//g' `
tauarch=`tau-config | grep TAUARCH | sed -e 's@TAUARCH=@@g' `

parser=$pdtdir/$tauarch/bin/cxxparse
if [ ! -x $parser ]; then
Expand Down

0 comments on commit ff10680

Please sign in to comment.