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: 76fa8e08d949fbf93eef086cc79d8ed507db3920
  • Loading branch information
khuck committed Aug 13, 2018
2 parents cc09e51 + 045eebe commit 5802ff3
Show file tree
Hide file tree
Showing 52 changed files with 2,397 additions and 609 deletions.
7 changes: 7 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@ Version 2.27 changes (from 2.26):
16. Added support for OMPT TR6 (configure -ompt=download-tr6 with export TAU_OMPT_SUPPORT_LEVEL=full).
17. Added support for LIKWID 4.3.2.
18. Added Python args support.
19. Added support for armflang and armclang/armclang++ compilers.
20. Added -dyninst=download option to simplify installation of DyninstAPI and use with TAU.
21. Updated support for TAU's OMPT TR6 (-download=ompt-tr6).
22. Updated TAU's ParaTools Threadspotter [www.threadspotter.com] support in tau_exec (-ptts).
23. Added support for IBM XL compilers with MVAPICH2 under IBM Power Linux Power 9 + GPU platform.
24. Updated MPC support in TAU.


Version 2.26 changes (from 2.25):
1. Upgraded OMPT to LLVM-0.2 and introduced TAU_OPENMP_RUNTIME_EVENTS=0.
Expand Down
2 changes: 1 addition & 1 deletion apex
Submodule apex updated from d52498 to bc636d
240 changes: 215 additions & 25 deletions configure

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions examples/mm/matmult.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ void compute(double **a, double **b, double **c, int rows_a, int cols_a, int col
{
/*** Do matrix multiply sharing iterations on outer loop ***/
/*** Display who does which iterations for demonstration purposes ***/
#pragma omp for nowait
#pragma omp for schedule(dynamic) nowait
for (i=0; i<rows_a; i++) {
for(j=0; j<cols_b; j++) {
for (k=0; k<cols_a; k++) {
Expand All @@ -121,7 +121,7 @@ void compute_interchange(double **a, double **b, double **c, int rows_a, int col
{
/*** Do matrix multiply sharing iterations on outer loop ***/
/*** Display who does which iterations for demonstration purposes ***/
#pragma omp for nowait
#pragma omp for schedule(dynamic) nowait
for (i=0; i<rows_a; i++) {
for (k=0; k<cols_a; k++) {
for(j=0; j<cols_b; j++) {
Expand Down
105 changes: 105 additions & 0 deletions examples/mpi_comm_spawn/mpi_comm_spawn.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
/*
** Program to illustrate the use of MPI_Comm_spawn() to create
** new processes on-the-fly.
*/

#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <unistd.h>
#include "mpi.h"

#define MASTER 0
#define BUFSIZE 1024
#define NUM2SPAWN 2

int main( int argc, char *argv[], char ** envp )
{
int rank;
int size;
int np = NUM2SPAWN;
char message[BUFSIZE];
MPI_Comm parentcomm, spawnedcomm, allcomm;

MPI_Init(&argc, &argv);
pid_t pid = getpid();
/* This function provides a convenient way to determine whether
** this process is part of the original communicator (has a null
** parent), or part of the newly spawned communicator */
MPI_Comm_get_parent( &parentcomm );

/* write output according to which communicator this process is a part of */
if (parentcomm == MPI_COMM_NULL) {
/* Create 2 more processes.
** Here we spawn 2 more instances of this program.
** argv[0] contains the name of the executable for this program. */
char * spawn_args[] = {"-n", "1", NULL};
MPI_Comm_spawn( argv[0], spawn_args, np, MPI_INFO_NULL, 0,
MPI_COMM_WORLD, &spawnedcomm, MPI_ERRCODES_IGNORE );
/* get the process rank, in this case within the parent communicator */
MPI_Comm_rank(MPI_COMM_WORLD,&rank);
MPI_Comm_size(MPI_COMM_WORLD,&size);
printf("[%ld] rank %d (of %d) in the parent intra-communicator.\n", (long)pid, rank, size);
}
else {
/* notice that the spawned processes have an intra-communicator
** called MPI_COMM_WORLD, too */
MPI_Comm_rank(MPI_COMM_WORLD,&rank);
MPI_Comm_size(MPI_COMM_WORLD,&size);
printf("[%ld] rank %d (of %d) in the spawned intra-communicator.\n", (long)pid, rank, size);
}

/* we can broadcast to all processes associated with an
** inter-communicator, e.g. the spawned processes */
if (rank == MASTER) {
message[0] = 'g'; message[1] = 'a'; message[2] = 'l'; message[3] = 'o';
message[4] = 'r'; message[5] = 'e'; message[6] = '!'; message[7] = '\0';
}
/* BUT remember that broadcast is a collective operation, so all must call..
** but it's a tad fiddly with all the different groups of processors that
** we have.
** Note also that the inter-communicator has different names
** according to the (parent/spawned) perspective. */
if (parentcomm == MPI_COMM_NULL) {
if (rank == MASTER) {
MPI_Bcast(message,BUFSIZE,MPI_CHAR,MPI_ROOT,spawnedcomm);
}
MPI_Bcast(message,BUFSIZE,MPI_CHAR,MPI_PROC_NULL,spawnedcomm);
}
else {
MPI_Bcast(message,BUFSIZE,MPI_CHAR,MASTER,parentcomm);
printf("[%ld] spawned rank %d (of %d). Master broadcasts: %s\n", (long)pid, rank, size, message);
}

/* A simpler manoeuvre is to (collectively) merge
** the processes associated with an inter-communicator: */
if (parentcomm == MPI_COMM_NULL) {
MPI_Intercomm_merge(spawnedcomm, 0, &allcomm);
}
else {
MPI_Intercomm_merge(parentcomm, 0, &allcomm);
}

/* all processes can make calls associated with the
** merged communicator */
MPI_Comm_rank(allcomm,&rank);
MPI_Comm_size(allcomm,&size);
printf("[%ld] rank %d (of %d) in the merged intra-communicator.\n", (long)pid, rank, size);

/* free communicators when we've finished with them
** remembering the different names as seen from different
** perspectives */
if (parentcomm == MPI_COMM_NULL) {
MPI_Comm_free(&spawnedcomm);
MPI_Comm_free(&allcomm);
}
else {
MPI_Comm_free(&parentcomm);
MPI_Comm_free(&allcomm);
}

/* and finalise */
fflush(stdout);
MPI_Finalize();
return 0;
}
23 changes: 23 additions & 0 deletions examples/python/firstprime.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/usr/bin/env python
#Program written by Devin Shende on August 5th 2018

def firstPrimeAfter(x):
import math
current = x + 1
sqrtno = math.sqrt(current)
while True:
#search for primes starting at x until it finds one
#break once found a prime
for potentialfactor in range(2,current):
# start at 2 because 1 will always be a factor
# go all the way up to the sqrt of current looking for a factor
if current % potentialfactor == 0:
# Found factor. not prime
break # move on to next number
elif potentialfactor >= sqrtno:
print("The first prime number after {} is {}".format(x,current))
return current
current += 1

firstPrimeAfter(10000000)

2 changes: 2 additions & 0 deletions include/Makefile.skel
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,7 @@ TAU_OPENMP_OPTION =
#IBM_FORTRAN#TAU_F90 = xlf90$(TAU_R) $(F90_ABI) $(TAU_F90_OPT) #ENDIF#
#IBM64LINUX_XLF#TAU_F90 = xlf90$(TAU_R) $(F90_ABI) $(TAU_F90_OPT) #ENDIF#
#XLFLANG#TAU_F90 = xlflang $(F90_ABI) $(TAU_F90_OPT) #ENDIF#
#ARMFLANG#TAU_F90 = armflang $(F90_ABI) $(TAU_F90_OPT) #ENDIF#
#BGP#TAU_F90 = /bgsys/drivers/ppcfloor/comm/xl/bin/mpixlf90$(TAU_R) $(F90_ABI) $(TAU_F90_OPT) #ENDIF#
#BGP_GFORTRAN#TAU_F90 = mpif90 $(F90_ABI) $(TAU_F90_OPT) #ENDIF#
#BGQ#TAU_F90 = /bgsys/drivers/ppcfloor/comm/xl/bin/mpixlf90$(TAU_R) $(F90_ABI) $(TAU_F90_OPT) #ENDIF#
Expand Down Expand Up @@ -771,6 +772,7 @@ TAU_GCCLIB = -lgcc_s
#GNU#TAU_FORTRANLIBS = -L$(TAUGCCLIBDIR) $(TAUGCCLIBOPTS) -lstdc++ $(TAU_GCCLIB) #ENDIF#
#OPEN64ORC_FORTRAN#TAU_FORTRANLIBS = -lfortran -lffio #ENDIF#
#PATHSCALE_FORTRAN#TAU_FORTRANLIBS = -lpathfstart -lpathfortran #ENDIF#
#ARMFLANG#TAU_FORTRANLIBS = -lflangmain -lflang -lflangrti -lompstub -lm -lrt #ENDIF#
#SC_PATHSCALE#TAU_FORTRANLIBS = -lpathfstart -lpathfortran #ENDIF#
#NAGWARE_FORTRAN#TAU_FORTRANLIBS = $(EXTRADIR)/lib/quickfit.o $(EXTRADIR)/lib/f90_init.o $(EXTRADIR)/lib/libf??.so $(EXTRADIR)/lib/libf??.a -lm -Wl,-rpath,$(EXTRADIR)/lib #ENDIF#
#G95_FORTRAN#TAU_FORTRANLIBS = -L$(EXTRADIR) -lf95 #ENDIF#
Expand Down
4 changes: 4 additions & 0 deletions include/Profile/TauEnv.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ extern "C" {
double TAUDECL TauEnv_get_throttle_percall();
const char* TAUDECL TauEnv_get_profiledir();
const char* TAUDECL TauEnv_get_tracedir();
void TAUDECL TauEnv_set_profiledir(const char * new_profiledir);
void TAUDECL TauEnv_set_tracedir(const char * new_tracedir);
const char* TAUDECL TauEnv_get_metrics();
const char* TAUDECL TauEnv_get_cvar_metrics();
const char* TAUDECL TauEnv_get_cvar_values();
Expand Down Expand Up @@ -161,6 +163,8 @@ extern "C" {
int TAUDECL TauEnv_get_mem_callpath();
const char * TAUDECL TauEnv_get_mem_classes();
int TAUDECL TauEnv_get_mem_class_present(const char * name);
const char * TAUDECL TauEnv_get_tau_exec_args();
const char * TAUDECL TauEnv_get_tau_exec_path();
#ifdef __cplusplus
void Tau_util_replaceStringInPlace(std::string& subject, const std::string& search,
const std::string& replace);
Expand Down
4 changes: 2 additions & 2 deletions include/Profile/TauPlugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
extern "C" {
#endif /* __cplusplus */

void Tau_util_init_tau_plugin_callbacks(Tau_plugin_callbacks * cb);
void Tau_util_plugin_register_callbacks(Tau_plugin_callbacks * cb);
void Tau_util_init_tau_plugin_callbacks(Tau_plugin_callbacks_t * cb);
void Tau_util_plugin_register_callbacks(Tau_plugin_callbacks_t * cb);

#ifdef __cplusplus
}
Expand Down
10 changes: 6 additions & 4 deletions include/Profile/TauPluginInternals.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,17 @@ extern "C" {
#define TAU_PLUGIN_INIT_FUNC "Tau_plugin_init_func"

int Tau_initialize_plugin_system();
int Tau_util_load_and_register_plugins(PluginManager* plugin_manager);
void* Tau_util_load_plugin(const char *name, const char *path, PluginManager* plugin_manager);
void* Tau_util_register_plugin(const char *name, char **args, int num_args, void* handle, PluginManager* plugin_manager);
int Tau_util_load_and_register_plugins(PluginManager_t* plugin_manager);
void* Tau_util_load_plugin(const char *name, const char *path, PluginManager_t* plugin_manager);
void* Tau_util_register_plugin(const char *name, char **args, int num_args, void* handle, PluginManager_t* plugin_manager);

int Tau_util_cleanup_all_plugins();

PluginManager* Tau_util_get_plugin_manager();
PluginManager_t* Tau_util_get_plugin_manager();
void Tau_util_invoke_callbacks(Tau_plugin_event_t event, const void * data);

extern Tau_plugin_callbacks_active_t Tau_plugins_enabled;

#ifdef __cplusplus
}
#endif /* __cplusplus */
Expand Down
Loading

0 comments on commit 5802ff3

Please sign in to comment.