pax_global_header00006660000000000000000000000064106234304270014513gustar00rootroot0000000000000052 comment=24c3c2796e3181121d6c23220ae826551aa3211a tau-2.16.4/000077500000000000000000000000001062343042700123765ustar00rootroot00000000000000tau-2.16.4/COPYRIGHT000066400000000000000000000037261062343042700137010ustar00rootroot00000000000000***************************************************************************** ** Tuning and Analysis Utilities ** ** http://www.cs.uoregon.edu/research/paracomp/tau ** ***************************************************************************** ** Copyright 1997-2007 ** ** Department of Computer and Information Science, University of Oregon ** ** Advanced Computing Laboratory, Los Alamos National Laboratory ** ** Research Center Juelich, ZAM Germany ** ***************************************************************************** ** ** Permission to use, copy, modify, and distribute this software and its ** documentation for any purpose and without fee is hereby granted, ** provided that the above copyright notice appear in all copies and that ** both that copyright notice and this permission notice appear in ** supporting documentation, and that the name of University of Oregon (UO) ** Research Center Juelich, (ZAM) and Los Alamos National Laboratory (LANL) ** not be used in advertising or publicity pertaining to distribution of ** the software without specific, written prior permission. The ** University of Oregon, ZAM and LANL make no representations about the ** suitability of this software for any purpose. It is provided "as is" ** without express or implied warranty. ** ** UO, ZAM AND LANL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, ** INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. ** IN NO EVENT SHALL THE UNIVERSITY OF OREGON, ZAM OR LANL BE LIABLE FOR ** ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER ** RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF ** CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN ** CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** tau-2.16.4/CREDITS000066400000000000000000000052541062343042700134240ustar00rootroot00000000000000/******************************************************************* * * * Tuning and Analysis Utilities Credits * * Version 2.16 * * * ******************************************************************* * For installation help, see INSTALL. * * For release notes, see README. * * For licensing information, see LICENSE. * * For a tutorial on using TAU, open html/index.html in your * * web browser. * * For more information, including updates and new releases, * * and documentation, see * * http://www.cs.uoregon.edu/research/tau * * For help, reporting bugs, and making suggestions, please * * send e-mail to tau-bugs@cs.uoregon.edu * *******************************************************************/ TAU Portable Profiling: ----------------------- Sameer Shende, University of Oregon Alan Morris, University of Oregon Wyatt Spear, University of Oregon Kevin Huck, University of Oregon Aroon Nataraj, University of Oregon Scott Biersdorff, University of Oregon Suravee Suthikulpani, University of Oregon Chris Hoge, University of Oregon Kai Li, University of Oregon Li Li, University of Oregon Robert Michael Ansell-Bell, University of Oregon Kathleen Lindlan, University of Oregon Ariya Lohavanichbutr, University of Oregon Nicholas Trebon, University of Chicago Peter Beckman, Argonne National Laboratory Steve Karmesin, Los Alamos National Laboratory Bernd Mohr, Research Centre Jülich, ZAM, Germany Principal Investigators: ------------------------ Prof. Allen Malony, University of Oregon Thanks to: ---------- Brian Miller Craig Rasmussen Bronis R. de Supinski Janice Cuny Matt Sottile Jeff Brown Rod Oldehoeft Todd Veldhuizen Suvas Vajracharya Lars Hansen Kurt Windisch Darryl Brown Julian Cummings Stephen Smith Bill Humphrey John Reynders Scott Haney James Crotinger Timothy Williams Susan Post Anthony Chan David Skinner Rolf Rabenseifner NAS Parallel Benchmarks Group for allowing us to use their code as an example of TAU instrumentation with Fortran and MPI (http://www.nas.nasa.gov/NAS/NPB/). The Jumpshot group at Argonne National Laboratories for providing Jumpshot and SLOG2 packages. UFL UPC Group (Adam Leko) for building the GPSHMEM/PGPSHMEM wrappers for TAU. The TAU project is directed by Prof. Allen D. Malony at the University of Orgeon. tau-2.16.4/Changes000066400000000000000000000444451062343042700137040ustar00rootroot00000000000000***************************************************************************** ** TAU Portable Profiling Package ** ** http://www.cs.uoregon.edu/research/paracomp/tau ** ***************************************************************************** ** Copyright 1997-2007 ** ** Department of Computer and Information Science, University of Oregon ** ** Advanced Computing Laboratory, Los Alamos National Laboratory ** ***************************************************************************** Change log: ------------ Version 2.16 changes (from 2.15): 1. Added a new tool for correcting network time drifts in traces (tau_timecorrect). 2. Added support for an Eclipse analysis wizard and a graphical instrumentor. 3. Added support for 3D stereo visualizations in ParaProf. 4. Added support for a source browser in ParaProf. 5. Added support for generating source code information in tau_instrumentor. 6. Added support for Perflib based instrumentation and perf2tau [Jeff Brown, LANL]. 7. Updated KTAU support in TAU for registering fork for kernel profiling [ANL]. 8. Added tau_validate tool for checking if the TAU library is built correctly [UTK]. 9. Added support for loading multiple ppk files in paraprof on the commandline [ORNL]. 10. Enhancements in ParaProf and PerfExplorer for using metadata. [PERI] 11. Added support for capturing date and other cpu information in profiles. [LLNL] 12. Added support for Vampirtrace [LLNL]. 13. Added support for Scalasca 0.5, and KOJAK 2.2 [FZJ, UTK]. 14. Enhancements to Eclipse PTP plugin to support PAPI counter selection. [UTK] 15. Supports PDT v3.10 with EDG v3.8 C++/C parsers [LLNL]. 16. Added support for application signatures [RENCI]. 17. Added support for SiCortex Linux platform [SiCortex]. 18. Added support for tracking leaks and dynamic memory allocation/deallocations in Fortran. 19. Improved tau memory tracking module to handle multi-line statements in Fortran. 20. Python profiler overhead is greatly reduced. 21. tauex script added for switching between libraries. 22. -optShared option added in tau_compiler.sh for linking in TAU's shared objs.23. Easy to use TAU API (TAU_START("string"), TAU_STOP("string")) introduced. 24. Paraprof enhancements include support for Cube 3. 25. PAPI threads (configure -papithreads) and PAPI Domains added for x86 linux. Version 2.15 changes (from 2.14): 1. Added support for phase and comparative displays in ParaProf [UO] 2. Updated PerfExplorer [UO] 3. Added suport for Eclipse CDT, FDT [LANL] 4. Added support for OTF (tau2otf) [LLNL] 5. Added support for runtime throttling of events (TAU_THROTTLE) [UCAR] 6. Added support for ORC Open64 compiler [U. Houston/NCSA] 7. Added support for Solaris on x86_64 (Opterons) [SUN] 8. Added support for nested OpenMP calls [SUN, Aachen] 9. Added support for Cray XT3 and SHMEM wrapper [PSC] 10. Added support for multi-platform traces and a trace writer library [UFL, ORNL] 11. Added support for top level timer in OpenMP [UCAR] 12. Added support for PAPI on BGL and XT3 [ANL, PSC] 13. Added support for converting TAU traces to profiles. 14. Added support for converting TAU callpath profiles to phase profiles [LLNL]. 15. Enhancements to Paraprof. 16. Better support for Intel compilers for linking C and Fortran codes to TAU [NOAA]. 17. Added support for FreeBSD [ARL]. 18. Added support for Eclipse PTP [LANL]. 19. Added support for scripting in Paraprof using Jython to create custom views [LLNL]. 20. Added support for Python 2.4 with instrumentation for C calls [LLNL]. 21. Added support for loop level instrumentation for C and C++ [UTK, LANL]. 22. Added support for parameter based profiling (-PROFILEPARAM) [UTK]. 23. Added support for tau_load.sh for runtime MPI library instrumentation [UTK]. 24. Added support for outer-loop level instrumentation for Fortran [UTK, LLNL]. 25. Added a new tool: tau_ompcheck that completes OpenMP Fortran directives [NCAR]. 26. Added support for preprocessing Fortran sources in tau_compiler.sh (-optPreProcess) [GSFC]. 27. Added support for invoking tau_ompcheck in tau_compiler.sh [NCAR]. 28. Added support for DB2 and Derby in PerfDMF [UTK, LLNL]. 29. Added support for Infiniband MPICH on Opterons [NERSC]. 30. Added support for Cray XT3 Memory headroom information and Cray Timers [PSC]. 31. Added support for GNU Gfortran parser in PDT for tau_compiler.sh [LANL]. 32. Added support for parameter based profiling (-PROFILEPARAM) for workload characterization [UTK]. 33. Added support for upgrading from one version of TAU to another (upgradetau) [NERSC]. 34. Added support for automatic instrumentation of pthread programs using PDT [Walt Disney]. 35. Added Java TAU trace writer library [U. Reading]. 36. Added support for gotos in outer-loop level instrumentation [UTK]. 37. Added support for automatic MPI library level instrumentation using tau_poe [UTK]. 38. Updated tau_ompcheck [NCAR]. 39. Better support for instrumentation and parsing of Fortran programs [Goddard]. 40. PerfExplorer enhancements (normal probability plots, event data, distribution info of events) 41. Automatic memory leak detection (-optDetectMemoryLeaks) for C/C++ malloc/free [UTK]. 42. TAU Portal (tau.nic.uoregon.edu) to access database. Version 2.14 changes (from 2.13): 1. MPI-2 support and Fortran wrappers added. 2. Support for Oracle database in PerfDMF. 3. VTF support for multiple PAPI counters in Vampir/VTF format trace files. 4. Improvements in Paraprof displays and database connectivity. 5. Improvements in tau_compiler.sh to automatically instrument applications. 6. Added support for phase based profiling and dynamic timers. 7. Introduced vtf2profile tool to get profiles from VTF3 traces. 8. Added histograms, full callgraph, not-normalized displays to paraprof. 9. Added support for PathScale compilers and -exec-prefix option. 10. Improved support for locking of performance data in multi-threaded apps. 11. Added 3D displays in Paraprof. 12. Added support for SLOG2 traces (to use TAU with Jumpshot) [ANL]. 13. Added bettter support for configuring for BG/L (-arch=bgl) [ANL]. 14. Added support for depth limit profiling and tracing (-DEPTHLIMIT) [ORNL]. 15. Changes to the MPI wrapper library (for S3D) [ORNL]. 16. TAU_MPI_MESSAGE_SIZE now reports sizes for MPI_Send, Recv, Allreduce, etc.[ORNL]. 17. Added support for Charm thread library [UIUC, LLNL]. 18. Added support for gfortran compiler (-fortran=gfortran). 19. Added support for reverse callpaths in paraprof [LLNL]. 20. Added support for storing trials in paraprof [UTK]. 21. Added support for user defined context events (callpaths) [ANL]. 21. Added support for measuring memory headroom available (-PROFILEHEADROOM, examples/headroom) [ANL]. 22. Added tau2elg trace conversion tool to convert to Epilog trace format [UTK]. 23. Added search options to paraprof windows [LLNL]. 24. Added support for -MPITRACE option for Kojak [UTK]. 25. Paraprof has text table window now for callpath profiles [LLNL]. 26. Changes to TAU_COMPILER to support Opari in Kojak [UTK]. 27. Fixed bugs in tau2elg to support Kojak v 2.1 and 2.1.1 [FZJ]. 28. Fixed a bug in TAU_COMPILER (when opari is not used) [UTK]]. 29. Added support for cube (importer) in paraprof [UTK]. 30. Added support for PGI v6.0 compilers. 31. Added Jumpshot/Slog2 package to TAU [ANL]. 32. Added support for trace files > 2GB in TAU and VTF3 [TACC]. 33. TAU no longer needs merged pdb files from PDT's F95 parser [UTK]. 34. Enhancements in Paraprof to choose metrics for summary table, std. dev [LLNL]. 35. TAU_COMPILER does not need -optReset for IBM xlf90 to eliminate -D* flags. 36. TAU scripts (tau_[cxx,cc,f90].sh) for use on commandline [UFL]. 37. TAU Java Eclipse plugin [LANL]. 38. Updated documentation. 39. Added PerfExplorer performance data mining and knowledge discovery framework [LLNL]. 40. Enhancements in MPI libraries for scalability [LLNL]. 41. Phase based profiling allows you to identify phases in paraprof. 42. Added tau_setup GUI for TAU installations [LANL]. Version 2.13 changes (from 2.12): 1. Paraprof enhancements. 2. TAU MPI wrapper library layer enhancements [CCA]. 3. Better support for autoinstrumentation of F95 source code using PDT [LANL]. 4. Support for autoinstrumentation of Java using JDK 1.3 and 1.4.x JVMPI. 5. Introduced the TAU Trace Input Library (TIL) [VNG, TUDresden]. 6. Added support for detecting papi wallclock timer overflow [LLNL]. 7. Added support for Power4 Linux 64 bit compilation (-arch=ibm64linux) [LLNL]. 8. Paraprof enhancements for groups and multiple counters with multithreaded loading [LANL]. 9. Added TAU Instrumentation Language for enhancing tau_reduce. 10. Added support for RTTI with g++ [ITT]. 11. Added support for PAPI 3 so that TAU works with both PAPI 2 & 3 [UTK]. 12. Paraprof enhancements for callpath profiling [LLNL]. 13. Timer overhead measurements for callpath profiling. 14. Compensation of timing overhead introduced. 15. Malloc/free wrappers pinpoint memory allocation bugs (examples/malloc) [LLNL]. 16. Added memory utilization tracking (examples/memory) [LLNL]. 17. Added muse user defined events with TAU interrupt handlers [LANL]. 18. Paraprof improvements (clickable callpaths, image, XML support) [LLNL]. 19. Fuzzy matching of file names in tau_instrumentor (/home/foo.cpp ./foo.cpp) [TACC]. 20. Added support for TAU_TRACK_MEMORY_HERE() [LLNL]. 21. Improvements in PerfDMF and ParaProf's ability to connect to database [LLNL]. 22. Added support for native PAPI events (setenv COUNTER1 PAPI_NATIVE_) [LLNL]. 23. Added support for DyninstAPI v4.1 [UMD]. 24. Added support for VTF3 binary trace generation library for Vampir. 25. Added hardware performance counters and other user defined events to trace. 26. Introduced hierarchical trace merging using tau_merge (both offline/online). 27. Added -PROFILEMEMORY option that tracks memory at each routine entry [LLNL]. 28. Improved support for MySQL and PostgreSQL databases in PerfDMF. 29. Added automated trace merge/convert with tau2vtf using TAU_TRACEFILE env. 30. Added $(TAU_COMPILER) shell script/makefile variable for automatic instr. Version 2.12 changes (from 2.11): 1. Enhancements in jracy for supporting multiple counter data [LLNL]. 2. Improved memory handling and drawing speeds in jracy [LLNL]. 3. Configuration changes for LAM MPI, PAPI, Tru64 [Utah, NCSA, LANL]. 4. Added support for Python bindings [CACR, LLNL]. 5. Added MPI shared library examples [CACR]. 6. Added support for building multiple configurations (installtau) [LANL, LLNL]. 7. Added support for Python under AIX and OSX [LLNL]. 8. Bug fixes for IA-64 and Intel 7.1 compiler [NCSA]. 9. Added TAU_CALLPATH_DEPTH env. variable specification for callpath profiling [LLNL]. 10. Added support for -arch=ibm64. It suppports PAPI 64 bit/Power4. [UTK] 11. Bug fixes for shared libraries with MPI, g++/KCC under AIX 5.1. [LLNL] 12. Introduced paraprof profile browser (jracy symlinks to paraprof). [ASCI] 13. Added support for dumping profiles in python using a prefix. [LLNL] 14. Added support for DyninstAPI 4.0 including binary rewriting. [U. Maryland] 15. Added support for KOJAK's implementation of Opari and EPILOG. [FZJ] 16. Added support for file level selective instrumentation (PDT, Dyninst). [Utah] 17. Fixed Apple's OS X sscanf bug for reading long doubles in pprof. 18. Added support for DyninstAPI under AIX. [NERSC] 19. Added support for Cray X1 and AMD Opteron (ASCI Red Storm). [Cray] 20. Added support for MAGNET/MUSE. [LANL] 21. Added support for Performance Database [ASCI]. 22. Added support for Multiplecounters with CRAY_TIMERS, MUSE and message size [CCA]. Version 2.11 changes (from 2.10): 1. Added -i header option for tau_instrumentor [CASC]. 2. Added -LINUXTIMERS option for low overhead Linux wallclock time [CACR]. 3. Added -c|-c++|-fortran options to tau_instrumentor [CACR]. 4. Lowered the overhead of timers of disabled profile groups [CACR]. 5. Added support for PAPI v2.1 [CACR]. 6. Updated PCL bindings. 7. Added support for selective instrumentation [CACR]. 8. Added support for multiple counters [CACR]. 9. Added support for Paraver trace visualizer (CEPBA) in tau_convert. 10. Opari and PDT related changes (examples/opari/pdt_f90) [FZJ]. 11. Added support for online access to performance data [CACR]. 12. Added support for LINUXTIMERS for PGI and other Linux compilers [FZJ]. 13. Changes to online access API [CACR]. 14. Improved jracy GUI [ALPS]. 15. Added support for EPILOG tracing package [FZJ]. 16. Added support for Hitachi SR8000 [FZJ]. 17. Added support for browsing by profile groups in jracy [ALPS, LLNL]. 18. Made some modifications to Paraver trace format conversion [CEPBA]. 19. Added support for NEC SX-5 [HLRS]. 20. Added support for -mpilibrary option [LLNL]. 21. Added support for g++ 2.96/3.x for tau_merge/tau_convert [ST]. 22. Fixed a problem with the MPI wrapper library for Intel IA-64 compilers [NCSA]. 23. Added support for tracking message sizes using user defined events [Rutgers]. 24. Added support for low overhead, high resolution timers under IA-64 Linux [NCSA]. 25. Added support for alternative returns in PDT based C instrumentation [PETSc, ANL]. 26. Added a new tool - tau_reduce for reducing instrumentation overhead. 27. Added support for callpath profiling. 28. Fixed pprof to support exclusive percentage in callpath profiling. 29. Changes for CCA, jracy & DyninstAPI on IRIX, Sun. Version 2.10 changes (from 2.9): 1. Better support for C instrumentation [HDF5]. 2. Fixes for IBM. 3. Added support for multiple instrumentation requests per line [CACR F90/C++]. 4. Added support for detecting threaded versions of MPI at configuration. 5. Made some modifications for PDT v2.1 [CACR C++/C]. 6. Added jracy, TAU's new Java based profile browser to replace racy. 7. Added support for specifying a fortran compiler during configuration. 8. Added support for auto-detection of mpi libs and include dirs (-mpi). 9. Added IBM specific libs for MPI so we don't have to use mpCC, mpKCC [CACR]. 10. Added TAU_LDFLAGS to MPI Makefiles [CACR]. 11. Added support for enabling/disabling profile groups at runtime [PDT, CACR]. Version 2.9 changes (from 2.8): 1. Better support for mixed model programming 2. Changes for KCC and KAP/Pro. 3. Added support for MPI with DyninstAPI. 4. Added support for selective profiling in Java (-XrunTAU:exclude=java,sun) 5. Java RMI support changes. 6. Introduced TAU Java source instrumentation API. 7. Added support for enabling and disabling group level instrumentation. 8. Added support for PCL 2.0. 9. Fixed tau_instrumentor for PDT 1.3 using SGI CC and examples. 10. Fixed F90 bug on string concatenation. 11. Changed TauGroup_t to 64 bits (unsigned long).[Mapping addresses]. 12. Added TAU_SHLIBS so DSO's are created everytime. 13. Support for incremental profile dumps. 14. PAPI on Solaris and other platforms requires linking with a static library. 15. Added support for Compaq Alpha (cxx, cc, f90). 16. Fix for MPT 1.4 under IRIX 6.5. 17. Changes in tau_merge to support Uintah. 18. Added support for SGI sproc threads. 19. Added support for dumping profile data in a consistent state (profile snapshot). 20. Added support for Opari OpenMP directive rewriting tool [EWOMP'01]. 21. Improved MPI wrapper library support [Uintah]. 22. Added support for gcc-3.0 (pprof). 23. Added a bug fix for Vampir (tau_convert -pv -longsymbolbugfix) [SAMRAI]. 24. Changed Opari options (omperf to pomp name change). 25. Added support for dynamically assigning group names [SAMRAI]. 26. Added support for evaluating perturbation of TAU_DB_DUMP() [Uintah]. 27. Added support for C in tau_instrumentor. 28. Fixed RtsLayer bug for PDT based instrumentation of multi-threaded C++ applications. 29. Added -noinline flag to tau_instrumentor to suppress instrumentation of inlined functions [POOMA]. 30. Added support for F90 in tau_instrumentor. 31. Added support for abnormal exit in C [UPS]. 32. Added support for Opari-1.1 [flush_enter/exit calls]. 33. Added MPI wrapper layer for SGI Fortran [SAGE]. 34. Made changes to SGI Fortran MPI layer [MPI_Init]. 35. Added IA-64 support (threads, PDT, MPI ...) using RH 7.1 gcc 2.96. Version 2.8 changes (from 2.7): 1. Added support for PAPI (Perf. API for accessing HW Perf. Counters). 2. Added better support for Dyninst. 3. Added support for CPUTIME (pthread/Linux). 4. Added support for multi-language programming for Java + C (JNI). 5. Added support for mpiJava. 6. Added support for tracing all MPI interprocess communication (incl. async.) 7. Added support for PAPIWALLCLOCK (with -papi=<...>) for low overhead timers. 8. Added support for PAPIVIRTUAL (with -papi=<...>) for user time using PAPI. 9. Added support for OpenMP and OpenMPI (PGI, KAP, IBM, SGI) 10. More compilers: IBM xlC, xlc, xlf90 on SP (See INSTALL file) Version 2.7 changes (from 2.6): 1. Added Support for JAVA (JDK 1.2+). 2. Added support for DYNINST Dynamic Instrumentation Package from U. Maryland. 3. Added support for SUN 5.0 CC, F90 compilers 4. Added support for Microsoft Windows. Version 2.6 changes (from 2.5): 1. TAU Mapping API introduced. 2. More platforms: Cray T3E with F90, Alpha/Linux, Intel/Linux with PGI and Fujitsu compilers (C++/C/F90) 3. Added support for threadsafety in Fortran/C. 4. Added support for Program Database Toolkit for instrumenting C++ sources using tau_instrumentor 5. Added support for Performance Counter Library for accessing Hardware Performance Counters on Cray, Intel, Alpha, UltraSparcs, MIPS, and IBM Power platforms 6. TAU MPI wrapper library introduced for profiling MPI routines. 7. Added NAS Parallel Benchmark 2.3 LU & SP suites as Fortran90/MPI examples. Version 2.5 changes (from 2.4): 1. Automatic instrumentation support using DUCTAPE. 2. Changes in directory structure and configuration. 3. Integrated with POOMA and SMARTS. Version 2.4 changes (from 2.3): 1. Added support for SMARTS and Tulip user level threads. 2. Added support for Fortran and F90 API. 3. Added threadsafe user defined events. 4. Added threadsafe trace library. Version 2.3 changes (from 2.2): 1. Added pthread support. 2. Added C-API support with the same lib/API. 3. Introduced User Events Version 2.2 changes (from 2.1): 1. Added callstack profile viewing tool 2. Blitz++ compatibility changes. Version 2.1 changes (from 2.0): 1. Better colors in racy 2. Support for T3E. 3. Support for Tcl/Tk 8.0 as the default. 4. Introduced Callstack profiling. 5. Blitz specific changes. Version 2.0 changes (from 1.0): 1. Introduced Tracing. tau-2.16.4/INSTALL000066400000000000000000001456501062343042700134420ustar00rootroot00000000000000***************************************************************************** ** TAU Portable Profiling Package ** ** http://www.cs.uoregon.edu/research/tau ** ***************************************************************************** ** Copyright 1997-2007 ** ** Department of Computer and Information Science, University of Oregon ** ** Advanced Computing Laboratory, Los Alamos National Laboratory ** ** Research Center Juelich, ZAM Germany ** ***************************************************************************** /******************************************************************* * * * Tuning and Analysis Utilities Installation Procedure * * Version 2.16 * * * ******************************************************************* * For installation help, see INSTALL. * * For release notes, see README. * * For JAVA instructions, see README.JAVA * * For licensing information, see LICENSE. * * For a tutorial on using TAU, open html/index.html in your * * web browser. * * For more information, including updates and new releases, * * see http://www.cs.uoregon.edu/research/tau * * For help, reporting bugs, and making suggestions, please * * send e-mail to tau-bugs@cs.uoregon.edu * *******************************************************************/ /* NOTE: PLEASE REFER TO tools/src/contrib/LICENSE* files for open * * source licenses of other packages that TAU uses internally. * *******************************************************************/ General Installation Procedure: ------------------------------- Microsoft Windows users should refer to instructions in README.WINDOWS.txt. The following instructions are meant for Unix Users. 1. Configure the package for your system. We strongly urge you to see the section "1) INSTALLING TAU" below for examples (Linux clusters, AIX, BGL, XT3) After uncompressing and untarring tau, the user needs to configure, compile and install the package. This is done by invoking: % ./configure % make install TAU is configured by running the configure script with appropriate options that select the profiling and tracing components that are used to build the TAU library. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation, and creates the Makefile(s) (one in each subdirectory of the source directory). NOTE: It is highly recommended that you select the *minimal* set of options ***** that satisfies the instrumentation and measurement parameters that you need. Multiple configurations can be created by using configure several times using a different set of options each time. Commonly used configurations are typically installed using the 'installtau' tool described below. NOTE: tau_setup is a Java based GUI tool for installing TAU on your system. ***** % ./configure -help TAU Configuration Utility *********************************************************************** Usage: configure [OPTIONS] where [OPTIONS] are: -c++= ............................ specify the C++ compiler. options [CC|KCC|g++|*xlC*|cxx|pgCC|FCC|guidec++|aCC|c++|ecpc| icpc|scgcc|scpathCC|pathCC|orCC]. -cc= ................................ specify the C compiler. options [cc|gcc|scgcc|KCC|pgcc|guidec|*xlc*|ecc|pathcc|orcc]. -pdt_c++= ............ specify a different PDT C++ compiler. options [CC|KCC|g++|*xlC*|cxx|pgCC|FCC|guidec++|aCC|c++|ecpc| icpc|scgcc|pathCC|orCC]. -pdtcompdir= . specify a different PDT compiler directory. -pdtarchdir= . specify a different PDT architecture directory. -fortran= ..................... specify the Fortran compiler. options [gnu|sgi|ibm|ibm64|hp|cray|pgi|absoft|fujitsu|sun|compaq| open64|kai|nec|hitachi|intel|absoft|lahey|nagware|pathscale] -useropt='' ............... list of commandline parameters. -prefix= ................ Specify a target installation directory. -exec-prefix= .......... Specify a target architecture directory. -arch= ................... Specify a target architecture. options [xt3|bgl|ibm64|ibm64linux|sunx86_64 |solaris2-64|sgin32|sgi64|sgio32] -pthread .................................. Use pthread thread package. -papithread .................................. Use PAPI thread package. -charm= .............................. Use charm++ thread package. -sproc .................................. Use SGI sproc thread package. -tulipthread= .......... Specify location of Tulip/Smarts package. -smarts .................. Use SMARTS API for threads (use with above). -openmp ........................................... Use OpenMP threads. -opari=... Specify location of Opari OpenMP tool (use with above). -opari_region ......... Report performance data for all OpenMP regions. -opari_construct ... Report performance data for all OpenMP constructs. -pcl= ..... Specify location of PCL (Performance Counter Library). -papi= ............... Specify location of PAPI (Performance API). -pdt= ........ Specify location of PDT (Program Database Toolkit). -jdk= ...... Specify location of JAVA 2 Development Kit (jdk1.2+). -dyninst= ................... Specify location of DynInst Package. -vtf= ......... Specify location of VTF3 Trace Generation Package. -otf= ....... Specify location of Open Trace Format (OTF) Package. -slog2= .......... Specify location of SLOG2 SDK/Jumpshot Package. -slog2 ......... Specify use of TAU internal SLOG2 SDK/Jumpshot Package -mpi .......................... Specify use of TAU MPI wrapper library. -mpiinc= ............. Specify location of MPI include dir and use the TAU MPI Profiling and Tracing Interface. -mpilib= ............. Specify location of MPI library dir and use the TAU MPI Profiling and Tracing Interface. -mpilibrary= ................ Specify a different MPI library. e.g., -mpilibrary=-lmpi_r -shmem ...................... Specify use of TAU SHMEM wrapper library. -shmeminc= ......... Specify location of SHMEM include dir and use the TAU SHMEM Profiling and Tracing Interface. -shmemlib= ......... Specify location of SHMEM library dir and use the TAU MPI Profiling and Tracing Interface. -shmemlibrary= ............ Specify a different SHMEM library. e.g., -shmemlibrary=-lsmac -nocomm ........ Disable tracking communication events in MPI library. -epilog= ............ Specify location of EPILOG Tracing package. -epiloglib= ........... Specify full path to EPILOG lib directory. -epilogbin= ........... Specify full path to EPILOG bin directory. -epiloginc= ....... Specify full path to EPILOG include directory. -vampirtrace= .. Specify location of VampirTrace Tracing package. -pythoninc= ........ Specify location of Python include directory. -pythonlib= ............ Specify location of Python lib directory. -tag= ........ Specify a tag to identify the installation. -perfinc= ............. Specify a Perflib[LANL] include directory. -perflib= ................. Specify a Perflib[LANL] lib directory. -perflibrary= ... Specify a different perflib runtime library. -ktau ........................................... Kernel TAU Profiling. -ktau_merge ........................ Kernel TAU Profiling with merging. user-space profile. -ktauinc= ............... Specify location of Linux Kernel source. -ktausym= ...... Specify location of Linux Kernel. Symbol Table. -muse ................................. Specify the use of MAGNET/MUSE. -muse_event ............................Specify the use of MAGNET/MUSE. w/ non-monotonically increasing values. -muse_multiple ........................ Specify the use of MAGNET/MUSE. w/ monotonically increasing values. -stff= .... Location of RENCI Scalable Time-series filter library. -sddf= ...... SDDF library location; Only required for RENCI STFF. -TRACE ..................................... Generate TAU event traces. -MPITRACE ... Generate event traces for MPI events and their ancestors. -PROFILE ............ Generate profiles (summary statistics) (default). -PROFILECALLPATH ......................... Generate call path profiles. -PROFILEPARAM .... Generate profiles with parameter mapped event data . -PROFILEPHASE .......................... Generate phase based profiles. -PROFILESTATS .................. Enable standard deviation calculation. -DEPTHLIMIT ........... Disable instrumentation beyond a certain depth. -PROFILEMEMORY .. Track heap memory utilization at each function entry. -PROFILEHEADROOM .. Track memory free (or headroom) at each func entry. -MULTIPLECOUNTERS ............ Use multiple hardware counters and time. -COMPENSATE ........ Compensate for profiling measurement perturbation. -BGLTIMERS .... Use fast low-overhead timers on IBM BlueGene/L systems. -SGITIMERS .......... Use fast nanosecond timers on SGI R10000 systems. -CRAYTIMERS ............ Use fast nanosecond timers on Cray X1 systems. -LINUXTIMERS ......... Use low overhead TSC Counter for wallclock time. -CPUTIME .......... Use usertime+system time instead of wallclock time. -JAVACPUTIME ...................... Use JVMPI thread specific cpu time. -PAPIWALLCLOCK ........ Use PAPI to access wallclock time. Needs -papi. -PAPIVIRTUAL .......... Use PAPI for virtual (user) time calculation. -INTELCXXLIBICC ......... Use Intel -cxxlib-icc option for compiling. -noex .................. Use no exceptions while compiling the library. -help ...................................... display this help message. *********************************************************************** The following command-line options are available to configure: -prefix= Specifies the destination directory where the header, library and binary files are copied. By default, these are copied to subdirectories /bin and /lib in the TAU root directory. -arch= Specifies the architecture. If the user does not specify this option, configure determines the architecture. For SGI, the user can specify either of sgi32, sgin32 or sgi64 for 32, n32 or 64 bit compilation modes respectively. The files are installed in the /bin and /lib directories. IMPORTANT NOTE: For IBM architectures, we use rs6000 and ppc64 to denote the AIX Power4 and Linux Power4 32 bit compilation modes respectively. These architectures are automatically detected by TAU and 32 bit compilation is the default compilation mode. However, if you wish to specify a 64 bit compilation mode, please use -arch=ibm64 for AIX 64 bit, or -arch=ibm64linux for 64 bit Linux Power4 platform. For IBM Linux Power4, we use -c++=g++ for GNU g++ 32 bits and -c++=powerpc64-linux-g++ and -cc=powerpc64-linux-gcc for GNU g++ 64 bits. The compilers are installed in /usr/bin/g++ for 32 bits and /opt/cross/bin/powerpc64-linux-g++ for 64 bit g++ respectively. Under IBM Linux Power4, we use xlf90 as the default Fortran compiler with g++/gcc and xlC/xlc. For IBM BlueGene/L, we recommend using the -arch=bgl option. -c++= Specifies the name of the C++ compiler. Supported C++ compilers include KCC (from KAI/Intel), CC, g++ and power64-linux-g++ (from GNU), FCC (from Fujitsu), xlC(from IBM), guidec++ (from KAI/Intel), aCC (from HP), c++ (from Apple), and pgCC (from PGI). -cc= Specifies the name of the C compiler. Supported C compilers include cc, gcc and powerpc64-linux-gcc (from GNU), pgcc (from PGI), fcc (from Fujitsu), xlc (from IBM), and KCC (from KAI/Intel). -pdt_c++= Specifies a different C++ compiler for PDT (tau_instrumentor). This is typically used when the library is compiled with a C++ compiler (specified with -c++) and the tau_instrumentor is compiled with a different compiler. For e.g., -c++=pgCC -cc=pgcc -pdt_c++=KCC -openmp ... uses PGI's OpenMP compilers for TAU's library and KCC for tau_instrumentor. -fortran= Specifies the name of the Fortran90 compiler. Valid options are: gnu, sgi, ibm, ibm64, hp, cray, pgi, absoft, fujitsu, sun, compaq, nec, hitachi, kai, absoft, lahey, nagware, and intel. -tag= Specifies a tag in the name of the stub Makefile and TAU makefiles to uniquely identify the installation. This is useful when more than one MPI library may be used with different versions of compilers. e.g., % configure -c++=icpc -cc=icc -tag=intel71-vmi -mpiinc=/vmi2/mpich/include -pthread Specifies pthread as the thread package to be used. In the default mode, no thread package is used. -charm= Specifies charm++ (converse) threads as the thread package to be used. -tulipthread= Specifies Tulip threads (HPC++) as the threads package to be used as well as the location of the root directory where the package is installed. [ Ref: http://www.acl.lanl.gov/tulip ] -tulipthread= -smarts Specifies SMARTS (Shared Memory Asynchronous Runtime System) as the threads package to be used. gives the location of the SMARTS root directory. [ Ref: http://www.acl.lanl.gov/smarts ] -openmp Specifies OpenMP as the threads package to be used. [ Ref: http://www.openmp.org ] -opari= Specifies the location of the Opari OpenMP directive rewriting tool. The use of Opari source-to-source instrumentor in conjunction with TAU exposes OpenMP events for instrumentation. See examples/opari directory. [ Ref: http://www.fz-juelich.de/zam/kojak/opari/ ] Note: There are two versions of Opari: standalone - (opari-pomp-1.1.tar.gz) and the newer KOJAK - kojak-.tar.gz opari/ directory. Please upgrade to the KOJAK version (especially if you're using IBM xlf90) and specify -opari=/opari while configuring TAU. -opari_region Report performance data for only OpenMP regions and not constructs. By default, both regions and constructs are profiled with Opari. -opari_construct Report performance data for only OpenMP constructs and not regions. By default, both regions and constructs are profiled with Opari. -pdt= Specifies the location of the installed PDT (Program Database Toolkit) root directory. PDT is used to build tau_instrumentor, a C++, C and F90 instrumentation program that automatically inserts TAU annotations in the source code. If PDT is configured with a subdirectory option (-compdir=) then TAU can be configured with the same option by specifying -pdt= -pdtcompdir=. [ Ref: http://www.cs.uoregon.edu/research/pdtoolkit ] -pcl= Specifies the location of the installed PCL (Performance Counter Library) root directory. PCL provides a common interface to access hardware performance counters on modern microprocessors. The library supports Sun UltraSparc I/II, PowerPC 604e under AIX, MIPS R10000/12000 under IRIX, HP/Compaq Alpha 21164, 21264 under Tru64 Unix and Cray Unicos (T3E) and the Intel Pentium family of microprocessors under Linux. This option specifies the use of hardware performance counters for profiling (instead of time). To measure floating point instructions, set the environment variable PCL_EVENT to PCL_FP_INSTR (for example). Refer to the TAU User's Guide or PCL Documentation (pcl.h) for other event names. [ Ref : http://www.fz-juelich.de/zam/PCL ] -papi= Specifies the location of the installed PAPI (Performance API) root directory. PAPI specifies a standard application programming interface (API) for accessing hardware performance counters available on most modern microprocessors similar. To measure floating point instructions, set the environment variable PAPI_EVENT to PAPI_FP_INS (for example). Refer to the TAU User's Guide or PAPI Documentation for other event names. [ Ref : http://icl.cs.utk.edu/projects/papi/api/ ] -papithread Specifies the use of PAPI's thread layer for OpenMP/pthread instead of TAU's thread layer. This option works under Linux x86 at this time. -jdk= Specifies the location of the Java 2 development kit (jdk1.2+). See README.JAVA on instructions on using TAU with Java 2 applications. This option should only be used for configuring TAU to use JVMPI for profiling and tracing of Java applications. It should not be used for configuring paraprof, which uses java from the user's path. -dyninst= Specifies the location of the DynInst (dynamic instrumentation) package. See README.DYNINST for instructions on using TAU with DynInstAPI for binary runtime instrumentation (instead of manual instrumentation) or prior to execution by rewriting it. [ Ref: http://www.cs.umd.edu/projects/dyninstAPI/ ] -vtf= Specifies the location of the VTF3 trace generation package. TAU's binary traces can be converted to the VTF3 format using tau2vtf, a tool that links with the VTF3 library. The VTF3 format is read by Intel trace analyzer, formerly known as vampir, a commercial trace visualization tool developed by TU. Dresden, Germany. -otf= Specifies the location of the OTF trace generation package. TAU's binary traces can be converted to the Open Trace format (OTF) using tau2otf, a tool that links with the OTF library. OTF traces are hierarchical (multi-stream), compact, support online compression, and can be read concurrently by a parallel trace analysis tool such as VNG [ Ref: http://www.vampir-ng.de, http://www.paratools.com/otf]. -slog2= Specifies the location of the SLOG2 SDK trace generation package. TAU's binary traces can be converted to the SLOG2 format using tau2slog2, a tool that uses the SLOG2 SDK. The SLOG2 format is read by the Jumpshot4 trace visualization software, a freely available trace visualizer from Argonne National Laboratories. [ Ref: http://www-unix.mcs.anl.gov/perfvis/download/index.htm#slog2sdk ] -slog2 Specifies the use of the SLOG2 trace generation package and the Jumpshot trace visualizer that is bundled with TAU. Jumpshot v4 and SLOG2 v1.2.5delta are included in the TAU distribution. When the -slog2 flag is specified, tau2slog2 and jumpshot tools are copied to the // directory. It is important to have a working javac and java (preferably v1.4+) in your path. On linux systems, where /usr/bin/java may be a place holder, you'll need to modify your path accordingly. -mpiinc= Specifies the directory where mpi header files reside (such as mpi.h and mpif.h). This option also generates the TAU MPI wrapper library that instruments MPI routines using the MPI Profiling Interface. See the examples/NPB2.3/config/make.def file for its usage with Fortran and MPI programs and examples/pi/Makefile for a C++ example that uses MPI. -mpilib= Specifies the directory where mpi library files reside. This option should be used in conjunction with the -mpiinc= option to generate the TAU MPI wrapper library. -mpilibrary= Specifies the use of a different MPI library. By default, TAU uses -lmpi or -lmpich as the MPI library. This option allows the user to specify another library. e.g., -mpilibrary=-lmpi_r for specifying a thread-safe MPI library. -shmeminc= Specifies the directory where shmem.h resides. Specifies the use of the TAU SHMEM interface. -shmemlib= Specifies the directory where libsma.a resides. Specifies the use of the TAU SHMEM interface. -shmemlibrary= By default, TAU uses -lsma as the shmem/pshmem library. This option allows the user to specify a different shmem library. -nocomm Allows the user to turn off tracking of messages (synchronous/asynchronous) in TAU's MPI wrapper interposition library. Entry and exit events for MPI routines are still tracked. Affects both profiling and tracing. -perfinc= -perflib= -perflibrary= Specifies the use of the LANL Perflib packages for measurement. Perflib data is generated when environment variables perf_trace, perf_mpitrace are set. It also builds perf2tau, a tool that translates perflib data to the TAU profile format. The -perflibrary option allows you to alter the name of the perflib measurement library that is used. By default, we use -lperfrt -lpapi. -epilog= Specifies the directory where the EPILOG tracing package [FZJ] is installed. This option should be used in conjunction with the -TRACE option to generate binary EPILOG traces (instead of binary TAU traces). EPILOG traces can then be used with other tools such as EXPERT. EPILOG comes with its own implementation of the MPI wrapper library and the POMP library used with Opari. Using option overrides TAU's libraries for MPI, and OpenMP. This option assumes a lib/ bin/ directory structure. It is compatible with Scalasca [http://www.scalasca.org]. To specify a different directory for lib or bin, please use -epiloglib= -epilogbin= options. -epiloglib= Specify the full path to the Epilog library directory. This option is useful when it is difficult to infer the name of the epilog library directory from -epilog=. By default, TAU uses /lib for the location, but you may override this by specifying the full path. e.g., -epilog=/usr/local/packages/scalasca-0.5 -epiloglib=/usr/local/packages/scalasca-0.5/lib64/be -epilogbin= Specify the full path to the Epilog bin directory. This option is useful when it is difficult to infer the name of the epilog bin directory from -epilog=. By default, TAU uses /bin for the location, but you may override this by specifying the full path. e.g., -epilog=/usr/local/packages/scalasca-0.5 -epiloglib=/usr/local/packages/scalasca-0.5/bin/fe -epiloginc= Specify the full path to the Epilog include directory. This option is useful when it is difficult to infer the name of the epilog bin directory from -epilog=. By default, TAU uses /include for the location, but you may override this by specifying the full path. e.g., -epilog=/usr/local/packages/scalasca-0.5 -epiloginc=/usr/local/packages/scalasca-0.5/include/fe -vampirtrace= Specifies the directory where the VampirTrace tracing package [TUD] is installed. See [http://www.tu-dresden.de/zih/vampirtrace]. This option should be used in conjunction with the -TRACE option to generate binary OTF [TUD] traces (instead of binary TAU traces). Also see OTF [http://www.paratools.com/otf.php]. -MPITRACE Specifies the tracing option and generates event traces for MPI calls and routines that are ancestors of MPI calls in the callstack. This option is useful for generating traces that are converted to the EPILOG trace format. KOJAK's Expert automatic diagnosis tool needs traces with events that call MPI routines. Do not use this option with the -TRACE option. -pythoninc= Specifies the location of the Python include directory. This is the directory where Python.h header file is located. This option enables python bindings to be generated. The user should set the environment variable PYTHONPATH to //lib/bindings- to use a specific version of the TAU Python bindings. By importing package pytau, a user can manually instrument the source code and use the TAU API. On the other hand, by importing tau and using tau.run(''), TAU can automatically generate instrumentation. See examples/python directory for further information. -pythonlib= Specifies the location of the Python lib directory. This is the directory where *.py and *.pyc files (and config directory) are located. This option is mandatory for IBM when Python bindings are used. For other systems, this option may not be specified (but -pythoninc= needs to be specified). -PROFILE This is the default option; it specifies summary profile files to be generated at the end of execution. Profiling generates aggregate statistics (such as the total time spent in routines and statements), and can be used in conjunction with the profile browser paraprof to analyse the performance. Wallclock time is used for profiling program entities. -PROFILECALLPATH This option generates call path profiles which shows the time spent in a routine when it is called by another routine in the calling path. "a => b" stands for the time spent in routine "b" when it is invoked by routine "a". This option is an extension of -PROFILE, the default profiling option. Specifying TAU_CALLPATH_DEPTH environment variable, the user can vary the depth of the callpath. See examples/calltree for further information. -PROFILEPARAM This option generates parameter mapped profiles. When used with the MPI wrappper library (-mpi, -mpiinc=, -mpilib=) options, TAU generates profiles where the time spent in MPI routines is partitioned based on the size of the message. It can also be used in an application to partition the time spent in a given routine based on a runtime parameter, such as an argument to the routine. See examples/param for further information. -PROFILEPHASE This option generates phase based profiles. It requires special instrumentation to mark phases in an application (I/O, computation, etc.). Phases can be static or dynamic (different phases for each loop iteration, for instance). See examples/phase/README for further information. -PROFILESTATS Specifies the calculation of additional statistics, such as the standard deviation of the exclusive time/counts spent in each profiled block. This option is an extension of -PROFILE, the default profiling option. -DEPTHLIMIT Allows users to enable instrumentation at runtime based on the depth of a calling routine on a callstack. The depth is specified using the environment variable TAU_DEPTH_LIMIT. When its value is 1, instrumentation in the top-level routine such as main (in C/C++) or program (in F90) is activated. When it is 2, only routine invoked directly by main and main are recorded. When a routine appears at a depth of 2 and at 10 and we set the limit at 5, then the routine is recorded when its depth is 2, and ignored when its depth is 10 on the calling stack. This can be used with -PROFILECALLPATH to generate a tree of height from the main routine by setting TAU_CALLPATH_DEPTH and TAU_DEPTH_LIMIT variables to . -PROFILEMEMORY Specifies tracking heap memory utilitization for each instrumented function. When any function entry takes place, a sample of the heap memory used is taken. This data is stored as user-defined event data in profiles/traces. -PROFILEHEADROOM Specifies tracking memory available in the heap (as opposed to memory utilization tracking in -PROFILEMEMORY). When any function entry takes place, a sample of the memory available (headroom to grow) is taken. This data is stored as user-defined event data in profiles/traces. Please refer to the examples/headroom/README file for a full explanation of these headroom options and the C++/C/F90 API for evaluating the headroom. -COMPENSATE Specifies online compensation of performance perturbation. When this option is used, TAU computes its overhead and subtracts it from the profiles. It can be only used when profiling is chosen. This option works with MULTIPLECOUNTERS as well, but while it is relevant for removing perturbation with wallclock time, it cannot accurately account for perturbation with hardware performance counts (e.g., L1 Data cache misses). See TAU Publication [Europar04] for further information on this option. -PROFILECOUNTERS Specifies use of hardware performance counters for profiling under IRIX using the SGI R10000 perfex counter access interface. The use of this option is deprecated in favor of the -pcl= and -papi= options described above. -MULTIPLECOUNTERS Allows TAU to track more than one quantity (multiple hardware counters, CPU time, wallclock time, etc.) Configure with other options such as -papi=, -pcl=, -LINUXTIMERS, -SGITIMERS, -CRAYTIMERS, -CPUTIME, -PAPIVIRTUAL, etc. See examples/multicounters/README file for detailed instructions on setting the environment variables for this option. If -MULTIPLECOUNTERS is used with the -TRACE option, tracing employs the COUNTER1 variable for wallclock time. -SGITIMERS Specifies use of the free running nanosecond resolution on-chip timer on the MIPS R10000. This timer has a lower overhead than the default timer on SGI, and is recommended for SGIs. -CRAYTIMERS Specifies use of the free running nanosecond resolution on-chip timer on the CRAY X1 cpu (accessed by the rtc() syscall). This timer has a significantly lower overhead than the default timer on the X1, and is recommended for profiling. Since this timer is not synchronized across different cpus, this option should not be used with the -TRACE option for tracing a multi-cpu application, where a globally synchronized realtime clock is required. -LINUXTIMERS Specifies the use of the free running nanosecond resolution time stamp counter (TSC) on Pentium III+ and Itanium family of processors under Linux. This timer has a lower overhead than the default time and is recommended. -CPUTIME Uses usertime + system time instead of wallclock time. It gives the CPU time spent in the routines. This currently works only on LINUX systems for multi-threaded programs and on all systems for single-threaded programs. -PAPIWALLCLOCK Uses PAPI (must specify -papi= also) to access high resolution CPU timers for wallclock time. The default case uses gettimeofday() which has a higher overhead than this. -PAPIVIRTUAL Uses PAPI (must specify -papi= also) to access process virtual time. This represents the user time for measurements. -TRACE Generates event-trace logs, rather than summary profiles. Traces show when and where an event occurred, in terms of the location in the source code and the process that executed it. Traces can be merged, converted and time- corrected using tau_merge, tau_convert and tau_timecorrect utilities respectively, and visualized using Vampir, a commercial trace visualization tool. [ Ref http://www.vampir-ng.de, www.paratools.com/otf ] -muse Specifies the use of MAGNET/MUSE to extract low-level information from the kernel. To use this configuration, Linux kernel has to be patched with MAGNET and MUSE has to be install on the executing machine. Also, magnetd has to be running with the appropriate handlers and filters installed. User can specify package by setting the environment variable TAU_MUSE_PACKAGE. By default, it uses the "count". Please refer to README.MUSE for more information. -noex Specifies that no exceptions be used while compiling the library. This is relevant for C++. -useropt= Specifies additional user options such as -g or -I. For multiple options, the options list should be enclosed in a single quote. -help Lists all the available configure options and quits. ----------------- 1) INSTALLING TAU ----------------- i) To configure TAU for Linux clusters, first determine if your MPI depends upon some other package such MPICH over GM. If so, please locate the path to the other library. To instrument Fortran/C/C++ code using say, Intel compilers and MPI you may install PDT [Ref: http://www.cs.uoregon.edu/research/pdt] for automatic source instrumentation, and then install TAU. If your MPICH resides in /usr/local/mpich-1.2.7 and it depends upon /opt/gm, you may consider configuring TAU with: % configure -pdt= -c++=icpc -cc=icc -fortran=intel -mpiinc=/usr/local/mpich-1.2.7/include -mpilib=/usr/local/mpich-1.2.7/lib -mpilibrary='-lmpich -L/opt/gm/lib -lgm -lpthread -ldl' % make clean install For Infiniband, for instance, you may want to use -mpilibrary as below: % configure -pdt= -c++=pathCC -cc=pathcc -fortran=pathscale -mpiinc=/usr/common/usg/mvapich/pathscale/mvapich-0.9.5-mlx1.0.3/include -mpilib=/usr/common/usg/mvapich/pathscale/mvapich-0.9.5-mlx1.0.3/lib -mpilibrary='-lmpich -L/usr/local/ibgd/driver/infinihost/lib64 -lvapi' To identify the dependencies of mpich, see mpif90 -v and identify the libraries utilized to link in the application. ii) To configure TAU with PAPI, we strongly recommend using the -MULTIPLECOUNTERS option. % configure -papi= -MULTIPLECOUNTERS -c++=icpc -cc=icc -fortran=intel -mpiinc= -mpilib= % make clean install and set COUNTER[1-25] environment variables while running the instrumented code. iii) To configure TAU under AIX, we strongly recommend using the -mpi option rather than manually specifying the mpi include and library directories. % configure -pdt= -mpi ; make clean install for rs6000 or 32 bits, and % configure -pdt= -arch=ibm64 -mpi ; make clean install for 64 bits. iv) To configure TAU for Cray XT3 or IBM BGL, First configure PDT using % configure -XLC -exec-prefix=bgl; make clean install on BGL. On XT3 you will need to configure PDT using: % configure -GNU -exec-prefix=xt3; make clean install Then, configure TAU using: % configure -arch=bgl -mpi -pdt= -pdt_c++=xlC configures TAU with MPI and PDT on BGL. Use -arch=xt3 -pdt_c++=g++ on Cray XT3. Then configure for the frontend using % ./configure This creates a backend library directory /[bgl,xt3]/lib and a front-end directory /[rs6000,x86_64]/bin which should be put in your PATH. v) To configure TAU for SGI Altix system, you may use % ./configure -c++=icpc -cc=icc -fortran=intel -mpi ... Use TAU with Intel C++ compiler and use the MPI library in /usr/include and /usr/lib. vi) To configure TAU with VampirTrace using Intel Fortran compilers under Linux, please configure VampirTrace with support for PAPI and fmpi-lib as follows: % setenv CC icc; setenv CXX icpc; setenv F90 ifort; setenv FC ifort % cd VampirTrace-; % ./configure --with-papi-dir=/usr/local/packages/papi-3.5.0 --enable-omp --enable-mpi --enable-fmpi-lib --prefix=/usr/local/packages/vampirtrace-5.2.5-mpich2 % make clean; make ; make install Then, you may configure TAU using: % cd tau-2.; ./configure -papi=/usr/local/packages/papi-3.5.0 -vampirtrace=/usr/local/packages/vampirtrace-5.2.5-mpich2 -cc=icc -c++=icpc -fortran=intel -pdt=/usr/local/packages/pdtoolkit-3.9 -mpiinc=/usr/local/packages/mpich2-1.0.4p1/intel-9.1/include -mpilib=/usr/local/packages/mpich2-1.0.4p1/intel-9.1/lib % make clean install vi) % ./configure -TRACE -PROFILE Enable both profiling and tracing. *********************************************************************** To install *multiple* (typical) configurations of TAU at a site, you may use the script 'installtau' or 'tau_setup'. Installtau takes options similar to those described above. It invokes ./configure ; make clean install; to create multiple libraries that may be requested by the users at a site. % installtau -help TAU Configuration Utility *********************************************************************** Usage: installtau [OPTIONS] where [OPTIONS] are: -arch= -fortran= -cc= -c++= -useropt= -pdt= -pdtcompdir= -pdt_c++= -papi= -vtf= -slog2= (for external slog2 dir) -slog2 (for using slog2 bundled with TAU) -dyninst= -mpiinc= -mpilib= -mpilibrary= -perfinc= -perflib= -perflibrary= -mpi -tag= -nocomm -opari= -epilog= -prefix= -exec-prefix= *********************************************************************** 2. Compilation. Type `make clean install' to compile the package. Make installs the library and its stub makefile in //lib subdirectory and installs utilities such as pprof and paraprof in //bin subdirectory. Add to your .cshrc file the $(TAU_ARCH)/bin subdirectory. e.g., # in .cshrc file set path=($path /usr/local/packages/tau/x86_64/bin) See the examples included with this distribution in the examples/ directory. The README file in examples directory describes the examples. 3. Instrumentation. TAU provides compilation scripts tau_f90.sh, tau_cc.sh and tau_cxx.sh. You may use these scripts to automatically instrument your application if you have specified the use of -pdt= while configuring TAU. PDT provides source code analysis for TAU to automatically insert TAU calls in a copy of the application source code. These scripts also link in the TAU libraries. To use this approach, simply set the TAU_MAKEFILE environment variable to point to the TAU stub makefile that is created in the /lib directory corresponding to the measurement option chosen. For instance, On AIX, when you configure TAU with: % configure -pdt= -mpi -arch=ibm64; make clean install % setenv TAU_MAKEFILE /ibm64/lib/Makefile.tau-mpi-pdt % tau_f90.sh -c app.f90 ; tau_f90.sh app.o -o app % tau_cxx.sh foo.cpp -o foo These scripts act similar to the MPI scripts (mpif90, mpxlf90_r, etc.) that internally invoke the compiler that TAU was configured with. Instrumentation can be controlled by passing options to the TAU compiler. See: tau_compiler.sh -help for a complete listing of options and see section 8 below. JAVA requires no special instrumentation. To use TAU with JAVA, the LD_LIBRARY_PATH environment variable must have the TAU /lib directory in its path. See README.JAVA on instructions regarding its usage. % cd examples/taucompiler/f90; make % mpirun -np 4 ./ring % pprof % paraprof To use tau_instrumentor, the C++ source code instrumentor: a. Install pdtoolkit. [ Ref: http://www.cs.uoregon.edu/research/pdt ] % ./configure -arch=ibm64 -XLC % ./configure -XLC -exec-prefix=bgl % ./configure -GNU -exec-prefix=xt3 % ./configure -ICPC are commonly used values for AIX 64 bits, IBM BGL, Cray XT3 and Intel/AMD Linux clusters. b. Install TAU using the -pdt configuration option. % ./configure -pdt=/usr/local/packages/pdtoolkit-3.9 -c++=icpc -cc=icc ... c. Modify the makefile to invoke tau_cxx.sh as the compiler. It generates a program database file (.pdb) that contains program entities (such as routine locations) and tau_instrumentor that uses the .pdb file and the C++ source code to generate an instrumented version of the source code. See examples/taututorial/Makefile. d. tau_reduce is a utility that can determine which routines should not be instrumented. Instrumentation in frequently called light-weight routines may introduce undue perturbation and distort the performance data. tau_reduce examines the profile output and a set of rules for de-instrumentation and produces a selective instrumentation file that can be fed to tau_instrumentor or tau_run and specifies which routines should not be instrumented. To see an example of this utility, see examples/reduce (examples/README file has a description). Also, utils/TAU_REDUCE.README file contains information about tau_reduce and the format for specifying the rules for removing instrumentation. % cd examples/reduce % make IMPORTANT NOTE: *************** You may also set TAU_THROTTLE, an environment variable to turn on throttling of events. The default rule used is if a function is called over 100000 times and it takes less than 10 microseconds per call of inclusive time, it is disabled at runtime, when TAU_THROTTLE is set. You may set environment variables TAU_THROTTLE_NUMCALLS and TAU_THROTTLE_PERCALL to change the default values of 100000 and 10 respectively. See the TAU wiki on the TAU webpage for more details. To illustrate the use of TAU Fortran 90 instrumentation API, we have included the NAS Parallel Benchmarks 2.3 LU and SP suites in the examples/NPB2.3 directory [Ref http://www.nas.nasa.gov/NAS/NPB/ ]. See the config/make.def makefile that shows how TAU can be used with MPI (with the TAU MPI Wrapper library) and Fortran 90. To use this, TAU must be configured using the -mpiinc= and -mpilib= options. The default Fortran 90 compiler used is f90. This may be changed by the user in the makefile. LU is completely instrumented and uses the instrumented MPI library whereas SP has minimal instrumentation in the top level routine and relies on the instrumented MPI wrapper library. 4. Paraprof. Paraprof is the GUI for TAU performance analysis. It requires Java 1.4+. An earlier version of the profile browser, racy, was implemented using Tcl/Tk. It is also available in this distribution but support for racy will be gradually phased out. Users are encouraged to use paraprof instead. Paraprof does *not* require -jdk= option to be specified (which is used for configuring TAU for analyzing Java applications). The 'java' jvm program should be in the user's path. NOTE: If paraprof does not work properly, please rebuild Paraprof.jar file by % cd tau-xxx/tools/src/paraprof % make clean; make Before you do this, please ensure that javac (1.4+) is in your path. IMPORTANT NOTE: *************** If you see an error that looks like: May 18, 2005 2:27:19 PM java.util.prefs.FileSystemPreferences checkLockFile0ErrorCode WARNING: Could not lock User prefs. Unix error code 52. please make sure that you've used ssh -Y to login to your remote node. If you see windows that don't look right (in size), this may be the cause of the problem as well. You need a trusted ssh connection for Java's Swing. 5. Performance Database: PerfDMF and PerfExplorer Performance Data Management Framework (PerfDMF) is a tool related to the TAU framework. The PerfDMF database is designed to store and provide access to TAU profile data. A number of utility programs have been written in Java to load the data into PerfDMF and to query the data. With PerfDMF, users can perform performance analyses such as regression analysis, scalability analysis across multiple trials, and so on. An unlimited number of comparative analyses are available through the PerfDMF toolkit. Work is being done to provide the user with standard analysis tools, and an API has been developed to access the data with standard Java classes. For further information, please refer to tools/src/perfdmf/README file for installation and usage instructions. PerfExplorer is a framework for parallel performance data mining and knowledge discovery. The framework architecture enables the development and integration of data mining operations that will be applied to large-scale parallel performance profiles. For further information, please refer to tools/src/perfexplorer/doc/README file for installation and usage instructions. 6. Eclipse Integration: TAU JDT & CDT Plugins for Eclipse The TAU plugins for Eclipse allow TAU instrumentation and execution of Java, C/C++ and Fortran programs within the Eclipse IDE. To install the plugin for java copy the plugins folder in tools/src/taujava to your Eclipse main directory. To install the plugin for C/C++ and Fortran the Eclipse CDT [http://www.eclipse.org/cdt/] or FDT [http://www.eclipse.org/ptp/] plugins should be installed as well. Copy the plugins folder in tools/src/taucdt to your Eclipse main directory. The respective plugins folders contain README files with more information. 7. TAU System Requirements : ------------------------- I) The Profiling Library needs a recent C++ compiler. Our recommended list: a) GNU (http://www.gnu.org) g++ compiler b) Intel (http://www.intel.com) Intel compilers. c) IBM (http://www.ibm.com) xlC C++ compiler for IBM SP d) PGI (http://www.pgroup.com) pgCC compiler for Linux e) SGI (http://www.sgi.com) MipsPro IRIX CC compiler f) SUN (http://www.sun.com) Sun CC compiler g) HP (http://www.hp.com) Tru64 cxx compiler h) HP (http://www.hp.com) aCC compiler II) Platforms : TAU has been tested on a) IBM AIX, Linux, BGL systems b) Cray XT3, XD1, X1E, SV1, T3E systems c) LINUX x86 PC clusters with i) KAI KCC compiler, ii) GNU g++/egcs compiler, iii) PGI pgCC, pgcc, pgf90 compiler suite, iv) Fujitsu C++/f90 compiler suite, v) KAI KAP/Pro compiler suite. vi) Intel C++/C/F90 compiler suite. vii) NAGWare F90 compilers. viii) Leahy F90 compilers. ix) Absoft F90 compilers. d) Sun Solaris2 with g++, KCC. e) Microsoft Windows. Tested with MS Visual C++ v6.0. f) Apple OS X ppc64, x86 with GNU, Absoft, IBM xlC, and xlf compilers. g) HP PA-RISC systems running HP-UX with g++, and aCC. h) HP Tru64 Alpha with g++, cxx. i) HP Alpha Linux clusters with g++. j) EM64T, x86_64, IA-64 Linux with g++, PGI, Intel C++/C/F90 compilers. k) Hitachi SR8000 with KCC, g++, Hitachi cc and f90 compilers. l) NEC SX-5 system with NEC c++, cc, and f90 compilers. m) Sun Opteron Solaris with Sun CC compilers. TAU may work with minor modifications on other platforms. III) Software Requirements : a) java paraprof requires Java 1.4+. Java can be downloaded from http://www.sun.com b) Tcl/Tk TAU's GUI racy needs Tcl 6.4/Tk 4.0 or better. The default is 8.0. Tcl/Tk can be downloaded from http://www.scriptics.com. NOTE: Tcl/Tk is only required for running the profile browser racy. The current version of TAU supports the new Java based paraprof profile browser that replaces the Tcl/Tk based racy. 8. Modifying user's Makefile for Tracing/Profiling. TAU provides a makefile stub file which is placed in the installation directory //lib/Makefile.tau[-optionlist]. [NEW] To ease the process of instrumentation of source code, users can use the $(TAU_COMPILER) makefile variable to parse, instrument, compile and link the applications. This option should be used with PDT. See examples/taucompiler and tools/doc/tau_compiler.txt files for options. /bin/tau_compiler.sh can be used without TAU's stub Makefiles as well. You may also use tau_f90.sh, tau_cxx.sh and tau_cc.sh as names of your compiler and set the TAU_MAKEFILE and TAU_OPTIONS environment variables to point to the TAU stub makefiles and options to tau_compiler.sh. See tau_compiler.sh -help to see a full list of options. For e.g., % setenv TAU_MAKEFILE //lib/Makefile.tau-mpi-pdt % setenv TAU_OPTIONS '-optTauSelectFile=select.tau -optVerbose' % tau_f90.sh -c foo.f90 % tau_f90.sh foo.o -o foo 9. Examples of configuration and usage on the IBM SP % cd tau-2.x Example I: Profiling a Multithreaded C++ program (compiled with xlC) % configure -pthread % make clean; make install % set path=($path /rs6000/bin) % cd examples/threads % make; % hello It has two threads: the profiling data should show functions executing on each thread % pprof This is the text based profile browser. % paraprof Example II: Profiling an MPI program using the TAU MPI wrapper library. % configure -mpi % make clean; make install % cd examples/pi % make % poe cpi -procs 4 -rmpool 2 % pprof or paraprof Note: Using the MPI Profiling Interface TAU can generate profile data for all MPI routines as well. Example III: Profiling an application written in C++ (compiled with icpc) using automatic source code instrumentation and using CPU time instead of (the default) wallclock time. Download PDT (Program Database Toolkit) from http://www.cs.uoregon.edu/research/pdtoolkit ] % cd pdtoolkit- % configure -XLC -prefix=/usr/local/pdt % make clean install Next configure TAU to use PDT for automatic source code instrumentation. % cd tau-2.x % configure -c++=icpc -cc=icc -pdt= -CPUTIME e.g., ... -pdt=/usr/local/pdt ... % make clean; make install % cd examples/taucompiler/c++ % make This takes klargest.cpp, an uninstrumented file, parses it (PDT), and invokes tau_instrumentor, which takes the PDT output and generates an instrumented C++ file, which when linked with the TAU library, generates performance date when executed. % klargest % pprof % paraprof Example IV: Tracing an MPI program (compiled with xlC) and displaying the traces in Vampir or VNG using Open Trace Format (OTF). % configure -c++=xlC -cc=xlc -fortran=ibm -mpi -otf=/usr/local/otf-1.2.6 -TRACE % make clean; make install % cd examples/taucompiler/f90 % make % poe ./ring -procs 128 % tau_treemerge.pl % tau2otf tau.trc tau.edf app.otf -z -n 8 creates a compressed OTF trace (-z) with 8 parallel streams (-n 8). The main OTF file is called app.otf. % vampir app.otf In the Menu, choose Preferences -> Color Styles -> Activities and choose a distinct color for each activity. Example V: Profiling an OpenMP F90 program using IBM % configure -c++=xlC -cc=xlc -fortran=ibm -mpi -opari= -pdt= -opari= % cd examples/taucompiler/opari_f90 % make % setenv OMP_NUM_THREADS 2 % mandel % pprof If you have any questions, please contact us at tau-bugs@cs.uoregon.edu. tau-2.16.4/LICENSE000066400000000000000000000036331062343042700134100ustar00rootroot00000000000000***************************************************************************** ** Tuning and Analysis Utilities ** ** http://www.cs.uoregon.edu/research/paracomp/tau ** ***************************************************************************** ** Copyright 1997-2004 ** ** Department of Computer and Information Science, University of Oregon ** ** Research Center Juelich, ZAM Germany ** ** Advanced Computing Laboratory, Los Alamos National Laboratory ** ***************************************************************************** ** ** Permission to use, copy, modify, and distribute this software and its ** documentation for any purpose and without fee is hereby granted, ** provided that the above copyright notice appear in all copies and that ** both that copyright notice and this permission notice appear in ** supporting documentation, and that the name of University of Oregon (UO) ** Research Center Juelich, (ZAM) and Los Alamos National Laboratory (LANL) ** not be used in advertising or publicity pertaining to distribution of ** the software without specific, written prior permission. The ** University of Oregon, ZAM and LANL make no representations about the ** suitability of this software for any purpose. It is provided "as is" ** without express or implied warranty. ** ** UO, ZAM AND LANL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, ** INCLUDING , AND ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, ** IN NO EVENT SHALL THE UNIVERSITY OF OREGON, ZAM OR LANL BE LIABLE FOR ** ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER ** RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF ** CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN ** CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** tau-2.16.4/Makefile000066400000000000000000000123721062343042700140430ustar00rootroot00000000000000#**************************************************************************** #* TAU Portable Profiling Package ** #* http://www.cs.uoregon.edu/research/tau ** #**************************************************************************** #* Copyright 1997-2000 ** #* Department of Computer and Information Science, University of Oregon ** #* Advanced Computing Laboratory, Los Alamos National Laboratory ** #* Research Center Juelich, ZAM Germany ** #**************************************************************************** ####################################################################### ## TAU (C) 1996 ## ## based on TAU/pC++/Sage++ Copyright (C) 1993,1995 ## ## Indiana University University of Oregon University of Rennes ## ####################################################################### ########### Automatically modified by the configure script ############ CONFIG_ARCH=default CONFIG_CC=gcc CONFIG_CXX=g++ PCXX_OPT=-g USER_OPT=-g TAUROOT= ####################################################################### include include/Makefile #INTELCXXLIBICC#INTELOPTS = -cxxlib-icc #ENDIF# ############# Standard Defines ############## CC = $(CONFIG_CC) $(ABI) $(ISA) CXX = $(CONFIG_CXX) $(ABI) $(ISA) $(INTELOPTS) TAU_INSTALL = /bin/cp TAU_SHELL = /bin/sh LSX = .a ############################################# #PDT#PDTEXAMPLE = examples/autoinstrument examples/reduce #ENDIF# #MPI#MPIEXAMPLES = examples/pi examples/NPB2.3 #ENDIF# # Pete Beckman (3/16/95) # This makefile recursively calls MAKE in each subdirectory #PTX#CC=cc#ENDIF# LINKER = $(CC) # tools EVERYONE needs #BASIC = utils src/Profile examples/instrument BASIC = utils src/Profile # library and tools EXPORTS = utils src/Profile # Example Programs EXAMPLES = examples/instrument examples/threads \ examples/cthreads examples/fortran examples/f90 $(MPIEXAMPLES) $(PDTEXAMPLE) # PC++ Support #PCXX#PCXX=lang_support/pc++#ENDIF# # HPC++ Support #HPCXX#HPCXX=lang_support/hpc++#ENDIF# # AnsiC Support #ANSIC#ANSIC=lang_support/ansic#ENDIF# # Trace Reader Library #TRACE#TRACEINPUT=src/TraceInput#ENDIF# #PERFLIB#BASIC=utils #ENDIF# #VTF#VTFCONVERTER=utils/vtfconverter#ENDIF# #SLOG2#SLOGCONVERTER=utils/slogconverter/src#ENDIF# #TAU2EPILOG#ELGCONVERTER=utils/elgconverter #ENDIF# # Subdirectories to make resursively SUBDIR = $(TRACEINPUT) $(BASIC) $(PCXX) $(HPCXX) $(ANSIC) $(VTFCONVERTER) $(SLOGCONVERTER) $(ELGCONVERTER) all: @echo "At the installation root, use \"make install\" " exports : @echo "Determining Configuration..." @if [ x`utils/ConfigQuery -arch` = xdefault ] ; then \ (echo Run the configure script before attempting to compile ; \ exit 1) ; \ else echo System previously configured as a `utils/ConfigQuery -arch` ; fi @echo "*********** RECURSIVELY MAKING SUBDIRECTORIES ***********" @for i in ${EXPORTS}; do (echo "*** COMPILING $$i DIRECTORY"; cd $$i;\ $(MAKE) "MAKE=$(MAKE)" "CC=$(CC)" "CXX=$(CXX)" "LINKER=$(LINKER)" ); done @echo "***************** DONE ************************" tests: @echo "Determining Configuration..." @if [ x`utils/ConfigQuery -arch` = xdefault ] ; then \ (echo Run the configure script before attempting to compile ; \ exit 1) ; \ else echo System previously configured as a `utils/ConfigQuery -arch` ; fi @echo "*********** RECURSIVELY MAKING SUBDIRECTORIES ***********" @for i in ${EXAMPLES}; do (echo "*** COMPILING $$i DIRECTORY"; cd $$i;\ $(MAKE) "MAKE=$(MAKE)" "CC=$(CC)" "CXX=$(CXX)" "LINKER=$(LINKER)" ) || exit $?; done @echo "***************** DONE ************************" install: .clean @echo "Determining Configuration..." @if [ x`utils/ConfigQuery -arch` = xdefault ] ; then \ (echo Run the configure script before attempting to compile ; \ exit 1) ; \ else echo System previously configured as a `utils/ConfigQuery -arch` ; fi @echo "*********** RECURSIVELY MAKING SUBDIRECTORIES ***********" @for i in ${SUBDIR}; do (echo "*** COMPILING $$i DIRECTORY"; cd $$i;\ $(MAKE) "MAKE=$(MAKE)" "CC=$(CC)" "CXX=$(CXX)" "LINKER=$(LINKER)" HOSTTYPE=$(HOSTTYPE) install) || exit $?; done @echo "***************** DONE ************************" .clean: @for i in ${SUBDIR} ${EXAMPLES} ; do (cd $$i; $(MAKE) "MAKE=$(MAKE)" clean); done touch .clean clean: @for i in ${SUBDIR} ${EXAMPLES} ; do (cd $$i; $(MAKE) "MAKE=$(MAKE)" clean); done cleandist: clean cleangood cleaninstall: clean cleangood cleangood: /bin/rm -f make.log @echo "Deleting *~ .#* core *.a *.sl *.o *.dep" @find . \( -name \*~ -o -name .\#\* -o -name core \) \ -exec /bin/rm {} \; -print @find . \( -name \*.a -o -name \*.sl -o -name \*.o -o -name \*.dep \) \ -exec /bin/rm {} \; -print @if [ ! -d bin/$(CONFIG_ARCH) ] ; then true; \ else /bin/rm -r bin/$(CONFIG_ARCH) ; fi @if [ ! -d lib/$(CONFIG_ARCH) ] ; then true; \ else /bin/rm -r lib/$(CONFIG_ARCH) ; fi @grep "^#" ./build/Config.info > ./build/Config.info~~0; \ /bin/mv ./build/Config.info~~0 ./build/Config.info .RECURSIVE: ${SUBDIR} ${SUBDIR}: FRC cd $@; $(MAKE) "MAKE=$(MAKE)" "CC=$(CC)" "CXX=$(CXX)" "LINKER=$(LINKER)" all FRC: tau-2.16.4/Makefile.win32000066400000000000000000000153151062343042700150040ustar00rootroot00000000000000# To use, do "nmake /f makefile.win32" # To build tau_instrumentor you must have PDT # use "nmake /f makefile.win32 "PDT=" tau_instrumentor # (e.g. nmake /f makefile.win32 "PDT=c:\pdtoolkit" tau_instrumentor # To build tau2vtf you must have libvtf3.lib # use "nmake /f makefile.win32 "VTF= tau2vtf # (e.g. nmake /f makefile.win32 "VTF=c:\" tau2vtf) # To build the slog2 trace input dll # use "nmake /f makefile.win32 "JDK=" "SLOG2=" tau2slog2 # (e.g. nmake /f makefile.win32 "JDK=c:\\j2sdk1.4.2_05" "SLOG2=c:\slog2sdk-1.2.5beta" tau2slog2 # To build dll's for use with java # use "nmake /f makefile.win32 "JDK= java # (e.g. nmake /f makefile.win32 "JDK=c:\j2sdk1.4.2_05" java) CFLAGS= $(CFLAGS) /O2 /Gd /nologo /TP /EHsc -I . CC=cl INCLUDES=-Iinclude -I../include DEFINES=-DTAU_WINDOWS -DTAU_DOT_H_LESS_HEADERS CFLAGS=$(CFLAGS) $(DEFINES) $(INCLUDES) LD=link LDFLAGS= O=.obj TAU_PROFILE_SRCS= src\profile\FunctionInfo.cpp src\profile\Profiler.cpp src\profile\RtsLayer.cpp src\profile\RtsThread.cpp src\profile\TauCAPI.cpp src\profile\TauFAPI.cpp src\profile\TauHandler.cpp src\profile\TauHooks.cpp src\profile\TauMapping.cpp src\profile\TauMemory.cpp src\profile\UserEvent.cpp src\profile\WindowsThreadLayer.cpp src\profile\MetaData.cpp TAU_CALLPATH_SRCS= src\profile\TauCallPath.cpp src\profile\FunctionInfo.cpp src\profile\Profiler.cpp src\profile\RtsLayer.cpp src\profile\RtsThread.cpp src\profile\TauCAPI.cpp src\profile\TauFAPI.cpp src\profile\TauHandler.cpp src\profile\TauHooks.cpp src\profile\TauMapping.cpp src\profile\TauMemory.cpp src\profile\UserEvent.cpp src\profile\WindowsThreadLayer.cpp TAU_TRACE_SRCS= src\profile\FunctionInfo.cpp src\profile\Profiler.cpp src\profile\RtsLayer.cpp src\profile\RtsThread.cpp src\profile\TauCAPI.cpp src\profile\TauFAPI.cpp src\profile\TauHandler.cpp src\profile\TauHooks.cpp src\profile\TauMapping.cpp src\profile\TauMemory.cpp src\profile\Tracer.cpp src\profile\UserEvent.cpp src\profile\WindowsThreadLayer.cpp TAU_JAVA_SRC= src\profile\JavaThreadLayer.cpp src\profile\TauJava.cpp src\profile\TauJAPI.cpp TAU_PROFILE_OBJS= $(TAU_PROFILE_SRCS:.cpp=.obj) TAU_CALLPATH_OBJS= $(TAU_CALLPATH_SRCS:.cpp=.obj) TAU_TRACE_OBJS= $(TAU_TRACE_SRCS:.cpp=.obj) TAU_JAVA_OBJS= $(TAU_JAVA_SRC:.cpp=.obj) all : win32 pprof tau_convert tau_merge tau_reduce libs java : -md win32\java -del $(TAU_PROFILE_OBJS) $(TAU_JAVA_OBJS) nmake /f Makefile.win32 "FLAGS = -DPROFILING_ON -DJAVA /MT -I$(JDK)/include -I$(JDK)/include/win32" tau-profile.dll -del $(TAU_CALLPATH_OBJS) $(TAU_JAVA_OBJS) nmake /f Makefile.win32 "FLAGS = -DPROFILING_ON -DTAU_CALLPATH -DJAVA /MT -I$(JDK)/include -I$(JDK)/include/win32" tau-callpath.dll -del $(TAU_TRACE_OBJS) $(TAU_JAVA_OBJS) nmake /f Makefile.win32 "FLAGS = -DTRACING_ON -DJAVA /MT -I$(JDK)/include -I$(JDK)/include/win32" tau-trace.dll -del win32\java\*.lib win32\java\*.exp tau-profile.dll : $(TAU_PROFILE_OBJS) $(TAU_JAVA_OBJS) link /dll /OUT:"win32\java\tau-profile.dll" $(TAU_PROFILE_OBJS) $(TAU_JAVA_OBJS) $(JDK)/lib/jvm.lib tau-callpath.dll : $(TAU_CALLPATH_OBJS) $(TAU_JAVA_OBJS) link /dll /OUT:"win32\java\tau-callpath.dll" $(TAU_CALLPATH_OBJS) $(TAU_JAVA_OBJS) $(JDK)/lib/jvm.lib tau-trace.dll : $(TAU_TRACE_OBJS) $(TAU_JAVA_OBJS) link /dll /OUT:"win32\java\tau-trace.dll" $(TAU_TRACE_OBJS) $(TAU_JAVA_OBJS) $(JDK)/lib/jvm.lib libs : -del $(TAU_PROFILE_OBJS) nmake /f Makefile.win32 "FLAGS = -DPROFILING_ON" tau-profile.lib -del $(TAU_PROFILE_OBJS) nmake /f Makefile.win32 "FLAGS = -DPROFILING_ON /MD" tau-profile-mt.lib -del $(TAU_CALLPATH_OBJS) nmake /f Makefile.win32 "FLAGS = -DPROFILING_ON -DTAU_CALLPATH" tau-callpath.lib -del $(TAU_CALLPATH_OBJS) nmake /f Makefile.win32 "FLAGS = -DPROFILING_ON -DTAU_CALLPATH /MD" tau-callpath-mt.lib -del $(TAU_TRACE_OBJS) nmake /f Makefile.win32 "FLAGS = -DTRACING_ON" tau-trace.lib -del $(TAU_TRACE_OBJS) nmake /f Makefile.win32 "FLAGS = -DTRACING_ON /MD" tau-trace-mt.lib tau2vtf : $(CC) $(CFLAGS) -DTRACING_ON -o win32\bin\tau2vtf utils\tau2vtf.cpp src\TraceInput\TAU_tf.cpp src\TraceInput\TAU_tf_writer.cpp src\TraceInput\TAU_Cwrapper.cpp -Isrc\TraceInput -I$(VTF)/include /link $(VTF)\win32\lib\libvtf3.lib tau2slog2 : $(CC) -c /O2 /Gd /nologo /TC /EHsc -Iinclude -DTRACING_ON utils\slogconverter\src\trace_tau.c -Iutils\slogconverter\ -I$(SLOG2)\src\logformat\trace $(CC) -c /O2 /Gd /nologo /TC /EHsc -DTRACING_ON $(SLOG2)\src\logformat\trace\logformat_trace_InputLog.c -Iutils\slogconverter\ -I$(JDK)\include -I$(JDK)\include\win32 $(CC) -c $(CFLAGS) -DTRACING_ON src\TraceInput\TAU_tf.cpp src\TraceInput\TAU_tf_writer.cpp -I../../include -Isrc\TraceInput $(CC) -c $(CFLAGS) -DTRACING_ON src\TraceInput\TAU_Cwrapper.cpp -I../../include -Isrc\TraceInput link /dll /OUT:"win32\bin\TraceInput.dll" trace_tau.obj logformat_trace_InputLog.obj TAU_tf.obj TAU_Cwrapper.obj TAU_tf_writer.obj tau_instrumentor : $(CC) $(CFLAGS) -o win32\bin\tau_instrumentor utils\tau_instrumentor.cpp utils\tau_instrument.cpp utils\tau_selective.cpp -I$(PDT)\ductape\inc /link $(PDT)\windows\lib\ductape.lib win32 : md win32 md win32\bin md win32\lib pprof : utils\function_data.cpp utils\pprof.cpp utils\user_event_data.cpp $(CC) $(CFLAGS) -o win32\bin\pprof utils\function_data.cpp utils\pprof.cpp utils\user_event_data.cpp tau_convert : utils\tau_convert.c $(CC) $(CFLAGS) -o win32\bin\tau_convert utils\tau_convert.c tau_merge : utils\tau_events.cpp utils\tau_merge.c utils\getopt.cpp $(CC) $(CFLAGS) -o win32\bin\tau_merge utils\tau_events.cpp utils\tau_merge.c utils\getopt.cpp tau_reduce : utils\tau_reduce.cpp utils\pprof_elem.cpp $(CC) $(CFLAGS) -o win32\bin\tau_reduce utils\tau_reduce.cpp utils\pprof_elem.cpp tau-profile.lib : $(TAU_PROFILE_OBJS) lib /OUT:"win32\lib\tau-profile-static.lib" $(TAU_PROFILE_OBJS) tau-profile-mt.lib : $(TAU_PROFILE_OBJS) lib /OUT:"win32\lib\tau-profile-static-mt.lib" $(TAU_PROFILE_OBJS) link /dll /def:utils\win32exports.def /OUT:win32\lib\tau-profile.dll $(TAU_PROFILE_OBJS) tau-callpath.lib : $(TAU_CALLPATH_OBJS) lib /OUT:"win32\lib\tau-callpath-static.lib" $(TAU_CALLPATH_OBJS) tau-callpath-mt.lib : $(TAU_CALLPATH_OBJS) lib /OUT:"win32\lib\tau-callpath-static-mt.lib" $(TAU_CALLPATH_OBJS) link /dll /def:utils\win32exports.def /OUT:win32\lib\tau-callpath.dll $(TAU_CALLPATH_OBJS) tau-trace.lib : $(TAU_TRACE_OBJS) lib /OUT:"win32\lib\tau-trace-static.lib" $(TAU_TRACE_OBJS) tau-trace-mt.lib : $(TAU_TRACE_OBJS) lib /OUT:"win32\lib\tau-trace-static-mt.lib" $(TAU_TRACE_OBJS) link /dll /def:utils\win32exports.def /OUT:win32\lib\tau-trace.dll $(TAU_TRACE_OBJS) .cpp.obj : $(CC) $(FLAGS) $(CFLAGS) /Fo$@ -c $< tau-2.16.4/README000066400000000000000000000075331062343042700132660ustar00rootroot00000000000000***************************************************************************** ** TAU Portable Profiling Package ** ** http://www.cs.uoregon.edu/research/paracomp/tau ** ***************************************************************************** ** Copyright 1997-2007 ** ** Department of Computer and Information Science, University of Oregon ** ** Advanced Computing Laboratory, Los Alamos National Laboratory ** ** Research Center Juelich, ZAM Germany ** ***************************************************************************** /* NOTE: PLEASE REFER TO tools/src/contrib/LICENSE* files for open * * source licenses of other packages that TAU uses internally. * *******************************************************************/ *************************************************************************** Instructions on installing TAU can be found in the INSTALL file. JAVA users should see README.JAVA *************************************************************************** Tuning and Analysis Utilities: TAU ********************************** TAU is a program and performance analysis tool framework being developed for the DOE and ASC program at University of Oregon. TAU provides a suite of static and dynamic tools that provide graphical user interaction and interoperation to form an integrated analysis environment for parallel Fortran 95, C and C++ applications. In particular, a robust performance profiling facility availble in TAU has been applied extensively in the ACTS toolkit. Also, recent advancements in TAU's code analysis capabilities have allowed new static tools to be developed, such as an automatic instrumentation tool. These two features of the TAU framework are described below. TAU Portable Profiling Package ****************************** The model that TAU uses to profile parallel, multi-threaded C++, C, Fortran 90, Python and Java programs maintains performance data for each thread, context, and node in use by an application. The profiling instrumentation needed to implement the model captures data for functions, methods, basic blocks, and statement execution at these levels. The instrumentation is complicated, however, by advanced features in the C++ language, such as templates and namespaces. All C++ language features are supported in the TAU profiling instrumentation, which is available through an API at the library or application level. The API also provides selection of profiling groups for organizing and controlling instrumentation. ACTS software layers have been instrumented and support for thread profiling has been recently added. From the profile data collected, TAU's profile analysis procedures can generate a wealth of performance information for the user. It can show the exclusive and inclusive time spent in each function with nanosecond resolution. For templated entities, it shows the breakup of time spent for each instantiation. Other data includes how many times each function was called, how many profiled functions did each function invoke, and what the mean inclusive time per call was. Time information can also be displayed relative to nodes, contexts, and threads. Instead of time, hardware performance data can be shown. Also, user-level profiling is possible. TAU's profile visualization tool, paraprof, provides graphical displays of all the performance analysis results, in aggregate and per node/context/thread form. The user can quickly identify sources of performance bottlenecks in the application using the graphical interface. In addition, TAU can generate event traces that can be displayed with the Vampir trace visualization tool. TAU is being developed jointly by the University of Oregon, Los Alamos National Laboratory, and Research Centre Jülich, ZAM, Germany. It can be found at: http://www.cs.uoregon.edu/research/tau tau-2.16.4/README.CHARM.html000066400000000000000000000147271062343042700150650ustar00rootroot00000000000000

Using TAU with charm++

(tested with 5.4 release 1)

Note that when TAU is built with charm++, only charm++ programs can use the resulting library. Additionally, no TAU calls can be made before the ConverseInit call.

When using TAU_COMPILER with charm++, the following change must be made to charm/src/conv-core/converse.h :

static __inline__ unsigned long long int rdtsc(void)
{
        unsigned long long int x;
#ifdef CMK_IA64
	__asm__ __volatile__("mov %0=ar.itc" : "=r"(x) :: "memory");
#else
        __asm__ volatile (".byte 0x0f, 0x31" : "=A" (x));
#endif
        return x;
}
Must be changed to :
static __inline__ unsigned long long int rdtsc(void)
{
        unsigned long long int x;
#ifndef TAU_CHARM
#ifdef CMK_IA64
	__asm__ __volatile__("mov %0=ar.itc" : "=r"(x) :: "memory");
#else
        __asm__ volatile (".byte 0x0f, 0x31" : "=A" (x));
#endif
#endif
        return x;
}
This is due to the EDG front-end parse not parsing the __asm__ directive properly.

Using TAU with NAMD

Example: To build TAU for NAMD 2.5 (with automatic instrumentation) :
  1. Download and install PDT
      wget http://www.cs.uoregon.edu/research/paracomp/proj/pdtoolkit/Download/pdt_latest.tar.gz
      tar xzf pdt_latest.tar.gz
      cd pdtoolkit-3.3.1
      ./configure ; make ; make install 
    
  2. Download and install TAU
      wget http://www.cs.uoregon.edu/research/paracomp/proj/tau/tauprofile/dist/tau_latest.tar.gz
      tar xzf tau_latest.tar.gz
      cd tau-2.14.3
      ./configure -pdt=<path to pdt> -charm=<path to charm>
    
    Note that TAU can be configure to use various options (-TRACE, -PROFILECALLPATH, etc) with -PROFILE as the default.
  3. Apply the TAU NAMD 2.5 patch
    cd NAMD_2.5_Source
    patch < path/to/tau/examples/charm/namd-2.5.patch
    
    Alternatively see the manual patching instructions below.
  4. Make the following changes to arch/Linux-i686-g++.arch (or your .arch file):
    • Add "include /include/Makefile"
    • Change
      "CXX = ..."
      to
      "CXX = $(TAU_COMPILER) -optTauSelectFile=<path to select.tau> ..."
    • Change
      "CC = ..."
      to
      "CC = $(TAU_COMPILER) -optTauSelectFile=<path to select.tau> ..."
    For example :
    include /home/amorris/tau2/include/Makefile
    
    NAMD_ARCH = Linux-i686
    CHARMARCH = net-linux
    
    CXX = $(TAU_COMPILER) -optTauSelectFile=/home/amorris/select.tau g++ -DSOCKLEN_T=socklen_t -DNO_STRSTREAM_H
    CXXOPTS = -O3 -march=pentiumpro -ffast-math -static
    CC = $(TAU_COMPILER) -optTauSelectFile=/home/amorris/select.tau gcc
    COPTS = -O3 -march=pentiumpro -ffast-math -static
    
  5. We recommend that you set the environment variables PROFILEDIR and TRACEDIR
    export PROFILEDIR=/tmp
    export TRACEDIR=/tmp
    
  6. After execution, you should file profile.X.X.X files in your $PROFILEDIR, view these wwith pprof or paraprof

Manual patching instructions

  1. Make the above change to converse.h
  2. Create the selective instrumentation file. We have had success using the following select.tau file :
    BEGIN_EXCLUDE_LIST
    void Sequencer::thread#
    void Controller::thread#
    int NAMD_read_int#
    void PDBDATA::scan#
    Real PDBAtom::zcoor#
    Real PDBAtom::ycoor#
    Real PDBAtom::xcoor#
    Bool Molocule::is_hydrogen#
    END_EXCLUDE_LIST
    
    BEGIN_FILE_EXCLUDE_LIST
    *mainfunc.C
    *memusage.C
    *BackEnd.C
    END_FILE_EXCLUDE_LIST
    
  3. Make the following changes to Makefile :

    Add $(TAU_COMPILER) to the link phase, as shown

    namd2:	$(INCDIR) $(DSTDIR) $(OBJS) $(LIBS)
    	$(MAKEBUILDINFO)
    	$(TAU_COMPILER) $(CHARMC) -verbose -ld++-option \
    	"$(COPTI)$(CHARMINC) $(COPTI)$(INCDIR) $(COPTI)$(SRCDIR) $(CXXOPTS)" \
    	-module NeighborLB -module commlib -language charm++ \
    	$(BUILDINFO).o \
    	$(OBJS) \
    	$(DPMTALIB) \
    	$(DPMELIB) \
    	$(TCLLIB) \
    	$(FFTLIB) \
    	$(PLUGINLIB) \
    	-lm -o namd2
    
  4. Make the following changes to BackEnd.C
    • Add the following to the top of BackEnd.C:
      #include <TAU.h>
      extern "C" void Tau_create_top_level_timer_if_necessary(void);
      
    • Change BackEnd::init as follows:
      void BackEnd::init(int argc, char **argv) {
        ConverseInit(argc, argv, slave_init, 1, 1);  // calls slave_init on others
        TAU_PROFILE_SET_NODE(CmiMyPe());
        Tau_create_top_level_timer_if_necessary();
        TAU_PROFILE("BackEnd::init", "", TAU_DEFAULT);
        cpuTime_start = CmiCpuTimer();
        wallTime_start = CmiWallTimer();
        if ( CmiMyPe() ) {
          slave_init(argc, argv);  // for procs that call main
          TAU_PROFILE_EXIT("Calling ConverseExit()");
          ConverseExit();  // should never return
        }
        all_init(argc, argv);
      
  5. Make the following changes to mainfunc.C
    • Add the following to the top of mainfun.C:
      #include <TAU.h>
      
    • Change main as follows:
      int main(int argc, char **argv) {
        BackEnd::init(argc,argv);
        TAU_PROFILE("int main(int, char**) C", " ", TAU_DEFAULT);
        ScriptTcl *script = new ScriptTcl;
        Node::Object()->setScript(script);
      
        ...
      
      
        TAU_PROFILE_EXIT("main exiting");
        BackEnd::exit();
        return 0;
      }
      
  6. Change Controller.C as follows:
    • Add the following to the top of Controller.C:
      #include <TAU.h>
      
    • Make the following change to ::threadRun
      void Controller::threadRun(Controller* arg)
      {
        TAU_REGISTER_THREAD();
        arg->algorithm();
      }
      
    • Make the following change to ::terminate
      void Controller::terminate(void) {
        TAU_PROFILE_EXIT("Controller::terminate");
        BackEnd::awaken();
        CthFree(thread);
        CthSuspend();
      }
      
  7. Change Sequencer.C as follows:
    • Add the following to the top of Sequencer.C:
      #include <TAU.h>
      
    • Make the following change to ::threadRun
      void Sequencer::threadRun(Sequencer* arg)
      {
        TAU_REGISTER_THREAD();
        arg->algorithm();
      }
      
    • Make the following change to ::terminate
      void Sequencer::terminate(void) {
        TAU_PROFILE_EXIT("Sequencer::terminate");
        CthFree(thread);
        CthSuspend();
      }
      
tau-2.16.4/README.DYNINST000066400000000000000000000067471062343042700144230ustar00rootroot00000000000000Using TAU with Dyninst 4.x. --------------------------- Part I) Configuring and installing Dyninst 2.x % tar xzvf binDist4.x.tar.gz (Agree to Dyninst licensing terms) % cd /dyninstAPI-4.x Add to .cshrc file: setenv DYNINST_ROOT /dyninstAPI-4.x/ setenv PLATFORM i386-unknown-linux2.4 setenv DYNINSTAPI_RT_LIB $DYNINST_ROOT/$PLATFORM/lib/libdyninstAPI_RT.so.1 setenv LD_LIBRARY_PATH /i386_linux/lib\:$DYNINST_ROOT/lib/$PLATFORM % source ~/.cshrc Compiling Dyninst (optional, you may download the binary release). % cd $DYNINST_ROOT/core/ % make % cd $DYNINST_ROOT/core/dyninstAPI/tests/$PLATFORM % make % ./test1 % ./test2 % ./test3 if it passes all tests then : Part 2: Configuring TAU with Dyninst ------------------------------------ % tar zxvf tau-2.x.tar.gz % cd % configure -dyninst=$DYNINST_ROOT % make install % set path=(/i386_linux/bin $path) % cd examples/dyninst % make % tau_run klargest % pprof If you're using DyninstAPI with an MPI application (works under Linux with MPICH), you need to follow these steps: 1) normally you'd invoke an mpi application using : % mpirun -np a.out 2) With TAU and DyninstAPI, you'll need to invoke it as: % mpirun -np tau.shell where tau.shell is a shell script that you write as follows: #!/bin/tcsh //bin/taurun -XrunTAUsh[-options] /a.out $* Note, by default taurun doesn't need the specification of the TAU library to use (in the second -XrunTAUsh[-options] argument) but you can specify it when more than one version of TAU is configured. For e.g., % mpirun -np 4 tau.papiwallclock.sh % cat tau.papiwallclock.sh #!/bin/tcsh /home/users/sameer/tau2/i386_linux/bin/tau_run -XrunTAUsh-papiwallclock-papi /home/users/sameer/tau2/examples/mpi-ek/ek $* To use tau_run to re-write a binary file, use the -o option. For e.g., % f90 app.f90 creates a.out % tau_run a.out does runtime pre-execution instrumentation by spawning a.out. % tau_run -o a.out.rewritten a.out reads a.out, instruments it and rewrites the binary image as a.out.rewritten (typically in _dyninstsaved directory where n = 0, 1, 2...) NOTE: The binary rewriting feature has been tested under Sparc Solaris 2.8+ with the application binary files created with the Sun F90 compiler. SELECTIVE INSTRUMENTATION FEATURES: ----------------------------------- tau_run takes a -f instrumentation specification file option. This allows the user to specify which routines and/or files should be included or excluded. If a user wishes to only instrument routines main and foo in the binary, a file with BEGIN_INCLUDE_LIST main foo END_INCLUDE_LIST can be made and specified with the -f option. Other tags (like BEGIN_INCLUDE_LIST) include BEGIN_EXCLUDE_LIST/END_EXCLUDE_LIST (the routines specified between these are excluded from instrumentation, and BEGIN_FILE_INCLUDE_LIST/END_FILE_INCLUDE_LIST for specifying a list of files for including (only these files are instrumented). e.g., BEGIN_FILE_INCLUDE_LIST app_main.cpp f*.cpp END_FILE_INCLUDE_LIST Note that you can specify the file name with wildcard characters (* and ?). Also, BEGIN_FILE_EXCLUDE_LIST/END_FILE_EXCLUDE_LIST can be used to exclude the list of files (*.so for instance). You may specify either include or excludelists but not both. The selective instrumentation file specification is common to DyninstAPI based tau_run and PDT based tau_instrumentor. Please direct any questions to tau-bugs@cs.uoregon.edu. tau-2.16.4/README.JAVA000066400000000000000000000046461062343042700140100ustar00rootroot00000000000000***************************************************************************** ** Tuning and Analysis Utilities ** ** http://www.cs.uoregon.edu/research/paracomp/tau ** ***************************************************************************** ** Copyright 1997-2004 ** ** Department of Computer and Information Science, University of Oregon ** ** Advanced Computing Laboratory, Los Alamos National Laboratory ** ** Research Center Juelich, ZAM Germany ** ***************************************************************************** To use TAU with JAVA, you'll need Java 2 (jdk1.2+). 1) Configuration For profiling % ./configure -c++=g++ -jdk=/usr/local/packages/jdk1.2 For tracing % ./configure -c++=g++ -jdk=/usr/local/packages/jdk1.2 -TRACE For both profiling and tracing % ./configure -c++=g++ -jdk=/usr/local/packages/jdk1.4.x -TRACE -PROFILE 2) Installing % make install 3) Running an example % set path=($path //bin) % setenv LD_LIBRARY_PATH $LD_LIBRARY_PATH://lib % cd examples/java/pi % java -XrunTAU Pi 200000 (java -version shows the version of JVM). 4) Selective instrumentation To exclude certain classes, you may use the -XrunTAU:exclude= flag. e.g., to exclude java/*, sun/*, com/* methods, you may use: % java -XrunTAU:exclude=java,sun,com Pi 200000 To exclude all methods (and *not* incur the JVMPI method invocation overhead), you may use the -XrunTAU:nomethods flag as: % java -XrunTAU:nomethods Pi 20000 This allows you to use source level timers (see examples/java/api for an example) and generate accurate multi-threaded performance data without the JVMPI overhead. 5) Displaying profiles/traces For Profiling: % pprof % paraprof pprof is for text profile display and paraprof is the GUI. For Tracing: First merge the traces using tau_merge % tau_merge tautrace*.trc Pi.trc Then convert to Vampir trace format % tau_convert -vampir Pi.trc tau.edf Pi.pv Download and install Vampir (free evaluation license typically lasts for a month) from http://www.pallas.de. % vampir Pi.pv Then assign colors to the groups by choosing the menu option Preferences -> Colors -> Activities. See TAU user's Guide for further details on using racy and Vampir. For any comments/suggestions/questions on TAU, please send mail to tau-bugs@cs.uoregon.edu tau-2.16.4/README.MUSE000066400000000000000000000257021062343042700140340ustar00rootroot00000000000000***************************************************************************** ** Tuning and Analysis Utilities ** ** http://www.cs.uoregon.edu/research/paracomp/tau ** ***************************************************************************** ** Copyright 1997-2004 ** ** Department of Computer and Information Science, University of Oregon ** ** Advanced Computing Laboratory, Los Alamos National Laboratory ** ** Research Center Juelich, ZAM Germany ** ***************************************************************************** ************************************************************************* * USING TAU WITH MUSE * * Author : Suravee Suthikulpanit (suravee@cs.uoregon.edu) * * Date : 3/2/2004 * Version : 1.3 * * Log Change : * * - Add multiple metrics support for monotonically * * increasing value. * * - Found synchronization problem in MUSE and still * * working on the solution. * * * * Log 1.2 * * - Add user-defined event support for non-monotonically * * increasing value. * * * * Log 1.1 * * - (1) Restructure struct package to be ready for * * multiple double values, multiple handlers, * * multiple filters. * * - Add partial support for (1) * * - Move package_selector stuff into TauMusePackages.cpp * * - Add API TauMuseCreate () * * - Add package context_switch. * * - Add package accumulator_sock_send. * * - Add package accumulator_sock_recv. * * - Add support for new socket_filter. * * - Change encoding for process_scheduling * * - Lengthen size of current_directory to fix a bug. * ************************************************************************* INTRODUCTION: MAGNET: MAGNET instruments Linux Kernel with a set of instrumentation points "MAGNET_ADD()" which will output records of specific kernel events to userspace by MUSE. MUSE: MAGNET User-Space Environment. MUSE contains the implementation of magnetd and utilities for monitoring MAGNET events. Users can implement a set of "Handlers" and "Filters" to analyze event records information received from MAGNET. For more information, please refer to http://public.lanl.gov/radiant/ MUSE NOTE: - ************************************************************************* INSTALLATION: % configure -muse : Enable TAU_MUSE for single monotonically increasing value. or % configure -muse_event : Enable TAU_MUSE with multiple non-monotonically increasing values. or % configure -muse_multiple : Enable TAU_MUSE with multiple monotonically increasing values. NOTE: -muse or -muse_multiple can be configured together with -muse_event i.e. % configure -muse -muse_event or % configure -muse_multiple -muse_event The configurations will specify the uses of MAGNET/MUSE to extract low-level information from the kernel. To use this configuration, Linux kernel has to be patched with MAGNET and MUSE has to be install on the executing machine. Also, magnetd has to be running with the appropriate handlers and filters installed. ************************************************************************* MODES OF OPERATION: -muse This option is used when single monotonically increasing value is monitored. double TauMuseQuery() is automatically called for every entry and exit point of every function in a target application. A monitored double value is returned while -1 is returned in case of error. User must specify environment variable "TAU_MUSE_PACKAGE" to a corresponding package. ============================================================================= -muse_event This option is used when multiple non-monotonically increasing values are monitored. Query is made through API int TauMuseEventQuery(double data[], int array_size) It returns size of results in the array provided, and -1 in case of error. int TauMuseGetMetricsNonMono(char *metricName[], int array_size) is used to acquire metrics' name and order that are returned in the provided array. This function returns size of results in the array, and -1 in case of error. User must specify environment variable "TAU_MUSE_EVENT_PACKAGEx" to a corresponding package where "x" is a consecutive number from 0 to 9. An array of double and size of array must be specified. ============================================================================= -muse_multiple This option is used when multiple non-monotonicall increasing values are monitored. Query is made through API int TauMuseMultipleQuery(double data[], int array_size) It returns size of results in the array provided, and -1 in case of error. int TauMuseGetMetricsMono(char *metricName[], int array_size) is used to acquire metrics' name and order that are returned in the provided array. This function returns size of results in the array, and -1 in case of error. User must specify environment variable "TAU_MUSE_PACKAGEx" to a corresponding package where "x" is a consecutive number from 0 to 9. An array of double and size of array must be specified. ************************************************************************* USAGE: TAU provides different packages which are predefined set of MUSE handlers and filters with specific arguments. These packages let TAU users monitor various performance metrics. ============================================================================= LIST OF PACKAGES: ============================================================================= MODE OF OPERATION: Monotonically increasing value(s). 1) Package Name: count This package keeps track of number of MAGNET instrumentation points executed in the LINUX kernel caused by the profiled program. These counts are event records according to the specified PID. Handler : TAU_count Filter : process_filter Number of Metrics : 1 Usage : Prior to execution, set enviroment variable TAU_MUSE_PACKAGE=TAU_count or TAU_MUSE_PACKAGEx=TAU_count Command : create TAU_count addfilter process_filter pid= 2) Package Name: busy_time Total time in millisec of processors in BUSY state doing work for the specified PID. Handler : process_scheduling Filter : process_filter Number of Metrics : 1 Usage : Prior to execution, set enviroment variable TAU_MUSE_PACKAGE=busy_time or TAU_MUSE_PACKAGEx=busy_time Command : create process_scheduling addfilter process_filter pid= event=258 //MAGNET_TASK_CTX_IN addfilter process_filter pid= event=259 //MAGNET_TASK_CTX_OUT 3) Package Name: idle_time Total time in millisec of processors in Idle state. Handler : process_scheduling Filter : process_filter Number of Metrics : 1 Usage : Prior to execution, set enviroment variable TAU_MUSE_PACKAGE=idle_time or TAU_MUSE_PACKAGEx=idle_time Command : create process_scheduling addfilter process_filter pid=0 event=258 //MAGNET_TASK_CTX_IN addfilter process_filter pid=0 event=259 //MAGNET_TASK_CTX_OUT 4) Package Name: total_time Total time in millisec of processors in execution for the specified PID. Handler : process_scheduling Filter : process_filter Number of Metrics : 1 Usage : Prior to execution, set enviroment variable TAU_MUSE_PACKAGE=total_time or TAU_MUSE_PACKAGEx=total_time Command : create process_scheduling addfilter process_filter pid= event=258 //MAGNET_TASK_CTX_IN addfilter process_filter pid= event=259 //MAGNET_TASK_CTX_OUT 5) Package Name: context_switch Total number of context switches for the specified PID. Handler : process_scheduling Filter : process_filter Number of Metrics : 1 Usage : Prior to execution, set enviroment variable TAU_MUSE_PACKAGE=context_switch or TAU_MUSE_PACKAGEx=context_switch Command : create process_scheduling addfilter process_filter pid= event=258 //MAGNET_TASK_CTX_IN addfilter process_filter pid= event=259 //MAGNET_TASK_CTX_OUT 6) Package Name: accumulator_sock_send Total number of bytes sent out on sockets for a specified pid. Handler : accumulator Filter : socket_filter Number of Metrics : 1 Usage : Prior to execution, set enviroment variable TAU_MUSE_PACKAGE=accumulator_sock_send or TAU_MUSE_PACKAGEx=accumulator_sock_send Command : create process_scheduling addfilter socket_filter= event=3 //MAGNET_SOCK_SEND 7) Package Name: accumulator_sock_recv Total number of bytes received through sockets for a specified pid. Handler : accumulator Filter : socket_filter Number of Metrics : 1 Usage : Prior to execution, set enviroment variable TAU_MUSE_PACKAGE=accumulator_sock_recv or TAU_MUSE_PACKAGEx=accumulator_sock_recv Command : create process_scheduling addfilter socket_filter= event=4 //MAGNET_SOCK_RECV ============================================================================= MODE OF OPERATION: Non-monotonically increasing value(s). 1) Package Name: bandwidth Average bandwidth (send and receive) in byte/sec is measured. Handler : bandwidth Filter : socket_filter Number of Metrics : 2 Usage : Prior to execution, set enviroment variable TAU_MUSE_EVENT_PACKAGEx=bandwidth Command : create bandwidth 1 //1 is the delta time for measuring average value. addfilter socket_filter pid= 2) Package Name: tcpbandwidth Average tcp bandwidth (send and receive) in byte/sec is measured. Handler : tcpbandwidth Filter : socket_filter Number of Metrics : 2 Usage : Prior to execution, set enviroment variable TAU_MUSE_EVENT_PACKAGEx=tcpbandwidth Command : create tcpbandwidth 1 //1 is the delta time for measuring average value. addfilter socket_filter pid= ************************************************************************* NOTE: Some configuration should be modified according to machine. - MAXNUMOFCPU : default to 2. (This can run with Uni-processor and Dual-processor machine.) - AF_UNIX_MODE : is defined by default. (This will configure muse to run in AF_INET or AF_UNIX mode. However, AF_INET is not recommend since it will significantly impact the performance of profiling.) - VAR_LOCK_DIRECTORY : default to /var/lock This will try to access magnetd file which is created in /var/lock. ************************************************************************* BUGS: - Muse is having problem with DC and ST thread synchronization. - total_time is broken due to magnetd threads synchronization. - accumulator_sock_recv giving bogus value. ************************************************************************* TODO: tau-2.16.4/README.WINDOWS.txt000066400000000000000000000004601062343042700152250ustar00rootroot00000000000000To build TAU for windows use Makefile.win32 The base library and utilities can be build using either Microsoft Visual C++ 6 or 7 (.NET). The tau_instrumentor and tau2vtf can only be built using MSVC++ 7 or higher. Read the instructions at the top of Makefile.win32 for details on how to invoke nmake. tau-2.16.4/build/000077500000000000000000000000001062343042700134755ustar00rootroot00000000000000tau-2.16.4/build/Config.info000066400000000000000000000010051062343042700155530ustar00rootroot00000000000000####################################################################### ## TAU ## ## based on pC++/Sage++ Copyright (C) 1993 ## ## Indiana University University of Oregon University of Rennes ## ####################################################################### # # Configure specified information # # DO NOT CHANGE MANUALLY!!!! # default: cxx = g++ default: cc = gcc default: useropt = -g default: stdincludes = -I/usr/include -I/usr/include/CC tau-2.16.4/build/Config.info.default000066400000000000000000000010051062343042700171760ustar00rootroot00000000000000####################################################################### ## TAU ## ## based on pC++/Sage++ Copyright (C) 1993 ## ## Indiana University University of Oregon University of Rennes ## ####################################################################### # # Configure specified information # # DO NOT CHANGE MANUALLY!!!! # default: cxx = g++ default: cc = gcc default: useropt = -g default: stdincludes = -I/usr/include -I/usr/include/CC tau-2.16.4/build/GetSection.awk000066400000000000000000000004351062343042700162470ustar00rootroot00000000000000#!/bin/awk -f # #USAGE: GetSection.awk filen= # BEGIN { FS=":[\t]*|[\t]" in_section=0; } /^File:/ { if($2 == filen) { in_section=1; } } /^$/ { if(in_section == 1) { exit 0; } } { if(in_section == 1) { printf("%s\\n", $0); } } tau-2.16.4/build/Makefile.header000066400000000000000000000020751062343042700163700ustar00rootroot00000000000000####################################################################### ## TAU ## ## based on pC++/Sage++ Copyright (C) 1993,1995 ## ## Indiana University University of Oregon University of Rennes ## ####################################################################### ####################################################################### ## ## ## WARNING: ## ## This Makefile has been created automatically by the TAU build ## ## script. Any changes made manually will be overwrittten the ## ## next time that build is run to generate a makefile. ## ## ## ####################################################################### ########### Automatically modified by the configure script ############ CONFIG_ARCH=default CONFIG_CC=gcc CONFIG_CXX=g++ PCXX_OPT=-g USER_OPT=-g MPI_DIR = INSTALL = /bin/cp SHELL = /bin/sh LSX = .a ####################################################################### ####################################################################### tau-2.16.4/build/Socket.info000066400000000000000000000007001062343042700155770ustar00rootroot00000000000000####################################################################### ## pC++/Sage++ Copyright (C) 1993 ## ## Indiana University University of Oregon University of Rennes ## ####################################################################### # # what libaries need to be added in order to use sockets (for breakpnt) # solaris2: socketobjs = -lsocket -lnsl ptx: socketobjs = -lsocket -linet -lnsl tau-2.16.4/build/Target.info000066400000000000000000000062741062343042700156110ustar00rootroot00000000000000###################################################################### ## pC++/Sage++ Copyright {C} 1993 ## ## Indiana University University of Oregon University of Rennes ## ####################################################################### # # Generic target system information file # # when this file is read, the following variables are set: # Source SageRoot arch bldtgt mode mcextra mpextra # as well as all environment variables of the user # the following variables should be set for a new architecture # - set loader only to override default #: loader = #: lextra = awe-ms: loader = awe-ms: extraobjs = -lc -lm awe-ms: lextra = cm5: loader = /usr/bin/cmmd-ld -node -comp gcc cm5: extraobjs = -lm -lcmrts_cm5_vu_pn cm5: lextra = cnxspp-ms: loader = /usr/convex/all/ld -u main +tm spp1 +parallel /usr/convex/all/crt0.o cnxspp-ms: extraobjs = -lg++ -lgcc -L/usr/convex/all/spp1 -L/usr/convex/all -lcps -lail -lm -lc cnxspp-ms: lextra = cs2.nx: loader = cs2.nx: extraobjs = -L/opt/MEIKOcs2/lib -lm -lmpsc -lew -lelan cs2.nx: lextra = ksr: loader = cc -para ksr: extraobjs = -lm -lC ksr: lextra = ksr-ms: loader = cc -para ksr-ms: extraobjs = -lm -lC ksr-ms: lextra = lwp-ms: loader = lwp-ms: extraobjs = -lnbio -llwp lwp-ms: lextra = mpiold: loader = mpiold: extraobjs = -L${MPI_DIR}/lib/sun4 -lmpi -lchimp mpiold: lextra = mpi: loader = mpi,paragon: extraobjs = -L${MPI_DIR}/lib/paragon -lm -lmpi mpi: extraobjs = -L$(MPI_DIR) -lm -lmpi mpi: lextram = mpi,paragon: lextra = -mnx sgimp-msnew: loader = sgimp-msnew: extraobjs = -lm sgimp-msnew: lextra = sgimp: loader = sgimp: extraobjs = -lm -lC sgimp: lextra = paragon: loader = paragon: extraobjs = -lm paragon: lextra = -mnx pthread-msnew: loader = pthread-msnew: extraobjs = -lm pthread-msnew,alpha: extraobjs = -lc_r -lmach -lpthreads -lm pthread-msnew: lextra = pthread-ms: loader = pthread-ms: extraobjs = ${PTDIR}/libpthreads.a -lc -lm pthread-ms: lextra = pvmexe: loader = pvmexe: extraobjs = -L${PVM_DIR}/lib/${PVM_ARCH} -lpvm3 -lm pvmexe: lextra = pvmexeNEW: loader = pvmexeNEW: extraobjs = -L${PVM_DIR}/lib/${PVM_ARCH} -lpvm3 -lm pvmexeNEW: lextra = sp2: loader = mpiCC sp2: extraobjs = -lm #sp2: lextra = -us -L/usr/lpp/poe/mpif/lib/us -L/usr/lpp/poe/mpif/lib sunmos: loader = sunmos: extraobjs = -lm sunmos: lextra = sunmos,sun4: loader = sigcc symmetry: loader = symmetry: extraobjs = -lpps -lseq -lc -lm symmetry: lextra = task-ms: loader = CC task-ms: extraobjs = -ltask -lc -lm task-ms: lextra = task-ms,rs6000: loader = xlC sgimp-ms: loader = sgimp-ms: extraobjs = -lC -lm sgimp-ms: lextra = t3d: loader = CC-t3d t3d: extraobjs = -lm t3d: lextra = t3e: loader = t3e: extraobjs = -lm t3e: lextra = -Xm uniproc: loader = uniproc: extraobjs = -lm uniproc: lextra = uniproc,sgi8k: extraobjs = -lC -lm uniproc,ptx: lextra = -lseq uniproc,symmetry: lextra = -lseq tau-2.16.4/build/build000077500000000000000000000200051062343042700145170ustar00rootroot00000000000000#!/bin/sh # Script for easily compiling the correct executable for a machine. # # Just do this: # make clean # build # # Be sure to do a "make clean" between making versions for different execution # models, because the shared .o files are not compatible. # # can be one of: # get_info # build_makefile # -- set up portable echo command case "`echo 'x\c'`" in 'x\c') echo="echo -n" nnl= ;; #BSD x) echo="echo" nnl="\c";; #SysV *) echo 'Cannot setup echo. What weird machine do you have?' 1>2& exit 1;; esac # Check for correct number of arguments if [ $# -lt 2 ] then echo "ERROR: You must specify the project and target machine." exit 1 fi # get basename of current application projname=$1 if [ -f ${1}.pmf ] then projfile=${1}.pmf else echo "ERROR: project file (${1}.pmf) not found in this directory." exit 1 fi # get path to sageroot for finding binaries and Makefile if [ "x$TAUROOT" = "x" ] then TauRoot=`awk 'BEGIN {ln=1;} {if(ln==2) {print $0; exit;} else {ln++;}}' $projfile` else TauRoot=$TAUROOT fi echo "Building project-independent portion of Makefile...${nnl}" # Setup the generic mode variables case $2 in prf-*) mode="prf-" lmode="prf-" bldtgt=`echo $2 | sed -e 's/^prf-//'` ;; trc-*) mode="trc-" lmode="trc-" bldtgt=`echo $2 | sed -e 's/^trc-//'` ;; brk-*) mode="brk-" lmode="" bldtgt=`echo $2 | sed -e 's/^brk-//'` ;; rpl-*) # For replay debugging with Ariadne. mode="rpl-" lmode="rpl-" bldtgt=`echo $2 | sed -e 's/^rpl-//'` ;; snz-rpl-*) # For both Sneezy _and_ Ariadne. # Order matters in the shell script! mode="snzrpl-" lmode="snzrpl-" bldtgt=`echo $2 | sed -e 's/^snz-rpl-//'` ;; snz-*) # For debugging or interaction with Sneezy. mode="snz-" lmode="snz-" bldtgt=`echo $2 | sed -e 's/^snz-//'` ;; *) mode="" bldtgt=$2 ;; esac # Use archfind command script in ./utils arch="" arch=`${TauRoot}/utils/archfind` # check if $TauRoot/bin/$arch exists, if not, ERROR if [ -d ${TauRoot}/bin/${arch} ] then true else echo ERROR: Could not find necessary binaries in ${TauRoot}/bin/${arch}/ exit 1 fi # Get list of languages from project projlangs=`awk '/Proj_Langs:/ {printf("%s\\n", substr($0,12,length($0)));}' $projfile` # Get list of source files from project tmp_projsources=`sed -e '/^File:/!d' -e '/^File:/s/^File://' $projfile` tmp_projobjects=`sed -e '/^File:/!d' -e '/^File:/s/^File://;s/\.[a-zA-Z]*$/\.o/' $projfile` tmp_projdepfiles=`sed -e '/^File:/!d' -e '/^File:/s/^File://;s/\.[a-zA-Z]*$/\.dep/' $projfile` projsources=`echo $tmp_projsources` projobjects=`echo $tmp_projobjects` projdepfiles=`echo $tmp_projdepfiles` # These accumulate linker options - flags and libraries. loader="" extra_libraries="" extra_linker_flags="" # get rid of first two arguments shift shift # This sets default compilers and options from configure script info=`sed -e '/^#/d' -e '/^$/d' \ -e '/^'$arch:'/s/^[^:]*: *\([A-Za-z0-9_][^ ]*\) *= \(.*\)$/\1="\2";/' \ -e '/:/d' $TauRoot/build/Config.info` eval $info # Setup the loader and loader flags with target specific ones info=`sed -e '/^#/d' -e '/^$/d' \ -e '/^'$bldtgt:'/s/^[^:]*: *\([A-Za-z0-9_][^ ]*\) *= \(.*\)$/\1="\2";/' \ -e '/:/d' $TauRoot/build/Target.info` eval $info # override these variables with architecture and target specific ones info=`sed -e '/^#/d' -e '/^$/d' \ -e '/^'$bldtgt,$arch:'/s/^[^:]*: *\([A-Za-z0-9_][^ ]*\) *= \(.*\)$/\1="\2";/'\ -e '/:/d' $TauRoot/build/Target.info` eval $info # loader may now be set generic_tgtlibs=$extraobjs echo "done." # Setup for each language extra_mode_lib="" extraobjs="" extra_bldtgt_libraries="" for lang in $projlangs do echo "Setting up language-specific target information for $lang...${nnl}" . ${TauRoot}/build/${lang}/SetupMode # Set paths to BUILD files TI=${TauRoot}/build/${lang}/Target.info CI=${TauRoot}/build/${lang}/Config.info temp_bldtgt_objs1="" temp_bldtgt_objs2="" # check if specified target exists for each language if grep \^$bldtgt $TI > /dev/null then true else echo "build: unknown target $bldtgt for $lang language." exit 1 fi # set configure specified default paths / variables # This sets default compilers and options from configure script info=`sed -e '/^#/d' -e '/^$/d' \ -e '/^'$arch:'/s/^[^:]*: *\([A-Za-z0-9_][^ ]*\) *= \(.*\)$/\1="\2";/' \ -e '/:/d' $CI` eval $info # override with target specific variables # This sets language specific compiler flags info=`sed -e '/^#/d' -e '/^$/d' \ -e '/^'$bldtgt:'/s/^[^:]*: *\([A-Za-z0-9_][^ ]*\) *= \(.*\)$/\1="\2";/' \ -e '/:/d' $TI` eval $info # override these variables with architecture and target specific ones info=`sed -e '/^#/d' -e '/^$/d' \ -e '/^'$bldtgt,$arch:'/s/^[^:]*: *\([A-Za-z0-9_][^ ]*\) *= \(.*\)$/\1="\2";/'\ -e '/:/d' $TI` eval $info temp_bldtgt_objs1="$temp_bldtgt_objs1 $extra_bldtgtobjs1" temp_bldtgt_objs2="$temp_bldtgt_objs2 $extra_bldtgtobjs2" echo "done." done extra_bldtgt_libraries="$temp_bldtgt_objs1 $extra_mode_lib $temp_bldtgt_objs2" # add socket libraries if necessary SI=${TauRoot}/build/Socket.info if [ " x$mode" = "xbrk-" ] then info=`sed -e '/^#/d' -e '/^$/d' \ -e '/^'$arch:'/s/^[^:]*: *\([A-Za-z0-9_][^ ]*\) *= \(.*\)$/\1="\2";/' \ -e '/:/d' $SI` eval $info fi if [ "x$loader" = "x" ] then # From generic Config.info loader="$cxx $useropt" fi loader=$loader loader_flags=$lextra loader_objects="$extra_bldtgt_libraries $generic_tgtlibs $extraobjs $socketobjs" if [ -f Makefile ] then cp Makefile Makefile.bak fi if result=`cp $TauRoot/build/Makefile.header Makefile` then true else echo "Couldn't create $projdir/Makefile" exit 1 fi if [ "x$cc" = "x" ] then cat << EOF >> Makefile CC = \$(CONFIG_CC) EOF else cat << EOF >> Makefile CC = $cc EOF fi if [ "x$cxx" = "x" ] then cat << EOF >> Makefile CXX = \$(CONFIG_CXX) EOF else cat << EOF >> Makefile CXX = $cxx EOF fi if [ "x$loader" = "x" ] then cat << EOF >> Makefile LOADER = \$(CXX) EOF else cat << EOF >> Makefile LOADER = $loader EOF fi cat << EOF >> Makefile TAUROOT = $TauRoot ANSIC = $TauRoot/bin/$arch/ansiC HPCXX2DEP = $TauRoot/bin/$arch/hpcxx2dep PCXXROOT = ${pcxx_root} HPNXROOT = ${hpcxx_hpnx} PSTLROOT = ${hpcxx_pstl} # This is currently hard-coded in tau/build/build, but should be configurable! STLROOT = /home/grads/aida/hpc++/stl EOF projopts=`sed -e '/^Project_Options: /!d' -e '/^Project_Options: /s/^Project_Options: //' $projfile` echo $projopts | tr @ \\n >> Makefile cat << EOF >> Makefile ARCH = $arch STDINCLUDES = $stdincludes CXX_SWITCHES= $cextra LDFLAGS = \$(LDSWITCHES) $loader_flags LOBJS = \$(USEROBJS) $loader_objects DEPS = $projdepfiles OBJS = $projobjects EXECUTABLES = *-awe-ms *-cm5 *-cnxspp-ms *-cs2.nx *-ksr *-ksr-ms *-lwp-ms \\ *-mpi *-mpiNEW *-paragon *-pthread-ms *-pvmexe *-pvmexeNEW \\ *-sgimp *-sgimp-ms *-sp2 *-sunmos *-symmetry *-t3d \\ *-task-ms *-uniproc a.out $projname-$mode$bldtgt: \$(DEPS) \$(OBJS) \$(LOADER) \$(LDFLAGS) -o $projname-$mode$bldtgt \$(OBJS) \$(LOBJS) EOF for srcfile in $projsources do echo "Building language specific Makefile target for $srcfile...${nnl}" # Need to know lang, compile options srcbasename=`echo $srcfile | sed -e '/^/s/\.[a-zA-Z]*$//'` projsection=`awk -f ${TauRoot}/build/GetSection.awk filen=$srcfile $projfile` srclang=`echo $projsection | sed -e '/^Lang:/!d' -e '/^Lang:/s/^Lang://'` srcopts=`echo $projsection | sed -e '/^Comp_Opts:/!d' -e '/^Comp_Opts:/s/^Comp_Opts://'` # Create a Target in Makefile . ${TauRoot}/build/${srclang}/MakeMakeTarget echo "done." done cat << EOF >> Makefile ########################################################################### ## Cleanup Targets clean: -/bin/rm -f *.o *.dep trc-* prf-* brk-* snz-* rpl-* snzrpl-* \\ *~ *temp.C *temp.c align.h TEMP* TypeInfoFile.TIF realclean: clean -/bin/rm -f \$(EXECUTABLES) core* *.tdl *.key *.trc *.edf \\ profile.* dummy.c *.trace *.proj dataclean: -/bin/rm -f profile.[0-9]* *.trc EOF exit 0 tau-2.16.4/configure000077500000000000000000004352611062343042700143200ustar00rootroot00000000000000#!/bin/sh #**************************************************************************** #* TAU Portable Profiling Package ** #* http://www.cs.uoregon.edu/research/tau ** #**************************************************************************** #* Copyright 1997-2003 ** #* Department of Computer and Information Science, University of Oregon ** #* Advanced Computing Laboratory, Los Alamos National Laboratory ** #* Research Center Juelich, ZAM Germany ** #**************************************************************************** #* #* Permission to use, copy, modify, and distribute this software and its #* documentation for any purpose and without fee is hereby granted, #* provided that the above copyright notice appear in all copies and that #* both that copyright notice and this permission notice appear in #* supporting documentation, and that the name of University of Oregon (UO) #* and Los Alamos National Laboratory (LANL) not be #* used in advertising or publicity pertaining to distribution of #* the software without specific, written prior permission. The #* University of Oregon and LANL makes no representations about the #* suitability of this software for any purpose. It is provided "as is" #* without express or implied warranty. #* #* THE UNIVERSITY OF OREGON AND LANL DISCLAIMS ALL WARRANTIES WITH REGARD TO #* THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND #* FITNESS, IN NO EVENT SHALL THE UNIVERSITY OF OREGON OR LANL BE LIABLE FOR #* ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER #* RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF #* CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN #* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #**************************************************************************** #**************************************************************************** #* Authors : Sameer Shende (sameer@cs.uoregon.edu) (UO, LANL) #* Peter Beckman, Steve Karmesin (ACL, LANL) #* Kathleen Lindlan, Ariya Lohavanichbutr (UO) #* Principal Investigators : #* Janice Cuny, Allen Malony (UO) #* TAU project was developed by Bernd Mohr, Lars Hansen, Kurt Windisch, #* Darryl Brown, et. al. and directed by Allen Malony at University of Oregon. #* The TAU Portable Profiling Package uses part of TAU. #**************************************************************************** # Configure script for TAU # Sameer Shende 11/12/97 for TAU Portable Profiling Package # Kurt Windisch 12/9/96 # Based on the configure script for Sage/pC++ by: # Pete Beckman 9/6/93 # Lars Thomas Hansen 2/27/95 (Solaris fix) # # New options for TAU/HPC++: # -pcxx # -sage2 # -pstl # -hpnx # # Options for Configure : # ./configure -cc= -c++= -useropt= # -gnu -PROFILE -TRACE # # Recommended configuration for testing on SGI: # ./configure -useropt=-64 -PROFILE # For testing with KAI's KCC compiler # ./configure -cc=cc -c++=KCC -PROFILE # If your C++ compiler does not support STL, you could use something like: # ./configure -useropt='-I/usr/local/packages/SGI-STL/' # after downloading the Standard Templates Library. # This configure script has been tested on SGI, LINUX, SOLARIS2 and HP # # Currently this configure file modifies Makefiles within Sage to the # following architecture names (see ./utils/archfind) : # ptx a Sequent Symmetry running DYNIX/ptx (386/486 based) # symmetry a Sequent Symmetry running DYNIX 3 (386/486 based) # hp9000s700 an HP 9000, series 700, running hpux # hp9000s800 an HP 9000, series 800, running hpux # decstation a DecStation XXXX # rs6000 an IBM RS6000 running AIX # sun4 a Sun Microsystems series 4 workstation (SPARC based) # solaris2 a Sun Workstation running SVR4 Solaris # next a NeXT computer # sgi4k an SGI R4K-based machine # sgi8k an SGI R8K-based (Power) machine # cm5 a Thinking Machines Corporation CM-5 # paragon an Intel paragon # tc2000 a BBN Butterfly tc2000 # ksr1 a Kendall Square KSR1 # unknown default setup, no machine selected (original) # alpha an HP/Compaq Alpha running OSF/1 Tru64 # c90 a Cray C90 running Unicos # t3d a Cray T3D (Alpha-based) computer array # i386_linux an Intel ix86 PC running LINUX # default Returns all files to "distribution" snapshot. # This MUST be done before any CVS commands are called # # The tkfile may contain definitions of environment variables in the # style of /bin/sh, e.g. (these are the defaults) # # tcltkheader="-I/usr/local/include" # tcltklib="-L/usr/local/lib -ltk4.0 -ltcl7.4" # x11header="-I/usr/include" # x11lib="-L/usr/lib -lX11" # # If a file name is given, it must contain all these definitions. # No checking is done to ensure that it does so. rm -f .clean rm -f .last_config # This method will escape spaces so that you can use ./configure `cat .last_config` when you've used them for arg in "$@"; do # Thanks to Bernd Mohr for the following that handles quotes and spaces # -e 's/^x//' removes the x at the start # -e 's/"/\\\"/g' replaces " with \" # -e s,\',%@%\',g replaces ' with %@%' # -e 's/%@%/\\\/g' replaces %@% \ # -e 's/ /\\\ /g' replaces space with \space modarg=`echo "x$arg" | sed -e 's/^x//' -e 's/"/\\\"/g' -e s,\',%@%\',g -e 's/%@%/\\\/g' -e 's/ /\\\ /g'` modargs="$modargs $modarg" done echo "$modargs" >> .all_configs echo "$modargs" > .last_config # write tau_config.h that's used as meta-data containing the TAU configuration modmodargs=`echo "x$modargs" | sed -e 's/^x//' -e 's#\\\#\\\\\\\\#g'` echo "#define TAU_CONFIG \"$modmodargs\"" > include/tau_config.h START_DIR=`pwd` # Record all the arguments arguments=$* # Default compilers and options c_compiler=default cxx_compiler=default pdt_cxx_compiler=default fixmakeargs="" pcxxopt=-g useropt= tag=no tautag= orig_useropt= mpi=no mpi2=no mpiio=no mpiinc= mpilib= mpilibrary=no ibmmpi=no shmem=no shmeminc= shmemlib= shmemlibrary=no threadsafe=no additional_mpiincs= additional_mpilibs= pythoninc= pythonlib= python=no extradir= awe=no pthread=no papithread=no charm=no muse=no muse_event=no muse_multiple=no comm=yes sproc=no noex=no setnode0=no tulipthread=no compensate=no smarts=no pcl=no papi=no perf=no perfincdir= perflibdir= perflibrary= task=no lwp=no tcltk=yes tcltkfile="/" kai=no pgi=no fujitsu=no guidef90=no stdcxxlib=no inteltflop=no intelcxxlibicc=no intelifort=no intel=no profile=no monitor=no profilecounters=no multiplecounters=no profilestats=no profilememory=no profileheadroom=no callpath=no profileparam=no depthlimit=no phase=no profilecalls=no profilecallstack=no trace=no mpitrace=no debugprof=no bgltimers=no sgitimers=no craytimers=no linuxtimers=no alphatimers=no cputime=no javacputime=no papiwallclock=no papivirtual=no use_pcxx=no use_hpcxx=no use_ansic=no use_sage2=no use_pstl=no use_hpnx=no tauarch=unknown pdtcompdir=unknown pdtarchdir=unknown tauprefix=unknown execprefix=unknown taugcclibdir=unknown tautoplevel= tauoptions= pdt_root_dir="." pdt=no vtf=no otf=no slog2=no internalslog2=no opari=no epilog=no epilogextralinkcmd= epiloglib=no epilogbin=no epiloginc=no epilogdir=no epiloglibdir=no epilogbindir=bin epilogincdir= vampirtrace=no opari_region=no opari_construct=no dyninst=no java=no openmp=no ibmxlc=no ibmxlc_r=no fortran_compiler=no ktau=no ktau_merge=no ktau_shctr=no ktauinc= ktauincuser= ktaulib= ktausym= catamount=no gpshmem=no stff=no stffdir= sddf=no sddfdir= # debug: # echo $arguments # Reset include/Makefile before starting anything else for i in include/Makefile do sed -f utils/FixMakefile.sed.default < ${i} > ${i}~~0 mv ${i}~~0 ${i} done # PARSE COMMAND LINE SWITCHES ############################################################### for arg in "$@"; do case $arg in -cc=*) myarg=`echo $arg | sed 's/-cc=//'` if [ $myarg = cc -o $myarg = gcc -o $myarg = KCC -o $myarg = pgcc -o $myarg = guidec -o $myarg = xlc -o $myarg = ecc -o $myarg = icc -o $myarg = powerpc64-linux-gcc -o $myarg = pathcc -o $myarg = fcc -o $myarg = orcc -o $myarg = qk-pgcc -o $myarg = scgcc -o $myarg = scpathcc -o $myarg = mips64el-gentoo-linux-gnu-gcc ] then c_compiler=$myarg else testxlc=`echo $myarg | sed -e 's/xlc//'` if [ "y$testxlc" = "y$myarg" ] then echo "WARNING: valid options for cc are 'cc', 'gcc', 'KCC', 'guidec', '*xlc*', 'ecc', 'icc', 'pathcc', 'fcc', 'orcc', 'qk-pgcc', and 'pgcc' " # exit 1 else c_compiler=$myarg fi fi shift ;; -c++=*) myarg=`echo $arg | sed 's/-c++=//'` if [ $myarg = CC -o $myarg = KCC -o $myarg = g++ -o $myarg = cxx -o $myarg = NCC -o $myarg = pgCC -o $myarg = egcs -o $myarg = FCC -o $myarg = guidec++ -o $myarg = aCC -o $myarg = c++ -o $myarg = ecpc -o $myarg = icpc -o $myarg = powerpc64-linux-g++ -o $myarg = pathCC -o $myarg = orCC -o $myarg = qk-pgCC -o $myarg = scg++ -o $myarg = scpathCC -o $myarg = mips64el-gentoo-linux-gnu-g++ ] then cxx_compiler=$myarg else testxlc=`echo $myarg | sed -e 's/xl//'` if [ "y$testxlc" = "y$myarg" ] then echo "WARNING: valid options for c++ are 'CC', 'KCC', 'g++', '*xlC*', 'cxx' , 'NCC', 'egcs', 'pgCC', 'FCC', 'guidec++', 'aCC', 'ecpc', 'icpc', 'pathCC', 'c++', 'qk-pgCC', and 'orCC'" # exit 1 else cxx_compiler=$myarg fi fi shift ;; -pdt_c++=*) pdt_cxx_full_path=`echo $arg | sed 's@-pdt_c++=@@g'` myarg=`echo $arg | echo $arg | sed 's@-pdt_c++=@@g' | sed 's@.*/@@g'` if [ $myarg = CC -o $myarg = KCC -o $myarg = g++ -o $myarg = cxx -o $myarg = NCC -o $myarg = pgCC -o $myarg = egcs -o $myarg = FCC -o $myarg = guidec++ -o $myarg = aCC -o $myarg = c++ -o $myarg = ecpc -o $myarg = icpc -o $myarg = powerpc64-linux-g++ -o $myarg = pathCC -o $myarg = orCC -o $myarg = qk-pgCC -o $myarg = scg++ -o $myarg = scpathCC -o $myarg = mips64el-gentoo-linux-gnu-g++ ] then pdt_cxx_compiler=$myarg else testxlc=`echo $myarg | sed -e 's/xl//'` if [ "y$testxlc" = "y$myarg" ] then echo "WARNING: valid options for pdt_c++ are 'CC', 'KCC', 'g++', '*xlC*', 'cxx' , 'egcs', 'pgCC', 'FCC', 'guidec++', 'aCC', 'c++', and 'orCC'" # exit 1 else pdt_cxx_compiler=$myarg fi fi shift ;; -fortran=*) myarg=`echo $arg | sed 's/-fortran=//'` if [ $myarg = gnu -o $myarg = sgi -o $myarg = ibm -o $myarg = ibm64 -o $myarg = hp -o $myarg = cray -o $myarg = pgi -o $myarg = absoft -o $myarg = fujitsu -o $myarg = sun -o $myarg = compaq -o $myarg = kai -o $myarg = hitachi -o $myarg = intel -o $myarg = nec -o $myarg = absoft -o $myarg = lahey -o $myarg = nagware -o $myarg = pathscale -o $myarg = gfortran -o $myarg = open64 ] then fortran_compiler=$myarg else echo "WARNING: valid options for fortran are 'gnu', 'sgi', 'ibm', 'ibm64', 'hp', 'cray', 'pgi', 'absoft', 'fujitsu', 'sun', 'compaq', 'kai', 'hitachi', 'intel', 'nec' , 'absoft', 'lahey', 'nagware', 'pathscale', 'gfortran', and 'open64'" exit 1 fi shift ;; -gnu) c_compiler=gcc cxx_compiler=g++ shift ;; -dec) c_compiler=cc cxx_compiler=g++ shift ;; -ibm) c_compiler=xlc_r cxx_compiler=xlC_r shift ;; -cfront) c_compiler=cc cxx_compiler=CC shift ;; -sgi) c_compiler=cc cxx_compiler=CC shift ;; -task) task=yes shift ;; -awe=*) awe=yes awedir=`echo $arg | sed -e 's/-awe=//'` shift ;; -tag=*) tag=yes tautag=`echo $arg | sed -e 's/-tag=//'` shift ;; -lwp) lwp=yes shift ;; -pthread=*) pthread=yes ptdir=`echo $arg | sed -e 's/-pthread=//'` shift ;; -pthread) pthread=yes shift ;; -papithread) papithread=yes shift ;; -charm=*) pthread=yes charm=yes charmdir=`echo $arg | sed -e 's/-charm=//'` shift ;; -COMPENSATE) compensate=yes shift ;; -ktau) ktau=yes shift ;; -ktau_merge) ktau_merge=yes shift ;; -ktau_shctr) ktau_shctr=yes shift ;; -ktauinc=*) ktauinc=`echo $arg | sed -e 's/-ktauinc=//' -e 's/ /#/g'` if [ ! -d $ktauinc ] then echo "Error: Cannot access KTAU include directory $ktauinc" exit 1 fi shift ;; -ktauincuser=*) ktauincuser=`echo $arg | sed -e 's/-ktauincuser=//' -e 's/ /#/g'` if [ ! -d $ktauincuser ] then echo "Error: Cannot access KTAU user include directory $ktauincuser" exit 1 fi shift ;; -ktaulib=*) ktaulib=`echo $arg | sed -e 's/-ktaulib=//' -e 's/ /#/g'` if [ ! -d $ktaulib ] then echo "Error: Cannot access KTAU user lib $ktaulib" exit 1 fi shift ;; -ktausym=*) ktausym=`echo $arg | sed -e 's/-ktausym=//' -e 's/ /#/g'` if [ ! -e $ktausym ] then echo "Warning: Cannot access KTAU Linux Kernel Symbol Table $ktausym locally (Does it exist on the compute nodes?). Continuing." fi shift ;; -muse) muse=yes shift ;; -muse_event) muse_event=yes shift ;; -muse_multiple) muse_multiple=yes shift ;; -nocomm) comm=no shift ;; -sproc) sproc=yes shift ;; -smarts) smarts=yes shift ;; -tulipthread=*) tulipthread=yes tulipdir=`echo $arg | sed -e 's/-tulipthread=//'` if [ ! -d $tulipdir ] then echo "Error: Cannot access TULIP directory $tulipdir" exit 1 fi shift ;; -pcl=*) pcl=yes pcldir=`echo $arg | sed -e 's/-pcl=//'` if [ ! -d $pcldir ] then echo "Error: Cannot access PCL directory $pcldir" exit 1 fi shift ;; -papi=*) papi=yes papidir=`echo $arg | sed -e 's/-papi=//'` if [ ! -d $papidir ] then echo "Error: Cannot access PAPI directory $papidir" exit 1 fi if [ -f $papidir/lib/libpfm.a ] then fixmakeargs="$fixmakeargs PAPIPFM" fi shift ;; -perfinc=*) perf=yes perfincdir=`echo $arg | sed -e 's/-perfinc=//'` if [ ! -d $perfincdir ] then echo "Error: Cannot access PERF include directory $perfincdir" exit 1 fi shift ;; -perflib=*) perf=yes perflibdir=`echo $arg | sed -e 's/-perflib=//'` if [ ! -d $perflibdir ] then echo "Error: Cannot access PERF lib directory $perflibdir" exit 1 fi shift ;; -perflibrary=*) perf=yes perflibrary=`echo $arg | sed -e 's/-perflibrary=//' -e 's/ /#/g'` shift ;; -opari=*) opari=yes oparidir=`echo $arg | sed -e 's/-opari=//'` if [ ! -d $oparidir ] then echo "Error: Cannot access OPARI directory $oparidir" exit 1 fi openmp=yes shift ;; -opari_region) opari_region=yes shift ;; -opari_construct) opari_construct=yes shift ;; -vampirtrace=*) vampirtrace=yes trace=yes vampirtracedir=`echo $arg | sed -e 's/-vampirtrace=//'` if [ ! -d $vampirtracedir ] then echo "Error: Cannot access VAMPIRTRACE directory $vampirtracedir" exit 1 fi shift ;; -epilog=*) epilog=yes trace=yes epilogdir=`echo $arg | sed -e 's/-epilog=//'` if [ ! -d $epilogdir ] then echo "Error: Cannot access EPILOG directory $epilogdir" exit 1 fi shift ;; -epiloglib=*) epilog=yes epiloglib=yes trace=yes epiloglibdir=`echo $arg | sed -e 's/-epiloglib=//'` shift ;; -epilogbin=*) epilog=yes epilogbin=yes trace=yes epilogbindir=`echo $arg | sed -e 's/-epilogbin=//'` shift ;; -epiloginc=*) epilog=yes epiloginc=yes trace=yes epilogincdir=`echo $arg | sed -e 's/-epiloginc=//'` shift ;; -pdt=*) pdt=yes pdtdir=`echo $arg | sed -e 's/-pdt=//'` if [ ! -d $pdtdir ] then echo "Error: Cannot access PDT directory $pdtdir" exit 1 fi shift ;; -vtf=*) vtf=yes trace=yes vtfdir=`echo $arg | sed -e 's/-vtf=//'` if [ ! -d $vtfdir ] then echo "Error: Cannot access VTF3 directory $vtfdir" exit 1 fi shift ;; -otf=*) otf=yes trace=yes otfdir=`echo $arg | sed -e 's/-otf=//'` if [ ! -d $otfdir ] then echo "Error: Cannot access OTF directory $otfdir" exit 1 fi shift ;; -dyninst=*) dyninst=yes dyninstdir=`echo $arg | sed -e 's/-dyninst=//'` if [ ! -d $dyninstdir ] then echo "Error: Cannot access DyninstAPI directory $dyninstdir" exit 1 fi shift ;; -openmp) openmp=yes shift ;; -jdk=*) java=yes jdkdir=`echo $arg | sed -e 's/-jdk=//'` if [ ! -d $jdkdir ] then echo "Error: Cannot access JDK directory $jdkdir" exit 1 fi jv=`$jdkdir/bin/java -version 2>&1 | grep version | awk '{ print $3; }'| sed -e s/\"//g` if [ `echo $jv | sed -e s/1.6\.*// | wc -c` -eq 1 ] || [ `echo $jv | sed -e s/1.7\.*// | wc -c` -eq 1 ] then echo "Error: Specify a JDK of version 1.5 or earlier" exit 1 fi shift ;; -slog2=*) slog2=yes trace=yes slog2dir=`echo $arg | sed -e 's/-slog2=//'` if [ ! -d $slog2dir ] then echo "Error: Cannot access SLOG2 directory $slog2dir" exit 1 fi shift ;; -slog2) slog2=yes trace=yes internalslog2=yes shift ;; -pcxxopt=*) pcxxopt=`echo $arg | sed -e 's/-pcxxopt=//' -e 's/ /_/g'` shift ;; -useropt=*) # Note you might be passed -g#-O3 which becomes -g -O3 orig_useropt=`echo $arg | sed -e 's/-useropt=//' -e 's/#/ /g'` # Note you might be passed -g -O3 which becomes -g#-O3 here useropt=`echo $arg | sed -e 's/-useropt=//' -e 's/ /#/g'` shift ;; -mpi) mpi=yes shift ;; -mpiinc=*) mpiinc=`echo $arg | sed -e 's/-mpiinc=//' -e 's/ /#/g'` if [ ! -d $mpiinc ] then echo "Error: Cannot access MPI include directory $mpiinc" exit 1 fi shift ;; -mpilib=*) mpilib=`echo $arg | sed -e 's/-mpilib=//' -e 's/ /#/g'` if [ ! -d $mpilib ] then echo "Error: Cannot access MPI lib directory $mpilib" exit 1 fi shift ;; -mpilibrary=*) # you may be passed -lmpich#-L/usr/opt/gm#-lgm#-lpthread#-ldl by installtau mpilibrary=`echo $arg | sed -e 's/-mpilibrary=//' -e 's/#/ /g'` shift ;; -shmem) shmem=yes shift ;; -shmeminc=*) shmeminc=`echo $arg | sed -e 's/-shmeminc=//' -e 's/ /#/g'` if [ ! -d $shmeminc ] then echo "Error: Cannot access SHMEM include directory $shmeminc" exit 1 fi shmem=yes shift ;; -shmemlib=*) shmemlib=`echo $arg | sed -e 's/-shmemlib=//' -e 's/ /#/g'` if [ ! -d $shmemlib ] then echo "Error: Cannot access SHMEM lib directory $shmemlib" exit 1 fi shmem=yes shift ;; -shmemlibrary=*) shmemlibrary=`echo $arg | sed -e 's/-shmemlibrary=//' -e 's/ /#/g'` shmem=yes shift ;; -stff=*) stffdir=`echo $arg | sed -e 's/-stff=//' -e 's/ /#/g'` if [ ! -d $stffdir ] ; then echo "Error: couldn't find RENCI STFF library in $stffdir" exit 1 fi stff=yes shift ;; -sddf=*) sddfdir=`echo $arg | sed -e 's/-sddf=//' -e 's/ /#/g'` if [ ! -d $sddfdir ] ; then echo "Error: couldn't find sddf library in $sddfdir" exit 1 fi sddf=yes shift ;; -pythoninc=*) pythoninc=`echo $arg | sed -e 's/-pythoninc=//' -e 's/ /#/g'` if [ ! -d $pythoninc ] then echo "Error: Cannot access Python include directory $pythoninc" exit 1 fi python=yes shift ;; -pythonlib=*) pythonlib=`echo $arg | sed -e 's/-pythonlib=//' -e 's/ /#/g'` if [ ! -d $pythonlib ] then echo "Error: Cannot access Python lib directory $pythonlib" exit 1 fi python=yes shift ;; -opt=*) pcxxopt=`echo $arg | sed -e 's/-opt=//' -e 's/ /_/g'` useropt="$pcxxopt" shift ;; -pcxx=*) use_pcxx=yes sage1dir=`echo $arg | sed -e 's/-pcxx=//' -e 's/ /_/g'` shift ;; -sage2=*) use_sage2=yes sage2dir=`echo $arg | sed -e 's/-sage2=//' -e 's/ /_/g'` shift ;; -hpcxx) use_hpcxx=yes shift ;; -hpcxx=*) use_hpcxx=yes sage2dir=`echo $arg | sed -e 's/-hpcxx=//' -e 's/ /_/g'` shift ;; -pstl=*) use_pstl=yes pstldir=`echo $arg | sed -e 's/-pstl=//' -e 's/ /_/g'` shift ;; -hpnx=*) use_hpnx=yes hpnxdir=`echo $arg | sed -e 's/-hpnx=//' -e 's/ /_/g'` shift ;; -tkfile=*) tcltkfile=`echo $arg | sed -e 's/-tkfile=//' -e 's/ /_/g'` shift ;; -ansic) use_ansic=yes shift ;; -PROFILE) profile=yes shift ;; -PROFILECOUNTERS) profile=yes profilecounters=yes shift ;; -MULTIPLECOUNTERS) multiplecounters=yes shift ;; -PROFILECALLS) profile=yes profilecalls=yes shift ;; -PROFILEPHASE) phase=yes shift ;; -PROFILECALLPATH) profile=yes callpath=yes shift ;; -PROFILEPARAM) profile=yes profileparam=yes shift ;; -DEPTHLIMIT) depthlimit=yes shift ;; -PROFILESTATS) profile=yes profilestats=yes shift ;; -PROFILEMEMORY) profile=yes profilememory=yes shift ;; -PROFILEHEADROOM) profile=yes profileheadroom=yes shift ;; -PROFILECALLSTACK) profile=yes profilecallstack=yes shift ;; -TRACE) trace=yes shift ;; -MPITRACE) mpitrace=yes shift ;; -MONITOR) monitor=yes shift ;; -DEBUGPROF) debugprof=yes shift ;; -BGLTIMERS) bgltimers=yes shift ;; -SGITIMERS) sgitimers=yes shift ;; -CRAYTIMERS) craytimers=yes shift ;; -LINUXTIMERS) linuxtimers=yes shift ;; -ALPHATIMERS) alphatimers=yes shift ;; -CPUTIME) cputime=yes shift ;; -JAVACPUTIME) javacputime=yes shift ;; -PAPIWALLCLOCK) papiwallclock=yes shift ;; -PAPIVIRTUAL) papivirtual=yes shift ;; -INTELCXXLIBICC) intelcxxlibicc=yes shift ;; -INTELTFLOP) inteltflop=yes shift ;; -noex) # NO exceptions to be used while building the lib. noex=yes shift ;; -setnode0) # When this option is invoked, TAU sets the default node no to 0 instead # of using -1. So, profile.0.0.0 is created even if TAU_PROFILE_SET_NODE(0) # is not called in the application. Do not use with tracing setnode0=yes shift ;; -help) echo "TAU Configuration Utility " echo "***********************************************************************" echo "Usage: configure [OPTIONS]" echo " where [OPTIONS] are:" echo "-c++= ............................ specify the C++ compiler." echo " options [CC|KCC|g++|*xlC*|cxx|pgCC|FCC|guidec++|aCC|c++|ecpc|" echo " icpc|scgcc|scpathCC|pathCC|orCC]." echo "-cc= ................................ specify the C compiler." echo " options [cc|gcc|scgcc|KCC|pgcc|guidec|*xlc*|ecc|pathcc|orcc]." echo "-pdt_c++= ............ specify a different PDT C++ compiler." echo " options [CC|KCC|g++|*xlC*|cxx|pgCC|FCC|guidec++|aCC|c++|ecpc|" echo " icpc|scgcc|pathCC|orCC]." echo "-pdtcompdir= . specify a different PDT compiler directory." echo "-pdtarchdir= . specify a different PDT architecture directory." echo "-fortran= ..................... specify the Fortran compiler." echo " options [gnu|sgi|ibm|ibm64|hp|cray|pgi|absoft|fujitsu|sun|compaq|" echo " open64|kai|nec|hitachi|intel|absoft|lahey|nagware|pathscale]" echo "-useropt='' ............... list of commandline parameters." echo "-prefix= ................ Specify a target installation directory." echo "-exec-prefix= .......... Specify a target architecture directory." echo "-arch= ................... Specify a target architecture." echo " options [xt3|bgl|ibm64|ibm64linux|sunx86_64 " echo " |solaris2-64|sgin32|sgi64|sgio32] " echo "-pthread .................................. Use pthread thread package." echo "-papithread .................................. Use PAPI thread package." echo "-charm= .............................. Use charm++ thread package." echo "-sproc .................................. Use SGI sproc thread package." echo "-tulipthread= .......... Specify location of Tulip/Smarts package." echo "-smarts .................. Use SMARTS API for threads (use with above)." echo "-openmp ........................................... Use OpenMP threads." echo "-opari=... Specify location of Opari OpenMP tool (use with above)." echo "-opari_region ......... Report performance data for all OpenMP regions." echo "-opari_construct ... Report performance data for all OpenMP constructs." echo "-pcl= ..... Specify location of PCL (Performance Counter Library)." echo "-papi= ............... Specify location of PAPI (Performance API)." echo "-pdt= ........ Specify location of PDT (Program Database Toolkit)." echo "-jdk= ...... Specify location of JAVA 2 Development Kit (jdk1.2+)." echo "-dyninst= ................... Specify location of DynInst Package." echo "-vtf= ......... Specify location of VTF3 Trace Generation Package." echo "-otf= ....... Specify location of Open Trace Format (OTF) Package." echo "-slog2= .......... Specify location of SLOG2 SDK/Jumpshot Package." echo "-slog2 ......... Specify use of TAU internal SLOG2 SDK/Jumpshot Package" echo "-mpi .......................... Specify use of TAU MPI wrapper library." echo "-mpiinc= ............. Specify location of MPI include dir and use" echo " the TAU MPI Profiling and Tracing Interface." echo "-mpilib= ............. Specify location of MPI library dir and use" echo " the TAU MPI Profiling and Tracing Interface." echo "-mpilibrary= ................ Specify a different MPI library." echo " e.g., -mpilibrary=-lmpi_r " echo "-shmem ...................... Specify use of TAU SHMEM wrapper library." echo "-shmeminc= ......... Specify location of SHMEM include dir and use" echo " the TAU SHMEM Profiling and Tracing Interface." echo "-shmemlib= ......... Specify location of SHMEM library dir and use" echo " the TAU MPI Profiling and Tracing Interface." echo "-shmemlibrary= ............ Specify a different SHMEM library." echo " e.g., -shmemlibrary=-lsmac " echo "-nocomm ........ Disable tracking communication events in MPI library." echo "-epilog= ............ Specify location of EPILOG Tracing package." echo "-epiloglib= ........... Specify full path to EPILOG lib directory." echo "-epilogbin= ........... Specify full path to EPILOG bin directory." echo "-epiloginc= ....... Specify full path to EPILOG include directory." echo "-vampirtrace= .. Specify location of VampirTrace Tracing package." echo "-pythoninc= ........ Specify location of Python include directory." echo "-pythonlib= ............ Specify location of Python lib directory." echo "-tag= ........ Specify a tag to identify the installation." echo "-perfinc= ............. Specify a Perflib[LANL] include directory." echo "-perflib= ................. Specify a Perflib[LANL] lib directory." echo "-perflibrary= ... Specify a different perflib runtime library." echo "-ktau ........................................... Kernel TAU Profiling." echo "-ktau_merge ........................ Kernel TAU Profiling with merging." echo " user-space profile." echo "-ktau_shctr ........................ Kernel TAU Profiling with shared- " echo " OS counters support." echo "-ktauinc= ............... Specify location of Linux Kernel source." echo "-ktauincuser= ............... Specify location of KTAU user incls." echo "-ktausym= ...... Specify location of Linux Kernel." echo " Symbol Table." echo "-muse ................................. Specify the use of MAGNET/MUSE." echo "-muse_event ............................Specify the use of MAGNET/MUSE." echo " w/ non-monotonically increasing values." echo "-muse_multiple ........................ Specify the use of MAGNET/MUSE." echo " w/ monotonically increasing values." echo "-stff= .... Location of RENCI Scalable Time-series filter library." echo "-sddf= ...... SDDF library location; Only required for RENCI STFF." echo "-TRACE ..................................... Generate TAU event traces." echo "-MPITRACE ... Generate event traces for MPI events and their ancestors." echo "-PROFILE ............ Generate profiles (summary statistics) (default)." echo "-PROFILECALLPATH ......................... Generate call path profiles." echo "-PROFILEPARAM .... Generate profiles with parameter mapped event data ." echo "-PROFILEPHASE .......................... Generate phase based profiles." echo "-PROFILESTATS .................. Enable standard deviation calculation." echo "-DEPTHLIMIT ........... Disable instrumentation beyond a certain depth." echo "-PROFILEMEMORY .. Track heap memory utilization at each function entry." echo "-PROFILEHEADROOM .. Track memory free (or headroom) at each func entry." echo "-MULTIPLECOUNTERS ............ Use multiple hardware counters and time." echo "-COMPENSATE ........ Compensate for profiling measurement perturbation." echo "-BGLTIMERS .... Use fast low-overhead timers on IBM BlueGene/L systems." echo "-SGITIMERS .......... Use fast nanosecond timers on SGI R10000 systems." echo "-CRAYTIMERS ............ Use fast nanosecond timers on Cray X1 systems." echo "-LINUXTIMERS ......... Use low overhead TSC Counter for wallclock time." echo "-CPUTIME .......... Use usertime+system time instead of wallclock time." echo "-JAVACPUTIME ...................... Use JVMPI thread specific cpu time." echo "-PAPIWALLCLOCK ........ Use PAPI to access wallclock time. Needs -papi." echo "-PAPIVIRTUAL .......... Use PAPI for virtual (user) time calculation." echo "-INTELCXXLIBICC ......... Use Intel -cxxlib-icc option for compiling." echo "-noex .................. Use no exceptions while compiling the library." echo "-help ...................................... display this help message." exit ;; -arch=*) tauarch=`echo $arg | sed -e 's/-arch=//' -e 's/ /_/g'` shift ;; -pdtcompdir=*) pdtcompdir=`echo $arg | sed -e 's/-pdtcompdir=//' -e 's/ /_/g'` shift ;; -pdtarchdir=*) pdtarchdir=`echo $arg | sed -e 's/-pdtarchdir=//' -e 's/ /_/g'` shift ;; -prefix=*) tauprefix=`echo $arg | sed -e 's/-prefix=//' -e 's/ /_/g'` echo "tauprefix = $tauprefix " fixmakeargs="$fixmakeargs tauprefix=$tauprefix" shift ;; -exec-prefix=*) execprefix=`echo $arg | sed -e 's/-exec-prefix=//' -e 's/ /_/g'` fixmakeargs="$fixmakeargs execprefix=$execprefix" shift ;; default) echo "Fixing Makefiles" ;; '') #echo "NULL switch!" # Required for HP/Compaq Tru64 machines. ;; *) echo "ERROR: Command line switch \`$arg' not recognized" 1>&2 exit 1 ;; esac done # -- set up portable echo command case "`echo 'x\c'`" in 'x\c') echo="echo -n" nnl= ;; #BSD x) echo="echo" nnl="\c";; #SysV *) echo 'Cannot setup echo. What weird machine do you have?' 1>2& exit 1;; esac # lth@cs.uoregon.edu: don't mess with the compiler if it is 'default'. # The user may define TAU_CCOM as an environment variable or let it be blank; # if blank, it is defaulted in archfind. if [ "$c_compiler" != "" -a "$c_compiler" != "default" ]; then TAU_CCOM="$c_compiler" # for 'archfind' export TAU_CCOM fi echo "-------------------- TAU configure script ---------------" tauroot=`pwd | sed -e 's,^/tmp_mnt/nfs,,' -e 's,^/tmp_mnt,,'` echo \#define TAUROOT \"$tauroot\" > include/tauroot.h if [ $tauprefix != unknown ] then echo \#define TAUROOT \"$tauprefix\" > include/tauroot.h fi echo " The TAU source code has just been configured to use the" echo " tau root directory $tauroot." echo " If you move the Tau distribution, you must either" echo " * set an environment variable TAUROOT containing the new" echo " location before running any TAU tools" echo " or" echo " * run configure again and recompile" echo "-----------------------------------------------------------------" fixmakeargs="$fixmakeargs tauroot=$tauroot" # Try and figure out architecture detectarch=unknown cd utils detectarch=`./archfind` detectxdev=`./archfind -x` detectspec=`./archfind -s` cd .. if [ "x$detectarch" = "x" ] then detectarch=unknown fi ############################################################### # if there are no arguments, GUESS at system configuration if [ $tauarch = unknown -o $tauarch = none ] then if [ $# = 1 ] then if [ $1 = default ] then machine=$1 fi else echo Attempting to auto-configure system, determining architecture... machine=$detectarch if [ $machine = unknown ] then echo I could not determine the architecture of this host echo You must give me a hint. echo Perhaps, the C compiler is not working. echo Please check the licenses. exit 0 fi echo I think this is a $machine... fi else machine=$tauarch if [ $detectarch != unknown -a $machine != unknown ] then detectxdev=$machine if [ $detectarch != $machine ] then echo WARNING\!\! Auto-detect:$detectarch overridden with $machine fi fi fi # use -m32 when specifying 32 bit on an Opteron/EM64T if [ "x$detectarch" = "xx86_64" -a "x$machine" = "xi386_linux" ] ; then fixmakeargs="$fixmakeargs FORCEIA32" fi ###################################################################### # If the default gcc/g++ is not used, Modify the Makefiles... # Choose the c++ and cc compiler case $machine in tc2000 | ksr1 | c90 | cray | t3e | crayx1 | craysv1) if [ $cxx_compiler = default ] then cxx_compiler=CC fi if [ $c_compiler = default ] then c_compiler=cc fi ;; nec) if [ $cxx_compiler = default ] then cxx_compiler=c++ fi if [ $c_compiler = default ] then c_compiler=cc fi ;; apple) if [ $cxx_compiler = default ] then cxx_compiler=g++ fi # To fix the make install clash with INSTALL file in file systems # that are case insensitive. Move INSTALL file to INSTALL.txt if [ -f INSTALL ] then mv INSTALL INSTALL.txt fi if [ $c_compiler = default ] then c_compiler=gcc fi ;; cygwin) if [ $cxx_compiler = default ] then cxx_compiler=g++ fi # To fix the make install clash with INSTALL file in file systems # that are case insensitive. Move INSTALL file to INSTALL.txt if [ -f INSTALL ] then mv INSTALL INSTALL.txt fi if [ $c_compiler = default ] then c_compiler=gcc fi ;; alpha) if [ $cxx_compiler = default ] then # If it has the HP/Compaq cxx compiler, use it if [ -d /lib/cmplrs/cxx ] then cxx_compiler=cxx else cxx_compiler=g++ fi c_compiler=cc fi if [ $c_compiler = default ] then c_compiler=gcc fi ;; rs6000 | ibm64) if [ $cxx_compiler = default ] then # If it has the IBM xlC compiler, use it if [ -f /usr/bin/xlC -o -f /usr/vacpp/bin/xlC ] then cxx_compiler=xlC_r c_compiler=xlc_r else cxx_compiler=g++ fi fi if [ $c_compiler = default ] then c_compiler=gcc fi ;; bgl) if [ $cxx_compiler = default ] then cxx_compiler=blrts_xlC c_compiler=blrts_xlc fi ;; xt3) if [ $cxx_compiler = default ] then cxx_compiler=qk-pgCC c_compiler=qk-pgcc fortran_compiler=pgi catamount=yes fi ;; hitachi) if [ $cxx_compiler = default ] then cxx_compiler=KCC c_compiler=cc fi if [ $fortran_compiler = no ] then fixmakeargs="$fixmakeargs HITACHI_FORTRAN" fortran_compiler=yes fi ;; sgi4k | sgi8k | sgin32 | sgi64) if [ $cxx_compiler = default ] then # SGI has no 64 bit C++ compiler except "CC", so if we are an # R8K, we have to use "CC" if [ $machine = sgi8k -o $machine = sgin32 -o $machine = sgi64 ] then cxx_compiler=CC c_compiler=cc else # We are an SGI R4K-based machine, use NCC if available if [ -f /bin/NCC ] then cxx_compiler=NCC c_compiler=cc else cxx_compiler=g++ fi fi fi if [ $c_compiler = default ] then c_compiler=gcc fi ;; *) if [ $cxx_compiler = default ] then cxx_compiler=g++ fi if [ $c_compiler = default ] then c_compiler=gcc fi ;; esac ###################################################################### # For template instantiations in the library -ptused for CC compilers if [ $machine = sgi8k -o $machine = sgin32 -o $machine = sgi64 ] then if [ $cxx_compiler = CC ] then fixmakeargs="$fixmakeargs SGICC" if [ $pdt = yes -a $pdt_cxx_compiler = default ] then fixmakeargs="$fixmakeargs PDTSGICC" fi fi fi if [ $machine = hitachi ] then fixmakeargs="$fixmakeargs HITACHI" fi if [ $machine = t3e -a $cxx_compiler = CC ] then fixmakeargs="$fixmakeargs CRAYCC" fi if [ $machine = crayx1 -o $machine = craysv1 -a $cxx_compiler = CC ] then fixmakeargs="$fixmakeargs CRAYX1CC" fi ###################################################################### # Set default Profiling Options in Makefiles if [ $profile = no -a $trace = no -a $mpitrace = no -a $machine != default ] then echo "-PROFILE and/or -TRACE should be specified. Choosing -PROFILE as the default" profile=yes fi if [ $profile = yes ] then fixmakeargs="$fixmakeargs PROFILE" fi if [ $java = yes ] then tauoptions="${tauoptions}-jdk" fi if [ $profilecalls = yes ] then fixmakeargs="$fixmakeargs PROFILECALLS" fi if [ $profilestats = yes ] then fixmakeargs="$fixmakeargs PROFILESTATS" fi if [ $profilememory = yes ] then fixmakeargs="$fixmakeargs PROFILEMEMORY" tauoptions="${tauoptions}-memory" fi if [ $profileheadroom = yes ] then fixmakeargs="$fixmakeargs PROFILEHEADROOM" tauoptions="${tauoptions}-headroom" fi if [ $tag = yes ] then tauoptions="${tauoptions}-${tautag}" fi if [ $callpath = yes ] then fixmakeargs="$fixmakeargs PROFILECALLPATH" tauoptions="${tauoptions}-callpath" fi if [ $profileparam = yes ] then fixmakeargs="$fixmakeargs PROFILEPARAM" tauoptions="${tauoptions}-param" fi if [ $depthlimit = yes ] then fixmakeargs="$fixmakeargs DEPTHLIMIT" tauoptions="${tauoptions}-depthlimit" fi if [ $phase = yes ] then fixmakeargs="$fixmakeargs PROFILECALLPATH PROFILEPHASE" tauoptions="${tauoptions}-phase" if [ $callpath = yes ] then echo "ERROR: Incompatible options specified." echo "You must choose between -PROFILECALLPATH and -PROFILEPHASE. You cannot choose both!!" exit 1 fi fi if [ $setnode0 = yes -a $trace = no ] then fixmakeargs="$fixmakeargs SETNODE0" tauoptions="${tauoptions}-setnode" fi if [ $comm = no ] then fixmakeargs="$fixmakeargs NOCOMM" tauoptions="${tauoptions}-nocomm" fi if [ $profilecallstack = yes ] then fixmakeargs="$fixmakeargs CALLSTACK" fi if [ $stff = yes ] then fixmakeargs="$fixmakeargs RENCI_STFF stffdir=${stffdir} sddfdir=${sddfdir}" tauoptions="${tauoptions}-stff" if [ $sddf = no -o "x$sddfdir" = "x" ]; then echo "Error: Must specify -sddf=/path/to/sddflib along with -stff=/path/to/stfflib!" fi fi if [ $trace = yes ] then cat < tau_type_test.c #include int main(int argc, char **argv) { if (sizeof(x_int8) != 1 || sizeof(x_int16) != 2 || sizeof(x_int32) != 4 || sizeof(x_int64) != 8) { return -1; } return 0; } EOF if [ $catamount = no -a ! $machine = bgl ] ; then $echo "Checking type sizes... ${nnl}" if $c_compiler -I. $orig_useropt tau_type_test.c -o tau_type_test 1> /dev/null 2>&1 ; then if ./tau_type_test 1> /dev/null 2>&1 ; then echo "ok" else echo "" echo "" echo "Warning: couldn't find correct type sizes!" echo "Please contact tau-bugs@cs.uoregon.edu with your system details" echo "" fi else echo "" echo "" echo "Warning: couldn't find correct type sizes!" echo "Please contact tau-bugs@cs.uoregon.edu with your system details" echo "" fi rm -f tau_type_test.c tau_type_test fi fixmakeargs="$fixmakeargs TRACE" fi if [ $mpitrace = yes ] then fixmakeargs="$fixmakeargs MPITRACE" fi if [ $monitor = yes ] then fixmakeargs="$fixmakeargs MONITOR" fi if [ $machine = sgi8k -o $machine = sgin32 -o $machine = sgi64 ] then if [ $profilecounters = yes ] then fixmakeargs="$fixmakeargs SGICOUNTERS" tauoptions="${tauoptions}-counters" fi fi if [ $linuxtimers = yes ] then fixmakeargs="$fixmakeargs LINUXTIMERS" tauoptions="${tauoptions}-linuxtimers" fi if [ $alphatimers = yes ] then fixmakeargs="$fixmakeargs ALPHATIMERS" tauoptions="${tauoptions}-alphatimers" fi if [ $machine = sgi8k -o $machine = sgin32 -o $machine = sgi64 ] then if [ $profilecounters = no -a $sgitimers = yes ] then fixmakeargs="$fixmakeargs SGITIMERS" tauoptions="${tauoptions}-sgitimers" fi fi if [ $bgltimers = yes ] then fixmakeargs="$fixmakeargs BGLTIMERS" tauoptions="${tauoptions}-bgltimers" fi if [ $craytimers = yes ] then fixmakeargs="$fixmakeargs CRAYTIMERS" tauoptions="${tauoptions}-craytimers" fi if [ $cputime = yes ] then fixmakeargs="$fixmakeargs CPUTIME" fi if [ $javacputime = yes ] then fixmakeargs="$fixmakeargs JAVACPUTIME" fi if [ $papiwallclock = yes ] then fixmakeargs="$fixmakeargs PAPIWALLCLOCK" tauoptions="${tauoptions}-papiwallclock" fi if [ $multiplecounters = yes ] then fixmakeargs="$fixmakeargs MULTIPLECOUNTERS" tauoptions="${tauoptions}-multiplecounters" if [ $profilecalls = yes -o $profilestats = yes -o $profilecounters = yes ] then echo "******** ERROR : -MULTIPLECOUNTERS option is incompatible with " echo "**************** -PROFILECOUNTERS, -PROFILECALLS, or -PROFILESTATS" echo "**************** Please reconfigure TAU without these." echo "******** EXITING .... " exit 1 fi fi if [ $papivirtual = yes ] then fixmakeargs="$fixmakeargs PAPIVIRTUAL" tauoptions="${tauoptions}-papivirtual" fi if [ $machine = sgi8k -o $machine = sgin32 -o $machine = sgi64 ] then if [ $cxx_compiler = g++ ] then fixmakeargs="$fixmakeargs SGIGNU" fi fi if [ $machine = freebsd ] then fixmakeargs="$fixmakeargs FREEBSD" fi if [ $machine = apple ] then if [ $cxx_compiler = g++ -o $cxx_compiler = c++ ] then fixmakeargs="$fixmakeargs APPLECXX" fi if [ $fortran_compiler = ibm -o $fortran_compiler = ibm64 ] then fixmakeargs="$fixmakeargs IBMXLFAPPLE" extradir=`which xlf90 | sed s/xlf90/../` fortran_compiler=yes fi # xlc++ doesn't like include/Memory. Move this directory if [ -d include/Memory -a ! -d include/MemoryWrapper ] then mv include/Memory include/MemoryWrapper else if [ -d include/Memory -a -d include/MemoryWrapper ] then /bin/rm -rf include/Memory fi fi fi if [ $machine = ppc64 -o $machine = bgl ] then if [ $cxx_compiler = g++ ] then if [ $fortran_compiler = no ] then extradir=`which xlf90 | sed s/xlf90/../` fixmakeargs="$fixmakeargs IBM_FORTRAN" fi fi fi if [ $machine = ibm64 -o $machine = ibm64linux ] then if [ $cxx_compiler = g++ -o $cxx_compiler = powerpc64-linux-g++ ] then if [ $fortran_compiler = no ] then extradir=`which xlf90 | sed s/xlf90/../` fixmakeargs="$fixmakeargs IBM64_FORTRAN" fi fi fi if [ $machine = t3e -a $cxx_compiler = KCC ] then fixmakeargs="$fixmakeargs CRAYKAI" if [ $fortran_compiler = no ] then fixmakeargs="$fixmakeargs CRAY_FORTRAN" fortran_compiler=yes fi fi if [ $machine = crayx1 -o $machine = craysv1 ] then if [ $fortran_compiler = no ] then fixmakeargs="$fixmakeargs CRAY_X1_FORTRAN" fortran_compiler=yes fi fi if [ $debugprof = yes ] then fixmakeargs="$fixmakeargs DEBUGPROF" fi if [ $inteltflop = yes ] then fixmakeargs="$fixmakeargs INTELTFLOP" fi ###################################################################### # Set default C++ compiler in all Makefiles case $cxx_compiler in CC) echo "Default C++ compiler will be CC" fixmakeargs="$fixmakeargs USE_CFRONT" ;; *g++) echo "Default C++ compiler will be " \ `gcc -v 2>&1 | tail -1 | sed 's/gcc/g++/g'` # No fixmakeargs needed because it is the default ;; egcs) echo "Default C++ compiler will be " \ `egcs -v 2>&1 | tail -1 | sed 's/gcc/egcs/g'` # No fixmakeargs needed because it is the default ;; cxx) echo "Default C++ compiler will be the HP Tru64 cxx C++ compiler" fixmakeargs="$fixmakeargs USE_DECCXX" if [ $fortran_compiler = no ] then f90loaded=`which f90 | sed -e 's/f90/../g' | grep "^no"` if [ "x$f90loaded" = "x" ] then # f90 module has been loaded and which f90 returns a path extradir="`which f90 | sed s/f90/../`" echo "Found f90 in `which f90`" fi fixmakeargs="$fixmakeargs COMPAQ_FORTRAN" fortran_compiler=yes fi ;; *xl*) echo "Default C++ compiler will be IBMs xlC C++ compiler" fixmakeargs="$fixmakeargs USE_IBMXLC" if [ "$machine" = "apple" ] then fixmakeargs="$fixmakeargs IBMXLCAPPLE" if [ $fortran_compiler = no ] then fixmakeargs="$fixmakeargs IBMXLFAPPLE" fi fi ibmxlc=yes compilerLocation=`which $cxx_compiler` if [ "x$compilerLocation" = "x/usr/bin/$cxx_compiler" ] ; then # if xlc or blrts_xlc is found in /usr/bin, it is likely a # symlink. Since we use ../lib to locate the libraries # we will dereference the symlink once. Don't do it more # than once, or you'll end up with the wrong thing # check for readlink first readlink=`which readlink` if [ "x$readlink" != "x" ] ; then if [ -x "$readlink" ] ; then if [ -h $compilerLocation ] ; then compilerLocation=`readlink $compilerLocation` fi fi fi fi extradircxx=`echo $compilerLocation | sed s/$cxx_compiler/../` extradir=`which xlf90 | sed s/xlf90/../` if [ $fortran_compiler = no ] then if [ "$machine" = "ibm64" -o "$machine" = "ibm64linux" ] then fixmakeargs="$fixmakeargs IBM64_FORTRAN" else fixmakeargs="$fixmakeargs IBM_FORTRAN" fi fortran_compiler=yes fi threadtest=`echo $cxx_compiler | sed -e 's/_r//'` if [ "y$threadtest" = "y$cxx_compiler" ] then echo "Not using the thread-safe version of the IBM compiler" else ibmxlc_r=yes fixmakeargs="$fixmakeargs THREADSAFE_COMPILERS" echo "Using thread-safe version of the IBM compiler" threadsafe=yes fi ;; NCC) echo "Default C++ compiler will be SGI's Delta C++ compiler" fixmakeargs="$fixmakeargs USE_SGINCC" ;; KCC) echo "Default C++ compiler will be KAI KCC C++ Compiler" kai=yes fixmakeargs="$fixmakeargs KAI" ;; pgCC) echo "Default C++ compiler will be PGI pgCC C++ Compiler" pgi=yes pgiflag=`pgCC -help | head -1 | grep 1.7 | wc -l` if [ $pgiflag = 1 ] then echo "Using PGI ver 1.7 Compiler" fixmakeargs="$fixmakeargs PGI PGI1.7" else fixmakeargs="$fixmakeargs PGI PGICC" fi if [ $fortran_compiler = no ] then extradir=`which pgCC | sed s/pgCC/../` fixmakeargs="$fixmakeargs PGI_FORTRAN" fortran_compiler=yes fi ;; FCC) echo "Default C++ compiler will be Fujitsu C++ Compiler" fujitsu=yes fixmakeargs="$fixmakeargs FUJITSU" if [ $fortran_compiler = no ] then extradir=`which FCC | sed s/FCC/../` fixmakeargs="$fixmakeargs FUJITSU_FORTRAN" fortran_compiler=yes fi if [ $machine = solaris2 -o $machine = solaris2-64 ] then extradir=`which FCC | sed s/FCC/../` fixmakeargs="$fixmakeargs FUJITSU_SOLARIS" fortran_compiler=yes fi ;; guidec++) echo "Default C++ compiler will be KAI KAP/Pro OpenMP guidec++ Compiler" kai=yes fixmakeargs="$fixmakeargs KAI GUIDE OPENMP" openmp=yes tauoptions="${tauoptions}-guide" if [ $fortran_compiler = no ] then fixmakeargs="$fixmakeargs KAI_FORTRAN" guidef90=yes fortran_compiler=yes fi ;; aCC) echo "Default C++ compiler will be HP aCC Compiler" fixmakeargs="$fixmakeargs ACC" tauoptions="${tauoptions}-acc" if [ $fortran_compiler = no ] then fixmakeargs="$fixmakeargs HP_FORTRAN" fortran_compiler=yes fi ;; orCC) echo "Default C++ compiler will ORC Open64 orCC compiler" fixmakeargs="$fixmakeargs OPEN64ORC" tauoptions="${tauoptions}-orcc" if [ $c_compiler = default ] then c_compiler=orcc fi if [ $fortran_compiler = no ] then fixmakeargs="$fixmakeargs OPEN64ORC_FORTRAN" fortran_compiler=yes fi if [ $openmp = yes ] then fixmakeargs="$fixmakeargs OPEN64_OPENMP" fi ;; c++) if [ $machine = nec ] then echo "Default C++ compiler will be NEC c++ compiler" fixmakeargs="$fixmakeargs USE_NECCXX" tauoptions="${tauoptions}-cxx" if [ $fortran_compiler = no ] then extradir=`which f90 | sed s/f90/../` fixmakeargs="$fixmakeargs NEC_FORTRAN" fortran_compiler=yes fi else echo "Default C++ compiler will be Apple c++ compiler" fixmakeargs="$fixmakeargs APPLECXX" tauoptions="${tauoptions}-cxx" fi ;; ecpc) echo "Default C++ compiler will be Intel ecpc C++ compiler" fixmakeargs="$fixmakeargs USE_INTELCXX" tauoptions="${tauoptions}-ecpc" intel=yes if [ $fortran_compiler = no ] then fixmakeargs="$fixmakeargs INTEL_FORTRAN" fortran_compiler=intel extradir=`which efc | sed s/efc/../` fi if [ $intelcxxlibicc = yes ] then fixmakeargs="$fixmakeargs INTELCXXLIBICC" fi ;; icpc) echo "Default C++ compiler will be Intel icpc C++ compiler" fixmakeargs="$fixmakeargs USE_INTELCXX" tauoptions="${tauoptions}-icpc" intel=yes if [ $fortran_compiler = no ] then fixmakeargs="$fixmakeargs INTEL32_FORTRAN" fortran_compiler=intel intelifort=`which ifort 2>/dev/null` if [ "y$intelifort" != "y" -a -x "$intelifort" ] then extradir=`which ifort | sed -e 's/\/bin\/ifort$//'` fi fi if [ $intelcxxlibicc = yes ] then fixmakeargs="$fixmakeargs INTELCXXLIBICC" fi ;; pathCC|scpathCC) echo "Default C++ compiler will be PathScale pathCC C++ compiler" fixmakeargs="$fixmakeargs USE_PATHCC" tauoptions="${tauoptions}-pathcc" pathscale=yes if [ $fortran_compiler = no ] then fixmakeargs="$fixmakeargs PATHSCALE_FORTRAN" fortran_compiler=pathscale fi ;; qk-pgCC) echo "Default C++ compiler will be PGI pgCC C++ Compiler" pgi=yes fixmakeargs="$fixmakeargs PGI PGICC" fixmakeargs="$fixmakeargs PGINOPRELINK" if [ $fortran_compiler = no ] then extradir=`which pgCC | sed s/pgCC/../` fixmakeargs="$fixmakeargs PGI_FORTRAN PGI_CATAMOUNT" fortran_compiler=yes fi ;; *) echo "ERROR Unknown C++ compiler" exit 1 ;; esac ###################################################################### # Set default F90 compiler in all Makefiles case $fortran_compiler in gnu) echo "Default Fortran compiler will be GNU g77" fixmakeargs="$fixmakeargs GNU_FORTRAN" ;; gfortran) echo "Default Fortran compiler will be GNU gfortran" fixmakeargs="$fixmakeargs GNU_GFORTRAN" ;; sgi) echo "Default Fortran compiler will be SGI f90" fixmakeargs="$fixmakeargs SGI_FORTRAN" ;; ibm) echo "Default Fortran compiler will be IBM xlf90" extradir=`which xlf90 | sed s/xlf90/../` fixmakeargs="$fixmakeargs IBM_FORTRAN" ;; ibm64) echo "Default Fortran compiler will be IBM xlf90 (64 bits)" extradir=`which xlf90 | sed s/xlf90/../` fixmakeargs="$fixmakeargs IBM64_FORTRAN" ;; hp) echo "Default Fortran compiler will be HP f90" extradir=`which f90 | sed s/f90/../` fixmakeargs="$fixmakeargs HP_FORTRAN" ;; cray) echo "Default Fortran compiler will be Cray f90" if [ $machine = crayx1 -o $machine = craysv1 ] then fixmakeargs="$fixmakeargs CRAY_X1_FORTRAN" else fixmakeargs="$fixmakeargs CRAY_FORTRAN" fi ;; pgi) echo "Default Fortran compiler will be PGI pgf90" extradir=`which pgCC | sed s/pgCC/../` fixmakeargs="$fixmakeargs PGI_FORTRAN" ;; absoft) echo "Default Fortran compiler will be Absoft f90" extradir="`which f90 | sed s/f90/../`" fixmakeargs="$fixmakeargs ABSOFT_FORTRAN" ;; fujitsu) echo "Default Fortran compiler will be Fujitsu F90" extradir=`which FCC | sed s/FCC/../` fixmakeargs="$fixmakeargs FUJITSU_FORTRAN" ;; nec) echo "Default Fortran compiler will be NEC f90" extradir=`which f90 | sed s/f90/../` fixmakeargs="$fixmakeargs NEC_FORTRAN" ;; lahey) echo "Default Fortran compiler will be Leahy lf95" extradir=`which lf95 | sed s/lf95/../` fixmakeargs="$fixmakeargs LAHEY_FORTRAN" ;; nagware) echo "Default Fortran compiler will be Nagware f95" extradir=`which f95 | sed s@\/f95@\/..@` fixmakeargs="$fixmakeargs NAGWARE_FORTRAN" ;; pathscale) echo "Default Fortran compiler will be Pathscale pathf90" extradir=`which pathf90 | sed s@\/pathf90@\/..@` if [ $cxx_compiler = scpathCC ] then extradir=`which scpathf90 | sed s@\/scpathf90@\/..@` fi fixmakeargs="$fixmakeargs PATHSCALE_FORTRAN" ;; sun) echo "Default Fortran compiler will be SUN f90" fixmakeargs="$fixmakeargs SUN_FORTRAN" ;; compaq) echo "Default Fortran compiler will be HP Tru64 f90" f90loaded=`which f90 | sed -e 's/f90/../g' | grep "^no"` if [ "x$f90loaded" = "x" ] then # f90 module has been loaded and which f90 returns a path extradir="`which f90 | sed s/f90/../`" echo "Found f90 in `which f90`" fi fixmakeargs="$fixmakeargs COMPAQ_FORTRAN" ;; kai) echo "Default Fortran compiler will be KAI guidef90" fixmakeargs="$fixmakeargs KAI_FORTRAN" guidef90=yes ;; open64) echo "Default Fortran compiler will be ORC Open64 orf90" fixmakeargs="$fixmakeargs OPEN64ORC_FORTRAN" ;; intel) if [ $cxx_compiler = ecpc ] then echo "Default Fortran compiler will be Intel efc" fixmakeargs="$fixmakeargs INTEL_FORTRAN" else echo "Default Fortran compiler will be Intel ifort" fixmakeargs="$fixmakeargs INTEL32_FORTRAN" intelifort=`which ifort 2>/dev/null` if [ "y$intelifort" != "y" -a -x "$intelifort" ] then extradir=`which ifort | sed -e 's/\/bin\/ifort$//'` fi fi ;; no) ;; *) ;; esac ###################################################################### # Set MPI options. First set the include dir if it is not specified if [ $mpi = yes -a $machine = ibm64 ] then ibmxlc_r=yes echo "Enabling threaded MPI libraries for IBM64" if [ $threadsafe = no ] then fixmakeargs="$fixmakeargs THREADSAFE_COMPILERS" threadsafe=yes fi fi if [ $mpi = yes -a "x$mpiinc" = "x" ] then case $machine in rs6000|ibm64) mpiinc=/usr/lpp/ppe.poe/include mpiincf90dir='-I/usr/lpp/ppe.poe/include/thread' if [ $machine = ibm64 ] then mpiincf90dir='-I/usr/lpp/ppe.poe/include/thread64' fi if [ $ibmxlc_r = yes ] then additional_mpiincs='-I/usr/lpp/ssp/css/include' fi additional_mpiincs="$additional_mpiincs $mpiincf90dir" ;; bgl) mpiinc=/bgl/BlueLight/ppcfloor/bglsys/include ;; i386_linux) mpiinc=/usr/local/packages/mpich/include ;; t3e|crayx1|craysv1) mpiinc=/opt/ctl/mpt/mpt/include ;; xt3) mpiinc=/opt/xt-mpt/default/mpich2-64/P2/include ;; solaris2*) mpiinc=/opt/SUNWhpc/include ;; *) ;; esac fi # Add threaded include dir to the MPI include dir for IBM if [ "x$mpiinc" != "x" ] then case $machine in rs6000) if [ -d /usr/lpp/ppe.poe/include/thread ] then mpiincf90dir='-I/usr/lpp/ppe.poe/include/thread' fi if [ $ibmxlc_r = yes ] then additional_mpiincs='-I/usr/lpp/ssp/css/include' fi additional_mpiincs="$additional_mpiincs $mpiincf90dir" ;; ibm64) if [ -d /usr/lpp/ppe.poe/include/thread64 ] then mpiincf90dir='-I/usr/lpp/ppe.poe/include/thread64' fi if [ $ibmxlc_r = yes ] then additional_mpiincs='-I/usr/lpp/ssp/css/include' fi additional_mpiincs="$additional_mpiincs $mpiincf90dir" ;; *) ;; esac fi if [ $mpi = yes -a "x$mpilib" = "x" ] then case $machine in rs6000|ibm64) mpilib=/usr/lpp/ppe.poe/lib if [ $ibmxlc_r = yes ] then additional_mpilibs='-L/usr/lpp/ppe.poe/lib/threads -L/usr/lpp/ssp/css/lib -llapi_r' fi ;; bgl) mpilib=/bgl/BlueLight/ppcfloor/bglsys/lib additional_mpilibs='-lmsglayer.rts -ldevices.rts -lrts.rts -ldevices.rts' ;; i386_linux) mpilib=/usr/local/packages/mpich ;; sgin32 | sgi8k) mpilib=/usr/lib32 ;; sgi64) mpilib=/usr/lib64 ;; sgio32) mpilib=/usr/lib ;; t3e|crayx1|craysv1) mpilib=/opt/ctl/mpt/mpt/lib/ ;; xt3) mpilib=/opt/xt-mpt/default/mpich2-64/P2/lib ;; alpha) mpilib=/usr/lib ;; solaris2*) mpilib=/opt/SUNWhpc/lib ;; *) mpilib=/usr/lib ;; esac fi # Next, check the properties of the MPI implementation. if [ "x$mpiinc" != "x" -o "x$mpilib" != "x" -o $mpi = yes ] then #echo "MPI is specified" mpi=yes fixmakeargs="$fixmakeargs MPI" tauoptions="${tauoptions}-mpi" mpicompiler=$cxx_compiler msuf=C if [ $machine = t3e ] then mpicompiler=$c_compiler msuf=c fi cat < mpi_thread_test.$msuf #include int main(int argc, char **argv) { int ret, req, provided; ret = PMPI_Init_thread(&argc, &argv, req, &provided); return ret; } EOF if [ "x$mpiinc" != "x" ] then # echo "mpiinc is specified" mpi_include=-I$mpiinc fi cat < mpi2.$msuf #include int foo(MPI_Win win) { int ret; ret = MPI_Win_fence(MPI_MODE_NOPRECEDE, win); return ret; } EOF cat < mpi2iorequest.$msuf #include int foo (MPI_File fh, void *buf, int count, MPI_Datatype datatype, MPIO_Request *request) { return MPI_File_iread_shared (fh, buf, count, datatype, request); } EOF cat < mpi2attr.$msuf #include int foo(MPI_Win_copy_attr_function *f1, MPI_Type_copy_attr_function *f2, MPI_Comm_copy_attr_function *f3) { return 0; } int MPI_Type_get_attr(MPI_Datatype type, int type_keyval, void *attribute, int *flag) { return PMPI_Type_get_attr(type, type_keyval, attribute, flag); } EOF cat < mpi2typeex.$msuf #include int f1( void * sendbuf, void * recvbuf, int count, MPI_Datatype datatype , MPI_Op op, MPI_Comm comm) { return MPI_Exscan( sendbuf, recvbuf, count, datatype, op, comm) ; } int f2( MPI_Datatype type, MPI_Datatype * newtype) { return MPI_Type_dup( type, newtype) ; } int f3( int p, int r, MPI_Datatype * newtype) { return MPI_Type_create_f90_real( p, r, newtype) ; } int f4( int p, int r, MPI_Datatype * newtype) { return MPI_Type_create_f90_complex( p, r, newtype) ; } EOF cat < mpi2add.$msuf #include int f1( int * errorclass) { return MPI_Add_error_class( errorclass) ; } int f2( char * datarep, int incount, MPI_Datatype datatype, MPI_Aint * size) { return MPI_Pack_external_size( datarep, incount, datatype, size) ; } EOF cat < mpi2grequest.$msuf #include int foo(MPI_Grequest_query_function *grequest_query_fn, MPI_Grequest_free_function *grequest_free_fn, MPI_Grequest_cancel_function *grequest_cancel_fn, void *extra_state, MPI_Request *request) { return MPI_Grequest_start(grequest_query_fn, grequest_free_fn, grequest_cancel_fn, extra_state, request); } int bar(MPI_Request request) { return MPI_Grequest_complete(request); } EOF cat < mpi2datarep.$msuf #include int foo( char * datarep, MPI_Datarep_conversion_function * read_conversion_fn, MPI_Datarep_conversion_function * write_conversion_fn, MPI_Datarep_extent_function * dtype_file_extent_fn, void * extra_state) { return MPI_Register_datarep( datarep, read_conversion_fn, write_conversion_fn, dtype_file_extent_fn, extra_state); } EOF cat < mpi2errhandler.$msuf #include int foo (MPI_Comm_errhandler_fn *a, MPI_Errhandler *b) { return MPI_Comm_create_errhandler(a,b); } int bar (MPI_File_errhandler_fn * function, MPI_Errhandler * errhandler) { return MPI_File_create_errhandler(function, errhandler); } EOF cat < mpi2hpconst.$msuf #include /* HP MPI uses const char * instead of char * in the prototypes of the following routines */ int foo(MPI_Info Info, const char *key, const char *value) { return PMPI_Info_set(Info, key, value); } int f1(MPI_Info a, const char * b, int c, char * d, int *e) { return PMPI_Info_get(a,b,c,d,e); } int f2(MPI_Info a, const char *b) { return PMPI_Info_delete(a,b); } int MPI_Info_get_valuelen(MPI_Info a, const char * b, int * c, int * d) { /* above decl triggers an error on T3E */ return PMPI_Info_get_valuelen(a,b,c,d); } EOF cat << EOF > mpistatus.$msuf #include #include int foo(MPI_Fint *status) { MPI_Status s; return MPI_Status_f2c(status, &s); } EOF if [ $machine = sgi64 -a $cxx_compiler = CC ] then orig_useropt="$orig_useropt -64" fi if $mpicompiler $orig_useropt $mpi_include -c mpi_thread_test.$msuf 1> /dev/null 2>&1 then echo "Thread-safe MPI interface is defined... " fixmakeargs="$fixmakeargs MPI_THREADED" fi if [ -d "$mpiinc/ulm" ] ; then echo "LA-MPI detected, working around broken MPI_Request_c2f()" fixmakeargs="$fixmakeargs LAMPI" fi if $mpicompiler $orig_useropt $mpi_include -c mpi2.$msuf 1> /dev/null 2>&1 then echo "MPI-2 Interface is defined..." # Wait don't enable this for SGI Altix. Their MPI2 is not complete if [ -r $mpilib/libmpi.so -a -r $mpilib/libmpi++.so -a -r $mpilib/libsma.so -a -r $mpilib/libxmpi.so ] then 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 # Wait. Scali does not use MPI2 PMPI interface properly. echo "Scali MPI detected. Disabling MPI2 wrappers for Scali MPI" elif [ -r $mpilib/liblam.a -o -r $mpilib/liblam.la ] then # Wait. LAM MPI's MPI2 PMPI interface is broken. echo "LAM MPI detected. Disabling MPI2 wrappers for LAM MPI" else fixmakeargs="$fixmakeargs MPI2" mpi2=yes fi fi if $mpicompiler $orig_useropt $mpi_include -c mpi2grequest.$msuf 1> /dev/null 2>&1 then if [ $mpi2 = yes ] then echo "MPI-2 Grequest Interface is defined..." fixmakeargs="$fixmakeargs MPIGREQUEST" fi fi if [ -f $mpilib/liblam.a -o -f $mpilib/liblammpi++.a ] ; then if $mpicompiler $orig_useropt $mpi_include -c mpi2iorequest.$msuf 1> /dev/null 2>&1 then if [ $mpi2 = yes ] then echo "MPI-2 MPIO_Request Interface is defined..." fixmakeargs="$fixmakeargs MPIOREQUEST" mpiio=yes fi fi fi if $mpicompiler $orig_useropt $mpi_include -c mpi2datarep.$msuf 1> /dev/null 2>&1 then if [ $mpi2 = yes ] then echo "MPI-2 MPI_Datarep_conversion_function Interface is defined..." fixmakeargs="$fixmakeargs MPIDATAREP" fi fi if $mpicompiler $orig_useropt $mpi_include -c mpi2errhandler.$msuf 1> /dev/null 2>&1 then if [ $mpi2 = yes ] then echo "MPI-2 Comm_create_errhandler Interface is defined..." fixmakeargs="$fixmakeargs MPIERRHANDLER" fi fi if $mpicompiler $orig_useropt $mpi_include -c mpi2hpconst.$msuf 1> /dev/null 2>&1 then if [ $mpi2 = yes ] then echo "MPI-2 MPI_Info_set takes const char * instead of char * args" fixmakeargs="$fixmakeargs MPICONSTCHAR" fi fi if $mpicompiler $orig_useropt $mpi_include -c mpi2attr.$msuf 1> /dev/null 2>&1 then echo "MPI-2 MPI*attr_functions are defined..." fixmakeargs="$fixmakeargs MPIATTR" fi if $mpicompiler $orig_useropt $mpi_include -c mpi2typeex.$msuf 1> /dev/null 2>&1 then echo "MPI-2 MPI_Type_dup and MPI_Exscan are defined..." fixmakeargs="$fixmakeargs MPITYPEEX" fi if $mpicompiler $orig_useropt $mpi_include -c mpi2add.$msuf 1> /dev/null 2>&1 then echo "MPI-2 MPI_Add_error* functions are defined..." fixmakeargs="$fixmakeargs MPIADDERROR" fi if $mpicompiler $orig_useropt $mpi_include -c mpistatus.$msuf 1> /dev/null 2>&1 then echo "MPI_Status f2c/c2f found..." else echo "MPI_Status c2f/f2c functions are needed" fixmakeargs="$fixmakeargs MPINEEDSTATUSCONV" fi /bin/rm -rf mpi_thread_test.$msuf mpi_thread_test.o mpi2.$msuf mpi2.o mpi2iorequest.o mpi2iorequest.$msuf mpi2grequest.o mpi2grequest.$msuf mpi2datarep.$msuf mpi2datarep.o mpi2errhandler.o mpi2errhandler.$msuf mpi2hpconst.o mpi2hpconst.$msuf mpi2attr.o mpi2attr.$msuf mpi2typeex.o mpi2typeex.$msuf mpi2add.o mpi2add.$msuf mpistatus.o mpistatus.$msuf else fixmakeargs="$fixmakeargs mpiincargs=$mpiincargs mpilibargs=$mpilibargs mpiflibargs=$mpiflibargs mpilib=$mpilib" fi if [ "x$mpiinc" != "x" ] then # Check for OpenMPI and add additional include directory if [ -d $mpiinc/openmpi ] then echo "NOTE: Using OpenMPI" additional_mpiincs="-I$mpiinc/openmpi/ompi -I$mpiinc/openmpi" fi if [ -d $mpiinc ] then #echo "Include dir found. adding -I$mpiinc to INC" mpiincargs="$mpiincargs -I$mpiinc $additional_mpiincs" mpiincargs=`echo $mpiincargs | sed -e 's/ /#/g'` fixmakeargs="$fixmakeargs mpiincargs=$mpiincargs" fi fi if [ $tauprefix != unknown ] then tautoplevel=$tauprefix else tautoplevel=$tauroot fi if [ $perf = yes ] then fixmakeargs="$fixmakeargs PERFLIB" tauoptions="${tauoptions}-perf" if [ "x$perfincdir" != "x" ] then fixmakeargs="$fixmakeargs perfincdir=$perfincdir" fi if [ "x$perflibdir" != "x" ] then fixmakeargs="$fixmakeargs perflibdir=$perflibdir" fi if [ "x$perflibrary" != "x" ] then fixmakeargs="$fixmakeargs perflibrary=$perflibrary" else if [ -f $perflibdir/libpapi.a ] then perflibrary="-lperfrt#-lpapi" else perflibrary="-lperfrt" fi fixmakeargs="$fixmakeargs perflibrary=$perflibrary" fi fi if [ $epilog = yes -a $epiloginc = no -a $epilogdir != no ] then if [ -f $epilogdir/include/elg_rw.h ] then epilogincdir=$epilogdir/include else epilogincdir=$epilogdir/src fi fi if [ $epilog = yes -a $epilogbin = no -a $epilogdir != no ] then if [ -f $epilogdir/bin/opari ] then epilogbindir=$epilogdir/bin else epilogbindir=$epilogdir/src fi fi if [ $epilog = yes -a $epiloglib = no -a $epilogdir != no ] then if [ -f $epilogdir/lib/libelg.base.a ] then epiloglibdir=$epilogdir/lib elif [ -f $epilogdir/src/libelg.base.a ] then epiloglibdir=$epilogdir/src elif [ -f $epilogdir/lib/be/libelg.base.a ] then epiloglibdir=$epilogdir/lib/be elif [ -f $epilogdir/lib/fe/libelg.base.a ] then epiloglibdir=$epilogdir/lib/fe elif [ -f $epilogdir/lib64/libelg.base.a ] then epiloglibdir=$epilogdir/lib64 elif [ -f $epilogdir/lib32/libelg.base.a ] then epiloglibdir=$epilogdir/lib32 else echo "ERROR: PLEASE SPECIFY A VALID -epiloglib= option." fi fi if [ $mpi = yes ] then wrapperlib="-L$tautoplevel/$machine/lib -lTauMpi\$(TAU_CONFIG)" if [ $epilog = yes -a $mpi = yes ] then wrapperlib="-L$epiloglibdir -lelg.mpi" # if [ -f $epilogbindir/kconfig -a $epiloglib = no ] # then # echo "NOTE: Using kconfig to determine libs used in Scalasca/Epilog" # wrapperlib=`$epilogbindir/kconfig --libs` # fi if [ $openmp = yes ] then wrapperlib="-L$epiloglibdir -lelg.ompi" fi fi if [ $vampirtrace = yes -a $mpi = yes ] then if [ -f $vampirtracedir/lib/libvt.mpi.a ] then vampirtracelibdir=lib else vampirtracelibdir=vtlib fi if [ $vampirtrace = yes -a -f $vampirtracedir/lib/libvt.fmpi.a -o -f $vampirtracedir/vtlib/libvt.fmpi.a ] then vtfortranwrapper="-lvt.fmpi" fi wrapperlib="-L$tautoplevel/$machine/lib -ltau\$(TAU_CONFIG) -L$vampirtracedir/$vampirtracelibdir $vtfortranwrapper -lvt.mpi -lotf -lz" if [ $openmp = yes ] then # should we have a -lvt.fmpi here? wrapperlib="-L$tautoplevel/$machine/lib -ltau\$(TAU_CONFIG) -L$vampirtracedir/$vampirtracelibdir -lvt.ompi -lotf -lz" fi fi if [ $perf = yes ] then wrapperlib="-L$\(PERFLIBDIR) \$(PERFLIBRARY)" fi mpilibargs=$wrapperlib if [ -d $mpilib ] then #echo "Lib dir found. adding -L$mpilib to LIB" mpilibargs="$mpilibargs -L$mpilib" if [ -r $mpilib/libmpi_r.a -a -r $mpilib/libmpi.a ] then fixmakeargs="$fixmakeargs IBMMPI" ibmmpi=yes fi if [ -f $mpilib/libfmpi.a -o -f $mpilib/libfmpi.so ] then #echo "Fortran fmpi.* found" mpiflibargs="-L$mpilib -lfmpi $wrapperlib" else if [ $epilog = yes -a -f $epiloglibdir/libfmpi.a ] then mpiflibargs="$wrapperlib -lfmpi" fi if [ -f $mpilib/libfmpich.a -o -f $mpilib/libfmpich.so ] then #echo "Fortran fmpich.* found" if [ $mpi2 = "yes" ] ; then #mpich2, must not use -lfmpich if [ -f /usr/lib/librt.a ] ; then # mpich2 uses librt for aio_* routines mpiflibargs="-L$mpilib $wrapperlib -lrt" mpilibargs="$mpilibargs -lrt" else mpiflibargs="-L$mpilib $wrapperlib" fi else #mpich1, must use -lfmpich mpiflibargs="-L$mpilib -lfmpich $wrapperlib" fi # Does MPI_Init have weak bindings for Fortran (Infiniband MPI) weakmpi=T # by default it has a T for defined symbol in nm output */ weakmpi=`nm $mpilib/libfmpich.a | grep mpi_init | awk '{ print $2 ; }' | head -n 1 ` if [ "x$weakmpi" = "xW" ] then echo "MPI has weak bindings for mpi_init Fortran bindings..." fixmakeargs="$fixmakeargs WEAKMPIINIT" fi else if [ -f $mpilib/liblamf77mpi.a -o -f $mpilib/liblamf77mpi.so ] ; then #echo "Fortran liblamf77mpi.* found" mpiflibargs="-L$mpilib -llamf77mpi $wrapperlib" else #echo "No Fortran interface found" mpiflibargs="$mpiflibargs $wrapperlib -L$mpilib" fi fi fi #echo "mpilibargs = $mpilibargs" # Cases if [ -r $mpilib/libmpi.a -o -r $mpilib/libmpi.so ] then #echo "libmpi.* found!!" if [ $mpilibrary = no ] then mpilibrary=-lmpi if [ -r $mpilib/libmpi++.so ] then mpilibrary='-lmpi -lmpi++' # SGI MPT fi # OpenMPI if [ -r $mpilib/libmpi_cxx.so ] then mpilibrary='-lmpi -lmpi_cxx' fi # See if threaded MPI should be used on AIX if [ $ibmxlc_r = yes -a -r $mpilib/libmpi_r.a ] then mpilibrary="-lmpi_r $additional_mpilibs" # echo "mpilibrary=$mpilibrary" fi fi if [ -r $mpilib/libpmpi.a -o -r $mpilib/libpmpi.so ] then #echo "libpmpi.* found " mpilibargs="$mpilibargs -lpmpi $mpilibrary" mpiflibargs="$mpiflibargs -lpmpi $mpilibrary" else #echo "libpmpi.* not found -lmpi probably contains PMPI routines" mpilibargs="$mpilibargs $mpilibrary" mpiflibargs="$mpiflibargs $mpilibrary" fi else #echo "libmpi.* not found!! Checking for mpich.*..." if [ -r $mpilib/libmpich.*a -o -r $mpilib/libpmpich.so ] then fixmakeargs="$fixmakeargs MPICH_IGNORE_CXX_SEEK" #echo "MPICH found " if [ "x$mpilibrary" = "xno" ] then if [ -r $mpilib/libmpich.rts.a ] then # For BG/L mpilibrary="-lmpich.rts $additional_mpilibs" else mpilibrary=-lmpich fi fi if [ -r $mpilib/libpmpich++.a -o -r $mpilib/libpmpich++.so ] then #echo "pmpich++ found" mpilibrary="-lpmpich++ $mpilibrary" fi if [ -r $mpilib/libmpichcxx.a -o -r $mpilib/libmpichcxx.so ] then #echo "mpichcxx found" mpilibrary="-lmpichcxx $mpilibrary" fi if [ -r $mpilib/libpmpich.a -o -r $mpilib/libpmpich.so ] then #echo "pmpich found" mpilibargs="$mpilibargs -lpmpich $mpilibrary" mpiflibargs="$mpiflibargs -lpmpich $mpilibrary" else #echo "pmpich not found" mpilibargs="$mpilibargs $mpilibrary" mpiflibargs="$mpiflibargs $mpilibrary" fi if [ -r /usr/lib/librt.a -o -r /usr/lib/librt.so ] then #echo "librt found" mpilibargs="$mpilibargs -lrt" mpiflibargs="$mpiflibargs -lrt" fi fi fi # libmpi.* found. But libpmpi* not found. # both found. # libmpi.* not found - look for libmpich.* # For fortran libfmpich.* look for libpmpi # Check for libmpio.a if [ -r $mpilib/libmpio.a ] then mpilibargs="$mpilibargs -lmpio" mpiflibargs="$mpiflibargs -lmpio" fi # Special check for LAM MPI if [ -r $mpilib/liblam.a ] then echo "This looks like a LAM MPI installation. Adding -llam to link command line" if [ -r $mpilib/liblammpi++.a ] ; then mpilibargs="$mpilibargs -llammpi++ -lmpi" mpiflibargs="$mpiflibargs -llammpi++ -lmpi" fi mpilibargs="$mpilibargs -llam" mpiflibargs="$mpiflibargs -llam" if [ -f /usr/lib/libutil.a ] then # This is a Linux box, add -lutil to the mpi libraries echo "Adding -lutil to link command line for LAM MPI" mpilibargs="$mpilibargs -lutil -ldl -lpthread" mpiflibargs="$mpiflibargs -lutil -ldl -lpthread" fi fi # Special check for Intel MPI if [ -r $mpilib/libmpiif.a ] then echo "This looks like an Intel MPI installation." mpilibargs="$mpilibargs -lmpiif -ldl -lrt" mpiflibargs="$mpiflibargs -lmpiif -ldl -lrt" fi # Special check for HPMPI if [ -r $mpilib/libmpi_hmp.a ] then echo "This looks like an HP/MPI installation." mpilibargs="$mpilibargs -ldl" mpiflibargs="$mpiflibargs -ldl" fi # Special check for ChaMPIon/Pro if [ -r $mpilib/libcmpi.a ] then echo "This looks like a ChaMPIon/Pro installation." mpiextraargs=`cmpicc -v -echo | cut -c8- ` mpilibargs="$mpilibargs $mpiextraargs" mpiflibargs="$mpiflibargs $mpiextraargs -lcmpi_fort" fi # Special check for VMI [NCSA] MPICH if [ -r $mpilib/libvmi.a ] then echo "This looks like a VMI MPICH installation. Adding -lvmi -lpthread -ldl to link command line" mpilibargs="$mpilibargs -lvmi -lpthread -ldl" mpiflibargs="$mpiflibargs -lvmi -lpthread -ldl" fi mpilibargs=`echo $mpilibargs | sed -e 's/ /#/g'` mpiflibargs=`echo $mpiflibargs | sed -e 's/ /#/g'` #echo "mpiincargs= $mpiincargs" #echo "mpilibargs= $mpilibargs" #echo "mpiflibargs= $mpiflibargs" fixmakeargs="$fixmakeargs mpilibargs=$mpilibargs mpiflibargs=$mpiflibargs mpilib=$mpilib" # Check to see if the MPI library contains a _r mpithreadtest=`echo $mpilibrary | sed -e 's/_r//'` if [ "y$mpithreadtest" = "y$mpilibrary" ] then echo "NOTE: MPI library does not have a threaded _r suffix " else echo "NOTE: MPI library has a threaded _r suffix " fixmakeargs="$fixmakeargs MPI_R_SUFFIX" fi # mpi _r check fi # If -d mpilib fi # if mpilib is specified ###################################################################### # Set default CC compiler in all Makefiles if [ "$mpi" = "yes" -a "$ibmxlc_r" = "no" -a "$ibmxlc" = "yes" -a "$machine" = "ibm64" ] then echo "WARNING: PLEASE use xlC_r instead of xlC with MPI in 64 bit mode!! Reconfigure." echo "----------------------------------------------------------------" fi # Now check for SHMEM options if [ $shmem = yes ] then if [ "x$shmeminc" != "x" ] then if [ -d $shmeminc ] then #echo "Include dir found. adding -I$mpiinc to INC" shmemincargs="-I$shmeminc" gpshmem=no if [ -r $shmeminc/gpshmem.h ] then fixmakeargs="$fixmakeargs GPSHMEM" gpshmem=yes fi fi else if [ $catamount = yes ] then shmemincargs="-I/opt/xt-mpt/default/include/mpp" fi fi if [ $shmemlibrary = no ] then shmemlibrary=-lsma if [ $gpshmem = yes ] then shmemlibrary=-lgpshmem fi fi if [ "x$shmemlib" != "x" ] then if [ -d $shmemlib ] then #echo "Lib dir found. adding -L$shmemlib to LIB" shmemlibargs="$shmemlibargs -L$shmemlib" fi else if [ $catamount = yes ] then shmemlibargs="$shmemlibargs -L/opt/xt-mpt/default/lib/cnos64" fi fi shmemlibargs="$shmemlibargs $shmemlibrary" shmemlibargs=`echo $shmemlibargs | sed -e 's/ /#/g'` fixmakeargs="$fixmakeargs SHMEM" tauoptions="${tauoptions}-shmem" fixmakeargs="$fixmakeargs shmemlibargs=$shmemlibargs shmemincargs=$shmemincargs" fi gcclibdir=unknown if [ $c_compiler != gcc ] then echo Default C compiler will be $c_compiler fixmakeargs="$fixmakeargs USE_CC" else echo "Default C compiler will be " `gcc -v 2>&1 | tail -1` # I must set the gcclibdir in the Makefiles if we combine gcc, cc, and CC gcclibdir=`gcc -v 2>&1 | awk '{print $4;}' | \ awk -F/ '{for (i=2; i get_stdinc.C #include #include EOF cat << EOF > find_stdinc.awk BEGIN {cinc=""; cppinc="";} /^#[0123456789]+ ".+\/stddef.h"/ {cinc = substr(\$2, 2, length(\$2)-11);} /^#line [0123456789]+ ".+\/stddef.h"/ {cinc = substr(\$3, 2, length(\$3)-11);} /^# [0123456789]+ ".+\/stddef.h"/ {cinc = substr(\$3, 2, length(\$3)-11);} /^#[0123456789]+ ".+\/iostream.h"/ {cppinc = substr(\$2, 2, length(\$2)-13);} /^#line [0123456789]+ ".+\/iostream.h"/ {cppinc = substr(\$3, 2, length(\$3)-13);} /^# [0123456789]+ ".+\/iostream.h"/ {cppinc = substr(\$3, 2, length(\$3)-13);} END {printf("-I%s -I%s\n", cinc, cppinc);} EOF if [ $machine = hitachi ] then stdinc="-I/usr/include" else stdinc=`$cxx_compiler -E get_stdinc.C | awk -f find_stdinc.awk` fi rm -f get_stdinc.C find_stdinc.awk ##################################################################### cat << EOF > f1.c #define _LARGEFILE64_SOURCE 1 #include #include #include int main(int argc, char** argv) { int file = open ("asdf", O_LARGEFILE, 0600); } EOF $echo "Checking if open takes O_LARGEFILE... ${nnl}" if $c_compiler $orig_useropt -c f1.c 1> /dev/null 2>&1 ; then fixmakeargs="$fixmakeargs TAU_LARGEFILE" echo "yes" else echo "no" fi /bin/rm -f f1.o f1.c ###################################################################### cat < get_typeinfo1.C #include using std::type_info; #ifdef __GNUC__ #include using namespace std; #endif /* GNUC */ EOF if $cxx_compiler $orig_useropt -c get_typeinfo1.C 1> /dev/null 2>&1 then echo "C++ compiler supports Std Runtime Type Information (default)" if [ $cxx_compiler = g++ -o $cxx_compiler = c++ -o $cxx_compiler = powerpc64-linux-g++ ] then echo "Supporting GNU RTTI options" fi else cat < get_typeinfo2.C #include EOF if $cxx_compiler $orig_useropt -c get_typeinfo2.C 1> /dev/null 2>&1 then echo "C++ compiler supports RTTI" fixmakeargs="$fixmakeargs RTTI" else echo "C++ compiler doesn't support Runtime Type Information" fixmakeargs="$fixmakeargs NORTTI" fi fi rm -f get_typeinfo1.C get_typeinfo2.C get_typeinfo*.o *.ti *.ii ###################################################################### if [ $cxx_compiler = pgCC ] then cat < pgitest.C int foo(int x) { return x; } EOF if $cxx_compiler $orig_useropt -c pgitest.C 1> /dev/null 2>&1 then if $cxx_compiler $orig_useropt --prelink_objects pgitest.o 1> /dev/null 2>&1 then echo "PGI compiler supports the --prelink_objects option" else echo "PGI compiler should not use --prelink_objects option for making libs" fixmakeargs="$fixmakeargs PGINOPRELINK" fi else echo "ERROR: Your PGI compiler is not working! Please check the license file" fi rm -f pgitest.o pgitest.C libpgitest.a fi ###################################################################### # If epilog is used, check and see if it supports v2.1s write interface if [ $epilog = yes ] then echo "Checking epilog write interface:" cat << EOF > elgtest.C #include int foo(ElgOut *out, elg_ui4 eventc) { return ElgOut_write_NUM_EVENTS(out, eventc); } EOF if $cxx_compiler $orig_useropt -I$epilogincdir -c elgtest.C 1> /dev/null 2>&1 then fixmakeargs="$fixmakeargs TAU2EPILOG" fi rm -f elgtest.C elgtest.o fi ###################################################################### # Save C++ compiler, C compiler, and USEROPT for build echo "$machine: cxx = $cxx_compiler" >> ./build/Config.info echo "$machine: cc = $c_compiler" >> ./build/Config.info opt=`echo $useropt | sed -e 's/_/ /g'` echo "$machine: useropt = $opt" >> ./build/Config.info echo "$machine: stdincludes = $stdinc" >> ./build/Config.info echo "" >> ./build/Config.info ###################################################################### ## STATIC ANALYSIS: Ductape/Program Database Toolkit/IL Analyser # NOW PDT configuration handled in PDT ###################################################################### ###################################################################### # test whether C++ compiler supports AT&T task library echo "#include " > /tmp/tau$$.C echo "class IamReallyATTtask : public object {};" >> /tmp/tau$$.C if $cxx_compiler -c /tmp/tau$$.C 1> /dev/null 2>&1 then # echo "AT&T task library found; using it" task=yes fi rm -f /tmp/tau$$.C tau$$.o ###################################################################### # test whether C++ compiler supports Std C++ Library (KAI KCC compiler) echo "Testing for Standard C++ Library support for string class" cat < /tmp/tau$$.C #include #include #include #include using std::string; using std::vector; using std::pair; using std::list; using std::map; void foo(void) { string s1; return; } EOF if $cxx_compiler -c /tmp/tau$$.C 1> /dev/null 2>&1 then echo "Found support for Standard C++ Library string" echo "NOTE: Compiling Profiling Library and Applications with -DTAU_STDCXXLIB" echo "***********************************************************************" stdcxxlib=yes else echo "Did not find Standard C++ Library header file. Using " fi rm -f /tmp/tau$$.C tau$$.o ###################################################################### # test whether C++ compiler supports SUN LWP thread library if [ -f /usr/include/lwp/lwp.h ] then echo "SUN LWP thread library found; using it" lwp=yes fi ###################################################################### # Set some more Profiling options if [ $stdcxxlib = yes ] then fixmakeargs="$fixmakeargs STDCXXLIB" fi ###################################################################### if [ $catamount = yes ] then #echo "This looks like a CATAMOUNT Cray RS system..." fixmakeargs="$fixmakeargs CATAMOUNT" if [ $fortran_compiler = pgi ] then fixmakeargs="$fixmakeargs PGI_CATAMOUNT" fi fi ###################################################################### if [ $cxx_compiler = g++ -o $cxx_compiler = egcs -o $cxx_compiler = powerpc64-linux-g++ -o $cxx_compiler = c++ -o $cxx_compiler = scg++ -o $cxx_compiler = mips64el-gentoo-linux-gnu-g++ ] then fixmakeargs="$fixmakeargs GNU" if [ $machine = ibm64 -o $machine = rs6000 -o $machine = ppc64 -o $machine = bgl -o $machine = ibm64linux ] then tauoptions="${tauoptions}-gnu" fi taugcclibdir=`gcc -print-libgcc-file-name | sed -e 's,[^/]*$,,'` echo "Using GNU lib dir as $taugcclibdir" fixmakeargs="$fixmakeargs taugcclibdir=$taugcclibdir" fi ###################################################################### # TEST FOR ALL MACHINE TYPES case $machine in hp9000s700 | hp9000s800) echo Found a \"$machine\" configuration definition fixmakeargs="arch=$machine NO_RANLIB HP $fixmakeargs" # HP-ALLOCA HP_CFLAGS if [ `/bin/uname -r | cut -d. -f2` = 10 ] then echo This machine uses HPUX Version 10 fixmakeargs="HPUX10 $fixmakeargs" fi if [ $c_compiler = cc ] then fixmakeargs="HP_CFLAGS HP-ALLOCA $fixmakeargs" fi if [ $cxx_compiler = g++ ] then fixmakeargs="HPGNU $fixmakeargs" fi if [ $pdt_cxx_compiler = aCC ] then fixmakeargs="PDTHPACC $fixmakeargs" fi # Check for Convex SPP enviroment if [ $detectxdev = cnxspp ] then fixmakeargs="$fixmakeargs CNXSPP" fi ;; decstation) echo Found a \"$machine\" configuration definition # fixmakeargs="arch=$machine MIPS_CC $fixmakeargs" # with gcc, there are no changes needed... fixmakeargs="arch=$machine $fixmakeargs" ;; ppc64) echo "Found an IBM PPC-64 Linux configuration definition" fixmakeargs="arch=$machine PPC64 $fixmakeargs" if [ $papi = yes ] then fixmakeargs="$fixmakeargs PPC64PAPI" fi ;; bgl) echo "Found an IBM PPC-64 BGL Linux configuration definition" fixmakeargs="arch=$machine BGL $fixmakeargs" if [ $papi = yes ] ; then p=$papidir/lib if [ -f $p/libpapi.a ] ; then fixmakeargs="$fixmakeargs BGLPAPI" else fixmakeargs="$fixmakeargs BGLPAPI_RTS" fi fi ;; ia64) echo "Found an IA-64 configuration definition" fixmakeargs="arch=$machine $fixmakeargs" if [ $papi = yes ] then fixmakeargs="$fixmakeargs IA64PAPI" fi ;; x86_64|xt3) echo "Found an x86_64 configuration definition" fixmakeargs="arch=$machine $fixmakeargs" if [ $papi = yes ] then fixmakeargs="$fixmakeargs X86_64PAPI" fi ;; ibm64) echo Found a \"$machine\" configuration definition if [ `uname -s` = AIX ] then fixmakeargs="arch=$machine $fixmakeargs SP1 IBM64" else if [ `uname -s ` = Linux ] then fixmakeargs="arch=$machine $fixmakeargs PPC64 IBM64" else fixmakeargs="arch=$machine $fixmakeargs IBM64" fi fi if [ $papi = yes ] then fixmakeargs="$fixmakeargs IBM64PAPI" fi ;; ibm64linux) echo Found a \"$machine\" configuration definition fixmakeargs="arch=$machine $fixmakeargs PPC64 IBM64LINUX" if [ $papi = yes ] then fixmakeargs="$fixmakeargs IBM64PAPILINUX" fi ;; rs6000) echo Found a \"$machine\" configuration definition fixmakeargs="arch=$machine $fixmakeargs SP1" if [ $papi = yes ] then fixmakeargs="$fixmakeargs IBMPAPI" fi # Check for SP1 xdev enviroment # if [ $detectxdev = sp1 ] # then # fixmakeargs="$fixmakeargs SP1" # fi ;; alpha) if [ $papi = yes ] then fixmakeargs="$fixmakeargs ALPHAPAPI" fi echo Found a \"$machine\" configuration definition fixmakeargs="arch=$machine $fixmakeargs" fixmakeargs="COMPAQ_ALPHA $fixmakeargs" if [ $pdt_cxx_compiler = cxx ] then fixmakeargs="$fixmakeargs PDTALPHACXX" fi if [ $guidef90 = yes ] then f90loaded=`which f90 | sed -e 's/f90/../g' | grep "^no"` if [ "x$f90loaded" = "x" ] then # f90 module has been loaded and which f90 returns a path extradir="`which f90 | sed s/f90/../`" echo "Found f90 in `which f90`" fi fixmakeargs="$fixmakeargs extradir=$extradir COMPAQ_GUIDEF90" fi ;; sgi4k | sgi8k | sgi32 | sgin32 | sgi64) echo Found a \"$machine\" configuration definition fixmakeargs="arch=$machine $fixmakeargs" if [ $c_compiler = cc ] then # Check CPU type for compiler optimization flags... (-mips2) (-mips4) if [ $machine = sgi4k ] then fixmakeargs="$fixmakeargs MIPS_CC" fixmakeargs="$fixmakeargs MIPSR4K" echo "NOTE: *** This is an SGI Challenge (R4K) ***" else fixmakeargs="$fixmakeargs MIPSR8K" echo "NOTE: *** This is an SGI POWER Challenge/Origin (R8K, R10K) ***" fi fi if [ $machine = sgin32 ] then fixmakeargs="$fixmakeargs ENABLEN32BIT" fi if [ $machine = sgi64 ] then fixmakeargs="$fixmakeargs ENABLE64BIT" if [ $papi = yes ] then if [ -f $papidir/lib/libpapi64.so -o -f $papidir/src/libpapi64.so ] then fixmakeargs="$fixmakeargs SGI64PAPI" fi fi fi if [ $machine = sgi32 ] then fixmakeargs="$fixmakeargs ENABLE32BIT" fi # Check for sgimp xdev enviroment if [ $detectxdev = sgimp -o $machine = sgi8k -o $machine = sgin32 -o $machine = sgi64 ] then fixmakeargs="$fixmakeargs SGIMP" if [ $fortran_compiler = no ] then fixmakeargs="$fixmakeargs SGI_FORTRAN" fortran_compiler=yes fi fi ;; next) echo Found a \"$machine\" configuration definition fixmakeargs="arch=$machine NEXT_CLIB $fixmakeargs" ;; # Currently cm5 cross-development environments are NOT supported # for solaris2 machines.... solaris2*) echo Found a \"$machine\" configuration definition fixmakeargs="arch=$machine SOL2 $fixmakeargs" if [ "$tauarch" = "solaris2-64" ] then fixmakeargs="$fixmakeargs SOLARIS64" fi if [ $papi = yes ] then fixmakeargs="$fixmakeargs SOL2PAPI" fi if [ $cxx_compiler = CC ] then fixmakeargs="$fixmakeargs SOL2CC" if [ $openmp = yes ] then fixmakeargs="$fixmakeargs SOL2CC_OPENMP" fi if [ $fortran_compiler = no ] then fixmakeargs="$fixmakeargs SUN_FORTRAN" fortran_compiler=yes fi fi # Check for Meiko CS2 xdev enviroment if [ $detectxdev = cs2 ] then fixmakeargs="$fixmakeargs CS2" fi ;; sun386i) echo Found a \"$machine\" configuration definition fixmakeargs="arch=$machine SUN386I $fixmakeargs" if [ $cxx_compiler = CC ] then fixmakeargs="$fixmakeargs SOL2CC" if [ $openmp = yes ] then fixmakeargs="$fixmakeargs SOL2CC_OPENMP" fi if [ $fortran_compiler = no ] then fixmakeargs="$fixmakeargs SUN_FORTRAN" fortran_compiler=yes fi fi ;; sunx86_64) echo Found a \"$machine\" configuration definition fixmakeargs="arch=$machine $fixmakeargs SUNX86_64" if [ $cxx_compiler = CC ] then fixmakeargs="$fixmakeargs SOL2CC" if [ $openmp = yes ] then fixmakeargs="$fixmakeargs SOL2CC_OPENMP" fi if [ $fortran_compiler = no ] then fixmakeargs="$fixmakeargs SUN_FORTRAN" fortran_compiler=yes fi fi ;; sun4 | cm5) echo Found a \"$machine\" configuration definition fixmakeargs="arch=$machine $fixmakeargs" # Check for cm5 xdev enviroment if [ $machine = cm5 -o $detectxdev = cm5 ] then fixmakeargs="$fixmakeargs CM5" fi ;; ptx) echo Found a \"$machine\" configuration definition fixmakeargs="arch=$machine PTX HP-ALLOCA $fixmakeargs" ;; tc2000) echo Found a \"$machine\" configuration definition fixmakeargs="arch=$machine TC2000 $fixmakeargs" ;; c90) echo Found a \"$machine\" configuration definition fixmakeargs="arch=$machine C90 CRAY-ALLOCA $fixmakeargs" # Check for T3D xdev enviroment if [ $detectxdev = t3d ] then fixmakeargs="$fixmakeargs T3D" fi ;; t3e) echo Found a \"$machine\" configuration definition fixmakeargs="arch=$machine T3E CRAY-ALLOCA $fixmakeargs" if [ $fortran_compiler = no ] then fixmakeargs="$fixmakeargs CRAY_FORTRAN" fortran_compiler=yes fi ;; ksr1) echo Found a \"$machine\" configuration definition fixmakeargs="arch=$machine KSR NO_RANLIB $fixmakeargs" ;; paragon) echo Found a \"$machine\" configuration definition fixmakeargs="arch=$machine PARAGON $fixmakeargs" ;; symmetry) echo Found a \"$machine\" configuration definition fixmakeargs="arch=$machine SYMMETRY $fixmakeargs" ;; unknown) echo unknown architecture. fixmakeargs="arch=$machine $fixmakeargs" ;; default) fixmakeargs="arch=$machine $fixmakeargs" ;; -*) echo "Invalid option \`$1'" 1>&2 exit 1 ;; *) echo No special modifications found for architecture \"$machine\" fixmakeargs="arch=$machine $fixmakeargs" ;; esac if [ $machine = x86_64 -o $machine = i386_linux -o $machine = ia64 ] then if [ $cxx_compiler = CC ] then fixmakeargs="$fixmakeargs SUNCC" if [ $openmp = yes ] then fixmakeargs="$fixmakeargs SUNCC_OPENMP" fi if [ $fortran_compiler = no ] then fixmakeargs="$fixmakeargs SUN_FORTRAN" fortran_compiler=yes fi fi fi if [ $tauarch = none ] then architecture= fixmakeargs="$fixmakeargs arch= " else if [ $execprefix = unknown ] then architecture=$machine else architecture=$execprefix fi fi # write out .h file to define this architecture __easily__ echo \#define TAU_$machine > ./include/tauarch.h echo \#define TAU_ARCH \"$machine\" >> ./include/tauarch.h if [ $tauprefix = unknown ] then fixmakeargs="$fixmakeargs tauprefix=$tauroot" # make bin dir if it does not exist if [ ! -d ./$architecture ] then mkdir -p ./$architecture fi if [ ! -d ./$architecture/bin ] then mkdir ./$architecture/bin fi # make lib dir if it does not exist if [ ! -d ./$architecture/lib ] then mkdir ./$architecture/lib fi fi # make XtraP directories if [ -d XtraP ] then if [ ! -d XtraP/lib/$architecture ] then mkdir XtraP/lib/$architecture fi fi if [ $awe = yes ] then fixmakeargs="$fixmakeargs AWE_AVAILABLE awedir=$awedir" echo "$machine: AWEDIR = $awedir" >> ./build/Config.info fi if [ $pthread = yes ] then fixmakeargs="$fixmakeargs PTHREAD_AVAILABLE ptdir=$ptdir" echo "$machine: PTDIR = $ptdir" >> ./build/Config.info tauoptions="${tauoptions}-pthread" fi if [ $papithread = yes ] ; then if [ $papi = no ] ; then echo "" echo "Error: To use the PAPI thread layer, you must specify -papi=" echo "" exit fi if [ ! `uname -s ` = Linux ] ; then echo "" echo "Error: The PAPI thread layer only works on Linux" echo "" exit fi fixmakeargs="$fixmakeargs TAU_PAPI_THREADS" tauoptions="${tauoptions}-papithread" fi if [ $charm = yes ] then fixmakeargs="$fixmakeargs TAU_CHARM charmdir=$charmdir" echo "$machine: CHARMDIR = $charmdir" >> ./build/Config.info tauoptions="${tauoptions}-charm" fi if [ $compensate = yes ] then fixmakeargs="$fixmakeargs COMPENSATE" tauoptions="${tauoptions}-compensate" fi if [ $muse = yes ] then fixmakeargs="$fixmakeargs MUSE" tauoptions="${tauoptions}-muse" fi if [ $muse_event = yes ] then fixmakeargs="$fixmakeargs MUSE_EVENT" tauoptions="${tauoptions}-muse_event" fi if [ $muse_multiple = yes ] then fixmakeargs="$fixmakeargs MUSE_MULTIPLE" tauoptions="${tauoptions}-muse_multiple" fi if [ $sproc = yes ] then fixmakeargs="$fixmakeargs TAU_SPROC" tauoptions="${tauoptions}-sproc" fi if [ $pcl = yes ] then fixmakeargs="$fixmakeargs PCL pcldir=$pcldir" tauoptions="${tauoptions}-pcl" fi if [ $papi = yes ] then fixmakeargs="$fixmakeargs PAPI papidir=$papidir" tauoptions="${tauoptions}-papi" p=$papidir/lib if [ -f $p/libpapi.so -o -f $p/libpapi.a -o -f $p/libpapi64.so -o -f $p/libpapi64.a -o -f $p/libpapi.rts.a ] then fixmakeargs="$fixmakeargs papisubdir=lib" else if [ -f $p/cnos64/libpapi.so ] then fixmakeargs="$fixmakeargs papisubdir=lib/cnos64" else if [ -f $papidir/lib64/libpapi.so ] then fixmakeargs="$fixmakeargs papisubdir=lib64" else fixmakeargs="$fixmakeargs papisubdir=src" fi fi fi fi if [ $python = yes ] then fixmakeargs="$fixmakeargs PYTHON pythoninc=$pythoninc pythonlib=$pythonlib" tauoptions="${tauoptions}-python" if [ $machine = rs6000 -a "x$pythonlib" = "x" ] then echo "ERROR: For IBM systems, please specify the -pythonlib= flag where *.py files and the config directory are located!" exit 1 fi fi if [ $ktau = yes ] then fixmakeargs="$fixmakeargs KTAU ktauinc=$ktauinc ktauincuser=$ktauincuser ktaulib=$ktaulib ktausym=$ktausym" tauoptions="${tauoptions}-ktau" fi if [ $ktau_merge = yes ] then fixmakeargs="$fixmakeargs KTAU_MERGE ktauinc=$ktauinc ktauincuser=$ktauincuser ktaulib=$ktaulib ktausym=$ktausym" tauoptions="${tauoptions}-ktau_merge" fi if [ $ktau_shctr = yes ] then fixmakeargs="$fixmakeargs KTAU_SHCTR ktauinc=$ktauinc ktauincuser=$ktauincuser ktaulib=$ktaulib ktausym=$ktausym" tauoptions="${tauoptions}-ktau_shctr" fi if [ $vtf = yes ] then fixmakeargs="$fixmakeargs VTF vtfdir=$vtfdir" fi if [ $otf = yes ] then fixmakeargs="$fixmakeargs OTF otfdir=$otfdir" fi if [ $slog2 = yes ] then if [ $internalslog2 = yes ] then slog2dir=$tauroot/tools/src/contrib/slog2sdk/ if [ ! -d $slog2dir ] then echo "Error: Cannot access SLOG2 directory $slog2dir" exit 1 fi fi fixmakeargs="$fixmakeargs SLOG2 slog2dir=$slog2dir" jdkdir=`which javac | sed s/javac/../` if [ "x$jdkdir" = "x" ] then echo "You need javac in your path while using SLOG2. Please re-configure TAU." fi fixmakeargs="$fixmakeargs jdkdir=$jdkdir" fi if [ $pdt = yes ] then fixmakeargs="$fixmakeargs PDT pdtdir=$pdtdir" tauoptions="${tauoptions}-pdt" if [ $pdtcompdir != unknown ] then fixmakeargs="$fixmakeargs PDTARCH pdtcompdir=$pdtcompdir" fi if [ $pdtarchdir != unknown ] then fixmakeargs="$fixmakeargs PDTARCHITECTURE pdtarchdir=$pdtarchdir" fi if [ $pdt_cxx_compiler != default ] then # Check if they specified -pdt_c++=/usr/bin/g++ instead of just g++ if [ "x$pdt_cxx_full_path" != "x$pdt_cxx_compiler" ] then pdt_cxx_used=$pdt_cxx_full_path else pdt_cxx_used=$pdt_cxx_compiler fi fixmakeargs="$fixmakeargs PDTCXX pdtcxx=$pdt_cxx_used" if [ $machine = sgi8k -o $machine = sgin32 -o $machine = sgi64 ] then if [ $pdt_cxx_compiler = CC ] then fixmakeargs="$fixmakeargs PDTSGICC" fi fi fi # Check if PDT has Fortran statement level information cat < checkpdt.cpp #include int IsFortranDoStatement(pdbStmt::stmt_t k) { if (k == pdbStmt::ST_FDO) return 1; else return 0; } EOF if [ $machine = alpha -a $cxx_compiler = cxx ]; then orig_useropt="$orig_useropt -x c++ -D__USE_STD_IOSTREAM" fi if $cxx_compiler $orig_useropt -I$pdtdir/include -c checkpdt.cpp 1> /dev/null 2>&1 then echo "PDT supports Fortran Loop Level information" else echo "IMPORTANT NOTE: Your PDT does not support Fortran Loop Level information." echo "***************You may want to upgrade to a newer release." echo "See http://www.cs.uoregon.edu/research/pdt" fixmakeargs="$fixmakeargs PDTNOFSTMTS" fi /bin/rm -f checkpdt.o checkpdt.cpp fi if [ $vampirtrace = yes ]; then cat <vttest.cpp #include "Profile/Profiler.h" #include "Profile/TauVampirTrace.h" int foo(void) { uint64_t x; return 0; } EOF if $cxx_compiler $orig_useropt -Iinclude -I$vampirtracedir/include -c vttest.cpp -DTRACING_ON -DTAU_DOT_H_LESS_HEADERS 1> /dev/null 2>&1 then echo "VampirTrace check successful" else echo "Using VampirTrace options for compiling" fixmakeargs="$fixmakeargs VAMPIRTRACEINTS" fi /bin/rm -f vttest.cpp fi if [ $java = yes ] then fixmakeargs="$fixmakeargs JAVA jdkdir=$jdkdir" fi if [ $openmp = yes ] then fixmakeargs="$fixmakeargs OPENMP" tauoptions="${tauoptions}-openmp" fi if [ $opari = yes ] then if [ -f $oparidir/lib/pomp_lib.h ] then kojakincdir=lib else kojakincdir=include fi kojakopari=`grep POMP_Finalize $oparidir/$kojakincdir/pomp_lib.h | wc -l` if [ $kojakopari = 1 ] then fixmakeargs="$fixmakeargs KOJAKOPARI" fi fixmakeargs="$fixmakeargs OPARI oparidir=$oparidir" tauoptions="${tauoptions}-opari" # Check if opari is in bin dir or in src dir if [ -d $oparidir/tool -a -x $oparidir/tool/opari ] then fixmakeargs="$fixmakeargs oparitool=$oparidir/tool/opari" else if [ -d $oparidir/bin -a -x $oparidir/bin/opari ] then fixmakeargs="$fixmakeargs oparitool=$oparidir/bin/opari" else echo "ERROR: Opari executable not found in $oparidir directory!" fi fi fi if [ $vampirtrace = yes ] then fixmakeargs="$fixmakeargs VAMPIRTRACE vampirtracedir=$vampirtracedir" tauoptions="${tauoptions}-vampirtrace" if [ $mpi = yes ] then if [ $openmp = yes ] then fixmakeargs="$fixmakeargs VAMPIRTRACEOMPI" else fixmakeargs="$fixmakeargs VAMPIRTRACEMPI" fi else if [ $openmp = yes ] then fixmakeargs="$fixmakeargs VAMPIRTRACEOMP" fi fi fi if [ $epilog = yes ] then if [ -f $epiloglibdir/libsz.a ] then epilogextralinkcmd="-lsz" fi fixmakeargs="$fixmakeargs EPILOG epilogdir=$epilogdir epiloglibdir=$epiloglibdir epilogbindir=$epilogbindir epilogextralinkcmd=$epilogextralinkcmd epilogincdir=$epilogincdir" tauoptions="${tauoptions}-epilog" if [ $mpi = yes ] then if [ $openmp = yes ] then fixmakeargs="$fixmakeargs EPILOGOMPI" else fixmakeargs="$fixmakeargs EPILOGMPI" fi else if [ $openmp = yes ] then fixmakeargs="$fixmakeargs EPILOGOMP" fi fi fi if [ $dyninst = yes ] then fixmakeargs="$fixmakeargs DYNINST dyninstdir=$dyninstdir" if [ ! -d $dyninstdir/lib ] then fixmakeargs="$fixmakeargs DYNINST41" fi fi if [ $pcl = yes ] then if [ $pthread = yes -o $openmp = yes ] then fixmakeargs="$fixmakeargs PCLPTHREAD" fi fi if [ $papi = yes ] then if [ $pthread = yes -o $openmp = yes ] then fixmakeargs="$fixmakeargs PAPIPTHREAD" fi fi if [ $opari = yes ] then if [ $pthread = yes -o $tulipthread = yes -o $smarts = yes -o $java = yes ] then echo "ERROR: -opari option requires OpenMP threads package." echo "*****************************************************" exit 1 fi if [ $opari_construct = yes -a $opari_region = no ] then fixmakeargs="$fixmakeargs OPARI_CONSTRUCT" fi if [ $opari_construct = no -a $opari_region = yes ] then fixmakeargs="$fixmakeargs OPARI_REGION" fi fi if [ $tulipthread = yes ] then fixmakeargs="$fixmakeargs TULIPTHREADS tulipdir=$tulipdir" echo "$machine: TULIPDIR = $tulipdir" >> ./build/Config.info if [ $smarts = yes ] then fixmakeargs="$fixmakeargs SMARTS" tauoptions="${tauoptions}-smarts" else tauoptions="${tauoptions}-tulip" fi fi if [ $trace = yes ] then if [ $profile = yes ] then tauoptions="${tauoptions}-profile" fi if [ $profilestats = yes ] then tauoptions="${tauoptions}-profilestats" fi tauoptions="${tauoptions}-trace" fi if [ $mpitrace = yes ] then tauoptions="${tauoptions}-mpitrace" fi if [ $kai = yes ] then tauoptions="${tauoptions}-kcc" fi if [ $pgi = yes ] then tauoptions="${tauoptions}-pgi" if [ $openmp = yes ] then fixmakeargs="$fixmakeargs PGIOPENMP" fi fi if [ $intel = yes ] then if [ $openmp = yes ] then fixmakeargs="$fixmakeargs INTELOPENMP" fi fi # CHECK if Intel 8.0 compilers are available. if [ $fortran_compiler = intel ] then intelifort=`which ifort 2>/dev/null` if [ "y$intelifort" != "y" ] then if [ -x $intelifort ] then echo "Using Intel ifort as the Fortran Compiler" fixmakeargs="$fixmakeargs INTELIFORT" echo "Checking version (8.0/8.1+) of Intel compilers" # Intel compilers changed from -cxxlib-icc to -cxxlib-gcc (default) in 8.1 cat << EOF > f1.cpp #include using namespace std; extern "C" { void foo_(int *x) { cout <<"x = "<<*x< f2.f PROGRAM FOO_MAIN call foo(2) END PROGRAM FOO_MAIN EOF $cxx_compiler -c f1.cpp ifort -c f2.f if ifort f1.o f2.o -o foo -lcprts 1>/dev/null 2>&1 then echo "Intel v8.0 compilers used" else $cxx_compiler -c -cxxlib-icc f1.cpp 1>/dev/null 2>&1 $cxx_compiler -c f1.cpp tau_opt_bits= if [ `uname -m` = x86_64 -a $machine = i386_linux ]; then # if someone is using the 32-bit intel compilers on an x86_64 # then we need to use -m32 with g++ to get the 32-bit libstdc++ tau_opt_bits=-m32 fixmakeargs="$fixmakeargs INTEL32_ON_64" fi taugcclibdir=`g++ $tau_opt_bits -print-libgcc-file-name | sed -e 's,[^/]*$,,'` taugcclib=`g++ $tau_opt_bits -print-libgcc-file-name ` taugcclib2dir=`which g++ | sed s/g++/../` if ifort f1.o f2.o -o foo -L$taugcclib2dir/lib -L$taugcclibdir -lstdc++ $taugcclib 1>/dev/null 2>&1 then # echo "Confirmed - links with gcc libs" echo "Intel v8.1+ compilers used" if [ "x$taugcclib2dir" != "x/usr/bin/../lib" ] then if [ "x$machine" = "xx86_64" ] ; then tauextralibopts="taugcclibopts=-L$taugcclib2dir/lib64" else tauextralibopts="taugcclibopts=-L$taugcclib2dir/lib" fi # Here a different version of gcc is used (other than the one installed in /usr/bin) fi fixmakeargs="$fixmakeargs $tauextralibopts taugcclibdir=$taugcclibdir INTEL81FIX" fi fi /bin/rm -f f1.o f2.o f1.cpp f2.f foo # Check over! fi fi fi if [ $ibmxlc = yes ] then if [ $openmp = yes ] then fixmakeargs="$fixmakeargs IBMXLC_OPENMP" fi fi if [ $machine = hitachi ] then if [ $openmp = yes ] then fixmakeargs="$fixmakeargs HITACHI_OPENMP" fi fi if [ $cxx_compiler = cxx ] then if [ $openmp = yes ] then fixmakeargs="$fixmakeargs COMPAQCXX_OPENMP" fi if [ $pthread = yes ] then fixmakeargs="$fixmakeargs COMPAQCXX_PTHREAD" fi fi if [ $fujitsu = yes ] then tauoptions="${tauoptions}-fujitsu" fi if [ $noex = yes ] then tauoptions="${tauoptions}-noex" if [ $kai = yes ] then fixmakeargs="$fixmakeargs KAINOEX" else # OTHER COMPILERS NO EXCEPTIONS... SGICC needs this fixmakeargs="$fixmakeargs SGICCNOEX" fi fi #### END OF TAU OPTIONS. Make changes above this line fixmakeargs="$fixmakeargs tauoptions=$tauoptions" if [ $lwp = yes ] then fixmakeargs="$fixmakeargs LWP_AVAILABLE" fi if [ $task = yes ] then if [ -d XtraP ] then XtraPRoot=${tauroot}/XtraP if [ $machine != default ] then echo \#define XTRAPROOT \"$XtraPRoot\"> ${XtraPRoot}/include/XtraPRoot.h fixmakeargs="$fixmakeargs TASK_AVAILABLE" else echo \#define XTRAPROOT \"\" > ${XtraPRoot}/include/XtraPRoot.h fi fi fi if [ $use_pcxx = yes ] then fixmakeargs="$fixmakeargs PCXX sage1dir=$sage1dir" fi if [ $use_hpcxx = yes ] then fixmakeargs="$fixmakeargs HPCXX" fi if [ $use_ansic = yes ] then fixmakeargs="$fixmakeargs ANSIC" fi if [ $use_sage2 = yes ] then fixmakeargs="sage2dir=$sage2dir $fixmakeargs" fi if [ $tcltk = yes ] then fixmakeargs="$fixmakeargs TCLTK" fi ############################################################################# # Set up TAU-specific configuration options # -- first, make sure the display is set - wish won't work otherwise #if ( xrdb -query ) 1>/dev/null 2>&1 # then # echo "The display is okay." # else # echo "ERROR: You do not have permission to use the display ${DISPLAY}." # echo " Make sure the DISPLAY environment variable is set correctly." # echo " xrdb fails. If DISPLAY is ok, try " # echo " % unsetenv LD_LIBRARY_PATH " ## exit #fi echo "TAU: installing TAU's ParaProf profile browser" taushell=sh if [ $machine = solaris2* -o $machine = alpha ] then taushell=ksh fi x=`java -version 2>&1 | grep version | awk '{ print $3; }'| sed -e s/\"//g` oldjdk=no if [ `echo $x | sed -e s/1.1\.*// | wc -c` -eq 1 ] then oldjdk=no else if [ `echo $x | sed -e s/1.2\.*// | wc -c` -eq 1 ] then echo "jdk version 1.2 found" oldjdk=yes else if [ `echo $x | sed -e s/1.3\.*// | wc -c` -eq 1 ] then echo "jdk version 1.3 found" oldjdk=yes else echo "jdk version 1.4 or better found" oldjdk=no; fi fi fi if [ $oldjdk = yes ] then paraprofjar=paraprof-1.3.jar else paraprofjar=paraprof.jar fi if [ $tauprefix = unknown ] then cat ${tauroot}/tools/src/paraprof/bin/paraprof.skel | sed -e 's,@TAUROOTDIR@,'$tauroot',' -e 's,@SHELL@,'$taushell',' -e 's,@ARCH@,'$architecture',' \ -e 's,@OLDJDK@,'$oldjdk',' > ${tauroot}/${architecture}/bin/paraprof chmod a+rx ${tauroot}/${architecture}/bin/paraprof if [ ! -f ${tauroot}/${architecture}/bin/jracy ] then cd ${tauroot}/${architecture}/bin/; ln -s paraprof jracy; cd ${tauroot}; fi echo "TAU: installed paraprof in ${tauroot}/${architecture}/bin" cp ${tauroot}/tools/src/paraprof/bin/$paraprofjar ${tauroot}/${architecture}/lib cp ${tauroot}/tools/src/perfdmf/bin/perfdmf.jar ${tauroot}/${architecture}/lib cp ${tauroot}/tools/src/perfexplorer/perfexplorer.jar ${tauroot}/${architecture}/lib cp ${tauroot}/tools/src/vis/bin/vis.jar ${tauroot}/${architecture}/lib cp ${tauroot}/tools/src/common/bin/tau-common.jar ${tauroot}/${architecture}/lib cp ${tauroot}/tools/src/contrib/jargs.jar ${tauroot}/${architecture}/lib cp ${tauroot}/tools/src/contrib/batik-combined.jar ${tauroot}/${architecture}/lib cp ${tauroot}/tools/src/contrib/jfreechart-0.9.21.jar ${tauroot}/${architecture}/lib cp ${tauroot}/tools/src/contrib/jcommon-0.9.6.jar ${tauroot}/${architecture}/lib cp ${tauroot}/tools/src/contrib/jgraph.jar ${tauroot}/${architecture}/lib cp ${tauroot}/tools/src/contrib/jgraph-1.3.jar ${tauroot}/${architecture}/lib cp ${tauroot}/tools/src/contrib/jython.jar ${tauroot}/${architecture}/lib cp ${tauroot}/tools/src/contrib/jogl/jogl.jar ${tauroot}/${architecture}/lib cp ${tauroot}/tools/src/contrib/xerces.jar ${tauroot}/${architecture}/lib cp ${tauroot}/tools/src/contrib/derby.jar ${tauroot}/${architecture}/lib cp ${tauroot}/src/Profile/TAU.jar ${tauroot}/${architecture}/lib cp ${tauroot}/tools/src/common/resources/tau-medium.png ${tauroot}/${architecture}/lib echo "TAU: installed ParaProf, PerfDMF, PerfExplorer and supporting jars in ${tauroot}/${architecture}/lib" # Now we look at the installation of tau_compiler.sh if [ ! -f /bin/bash ] then bashpath=`which bash` if [ ! -f $bashpath ] then echo "ERROR: You need a working bash shell in your path to use tau_compiler.sh" echo "Please add bash to your path and re-run configure." echo "**************************************************" else cat ${tauroot}/tools/src/tau_compiler.sh | sed -e 's#/bin/bash#'$bashpath'#' > ${tauroot}/${architecture}/bin/tau_compiler.sh chmod +x ${tauroot}/${architecture}/bin/tau_compiler.sh fi else cp ${tauroot}/tools/src/tau_compiler.sh ${tauroot}/${architecture}/bin fi cp ${tauroot}/tools/src/tau_treemerge.pl ${tauroot}/${architecture}/bin cp ${tauroot}/tools/src/tau_cxx.sh ${tauroot}/${architecture}/bin cp ${tauroot}/tools/src/tau_cc.sh ${tauroot}/${architecture}/bin cp ${tauroot}/tools/src/tau_f90.sh ${tauroot}/${architecture}/bin echo "TAU: installed tau_compiler.sh in ${tauroot}/${architecture}/bin" else if [ ! -d ${tauprefix} ] then echo "making directory $tauprefix " mkdir -p ${tauprefix} # Copy INSTALL README LICENSE files over there cp README LICENSE CREDITS ${tauprefix} fi if [ ! -d ${tauprefix}/${architecture} ] then echo "making directory $tauprefix/$architecture lib bin" mkdir ${tauprefix}/${architecture} mkdir ${tauprefix}/${architecture}/lib mkdir ${tauprefix}/${architecture}/bin else if [ "x$architecture" = "x" ] then echo "making directory $tauprefix lib bin" if [ ! -d ${tauprefix}/bin ] then mkdir ${tauprefix}/bin fi if [ ! -d ${tauprefix}/lib ] then mkdir ${tauprefix}/lib fi fi fi cat ${tauroot}/tools/src/paraprof/bin/paraprof.skel | sed -e 's,@TAUROOTDIR@,'$tauprefix',' -e 's,@SHELL@,'$taushell',' -e 's,@ARCH@,'$architecture',' \ -e 's,@OLDJDK@,'$oldjdk',' > ${tauprefix}/${architecture}/bin/paraprof chmod a+rx ${tauprefix}/${architecture}/bin/paraprof if [ ! -f ${tauprefix}/${architecture}/bin/jracy ] then cd ${tauprefix}/${architecture}/bin/; ln -s paraprof jracy; cd ${tauroot}; fi echo "TAU: installed paraprof in ${tauprefix}/${architecture}/bin" cp ${tauroot}/tools/src/paraprof/bin/$paraprofjar ${tauprefix}/${architecture}/lib cp ${tauroot}/tools/src/perfdmf/bin/perfdmf.jar ${tauprefix}/${architecture}/lib cp ${tauroot}/tools/src/perfexplorer/perfexplorer.jar ${tauprefix}/${architecture}/lib cp ${tauroot}/tools/src/vis/bin/vis.jar ${tauprefix}/${architecture}/lib cp ${tauroot}/tools/src/common/bin/tau-common.jar ${tauprefix}/${architecture}/lib cp ${tauroot}/tools/src/contrib/jargs.jar ${tauprefix}/${architecture}/lib cp ${tauroot}/tools/src/contrib/batik-combined.jar ${tauprefix}/${architecture}/lib cp ${tauroot}/tools/src/contrib/jfreechart-0.9.21.jar ${tauprefix}/${architecture}/lib cp ${tauroot}/tools/src/contrib/jcommon-0.9.6.jar ${tauprefix}/${architecture}/lib cp ${tauroot}/tools/src/contrib/jgraph.jar ${tauprefix}/${architecture}/lib cp ${tauroot}/tools/src/contrib/jgraph-1.3.jar ${tauprefix}/${architecture}/lib cp ${tauroot}/tools/src/contrib/jython.jar ${tauprefix}/${architecture}/lib cp ${tauroot}/tools/src/contrib/jogl/jogl.jar ${tauprefix}/${architecture}/lib cp ${tauroot}/tools/src/contrib/xerces.jar ${tauprefix}/${architecture}/lib cp ${tauroot}/tools/src/common/resources/tau16x16.gif ${tauroot}/${architecture}/lib echo "TAU: installed ParaProf, PerfDMF, PerfExplorer and supporting jars in ${tauprefix}/${architecture}/lib" # Now we look at the installation of tau_compiler.sh if [ ! -f /bin/bash ] then bashpath=`which bash` if [ ! -f $bashpath ] then echo "ERROR: You need a working bash shell in your path to use tau_compiler.sh" echo "Please add bash to your path and re-run configure." echo "**************************************************" else cat ${tauroot}/tools/src/tau_compiler.sh | sed -e 's#/bin/bash#'$bashpath'#' > ${tauprefix}/${architecture}/bin/tau_compiler.sh fi else cp ${tauroot}/tools/src/tau_compiler.sh ${tauprefix}/${architecture}/bin fi echo "TAU: installed tau_compiler.sh in ${tauprefix}/${architecture}/bin" cp ${tauroot}/tools/src/tau_treemerge.pl ${tauprefix}/${architecture}/bin cp ${tauroot}/tools/src/tau_cxx.sh ${tauprefix}/${architecture}/bin cp ${tauroot}/tools/src/tau_cc.sh ${tauprefix}/${architecture}/bin cp ${tauroot}/tools/src/tau_f90.sh ${tauprefix}/${architecture}/bin fi if [ ${tauprefix} = unknown ] then targetdir=${tauroot} else targetdir=${tauprefix} fi # Copy over tau_load.sh if [ $mpi = yes ] then cat ${tauroot}/tools/src/tau_load.sh | sed -e 's,@TAUROOTDIR@,'$targetdir',' -e 's,@ARCH@,'$architecture',' > ${targetdir}/${architecture}/bin/tau_load.sh chmod a+rx ${targetdir}/${architecture}/bin/tau_load.sh echo "TAU: installed tau_load.sh in ${targetdir}/${architecture}/bin" fi if [ $ibmmpi = yes ] then cat ${tauroot}/tools/src/tau_poe | sed -e 's,@TAUROOTDIR@,'$targetdir',' -e 's,@ARCH@,'$architecture',' > ${targetdir}/${architecture}/bin/tau_poe chmod a+rx ${targetdir}/${architecture}/bin/tau_poe echo "TAU: installed tau_poe in ${targetdir}/${architecture}/bin" fi cp ${tauroot}/tools/src/jtau_tf/bin/TAU_tf.jar ${targetdir}/${architecture}/lib echo "TAU: installed Java trace reader/writer api in ${targetdir}/${architecture}/lib" if [ $trace = yes ] then cat ${tauroot}/tools/src/contrib/slog2sdk/bin/jumpshot.skel | sed -e 's,@TAUROOTDIR@,'$targetdir',' -e 's,@SHELL@,'$taushell',' -e 's,@ARCH@,'$architecture',' > ${targetdir}/${architecture}/bin/jumpshot chmod a+rx ${targetdir}/${architecture}/bin/jumpshot cat ${tauroot}/tools/src/contrib/slog2sdk/bin/slog2print.skel | sed -e 's,@TAUROOTDIR@,'$targetdir',' -e 's,@SHELL@,'$taushell',' -e 's,@ARCH@,'$architecture',' > ${targetdir}/${architecture}/bin/slog2print chmod a+rx ${targetdir}/${architecture}/bin/slog2print cat ${tauroot}/tools/src/tau2slog2/bin/tau2slog2.skel | sed -e 's,@OLDJDK@,'$oldjdk',' -e 's,@TAUROOTDIR@,'$targetdir',' -e 's,@SHELL@,'$taushell',' -e 's,@ARCH@,'$architecture',' > ${targetdir}/${architecture}/bin/tau2slog2 chmod a+rx ${targetdir}/${architecture}/bin/tau2slog2 echo "TAU: installed tau2slog2, slog2print and jumpshot in ${targetdir}/${architecture}/bin" cp ${tauroot}/tools/src/contrib/slog2sdk/lib/jumpshot.jar ${targetdir}/${architecture}/lib cp ${tauroot}/tools/src/contrib/slog2sdk/lib/traceTOslog2.jar ${targetdir}/${architecture}/lib cp ${tauroot}/tools/src/contrib/slog2sdk/lib/slog2printserial.jar ${targetdir}/${architecture}/lib cp ${tauroot}/tools/src/tau2slog2/bin/tau2slog2.jar ${targetdir}/${architecture}/lib echo "TAU: installed required slog2sdk jars in ${targetdir}/${architecture}/lib" fi if [ $slog2 = yes ] then if [ $internalslog2 = yes ] then cat ${tauroot}/tools/src/contrib/slog2sdk/bin/jumpshot.skel | sed -e 's,@TAUROOTDIR@,'$targetdir',' -e 's,@SHELL@,'$taushell',' -e 's,@ARCH@,'$architecture',' > ${targetdir}/${architecture}/bin/jumpshot chmod a+rx ${targetdir}/${architecture}/bin/jumpshot cat ${tauroot}/tools/src/contrib/slog2sdk/bin/slog2print.skel | sed -e 's,@TAUROOTDIR@,'$targetdir',' -e 's,@SHELL@,'$taushell',' -e 's,@ARCH@,'$architecture',' > ${targetdir}/${architecture}/bin/slog2print chmod a+rx ${targetdir}/${architecture}/bin/slog2print echo "TAU: installed slog2print and jumpshot in ${targetdir}/${architecture}/bin" cp ${tauroot}/tools/src/contrib/slog2sdk/lib/jumpshot.jar ${targetdir}/${architecture}/lib cp ${tauroot}/tools/src/contrib/slog2sdk/lib/traceTOslog2.jar ${targetdir}/${architecture}/lib cp ${tauroot}/tools/src/contrib/slog2sdk/lib/slog2printserial.jar ${targetdir}/${architecture}/lib echo "TAU: installed required slog2sdk jars in ${targetdir}/${architecture}/lib" slog2dir=$targetdir/$architecture fi utils/slogconverter/tau2slog2.skel $jdkdir $targetdir $slog2dir $architecture > $targetdir/$architecture/bin/tau2slog2JNI chmod a+rx ${targetdir}/${architecture}/bin/tau2slog2JNI echo "TAU: installed tau2slog2JNI in ${targetdir}/${architecture}/bin" fi echo "TAU: installed tauex in ${targetdir}/${architecture}/bin" cat ${tauroot}/tools/src/tauex.in | sed -e 's,@TAUROOTDIR@,'$targetdir',' -e 's,@SHELL@,'$taushell',' -e 's,@ARCH@,'$architecture',' \ > ${targetdir}/${architecture}/bin/tauex chmod a+rx ${targetdir}/${architecture}/bin/tauex echo "TAU: installed tauinc.sh in ${targetdir}/${architecture}/bin" cp ${tauroot}/tools/src/tauinc.sh ${targetdir}/${architecture}/bin chmod a+rx ${targetdir}/${architecture}/bin/tauinc.sh echo "TAU: installed TAU's PerfDMF database utilities in ${targetdir}/${architecture}/bin" cat ${tauroot}/tools/src/perfdmf/bin/configure.skel | sed -e 's,@TAUROOTDIR@,'$targetdir',' -e 's,@SHELL@,'$taushell',' -e 's,@ARCH@,'$architecture',' \ > ${targetdir}/${architecture}/bin/perfdmf_configure chmod a+rx ${targetdir}/${architecture}/bin/perfdmf_configure cat ${tauroot}/tools/src/perfdmf/bin/createapp.skel | sed -e 's,@TAUROOTDIR@,'$targetdir',' -e 's,@SHELL@,'$taushell',' -e 's,@ARCH@,'$architecture',' \ > ${targetdir}/${architecture}/bin/perfdmf_createapp chmod a+rx ${targetdir}/${architecture}/bin/perfdmf_createapp cat ${tauroot}/tools/src/perfdmf/bin/createexp.skel | sed -e 's,@TAUROOTDIR@,'$targetdir',' -e 's,@SHELL@,'$taushell',' -e 's,@ARCH@,'$architecture',' \ > ${targetdir}/${architecture}/bin/perfdmf_createexp chmod a+rx ${targetdir}/${architecture}/bin/perfdmf_createexp cat ${tauroot}/tools/src/perfdmf/bin/loadtrial.skel | sed -e 's,@TAUROOTDIR@,'$targetdir',' -e 's,@SHELL@,'$taushell',' -e 's,@ARCH@,'$architecture',' \ > ${targetdir}/${architecture}/bin/perfdmf_loadtrial chmod a+rx ${targetdir}/${architecture}/bin/perfdmf_loadtrial cat ${tauroot}/tools/src/perfdmf/bin/phaseconvert.skel | sed -e 's,@TAUROOTDIR@,'$targetdir',' -e 's,@SHELL@,'$taushell',' -e 's,@ARCH@,'$architecture',' \ > ${targetdir}/${architecture}/bin/phaseconvert chmod a+rx ${targetdir}/${architecture}/bin/phaseconvert cat ${tauroot}/tools/src/perfdmf/bin/derby.properties.skel | sed -e 's,@TAUROOTDIR@,'$targetdir',' -e 's,@SHELL@,'$taushell',' -e 's,@ARCH@,'$architecture',' \ > ${targetdir}/${architecture}/lib/derby.properties cat ${tauroot}/tools/src/perfexplorer/bin/configure.skel | sed -e 's,@TAUROOTDIR@,'$tauroot',' \ -e 's,@SHELL@,'$taushell',' \ -e 's,@ARCH@,'$architecture',' \ -e 's,@TARGETDIR@,'$targetdir',' \ > ${tauroot}/tools/src/perfexplorer/configure chmod a+rx ${tauroot}/tools/src/perfexplorer/configure cat ${tauroot}/tools/src/perfexplorer/bin/perfexplorer_configure.skel | sed -e 's,@TAUROOTDIR@,'$targetdir',' \ -e 's,@SHELL@,'$taushell',' \ -e 's,@ARCH@,'$architecture',' \ -e 's,@TARGETDIR@,'$targetdir',' \ > ${targetdir}/${architecture}/bin/perfexplorer_configure chmod a+rx ${targetdir}/${architecture}/bin/perfexplorer_configure if [ ! -d ${targetdir}/etc ] then mkdir -p ${targetdir}/etc fi cp ${tauroot}/tools/src/perfexplorer/bin/perfexplorer.skel ${targetdir}/etc/. cp ${tauroot}/tools/src/perfexplorer/etc/dbschema.derby ${targetdir}/etc/. cp ${tauroot}/tools/src/perfexplorer/etc/dbschema.mysql ${targetdir}/etc/. cp ${tauroot}/tools/src/perfexplorer/etc/dbschema.oracle ${targetdir}/etc/. cp ${tauroot}/tools/src/perfexplorer/etc/dbschema.postgresql ${targetdir}/etc/. cp ${tauroot}/tools/src/perfexplorer/etc/dbschema.db2 ${targetdir}/etc/. cp ${tauroot}/tools/src/perfexplorer/etc/java.policy ${targetdir}/etc/. if [ ${tauprefix} = unknown ] then targetdir=${tauroot} else targetdir=${tauprefix} fi cat ${tauroot}/tools/src/TauIL/bin/tau_analyze.skel | sed -e 's,@TAUROOTDIR@,'$targetdir',' -e 's,@SHELL@,'$taushell',' -e 's,@ARCH@,'$architecture',' \ > ${targetdir}/${architecture}/bin/tau_analyze chmod a+rx ${targetdir}/${architecture}/bin/tau_analyze echo "TAU: installed tau_analyze in ${targetdir}/${architecture}/bin" cat ${tauroot}/tools/src/TauIL/Makefile.inc.skel | sed -e 's,@TAUROOTDIR@,'$tauroot',' \ > ${tauroot}/tools/src/TauIL/Makefile.inc echo "TAU: installed Makefile.inc in ${tauroot}/tools/src/TauIL" cp ${tauroot}/tools/src/TauIL/bin/*.jar ${targetdir}/${architecture}/lib echo "TAU: installed TauIL and supporting jars in ${targetdir}/${architecture}/lib" cp ${tauroot}/tools/src/tau_throttle.sh ${targetdir}/${architecture}/bin echo "TAU: installed tau_trottle script" # -- determine Tcl/Tk version #cat << EOF > /tmp/tau$$ # # wm withdraw . # puts [info tclversion]/\$tk_version # if { ([info tclversion] >= 7.4) && (\$tk_version >= 4.0) } { # exit 0 # } else { # exit 1 # } #EOF #if tversion=`( wish8.3 -f /tmp/tau$$ ) 2>/dev/null` #then # wishname=wish8.3 # echo "Found Tcl/Tk wish $tversion" #else # if tversion=`( wish8.2 -f /tmp/tau$$ ) 2>/dev/null` # then # wishname=wish8.2 # echo "Found Tcl/Tk wish $tversion" # else # if tversion=`( wish8.0 -f /tmp/tau$$ ) 2>/dev/null` # then # wishname=wish8.0 # echo "Found Tcl/Tk wish $tversion" # else # if tversion=`( wish -f /tmp/tau$$ ) 2>/dev/null` # then # wishname=wish # echo "Found Tcl/Tk wish $tversion" # else # echo "ERROR: No working wish found - need Tcl 7.4/Tk 4.0 or higher for TAU" # wishname=wish # if tversion=`( $wishname -f /tmp/tau$$ ) 2>/dev/null` # then # echo "Found Tcl/Tk wish $tversion" # else # echo "Using $wishname as the wish interpreter in racy" # #rm /tmp/tau$$ # #exit # fi # fi # fi # fi #fi wishname=wish #rm /tmp/tau$$ #echo "Using wish command: $wishname" #echo " " # We do not need any tkman for RACY. # -- find out where tkman is installed #echo " " #echo "The TAU editor requires the manual page viewer, TkMan 1.7" #echo "(compiled w/ tk4.0-) to be installed." #echo " " tk_path="/usr/local/bin/tkman" #if tk_path=`( which tkman ) 2>/dev/null` #then # echo "Found tkman in $tk_path" #else # $echo "Please enter the absolute path/file name for the" # $echo "tkman executable [/usr/local/bin/tkman]:" # $echo "? ${nnl}" # read tk_path #fi #if [ "x$tk_path" = "x" ] # then # tk_path="/usr/local/bin/tkman" #fi #echo "tkman path set to: $tk_path" # -- set name of remote shell command if [ $machine = "hp9000s700" -o $machine = "hp9000s800" ] then remotesh=remsh else remotesh=rsh fi # -- now install the TAU tools #TAUTOOLS="tau taud fancy classy cagey racy dandy cosy dumpy speedy handy spiffy" # TAU Portable profiling package just needs racy TAUTOOLS="taud racy" if [ $tauprefix = unknown ] then echo " " echo "TAU: installing tools in ${tauroot}/${architecture}/bin" for tool in $TAUTOOLS do # $echo "TAU: installing ${tool}... ${nnl}" rm -f ${tauroot}/${architecture}/bin/$tool cat ${tauroot}/tools/tool.skel | sed -e 's,@TAUROOT@,'$tauprefix',' -e 's,@ARCH@,'$tauarch',' -e 's,@TOOL@,'$tool',' \ -e 's,@REMSH@,'$remotesh',' -e 's,@TKMANPATH@,'$tk_path',' \ -e 's,@WISHNAME@,'$wishname',' \ > ${tauroot}/${architecture}/bin/${tool} chmod a+rx ${tauroot}/${architecture}/bin/${tool} # echo "done" done else echo " " echo "TAU: installing tools in ${tauprefix}/${architecture}/bin" #Make installation directories if [ ! -d ${tauprefix} ] then echo "making directory $tauprefix " mkdir -p ${tauprefix} fi if [ ! -d ${tauprefix}/${architecture} ] then echo "making directory $tauprefix/$architecture lib bin" mkdir ${tauprefix}/${architecture} mkdir ${tauprefix}/${architecture}/lib mkdir ${tauprefix}/${architecture}/bin fi for tool in $TAUTOOLS do $echo "TAU: installing ${tool}... ${nnl}" rm -f ${tauprefix}/${architecture}/bin/$tool cat ${tauroot}/tools/tool.skel | sed -e 's,@TAUROOT@,'$tauprefix',' -e 's,@ARCH@,'$tauarch',' -e 's,@TOOL@,'$tool',' \ -e 's,@REMSH@,'$remotesh',' -e 's,@TKMANPATH@,'$tk_path',' \ -e 's,@WISHNAME@,'$wishname',' \ > ${tauprefix}/${architecture}/bin/${tool} chmod a+rx ${tauprefix}/${architecture}/bin/${tool} echo "done" done fi if [ $use_pcxx = yes ] then $echo "TAU: installing breezy... ${nnl}" rm -f ${tauroot}/bin/${architecture}/breezy cat lang_support/pc++/breezy/userAgent/tool.skel | sed -e 's,@TAUROOT@,'${tauroot}',' -e 's,@ARCH@,'${architecture}',' -e 's,@TOOL@,'breezy',' \ > ${tauroot}/bin/${architecture}/breezy chmod a+rx ${tauroot}/bin/${architecture}/breezy echo "done" if [ $tcltkfile = "/" ] then echo "" echo "For compiling the breezy user interface, we need the very" echo "site-specific locations for header files and libraries for" echo "X11 and Tcl/Tk. Typing after the questions will use" echo "the specified default locations in brackets." echo "" echo "Options for including Tcl/Tk headers [-I/usr/local/include]" $echo "? ${nnl}" read tcltkheader if [ "x$tcltkheader" = "x" ]; then tcltkheader="-I/usr/local/include"; fi foo="`echo $tcltkheader | sed -e 's/-I/-L/' -e 's/include/lib/'` -ltk4.0 -ltcl7.4" echo "Options for linking Tcl/Tk [$foo]" $echo "? ${nnl}" read tcltklib if [ "x$tcltklib" = "x" ]; then tcltklib="$foo"; fi echo "Options for including X11 headers [-I/usr/include]" $echo "? ${nnl}" read x11header if [ "x$x11header" = "x" ]; then x11header="-I/usr/include"; fi foo="`echo $x11header | sed -e 's/-I/-L/' -e 's/include/lib/'` -lX11" echo "Options for linking X11 [$foo]" $echo "? ${nnl}" read x11lib if [ "x$x11lib" = "x" ]; then x11lib="$foo"; fi echo "" else echo "TAU: using make info from file $tcltkfile" . $tcltkfile fi sed -e 's,^TCLTKHEADER =.*$,TCLTKHEADER = '"$tcltkheader"',' \ -e 's,^X11HEADER =.*$,X11HEADER = '"$x11header"',' \ -e 's,^X11LIB =.*$,X11LIB = '"$x11lib"',' \ -e 's,^TCLTKLIB =.*$,TCLTKLIB = '"$tcltklib"',' \ lang_support/pc++/breezy/userAgent/Makefile > tmpmake mv tmpmake lang_support/pc++/breezy/userAgent/Makefile fi # if breezy if [ $use_hpcxx = yes ] then # Fix the file info for preprocessor in lang_support/hpc++/include-clean sed -e 's,^#1 ".*/lang_support/hpc++/include/hpc++.h",'#1\ \"$tauroot/lang_support/hpc++/include/hpc++.h\"',' lang_support/hpc++/include-clean/hpc++.h > tmplib mv tmplib lang_support/hpc++/include-clean/hpc++.h fi # Save the FixMakefile args # Clear any old data grep "^#" ./utils/FixMakefile.info > ./utils/FixMakefile.info~~0 /bin/mv ./utils/FixMakefile.info~~0 ./utils/FixMakefile.info echo $fixmakeargs >> ./utils/FixMakefile.info # Now FINALLY FixMakefile with the string I have built utils/FixMakefile $fixmakeargs # Use default setups, forget everything else (PHB) if [ $machine = default ] then /bin/cp ./utils/FixMakefile.sed.default ./utils/FixMakefile.sed /bin/cp ./utils/FixMakefile.info.default ./utils/FixMakefile.info /bin/cp ./build/Config.info.default ./build/Config.info fi sedout="./utils/FixMakefile.sed" echo "Applying script to all Makefiles, please wait, this may take a while..." # Change back to $START_DIR (defined at the top) to ensure we're in the tau2 directory # before we execute this fairly dangerous 'find' command cd $START_DIR for i in `find . -name Makefile -print ` #for i in $tauroot/include/Makefile $tauroot/src/Profile/Makefile $tauroot/utils/Makefile $tauroot/Makefile do $echo ".${nnl}" sed -f $sedout < ${i} > ${i}~~0 mv ${i}~~0 ${i} done echo . if [ $tauprefix != unknown ] then echo "TAU: Copying include directory to ${tauprefix}" cp -r include ${tauprefix} echo "TAU: Copying man directory to ${tauprefix}" cp -r man ${tauprefix} fi # Attempt to install metatext (jev) if [ -f ./metatext/configure ] then cd ./metatext ./configure 1> /dev/null 2>&1 cd .. fi ############################################################################# # Set up TAU-specific build system echo " " echo "Configuring TAU Build scripts..." # -- Save C++ compiler, C compiler, and USEROPT for pC++ if [ $use_pcxx = yes ] then echo "$machine: pcxx_root = $sage1dir" >> \ ./build/pc++/Config.info echo "$machine: pcxx_cxx = $cxx_compiler" >> \ ./build/pc++/Config.info echo "$machine: pcxx_cc = $c_compiler" >> \ ./build/pc++/Config.info opt=`echo $useropt | sed -e 's/_/ /g'` echo "$machine: pcxx_useropt = $opt" >> \ ./build/pc++/Config.info echo "" >> ./build/pc++/Config.info fi # -- Save C++ compiler, C compiler, and USEROPT for HPC++ if [ $use_hpcxx = yes ] then opt=`echo $useropt | sed -e 's/_/ /g'` echo "$machine: hpcxx_useropt = $opt" >> \ ./build/hpc++/Config.info echo "$machine: hpcxx_sage1 = $sage1dir" >> \ ./build/hpc++/Config.info echo "$machine: hpcxx_sage2 = $sage2dir" >> \ ./build/hpc++/Config.info echo "$machine: hpcxx_pstl = $pstldir" >> \ ./build/hpc++/Config.info echo "$machine: hpcxx_hpnx = $hpnxdir" >> \ ./build/hpc++/Config.info echo "" >> ./build/hpc++/Config.info fi # Modify the Makefiles so include/Makefile is replaced by the TAU options # for specific examples echo "s@include \(.*\)TAUROOTDIR\(.*\)@include $\(TAUROOTDIR\)/$architecture/lib/Makefile.tau$tauoptions@g" > utils/sedexamples.out #echo "s@include/Makefile@$machine/lib/Makefile.tau$tauoptions@g" >utils/sedexamples.out sedex="./utils/sedexamples.out" echo "Modifying Makefiles in the examples subdirectory..." # Prefix start from examples directory pr=examples exampleslist="instrument/Makefile mapping/embedded/Makefile \ mapping/external/Makefile fork/Makefile selectiveAccess/Makefile" if [ $fortran_compiler != no ] then exampleslist="$exampleslist fortran/Makefile f90/Makefile" fi # Rules for adding examples follow... # If PDT is specified, then modify the following makefiles if [ $pdt = yes ] then exampleslist="$exampleslist autoinstrument/Makefile reduce/Makefile cinstrument/Makefile" if [ $fortran_compiler != no ] then exampleslist="$exampleslist selective/Makefile" fi fi # If PDT is specified WITH MPI if [ $pdt = yes -a $mpi = yes ] then exampleslist="$exampleslist pdt_mpi/c++/Makefile pdt_mpi/c/Makefile" if [ $pthread = yes ] then exampleslist="$exampleslist mixedmode/Makefile" fi if [ $fortran_compiler != no ] then exampleslist="$exampleslist pdt_mpi/f90/Makefile" fi fi if [ $mpi = yes ] then exampleslist="$exampleslist pi/Makefile mpishlib/Makefile" if [ $fortran_compiler != no ] then exampleslist="$exampleslist NPB2.3/config/make.def" fi if [ $openmp = yes ] then exampleslist="$exampleslist openmpi/Makefile" fi fi if [ $opari = yes ] then exampleslist="$exampleslist opari/c++/Makefile" if [ $pdt = yes -a $fortran_compiler != no ] then exampleslist="$exampleslist opari/pdt_f90/Makefile" fi if [ $mpi = yes ] then exampleslist="$exampleslist opari/openmpi/Makefile" fi fi if [ $trace = yes ] then exampleslist="$exampleslist traceinput/c++/Makefile traceinput/c/Makefile" fi if [ $callpath = yes ] then exampleslist="$exampleslist callpath/Makefile" fi if [ $python = yes -o $java = yes -o $dyninst = yes ] then # RESET the exampleslist, the C, C++, F90 examples don't matter! exampleslist="" fi if [ $pthread = yes ] then exampleslist="$exampleslist threads/Makefile cthreads/Makefile" fi if [ $sproc = yes ] then exampleslist="$exampleslist sproc/Makefile" fi if [ $papi = yes -o $pcl = yes ] then exampleslist="$exampleslist papi/Makefile multicounter/Makefile" if [ $pthread = yes ] then exampleslist="$exampleslist papithreads/Makefile" fi fi ###################################################################### # If the default gcc/g++ is not used, Modify the Makefiles... # Choose the c++ and cc compiler case $machine in apple) gunzip -c tools/src/contrib/jogl/apple/libjogl.jnilib.gz > $tautoplevel/$architecture/lib/libjogl.jnilib gunzip -c tools/src/contrib/jogl/apple/libjogl_awt.jnilib.gz > $tautoplevel/$architecture/lib/libjogl_awt.jnilib gunzip -c tools/src/contrib/jogl/apple/libjogl_cg.jnilib.gz > $tautoplevel/$architecture/lib/libjogl_cg.jnilib ;; i386_linux) gunzip -c tools/src/contrib/jogl/i386_linux/libjogl.so.gz > $tautoplevel/$architecture/lib/libjogl.so gunzip -c tools/src/contrib/jogl/i386_linux/libjogl_awt.so.gz > $tautoplevel/$architecture/lib/libjogl_awt.so gunzip -c tools/src/contrib/jogl/i386_linux/libjogl_cg.so.gz > $tautoplevel/$architecture/lib/libjogl_cg.so gunzip -c tools/src/contrib/jogl/i386_linux/libjogl_drihack.so.gz > $tautoplevel/$architecture/lib/libjogl_drihack.so ;; x86_64) gunzip -c tools/src/contrib/jogl/x86_64/libjogl.so.gz > $tautoplevel/$architecture/lib/libjogl.so gunzip -c tools/src/contrib/jogl/x86_64/libjogl_awt.so.gz > $tautoplevel/$architecture/lib/libjogl_awt.so gunzip -c tools/src/contrib/jogl/x86_64/libjogl_drihack.so.gz > $tautoplevel/$architecture/lib/libjogl_drihack.so gunzip -c tools/src/contrib/jogl/x86_64/libjogl_cg.so.gz > $tautoplevel/$architecture/lib/libjogl_cg.so ;; ia64) gunzip -c tools/src/contrib/jogl/ia64/libjogl.so.gz > $tautoplevel/$architecture/lib/libjogl.so gunzip -c tools/src/contrib/jogl/ia64/libjogl_awt.so.gz > $tautoplevel/$architecture/lib/libjogl_awt.so gunzip -c tools/src/contrib/jogl/ia64/libjogl_drihack.so.gz > $tautoplevel/$architecture/lib/libjogl_drihack.so ;; solaris2) gunzip -c tools/src/contrib/jogl/solaris2/libjogl.so.gz > $tautoplevel/$architecture/lib/libjogl.so gunzip -c tools/src/contrib/jogl/solaris2/libjogl_awt.so.gz > $tautoplevel/$architecture/lib/libjogl_awt.so gunzip -c tools/src/contrib/jogl/solaris2/libjogl_drihack.so.gz > $tautoplevel/$architecture/lib/libjogl_drihack.so ;; solaris2-64) gunzip -c tools/src/contrib/jogl/solaris2-64/libjogl.so.gz > $tautoplevel/$architecture/lib/libjogl.so gunzip -c tools/src/contrib/jogl/solaris2-64/libjogl_awt.so.gz > $tautoplevel/$architecture/lib/libjogl_awt.so gunzip -c tools/src/contrib/jogl/solaris2-64/libjogl_drihack.so.gz > $tautoplevel/$architecture/lib/libjogl_drihack.so ;; sun386i) gunzip -c tools/src/contrib/jogl/sun386i/libjogl.so.gz > $tautoplevel/$architecture/lib/libjogl.so gunzip -c tools/src/contrib/jogl/sun386i/libjogl_awt.so.gz > $tautoplevel/$architecture/lib/libjogl_awt.so gunzip -c tools/src/contrib/jogl/sun386i/libjogl_drihack.so.gz > $tautoplevel/$architecture/lib/libjogl_drihack.so ;; sunx86_64) gunzip -c tools/src/contrib/jogl/sunx86_64/libjogl.so.gz > $tautoplevel/$architecture/lib/libjogl.so gunzip -c tools/src/contrib/jogl/sunx86_64/libjogl_awt.so.gz > $tautoplevel/$architecture/lib/libjogl_awt.so gunzip -c tools/src/contrib/jogl/sunx86_64/libjogl_drihack.so.gz > $tautoplevel/$architecture/lib/libjogl_drihack.so ;; *) $echo "Platform does not support JOGL, no 3d displays will be available in ParaProf" ;; esac # Modify the Makefiles only if prefix is not specified. if [ $tauprefix = unknown ] then for i in $exampleslist do $echo ".${nnl}" sed -f $sedex < $pr/${i} > $pr/${i}~~0 mv $pr/${i}~~0 $pr/${i} done # Copy over the Makefile so make clean works cp include/Makefile $machine/lib/Makefile.tau$tauoptions fi echo . # If it is default, restore to original state if [ "y$1" = "ydefault" ] then echo "Fixing examples Makefiles..." echo "s@include \(.*\)TAUROOTDIR\(.*\)@include $\(TAUROOTDIR\)/include/Makefile@g" >utils/sedexamples.out sedex="./utils/sedexamples.out" for i in `find examples -name Makefile -print` examples/NPB2.3/config/make.def do $echo ".${nnl}" sed -f $sedex < ${i} > ${i}~~0 mv ${i}~~0 ${i} done fi if [ $perf = yes ] then cp include/Makefile $tautoplevel/$architecture/lib/Makefile.tau$tauoptions fi if [ $slog2 = yes ] then /bin/rm -f utils/slogconverter/trace_impl.h utils/slogconverter/slogtest $jdkdir > utils/slogconverter/trace_impl.h fi if [ $tauprefix != unknown ] then cp -r examples ${tauprefix} cp .all_configs .last_config ${tauprefix} fi # bye bye echo echo "Configuration complete!" if [ $tauprefix != unknown ] then echo " Please add " $tauprefix/$architecture/bin " to your path" else echo " Please add " $tauroot/$architecture/bin " to your path" fi echo ' Type "make install" to begin compilation' exit 0 tau-2.16.4/examples/000077500000000000000000000000001062343042700142145ustar00rootroot00000000000000tau-2.16.4/examples/NPB2.3/000077500000000000000000000000001062343042700150565ustar00rootroot00000000000000tau-2.16.4/examples/NPB2.3/LU/000077500000000000000000000000001062343042700153765ustar00rootroot00000000000000tau-2.16.4/examples/NPB2.3/LU/Makefile000066400000000000000000000045751062343042700170510ustar00rootroot00000000000000SHELL=/bin/sh BENCHMARK=lu BENCHMARKU=LU include ../config/make.def OBJS = lu.o init_comm.o read_input.o bcast_inputs.o proc_grid.o neighbors.o \ nodedim.o subdomain.o setcoeff.o sethyper.o setbv.o exact.o setiv.o \ erhs.o ssor.o exchange_1.o exchange_3.o exchange_4.o exchange_5.o \ exchange_6.o rhs.o l2norm.o jacld.o blts.o jacu.o buts.o error.o \ pintgr.o verify.o ${COMMON}/print_results.o ${COMMON}/timers.o include ../sys/make.common # npbparams.h is included by applu.incl # The following rule should do the trick but many make programs (not gmake) # will do the wrong thing and rebuild the world every time (because the # mod time on header.h is not changed. One solution would be to # touch header.h but this might cause confusion if someone has # accidentally deleted it. Instead, make the dependency on npbparams.h # explicit in all the lines below (even though dependence is indirect). # applu.incl: npbparams.h ${PROGRAM}: config ${OBJS} ${FLINK} ${FLINKFLAGS} -o ${PROGRAM} ${OBJS} ${FMPI_LIB} .f.o : ${FCOMPILE} $< lu.o: lu.f applu.incl npbparams.h bcast_inputs.o: bcast_inputs.f applu.incl npbparams.h mpinpb.h blts.o: blts.f buts.o: buts.f erhs.o: erhs.f applu.incl npbparams.h error.o: error.f applu.incl npbparams.h mpinpb.h exact.o: exact.f applu.incl npbparams.h exchange_1.o: exchange_1.f applu.incl npbparams.h mpinpb.h exchange_3.o: exchange_3.f applu.incl npbparams.h mpinpb.h exchange_4.o: exchange_4.f applu.incl npbparams.h mpinpb.h exchange_5.o: exchange_5.f applu.incl npbparams.h mpinpb.h exchange_6.o: exchange_6.f applu.incl npbparams.h mpinpb.h init_comm.o: init_comm.f applu.incl npbparams.h mpinpb.h jacld.o: jacld.f applu.incl npbparams.h jacu.o: jacu.f applu.incl npbparams.h l2norm.o: l2norm.f mpinpb.h neighbors.o: neighbors.f applu.incl npbparams.h nodedim.o: nodedim.f pintgr.o: pintgr.f applu.incl npbparams.h mpinpb.h proc_grid.o: proc_grid.f applu.incl npbparams.h read_input.o: read_input.f applu.incl npbparams.h mpinpb.h rhs.o: rhs.f applu.incl npbparams.h setbv.o: setbv.f applu.incl npbparams.h setiv.o: setiv.f applu.incl npbparams.h setcoeff.o: setcoeff.f applu.incl npbparams.h sethyper.o: sethyper.f applu.incl npbparams.h ssor.o: ssor.f applu.incl npbparams.h mpinpb.h subdomain.o: subdomain.f applu.incl npbparams.h mpinpb.h verify.o: verify.f applu.incl npbparams.h clean: - /bin/rm -f npbparams.h - /bin/rm -f *.o *~ tau-2.16.4/examples/NPB2.3/LU/README000066400000000000000000000241331062343042700162610ustar00rootroot00000000000000For Fortran instrumentation, we'd need: 1) The name of the subroutine/function. 2) The location of the point where variable declaration starts (after any includes and implicit definitions) (To insert profiler variables). 3) The location of the point where the variable declarations in the routine end and the code begins (To insert TAU_PROFILE routines) 4) The locations of points where the routine exits (end in program, return points in subroutines and functions ) (To insert TAU_PROFILE_STOP routine) 5) If the routine is the program entry point, then a way to recognize this. (To insert TAU_PROFILE_INIT routine). Example: 1. instrumentation in main. !-------------------------------------------------------------------------! ! ! ! N A S P A R A L L E L B E N C H M A R K S 2.3 ! ! ! ! L U ! ! ! !-------------------------------------------------------------------------! ! ! ! This benchmark is part of the NAS Parallel Benchmark 2.3 suite. ! ! It is described in NAS Technical Report 95-020. ! ! ! ! Permission to use, copy, distribute and modify this software ! ! for any purpose with or without fee is hereby granted. We ! ! request, however, that all derived work reference the NAS ! ! Parallel Benchmarks 2.3. This software is provided "as is" ! ! without express or implied warranty. ! ! ! ! Information on NPB 2.3, including the technical report, the ! ! original specifications, source code, results and information ! ! on how to submit new results, is available at: ! ! ! ! http://www.nas.nasa.gov/NAS/NPB/ ! ! ! ! Send comments or suggestions to npb@nas.nasa.gov ! ! Send bug reports to npb-bugs@nas.nasa.gov ! ! ! ! NAS Parallel Benchmarks Group ! ! NASA Ames Research Center ! ! Mail Stop: T27A-1 ! ! Moffett Field, CA 94035-1000 ! ! ! ! E-mail: npb@nas.nasa.gov ! ! Fax: (415) 604-3957 ! ! ! !-------------------------------------------------------------------------! c--------------------------------------------------------------------- c c Authors: S. Weeratunga c V. Venkatakrishnan c E. Barszcz c M. Yarrow c c--------------------------------------------------------------------- c--------------------------------------------------------------------- program applu c--------------------------------------------------------------------- c--------------------------------------------------------------------- c c driver for the performance evaluation of the solver for c five coupled parabolic/elliptic partial differential equations. c c--------------------------------------------------------------------- implicit none integer profiler(2) save profiler include 'applu.incl' character class logical verified double precision mflops integer ierr c--------------------------------------------------------------------- c initialize communications c--------------------------------------------------------------------- call TAU_PROFILE_INIT() call TAU_PROFILE_TIMER(profiler, 'applu') call TAU_PROFILE_START(profiler) call init_comm() c--------------------------------------------------------------------- c read input data c--------------------------------------------------------------------- call read_input() c--------------------------------------------------------------------- c set up processor grid c--------------------------------------------------------------------- call proc_grid() c--------------------------------------------------------------------- c determine the neighbors c--------------------------------------------------------------------- call neighbors() c--------------------------------------------------------------------- c set up sub-domain sizes c--------------------------------------------------------------------- call subdomain() c--------------------------------------------------------------------- c set up coefficients c--------------------------------------------------------------------- call setcoeff() c--------------------------------------------------------------------- c set the masks required for comm c--------------------------------------------------------------------- call sethyper() c--------------------------------------------------------------------- c set the boundary values for dependent variables c--------------------------------------------------------------------- call setbv() c--------------------------------------------------------------------- c set the initial values for dependent variables c--------------------------------------------------------------------- call setiv() c--------------------------------------------------------------------- c compute the forcing term based on prescribed exact solution c--------------------------------------------------------------------- call erhs() c--------------------------------------------------------------------- c perform the SSOR iterations c--------------------------------------------------------------------- call ssor() c--------------------------------------------------------------------- c compute the solution error c--------------------------------------------------------------------- call error() c--------------------------------------------------------------------- c compute the surface integral c--------------------------------------------------------------------- call pintgr() c--------------------------------------------------------------------- c verification test c--------------------------------------------------------------------- IF (id.eq.0) THEN call verify ( rsdnm, errnm, frc, class, verified ) mflops = float(itmax)*(1984.77*float( nx0 ) > *float( ny0 ) > *float( nz0 ) > -10923.3*(float( nx0+ny0+nz0 )/3.)**2 > +27770.9* float( nx0+ny0+nz0 )/3. > -144010.) > / (maxtime*1000000.) call print_results('LU', class, nx0, > ny0, nz0, itmax, nnodes_compiled, > num, maxtime, mflops, ' floating point', verified, > npbversion, compiletime, cs1, cs2, cs3, cs4, cs5, cs6, > '(none)') END IF call mpi_finalize(ierr) call TAU_PROFILE_STOP(profiler) end 2. Instrumentation of any routine. c--------------------------------------------------------------------- c--------------------------------------------------------------------- subroutine setiv c--------------------------------------------------------------------- c--------------------------------------------------------------------- c--------------------------------------------------------------------- c c set the initial values of independent variables based on tri-linear c interpolation of boundary values in the computational space. c c--------------------------------------------------------------------- implicit none include 'applu.incl' c--------------------------------------------------------------------- c local variables c--------------------------------------------------------------------- integer profiler(2) save profiler integer i, j, k, m integer iglob, jglob double precision xi, eta, zeta double precision pxi, peta, pzeta double precision ue_1jk(5),ue_nx0jk(5),ue_i1k(5), > ue_iny0k(5),ue_ij1(5),ue_ijnz(5) call TAU_PROFILE_TIMER(profiler, 'setiv'); call TAU_PROFILE_START(profiler); do k = 2, nz - 1 zeta = ( dble (k-1) ) / (nz-1) do j = 1, ny jglob = jpt + j IF (jglob.ne.1.and.jglob.ne.ny0) then eta = ( dble (jglob-1) ) / (ny0-1) do i = 1, nx iglob = ipt + i IF (iglob.ne.1.and.iglob.ne.nx0) then xi = ( dble (iglob-1) ) / (nx0-1) call exact (1,jglob,k,ue_1jk) call exact (nx0,jglob,k,ue_nx0jk) call exact (iglob,1,k,ue_i1k) call exact (iglob,ny0,k,ue_iny0k) call exact (iglob,jglob,1,ue_ij1) call exact (iglob,jglob,nz,ue_ijnz) do m = 1, 5 pxi = ( 1.0d+00 - xi ) * ue_1jk(m) > + xi * ue_nx0jk(m) peta = ( 1.0d+00 - eta ) * ue_i1k(m) > + eta * ue_iny0k(m) pzeta = ( 1.0d+00 - zeta ) * ue_ij1(m) > + zeta * ue_ijnz(m) u( m, i, j, k ) = pxi + peta + pzeta > - pxi * peta - peta * pzeta - pzeta * pxi > + pxi * peta * pzeta end do END IF end do END IF end do end do call TAU_PROFILE_STOP(profiler); return end tau-2.16.4/examples/NPB2.3/LU/applu.incl000066400000000000000000000125411062343042700173710ustar00rootroot00000000000000 c--------------------------------------------------------------------- c--------------------------------------------------------------------- c--- applu.incl c--------------------------------------------------------------------- c--------------------------------------------------------------------- c--------------------------------------------------------------------- c npbparams.h defines parameters that depend on the class and c number of nodes c--------------------------------------------------------------------- include 'npbparams.h' c--------------------------------------------------------------------- c parameters which can be overridden in runtime config file c (in addition to size of problem - isiz01,02,03 give the maximum size) c ipr = 1 to print out verbose information c omega = 2.0 is correct for all classes c tolrsd is tolerance levels for steady state residuals c--------------------------------------------------------------------- integer ipr_default parameter (ipr_default = 1) double precision omega_default parameter (omega_default = 1.2d0) double precision tolrsd1_def, tolrsd2_def, tolrsd3_def, > tolrsd4_def, tolrsd5_def parameter (tolrsd1_def=1.0e-08, > tolrsd2_def=1.0e-08, tolrsd3_def=1.0e-08, > tolrsd4_def=1.0e-08, tolrsd5_def=1.0e-08) double precision c1, c2, c3, c4, c5 parameter( c1 = 1.40d+00, c2 = 0.40d+00, > c3 = 1.00d-01, c4 = 1.00d+00, > c5 = 1.40d+00 ) c--------------------------------------------------------------------- c grid c--------------------------------------------------------------------- integer nx, ny, nz integer nx0, ny0, nz0 integer ipt, ist, iend integer jpt, jst, jend integer ii1, ii2 integer ji1, ji2 integer ki1, ki2 double precision dxi, deta, dzeta double precision tx1, tx2, tx3 double precision ty1, ty2, ty3 double precision tz1, tz2, tz3 common/cgcon/ dxi, deta, dzeta, > tx1, tx2, tx3, > ty1, ty2, ty3, > tz1, tz2, tz3, > nx, ny, nz, > nx0, ny0, nz0, > ipt, ist, iend, > jpt, jst, jend, > ii1, ii2, > ji1, ji2, > ki1, ki2 c--------------------------------------------------------------------- c dissipation c--------------------------------------------------------------------- double precision dx1, dx2, dx3, dx4, dx5 double precision dy1, dy2, dy3, dy4, dy5 double precision dz1, dz2, dz3, dz4, dz5 double precision dssp common/disp/ dx1,dx2,dx3,dx4,dx5, > dy1,dy2,dy3,dy4,dy5, > dz1,dz2,dz3,dz4,dz5, > dssp c--------------------------------------------------------------------- c field variables and residuals c--------------------------------------------------------------------- double precision u(5,-1:isiz1+2,-1:isiz2+2,isiz3), > rsd(5,-1:isiz1+2,-1:isiz2+2,isiz3), > frct(5,-1:isiz1+2,-1:isiz2+2,isiz3), > flux(5,0:isiz1+1,0:isiz2+1,isiz3) common/cvar/ u, > rsd, > frct, > flux c--------------------------------------------------------------------- c output control parameters c--------------------------------------------------------------------- integer ipr, inorm common/cprcon/ ipr, inorm c--------------------------------------------------------------------- c newton-raphson iteration control parameters c--------------------------------------------------------------------- integer itmax, invert double precision dt, omega, tolrsd(5), > rsdnm(5), errnm(5), frc, ttotal common/ctscon/ dt, omega, tolrsd, > rsdnm, errnm, frc, ttotal, > itmax, invert double precision a(5,5,isiz1,isiz2), > b(5,5,isiz1,isiz2), > c(5,5,isiz1,isiz2), > d(5,5,isiz1,isiz2) common/cjac/ a, b, c, d c--------------------------------------------------------------------- c coefficients of the exact solution c--------------------------------------------------------------------- double precision ce(5,13) common/cexact/ ce c--------------------------------------------------------------------- c multi-processor common blocks c--------------------------------------------------------------------- integer id, ndim, num, xdim, ydim, row, col common/dim/ id,ndim,num,xdim,ydim,row,col integer north,south,east,west common/neigh/ north,south,east, west integer from_s,from_n,from_e,from_w parameter (from_s=1,from_n=2,from_e=3,from_w=4) integer npmax parameter (npmax=isiz01+isiz02) logical icommn(npmax+1),icomms(npmax+1), > icomme(npmax+1),icommw(npmax+1) double precision buf(5,2*isiz2*isiz3), > buf1(5,2*isiz2*isiz3) common/comm/ buf, buf1, > icommn,icomms, > icomme,icommw double precision maxtime common/timer/maxtime c--------------------------------------------------------------------- c end of include file c--------------------------------------------------------------------- tau-2.16.4/examples/NPB2.3/LU/bcast_inputs.f000066400000000000000000000035241062343042700202470ustar00rootroot00000000000000c--------------------------------------------------------------------- c--------------------------------------------------------------------- subroutine bcast_inputs c--------------------------------------------------------------------- c--------------------------------------------------------------------- implicit none integer profiler(2) save profiler include 'mpinpb.h' include 'applu.incl' c--------------------------------------------------------------------- c local variables c--------------------------------------------------------------------- integer IERR c--------------------------------------------------------------------- c root broadcasts the data c The data isn't contiguous or of the same type, so it's not c clear how to send it in the "MPI" way. c We could pack the info into a buffer or we could create c an obscene datatype to handle it all at once. Since we only c broadcast the data once, just use a separate broadcast for c each piece. c--------------------------------------------------------------------- call TAU_PROFILE_TIMER(profiler, 'bcast_inputs'); call TAU_PROFILE_START(profiler); call MPI_BCAST(ipr, 1, MPI_INTEGER, root, MPI_COMM_WORLD, ierr) call MPI_BCAST(inorm, 1, MPI_INTEGER, root, MPI_COMM_WORLD, ierr) call MPI_BCAST(itmax, 1, MPI_INTEGER, root, MPI_COMM_WORLD, ierr) call MPI_BCAST(dt, 1, dp_type, root, MPI_COMM_WORLD, ierr) call MPI_BCAST(omega, 1, dp_type, root, MPI_COMM_WORLD, ierr) call MPI_BCAST(tolrsd, 5, dp_type, root, MPI_COMM_WORLD, ierr) call MPI_BCAST(nx0, 1, dp_type, root, MPI_COMM_WORLD, ierr) call MPI_BCAST(ny0, 1, dp_type, root, MPI_COMM_WORLD, ierr) call MPI_BCAST(nz0, 1, dp_type, root, MPI_COMM_WORLD, ierr) call TAU_PROFILE_STOP(profiler); return end tau-2.16.4/examples/NPB2.3/LU/blts.f000066400000000000000000000216141062343042700165150ustar00rootroot00000000000000c--------------------------------------------------------------------- c--------------------------------------------------------------------- subroutine blts ( ldmx, ldmy, ldmz, > nx, ny, nz, k, > omega, > v, > ldz, ldy, ldx, d, > ist, iend, jst, jend, > nx0, ny0, ipt, jpt) c--------------------------------------------------------------------- c--------------------------------------------------------------------- c--------------------------------------------------------------------- c c compute the regular-sparse, block lower triangular solution: c c v <-- ( L-inv ) * v c c--------------------------------------------------------------------- implicit none c--------------------------------------------------------------------- c input parameters c--------------------------------------------------------------------- integer profiler(2) save profiler integer ldmx, ldmy, ldmz integer nx, ny, nz integer k double precision omega double precision v( 5, -1:ldmx+2, -1:ldmy+2, *), > ldz( 5, 5, ldmx, ldmy), > ldy( 5, 5, ldmx, ldmy), > ldx( 5, 5, ldmx, ldmy), > d( 5, 5, ldmx, ldmy) integer ist, iend integer jst, jend integer nx0, ny0 integer ipt, jpt c--------------------------------------------------------------------- c local variables c--------------------------------------------------------------------- integer i, j, m integer iex double precision tmp, tmp1 double precision tmat(5,5) c--------------------------------------------------------------------- c receive data from north and west c--------------------------------------------------------------------- call TAU_PROFILE_TIMER(profiler, 'blts'); call TAU_PROFILE_START(profiler); iex = 0 call exchange_1( v,k,iex ) do j = jst, jend do i = ist, iend do m = 1, 5 v( m, i, j, k ) = v( m, i, j, k ) > - omega * ( ldz( m, 1, i, j ) * v( 1, i, j, k-1 ) > + ldz( m, 2, i, j ) * v( 2, i, j, k-1 ) > + ldz( m, 3, i, j ) * v( 3, i, j, k-1 ) > + ldz( m, 4, i, j ) * v( 4, i, j, k-1 ) > + ldz( m, 5, i, j ) * v( 5, i, j, k-1 ) ) end do end do end do do j=jst,jend do i = ist, iend do m = 1, 5 v( m, i, j, k ) = v( m, i, j, k ) > - omega * ( ldy( m, 1, i, j ) * v( 1, i, j-1, k ) > + ldx( m, 1, i, j ) * v( 1, i-1, j, k ) > + ldy( m, 2, i, j ) * v( 2, i, j-1, k ) > + ldx( m, 2, i, j ) * v( 2, i-1, j, k ) > + ldy( m, 3, i, j ) * v( 3, i, j-1, k ) > + ldx( m, 3, i, j ) * v( 3, i-1, j, k ) > + ldy( m, 4, i, j ) * v( 4, i, j-1, k ) > + ldx( m, 4, i, j ) * v( 4, i-1, j, k ) > + ldy( m, 5, i, j ) * v( 5, i, j-1, k ) > + ldx( m, 5, i, j ) * v( 5, i-1, j, k ) ) end do c--------------------------------------------------------------------- c diagonal block inversion c c forward elimination c--------------------------------------------------------------------- do m = 1, 5 tmat( m, 1 ) = d( m, 1, i, j ) tmat( m, 2 ) = d( m, 2, i, j ) tmat( m, 3 ) = d( m, 3, i, j ) tmat( m, 4 ) = d( m, 4, i, j ) tmat( m, 5 ) = d( m, 5, i, j ) end do tmp1 = 1.0d+00 / tmat( 1, 1 ) tmp = tmp1 * tmat( 2, 1 ) tmat( 2, 2 ) = tmat( 2, 2 ) > - tmp * tmat( 1, 2 ) tmat( 2, 3 ) = tmat( 2, 3 ) > - tmp * tmat( 1, 3 ) tmat( 2, 4 ) = tmat( 2, 4 ) > - tmp * tmat( 1, 4 ) tmat( 2, 5 ) = tmat( 2, 5 ) > - tmp * tmat( 1, 5 ) v( 2, i, j, k ) = v( 2, i, j, k ) > - v( 1, i, j, k ) * tmp tmp = tmp1 * tmat( 3, 1 ) tmat( 3, 2 ) = tmat( 3, 2 ) > - tmp * tmat( 1, 2 ) tmat( 3, 3 ) = tmat( 3, 3 ) > - tmp * tmat( 1, 3 ) tmat( 3, 4 ) = tmat( 3, 4 ) > - tmp * tmat( 1, 4 ) tmat( 3, 5 ) = tmat( 3, 5 ) > - tmp * tmat( 1, 5 ) v( 3, i, j, k ) = v( 3, i, j, k ) > - v( 1, i, j, k ) * tmp tmp = tmp1 * tmat( 4, 1 ) tmat( 4, 2 ) = tmat( 4, 2 ) > - tmp * tmat( 1, 2 ) tmat( 4, 3 ) = tmat( 4, 3 ) > - tmp * tmat( 1, 3 ) tmat( 4, 4 ) = tmat( 4, 4 ) > - tmp * tmat( 1, 4 ) tmat( 4, 5 ) = tmat( 4, 5 ) > - tmp * tmat( 1, 5 ) v( 4, i, j, k ) = v( 4, i, j, k ) > - v( 1, i, j, k ) * tmp tmp = tmp1 * tmat( 5, 1 ) tmat( 5, 2 ) = tmat( 5, 2 ) > - tmp * tmat( 1, 2 ) tmat( 5, 3 ) = tmat( 5, 3 ) > - tmp * tmat( 1, 3 ) tmat( 5, 4 ) = tmat( 5, 4 ) > - tmp * tmat( 1, 4 ) tmat( 5, 5 ) = tmat( 5, 5 ) > - tmp * tmat( 1, 5 ) v( 5, i, j, k ) = v( 5, i, j, k ) > - v( 1, i, j, k ) * tmp tmp1 = 1.0d+00 / tmat( 2, 2 ) tmp = tmp1 * tmat( 3, 2 ) tmat( 3, 3 ) = tmat( 3, 3 ) > - tmp * tmat( 2, 3 ) tmat( 3, 4 ) = tmat( 3, 4 ) > - tmp * tmat( 2, 4 ) tmat( 3, 5 ) = tmat( 3, 5 ) > - tmp * tmat( 2, 5 ) v( 3, i, j, k ) = v( 3, i, j, k ) > - v( 2, i, j, k ) * tmp tmp = tmp1 * tmat( 4, 2 ) tmat( 4, 3 ) = tmat( 4, 3 ) > - tmp * tmat( 2, 3 ) tmat( 4, 4 ) = tmat( 4, 4 ) > - tmp * tmat( 2, 4 ) tmat( 4, 5 ) = tmat( 4, 5 ) > - tmp * tmat( 2, 5 ) v( 4, i, j, k ) = v( 4, i, j, k ) > - v( 2, i, j, k ) * tmp tmp = tmp1 * tmat( 5, 2 ) tmat( 5, 3 ) = tmat( 5, 3 ) > - tmp * tmat( 2, 3 ) tmat( 5, 4 ) = tmat( 5, 4 ) > - tmp * tmat( 2, 4 ) tmat( 5, 5 ) = tmat( 5, 5 ) > - tmp * tmat( 2, 5 ) v( 5, i, j, k ) = v( 5, i, j, k ) > - v( 2, i, j, k ) * tmp tmp1 = 1.0d+00 / tmat( 3, 3 ) tmp = tmp1 * tmat( 4, 3 ) tmat( 4, 4 ) = tmat( 4, 4 ) > - tmp * tmat( 3, 4 ) tmat( 4, 5 ) = tmat( 4, 5 ) > - tmp * tmat( 3, 5 ) v( 4, i, j, k ) = v( 4, i, j, k ) > - v( 3, i, j, k ) * tmp tmp = tmp1 * tmat( 5, 3 ) tmat( 5, 4 ) = tmat( 5, 4 ) > - tmp * tmat( 3, 4 ) tmat( 5, 5 ) = tmat( 5, 5 ) > - tmp * tmat( 3, 5 ) v( 5, i, j, k ) = v( 5, i, j, k ) > - v( 3, i, j, k ) * tmp tmp1 = 1.0d+00 / tmat( 4, 4 ) tmp = tmp1 * tmat( 5, 4 ) tmat( 5, 5 ) = tmat( 5, 5 ) > - tmp * tmat( 4, 5 ) v( 5, i, j, k ) = v( 5, i, j, k ) > - v( 4, i, j, k ) * tmp c--------------------------------------------------------------------- c back substitution c--------------------------------------------------------------------- v( 5, i, j, k ) = v( 5, i, j, k ) > / tmat( 5, 5 ) v( 4, i, j, k ) = v( 4, i, j, k ) > - tmat( 4, 5 ) * v( 5, i, j, k ) v( 4, i, j, k ) = v( 4, i, j, k ) > / tmat( 4, 4 ) v( 3, i, j, k ) = v( 3, i, j, k ) > - tmat( 3, 4 ) * v( 4, i, j, k ) > - tmat( 3, 5 ) * v( 5, i, j, k ) v( 3, i, j, k ) = v( 3, i, j, k ) > / tmat( 3, 3 ) v( 2, i, j, k ) = v( 2, i, j, k ) > - tmat( 2, 3 ) * v( 3, i, j, k ) > - tmat( 2, 4 ) * v( 4, i, j, k ) > - tmat( 2, 5 ) * v( 5, i, j, k ) v( 2, i, j, k ) = v( 2, i, j, k ) > / tmat( 2, 2 ) v( 1, i, j, k ) = v( 1, i, j, k ) > - tmat( 1, 2 ) * v( 2, i, j, k ) > - tmat( 1, 3 ) * v( 3, i, j, k ) > - tmat( 1, 4 ) * v( 4, i, j, k ) > - tmat( 1, 5 ) * v( 5, i, j, k ) v( 1, i, j, k ) = v( 1, i, j, k ) > / tmat( 1, 1 ) enddo enddo c--------------------------------------------------------------------- c send data to east and south c--------------------------------------------------------------------- iex = 2 call exchange_1( v,k,iex ) call TAU_PROFILE_STOP(profiler); return end tau-2.16.4/examples/NPB2.3/LU/buts.f000066400000000000000000000221001062343042700165150ustar00rootroot00000000000000c--------------------------------------------------------------------- c--------------------------------------------------------------------- subroutine buts( ldmx, ldmy, ldmz, > nx, ny, nz, k, > omega, > v, tv, > d, udx, udy, udz, > ist, iend, jst, jend, > nx0, ny0, ipt, jpt ) c--------------------------------------------------------------------- c--------------------------------------------------------------------- c--------------------------------------------------------------------- c c compute the regular-sparse, block upper triangular solution: c c v <-- ( U-inv ) * v c c--------------------------------------------------------------------- implicit none c--------------------------------------------------------------------- c input parameters c--------------------------------------------------------------------- integer profiler(2) save profiler integer ldmx, ldmy, ldmz integer nx, ny, nz integer k double precision omega double precision v( 5, -1:ldmx+2, -1:ldmy+2, *), > tv(5, ldmx, ldmy), > d( 5, 5, ldmx, ldmy), > udx( 5, 5, ldmx, ldmy), > udy( 5, 5, ldmx, ldmy), > udz( 5, 5, ldmx, ldmy ) integer ist, iend integer jst, jend integer nx0, ny0 integer ipt, jpt c--------------------------------------------------------------------- c local variables c--------------------------------------------------------------------- integer i, j, m integer iex double precision tmp, tmp1 double precision tmat(5,5) c--------------------------------------------------------------------- c receive data from south and east c--------------------------------------------------------------------- call TAU_PROFILE_TIMER(profiler, 'buts'); call TAU_PROFILE_START(profiler); iex = 1 call exchange_1( v,k,iex ) do j = jend, jst, -1 do i = iend, ist, -1 do m = 1, 5 tv( m, i, j ) = > omega * ( udz( m, 1, i, j ) * v( 1, i, j, k+1 ) > + udz( m, 2, i, j ) * v( 2, i, j, k+1 ) > + udz( m, 3, i, j ) * v( 3, i, j, k+1 ) > + udz( m, 4, i, j ) * v( 4, i, j, k+1 ) > + udz( m, 5, i, j ) * v( 5, i, j, k+1 ) ) end do end do end do do j = jend,jst,-1 do i = iend,ist,-1 do m = 1, 5 tv( m, i, j ) = tv( m, i, j ) > + omega * ( udy( m, 1, i, j ) * v( 1, i, j+1, k ) > + udx( m, 1, i, j ) * v( 1, i+1, j, k ) > + udy( m, 2, i, j ) * v( 2, i, j+1, k ) > + udx( m, 2, i, j ) * v( 2, i+1, j, k ) > + udy( m, 3, i, j ) * v( 3, i, j+1, k ) > + udx( m, 3, i, j ) * v( 3, i+1, j, k ) > + udy( m, 4, i, j ) * v( 4, i, j+1, k ) > + udx( m, 4, i, j ) * v( 4, i+1, j, k ) > + udy( m, 5, i, j ) * v( 5, i, j+1, k ) > + udx( m, 5, i, j ) * v( 5, i+1, j, k ) ) end do c--------------------------------------------------------------------- c diagonal block inversion c--------------------------------------------------------------------- do m = 1, 5 tmat( m, 1 ) = d( m, 1, i, j ) tmat( m, 2 ) = d( m, 2, i, j ) tmat( m, 3 ) = d( m, 3, i, j ) tmat( m, 4 ) = d( m, 4, i, j ) tmat( m, 5 ) = d( m, 5, i, j ) end do tmp1 = 1.0d+00 / tmat( 1, 1 ) tmp = tmp1 * tmat( 2, 1 ) tmat( 2, 2 ) = tmat( 2, 2 ) > - tmp * tmat( 1, 2 ) tmat( 2, 3 ) = tmat( 2, 3 ) > - tmp * tmat( 1, 3 ) tmat( 2, 4 ) = tmat( 2, 4 ) > - tmp * tmat( 1, 4 ) tmat( 2, 5 ) = tmat( 2, 5 ) > - tmp * tmat( 1, 5 ) tv( 2, i, j ) = tv( 2, i, j ) > - tv( 1, i, j ) * tmp tmp = tmp1 * tmat( 3, 1 ) tmat( 3, 2 ) = tmat( 3, 2 ) > - tmp * tmat( 1, 2 ) tmat( 3, 3 ) = tmat( 3, 3 ) > - tmp * tmat( 1, 3 ) tmat( 3, 4 ) = tmat( 3, 4 ) > - tmp * tmat( 1, 4 ) tmat( 3, 5 ) = tmat( 3, 5 ) > - tmp * tmat( 1, 5 ) tv( 3, i, j ) = tv( 3, i, j ) > - tv( 1, i, j ) * tmp tmp = tmp1 * tmat( 4, 1 ) tmat( 4, 2 ) = tmat( 4, 2 ) > - tmp * tmat( 1, 2 ) tmat( 4, 3 ) = tmat( 4, 3 ) > - tmp * tmat( 1, 3 ) tmat( 4, 4 ) = tmat( 4, 4 ) > - tmp * tmat( 1, 4 ) tmat( 4, 5 ) = tmat( 4, 5 ) > - tmp * tmat( 1, 5 ) tv( 4, i, j ) = tv( 4, i, j ) > - tv( 1, i, j ) * tmp tmp = tmp1 * tmat( 5, 1 ) tmat( 5, 2 ) = tmat( 5, 2 ) > - tmp * tmat( 1, 2 ) tmat( 5, 3 ) = tmat( 5, 3 ) > - tmp * tmat( 1, 3 ) tmat( 5, 4 ) = tmat( 5, 4 ) > - tmp * tmat( 1, 4 ) tmat( 5, 5 ) = tmat( 5, 5 ) > - tmp * tmat( 1, 5 ) tv( 5, i, j ) = tv( 5, i, j ) > - tv( 1, i, j ) * tmp tmp1 = 1.0d+00 / tmat( 2, 2 ) tmp = tmp1 * tmat( 3, 2 ) tmat( 3, 3 ) = tmat( 3, 3 ) > - tmp * tmat( 2, 3 ) tmat( 3, 4 ) = tmat( 3, 4 ) > - tmp * tmat( 2, 4 ) tmat( 3, 5 ) = tmat( 3, 5 ) > - tmp * tmat( 2, 5 ) tv( 3, i, j ) = tv( 3, i, j ) > - tv( 2, i, j ) * tmp tmp = tmp1 * tmat( 4, 2 ) tmat( 4, 3 ) = tmat( 4, 3 ) > - tmp * tmat( 2, 3 ) tmat( 4, 4 ) = tmat( 4, 4 ) > - tmp * tmat( 2, 4 ) tmat( 4, 5 ) = tmat( 4, 5 ) > - tmp * tmat( 2, 5 ) tv( 4, i, j ) = tv( 4, i, j ) > - tv( 2, i, j ) * tmp tmp = tmp1 * tmat( 5, 2 ) tmat( 5, 3 ) = tmat( 5, 3 ) > - tmp * tmat( 2, 3 ) tmat( 5, 4 ) = tmat( 5, 4 ) > - tmp * tmat( 2, 4 ) tmat( 5, 5 ) = tmat( 5, 5 ) > - tmp * tmat( 2, 5 ) tv( 5, i, j ) = tv( 5, i, j ) > - tv( 2, i, j ) * tmp tmp1 = 1.0d+00 / tmat( 3, 3 ) tmp = tmp1 * tmat( 4, 3 ) tmat( 4, 4 ) = tmat( 4, 4 ) > - tmp * tmat( 3, 4 ) tmat( 4, 5 ) = tmat( 4, 5 ) > - tmp * tmat( 3, 5 ) tv( 4, i, j ) = tv( 4, i, j ) > - tv( 3, i, j ) * tmp tmp = tmp1 * tmat( 5, 3 ) tmat( 5, 4 ) = tmat( 5, 4 ) > - tmp * tmat( 3, 4 ) tmat( 5, 5 ) = tmat( 5, 5 ) > - tmp * tmat( 3, 5 ) tv( 5, i, j ) = tv( 5, i, j ) > - tv( 3, i, j ) * tmp tmp1 = 1.0d+00 / tmat( 4, 4 ) tmp = tmp1 * tmat( 5, 4 ) tmat( 5, 5 ) = tmat( 5, 5 ) > - tmp * tmat( 4, 5 ) tv( 5, i, j ) = tv( 5, i, j ) > - tv( 4, i, j ) * tmp c--------------------------------------------------------------------- c back substitution c--------------------------------------------------------------------- tv( 5, i, j ) = tv( 5, i, j ) > / tmat( 5, 5 ) tv( 4, i, j ) = tv( 4, i, j ) > - tmat( 4, 5 ) * tv( 5, i, j ) tv( 4, i, j ) = tv( 4, i, j ) > / tmat( 4, 4 ) tv( 3, i, j ) = tv( 3, i, j ) > - tmat( 3, 4 ) * tv( 4, i, j ) > - tmat( 3, 5 ) * tv( 5, i, j ) tv( 3, i, j ) = tv( 3, i, j ) > / tmat( 3, 3 ) tv( 2, i, j ) = tv( 2, i, j ) > - tmat( 2, 3 ) * tv( 3, i, j ) > - tmat( 2, 4 ) * tv( 4, i, j ) > - tmat( 2, 5 ) * tv( 5, i, j ) tv( 2, i, j ) = tv( 2, i, j ) > / tmat( 2, 2 ) tv( 1, i, j ) = tv( 1, i, j ) > - tmat( 1, 2 ) * tv( 2, i, j ) > - tmat( 1, 3 ) * tv( 3, i, j ) > - tmat( 1, 4 ) * tv( 4, i, j ) > - tmat( 1, 5 ) * tv( 5, i, j ) tv( 1, i, j ) = tv( 1, i, j ) > / tmat( 1, 1 ) v( 1, i, j, k ) = v( 1, i, j, k ) - tv( 1, i, j ) v( 2, i, j, k ) = v( 2, i, j, k ) - tv( 2, i, j ) v( 3, i, j, k ) = v( 3, i, j, k ) - tv( 3, i, j ) v( 4, i, j, k ) = v( 4, i, j, k ) - tv( 4, i, j ) v( 5, i, j, k ) = v( 5, i, j, k ) - tv( 5, i, j ) enddo end do c--------------------------------------------------------------------- c send data to north and west c--------------------------------------------------------------------- iex = 3 call exchange_1( v,k,iex ) call TAU_PROFILE_STOP(profiler); return end tau-2.16.4/examples/NPB2.3/LU/erhs.f000066400000000000000000000476051062343042700165220ustar00rootroot00000000000000c--------------------------------------------------------------------- c--------------------------------------------------------------------- subroutine erhs c--------------------------------------------------------------------- c--------------------------------------------------------------------- c--------------------------------------------------------------------- c c compute the right hand side based on exact solution c c--------------------------------------------------------------------- implicit none include 'applu.incl' c--------------------------------------------------------------------- c local variables c--------------------------------------------------------------------- integer profiler(2) save profiler integer i, j, k, m integer iglob, jglob integer iex integer L1, L2 integer ist1, iend1 integer jst1, jend1 double precision dsspm double precision xi, eta, zeta double precision q double precision u21, u31, u41 double precision tmp double precision u21i, u31i, u41i, u51i double precision u21j, u31j, u41j, u51j double precision u21k, u31k, u41k, u51k double precision u21im1, u31im1, u41im1, u51im1 double precision u21jm1, u31jm1, u41jm1, u51jm1 double precision u21km1, u31km1, u41km1, u51km1 call TAU_PROFILE_TIMER(profiler, 'erhs'); call TAU_PROFILE_START(profiler); dsspm = dssp do k = 1, nz do j = 1, ny do i = 1, nx do m = 1, 5 frct( m, i, j, k ) = 0.0d+00 end do end do end do end do do k = 1, nz zeta = ( dble(k-1) ) / ( nz - 1 ) do j = 1, ny jglob = jpt + j eta = ( dble(jglob-1) ) / ( ny0 - 1 ) do i = 1, nx iglob = ipt + i xi = ( dble(iglob-1) ) / ( nx0 - 1 ) do m = 1, 5 rsd(m,i,j,k) = ce(m,1) > + ce(m,2) * xi > + ce(m,3) * eta > + ce(m,4) * zeta > + ce(m,5) * xi * xi > + ce(m,6) * eta * eta > + ce(m,7) * zeta * zeta > + ce(m,8) * xi * xi * xi > + ce(m,9) * eta * eta * eta > + ce(m,10) * zeta * zeta * zeta > + ce(m,11) * xi * xi * xi * xi > + ce(m,12) * eta * eta * eta * eta > + ce(m,13) * zeta * zeta * zeta * zeta end do end do end do end do c--------------------------------------------------------------------- c xi-direction flux differences c--------------------------------------------------------------------- c c iex = flag : iex = 0 north/south communication c : iex = 1 east/west communication c c--------------------------------------------------------------------- iex = 0 c--------------------------------------------------------------------- c communicate and receive/send two rows of data c--------------------------------------------------------------------- call exchange_3 (rsd,iex) L1 = 0 if (north.eq.-1) L1 = 1 L2 = nx + 1 if (south.eq.-1) L2 = nx do k = 2, nz - 1 do j = jst, jend do i = L1, L2 flux(1,i,j,k) = rsd(2,i,j,k) u21 = rsd(2,i,j,k) / rsd(1,i,j,k) q = 0.50d+00 * ( rsd(2,i,j,k) * rsd(2,i,j,k) > + rsd(3,i,j,k) * rsd(3,i,j,k) > + rsd(4,i,j,k) * rsd(4,i,j,k) ) > / rsd(1,i,j,k) flux(2,i,j,k) = rsd(2,i,j,k) * u21 + c2 * > ( rsd(5,i,j,k) - q ) flux(3,i,j,k) = rsd(3,i,j,k) * u21 flux(4,i,j,k) = rsd(4,i,j,k) * u21 flux(5,i,j,k) = ( c1 * rsd(5,i,j,k) - c2 * q ) * u21 end do end do end do do k = 2, nz - 1 do j = jst, jend do i = ist, iend do m = 1, 5 frct(m,i,j,k) = frct(m,i,j,k) > - tx2 * ( flux(m,i+1,j,k) - flux(m,i-1,j,k) ) end do end do do i = ist, L2 tmp = 1.0d+00 / rsd(1,i,j,k) u21i = tmp * rsd(2,i,j,k) u31i = tmp * rsd(3,i,j,k) u41i = tmp * rsd(4,i,j,k) u51i = tmp * rsd(5,i,j,k) tmp = 1.0d+00 / rsd(1,i-1,j,k) u21im1 = tmp * rsd(2,i-1,j,k) u31im1 = tmp * rsd(3,i-1,j,k) u41im1 = tmp * rsd(4,i-1,j,k) u51im1 = tmp * rsd(5,i-1,j,k) flux(2,i,j,k) = (4.0d+00/3.0d+00) * tx3 * > ( u21i - u21im1 ) flux(3,i,j,k) = tx3 * ( u31i - u31im1 ) flux(4,i,j,k) = tx3 * ( u41i - u41im1 ) flux(5,i,j,k) = 0.50d+00 * ( 1.0d+00 - c1*c5 ) > * tx3 * ( ( u21i **2 + u31i **2 + u41i **2 ) > - ( u21im1**2 + u31im1**2 + u41im1**2 ) ) > + (1.0d+00/6.0d+00) > * tx3 * ( u21i**2 - u21im1**2 ) > + c1 * c5 * tx3 * ( u51i - u51im1 ) end do do i = ist, iend frct(1,i,j,k) = frct(1,i,j,k) > + dx1 * tx1 * ( rsd(1,i-1,j,k) > - 2.0d+00 * rsd(1,i,j,k) > + rsd(1,i+1,j,k) ) frct(2,i,j,k) = frct(2,i,j,k) > + tx3 * c3 * c4 * ( flux(2,i+1,j,k) - flux(2,i,j,k) ) > + dx2 * tx1 * ( rsd(2,i-1,j,k) > - 2.0d+00 * rsd(2,i,j,k) > + rsd(2,i+1,j,k) ) frct(3,i,j,k) = frct(3,i,j,k) > + tx3 * c3 * c4 * ( flux(3,i+1,j,k) - flux(3,i,j,k) ) > + dx3 * tx1 * ( rsd(3,i-1,j,k) > - 2.0d+00 * rsd(3,i,j,k) > + rsd(3,i+1,j,k) ) frct(4,i,j,k) = frct(4,i,j,k) > + tx3 * c3 * c4 * ( flux(4,i+1,j,k) - flux(4,i,j,k) ) > + dx4 * tx1 * ( rsd(4,i-1,j,k) > - 2.0d+00 * rsd(4,i,j,k) > + rsd(4,i+1,j,k) ) frct(5,i,j,k) = frct(5,i,j,k) > + tx3 * c3 * c4 * ( flux(5,i+1,j,k) - flux(5,i,j,k) ) > + dx5 * tx1 * ( rsd(5,i-1,j,k) > - 2.0d+00 * rsd(5,i,j,k) > + rsd(5,i+1,j,k) ) end do c--------------------------------------------------------------------- c Fourth-order dissipation c--------------------------------------------------------------------- IF (north.eq.-1) then do m = 1, 5 frct(m,2,j,k) = frct(m,2,j,k) > - dsspm * ( + 5.0d+00 * rsd(m,2,j,k) > - 4.0d+00 * rsd(m,3,j,k) > + rsd(m,4,j,k) ) frct(m,3,j,k) = frct(m,3,j,k) > - dsspm * ( - 4.0d+00 * rsd(m,2,j,k) > + 6.0d+00 * rsd(m,3,j,k) > - 4.0d+00 * rsd(m,4,j,k) > + rsd(m,5,j,k) ) end do END IF ist1 = 1 iend1 = nx if (north.eq.-1) ist1 = 4 if (south.eq.-1) iend1 = nx - 3 do i = ist1,iend1 do m = 1, 5 frct(m,i,j,k) = frct(m,i,j,k) > - dsspm * ( rsd(m,i-2,j,k) > - 4.0d+00 * rsd(m,i-1,j,k) > + 6.0d+00 * rsd(m,i,j,k) > - 4.0d+00 * rsd(m,i+1,j,k) > + rsd(m,i+2,j,k) ) end do end do IF (south.eq.-1) then do m = 1, 5 frct(m,nx-2,j,k) = frct(m,nx-2,j,k) > - dsspm * ( rsd(m,nx-4,j,k) > - 4.0d+00 * rsd(m,nx-3,j,k) > + 6.0d+00 * rsd(m,nx-2,j,k) > - 4.0d+00 * rsd(m,nx-1,j,k) ) frct(m,nx-1,j,k) = frct(m,nx-1,j,k) > - dsspm * ( rsd(m,nx-3,j,k) > - 4.0d+00 * rsd(m,nx-2,j,k) > + 5.0d+00 * rsd(m,nx-1,j,k) ) end do END IF end do end do c--------------------------------------------------------------------- c eta-direction flux differences c--------------------------------------------------------------------- c c iex = flag : iex = 0 north/south communication c : iex = 1 east/west communication c c--------------------------------------------------------------------- iex = 1 c--------------------------------------------------------------------- c communicate and receive/send two rows of data c--------------------------------------------------------------------- call exchange_3 (rsd,iex) L1 = 0 if (west.eq.-1) L1 = 1 L2 = ny + 1 if (east.eq.-1) L2 = ny do k = 2, nz - 1 do i = ist, iend do j = L1, L2 flux(1,i,j,k) = rsd(3,i,j,k) u31 = rsd(3,i,j,k) / rsd(1,i,j,k) q = 0.50d+00 * ( rsd(2,i,j,k) * rsd(2,i,j,k) > + rsd(3,i,j,k) * rsd(3,i,j,k) > + rsd(4,i,j,k) * rsd(4,i,j,k) ) > / rsd(1,i,j,k) flux(2,i,j,k) = rsd(2,i,j,k) * u31 flux(3,i,j,k) = rsd(3,i,j,k) * u31 + c2 * > ( rsd(5,i,j,k) - q ) flux(4,i,j,k) = rsd(4,i,j,k) * u31 flux(5,i,j,k) = ( c1 * rsd(5,i,j,k) - c2 * q ) * u31 end do end do end do do k = 2, nz - 1 do i = ist, iend do j = jst, jend do m = 1, 5 frct(m,i,j,k) = frct(m,i,j,k) > - ty2 * ( flux(m,i,j+1,k) - flux(m,i,j-1,k) ) end do end do do j = jst, L2 tmp = 1.0d+00 / rsd(1,i,j,k) u21j = tmp * rsd(2,i,j,k) u31j = tmp * rsd(3,i,j,k) u41j = tmp * rsd(4,i,j,k) u51j = tmp * rsd(5,i,j,k) tmp = 1.0d+00 / rsd(1,i,j-1,k) u21jm1 = tmp * rsd(2,i,j-1,k) u31jm1 = tmp * rsd(3,i,j-1,k) u41jm1 = tmp * rsd(4,i,j-1,k) u51jm1 = tmp * rsd(5,i,j-1,k) flux(2,i,j,k) = ty3 * ( u21j - u21jm1 ) flux(3,i,j,k) = (4.0d+00/3.0d+00) * ty3 * > ( u31j - u31jm1 ) flux(4,i,j,k) = ty3 * ( u41j - u41jm1 ) flux(5,i,j,k) = 0.50d+00 * ( 1.0d+00 - c1*c5 ) > * ty3 * ( ( u21j **2 + u31j **2 + u41j **2 ) > - ( u21jm1**2 + u31jm1**2 + u41jm1**2 ) ) > + (1.0d+00/6.0d+00) > * ty3 * ( u31j**2 - u31jm1**2 ) > + c1 * c5 * ty3 * ( u51j - u51jm1 ) end do do j = jst, jend frct(1,i,j,k) = frct(1,i,j,k) > + dy1 * ty1 * ( rsd(1,i,j-1,k) > - 2.0d+00 * rsd(1,i,j,k) > + rsd(1,i,j+1,k) ) frct(2,i,j,k) = frct(2,i,j,k) > + ty3 * c3 * c4 * ( flux(2,i,j+1,k) - flux(2,i,j,k) ) > + dy2 * ty1 * ( rsd(2,i,j-1,k) > - 2.0d+00 * rsd(2,i,j,k) > + rsd(2,i,j+1,k) ) frct(3,i,j,k) = frct(3,i,j,k) > + ty3 * c3 * c4 * ( flux(3,i,j+1,k) - flux(3,i,j,k) ) > + dy3 * ty1 * ( rsd(3,i,j-1,k) > - 2.0d+00 * rsd(3,i,j,k) > + rsd(3,i,j+1,k) ) frct(4,i,j,k) = frct(4,i,j,k) > + ty3 * c3 * c4 * ( flux(4,i,j+1,k) - flux(4,i,j,k) ) > + dy4 * ty1 * ( rsd(4,i,j-1,k) > - 2.0d+00 * rsd(4,i,j,k) > + rsd(4,i,j+1,k) ) frct(5,i,j,k) = frct(5,i,j,k) > + ty3 * c3 * c4 * ( flux(5,i,j+1,k) - flux(5,i,j,k) ) > + dy5 * ty1 * ( rsd(5,i,j-1,k) > - 2.0d+00 * rsd(5,i,j,k) > + rsd(5,i,j+1,k) ) end do c--------------------------------------------------------------------- c fourth-order dissipation c--------------------------------------------------------------------- IF (west.eq.-1) then do m = 1, 5 frct(m,i,2,k) = frct(m,i,2,k) > - dsspm * ( + 5.0d+00 * rsd(m,i,2,k) > - 4.0d+00 * rsd(m,i,3,k) > + rsd(m,i,4,k) ) frct(m,i,3,k) = frct(m,i,3,k) > - dsspm * ( - 4.0d+00 * rsd(m,i,2,k) > + 6.0d+00 * rsd(m,i,3,k) > - 4.0d+00 * rsd(m,i,4,k) > + rsd(m,i,5,k) ) end do END IF jst1 = 1 jend1 = ny if (west.eq.-1) jst1 = 4 if (east.eq.-1) jend1 = ny - 3 do j = jst1, jend1 do m = 1, 5 frct(m,i,j,k) = frct(m,i,j,k) > - dsspm * ( rsd(m,i,j-2,k) > - 4.0d+00 * rsd(m,i,j-1,k) > + 6.0d+00 * rsd(m,i,j,k) > - 4.0d+00 * rsd(m,i,j+1,k) > + rsd(m,i,j+2,k) ) end do end do IF (east.eq.-1) then do m = 1, 5 frct(m,i,ny-2,k) = frct(m,i,ny-2,k) > - dsspm * ( rsd(m,i,ny-4,k) > - 4.0d+00 * rsd(m,i,ny-3,k) > + 6.0d+00 * rsd(m,i,ny-2,k) > - 4.0d+00 * rsd(m,i,ny-1,k) ) frct(m,i,ny-1,k) = frct(m,i,ny-1,k) > - dsspm * ( rsd(m,i,ny-3,k) > - 4.0d+00 * rsd(m,i,ny-2,k) > + 5.0d+00 * rsd(m,i,ny-1,k) ) end do END IF end do end do c--------------------------------------------------------------------- c zeta-direction flux differences c--------------------------------------------------------------------- do j = jst, jend do i = ist, iend do k = 1, nz flux(1,i,j,k) = rsd(4,i,j,k) u41 = rsd(4,i,j,k) / rsd(1,i,j,k) q = 0.50d+00 * ( rsd(2,i,j,k) * rsd(2,i,j,k) > + rsd(3,i,j,k) * rsd(3,i,j,k) > + rsd(4,i,j,k) * rsd(4,i,j,k) ) > / rsd(1,i,j,k) flux(2,i,j,k) = rsd(2,i,j,k) * u41 flux(3,i,j,k) = rsd(3,i,j,k) * u41 flux(4,i,j,k) = rsd(4,i,j,k) * u41 + c2 * > ( rsd(5,i,j,k) - q ) flux(5,i,j,k) = ( c1 * rsd(5,i,j,k) - c2 * q ) * u41 end do do k = 2, nz - 1 do m = 1, 5 frct(m,i,j,k) = frct(m,i,j,k) > - tz2 * ( flux(m,i,j,k+1) - flux(m,i,j,k-1) ) end do end do do k = 2, nz tmp = 1.0d+00 / rsd(1,i,j,k) u21k = tmp * rsd(2,i,j,k) u31k = tmp * rsd(3,i,j,k) u41k = tmp * rsd(4,i,j,k) u51k = tmp * rsd(5,i,j,k) tmp = 1.0d+00 / rsd(1,i,j,k-1) u21km1 = tmp * rsd(2,i,j,k-1) u31km1 = tmp * rsd(3,i,j,k-1) u41km1 = tmp * rsd(4,i,j,k-1) u51km1 = tmp * rsd(5,i,j,k-1) flux(2,i,j,k) = tz3 * ( u21k - u21km1 ) flux(3,i,j,k) = tz3 * ( u31k - u31km1 ) flux(4,i,j,k) = (4.0d+00/3.0d+00) * tz3 * ( u41k > - u41km1 ) flux(5,i,j,k) = 0.50d+00 * ( 1.0d+00 - c1*c5 ) > * tz3 * ( ( u21k **2 + u31k **2 + u41k **2 ) > - ( u21km1**2 + u31km1**2 + u41km1**2 ) ) > + (1.0d+00/6.0d+00) > * tz3 * ( u41k**2 - u41km1**2 ) > + c1 * c5 * tz3 * ( u51k - u51km1 ) end do do k = 2, nz - 1 frct(1,i,j,k) = frct(1,i,j,k) > + dz1 * tz1 * ( rsd(1,i,j,k+1) > - 2.0d+00 * rsd(1,i,j,k) > + rsd(1,i,j,k-1) ) frct(2,i,j,k) = frct(2,i,j,k) > + tz3 * c3 * c4 * ( flux(2,i,j,k+1) - flux(2,i,j,k) ) > + dz2 * tz1 * ( rsd(2,i,j,k+1) > - 2.0d+00 * rsd(2,i,j,k) > + rsd(2,i,j,k-1) ) frct(3,i,j,k) = frct(3,i,j,k) > + tz3 * c3 * c4 * ( flux(3,i,j,k+1) - flux(3,i,j,k) ) > + dz3 * tz1 * ( rsd(3,i,j,k+1) > - 2.0d+00 * rsd(3,i,j,k) > + rsd(3,i,j,k-1) ) frct(4,i,j,k) = frct(4,i,j,k) > + tz3 * c3 * c4 * ( flux(4,i,j,k+1) - flux(4,i,j,k) ) > + dz4 * tz1 * ( rsd(4,i,j,k+1) > - 2.0d+00 * rsd(4,i,j,k) > + rsd(4,i,j,k-1) ) frct(5,i,j,k) = frct(5,i,j,k) > + tz3 * c3 * c4 * ( flux(5,i,j,k+1) - flux(5,i,j,k) ) > + dz5 * tz1 * ( rsd(5,i,j,k+1) > - 2.0d+00 * rsd(5,i,j,k) > + rsd(5,i,j,k-1) ) end do c--------------------------------------------------------------------- c fourth-order dissipation c--------------------------------------------------------------------- do m = 1, 5 frct(m,i,j,2) = frct(m,i,j,2) > - dsspm * ( + 5.0d+00 * rsd(m,i,j,2) > - 4.0d+00 * rsd(m,i,j,3) > + rsd(m,i,j,4) ) frct(m,i,j,3) = frct(m,i,j,3) > - dsspm * (- 4.0d+00 * rsd(m,i,j,2) > + 6.0d+00 * rsd(m,i,j,3) > - 4.0d+00 * rsd(m,i,j,4) > + rsd(m,i,j,5) ) end do do k = 4, nz - 3 do m = 1, 5 frct(m,i,j,k) = frct(m,i,j,k) > - dsspm * ( rsd(m,i,j,k-2) > - 4.0d+00 * rsd(m,i,j,k-1) > + 6.0d+00 * rsd(m,i,j,k) > - 4.0d+00 * rsd(m,i,j,k+1) > + rsd(m,i,j,k+2) ) end do end do do m = 1, 5 frct(m,i,j,nz-2) = frct(m,i,j,nz-2) > - dsspm * ( rsd(m,i,j,nz-4) > - 4.0d+00 * rsd(m,i,j,nz-3) > + 6.0d+00 * rsd(m,i,j,nz-2) > - 4.0d+00 * rsd(m,i,j,nz-1) ) frct(m,i,j,nz-1) = frct(m,i,j,nz-1) > - dsspm * ( rsd(m,i,j,nz-3) > - 4.0d+00 * rsd(m,i,j,nz-2) > + 5.0d+00 * rsd(m,i,j,nz-1) ) end do end do end do call TAU_PROFILE_STOP(profiler); return end tau-2.16.4/examples/NPB2.3/LU/error.f000066400000000000000000000050271062343042700167020ustar00rootroot00000000000000c--------------------------------------------------------------------- c--------------------------------------------------------------------- subroutine error c--------------------------------------------------------------------- c--------------------------------------------------------------------- c--------------------------------------------------------------------- c c compute the solution error c c--------------------------------------------------------------------- implicit none include 'mpinpb.h' include 'applu.incl' c--------------------------------------------------------------------- c local variables c--------------------------------------------------------------------- integer profiler(2) save profiler integer i, j, k, m integer iglob, jglob double precision tmp double precision u000ijk(5), dummy(5) integer IERROR call TAU_PROFILE_TIMER(profiler, 'error'); call TAU_PROFILE_START(profiler); do m = 1, 5 errnm(m) = 0.0d+00 dummy(m) = 0.0d+00 end do do k = 2, nz-1 do j = jst, jend jglob = jpt + j do i = ist, iend iglob = ipt + i call exact( iglob, jglob, k, u000ijk ) do m = 1, 5 tmp = ( u000ijk(m) - u(m,i,j,k) ) dummy(m) = dummy(m) + tmp ** 2 end do end do end do end do c--------------------------------------------------------------------- c compute the global sum of individual contributions to dot product. c--------------------------------------------------------------------- call MPI_ALLREDUCE( dummy, > errnm, > 5, > dp_type, > MPI_SUM, > MPI_COMM_WORLD, > IERROR ) do m = 1, 5 errnm(m) = sqrt ( errnm(m) / ( (nx0-2)*(ny0-2)*(nz0-2) ) ) end do c if (id.eq.0) then c write (*,1002) ( errnm(m), m = 1, 5 ) c end if 1002 format (1x/1x,'RMS-norm of error in soln. to ', > 'first pde = ',1pe12.5/, > 1x,'RMS-norm of error in soln. to ', > 'second pde = ',1pe12.5/, > 1x,'RMS-norm of error in soln. to ', > 'third pde = ',1pe12.5/, > 1x,'RMS-norm of error in soln. to ', > 'fourth pde = ',1pe12.5/, > 1x,'RMS-norm of error in soln. to ', > 'fifth pde = ',1pe12.5) call TAU_PROFILE_STOP(profiler); return end tau-2.16.4/examples/NPB2.3/LU/exact.f000066400000000000000000000035201062343042700166510ustar00rootroot00000000000000c--------------------------------------------------------------------- c--------------------------------------------------------------------- subroutine exact( i, j, k, u000ijk ) c--------------------------------------------------------------------- c--------------------------------------------------------------------- c--------------------------------------------------------------------- c c compute the exact solution at (i,j,k) c c--------------------------------------------------------------------- implicit none include 'applu.incl' c--------------------------------------------------------------------- c input parameters c--------------------------------------------------------------------- integer profiler(2) save profiler integer i, j, k double precision u000ijk(*) c--------------------------------------------------------------------- c local variables c--------------------------------------------------------------------- integer m double precision xi, eta, zeta call TAU_PROFILE_TIMER(profiler, 'exact'); call TAU_PROFILE_START(profiler); xi = ( dble ( i - 1 ) ) / ( nx0 - 1 ) eta = ( dble ( j - 1 ) ) / ( ny0 - 1 ) zeta = ( dble ( k - 1 ) ) / ( nz - 1 ) do m = 1, 5 u000ijk(m) = ce(m,1) > + ce(m,2) * xi > + ce(m,3) * eta > + ce(m,4) * zeta > + ce(m,5) * xi * xi > + ce(m,6) * eta * eta > + ce(m,7) * zeta * zeta > + ce(m,8) * xi * xi * xi > + ce(m,9) * eta * eta * eta > + ce(m,10) * zeta * zeta * zeta > + ce(m,11) * xi * xi * xi * xi > + ce(m,12) * eta * eta * eta * eta > + ce(m,13) * zeta * zeta * zeta * zeta end do call TAU_PROFILE_STOP(profiler); return end tau-2.16.4/examples/NPB2.3/LU/exchange_1.f000066400000000000000000000133011062343042700175450ustar00rootroot00000000000000 c--------------------------------------------------------------------- c--------------------------------------------------------------------- subroutine exchange_1( g,k,iex ) c--------------------------------------------------------------------- c--------------------------------------------------------------------- implicit none include 'mpinpb.h' include 'applu.incl' integer profiler(2) save profiler double precision g(5,-1:isiz1+2,-1:isiz2+2,isiz3) integer k integer iex integer i, j double precision dum(5,isiz1+isiz2), dum1(5,isiz1+isiz2) integer STATUS(MPI_STATUS_SIZE) integer IERROR call TAU_PROFILE_TIMER(profiler, 'exchange_1'); call TAU_PROFILE_START(profiler); if( iex .eq. 0 ) then if( north .ne. -1 ) then call MPI_RECV( dum1(1,jst), > 5*(jend-jst+1), > dp_type, > north, > from_n, > MPI_COMM_WORLD, > status, > IERROR ) do j=jst,jend g(1,0,j,k) = dum1(1,j) g(2,0,j,k) = dum1(2,j) g(3,0,j,k) = dum1(3,j) g(4,0,j,k) = dum1(4,j) g(5,0,j,k) = dum1(5,j) enddo endif if( west .ne. -1 ) then call MPI_RECV( dum1(1,ist), > 5*(iend-ist+1), > dp_type, > west, > from_w, > MPI_COMM_WORLD, > status, > IERROR ) do i=ist,iend g(1,i,0,k) = dum1(1,i) g(2,i,0,k) = dum1(2,i) g(3,i,0,k) = dum1(3,i) g(4,i,0,k) = dum1(4,i) g(5,i,0,k) = dum1(5,i) enddo endif else if( iex .eq. 1 ) then if( south .ne. -1 ) then call MPI_RECV( dum1(1,jst), > 5*(jend-jst+1), > dp_type, > south, > from_s, > MPI_COMM_WORLD, > status, > IERROR ) do j=jst,jend g(1,nx+1,j,k) = dum1(1,j) g(2,nx+1,j,k) = dum1(2,j) g(3,nx+1,j,k) = dum1(3,j) g(4,nx+1,j,k) = dum1(4,j) g(5,nx+1,j,k) = dum1(5,j) enddo endif if( east .ne. -1 ) then call MPI_RECV( dum1(1,ist), > 5*(iend-ist+1), > dp_type, > east, > from_e, > MPI_COMM_WORLD, > status, > IERROR ) do i=ist,iend g(1,i,ny+1,k) = dum1(1,i) g(2,i,ny+1,k) = dum1(2,i) g(3,i,ny+1,k) = dum1(3,i) g(4,i,ny+1,k) = dum1(4,i) g(5,i,ny+1,k) = dum1(5,i) enddo endif else if( iex .eq. 2 ) then if( south .ne. -1 ) then do j=jst,jend dum(1,j) = g(1,nx,j,k) dum(2,j) = g(2,nx,j,k) dum(3,j) = g(3,nx,j,k) dum(4,j) = g(4,nx,j,k) dum(5,j) = g(5,nx,j,k) enddo call MPI_SEND( dum(1,jst), > 5*(jend-jst+1), > dp_type, > south, > from_n, > MPI_COMM_WORLD, > IERROR ) endif if( east .ne. -1 ) then do i=ist,iend dum(1,i) = g(1,i,ny,k) dum(2,i) = g(2,i,ny,k) dum(3,i) = g(3,i,ny,k) dum(4,i) = g(4,i,ny,k) dum(5,i) = g(5,i,ny,k) enddo call MPI_SEND( dum(1,ist), > 5*(iend-ist+1), > dp_type, > east, > from_w, > MPI_COMM_WORLD, > IERROR ) endif else if( north .ne. -1 ) then do j=jst,jend dum(1,j) = g(1,1,j,k) dum(2,j) = g(2,1,j,k) dum(3,j) = g(3,1,j,k) dum(4,j) = g(4,1,j,k) dum(5,j) = g(5,1,j,k) enddo call MPI_SEND( dum(1,jst), > 5*(jend-jst+1), > dp_type, > north, > from_s, > MPI_COMM_WORLD, > IERROR ) endif if( west .ne. -1 ) then do i=ist,iend dum(1,i) = g(1,i,1,k) dum(2,i) = g(2,i,1,k) dum(3,i) = g(3,i,1,k) dum(4,i) = g(4,i,1,k) dum(5,i) = g(5,i,1,k) enddo call MPI_SEND( dum(1,ist), > 5*(iend-ist+1), > dp_type, > west, > from_e, > MPI_COMM_WORLD, > IERROR ) endif endif call TAU_PROFILE_STOP(profiler); end tau-2.16.4/examples/NPB2.3/LU/exchange_3.f000066400000000000000000000243411062343042700175550ustar00rootroot00000000000000 c--------------------------------------------------------------------- c--------------------------------------------------------------------- subroutine exchange_3(g,iex) c--------------------------------------------------------------------- c--------------------------------------------------------------------- c--------------------------------------------------------------------- c compute the right hand side based on exact solution c--------------------------------------------------------------------- implicit none include 'mpinpb.h' include 'applu.incl' c--------------------------------------------------------------------- c input parameters c--------------------------------------------------------------------- integer profiler(2) save profiler double precision g(5,-1:isiz1+2,-1:isiz2+2,isiz3) integer iex c--------------------------------------------------------------------- c local variables c--------------------------------------------------------------------- integer i, j, k integer ipos1, ipos2 integer mid integer STATUS(MPI_STATUS_SIZE) integer IERROR call TAU_PROFILE_TIMER(profiler, 'exchange_3'); call TAU_PROFILE_START(profiler); if (iex.eq.0) then c--------------------------------------------------------------------- c communicate in the south and north directions c--------------------------------------------------------------------- if (north.ne.-1) then call MPI_IRECV( buf1, > 10*ny*nz, > dp_type, > MPI_ANY_SOURCE, > from_n, > MPI_COMM_WORLD, > mid, > IERROR ) end if c--------------------------------------------------------------------- c send south c--------------------------------------------------------------------- if (south.ne.-1) then do k = 1,nz do j = 1,ny ipos1 = (k-1)*ny + j ipos2 = ipos1 + ny*nz buf(1,ipos1) = g(1,nx-1,j,k) buf(2,ipos1) = g(2,nx-1,j,k) buf(3,ipos1) = g(3,nx-1,j,k) buf(4,ipos1) = g(4,nx-1,j,k) buf(5,ipos1) = g(5,nx-1,j,k) buf(1,ipos2) = g(1,nx,j,k) buf(2,ipos2) = g(2,nx,j,k) buf(3,ipos2) = g(3,nx,j,k) buf(4,ipos2) = g(4,nx,j,k) buf(5,ipos2) = g(5,nx,j,k) end do end do call MPI_SEND( buf, > 10*ny*nz, > dp_type, > south, > from_n, > MPI_COMM_WORLD, > IERROR ) end if c--------------------------------------------------------------------- c receive from north c--------------------------------------------------------------------- if (north.ne.-1) then call MPI_WAIT( mid, STATUS, IERROR ) do k = 1,nz do j = 1,ny ipos1 = (k-1)*ny + j ipos2 = ipos1 + ny*nz g(1,-1,j,k) = buf1(1,ipos1) g(2,-1,j,k) = buf1(2,ipos1) g(3,-1,j,k) = buf1(3,ipos1) g(4,-1,j,k) = buf1(4,ipos1) g(5,-1,j,k) = buf1(5,ipos1) g(1,0,j,k) = buf1(1,ipos2) g(2,0,j,k) = buf1(2,ipos2) g(3,0,j,k) = buf1(3,ipos2) g(4,0,j,k) = buf1(4,ipos2) g(5,0,j,k) = buf1(5,ipos2) end do end do end if if (south.ne.-1) then call MPI_IRECV( buf1, > 10*ny*nz, > dp_type, > MPI_ANY_SOURCE, > from_s, > MPI_COMM_WORLD, > mid, > IERROR ) end if c--------------------------------------------------------------------- c send north c--------------------------------------------------------------------- if (north.ne.-1) then do k = 1,nz do j = 1,ny ipos1 = (k-1)*ny + j ipos2 = ipos1 + ny*nz buf(1,ipos1) = g(1,2,j,k) buf(2,ipos1) = g(2,2,j,k) buf(3,ipos1) = g(3,2,j,k) buf(4,ipos1) = g(4,2,j,k) buf(5,ipos1) = g(5,2,j,k) buf(1,ipos2) = g(1,1,j,k) buf(2,ipos2) = g(2,1,j,k) buf(3,ipos2) = g(3,1,j,k) buf(4,ipos2) = g(4,1,j,k) buf(5,ipos2) = g(5,1,j,k) end do end do call MPI_SEND( buf, > 10*ny*nz, > dp_type, > north, > from_s, > MPI_COMM_WORLD, > IERROR ) end if c--------------------------------------------------------------------- c receive from south c--------------------------------------------------------------------- if (south.ne.-1) then call MPI_WAIT( mid, STATUS, IERROR ) do k = 1,nz do j = 1,ny ipos1 = (k-1)*ny + j ipos2 = ipos1 + ny*nz g(1,nx+2,j,k) = buf1(1,ipos1) g(2,nx+2,j,k) = buf1(2,ipos1) g(3,nx+2,j,k) = buf1(3,ipos1) g(4,nx+2,j,k) = buf1(4,ipos1) g(5,nx+2,j,k) = buf1(5,ipos1) g(1,nx+1,j,k) = buf1(1,ipos2) g(2,nx+1,j,k) = buf1(2,ipos2) g(3,nx+1,j,k) = buf1(3,ipos2) g(4,nx+1,j,k) = buf1(4,ipos2) g(5,nx+1,j,k) = buf1(5,ipos2) end do end do end if else c--------------------------------------------------------------------- c communicate in the east and west directions c--------------------------------------------------------------------- if (west.ne.-1) then call MPI_IRECV( buf1, > 10*nx*nz, > dp_type, > MPI_ANY_SOURCE, > from_w, > MPI_COMM_WORLD, > mid, > IERROR ) end if c--------------------------------------------------------------------- c send east c--------------------------------------------------------------------- if (east.ne.-1) then do k = 1,nz do i = 1,nx ipos1 = (k-1)*nx + i ipos2 = ipos1 + nx*nz buf(1,ipos1) = g(1,i,ny-1,k) buf(2,ipos1) = g(2,i,ny-1,k) buf(3,ipos1) = g(3,i,ny-1,k) buf(4,ipos1) = g(4,i,ny-1,k) buf(5,ipos1) = g(5,i,ny-1,k) buf(1,ipos2) = g(1,i,ny,k) buf(2,ipos2) = g(2,i,ny,k) buf(3,ipos2) = g(3,i,ny,k) buf(4,ipos2) = g(4,i,ny,k) buf(5,ipos2) = g(5,i,ny,k) end do end do call MPI_SEND( buf, > 10*nx*nz, > dp_type, > east, > from_w, > MPI_COMM_WORLD, > IERROR ) end if c--------------------------------------------------------------------- c receive from west c--------------------------------------------------------------------- if (west.ne.-1) then call MPI_WAIT( mid, STATUS, IERROR ) do k = 1,nz do i = 1,nx ipos1 = (k-1)*nx + i ipos2 = ipos1 + nx*nz g(1,i,-1,k) = buf1(1,ipos1) g(2,i,-1,k) = buf1(2,ipos1) g(3,i,-1,k) = buf1(3,ipos1) g(4,i,-1,k) = buf1(4,ipos1) g(5,i,-1,k) = buf1(5,ipos1) g(1,i,0,k) = buf1(1,ipos2) g(2,i,0,k) = buf1(2,ipos2) g(3,i,0,k) = buf1(3,ipos2) g(4,i,0,k) = buf1(4,ipos2) g(5,i,0,k) = buf1(5,ipos2) end do end do end if if (east.ne.-1) then call MPI_IRECV( buf1, > 10*nx*nz, > dp_type, > MPI_ANY_SOURCE, > from_e, > MPI_COMM_WORLD, > mid, > IERROR ) end if c--------------------------------------------------------------------- c send west c--------------------------------------------------------------------- if (west.ne.-1) then do k = 1,nz do i = 1,nx ipos1 = (k-1)*nx + i ipos2 = ipos1 + nx*nz buf(1,ipos1) = g(1,i,2,k) buf(2,ipos1) = g(2,i,2,k) buf(3,ipos1) = g(3,i,2,k) buf(4,ipos1) = g(4,i,2,k) buf(5,ipos1) = g(5,i,2,k) buf(1,ipos2) = g(1,i,1,k) buf(2,ipos2) = g(2,i,1,k) buf(3,ipos2) = g(3,i,1,k) buf(4,ipos2) = g(4,i,1,k) buf(5,ipos2) = g(5,i,1,k) end do end do call MPI_SEND( buf, > 10*nx*nz, > dp_type, > west, > from_e, > MPI_COMM_WORLD, > IERROR ) end if c--------------------------------------------------------------------- c receive from east c--------------------------------------------------------------------- if (east.ne.-1) then call MPI_WAIT( mid, STATUS, IERROR ) do k = 1,nz do i = 1,nx ipos1 = (k-1)*nx + i ipos2 = ipos1 + nx*nz g(1,i,ny+2,k) = buf1(1,ipos1) g(2,i,ny+2,k) = buf1(2,ipos1) g(3,i,ny+2,k) = buf1(3,ipos1) g(4,i,ny+2,k) = buf1(4,ipos1) g(5,i,ny+2,k) = buf1(5,ipos1) g(1,i,ny+1,k) = buf1(1,ipos2) g(2,i,ny+1,k) = buf1(2,ipos2) g(3,i,ny+1,k) = buf1(3,ipos2) g(4,i,ny+1,k) = buf1(4,ipos2) g(5,i,ny+1,k) = buf1(5,ipos2) end do end do end if end if call TAU_PROFILE_STOP(profiler); return end tau-2.16.4/examples/NPB2.3/LU/exchange_4.f000066400000000000000000000100431062343042700175500ustar00rootroot00000000000000 c--------------------------------------------------------------------- c--------------------------------------------------------------------- subroutine exchange_4(g,h,ibeg,ifin1,jbeg,jfin1) c--------------------------------------------------------------------- c--------------------------------------------------------------------- c--------------------------------------------------------------------- c compute the right hand side based on exact solution c--------------------------------------------------------------------- implicit none include 'mpinpb.h' include 'applu.incl' c--------------------------------------------------------------------- c input parameters c--------------------------------------------------------------------- integer profiler(2) save profiler double precision g(0:isiz2+1,0:isiz3+1), > h(0:isiz2+1,0:isiz3+1) integer ibeg, ifin1 integer jbeg, jfin1 c--------------------------------------------------------------------- c local variables c--------------------------------------------------------------------- integer i, j integer ny2 double precision dum(1024) integer msgid1, msgid3 integer STATUS(MPI_STATUS_SIZE) integer IERROR call TAU_PROFILE_TIMER(profiler, 'exchange_4'); call TAU_PROFILE_START(profiler); ny2 = ny + 2 c--------------------------------------------------------------------- c communicate in the east and west directions c--------------------------------------------------------------------- c--------------------------------------------------------------------- c receive from east c--------------------------------------------------------------------- if (jfin1.eq.ny) then call MPI_IRECV( dum, > 2*nx, > dp_type, > MPI_ANY_SOURCE, > from_e, > MPI_COMM_WORLD, > msgid3, > IERROR ) call MPI_WAIT( msgid3, STATUS, IERROR ) do i = 1,nx g(i,ny+1) = dum(i) h(i,ny+1) = dum(i+nx) end do end if c--------------------------------------------------------------------- c send west c--------------------------------------------------------------------- if (jbeg.eq.1) then do i = 1,nx dum(i) = g(i,1) dum(i+nx) = h(i,1) end do call MPI_SEND( dum, > 2*nx, > dp_type, > west, > from_e, > MPI_COMM_WORLD, > IERROR ) end if c--------------------------------------------------------------------- c communicate in the south and north directions c--------------------------------------------------------------------- c--------------------------------------------------------------------- c receive from south c--------------------------------------------------------------------- if (ifin1.eq.nx) then call MPI_IRECV( dum, > 2*ny2, > dp_type, > MPI_ANY_SOURCE, > from_s, > MPI_COMM_WORLD, > msgid1, > IERROR ) call MPI_WAIT( msgid1, STATUS, IERROR ) do j = 0,ny+1 g(nx+1,j) = dum(j+1) h(nx+1,j) = dum(j+ny2+1) end do end if c--------------------------------------------------------------------- c send north c--------------------------------------------------------------------- if (ibeg.eq.1) then do j = 0,ny+1 dum(j+1) = g(1,j) dum(j+ny2+1) = h(1,j) end do call MPI_SEND( dum, > 2*ny2, > dp_type, > north, > from_s, > MPI_COMM_WORLD, > IERROR ) end if call TAU_PROFILE_STOP(profiler); return end tau-2.16.4/examples/NPB2.3/LU/exchange_5.f000066400000000000000000000050521062343042700175550ustar00rootroot00000000000000 c--------------------------------------------------------------------- c--------------------------------------------------------------------- subroutine exchange_5(g,ibeg,ifin1) c--------------------------------------------------------------------- c--------------------------------------------------------------------- c--------------------------------------------------------------------- c compute the right hand side based on exact solution c--------------------------------------------------------------------- implicit none include 'mpinpb.h' include 'applu.incl' c--------------------------------------------------------------------- c input parameters c--------------------------------------------------------------------- integer profiler(2) save profiler double precision g(0:isiz2+1,0:isiz3+1) integer ibeg, ifin1 c--------------------------------------------------------------------- c local variables c--------------------------------------------------------------------- integer k double precision dum(1024) integer msgid1 integer STATUS(MPI_STATUS_SIZE) integer IERROR c--------------------------------------------------------------------- c communicate in the south and north directions c--------------------------------------------------------------------- call TAU_PROFILE_TIMER(profiler, 'exchange_5'); call TAU_PROFILE_START(profiler); c--------------------------------------------------------------------- c receive from south c--------------------------------------------------------------------- if (ifin1.eq.nx) then call MPI_IRECV( dum, > nz, > dp_type, > MPI_ANY_SOURCE, > from_s, > MPI_COMM_WORLD, > msgid1, > IERROR ) call MPI_WAIT( msgid1, STATUS, IERROR ) do k = 1,nz g(nx+1,k) = dum(k) end do end if c--------------------------------------------------------------------- c send north c--------------------------------------------------------------------- if (ibeg.eq.1) then do k = 1,nz dum(k) = g(1,k) end do call MPI_SEND( dum, > nz, > dp_type, > north, > from_s, > MPI_COMM_WORLD, > IERROR ) end if call TAU_PROFILE_STOP(profiler); return end tau-2.16.4/examples/NPB2.3/LU/exchange_6.f000066400000000000000000000050461062343042700175610ustar00rootroot00000000000000 c--------------------------------------------------------------------- c--------------------------------------------------------------------- subroutine exchange_6(g,jbeg,jfin1) c--------------------------------------------------------------------- c--------------------------------------------------------------------- c--------------------------------------------------------------------- c compute the right hand side based on exact solution c--------------------------------------------------------------------- implicit none include 'mpinpb.h' include 'applu.incl' c--------------------------------------------------------------------- c input parameters c--------------------------------------------------------------------- double precision g(0:isiz2+1,0:isiz3+1) integer jbeg, jfin1 c--------------------------------------------------------------------- c local parameters c--------------------------------------------------------------------- integer profiler(2) save profiler integer k double precision dum(1024) integer msgid3 integer STATUS(MPI_STATUS_SIZE) integer IERROR c--------------------------------------------------------------------- c communicate in the east and west directions c--------------------------------------------------------------------- call TAU_PROFILE_TIMER(profiler, 'exchange_6'); call TAU_PROFILE_START(profiler); c--------------------------------------------------------------------- c receive from east c--------------------------------------------------------------------- if (jfin1.eq.ny) then call MPI_IRECV( dum, > nz, > dp_type, > MPI_ANY_SOURCE, > from_e, > MPI_COMM_WORLD, > msgid3, > IERROR ) call MPI_WAIT( msgid3, STATUS, IERROR ) do k = 1,nz g(ny+1,k) = dum(k) end do end if c--------------------------------------------------------------------- c send west c--------------------------------------------------------------------- if (jbeg.eq.1) then do k = 1,nz dum(k) = g(1,k) end do call MPI_SEND( dum, > nz, > dp_type, > west, > from_e, > MPI_COMM_WORLD, > IERROR ) end if call TAU_PROFILE_STOP(profiler); return end tau-2.16.4/examples/NPB2.3/LU/init_comm.f000066400000000000000000000036221062343042700175260ustar00rootroot00000000000000 c--------------------------------------------------------------------- c--------------------------------------------------------------------- subroutine init_comm c--------------------------------------------------------------------- c--------------------------------------------------------------------- c--------------------------------------------------------------------- c c initialize MPI and establish rank and size c c This is a module in the MPI implementation of LUSSOR c pseudo application from the NAS Parallel Benchmarks. c c--------------------------------------------------------------------- implicit none include 'mpinpb.h' include 'applu.incl' integer profiler(2) save profiler integer nodedim integer IERROR c--------------------------------------------------------------------- c initialize MPI communication c--------------------------------------------------------------------- call TAU_PROFILE_TIMER(profiler, 'init_comm'); call TAU_PROFILE_START(profiler); call MPI_INIT( IERROR ) c--------------------------------------------------------------------- c establish the global rank of this process c--------------------------------------------------------------------- call MPI_COMM_RANK( MPI_COMM_WORLD, > id, > IERROR ) call TAU_PROFILE_SET_NODE(id) c--------------------------------------------------------------------- c establish the size of the global group c--------------------------------------------------------------------- call MPI_COMM_SIZE( MPI_COMM_WORLD, > num, > IERROR ) ndim = nodedim(num) if (.not. convertdouble) then dp_type = MPI_DOUBLE_PRECISION else dp_type = MPI_REAL endif call TAU_PROFILE_STOP(profiler); return end tau-2.16.4/examples/NPB2.3/LU/inputlu.data.sample000066400000000000000000000013421062343042700212110ustar00rootroot00000000000000c c***controls printing of the progress of iterations: ipr inorm 1 250 c c***the maximum no. of pseudo-time steps to be performed: nitmax 250 c c***magnitude of the time step: dt 2.0e+00 c c***relaxation factor for SSOR iterations: omega 1.2 c c***tolerance levels for steady-state residuals: tolnwt(m),m=1,5 1.0e-08 1.0e-08 1.0e-08 1.0e-08 1.0e-08 c c***number of grid points in xi and eta and zeta directions: nx ny nz 64 64 64 c tau-2.16.4/examples/NPB2.3/LU/jacld.f000066400000000000000000000407161062343042700166320ustar00rootroot00000000000000 c--------------------------------------------------------------------- c--------------------------------------------------------------------- subroutine jacld(k) c--------------------------------------------------------------------- c--------------------------------------------------------------------- c--------------------------------------------------------------------- c compute the lower triangular part of the jacobian matrix c--------------------------------------------------------------------- implicit none include 'applu.incl' c--------------------------------------------------------------------- c input parameters c--------------------------------------------------------------------- integer k c--------------------------------------------------------------------- c local variables c--------------------------------------------------------------------- integer profiler(2) save profiler integer i, j double precision r43 double precision c1345 double precision c34 double precision tmp1, tmp2, tmp3 call TAU_PROFILE_TIMER(profiler, 'jacld'); call TAU_PROFILE_START(profiler); r43 = ( 4.0d+00 / 3.0d+00 ) c1345 = c1 * c3 * c4 * c5 c34 = c3 * c4 do j = jst, jend do i = ist, iend c--------------------------------------------------------------------- c form the block daigonal c--------------------------------------------------------------------- tmp1 = 1.0d+00 / u(1,i,j,k) tmp2 = tmp1 * tmp1 tmp3 = tmp1 * tmp2 d(1,1,i,j) = 1.0d+00 > + dt * 2.0d+00 * ( tx1 * dx1 > + ty1 * dy1 > + tz1 * dz1 ) d(1,2,i,j) = 0.0d+00 d(1,3,i,j) = 0.0d+00 d(1,4,i,j) = 0.0d+00 d(1,5,i,j) = 0.0d+00 d(2,1,i,j) = dt * 2.0d+00 > * ( tx1 * ( - r43 * c34 * tmp2 * u(2,i,j,k) ) > + ty1 * ( - c34 * tmp2 * u(2,i,j,k) ) > + tz1 * ( - c34 * tmp2 * u(2,i,j,k) ) ) d(2,2,i,j) = 1.0d+00 > + dt * 2.0d+00 > * ( tx1 * r43 * c34 * tmp1 > + ty1 * c34 * tmp1 > + tz1 * c34 * tmp1 ) > + dt * 2.0d+00 * ( tx1 * dx2 > + ty1 * dy2 > + tz1 * dz2 ) d(2,3,i,j) = 0.0d+00 d(2,4,i,j) = 0.0d+00 d(2,5,i,j) = 0.0d+00 d(3,1,i,j) = dt * 2.0d+00 > * ( tx1 * ( - c34 * tmp2 * u(3,i,j,k) ) > + ty1 * ( - r43 * c34 * tmp2 * u(3,i,j,k) ) > + tz1 * ( - c34 * tmp2 * u(3,i,j,k) ) ) d(3,2,i,j) = 0.0d+00 d(3,3,i,j) = 1.0d+00 > + dt * 2.0d+00 > * ( tx1 * c34 * tmp1 > + ty1 * r43 * c34 * tmp1 > + tz1 * c34 * tmp1 ) > + dt * 2.0d+00 * ( tx1 * dx3 > + ty1 * dy3 > + tz1 * dz3 ) d(3,4,i,j) = 0.0d+00 d(3,5,i,j) = 0.0d+00 d(4,1,i,j) = dt * 2.0d+00 > * ( tx1 * ( - c34 * tmp2 * u(4,i,j,k) ) > + ty1 * ( - c34 * tmp2 * u(4,i,j,k) ) > + tz1 * ( - r43 * c34 * tmp2 * u(4,i,j,k) ) ) d(4,2,i,j) = 0.0d+00 d(4,3,i,j) = 0.0d+00 d(4,4,i,j) = 1.0d+00 > + dt * 2.0d+00 > * ( tx1 * c34 * tmp1 > + ty1 * c34 * tmp1 > + tz1 * r43 * c34 * tmp1 ) > + dt * 2.0d+00 * ( tx1 * dx4 > + ty1 * dy4 > + tz1 * dz4 ) d(4,5,i,j) = 0.0d+00 d(5,1,i,j) = dt * 2.0d+00 > * ( tx1 * ( - ( r43*c34 - c1345 ) * tmp3 * ( u(2,i,j,k) ** 2 ) > - ( c34 - c1345 ) * tmp3 * ( u(3,i,j,k) ** 2 ) > - ( c34 - c1345 ) * tmp3 * ( u(4,i,j,k) ** 2 ) > - ( c1345 ) * tmp2 * u(5,i,j,k) ) > + ty1 * ( - ( c34 - c1345 ) * tmp3 * ( u(2,i,j,k) ** 2 ) > - ( r43*c34 - c1345 ) * tmp3 * ( u(3,i,j,k) ** 2 ) > - ( c34 - c1345 ) * tmp3 * ( u(4,i,j,k) ** 2 ) > - ( c1345 ) * tmp2 * u(5,i,j,k) ) > + tz1 * ( - ( c34 - c1345 ) * tmp3 * ( u(2,i,j,k) ** 2 ) > - ( c34 - c1345 ) * tmp3 * ( u(3,i,j,k) ** 2 ) > - ( r43*c34 - c1345 ) * tmp3 * ( u(4,i,j,k) ** 2 ) > - ( c1345 ) * tmp2 * u(5,i,j,k) ) ) d(5,2,i,j) = dt * 2.0d+00 > * ( tx1 * ( r43*c34 - c1345 ) * tmp2 * u(2,i,j,k) > + ty1 * ( c34 - c1345 ) * tmp2 * u(2,i,j,k) > + tz1 * ( c34 - c1345 ) * tmp2 * u(2,i,j,k) ) d(5,3,i,j) = dt * 2.0d+00 > * ( tx1 * ( c34 - c1345 ) * tmp2 * u(3,i,j,k) > + ty1 * ( r43*c34 -c1345 ) * tmp2 * u(3,i,j,k) > + tz1 * ( c34 - c1345 ) * tmp2 * u(3,i,j,k) ) d(5,4,i,j) = dt * 2.0d+00 > * ( tx1 * ( c34 - c1345 ) * tmp2 * u(4,i,j,k) > + ty1 * ( c34 - c1345 ) * tmp2 * u(4,i,j,k) > + tz1 * ( r43*c34 - c1345 ) * tmp2 * u(4,i,j,k) ) d(5,5,i,j) = 1.0d+00 > + dt * 2.0d+00 * ( tx1 * c1345 * tmp1 > + ty1 * c1345 * tmp1 > + tz1 * c1345 * tmp1 ) > + dt * 2.0d+00 * ( tx1 * dx5 > + ty1 * dy5 > + tz1 * dz5 ) c--------------------------------------------------------------------- c form the first block sub-diagonal c--------------------------------------------------------------------- tmp1 = 1.0d+00 / u(1,i,j,k-1) tmp2 = tmp1 * tmp1 tmp3 = tmp1 * tmp2 a(1,1,i,j) = - dt * tz1 * dz1 a(1,2,i,j) = 0.0d+00 a(1,3,i,j) = 0.0d+00 a(1,4,i,j) = - dt * tz2 a(1,5,i,j) = 0.0d+00 a(2,1,i,j) = - dt * tz2 > * ( - ( u(2,i,j,k-1)*u(4,i,j,k-1) ) * tmp2 ) > - dt * tz1 * ( - c34 * tmp2 * u(2,i,j,k-1) ) a(2,2,i,j) = - dt * tz2 * ( u(4,i,j,k-1) * tmp1 ) > - dt * tz1 * c34 * tmp1 > - dt * tz1 * dz2 a(2,3,i,j) = 0.0d+00 a(2,4,i,j) = - dt * tz2 * ( u(2,i,j,k-1) * tmp1 ) a(2,5,i,j) = 0.0d+00 a(3,1,i,j) = - dt * tz2 > * ( - ( u(3,i,j,k-1)*u(4,i,j,k-1) ) * tmp2 ) > - dt * tz1 * ( - c34 * tmp2 * u(3,i,j,k-1) ) a(3,2,i,j) = 0.0d+00 a(3,3,i,j) = - dt * tz2 * ( u(4,i,j,k-1) * tmp1 ) > - dt * tz1 * ( c34 * tmp1 ) > - dt * tz1 * dz3 a(3,4,i,j) = - dt * tz2 * ( u(3,i,j,k-1) * tmp1 ) a(3,5,i,j) = 0.0d+00 a(4,1,i,j) = - dt * tz2 > * ( - ( u(4,i,j,k-1) * tmp1 ) ** 2 > + 0.50d+00 * c2 > * ( ( u(2,i,j,k-1) * u(2,i,j,k-1) > + u(3,i,j,k-1) * u(3,i,j,k-1) > + u(4,i,j,k-1) * u(4,i,j,k-1) ) * tmp2 ) ) > - dt * tz1 * ( - r43 * c34 * tmp2 * u(4,i,j,k-1) ) a(4,2,i,j) = - dt * tz2 > * ( - c2 * ( u(2,i,j,k-1) * tmp1 ) ) a(4,3,i,j) = - dt * tz2 > * ( - c2 * ( u(3,i,j,k-1) * tmp1 ) ) a(4,4,i,j) = - dt * tz2 * ( 2.0d+00 - c2 ) > * ( u(4,i,j,k-1) * tmp1 ) > - dt * tz1 * ( r43 * c34 * tmp1 ) > - dt * tz1 * dz4 a(4,5,i,j) = - dt * tz2 * c2 a(5,1,i,j) = - dt * tz2 > * ( ( c2 * ( u(2,i,j,k-1) * u(2,i,j,k-1) > + u(3,i,j,k-1) * u(3,i,j,k-1) > + u(4,i,j,k-1) * u(4,i,j,k-1) ) * tmp2 > - c1 * ( u(5,i,j,k-1) * tmp1 ) ) > * ( u(4,i,j,k-1) * tmp1 ) ) > - dt * tz1 > * ( - ( c34 - c1345 ) * tmp3 * (u(2,i,j,k-1)**2) > - ( c34 - c1345 ) * tmp3 * (u(3,i,j,k-1)**2) > - ( r43*c34 - c1345 )* tmp3 * (u(4,i,j,k-1)**2) > - c1345 * tmp2 * u(5,i,j,k-1) ) a(5,2,i,j) = - dt * tz2 > * ( - c2 * ( u(2,i,j,k-1)*u(4,i,j,k-1) ) * tmp2 ) > - dt * tz1 * ( c34 - c1345 ) * tmp2 * u(2,i,j,k-1) a(5,3,i,j) = - dt * tz2 > * ( - c2 * ( u(3,i,j,k-1)*u(4,i,j,k-1) ) * tmp2 ) > - dt * tz1 * ( c34 - c1345 ) * tmp2 * u(3,i,j,k-1) a(5,4,i,j) = - dt * tz2 > * ( c1 * ( u(5,i,j,k-1) * tmp1 ) > - 0.50d+00 * c2 > * ( ( u(2,i,j,k-1)*u(2,i,j,k-1) > + u(3,i,j,k-1)*u(3,i,j,k-1) > + 3.0d+00*u(4,i,j,k-1)*u(4,i,j,k-1) ) * tmp2 ) ) > - dt * tz1 * ( r43*c34 - c1345 ) * tmp2 * u(4,i,j,k-1) a(5,5,i,j) = - dt * tz2 > * ( c1 * ( u(4,i,j,k-1) * tmp1 ) ) > - dt * tz1 * c1345 * tmp1 > - dt * tz1 * dz5 c--------------------------------------------------------------------- c form the second block sub-diagonal c--------------------------------------------------------------------- tmp1 = 1.0d+00 / u(1,i,j-1,k) tmp2 = tmp1 * tmp1 tmp3 = tmp1 * tmp2 b(1,1,i,j) = - dt * ty1 * dy1 b(1,2,i,j) = 0.0d+00 b(1,3,i,j) = - dt * ty2 b(1,4,i,j) = 0.0d+00 b(1,5,i,j) = 0.0d+00 b(2,1,i,j) = - dt * ty2 > * ( - ( u(2,i,j-1,k)*u(3,i,j-1,k) ) * tmp2 ) > - dt * ty1 * ( - c34 * tmp2 * u(2,i,j-1,k) ) b(2,2,i,j) = - dt * ty2 * ( u(3,i,j-1,k) * tmp1 ) > - dt * ty1 * ( c34 * tmp1 ) > - dt * ty1 * dy2 b(2,3,i,j) = - dt * ty2 * ( u(2,i,j-1,k) * tmp1 ) b(2,4,i,j) = 0.0d+00 b(2,5,i,j) = 0.0d+00 b(3,1,i,j) = - dt * ty2 > * ( - ( u(3,i,j-1,k) * tmp1 ) ** 2 > + 0.50d+00 * c2 * ( ( u(2,i,j-1,k) * u(2,i,j-1,k) > + u(3,i,j-1,k) * u(3,i,j-1,k) > + u(4,i,j-1,k) * u(4,i,j-1,k) ) > * tmp2 ) ) > - dt * ty1 * ( - r43 * c34 * tmp2 * u(3,i,j-1,k) ) b(3,2,i,j) = - dt * ty2 > * ( - c2 * ( u(2,i,j-1,k) * tmp1 ) ) b(3,3,i,j) = - dt * ty2 * ( ( 2.0d+00 - c2 ) > * ( u(3,i,j-1,k) * tmp1 ) ) > - dt * ty1 * ( r43 * c34 * tmp1 ) > - dt * ty1 * dy3 b(3,4,i,j) = - dt * ty2 > * ( - c2 * ( u(4,i,j-1,k) * tmp1 ) ) b(3,5,i,j) = - dt * ty2 * c2 b(4,1,i,j) = - dt * ty2 > * ( - ( u(3,i,j-1,k)*u(4,i,j-1,k) ) * tmp2 ) > - dt * ty1 * ( - c34 * tmp2 * u(4,i,j-1,k) ) b(4,2,i,j) = 0.0d+00 b(4,3,i,j) = - dt * ty2 * ( u(4,i,j-1,k) * tmp1 ) b(4,4,i,j) = - dt * ty2 * ( u(3,i,j-1,k) * tmp1 ) > - dt * ty1 * ( c34 * tmp1 ) > - dt * ty1 * dy4 b(4,5,i,j) = 0.0d+00 b(5,1,i,j) = - dt * ty2 > * ( ( c2 * ( u(2,i,j-1,k) * u(2,i,j-1,k) > + u(3,i,j-1,k) * u(3,i,j-1,k) > + u(4,i,j-1,k) * u(4,i,j-1,k) ) * tmp2 > - c1 * ( u(5,i,j-1,k) * tmp1 ) ) > * ( u(3,i,j-1,k) * tmp1 ) ) > - dt * ty1 > * ( - ( c34 - c1345 )*tmp3*(u(2,i,j-1,k)**2) > - ( r43*c34 - c1345 )*tmp3*(u(3,i,j-1,k)**2) > - ( c34 - c1345 )*tmp3*(u(4,i,j-1,k)**2) > - c1345*tmp2*u(5,i,j-1,k) ) b(5,2,i,j) = - dt * ty2 > * ( - c2 * ( u(2,i,j-1,k)*u(3,i,j-1,k) ) * tmp2 ) > - dt * ty1 > * ( c34 - c1345 ) * tmp2 * u(2,i,j-1,k) b(5,3,i,j) = - dt * ty2 > * ( c1 * ( u(5,i,j-1,k) * tmp1 ) > - 0.50d+00 * c2 > * ( ( u(2,i,j-1,k)*u(2,i,j-1,k) > + 3.0d+00 * u(3,i,j-1,k)*u(3,i,j-1,k) > + u(4,i,j-1,k)*u(4,i,j-1,k) ) * tmp2 ) ) > - dt * ty1 > * ( r43*c34 - c1345 ) * tmp2 * u(3,i,j-1,k) b(5,4,i,j) = - dt * ty2 > * ( - c2 * ( u(3,i,j-1,k)*u(4,i,j-1,k) ) * tmp2 ) > - dt * ty1 * ( c34 - c1345 ) * tmp2 * u(4,i,j-1,k) b(5,5,i,j) = - dt * ty2 > * ( c1 * ( u(3,i,j-1,k) * tmp1 ) ) > - dt * ty1 * c1345 * tmp1 > - dt * ty1 * dy5 c--------------------------------------------------------------------- c form the third block sub-diagonal c--------------------------------------------------------------------- tmp1 = 1.0d+00 / u(1,i-1,j,k) tmp2 = tmp1 * tmp1 tmp3 = tmp1 * tmp2 c(1,1,i,j) = - dt * tx1 * dx1 c(1,2,i,j) = - dt * tx2 c(1,3,i,j) = 0.0d+00 c(1,4,i,j) = 0.0d+00 c(1,5,i,j) = 0.0d+00 c(2,1,i,j) = - dt * tx2 > * ( - ( u(2,i-1,j,k) * tmp1 ) ** 2 > + c2 * 0.50d+00 * ( u(2,i-1,j,k) * u(2,i-1,j,k) > + u(3,i-1,j,k) * u(3,i-1,j,k) > + u(4,i-1,j,k) * u(4,i-1,j,k) ) * tmp2 ) > - dt * tx1 * ( - r43 * c34 * tmp2 * u(2,i-1,j,k) ) c(2,2,i,j) = - dt * tx2 > * ( ( 2.0d+00 - c2 ) * ( u(2,i-1,j,k) * tmp1 ) ) > - dt * tx1 * ( r43 * c34 * tmp1 ) > - dt * tx1 * dx2 c(2,3,i,j) = - dt * tx2 > * ( - c2 * ( u(3,i-1,j,k) * tmp1 ) ) c(2,4,i,j) = - dt * tx2 > * ( - c2 * ( u(4,i-1,j,k) * tmp1 ) ) c(2,5,i,j) = - dt * tx2 * c2 c(3,1,i,j) = - dt * tx2 > * ( - ( u(2,i-1,j,k) * u(3,i-1,j,k) ) * tmp2 ) > - dt * tx1 * ( - c34 * tmp2 * u(3,i-1,j,k) ) c(3,2,i,j) = - dt * tx2 * ( u(3,i-1,j,k) * tmp1 ) c(3,3,i,j) = - dt * tx2 * ( u(2,i-1,j,k) * tmp1 ) > - dt * tx1 * ( c34 * tmp1 ) > - dt * tx1 * dx3 c(3,4,i,j) = 0.0d+00 c(3,5,i,j) = 0.0d+00 c(4,1,i,j) = - dt * tx2 > * ( - ( u(2,i-1,j,k)*u(4,i-1,j,k) ) * tmp2 ) > - dt * tx1 * ( - c34 * tmp2 * u(4,i-1,j,k) ) c(4,2,i,j) = - dt * tx2 * ( u(4,i-1,j,k) * tmp1 ) c(4,3,i,j) = 0.0d+00 c(4,4,i,j) = - dt * tx2 * ( u(2,i-1,j,k) * tmp1 ) > - dt * tx1 * ( c34 * tmp1 ) > - dt * tx1 * dx4 c(4,5,i,j) = 0.0d+00 c(5,1,i,j) = - dt * tx2 > * ( ( c2 * ( u(2,i-1,j,k) * u(2,i-1,j,k) > + u(3,i-1,j,k) * u(3,i-1,j,k) > + u(4,i-1,j,k) * u(4,i-1,j,k) ) * tmp2 > - c1 * ( u(5,i-1,j,k) * tmp1 ) ) > * ( u(2,i-1,j,k) * tmp1 ) ) > - dt * tx1 > * ( - ( r43*c34 - c1345 ) * tmp3 * ( u(2,i-1,j,k)**2 ) > - ( c34 - c1345 ) * tmp3 * ( u(3,i-1,j,k)**2 ) > - ( c34 - c1345 ) * tmp3 * ( u(4,i-1,j,k)**2 ) > - c1345 * tmp2 * u(5,i-1,j,k) ) c(5,2,i,j) = - dt * tx2 > * ( c1 * ( u(5,i-1,j,k) * tmp1 ) > - 0.50d+00 * c2 > * ( ( 3.0d+00*u(2,i-1,j,k)*u(2,i-1,j,k) > + u(3,i-1,j,k)*u(3,i-1,j,k) > + u(4,i-1,j,k)*u(4,i-1,j,k) ) * tmp2 ) ) > - dt * tx1 > * ( r43*c34 - c1345 ) * tmp2 * u(2,i-1,j,k) c(5,3,i,j) = - dt * tx2 > * ( - c2 * ( u(3,i-1,j,k)*u(2,i-1,j,k) ) * tmp2 ) > - dt * tx1 > * ( c34 - c1345 ) * tmp2 * u(3,i-1,j,k) c(5,4,i,j) = - dt * tx2 > * ( - c2 * ( u(4,i-1,j,k)*u(2,i-1,j,k) ) * tmp2 ) > - dt * tx1 > * ( c34 - c1345 ) * tmp2 * u(4,i-1,j,k) c(5,5,i,j) = - dt * tx2 > * ( c1 * ( u(2,i-1,j,k) * tmp1 ) ) > - dt * tx1 * c1345 * tmp1 > - dt * tx1 * dx5 end do end do call TAU_PROFILE_STOP(profiler); return end tau-2.16.4/examples/NPB2.3/LU/jacu.f000066400000000000000000000406011062343042700164700ustar00rootroot00000000000000 c--------------------------------------------------------------------- c--------------------------------------------------------------------- subroutine jacu(k) c--------------------------------------------------------------------- c--------------------------------------------------------------------- c--------------------------------------------------------------------- c compute the upper triangular part of the jacobian matrix c--------------------------------------------------------------------- implicit none include 'applu.incl' c--------------------------------------------------------------------- c input parameters c--------------------------------------------------------------------- integer k c--------------------------------------------------------------------- c local variables c--------------------------------------------------------------------- integer profiler(2) save profiler integer i, j double precision r43 double precision c1345 double precision c34 double precision tmp1, tmp2, tmp3 call TAU_PROFILE_TIMER(profiler, 'jacu'); call TAU_PROFILE_START(profiler); r43 = ( 4.0d+00 / 3.0d+00 ) c1345 = c1 * c3 * c4 * c5 c34 = c3 * c4 do j = jst, jend do i = ist, iend c--------------------------------------------------------------------- c form the block daigonal c--------------------------------------------------------------------- tmp1 = 1.0d+00 / u(1,i,j,k) tmp2 = tmp1 * tmp1 tmp3 = tmp1 * tmp2 d(1,1,i,j) = 1.0d+00 > + dt * 2.0d+00 * ( tx1 * dx1 > + ty1 * dy1 > + tz1 * dz1 ) d(1,2,i,j) = 0.0d+00 d(1,3,i,j) = 0.0d+00 d(1,4,i,j) = 0.0d+00 d(1,5,i,j) = 0.0d+00 d(2,1,i,j) = dt * 2.0d+00 > * ( tx1 * ( - r43 * c34 * tmp2 * u(2,i,j,k) ) > + ty1 * ( - c34 * tmp2 * u(2,i,j,k) ) > + tz1 * ( - c34 * tmp2 * u(2,i,j,k) ) ) d(2,2,i,j) = 1.0d+00 > + dt * 2.0d+00 > * ( tx1 * r43 * c34 * tmp1 > + ty1 * c34 * tmp1 > + tz1 * c34 * tmp1 ) > + dt * 2.0d+00 * ( tx1 * dx2 > + ty1 * dy2 > + tz1 * dz2 ) d(2,3,i,j) = 0.0d+00 d(2,4,i,j) = 0.0d+00 d(2,5,i,j) = 0.0d+00 d(3,1,i,j) = dt * 2.0d+00 > * ( tx1 * ( - c34 * tmp2 * u(3,i,j,k) ) > + ty1 * ( - r43 * c34 * tmp2 * u(3,i,j,k) ) > + tz1 * ( - c34 * tmp2 * u(3,i,j,k) ) ) d(3,2,i,j) = 0.0d+00 d(3,3,i,j) = 1.0d+00 > + dt * 2.0d+00 > * ( tx1 * c34 * tmp1 > + ty1 * r43 * c34 * tmp1 > + tz1 * c34 * tmp1 ) > + dt * 2.0d+00 * ( tx1 * dx3 > + ty1 * dy3 > + tz1 * dz3 ) d(3,4,i,j) = 0.0d+00 d(3,5,i,j) = 0.0d+00 d(4,1,i,j) = dt * 2.0d+00 > * ( tx1 * ( - c34 * tmp2 * u(4,i,j,k) ) > + ty1 * ( - c34 * tmp2 * u(4,i,j,k) ) > + tz1 * ( - r43 * c34 * tmp2 * u(4,i,j,k) ) ) d(4,2,i,j) = 0.0d+00 d(4,3,i,j) = 0.0d+00 d(4,4,i,j) = 1.0d+00 > + dt * 2.0d+00 > * ( tx1 * c34 * tmp1 > + ty1 * c34 * tmp1 > + tz1 * r43 * c34 * tmp1 ) > + dt * 2.0d+00 * ( tx1 * dx4 > + ty1 * dy4 > + tz1 * dz4 ) d(4,5,i,j) = 0.0d+00 d(5,1,i,j) = dt * 2.0d+00 > * ( tx1 * ( - ( r43*c34 - c1345 ) * tmp3 * ( u(2,i,j,k) ** 2 ) > - ( c34 - c1345 ) * tmp3 * ( u(3,i,j,k) ** 2 ) > - ( c34 - c1345 ) * tmp3 * ( u(4,i,j,k) ** 2 ) > - ( c1345 ) * tmp2 * u(5,i,j,k) ) > + ty1 * ( - ( c34 - c1345 ) * tmp3 * ( u(2,i,j,k) ** 2 ) > - ( r43*c34 - c1345 ) * tmp3 * ( u(3,i,j,k) ** 2 ) > - ( c34 - c1345 ) * tmp3 * ( u(4,i,j,k) ** 2 ) > - ( c1345 ) * tmp2 * u(5,i,j,k) ) > + tz1 * ( - ( c34 - c1345 ) * tmp3 * ( u(2,i,j,k) ** 2 ) > - ( c34 - c1345 ) * tmp3 * ( u(3,i,j,k) ** 2 ) > - ( r43*c34 - c1345 ) * tmp3 * ( u(4,i,j,k) ** 2 ) > - ( c1345 ) * tmp2 * u(5,i,j,k) ) ) d(5,2,i,j) = dt * 2.0d+00 > * ( tx1 * ( r43*c34 - c1345 ) * tmp2 * u(2,i,j,k) > + ty1 * ( c34 - c1345 ) * tmp2 * u(2,i,j,k) > + tz1 * ( c34 - c1345 ) * tmp2 * u(2,i,j,k) ) d(5,3,i,j) = dt * 2.0d+00 > * ( tx1 * ( c34 - c1345 ) * tmp2 * u(3,i,j,k) > + ty1 * ( r43*c34 -c1345 ) * tmp2 * u(3,i,j,k) > + tz1 * ( c34 - c1345 ) * tmp2 * u(3,i,j,k) ) d(5,4,i,j) = dt * 2.0d+00 > * ( tx1 * ( c34 - c1345 ) * tmp2 * u(4,i,j,k) > + ty1 * ( c34 - c1345 ) * tmp2 * u(4,i,j,k) > + tz1 * ( r43*c34 - c1345 ) * tmp2 * u(4,i,j,k) ) d(5,5,i,j) = 1.0d+00 > + dt * 2.0d+00 * ( tx1 * c1345 * tmp1 > + ty1 * c1345 * tmp1 > + tz1 * c1345 * tmp1 ) > + dt * 2.0d+00 * ( tx1 * dx5 > + ty1 * dy5 > + tz1 * dz5 ) c--------------------------------------------------------------------- c form the first block sub-diagonal c--------------------------------------------------------------------- tmp1 = 1.0d+00 / u(1,i+1,j,k) tmp2 = tmp1 * tmp1 tmp3 = tmp1 * tmp2 a(1,1,i,j) = - dt * tx1 * dx1 a(1,2,i,j) = dt * tx2 a(1,3,i,j) = 0.0d+00 a(1,4,i,j) = 0.0d+00 a(1,5,i,j) = 0.0d+00 a(2,1,i,j) = dt * tx2 > * ( - ( u(2,i+1,j,k) * tmp1 ) ** 2 > + c2 * 0.50d+00 * ( u(2,i+1,j,k) * u(2,i+1,j,k) > + u(3,i+1,j,k) * u(3,i+1,j,k) > + u(4,i+1,j,k) * u(4,i+1,j,k) ) * tmp2 ) > - dt * tx1 * ( - r43 * c34 * tmp2 * u(2,i+1,j,k) ) a(2,2,i,j) = dt * tx2 > * ( ( 2.0d+00 - c2 ) * ( u(2,i+1,j,k) * tmp1 ) ) > - dt * tx1 * ( r43 * c34 * tmp1 ) > - dt * tx1 * dx2 a(2,3,i,j) = dt * tx2 > * ( - c2 * ( u(3,i+1,j,k) * tmp1 ) ) a(2,4,i,j) = dt * tx2 > * ( - c2 * ( u(4,i+1,j,k) * tmp1 ) ) a(2,5,i,j) = dt * tx2 * c2 a(3,1,i,j) = dt * tx2 > * ( - ( u(2,i+1,j,k) * u(3,i+1,j,k) ) * tmp2 ) > - dt * tx1 * ( - c34 * tmp2 * u(3,i+1,j,k) ) a(3,2,i,j) = dt * tx2 * ( u(3,i+1,j,k) * tmp1 ) a(3,3,i,j) = dt * tx2 * ( u(2,i+1,j,k) * tmp1 ) > - dt * tx1 * ( c34 * tmp1 ) > - dt * tx1 * dx3 a(3,4,i,j) = 0.0d+00 a(3,5,i,j) = 0.0d+00 a(4,1,i,j) = dt * tx2 > * ( - ( u(2,i+1,j,k)*u(4,i+1,j,k) ) * tmp2 ) > - dt * tx1 * ( - c34 * tmp2 * u(4,i+1,j,k) ) a(4,2,i,j) = dt * tx2 * ( u(4,i+1,j,k) * tmp1 ) a(4,3,i,j) = 0.0d+00 a(4,4,i,j) = dt * tx2 * ( u(2,i+1,j,k) * tmp1 ) > - dt * tx1 * ( c34 * tmp1 ) > - dt * tx1 * dx4 a(4,5,i,j) = 0.0d+00 a(5,1,i,j) = dt * tx2 > * ( ( c2 * ( u(2,i+1,j,k) * u(2,i+1,j,k) > + u(3,i+1,j,k) * u(3,i+1,j,k) > + u(4,i+1,j,k) * u(4,i+1,j,k) ) * tmp2 > - c1 * ( u(5,i+1,j,k) * tmp1 ) ) > * ( u(2,i+1,j,k) * tmp1 ) ) > - dt * tx1 > * ( - ( r43*c34 - c1345 ) * tmp3 * ( u(2,i+1,j,k)**2 ) > - ( c34 - c1345 ) * tmp3 * ( u(3,i+1,j,k)**2 ) > - ( c34 - c1345 ) * tmp3 * ( u(4,i+1,j,k)**2 ) > - c1345 * tmp2 * u(5,i+1,j,k) ) a(5,2,i,j) = dt * tx2 > * ( c1 * ( u(5,i+1,j,k) * tmp1 ) > - 0.50d+00 * c2 > * ( ( 3.0d+00*u(2,i+1,j,k)*u(2,i+1,j,k) > + u(3,i+1,j,k)*u(3,i+1,j,k) > + u(4,i+1,j,k)*u(4,i+1,j,k) ) * tmp2 ) ) > - dt * tx1 > * ( r43*c34 - c1345 ) * tmp2 * u(2,i+1,j,k) a(5,3,i,j) = dt * tx2 > * ( - c2 * ( u(3,i+1,j,k)*u(2,i+1,j,k) ) * tmp2 ) > - dt * tx1 > * ( c34 - c1345 ) * tmp2 * u(3,i+1,j,k) a(5,4,i,j) = dt * tx2 > * ( - c2 * ( u(4,i+1,j,k)*u(2,i+1,j,k) ) * tmp2 ) > - dt * tx1 > * ( c34 - c1345 ) * tmp2 * u(4,i+1,j,k) a(5,5,i,j) = dt * tx2 > * ( c1 * ( u(2,i+1,j,k) * tmp1 ) ) > - dt * tx1 * c1345 * tmp1 > - dt * tx1 * dx5 c--------------------------------------------------------------------- c form the second block sub-diagonal c--------------------------------------------------------------------- tmp1 = 1.0d+00 / u(1,i,j+1,k) tmp2 = tmp1 * tmp1 tmp3 = tmp1 * tmp2 b(1,1,i,j) = - dt * ty1 * dy1 b(1,2,i,j) = 0.0d+00 b(1,3,i,j) = dt * ty2 b(1,4,i,j) = 0.0d+00 b(1,5,i,j) = 0.0d+00 b(2,1,i,j) = dt * ty2 > * ( - ( u(2,i,j+1,k)*u(3,i,j+1,k) ) * tmp2 ) > - dt * ty1 * ( - c34 * tmp2 * u(2,i,j+1,k) ) b(2,2,i,j) = dt * ty2 * ( u(3,i,j+1,k) * tmp1 ) > - dt * ty1 * ( c34 * tmp1 ) > - dt * ty1 * dy2 b(2,3,i,j) = dt * ty2 * ( u(2,i,j+1,k) * tmp1 ) b(2,4,i,j) = 0.0d+00 b(2,5,i,j) = 0.0d+00 b(3,1,i,j) = dt * ty2 > * ( - ( u(3,i,j+1,k) * tmp1 ) ** 2 > + 0.50d+00 * c2 * ( ( u(2,i,j+1,k) * u(2,i,j+1,k) > + u(3,i,j+1,k) * u(3,i,j+1,k) > + u(4,i,j+1,k) * u(4,i,j+1,k) ) > * tmp2 ) ) > - dt * ty1 * ( - r43 * c34 * tmp2 * u(3,i,j+1,k) ) b(3,2,i,j) = dt * ty2 > * ( - c2 * ( u(2,i,j+1,k) * tmp1 ) ) b(3,3,i,j) = dt * ty2 * ( ( 2.0d+00 - c2 ) > * ( u(3,i,j+1,k) * tmp1 ) ) > - dt * ty1 * ( r43 * c34 * tmp1 ) > - dt * ty1 * dy3 b(3,4,i,j) = dt * ty2 > * ( - c2 * ( u(4,i,j+1,k) * tmp1 ) ) b(3,5,i,j) = dt * ty2 * c2 b(4,1,i,j) = dt * ty2 > * ( - ( u(3,i,j+1,k)*u(4,i,j+1,k) ) * tmp2 ) > - dt * ty1 * ( - c34 * tmp2 * u(4,i,j+1,k) ) b(4,2,i,j) = 0.0d+00 b(4,3,i,j) = dt * ty2 * ( u(4,i,j+1,k) * tmp1 ) b(4,4,i,j) = dt * ty2 * ( u(3,i,j+1,k) * tmp1 ) > - dt * ty1 * ( c34 * tmp1 ) > - dt * ty1 * dy4 b(4,5,i,j) = 0.0d+00 b(5,1,i,j) = dt * ty2 > * ( ( c2 * ( u(2,i,j+1,k) * u(2,i,j+1,k) > + u(3,i,j+1,k) * u(3,i,j+1,k) > + u(4,i,j+1,k) * u(4,i,j+1,k) ) * tmp2 > - c1 * ( u(5,i,j+1,k) * tmp1 ) ) > * ( u(3,i,j+1,k) * tmp1 ) ) > - dt * ty1 > * ( - ( c34 - c1345 )*tmp3*(u(2,i,j+1,k)**2) > - ( r43*c34 - c1345 )*tmp3*(u(3,i,j+1,k)**2) > - ( c34 - c1345 )*tmp3*(u(4,i,j+1,k)**2) > - c1345*tmp2*u(5,i,j+1,k) ) b(5,2,i,j) = dt * ty2 > * ( - c2 * ( u(2,i,j+1,k)*u(3,i,j+1,k) ) * tmp2 ) > - dt * ty1 > * ( c34 - c1345 ) * tmp2 * u(2,i,j+1,k) b(5,3,i,j) = dt * ty2 > * ( c1 * ( u(5,i,j+1,k) * tmp1 ) > - 0.50d+00 * c2 > * ( ( u(2,i,j+1,k)*u(2,i,j+1,k) > + 3.0d+00 * u(3,i,j+1,k)*u(3,i,j+1,k) > + u(4,i,j+1,k)*u(4,i,j+1,k) ) * tmp2 ) ) > - dt * ty1 > * ( r43*c34 - c1345 ) * tmp2 * u(3,i,j+1,k) b(5,4,i,j) = dt * ty2 > * ( - c2 * ( u(3,i,j+1,k)*u(4,i,j+1,k) ) * tmp2 ) > - dt * ty1 * ( c34 - c1345 ) * tmp2 * u(4,i,j+1,k) b(5,5,i,j) = dt * ty2 > * ( c1 * ( u(3,i,j+1,k) * tmp1 ) ) > - dt * ty1 * c1345 * tmp1 > - dt * ty1 * dy5 c--------------------------------------------------------------------- c form the third block sub-diagonal c--------------------------------------------------------------------- tmp1 = 1.0d+00 / u(1,i,j,k+1) tmp2 = tmp1 * tmp1 tmp3 = tmp1 * tmp2 c(1,1,i,j) = - dt * tz1 * dz1 c(1,2,i,j) = 0.0d+00 c(1,3,i,j) = 0.0d+00 c(1,4,i,j) = dt * tz2 c(1,5,i,j) = 0.0d+00 c(2,1,i,j) = dt * tz2 > * ( - ( u(2,i,j,k+1)*u(4,i,j,k+1) ) * tmp2 ) > - dt * tz1 * ( - c34 * tmp2 * u(2,i,j,k+1) ) c(2,2,i,j) = dt * tz2 * ( u(4,i,j,k+1) * tmp1 ) > - dt * tz1 * c34 * tmp1 > - dt * tz1 * dz2 c(2,3,i,j) = 0.0d+00 c(2,4,i,j) = dt * tz2 * ( u(2,i,j,k+1) * tmp1 ) c(2,5,i,j) = 0.0d+00 c(3,1,i,j) = dt * tz2 > * ( - ( u(3,i,j,k+1)*u(4,i,j,k+1) ) * tmp2 ) > - dt * tz1 * ( - c34 * tmp2 * u(3,i,j,k+1) ) c(3,2,i,j) = 0.0d+00 c(3,3,i,j) = dt * tz2 * ( u(4,i,j,k+1) * tmp1 ) > - dt * tz1 * ( c34 * tmp1 ) > - dt * tz1 * dz3 c(3,4,i,j) = dt * tz2 * ( u(3,i,j,k+1) * tmp1 ) c(3,5,i,j) = 0.0d+00 c(4,1,i,j) = dt * tz2 > * ( - ( u(4,i,j,k+1) * tmp1 ) ** 2 > + 0.50d+00 * c2 > * ( ( u(2,i,j,k+1) * u(2,i,j,k+1) > + u(3,i,j,k+1) * u(3,i,j,k+1) > + u(4,i,j,k+1) * u(4,i,j,k+1) ) * tmp2 ) ) > - dt * tz1 * ( - r43 * c34 * tmp2 * u(4,i,j,k+1) ) c(4,2,i,j) = dt * tz2 > * ( - c2 * ( u(2,i,j,k+1) * tmp1 ) ) c(4,3,i,j) = dt * tz2 > * ( - c2 * ( u(3,i,j,k+1) * tmp1 ) ) c(4,4,i,j) = dt * tz2 * ( 2.0d+00 - c2 ) > * ( u(4,i,j,k+1) * tmp1 ) > - dt * tz1 * ( r43 * c34 * tmp1 ) > - dt * tz1 * dz4 c(4,5,i,j) = dt * tz2 * c2 c(5,1,i,j) = dt * tz2 > * ( ( c2 * ( u(2,i,j,k+1) * u(2,i,j,k+1) > + u(3,i,j,k+1) * u(3,i,j,k+1) > + u(4,i,j,k+1) * u(4,i,j,k+1) ) * tmp2 > - c1 * ( u(5,i,j,k+1) * tmp1 ) ) > * ( u(4,i,j,k+1) * tmp1 ) ) > - dt * tz1 > * ( - ( c34 - c1345 ) * tmp3 * (u(2,i,j,k+1)**2) > - ( c34 - c1345 ) * tmp3 * (u(3,i,j,k+1)**2) > - ( r43*c34 - c1345 )* tmp3 * (u(4,i,j,k+1)**2) > - c1345 * tmp2 * u(5,i,j,k+1) ) c(5,2,i,j) = dt * tz2 > * ( - c2 * ( u(2,i,j,k+1)*u(4,i,j,k+1) ) * tmp2 ) > - dt * tz1 * ( c34 - c1345 ) * tmp2 * u(2,i,j,k+1) c(5,3,i,j) = dt * tz2 > * ( - c2 * ( u(3,i,j,k+1)*u(4,i,j,k+1) ) * tmp2 ) > - dt * tz1 * ( c34 - c1345 ) * tmp2 * u(3,i,j,k+1) c(5,4,i,j) = dt * tz2 > * ( c1 * ( u(5,i,j,k+1) * tmp1 ) > - 0.50d+00 * c2 > * ( ( u(2,i,j,k+1)*u(2,i,j,k+1) > + u(3,i,j,k+1)*u(3,i,j,k+1) > + 3.0d+00*u(4,i,j,k+1)*u(4,i,j,k+1) ) * tmp2 ) ) > - dt * tz1 * ( r43*c34 - c1345 ) * tmp2 * u(4,i,j,k+1) c(5,5,i,j) = dt * tz2 > * ( c1 * ( u(4,i,j,k+1) * tmp1 ) ) > - dt * tz1 * c1345 * tmp1 > - dt * tz1 * dz5 end do end do call TAU_PROFILE_STOP(profiler); return end tau-2.16.4/examples/NPB2.3/LU/l2norm.f000066400000000000000000000044231062343042700167610ustar00rootroot00000000000000 c--------------------------------------------------------------------- c--------------------------------------------------------------------- subroutine l2norm ( ldx, ldy, ldz, > nx0, ny0, nz0, > ist, iend, > jst, jend, > v, sum ) c--------------------------------------------------------------------- c--------------------------------------------------------------------- c--------------------------------------------------------------------- c to compute the l2-norm of vector v. c--------------------------------------------------------------------- implicit none include 'mpinpb.h' c--------------------------------------------------------------------- c input parameters c--------------------------------------------------------------------- integer ldx, ldy, ldz integer nx0, ny0, nz0 integer ist, iend integer jst, jend double precision v(5,-1:ldx+2,-1:ldy+2,*), sum(5) c--------------------------------------------------------------------- c local variables c--------------------------------------------------------------------- integer profiler(2) save profiler integer i, j, k, m double precision dummy(5) integer IERROR call TAU_PROFILE_TIMER(profiler, 'l2norm'); call TAU_PROFILE_START(profiler); do m = 1, 5 dummy(m) = 0.0d+00 end do do k = 2, nz0-1 do j = jst, jend do i = ist, iend do m = 1, 5 dummy(m) = dummy(m) + v(m,i,j,k) * v(m,i,j,k) end do end do end do end do c--------------------------------------------------------------------- c compute the global sum of individual contributions to dot product. c--------------------------------------------------------------------- call MPI_ALLREDUCE( dummy, > sum, > 5, > dp_type, > MPI_SUM, > MPI_COMM_WORLD, > IERROR ) do m = 1, 5 sum(m) = sqrt ( sum(m) / ( (nx0-2)*(ny0-2)*(nz0-2) ) ) end do call TAU_PROFILE_STOP(profiler); return end tau-2.16.4/examples/NPB2.3/LU/lu.f000066400000000000000000000156751062343042700162030ustar00rootroot00000000000000!-------------------------------------------------------------------------! ! ! ! N A S P A R A L L E L B E N C H M A R K S 2.3 ! ! ! ! L U ! ! ! !-------------------------------------------------------------------------! ! ! ! This benchmark is part of the NAS Parallel Benchmark 2.3 suite. ! ! It is described in NAS Technical Report 95-020. ! ! ! ! Permission to use, copy, distribute and modify this software ! ! for any purpose with or without fee is hereby granted. We ! ! request, however, that all derived work reference the NAS ! ! Parallel Benchmarks 2.3. This software is provided "as is" ! ! without express or implied warranty. ! ! ! ! Information on NPB 2.3, including the technical report, the ! ! original specifications, source code, results and information ! ! on how to submit new results, is available at: ! ! ! ! http://www.nas.nasa.gov/NAS/NPB/ ! ! ! ! Send comments or suggestions to npb@nas.nasa.gov ! ! Send bug reports to npb-bugs@nas.nasa.gov ! ! ! ! NAS Parallel Benchmarks Group ! ! NASA Ames Research Center ! ! Mail Stop: T27A-1 ! ! Moffett Field, CA 94035-1000 ! ! ! ! E-mail: npb@nas.nasa.gov ! ! Fax: (415) 604-3957 ! ! ! !-------------------------------------------------------------------------! c--------------------------------------------------------------------- c c Authors: S. Weeratunga c V. Venkatakrishnan c E. Barszcz c M. Yarrow c c--------------------------------------------------------------------- c--------------------------------------------------------------------- program applu c--------------------------------------------------------------------- c--------------------------------------------------------------------- c c driver for the performance evaluation of the solver for c five coupled parabolic/elliptic partial differential equations. c c--------------------------------------------------------------------- implicit none integer profiler(2) save profiler include 'applu.incl' character class logical verified double precision mflops integer ierr c--------------------------------------------------------------------- c initialize communications c--------------------------------------------------------------------- call TAU_PROFILE_INIT() call TAU_PROFILE_TIMER(profiler, 'applu') call TAU_PROFILE_START(profiler) call init_comm() c--------------------------------------------------------------------- c read input data c--------------------------------------------------------------------- call read_input() c--------------------------------------------------------------------- c set up processor grid c--------------------------------------------------------------------- call proc_grid() c--------------------------------------------------------------------- c determine the neighbors c--------------------------------------------------------------------- call neighbors() c--------------------------------------------------------------------- c set up sub-domain sizes c--------------------------------------------------------------------- call subdomain() c--------------------------------------------------------------------- c set up coefficients c--------------------------------------------------------------------- call setcoeff() c--------------------------------------------------------------------- c set the masks required for comm c--------------------------------------------------------------------- call sethyper() c--------------------------------------------------------------------- c set the boundary values for dependent variables c--------------------------------------------------------------------- call setbv() c--------------------------------------------------------------------- c set the initial values for dependent variables c--------------------------------------------------------------------- call setiv() c--------------------------------------------------------------------- c compute the forcing term based on prescribed exact solution c--------------------------------------------------------------------- call erhs() c--------------------------------------------------------------------- c perform the SSOR iterations c--------------------------------------------------------------------- call ssor() c--------------------------------------------------------------------- c compute the solution error c--------------------------------------------------------------------- call error() c--------------------------------------------------------------------- c compute the surface integral c--------------------------------------------------------------------- call pintgr() c--------------------------------------------------------------------- c verification test c--------------------------------------------------------------------- IF (id.eq.0) THEN call verify ( rsdnm, errnm, frc, class, verified ) mflops = float(itmax)*(1984.77*float( nx0 ) > *float( ny0 ) > *float( nz0 ) > -10923.3*(float( nx0+ny0+nz0 )/3.)**2 > +27770.9* float( nx0+ny0+nz0 )/3. > -144010.) > / (maxtime*1000000.) call print_results('LU', class, nx0, > ny0, nz0, itmax, nnodes_compiled, > num, maxtime, mflops, ' floating point', verified, > npbversion, compiletime, cs1, cs2, cs3, cs4, cs5, cs6, > '(none)') END IF call mpi_finalize(ierr) call TAU_PROFILE_STOP(profiler) end tau-2.16.4/examples/NPB2.3/LU/mpinpb.h000066400000000000000000000006131062343042700170340ustar00rootroot00000000000000 c--------------------------------------------------------------------- c--------------------------------------------------------------------- include 'mpif.h' integer node, no_nodes, root, comm_setup, > comm_solve, comm_rhs, dp_type common /mpistuff/ node, no_nodes, root, comm_setup, > comm_solve, comm_rhs, dp_type tau-2.16.4/examples/NPB2.3/LU/neighbors.f000066400000000000000000000024041062343042700175250ustar00rootroot00000000000000 c--------------------------------------------------------------------- c--------------------------------------------------------------------- subroutine neighbors () c--------------------------------------------------------------------- c--------------------------------------------------------------------- implicit none include 'applu.incl' integer profiler(2) save profiler call TAU_PROFILE_TIMER(profiler, 'neighbors'); call TAU_PROFILE_START(profiler); c--------------------------------------------------------------------- c figure out the neighbors and their wrap numbers for each processor c--------------------------------------------------------------------- south = -1 east = -1 north = -1 west = -1 if (row.gt.1) then north = id -1 else north = -1 end if if (row.lt.xdim) then south = id + 1 else south = -1 end if if (col.gt.1) then west = id- xdim else west = -1 end if if (col.lt.ydim) then east = id + xdim else east = -1 end if call TAU_PROFILE_STOP(profiler); return end tau-2.16.4/examples/NPB2.3/LU/nodedim.f000066400000000000000000000023201062343042700171610ustar00rootroot00000000000000 c--------------------------------------------------------------------- c--------------------------------------------------------------------- integer function nodedim(num) c--------------------------------------------------------------------- c--------------------------------------------------------------------- c--------------------------------------------------------------------- c c compute the exponent where num = 2**nodedim c NOTE: assumes a power-of-two number of nodes c c--------------------------------------------------------------------- implicit none c--------------------------------------------------------------------- c input parameters c--------------------------------------------------------------------- integer num c--------------------------------------------------------------------- c local variables c--------------------------------------------------------------------- integer profiler(2) save profiler double precision fnum call TAU_PROFILE_TIMER(profiler, 'nodedim'); call TAU_PROFILE_START(profiler); fnum = dble(num) nodedim = log(fnum)/log(2.0d+0) + 0.00001 call TAU_PROFILE_STOP(profiler); return end tau-2.16.4/examples/NPB2.3/LU/pintgr.f000066400000000000000000000221511062343042700170510ustar00rootroot00000000000000 c--------------------------------------------------------------------- c--------------------------------------------------------------------- subroutine pintgr c--------------------------------------------------------------------- c--------------------------------------------------------------------- implicit none include 'mpinpb.h' include 'applu.incl' c--------------------------------------------------------------------- c local variables c--------------------------------------------------------------------- integer profiler(2) save profiler integer i, j, k integer ibeg, ifin, ifin1 integer jbeg, jfin, jfin1 integer iglob, iglob1, iglob2 integer jglob, jglob1, jglob2 integer ind1, ind2 double precision phi1(0:isiz2+1,0:isiz3+1), > phi2(0:isiz2+1,0:isiz3+1) double precision frc1, frc2, frc3 double precision dummy integer IERROR call TAU_PROFILE_TIMER(profiler, 'pintgr'); call TAU_PROFILE_START(profiler); c--------------------------------------------------------------------- c set up the sub-domains for integeration in each processor c--------------------------------------------------------------------- ibeg = nx + 1 ifin = 0 iglob1 = ipt + 1 iglob2 = ipt + nx if (iglob1.ge.ii1.and.iglob2.lt.ii2+nx) ibeg = 1 if (iglob1.gt.ii1-nx.and.iglob2.le.ii2) ifin = nx if (ii1.ge.iglob1.and.ii1.le.iglob2) ibeg = ii1 - ipt if (ii2.ge.iglob1.and.ii2.le.iglob2) ifin = ii2 - ipt jbeg = ny + 1 jfin = 0 jglob1 = jpt + 1 jglob2 = jpt + ny if (jglob1.ge.ji1.and.jglob2.lt.ji2+ny) jbeg = 1 if (jglob1.gt.ji1-ny.and.jglob2.le.ji2) jfin = ny if (ji1.ge.jglob1.and.ji1.le.jglob2) jbeg = ji1 - jpt if (ji2.ge.jglob1.and.ji2.le.jglob2) jfin = ji2 - jpt ifin1 = ifin jfin1 = jfin if (ipt + ifin1.eq.ii2) ifin1 = ifin -1 if (jpt + jfin1.eq.ji2) jfin1 = jfin -1 c--------------------------------------------------------------------- c initialize c--------------------------------------------------------------------- do i = 0,isiz2+1 do k = 0,isiz3+1 phi1(i,k) = 0. phi2(i,k) = 0. end do end do do j = jbeg,jfin jglob = jpt + j do i = ibeg,ifin iglob = ipt + i k = ki1 phi1(i,j) = c2*( u(5,i,j,k) > - 0.50d+00 * ( u(2,i,j,k) ** 2 > + u(3,i,j,k) ** 2 > + u(4,i,j,k) ** 2 ) > / u(1,i,j,k) ) k = ki2 phi2(i,j) = c2*( u(5,i,j,k) > - 0.50d+00 * ( u(2,i,j,k) ** 2 > + u(3,i,j,k) ** 2 > + u(4,i,j,k) ** 2 ) > / u(1,i,j,k) ) end do end do c--------------------------------------------------------------------- c communicate in i and j directions c--------------------------------------------------------------------- call exchange_4(phi1,phi2,ibeg,ifin1,jbeg,jfin1) frc1 = 0.0d+00 do j = jbeg,jfin1 do i = ibeg, ifin1 frc1 = frc1 + ( phi1(i,j) > + phi1(i+1,j) > + phi1(i,j+1) > + phi1(i+1,j+1) > + phi2(i,j) > + phi2(i+1,j) > + phi2(i,j+1) > + phi2(i+1,j+1) ) end do end do c--------------------------------------------------------------------- c compute the global sum of individual contributions to frc1 c--------------------------------------------------------------------- dummy = frc1 call MPI_ALLREDUCE( dummy, > frc1, > 1, > dp_type, > MPI_SUM, > MPI_COMM_WORLD, > IERROR ) frc1 = dxi * deta * frc1 c--------------------------------------------------------------------- c initialize c--------------------------------------------------------------------- do i = 0,isiz2+1 do k = 0,isiz3+1 phi1(i,k) = 0. phi2(i,k) = 0. end do end do jglob = jpt + jbeg ind1 = 0 if (jglob.eq.ji1) then ind1 = 1 do k = ki1, ki2 do i = ibeg, ifin iglob = ipt + i phi1(i,k) = c2*( u(5,i,jbeg,k) > - 0.50d+00 * ( u(2,i,jbeg,k) ** 2 > + u(3,i,jbeg,k) ** 2 > + u(4,i,jbeg,k) ** 2 ) > / u(1,i,jbeg,k) ) end do end do end if jglob = jpt + jfin ind2 = 0 if (jglob.eq.ji2) then ind2 = 1 do k = ki1, ki2 do i = ibeg, ifin iglob = ipt + i phi2(i,k) = c2*( u(5,i,jfin,k) > - 0.50d+00 * ( u(2,i,jfin,k) ** 2 > + u(3,i,jfin,k) ** 2 > + u(4,i,jfin,k) ** 2 ) > / u(1,i,jfin,k) ) end do end do end if c--------------------------------------------------------------------- c communicate in i direction c--------------------------------------------------------------------- if (ind1.eq.1) then call exchange_5(phi1,ibeg,ifin1) end if if (ind2.eq.1) then call exchange_5 (phi2,ibeg,ifin1) end if frc2 = 0.0d+00 do k = ki1, ki2-1 do i = ibeg, ifin1 frc2 = frc2 + ( phi1(i,k) > + phi1(i+1,k) > + phi1(i,k+1) > + phi1(i+1,k+1) > + phi2(i,k) > + phi2(i+1,k) > + phi2(i,k+1) > + phi2(i+1,k+1) ) end do end do c--------------------------------------------------------------------- c compute the global sum of individual contributions to frc2 c--------------------------------------------------------------------- dummy = frc2 call MPI_ALLREDUCE( dummy, > frc2, > 1, > dp_type, > MPI_SUM, > MPI_COMM_WORLD, > IERROR ) frc2 = dxi * dzeta * frc2 c--------------------------------------------------------------------- c initialize c--------------------------------------------------------------------- do i = 0,isiz2+1 do k = 0,isiz3+1 phi1(i,k) = 0. phi2(i,k) = 0. end do end do iglob = ipt + ibeg ind1 = 0 if (iglob.eq.ii1) then ind1 = 1 do k = ki1, ki2 do j = jbeg, jfin jglob = jpt + j phi1(j,k) = c2*( u(5,ibeg,j,k) > - 0.50d+00 * ( u(2,ibeg,j,k) ** 2 > + u(3,ibeg,j,k) ** 2 > + u(4,ibeg,j,k) ** 2 ) > / u(1,ibeg,j,k) ) end do end do end if iglob = ipt + ifin ind2 = 0 if (iglob.eq.ii2) then ind2 = 1 do k = ki1, ki2 do j = jbeg, jfin jglob = jpt + j phi2(j,k) = c2*( u(5,ifin,j,k) > - 0.50d+00 * ( u(2,ifin,j,k) ** 2 > + u(3,ifin,j,k) ** 2 > + u(4,ifin,j,k) ** 2 ) > / u(1,ifin,j,k) ) end do end do end if c--------------------------------------------------------------------- c communicate in j direction c--------------------------------------------------------------------- if (ind1.eq.1) then call exchange_6(phi1,jbeg,jfin1) end if if (ind2.eq.1) then call exchange_6(phi2,jbeg,jfin1) end if frc3 = 0.0d+00 do k = ki1, ki2-1 do j = jbeg, jfin1 frc3 = frc3 + ( phi1(j,k) > + phi1(j+1,k) > + phi1(j,k+1) > + phi1(j+1,k+1) > + phi2(j,k) > + phi2(j+1,k) > + phi2(j,k+1) > + phi2(j+1,k+1) ) end do end do c--------------------------------------------------------------------- c compute the global sum of individual contributions to frc3 c--------------------------------------------------------------------- dummy = frc3 call MPI_ALLREDUCE( dummy, > frc3, > 1, > dp_type, > MPI_SUM, > MPI_COMM_WORLD, > IERROR ) frc3 = deta * dzeta * frc3 frc = 0.25d+00 * ( frc1 + frc2 + frc3 ) c if (id.eq.0) write (*,1001) frc call TAU_PROFILE_STOP(profiler); return 1001 format (//5x,'surface integral = ',1pe12.5//) end tau-2.16.4/examples/NPB2.3/LU/proc_grid.f000066400000000000000000000022141062343042700175140ustar00rootroot00000000000000 c--------------------------------------------------------------------- c--------------------------------------------------------------------- subroutine proc_grid c--------------------------------------------------------------------- c--------------------------------------------------------------------- implicit none include 'applu.incl' c--------------------------------------------------------------------- c local variables c--------------------------------------------------------------------- integer profiler(2) save profiler call TAU_PROFILE_TIMER(profiler, 'proc_grid'); call TAU_PROFILE_START(profiler); c--------------------------------------------------------------------- c c set up a two-d grid for processors: column-major ordering of unknowns c NOTE: assumes a power-of-two number of processors c c--------------------------------------------------------------------- xdim = 2**(ndim/2) if (mod(ndim,2).eq.1) xdim = xdim + xdim ydim = num/xdim row = mod(id,xdim) + 1 col = id/xdim + 1 call TAU_PROFILE_STOP(profiler); return end tau-2.16.4/examples/NPB2.3/LU/read_input.f000066400000000000000000000077461062343042700177150ustar00rootroot00000000000000 c--------------------------------------------------------------------- c--------------------------------------------------------------------- subroutine read_input c--------------------------------------------------------------------- c--------------------------------------------------------------------- implicit none include 'mpinpb.h' include 'applu.incl' integer profiler(2) save profiler integer IERROR, fstatus, nnodes call TAU_PROFILE_TIMER(profiler, 'read_input'); call TAU_PROFILE_START(profiler); c--------------------------------------------------------------------- c only root reads the input file c if input file does not exist, it uses defaults c ipr = 1 for detailed progress output c inorm = how often the norm is printed (once every inorm iterations) c itmax = number of pseudo time steps c dt = time step c omega 1 over-relaxation factor for SSOR c tolrsd = steady state residual tolerance levels c nx, ny, nz = number of grid points in x, y, z directions c--------------------------------------------------------------------- ROOT = 0 if (id .eq. ROOT) then write(*, 1000) open (unit=3,file='inputlu.data',status='old', > access='sequential',form='formatted', iostat=fstatus) if (fstatus .eq. 0) then write(*, *) ' Reading from input file inputlu.data' read (3,*) read (3,*) read (3,*) ipr, inorm read (3,*) read (3,*) read (3,*) itmax read (3,*) read (3,*) read (3,*) dt read (3,*) read (3,*) read (3,*) omega read (3,*) read (3,*) read (3,*) tolrsd(1),tolrsd(2),tolrsd(3),tolrsd(4),tolrsd(5) read (3,*) read (3,*) read (3,*) nx0, ny0, nz0 close(3) else ipr = ipr_default inorm = inorm_default itmax = itmax_default dt = dt_default omega = omega_default tolrsd(1) = tolrsd1_def tolrsd(2) = tolrsd2_def tolrsd(3) = tolrsd3_def tolrsd(4) = tolrsd4_def tolrsd(5) = tolrsd5_def nx0 = isiz01 ny0 = isiz02 nz0 = isiz03 endif c--------------------------------------------------------------------- c check problem size c--------------------------------------------------------------------- call MPI_COMM_SIZE(MPI_COMM_WORLD, nnodes, ierror) if (nnodes .ne. nnodes_compiled) then write (*, 2000) nnodes, nnodes_compiled 2000 format (5x,'Warning: program is running on',i3,' processors' > /5x,'but was compiled for ', i3) endif if ( ( nx0 .lt. 4 ) .or. > ( ny0 .lt. 4 ) .or. > ( nz0 .lt. 4 ) ) then write (*,2001) 2001 format (5x,'PROBLEM SIZE IS TOO SMALL - ', > /5x,'SET EACH OF NX, NY AND NZ AT LEAST EQUAL TO 5') CALL MPI_ABORT( MPI_COMM_WORLD, MPI_ERR_OTHER, IERROR ) end if if ( ( nx0 .gt. isiz01 ) .or. > ( ny0 .gt. isiz02 ) .or. > ( nz0 .gt. isiz03 ) ) then write (*,2002) 2002 format (5x,'PROBLEM SIZE IS TOO LARGE - ', > /5x,'NX, NY AND NZ SHOULD BE LESS THAN OR EQUAL TO ', > /5x,'ISIZ01, ISIZ02 AND ISIZ03 RESPECTIVELY') CALL MPI_ABORT( MPI_COMM_WORLD, MPI_ERR_OTHER, IERROR ) end if write(*, 1001) nx0, ny0, nz0 write(*, 1002) itmax write(*, 1003) nnodes 1000 format(//, ' NAS Parallel Benchmarks 2.2 -- LU Benchmark',/) 1001 format(' Size: ', i3, 'x', i3, 'x', i3) 1002 format(' Iterations: ', i3) 1003 format(' Number of processes: ', i5, /) end if call bcast_inputs call TAU_PROFILE_STOP(profiler); return end tau-2.16.4/examples/NPB2.3/LU/rhs.f000066400000000000000000000445601062343042700163520ustar00rootroot00000000000000 c--------------------------------------------------------------------- c--------------------------------------------------------------------- subroutine rhs c--------------------------------------------------------------------- c--------------------------------------------------------------------- c--------------------------------------------------------------------- c compute the right hand sides c--------------------------------------------------------------------- implicit none include 'applu.incl' c--------------------------------------------------------------------- c local variables c--------------------------------------------------------------------- integer profiler(2) save profiler integer i, j, k, m integer iex integer L1, L2 integer ist1, iend1 integer jst1, jend1 double precision q double precision u21, u31, u41 double precision tmp double precision u21i, u31i, u41i, u51i double precision u21j, u31j, u41j, u51j double precision u21k, u31k, u41k, u51k double precision u21im1, u31im1, u41im1, u51im1 double precision u21jm1, u31jm1, u41jm1, u51jm1 double precision u21km1, u31km1, u41km1, u51km1 call TAU_PROFILE_TIMER(profiler, 'rhs'); call TAU_PROFILE_START(profiler); do k = 1, nz do j = 1, ny do i = 1, nx do m = 1, 5 rsd(m,i,j,k) = - frct(m,i,j,k) end do end do end do end do c--------------------------------------------------------------------- c xi-direction flux differences c--------------------------------------------------------------------- c--------------------------------------------------------------------- c iex = flag : iex = 0 north/south communication c : iex = 1 east/west communication c--------------------------------------------------------------------- iex = 0 c--------------------------------------------------------------------- c communicate and receive/send two rows of data c--------------------------------------------------------------------- call exchange_3(u,iex) L1 = 0 if (north.eq.-1) L1 = 1 L2 = nx + 1 if (south.eq.-1) L2 = nx do k = 2, nz - 1 do j = jst, jend do i = L1, L2 flux(1,i,j,k) = u(2,i,j,k) u21 = u(2,i,j,k) / u(1,i,j,k) q = 0.50d+00 * ( u(2,i,j,k) * u(2,i,j,k) > + u(3,i,j,k) * u(3,i,j,k) > + u(4,i,j,k) * u(4,i,j,k) ) > / u(1,i,j,k) flux(2,i,j,k) = u(2,i,j,k) * u21 + c2 * > ( u(5,i,j,k) - q ) flux(3,i,j,k) = u(3,i,j,k) * u21 flux(4,i,j,k) = u(4,i,j,k) * u21 flux(5,i,j,k) = ( c1 * u(5,i,j,k) - c2 * q ) * u21 end do end do end do do k = 2, nz - 1 do j = jst, jend do i = ist, iend do m = 1, 5 rsd(m,i,j,k) = rsd(m,i,j,k) > - tx2 * ( flux(m,i+1,j,k) - flux(m,i-1,j,k) ) end do end do L2 = nx + 1 if (south.eq.-1) L2 = nx do i = ist, L2 tmp = 1.0d+00 / u(1,i,j,k) u21i = tmp * u(2,i,j,k) u31i = tmp * u(3,i,j,k) u41i = tmp * u(4,i,j,k) u51i = tmp * u(5,i,j,k) tmp = 1.0d+00 / u(1,i-1,j,k) u21im1 = tmp * u(2,i-1,j,k) u31im1 = tmp * u(3,i-1,j,k) u41im1 = tmp * u(4,i-1,j,k) u51im1 = tmp * u(5,i-1,j,k) flux(2,i,j,k) = (4.0d+00/3.0d+00) * tx3 * (u21i-u21im1) flux(3,i,j,k) = tx3 * ( u31i - u31im1 ) flux(4,i,j,k) = tx3 * ( u41i - u41im1 ) flux(5,i,j,k) = 0.50d+00 * ( 1.0d+00 - c1*c5 ) > * tx3 * ( ( u21i **2 + u31i **2 + u41i **2 ) > - ( u21im1**2 + u31im1**2 + u41im1**2 ) ) > + (1.0d+00/6.0d+00) > * tx3 * ( u21i**2 - u21im1**2 ) > + c1 * c5 * tx3 * ( u51i - u51im1 ) end do do i = ist, iend rsd(1,i,j,k) = rsd(1,i,j,k) > + dx1 * tx1 * ( u(1,i-1,j,k) > - 2.0d+00 * u(1,i,j,k) > + u(1,i+1,j,k) ) rsd(2,i,j,k) = rsd(2,i,j,k) > + tx3 * c3 * c4 * ( flux(2,i+1,j,k) - flux(2,i,j,k) ) > + dx2 * tx1 * ( u(2,i-1,j,k) > - 2.0d+00 * u(2,i,j,k) > + u(2,i+1,j,k) ) rsd(3,i,j,k) = rsd(3,i,j,k) > + tx3 * c3 * c4 * ( flux(3,i+1,j,k) - flux(3,i,j,k) ) > + dx3 * tx1 * ( u(3,i-1,j,k) > - 2.0d+00 * u(3,i,j,k) > + u(3,i+1,j,k) ) rsd(4,i,j,k) = rsd(4,i,j,k) > + tx3 * c3 * c4 * ( flux(4,i+1,j,k) - flux(4,i,j,k) ) > + dx4 * tx1 * ( u(4,i-1,j,k) > - 2.0d+00 * u(4,i,j,k) > + u(4,i+1,j,k) ) rsd(5,i,j,k) = rsd(5,i,j,k) > + tx3 * c3 * c4 * ( flux(5,i+1,j,k) - flux(5,i,j,k) ) > + dx5 * tx1 * ( u(5,i-1,j,k) > - 2.0d+00 * u(5,i,j,k) > + u(5,i+1,j,k) ) end do c--------------------------------------------------------------------- c Fourth-order dissipation c--------------------------------------------------------------------- IF (north.eq.-1) then do m = 1, 5 rsd(m,2,j,k) = rsd(m,2,j,k) > - dssp * ( + 5.0d+00 * u(m,2,j,k) > - 4.0d+00 * u(m,3,j,k) > + u(m,4,j,k) ) rsd(m,3,j,k) = rsd(m,3,j,k) > - dssp * ( - 4.0d+00 * u(m,2,j,k) > + 6.0d+00 * u(m,3,j,k) > - 4.0d+00 * u(m,4,j,k) > + u(m,5,j,k) ) end do END IF ist1 = 1 iend1 = nx if (north.eq.-1) ist1 = 4 if (south.eq.-1) iend1 = nx - 3 do i = ist1,iend1 do m = 1, 5 rsd(m,i,j,k) = rsd(m,i,j,k) > - dssp * ( u(m,i-2,j,k) > - 4.0d+00 * u(m,i-1,j,k) > + 6.0d+00 * u(m,i,j,k) > - 4.0d+00 * u(m,i+1,j,k) > + u(m,i+2,j,k) ) end do end do IF (south.eq.-1) then do m = 1, 5 rsd(m,nx-2,j,k) = rsd(m,nx-2,j,k) > - dssp * ( u(m,nx-4,j,k) > - 4.0d+00 * u(m,nx-3,j,k) > + 6.0d+00 * u(m,nx-2,j,k) > - 4.0d+00 * u(m,nx-1,j,k) ) rsd(m,nx-1,j,k) = rsd(m,nx-1,j,k) > - dssp * ( u(m,nx-3,j,k) > - 4.0d+00 * u(m,nx-2,j,k) > + 5.0d+00 * u(m,nx-1,j,k) ) end do END IF end do end do c--------------------------------------------------------------------- c eta-direction flux differences c--------------------------------------------------------------------- c--------------------------------------------------------------------- c iex = flag : iex = 0 north/south communication c--------------------------------------------------------------------- iex = 1 c--------------------------------------------------------------------- c communicate and receive/send two rows of data c--------------------------------------------------------------------- call exchange_3(u,iex) L1 = 0 if (west.eq.-1) L1 = 1 L2 = ny + 1 if (east.eq.-1) L2 = ny do k = 2, nz - 1 do i = ist, iend do j = L1, L2 flux(1,i,j,k) = u(3,i,j,k) u31 = u(3,i,j,k) / u(1,i,j,k) q = 0.50d+00 * ( u(2,i,j,k) * u(2,i,j,k) > + u(3,i,j,k) * u(3,i,j,k) > + u(4,i,j,k) * u(4,i,j,k) ) > / u(1,i,j,k) flux(2,i,j,k) = u(2,i,j,k) * u31 flux(3,i,j,k) = u(3,i,j,k) * u31 + c2 * (u(5,i,j,k)-q) flux(4,i,j,k) = u(4,i,j,k) * u31 flux(5,i,j,k) = ( c1 * u(5,i,j,k) - c2 * q ) * u31 end do end do end do do k = 2, nz - 1 do i = ist, iend do j = jst, jend do m = 1, 5 rsd(m,i,j,k) = rsd(m,i,j,k) > - ty2 * ( flux(m,i,j+1,k) - flux(m,i,j-1,k) ) end do end do L2 = ny + 1 if (east.eq.-1) L2 = ny do j = jst, L2 tmp = 1.0d+00 / u(1,i,j,k) u21j = tmp * u(2,i,j,k) u31j = tmp * u(3,i,j,k) u41j = tmp * u(4,i,j,k) u51j = tmp * u(5,i,j,k) tmp = 1.0d+00 / u(1,i,j-1,k) u21jm1 = tmp * u(2,i,j-1,k) u31jm1 = tmp * u(3,i,j-1,k) u41jm1 = tmp * u(4,i,j-1,k) u51jm1 = tmp * u(5,i,j-1,k) flux(2,i,j,k) = ty3 * ( u21j - u21jm1 ) flux(3,i,j,k) = (4.0d+00/3.0d+00) * ty3 * (u31j-u31jm1) flux(4,i,j,k) = ty3 * ( u41j - u41jm1 ) flux(5,i,j,k) = 0.50d+00 * ( 1.0d+00 - c1*c5 ) > * ty3 * ( ( u21j **2 + u31j **2 + u41j **2 ) > - ( u21jm1**2 + u31jm1**2 + u41jm1**2 ) ) > + (1.0d+00/6.0d+00) > * ty3 * ( u31j**2 - u31jm1**2 ) > + c1 * c5 * ty3 * ( u51j - u51jm1 ) end do do j = jst, jend rsd(1,i,j,k) = rsd(1,i,j,k) > + dy1 * ty1 * ( u(1,i,j-1,k) > - 2.0d+00 * u(1,i,j,k) > + u(1,i,j+1,k) ) rsd(2,i,j,k) = rsd(2,i,j,k) > + ty3 * c3 * c4 * ( flux(2,i,j+1,k) - flux(2,i,j,k) ) > + dy2 * ty1 * ( u(2,i,j-1,k) > - 2.0d+00 * u(2,i,j,k) > + u(2,i,j+1,k) ) rsd(3,i,j,k) = rsd(3,i,j,k) > + ty3 * c3 * c4 * ( flux(3,i,j+1,k) - flux(3,i,j,k) ) > + dy3 * ty1 * ( u(3,i,j-1,k) > - 2.0d+00 * u(3,i,j,k) > + u(3,i,j+1,k) ) rsd(4,i,j,k) = rsd(4,i,j,k) > + ty3 * c3 * c4 * ( flux(4,i,j+1,k) - flux(4,i,j,k) ) > + dy4 * ty1 * ( u(4,i,j-1,k) > - 2.0d+00 * u(4,i,j,k) > + u(4,i,j+1,k) ) rsd(5,i,j,k) = rsd(5,i,j,k) > + ty3 * c3 * c4 * ( flux(5,i,j+1,k) - flux(5,i,j,k) ) > + dy5 * ty1 * ( u(5,i,j-1,k) > - 2.0d+00 * u(5,i,j,k) > + u(5,i,j+1,k) ) end do c--------------------------------------------------------------------- c fourth-order dissipation c--------------------------------------------------------------------- IF (west.eq.-1) then do m = 1, 5 rsd(m,i,2,k) = rsd(m,i,2,k) > - dssp * ( + 5.0d+00 * u(m,i,2,k) > - 4.0d+00 * u(m,i,3,k) > + u(m,i,4,k) ) rsd(m,i,3,k) = rsd(m,i,3,k) > - dssp * ( - 4.0d+00 * u(m,i,2,k) > + 6.0d+00 * u(m,i,3,k) > - 4.0d+00 * u(m,i,4,k) > + u(m,i,5,k) ) end do END IF jst1 = 1 jend1 = ny if (west.eq.-1) jst1 = 4 if (east.eq.-1) jend1 = ny - 3 do j = jst1, jend1 do m = 1, 5 rsd(m,i,j,k) = rsd(m,i,j,k) > - dssp * ( u(m,i,j-2,k) > - 4.0d+00 * u(m,i,j-1,k) > + 6.0d+00 * u(m,i,j,k) > - 4.0d+00 * u(m,i,j+1,k) > + u(m,i,j+2,k) ) end do end do IF (east.eq.-1) then do m = 1, 5 rsd(m,i,ny-2,k) = rsd(m,i,ny-2,k) > - dssp * ( u(m,i,ny-4,k) > - 4.0d+00 * u(m,i,ny-3,k) > + 6.0d+00 * u(m,i,ny-2,k) > - 4.0d+00 * u(m,i,ny-1,k) ) rsd(m,i,ny-1,k) = rsd(m,i,ny-1,k) > - dssp * ( u(m,i,ny-3,k) > - 4.0d+00 * u(m,i,ny-2,k) > + 5.0d+00 * u(m,i,ny-1,k) ) end do END IF end do end do c--------------------------------------------------------------------- c zeta-direction flux differences c--------------------------------------------------------------------- do j = jst, jend do i = ist, iend do k = 1, nz flux(1,i,j,k) = u(4,i,j,k) u41 = u(4,i,j,k) / u(1,i,j,k) q = 0.50d+00 * ( u(2,i,j,k) * u(2,i,j,k) > + u(3,i,j,k) * u(3,i,j,k) > + u(4,i,j,k) * u(4,i,j,k) ) > / u(1,i,j,k) flux(2,i,j,k) = u(2,i,j,k) * u41 flux(3,i,j,k) = u(3,i,j,k) * u41 flux(4,i,j,k) = u(4,i,j,k) * u41 + c2 * (u(5,i,j,k)-q) flux(5,i,j,k) = ( c1 * u(5,i,j,k) - c2 * q ) * u41 end do do k = 2, nz - 1 do m = 1, 5 rsd(m,i,j,k) = rsd(m,i,j,k) > - tz2 * ( flux(m,i,j,k+1) - flux(m,i,j,k-1) ) end do end do do k = 2, nz tmp = 1.0d+00 / u(1,i,j,k) u21k = tmp * u(2,i,j,k) u31k = tmp * u(3,i,j,k) u41k = tmp * u(4,i,j,k) u51k = tmp * u(5,i,j,k) tmp = 1.0d+00 / u(1,i,j,k-1) u21km1 = tmp * u(2,i,j,k-1) u31km1 = tmp * u(3,i,j,k-1) u41km1 = tmp * u(4,i,j,k-1) u51km1 = tmp * u(5,i,j,k-1) flux(2,i,j,k) = tz3 * ( u21k - u21km1 ) flux(3,i,j,k) = tz3 * ( u31k - u31km1 ) flux(4,i,j,k) = (4.0d+00/3.0d+00) * tz3 * (u41k-u41km1) flux(5,i,j,k) = 0.50d+00 * ( 1.0d+00 - c1*c5 ) > * tz3 * ( ( u21k **2 + u31k **2 + u41k **2 ) > - ( u21km1**2 + u31km1**2 + u41km1**2 ) ) > + (1.0d+00/6.0d+00) > * tz3 * ( u41k**2 - u41km1**2 ) > + c1 * c5 * tz3 * ( u51k - u51km1 ) end do do k = 2, nz - 1 rsd(1,i,j,k) = rsd(1,i,j,k) > + dz1 * tz1 * ( u(1,i,j,k-1) > - 2.0d+00 * u(1,i,j,k) > + u(1,i,j,k+1) ) rsd(2,i,j,k) = rsd(2,i,j,k) > + tz3 * c3 * c4 * ( flux(2,i,j,k+1) - flux(2,i,j,k) ) > + dz2 * tz1 * ( u(2,i,j,k-1) > - 2.0d+00 * u(2,i,j,k) > + u(2,i,j,k+1) ) rsd(3,i,j,k) = rsd(3,i,j,k) > + tz3 * c3 * c4 * ( flux(3,i,j,k+1) - flux(3,i,j,k) ) > + dz3 * tz1 * ( u(3,i,j,k-1) > - 2.0d+00 * u(3,i,j,k) > + u(3,i,j,k+1) ) rsd(4,i,j,k) = rsd(4,i,j,k) > + tz3 * c3 * c4 * ( flux(4,i,j,k+1) - flux(4,i,j,k) ) > + dz4 * tz1 * ( u(4,i,j,k-1) > - 2.0d+00 * u(4,i,j,k) > + u(4,i,j,k+1) ) rsd(5,i,j,k) = rsd(5,i,j,k) > + tz3 * c3 * c4 * ( flux(5,i,j,k+1) - flux(5,i,j,k) ) > + dz5 * tz1 * ( u(5,i,j,k-1) > - 2.0d+00 * u(5,i,j,k) > + u(5,i,j,k+1) ) end do c--------------------------------------------------------------------- c fourth-order dissipation c--------------------------------------------------------------------- do m = 1, 5 rsd(m,i,j,2) = rsd(m,i,j,2) > - dssp * ( + 5.0d+00 * u(m,i,j,2) > - 4.0d+00 * u(m,i,j,3) > + u(m,i,j,4) ) rsd(m,i,j,3) = rsd(m,i,j,3) > - dssp * ( - 4.0d+00 * u(m,i,j,2) > + 6.0d+00 * u(m,i,j,3) > - 4.0d+00 * u(m,i,j,4) > + u(m,i,j,5) ) end do do k = 4, nz - 3 do m = 1, 5 rsd(m,i,j,k) = rsd(m,i,j,k) > - dssp * ( u(m,i,j,k-2) > - 4.0d+00 * u(m,i,j,k-1) > + 6.0d+00 * u(m,i,j,k) > - 4.0d+00 * u(m,i,j,k+1) > + u(m,i,j,k+2) ) end do end do do m = 1, 5 rsd(m,i,j,nz-2) = rsd(m,i,j,nz-2) > - dssp * ( u(m,i,j,nz-4) > - 4.0d+00 * u(m,i,j,nz-3) > + 6.0d+00 * u(m,i,j,nz-2) > - 4.0d+00 * u(m,i,j,nz-1) ) rsd(m,i,j,nz-1) = rsd(m,i,j,nz-1) > - dssp * ( u(m,i,j,nz-3) > - 4.0d+00 * u(m,i,j,nz-2) > + 5.0d+00 * u(m,i,j,nz-1) ) end do end do end do call TAU_PROFILE_STOP(profiler); return end tau-2.16.4/examples/NPB2.3/LU/setbv.f000066400000000000000000000052061062343042700166730ustar00rootroot00000000000000 c--------------------------------------------------------------------- c--------------------------------------------------------------------- subroutine setbv c--------------------------------------------------------------------- c--------------------------------------------------------------------- c--------------------------------------------------------------------- c set the boundary values of dependent variables c--------------------------------------------------------------------- implicit none include 'applu.incl' c--------------------------------------------------------------------- c local variables c--------------------------------------------------------------------- integer profiler(2) save profiler integer i, j, k integer iglob, jglob call TAU_PROFILE_TIMER(profiler, 'setbv'); call TAU_PROFILE_START(profiler); c--------------------------------------------------------------------- c set the dependent variable values along the top and bottom faces c--------------------------------------------------------------------- do j = 1, ny jglob = jpt + j do i = 1, nx iglob = ipt + i call exact( iglob, jglob, 1, u( 1, i, j, 1 ) ) call exact( iglob, jglob, nz, u( 1, i, j, nz ) ) end do end do c--------------------------------------------------------------------- c set the dependent variable values along north and south faces c--------------------------------------------------------------------- IF (west.eq.-1) then do k = 1, nz do i = 1, nx iglob = ipt + i call exact( iglob, 1, k, u( 1, i, 1, k ) ) end do end do END IF IF (east.eq.-1) then do k = 1, nz do i = 1, nx iglob = ipt + i call exact( iglob, ny0, k, u( 1, i, ny, k ) ) end do end do END IF c--------------------------------------------------------------------- c set the dependent variable values along east and west faces c--------------------------------------------------------------------- IF (north.eq.-1) then do k = 1, nz do j = 1, ny jglob = jpt + j call exact( 1, jglob, k, u( 1, 1, j, k ) ) end do end do END IF IF (south.eq.-1) then do k = 1, nz do j = 1, ny jglob = jpt + j call exact( nx0, jglob, k, u( 1, nx, j, k ) ) end do end do END IF call TAU_PROFILE_STOP(profiler); return end tau-2.16.4/examples/NPB2.3/LU/setcoeff.f000066400000000000000000000110551062343042700173450ustar00rootroot00000000000000 c--------------------------------------------------------------------- c--------------------------------------------------------------------- subroutine setcoeff c--------------------------------------------------------------------- c--------------------------------------------------------------------- implicit none include 'applu.incl' c--------------------------------------------------------------------- c local variables c--------------------------------------------------------------------- integer profiler(2) save profiler call TAU_PROFILE_TIMER(profiler, 'setcoeff'); call TAU_PROFILE_START(profiler); c--------------------------------------------------------------------- c set up coefficients c--------------------------------------------------------------------- dxi = 1.0d+00 / ( nx0 - 1 ) deta = 1.0d+00 / ( ny0 - 1 ) dzeta = 1.0d+00 / ( nz0 - 1 ) tx1 = 1.0d+00 / ( dxi * dxi ) tx2 = 1.0d+00 / ( 2.0d+00 * dxi ) tx3 = 1.0d+00 / dxi ty1 = 1.0d+00 / ( deta * deta ) ty2 = 1.0d+00 / ( 2.0d+00 * deta ) ty3 = 1.0d+00 / deta tz1 = 1.0d+00 / ( dzeta * dzeta ) tz2 = 1.0d+00 / ( 2.0d+00 * dzeta ) tz3 = 1.0d+00 / dzeta ii1 = 2 ii2 = nx0 - 1 ji1 = 2 ji2 = ny0 - 2 ki1 = 3 ki2 = nz0 - 1 c--------------------------------------------------------------------- c diffusion coefficients c--------------------------------------------------------------------- dx1 = 0.75d+00 dx2 = dx1 dx3 = dx1 dx4 = dx1 dx5 = dx1 dy1 = 0.75d+00 dy2 = dy1 dy3 = dy1 dy4 = dy1 dy5 = dy1 dz1 = 1.00d+00 dz2 = dz1 dz3 = dz1 dz4 = dz1 dz5 = dz1 c--------------------------------------------------------------------- c fourth difference dissipation c--------------------------------------------------------------------- dssp = ( max (dx1, dy1, dz1 ) ) / 4.0d+00 c--------------------------------------------------------------------- c coefficients of the exact solution to the first pde c--------------------------------------------------------------------- ce(1,1) = 2.0d+00 ce(1,2) = 0.0d+00 ce(1,3) = 0.0d+00 ce(1,4) = 4.0d+00 ce(1,5) = 5.0d+00 ce(1,6) = 3.0d+00 ce(1,7) = 5.0d-01 ce(1,8) = 2.0d-02 ce(1,9) = 1.0d-02 ce(1,10) = 3.0d-02 ce(1,11) = 5.0d-01 ce(1,12) = 4.0d-01 ce(1,13) = 3.0d-01 c--------------------------------------------------------------------- c coefficients of the exact solution to the second pde c--------------------------------------------------------------------- ce(2,1) = 1.0d+00 ce(2,2) = 0.0d+00 ce(2,3) = 0.0d+00 ce(2,4) = 0.0d+00 ce(2,5) = 1.0d+00 ce(2,6) = 2.0d+00 ce(2,7) = 3.0d+00 ce(2,8) = 1.0d-02 ce(2,9) = 3.0d-02 ce(2,10) = 2.0d-02 ce(2,11) = 4.0d-01 ce(2,12) = 3.0d-01 ce(2,13) = 5.0d-01 c--------------------------------------------------------------------- c coefficients of the exact solution to the third pde c--------------------------------------------------------------------- ce(3,1) = 2.0d+00 ce(3,2) = 2.0d+00 ce(3,3) = 0.0d+00 ce(3,4) = 0.0d+00 ce(3,5) = 0.0d+00 ce(3,6) = 2.0d+00 ce(3,7) = 3.0d+00 ce(3,8) = 4.0d-02 ce(3,9) = 3.0d-02 ce(3,10) = 5.0d-02 ce(3,11) = 3.0d-01 ce(3,12) = 5.0d-01 ce(3,13) = 4.0d-01 c--------------------------------------------------------------------- c coefficients of the exact solution to the fourth pde c--------------------------------------------------------------------- ce(4,1) = 2.0d+00 ce(4,2) = 2.0d+00 ce(4,3) = 0.0d+00 ce(4,4) = 0.0d+00 ce(4,5) = 0.0d+00 ce(4,6) = 2.0d+00 ce(4,7) = 3.0d+00 ce(4,8) = 3.0d-02 ce(4,9) = 5.0d-02 ce(4,10) = 4.0d-02 ce(4,11) = 2.0d-01 ce(4,12) = 1.0d-01 ce(4,13) = 3.0d-01 c--------------------------------------------------------------------- c coefficients of the exact solution to the fifth pde c--------------------------------------------------------------------- ce(5,1) = 5.0d+00 ce(5,2) = 4.0d+00 ce(5,3) = 3.0d+00 ce(5,4) = 2.0d+00 ce(5,5) = 1.0d-01 ce(5,6) = 4.0d-01 ce(5,7) = 3.0d-01 ce(5,8) = 5.0d-02 ce(5,9) = 4.0d-02 ce(5,10) = 3.0d-02 ce(5,11) = 1.0d-01 ce(5,12) = 3.0d-01 ce(5,13) = 2.0d-01 call TAU_PROFILE_STOP(profiler); return end tau-2.16.4/examples/NPB2.3/LU/sethyper.f000066400000000000000000000065601062343042700174170ustar00rootroot00000000000000 c--------------------------------------------------------------------- c--------------------------------------------------------------------- subroutine sethyper c--------------------------------------------------------------------- c--------------------------------------------------------------------- c--------------------------------------------------------------------- c for each column in a hyperplane, istart = first row, c--------------------------------------------------------------------- implicit none include 'applu.incl' c--------------------------------------------------------------------- c local variables c--------------------------------------------------------------------- integer profiler(2) save profiler integer i, j integer iglob, jglob integer kp call TAU_PROFILE_TIMER(profiler, 'sethyper'); call TAU_PROFILE_START(profiler); c--------------------------------------------------------------------- c compute the pointers for hyperplanes c--------------------------------------------------------------------- do kp = 2,nx0+ny0 icomms(kp) = .false. icommn(kp) = .false. icomme(kp) = .false. icommw(kp) = .false. c--------------------------------------------------------------------- c check to see if comm. to south is required c--------------------------------------------------------------------- if (south.ne.-1) then i = iend iglob = ipt + i jglob = kp - iglob j = jglob - jpt if (jglob.ge.2.and.jglob.le.ny0-1.and.j.ge.jst.and. > j.le.jend) icomms(kp) = .true. end if c--------------------------------------------------------------------- c check to see if comm. to north is required c--------------------------------------------------------------------- if (north.ne.-1) then i = ist iglob = ipt + i jglob = kp - iglob j = jglob - jpt if (jglob.ge.2.and.jglob.le.ny0-1.and.j.ge.jst.and. > j.le.jend) icommn(kp) = .true. end if c--------------------------------------------------------------------- c check to see if comm. to east is required c--------------------------------------------------------------------- if (east.ne.-1) then j = jend jglob = jpt + j iglob = kp - jglob i = iglob - ipt if (iglob.ge.2.and.iglob.le.nx0-1.and.i.ge.ist.and. > i.le.iend) icomme(kp) = .true. end if c--------------------------------------------------------------------- c check to see if comm. to west is required c--------------------------------------------------------------------- if (west.ne.-1) then j = jst jglob = jpt + j iglob = kp - jglob i = iglob - ipt if (iglob.ge.2.and.iglob.le.nx0-1.and.i.ge.ist.and. > i.le.iend) icommw(kp) = .true. end if end do icomms(1) = .false. icommn(1) = .false. icomme(1) = .false. icommw(1) = .false. icomms(nx0+ny0+1) = .false. icommn(nx0+ny0+1) = .false. icomme(nx0+ny0+1) = .false. icommw(nx0+ny0+1) = .false. call TAU_PROFILE_STOP(profiler); return end tau-2.16.4/examples/NPB2.3/LU/setiv.f000066400000000000000000000047431062343042700167070ustar00rootroot00000000000000 c--------------------------------------------------------------------- c--------------------------------------------------------------------- subroutine setiv c--------------------------------------------------------------------- c--------------------------------------------------------------------- c--------------------------------------------------------------------- c c set the initial values of independent variables based on tri-linear c interpolation of boundary values in the computational space. c c--------------------------------------------------------------------- implicit none include 'applu.incl' c--------------------------------------------------------------------- c local variables c--------------------------------------------------------------------- integer profiler(2) save profiler integer i, j, k, m integer iglob, jglob double precision xi, eta, zeta double precision pxi, peta, pzeta double precision ue_1jk(5),ue_nx0jk(5),ue_i1k(5), > ue_iny0k(5),ue_ij1(5),ue_ijnz(5) call TAU_PROFILE_TIMER(profiler, 'setiv'); call TAU_PROFILE_START(profiler); do k = 2, nz - 1 zeta = ( dble (k-1) ) / (nz-1) do j = 1, ny jglob = jpt + j IF (jglob.ne.1.and.jglob.ne.ny0) then eta = ( dble (jglob-1) ) / (ny0-1) do i = 1, nx iglob = ipt + i IF (iglob.ne.1.and.iglob.ne.nx0) then xi = ( dble (iglob-1) ) / (nx0-1) call exact (1,jglob,k,ue_1jk) call exact (nx0,jglob,k,ue_nx0jk) call exact (iglob,1,k,ue_i1k) call exact (iglob,ny0,k,ue_iny0k) call exact (iglob,jglob,1,ue_ij1) call exact (iglob,jglob,nz,ue_ijnz) do m = 1, 5 pxi = ( 1.0d+00 - xi ) * ue_1jk(m) > + xi * ue_nx0jk(m) peta = ( 1.0d+00 - eta ) * ue_i1k(m) > + eta * ue_iny0k(m) pzeta = ( 1.0d+00 - zeta ) * ue_ij1(m) > + zeta * ue_ijnz(m) u( m, i, j, k ) = pxi + peta + pzeta > - pxi * peta - peta * pzeta - pzeta * pxi > + pxi * peta * pzeta end do END IF end do END IF end do end do call TAU_PROFILE_STOP(profiler); return end tau-2.16.4/examples/NPB2.3/LU/ssor.f000066400000000000000000000220601062343042700165330ustar00rootroot00000000000000c--------------------------------------------------------------------- c--------------------------------------------------------------------- subroutine ssor c--------------------------------------------------------------------- c--------------------------------------------------------------------- c--------------------------------------------------------------------- c to perform pseudo-time stepping SSOR iterations c for five nonlinear pde's. c--------------------------------------------------------------------- implicit none include 'mpinpb.h' include 'applu.incl' c--------------------------------------------------------------------- c local variables c--------------------------------------------------------------------- integer profiler(2) save profiler integer i, j, k, m integer istep double precision tmp double precision delunm(5), tv(5,isiz1,isiz2) external timer_read double precision wtime, timer_read integer IERROR call TAU_PROFILE_TIMER(profiler, 'ssor'); call TAU_PROFILE_START(profiler); ROOT = 0 c--------------------------------------------------------------------- c begin pseudo-time stepping iterations c--------------------------------------------------------------------- tmp = 1.0d+00 / ( omega * ( 2.0d+00 - omega ) ) c--------------------------------------------------------------------- c initialize a,b,c,d to zero (guarantees that page tables have been c formed, if applicable on given architecture, before timestepping). c--------------------------------------------------------------------- do m=1,isiz2 do k=1,isiz1 do j=1,5 do i=1,5 a(i,j,k,m) = 0.d0 b(i,j,k,m) = 0.d0 c(i,j,k,m) = 0.d0 d(i,j,k,m) = 0.d0 enddo enddo enddo enddo c--------------------------------------------------------------------- c compute the steady-state residuals c--------------------------------------------------------------------- call rhs c--------------------------------------------------------------------- c compute the L2 norms of newton iteration residuals c--------------------------------------------------------------------- call l2norm( isiz1, isiz2, isiz3, nx0, ny0, nz0, > ist, iend, jst, jend, > rsd, rsdnm ) c if ( ipr .eq. 1 .and. id .eq. 0 ) then c write (*,*) ' Initial residual norms' c write (*,*) c write (*,1007) ( rsdnm(m), m = 1, 5 ) c write (*,'(/a)') 'Iteration RMS-residual of 5th PDE' c end if call MPI_BARRIER( MPI_COMM_WORLD, IERROR ) call timer_clear(1) call timer_start(1) c--------------------------------------------------------------------- c the timestep loop c--------------------------------------------------------------------- do istep = 1, itmax c if ( ( mod ( istep, inorm ) .eq. 0 ) .and. c > ( ipr .eq. 1 .and. id .eq. 0 ) ) then c write ( *, 1001 ) istep c end if if (id .eq. 0) then if (mod ( istep, 20) .eq. 0 .or. > istep .eq. itmax .or. > istep .eq. 1) then write( *, 200) istep 200 format(' Time step ', i4) endif endif c--------------------------------------------------------------------- c perform SSOR iteration c--------------------------------------------------------------------- do k = 2, nz - 1 do j = jst, jend do i = ist, iend do m = 1, 5 rsd(m,i,j,k) = dt * rsd(m,i,j,k) end do end do end do end do DO k = 2, nz -1 c--------------------------------------------------------------------- c form the lower triangular part of the jacobian matrix c--------------------------------------------------------------------- call jacld(k) c--------------------------------------------------------------------- c perform the lower triangular solution c--------------------------------------------------------------------- call blts( isiz1, isiz2, isiz3, > nx, ny, nz, k, > omega, > rsd, > a, b, c, d, > ist, iend, jst, jend, > nx0, ny0, ipt, jpt) END DO DO k = nz - 1, 2, -1 c--------------------------------------------------------------------- c form the strictly upper triangular part of the jacobian matrix c--------------------------------------------------------------------- call jacu(k) c--------------------------------------------------------------------- c perform the upper triangular solution c--------------------------------------------------------------------- call buts( isiz1, isiz2, isiz3, > nx, ny, nz, k, > omega, > rsd, tv, > d, a, b, c, > ist, iend, jst, jend, > nx0, ny0, ipt, jpt) END DO c--------------------------------------------------------------------- c update the variables c--------------------------------------------------------------------- do k = 2, nz-1 do j = jst, jend do i = ist, iend do m = 1, 5 u( m, i, j, k ) = u( m, i, j, k ) > + tmp * rsd( m, i, j, k ) end do end do end do end do c--------------------------------------------------------------------- c compute the max-norms of newton iteration corrections c--------------------------------------------------------------------- if ( mod ( istep, inorm ) .eq. 0 ) then call l2norm( isiz1, isiz2, isiz3, nx0, ny0, nz0, > ist, iend, jst, jend, > rsd, delunm ) c if ( ipr .eq. 1 .and. id .eq. 0 ) then c write (*,1006) ( delunm(m), m = 1, 5 ) c else if ( ipr .eq. 2 .and. id .eq. 0 ) then c write (*,'(i5,f15.6)') istep,delunm(5) c end if end if c--------------------------------------------------------------------- c compute the steady-state residuals c--------------------------------------------------------------------- call rhs c--------------------------------------------------------------------- c compute the max-norms of newton iteration residuals c--------------------------------------------------------------------- if ( ( mod ( istep, inorm ) .eq. 0 ) .or. > ( istep .eq. itmax ) ) then call l2norm( isiz1, isiz2, isiz3, nx0, ny0, nz0, > ist, iend, jst, jend, > rsd, rsdnm ) c if ( ipr .eq. 1.and.id.eq.0 ) then c write (*,1007) ( rsdnm(m), m = 1, 5 ) c end if end if c--------------------------------------------------------------------- c check the newton-iteration residuals against the tolerance levels c--------------------------------------------------------------------- if ( ( rsdnm(1) .lt. tolrsd(1) ) .and. > ( rsdnm(2) .lt. tolrsd(2) ) .and. > ( rsdnm(3) .lt. tolrsd(3) ) .and. > ( rsdnm(4) .lt. tolrsd(4) ) .and. > ( rsdnm(5) .lt. tolrsd(5) ) ) then c if (ipr .eq. 1 .and. id.eq.0) then c write (*,1004) istep c end if return end if end do call timer_stop(1) wtime = timer_read(1) call MPI_ALLREDUCE( wtime, > maxtime, > 1, > MPI_DOUBLE_PRECISION, > MPI_MAX, > MPI_COMM_WORLD, > IERROR ) call TAU_PROFILE_STOP(profiler); return 1001 format (1x/5x,'pseudo-time SSOR iteration no.=',i4/) 1004 format (1x/1x,'convergence was achieved after ',i4, > ' pseudo-time steps' ) 1006 format (1x/1x,'RMS-norm of SSOR-iteration correction ', > 'for first pde = ',1pe12.5/, > 1x,'RMS-norm of SSOR-iteration correction ', > 'for second pde = ',1pe12.5/, > 1x,'RMS-norm of SSOR-iteration correction ', > 'for third pde = ',1pe12.5/, > 1x,'RMS-norm of SSOR-iteration correction ', > 'for fourth pde = ',1pe12.5/, > 1x,'RMS-norm of SSOR-iteration correction ', > 'for fifth pde = ',1pe12.5) 1007 format (1x/1x,'RMS-norm of steady-state residual for ', > 'first pde = ',1pe12.5/, > 1x,'RMS-norm of steady-state residual for ', > 'second pde = ',1pe12.5/, > 1x,'RMS-norm of steady-state residual for ', > 'third pde = ',1pe12.5/, > 1x,'RMS-norm of steady-state residual for ', > 'fourth pde = ',1pe12.5/, > 1x,'RMS-norm of steady-state residual for ', > 'fifth pde = ',1pe12.5) end tau-2.16.4/examples/NPB2.3/LU/subdomain.f000066400000000000000000000065751062343042700175430ustar00rootroot00000000000000 c--------------------------------------------------------------------- c--------------------------------------------------------------------- subroutine subdomain c--------------------------------------------------------------------- c--------------------------------------------------------------------- implicit none include 'mpinpb.h' include 'applu.incl' c--------------------------------------------------------------------- c local variables c--------------------------------------------------------------------- integer profiler(2) save profiler integer mm, ierror, errorcode call TAU_PROFILE_TIMER(profiler, 'subdomain'); call TAU_PROFILE_START(profiler); c--------------------------------------------------------------------- c c set up the sub-domain sizes c c--------------------------------------------------------------------- c--------------------------------------------------------------------- c x dimension c--------------------------------------------------------------------- mm = mod(nx0,xdim) if (row.le.mm) then nx = nx0/xdim + 1 ipt = (row-1)*nx else nx = nx0/xdim ipt = (row-1)*nx + mm end if c--------------------------------------------------------------------- c y dimension c--------------------------------------------------------------------- mm = mod(ny0,ydim) if (col.le.mm) then ny = ny0/ydim + 1 jpt = (col-1)*ny else ny = ny0/ydim jpt = (col-1)*ny + mm end if c--------------------------------------------------------------------- c z dimension c--------------------------------------------------------------------- nz = nz0 c--------------------------------------------------------------------- c check the sub-domain size c--------------------------------------------------------------------- if ( ( nx .lt. 4 ) .or. > ( ny .lt. 4 ) .or. > ( nz .lt. 4 ) ) then write (*,2001) nx, ny, nz 2001 format (5x,'SUBDOMAIN SIZE IS TOO SMALL - ', > /5x,'ADJUST PROBLEM SIZE OR NUMBER OF PROCESSORS', > /5x,'SO THAT NX, NY AND NZ ARE GREATER THAN OR EQUAL', > /5x,'TO 4 THEY ARE CURRENTLY', 3I3) CALL MPI_ABORT( MPI_COMM_WORLD, > ERRORCODE, > IERROR ) end if if ( ( nx .gt. isiz1 ) .or. > ( ny .gt. isiz2 ) .or. > ( nz .gt. isiz3 ) ) then write (*,2002) nx, ny, nz 2002 format (5x,'SUBDOMAIN SIZE IS TOO LARGE - ', > /5x,'ADJUST PROBLEM SIZE OR NUMBER OF PROCESSORS', > /5x,'SO THAT NX, NY AND NZ ARE LESS THAN OR EQUAL TO ', > /5x,'ISIZ1, ISIZ2 AND ISIZ3 RESPECTIVELY. THEY ARE', > /5x,'CURRENTLY', 3I4) CALL MPI_ABORT( MPI_COMM_WORLD, > ERRORCODE, > IERROR ) end if c--------------------------------------------------------------------- c set up the start and end in i and j extents for all processors c--------------------------------------------------------------------- ist = 1 iend = nx if (north.eq.-1) ist = 2 if (south.eq.-1) iend = nx - 1 jst = 1 jend = ny if (west.eq.-1) jst = 2 if (east.eq.-1) jend = ny - 1 call TAU_PROFILE_STOP(profiler); return end tau-2.16.4/examples/NPB2.3/LU/verify.f000066400000000000000000000305321062343042700170540ustar00rootroot00000000000000 c--------------------------------------------------------------------- c--------------------------------------------------------------------- subroutine verify(xcr, xce, xci, class, verified) c--------------------------------------------------------------------- c--------------------------------------------------------------------- c--------------------------------------------------------------------- c verification routine c--------------------------------------------------------------------- implicit none include 'mpinpb.h' include 'applu.incl' integer profiler(2) save profiler double precision xcr(5), xce(5), xci double precision xcrref(5),xceref(5),xciref, > xcrdif(5),xcedif(5),xcidif, > epsilon, dtref integer m character class logical verified c--------------------------------------------------------------------- c tolerance level c--------------------------------------------------------------------- call TAU_PROFILE_TIMER(profiler, 'verify'); call TAU_PROFILE_START(profiler); epsilon = 1.0d-08 class = 'U' verified = .true. do m = 1,5 xcrref(m) = 1.0 xceref(m) = 1.0 end do xciref = 1.0 if ( (nx0 .eq. 12 ) .and. > (ny0 .eq. 12 ) .and. > (nz0 .eq. 12 ) .and. > (itmax .eq. 50 )) then class = 'S' dtref = 5.0d-1 c--------------------------------------------------------------------- c Reference values of RMS-norms of residual, for the (12X12X12) grid, c after 50 time steps, with DT = 5.0d-01 c--------------------------------------------------------------------- xcrref(1) = 1.6196343210976702d-02 xcrref(2) = 2.1976745164821318d-03 xcrref(3) = 1.5179927653399185d-03 xcrref(4) = 1.5029584435994323d-03 xcrref(5) = 3.4264073155896461d-02 c--------------------------------------------------------------------- c Reference values of RMS-norms of solution error, for the (12X12X12) grid, c after 50 time steps, with DT = 5.0d-01 c--------------------------------------------------------------------- xceref(1) = 6.4223319957960924d-04 xceref(2) = 8.4144342047347926d-05 xceref(3) = 5.8588269616485186d-05 xceref(4) = 5.8474222595157350d-05 xceref(5) = 1.3103347914111294d-03 c--------------------------------------------------------------------- c Reference value of surface integral, for the (12X12X12) grid, c after 50 time steps, with DT = 5.0d-01 c--------------------------------------------------------------------- xciref = 7.8418928865937083d+00 elseif ( (nx0 .eq. 33) .and. > (ny0 .eq. 33) .and. > (nz0 .eq. 33) .and. > (itmax . eq. 300) ) then class = 'W' !SPEC95fp size dtref = 1.5d-3 c--------------------------------------------------------------------- c Reference values of RMS-norms of residual, for the (33x33x33) grid, c after 300 time steps, with DT = 1.5d-3 c--------------------------------------------------------------------- xcrref(1) = 0.1236511638192d+02 xcrref(2) = 0.1317228477799d+01 xcrref(3) = 0.2550120713095d+01 xcrref(4) = 0.2326187750252d+01 xcrref(5) = 0.2826799444189d+02 c--------------------------------------------------------------------- c Reference values of RMS-norms of solution error, for the (33X33X33) grid, c--------------------------------------------------------------------- xceref(1) = 0.4867877144216d+00 xceref(2) = 0.5064652880982d-01 xceref(3) = 0.9281818101960d-01 xceref(4) = 0.8570126542733d-01 xceref(5) = 0.1084277417792d+01 c--------------------------------------------------------------------- c Reference value of surface integral, for the (33X33X33) grid, c after 300 time steps, with DT = 1.5d-3 c--------------------------------------------------------------------- xciref = 0.1161399311023d+02 elseif ( (nx0 .eq. 64) .and. > (ny0 .eq. 64) .and. > (nz0 .eq. 64) .and. > (itmax . eq. 250) ) then class = 'A' dtref = 2.0d+0 c--------------------------------------------------------------------- c Reference values of RMS-norms of residual, for the (64X64X64) grid, c after 250 time steps, with DT = 2.0d+00 c--------------------------------------------------------------------- xcrref(1) = 7.7902107606689367d+02 xcrref(2) = 6.3402765259692870d+01 xcrref(3) = 1.9499249727292479d+02 xcrref(4) = 1.7845301160418537d+02 xcrref(5) = 1.8384760349464247d+03 c--------------------------------------------------------------------- c Reference values of RMS-norms of solution error, for the (64X64X64) grid, c after 250 time steps, with DT = 2.0d+00 c--------------------------------------------------------------------- xceref(1) = 2.9964085685471943d+01 xceref(2) = 2.8194576365003349d+00 xceref(3) = 7.3473412698774742d+00 xceref(4) = 6.7139225687777051d+00 xceref(5) = 7.0715315688392578d+01 c--------------------------------------------------------------------- c Reference value of surface integral, for the (64X64X64) grid, c after 250 time steps, with DT = 2.0d+00 c--------------------------------------------------------------------- xciref = 2.6030925604886277d+01 elseif ( (nx0 .eq. 102) .and. > (ny0 .eq. 102) .and. > (nz0 .eq. 102) .and. > (itmax . eq. 250) ) then class = 'B' dtref = 2.0d+0 c--------------------------------------------------------------------- c Reference values of RMS-norms of residual, for the (102X102X102) grid, c after 250 time steps, with DT = 2.0d+00 c--------------------------------------------------------------------- xcrref(1) = 3.5532672969982736d+03 xcrref(2) = 2.6214750795310692d+02 xcrref(3) = 8.8333721850952190d+02 xcrref(4) = 7.7812774739425265d+02 xcrref(5) = 7.3087969592545314d+03 c--------------------------------------------------------------------- c Reference values of RMS-norms of solution error, for the (102X102X102) c grid, after 250 time steps, with DT = 2.0d+00 c--------------------------------------------------------------------- xceref(1) = 1.1401176380212709d+02 xceref(2) = 8.1098963655421574d+00 xceref(3) = 2.8480597317698308d+01 xceref(4) = 2.5905394567832939d+01 xceref(5) = 2.6054907504857413d+02 c--------------------------------------------------------------------- c Reference value of surface integral, for the (102X102X102) grid, c after 250 time steps, with DT = 2.0d+00 c--------------------------------------------------------------------- xciref = 4.7887162703308227d+01 elseif ( (nx0 .eq. 162) .and. > (ny0 .eq. 162) .and. > (nz0 .eq. 162) .and. > (itmax . eq. 250) ) then class = 'C' dtref = 2.0d+0 c--------------------------------------------------------------------- c Reference values of RMS-norms of residual, for the (162X162X162) grid, c after 250 time steps, with DT = 2.0d+00 c--------------------------------------------------------------------- xcrref(1) = 1.03766980323537846d+04 xcrref(2) = 8.92212458801008552d+02 xcrref(3) = 2.56238814582660871d+03 xcrref(4) = 2.19194343857831427d+03 xcrref(5) = 1.78078057261061185d+04 c--------------------------------------------------------------------- c Reference values of RMS-norms of solution error, for the (162X162X162) c grid, after 250 time steps, with DT = 2.0d+00 c--------------------------------------------------------------------- xceref(1) = 2.15986399716949279d+02 xceref(2) = 1.55789559239863600d+01 xceref(3) = 5.41318863077207766d+01 xceref(4) = 4.82262643154045421d+01 xceref(5) = 4.55902910043250358d+02 c--------------------------------------------------------------------- c Reference value of surface integral, for the (162X162X162) grid, c after 250 time steps, with DT = 2.0d+00 c--------------------------------------------------------------------- xciref = 6.66404553572181300d+01 else verified = .FALSE. endif c--------------------------------------------------------------------- c verification test for residuals if gridsize is either 12X12X12 or c 64X64X64 or 102X102X102 or 162X162X162 c--------------------------------------------------------------------- c--------------------------------------------------------------------- c Compute the difference of solution values and the known reference values. c--------------------------------------------------------------------- do m = 1, 5 xcrdif(m) = dabs((xcr(m)-xcrref(m))/xcrref(m)) xcedif(m) = dabs((xce(m)-xceref(m))/xceref(m)) enddo xcidif = dabs((xci - xciref)/xciref) c--------------------------------------------------------------------- c Output the comparison of computed results to known cases. c--------------------------------------------------------------------- if (class .ne. 'U') then write(*, 1990) class 1990 format(/, ' Verification being performed for class ', a) write (*,2000) epsilon 2000 format(' Accuracy setting for epsilon = ', E20.13) if (dabs(dt-dtref) .gt. epsilon) then verified = .false. class = 'U' write (*,1000) dtref 1000 format(' DT does not match the reference value of ', > E15.8) endif else write(*, 1995) 1995 format(' Unknown class') endif if (class .ne. 'U') then write (*,2001) else write (*, 2005) endif 2001 format(' Comparison of RMS-norms of residual') 2005 format(' RMS-norms of residual') do m = 1, 5 if (class .eq. 'U') then write(*, 2015) m, xcr(m) else if (xcrdif(m) .gt. epsilon) then verified = .false. write (*,2010) m,xcr(m),xcrref(m),xcrdif(m) else write (*,2011) m,xcr(m),xcrref(m),xcrdif(m) endif enddo if (class .ne. 'U') then write (*,2002) else write (*,2006) endif 2002 format(' Comparison of RMS-norms of solution error') 2006 format(' RMS-norms of solution error') do m = 1, 5 if (class .eq. 'U') then write(*, 2015) m, xce(m) else if (xcedif(m) .gt. epsilon) then verified = .false. write (*,2010) m,xce(m),xceref(m),xcedif(m) else write (*,2011) m,xce(m),xceref(m),xcedif(m) endif enddo 2010 format(' FAILURE: ', i2, 2x, E20.13, E20.13, E20.13) 2011 format(' ', i2, 2x, E20.13, E20.13, E20.13) 2015 format(' ', i2, 2x, E20.13) if (class .ne. 'U') then write (*,2025) else write (*,2026) endif 2025 format(' Comparison of surface integral') 2026 format(' Surface integral') if (class .eq. 'U') then write(*, 2030) xci else if (xcidif .gt. epsilon) then verified = .false. write(*, 2031) xci, xciref, xcidif else write(*, 2032) xci, xciref, xcidif endif 2030 format(' ', 4x, E20.13) 2031 format(' FAILURE: ', 4x, E20.13, E20.13, E20.13) 2032 format(' ', 4x, E20.13, E20.13, E20.13) if (class .eq. 'U') then write(*, 2022) write(*, 2023) 2022 format(' No reference values provided') 2023 format(' No verification performed') else if (verified) then write(*, 2020) 2020 format(' Verification Successful') else write(*, 2021) 2021 format(' Verification failed') endif call TAU_PROFILE_STOP(profiler); return end tau-2.16.4/examples/NPB2.3/MPI_dummy/000077500000000000000000000000001062343042700167165ustar00rootroot00000000000000tau-2.16.4/examples/NPB2.3/MPI_dummy/Makefile000066400000000000000000000014721062343042700203620ustar00rootroot00000000000000# Makefile for MPI dummy library. # Must be edited for a specific machine. Does NOT read in # the make.def file of NPB 2.3 # Enable if either Cray or IBM: (no such flag for most machines: see wtime.h) # MACHINE = -DCRAY # MACHINE = -DIBM libmpi.a: mpi_dummy.o mpi_dummy_c.o wtime.o ar r libmpi.a mpi_dummy.o mpi_dummy_c.o wtime.o mpi_dummy.o: mpi_dummy.f mpif.h f77 -c mpi_dummy.f # For a Cray C90, try: # cf77 -dp -c mpi_dummy.f # For an IBM 590, try: # xlf -c mpi_dummy.f mpi_dummy_c.o: mpi_dummy.c mpi.h cc -c ${MACHINE} -o mpi_dummy_c.o mpi_dummy.c wtime.o: wtime.c # For most machines or CRAY or IBM cc -c ${MACHINE} wtime.c # For a precise timer on an SGI Power Challenge, try: # cc -o wtime.o -c wtime_sgi64.c test: test.f f77 -o test -I. test.f -L. -lmpi clean: - rm -f *~ *.o - rm -f test libmpi.a tau-2.16.4/examples/NPB2.3/MPI_dummy/README000066400000000000000000000044661062343042700176100ustar00rootroot00000000000000###################################### # NAS Parallel Benchmarks 2 # # MPI/F77/C # # Revision 2.3 10/30/97 # # NASA Ames Research Center # # npb@nas.nasa.gov # # http://www.nas.nasa.gov/NAS/NPB/ # ###################################### MPI Dummy Library The MPI dummy library is supplied as a convenience for people who do not have an MPI library but would like to try running on one processor anyway. The NPB 2.x benchmarks are designed so that they do not actually try to do any message passing when run on one node. The MPI dummy library is just that - a set of dummy MPI routines which don't do anything, but allow you to link the benchmarks. Actually they do a few things, but nothing important. Note that the dummy library is sufficient only for the NPB 2.x benchmarks. It probably won't be useful for anything else because it implements only a handful of functions. Because the dummy library is just an extra goody, and since we don't have an infinite amount of time, it may be a bit trickier to configure than the rest of the benchmarks. You need to: 1. Find out how C and Fortran interact on your machine. On most machines, the fortran functon foo(x) is declared in C as foo_(xp) where xp is a pointer, not a value. On IBMs, it's just foo(xp). On Cray C90s, its FOO(xp). You can define CRAY or IBM to get these, or you need to edit wtime.c if you've got something else. 2. Edit the Makefile to compile mpi_dummy.f and wtime.c correctly for your machine (including -DCRAY or -DIBM if necessary). 3. The substitute MPI timer gives wall clock time, not CPU time. If you're running on a timeshared machine, you may want to use a CPU timer. Edit the function mpi_wtime() in mpi_dummy.f to change this timer. (NOTE: for official benchmark results, ONLY wall clock times are valid. Using a CPU timer is ok if you want to get things running, but don't report any results measured with a CPU timer. ) TROUBLESHOOTING o Compiling or linking of the benchmark aborts because the dummy MPI header file or the dummy MPI library cannot be found. - the file make.dummy in subdirectory config relies on the use of the -I"path" and -L"path" -l"library" constructs to pass information to the compilers and linkers. Edit this file to conform to your system. tau-2.16.4/examples/NPB2.3/MPI_dummy/mpi.h000066400000000000000000000055531062343042700176640ustar00rootroot00000000000000#define MPI_DOUBLE 1 #define MPI_INT 2 #define MPI_BYTE 3 #define MPI_FLOAT 4 #define MPI_COMM_WORLD 0 #define MPI_MAX 1 #define MPI_SUM 2 #define MPI_MIN 3 #define MPI_SUCCESS 0 #define MPI_ANY_SOURCE -1 #define MPI_ERR_OTHER -1 #define MPI_STATUS_SIZE 3 double MPI_Wtime(); /* Status object. It is the only user-visible MPI data-structure The "count" field is PRIVATE; use MPI_Get_count to access it. */ typedef struct { int count; int MPI_SOURCE; int MPI_TAG; int MPI_ERROR; } MPI_Status; /* MPI request objects */ typedef int MPI_Request; /* MPI datatype */ typedef int MPI_Datatype; /* MPI comm */ typedef int MPI_Comm; /* MPI operation */ typedef int MPI_Op; /* Prototypes: */ void mpi_error( void ); int MPI_Irecv( void *buf, int count, MPI_Datatype datatype, int source, int tag, MPI_Comm comm, MPI_Request *request ); int MPI_Send( void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm ); int MPI_Wait( MPI_Request *request, MPI_Status *status ); int MPI_Init( int *argc, char ***argv ); int MPI_Comm_rank( MPI_Comm comm, int *rank ); int MPI_Comm_size( MPI_Comm comm, int *size ); double MPI_Wtime( void ); int MPI_Barrier( MPI_Comm comm ); int MPI_Finalize( void ); int MPI_Allreduce( void *sendbuf, void *recvbuf, int nitems, MPI_Datatype type, MPI_Op op, MPI_Comm comm ); int MPI_Reduce( void *sendbuf, void *recvbuf, int nitems, MPI_Datatype type, MPI_Op op, int root, MPI_Comm comm ); int MPI_Alltoall( void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPI_Comm comm ); int MPI_Alltoallv( void *sendbuf, int *sendcounts, int *senddispl, MPI_Datatype sendtype, void *recvbuf, int *recvcounts, int *recvdispl, MPI_Datatype recvtype, MPI_Comm comm ); tau-2.16.4/examples/NPB2.3/MPI_dummy/mpi_dummy.c000066400000000000000000000103471062343042700210670ustar00rootroot00000000000000#include "mpi.h" #include "wtime.h" #include void mpi_error( void ) { printf( "mpi_error called\n" ); abort(); } int MPI_Irecv( void *buf, int count, MPI_Datatype datatype, int source, int tag, MPI_Comm comm, MPI_Request *request ) { mpi_error(); return( MPI_ERR_OTHER ); } int MPI_Send( void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm ) { mpi_error(); return( MPI_ERR_OTHER ); } int MPI_Wait( MPI_Request *request, MPI_Status *status ) { mpi_error(); return( MPI_ERR_OTHER ); } int MPI_Init( int *argc, char ***argv ) { return( MPI_SUCCESS ); } int MPI_Comm_rank( MPI_Comm comm, int *rank ) { *rank = 0; return( MPI_SUCCESS ); } int MPI_Comm_size( MPI_Comm comm, int *size ) { *size = 1; return( MPI_SUCCESS ); } double MPI_Wtime( void ) { void wtime(); double t; wtime( &t ); return( t ); } int MPI_Barrier( MPI_Comm comm ) { return( MPI_SUCCESS ); } int MPI_Finalize( void ) { return( MPI_SUCCESS ); } int MPI_Allreduce( void *sendbuf, void *recvbuf, int nitems, MPI_Datatype type, MPI_Op op, MPI_Comm comm ) { int i; if( type == MPI_INT ) { int *pd_sendbuf, *pd_recvbuf; pd_sendbuf = (int *) sendbuf; pd_recvbuf = (int *) recvbuf; for( i=0; i mpi_double_precision, mpi_complex, > mpi_double_complex parameter (mpi_double_precision = 1, $ mpi_integer = 2, $ mpi_byte = 3, $ mpi_real= 4, $ mpi_complex = 5, $ mpi_double_complex = 6) integer mpi_any_source parameter (mpi_any_source = -1) integer mpi_err_other parameter (mpi_err_other = -1) double precision mpi_wtime external mpi_wtime integer mpi_status_size parameter (mpi_status_size=3) tau-2.16.4/examples/NPB2.3/MPI_dummy/test.f000066400000000000000000000003051062343042700200420ustar00rootroot00000000000000 program implicit none double precision t, mpi_wtime external mpi_wtime t = 0.0 t = mpi_wtime() print *, t t = mpi_wtime() print *, t end tau-2.16.4/examples/NPB2.3/MPI_dummy/wtime.c000066400000000000000000000003441062343042700202100ustar00rootroot00000000000000#include "wtime.h" #include void wtime(double *t) { static int sec = -1; struct timeval tv; gettimeofday(&tv, (void *)0); if (sec < 0) sec = tv.tv_sec; *t = (tv.tv_sec - sec) + 1.0e-6*tv.tv_usec; } tau-2.16.4/examples/NPB2.3/MPI_dummy/wtime.f000066400000000000000000000002221062343042700202060ustar00rootroot00000000000000 subroutine wtime(tim) real*8 tim dimension tarray(2) call etime(tarray) tim = tarray(1) return end tau-2.16.4/examples/NPB2.3/MPI_dummy/wtime.h000066400000000000000000000003201062343042700202070ustar00rootroot00000000000000/* C/Fortran interface is different on different machines. * You may need to tweak this. */ #if defined(IBM) #define wtime wtime #elif defined(CRAY) #define wtime WTIME #else #define wtime wtime_ #endif tau-2.16.4/examples/NPB2.3/MPI_dummy/wtime_sgi64.c000066400000000000000000000032441062343042700212260ustar00rootroot00000000000000#include #include #include #include #include #include #include /* The following works on SGI Power Challenge systems */ typedef unsigned long iotimer_t; unsigned int cycleval; volatile iotimer_t *iotimer_addr, base_counter; double resolution; /* address_t is an integer type big enough to hold an address */ typedef unsigned long address_t; void timer_init() { int fd; char *virt_addr; address_t phys_addr, page_offset, pagemask, pagebase_addr; pagemask = getpagesize() - 1; errno = 0; phys_addr = syssgi(SGI_QUERY_CYCLECNTR, &cycleval); if (errno != 0) { perror("SGI_QUERY_CYCLECNTR"); exit(1); } /* rel_addr = page offset of physical address */ page_offset = phys_addr & pagemask; pagebase_addr = phys_addr - page_offset; fd = open("/dev/mmem", O_RDONLY); virt_addr = mmap(0, pagemask, PROT_READ, MAP_PRIVATE, fd, pagebase_addr); virt_addr = virt_addr + page_offset; iotimer_addr = (iotimer_t *)virt_addr; /* cycleval in picoseconds to this gives resolution in seconds */ resolution = 1.0e-12*cycleval; base_counter = *iotimer_addr; } void wtime_(double *time) { static int initialized = 0; volatile iotimer_t counter_value; if (!initialized) { timer_init(); initialized = 1; } counter_value = *iotimer_addr - base_counter; *time = (double)counter_value * resolution; } void wtime(double *time) { static int initialized = 0; volatile iotimer_t counter_value; if (!initialized) { timer_init(); initialized = 1; } counter_value = *iotimer_addr - base_counter; *time = (double)counter_value * resolution; } tau-2.16.4/examples/NPB2.3/Makefile000066400000000000000000000026311062343042700165200ustar00rootroot00000000000000SHELL=/bin/sh CLASS=W NPROCS=1 SFILE=config/suite.def taudefault: suite install : suite default: header @ sys/print_instructions BT: bt bt: header cd BT; $(MAKE) NPROCS=$(NPROCS) CLASS=$(CLASS) SP: sp sp: header cd SP; $(MAKE) NPROCS=$(NPROCS) CLASS=$(CLASS) LU: lu lu: header cd LU; $(MAKE) NPROCS=$(NPROCS) CLASS=$(CLASS) MG: mg mg: header cd MG; $(MAKE) NPROCS=$(NPROCS) CLASS=$(CLASS) FT: ft ft: header cd FT; $(MAKE) NPROCS=$(NPROCS) CLASS=$(CLASS) IS: is is: header cd IS; $(MAKE) NPROCS=$(NPROCS) CLASS=$(CLASS) CG: cg cg: header cd CG; $(MAKE) NPROCS=$(NPROCS) CLASS=$(CLASS) EP: ep ep: header cd EP; $(MAKE) NPROCS=$(NPROCS) CLASS=$(CLASS) # Awk script courtesy cmg@cray.com suite: @ awk '{ if ($$1 !~ /^#/ && NF > 0) \ printf "make %s CLASS=%s NPROCS=%d\n", $$1, $$2, $$3 }' $(SFILE) \ | $(SHELL) # It would be nice to make clean in each subdirectory (the targets # are defined) but on a really clean system this will won't work # because those makefiles need config/make.def clean: - rm -f core - rm -f *~ */core */*~ */*.o */npbparams.h */*.obj */*.exe - rm -f MPI_dummy/test MPI_dummy/libmpi.a - rm -f sys/setparams sys/makesuite sys/setparams.h veryclean: clean - rm config/make.def config/suite.def Part* - rm bin/sp.* bin/lu.* bin/mg.* bin/ft.* bin/bt.* bin/is.* bin/ep.* bin/cg.* header: @ sys/print_header kit: - makekit -s100k -k30 * */* */*/* tau-2.16.4/examples/NPB2.3/README000066400000000000000000000074401062343042700157430ustar00rootroot00000000000000###################################### # NAS Parallel Benchmarks 2 # # MPI/F77/C # # Revision 2.3 10/30/97 # # NASA Ames Research Center # # npb@nas.nasa.gov # # http://www.nas.nasa.gov/NAS/NPB/ # ###################################### ========================================== INSTALLATION FOR TAU Users: % make suite % cd bin % mpirun -np 4 lu.W.4 For documentation on installing and running the NAS Parallel Benchmarks, refer to subdirectory Doc. ========================================== BACKGROUND Information on NPB 2.3, including the technical report, the original specifications, source code, results and information on how to submit new results, is available at: http://www.nas.nasa.gov/NAS/NPB/ Send comments or suggestions to npb@nas.nasa.gov Send bug reports to npb-bugs@nas.nasa.gov NAS Parallel Benchmarks Group NASA Ames Research Center Mail Stop: T27A-1 Moffett Field, CA 94035-1000 E-mail: npb@nas.nasa.gov Fax: (415) 604-3957 ============================================ NPB 2.X PLANS The NAS Parallel Benchmark 2 Team plans a staged release of modified and new benchmarks in the coming months. These new releases correct deficiencies in the preliminary release, 2.0. We do not intend to make more releases beyond those mentioned here unless there is a substantial problem. Summary of (planned) releases: 2.1 New LU and BT. 2.2 - IS in C. - EP. - New FT with a 2-D decomposition, plus additional optimizations. 2.3 CG Benchmark. Status of NPB 2.3 codes: - We consider SP, BT, LU, MG EP, FT, and IS completely stable - CG is now in "Beta" release. The accompanying report specifies the CLASS C test cases for both NPB 1.0 and NPB 2.x, including verification numbers. ============================= Changes in 2.3 - Added CG Changes is 2.3b3: (Oct, '97): rhs.f changed in BT, so that inner loops are direction of first index ============================= Changes in 2.2 - Added IS in C - Modified FT so that it can be run on a number of processors larger than the last array dimension - Added EP - Encoded CLASS C size and verification numbers - Removed include file mpifrag.f containing executable statements - Added different versions of random number generators ============================= Changes in 2.1 - Modified SP to report more accurate flop count - Modified BT to report correct flop count (bt.f) - Modified BT (x_solve.f) 5x5 block tridiagonal routine are unrolled - Modified LU routines blts.f and buts.f to do column based relaxation (rather than diagonal based), and routine exchange_1.f to communicate at edges of processor (rather than at ends of each subsequent diagonal). Result is significantly less communication. - Modified LU routines blts.f and buts.f by unrolling the loops of the 5x5 block tridiagonal sections. - Added comments in config/NAS examples - Removed an unnecessary echo from sys/make.common - Added mail and email address for benchmark output in print_results.f ============================ tau-2.16.4/examples/NPB2.3/SP/000077500000000000000000000000001062343042700154005ustar00rootroot00000000000000tau-2.16.4/examples/NPB2.3/SP/Makefile000066400000000000000000000045251062343042700170460ustar00rootroot00000000000000SHELL=/bin/sh BENCHMARK=sp BENCHMARKU=SP include ../config/make.def OBJS = sp.o make_set.o initialize.o exact_solution.o exact_rhs.o \ set_constants.o adi.o define.o copy_faces.o rhs.o \ lhsx.o lhsy.o lhsz.o x_solve.o ninvr.o y_solve.o pinvr.o \ z_solve.o tzetar.o add.o txinvr.o error.o verify.o setup_mpi.o \ ${COMMON}/print_results.o ${COMMON}/timers.o include ../sys/make.common # npbparams.h is included by header.h # The following rule should do the trick but many make programs (not gmake) # will do the wrong thing and rebuild the world every time (because the # mod time on header.h is not changed. One solution would be to # touch header.h but this might cause confusion if someone has # accidentally deleted it. Instead, make the dependency on npbparams.h # explicit in all the lines below (even though dependence is indirect). # header.h: npbparams.h ${PROGRAM}: config ${OBJS} ${FLINK} ${FLINKFLAGS} -o ${PROGRAM} ${OBJS} ${FMPI_LIB} .f.o: ${FCOMPILE} $< sp.o: sp.f header.h npbparams.h mpinpb.h make_set.o: make_set.f header.h npbparams.h mpinpb.h initialize.o: initialize.f header.h npbparams.h exact_solution.o: exact_solution.f header.h npbparams.h exact_rhs.o: exact_rhs.f header.h npbparams.h set_constants.o: set_constants.f header.h npbparams.h io.o: io.f header.h npbparams.h adi.o: adi.f header.h npbparams.h define.o: define.f header.h npbparams.h copy_faces.o: copy_faces.f header.h npbparams.h mpinpb.h rhs.o: rhs.f header.h npbparams.h lhsx.o: lhsx.f header.h npbparams.h lhsy.o: lhsy.f header.h npbparams.h lhsz.o: lhsz.f header.h npbparams.h x_solve.o: x_solve.f header.h npbparams.h mpinpb.h ninvr.o: ninvr.f header.h npbparams.h y_solve.o: y_solve.f header.h npbparams.h mpinpb.h pinvr.o: pinvr.f header.h npbparams.h z_solve.o: z_solve.f header.h npbparams.h mpinpb.h tzetar.o: tzetar.f header.h npbparams.h add.o: add.f header.h npbparams.h txinvr.o: txinvr.f header.h npbparams.h error.o: error.f header.h npbparams.h mpinpb.h verify.o: verify.f header.h npbparams.h mpinpb.h setup_mpi.o: setup_mpi.f mpinpb.h npbparams.h clean: - rm -f *.o *~ mputil* - rm -f npbparams.h core tau-2.16.4/examples/NPB2.3/SP/README000066400000000000000000000016361062343042700162660ustar00rootroot00000000000000 This code implements a 3D Multi-partition algorithm for the solution of the uncoupled systems of linear equations resulting from Beam-Warming approximate factorization. Consequently, the program must be run on a square number of processors. The included file "npbparams.h" contains a parameter statement which sets "maxcells" and "problem_size". The parameter maxcells must be set to the square root of the number of processors. For example, if running on 25 processors, then set max_cells=5. The standard problem sizes are problem_size=64 for class A, 102 for class B, and 162 for class C. The number of time steps and the time step size dt are set in the npbparams.h but may be overridden in the input deck "inputsp.data". The number of time steps is 400 for all three standard problems, and the appropriate time step sizes "dt" are 0.0015d0 for class A, 0.001d0 for class B, and 0.00067 for class C. tau-2.16.4/examples/NPB2.3/SP/add.f000066400000000000000000000017171062343042700163050ustar00rootroot00000000000000 c--------------------------------------------------------------------- c--------------------------------------------------------------------- subroutine add c--------------------------------------------------------------------- c--------------------------------------------------------------------- c--------------------------------------------------------------------- c addition of update to the vector u c--------------------------------------------------------------------- include 'header.h' integer c, i, j, k, m do c = 1, ncells do m = 1, 5 do k = start(3,c), cell_size(3,c)-end(3,c)-1 do j = start(2,c), cell_size(2,c)-end(2,c)-1 do i = start(1,c), cell_size(1,c)-end(1,c)-1 u(i,j,k,m,c) = u(i,j,k,m,c) + rhs(i,j,k,m,c) end do end do end do end do end do return end tau-2.16.4/examples/NPB2.3/SP/adi.f000066400000000000000000000007151062343042700163070ustar00rootroot00000000000000 c--------------------------------------------------------------------- c--------------------------------------------------------------------- subroutine adi c--------------------------------------------------------------------- c--------------------------------------------------------------------- call copy_faces call txinvr call x_solve call y_solve call z_solve call add return end tau-2.16.4/examples/NPB2.3/SP/copy_faces.f000066400000000000000000000266731062343042700177000ustar00rootroot00000000000000 c--------------------------------------------------------------------- c--------------------------------------------------------------------- subroutine copy_faces c--------------------------------------------------------------------- c--------------------------------------------------------------------- c--------------------------------------------------------------------- c this function copies the face values of a variable defined on a set c of cells to the overlap locations of the adjacent sets of cells. c Because a set of cells interfaces in each direction with exactly one c other set, we only need to fill six different buffers. We could try to c overlap communication with computation, by computing c some internal values while communicating boundary values, but this c adds so much overhead that it's not clearly useful. c--------------------------------------------------------------------- include 'header.h' include 'mpinpb.h' integer i, j, k, c, m, requests(0:11), p0, p1, > p2, p3, p4, p5, b_size(0:5), ss(0:5), > sr(0:5), error, statuses(MPI_STATUS_SIZE, 0:11) c--------------------------------------------------------------------- c exit immediately if there are no faces to be copied c--------------------------------------------------------------------- if (no_nodes .eq. 1) then call compute_rhs return endif ss(0) = start_send_east ss(1) = start_send_west ss(2) = start_send_north ss(3) = start_send_south ss(4) = start_send_top ss(5) = start_send_bottom sr(0) = start_recv_east sr(1) = start_recv_west sr(2) = start_recv_north sr(3) = start_recv_south sr(4) = start_recv_top sr(5) = start_recv_bottom b_size(0) = east_size b_size(1) = west_size b_size(2) = north_size b_size(3) = south_size b_size(4) = top_size b_size(5) = bottom_size c--------------------------------------------------------------------- c because the difference stencil for the diagonalized scheme is c orthogonal, we do not have to perform the staged copying of faces, c but can send all face information simultaneously to the neighboring c cells in all directions c--------------------------------------------------------------------- p0 = 0 p1 = 0 p2 = 0 p3 = 0 p4 = 0 p5 = 0 do c = 1, ncells do m = 1, 5 c--------------------------------------------------------------------- c fill the buffer to be sent to eastern neighbors (i-dir) c--------------------------------------------------------------------- if (cell_coord(1,c) .ne. ncells) then do k = 0, cell_size(3,c)-1 do j = 0, cell_size(2,c)-1 do i = cell_size(1,c)-2, cell_size(1,c)-1 out_buffer(ss(0)+p0) = u(i,j,k,m,c) p0 = p0 + 1 end do end do end do endif c--------------------------------------------------------------------- c fill the buffer to be sent to western neighbors c--------------------------------------------------------------------- if (cell_coord(1,c) .ne. 1) then do k = 0, cell_size(3,c)-1 do j = 0, cell_size(2,c)-1 do i = 0, 1 out_buffer(ss(1)+p1) = u(i,j,k,m,c) p1 = p1 + 1 end do end do end do endif c--------------------------------------------------------------------- c fill the buffer to be sent to northern neighbors (j_dir) c--------------------------------------------------------------------- if (cell_coord(2,c) .ne. ncells) then do k = 0, cell_size(3,c)-1 do j = cell_size(2,c)-2, cell_size(2,c)-1 do i = 0, cell_size(1,c)-1 out_buffer(ss(2)+p2) = u(i,j,k,m,c) p2 = p2 + 1 end do end do end do endif c--------------------------------------------------------------------- c fill the buffer to be sent to southern neighbors c--------------------------------------------------------------------- if (cell_coord(2,c).ne. 1) then do k = 0, cell_size(3,c)-1 do j = 0, 1 do i = 0, cell_size(1,c)-1 out_buffer(ss(3)+p3) = u(i,j,k,m,c) p3 = p3 + 1 end do end do end do endif c--------------------------------------------------------------------- c fill the buffer to be sent to top neighbors (k-dir) c--------------------------------------------------------------------- if (cell_coord(3,c) .ne. ncells) then do k = cell_size(3,c)-2, cell_size(3,c)-1 do j = 0, cell_size(2,c)-1 do i = 0, cell_size(1,c)-1 out_buffer(ss(4)+p4) = u(i,j,k,m,c) p4 = p4 + 1 end do end do end do endif c--------------------------------------------------------------------- c fill the buffer to be sent to bottom neighbors c--------------------------------------------------------------------- if (cell_coord(3,c).ne. 1) then do k=0, 1 do j = 0, cell_size(2,c)-1 do i = 0, cell_size(1,c)-1 out_buffer(ss(5)+p5) = u(i,j,k,m,c) p5 = p5 + 1 end do end do end do endif c--------------------------------------------------------------------- c m loop c--------------------------------------------------------------------- end do c--------------------------------------------------------------------- c cell loop c--------------------------------------------------------------------- end do call mpi_irecv(in_buffer(sr(0)), b_size(0), > dp_type, successor(1), WEST, > comm_rhs, requests(0), error) call mpi_irecv(in_buffer(sr(1)), b_size(1), > dp_type, predecessor(1), EAST, > comm_rhs, requests(1), error) call mpi_irecv(in_buffer(sr(2)), b_size(2), > dp_type, successor(2), SOUTH, > comm_rhs, requests(2), error) call mpi_irecv(in_buffer(sr(3)), b_size(3), > dp_type, predecessor(2), NORTH, > comm_rhs, requests(3), error) call mpi_irecv(in_buffer(sr(4)), b_size(4), > dp_type, successor(3), BOTTOM, > comm_rhs, requests(4), error) call mpi_irecv(in_buffer(sr(5)), b_size(5), > dp_type, predecessor(3), TOP, > comm_rhs, requests(5), error) call mpi_isend(out_buffer(ss(0)), b_size(0), > dp_type, successor(1), EAST, > comm_rhs, requests(6), error) call mpi_isend(out_buffer(ss(1)), b_size(1), > dp_type, predecessor(1), WEST, > comm_rhs, requests(7), error) call mpi_isend(out_buffer(ss(2)), b_size(2), > dp_type,successor(2), NORTH, > comm_rhs, requests(8), error) call mpi_isend(out_buffer(ss(3)), b_size(3), > dp_type,predecessor(2), SOUTH, > comm_rhs, requests(9), error) call mpi_isend(out_buffer(ss(4)), b_size(4), > dp_type,successor(3), TOP, > comm_rhs, requests(10), error) call mpi_isend(out_buffer(ss(5)), b_size(5), > dp_type,predecessor(3), BOTTOM, > comm_rhs,requests(11), error) call mpi_waitall(12, requests, statuses, error) c--------------------------------------------------------------------- c unpack the data that has just been received; c--------------------------------------------------------------------- p0 = 0 p1 = 0 p2 = 0 p3 = 0 p4 = 0 p5 = 0 do c = 1, ncells do m = 1, 5 if (cell_coord(1,c) .ne. 1) then do k = 0, cell_size(3,c)-1 do j = 0, cell_size(2,c)-1 do i = -2, -1 u(i,j,k,m,c) = in_buffer(sr(1)+p0) p0 = p0 + 1 end do end do end do endif if (cell_coord(1,c) .ne. ncells) then do k = 0, cell_size(3,c)-1 do j = 0, cell_size(2,c)-1 do i = cell_size(1,c), cell_size(1,c)+1 u(i,j,k,m,c) = in_buffer(sr(0)+p1) p1 = p1 + 1 end do end do end do end if if (cell_coord(2,c) .ne. 1) then do k = 0, cell_size(3,c)-1 do j = -2, -1 do i = 0, cell_size(1,c)-1 u(i,j,k,m,c) = in_buffer(sr(3)+p2) p2 = p2 + 1 end do end do end do endif if (cell_coord(2,c) .ne. ncells) then do k = 0, cell_size(3,c)-1 do j = cell_size(2,c), cell_size(2,c)+1 do i = 0, cell_size(1,c)-1 u(i,j,k,m,c) = in_buffer(sr(2)+p3) p3 = p3 + 1 end do end do end do endif if (cell_coord(3,c) .ne. 1) then do k = -2, -1 do j = 0, cell_size(2,c)-1 do i = 0, cell_size(1,c)-1 u(i,j,k,m,c) = in_buffer(sr(5)+p4) p4 = p4 + 1 end do end do end do endif if (cell_coord(3,c) .ne. ncells) then do k = cell_size(3,c), cell_size(3,c)+1 do j = 0, cell_size(2,c)-1 do i = 0, cell_size(1,c)-1 u(i,j,k,m,c) = in_buffer(sr(4)+p5) p5 = p5 + 1 end do end do end do endif c--------------------------------------------------------------------- c m loop c--------------------------------------------------------------------- end do c--------------------------------------------------------------------- c cells loop c--------------------------------------------------------------------- end do c--------------------------------------------------------------------- c now that we have all the data, compute the rhs c--------------------------------------------------------------------- call compute_rhs return end tau-2.16.4/examples/NPB2.3/SP/define.f000066400000000000000000000047301062343042700170050ustar00rootroot00000000000000 c--------------------------------------------------------------------- c--------------------------------------------------------------------- subroutine compute_buffer_size(dim) c--------------------------------------------------------------------- c--------------------------------------------------------------------- include 'header.h' integer c, dim, face_size if (ncells .eq. 1) return c--------------------------------------------------------------------- c compute the actual sizes of the buffers; note that there is c always one cell face that doesn't need buffer space, because it c is at the boundary of the grid c--------------------------------------------------------------------- west_size = 0 east_size = 0 do c = 1, ncells face_size = cell_size(2,c) * cell_size(3,c) * dim * 2 if (cell_coord(1,c).ne.1) west_size = west_size + face_size if (cell_coord(1,c).ne.ncells) east_size = east_size + > face_size end do north_size = 0 south_size = 0 do c = 1, ncells face_size = cell_size(1,c)*cell_size(3,c) * dim * 2 if (cell_coord(2,c).ne.1) south_size = south_size + face_size if (cell_coord(2,c).ne.ncells) north_size = north_size + > face_size end do top_size = 0 bottom_size = 0 do c = 1, ncells face_size = cell_size(1,c) * cell_size(2,c) * dim * 2 if (cell_coord(3,c).ne.1) bottom_size = bottom_size + > face_size if (cell_coord(3,c).ne.ncells) top_size = top_size + > face_size end do start_send_west = 1 start_send_east = start_send_west + west_size start_send_south = start_send_east + east_size start_send_north = start_send_south + south_size start_send_bottom = start_send_north + north_size start_send_top = start_send_bottom + bottom_size start_recv_west = 1 start_recv_east = start_recv_west + west_size start_recv_south = start_recv_east + east_size start_recv_north = start_recv_south + south_size start_recv_bottom = start_recv_north + north_size start_recv_top = start_recv_bottom + bottom_size return end tau-2.16.4/examples/NPB2.3/SP/error.f000066400000000000000000000054751062343042700167130ustar00rootroot00000000000000 c--------------------------------------------------------------------- c--------------------------------------------------------------------- subroutine error_norm(rms) c--------------------------------------------------------------------- c--------------------------------------------------------------------- c--------------------------------------------------------------------- c this function computes the norm of the difference between the c computed solution and the exact solution c--------------------------------------------------------------------- include 'header.h' include 'mpinpb.h' integer c, i, j, k, m, ii, jj, kk, d, error double precision xi, eta, zeta, u_exact(5), rms(5), rms_work(5), > add do m = 1, 5 rms_work(m) = 0.0d0 end do do c = 1, ncells kk = 0 do k = cell_low(3,c), cell_high(3,c) zeta = dble(k) * dnzm1 jj = 0 do j = cell_low(2,c), cell_high(2,c) eta = dble(j) * dnym1 ii = 0 do i = cell_low(1,c), cell_high(1,c) xi = dble(i) * dnxm1 call exact_solution(xi, eta, zeta, u_exact) do m = 1, 5 add = u(ii,jj,kk,m,c)-u_exact(m) rms_work(m) = rms_work(m) + add*add end do ii = ii + 1 end do jj = jj + 1 end do kk = kk + 1 end do end do call mpi_allreduce(rms_work, rms, 5, dp_type, > MPI_SUM, comm_setup, error) do m = 1, 5 do d = 1, 3 rms(m) = rms(m) / dble(grid_points(d)-2) end do rms(m) = dsqrt(rms(m)) end do return end subroutine rhs_norm(rms) include 'header.h' include 'mpinpb.h' integer c, i, j, k, d, m, error double precision rms(5), rms_work(5), add do m = 1, 5 rms_work(m) = 0.0d0 end do do c = 1, ncells do k = start(3,c), cell_size(3,c)-end(3,c)-1 do j = start(2,c), cell_size(2,c)-end(2,c)-1 do i = start(1,c), cell_size(1,c)-end(1,c)-1 do m = 1, 5 add = rhs(i,j,k,m,c) rms_work(m) = rms_work(m) + add*add end do end do end do end do end do call mpi_allreduce(rms_work, rms, 5, dp_type, > MPI_SUM, comm_setup, error) do m = 1, 5 do d = 1, 3 rms(m) = rms(m) / dble(grid_points(d)-2) end do rms(m) = dsqrt(rms(m)) end do return end tau-2.16.4/examples/NPB2.3/SP/exact_rhs.f000066400000000000000000000366071062343042700175430ustar00rootroot00000000000000 c--------------------------------------------------------------------- c--------------------------------------------------------------------- subroutine exact_rhs c--------------------------------------------------------------------- c--------------------------------------------------------------------- c--------------------------------------------------------------------- c compute the right hand side based on exact solution c--------------------------------------------------------------------- include 'header.h' double precision dtemp(5), xi, eta, zeta, dtpp integer c, m, i, j, k, ip1, im1, jp1, > jm1, km1, kp1 c--------------------------------------------------------------------- c loop over all cells owned by this node c--------------------------------------------------------------------- do c = 1, ncells c--------------------------------------------------------------------- c initialize c--------------------------------------------------------------------- do m = 1, 5 do k= 0, cell_size(3,c)-1 do j = 0, cell_size(2,c)-1 do i = 0, cell_size(1,c)-1 forcing(i,j,k,m,c) = 0.0d0 end do end do end do end do c--------------------------------------------------------------------- c xi-direction flux differences c--------------------------------------------------------------------- do k = start(3,c), cell_size(3,c)-end(3,c)-1 zeta = dble(k+cell_low(3,c)) * dnzm1 do j = start(2,c), cell_size(2,c)-end(2,c)-1 eta = dble(j+cell_low(2,c)) * dnym1 do i=-2*(1-start(1,c)), cell_size(1,c)+1-2*end(1,c) xi = dble(i+cell_low(1,c)) * dnxm1 call exact_solution(xi, eta, zeta, dtemp) do m = 1, 5 ue(i,m) = dtemp(m) end do dtpp = 1.0d0 / dtemp(1) do m = 2, 5 buf(i,m) = dtpp * dtemp(m) end do cuf(i) = buf(i,2) * buf(i,2) buf(i,1) = cuf(i) + buf(i,3) * buf(i,3) + > buf(i,4) * buf(i,4) q(i) = 0.5d0*(buf(i,2)*ue(i,2) + buf(i,3)*ue(i,3) + > buf(i,4)*ue(i,4)) end do do i = start(1,c), cell_size(1,c)-end(1,c)-1 im1 = i-1 ip1 = i+1 forcing(i,j,k,1,c) = forcing(i,j,k,1,c) - > tx2*( ue(ip1,2)-ue(im1,2) )+ > dx1tx1*(ue(ip1,1)-2.0d0*ue(i,1)+ue(im1,1)) forcing(i,j,k,2,c) = forcing(i,j,k,2,c) - tx2 * ( > (ue(ip1,2)*buf(ip1,2)+c2*(ue(ip1,5)-q(ip1)))- > (ue(im1,2)*buf(im1,2)+c2*(ue(im1,5)-q(im1))))+ > xxcon1*(buf(ip1,2)-2.0d0*buf(i,2)+buf(im1,2))+ > dx2tx1*( ue(ip1,2)-2.0d0* ue(i,2)+ue(im1,2)) forcing(i,j,k,3,c) = forcing(i,j,k,3,c) - tx2 * ( > ue(ip1,3)*buf(ip1,2)-ue(im1,3)*buf(im1,2))+ > xxcon2*(buf(ip1,3)-2.0d0*buf(i,3)+buf(im1,3))+ > dx3tx1*( ue(ip1,3)-2.0d0*ue(i,3) +ue(im1,3)) forcing(i,j,k,4,c) = forcing(i,j,k,4,c) - tx2*( > ue(ip1,4)*buf(ip1,2)-ue(im1,4)*buf(im1,2))+ > xxcon2*(buf(ip1,4)-2.0d0*buf(i,4)+buf(im1,4))+ > dx4tx1*( ue(ip1,4)-2.0d0* ue(i,4)+ ue(im1,4)) forcing(i,j,k,5,c) = forcing(i,j,k,5,c) - tx2*( > buf(ip1,2)*(c1*ue(ip1,5)-c2*q(ip1))- > buf(im1,2)*(c1*ue(im1,5)-c2*q(im1)))+ > 0.5d0*xxcon3*(buf(ip1,1)-2.0d0*buf(i,1)+ > buf(im1,1))+ > xxcon4*(cuf(ip1)-2.0d0*cuf(i)+cuf(im1))+ > xxcon5*(buf(ip1,5)-2.0d0*buf(i,5)+buf(im1,5))+ > dx5tx1*( ue(ip1,5)-2.0d0* ue(i,5)+ ue(im1,5)) end do c--------------------------------------------------------------------- c Fourth-order dissipation c--------------------------------------------------------------------- if (start(1,c) .gt. 0) then do m = 1, 5 i = 1 forcing(i,j,k,m,c) = forcing(i,j,k,m,c) - dssp * > (5.0d0*ue(i,m) - 4.0d0*ue(i+1,m) +ue(i+2,m)) i = 2 forcing(i,j,k,m,c) = forcing(i,j,k,m,c) - dssp * > (-4.0d0*ue(i-1,m) + 6.0d0*ue(i,m) - > 4.0d0*ue(i+1,m) + ue(i+2,m)) end do endif do m = 1, 5 do i = start(1,c)*3, cell_size(1,c)-3*end(1,c)-1 forcing(i,j,k,m,c) = forcing(i,j,k,m,c) - dssp* > (ue(i-2,m) - 4.0d0*ue(i-1,m) + > 6.0d0*ue(i,m) - 4.0d0*ue(i+1,m) + ue(i+2,m)) end do end do if (end(1,c) .gt. 0) then do m = 1, 5 i = cell_size(1,c)-3 forcing(i,j,k,m,c) = forcing(i,j,k,m,c) - dssp * > (ue(i-2,m) - 4.0d0*ue(i-1,m) + > 6.0d0*ue(i,m) - 4.0d0*ue(i+1,m)) i = cell_size(1,c)-2 forcing(i,j,k,m,c) = forcing(i,j,k,m,c) - dssp * > (ue(i-2,m) - 4.0d0*ue(i-1,m) + 5.0d0*ue(i,m)) end do endif end do end do c--------------------------------------------------------------------- c eta-direction flux differences c--------------------------------------------------------------------- do k = start(3,c), cell_size(3,c)-end(3,c)-1 zeta = dble(k+cell_low(3,c)) * dnzm1 do i=start(1,c), cell_size(1,c)-end(1,c)-1 xi = dble(i+cell_low(1,c)) * dnxm1 do j=-2*(1-start(2,c)), cell_size(2,c)+1-2*end(2,c) eta = dble(j+cell_low(2,c)) * dnym1 call exact_solution(xi, eta, zeta, dtemp) do m = 1, 5 ue(j,m) = dtemp(m) end do dtpp = 1.0d0/dtemp(1) do m = 2, 5 buf(j,m) = dtpp * dtemp(m) end do cuf(j) = buf(j,3) * buf(j,3) buf(j,1) = cuf(j) + buf(j,2) * buf(j,2) + > buf(j,4) * buf(j,4) q(j) = 0.5d0*(buf(j,2)*ue(j,2) + buf(j,3)*ue(j,3) + > buf(j,4)*ue(j,4)) end do do j = start(2,c), cell_size(2,c)-end(2,c)-1 jm1 = j-1 jp1 = j+1 forcing(i,j,k,1,c) = forcing(i,j,k,1,c) - > ty2*( ue(jp1,3)-ue(jm1,3) )+ > dy1ty1*(ue(jp1,1)-2.0d0*ue(j,1)+ue(jm1,1)) forcing(i,j,k,2,c) = forcing(i,j,k,2,c) - ty2*( > ue(jp1,2)*buf(jp1,3)-ue(jm1,2)*buf(jm1,3))+ > yycon2*(buf(jp1,2)-2.0d0*buf(j,2)+buf(jm1,2))+ > dy2ty1*( ue(jp1,2)-2.0* ue(j,2)+ ue(jm1,2)) forcing(i,j,k,3,c) = forcing(i,j,k,3,c) - ty2*( > (ue(jp1,3)*buf(jp1,3)+c2*(ue(jp1,5)-q(jp1)))- > (ue(jm1,3)*buf(jm1,3)+c2*(ue(jm1,5)-q(jm1))))+ > yycon1*(buf(jp1,3)-2.0d0*buf(j,3)+buf(jm1,3))+ > dy3ty1*( ue(jp1,3)-2.0d0*ue(j,3) +ue(jm1,3)) forcing(i,j,k,4,c) = forcing(i,j,k,4,c) - ty2*( > ue(jp1,4)*buf(jp1,3)-ue(jm1,4)*buf(jm1,3))+ > yycon2*(buf(jp1,4)-2.0d0*buf(j,4)+buf(jm1,4))+ > dy4ty1*( ue(jp1,4)-2.0d0*ue(j,4)+ ue(jm1,4)) forcing(i,j,k,5,c) = forcing(i,j,k,5,c) - ty2*( > buf(jp1,3)*(c1*ue(jp1,5)-c2*q(jp1))- > buf(jm1,3)*(c1*ue(jm1,5)-c2*q(jm1)))+ > 0.5d0*yycon3*(buf(jp1,1)-2.0d0*buf(j,1)+ > buf(jm1,1))+ > yycon4*(cuf(jp1)-2.0d0*cuf(j)+cuf(jm1))+ > yycon5*(buf(jp1,5)-2.0d0*buf(j,5)+buf(jm1,5))+ > dy5ty1*(ue(jp1,5)-2.0d0*ue(j,5)+ue(jm1,5)) end do c--------------------------------------------------------------------- c Fourth-order dissipation c--------------------------------------------------------------------- if (start(2,c) .gt. 0) then do m = 1, 5 j = 1 forcing(i,j,k,m,c) = forcing(i,j,k,m,c) - dssp * > (5.0d0*ue(j,m) - 4.0d0*ue(j+1,m) +ue(j+2,m)) j = 2 forcing(i,j,k,m,c) = forcing(i,j,k,m,c) - dssp * > (-4.0d0*ue(j-1,m) + 6.0d0*ue(j,m) - > 4.0d0*ue(j+1,m) + ue(j+2,m)) end do endif do m = 1, 5 do j = start(2,c)*3, cell_size(2,c)-3*end(2,c)-1 forcing(i,j,k,m,c) = forcing(i,j,k,m,c) - dssp* > (ue(j-2,m) - 4.0d0*ue(j-1,m) + > 6.0d0*ue(j,m) - 4.0d0*ue(j+1,m) + ue(j+2,m)) end do end do if (end(2,c) .gt. 0) then do m = 1, 5 j = cell_size(2,c)-3 forcing(i,j,k,m,c) = forcing(i,j,k,m,c) - dssp * > (ue(j-2,m) - 4.0d0*ue(j-1,m) + > 6.0d0*ue(j,m) - 4.0d0*ue(j+1,m)) j = cell_size(2,c)-2 forcing(i,j,k,m,c) = forcing(i,j,k,m,c) - dssp * > (ue(j-2,m) - 4.0d0*ue(j-1,m) + 5.0d0*ue(j,m)) end do endif end do end do c--------------------------------------------------------------------- c zeta-direction flux differences c--------------------------------------------------------------------- do j=start(2,c), cell_size(2,c)-end(2,c)-1 eta = dble(j+cell_low(2,c)) * dnym1 do i = start(1,c), cell_size(1,c)-end(1,c)-1 xi = dble(i+cell_low(1,c)) * dnxm1 do k=-2*(1-start(3,c)), cell_size(3,c)+1-2*end(3,c) zeta = dble(k+cell_low(3,c)) * dnzm1 call exact_solution(xi, eta, zeta, dtemp) do m = 1, 5 ue(k,m) = dtemp(m) end do dtpp = 1.0d0/dtemp(1) do m = 2, 5 buf(k,m) = dtpp * dtemp(m) end do cuf(k) = buf(k,4) * buf(k,4) buf(k,1) = cuf(k) + buf(k,2) * buf(k,2) + > buf(k,3) * buf(k,3) q(k) = 0.5d0*(buf(k,2)*ue(k,2) + buf(k,3)*ue(k,3) + > buf(k,4)*ue(k,4)) end do do k=start(3,c), cell_size(3,c)-end(3,c)-1 km1 = k-1 kp1 = k+1 forcing(i,j,k,1,c) = forcing(i,j,k,1,c) - > tz2*( ue(kp1,4)-ue(km1,4) )+ > dz1tz1*(ue(kp1,1)-2.0d0*ue(k,1)+ue(km1,1)) forcing(i,j,k,2,c) = forcing(i,j,k,2,c) - tz2 * ( > ue(kp1,2)*buf(kp1,4)-ue(km1,2)*buf(km1,4))+ > zzcon2*(buf(kp1,2)-2.0d0*buf(k,2)+buf(km1,2))+ > dz2tz1*( ue(kp1,2)-2.0d0* ue(k,2)+ ue(km1,2)) forcing(i,j,k,3,c) = forcing(i,j,k,3,c) - tz2 * ( > ue(kp1,3)*buf(kp1,4)-ue(km1,3)*buf(km1,4))+ > zzcon2*(buf(kp1,3)-2.0d0*buf(k,3)+buf(km1,3))+ > dz3tz1*(ue(kp1,3)-2.0d0*ue(k,3)+ue(km1,3)) forcing(i,j,k,4,c) = forcing(i,j,k,4,c) - tz2 * ( > (ue(kp1,4)*buf(kp1,4)+c2*(ue(kp1,5)-q(kp1)))- > (ue(km1,4)*buf(km1,4)+c2*(ue(km1,5)-q(km1))))+ > zzcon1*(buf(kp1,4)-2.0d0*buf(k,4)+buf(km1,4))+ > dz4tz1*( ue(kp1,4)-2.0d0*ue(k,4) +ue(km1,4)) forcing(i,j,k,5,c) = forcing(i,j,k,5,c) - tz2 * ( > buf(kp1,4)*(c1*ue(kp1,5)-c2*q(kp1))- > buf(km1,4)*(c1*ue(km1,5)-c2*q(km1)))+ > 0.5d0*zzcon3*(buf(kp1,1)-2.0d0*buf(k,1) > +buf(km1,1))+ > zzcon4*(cuf(kp1)-2.0d0*cuf(k)+cuf(km1))+ > zzcon5*(buf(kp1,5)-2.0d0*buf(k,5)+buf(km1,5))+ > dz5tz1*( ue(kp1,5)-2.0d0*ue(k,5)+ ue(km1,5)) end do c--------------------------------------------------------------------- c Fourth-order dissipation c--------------------------------------------------------------------- if (start(3,c) .gt. 0) then do m = 1, 5 k = 1 forcing(i,j,k,m,c) = forcing(i,j,k,m,c) - dssp * > (5.0d0*ue(k,m) - 4.0d0*ue(k+1,m) +ue(k+2,m)) k = 2 forcing(i,j,k,m,c) = forcing(i,j,k,m,c) - dssp * > (-4.0d0*ue(k-1,m) + 6.0d0*ue(k,m) - > 4.0d0*ue(k+1,m) + ue(k+2,m)) end do endif do m = 1, 5 do k = start(3,c)*3, cell_size(3,c)-3*end(3,c)-1 forcing(i,j,k,m,c) = forcing(i,j,k,m,c) - dssp* > (ue(k-2,m) - 4.0d0*ue(k-1,m) + > 6.0d0*ue(k,m) - 4.0d0*ue(k+1,m) + ue(k+2,m)) end do end do if (end(3,c) .gt. 0) then do m = 1, 5 k = cell_size(3,c)-3 forcing(i,j,k,m,c) = forcing(i,j,k,m,c) - dssp * > (ue(k-2,m) - 4.0d0*ue(k-1,m) + > 6.0d0*ue(k,m) - 4.0d0*ue(k+1,m)) k = cell_size(3,c)-2 forcing(i,j,k,m,c) = forcing(i,j,k,m,c) - dssp * > (ue(k-2,m) - 4.0d0*ue(k-1,m) + 5.0d0*ue(k,m)) end do endif end do end do c--------------------------------------------------------------------- c now change the sign of the forcing function, c--------------------------------------------------------------------- do m = 1, 5 do k = start(3,c), cell_size(3,c)-end(3,c)-1 do j = start(2,c), cell_size(2,c)-end(2,c)-1 do i = start(1,c), cell_size(1,c)-end(1,c)-1 forcing(i,j,k,m,c) = -1.d0 * forcing(i,j,k,m,c) end do end do end do end do c--------------------------------------------------------------------- c cell loop c--------------------------------------------------------------------- end do return end tau-2.16.4/examples/NPB2.3/SP/exact_solution.f000066400000000000000000000017071062343042700206140ustar00rootroot00000000000000 c--------------------------------------------------------------------- c--------------------------------------------------------------------- subroutine exact_solution(xi,eta,zeta,dtemp) c--------------------------------------------------------------------- c--------------------------------------------------------------------- c--------------------------------------------------------------------- c this function returns the exact solution at point xi, eta, zeta c--------------------------------------------------------------------- include 'header.h' double precision xi, eta, zeta, dtemp(5) integer m do m = 1, 5 dtemp(m) = ce(m,1) + > xi*(ce(m,2) + xi*(ce(m,5) + xi*(ce(m,8) + xi*ce(m,11)))) + > eta*(ce(m,3) + eta*(ce(m,6) + eta*(ce(m,9) + eta*ce(m,12))))+ > zeta*(ce(m,4) + zeta*(ce(m,7) + zeta*(ce(m,10) + > zeta*ce(m,13)))) end do return end tau-2.16.4/examples/NPB2.3/SP/header.h000066400000000000000000000136151062343042700170070ustar00rootroot00000000000000 c--------------------------------------------------------------------- c--------------------------------------------------------------------- implicit none c--------------------------------------------------------------------- c The following include file is generated automatically by the c "setparams" utility. It defines c maxcells: the square root of the maximum number of processors c problem_size: 12, 64, 102, 162 (for class T, A, B, C) c dt_default: default time step for this problem size if no c config file c niter_default: default number of iterations for this problem size c--------------------------------------------------------------------- include 'npbparams.h' integer ncells, grid_points(3) common /global/ ncells, grid_points double precision tx1, tx2, tx3, ty1, ty2, ty3, tz1, tz2, tz3, > dx1, dx2, dx3, dx4, dx5, dy1, dy2, dy3, dy4, > dy5, dz1, dz2, dz3, dz4, dz5, dssp, dt, > ce(5,13), dxmax, dymax, dzmax, xxcon1, xxcon2, > xxcon3, xxcon4, xxcon5, dx1tx1, dx2tx1, dx3tx1, > dx4tx1, dx5tx1, yycon1, yycon2, yycon3, yycon4, > yycon5, dy1ty1, dy2ty1, dy3ty1, dy4ty1, dy5ty1, > zzcon1, zzcon2, zzcon3, zzcon4, zzcon5, dz1tz1, > dz2tz1, dz3tz1, dz4tz1, dz5tz1, dnxm1, dnym1, > dnzm1, c1c2, c1c5, c3c4, c1345, conz1, c1, c2, > c3, c4, c5, c4dssp, c5dssp, dtdssp, dttx1, bt, > dttx2, dtty1, dtty2, dttz1, dttz2, c2dttx1, > c2dtty1, c2dttz1, comz1, comz4, comz5, comz6, > c3c4tx3, c3c4ty3, c3c4tz3, c2iv, con43, con16 common /constants/ tx1, tx2, tx3, ty1, ty2, ty3, tz1, tz2, tz3, > dx1, dx2, dx3, dx4, dx5, dy1, dy2, dy3, dy4, > dy5, dz1, dz2, dz3, dz4, dz5, dssp, dt, > ce, dxmax, dymax, dzmax, xxcon1, xxcon2, > xxcon3, xxcon4, xxcon5, dx1tx1, dx2tx1, dx3tx1, > dx4tx1, dx5tx1, yycon1, yycon2, yycon3, yycon4, > yycon5, dy1ty1, dy2ty1, dy3ty1, dy4ty1, dy5ty1, > zzcon1, zzcon2, zzcon3, zzcon4, zzcon5, dz1tz1, > dz2tz1, dz3tz1, dz4tz1, dz5tz1, dnxm1, dnym1, > dnzm1, c1c2, c1c5, c3c4, c1345, conz1, c1, c2, > c3, c4, c5, c4dssp, c5dssp, dtdssp, dttx1, bt, > dttx2, dtty1, dtty2, dttz1, dttz2, c2dttx1, > c2dtty1, c2dttz1, comz1, comz4, comz5, comz6, > c3c4tx3, c3c4ty3, c3c4tz3, c2iv, con43, con16 integer EAST, WEST, NORTH, SOUTH, > BOTTOM, TOP parameter (EAST=2000, WEST=3000, NORTH=4000, SOUTH=5000, > BOTTOM=6000, TOP=7000) integer cell_coord (3,maxcells), cell_low (3,maxcells), > cell_high (3,maxcells), cell_size(3,maxcells), > predecessor(3), slice (3,maxcells), > grid_size (3), successor(3), > start (3,maxcells), end (3,maxcells) common /partition/ cell_coord, cell_low, cell_high, cell_size, > grid_size, successor, predecessor, slice, > start, end integer IMAX, JMAX, KMAX, MAX_CELL_DIM, BUF_SIZE parameter (MAX_CELL_DIM = (problem_size/maxcells)+1) parameter (IMAX=MAX_CELL_DIM,JMAX=MAX_CELL_DIM,KMAX=MAX_CELL_DIM) c--------------------------------------------------------------------- c +1 at end to avoid zero length arrays for 1 node c--------------------------------------------------------------------- parameter (BUF_SIZE=MAX_CELL_DIM*MAX_CELL_DIM*(maxcells-1)*60*2+1) double precision > u (-2:IMAX+1,-2:JMAX+1,-2:KMAX+1, 5, maxcells), > us (-1:IMAX, -1:JMAX, -1:KMAX, maxcells), > vs (-1:IMAX, -1:JMAX, -1:KMAX, maxcells), > ws (-1:IMAX, -1:JMAX, -1:KMAX, maxcells), > qs (-1:IMAX, -1:JMAX, -1:KMAX, maxcells), > ainv (-1:IMAX, -1:JMAX, -1:KMAX, maxcells), > rho_i (-1:IMAX, -1:JMAX, -1:KMAX, maxcells), > speed (-1:IMAX, -1:JMAX, -1:KMAX, maxcells), > square (-1:IMAX, -1:JMAX, -1:KMAX, maxcells), > rhs ( 0:IMAX-1, 0:JMAX-1, 0:KMAX-1, 5, maxcells), > forcing ( 0:IMAX-1, 0:JMAX-1, 0:KMAX-1, 5, maxcells), > lhs ( 0:IMAX-1, 0:JMAX-1, 0:KMAX-1, 15, maxcells), > in_buffer(BUF_SIZE), out_buffer(BUF_SIZE) common /fields/ u, us, vs, ws, qs, ainv, rho_i, speed, square, > rhs, forcing, lhs, in_buffer, out_buffer double precision cv(-2:MAX_CELL_DIM+1), rhon(-2:MAX_CELL_DIM+1), > rhos(-2:MAX_CELL_DIM+1), rhoq(-2:MAX_CELL_DIM+1), > cuf(-2:MAX_CELL_DIM+1), q(-2:MAX_CELL_DIM+1), > ue(-2:MAX_CELL_DIM+1,5), buf(-2:MAX_CELL_DIM+1,5) common /work_1d/ cv, rhon, rhos, rhoq, cuf, q, ue, buf integer west_size, east_size, bottom_size, top_size, > north_size, south_size, start_send_west, > start_send_east, start_send_south, start_send_north, > start_send_bottom, start_send_top, start_recv_west, > start_recv_east, start_recv_south, start_recv_north, > start_recv_bottom, start_recv_top common /box/ west_size, east_size, bottom_size, > top_size, north_size, south_size, > start_send_west, start_send_east, start_send_south, > start_send_north, start_send_bottom, start_send_top, > start_recv_west, start_recv_east, start_recv_south, > start_recv_north, start_recv_bottom, start_recv_top tau-2.16.4/examples/NPB2.3/SP/initialize.f000066400000000000000000000225631062343042700177200ustar00rootroot00000000000000 c--------------------------------------------------------------------- c--------------------------------------------------------------------- subroutine initialize c--------------------------------------------------------------------- c--------------------------------------------------------------------- c--------------------------------------------------------------------- c This subroutine initializes the field variable u using c tri-linear transfinite interpolation of the boundary values c--------------------------------------------------------------------- include 'header.h' integer c, i, j, k, m, ii, jj, kk, ix, iy, iz double precision xi, eta, zeta, Pface(5,3,2), Pxi, Peta, > Pzeta, temp(5) c--------------------------------------------------------------------- c Later (in compute_rhs) we compute 1/u for every element. A few of c the corner elements are not used, but it convenient (and faster) c to compute the whole thing with a simple loop. Make sure those c values are nonzero by initializing the whole thing here. c--------------------------------------------------------------------- do c = 1, ncells do kk = -1, IMAX do jj = -1, IMAX do ii = -1, IMAX u(ii, jj, kk, 1, c) = 1.0 u(ii, jj, kk, 2, c) = 0.0 u(ii, jj, kk, 3, c) = 0.0 u(ii, jj, kk, 4, c) = 0.0 u(ii, jj, kk, 5, c) = 1.0 end do end do end do end do c--------------------------------------------------------------------- c first store the "interpolated" values everywhere on the grid c--------------------------------------------------------------------- do c=1, ncells kk = 0 do k = cell_low(3,c), cell_high(3,c) zeta = dble(k) * dnzm1 jj = 0 do j = cell_low(2,c), cell_high(2,c) eta = dble(j) * dnym1 ii = 0 do i = cell_low(1,c), cell_high(1,c) xi = dble(i) * dnxm1 do ix = 1, 2 call exact_solution(dble(ix-1), eta, zeta, > Pface(1,1,ix)) end do do iy = 1, 2 call exact_solution(xi, dble(iy-1) , zeta, > Pface(1,2,iy)) end do do iz = 1, 2 call exact_solution(xi, eta, dble(iz-1), > Pface(1,3,iz)) end do do m = 1, 5 Pxi = xi * Pface(m,1,2) + > (1.0d0-xi) * Pface(m,1,1) Peta = eta * Pface(m,2,2) + > (1.0d0-eta) * Pface(m,2,1) Pzeta = zeta * Pface(m,3,2) + > (1.0d0-zeta) * Pface(m,3,1) u(ii,jj,kk,m,c) = Pxi + Peta + Pzeta - > Pxi*Peta - Pxi*Pzeta - Peta*Pzeta + > Pxi*Peta*Pzeta end do ii = ii + 1 end do jj = jj + 1 end do kk = kk+1 end do end do c--------------------------------------------------------------------- c now store the exact values on the boundaries c--------------------------------------------------------------------- c--------------------------------------------------------------------- c west face c--------------------------------------------------------------------- c = slice(1,1) ii = 0 xi = 0.0d0 kk = 0 do k = cell_low(3,c), cell_high(3,c) zeta = dble(k) * dnzm1 jj = 0 do j = cell_low(2,c), cell_high(2,c) eta = dble(j) * dnym1 call exact_solution(xi, eta, zeta, temp) do m = 1, 5 u(ii,jj,kk,m,c) = temp(m) end do jj = jj + 1 end do kk = kk + 1 end do c--------------------------------------------------------------------- c east face c--------------------------------------------------------------------- c = slice(1,ncells) ii = cell_size(1,c)-1 xi = 1.0d0 kk = 0 do k = cell_low(3,c), cell_high(3,c) zeta = dble(k) * dnzm1 jj = 0 do j = cell_low(2,c), cell_high(2,c) eta = dble(j) * dnym1 call exact_solution(xi, eta, zeta, temp) do m = 1, 5 u(ii,jj,kk,m,c) = temp(m) end do jj = jj + 1 end do kk = kk + 1 end do c--------------------------------------------------------------------- c south face c--------------------------------------------------------------------- c = slice(2,1) jj = 0 eta = 0.0d0 kk = 0 do k = cell_low(3,c), cell_high(3,c) zeta = dble(k) * dnzm1 ii = 0 do i = cell_low(1,c), cell_high(1,c) xi = dble(i) * dnxm1 call exact_solution(xi, eta, zeta, temp) do m = 1, 5 u(ii,jj,kk,m,c) = temp(m) end do ii = ii + 1 end do kk = kk + 1 end do c--------------------------------------------------------------------- c north face c--------------------------------------------------------------------- c = slice(2,ncells) jj = cell_size(2,c)-1 eta = 1.0d0 kk = 0 do k = cell_low(3,c), cell_high(3,c) zeta = dble(k) * dnzm1 ii = 0 do i = cell_low(1,c), cell_high(1,c) xi = dble(i) * dnxm1 call exact_solution(xi, eta, zeta, temp) do m = 1, 5 u(ii,jj,kk,m,c) = temp(m) end do ii = ii + 1 end do kk = kk + 1 end do c--------------------------------------------------------------------- c bottom face c--------------------------------------------------------------------- c = slice(3,1) kk = 0 zeta = 0.0d0 ii = 0 do i =cell_low(1,c), cell_high(1,c) xi = dble(i) *dnxm1 jj = 0 do j = cell_low(2,c), cell_high(2,c) eta = dble(j) * dnym1 call exact_solution(xi, eta, zeta, temp) do m = 1, 5 u(ii,jj,kk,m,c) = temp(m) end do jj = jj + 1 end do ii = ii + 1 end do c--------------------------------------------------------------------- c top face c--------------------------------------------------------------------- c = slice(3,ncells) kk = cell_size(3,c)-1 zeta = 1.0d0 ii = 0 do i =cell_low(1,c), cell_high(1,c) xi = dble(i) * dnxm1 jj = 0 do j = cell_low(2,c), cell_high(2,c) eta = dble(j) * dnym1 call exact_solution(xi, eta, zeta, temp) do m = 1, 5 u(ii,jj,kk,m,c) = temp(m) end do jj = jj + 1 end do ii = ii + 1 end do return end subroutine lhsinit include 'header.h' integer i, j, k, d, c, n c--------------------------------------------------------------------- c loop over all cells c--------------------------------------------------------------------- do c = 1, ncells c--------------------------------------------------------------------- c first, initialize the start and end arrays c--------------------------------------------------------------------- do d = 1, 3 if (cell_coord(d,c) .eq. 1) then start(d,c) = 1 else start(d,c) = 0 endif if (cell_coord(d,c) .eq. ncells) then end(d,c) = 1 else end(d,c) = 0 endif end do c--------------------------------------------------------------------- c zap the whole left hand side for starters c--------------------------------------------------------------------- do n = 1, 15 do k = 0, cell_size(3,c)-1 do j = 0, cell_size(2,c)-1 do i = 0, cell_size(1,c)-1 lhs(i,j,k,n,c) = 0.0d0 end do end do end do end do c--------------------------------------------------------------------- c next, set all diagonal values to 1. This is overkill, but convenient c--------------------------------------------------------------------- do n = 1, 3 do k = 0, cell_size(3,c)-1 do j = 0, cell_size(2,c)-1 do i = 0, cell_size(1,c)-1 lhs(i,j,k,5*n-2,c) = 1.0d0 end do end do end do end do end do return end tau-2.16.4/examples/NPB2.3/SP/inputsp.data.sample000066400000000000000000000001641062343042700212160ustar00rootroot00000000000000400 number of time steps 0.0015d0 dt for class A = 0.0015d0. class B = 0.001d0 class C = 0.00067d0 64 64 64 tau-2.16.4/examples/NPB2.3/SP/lhsx.f000066400000000000000000000117071062343042700165330ustar00rootroot00000000000000 c--------------------------------------------------------------------- c--------------------------------------------------------------------- subroutine lhsx(c) c--------------------------------------------------------------------- c--------------------------------------------------------------------- c--------------------------------------------------------------------- c This function computes the left hand side for the three x-factors c--------------------------------------------------------------------- include 'header.h' double precision ru1 integer i, j, k, c c--------------------------------------------------------------------- c treat only cell c c--------------------------------------------------------------------- c--------------------------------------------------------------------- c first fill the lhs for the u-eigenvalue c--------------------------------------------------------------------- do k = start(3,c), cell_size(3,c)-end(3,c)-1 do j = start(2,c), cell_size(2,c)-end(2,c)-1 do i = start(1,c)-1, cell_size(1,c)-end(1,c) ru1 = c3c4*rho_i(i,j,k,c) cv(i) = us(i,j,k,c) rhon(i) = dmax1(dx2+con43*ru1, > dx5+c1c5*ru1, > dxmax+ru1, > dx1) end do do i = start(1,c), cell_size(1,c)-end(1,c)-1 lhs(i,j,k,1,c) = 0.0d0 lhs(i,j,k,2,c) = - dttx2 * cv(i-1) - dttx1 * rhon(i-1) lhs(i,j,k,3,c) = 1.0d0 + c2dttx1 * rhon(i) lhs(i,j,k,4,c) = dttx2 * cv(i+1) - dttx1 * rhon(i+1) lhs(i,j,k,5,c) = 0.0d0 end do end do end do c--------------------------------------------------------------------- c add fourth order dissipation c--------------------------------------------------------------------- if (start(1,c) .gt. 0) then i = 1 do k = start(3,c), cell_size(3,c)-end(3,c)-1 do j = start(2,c), cell_size(2,c)-end(2,c)-1 lhs(i,j,k,3,c) = lhs(i,j,k,3,c) + comz5 lhs(i,j,k,4,c) = lhs(i,j,k,4,c) - comz4 lhs(i,j,k,5,c) = lhs(i,j,k,5,c) + comz1 lhs(i+1,j,k,2,c) = lhs(i+1,j,k,2,c) - comz4 lhs(i+1,j,k,3,c) = lhs(i+1,j,k,3,c) + comz6 lhs(i+1,j,k,4,c) = lhs(i+1,j,k,4,c) - comz4 lhs(i+1,j,k,5,c) = lhs(i+1,j,k,5,c) + comz1 end do end do endif do k = start(3,c), cell_size(3,c)-end(3,c)-1 do j = start(2,c), cell_size(2,c)-end(2,c)-1 do i=3*start(1,c), cell_size(1,c)-3*end(1,c)-1 lhs(i,j,k,1,c) = lhs(i,j,k,1,c) + comz1 lhs(i,j,k,2,c) = lhs(i,j,k,2,c) - comz4 lhs(i,j,k,3,c) = lhs(i,j,k,3,c) + comz6 lhs(i,j,k,4,c) = lhs(i,j,k,4,c) - comz4 lhs(i,j,k,5,c) = lhs(i,j,k,5,c) + comz1 end do end do end do if (end(1,c) .gt. 0) then i = cell_size(1,c)-3 do k = start(3,c), cell_size(3,c)-end(3,c)-1 do j = start(2,c), cell_size(2,c)-end(2,c)-1 lhs(i,j,k,1,c) = lhs(i,j,k,1,c) + comz1 lhs(i,j,k,2,c) = lhs(i,j,k,2,c) - comz4 lhs(i,j,k,3,c) = lhs(i,j,k,3,c) + comz6 lhs(i,j,k,4,c) = lhs(i,j,k,4,c) - comz4 lhs(i+1,j,k,1,c) = lhs(i+1,j,k,1,c) + comz1 lhs(i+1,j,k,2,c) = lhs(i+1,j,k,2,c) - comz4 lhs(i+1,j,k,3,c) = lhs(i+1,j,k,3,c) + comz5 end do end do endif c--------------------------------------------------------------------- c subsequently, fill the other factors (u+c), (u-c) by a4ing to c the first c--------------------------------------------------------------------- do k = start(3,c), cell_size(3,c)-end(3,c)-1 do j = start(2,c), cell_size(2,c)-end(2,c)-1 do i = start(1,c), cell_size(1,c)-end(1,c)-1 lhs(i,j,k,1+5,c) = lhs(i,j,k,1,c) lhs(i,j,k,2+5,c) = lhs(i,j,k,2,c) - > dttx2 * speed(i-1,j,k,c) lhs(i,j,k,3+5,c) = lhs(i,j,k,3,c) lhs(i,j,k,4+5,c) = lhs(i,j,k,4,c) + > dttx2 * speed(i+1,j,k,c) lhs(i,j,k,5+5,c) = lhs(i,j,k,5,c) lhs(i,j,k,1+10,c) = lhs(i,j,k,1,c) lhs(i,j,k,2+10,c) = lhs(i,j,k,2,c) + > dttx2 * speed(i-1,j,k,c) lhs(i,j,k,3+10,c) = lhs(i,j,k,3,c) lhs(i,j,k,4+10,c) = lhs(i,j,k,4,c) - > dttx2 * speed(i+1,j,k,c) lhs(i,j,k,5+10,c) = lhs(i,j,k,5,c) end do end do end do return end tau-2.16.4/examples/NPB2.3/SP/lhsy.f000066400000000000000000000116641062343042700165360ustar00rootroot00000000000000 c--------------------------------------------------------------------- c--------------------------------------------------------------------- subroutine lhsy(c) c--------------------------------------------------------------------- c--------------------------------------------------------------------- c--------------------------------------------------------------------- c This function computes the left hand side for the three y-factors c--------------------------------------------------------------------- include 'header.h' double precision ru1 integer i, j, k, c c--------------------------------------------------------------------- c treat only cell c c--------------------------------------------------------------------- c--------------------------------------------------------------------- c first fill the lhs for the u-eigenvalue c--------------------------------------------------------------------- do k = start(3,c), cell_size(3,c)-end(3,c)-1 do i = start(1,c), cell_size(1,c)-end(1,c)-1 do j = start(2,c)-1, cell_size(2,c)-end(2,c) ru1 = c3c4*rho_i(i,j,k,c) cv(j) = vs(i,j,k,c) rhoq(j) = dmax1( dy3 + con43 * ru1, > dy5 + c1c5*ru1, > dymax + ru1, > dy1) end do do j = start(2,c), cell_size(2,c)-end(2,c)-1 lhs(i,j,k,1,c) = 0.0d0 lhs(i,j,k,2,c) = -dtty2 * cv(j-1) - dtty1 * rhoq(j-1) lhs(i,j,k,3,c) = 1.0 + c2dtty1 * rhoq(j) lhs(i,j,k,4,c) = dtty2 * cv(j+1) - dtty1 * rhoq(j+1) lhs(i,j,k,5,c) = 0.0d0 end do end do end do c--------------------------------------------------------------------- c add fourth order dissipation c--------------------------------------------------------------------- if (start(2,c) .gt. 0) then j = 1 do k = start(3,c), cell_size(3,c)-end(3,c)-1 do i = start(1,c), cell_size(1,c)-end(1,c)-1 lhs(i,j,k,3,c) = lhs(i,j,k,3,c) + comz5 lhs(i,j,k,4,c) = lhs(i,j,k,4,c) - comz4 lhs(i,j,k,5,c) = lhs(i,j,k,5,c) + comz1 lhs(i,j+1,k,2,c) = lhs(i,j+1,k,2,c) - comz4 lhs(i,j+1,k,3,c) = lhs(i,j+1,k,3,c) + comz6 lhs(i,j+1,k,4,c) = lhs(i,j+1,k,4,c) - comz4 lhs(i,j+1,k,5,c) = lhs(i,j+1,k,5,c) + comz1 end do end do endif do k = start(3,c), cell_size(3,c)-end(3,c)-1 do j=3*start(2,c), cell_size(2,c)-3*end(2,c)-1 do i = start(1,c), cell_size(1,c)-end(1,c)-1 lhs(i,j,k,1,c) = lhs(i,j,k,1,c) + comz1 lhs(i,j,k,2,c) = lhs(i,j,k,2,c) - comz4 lhs(i,j,k,3,c) = lhs(i,j,k,3,c) + comz6 lhs(i,j,k,4,c) = lhs(i,j,k,4,c) - comz4 lhs(i,j,k,5,c) = lhs(i,j,k,5,c) + comz1 end do end do end do if (end(2,c) .gt. 0) then j = cell_size(2,c)-3 do k = start(3,c), cell_size(3,c)-end(3,c)-1 do i = start(1,c), cell_size(1,c)-end(1,c)-1 lhs(i,j,k,1,c) = lhs(i,j,k,1,c) + comz1 lhs(i,j,k,2,c) = lhs(i,j,k,2,c) - comz4 lhs(i,j,k,3,c) = lhs(i,j,k,3,c) + comz6 lhs(i,j,k,4,c) = lhs(i,j,k,4,c) - comz4 lhs(i,j+1,k,1,c) = lhs(i,j+1,k,1,c) + comz1 lhs(i,j+1,k,2,c) = lhs(i,j+1,k,2,c) - comz4 lhs(i,j+1,k,3,c) = lhs(i,j+1,k,3,c) + comz5 end do end do endif c--------------------------------------------------------------------- c subsequently, do the other two factors c--------------------------------------------------------------------- do k = start(3,c), cell_size(3,c)-end(3,c)-1 do j = start(2,c), cell_size(2,c)-end(2,c)-1 do i = start(1,c), cell_size(1,c)-end(1,c)-1 lhs(i,j,k,1+5,c) = lhs(i,j,k,1,c) lhs(i,j,k,2+5,c) = lhs(i,j,k,2,c) - > dtty2 * speed(i,j-1,k,c) lhs(i,j,k,3+5,c) = lhs(i,j,k,3,c) lhs(i,j,k,4+5,c) = lhs(i,j,k,4,c) + > dtty2 * speed(i,j+1,k,c) lhs(i,j,k,5+5,c) = lhs(i,j,k,5,c) lhs(i,j,k,1+10,c) = lhs(i,j,k,1,c) lhs(i,j,k,2+10,c) = lhs(i,j,k,2,c) + > dtty2 * speed(i,j-1,k,c) lhs(i,j,k,3+10,c) = lhs(i,j,k,3,c) lhs(i,j,k,4+10,c) = lhs(i,j,k,4,c) - > dtty2 * speed(i,j+1,k,c) lhs(i,j,k,5+10,c) = lhs(i,j,k,5,c) end do end do end do return end tau-2.16.4/examples/NPB2.3/SP/lhsz.f000066400000000000000000000117251062343042700165350ustar00rootroot00000000000000 c--------------------------------------------------------------------- c--------------------------------------------------------------------- subroutine lhsz(c) c--------------------------------------------------------------------- c--------------------------------------------------------------------- c--------------------------------------------------------------------- c This function computes the left hand side for the three z-factors c--------------------------------------------------------------------- include 'header.h' double precision ru1 integer i, j, k, c c--------------------------------------------------------------------- c treat only cell c c--------------------------------------------------------------------- c--------------------------------------------------------------------- c first fill the lhs for the u-eigenvalue c--------------------------------------------------------------------- do j = start(2,c), cell_size(2,c)-end(2,c)-1 do i = start(1,c), cell_size(1,c)-end(1,c)-1 do k = start(3,c)-1, cell_size(3,c)-end(3,c) ru1 = c3c4*rho_i(i,j,k,c) cv(k) = ws(i,j,k,c) rhos(k) = dmax1(dz4 + con43 * ru1, > dz5 + c1c5 * ru1, > dzmax + ru1, > dz1) end do do k = start(3,c), cell_size(3,c)-end(3,c)-1 lhs(i,j,k,1,c) = 0.0d0 lhs(i,j,k,2,c) = -dttz2 * cv(k-1) - dttz1 * rhos(k-1) lhs(i,j,k,3,c) = 1.0 + c2dttz1 * rhos(k) lhs(i,j,k,4,c) = dttz2 * cv(k+1) - dttz1 * rhos(k+1) lhs(i,j,k,5,c) = 0.0d0 end do end do end do c--------------------------------------------------------------------- c add fourth order dissipation c--------------------------------------------------------------------- if (start(3,c) .gt. 0) then k = 1 do j = start(2,c), cell_size(2,c)-end(2,c)-1 do i = start(1,c), cell_size(1,c)-end(1,c)-1 lhs(i,j,k,3,c) = lhs(i,j,k,3,c) + comz5 lhs(i,j,k,4,c) = lhs(i,j,k,4,c) - comz4 lhs(i,j,k,5,c) = lhs(i,j,k,5,c) + comz1 lhs(i,j,k+1,2,c) = lhs(i,j,k+1,2,c) - comz4 lhs(i,j,k+1,3,c) = lhs(i,j,k+1,3,c) + comz6 lhs(i,j,k+1,4,c) = lhs(i,j,k+1,4,c) - comz4 lhs(i,j,k+1,5,c) = lhs(i,j,k+1,5,c) + comz1 end do end do endif do k = 3*start(3,c), cell_size(3,c)-3*end(3,c)-1 do j = start(2,c), cell_size(2,c)-end(2,c)-1 do i = start(1,c), cell_size(1,c)-end(1,c)-1 lhs(i,j,k,1,c) = lhs(i,j,k,1,c) + comz1 lhs(i,j,k,2,c) = lhs(i,j,k,2,c) - comz4 lhs(i,j,k,3,c) = lhs(i,j,k,3,c) + comz6 lhs(i,j,k,4,c) = lhs(i,j,k,4,c) - comz4 lhs(i,j,k,5,c) = lhs(i,j,k,5,c) + comz1 end do end do end do if (end(3,c) .gt. 0) then k = cell_size(3,c)-3 do j = start(2,c), cell_size(2,c)-end(2,c)-1 do i = start(1,c), cell_size(1,c)-end(1,c)-1 lhs(i,j,k,1,c) = lhs(i,j,k,1,c) + comz1 lhs(i,j,k,2,c) = lhs(i,j,k,2,c) - comz4 lhs(i,j,k,3,c) = lhs(i,j,k,3,c) + comz6 lhs(i,j,k,4,c) = lhs(i,j,k,4,c) - comz4 lhs(i,j,k+1,1,c) = lhs(i,j,k+1,1,c) + comz1 lhs(i,j,k+1,2,c) = lhs(i,j,k+1,2,c) - comz4 lhs(i,j,k+1,3,c) = lhs(i,j,k+1,3,c) + comz5 end do end do endif c--------------------------------------------------------------------- c subsequently, fill the other factors (u+c), (u-c) c--------------------------------------------------------------------- do k = start(3,c), cell_size(3,c)-end(3,c)-1 do j = start(2,c), cell_size(2,c)-end(2,c)-1 do i = start(1,c), cell_size(1,c)-end(1,c)-1 lhs(i,j,k,1+5,c) = lhs(i,j,k,1,c) lhs(i,j,k,2+5,c) = lhs(i,j,k,2,c) - > dttz2 * speed(i,j,k-1,c) lhs(i,j,k,3+5,c) = lhs(i,j,k,3,c) lhs(i,j,k,4+5,c) = lhs(i,j,k,4,c) + > dttz2 * speed(i,j,k+1,c) lhs(i,j,k,5+5,c) = lhs(i,j,k,5,c) lhs(i,j,k,1+10,c) = lhs(i,j,k,1,c) lhs(i,j,k,2+10,c) = lhs(i,j,k,2,c) + > dttz2 * speed(i,j,k-1,c) lhs(i,j,k,3+10,c) = lhs(i,j,k,3,c) lhs(i,j,k,4+10,c) = lhs(i,j,k,4,c) - > dttz2 * speed(i,j,k+1,c) lhs(i,j,k,5+10,c) = lhs(i,j,k,5,c) end do end do end do return end tau-2.16.4/examples/NPB2.3/SP/make_set.f000066400000000000000000000117631062343042700173470ustar00rootroot00000000000000 c--------------------------------------------------------------------- c--------------------------------------------------------------------- subroutine make_set c--------------------------------------------------------------------- c--------------------------------------------------------------------- c--------------------------------------------------------------------- c This function allocates space for a set of cells and fills the set c such that communication between cells on different nodes is only c nearest neighbor c--------------------------------------------------------------------- include 'header.h' include 'mpinpb.h' integer p, i, j, c, dir, size, excess, ierr,ierrcode c--------------------------------------------------------------------- c compute square root; add small number to allow for roundoff c (note: this is computed in setup_mpi.f also, but prefer to do c it twice because of some include file problems). c--------------------------------------------------------------------- ncells = dint(dsqrt(dble(no_nodes) + 0.00001d0)) c--------------------------------------------------------------------- c this makes coding easier c--------------------------------------------------------------------- p = ncells c--------------------------------------------------------------------- c determine the location of the cell at the bottom of the 3D c array of cells c--------------------------------------------------------------------- cell_coord(1,1) = mod(node,p) cell_coord(2,1) = node/p cell_coord(3,1) = 0 c--------------------------------------------------------------------- c set the cell_coords for cells in the rest of the z-layers; c this comes down to a simple linear numbering in the z-direct- c ion, and to the doubly-cyclic numbering in the other dirs c--------------------------------------------------------------------- do c=2, p cell_coord(1,c) = mod(cell_coord(1,c-1)+1,p) cell_coord(2,c) = mod(cell_coord(2,c-1)-1+p,p) cell_coord(3,c) = c-1 end do c--------------------------------------------------------------------- c offset all the coordinates by 1 to adjust for Fortran arrays c--------------------------------------------------------------------- do dir = 1, 3 do c = 1, p cell_coord(dir,c) = cell_coord(dir,c) + 1 end do end do c--------------------------------------------------------------------- c slice(dir,n) contains the sequence number of the cell that is in c coordinate plane n in the dir direction c--------------------------------------------------------------------- do dir = 1, 3 do c = 1, p slice(dir,cell_coord(dir,c)) = c end do end do c--------------------------------------------------------------------- c fill the predecessor and successor entries, using the indices c of the bottom cells (they are the same at each level of k c anyway) acting as if full periodicity pertains; note that p is c added to those arguments to the mod functions that might c otherwise return wrong values when using the modulo function c--------------------------------------------------------------------- i = cell_coord(1,1)-1 j = cell_coord(2,1)-1 predecessor(1) = mod(i-1+p,p) + p*j predecessor(2) = i + p*mod(j-1+p,p) predecessor(3) = mod(i+1,p) + p*mod(j-1+p,p) successor(1) = mod(i+1,p) + p*j successor(2) = i + p*mod(j+1,p) successor(3) = mod(i-1+p,p) + p*mod(j+1,p) c--------------------------------------------------------------------- c now compute the sizes of the cells c--------------------------------------------------------------------- do dir= 1, 3 c--------------------------------------------------------------------- c set cell_coord range for each direction c--------------------------------------------------------------------- size = grid_points(dir)/p excess = mod(grid_points(dir),p) do c=1, ncells if (cell_coord(dir,c) .le. excess) then cell_size(dir,c) = size+1 cell_low(dir,c) = (cell_coord(dir,c)-1)*(size+1) cell_high(dir,c) = cell_low(dir,c)+size else cell_size(dir,c) = size cell_low(dir,c) = excess*(size+1)+ > (cell_coord(dir,c)-excess-1)*size cell_high(dir,c) = cell_low(dir,c)+size-1 endif if (cell_size(dir, c) .le. 2) then write(*,50) 50 format(' Error: Cell size too small. Min size is 3') call MPI_Abort(mpi_comm_world,ierrcode,ierr) stop endif end do end do return end tau-2.16.4/examples/NPB2.3/SP/mpinpb.h000066400000000000000000000010311062343042700170310ustar00rootroot00000000000000 c--------------------------------------------------------------------- c--------------------------------------------------------------------- include 'mpif.h' integer node, no_nodes, total_nodes, root, comm_setup, > comm_solve, comm_rhs, dp_type logical active common /mpistuff/ node, no_nodes, total_nodes, root, comm_setup, > comm_solve, comm_rhs, dp_type, active integer DEFAULT_TAG parameter (DEFAULT_TAG = 0) tau-2.16.4/examples/NPB2.3/SP/ninvr.f000066400000000000000000000030071062343042700167030ustar00rootroot00000000000000 c--------------------------------------------------------------------- c--------------------------------------------------------------------- subroutine ninvr(c) c--------------------------------------------------------------------- c--------------------------------------------------------------------- c--------------------------------------------------------------------- c block-diagonal matrix-vector multiplication c--------------------------------------------------------------------- include 'header.h' integer c, i, j, k double precision r1, r2, r3, r4, r5, t1, t2 c--------------------------------------------------------------------- c treat only one cell c--------------------------------------------------------------------- do k = start(3,c), cell_size(3,c)-end(3,c)-1 do j = start(2,c), cell_size(2,c)-end(2,c)-1 do i = start(1,c), cell_size(1,c)-end(1,c)-1 r1 = rhs(i,j,k,1,c) r2 = rhs(i,j,k,2,c) r3 = rhs(i,j,k,3,c) r4 = rhs(i,j,k,4,c) r5 = rhs(i,j,k,5,c) t1 = bt * r3 t2 = 0.5d0 * ( r4 + r5 ) rhs(i,j,k,1,c) = -r2 rhs(i,j,k,2,c) = r1 rhs(i,j,k,3,c) = bt * ( r4 - r5 ) rhs(i,j,k,4,c) = -t1 + t2 rhs(i,j,k,5,c) = t1 + t2 enddo enddo enddo return end tau-2.16.4/examples/NPB2.3/SP/pinvr.f000066400000000000000000000030171062343042700167060ustar00rootroot00000000000000 c--------------------------------------------------------------------- c--------------------------------------------------------------------- subroutine pinvr(c) c--------------------------------------------------------------------- c--------------------------------------------------------------------- c--------------------------------------------------------------------- c block-diagonal matrix-vector multiplication c--------------------------------------------------------------------- include 'header.h' integer i, j, k, c double precision r1, r2, r3, r4, r5, t1, t2 c--------------------------------------------------------------------- c treat only one cell c--------------------------------------------------------------------- do k = start(3,c), cell_size(3,c)-end(3,c)-1 do j = start(2,c), cell_size(2,c)-end(2,c)-1 do i = start(1,c), cell_size(1,c)-end(1,c)-1 r1 = rhs(i,j,k,1,c) r2 = rhs(i,j,k,2,c) r3 = rhs(i,j,k,3,c) r4 = rhs(i,j,k,4,c) r5 = rhs(i,j,k,5,c) t1 = bt * r1 t2 = 0.5d0 * ( r4 + r5 ) rhs(i,j,k,1,c) = bt * ( r4 - r5 ) rhs(i,j,k,2,c) = -r3 rhs(i,j,k,3,c) = r2 rhs(i,j,k,4,c) = -t1 + t2 rhs(i,j,k,5,c) = t1 + t2 end do end do end do return end tau-2.16.4/examples/NPB2.3/SP/rhs.f000066400000000000000000000472371062343042700163600ustar00rootroot00000000000000c--------------------------------------------------------------------- c--------------------------------------------------------------------- subroutine compute_rhs c--------------------------------------------------------------------- c--------------------------------------------------------------------- include 'header.h' integer c, i, j, k, m double precision aux, rho_inv, uijk, up1, um1, vijk, vp1, vm1, > wijk, wp1, wm1 c--------------------------------------------------------------------- c loop over all cells owned by this node c--------------------------------------------------------------------- do c = 1, ncells c--------------------------------------------------------------------- c compute the reciprocal of density, and the kinetic energy, c and the speed of sound. c--------------------------------------------------------------------- do k = -1, cell_size(3,c) do j = -1, cell_size(2,c) do i = -1, cell_size(1,c) rho_inv = 1.0d0/u(i,j,k,1,c) rho_i(i,j,k,c) = rho_inv us(i,j,k,c) = u(i,j,k,2,c) * rho_inv vs(i,j,k,c) = u(i,j,k,3,c) * rho_inv ws(i,j,k,c) = u(i,j,k,4,c) * rho_inv square(i,j,k,c) = 0.5d0* ( > u(i,j,k,2,c)*u(i,j,k,2,c) + > u(i,j,k,3,c)*u(i,j,k,3,c) + > u(i,j,k,4,c)*u(i,j,k,4,c) ) * rho_inv qs(i,j,k,c) = square(i,j,k,c) * rho_inv c--------------------------------------------------------------------- c (don't need speed and ainx until the lhs computation) c--------------------------------------------------------------------- aux = c1c2*rho_inv* (u(i,j,k,5,c) - square(i,j,k,c)) aux = dsqrt(aux) speed(i,j,k,c) = aux ainv(i,j,k,c) = 1.0d0/aux end do end do end do c--------------------------------------------------------------------- c copy the exact forcing term to the right hand side; because c this forcing term is known, we can store it on the whole of every c cell, including the boundary c--------------------------------------------------------------------- do m = 1, 5 do k = 0, cell_size(3,c)-1 do j = 0, cell_size(2,c)-1 do i = 0, cell_size(1,c)-1 rhs(i,j,k,m,c) = forcing(i,j,k,m,c) end do end do end do end do c--------------------------------------------------------------------- c compute xi-direction fluxes c--------------------------------------------------------------------- do k = start(3,c), cell_size(3,c)-end(3,c)-1 do j = start(2,c), cell_size(2,c)-end(2,c)-1 do i = start(1,c), cell_size(1,c)-end(1,c)-1 uijk = us(i,j,k,c) up1 = us(i+1,j,k,c) um1 = us(i-1,j,k,c) rhs(i,j,k,1,c) = rhs(i,j,k,1,c) + dx1tx1 * > (u(i+1,j,k,1,c) - 2.0d0*u(i,j,k,1,c) + > u(i-1,j,k,1,c)) - > tx2 * (u(i+1,j,k,2,c) - u(i-1,j,k,2,c)) rhs(i,j,k,2,c) = rhs(i,j,k,2,c) + dx2tx1 * > (u(i+1,j,k,2,c) - 2.0d0*u(i,j,k,2,c) + > u(i-1,j,k,2,c)) + > xxcon2*con43 * (up1 - 2.0d0*uijk + um1) - > tx2 * (u(i+1,j,k,2,c)*up1 - > u(i-1,j,k,2,c)*um1 + > (u(i+1,j,k,5,c)- square(i+1,j,k,c)- > u(i-1,j,k,5,c)+ square(i-1,j,k,c))* > c2) rhs(i,j,k,3,c) = rhs(i,j,k,3,c) + dx3tx1 * > (u(i+1,j,k,3,c) - 2.0d0*u(i,j,k,3,c) + > u(i-1,j,k,3,c)) + > xxcon2 * (vs(i+1,j,k,c) - 2.0d0*vs(i,j,k,c) + > vs(i-1,j,k,c)) - > tx2 * (u(i+1,j,k,3,c)*up1 - > u(i-1,j,k,3,c)*um1) rhs(i,j,k,4,c) = rhs(i,j,k,4,c) + dx4tx1 * > (u(i+1,j,k,4,c) - 2.0d0*u(i,j,k,4,c) + > u(i-1,j,k,4,c)) + > xxcon2 * (ws(i+1,j,k,c) - 2.0d0*ws(i,j,k,c) + > ws(i-1,j,k,c)) - > tx2 * (u(i+1,j,k,4,c)*up1 - > u(i-1,j,k,4,c)*um1) rhs(i,j,k,5,c) = rhs(i,j,k,5,c) + dx5tx1 * > (u(i+1,j,k,5,c) - 2.0d0*u(i,j,k,5,c) + > u(i-1,j,k,5,c)) + > xxcon3 * (qs(i+1,j,k,c) - 2.0d0*qs(i,j,k,c) + > qs(i-1,j,k,c)) + > xxcon4 * (up1*up1 - 2.0d0*uijk*uijk + > um1*um1) + > xxcon5 * (u(i+1,j,k,5,c)*rho_i(i+1,j,k,c) - > 2.0d0*u(i,j,k,5,c)*rho_i(i,j,k,c) + > u(i-1,j,k,5,c)*rho_i(i-1,j,k,c)) - > tx2 * ( (c1*u(i+1,j,k,5,c) - > c2*square(i+1,j,k,c))*up1 - > (c1*u(i-1,j,k,5,c) - > c2*square(i-1,j,k,c))*um1 ) end do end do end do c--------------------------------------------------------------------- c add fourth order xi-direction dissipation c--------------------------------------------------------------------- if (start(1,c) .gt. 0) then i = 1 do m = 1, 5 do k = start(3,c), cell_size(3,c)-end(3,c)-1 do j = start(2,c), cell_size(2,c)-end(2,c)-1 rhs(i,j,k,m,c) = rhs(i,j,k,m,c)- dssp * > ( 5.0d0*u(i,j,k,m,c) - 4.0d0*u(i+1,j,k,m,c) + > u(i+2,j,k,m,c)) end do end do end do i = 2 do m = 1, 5 do k = start(3,c), cell_size(3,c)-end(3,c)-1 do j = start(2,c), cell_size(2,c)-end(2,c)-1 rhs(i,j,k,m,c) = rhs(i,j,k,m,c) - dssp * > (-4.0d0*u(i-1,j,k,m,c) + 6.0d0*u(i,j,k,m,c) - > 4.0d0*u(i+1,j,k,m,c) + u(i+2,j,k,m,c)) end do end do end do endif do m = 1, 5 do k = start(3,c), cell_size(3,c)-end(3,c)-1 do j = start(2,c), cell_size(2,c)-end(2,c)-1 do i = 3*start(1,c),cell_size(1,c)-3*end(1,c)-1 rhs(i,j,k,m,c) = rhs(i,j,k,m,c) - dssp * > ( u(i-2,j,k,m,c) - 4.0d0*u(i-1,j,k,m,c) + > 6.0*u(i,j,k,m,c) - 4.0d0*u(i+1,j,k,m,c) + > u(i+2,j,k,m,c) ) end do end do end do end do if (end(1,c) .gt. 0) then i = cell_size(1,c)-3 do m = 1, 5 do k = start(3,c), cell_size(3,c)-end(3,c)-1 do j = start(2,c), cell_size(2,c)-end(2,c)-1 rhs(i,j,k,m,c) = rhs(i,j,k,m,c) - dssp * > ( u(i-2,j,k,m,c) - 4.0d0*u(i-1,j,k,m,c) + > 6.0d0*u(i,j,k,m,c) - 4.0d0*u(i+1,j,k,m,c) ) end do end do end do i = cell_size(1,c)-2 do m = 1, 5 do k = start(3,c), cell_size(3,c)-end(3,c)-1 do j = start(2,c), cell_size(2,c)-end(2,c)-1 rhs(i,j,k,m,c) = rhs(i,j,k,m,c) - dssp * > ( u(i-2,j,k,m,c) - 4.d0*u(i-1,j,k,m,c) + > 5.d0*u(i,j,k,m,c) ) end do end do end do endif c--------------------------------------------------------------------- c compute eta-direction fluxes c--------------------------------------------------------------------- do k = start(3,c), cell_size(3,c)-end(3,c)-1 do j = start(2,c), cell_size(2,c)-end(2,c)-1 do i = start(1,c), cell_size(1,c)-end(1,c)-1 vijk = vs(i,j,k,c) vp1 = vs(i,j+1,k,c) vm1 = vs(i,j-1,k,c) rhs(i,j,k,1,c) = rhs(i,j,k,1,c) + dy1ty1 * > (u(i,j+1,k,1,c) - 2.0d0*u(i,j,k,1,c) + > u(i,j-1,k,1,c)) - > ty2 * (u(i,j+1,k,3,c) - u(i,j-1,k,3,c)) rhs(i,j,k,2,c) = rhs(i,j,k,2,c) + dy2ty1 * > (u(i,j+1,k,2,c) - 2.0d0*u(i,j,k,2,c) + > u(i,j-1,k,2,c)) + > yycon2 * (us(i,j+1,k,c) - 2.0d0*us(i,j,k,c) + > us(i,j-1,k,c)) - > ty2 * (u(i,j+1,k,2,c)*vp1 - > u(i,j-1,k,2,c)*vm1) rhs(i,j,k,3,c) = rhs(i,j,k,3,c) + dy3ty1 * > (u(i,j+1,k,3,c) - 2.0d0*u(i,j,k,3,c) + > u(i,j-1,k,3,c)) + > yycon2*con43 * (vp1 - 2.0d0*vijk + vm1) - > ty2 * (u(i,j+1,k,3,c)*vp1 - > u(i,j-1,k,3,c)*vm1 + > (u(i,j+1,k,5,c) - square(i,j+1,k,c) - > u(i,j-1,k,5,c) + square(i,j-1,k,c)) > *c2) rhs(i,j,k,4,c) = rhs(i,j,k,4,c) + dy4ty1 * > (u(i,j+1,k,4,c) - 2.0d0*u(i,j,k,4,c) + > u(i,j-1,k,4,c)) + > yycon2 * (ws(i,j+1,k,c) - 2.0d0*ws(i,j,k,c) + > ws(i,j-1,k,c)) - > ty2 * (u(i,j+1,k,4,c)*vp1 - > u(i,j-1,k,4,c)*vm1) rhs(i,j,k,5,c) = rhs(i,j,k,5,c) + dy5ty1 * > (u(i,j+1,k,5,c) - 2.0d0*u(i,j,k,5,c) + > u(i,j-1,k,5,c)) + > yycon3 * (qs(i,j+1,k,c) - 2.0d0*qs(i,j,k,c) + > qs(i,j-1,k,c)) + > yycon4 * (vp1*vp1 - 2.0d0*vijk*vijk + > vm1*vm1) + > yycon5 * (u(i,j+1,k,5,c)*rho_i(i,j+1,k,c) - > 2.0d0*u(i,j,k,5,c)*rho_i(i,j,k,c) + > u(i,j-1,k,5,c)*rho_i(i,j-1,k,c)) - > ty2 * ((c1*u(i,j+1,k,5,c) - > c2*square(i,j+1,k,c)) * vp1 - > (c1*u(i,j-1,k,5,c) - > c2*square(i,j-1,k,c)) * vm1) end do end do end do c--------------------------------------------------------------------- c add fourth order eta-direction dissipation c--------------------------------------------------------------------- if (start(2,c) .gt. 0) then j = 1 do m = 1, 5 do k = start(3,c), cell_size(3,c)-end(3,c)-1 do i = start(1,c), cell_size(1,c)-end(1,c)-1 rhs(i,j,k,m,c) = rhs(i,j,k,m,c)- dssp * > ( 5.0d0*u(i,j,k,m,c) - 4.0d0*u(i,j+1,k,m,c) + > u(i,j+2,k,m,c)) end do end do end do j = 2 do m = 1, 5 do k = start(3,c), cell_size(3,c)-end(3,c)-1 do i = start(1,c), cell_size(1,c)-end(1,c)-1 rhs(i,j,k,m,c) = rhs(i,j,k,m,c) - dssp * > (-4.0d0*u(i,j-1,k,m,c) + 6.0d0*u(i,j,k,m,c) - > 4.0d0*u(i,j+1,k,m,c) + u(i,j+2,k,m,c)) end do end do end do endif do m = 1, 5 do k = start(3,c), cell_size(3,c)-end(3,c)-1 do j = 3*start(2,c), cell_size(2,c)-3*end(2,c)-1 do i = start(1,c),cell_size(1,c)-end(1,c)-1 rhs(i,j,k,m,c) = rhs(i,j,k,m,c) - dssp * > ( u(i,j-2,k,m,c) - 4.0d0*u(i,j-1,k,m,c) + > 6.0*u(i,j,k,m,c) - 4.0d0*u(i,j+1,k,m,c) + > u(i,j+2,k,m,c) ) end do end do end do end do if (end(2,c) .gt. 0) then j = cell_size(2,c)-3 do m = 1, 5 do k = start(3,c), cell_size(3,c)-end(3,c)-1 do i = start(1,c), cell_size(1,c)-end(1,c)-1 rhs(i,j,k,m,c) = rhs(i,j,k,m,c) - dssp * > ( u(i,j-2,k,m,c) - 4.0d0*u(i,j-1,k,m,c) + > 6.0d0*u(i,j,k,m,c) - 4.0d0*u(i,j+1,k,m,c) ) end do end do end do j = cell_size(2,c)-2 do m = 1, 5 do k = start(3,c), cell_size(3,c)-end(3,c)-1 do i = start(1,c), cell_size(1,c)-end(1,c)-1 rhs(i,j,k,m,c) = rhs(i,j,k,m,c) - dssp * > ( u(i,j-2,k,m,c) - 4.d0*u(i,j-1,k,m,c) + > 5.d0*u(i,j,k,m,c) ) end do end do end do endif c--------------------------------------------------------------------- c compute zeta-direction fluxes c--------------------------------------------------------------------- do k = start(3,c), cell_size(3,c)-end(3,c)-1 do j = start(2,c), cell_size(2,c)-end(2,c)-1 do i = start(1,c), cell_size(1,c)-end(1,c)-1 wijk = ws(i,j,k,c) wp1 = ws(i,j,k+1,c) wm1 = ws(i,j,k-1,c) rhs(i,j,k,1,c) = rhs(i,j,k,1,c) + dz1tz1 * > (u(i,j,k+1,1,c) - 2.0d0*u(i,j,k,1,c) + > u(i,j,k-1,1,c)) - > tz2 * (u(i,j,k+1,4,c) - u(i,j,k-1,4,c)) rhs(i,j,k,2,c) = rhs(i,j,k,2,c) + dz2tz1 * > (u(i,j,k+1,2,c) - 2.0d0*u(i,j,k,2,c) + > u(i,j,k-1,2,c)) + > zzcon2 * (us(i,j,k+1,c) - 2.0d0*us(i,j,k,c) + > us(i,j,k-1,c)) - > tz2 * (u(i,j,k+1,2,c)*wp1 - > u(i,j,k-1,2,c)*wm1) rhs(i,j,k,3,c) = rhs(i,j,k,3,c) + dz3tz1 * > (u(i,j,k+1,3,c) - 2.0d0*u(i,j,k,3,c) + > u(i,j,k-1,3,c)) + > zzcon2 * (vs(i,j,k+1,c) - 2.0d0*vs(i,j,k,c) + > vs(i,j,k-1,c)) - > tz2 * (u(i,j,k+1,3,c)*wp1 - > u(i,j,k-1,3,c)*wm1) rhs(i,j,k,4,c) = rhs(i,j,k,4,c) + dz4tz1 * > (u(i,j,k+1,4,c) - 2.0d0*u(i,j,k,4,c) + > u(i,j,k-1,4,c)) + > zzcon2*con43 * (wp1 - 2.0d0*wijk + wm1) - > tz2 * (u(i,j,k+1,4,c)*wp1 - > u(i,j,k-1,4,c)*wm1 + > (u(i,j,k+1,5,c) - square(i,j,k+1,c) - > u(i,j,k-1,5,c) + square(i,j,k-1,c)) > *c2) rhs(i,j,k,5,c) = rhs(i,j,k,5,c) + dz5tz1 * > (u(i,j,k+1,5,c) - 2.0d0*u(i,j,k,5,c) + > u(i,j,k-1,5,c)) + > zzcon3 * (qs(i,j,k+1,c) - 2.0d0*qs(i,j,k,c) + > qs(i,j,k-1,c)) + > zzcon4 * (wp1*wp1 - 2.0d0*wijk*wijk + > wm1*wm1) + > zzcon5 * (u(i,j,k+1,5,c)*rho_i(i,j,k+1,c) - > 2.0d0*u(i,j,k,5,c)*rho_i(i,j,k,c) + > u(i,j,k-1,5,c)*rho_i(i,j,k-1,c)) - > tz2 * ( (c1*u(i,j,k+1,5,c) - > c2*square(i,j,k+1,c))*wp1 - > (c1*u(i,j,k-1,5,c) - > c2*square(i,j,k-1,c))*wm1) end do end do end do c--------------------------------------------------------------------- c add fourth order zeta-direction dissipation c--------------------------------------------------------------------- if (start(3,c) .gt. 0) then k = 1 do m = 1, 5 do j = start(2,c), cell_size(2,c)-end(2,c)-1 do i = start(1,c), cell_size(1,c)-end(1,c)-1 rhs(i,j,k,m,c) = rhs(i,j,k,m,c)- dssp * > ( 5.0d0*u(i,j,k,m,c) - 4.0d0*u(i,j,k+1,m,c) + > u(i,j,k+2,m,c)) end do end do end do k = 2 do m = 1, 5 do j = start(2,c), cell_size(2,c)-end(2,c)-1 do i = start(1,c), cell_size(1,c)-end(1,c)-1 rhs(i,j,k,m,c) = rhs(i,j,k,m,c) - dssp * > (-4.0d0*u(i,j,k-1,m,c) + 6.0d0*u(i,j,k,m,c) - > 4.0d0*u(i,j,k+1,m,c) + u(i,j,k+2,m,c)) end do end do end do endif do m = 1, 5 do k = 3*start(3,c), cell_size(3,c)-3*end(3,c)-1 do j = start(2,c), cell_size(2,c)-end(2,c)-1 do i = start(1,c),cell_size(1,c)-end(1,c)-1 rhs(i,j,k,m,c) = rhs(i,j,k,m,c) - dssp * > ( u(i,j,k-2,m,c) - 4.0d0*u(i,j,k-1,m,c) + > 6.0*u(i,j,k,m,c) - 4.0d0*u(i,j,k+1,m,c) + > u(i,j,k+2,m,c) ) end do end do end do end do if (end(3,c) .gt. 0) then k = cell_size(3,c)-3 do m = 1, 5 do j = start(2,c), cell_size(2,c)-end(2,c)-1 do i = start(1,c), cell_size(1,c)-end(1,c)-1 rhs(i,j,k,m,c) = rhs(i,j,k,m,c) - dssp * > ( u(i,j,k-2,m,c) - 4.0d0*u(i,j,k-1,m,c) + > 6.0d0*u(i,j,k,m,c) - 4.0d0*u(i,j,k+1,m,c) ) end do end do end do k = cell_size(3,c)-2 do m = 1, 5 do j = start(2,c), cell_size(2,c)-end(2,c)-1 do i = start(1,c), cell_size(1,c)-end(1,c)-1 rhs(i,j,k,m,c) = rhs(i,j,k,m,c) - dssp * > ( u(i,j,k-2,m,c) - 4.d0*u(i,j,k-1,m,c) + > 5.d0*u(i,j,k,m,c) ) end do end do end do endif do m = 1, 5 do k = start(3,c), cell_size(3,c)-end(3,c)-1 do j = start(2,c), cell_size(2,c)-end(2,c)-1 do i = start(1,c), cell_size(1,c)-end(1,c)-1 rhs(i,j,k,m,c) = rhs(i,j,k,m,c) * dt end do end do end do end do end do return end tau-2.16.4/examples/NPB2.3/SP/set_constants.f000066400000000000000000000106711062343042700204430ustar00rootroot00000000000000 c--------------------------------------------------------------------- c--------------------------------------------------------------------- subroutine set_constants c--------------------------------------------------------------------- c--------------------------------------------------------------------- include 'header.h' ce(1,1) = 2.0d0 ce(1,2) = 0.0d0 ce(1,3) = 0.0d0 ce(1,4) = 4.0d0 ce(1,5) = 5.0d0 ce(1,6) = 3.0d0 ce(1,7) = 0.5d0 ce(1,8) = 0.02d0 ce(1,9) = 0.01d0 ce(1,10) = 0.03d0 ce(1,11) = 0.5d0 ce(1,12) = 0.4d0 ce(1,13) = 0.3d0 ce(2,1) = 1.0d0 ce(2,2) = 0.0d0 ce(2,3) = 0.0d0 ce(2,4) = 0.0d0 ce(2,5) = 1.0d0 ce(2,6) = 2.0d0 ce(2,7) = 3.0d0 ce(2,8) = 0.01d0 ce(2,9) = 0.03d0 ce(2,10) = 0.02d0 ce(2,11) = 0.4d0 ce(2,12) = 0.3d0 ce(2,13) = 0.5d0 ce(3,1) = 2.0d0 ce(3,2) = 2.0d0 ce(3,3) = 0.0d0 ce(3,4) = 0.0d0 ce(3,5) = 0.0d0 ce(3,6) = 2.0d0 ce(3,7) = 3.0d0 ce(3,8) = 0.04d0 ce(3,9) = 0.03d0 ce(3,10) = 0.05d0 ce(3,11) = 0.3d0 ce(3,12) = 0.5d0 ce(3,13) = 0.4d0 ce(4,1) = 2.0d0 ce(4,2) = 2.0d0 ce(4,3) = 0.0d0 ce(4,4) = 0.0d0 ce(4,5) = 0.0d0 ce(4,6) = 2.0d0 ce(4,7) = 3.0d0 ce(4,8) = 0.03d0 ce(4,9) = 0.05d0 ce(4,10) = 0.04d0 ce(4,11) = 0.2d0 ce(4,12) = 0.1d0 ce(4,13) = 0.3d0 ce(5,1) = 5.0d0 ce(5,2) = 4.0d0 ce(5,3) = 3.0d0 ce(5,4) = 2.0d0 ce(5,5) = 0.1d0 ce(5,6) = 0.4d0 ce(5,7) = 0.3d0 ce(5,8) = 0.05d0 ce(5,9) = 0.04d0 ce(5,10) = 0.03d0 ce(5,11) = 0.1d0 ce(5,12) = 0.3d0 ce(5,13) = 0.2d0 c1 = 1.4d0 c2 = 0.4d0 c3 = 0.1d0 c4 = 1.0d0 c5 = 1.4d0 bt = dsqrt(0.5d0) dnxm1 = 1.0d0 / dble(grid_points(1)-1) dnym1 = 1.0d0 / dble(grid_points(2)-1) dnzm1 = 1.0d0 / dble(grid_points(3)-1) c1c2 = c1 * c2 c1c5 = c1 * c5 c3c4 = c3 * c4 c1345 = c1c5 * c3c4 conz1 = (1.0d0-c1c5) tx1 = 1.0d0 / (dnxm1 * dnxm1) tx2 = 1.0d0 / (2.0d0 * dnxm1) tx3 = 1.0d0 / dnxm1 ty1 = 1.0d0 / (dnym1 * dnym1) ty2 = 1.0d0 / (2.0d0 * dnym1) ty3 = 1.0d0 / dnym1 tz1 = 1.0d0 / (dnzm1 * dnzm1) tz2 = 1.0d0 / (2.0d0 * dnzm1) tz3 = 1.0d0 / dnzm1 dx1 = 0.75d0 dx2 = 0.75d0 dx3 = 0.75d0 dx4 = 0.75d0 dx5 = 0.75d0 dy1 = 0.75d0 dy2 = 0.75d0 dy3 = 0.75d0 dy4 = 0.75d0 dy5 = 0.75d0 dz1 = 1.0d0 dz2 = 1.0d0 dz3 = 1.0d0 dz4 = 1.0d0 dz5 = 1.0d0 dxmax = dmax1(dx3, dx4) dymax = dmax1(dy2, dy4) dzmax = dmax1(dz2, dz3) dssp = 0.25d0 * dmax1(dx1, dmax1(dy1, dz1) ) c4dssp = 4.0d0 * dssp c5dssp = 5.0d0 * dssp dttx1 = dt*tx1 dttx2 = dt*tx2 dtty1 = dt*ty1 dtty2 = dt*ty2 dttz1 = dt*tz1 dttz2 = dt*tz2 c2dttx1 = 2.0d0*dttx1 c2dtty1 = 2.0d0*dtty1 c2dttz1 = 2.0d0*dttz1 dtdssp = dt*dssp comz1 = dtdssp comz4 = 4.0d0*dtdssp comz5 = 5.0d0*dtdssp comz6 = 6.0d0*dtdssp c3c4tx3 = c3c4*tx3 c3c4ty3 = c3c4*ty3 c3c4tz3 = c3c4*tz3 dx1tx1 = dx1*tx1 dx2tx1 = dx2*tx1 dx3tx1 = dx3*tx1 dx4tx1 = dx4*tx1 dx5tx1 = dx5*tx1 dy1ty1 = dy1*ty1 dy2ty1 = dy2*ty1 dy3ty1 = dy3*ty1 dy4ty1 = dy4*ty1 dy5ty1 = dy5*ty1 dz1tz1 = dz1*tz1 dz2tz1 = dz2*tz1 dz3tz1 = dz3*tz1 dz4tz1 = dz4*tz1 dz5tz1 = dz5*tz1 c2iv = 2.5d0 con43 = 4.0d0/3.0d0 con16 = 1.0d0/6.0d0 xxcon1 = c3c4tx3*con43*tx3 xxcon2 = c3c4tx3*tx3 xxcon3 = c3c4tx3*conz1*tx3 xxcon4 = c3c4tx3*con16*tx3 xxcon5 = c3c4tx3*c1c5*tx3 yycon1 = c3c4ty3*con43*ty3 yycon2 = c3c4ty3*ty3 yycon3 = c3c4ty3*conz1*ty3 yycon4 = c3c4ty3*con16*ty3 yycon5 = c3c4ty3*c1c5*ty3 zzcon1 = c3c4tz3*con43*tz3 zzcon2 = c3c4tz3*tz3 zzcon3 = c3c4tz3*conz1*tz3 zzcon4 = c3c4tz3*con16*tz3 zzcon5 = c3c4tz3*c1c5*tz3 return end tau-2.16.4/examples/NPB2.3/SP/setup_mpi.f000066400000000000000000000041611062343042700175560ustar00rootroot00000000000000 c--------------------------------------------------------------------- c--------------------------------------------------------------------- subroutine setup_mpi c--------------------------------------------------------------------- c--------------------------------------------------------------------- c--------------------------------------------------------------------- c set up MPI stuff c--------------------------------------------------------------------- implicit none include 'mpinpb.h' include 'npbparams.h' integer error, nc, color call mpi_init(error) call mpi_comm_size(MPI_COMM_WORLD, total_nodes, error) call mpi_comm_rank(MPI_COMM_WORLD, node, error) call TAU_PROFILE_SET_NODE(node) if (.not. convertdouble) then dp_type = MPI_DOUBLE_PRECISION else dp_type = MPI_REAL endif c--------------------------------------------------------------------- c compute square root; add small number to allow for roundoff c--------------------------------------------------------------------- nc = dint(dsqrt(dble(total_nodes) + 0.00001d0)) c--------------------------------------------------------------------- c We handle a non-square number of nodes by making the excess nodes c inactive. However, we can never handle more cells than were compiled c in. c--------------------------------------------------------------------- if (nc .gt. maxcells) nc = maxcells if (node .ge. nc*nc) then active = .false. color = 1 else active = .true. color = 0 end if call mpi_comm_split(MPI_COMM_WORLD,color,node,comm_setup,error) if (.not. active) return call mpi_comm_size(comm_setup, no_nodes, error) call mpi_comm_dup(comm_setup, comm_solve, error) call mpi_comm_dup(comm_setup, comm_rhs, error) c--------------------------------------------------------------------- c let node 0 be the root for the group (there is only one) c--------------------------------------------------------------------- root = 0 return end tau-2.16.4/examples/NPB2.3/SP/sp.f000066400000000000000000000171511062343042700161760ustar00rootroot00000000000000!-------------------------------------------------------------------------! ! ! ! N A S P A R A L L E L B E N C H M A R K S 2.3 ! ! ! ! S P ! ! ! !-------------------------------------------------------------------------! ! ! ! This benchmark is part of the NAS Parallel Benchmark 2.3 suite. ! ! It is described in NAS Technical Report 95-020. ! ! ! ! Permission to use, copy, distribute and modify this software ! ! for any purpose with or without fee is hereby granted. We ! ! request, however, that all derived work reference the NAS ! ! Parallel Benchmarks 2.3. This software is provided "as is" ! ! without express or implied warranty. ! ! ! ! Information on NPB 2.3, including the technical report, the ! ! original specifications, source code, results and information ! ! on how to submit new results, is available at: ! ! ! ! http://science.nas.nasa.gov/Software/NPB/ ! ! ! ! Send comments or suggestions to npb@nas.nasa.gov ! ! Send bug reports to npb-bugs@nas.nasa.gov ! ! ! ! NAS Parallel Benchmarks Group ! ! NASA Ames Research Center ! ! Mail Stop: T27A-1 ! ! Moffett Field, CA 94035-1000 ! ! ! ! E-mail: npb@nas.nasa.gov ! ! Fax: (415) 604-3957 ! ! ! !-------------------------------------------------------------------------! c--------------------------------------------------------------------- c c Author: R. Van der Wijngaart c W. Saphir c--------------------------------------------------------------------- c--------------------------------------------------------------------- program MPSP c--------------------------------------------------------------------- include 'header.h' include 'mpinpb.h' integer profiler(2) save profiler integer i, niter, step, c, error, fstatus external timer_read double precision mflops, t, tmax, timer_read logical verified character class call TAU_PROFILE_INIT() call TAU_PROFILE_TIMER(profiler, 'MPSP') call TAU_PROFILE_START(profiler) call setup_mpi if (.not. active) goto 999 c--------------------------------------------------------------------- c Root node reads input file (if it exists) else takes c defaults from parameters c--------------------------------------------------------------------- if (node .eq. root) then write(*, 1000) open (unit=2,file='inputsp.data',status='old', iostat=fstatus) c if (fstatus .eq. 0) then write(*,233) 233 format(' Reading from input file inputsp.data') read (2,*) niter read (2,*) dt read (2,*) grid_points(1), grid_points(2), grid_points(3) close(2) else write(*,234) niter = niter_default dt = dt_default grid_points(1) = problem_size grid_points(2) = problem_size grid_points(3) = problem_size endif 234 format(' No input file inputsp.data. Using compiled defaults') write(*, 1001) grid_points(1), grid_points(2), grid_points(3) write(*, 1002) niter, dt if (no_nodes .ne. total_nodes) write(*, 1004) total_nodes if (no_nodes .ne. maxcells*maxcells) > write(*, 1005) maxcells*maxcells write(*, 1003) no_nodes 1000 format(//,' NAS Parallel Benchmarks 2.3 -- SP Benchmark',/) 1001 format(' Size: ', i3, 'x', i3, 'x', i3) 1002 format(' Iterations: ', i3, ' dt: ', F10.6) 1004 format(' Total number of processes: ', i5) 1005 format(' WARNING: compiled for ', i5, ' processes ') 1003 format(' Number of active processes: ', i5, /) endif call mpi_bcast(niter, 1, MPI_INTEGER, > root, comm_setup, error) call mpi_bcast(dt, 1, dp_type, > root, comm_setup, error) call mpi_bcast(grid_points(1), 3, MPI_INTEGER, > root, comm_setup, error) call make_set do c = 1, ncells if ( (cell_size(1,c) .gt. IMAX) .or. > (cell_size(2,c) .gt. JMAX) .or. > (cell_size(3,c) .gt. KMAX) ) then print *,node, c, (cell_size(i,c),i=1,3) print *,' Problem size too big for compiled array sizes' goto 999 endif end do call set_constants call initialize call lhsinit call exact_rhs call compute_buffer_size(5) c--------------------------------------------------------------------- c do one time step to touch all code, and reinitialize c--------------------------------------------------------------------- call adi call initialize c--------------------------------------------------------------------- c Synchronize before placing time stamp c--------------------------------------------------------------------- call mpi_barrier(comm_setup, error) call timer_clear(1) call timer_start(1) do step = 1, niter if (node .eq. root) then if (mod(step, 20) .eq. 0 .or. > step .eq. 1) then write(*, 200) step 200 format(' Time step ', i4) endif endif call adi end do call timer_stop(1) t = timer_read(1) call verify(niter, class, verified) call mpi_reduce(t, tmax, 1, > dp_type, MPI_MAX, > root, comm_setup, error) if( node .eq. root ) then if( tmax .ne. 0. ) then mflops = (881.174*float( problem_size )**3 > -4683.91*float( problem_size )**2 > +11484.5*float( problem_size ) > -19272.4) * float( niter ) / (tmax*1000000.0d0) else mflops = 0.0 endif call print_results('SP', class, grid_points(1), > grid_points(2), grid_points(3), niter, maxcells*maxcells, > total_nodes, tmax, mflops, ' floating point', > verified, npbversion,compiletime, cs1, cs2, cs3, cs4, cs5, > cs6, '(none)') endif 999 continue call mpi_barrier(MPI_COMM_WORLD, error) call mpi_finalize(error) call TAU_PROFILE_STOP(profiler) end tau-2.16.4/examples/NPB2.3/SP/txinvr.f000066400000000000000000000040641062343042700171050ustar00rootroot00000000000000 c--------------------------------------------------------------------- c--------------------------------------------------------------------- subroutine txinvr c--------------------------------------------------------------------- c--------------------------------------------------------------------- c--------------------------------------------------------------------- c block-diagonal matrix-vector multiplication c--------------------------------------------------------------------- include 'header.h' integer c, i, j, k double precision t1, t2, t3, ac, ru1, uu, vv, ww, r1, r2, r3, > r4, r5, ac2inv c--------------------------------------------------------------------- c loop over all cells owned by this node c--------------------------------------------------------------------- do c = 1, ncells do k = start(3,c), cell_size(3,c)-end(3,c)-1 do j = start(2,c), cell_size(2,c)-end(2,c)-1 do i = start(1,c), cell_size(1,c)-end(1,c)-1 ru1 = rho_i(i,j,k,c) uu = us(i,j,k,c) vv = vs(i,j,k,c) ww = ws(i,j,k,c) ac = speed(i,j,k,c) ac2inv = ainv(i,j,k,c)*ainv(i,j,k,c) r1 = rhs(i,j,k,1,c) r2 = rhs(i,j,k,2,c) r3 = rhs(i,j,k,3,c) r4 = rhs(i,j,k,4,c) r5 = rhs(i,j,k,5,c) t1 = c2 * ac2inv * ( qs(i,j,k,c)*r1 - uu*r2 - > vv*r3 - ww*r4 + r5 ) t2 = bt * ru1 * ( uu * r1 - r2 ) t3 = ( bt * ru1 * ac ) * t1 rhs(i,j,k,1,c) = r1 - t1 rhs(i,j,k,2,c) = - ru1 * ( ww*r1 - r4 ) rhs(i,j,k,3,c) = ru1 * ( vv*r1 - r3 ) rhs(i,j,k,4,c) = - t2 + t3 rhs(i,j,k,5,c) = t2 + t3 end do end do end do end do return end tau-2.16.4/examples/NPB2.3/SP/tzetar.f000066400000000000000000000040461062343042700170640ustar00rootroot00000000000000 c--------------------------------------------------------------------- c--------------------------------------------------------------------- subroutine tzetar(c) c--------------------------------------------------------------------- c--------------------------------------------------------------------- c--------------------------------------------------------------------- c block-diagonal matrix-vector multiplication c--------------------------------------------------------------------- include 'header.h' integer i, j, k, c double precision t1, t2, t3, ac, xvel, yvel, zvel, r1, r2, r3, > r4, r5, btuz, acinv, ac2u, uzik1 c--------------------------------------------------------------------- c treat only one cell c--------------------------------------------------------------------- do k = start(3,c), cell_size(3,c)-end(3,c)-1 do j = start(2,c), cell_size(2,c)-end(2,c)-1 do i = start(1,c), cell_size(1,c)-end(1,c)-1 xvel = us(i,j,k,c) yvel = vs(i,j,k,c) zvel = ws(i,j,k,c) ac = speed(i,j,k,c) acinv = ainv(i,j,k,c) ac2u = ac*ac r1 = rhs(i,j,k,1,c) r2 = rhs(i,j,k,2,c) r3 = rhs(i,j,k,3,c) r4 = rhs(i,j,k,4,c) r5 = rhs(i,j,k,5,c) uzik1 = u(i,j,k,1,c) btuz = bt * uzik1 t1 = btuz*acinv * (r4 + r5) t2 = r3 + t1 t3 = btuz * (r4 - r5) rhs(i,j,k,1,c) = t2 rhs(i,j,k,2,c) = -uzik1*r2 + xvel*t2 rhs(i,j,k,3,c) = uzik1*r1 + yvel*t2 rhs(i,j,k,4,c) = zvel*t2 + t3 rhs(i,j,k,5,c) = uzik1*(-xvel*r2 + yvel*r1) + > qs(i,j,k,c)*t2 + c2iv*ac2u*t1 + zvel*t3 end do end do end do return end tau-2.16.4/examples/NPB2.3/SP/verify.f000066400000000000000000000257501062343042700170640ustar00rootroot00000000000000 c--------------------------------------------------------------------- c--------------------------------------------------------------------- subroutine verify(no_time_steps, class, verified) c--------------------------------------------------------------------- c--------------------------------------------------------------------- c--------------------------------------------------------------------- c verification routine c--------------------------------------------------------------------- include 'header.h' include 'mpinpb.h' double precision xcrref(5),xceref(5),xcrdif(5),xcedif(5), > epsilon, xce(5), xcr(5), dtref integer m, no_time_steps character class logical verified c--------------------------------------------------------------------- c tolerance level c--------------------------------------------------------------------- epsilon = 1.0d-08 c--------------------------------------------------------------------- c compute the error norm and the residual norm, and exit if not printing c--------------------------------------------------------------------- call error_norm(xce) call copy_faces call rhs_norm(xcr) do m = 1, 5 xcr(m) = xcr(m) / dt enddo if (node .ne. 0) return class = 'U' verified = .true. do m = 1,5 xcrref(m) = 1.0 xceref(m) = 1.0 end do c--------------------------------------------------------------------- c reference data for 12X12X12 grids after 100 time steps, with DT = 1.50d-02 c--------------------------------------------------------------------- if ( (grid_points(1) .eq. 12 ) .and. > (grid_points(2) .eq. 12 ) .and. > (grid_points(3) .eq. 12 ) .and. > (no_time_steps .eq. 100 )) then class = 'S' dtref = 1.5d-2 c--------------------------------------------------------------------- c Reference values of RMS-norms of residual. c--------------------------------------------------------------------- xcrref(1) = 2.7470315451339479d-02 xcrref(2) = 1.0360746705285417d-02 xcrref(3) = 1.6235745065095532d-02 xcrref(4) = 1.5840557224455615d-02 xcrref(5) = 3.4849040609362460d-02 c--------------------------------------------------------------------- c Reference values of RMS-norms of solution error. c--------------------------------------------------------------------- xceref(1) = 2.7289258557377227d-05 xceref(2) = 1.0364446640837285d-05 xceref(3) = 1.6154798287166471d-05 xceref(4) = 1.5750704994480102d-05 xceref(5) = 3.4177666183390531d-05 c--------------------------------------------------------------------- c reference data for 36X36X36 grids after 400 time steps, with DT = 1.5d-03 c--------------------------------------------------------------------- elseif ( (grid_points(1) .eq. 36) .and. > (grid_points(2) .eq. 36) .and. > (grid_points(3) .eq. 36) .and. > (no_time_steps . eq. 400) ) then class = 'W' dtref = 1.5d-3 c--------------------------------------------------------------------- c Reference values of RMS-norms of residual. c--------------------------------------------------------------------- xcrref(1) = 0.1893253733584d-02 xcrref(2) = 0.1717075447775d-03 xcrref(3) = 0.2778153350936d-03 xcrref(4) = 0.2887475409984d-03 xcrref(5) = 0.3143611161242d-02 c--------------------------------------------------------------------- c Reference values of RMS-norms of solution error. c--------------------------------------------------------------------- xceref(1) = 0.7542088599534d-04 xceref(2) = 0.6512852253086d-05 xceref(3) = 0.1049092285688d-04 xceref(4) = 0.1128838671535d-04 xceref(5) = 0.1212845639773d-03 c--------------------------------------------------------------------- c reference data for 64X64X64 grids after 400 time steps, with DT = 1.5d-03 c--------------------------------------------------------------------- elseif ( (grid_points(1) .eq. 64) .and. > (grid_points(2) .eq. 64) .and. > (grid_points(3) .eq. 64) .and. > (no_time_steps . eq. 400) ) then class = 'A' dtref = 1.5d-3 c--------------------------------------------------------------------- c Reference values of RMS-norms of residual. c--------------------------------------------------------------------- xcrref(1) = 2.4799822399300195d0 xcrref(2) = 1.1276337964368832d0 xcrref(3) = 1.5028977888770491d0 xcrref(4) = 1.4217816211695179d0 xcrref(5) = 2.1292113035138280d0 c--------------------------------------------------------------------- c Reference values of RMS-norms of solution error. c--------------------------------------------------------------------- xceref(1) = 1.0900140297820550d-04 xceref(2) = 3.7343951769282091d-05 xceref(3) = 5.0092785406541633d-05 xceref(4) = 4.7671093939528255d-05 xceref(5) = 1.3621613399213001d-04 c--------------------------------------------------------------------- c reference data for 102X102X102 grids after 400 time steps, c with DT = 1.0d-03 c--------------------------------------------------------------------- elseif ( (grid_points(1) .eq. 102) .and. > (grid_points(2) .eq. 102) .and. > (grid_points(3) .eq. 102) .and. > (no_time_steps . eq. 400) ) then class = 'B' dtref = 1.0d-3 c--------------------------------------------------------------------- c Reference values of RMS-norms of residual. c--------------------------------------------------------------------- xcrref(1) = 0.6903293579998d+02 xcrref(2) = 0.3095134488084d+02 xcrref(3) = 0.4103336647017d+02 xcrref(4) = 0.3864769009604d+02 xcrref(5) = 0.5643482272596d+02 c--------------------------------------------------------------------- c Reference values of RMS-norms of solution error. c--------------------------------------------------------------------- xceref(1) = 0.9810006190188d-02 xceref(2) = 0.1022827905670d-02 xceref(3) = 0.1720597911692d-02 xceref(4) = 0.1694479428231d-02 xceref(5) = 0.1847456263981d-01 c--------------------------------------------------------------------- c reference data for 162X162X162 grids after 400 time steps, c with DT = 0.67d-03 c--------------------------------------------------------------------- elseif ( (grid_points(1) .eq. 162) .and. > (grid_points(2) .eq. 162) .and. > (grid_points(3) .eq. 162) .and. > (no_time_steps . eq. 400) ) then class = 'C' dtref = 0.67d-3 c--------------------------------------------------------------------- c Reference values of RMS-norms of residual. c--------------------------------------------------------------------- xcrref(1) = 0.5881691581829d+03 xcrref(2) = 0.2454417603569d+03 xcrref(3) = 0.3293829191851d+03 xcrref(4) = 0.3081924971891d+03 xcrref(5) = 0.4597223799176d+03 c--------------------------------------------------------------------- c Reference values of RMS-norms of solution error. c--------------------------------------------------------------------- xceref(1) = 0.2598120500183d+00 xceref(2) = 0.2590888922315d-01 xceref(3) = 0.5132886416320d-01 xceref(4) = 0.4806073419454d-01 xceref(5) = 0.5483377491301d+00 else verified = .false. endif c--------------------------------------------------------------------- c verification test for residuals if gridsize is either 12X12X12 or c 64X64X64 or 102X102X102 or 162X162X162 c--------------------------------------------------------------------- c--------------------------------------------------------------------- c Compute the difference of solution values and the known reference values. c--------------------------------------------------------------------- do m = 1, 5 xcrdif(m) = dabs((xcr(m)-xcrref(m))/xcrref(m)) xcedif(m) = dabs((xce(m)-xceref(m))/xceref(m)) enddo c--------------------------------------------------------------------- c Output the comparison of computed results to known cases. c--------------------------------------------------------------------- if (class .ne. 'U') then write(*, 1990) class 1990 format(' Verification being performed for class ', a) write (*,2000) epsilon 2000 format(' accuracy setting for epsilon = ', E20.13) if (dabs(dt-dtref) .gt. epsilon) then verified = .false. class = 'U' write (*,1000) dtref 1000 format(' DT does not match the reference value of ', > E15.8) endif else write(*, 1995) 1995 format(' Unknown class') endif if (class .ne. 'U') then write (*,2001) else write (*, 2005) endif 2001 format(' Comparison of RMS-norms of residual') 2005 format(' RMS-norms of residual') do m = 1, 5 if (class .eq. 'U') then write(*, 2015) m, xcr(m) else if (xcrdif(m) .gt. epsilon) then verified = .false. write (*,2010) m,xcr(m),xcrref(m),xcrdif(m) else write (*,2011) m,xcr(m),xcrref(m),xcrdif(m) endif enddo if (class .ne. 'U') then write (*,2002) else write (*,2006) endif 2002 format(' Comparison of RMS-norms of solution error') 2006 format(' RMS-norms of solution error') do m = 1, 5 if (class .eq. 'U') then write(*, 2015) m, xce(m) else if (xcedif(m) .gt. epsilon) then verified = .false. write (*,2010) m,xce(m),xceref(m),xcedif(m) else write (*,2011) m,xce(m),xceref(m),xcedif(m) endif enddo 2010 format(' FAILURE: ', i2, E20.13, E20.13, E20.13) 2011 format(' ', i2, E20.13, E20.13, E20.13) 2015 format(' ', i2, E20.13) if (class .eq. 'U') then write(*, 2022) write(*, 2023) 2022 format(' No reference values provided') 2023 format(' No verification performed') else if (verified) then write(*, 2020) 2020 format(' Verification Successful') else write(*, 2021) 2021 format(' Verification failed') endif return end tau-2.16.4/examples/NPB2.3/SP/x_solve.f000066400000000000000000000557321062343042700172420ustar00rootroot00000000000000 c--------------------------------------------------------------------- c--------------------------------------------------------------------- subroutine x_solve c--------------------------------------------------------------------- c--------------------------------------------------------------------- c--------------------------------------------------------------------- c this function performs the solution of the approximate factorization c step in the x-direction for all five matrix components c simultaneously. The Thomas algorithm is employed to solve the c systems for the x-lines. Boundary conditions are non-periodic c--------------------------------------------------------------------- include 'header.h' include 'mpinpb.h' integer profiler(2) save profiler integer i, j, k, jp, kp, n, iend, jsize, ksize, i1, i2, > buffer_size, c, m, p, istart, stage, error, > requests(2), statuses(MPI_STATUS_SIZE, 2) double precision r1, r2, d, e, s(5), sm1, sm2, > fac1, fac2 c--------------------------------------------------------------------- c OK, now we know that there are multiple processors c--------------------------------------------------------------------- c--------------------------------------------------------------------- c now do a sweep on a layer-by-layer basis, i.e. sweeping through cells c on this node in the direction of increasing i for the forward sweep, c and after that reversing the direction for the backsubstitution. c--------------------------------------------------------------------- call TAU_PROFILE_TIMER(profiler, 'x_solve') call TAU_PROFILE_START(profiler) c--------------------------------------------------------------------- c FORWARD ELIMINATION c--------------------------------------------------------------------- do stage = 1, ncells c = slice(1,stage) istart = 0 iend = cell_size(1,c)-1 jsize = cell_size(2,c) ksize = cell_size(3,c) jp = cell_coord(2,c)-1 kp = cell_coord(3,c)-1 buffer_size = (jsize-start(2,c)-end(2,c)) * > (ksize-start(3,c)-end(3,c)) if ( stage .ne. 1) then c--------------------------------------------------------------------- c if this is not the first processor in this row of cells, c receive data from predecessor containing the right hand c sides and the upper diagonal elements of the previous two rows c--------------------------------------------------------------------- call mpi_irecv(in_buffer, 22*buffer_size, > dp_type, predecessor(1), > DEFAULT_TAG, comm_solve, > requests(1), error) c--------------------------------------------------------------------- c communication has already been started. c compute the left hand side while waiting for the msg c--------------------------------------------------------------------- call lhsx(c) c--------------------------------------------------------------------- c wait for pending communication to complete c This waits on the current receive and on the send c from the previous stage. They always come in pairs. c--------------------------------------------------------------------- call mpi_waitall(2, requests, statuses, error) c--------------------------------------------------------------------- c unpack the buffer c--------------------------------------------------------------------- i = istart i1 = istart + 1 n = 0 c--------------------------------------------------------------------- c create a running pointer c--------------------------------------------------------------------- p = 0 do k = start(3,c), ksize-end(3,c)-1 do j = start(2,c), jsize-end(2,c)-1 lhs(i,j,k,n+2,c) = lhs(i,j,k,n+2,c) - > in_buffer(p+1) * lhs(i,j,k,n+1,c) lhs(i,j,k,n+3,c) = lhs(i,j,k,n+3,c) - > in_buffer(p+2) * lhs(i,j,k,n+1,c) do m = 1, 3 rhs(i,j,k,m,c) = rhs(i,j,k,m,c) - > in_buffer(p+2+m) * lhs(i,j,k,n+1,c) end do d = in_buffer(p+6) e = in_buffer(p+7) do m = 1, 3 s(m) = in_buffer(p+7+m) end do r1 = lhs(i,j,k,n+2,c) lhs(i,j,k,n+3,c) = lhs(i,j,k,n+3,c) - d * r1 lhs(i,j,k,n+4,c) = lhs(i,j,k,n+4,c) - e * r1 do m = 1, 3 rhs(i,j,k,m,c) = rhs(i,j,k,m,c) - s(m) * r1 end do r2 = lhs(i1,j,k,n+1,c) lhs(i1,j,k,n+2,c) = lhs(i1,j,k,n+2,c) - d * r2 lhs(i1,j,k,n+3,c) = lhs(i1,j,k,n+3,c) - e * r2 do m = 1, 3 rhs(i1,j,k,m,c) = rhs(i1,j,k,m,c) - s(m) * r2 end do p = p + 10 end do end do do m = 4, 5 n = (m-3)*5 do k = start(3,c), ksize-end(3,c)-1 do j = start(2,c), jsize-end(2,c)-1 lhs(i,j,k,n+2,c) = lhs(i,j,k,n+2,c) - > in_buffer(p+1) * lhs(i,j,k,n+1,c) lhs(i,j,k,n+3,c) = lhs(i,j,k,n+3,c) - > in_buffer(p+2) * lhs(i,j,k,n+1,c) rhs(i,j,k,m,c) = rhs(i,j,k,m,c) - > in_buffer(p+3) * lhs(i,j,k,n+1,c) d = in_buffer(p+4) e = in_buffer(p+5) s(m) = in_buffer(p+6) r1 = lhs(i,j,k,n+2,c) lhs(i,j,k,n+3,c) = lhs(i,j,k,n+3,c) - d * r1 lhs(i,j,k,n+4,c) = lhs(i,j,k,n+4,c) - e * r1 rhs(i,j,k,m,c) = rhs(i,j,k,m,c) - s(m) * r1 r2 = lhs(i1,j,k,n+1,c) lhs(i1,j,k,n+2,c) = lhs(i1,j,k,n+2,c) - d * r2 lhs(i1,j,k,n+3,c) = lhs(i1,j,k,n+3,c) - e * r2 rhs(i1,j,k,m,c) = rhs(i1,j,k,m,c) - s(m) * r2 p = p + 6 end do end do end do else c--------------------------------------------------------------------- c if this IS the first cell, we still compute the lhs c--------------------------------------------------------------------- call lhsx(c) endif c--------------------------------------------------------------------- c perform the Thomas algorithm; first, FORWARD ELIMINATION c--------------------------------------------------------------------- n = 0 do k = start(3,c), ksize-end(3,c)-1 do j = start(2,c), jsize-end(2,c)-1 do i = istart, iend-2 i1 = i + 1 i2 = i + 2 fac1 = 1.d0/lhs(i,j,k,n+3,c) lhs(i,j,k,n+4,c) = fac1*lhs(i,j,k,n+4,c) lhs(i,j,k,n+5,c) = fac1*lhs(i,j,k,n+5,c) do m = 1, 3 rhs(i,j,k,m,c) = fac1*rhs(i,j,k,m,c) end do lhs(i1,j,k,n+3,c) = lhs(i1,j,k,n+3,c) - > lhs(i1,j,k,n+2,c)*lhs(i,j,k,n+4,c) lhs(i1,j,k,n+4,c) = lhs(i1,j,k,n+4,c) - > lhs(i1,j,k,n+2,c)*lhs(i,j,k,n+5,c) do m = 1, 3 rhs(i1,j,k,m,c) = rhs(i1,j,k,m,c) - > lhs(i1,j,k,n+2,c)*rhs(i,j,k,m,c) end do lhs(i2,j,k,n+2,c) = lhs(i2,j,k,n+2,c) - > lhs(i2,j,k,n+1,c)*lhs(i,j,k,n+4,c) lhs(i2,j,k,n+3,c) = lhs(i2,j,k,n+3,c) - > lhs(i2,j,k,n+1,c)*lhs(i,j,k,n+5,c) do m = 1, 3 rhs(i2,j,k,m,c) = rhs(i2,j,k,m,c) - > lhs(i2,j,k,n+1,c)*rhs(i,j,k,m,c) end do end do end do end do c--------------------------------------------------------------------- c The last two rows in this grid block are a bit different, c since they do not have two more rows available for the c elimination of off-diagonal entries c--------------------------------------------------------------------- i = iend - 1 i1 = iend do k = start(3,c), ksize-end(3,c)-1 do j = start(2,c), jsize-end(2,c)-1 fac1 = 1.d0/lhs(i,j,k,n+3,c) lhs(i,j,k,n+4,c) = fac1*lhs(i,j,k,n+4,c) lhs(i,j,k,n+5,c) = fac1*lhs(i,j,k,n+5,c) do m = 1, 3 rhs(i,j,k,m,c) = fac1*rhs(i,j,k,m,c) end do lhs(i1,j,k,n+3,c) = lhs(i1,j,k,n+3,c) - > lhs(i1,j,k,n+2,c)*lhs(i,j,k,n+4,c) lhs(i1,j,k,n+4,c) = lhs(i1,j,k,n+4,c) - > lhs(i1,j,k,n+2,c)*lhs(i,j,k,n+5,c) do m = 1, 3 rhs(i1,j,k,m,c) = rhs(i1,j,k,m,c) - > lhs(i1,j,k,n+2,c)*rhs(i,j,k,m,c) end do c--------------------------------------------------------------------- c scale the last row immediately (some of this is c overkill in case this is the last cell) c--------------------------------------------------------------------- fac2 = 1.d0/lhs(i1,j,k,n+3,c) lhs(i1,j,k,n+4,c) = fac2*lhs(i1,j,k,n+4,c) lhs(i1,j,k,n+5,c) = fac2*lhs(i1,j,k,n+5,c) do m = 1, 3 rhs(i1,j,k,m,c) = fac2*rhs(i1,j,k,m,c) end do end do end do c--------------------------------------------------------------------- c do the u+c and the u-c factors c--------------------------------------------------------------------- do m = 4, 5 n = (m-3)*5 do k = start(3,c), ksize-end(3,c)-1 do j = start(2,c), jsize-end(2,c)-1 do i = istart, iend-2 i1 = i + 1 i2 = i + 2 fac1 = 1.d0/lhs(i,j,k,n+3,c) lhs(i,j,k,n+4,c) = fac1*lhs(i,j,k,n+4,c) lhs(i,j,k,n+5,c) = fac1*lhs(i,j,k,n+5,c) rhs(i,j,k,m,c) = fac1*rhs(i,j,k,m,c) lhs(i1,j,k,n+3,c) = lhs(i1,j,k,n+3,c) - > lhs(i1,j,k,n+2,c)*lhs(i,j,k,n+4,c) lhs(i1,j,k,n+4,c) = lhs(i1,j,k,n+4,c) - > lhs(i1,j,k,n+2,c)*lhs(i,j,k,n+5,c) rhs(i1,j,k,m,c) = rhs(i1,j,k,m,c) - > lhs(i1,j,k,n+2,c)*rhs(i,j,k,m,c) lhs(i2,j,k,n+2,c) = lhs(i2,j,k,n+2,c) - > lhs(i2,j,k,n+1,c)*lhs(i,j,k,n+4,c) lhs(i2,j,k,n+3,c) = lhs(i2,j,k,n+3,c) - > lhs(i2,j,k,n+1,c)*lhs(i,j,k,n+5,c) rhs(i2,j,k,m,c) = rhs(i2,j,k,m,c) - > lhs(i2,j,k,n+1,c)*rhs(i,j,k,m,c) end do end do end do c--------------------------------------------------------------------- c And again the last two rows separately c--------------------------------------------------------------------- i = iend - 1 i1 = iend do k = start(3,c), ksize-end(3,c)-1 do j = start(2,c), jsize-end(2,c)-1 fac1 = 1.d0/lhs(i,j,k,n+3,c) lhs(i,j,k,n+4,c) = fac1*lhs(i,j,k,n+4,c) lhs(i,j,k,n+5,c) = fac1*lhs(i,j,k,n+5,c) rhs(i,j,k,m,c) = fac1*rhs(i,j,k,m,c) lhs(i1,j,k,n+3,c) = lhs(i1,j,k,n+3,c) - > lhs(i1,j,k,n+2,c)*lhs(i,j,k,n+4,c) lhs(i1,j,k,n+4,c) = lhs(i1,j,k,n+4,c) - > lhs(i1,j,k,n+2,c)*lhs(i,j,k,n+5,c) rhs(i1,j,k,m,c) = rhs(i1,j,k,m,c) - > lhs(i1,j,k,n+2,c)*rhs(i,j,k,m,c) c--------------------------------------------------------------------- c Scale the last row immediately (some of this is overkill c if this is the last cell) c--------------------------------------------------------------------- fac2 = 1.d0/lhs(i1,j,k,n+3,c) lhs(i1,j,k,n+4,c) = fac2*lhs(i1,j,k,n+4,c) lhs(i1,j,k,n+5,c) = fac2*lhs(i1,j,k,n+5,c) rhs(i1,j,k,m,c) = fac2*rhs(i1,j,k,m,c) end do end do end do c--------------------------------------------------------------------- c send information to the next processor, except when this c is the last grid block c--------------------------------------------------------------------- if (stage .ne. ncells) then c--------------------------------------------------------------------- c create a running pointer for the send buffer c--------------------------------------------------------------------- p = 0 n = 0 do k = start(3,c), ksize-end(3,c)-1 do j = start(2,c), jsize-end(2,c)-1 do i = iend-1, iend out_buffer(p+1) = lhs(i,j,k,n+4,c) out_buffer(p+2) = lhs(i,j,k,n+5,c) do m = 1, 3 out_buffer(p+2+m) = rhs(i,j,k,m,c) end do p = p+5 end do end do end do do m = 4, 5 n = (m-3)*5 do k = start(3,c), ksize-end(3,c)-1 do j = start(2,c), jsize-end(2,c)-1 do i = iend-1, iend out_buffer(p+1) = lhs(i,j,k,n+4,c) out_buffer(p+2) = lhs(i,j,k,n+5,c) out_buffer(p+3) = rhs(i,j,k,m,c) p = p + 3 end do end do end do end do c--------------------------------------------------------------------- c send data to next phase c can't receive data yet because buffer size will be wrong c--------------------------------------------------------------------- call mpi_isend(out_buffer, 22*buffer_size, > dp_type, successor(1), > DEFAULT_TAG, comm_solve, > requests(2), error) endif end do c--------------------------------------------------------------------- c now go in the reverse direction c--------------------------------------------------------------------- c--------------------------------------------------------------------- c BACKSUBSTITUTION c--------------------------------------------------------------------- do stage = ncells, 1, -1 c = slice(1,stage) istart = 0 iend = cell_size(1,c)-1 jsize = cell_size(2,c) ksize = cell_size(3,c) jp = cell_coord(2,c)-1 kp = cell_coord(3,c)-1 buffer_size = (jsize-start(2,c)-end(2,c)) * > (ksize-start(3,c)-end(3,c)) if (stage .ne. ncells) then c--------------------------------------------------------------------- c if this is not the starting cell in this row of cells, c wait for a message to be received, containing the c solution of the previous two stations c--------------------------------------------------------------------- call mpi_irecv(in_buffer, 10*buffer_size, > dp_type, successor(1), > DEFAULT_TAG, comm_solve, > requests(1), error) c--------------------------------------------------------------------- c communication has already been started c while waiting, do the block-diagonal inversion for the c cell that was just finished c--------------------------------------------------------------------- call ninvr(slice(1,stage+1)) c--------------------------------------------------------------------- c wait for pending communication to complete c--------------------------------------------------------------------- call mpi_waitall(2, requests, statuses, error) c--------------------------------------------------------------------- c unpack the buffer for the first three factors c--------------------------------------------------------------------- n = 0 p = 0 i = iend i1 = i - 1 do m = 1, 3 do k = start(3,c), ksize-end(3,c)-1 do j = start(2,c), jsize-end(2,c)-1 sm1 = in_buffer(p+1) sm2 = in_buffer(p+2) rhs(i,j,k,m,c) = rhs(i,j,k,m,c) - > lhs(i,j,k,n+4,c)*sm1 - > lhs(i,j,k,n+5,c)*sm2 rhs(i1,j,k,m,c) = rhs(i1,j,k,m,c) - > lhs(i1,j,k,n+4,c) * rhs(i,j,k,m,c) - > lhs(i1,j,k,n+5,c) * sm1 p = p + 2 end do end do end do c--------------------------------------------------------------------- c now unpack the buffer for the remaining two factors c--------------------------------------------------------------------- do m = 4, 5 n = (m-3)*5 do k = start(3,c), ksize-end(3,c)-1 do j = start(2,c), jsize-end(2,c)-1 sm1 = in_buffer(p+1) sm2 = in_buffer(p+2) rhs(i,j,k,m,c) = rhs(i,j,k,m,c) - > lhs(i,j,k,n+4,c)*sm1 - > lhs(i,j,k,n+5,c)*sm2 rhs(i1,j,k,m,c) = rhs(i1,j,k,m,c) - > lhs(i1,j,k,n+4,c) * rhs(i,j,k,m,c) - > lhs(i1,j,k,n+5,c) * sm1 p = p + 2 end do end do end do else c--------------------------------------------------------------------- c now we know this is the first grid block on the back sweep, c so we don't need a message to start the substitution. c--------------------------------------------------------------------- i = iend-1 i1 = iend n = 0 do m = 1, 3 do k = start(3,c), ksize-end(3,c)-1 do j = start(2,c), jsize-end(2,c)-1 rhs(i,j,k,m,c) = rhs(i,j,k,m,c) - > lhs(i,j,k,n+4,c)*rhs(i1,j,k,m,c) end do end do end do do m = 4, 5 n = (m-3)*5 do k = start(3,c), ksize-end(3,c)-1 do j = start(2,c), jsize-end(2,c)-1 rhs(i,j,k,m,c) = rhs(i,j,k,m,c) - > lhs(i,j,k,n+4,c)*rhs(i1,j,k,m,c) end do end do end do endif c--------------------------------------------------------------------- c Whether or not this is the last processor, we always have c to complete the back-substitution c--------------------------------------------------------------------- c--------------------------------------------------------------------- c The first three factors c--------------------------------------------------------------------- n = 0 do m = 1, 3 do k = start(3,c), ksize-end(3,c)-1 do j = start(2,c), jsize-end(2,c)-1 do i = iend-2, istart, -1 i1 = i + 1 i2 = i + 2 rhs(i,j,k,m,c) = rhs(i,j,k,m,c) - > lhs(i,j,k,n+4,c)*rhs(i1,j,k,m,c) - > lhs(i,j,k,n+5,c)*rhs(i2,j,k,m,c) end do end do end do end do c--------------------------------------------------------------------- c And the remaining two c--------------------------------------------------------------------- do m = 4, 5 n = (m-3)*5 do k = start(3,c), ksize-end(3,c)-1 do j = start(2,c), jsize-end(2,c)-1 do i = iend-2, istart, -1 i1 = i + 1 i2 = i + 2 rhs(i,j,k,m,c) = rhs(i,j,k,m,c) - > lhs(i,j,k,n+4,c)*rhs(i1,j,k,m,c) - > lhs(i,j,k,n+5,c)*rhs(i2,j,k,m,c) end do end do end do end do c--------------------------------------------------------------------- c send on information to the previous processor, if needed c--------------------------------------------------------------------- if (stage .ne. 1) then i = istart i1 = istart+1 p = 0 do m = 1, 5 do k = start(3,c), ksize-end(3,c)-1 do j = start(2,c), jsize-end(2,c)-1 out_buffer(p+1) = rhs(i,j,k,m,c) out_buffer(p+2) = rhs(i1,j,k,m,c) p = p + 2 end do end do end do c--------------------------------------------------------------------- c pack and send the buffer c--------------------------------------------------------------------- call mpi_isend(out_buffer, 10*buffer_size, > dp_type, predecessor(1), > DEFAULT_TAG, comm_solve, > requests(2), error) endif c--------------------------------------------------------------------- c If this was the last stage, do the block-diagonal inversion c--------------------------------------------------------------------- if (stage .eq. 1) call ninvr(c) end do call TAU_PROFILE_STOP(profiler) return end tau-2.16.4/examples/NPB2.3/SP/y_solve.f000066400000000000000000000550561062343042700172420ustar00rootroot00000000000000 c--------------------------------------------------------------------- c--------------------------------------------------------------------- subroutine y_solve c--------------------------------------------------------------------- c--------------------------------------------------------------------- c--------------------------------------------------------------------- c this function performs the solution of the approximate factorization c step in the y-direction for all five matrix components c simultaneously. The Thomas algorithm is employed to solve the c systems for the y-lines. Boundary conditions are non-periodic c--------------------------------------------------------------------- include 'header.h' include 'mpinpb.h' integer i, j, k, stage, ip, kp, n, isize, jend, ksize, j1, j2, > buffer_size, c, m, p, jstart, error, > requests(2), statuses(MPI_STATUS_SIZE, 2) double precision r1, r2, d, e, s(5), sm1, sm2, > fac1, fac2 c--------------------------------------------------------------------- c now do a sweep on a layer-by-layer basis, i.e. sweeping through cells c on this node in the direction of increasing i for the forward sweep, c and after that reversing the direction for the backsubstitution c--------------------------------------------------------------------- c--------------------------------------------------------------------- c FORWARD ELIMINATION c--------------------------------------------------------------------- do stage = 1, ncells c = slice(2,stage) jstart = 0 jend = cell_size(2,c)-1 isize = cell_size(1,c) ksize = cell_size(3,c) ip = cell_coord(1,c)-1 kp = cell_coord(3,c)-1 buffer_size = (isize-start(1,c)-end(1,c)) * > (ksize-start(3,c)-end(3,c)) if ( stage .ne. 1) then c--------------------------------------------------------------------- c if this is not the first processor in this row of cells, c receive data from predecessor containing the right hand c sides and the upper diagonal elements of the previous two rows c--------------------------------------------------------------------- call mpi_irecv(in_buffer, 22*buffer_size, > dp_type, predecessor(2), > DEFAULT_TAG, comm_solve, > requests(1), error) c--------------------------------------------------------------------- c communication has already been started. c compute the left hand side while waiting for the msg c--------------------------------------------------------------------- call lhsy(c) c--------------------------------------------------------------------- c wait for pending communication to complete c This waits on the current receive and on the send c from the previous stage. They always come in pairs. c--------------------------------------------------------------------- call mpi_waitall(2, requests, statuses, error) c--------------------------------------------------------------------- c unpack the buffer c--------------------------------------------------------------------- j = jstart j1 = jstart + 1 n = 0 c--------------------------------------------------------------------- c create a running pointer c--------------------------------------------------------------------- p = 0 do k = start(3,c), ksize-end(3,c)-1 do i = start(1,c), isize-end(1,c)-1 lhs(i,j,k,n+2,c) = lhs(i,j,k,n+2,c) - > in_buffer(p+1) * lhs(i,j,k,n+1,c) lhs(i,j,k,n+3,c) = lhs(i,j,k,n+3,c) - > in_buffer(p+2) * lhs(i,j,k,n+1,c) do m = 1, 3 rhs(i,j,k,m,c) = rhs(i,j,k,m,c) - > in_buffer(p+2+m) * lhs(i,j,k,n+1,c) end do d = in_buffer(p+6) e = in_buffer(p+7) do m = 1, 3 s(m) = in_buffer(p+7+m) end do r1 = lhs(i,j,k,n+2,c) lhs(i,j,k,n+3,c) = lhs(i,j,k,n+3,c) - d * r1 lhs(i,j,k,n+4,c) = lhs(i,j,k,n+4,c) - e * r1 do m = 1, 3 rhs(i,j,k,m,c) = rhs(i,j,k,m,c) - s(m) * r1 end do r2 = lhs(i,j1,k,n+1,c) lhs(i,j1,k,n+2,c) = lhs(i,j1,k,n+2,c) - d * r2 lhs(i,j1,k,n+3,c) = lhs(i,j1,k,n+3,c) - e * r2 do m = 1, 3 rhs(i,j1,k,m,c) = rhs(i,j1,k,m,c) - s(m) * r2 end do p = p + 10 end do end do do m = 4, 5 n = (m-3)*5 do k = start(3,c), ksize-end(3,c)-1 do i = start(1,c), isize-end(1,c)-1 lhs(i,j,k,n+2,c) = lhs(i,j,k,n+2,c) - > in_buffer(p+1) * lhs(i,j,k,n+1,c) lhs(i,j,k,n+3,c) = lhs(i,j,k,n+3,c) - > in_buffer(p+2) * lhs(i,j,k,n+1,c) rhs(i,j,k,m,c) = rhs(i,j,k,m,c) - > in_buffer(p+3) * lhs(i,j,k,n+1,c) d = in_buffer(p+4) e = in_buffer(p+5) s(m) = in_buffer(p+6) r1 = lhs(i,j,k,n+2,c) lhs(i,j,k,n+3,c) = lhs(i,j,k,n+3,c) - d * r1 lhs(i,j,k,n+4,c) = lhs(i,j,k,n+4,c) - e * r1 rhs(i,j,k,m,c) = rhs(i,j,k,m,c) - s(m) * r1 r2 = lhs(i,j1,k,n+1,c) lhs(i,j1,k,n+2,c) = lhs(i,j1,k,n+2,c) - d * r2 lhs(i,j1,k,n+3,c) = lhs(i,j1,k,n+3,c) - e * r2 rhs(i,j1,k,m,c) = rhs(i,j1,k,m,c) - s(m) * r2 p = p + 6 end do end do end do else c--------------------------------------------------------------------- c if this IS the first cell, we still compute the lhs c--------------------------------------------------------------------- call lhsy(c) endif c--------------------------------------------------------------------- c perform the Thomas algorithm; first, FORWARD ELIMINATION c--------------------------------------------------------------------- n = 0 do k = start(3,c), ksize-end(3,c)-1 do j = jstart, jend-2 do i = start(1,c), isize-end(1,c)-1 j1 = j + 1 j2 = j + 2 fac1 = 1.d0/lhs(i,j,k,n+3,c) lhs(i,j,k,n+4,c) = fac1*lhs(i,j,k,n+4,c) lhs(i,j,k,n+5,c) = fac1*lhs(i,j,k,n+5,c) do m = 1, 3 rhs(i,j,k,m,c) = fac1*rhs(i,j,k,m,c) end do lhs(i,j1,k,n+3,c) = lhs(i,j1,k,n+3,c) - > lhs(i,j1,k,n+2,c)*lhs(i,j,k,n+4,c) lhs(i,j1,k,n+4,c) = lhs(i,j1,k,n+4,c) - > lhs(i,j1,k,n+2,c)*lhs(i,j,k,n+5,c) do m = 1, 3 rhs(i,j1,k,m,c) = rhs(i,j1,k,m,c) - > lhs(i,j1,k,n+2,c)*rhs(i,j,k,m,c) end do lhs(i,j2,k,n+2,c) = lhs(i,j2,k,n+2,c) - > lhs(i,j2,k,n+1,c)*lhs(i,j,k,n+4,c) lhs(i,j2,k,n+3,c) = lhs(i,j2,k,n+3,c) - > lhs(i,j2,k,n+1,c)*lhs(i,j,k,n+5,c) do m = 1, 3 rhs(i,j2,k,m,c) = rhs(i,j2,k,m,c) - > lhs(i,j2,k,n+1,c)*rhs(i,j,k,m,c) end do end do end do end do c--------------------------------------------------------------------- c The last two rows in this grid block are a bit different, c since they do not have two more rows available for the c elimination of off-diagonal entries c--------------------------------------------------------------------- j = jend - 1 j1 = jend do k = start(3,c), ksize-end(3,c)-1 do i = start(1,c), isize-end(1,c)-1 fac1 = 1.d0/lhs(i,j,k,n+3,c) lhs(i,j,k,n+4,c) = fac1*lhs(i,j,k,n+4,c) lhs(i,j,k,n+5,c) = fac1*lhs(i,j,k,n+5,c) do m = 1, 3 rhs(i,j,k,m,c) = fac1*rhs(i,j,k,m,c) end do lhs(i,j1,k,n+3,c) = lhs(i,j1,k,n+3,c) - > lhs(i,j1,k,n+2,c)*lhs(i,j,k,n+4,c) lhs(i,j1,k,n+4,c) = lhs(i,j1,k,n+4,c) - > lhs(i,j1,k,n+2,c)*lhs(i,j,k,n+5,c) do m = 1, 3 rhs(i,j1,k,m,c) = rhs(i,j1,k,m,c) - > lhs(i,j1,k,n+2,c)*rhs(i,j,k,m,c) end do c--------------------------------------------------------------------- c scale the last row immediately (some of this is c overkill in case this is the last cell) c--------------------------------------------------------------------- fac2 = 1.d0/lhs(i,j1,k,n+3,c) lhs(i,j1,k,n+4,c) = fac2*lhs(i,j1,k,n+4,c) lhs(i,j1,k,n+5,c) = fac2*lhs(i,j1,k,n+5,c) do m = 1, 3 rhs(i,j1,k,m,c) = fac2*rhs(i,j1,k,m,c) end do end do end do c--------------------------------------------------------------------- c do the u+c and the u-c factors c--------------------------------------------------------------------- do m = 4, 5 n = (m-3)*5 do k = start(3,c), ksize-end(3,c)-1 do j = jstart, jend-2 do i = start(1,c), isize-end(1,c)-1 j1 = j + 1 j2 = j + 2 fac1 = 1.d0/lhs(i,j,k,n+3,c) lhs(i,j,k,n+4,c) = fac1*lhs(i,j,k,n+4,c) lhs(i,j,k,n+5,c) = fac1*lhs(i,j,k,n+5,c) rhs(i,j,k,m,c) = fac1*rhs(i,j,k,m,c) lhs(i,j1,k,n+3,c) = lhs(i,j1,k,n+3,c) - > lhs(i,j1,k,n+2,c)*lhs(i,j,k,n+4,c) lhs(i,j1,k,n+4,c) = lhs(i,j1,k,n+4,c) - > lhs(i,j1,k,n+2,c)*lhs(i,j,k,n+5,c) rhs(i,j1,k,m,c) = rhs(i,j1,k,m,c) - > lhs(i,j1,k,n+2,c)*rhs(i,j,k,m,c) lhs(i,j2,k,n+2,c) = lhs(i,j2,k,n+2,c) - > lhs(i,j2,k,n+1,c)*lhs(i,j,k,n+4,c) lhs(i,j2,k,n+3,c) = lhs(i,j2,k,n+3,c) - > lhs(i,j2,k,n+1,c)*lhs(i,j,k,n+5,c) rhs(i,j2,k,m,c) = rhs(i,j2,k,m,c) - > lhs(i,j2,k,n+1,c)*rhs(i,j,k,m,c) end do end do end do c--------------------------------------------------------------------- c And again the last two rows separately c--------------------------------------------------------------------- j = jend - 1 j1 = jend do k = start(3,c), ksize-end(3,c)-1 do i = start(1,c), isize-end(1,c)-1 fac1 = 1.d0/lhs(i,j,k,n+3,c) lhs(i,j,k,n+4,c) = fac1*lhs(i,j,k,n+4,c) lhs(i,j,k,n+5,c) = fac1*lhs(i,j,k,n+5,c) rhs(i,j,k,m,c) = fac1*rhs(i,j,k,m,c) lhs(i,j1,k,n+3,c) = lhs(i,j1,k,n+3,c) - > lhs(i,j1,k,n+2,c)*lhs(i,j,k,n+4,c) lhs(i,j1,k,n+4,c) = lhs(i,j1,k,n+4,c) - > lhs(i,j1,k,n+2,c)*lhs(i,j,k,n+5,c) rhs(i,j1,k,m,c) = rhs(i,j1,k,m,c) - > lhs(i,j1,k,n+2,c)*rhs(i,j,k,m,c) c--------------------------------------------------------------------- c Scale the last row immediately (some of this is overkill c if this is the last cell) c--------------------------------------------------------------------- fac2 = 1.d0/lhs(i,j1,k,n+3,c) lhs(i,j1,k,n+4,c) = fac2*lhs(i,j1,k,n+4,c) lhs(i,j1,k,n+5,c) = fac2*lhs(i,j1,k,n+5,c) rhs(i,j1,k,m,c) = fac2*rhs(i,j1,k,m,c) end do end do end do c--------------------------------------------------------------------- c send information to the next processor, except when this c is the last grid block; c--------------------------------------------------------------------- if (stage .ne. ncells) then c--------------------------------------------------------------------- c create a running pointer for the send buffer c--------------------------------------------------------------------- p = 0 n = 0 do k = start(3,c), ksize-end(3,c)-1 do i = start(1,c), isize-end(1,c)-1 do j = jend-1, jend out_buffer(p+1) = lhs(i,j,k,n+4,c) out_buffer(p+2) = lhs(i,j,k,n+5,c) do m = 1, 3 out_buffer(p+2+m) = rhs(i,j,k,m,c) end do p = p+5 end do end do end do do m = 4, 5 n = (m-3)*5 do k = start(3,c), ksize-end(3,c)-1 do i = start(1,c), isize-end(1,c)-1 do j = jend-1, jend out_buffer(p+1) = lhs(i,j,k,n+4,c) out_buffer(p+2) = lhs(i,j,k,n+5,c) out_buffer(p+3) = rhs(i,j,k,m,c) p = p + 3 end do end do end do end do c--------------------------------------------------------------------- c pack and send the buffer c--------------------------------------------------------------------- call mpi_isend(out_buffer, 22*buffer_size, > dp_type, successor(2), > DEFAULT_TAG, comm_solve, > requests(2), error) endif end do c--------------------------------------------------------------------- c now go in the reverse direction c--------------------------------------------------------------------- c--------------------------------------------------------------------- c BACKSUBSTITUTION c--------------------------------------------------------------------- do stage = ncells, 1, -1 c = slice(2,stage) jstart = 0 jend = cell_size(2,c)-1 isize = cell_size(1,c) ksize = cell_size(3,c) ip = cell_coord(1,c)-1 kp = cell_coord(3,c)-1 buffer_size = (isize-start(1,c)-end(1,c)) * > (ksize-start(3,c)-end(3,c)) if (stage .ne. ncells) then c--------------------------------------------------------------------- c if this is not the starting cell in this row of cells, c wait for a message to be received, containing the c solution of the previous two stations c--------------------------------------------------------------------- call mpi_irecv(in_buffer, 10*buffer_size, > dp_type, successor(2), > DEFAULT_TAG, comm_solve, > requests(1), error) c--------------------------------------------------------------------- c communication has already been started c while waiting, do the block-diagonal inversion for the c cell that was just finished c--------------------------------------------------------------------- call pinvr(slice(2,stage+1)) c--------------------------------------------------------------------- c wait for pending communication to complete c--------------------------------------------------------------------- call mpi_waitall(2, requests, statuses, error) c--------------------------------------------------------------------- c unpack the buffer for the first three factors c--------------------------------------------------------------------- n = 0 p = 0 j = jend j1 = j - 1 do m = 1, 3 do k = start(3,c), ksize-end(3,c)-1 do i = start(1,c), isize-end(1,c)-1 sm1 = in_buffer(p+1) sm2 = in_buffer(p+2) rhs(i,j,k,m,c) = rhs(i,j,k,m,c) - > lhs(i,j,k,n+4,c)*sm1 - > lhs(i,j,k,n+5,c)*sm2 rhs(i,j1,k,m,c) = rhs(i,j1,k,m,c) - > lhs(i,j1,k,n+4,c) * rhs(i,j,k,m,c) - > lhs(i,j1,k,n+5,c) * sm1 p = p + 2 end do end do end do c--------------------------------------------------------------------- c now unpack the buffer for the remaining two factors c--------------------------------------------------------------------- do m = 4, 5 n = (m-3)*5 do k = start(3,c), ksize-end(3,c)-1 do i = start(1,c), isize-end(1,c)-1 sm1 = in_buffer(p+1) sm2 = in_buffer(p+2) rhs(i,j,k,m,c) = rhs(i,j,k,m,c) - > lhs(i,j,k,n+4,c)*sm1 - > lhs(i,j,k,n+5,c)*sm2 rhs(i,j1,k,m,c) = rhs(i,j1,k,m,c) - > lhs(i,j1,k,n+4,c) * rhs(i,j,k,m,c) - > lhs(i,j1,k,n+5,c) * sm1 p = p + 2 end do end do end do else c--------------------------------------------------------------------- c now we know this is the first grid block on the back sweep, c so we don't need a message to start the substitution. c--------------------------------------------------------------------- j = jend - 1 j1 = jend n = 0 do m = 1, 3 do k = start(3,c), ksize-end(3,c)-1 do i = start(1,c), isize-end(1,c)-1 rhs(i,j,k,m,c) = rhs(i,j,k,m,c) - > lhs(i,j,k,n+4,c)*rhs(i,j1,k,m,c) end do end do end do do m = 4, 5 n = (m-3)*5 do k = start(3,c), ksize-end(3,c)-1 do i = start(1,c), isize-end(1,c)-1 rhs(i,j,k,m,c) = rhs(i,j,k,m,c) - > lhs(i,j,k,n+4,c)*rhs(i,j1,k,m,c) end do end do end do endif c--------------------------------------------------------------------- c Whether or not this is the last processor, we always have c to complete the back-substitution c--------------------------------------------------------------------- c--------------------------------------------------------------------- c The first three factors c--------------------------------------------------------------------- n = 0 do m = 1, 3 do k = start(3,c), ksize-end(3,c)-1 do j = jend-2, jstart, -1 do i = start(1,c), isize-end(1,c)-1 j1 = j + 1 j2 = j + 2 rhs(i,j,k,m,c) = rhs(i,j,k,m,c) - > lhs(i,j,k,n+4,c)*rhs(i,j1,k,m,c) - > lhs(i,j,k,n+5,c)*rhs(i,j2,k,m,c) end do end do end do end do c--------------------------------------------------------------------- c And the remaining two c--------------------------------------------------------------------- do m = 4, 5 n = (m-3)*5 do k = start(3,c), ksize-end(3,c)-1 do j = jend-2, jstart, -1 do i = start(1,c), isize-end(1,c)-1 j1 = j + 1 j2 = j1 + 1 rhs(i,j,k,m,c) = rhs(i,j,k,m,c) - > lhs(i,j,k,n+4,c)*rhs(i,j1,k,m,c) - > lhs(i,j,k,n+5,c)*rhs(i,j2,k,m,c) end do end do end do end do c--------------------------------------------------------------------- c send on information to the previous processor, if needed c--------------------------------------------------------------------- if (stage .ne. 1) then j = jstart j1 = jstart + 1 p = 0 do m = 1, 5 do k = start(3,c), ksize-end(3,c)-1 do i = start(1,c), isize-end(1,c)-1 out_buffer(p+1) = rhs(i,j,k,m,c) out_buffer(p+2) = rhs(i,j1,k,m,c) p = p + 2 end do end do end do c--------------------------------------------------------------------- c pack and send the buffer c--------------------------------------------------------------------- call mpi_isend(out_buffer, 10*buffer_size, > dp_type, predecessor(2), > DEFAULT_TAG, comm_solve, > requests(2), error) endif c--------------------------------------------------------------------- c If this was the last stage, do the block-diagonal inversion c--------------------------------------------------------------------- if (stage .eq. 1) call pinvr(c) end do return end tau-2.16.4/examples/NPB2.3/SP/z_solve.f000066400000000000000000000541341062343042700172370ustar00rootroot00000000000000 c--------------------------------------------------------------------- c--------------------------------------------------------------------- subroutine z_solve c--------------------------------------------------------------------- c--------------------------------------------------------------------- c--------------------------------------------------------------------- c this function performs the solution of the approximate factorization c step in the z-direction for all five matrix components c simultaneously. The Thomas algorithm is employed to solve the c systems for the z-lines. Boundary conditions are non-periodic c--------------------------------------------------------------------- include 'header.h' include 'mpinpb.h' integer i, j, k, stage, ip, jp, n, isize, jsize, kend, k1, k2, > buffer_size, c, m, p, kstart, error, > requests(2), statuses(MPI_STATUS_SIZE, 2) double precision r1, r2, d, e, s(5), sm1, sm2, > fac1, fac2 c--------------------------------------------------------------------- c now do a sweep on a layer-by-layer basis, i.e. sweeping through cells c on this node in the direction of increasing i for the forward sweep, c and after that reversing the direction for the backsubstitution c--------------------------------------------------------------------- c--------------------------------------------------------------------- c FORWARD ELIMINATION c--------------------------------------------------------------------- do stage = 1, ncells c = slice(3,stage) kstart = 0 kend = cell_size(3,c)-1 isize = cell_size(1,c) jsize = cell_size(2,c) ip = cell_coord(1,c)-1 jp = cell_coord(2,c)-1 buffer_size = (isize-start(1,c)-end(1,c)) * > (jsize-start(2,c)-end(2,c)) if (stage .ne. 1) then c--------------------------------------------------------------------- c if this is not the first processor in this row of cells, c receive data from predecessor containing the right hand c sides and the upper diagonal elements of the previous two rows c--------------------------------------------------------------------- call mpi_irecv(in_buffer, 22*buffer_size, > dp_type, predecessor(3), > DEFAULT_TAG, comm_solve, > requests(1), error) c--------------------------------------------------------------------- c communication has already been started. c compute the left hand side while waiting for the msg c--------------------------------------------------------------------- call lhsz(c) c--------------------------------------------------------------------- c wait for pending communication to complete c--------------------------------------------------------------------- call mpi_waitall(2, requests, statuses, error) c--------------------------------------------------------------------- c unpack the buffer c--------------------------------------------------------------------- k = kstart k1 = kstart + 1 n = 0 c--------------------------------------------------------------------- c create a running pointer c--------------------------------------------------------------------- p = 0 do j = start(2,c), jsize-end(2,c)-1 do i = start(1,c), isize-end(1,c)-1 lhs(i,j,k,n+2,c) = lhs(i,j,k,n+2,c) - > in_buffer(p+1) * lhs(i,j,k,n+1,c) lhs(i,j,k,n+3,c) = lhs(i,j,k,n+3,c) - > in_buffer(p+2) * lhs(i,j,k,n+1,c) do m = 1, 3 rhs(i,j,k,m,c) = rhs(i,j,k,m,c) - > in_buffer(p+2+m) * lhs(i,j,k,n+1,c) end do d = in_buffer(p+6) e = in_buffer(p+7) do m = 1, 3 s(m) = in_buffer(p+7+m) end do r1 = lhs(i,j,k,n+2,c) lhs(i,j,k,n+3,c) = lhs(i,j,k,n+3,c) - d * r1 lhs(i,j,k,n+4,c) = lhs(i,j,k,n+4,c) - e * r1 do m = 1, 3 rhs(i,j,k,m,c) = rhs(i,j,k,m,c) - s(m) * r1 end do r2 = lhs(i,j,k1,n+1,c) lhs(i,j,k1,n+2,c) = lhs(i,j,k1,n+2,c) - d * r2 lhs(i,j,k1,n+3,c) = lhs(i,j,k1,n+3,c) - e * r2 do m = 1, 3 rhs(i,j,k1,m,c) = rhs(i,j,k1,m,c) - s(m) * r2 end do p = p + 10 end do end do do m = 4, 5 n = (m-3)*5 do j = start(2,c), jsize-end(2,c)-1 do i = start(1,c), isize-end(1,c)-1 lhs(i,j,k,n+2,c) = lhs(i,j,k,n+2,c) - > in_buffer(p+1) * lhs(i,j,k,n+1,c) lhs(i,j,k,n+3,c) = lhs(i,j,k,n+3,c) - > in_buffer(p+2) * lhs(i,j,k,n+1,c) rhs(i,j,k,m,c) = rhs(i,j,k,m,c) - > in_buffer(p+3) * lhs(i,j,k,n+1,c) d = in_buffer(p+4) e = in_buffer(p+5) s(m) = in_buffer(p+6) r1 = lhs(i,j,k,n+2,c) lhs(i,j,k,n+3,c) = lhs(i,j,k,n+3,c) - d * r1 lhs(i,j,k,n+4,c) = lhs(i,j,k,n+4,c) - e * r1 rhs(i,j,k,m,c) = rhs(i,j,k,m,c) - s(m) * r1 r2 = lhs(i,j,k1,n+1,c) lhs(i,j,k1,n+2,c) = lhs(i,j,k1,n+2,c) - d * r2 lhs(i,j,k1,n+3,c) = lhs(i,j,k1,n+3,c) - e * r2 rhs(i,j,k1,m,c) = rhs(i,j,k1,m,c) - s(m) * r2 p = p + 6 end do end do end do else c--------------------------------------------------------------------- c if this IS the first cell, we still compute the lhs c--------------------------------------------------------------------- call lhsz(c) endif c--------------------------------------------------------------------- c perform the Thomas algorithm; first, FORWARD ELIMINATION c--------------------------------------------------------------------- n = 0 do k = kstart, kend-2 do j = start(2,c), jsize-end(2,c)-1 do i = start(1,c), isize-end(1,c)-1 k1 = k + 1 k2 = k + 2 fac1 = 1.d0/lhs(i,j,k,n+3,c) lhs(i,j,k,n+4,c) = fac1*lhs(i,j,k,n+4,c) lhs(i,j,k,n+5,c) = fac1*lhs(i,j,k,n+5,c) do m = 1, 3 rhs(i,j,k,m,c) = fac1*rhs(i,j,k,m,c) end do lhs(i,j,k1,n+3,c) = lhs(i,j,k1,n+3,c) - > lhs(i,j,k1,n+2,c)*lhs(i,j,k,n+4,c) lhs(i,j,k1,n+4,c) = lhs(i,j,k1,n+4,c) - > lhs(i,j,k1,n+2,c)*lhs(i,j,k,n+5,c) do m = 1, 3 rhs(i,j,k1,m,c) = rhs(i,j,k1,m,c) - > lhs(i,j,k1,n+2,c)*rhs(i,j,k,m,c) end do lhs(i,j,k2,n+2,c) = lhs(i,j,k2,n+2,c) - > lhs(i,j,k2,n+1,c)*lhs(i,j,k,n+4,c) lhs(i,j,k2,n+3,c) = lhs(i,j,k2,n+3,c) - > lhs(i,j,k2,n+1,c)*lhs(i,j,k,n+5,c) do m = 1, 3 rhs(i,j,k2,m,c) = rhs(i,j,k2,m,c) - > lhs(i,j,k2,n+1,c)*rhs(i,j,k,m,c) end do end do end do end do c--------------------------------------------------------------------- c The last two rows in this grid block are a bit different, c since they do not have two more rows available for the c elimination of off-diagonal entries c--------------------------------------------------------------------- k = kend - 1 k1 = kend do j = start(2,c), jsize-end(2,c)-1 do i = start(1,c), isize-end(1,c)-1 fac1 = 1.d0/lhs(i,j,k,n+3,c) lhs(i,j,k,n+4,c) = fac1*lhs(i,j,k,n+4,c) lhs(i,j,k,n+5,c) = fac1*lhs(i,j,k,n+5,c) do m = 1, 3 rhs(i,j,k,m,c) = fac1*rhs(i,j,k,m,c) end do lhs(i,j,k1,n+3,c) = lhs(i,j,k1,n+3,c) - > lhs(i,j,k1,n+2,c)*lhs(i,j,k,n+4,c) lhs(i,j,k1,n+4,c) = lhs(i,j,k1,n+4,c) - > lhs(i,j,k1,n+2,c)*lhs(i,j,k,n+5,c) do m = 1, 3 rhs(i,j,k1,m,c) = rhs(i,j,k1,m,c) - > lhs(i,j,k1,n+2,c)*rhs(i,j,k,m,c) end do c--------------------------------------------------------------------- c scale the last row immediately (some of this is c overkill in case this is the last cell) c--------------------------------------------------------------------- fac2 = 1.d0/lhs(i,j,k1,n+3,c) lhs(i,j,k1,n+4,c) = fac2*lhs(i,j,k1,n+4,c) lhs(i,j,k1,n+5,c) = fac2*lhs(i,j,k1,n+5,c) do m = 1, 3 rhs(i,j,k1,m,c) = fac2*rhs(i,j,k1,m,c) end do end do end do c--------------------------------------------------------------------- c do the u+c and the u-c factors c--------------------------------------------------------------------- do m = 4, 5 n = (m-3)*5 do k = kstart, kend-2 do j = start(2,c), jsize-end(2,c)-1 do i = start(1,c), isize-end(1,c)-1 k1 = k + 1 k2 = k + 2 fac1 = 1.d0/lhs(i,j,k,n+3,c) lhs(i,j,k,n+4,c) = fac1*lhs(i,j,k,n+4,c) lhs(i,j,k,n+5,c) = fac1*lhs(i,j,k,n+5,c) rhs(i,j,k,m,c) = fac1*rhs(i,j,k,m,c) lhs(i,j,k1,n+3,c) = lhs(i,j,k1,n+3,c) - > lhs(i,j,k1,n+2,c)*lhs(i,j,k,n+4,c) lhs(i,j,k1,n+4,c) = lhs(i,j,k1,n+4,c) - > lhs(i,j,k1,n+2,c)*lhs(i,j,k,n+5,c) rhs(i,j,k1,m,c) = rhs(i,j,k1,m,c) - > lhs(i,j,k1,n+2,c)*rhs(i,j,k,m,c) lhs(i,j,k2,n+2,c) = lhs(i,j,k2,n+2,c) - > lhs(i,j,k2,n+1,c)*lhs(i,j,k,n+4,c) lhs(i,j,k2,n+3,c) = lhs(i,j,k2,n+3,c) - > lhs(i,j,k2,n+1,c)*lhs(i,j,k,n+5,c) rhs(i,j,k2,m,c) = rhs(i,j,k2,m,c) - > lhs(i,j,k2,n+1,c)*rhs(i,j,k,m,c) end do end do end do c--------------------------------------------------------------------- c And again the last two rows separately c--------------------------------------------------------------------- k = kend - 1 k1 = kend do j = start(2,c), jsize-end(2,c)-1 do i = start(1,c), isize-end(1,c)-1 fac1 = 1.d0/lhs(i,j,k,n+3,c) lhs(i,j,k,n+4,c) = fac1*lhs(i,j,k,n+4,c) lhs(i,j,k,n+5,c) = fac1*lhs(i,j,k,n+5,c) rhs(i,j,k,m,c) = fac1*rhs(i,j,k,m,c) lhs(i,j,k1,n+3,c) = lhs(i,j,k1,n+3,c) - > lhs(i,j,k1,n+2,c)*lhs(i,j,k,n+4,c) lhs(i,j,k1,n+4,c) = lhs(i,j,k1,n+4,c) - > lhs(i,j,k1,n+2,c)*lhs(i,j,k,n+5,c) rhs(i,j,k1,m,c) = rhs(i,j,k1,m,c) - > lhs(i,j,k1,n+2,c)*rhs(i,j,k,m,c) c--------------------------------------------------------------------- c Scale the last row immediately (some of this is overkill c if this is the last cell) c--------------------------------------------------------------------- fac2 = 1.d0/lhs(i,j,k1,n+3,c) lhs(i,j,k1,n+4,c) = fac2*lhs(i,j,k1,n+4,c) lhs(i,j,k1,n+5,c) = fac2*lhs(i,j,k1,n+5,c) rhs(i,j,k1,m,c) = fac2*rhs(i,j,k1,m,c) end do end do end do c--------------------------------------------------------------------- c send information to the next processor, except when this c is the last grid block, c--------------------------------------------------------------------- if (stage .ne. ncells) then c--------------------------------------------------------------------- c create a running pointer for the send buffer c--------------------------------------------------------------------- p = 0 n = 0 do j = start(2,c), jsize-end(2,c)-1 do i = start(1,c), isize-end(1,c)-1 do k = kend-1, kend out_buffer(p+1) = lhs(i,j,k,n+4,c) out_buffer(p+2) = lhs(i,j,k,n+5,c) do m = 1, 3 out_buffer(p+2+m) = rhs(i,j,k,m,c) end do p = p+5 end do end do end do do m = 4, 5 n = (m-3)*5 do j = start(2,c), jsize-end(2,c)-1 do i = start(1,c), isize-end(1,c)-1 do k = kend-1, kend out_buffer(p+1) = lhs(i,j,k,n+4,c) out_buffer(p+2) = lhs(i,j,k,n+5,c) out_buffer(p+3) = rhs(i,j,k,m,c) p = p + 3 end do end do end do end do call mpi_isend(out_buffer, 22*buffer_size, > dp_type, successor(3), > DEFAULT_TAG, comm_solve, > requests(2), error) endif end do c--------------------------------------------------------------------- c now go in the reverse direction c--------------------------------------------------------------------- c--------------------------------------------------------------------- c BACKSUBSTITUTION c--------------------------------------------------------------------- do stage = ncells, 1, -1 c = slice(3,stage) kstart = 0 kend = cell_size(3,c)-1 isize = cell_size(1,c) jsize = cell_size(2,c) ip = cell_coord(1,c)-1 jp = cell_coord(2,c)-1 buffer_size = (isize-start(1,c)-end(1,c)) * > (jsize-start(2,c)-end(2,c)) if (stage .ne. ncells) then c--------------------------------------------------------------------- c if this is not the starting cell in this row of cells, c wait for a message to be received, containing the c solution of the previous two stations c--------------------------------------------------------------------- call mpi_irecv(in_buffer, 10*buffer_size, > dp_type, successor(3), > DEFAULT_TAG, comm_solve, > requests(1), error) c--------------------------------------------------------------------- c communication has already been started c while waiting, do the block-diagonal inversion for the c cell that was just finished c--------------------------------------------------------------------- call tzetar(slice(3,stage+1)) c--------------------------------------------------------------------- c wait for pending communication to complete c--------------------------------------------------------------------- call mpi_waitall(2, requests, statuses, error) c--------------------------------------------------------------------- c unpack the buffer for the first three factors c--------------------------------------------------------------------- n = 0 p = 0 k = kend k1 = k - 1 do m = 1, 3 do j = start(2,c), jsize-end(2,c)-1 do i = start(1,c), isize-end(1,c)-1 sm1 = in_buffer(p+1) sm2 = in_buffer(p+2) rhs(i,j,k,m,c) = rhs(i,j,k,m,c) - > lhs(i,j,k,n+4,c)*sm1 - > lhs(i,j,k,n+5,c)*sm2 rhs(i,j,k1,m,c) = rhs(i,j,k1,m,c) - > lhs(i,j,k1,n+4,c) * rhs(i,j,k,m,c) - > lhs(i,j,k1,n+5,c) * sm1 p = p + 2 end do end do end do c--------------------------------------------------------------------- c now unpack the buffer for the remaining two factors c--------------------------------------------------------------------- do m = 4, 5 n = (m-3)*5 do j = start(2,c), jsize-end(2,c)-1 do i = start(1,c), isize-end(1,c)-1 sm1 = in_buffer(p+1) sm2 = in_buffer(p+2) rhs(i,j,k,m,c) = rhs(i,j,k,m,c) - > lhs(i,j,k,n+4,c)*sm1 - > lhs(i,j,k,n+5,c)*sm2 rhs(i,j,k1,m,c) = rhs(i,j,k1,m,c) - > lhs(i,j,k1,n+4,c) * rhs(i,j,k,m,c) - > lhs(i,j,k1,n+5,c) * sm1 p = p + 2 end do end do end do else c--------------------------------------------------------------------- c now we know this is the first grid block on the back sweep, c so we don't need a message to start the substitution. c--------------------------------------------------------------------- k = kend - 1 k1 = kend n = 0 do m = 1, 3 do j = start(2,c), jsize-end(2,c)-1 do i = start(1,c), isize-end(1,c)-1 rhs(i,j,k,m,c) = rhs(i,j,k,m,c) - > lhs(i,j,k,n+4,c)*rhs(i,j,k1,m,c) end do end do end do do m = 4, 5 n = (m-3)*5 do j = start(2,c), jsize-end(2,c)-1 do i = start(1,c), isize-end(1,c)-1 rhs(i,j,k,m,c) = rhs(i,j,k,m,c) - > lhs(i,j,k,n+4,c)*rhs(i,j,k1,m,c) end do end do end do endif c--------------------------------------------------------------------- c Whether or not this is the last processor, we always have c to complete the back-substitution c--------------------------------------------------------------------- c--------------------------------------------------------------------- c The first three factors c--------------------------------------------------------------------- n = 0 do m = 1, 3 do k = kend-2, kstart, -1 do j = start(2,c), jsize-end(2,c)-1 do i = start(1,c), isize-end(1,c)-1 k1 = k + 1 k2 = k + 2 rhs(i,j,k,m,c) = rhs(i,j,k,m,c) - > lhs(i,j,k,n+4,c)*rhs(i,j,k1,m,c) - > lhs(i,j,k,n+5,c)*rhs(i,j,k2,m,c) end do end do end do end do c--------------------------------------------------------------------- c And the remaining two c--------------------------------------------------------------------- do m = 4, 5 n = (m-3)*5 do k = kend-2, kstart, -1 do j = start(2,c), jsize-end(2,c)-1 do i = start(1,c), isize-end(1,c)-1 k1 = k + 1 k2 = k + 2 rhs(i,j,k,m,c) = rhs(i,j,k,m,c) - > lhs(i,j,k,n+4,c)*rhs(i,j,k1,m,c) - > lhs(i,j,k,n+5,c)*rhs(i,j,k2,m,c) end do end do end do end do c--------------------------------------------------------------------- c send on information to the previous processor, if needed c--------------------------------------------------------------------- if (stage .ne. 1) then k = kstart k1 = kstart + 1 p = 0 do m = 1, 5 do j = start(2,c), jsize-end(2,c)-1 do i = start(1,c), isize-end(1,c)-1 out_buffer(p+1) = rhs(i,j,k,m,c) out_buffer(p+2) = rhs(i,j,k1,m,c) p = p + 2 end do end do end do call mpi_isend(out_buffer, 10*buffer_size, > dp_type, predecessor(3), > DEFAULT_TAG, comm_solve, > requests(2), error) endif c--------------------------------------------------------------------- c If this was the last stage, do the block-diagonal inversion c--------------------------------------------------------------------- if (stage .eq. 1) call tzetar(c) end do return end tau-2.16.4/examples/NPB2.3/bin/000077500000000000000000000000001062343042700156265ustar00rootroot00000000000000tau-2.16.4/examples/NPB2.3/bin/README000066400000000000000000000005061062343042700165070ustar00rootroot00000000000000This directory contains the executable files such as lu.W.4 and sp.W.4. Set the environment variable PROFILEDIR or TRACEDIR to point to the directory where profile or trace files should be created respectively. By default these are created in the current directory. % mpirun -np 4 lu.W.4 executes lu.W.4 on four processors. tau-2.16.4/examples/NPB2.3/common/000077500000000000000000000000001062343042700163465ustar00rootroot00000000000000tau-2.16.4/examples/NPB2.3/common/c_print_results.c000066400000000000000000000056651062343042700217450ustar00rootroot00000000000000/*****************************************************************/ /****** C _ P R I N T _ R E S U L T S ******/ /*****************************************************************/ #include #include void c_print_results( char *name, char class, int n1, int n2, int n3, int niter, int nprocs_compiled, int nprocs_total, double t, double mops, char *optype, int passed_verification, char *npbversion, char *compiletime, char *mpicc, char *clink, char *cmpi_lib, char *cmpi_inc, char *cflags, char *clinkflags ) { char *evalue="1000"; printf( "\n\n %s Benchmark Completed\n", name ); printf( " Class = %c\n", class ); if( n2 == 0 && n3 == 0 ) printf( " Size = %12d\n", n1 ); /* as in IS */ else printf( " Size = %3dx %3dx %3d\n", n1,n2,n3 ); printf( " Iterations = %12d\n", niter ); printf( " Time in seconds = %12.2f\n", t ); printf( " Total processes = %12d\n", nprocs_total ); printf( " Compiled procs = %12d\n", nprocs_compiled ); printf( " Mop/s total = %12.2f\n", mops ); printf( " Mop/s/process = %12.2f\n", mops/((float) nprocs_total) ); printf( " Operation type = %24s\n", optype); if( passed_verification ) printf( " Verification = SUCCESSFUL\n" ); else printf( " Verification = UNSUCCESSFUL\n" ); printf( " Version = %12s\n", npbversion ); printf( " Compile date = %12s\n", compiletime ); printf( "\n Compile options:\n" ); printf( " MPICC = %s\n", mpicc ); printf( " CLINK = %s\n", clink ); printf( " CMPI_LIB = %s\n", cmpi_lib ); printf( " CMPI_INC = %s\n", cmpi_inc ); printf( " CFLAGS = %s\n", cflags ); printf( " CLINKFLAGS = %s\n", clinkflags ); #ifdef SMP evalue = getenv("MP_SET_NUMTHREADS"); printf( " MULTICPUS = %s\n", evalue ); #endif printf( "\n\n" ); printf( " Please send the results of this run to:\n\n" ); printf( " NPB Development Team\n" ); printf( " Internet: npb@nas.nasa.gov\n \n" ); printf( " If email is not available, send this to:\n\n" ); printf( " MS T27A-1\n" ); printf( " NASA Ames Research Center\n" ); printf( " Moffett Field, CA 94035-1000\n\n" ); printf( " Fax: 415-604-3957\n\n" ); } tau-2.16.4/examples/NPB2.3/common/c_timers.c000066400000000000000000000022071062343042700203200ustar00rootroot00000000000000 #include "mpi.h" double start[64], elapsed[64]; /*****************************************************************/ /****** T I M E R _ C L E A R ******/ /*****************************************************************/ void timer_clear( int n ) { elapsed[n] = 0.0; } /*****************************************************************/ /****** T I M E R _ S T A R T ******/ /*****************************************************************/ void timer_start( int n ) { start[n] = MPI_Wtime(); } /*****************************************************************/ /****** T I M E R _ S T O P ******/ /*****************************************************************/ void timer_stop( int n ) { double t, now; now = MPI_Wtime(); t = now - start[n]; elapsed[n] += t; } /*****************************************************************/ /****** T I M E R _ R E A D ******/ /*****************************************************************/ double timer_read( int n ) { return( elapsed[n] ); } tau-2.16.4/examples/NPB2.3/common/print_results.f000066400000000000000000000067101062343042700214360ustar00rootroot00000000000000 subroutine print_results(name, class, n1, n2, n3, niter, > nprocs_compiled, nprocs_total, > t, mops, optype, verified, npbversion, > compiletime, cs1, cs2, cs3, cs4, cs5, cs6, cs7) implicit none character*2 name character*1 class integer n1, n2, n3, niter, nprocs_compiled, nprocs_total, j double precision t, mops character optype*24, size*13 logical verified character*(*) npbversion, compiletime, > cs1, cs2, cs3, cs4, cs5, cs6, cs7 write (*, 2) name 2 format(//, ' ', A2, ' Benchmark Completed.') write (*, 3) Class 3 format(' Class = ', 12x, a12) c If this is not a grid-based problem (EP, FT, CG), then c we only print n1, which contains some measure of the c problem size. In that case, n2 and n3 are both zero. c Otherwise, we print the grid size n1xn2xn3 if ((n2 .eq. 0) .and. (n3 .eq. 0)) then if (name(1:2) .eq. 'EP') then write(size, '(f12.0)' ) 2.d0**n1 do j =13,1,-1 if (size(j:j) .eq. '.') size(j:j) = ' ' end do write (*,42) size 42 format(' Size = ',12x, a14) else write (*,44) n1 44 format(' Size = ',12x, i12) endif else write (*, 4) n1,n2,n3 4 format(' Size = ',12x, i3,'x',i3,'x',i3) endif write (*, 5) niter 5 format(' Iterations = ', 12x, i12) write (*, 6) t 6 format(' Time in seconds = ',12x, f12.2) write (*,7) nprocs_total 7 format(' Total processes = ', 12x, i12) write (*,8) nprocs_compiled 8 format(' Compiled procs = ', 12x, i12) write (*,9) mops 9 format(' Mop/s total = ',12x, f12.2) write (*,10) mops/float( nprocs_total ) 10 format(' Mop/s/process = ', 12x, f12.2) write(*, 11) optype 11 format(' Operation type = ', a24) if (verified) then write(*,12) ' SUCCESSFUL' else write(*,12) 'UNSUCCESSFUL' endif 12 format(' Verification = ', 12x, a) write(*,13) npbversion 13 format(' Version = ', 12x, a12) write(*,14) compiletime 14 format(' Compile date = ', 12x, a12) write (*,121) cs1 121 format(/, ' Compile options:', /, > ' MPIF77 = ', A) write (*,122) cs2 122 format(' FLINK = ', A) write (*,123) cs3 123 format(' FMPI_LIB = ', A) write (*,124) cs4 124 format(' FMPI_INC = ', A) write (*,125) cs5 125 format(' FFLAGS = ', A) write (*,126) cs6 126 format(' FLINKFLAGS = ', A) write(*, 127) cs7 127 format(' RAND = ', A) write (*,130) 130 format(//' Please send the results of this run to:'// > ' NPB Development Team '/ > ' Internet: npb@nas.nasa.gov'/ > ' '/ > ' If email is not available, send this to:'// > ' MS T27A-1'/ > ' NASA Ames Research Center'/ > ' Moffett Field, CA 94035-1000'// > ' Fax: 415-604-3957'//) return end tau-2.16.4/examples/NPB2.3/common/randdp.f000066400000000000000000000122041062343042700177640ustar00rootroot00000000000000c--------------------------------------------------------------------- c--------------------------------------------------------------------- double precision function randlc (x, a) c--------------------------------------------------------------------- c--------------------------------------------------------------------- c--------------------------------------------------------------------- c c This routine returns a uniform pseudorandom double precision number in the c range (0, 1) by using the linear congruential generator c c x_{k+1} = a x_k (mod 2^46) c c where 0 < x_k < 2^46 and 0 < a < 2^46. This scheme generates 2^44 numbers c before repeating. The argument A is the same as 'a' in the above formula, c and X is the same as x_0. A and X must be odd double precision integers c in the range (1, 2^46). The returned value RANDLC is normalized to be c between 0 and 1, i.e. RANDLC = 2^(-46) * x_1. X is updated to contain c the new seed x_1, so that subsequent calls to RANDLC using the same c arguments will generate a continuous sequence. c c This routine should produce the same results on any computer with at least c 48 mantissa bits in double precision floating point data. On 64 bit c systems, double precision should be disabled. c c David H. Bailey October 26, 1990 c c--------------------------------------------------------------------- implicit none double precision r23,r46,t23,t46,a,x,t1,t2,t3,t4,a1,a2,x1,x2,z parameter (r23 = 0.5d0 ** 23, r46 = r23 ** 2, t23 = 2.d0 ** 23, > t46 = t23 ** 2) c--------------------------------------------------------------------- c Break A into two parts such that A = 2^23 * A1 + A2. c--------------------------------------------------------------------- t1 = r23 * a a1 = int (t1) a2 = a - t23 * a1 c--------------------------------------------------------------------- c Break X into two parts such that X = 2^23 * X1 + X2, compute c Z = A1 * X2 + A2 * X1 (mod 2^23), and then c X = 2^23 * Z + A2 * X2 (mod 2^46). c--------------------------------------------------------------------- t1 = r23 * x x1 = int (t1) x2 = x - t23 * x1 t1 = a1 * x2 + a2 * x1 t2 = int (r23 * t1) z = t1 - t23 * t2 t3 = t23 * z + a2 * x2 t4 = int (r46 * t3) x = t3 - t46 * t4 randlc = r46 * x return end c--------------------------------------------------------------------- c--------------------------------------------------------------------- subroutine vranlc (n, x, a, y) c--------------------------------------------------------------------- c--------------------------------------------------------------------- c--------------------------------------------------------------------- c c This routine generates N uniform pseudorandom double precision numbers in c the range (0, 1) by using the linear congruential generator c c x_{k+1} = a x_k (mod 2^46) c c where 0 < x_k < 2^46 and 0 < a < 2^46. This scheme generates 2^44 numbers c before repeating. The argument A is the same as 'a' in the above formula, c and X is the same as x_0. A and X must be odd double precision integers c in the range (1, 2^46). The N results are placed in Y and are normalized c to be between 0 and 1. X is updated to contain the new seed, so that c subsequent calls to VRANLC using the same arguments will generate a c continuous sequence. If N is zero, only initialization is performed, and c the variables X, A and Y are ignored. c c This routine is the standard version designed for scalar or RISC systems. c However, it should produce the same results on any single processor c computer with at least 48 mantissa bits in double precision floating point c data. On 64 bit systems, double precision should be disabled. c c--------------------------------------------------------------------- implicit none integer i,n double precision y,r23,r46,t23,t46,a,x,t1,t2,t3,t4,a1,a2,x1,x2,z dimension y(*) parameter (r23 = 0.5d0 ** 23, r46 = r23 ** 2, t23 = 2.d0 ** 23, > t46 = t23 ** 2) c--------------------------------------------------------------------- c Break A into two parts such that A = 2^23 * A1 + A2. c--------------------------------------------------------------------- t1 = r23 * a a1 = int (t1) a2 = a - t23 * a1 c--------------------------------------------------------------------- c Generate N results. This loop is not vectorizable. c--------------------------------------------------------------------- do i = 1, n c--------------------------------------------------------------------- c Break X into two parts such that X = 2^23 * X1 + X2, compute c Z = A1 * X2 + A2 * X1 (mod 2^23), and then c X = 2^23 * Z + A2 * X2 (mod 2^46). c--------------------------------------------------------------------- t1 = r23 * x x1 = int (t1) x2 = x - t23 * x1 t1 = a1 * x2 + a2 * x1 t2 = int (r23 * t1) z = t1 - t23 * t2 t3 = t23 * z + a2 * x2 t4 = int (r46 * t3) x = t3 - t46 * t4 y(i) = r46 * x enddo return end tau-2.16.4/examples/NPB2.3/common/randdpvec.f000066400000000000000000000157001062343042700204660ustar00rootroot00000000000000c--------------------------------------------------------------------- double precision function randlc (x, a) c--------------------------------------------------------------------- c--------------------------------------------------------------------- c c This routine returns a uniform pseudorandom double precision number in the c range (0, 1) by using the linear congruential generator c c x_{k+1} = a x_k (mod 2^46) c c where 0 < x_k < 2^46 and 0 < a < 2^46. This scheme generates 2^44 numbers c before repeating. The argument A is the same as 'a' in the above formula, c and X is the same as x_0. A and X must be odd double precision integers c in the range (1, 2^46). The returned value RANDLC is normalized to be c between 0 and 1, i.e. RANDLC = 2^(-46) * x_1. X is updated to contain c the new seed x_1, so that subsequent calls to RANDLC using the same c arguments will generate a continuous sequence. c c This routine should produce the same results on any computer with at least c 48 mantissa bits in double precision floating point data. On 64 bit c systems, double precision should be disabled. c c David H. Bailey October 26, 1990 c c--------------------------------------------------------------------- implicit none double precision r23,r46,t23,t46,a,x,t1,t2,t3,t4,a1,a2,x1,x2,z parameter (r23 = 0.5d0 ** 23, r46 = r23 ** 2, t23 = 2.d0 ** 23, > t46 = t23 ** 2) c--------------------------------------------------------------------- c Break A into two parts such that A = 2^23 * A1 + A2. c--------------------------------------------------------------------- t1 = r23 * a a1 = int (t1) a2 = a - t23 * a1 c--------------------------------------------------------------------- c Break X into two parts such that X = 2^23 * X1 + X2, compute c Z = A1 * X2 + A2 * X1 (mod 2^23), and then c X = 2^23 * Z + A2 * X2 (mod 2^46). c--------------------------------------------------------------------- t1 = r23 * x x1 = int (t1) x2 = x - t23 * x1 t1 = a1 * x2 + a2 * x1 t2 = int (r23 * t1) z = t1 - t23 * t2 t3 = t23 * z + a2 * x2 t4 = int (r46 * t3) x = t3 - t46 * t4 randlc = r46 * x return end c--------------------------------------------------------------------- c--------------------------------------------------------------------- subroutine vranlc (n, x, a, y) c--------------------------------------------------------------------- c--------------------------------------------------------------------- c--------------------------------------------------------------------- c This routine generates N uniform pseudorandom double precision numbers in c the range (0, 1) by using the linear congruential generator c c x_{k+1} = a x_k (mod 2^46) c c where 0 < x_k < 2^46 and 0 < a < 2^46. This scheme generates 2^44 numbers c before repeating. The argument A is the same as 'a' in the above formula, c and X is the same as x_0. A and X must be odd double precision integers c in the range (1, 2^46). The N results are placed in Y and are normalized c to be between 0 and 1. X is updated to contain the new seed, so that c subsequent calls to RANDLC using the same arguments will generate a c continuous sequence. c c This routine generates the output sequence in batches of length NV, for c convenience on vector computers. This routine should produce the same c results on any computer with at least 48 mantissa bits in double precision c floating point data. On Cray systems, double precision should be disabled. c c David H. Bailey August 30, 1990 c--------------------------------------------------------------------- integer n double precision x, a, y(*) double precision r23, r46, t23, t46 integer nv parameter (r23 = 2.d0 ** (-23), r46 = r23 * r23, t23 = 2.d0 ** 23, > t46 = t23 * t23, nv = 64) double precision xv(nv), t1, t2, t3, t4, an, a1, a2, x1, x2, yy integer n1, i, j external randlc double precision randlc c--------------------------------------------------------------------- c Compute the first NV elements of the sequence using RANDLC. c--------------------------------------------------------------------- t1 = x n1 = min (n, nv) do i = 1, n1 xv(i) = t46 * randlc (t1, a) enddo c--------------------------------------------------------------------- c It is not necessary to compute AN, A1 or A2 unless N is greater than NV. c--------------------------------------------------------------------- if (n .gt. nv) then c--------------------------------------------------------------------- c Compute AN = AA ^ NV (mod 2^46) using successive calls to RANDLC. c--------------------------------------------------------------------- t1 = a t2 = r46 * a do i = 1, nv - 1 t2 = randlc (t1, a) enddo an = t46 * t2 c--------------------------------------------------------------------- c Break AN into two parts such that AN = 2^23 * A1 + A2. c--------------------------------------------------------------------- t1 = r23 * an a1 = aint (t1) a2 = an - t23 * a1 endif c--------------------------------------------------------------------- c Compute N pseudorandom results in batches of size NV. c--------------------------------------------------------------------- do j = 0, n - 1, nv n1 = min (nv, n - j) c--------------------------------------------------------------------- c Compute up to NV results based on the current seed vector XV. c--------------------------------------------------------------------- do i = 1, n1 y(i+j) = r46 * xv(i) enddo c--------------------------------------------------------------------- c If this is the last pass through the 140 loop, it is not necessary to c update the XV vector. c--------------------------------------------------------------------- if (j + n1 .eq. n) goto 150 c--------------------------------------------------------------------- c Update the XV vector by multiplying each element by AN (mod 2^46). c--------------------------------------------------------------------- do i = 1, nv t1 = r23 * xv(i) x1 = aint (t1) x2 = xv(i) - t23 * x1 t1 = a1 * x2 + a2 * x1 t2 = aint (r23 * t1) yy = t1 - t23 * t2 t3 = t23 * yy + a2 * x2 t4 = aint (r46 * t3) xv(i) = t3 - t46 * t4 enddo enddo c--------------------------------------------------------------------- c Save the last seed in X so that subsequent calls to VRANLC will generate c a continuous sequence. c--------------------------------------------------------------------- 150 x = xv(n1) return end c----- end of program ------------------------------------------------ tau-2.16.4/examples/NPB2.3/common/randi8.f000066400000000000000000000043121062343042700177020ustar00rootroot00000000000000 double precision function randlc(x, a) c--------------------------------------------------------------------- c c This routine returns a uniform pseudorandom double precision number in the c range (0, 1) by using the linear congruential generator c c x_{k+1} = a x_k (mod 2^46) c c where 0 < x_k < 2^46 and 0 < a < 2^46. This scheme generates 2^44 numbers c before repeating. The argument A is the same as 'a' in the above formula, c and X is the same as x_0. A and X must be odd double precision integers c in the range (1, 2^46). The returned value RANDLC is normalized to be c between 0 and 1, i.e. RANDLC = 2^(-46) * x_1. X is updated to contain c the new seed x_1, so that subsequent calls to RANDLC using the same c arguments will generate a continuous sequence. implicit none double precision x, a integer*8 i246m1, Lx, La double precision d2m46 save i246m1 data i246m1/X'00003FFFFFFFFFFF'/ parameter(d2m46=0.5d0**46) Lx = X La = A Lx = iand(Lx*La,i246m1) randlc = d2m46*dble(Lx) x = dble(Lx) return end c--------------------------------------------------------------------- c--------------------------------------------------------------------- SUBROUTINE VRANLC (N, X, A, Y) implicit none integer n, i double precision x, a, y(*) integer*8 i246m1, Lx, La double precision d2m46 c This doesn't work, because the compiler does the calculation in 32 c bits and overflows. No standard way (without f90 stuff) to specify c that the rhs should be done in 64 bit arithmetic. c parameter(i246m1=2**46-1) save i246m1 data i246m1/X'00003FFFFFFFFFFF'/ parameter(d2m46=0.5d0**46) c Note that the v6 compiler on an R8000 does something stupid with c the above. Using the following instead (or various other things) c makes the calculation run almost 10 times as fast. c c save d2m46 c data d2m46/0.0d0/ c if (d2m46 .eq. 0.0d0) then c d2m46 = 0.5d0**46 c endif Lx = X La = A do i = 1, N Lx = iand(Lx*La,i246m1) y(i) = d2m46*dble(Lx) end do x = dble(Lx) return end tau-2.16.4/examples/NPB2.3/common/randi8_safe.f000066400000000000000000000036421062343042700207050ustar00rootroot00000000000000 double precision function randlc(x, a) c--------------------------------------------------------------------- c c This routine returns a uniform pseudorandom double precision number in the c range (0, 1) by using the linear congruential generator c c x_{k+1} = a x_k (mod 2^46) c c where 0 < x_k < 2^46 and 0 < a < 2^46. This scheme generates 2^44 numbers c before repeating. The argument A is the same as 'a' in the above formula, c and X is the same as x_0. A and X must be odd double precision integers c in the range (1, 2^46). The returned value RANDLC is normalized to be c between 0 and 1, i.e. RANDLC = 2^(-46) * x_1. X is updated to contain c the new seed x_1, so that subsequent calls to RANDLC using the same c arguments will generate a continuous sequence. implicit none double precision x, a integer*8 Lx, La, a1, a2, x1, x2, xa double precision d2m46 parameter(d2m46=0.5d0**46) Lx = x La = A a1 = ibits(La, 23, 23) a2 = ibits(La, 0, 23) x1 = ibits(Lx, 23, 23) x2 = ibits(Lx, 0, 23) xa = ishft(ibits(a1*x2+a2*x1, 0, 23), 23) + a2*x2 Lx = ibits(xa,0, 46) x = dble(Lx) randlc = d2m46*x return end c--------------------------------------------------------------------- c--------------------------------------------------------------------- SUBROUTINE VRANLC (N, X, A, Y) implicit none integer n, i double precision x, a, y(*) integer*8 Lx, La, a1, a2, x1, x2, xa double precision d2m46 parameter(d2m46=0.5d0**46) Lx = X La = A a1 = ibits(La, 23, 23) a2 = ibits(La, 0, 23) do i = 1, N x1 = ibits(Lx, 23, 23) x2 = ibits(Lx, 0, 23) xa = ishft(ibits(a1*x2+a2*x1, 0, 23), 23) + a2*x2 Lx = ibits(xa,0, 46) y(i) = d2m46*dble(Lx) end do x = dble(Lx) return end tau-2.16.4/examples/NPB2.3/common/timers.f000066400000000000000000000041071062343042700200220ustar00rootroot00000000000000c--------------------------------------------------------------------- c--------------------------------------------------------------------- subroutine timer_clear(n) c--------------------------------------------------------------------- c--------------------------------------------------------------------- implicit none integer n double precision start(64), elapsed(64) common /tt/ start, elapsed elapsed(n) = 0.0 return end c--------------------------------------------------------------------- c--------------------------------------------------------------------- subroutine timer_start(n) c--------------------------------------------------------------------- c--------------------------------------------------------------------- implicit none integer n include 'mpif.h' double precision start(64), elapsed(64) common /tt/ start, elapsed start(n) = MPI_Wtime() return end c--------------------------------------------------------------------- c--------------------------------------------------------------------- subroutine timer_stop(n) c--------------------------------------------------------------------- c--------------------------------------------------------------------- implicit none integer n include 'mpif.h' double precision start(64), elapsed(64) common /tt/ start, elapsed double precision t, now now = MPI_Wtime() t = now - start(n) elapsed(n) = elapsed(n) + t return end c--------------------------------------------------------------------- c--------------------------------------------------------------------- double precision function timer_read(n) c--------------------------------------------------------------------- c--------------------------------------------------------------------- implicit none integer n double precision start(64), elapsed(64) common /tt/ start, elapsed timer_read = elapsed(n) return end tau-2.16.4/examples/NPB2.3/config/000077500000000000000000000000001062343042700163235ustar00rootroot00000000000000tau-2.16.4/examples/NPB2.3/config/NAS.samples/000077500000000000000000000000001062343042700204075ustar00rootroot00000000000000tau-2.16.4/examples/NPB2.3/config/NAS.samples/README000066400000000000000000000006121062343042700212660ustar00rootroot00000000000000This directory contains examples of make.def files that were used by the NPB team in testing the benchmarks on different platforms. They can be used as starting points for make.def files for your own platform, but you may need to taylor them for best performance on your installation. A clean template can be found in directory `config'. Some examples of suite.def files are also provided.tau-2.16.4/examples/NPB2.3/config/NAS.samples/make.def.dec_alpha000066400000000000000000000005501062343042700237030ustar00rootroot00000000000000#This is for a DEC Alpha 8400. The code will execute on a #single processor #Warning: parallel make does not work properly in general MPIF77 = f77 FLINK = f77 #Optimization -O5 breaks SP; works fine for all other codes FFLAGS = -O4 MPICC = cc CLINK = cc CFLAGS = -O5 include ../config/make.dummy CC = cc -g BINDIR = ../bin RAND = randi8 tau-2.16.4/examples/NPB2.3/config/NAS.samples/make.def.irix6.2000066400000000000000000000003171062343042700232050ustar00rootroot00000000000000#This is for a generic single-processor SGI workstation MPIF77 = f77 FLINK = f77 FFLAGS = -O3 MPICC = cc CLINK = cc CFLAGS = -O3 include ../config/make.dummy CC = cc -g BINDIR = ../bin RAND = randi8 tau-2.16.4/examples/NPB2.3/config/NAS.samples/make.def.sgi_powerchallenge000066400000000000000000000004771062343042700256540ustar00rootroot00000000000000# This is for the SGI PowerChallenge Array at NASA Ames. mrf77 and # mrcc are local scripts that invoke the proper MPI library. MPIF77 = mrf77 FLINK = mrf77 FFLAGS = -O3 -OPT:fold_arith_limit=1204 MPICC = mrcc CLINK = mrcc CFLAGS = -O3 -OPT:fold_arith_limit=1204 CC = cc -g BINDIR = ../bin RAND = randi8 tau-2.16.4/examples/NPB2.3/config/NAS.samples/make.def.sp2_babbage000066400000000000000000000004651062343042700241370ustar00rootroot00000000000000#This is for the IBM SP2 at Ames; mrf77 and mrcc are local scripts MPIF77 = mrf77 FLINK = mrf77 FFLAGS = -O3 FLINKFLAGS = -bmaxdata:0x60000000 MPICC = mrcc CLINK = mrcc CFLAGS = -O3 CLINKFLAGS = -bmaxdata:0x60000000 CC = cc -g BINDIR = ../bin RAND = randi8 tau-2.16.4/examples/NPB2.3/config/NAS.samples/make.def.sun_ultra_sparc000066400000000000000000000021561062343042700252130ustar00rootroot00000000000000# This is for a Sun SparcCenter or UltraEnterprise machine MPIF77 = f77 FLINK = f77 FMPI_LIB = -L/lib/solaris/ch_lfshmem -lmpi FMPI_INC = -I/include # sparc10,20 SparcCenter{1,2}000 (uname -m returns sun4m) # and f77 -V returns 4.0 or greater # FFLAGS = -fast -xtarget=super -xO4 -depend # Ultra1,2, UltraEnterprise servers (uname -m returns sun4u) FFLAGS = -fast -xtarget=ultra -xarch=v8plus -xO4 -depend FLINKFLAGS = -lmopt -lcopt -lsunmath MPICC = cc CLINK = cc CMPI_LIB = -L/lib/solaris/ch_lfshmem -lmpi CMPI_INC = -I/include # sparc10,20 SparcCenter{1,2}000 (uname -m returns sun4m) # and cc -V returns 4.0 or greater #CFLAGS = -fast -xtarget=super -xO4 -xdepend # Ultra1,2, UltraEnterprise servers (uname -m returns sun4u) CFLAGS = -fast -xtarget=ultra -xarch=v8plus -xO4 -xdepend CLINKFLAGS = -fast CC = cc -g BINDIR = ../bin # Cannot use randi8 or randi8-safe on a 32-but machine. Use double precision RAND = randdp tau-2.16.4/examples/NPB2.3/config/NAS.samples/make.def.t3d_cosmos000066400000000000000000000013261062343042700240620ustar00rootroot00000000000000#This is for the Cray T3D at the Jet Propulsion Laboratory MPIF77 = cf77 FLINK = cf77 FMPI_LIB = -L/usr/local/mpp/lib -lmpi FMPI_INC = -I/usr/local/mpp/lib/include/mpp FFLAGS = -dp -Wf-onoieeedivide -C cray-t3d #The following flags provide more effective optimization, but may #cause the random number generator randi8(_safe) to break in EP #FFLAGS = -dp -Wf-oaggress -Wf-onoieeedivide -C cray-t3d FLINKFLAGS = -Wl-Drdahead=on -C cray-t3d MPICC = cc CLINK = cc CMPI_LIB = -L/usr/local/mpp/lib -lmpi CMPI_INC = -I/usr/local/mpp/lib/include/mpp CFLAGS = -O3 -Tcray-t3d CLINKFLAGS = -Tcray-t3d CC = cc -g -Tcray-ymp BINDIR = ../bin CONVERTFLAG= -DCONVERTDOUBLE RAND = randi8 tau-2.16.4/examples/NPB2.3/config/NAS.samples/suite.def.bt000066400000000000000000000004421062343042700226240ustar00rootroot00000000000000bt S 1 bt S 4 bt S 9 bt S 16 bt A 1 bt A 4 bt A 9 bt A 16 bt A 25 bt A 36 bt A 49 bt A 64 bt A 81 bt A 100 bt A 121 bt B 1 bt B 4 bt B 9 bt B 16 bt B 25 bt B 36 bt B 49 bt B 64 bt B 81 bt B 100 bt B 121 bt C 1 bt C 4 bt C 9 bt C 16 bt C 25 bt C 36 bt C 49 bt C 64 bt C 81 bt C 100 bt C 121 tau-2.16.4/examples/NPB2.3/config/NAS.samples/suite.def.cg000066400000000000000000000003331062343042700226070ustar00rootroot00000000000000cg S 1 cg S 2 cg S 4 cg S 8 cg S 16 cg A 1 cg A 2 cg A 4 cg A 8 cg A 16 cg A 32 cg A 64 cg A 128 cg B 1 cg B 2 cg B 4 cg B 8 cg B 16 cg B 32 cg B 64 cg B 128 cg C 1 cg C 2 cg C 4 cg C 8 cg C 16 cg C 32 cg C 64 cg C 128 tau-2.16.4/examples/NPB2.3/config/NAS.samples/suite.def.ep000066400000000000000000000003331062343042700226220ustar00rootroot00000000000000ep S 1 ep S 2 ep S 4 ep S 8 ep S 16 ep A 1 ep A 2 ep A 4 ep A 8 ep A 16 ep A 32 ep A 64 ep A 128 ep B 1 ep B 2 ep B 4 ep B 8 ep B 16 ep B 32 ep B 64 ep B 128 ep C 1 ep C 2 ep C 4 ep C 8 ep C 16 ep C 32 ep C 64 ep C 128 tau-2.16.4/examples/NPB2.3/config/NAS.samples/suite.def.ft000066400000000000000000000003331062343042700226270ustar00rootroot00000000000000ft S 1 ft S 2 ft S 4 ft S 8 ft S 16 ft A 1 ft A 2 ft A 4 ft A 8 ft A 16 ft A 32 ft A 64 ft A 128 ft B 1 ft B 2 ft B 4 ft B 8 ft B 16 ft B 32 ft B 64 ft B 128 ft C 1 ft C 2 ft C 4 ft C 8 ft C 16 ft C 32 ft C 64 ft C 128 tau-2.16.4/examples/NPB2.3/config/NAS.samples/suite.def.is000066400000000000000000000003331062343042700226310ustar00rootroot00000000000000is S 1 is S 2 is S 4 is S 8 is S 16 is A 1 is A 2 is A 4 is A 8 is A 16 is A 32 is A 64 is A 128 is B 1 is B 2 is B 4 is B 8 is B 16 is B 32 is B 64 is B 128 is C 1 is C 2 is C 4 is C 8 is C 16 is C 32 is C 64 is C 128 tau-2.16.4/examples/NPB2.3/config/NAS.samples/suite.def.lu000066400000000000000000000003331062343042700226360ustar00rootroot00000000000000lu S 1 lu S 2 lu S 4 lu S 8 lu S 16 lu A 1 lu A 2 lu A 4 lu A 8 lu A 16 lu A 32 lu A 64 lu A 128 lu B 1 lu B 2 lu B 4 lu B 8 lu B 16 lu B 32 lu B 64 lu B 128 lu C 1 lu C 2 lu C 4 lu C 8 lu C 16 lu C 32 lu C 64 lu C 128 tau-2.16.4/examples/NPB2.3/config/NAS.samples/suite.def.mg000066400000000000000000000003331062343042700226210ustar00rootroot00000000000000mg S 1 mg S 2 mg S 4 mg S 8 mg S 16 mg A 1 mg A 2 mg A 4 mg A 8 mg A 16 mg A 32 mg A 64 mg A 128 mg B 1 mg B 2 mg B 4 mg B 8 mg B 16 mg B 32 mg B 64 mg B 128 mg C 1 mg C 2 mg C 4 mg C 8 mg C 16 mg C 32 mg C 64 mg C 128 tau-2.16.4/examples/NPB2.3/config/NAS.samples/suite.def.small000066400000000000000000000000701062343042700233240ustar00rootroot00000000000000bt S 1 cg S 1 ep S 1 ft S 1 is S 1 lu S 1 mg S 1 sp S 1 tau-2.16.4/examples/NPB2.3/config/NAS.samples/suite.def.sp000066400000000000000000000004421062343042700226410ustar00rootroot00000000000000sp S 1 sp S 4 sp S 9 sp S 16 sp A 1 sp A 4 sp A 9 sp A 16 sp A 25 sp A 36 sp A 49 sp A 64 sp A 81 sp A 100 sp A 121 sp B 1 sp B 4 sp B 9 sp B 16 sp B 25 sp B 36 sp B 49 sp B 64 sp B 81 sp B 100 sp B 121 sp C 1 sp C 4 sp C 9 sp C 16 sp C 25 sp C 36 sp C 49 sp C 64 sp C 81 sp C 100 sp C 121 tau-2.16.4/examples/NPB2.3/config/make.def000066400000000000000000000162001062343042700177170ustar00rootroot00000000000000#--------------------------------------------------------------------------- # # SITE- AND/OR PLATFORM-SPECIFIC DEFINITIONS. # #--------------------------------------------------------------------------- #--------------------------------------------------------------------------- # Items in this file will need to be changed for each platform. # (Note these definitions are inconsistent with NPB2.1.) #--------------------------------------------------------------------------- #--------------------------------------------------------------------------- # Parallel Fortran: # # For CG, EP, FT, MG, LU, SP and BT, which are in Fortran, the following must # be defined: # # MPIF77 - Fortran compiler # FFLAGS - Fortran compilation arguments # FMPI_INC - any -I arguments required for compiling MPI/Fortran # FLINK - Fortran linker # FLINKFLAGS - Fortran linker arguments # FMPI_LIB - any -L and -l arguments required for linking MPI/Fortran # # compilations are done with $(MPIF77) $(FMPI_INC) $(FFLAGS) or # $(MPIF77) $(FFLAGS) # linking is done with $(FLINK) $(FMPI_LIB) $(FLINKFLAGS) #--------------------------------------------------------------------------- TAUDIR = ../../.. include $(TAUDIR)/include/Makefile #--------------------------------------------------------------------------- # This is the fortran compiler used for MPI programs #--------------------------------------------------------------------------- MPIF77 = $(TAU_F90) $(TAU_F90_FIXED) # This links MPI fortran programs; usually the same as ${MPIF77} FLINK = $(TAU_LINKER) #--------------------------------------------------------------------------- # These macros are passed to the linker to help link with MPI correctly #--------------------------------------------------------------------------- #FMPI_LIB = -L/usr/local/lib -lmpi FMPI_LIB = $(TAU_MPI_FLIBS) $(TAU_LIBS) $(LEXTRA1) $(TAU_LDFLAGS) $(TAU_FORTRANLIBS) $(EXTRALIBS) -lm # TO DISABLE THE INSTRUMENTATION USE $(TAU_DISABLE) INSTEAD OF $(TAU_LIBS) #FMPI_LIB = $(TAU_DISABLE) $(LEXTRA1) $(TAU_FORTRANLIBS) #--------------------------------------------------------------------------- # These macros are passed to the compiler to help find 'mpif.h' #--------------------------------------------------------------------------- #FMPI_INC = -I/usr/local/include FMPI_INC = $(TAU_MPI_INCLUDE) #--------------------------------------------------------------------------- # Global *compile time* flags for Fortran programs #--------------------------------------------------------------------------- FFLAGS = -O3 # FFLAGS = -g #--------------------------------------------------------------------------- # Global *link time* flags. Flags for increasing maximum executable # size usually go here. #--------------------------------------------------------------------------- FLINKFLAGS = #--------------------------------------------------------------------------- # Parallel C: # # For IS, which is in C, the following must be defined: # # MPICC - C compiler # CFLAGS - C compilation arguments # CMPI_INC - any -I arguments required for compiling MPI/C # CLINK - C linker # CLINKFLAGS - C linker flags # CMPI_LIB - any -L and -l arguments required for linking MPI/C # # compilations are done with $(MPICC) $(CMPI_INC) $(CFLAGS) or # $(MPICC) $(CFLAGS) # linking is done with $(CLINK) $(CMPI_LIB) $(CLINKFLAGS) #--------------------------------------------------------------------------- #--------------------------------------------------------------------------- # This is the C compiler used for MPI programs #--------------------------------------------------------------------------- MPICC = $(TAU_CC) # This links MPI C programs; usually the same as ${MPICC} CLINK = $(TAU_CC) #--------------------------------------------------------------------------- # These macros are passed to the linker to help link with MPI correctly #--------------------------------------------------------------------------- #CMPI_LIB = -L/usr/local/lib -lmpi #CMPI_LIB = -L$(MPIDIR)/lib/$(MPIARCH) -lmpich CMPI_LIB = $(TAU_MPI_LIBS) $(TAU_LIBS) $(LEXTRA1) $(TAU_LDFLAGS) #--------------------------------------------------------------------------- # These macros are passed to the compiler to help find 'mpi.h' #--------------------------------------------------------------------------- #CMPI_INC = -I/usr/local/include CMPI_INC = $(TAU_MPI_INCLUDE) #--------------------------------------------------------------------------- # Global *compile time* flags for C programs #--------------------------------------------------------------------------- CFLAGS = -O3 # CFLAGS = -g #--------------------------------------------------------------------------- # Global *link time* flags. Flags for increasing maximum executable # size usually go here. #--------------------------------------------------------------------------- CLINKFLAGS = #--------------------------------------------------------------------------- # MPI dummy library: # # Uncomment if you want to use the MPI dummy library supplied by NAS instead # of the true message-passing library. The include file redefines several of # the above macros. It also invokes make in subdirectory MPI_dummy. Make # sure that no spaces or tabs precede include. #--------------------------------------------------------------------------- # include ../config/make.dummy #--------------------------------------------------------------------------- # Utilities C: # # This is the C compiler used to compile C utilities. Flags required by # this compiler go here also; typically there are few flags required; hence # there are no separate macros provided for such flags. #--------------------------------------------------------------------------- CC = $(TAU_CC_FE) #--------------------------------------------------------------------------- # Destination of executables, relative to subdirs of the main directory. . #--------------------------------------------------------------------------- BINDIR = ../bin #--------------------------------------------------------------------------- # Some machines (e.g. Crays) have 128-bit DOUBLE PRECISION numbers, which # is twice the precision required for the NPB suite. A compiler flag # (e.g. -dp) can usually be used to change DOUBLE PRECISION variables to # 64 bits, but the MPI library may continue to send 128 bits. Short of # recompiling MPI, the solution is to use MPI_REAL to send these 64-bit # numbers, and MPI_COMPLEX to send their complex counterparts. Uncomment # the following line to enable this substitution. #--------------------------------------------------------------------------- # CONVERTFLAG = -DCONVERTDOUBLE #--------------------------------------------------------------------------- # The variable RAND controls which random number generator # is used. It is described in detail in Doc/README.install. # Use "randi8" unless there is a reason to use another one. # Other allowed values are "randi8_safe", "randdp" and "randdpvec" #--------------------------------------------------------------------------- RAND = randi8 # The following is highly reliable but may be slow: # RAND = randdp tau-2.16.4/examples/NPB2.3/config/make.def.template000066400000000000000000000155271062343042700215440ustar00rootroot00000000000000#--------------------------------------------------------------------------- # # SITE- AND/OR PLATFORM-SPECIFIC DEFINITIONS. # #--------------------------------------------------------------------------- #--------------------------------------------------------------------------- # Items in this file will need to be changed for each platform. # (Note these definitions are inconsistent with NPB2.1.) #--------------------------------------------------------------------------- #--------------------------------------------------------------------------- # Parallel Fortran: # # For CG, EP, FT, MG, LU, SP and BT, which are in Fortran, the following must # be defined: # # MPIF77 - Fortran compiler # FFLAGS - Fortran compilation arguments # FMPI_INC - any -I arguments required for compiling MPI/Fortran # FLINK - Fortran linker # FLINKFLAGS - Fortran linker arguments # FMPI_LIB - any -L and -l arguments required for linking MPI/Fortran # # compilations are done with $(MPIF77) $(FMPI_INC) $(FFLAGS) or # $(MPIF77) $(FFLAGS) # linking is done with $(FLINK) $(FMPI_LIB) $(FLINKFLAGS) #--------------------------------------------------------------------------- #--------------------------------------------------------------------------- # This is the fortran compiler used for MPI programs #--------------------------------------------------------------------------- MPIF77 = f77 # This links MPI fortran programs; usually the same as ${MPIF77} FLINK = f77 #--------------------------------------------------------------------------- # These macros are passed to the linker to help link with MPI correctly #--------------------------------------------------------------------------- #FMPI_LIB = -L/usr/local/lib -lmpi FMPI_LIB = -L/usr/local/packages/mpich/lib/LINUX/ch_p4 -lfmpich #--------------------------------------------------------------------------- # These macros are passed to the compiler to help find 'mpif.h' #--------------------------------------------------------------------------- #FMPI_INC = -I/usr/local/include FMPI_INC = -I/usr/local/packages/mpich/include #--------------------------------------------------------------------------- # Global *compile time* flags for Fortran programs #--------------------------------------------------------------------------- FFLAGS = -O3 # FFLAGS = -g #--------------------------------------------------------------------------- # Global *link time* flags. Flags for increasing maximum executable # size usually go here. #--------------------------------------------------------------------------- FLINKFLAGS = #--------------------------------------------------------------------------- # Parallel C: # # For IS, which is in C, the following must be defined: # # MPICC - C compiler # CFLAGS - C compilation arguments # CMPI_INC - any -I arguments required for compiling MPI/C # CLINK - C linker # CLINKFLAGS - C linker flags # CMPI_LIB - any -L and -l arguments required for linking MPI/C # # compilations are done with $(MPICC) $(CMPI_INC) $(CFLAGS) or # $(MPICC) $(CFLAGS) # linking is done with $(CLINK) $(CMPI_LIB) $(CLINKFLAGS) #--------------------------------------------------------------------------- #--------------------------------------------------------------------------- # This is the C compiler used for MPI programs #--------------------------------------------------------------------------- MPICC = cc # This links MPI C programs; usually the same as ${MPICC} CLINK = cc #--------------------------------------------------------------------------- # These macros are passed to the linker to help link with MPI correctly #--------------------------------------------------------------------------- #CMPI_LIB = -L/usr/local/lib -lmpi CMPI_LIB = -L/usr/local/packages/mpich/lib/LINUX/ch_p4 -lmpich #--------------------------------------------------------------------------- # These macros are passed to the compiler to help find 'mpi.h' #--------------------------------------------------------------------------- #CMPI_INC = -I/usr/local/include CMPI_INC = -I/usr/local/packages/mpich/include #--------------------------------------------------------------------------- # Global *compile time* flags for C programs #--------------------------------------------------------------------------- CFLAGS = -O3 # CFLAGS = -g #--------------------------------------------------------------------------- # Global *link time* flags. Flags for increasing maximum executable # size usually go here. #--------------------------------------------------------------------------- CLINKFLAGS = #--------------------------------------------------------------------------- # MPI dummy library: # # Uncomment if you want to use the MPI dummy library supplied by NAS instead # of the true message-passing library. The include file redefines several of # the above macros. It also invokes make in subdirectory MPI_dummy. Make # sure that no spaces or tabs precede include. #--------------------------------------------------------------------------- # include ../config/make.dummy #--------------------------------------------------------------------------- # Utilities C: # # This is the C compiler used to compile C utilities. Flags required by # this compiler go here also; typically there are few flags required; hence # there are no separate macros provided for such flags. #--------------------------------------------------------------------------- CC = cc -g #--------------------------------------------------------------------------- # Destination of executables, relative to subdirs of the main directory. . #--------------------------------------------------------------------------- BINDIR = ../bin #--------------------------------------------------------------------------- # Some machines (e.g. Crays) have 128-bit DOUBLE PRECISION numbers, which # is twice the precision required for the NPB suite. A compiler flag # (e.g. -dp) can usually be used to change DOUBLE PRECISION variables to # 64 bits, but the MPI library may continue to send 128 bits. Short of # recompiling MPI, the solution is to use MPI_REAL to send these 64-bit # numbers, and MPI_COMPLEX to send their complex counterparts. Uncomment # the following line to enable this substitution. #--------------------------------------------------------------------------- # CONVERTFLAG = -DCONVERTDOUBLE #--------------------------------------------------------------------------- # The variable RAND controls which random number generator # is used. It is described in detail in Doc/README.install. # Use "randi8" unless there is a reason to use another one. # Other allowed values are "randi8_safe", "randdp" and "randdpvec" #--------------------------------------------------------------------------- RAND = randi8 # The following is highly reliable but may be slow: # RAND = randdp tau-2.16.4/examples/NPB2.3/config/make.dummy000066400000000000000000000002731062343042700203170ustar00rootroot00000000000000FMPI_LIB = -L../MPI_dummy -lmpi FMPI_INC = -I../MPI_dummy CMPI_LIB = -L../MPI_dummy -lmpi CMPI_INC = -I../MPI_dummy default:: ${PROGRAM} libmpi.a libmpi.a: cd ../MPI_dummy; $(MAKE) tau-2.16.4/examples/NPB2.3/config/suite.def000066400000000000000000000013721062343042700201370ustar00rootroot00000000000000# config/suite.def # This file is used to build several benchmarks with a single command. # Typing "make suite" in the main directory will build all the benchmarks # specified in this file. # Each line of this file contains a benchmark name, class, and number # of nodes. The name is one of "cg", "is", "ep", mg", "ft", "sp", "bt", # and "lu". # The class is one of "S", "W", "A", "B", and "C". # The number of nodes must be a legal number for a particular # benchmark. The utility which parses this file is primitive, so # formatting is inflexible. Separate name/class/number by tabs. # Comments start with "#" as the first character on a line. # No blank lines. # The following example builds 1 processor sample sizes of all benchmarks. sp W 4 lu W 4 tau-2.16.4/examples/NPB2.3/config/suite.def.template000066400000000000000000000014441062343042700217510ustar00rootroot00000000000000# config/suite.def # This file is used to build several benchmarks with a single command. # Typing "make suite" in the main directory will build all the benchmarks # specified in this file. # Each line of this file contains a benchmark name, class, and number # of nodes. The name is one of "cg", "is", "ep", mg", "ft", "sp", "bt", # and "lu". # The class is one of "S", "W", "A", "B", and "C". # The number of nodes must be a legal number for a particular # benchmark. The utility which parses this file is primitive, so # formatting is inflexible. Separate name/class/number by tabs. # Comments start with "#" as the first character on a line. # No blank lines. # The following example builds 1 processor sample sizes of all benchmarks. ft S 1 mg S 1 sp S 1 lu S 1 bt S 1 is S 1 ep S 1 cg S 1 tau-2.16.4/examples/NPB2.3/sys/000077500000000000000000000000001062343042700156745ustar00rootroot00000000000000tau-2.16.4/examples/NPB2.3/sys/Makefile000066400000000000000000000012051062343042700173320ustar00rootroot00000000000000include ../config/make.def # Note that COMPILE is also defined in make.common and should # be the same. We can't include make.common because it has a lot # of other garbage. LINK is not defined in make.common because # ${MPI_LIB} needs to go at the end of the line. FCOMPILE = $(MPIF77) -c $(FMPI_INC) $(FFLAGS) all: setparams # setparams creates an npbparam.h file for each benchmark # configuration. npbparams.h also contains info about how a benchmark # was compiled and linked setparams: setparams.c ../config/make.def $(CC) ${CONVERTFLAG} -o setparams setparams.c clean: -rm -f setparams setparams.h npbparams.h -rm -f *~ *.o tau-2.16.4/examples/NPB2.3/sys/README000066400000000000000000000026651062343042700165650ustar00rootroot00000000000000This directory contains utilities and files used by the build process. You should not need to change anything in this directory. Original Files -------------- setparams.c: Source for the setparams program. This program is used internally in the build process to create the file "npbparams.h" for each benchmark. npbparams.h contains Fortran or C parameters to build a benchmark for a specific class and number of nodes. The setparams program is never run directly by a user. Its invocation syntax is "setparams benchmark-name nprocs class". It examines the file "npbparams.h" in the current directory. If the specified parameters are the same as those in the npbparams.h file, nothing it changed. If the file does not exist or corresponds to a different class/number of nodes, it is (re)built. One of the more complicated things in npbparams.h is that it contains, in a Fortran string, the compiler flags used to build a benchmark, so that a benchmark can print out how it was compiled. make.common A makefile segment that is included in each individual benchmark program makefile. It sets up some standard macros (COMPILE, etc) and makes sure everything is configured correctly (npbparams.h) Makefile Builds setparams README This file. Created files ------------- setparams See descriptions above tau-2.16.4/examples/NPB2.3/sys/make.common000066400000000000000000000032701062343042700200250ustar00rootroot00000000000000PROGRAM = $(BINDIR)/$(BENCHMARK).$(CLASS).$(NPROCS) FCOMPILE = $(MPIF77) -c $(FMPI_INC) $(FFLAGS) CCOMPILE = $(MPICC) -c $(CMPI_INC) $(CFLAGS) # Class "U" is used internally by the setparams program to mean # "unknown". This means that if you don't specify CLASS= # on the command line, you'll get an error. It would be nice # to be able to avoid this, but we'd have to get information # from the setparams back to the make program, which isn't easy. CLASS=U NPROCS=1 default:: ${PROGRAM} # This makes sure the configuration utility setparams # is up to date. # Note that this must be run every time, which is why the # target does not exist and is not created. # If you create a file called "config" you will break things. config: @cd ../sys; ${MAKE} all ../sys/setparams ${BENCHMARK} ${NPROCS} ${CLASS} COMMON=../common ${COMMON}/${RAND}.o: ${COMMON}/${RAND}.f cd ${COMMON}; ${FCOMPILE} ${RAND}.f ${COMMON}/print_results.o: ${COMMON}/print_results.f cd ${COMMON}; ${FCOMPILE} print_results.f ${COMMON}/c_print_results.o: ${COMMON}/c_print_results.c cd ${COMMON}; ${CCOMPILE} c_print_results.c ${COMMON}/timers.o: ${COMMON}/timers.f cd ${COMMON}; ${FCOMPILE} timers.f ${COMMON}/c_timers.o: ${COMMON}/c_timers.c cd ${COMMON}; ${CCOMPILE} c_timers.c # Normally setparams updates npbparams.h only if the settings (CLASS/NPROCS) # have changed. However, we also want to update if the compile options # may have changed (set in ../config/make.def). npbparams.h: ../config/make.def @ echo make.def modified. Rebuilding npbparams.h just in case rm -f npbparams.h ../sys/setparams ${BENCHMARK} ${NPROCS} ${CLASS} # So that "make benchmark-name" works ${BENCHMARK}: default ${BENCHMARKU}: default tau-2.16.4/examples/NPB2.3/sys/print_header000077500000000000000000000003301062343042700202620ustar00rootroot00000000000000echo ' =========================================' echo ' = NAS Parallel Benchmarks 2.3 =' echo ' = MPI/F77/C =' echo ' =========================================' echo '' tau-2.16.4/examples/NPB2.3/sys/print_instructions000077500000000000000000000015431062343042700216050ustar00rootroot00000000000000echo '' echo ' To make a NAS benchmark type ' echo '' echo ' make NPROCS= CLASS=' echo '' echo ' where is "bt", "cg", "ep", "ft", "is", "lu",' echo ' "mg", or "sp"' echo ' is the number of processors' echo ' is "S", "W", "A", "B" or "C"' echo '' echo ' To make a set of benchmarks, create the file config/suite.def' echo ' according to the instructions in config/suite.def.template and type' echo '' echo ' make suite' echo '' echo ' ***************************************************************' echo ' * Remember to edit the file config/make.def for site specific *' echo ' * information as described in the README file *' echo ' ***************************************************************' tau-2.16.4/examples/NPB2.3/sys/setparams.c000066400000000000000000000743521062343042700200520ustar00rootroot00000000000000/* * This utility configures a NPB to be built for a specific number * of nodes and a specific class. It creates a file "npbparams.h" * in the source directory. This file keeps state information about * which size of benchmark is currently being built (so that nothing * if unnecessarily rebuilt) and defines (through PARAMETER statements) * the number of nodes and class for which a benchmark is being built. * The utility takes 3 arguments: * setparams benchmark-name nprocs class * benchmark-name is "sp", "bt", etc * nprocs is the number of processors to run on * class is the size of the benchmark * These parameters are checked for the current benchmark. If they * are invalid, this program prints a message and aborts. * If the parameters are ok, the current npbsize.h (actually just * the first line) is read in. If the new parameters are the same as * the old, nothing is done, but an exit code is returned to force the * user to specify (otherwise the make procedure succeeds but builds a * binary of the wrong name). Otherwise the file is rewritten. * Errors write a message (to stdout) and abort. * * This program makes use of two extra benchmark "classes" * class "X" means an invalid specification. It is returned if * there is an error parsing the config file. * class "U" is an external specification meaning "unknown class" * * Unfortunately everything has to be case sensitive. This is * because we can always convert lower to upper or v.v. but * can't feed this information back to the makefile, so typing * make CLASS=a and make CLASS=A will produce different binaries. * * */ #include #include #include #include #include #include /* * This is the master version number for this set of * NPB benchmarks. It is in an obscure place so people * won't accidentally change it. */ #define VERSION "2.3" /* controls verbose output from setparams */ /* #define VERBOSE */ #define FILENAME "npbparams.h" #define DESC_LINE "c NPROCS = %d CLASS = %c\n" #define DEF_CLASS_LINE "#define CLASS '%c'\n" #define DEF_NUM_PROCS_LINE "#define NUM_PROCS %d\n" #define FINDENT " " #define CONTINUE " > " void get_info(char *argv[], int *typep, int *nprocsp, char *classp); void check_info(int type, int nprocs, char class); void read_info(int type, int *nprocsp, char *classp); void write_info(int type, int nprocs, char class); void write_sp_info(FILE *fp, int nprocs, char class); void write_bt_info(FILE *fp, int nprocs, char class); void write_lu_info(FILE *fp, int nprocs, char class); void write_mg_info(FILE *fp, int nprocs, char class); void write_cg_info(FILE *fp, int nprocs, char class); void write_ft_info(FILE *fp, int nprocs, char class); void write_ep_info(FILE *fp, int nprocs, char class); void write_is_info(FILE *fp, int nprocs, char class); void write_compiler_info(int type, FILE *fp); void write_convertdouble_info(int type, FILE *fp); void check_line(char *line, char *label, char *val); int check_include_line(char *line, char *filename); void put_string(FILE *fp, char *name, char *val); void put_def_string(FILE *fp, char *name, char *val); void put_def_variable(FILE *fp, char *name, char *val); int isqrt(int i); int ilog2(int i); int ipow2(int i); enum benchmark_types {SP, BT, LU, MG, FT, IS, EP, CG}; main(int argc, char *argv[]) { int nprocs, nprocs_old, type; char class, class_old; if (argc != 4) { printf("Usage: %s benchmark-name nprocs class\n", argv[0]); exit(1); } /* Get command line arguments. Make sure they're ok. */ get_info(argv, &type, &nprocs, &class); if (class != 'U') { #ifdef VERBOSE printf("setparams: For benchmark %s: number of processors = %d class = %c\n", argv[1], nprocs, class); #endif check_info(type, nprocs, class); } /* Get old information. */ read_info(type, &nprocs_old, &class_old); if (class != 'U') { if (class_old != 'X') { #ifdef VERBOSE printf("setparams: old settings: number of processors = %d class = %c\n", nprocs_old, class_old); #endif } } else { printf("setparams:\n\ *********************************************************************\n\ * You must specify NPROCS and CLASS to build this benchmark *\n\ * For example, to build a class A benchmark for 4 processors, type *\n\ * make {benchmark-name} NPROCS=4 CLASS=A *\n\ *********************************************************************\n\n"); if (class_old != 'X') { #ifdef VERBOSE printf("setparams: Previous settings were CLASS=%c NPROCS=%d\n", class_old, nprocs_old); #endif } exit(1); /* exit on class==U */ } /* Write out new information if it's different. */ if (nprocs != nprocs_old || class != class_old) { #ifdef VERBOSE printf("setparams: Writing %s\n", FILENAME); #endif write_info(type, nprocs, class); } else { #ifdef VERBOSE printf("setparams: Settings unchanged. %s unmodified\n", FILENAME); #endif } exit(0); } /* * get_info(): Get parameters from command line */ void get_info(char *argv[], int *typep, int *nprocsp, char *classp) { *nprocsp = atoi(argv[2]); *classp = *argv[3]; if (!strcmp(argv[1], "sp") || !strcmp(argv[1], "SP")) *typep = SP; else if (!strcmp(argv[1], "bt") || !strcmp(argv[1], "BT")) *typep = BT; else if (!strcmp(argv[1], "ft") || !strcmp(argv[1], "FT")) *typep = FT; else if (!strcmp(argv[1], "lu") || !strcmp(argv[1], "LU")) *typep = LU; else if (!strcmp(argv[1], "mg") || !strcmp(argv[1], "MG")) *typep = MG; else if (!strcmp(argv[1], "is") || !strcmp(argv[1], "IS")) *typep = IS; else if (!strcmp(argv[1], "ep") || !strcmp(argv[1], "EP")) *typep = EP; else if (!strcmp(argv[1], "cg") || !strcmp(argv[1], "CG")) *typep = CG; else { printf("setparams: Error: unknown benchmark type %s\n", argv[1]); exit(1); } } /* * check_info(): Make sure command line data is ok for this benchmark */ void check_info(int type, int nprocs, char class) { int rootprocs, logprocs, tmplog; /* check number of processors */ if (nprocs <= 0) { printf("setparams: Number of processors must be greater than zero\n"); exit(1); } switch(type) { case SP: case BT: rootprocs = isqrt(nprocs); if (rootprocs < 0) { printf("setparams: Number of processors %d must be a square (1,4,9,...) for this benchmark", nprocs); exit(1); } if (class == 'S' && nprocs > 16) { printf("setparams: BT and SP sample sizes cannot be run on more\n"); printf(" than 16 processors because the cell size would be too small.\n"); exit(1); } break; case CG: case FT: case MG: case IS: case LU: logprocs = ilog2(nprocs); if (logprocs < 0) { printf("setparams: Number of processors must be a power of two (1,2,4,...) for this benchmark\n"); exit(1); } break; case EP: break; default: /* never should have gotten this far with a bad name */ printf("setparams: (Internal Error) Benchmark type %d unknown to this program\n", type); exit(1); } /* check class */ if (class != 'S' && class != 'A' && class != 'B' && class != 'R' && class != 'W' && class != 'C') { printf("setparams: Unknown benchmark class %c\n", class); printf("setparams: Allowed classes are \"S\", \"A\", \"B\" and \"C\"\n"); exit(1); } } /* * read_info(): Read previous information from file. * Not an error if file doesn't exist, because this * may be the first time we're running. * Assumes the first line of the file is in a special * format that we understand (since we wrote it). */ void read_info(int type, int *nprocsp, char *classp) { int nread, gotem = 0; char line[200]; FILE *fp; fp = fopen(FILENAME, "r"); if (fp == NULL) { #ifdef VERBOSE printf("setparams: INFO: configuration file %s does not exist (yet)\n", FILENAME); #endif goto abort; } /* first line of file contains info (fortran), first two lines (C) */ switch(type) { case SP: case BT: case FT: case MG: case LU: case EP: case CG: nread = fscanf(fp, DESC_LINE, nprocsp, classp); if (nread != 2) { printf("setparams: Error parsing config file %s. Ignoring previous settings\n", FILENAME); goto abort; } break; case IS: nread = fscanf(fp, DEF_CLASS_LINE, classp); nread += fscanf(fp, DEF_NUM_PROCS_LINE, nprocsp); if (nread != 2) { printf("setparams: Error parsing config file %s. Ignoring previous settings\n", FILENAME); goto abort; } break; default: /* never should have gotten this far with a bad name */ printf("setparams: (Internal Error) Benchmark type %d unknown to this program\n", type); exit(1); } normal_return: *classp = *classp; fclose(fp); return; abort: *nprocsp = -1; *classp = 'X'; return; } /* * write_info(): Write new information to config file. * First line is in a special format so we can read * it in again. Then comes a warning. The rest is all * specific to a particular benchmark. */ void write_info(int type, int nprocs, char class) { FILE *fp; fp = fopen(FILENAME, "w"); if (fp == NULL) { printf("setparams: Can't open file %s for writing\n", FILENAME); exit(1); } switch(type) { case SP: case BT: case FT: case MG: case LU: case EP: case CG: /* Write out the header */ fprintf(fp, DESC_LINE, nprocs, class); /* Print out a warning so bozos don't mess with the file */ fprintf(fp, "\ c \n\ c \n\ c This file is generated automatically by the setparams utility.\n\ c It sets the number of processors and the class of the NPB\n\ c in this directory. Do not modify it by hand.\n\ c \n"); break; case IS: fprintf(fp, DEF_CLASS_LINE, class); fprintf(fp, DEF_NUM_PROCS_LINE, nprocs); fprintf(fp, "\ /*\n\ This file is generated automatically by the setparams utility.\n\ It sets the number of processors and the class of the NPB\n\ in this directory. Do not modify it by hand. */\n\ \n"); break; default: printf("setparams: (Internal error): Unknown benchmark type %d\n", type); exit(1); } /* Now do benchmark-specific stuff */ switch(type) { case SP: write_sp_info(fp, nprocs, class); break; case BT: write_bt_info(fp, nprocs, class); break; case LU: write_lu_info(fp, nprocs, class); break; case MG: write_mg_info(fp, nprocs, class); break; case IS: write_is_info(fp, nprocs, class); break; case FT: write_ft_info(fp, nprocs, class); break; case EP: write_ep_info(fp, nprocs, class); break; case CG: write_cg_info(fp, nprocs, class); break; default: printf("setparams: (Internal error): Unknown benchmark type %d\n", type); exit(1); } write_convertdouble_info(type, fp); write_compiler_info(type, fp); fclose(fp); return; } /* * write_sp_info(): Write SP specific info to config file */ void write_sp_info(FILE *fp, int nprocs, char class) { int maxcells, problem_size, niter; char *dt; maxcells = isqrt(nprocs); if (class == 'S') { problem_size = 12; dt = "0.015d0"; niter = 100; } else if (class == 'W') { problem_size = 36; dt = "0.0015d0"; niter = 400; } else if (class == 'A') { problem_size = 64; dt = "0.0015d0"; niter = 400; } else if (class == 'B') { problem_size = 102; dt = "0.001d0"; niter = 400; } else if (class == 'C') { problem_size = 162; dt = "0.00067d0"; niter = 400; } else { printf("setparams: Internal error: invalid class %c\n", class); exit(1); } fprintf(fp, "%sinteger maxcells, problem_size, niter_default\n", FINDENT); fprintf(fp, "%sparameter (maxcells=%d, problem_size=%d, niter_default=%d)\n", FINDENT, maxcells, problem_size, niter); fprintf(fp, "%sdouble precision dt_default\n", FINDENT); fprintf(fp, "%sparameter (dt_default = %s)\n", FINDENT, dt); } /* * write_bt_info(): Write BT specific info to config file */ void write_bt_info(FILE *fp, int nprocs, char class) { int maxcells, problem_size, niter; char *dt; maxcells = isqrt(nprocs); if (class == 'S') { problem_size = 12; dt = "0.010d0"; niter = 60; } else if (class == 'W') { problem_size = 24; dt = "0.0008d0"; niter = 200; } else if (class == 'A') { problem_size = 64; dt = "0.0008d0"; niter = 200; } else if (class == 'B') { problem_size = 102; dt = "0.0003d0"; niter = 200; } else if (class == 'C') { problem_size = 162; dt = "0.0001d0"; niter = 200; } else { printf("setparams: Internal error: invalid class %c\n", class); exit(1); } fprintf(fp, "%sinteger maxcells, problem_size, niter_default\n", FINDENT); fprintf(fp, "%sparameter (maxcells=%d, problem_size=%d, niter_default=%d)\n", FINDENT, maxcells, problem_size, niter); fprintf(fp, "%sdouble precision dt_default\n", FINDENT); fprintf(fp, "%sparameter (dt_default = %s)\n", FINDENT, dt); } /* * write_lu_info(): Write SP specific info to config file */ void write_lu_info(FILE *fp, int nprocs, char class) { int isiz1, isiz2, itmax, inorm, problem_size; int xdiv, ydiv; /* number of cells in x and y direction */ char *dt_default; if (class == 'S') { problem_size = 12; dt_default = "0.5d0"; itmax = 50; } else if (class == 'W') { problem_size = 33; dt_default = "1.5d-3"; itmax = 300; } else if (class == 'A') { problem_size = 64; dt_default = "2.0d0"; itmax = 250; } else if (class == 'B') { problem_size = 102; dt_default = "2.0d0"; itmax = 250; } else if (class == 'C') { problem_size = 162; dt_default = "2.0d0"; itmax = 250; } else { printf("setparams: Internal error: invalid class %c\n", class); exit(1); } inorm = itmax; xdiv = ydiv = ilog2(nprocs)/2; if (xdiv+ydiv != ilog2(nprocs)) xdiv += 1; xdiv = ipow2(xdiv); ydiv = ipow2(ydiv); isiz1 = problem_size/xdiv; if (isiz1*xdiv < problem_size) isiz1++; isiz2 = problem_size/ydiv; if (isiz2*ydiv < problem_size) isiz2++; fprintf(fp, "\nc number of nodes for which this version is compiled\n"); fprintf(fp, "%sinteger nnodes_compiled\n", FINDENT); fprintf(fp, "%sparameter (nnodes_compiled = %d)\n", FINDENT, nprocs); fprintf(fp, "\nc full problem size\n"); fprintf(fp, "%sinteger isiz01, isiz02, isiz03\n", FINDENT); fprintf(fp, "%sparameter (isiz01=%d, isiz02=%d, isiz03=%d)\n", FINDENT, problem_size, problem_size, problem_size); fprintf(fp, "\nc sub-domain array size\n"); fprintf(fp, "%sinteger isiz1, isiz2, isiz3\n", FINDENT); fprintf(fp, "%sparameter (isiz1=%d, isiz2=%d, isiz3=isiz03)\n", FINDENT, isiz1, isiz2); fprintf(fp, "\nc number of iterations and how often to print the norm\n"); fprintf(fp, "%sinteger itmax_default, inorm_default\n", FINDENT); fprintf(fp, "%sparameter (itmax_default=%d, inorm_default=%d)\n", FINDENT, itmax, inorm); fprintf(fp, "%sdouble precision dt_default\n", FINDENT); fprintf(fp, "%sparameter (dt_default = %s)\n", FINDENT, dt_default); } /* * write_mg_info(): Write MG specific info to config file */ void write_mg_info(FILE *fp, int nprocs, char class) { int problem_size, nit, log2_size, log2_nprocs, lt_default, lm; int ndim1, ndim2, ndim3; if (class == 'S') { problem_size = 32; nit = 4; } else if (class == 'W') { problem_size = 64; nit = 40; } else if (class == 'A') { problem_size = 256; nit = 4; } else if (class == 'B') { problem_size = 256; nit = 20; } else if (class == 'C') { problem_size = 512; nit = 20; } else { printf("setparams: Internal error: invalid class type %c\n", class); exit(1); } log2_size = ilog2(problem_size); log2_nprocs = ilog2(nprocs); /* lt is log of largest total dimension */ lt_default = log2_size; /* log of log of maximum dimension on a node */ lm = log2_size - log2_nprocs/3; ndim1 = lm; ndim3 = log2_size - (log2_nprocs+2)/3; ndim2 = log2_size - (log2_nprocs+1)/3; fprintf(fp, "%sinteger nprocs_compiled\n", FINDENT); fprintf(fp, "%sparameter (nprocs_compiled = %d)\n", FINDENT, nprocs); fprintf(fp, "%sinteger nx_default, ny_default, nz_default\n", FINDENT); fprintf(fp, "%sparameter (nx_default=%d, ny_default=%d, nz_default=%d)\n", FINDENT, problem_size, problem_size, problem_size); fprintf(fp, "%sinteger nit_default, lm, lt_default\n", FINDENT); fprintf(fp, "%sparameter (nit_default=%d, lm = %d, lt_default=%d)\n", FINDENT, nit, lm, lt_default); fprintf(fp, "%sinteger debug_default\n", FINDENT); fprintf(fp, "%sparameter (debug_default=%d)\n", FINDENT, 0); fprintf(fp, "%sinteger ndim1, ndim2, ndim3\n", FINDENT); fprintf(fp, "%sparameter (ndim1 = %d, ndim2 = %d, ndim3 = %d)\n", FINDENT, ndim1, ndim2, ndim3); } /* * write_is_info(): Write IS specific info to config file */ void write_is_info(FILE *fp, int nprocs, char class) { int m1, m2, m3 ; if( class != 'S' && class != 'W' && class != 'A' && class != 'B' && class != 'C') { printf("setparams: Internal error: invalid class type %c\n", class); exit(1); } } /* * write_cg_info(): Write CG specific info to config file */ void write_cg_info(FILE *fp, int nprocs, char class) { int na,nonzer,niter; char *shift,*rcond="1.0d-1"; char *shiftS="10.", *shiftW="12.", *shiftA="20.", *shiftB="60.", *shiftC="110."; int num_proc_cols, num_proc_rows; if( class == 'S' ) { na=1400; nonzer=7; niter=15; shift=shiftS; } else if( class == 'W' ) { na=7000; nonzer=8; niter=15; shift=shiftW; } else if( class == 'A' ) { na=14000; nonzer=11; niter=15; shift=shiftA; } else if( class == 'B' ) { na=75000; nonzer=13; niter=75; shift=shiftB; } else if( class == 'C' ) { na=150000; nonzer=15; niter=75; shift=shiftC; } else { printf("setparams: Internal error: invalid class type %c\n", class); exit(1); } fprintf( fp, "%sinteger na, nonzer, niter\n", FINDENT ); fprintf( fp, "%sdouble precision shift, rcond\n", FINDENT ); fprintf( fp, "%sparameter( na=%d,\n", FINDENT, na ); fprintf( fp, "%s nonzer=%d,\n", CONTINUE, nonzer ); fprintf( fp, "%s niter=%d,\n", CONTINUE, niter ); fprintf( fp, "%s shift=%s,\n", CONTINUE, shift ); fprintf( fp, "%s rcond=%s )\n", CONTINUE, rcond ); num_proc_cols = num_proc_rows = ilog2(nprocs)/2; if (num_proc_cols+num_proc_rows != ilog2(nprocs)) num_proc_cols += 1; num_proc_cols = ipow2(num_proc_cols); num_proc_rows = ipow2(num_proc_rows); fprintf( fp, "\nc number of nodes for which this version is compiled\n" ); fprintf( fp, "%sinteger nnodes_compiled\n", FINDENT ); fprintf( fp, "%sparameter( nnodes_compiled = %d)\n", FINDENT, nprocs ); fprintf( fp, "%sinteger num_proc_cols, num_proc_rows\n", FINDENT ); fprintf( fp, "%sparameter( num_proc_cols=%d, num_proc_rows=%d )\n", FINDENT, num_proc_cols, num_proc_rows ); } /* * write_ft_info(): Write FT specific info to config file */ void write_ft_info(FILE *fp, int nprocs, char class) { /* easiest way (given the way the benchmark is written) * is to specify log of number of grid points in each * direction m1, m2, m3. nt is the number of iterations */ int nx, ny, nz, maxdim, niter, np_min; if (class == 'S') { nx = 64; ny = 64; nz = 64; niter = 6;} else if (class == 'W') { nx = 128; ny = 128; nz = 32; niter = 6;} else if (class == 'A') { nx = 256; ny = 256; nz = 128; niter = 6;} else if (class == 'B') { nx = 512; ny = 256; nz = 256; niter =20;} else if (class == 'C') { nx = 512; ny = 512; nz = 512; niter =20;} else { printf("setparams: Internal error: invalid class type %c\n", class); exit(1); } maxdim = nx; if (ny > maxdim) maxdim = ny; if (nz > maxdim) maxdim = nz; fprintf(fp, "%sinteger nx, ny, nz, maxdim, niter_default, ntotal, np_min\n", FINDENT); fprintf(fp, "%sparameter (nx=%d, ny=%d, nz=%d, maxdim=%d)\n", FINDENT, nx, ny, nz, maxdim); fprintf(fp, "%sparameter (niter_default=%d)\n", FINDENT, niter); fprintf(fp, "%sparameter (ntotal=nx*ny*nz)\n", FINDENT); fprintf(fp, "%sparameter (np_min = %d)\n", FINDENT, nprocs); } /* * write_ep_info(): Write EP specific info to config file */ void write_ep_info(FILE *fp, int nprocs, char class) { /* easiest way (given the way the benchmark is written) * is to specify log of number of grid points in each * direction m1, m2, m3. nt is the number of iterations */ int m; if (class == 'S') { m = 24; } else if (class == 'W') { m = 25; } else if (class == 'A') { m = 28; } else if (class == 'B') { m = 30; } else if (class == 'C') { m = 32; } else { printf("setparams: Internal error: invalid class type %c\n", class); exit(1); } /* number of processors given by "npm" */ fprintf(fp, "%scharacter class\n",FINDENT); fprintf(fp, "%sparameter (class =\'%c\')\n", FINDENT, class); fprintf(fp, "%sinteger m, npm\n", FINDENT); fprintf(fp, "%sparameter (m=%d, npm=%d)\n", FINDENT, m, nprocs); } /* * This is a gross hack to allow the benchmarks to * print out how they were compiled. Various other ways * of doing this have been tried and they all fail on * some machine - due to a broken "make" program, or * F77 limitations, of whatever. Hopefully this will * always work because it uses very portable C. Unfortunately * it relies on parsing the make.def file - YUK. * If your machine doesn't have or , happy hacking! * */ #define VERBOSE #define LL 400 #include #define DEFFILE "../config/make.def" #define DEFAULT_MESSAGE "(none)" void write_compiler_info(int type, FILE *fp) { FILE *deffile; char line[LL]; char mpif77[LL], flink[LL], fmpi_lib[LL], fmpi_inc[LL], fflags[LL], flinkflags[LL]; char compiletime[LL], randfile[LL]; char mpicc[LL], cflags[LL], clink[LL], clinkflags[LL], cmpi_lib[LL], cmpi_inc[LL]; struct tm *tmp; time_t t; deffile = fopen(DEFFILE, "r"); if (deffile == NULL) { printf("\n\ setparams: File %s doesn't exist. To build the NAS benchmarks\n\ you need to create is according to the instructions\n\ in the README in the main directory and comments in \n\ the file config/make.def.template\n", DEFFILE); exit(1); } strcpy(mpif77, DEFAULT_MESSAGE); strcpy(flink, DEFAULT_MESSAGE); strcpy(fmpi_lib, DEFAULT_MESSAGE); strcpy(fmpi_inc, DEFAULT_MESSAGE); strcpy(fflags, DEFAULT_MESSAGE); strcpy(flinkflags, DEFAULT_MESSAGE); strcpy(randfile, DEFAULT_MESSAGE); strcpy(mpicc, DEFAULT_MESSAGE); strcpy(cflags, DEFAULT_MESSAGE); strcpy(clink, DEFAULT_MESSAGE); strcpy(clinkflags, DEFAULT_MESSAGE); strcpy(cmpi_lib, DEFAULT_MESSAGE); strcpy(cmpi_inc, DEFAULT_MESSAGE); while (fgets(line, LL, deffile) != NULL) { if (*line == '#') continue; /* yes, this is inefficient. but it's simple! */ check_line(line, "MPIF77", mpif77); check_line(line, "FLINK", flink); check_line(line, "FMPI_LIB", fmpi_lib); check_line(line, "FMPI_INC", fmpi_inc); check_line(line, "FFLAGS", fflags); check_line(line, "FLINKFLAGS", flinkflags); check_line(line, "RAND", randfile); check_line(line, "MPICC", mpicc); check_line(line, "CFLAGS", cflags); check_line(line, "CLINK", clink); check_line(line, "CLINKFLAGS", clinkflags); check_line(line, "CMPI_LIB", cmpi_lib); check_line(line, "CMPI_INC", cmpi_inc); /* if the dummy library is used by including make.dummy, we set the Fortran and C paths to libraries and headers accordingly */ if(check_include_line(line, "../config/make.dummy")) { strcpy(fmpi_lib, "-L../MPI_dummy -lmpi"); strcpy(fmpi_inc, "-I../MPI_dummy"); strcpy(cmpi_lib, "-L../MPI_dummy -lmpi"); strcpy(cmpi_inc, "-I../MPI_dummy"); } } (void) time(&t); tmp = localtime(&t); (void) strftime(compiletime, (size_t)LL, "%d %b %Y", tmp); switch(type) { case FT: case SP: case BT: case MG: case LU: case EP: case CG: put_string(fp, "compiletime", compiletime); put_string(fp, "npbversion", VERSION); put_string(fp, "cs1", mpif77); put_string(fp, "cs2", flink); put_string(fp, "cs3", fmpi_lib); put_string(fp, "cs4", fmpi_inc); put_string(fp, "cs5", fflags); put_string(fp, "cs6", flinkflags); put_string(fp, "cs7", randfile); break; case IS: put_def_string(fp, "COMPILETIME", compiletime); put_def_string(fp, "NPBVERSION", VERSION); put_def_string(fp, "MPICC", mpicc); put_def_string(fp, "CFLAGS", cflags); put_def_string(fp, "CLINK", clink); put_def_string(fp, "CLINKFLAGS", clinkflags); put_def_string(fp, "CMPI_LIB", cmpi_lib); put_def_string(fp, "CMPI_INC", cmpi_inc); break; default: printf("setparams: (Internal error): Unknown benchmark type %d\n", type); exit(1); } } void check_line(char *line, char *label, char *val) { char *original_line; original_line = line; /* compare beginning of line and label */ while (*label != '\0' && *line == *label) { line++; label++; } /* if *label is not EOS, we must have had a mismatch */ if (*label != '\0') return; /* if *line is not a space, actual label is longer than test label */ if (!isspace(*line) && *line != '=') return ; /* skip over white space */ while (isspace(*line)) line++; /* next char should be '=' */ if (*line != '=') return; /* skip over white space */ while (isspace(*++line)); /* if EOS, nothing was specified */ if (*line == '\0') return; /* finally we've come to the value */ strcpy(val, line); /* chop off the newline at the end */ val[strlen(val)-1] = '\0'; if (val[strlen(val) - 1] == '\\') { printf("\n\ setparams: Error in file make.def. Because of the way in which\n\ command line arguments are incorporated into the\n\ executable benchmark, you can't have any continued\n\ lines in the file make.def, that is, lines ending\n\ with the character \"\\\". Although it may be ugly, \n\ you should be able to reformat without continuation\n\ lines. The offending line is\n\ %s\n", original_line); exit(1); } } int check_include_line(char *line, char *filename) { char *include_string = "include"; /* compare beginning of line and "include" */ while (*include_string != '\0' && *line == *include_string) { line++; include_string++; } /* if *include_string is not EOS, we must have had a mismatch */ if (*include_string != '\0') return(0); /* if *line is not a space, first word is not "include" */ if (!isspace(*line)) return(0); /* skip over white space */ while (isspace(*++line)); /* if EOS, nothing was specified */ if (*line == '\0') return(0); /* next keyword should be name of include file in *filename */ while (*filename != '\0' && *line == *filename) { line++; filename++; } if (*filename != '\0' || (*line != ' ' && *line != '\0' && *line !='\n')) return(0); else return(1); } #define MAXL 46 void put_string(FILE *fp, char *name, char *val) { int len; len = strlen(val); if (len > MAXL) { val[MAXL] = '\0'; val[MAXL-1] = '.'; val[MAXL-2] = '.'; val[MAXL-3] = '.'; len = MAXL; } fprintf(fp, "%scharacter*%d %s\n", FINDENT, len, name); fprintf(fp, "%sparameter (%s=\'%s\')\n", FINDENT, name, val); } /* NOTE: is the ... stuff necessary in C? */ void put_def_string(FILE *fp, char *name, char *val) { int len; len = strlen(val); if (len > MAXL) { val[MAXL] = '\0'; val[MAXL-1] = '.'; val[MAXL-2] = '.'; val[MAXL-3] = '.'; len = MAXL; } fprintf(fp, "#define %s \"%s\"\n", name, val); } void put_def_variable(FILE *fp, char *name, char *val) { int len; len = strlen(val); if (len > MAXL) { val[MAXL] = '\0'; val[MAXL-1] = '.'; val[MAXL-2] = '.'; val[MAXL-3] = '.'; len = MAXL; } fprintf(fp, "#define %s %s\n", name, val); } #if 0 /* this version allows arbitrarily long lines but * some compilers don't like that and they're rarely * useful */ #define LINELEN 65 void put_string(FILE *fp, char *name, char *val) { int len, nlines, pos, i; char line[100]; len = strlen(val); nlines = len/LINELEN; if (nlines*LINELEN < len) nlines++; fprintf(fp, "%scharacter*%d %s\n", FINDENT, nlines*LINELEN, name); fprintf(fp, "%sparameter (%s = \n", FINDENT, name); for (i = 0; i < nlines; i++) { pos = i*LINELEN; if (i == 0) fprintf(fp, "%s\'", CONTINUE); else fprintf(fp, "%s", CONTINUE); /* number should be same as LINELEN */ fprintf(fp, "%.65s", val+pos); if (i == nlines-1) fprintf(fp, "\')\n"); else fprintf(fp, "\n"); } } #endif /* integer square root. Return error if argument isn't * a perfect square or is less than or equal to zero */ int isqrt(int i) { int root, square; if (i <= 0) return(-1); square = 0; for (root = 1; square <= i; root++) { square = root*root; if (square == i) return(root); } return(-1); } /* integer log base two. Return error is argument isn't * a power of two or is less than or equal to zero */ int ilog2(int i) { int log2; int exp2 = 1; if (i <= 0) return(-1); for (log2 = 0; log2 < 20; log2++) { if (exp2 == i) return(log2); exp2 *= 2; } return(-1); } int ipow2(int i) { int pow2 = 1; if (i < 0) return(-1); if (i == 0) return(1); while(i--) pow2 *= 2; return(pow2); } void write_convertdouble_info(int type, FILE *fp) { switch(type) { case SP: case BT: case LU: case FT: case MG: case EP: case CG: fprintf(fp, "%slogical convertdouble\n", FINDENT); #ifdef CONVERTDOUBLE fprintf(fp, "%sparameter (convertdouble = .true.)\n", FINDENT); #else fprintf(fp, "%sparameter (convertdouble = .false.)\n", FINDENT); #endif break; } } tau-2.16.4/examples/README000066400000000000000000000342131062343042700150770ustar00rootroot00000000000000This directory contains example programs that illustrate the use of TAU instrumentation and measurement options. taututorial - This MPI C++ example shows how to integerate TAU in your build system. This requires TAU to be configured with -mpiinc= -mpilib= -pdt= options. Please refer to the README file in this subdirectory for more information. instrument - This contains a simple C++ example that shows how TAU's API can be used for manually instrumenting a C++ program. threads - A simple multi-threaded program that shows how the main function of a thread is instrumented. Performance data is generated for each thread of execution. Uses pthread library and TAU must be configured with -pthread option. cthreads - Same as threads above, but for a C program. An instrumented C program may be compiled with a C compiler, but needs to be linked with a C++ linker. sproc - SGI sproc threads example. TAU should be configured with -sproc option to use this. pi - An MPI program that calculates the value of pi and e. It highlights the use of TAU's MPI wrapper library. TAU needs to be configured with -mpiinc= and -mpilib= to use this. mpishlib - Demonstrates the use of MPI wrapper library in instrumenting a shared object. The MPI application is instrumented is instrumented as well. TAU needs to be configured with -mpiinc= and -mpilib= flags. python - Instrumentation of a python application can be done automatically or manually using the TAU Python bindings. Two examples, auto.py and manual.py demonstrate this respectively. TAU needs to be configured with -pythoninc= option and the user needs to set PYTHONPATH to //lib to use this feature. traceinput - To build a trace converter/trace reader application, we provide the TAU trace input library. This directory contains two examples (in c and c++ subdirectories) that illustrate how an application can use the trace input API to read online or post-mortem TAU binary traces. It shows how the user can register routines with the callback interface and how TAU invokes these routines when events take place. tracewriter - To write performance data in the TAU trace format we provide a trace writer library. This directory contains an example that illustrates how an application can use the trace writer API to produce TAU trace files. It includes demonstrations of the creation of all TAU trace event types. javatracewriter - The java tracewriter API allows java programs to produce the TAU trace format using an API equivalent to the C/C++ trace writer. This directory contains an example java tracewriter program which is equivalent to the example in the tracewriter directory. papi - A matrix multiply example that shows how to use TAU statement level timers for comparing the performance of two algorithms for matrix multiplication. When used with PAPI or PCL, this can highlight the cache behaviors of these algorithms. TAU should be configured with -papi= or -pcl= and the user should set PAPI_EVENT or PCL_EVENT respective environment variables, to use this. papithreads - Same as papi, but uses threads to highlight how hardware performance counters may be used in a multi-threaded application. When it is used with PAPI, TAU should be configured with -papi= -pthread autoinstrument - Shows the use of Program Database Toolkit (PDT) for automating the insertion of TAU macros in the source code. It requires configuring TAU with the -pdt= option. The Makefile is modified to illustrate the use of a source to source translator (tau_instrumentor). analyze - Shows the use of tau_analyze, a utility that generates selective instrumentation lists for use with tau_instrumentor based on the analysis of collected program information and a user defined instrumentation scenario. The tau_analyze utility expands on the functionality of the tau_reduce utility. TAU must be configured with -pdt= option. reduce - Shows the use of tau_reduce, a utility that can read profiles and a set of rules and determine which routines should not be instrumented (for frequently called light-weight routines). See /utils/TAU_REDUCE.README file for further details. It requires configuring TAU with -pdt= option. cinstrument - Shows the use of PDT for C. Requires configuring TAU with -pdt= option. mixedmode - This example illustrates the use of PDT, hand-instrumentation (for threads), MPI library instrumentation and TAU system call wrapper library instrumentation. Requires configuring TAU with -mpiinc= -mpilib= -pdt= -pthread options. pdt_mpi - This directory contains C, C++ and F90 examples that illustrate how TAU/PDT can be used with MPI. Requires configuring TAU with -pdt= -mpiinc= -mpilib= options. You may also try this with the -TRACE -epilog= options to use the EPILOG tracing package (from FZJ). callpath - Shows the use of callpath profiling. Requires configuring TAU with the -PROFILECALLPATH option. Setting the environment variable TAU_CALLPATH_DEPTH changes the depth of the callpath recorded by TAU. The default value of this variable is 2. The name of the routine "a => b => c" represents the time spent in routine c when it was called by b when b was called by a. See the README file in the callpath directory for an example. phase - Shows the use of phase based profiling. Requires configuring TAU with the -PROFILEPHASE option. See the README file in the phase directory for details about the API and an example. selective - This example illustrates the use of PDT, and selective profiling using profile groups in the tau_instrumentor. Requires configuring TAU with -pdt= -fortran=<...> options. fortran & f90 - Show how to instrument a simple Fortran 90 program. A C++ linker needs to be used when linking the fortran application. NPB2.3 - The NAS Parallel Benchmark 2.3 [from NASA Ames]. It shows how to use TAU's MPI wrapper with a manually instrumented Fortran program. LU and SP are the two benchmarks. LU is instrumented completely, while only parts of the SP program are instrumented to contrast the coverage of routines. In both cases MPI level instrumentation is complete. TAU needs to be configured with -mpiinc= and -mpilib= to use this. dyninst - An example that shows the use of DyninstAPI [U. Maryland, U. Wisconsin] to insert TAU instrumentation. Using Dyninst, no modifications are needed and tau_run, a runtime instrumentor, inserts TAU calls at routine transitions in the program. [This represents work in progress]. dyninstthreads - The above example with threads. java/pi - Shows a java program for calculating the value of pi. It illustrates the use of the TAU JVMPI layer for instrumenting a Java program without any modifications to its source code, byte-code or the JVM. It requires a Java 2 compliant JVM and TAU needs to be configured with the -jdk= option to use this. java/api - The same Pi program as above that illustrates the use of the TAU Java API for source level instrumentation. See the README file in that directory for details on how to compile and run the application. openmp - Shows how to manually instrument an OpenMP program using the TAU API. There are subdirectories for C, C++ and F90 to show the differences in instrumentation and Makefiles. TAU needs to be configured with the -openmp option to use this. opari - Opari is an OpenMP directive rewriting tool that works with TAU. Configure TAU with -opari= option to use this. This provides detailed instrumentation of OpenMP constructs. There are subdirectories for C++, pdt_f90, and OpenMPI to demonstrate the use of this tool. The pdt_f90 directory contains an example that shows the use of PDT with Opari for a Fortran 90 program. openmpi - Illustrates TAU's support for hybrid exection models in the form of MPI for message passing and OpenMP threads. TAU needs to be configured with -mpiinc= -mpilib= -openmp options to use this. fork - Illustrates how to register a forked process with TAU. TAU provides two options: TAU_INCLUDE_PARENT_DATA and TAU_EXCLUDE_PARENT_DATA which allows the child process to inherit or clear the performance data when the fork takes place. mapping - Illustrates two examples in the embedded and external subdirecto ries. These correspond to profiling at the object level, where the time spent in a method is displayed for a specific object. There are two ways to achieve this using an embedded association, that requires an extension of the class definition with a TAU pointer and a second scheme of external hash-table lookup that relies on looking at the object address at each method invocation. Both these examples illustrate the use of the TAU Mapping API. multicounters - Illustrates the use of multiple measurement options configured simultaneously in TAU. See README file for instructions on setting the env. variables COUNTERS<1-25> for specifying measurements. Requires configuring TAU with -MULTIPLECOUNTERS. selectiveAccess - Illustrates the use of TAU API for runtime access of TAU performance data. A program can get information about routines executing in its context. This can be used in conjunction with multiple counters. memory - TAU can sample memory utilization on some platforms using the getrusage() system call and interrupts. This directory illustrates how sampling can be used to track the maximum resident set size. See the README file in the memory directory for further information. malloc - TAU's malloc and free wrappers can help pinpoint where the memory was allocated/deallocated in a C/C++ program. It can show the size of memory malloc'ed and free'd along with the source file name and line number. taucompiler - using $(TAU_COMPILER) in your Makefile before the compiler name invokes tau_compiler.sh - a shell script that instruments and compiles the source file and links in the correct libraries. A Fortran 90 example illustrates its use in the f90 subdirectory. userevent - TAU's user defined events can show context information highlighting the callpath that led to the event. This is supported using the TAU_REGISTER_CONTEXT_EVENT and TAU_CONTEXT_EVENT calls. It uses the TAU_CALLPATH_DEPTH env. variable. This feature works independently of the callpath or phase profiling options, which apply to bracketed entry and exit events - not atomic events. You can disable tracking the callpath at runtime. headroom - TAU's memory headroom evalution options are discussed at length in the examples/headroom/README file. The amount of heap memory that can be allocated at any given point in the program's execution are tracked in this directory (and three subdirectories - track, here, and available). -PROFILEHEADROOM configuration option may be used with these examples. mpitrace - Kojak's Expert tool needs traces that record events that call MPI routines. We track this information at runtime when TAU is configured with the -MPITRACE option. This example illustrates its use. loops - TAU can instrument automatically at outer-loop boundaries. This example describes the syntax of the selective instrumentation file. See loops/c++/README file for details. TAU should be configured with -pdt= to use this option. param - TAU can profile routines based on runtime parameters. This is enabled with the -PROFILEPARAM configuration option in TAU. It is used in TAU's MPI wrapper library to partition the time spent in MPI_Send() based on the message size. This example illustrates how we can use it in an application to track its execution time based on an argument. memoryleakdetect- TAU can instrument C/C++ programs that use malloc/free/realloc calls to track the location and extent of memory leaks using TAU's wrapper for memory tracking. Simply add -optDetectMemoryLeaks to your TAU_COMPILER options (TAU_OPTIONS env. variable) to enable this feature. Not only does TAU detect the location based on line and file name, it also correlates the callstack at the time of memory allocation, so you can examine the callpaths in the program that led to memory allocations where corresponding deallocations were missing. See examples/memoryleakdetect. tau-2.16.4/examples/analyze/000077500000000000000000000000001062343042700156575ustar00rootroot00000000000000tau-2.16.4/examples/analyze/Makefile000066400000000000000000000100011062343042700173070ustar00rootroot00000000000000#**************************************************************************** #* TAU Portable Profiling Package ** #* http://www.cs.uoregon.edu/research/tau ** #**************************************************************************** #* Copyright 1997 ** #* Department of Computer and Information Science, University of Oregon ** #* Advanced Computing Laboratory, Los Alamos National Laboratory ** #**************************************************************************** ####################################################################### ## pC++/Sage++ Copyright (C) 1993,1995 ## ## Indiana University University of Oregon University of Rennes ## ####################################################################### TAUROOTDIR = ../.. include $(TAUROOTDIR)/include/Makefile CXX = $(TAU_CXX) CC = $(TAU_CC) PDTPARSE = $(PDTDIR)/$(PDTARCHDIR)/bin/cxxparse TAUINSTR = $(TAUROOTDIR)/$(CONFIG_ARCH)/bin/tau_instrumentor TAUANALYZE = $(TAUROOTDIR)/$(CONFIG_ARCH)/bin/tau_analyze TAUPPROF = $(TAUROOTDIR)/$(CONFIG_ARCH)/bin/pprof CFLAGS = $(TAU_INCLUDE) $(TAU_DEFS) -UTAU_MPI LIBS = $(TAU_LIBS) LDFLAGS = $(USER_OPT) MAKEFILE = Makefile PRINT = pr RM = /bin/rm -f TARGET = klargest ARGS = 1000000 2324 EXTRAOBJS = ############################################## # Original Rules ############################################## #all: $(TARGET) # #install: $(TARGET) # #$(TARGET): $(TARGET).o # $(CXX) $(LDFLAGS) $(TARGET).o -o $@ $(LIBS) # #$(TARGET).o : $(TARGET).cpp # $(CXX) $(CFLAGS) -c $(TARGET).cpp # #clean: ############################################## ############################################## # Modified Rules ############################################## all: showdata $(TARGET) $(PDTPARSE) $(TAUINSTR) # Display results of refined instrumentation showdata: run2 $(TAUPPROF) # Execute refined target run2: $(TARGET).refined ./$(TARGET).refined $(ARGS) # Link refined target $(TARGET).refined: $(TARGET).refined.o $(CXX) $(LDFLAGS) $(TARGET).refined.o -o $@ $(LIBS) # Compile refined target $(TARGET).refined.o: $(TARGET).inst.refined.cpp $(CXX) -c $(CFLAGS) $(TARGET).inst.refined.cpp -o $@ # Generate refined source code instrumentation $(TARGET).inst.refined.cpp: select.out $(TARGET).pdb $(TAUINSTR) $(TARGET).pdb $(TARGET).cpp -o $(TARGET).inst.refined.cpp -f select.out # Generate list for selective instrumentation select.out : pprof.dat $(TAUANALYZE) rules.til # Dump profile data for initial run to pprof.dat file, and also # display results of initial run pprof.dat: run1 $(TAUPPROF) -d > pprof.dat $(TAUPPROF) # Execute initial target instrumentation run1: $(TARGET) ./$(TARGET) $(ARGS) # Compile initial target $(TARGET): $(TARGET).o $(CXX) $(LDFLAGS) $(TARGET).o -o $@ $(LIBS) # Use the instrumented source code to generate the object code $(TARGET).o : $(TARGET).inst.cpp $(CXX) -c $(CFLAGS) $(TARGET).inst.cpp -o $(TARGET).o # Generate the instrumented source from the original source and the pdb file $(TARGET).inst.cpp : $(TARGET).pdb $(TARGET).cpp $(TAUINSTR) $(TAUINSTR) $(TARGET).pdb $(TARGET).cpp -o $(TARGET).inst.cpp # Parse the source file to generate the pdb file $(TARGET).pdb : $(PDTPARSE) $(TARGET).cpp $(PDTPARSE) $(TARGET).cpp $(CFLAGS) clean: $(RM) $(TARGET).o $(TARGET).inst.cpp $(TARGET) $(TARGET).pdb *.refined* profile* pprof.dat *.out ############################################## $(PDTPARSE): @echo "*********************************************************" @echo "Download and Install Program Database Toolkit " @echo "ERROR: Cannot find $(PDTPARSE)" @echo "*********************************************************" $(TAUINSTR): @echo "*********************************************************" @echo "Configure TAU with -pdt= configuration option to use" @echo "C++ instrumentation with PDT" @echo "ERROR: Cannot find $(TAUINSTR)" @echo "*********************************************************" tau-2.16.4/examples/analyze/decl.h000066400000000000000000000013041062343042700167350ustar00rootroot00000000000000/**************************************************************************** ** File : decl.h ** Author : Sameer Shende ** Contents : function prototypes for kl.c to calculate kth largest elt. *****************************************************************************/ #ifndef _DECL_H #define _DECL_H /* function declarations */ int select_kth_largest(int k, int *S, int n); void interchange(int *a, int *b); void setup(int *arr); void quicksort(int *arr, int m, int n); void sort_5elements(int *arr); int kth_largest_qs(int k, int *arr, int size); void display_array(int *A, int nelems); int floor (int num, int den); int ceil (int num, int den); #endif /* _DECL_H */ /* EOF decl.h */ tau-2.16.4/examples/analyze/klargest.cpp000066400000000000000000000305141062343042700202020ustar00rootroot00000000000000/**************************************************************************** ** File : klargest.c ** Author : Sameer Shende ** Contents : program to calculate the kth largest element in two ways ** Directory : $(TAUDIR)/examples/autoinstrument/ ** Usage : program [] [] ** e.g., % klargest 5000 675 *****************************************************************************/ #include #include #include /* for INT_MIN */ #include #include "decl.h" #define DEFAULT_SIZE 10000 #define DEFAULT_K 4 /* fourth largest element from the array */ #define middle(i) 5*i+2 /* the large array is partitioned into 5 elements each 2, 7, 12 etc. are positions of the middle elements in the array */ int size; /* global - size of the array */ int *M; /* the median array */ /************************************************************************** ** Function : select_kth_largest ** Parameters : k, array of integers S and n - the size of array. ** Description: The SELECT algorithm to find the kth largest element from ** the set of integers S in O(n) time. Used recursively. ** Returns : returns the kth largest element. ***************************************************************************/ int select_kth_largest(int k, int *S, int n) { /* return the kth largest element from the ordered set S of integers */ /* n is the number of elements in S */ /* Algorithm : if n < 50 then sort in dec. order S, return kth largest element in S else divide S into ceil(n/5) sequences of 5 elements each with upto four leftover elements sort in dec order each 5 element sequence let M be the sequence of medians of the 5 element sets m = select_kth_largest(ceil(n(M)/2), M, n/5); let S1, S2 and S3 be the sequences of elements in S greater than, equal to and less than m respectively. if n(S1) >=k then return select_kth_largest(k, S1, n(S1)); else if (n(S1) + n(S2) >= k) then return m else return select_kth_largest (k - n(S1) - n(S2), S3); */ int n_M, n_S1, n_S2, n_S3; /* number of elements in M, S1, S2 and S3 resp. */ int *S1, *S3; /* the other arrays */ int m; /* the median element */ int i, leftover, ret; if (n < 50) return kth_largest_qs(k, S, n); /* Use quicksort to sort the array S and return the kth largest element */ leftover = n % 5; /* upto four leftover elements */ if (leftover != 0) { /* then pad the remaining elements with min. negative values */ for (i=n; i< n + 5 - leftover; i++) S[i] = INT_MIN; /* number of leftover elements */ /* INT_MIN is defined for each system in /usr/include/limits.h */ } /* after padding the remaining array, sort the 5 element sequence */ n_M = ceil(n, 5); /* number of elements in M */ for(i=0; i< n_M; i++) { sort_5elements(&S[5*i]); /* beginning element */ } /* 5 element sequences are sorted */ /* display_array(S, ceil(n,5)*5); */ /* size of padded array is ceil(n,5)*5 */ S1 = (int *) malloc ((3*n/4) * sizeof(int)); /* allocate S1 */ S3 = (int *) malloc ((3*n/4) * sizeof(int)); /* allocate S3 */ if((S1 == (int *) NULL) || (S3 == (int *) NULL)) { perror("S1 or S3 malloc error"); exit(1); } for (i=0; i< n_M; i++) M[i] = S[middle(i)]; /* fill up the median array */ m = select_kth_largest(ceil(n_M,2), M, n_M); /* calculate the median element*/ /* construct S1, S2, and S3 as sequences of elements in S greater than, equal to and less than m. Don't need a separate S2 array. */ /* initialize the count of elements in S1, S2, S3 */ n_S1 = n_S2 = n_S3 = 0; /* go through every element in S */ for (i = 0; i < n; i++) { if(S[i] > m) S1[n_S1++] = S[i]; /* goes to S1 */ else if (S[i] < m) S3[n_S3++] = S[i]; /* goes to S3 */ else n_S2++; /* S2 count incremented goes to S2 */ } /* now we have S1, and S3 */ if(n_S1 >= k) /* S1 has the elements greater than m and there are greater than k elements, so its bound to be in this section */ { /* free memory */ /* don't need S3 */ free(S3); ret = select_kth_largest(k, S1, n_S1); free(S1); /* before returning clean up S1 */ return ret; } else { if(n_S1 + n_S2 >= k) /* its not in S1, but its in S2 */ { /* free memory */ /* don't need S1 and S3 */ free(S1); free(S3); return m; /* the median that we had calculated earlier */ } else /* its in S3 */ { /* free memory */ /* don't need S1 */ free(S1); ret = select_kth_largest(k - n_S1 - n_S2, S3, n_S3); free(S3); /* before returning clean up S3 */ return ret; } } } /************************************************************************** ** Function : interchange ** Parameters : two integer pointers a, and b ** Description: interchanges the contents of a and b. ** Returns : nothing ***************************************************************************/ void interchange(int *a, int *b) { /* interchanges the contents of the two variables containing integers. */ int temp; temp = *a; *a = *b; *b = temp; } /************************************************************************** ** Function : setup ** Parameters : array to be initialized ** Description: assigns values to elements in the array used for finding ** the kth largest element. ** Returns : nothing ***************************************************************************/ void setup(int *arr) { int i; /* setup */ arr[0] = 26; arr[1] = 5; arr[2] = 37; arr[3] = 1; arr[4] = 61; arr[5] = 11; arr[6] = 59; arr[7] = 15; arr[8] = 48; arr[9] = 19; if (size > 10) { for (i=10; i< size; i++) arr[i] = arr[i%10]; } /* Uses the first ten values repeatedly and fills the array */ } /************************************************************************** ** Function : quicksort ** Parameters : array to be sorted and lower and upper limits m and n resp. ** Description: uses quicksort recursively to sort elements in O(nlog n) ** time complexity in decreasing order.. ** Returns : nothing ***************************************************************************/ /* quick sort */ void quicksort(int *arr, int m, int n) { /* sort the array in decreasing order */ int k; /* control key */ int i, j; /* k is chosen as the control key and i and j are chosen such that at any time, arr[l] >= k for l < i and arr[l] <= k for l > j. It is assumed that arr[m] >= arr[n+1] */ /* printf("quicksort %d %d\n [", m, n); for(i=m; i k); /* Decreasing order for largest element first */ do { j = j - 1; } while (arr[j] < k); /* Decreasing order */ if (i < j) interchange(&arr[i], &arr[j]); } while (i < j); interchange(&arr[m], &arr[j]); /* pivot */ quicksort(arr, m, j - 1); /* left portion sorted */ quicksort(arr, j + 1, n); /* right side sorted - so array is sorted */ } /*if */ } /************************************************************************** ** Function : sort_5elements ** Parameters : array of 5 elements to be sorted ** Description: sorts the 5 elements in decreasing order ** Returns : nothing ***************************************************************************/ void sort_5elements(int *arr) { /* sort the first five elements of the array arr */ quicksort(arr, 0, 4); /* could be done by if statements too - but this way its easier to extend it for 7 element based select */ } /************************************************************************** ** Function : kth_largest_qs ** Parameters : k for kth largest, array to be sorted and size of array ** Description: sorts the array using quicksort and finds the kth largest ** element ** Returns : kth largest element ***************************************************************************/ int kth_largest_qs(int k, int *arr, int size) { /* first we sort the array and then return the kth largest element */ quicksort(arr, 0, size - 1); /* sort the array */ return arr[k-1]; /* return the kth largest */ } /************************************************************************** ** Function : display_array ** Parameters : array and size of array ** Description: for debugging, prints contents of the array ** Returns : nothing ***************************************************************************/ void display_array(int *A, int nelems) { int i; for(i=0; i < nelems; i++) { printf("A[%d] = %d\n", i, A[i]); } } /* utility functions */ /************************************************************************** ** Function : floor ** Parameters : numerator and denominator ** Description: calculates the floor of num/den ** Returns : floor ***************************************************************************/ int floor (int num, int den) { return num / den; } /************************************************************************** ** Function : ceil ** Parameters : numerator and denominator ** Description: calculates the ceiling of num/den ** Returns : ceiling ***************************************************************************/ int ceil (int num, int den) { return (num % den > 0) ? (num / den + 1) : (num / den); } /************************************************************************** ** Function : main ** Parameters : command line parameters. ** Description: Usage : main [] [] ** Calculates kth largest element using two different algorithms ** and returns the value and the time statistics for the two. ** Returns : nothing ***************************************************************************/ int main(int argc, char **argv) { int klarge, k; struct timeval tp1, tp2; float time_taken; int *A; /* extract the size of the array and k from the command line parameters */ if (argc > 1) size = atoi(argv[1]); else { size = DEFAULT_SIZE; printf(" Usage : main [] [] \n"); printf(" Calculates kth largest element using two different algorithms\n"); printf(" and returns the value and the time statistics for the two.\n"); } if (argc > 2) k = atoi(argv[2]); /* kth largest */ else k = DEFAULT_K; if (k > size) { printf("ERROR: Please specify a value for k (%d) that is less than the array size (%d)\n", k, size); exit(0); } /* there could be upto 4 leftover elements */ A = (int *) malloc((size + 4) * sizeof(int)); /* allocate the array */ if (A == (int *) NULL) { perror("Cannot malloc the size of array"); exit(1); } M = (int *) malloc(ceil(size,5)*sizeof(int)); /*allocate memory for Median*/ /* its ok to recycle this array so its allocated here instead of doing it in select_kth_largest */ if (M == (int *) NULL) { perror("Cannot malloc M array"); /* its ok to recycle this array so its allocated here instead of doing it in select_kth_largest */ exit(1); } /* setup */ setup(A); /* display_array(A,size); */ gettimeofday(&tp1, NULL); /* timing info. */ klarge = select_kth_largest(k, A, size); /* using SELECT O(n) algo. */ gettimeofday(&tp2, NULL); /* timing info. */ printf("****************************************************\n"); printf("Using select_kth_largest, size %d, %d th largest element = %d\n", size,k, klarge); time_taken = (tp2.tv_sec - tp1.tv_sec) + (tp2.tv_usec - tp1.tv_usec) * 1e-6; printf("Time taken (wall clock) = %f secs\n", time_taken); printf("- - - - - - - - - - - - - - - - - -\n"); /* Now calculate the kth largest element in A using the same array but the "quick and dirty" quicksort O(nlog n) algorithm */ gettimeofday(&tp1, NULL); /* timing info */ klarge = kth_largest_qs(k, A, size); /* calculates the kth largest element of A */ gettimeofday(&tp2, NULL); /* print results */ printf("Using quicksort, size %d, %d th largest element = %d\n", size, k, klarge); time_taken = (tp2.tv_sec - tp1.tv_sec) + (tp2.tv_usec - tp1.tv_usec) * 1e-6; printf("Time taken (wall clock) = %f secs\n", time_taken); /* printf("%d %f\n", size, time_taken); */ } /* EOF klargest.cpp */ tau-2.16.4/examples/analyze/rules.til000066400000000000000000000014121062343042700175210ustar00rootroot00000000000000// If the ouput file name isn't defined then define it. #ifndef $SELECT_FILE #define SELECT_FILE "select.out" #endif // Perform analytical instrumentation using profile data and // write the output to file for use by tau_instrumentor. instrument with profile as $SELECT_FILE // Selectively exclude events based on the following conditions. conditions {: usec > 1000 & numcalls > 400000 & usecs/call < 30 & percent > 25 // The following will end up selecting the same events as the previous // line. TAU_USER : usec > 1000 & numcalls > 400000 & usecs/call < 30 & percent > 25 // The following line will cause extremly light-weight events that are // executed more than a million times from being instrumented. numcalls > 1E6 & usecs/call < 2 :} end tau-2.16.4/examples/autoinstrument/000077500000000000000000000000001062343042700173155ustar00rootroot00000000000000tau-2.16.4/examples/autoinstrument/Makefile000066400000000000000000000065361062343042700207670ustar00rootroot00000000000000#**************************************************************************** #* TAU Portable Profiling Package ** #* http://www.cs.uoregon.edu/research/tau ** #**************************************************************************** #* Copyright 1997 ** #* Department of Computer and Information Science, University of Oregon ** #* Advanced Computing Laboratory, Los Alamos National Laboratory ** #**************************************************************************** ####################################################################### ## pC++/Sage++ Copyright (C) 1993,1995 ## ## Indiana University University of Oregon University of Rennes ## ####################################################################### TAUROOTDIR = ../.. include $(TAUROOTDIR)/include/Makefile CXX = $(TAU_CXX) CC = $(TAU_CC) PDTPARSE = $(PDTDIR)/$(PDTARCHDIR)/bin/cxxparse TAUINSTR = $(TAUROOTDIR)/$(CONFIG_ARCH)/bin/tau_instrumentor CFLAGS = $(TAU_INCLUDE) $(TAU_DEFS) -UTAU_MPI LIBS = $(TAU_LIBS) LDFLAGS = $(USER_OPT) MAKEFILE = Makefile PRINT = pr RM = /bin/rm -f TARGET = klargest EXTRAOBJS = ############################################## # Original Rules ############################################## #all: $(TARGET) # #install: $(TARGET) # #$(TARGET): $(TARGET).o # $(CXX) $(LDFLAGS) $(TARGET).o -o $@ $(LIBS) # #$(TARGET).o : $(TARGET).cpp # $(CXX) $(CFLAGS) -c $(TARGET).cpp # #clean: # $(RM) $(TARGET).o $(TARGET) ############################################## ############################################## # Modified Rules ############################################## all: $(TARGET) $(PDTPARSE) $(TAUINSTR) $(TARGET): $(TARGET).o $(CXX) $(LDFLAGS) $(TARGET).o -o $@ $(LIBS) # Use the instrumented source code to generate the object code $(TARGET).o : $(TARGET).inst.cpp $(CXX) -c $(CFLAGS) $(TARGET).inst.cpp -o $(TARGET).o # Generate the instrumented source from the original source and the pdb file $(TARGET).inst.cpp : $(TARGET).pdb $(TARGET).cpp $(TAUINSTR) $(TAUINSTR) $(TARGET).pdb $(TARGET).cpp -o $(TARGET).inst.cpp -f select # Parse the source file to generate the pdb file $(TARGET).pdb : $(PDTPARSE) $(TARGET).cpp $(PDTPARSE) $(TARGET).cpp $(CFLAGS) # When implicit rules are used in Makefiles, we can change the original rule #.C.o: # $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $< -o $@ ; # to #.C.o: # $(PDTPARSE) $< $(CXXFLAGS) $(CPPFLAGS) # $(TAUINSTR) $*.pdb $< -o $*.inst.C ; # $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $*.inst.C -o $@ ; # rm -f $*.pdb ; # The same procedure is applicable to C and F90 source files as well. clean: $(RM) $(TARGET).o $(TARGET).inst.cpp $(TARGET) $(TARGET).pdb ############################################## $(PDTPARSE): @echo "*********************************************************" @echo "Download and Install Program Database Toolkit " @echo "ERROR: Cannot find $(PDTPARSE)" @echo "*********************************************************" $(TAUINSTR): @echo "*********************************************************" @echo "Configure TAU with -pdt= configuration option to use" @echo "C++ instrumentation with PDT" @echo "ERROR: Cannot find $(TAUINSTR)" @echo "*********************************************************" tau-2.16.4/examples/autoinstrument/decl.h000066400000000000000000000013041062343042700203730ustar00rootroot00000000000000/**************************************************************************** ** File : decl.h ** Author : Sameer Shende ** Contents : function prototypes for kl.c to calculate kth largest elt. *****************************************************************************/ #ifndef _DECL_H #define _DECL_H /* function declarations */ int select_kth_largest(int k, int *S, int n); void interchange(int *a, int *b); void setup(int *arr); void quicksort(int *arr, int m, int n); void sort_5elements(int *arr); int kth_largest_qs(int k, int *arr, int size); void display_array(int *A, int nelems); int floor (int num, int den); int ceil (int num, int den); #endif /* _DECL_H */ /* EOF decl.h */ tau-2.16.4/examples/autoinstrument/klargest.cpp000066400000000000000000000305141062343042700216400ustar00rootroot00000000000000/**************************************************************************** ** File : klargest.c ** Author : Sameer Shende ** Contents : program to calculate the kth largest element in two ways ** Directory : $(TAUDIR)/examples/autoinstrument/ ** Usage : program [] [] ** e.g., % klargest 5000 675 *****************************************************************************/ #include #include #include /* for INT_MIN */ #include #include "decl.h" #define DEFAULT_SIZE 10000 #define DEFAULT_K 4 /* fourth largest element from the array */ #define middle(i) 5*i+2 /* the large array is partitioned into 5 elements each 2, 7, 12 etc. are positions of the middle elements in the array */ int size; /* global - size of the array */ int *M; /* the median array */ /************************************************************************** ** Function : select_kth_largest ** Parameters : k, array of integers S and n - the size of array. ** Description: The SELECT algorithm to find the kth largest element from ** the set of integers S in O(n) time. Used recursively. ** Returns : returns the kth largest element. ***************************************************************************/ int select_kth_largest(int k, int *S, int n) { /* return the kth largest element from the ordered set S of integers */ /* n is the number of elements in S */ /* Algorithm : if n < 50 then sort in dec. order S, return kth largest element in S else divide S into ceil(n/5) sequences of 5 elements each with upto four leftover elements sort in dec order each 5 element sequence let M be the sequence of medians of the 5 element sets m = select_kth_largest(ceil(n(M)/2), M, n/5); let S1, S2 and S3 be the sequences of elements in S greater than, equal to and less than m respectively. if n(S1) >=k then return select_kth_largest(k, S1, n(S1)); else if (n(S1) + n(S2) >= k) then return m else return select_kth_largest (k - n(S1) - n(S2), S3); */ int n_M, n_S1, n_S2, n_S3; /* number of elements in M, S1, S2 and S3 resp. */ int *S1, *S3; /* the other arrays */ int m; /* the median element */ int i, leftover, ret; if (n < 50) return kth_largest_qs(k, S, n); /* Use quicksort to sort the array S and return the kth largest element */ leftover = n % 5; /* upto four leftover elements */ if (leftover != 0) { /* then pad the remaining elements with min. negative values */ for (i=n; i< n + 5 - leftover; i++) S[i] = INT_MIN; /* number of leftover elements */ /* INT_MIN is defined for each system in /usr/include/limits.h */ } /* after padding the remaining array, sort the 5 element sequence */ n_M = ceil(n, 5); /* number of elements in M */ for(i=0; i< n_M; i++) { sort_5elements(&S[5*i]); /* beginning element */ } /* 5 element sequences are sorted */ /* display_array(S, ceil(n,5)*5); */ /* size of padded array is ceil(n,5)*5 */ S1 = (int *) malloc ((3*n/4) * sizeof(int)); /* allocate S1 */ S3 = (int *) malloc ((3*n/4) * sizeof(int)); /* allocate S3 */ if((S1 == (int *) NULL) || (S3 == (int *) NULL)) { perror("S1 or S3 malloc error"); exit(1); } for (i=0; i< n_M; i++) M[i] = S[middle(i)]; /* fill up the median array */ m = select_kth_largest(ceil(n_M,2), M, n_M); /* calculate the median element*/ /* construct S1, S2, and S3 as sequences of elements in S greater than, equal to and less than m. Don't need a separate S2 array. */ /* initialize the count of elements in S1, S2, S3 */ n_S1 = n_S2 = n_S3 = 0; /* go through every element in S */ for (i = 0; i < n; i++) { if(S[i] > m) S1[n_S1++] = S[i]; /* goes to S1 */ else if (S[i] < m) S3[n_S3++] = S[i]; /* goes to S3 */ else n_S2++; /* S2 count incremented goes to S2 */ } /* now we have S1, and S3 */ if(n_S1 >= k) /* S1 has the elements greater than m and there are greater than k elements, so its bound to be in this section */ { /* free memory */ /* don't need S3 */ free(S3); ret = select_kth_largest(k, S1, n_S1); free(S1); /* before returning clean up S1 */ return ret; } else { if(n_S1 + n_S2 >= k) /* its not in S1, but its in S2 */ { /* free memory */ /* don't need S1 and S3 */ free(S1); free(S3); return m; /* the median that we had calculated earlier */ } else /* its in S3 */ { /* free memory */ /* don't need S1 */ free(S1); ret = select_kth_largest(k - n_S1 - n_S2, S3, n_S3); free(S3); /* before returning clean up S3 */ return ret; } } } /************************************************************************** ** Function : interchange ** Parameters : two integer pointers a, and b ** Description: interchanges the contents of a and b. ** Returns : nothing ***************************************************************************/ void interchange(int *a, int *b) { /* interchanges the contents of the two variables containing integers. */ int temp; temp = *a; *a = *b; *b = temp; } /************************************************************************** ** Function : setup ** Parameters : array to be initialized ** Description: assigns values to elements in the array used for finding ** the kth largest element. ** Returns : nothing ***************************************************************************/ void setup(int *arr) { int i; /* setup */ arr[0] = 26; arr[1] = 5; arr[2] = 37; arr[3] = 1; arr[4] = 61; arr[5] = 11; arr[6] = 59; arr[7] = 15; arr[8] = 48; arr[9] = 19; if (size > 10) { for (i=10; i< size; i++) arr[i] = arr[i%10]; } /* Uses the first ten values repeatedly and fills the array */ } /************************************************************************** ** Function : quicksort ** Parameters : array to be sorted and lower and upper limits m and n resp. ** Description: uses quicksort recursively to sort elements in O(nlog n) ** time complexity in decreasing order.. ** Returns : nothing ***************************************************************************/ /* quick sort */ void quicksort(int *arr, int m, int n) { /* sort the array in decreasing order */ int k; /* control key */ int i, j; /* k is chosen as the control key and i and j are chosen such that at any time, arr[l] >= k for l < i and arr[l] <= k for l > j. It is assumed that arr[m] >= arr[n+1] */ /* printf("quicksort %d %d\n [", m, n); for(i=m; i k); /* Decreasing order for largest element first */ do { j = j - 1; } while (arr[j] < k); /* Decreasing order */ if (i < j) interchange(&arr[i], &arr[j]); } while (i < j); interchange(&arr[m], &arr[j]); /* pivot */ quicksort(arr, m, j - 1); /* left portion sorted */ quicksort(arr, j + 1, n); /* right side sorted - so array is sorted */ } /*if */ } /************************************************************************** ** Function : sort_5elements ** Parameters : array of 5 elements to be sorted ** Description: sorts the 5 elements in decreasing order ** Returns : nothing ***************************************************************************/ void sort_5elements(int *arr) { /* sort the first five elements of the array arr */ quicksort(arr, 0, 4); /* could be done by if statements too - but this way its easier to extend it for 7 element based select */ } /************************************************************************** ** Function : kth_largest_qs ** Parameters : k for kth largest, array to be sorted and size of array ** Description: sorts the array using quicksort and finds the kth largest ** element ** Returns : kth largest element ***************************************************************************/ int kth_largest_qs(int k, int *arr, int size) { /* first we sort the array and then return the kth largest element */ quicksort(arr, 0, size - 1); /* sort the array */ return arr[k-1]; /* return the kth largest */ } /************************************************************************** ** Function : display_array ** Parameters : array and size of array ** Description: for debugging, prints contents of the array ** Returns : nothing ***************************************************************************/ void display_array(int *A, int nelems) { int i; for(i=0; i < nelems; i++) { printf("A[%d] = %d\n", i, A[i]); } } /* utility functions */ /************************************************************************** ** Function : floor ** Parameters : numerator and denominator ** Description: calculates the floor of num/den ** Returns : floor ***************************************************************************/ int floor (int num, int den) { return num / den; } /************************************************************************** ** Function : ceil ** Parameters : numerator and denominator ** Description: calculates the ceiling of num/den ** Returns : ceiling ***************************************************************************/ int ceil (int num, int den) { return (num % den > 0) ? (num / den + 1) : (num / den); } /************************************************************************** ** Function : main ** Parameters : command line parameters. ** Description: Usage : main [] [] ** Calculates kth largest element using two different algorithms ** and returns the value and the time statistics for the two. ** Returns : nothing ***************************************************************************/ int main(int argc, char **argv) { int klarge, k; struct timeval tp1, tp2; float time_taken; int *A; /* extract the size of the array and k from the command line parameters */ if (argc > 1) size = atoi(argv[1]); else { size = DEFAULT_SIZE; printf(" Usage : main [] [] \n"); printf(" Calculates kth largest element using two different algorithms\n"); printf(" and returns the value and the time statistics for the two.\n"); } if (argc > 2) k = atoi(argv[2]); /* kth largest */ else k = DEFAULT_K; if (k > size) { printf("ERROR: Please specify a value for k (%d) that is less than the array size (%d)\n", k, size); exit(0); } /* there could be upto 4 leftover elements */ A = (int *) malloc((size + 4) * sizeof(int)); /* allocate the array */ if (A == (int *) NULL) { perror("Cannot malloc the size of array"); exit(1); } M = (int *) malloc(ceil(size,5)*sizeof(int)); /*allocate memory for Median*/ /* its ok to recycle this array so its allocated here instead of doing it in select_kth_largest */ if (M == (int *) NULL) { perror("Cannot malloc M array"); /* its ok to recycle this array so its allocated here instead of doing it in select_kth_largest */ exit(1); } /* setup */ setup(A); /* display_array(A,size); */ gettimeofday(&tp1, NULL); /* timing info. */ klarge = select_kth_largest(k, A, size); /* using SELECT O(n) algo. */ gettimeofday(&tp2, NULL); /* timing info. */ printf("****************************************************\n"); printf("Using select_kth_largest, size %d, %d th largest element = %d\n", size,k, klarge); time_taken = (tp2.tv_sec - tp1.tv_sec) + (tp2.tv_usec - tp1.tv_usec) * 1e-6; printf("Time taken (wall clock) = %f secs\n", time_taken); printf("- - - - - - - - - - - - - - - - - -\n"); /* Now calculate the kth largest element in A using the same array but the "quick and dirty" quicksort O(nlog n) algorithm */ gettimeofday(&tp1, NULL); /* timing info */ klarge = kth_largest_qs(k, A, size); /* calculates the kth largest element of A */ gettimeofday(&tp2, NULL); /* print results */ printf("Using quicksort, size %d, %d th largest element = %d\n", size, k, klarge); time_taken = (tp2.tv_sec - tp1.tv_sec) + (tp2.tv_usec - tp1.tv_usec) * 1e-6; printf("Time taken (wall clock) = %f secs\n", time_taken); /* printf("%d %f\n", size, time_taken); */ } /* EOF klargest.cpp */ tau-2.16.4/examples/autoinstrument/select000066400000000000000000000021641062343042700205220ustar00rootroot00000000000000# Selective instrumentation: Specify an exclude/include list. BEGIN_EXCLUDE_LIST void quicksort(int *, int, int) void sort_5elements(int *) void interchange(int *, int *) END_EXCLUDE_LIST # If an include list is specified, the routines in the list will be the only # routines that are instrumented. # To specify an include list (a list of routines that will be instrumented) # remove the leading # to uncomment the following lines #BEGIN_INCLUDE_LIST #int main(int, char **) #int select_ #END_INCLUDE_LIST # # TAU also accepts file include/exclude lists that may be specified with # wildcard characters (* and ?) to exclude/include routines in specific files. # These options may be used in conjunction with the routine include/exclude # lists as shown above. Uncomment the # to make the rule active. # #BEGIN_FILE_INCLUDE_LIST #foo.cpp #*.C #END_FILE_INCLUDE_LIST # only instruments routines in foo.cpp and all files with .C suffix. # or # #BEGIN_FILE_EXCLUDE_LIST #f*.c #impl?.C #END_FILE_EXCLUDE_LIST # excludes files f*.c and impl?.C (such as implA.C, foo.c). # Either include or exclude lists should be specified, but not both. tau-2.16.4/examples/callpath/000077500000000000000000000000001062343042700160045ustar00rootroot00000000000000tau-2.16.4/examples/callpath/Makefile000066400000000000000000000026401062343042700174460ustar00rootroot00000000000000#**************************************************************************** #* TAU Portable Profiling Package ** #* http://www.cs.uoregon.edu/research/tau ** #**************************************************************************** #* Copyright 1997 ** #* Department of Computer and Information Science, University of Oregon ** #* Advanced Computing Laboratory, Los Alamos National Laboratory ** #**************************************************************************** ####################################################################### ## pC++/Sage++ Copyright (C) 1993,1995 ## ## Indiana University University of Oregon University of Rennes ## ####################################################################### TAUROOTDIR = ../.. include $(TAUROOTDIR)/include/Makefile CXX = $(TAU_CXX) CC = $(TAU_CC) CFLAGS = $(TAU_INCLUDE) $(TAU_DEFS) LIBS = $(TAU_LIBS) LDFLAGS = $(USER_OPT) MAKEFILE = Makefile PRINT = pr RM = /bin/rm -f TARGET = simple EXTRAOBJS = ############################################## all: $(TARGET) install: $(TARGET) $(TARGET): $(TARGET).o $(CXX) $(LDFLAGS) $(TARGET).o -o $@ $(LIBS) $(TARGET).o : $(TARGET).cpp $(CXX) $(CFLAGS) -c $(TARGET).cpp clean: $(RM) $(TARGET).o $(TARGET) ############################################## tau-2.16.4/examples/callpath/README000066400000000000000000000154531062343042700166740ustar00rootroot00000000000000Set environment variable TAU_CALLPATH_DEPTH to an integer value (2-N) to get a profile with callpaths with the desired depth. [sameer@neuronic callpath]$ setenv TAU_CALLPATH_DEPTH 10 [sameer@neuronic callpath]$ simple; pprof Inside main: calls f1, f5 Inside f1: sleeps 1 sec, calls f2, f4 Inside f2: sleeps 2 sec, calls f3 Inside f3: sleeps 3 sec Inside f4: sleeps 4 sec, calls f2 Inside f2: sleeps 2 sec, calls f3 Inside f3: sleeps 3 sec Inside f5: sleeps 5 sec Reading Profile files in profile.* NODE 0;CONTEXT 0;THREAD 0: --------------------------------------------------------------------------------------- %Time Exclusive Inclusive #Call #Subrs Inclusive Name msec total msec usec/call --------------------------------------------------------------------------------------- 100.0 0.249 20,011 1 2 20011184 main() (calls f1, f5) 75.0 1,000 15,009 1 2 15009375 f1() (sleeps 1 sec, calls f2, f4) 75.0 1,000 15,009 1 2 15009375 main() (calls f1, f5) => f1() (sleeps 1 sec, calls f2, f4) 50.0 4,003 10,007 2 2 5003507 f2() (sleeps 2 sec, calls f3) 45.0 4,001 9,005 1 1 9005224 f4() (sleeps 4 sec, calls f2) 45.0 4,001 9,005 1 1 9005224 main() (calls f1, f5) => f1() (sleeps 1 sec, calls f2, f4) => f4() (sleeps 4 sec, calls f2) 30.0 6,003 6,003 2 0 3001675 f3() (sleeps 3 sec) 25.0 2,001 5,003 1 1 5003524 main() (calls f1, f5) => f1() (sleeps 1 sec, calls f2, f4) => f4() (sleeps 4 sec, calls f2) => f2() (sleeps 2 sec, calls f3) 25.0 2,001 5,003 1 1 5003490 main() (calls f1, f5) => f1() (sleeps 1 sec, calls f2, f4) => f2() (sleeps 2 sec, calls f3) 25.0 5,001 5,001 1 0 5001560 f5() (sleeps 5 sec) 25.0 5,001 5,001 1 0 5001560 main() (calls f1, f5) => f5() (sleeps 5 sec) 15.0 3,001 3,001 1 0 3001677 main() (calls f1, f5) => f1() (sleeps 1 sec, calls f2, f4) => f2() (sleeps 2 sec, calls f3) => f3() (sleeps 3 sec) 15.0 3,001 3,001 1 0 3001673 main() (calls f1, f5) => f1() (sleeps 1 sec, calls f2, f4) => f4() (sleeps 4 sec, calls f2) => f2() (sleeps 2 sec, calls f3) => f3() (sleeps 3 sec) [sameer@neuronic callpath]$ setenv TAU_CALLPATH_DEPTH 3 [sameer@neuronic callpath]$ ./simple Inside main: calls f1, f5 Inside f1: sleeps 1 sec, calls f2, f4 Inside f2: sleeps 2 sec, calls f3 Inside f3: sleeps 3 sec Inside f4: sleeps 4 sec, calls f2 Inside f2: sleeps 2 sec, calls f3 Inside f3: sleeps 3 sec Inside f5: sleeps 5 sec [sameer@neuronic callpath]$ pprof Reading Profile files in profile.* NODE 0;CONTEXT 0;THREAD 0: --------------------------------------------------------------------------------------- %Time Exclusive Inclusive #Call #Subrs Inclusive Name msec total msec usec/call --------------------------------------------------------------------------------------- 100.0 0.226 20,012 1 2 20012395 main() (calls f1, f5) 75.0 1,001 15,010 1 2 15010599 f1() (sleeps 1 sec, calls f2, f4) 75.0 1,001 15,010 1 2 15010599 main() (calls f1, f5) => f1() (sleeps 1 sec, calls f2, f4) 50.0 4,003 10,007 2 2 5003502 f2() (sleeps 2 sec, calls f3) 45.0 4,001 9,005 1 1 9005218 f4() (sleeps 4 sec, calls f2) 45.0 4,001 9,005 1 1 9005218 main() (calls f1, f5) => f1() (sleeps 1 sec, calls f2, f4) => f4() (sleeps 4 sec, calls f2) 30.0 6,003 6,003 2 0 3001701 f3() (sleeps 3 sec) 25.0 2,001 5,003 1 1 5003518 f1() (sleeps 1 sec, calls f2, f4) => f4() (sleeps 4 sec, calls f2) => f2() (sleeps 2 sec, calls f3) 25.0 2,001 5,003 1 1 5003486 main() (calls f1, f5) => f1() (sleeps 1 sec, calls f2, f4) => f2() (sleeps 2 sec, calls f3) 25.0 5,001 5,001 1 0 5001570 f5() (sleeps 5 sec) 25.0 5,001 5,001 1 0 5001570 main() (calls f1, f5) => f5() (sleeps 5 sec) 15.0 3,001 3,001 1 0 3001703 f1() (sleeps 1 sec, calls f2, f4) => f2() (sleeps 2 sec, calls f3) => f3() (sleeps 3 sec) 15.0 3,001 3,001 1 0 3001699 f4() (sleeps 4 sec, calls f2) => f2() (sleeps 2 sec, calls f3) => f3() (sleeps 3 sec) [sameer@neuronic callpath]$ unsetenv TAU_CALLPATH_DEPTH [sameer@neuronic callpath]$ ./simple; pprof Inside main: calls f1, f5 Inside f1: sleeps 1 sec, calls f2, f4 Inside f2: sleeps 2 sec, calls f3 Inside f3: sleeps 3 sec Inside f4: sleeps 4 sec, calls f2 Inside f2: sleeps 2 sec, calls f3 Inside f3: sleeps 3 sec Inside f5: sleeps 5 sec Reading Profile files in profile.* NODE 0;CONTEXT 0;THREAD 0: --------------------------------------------------------------------------------------- %Time Exclusive Inclusive #Call #Subrs Inclusive Name msec total msec usec/call --------------------------------------------------------------------------------------- 100.0 0.207 20,011 1 2 20011689 main() (calls f1, f5) 75.0 1,001 15,009 1 2 15009904 f1() (sleeps 1 sec, calls f2, f4) 75.0 1,001 15,009 1 2 15009904 main() (calls f1, f5) => f1() (sleeps 1 sec, calls f2, f4) 50.0 4,003 10,007 2 2 5003524 f2() (sleeps 2 sec, calls f3) 45.0 4,001 9,005 1 1 9005230 f1() (sleeps 1 sec, calls f2, f4) => f4() (sleeps 4 sec, calls f2) 45.0 4,001 9,005 1 1 9005230 f4() (sleeps 4 sec, calls f2) 30.0 6,003 6,003 2 0 3001710 f2() (sleeps 2 sec, calls f3) => f3() (sleeps 3 sec) 30.0 6,003 6,003 2 0 3001710 f3() (sleeps 3 sec) 25.0 2,001 5,003 1 1 5003546 f4() (sleeps 4 sec, calls f2) => f2() (sleeps 2 sec, calls f3) 25.0 2,001 5,003 1 1 5003502 f1() (sleeps 1 sec, calls f2, f4) => f2() (sleeps 2 sec, calls f3) 25.0 5,001 5,001 1 0 5001578 f5() (sleeps 5 sec) 25.0 5,001 5,001 1 0 5001578 main() (calls f1, f5) => f5() (sleeps 5 sec) tau-2.16.4/examples/callpath/simple.cpp000066400000000000000000000020251062343042700200000ustar00rootroot00000000000000#include #include #include int f1(); int f2(); int f3(); int f4(); int f5(); int f1(void) { TAU_PROFILE("f1()", "(sleeps 1 sec, calls f2, f4)", TAU_USER); printf("Inside f1: sleeps 1 sec, calls f2, f4\n"); sleep(1); f2(); f4(); return 0; } int f2(void) { TAU_PROFILE("f2()", "(sleeps 2 sec, calls f3)", TAU_USER); printf("Inside f2: sleeps 2 sec, calls f3\n"); sleep(2); f3(); return 0; } int f3(void) { TAU_PROFILE("f3()", "(sleeps 3 sec)", TAU_USER); printf("Inside f3: sleeps 3 sec\n"); sleep(3); return 0; } int f4(void) { TAU_PROFILE("f4()", "(sleeps 4 sec, calls f2)", TAU_USER); printf("Inside f4: sleeps 4 sec, calls f2\n"); sleep(4); f2(); return 0; } int f5(void) { TAU_PROFILE("f5()", "(sleeps 5 sec)", TAU_USER); printf("Inside f5: sleeps 5 sec\n"); sleep(5); return 0; } int main(int argc, char **argv) { TAU_PROFILE("main()", "(calls f1, f5)", TAU_DEFAULT); TAU_PROFILE_SET_NODE(0); printf("Inside main: calls f1, f5\n"); f1(); f5(); } tau-2.16.4/examples/charm/000077500000000000000000000000001062343042700153065ustar00rootroot00000000000000tau-2.16.4/examples/charm/Makefile000066400000000000000000000020571062343042700167520ustar00rootroot00000000000000#**************************************************************************** #* TAU Portable Profiling Package ** #* http://www.cs.uoregon.edu/research/tau ** #**************************************************************************** #* Copyright 1997-2005 ** #* Department of Computer and Information Science, University of Oregon ** #* Advanced Computing Laboratory, Los Alamos National Laboratory ** #**************************************************************************** ####################################################################### ## pC++/Sage++ Copyright (C) 1993,1995 ## ## Indiana University University of Oregon University of Rennes ## ####################################################################### TAUROOTDIR = ../.. include $(TAUROOTDIR)/include/Makefile CHARMC = charmc OPTS = -g pgm: pgm.C $(CHARMC) $(OPTS) $(TAU_DEFS) $(TAU_INCLUDE) -c pgm.C $(CHARMC) $(OPTS) -o pgm pgm.o -language converse++ $(TAU_LIBS) clean : $(RM) *.o pgm charmrun tau-2.16.4/examples/charm/namd-2.5.patch000066400000000000000000000126531062343042700175570ustar00rootroot00000000000000diff -rNc ../orig/NAMD_2.5_Source/charm/src/conv-core/converse.h ./charm/src/conv-core/converse.h *** ../orig/NAMD_2.5_Source/charm/src/conv-core/converse.h 2003-08-05 16:42:34.000000000 -0700 --- ./charm/src/conv-core/converse.h 2005-04-11 09:50:11.436189424 -0700 *************** *** 418,428 **** --- 418,430 ---- static __inline__ unsigned long long int rdtsc(void) { unsigned long long int x; + #ifndef TAU_CHARM #ifdef CMK_IA64 __asm__ __volatile__("mov %0=ar.itc" : "=r"(x) :: "memory"); #else __asm__ volatile (".byte 0x0f, 0x31" : "=A" (x)); #endif + #endif return x; } diff -rNc ../orig/NAMD_2.5_Source/Makefile ./Makefile *** ../orig/NAMD_2.5_Source/Makefile 2003-09-26 15:08:45.000000000 -0700 --- ./Makefile 2005-04-11 09:41:43.817359216 -0700 *************** *** 256,262 **** namd2: $(INCDIR) $(DSTDIR) $(OBJS) $(LIBS) $(MAKEBUILDINFO) ! $(CHARMC) -verbose -ld++-option \ "$(COPTI)$(CHARMINC) $(COPTI)$(INCDIR) $(COPTI)$(SRCDIR) $(CXXOPTS)" \ -module NeighborLB -module commlib -language charm++ \ $(BUILDINFO).o \ --- 256,262 ---- namd2: $(INCDIR) $(DSTDIR) $(OBJS) $(LIBS) $(MAKEBUILDINFO) ! $(TAU_COMPILER) $(CHARMC) -verbose -ld++-option \ "$(COPTI)$(CHARMINC) $(COPTI)$(INCDIR) $(COPTI)$(SRCDIR) $(CXXOPTS)" \ -module NeighborLB -module commlib -language charm++ \ $(BUILDINFO).o \ diff -rNc ../orig/NAMD_2.5_Source/select.tau ./select.tau *** ../orig/NAMD_2.5_Source/select.tau 1969-12-31 16:00:00.000000000 -0800 --- ./select.tau 2005-04-11 09:41:21.692722672 -0700 *************** *** 0 **** --- 1,18 ---- + BEGIN_EXCLUDE_LIST + void Sequencer::threadRun(Sequencer *) + void Controller::threadRun(Controller *) + void Sequencer::thread# + void Controller::thread# + int NAMD_read_int# + void PDBDATA::scan# + Real PDBAtom::zcoor# + Real PDBAtom::ycoor# + Real PDBAtom::xcoor# + Bool Molocule::is_hydrogen# + END_EXCLUDE_LIST + + BEGIN_FILE_EXCLUDE_LIST + *mainfunc.C + *memusage.C + *BackEnd.C + END_FILE_EXCLUDE_LIST diff -rNc ../orig/NAMD_2.5_Source/src/BackEnd.C ./src/BackEnd.C *** ../orig/NAMD_2.5_Source/src/BackEnd.C 2003-05-15 14:45:03.000000000 -0700 --- ./src/BackEnd.C 2005-04-11 09:43:47.370576272 -0700 *************** *** 4,9 **** --- 4,12 ---- *** All rights reserved. **/ + #include + extern "C" void Tau_create_top_level_timer_if_necessary(void); + #include "BackEnd.h" #include "converse.h" *************** *** 97,106 **** --- 100,113 ---- // called by main on one or all procs void BackEnd::init(int argc, char **argv) { ConverseInit(argc, argv, slave_init, 1, 1); // calls slave_init on others + TAU_PROFILE_SET_NODE(CmiMyPe()); + Tau_create_top_level_timer_if_necessary(); + TAU_PROFILE("BackEnd::init", "", TAU_DEFAULT); cpuTime_start = CmiCpuTimer(); wallTime_start = CmiWallTimer(); if ( CmiMyPe() ) { slave_init(argc, argv); // for procs that call main + TAU_PROFILE_EXIT("Calling ConverseExit()"); ConverseExit(); // should never return } all_init(argc, argv); diff -rNc ../orig/NAMD_2.5_Source/src/Controller.C ./src/Controller.C *** ../orig/NAMD_2.5_Source/src/Controller.C 2003-09-22 14:30:29.000000000 -0700 --- ./src/Controller.C 2005-04-11 09:46:12.290545088 -0700 *************** *** 4,9 **** --- 4,10 ---- *** All rights reserved. **/ + #include #include "memusage.h" #include "Node.h" #include "Molecule.h" *************** *** 110,115 **** --- 111,117 ---- void Controller::threadRun(Controller* arg) { + TAU_REGISTER_THREAD(); arg->algorithm(); } *************** *** 1673,1678 **** --- 1675,1681 ---- } void Controller::terminate(void) { + TAU_PROFILE_EXIT("Controller::terminate"); BackEnd::awaken(); CthFree(thread); CthSuspend(); diff -rNc ../orig/NAMD_2.5_Source/src/mainfunc.C ./src/mainfunc.C *** ../orig/NAMD_2.5_Source/src/mainfunc.C 2002-07-23 13:50:01.000000000 -0700 --- ./src/mainfunc.C 2005-04-11 09:45:01.766266408 -0700 *************** *** 3,9 **** *** The Board of Trustees of the University of Illinois. *** All rights reserved. **/ ! #include "memusage.h" #include "converse.h" #include "common.h" --- 3,9 ---- *** The Board of Trustees of the University of Illinois. *** All rights reserved. **/ ! #include #include "memusage.h" #include "converse.h" #include "common.h" *************** *** 32,37 **** --- 32,38 ---- int main(int argc, char **argv) { BackEnd::init(argc,argv); + TAU_PROFILE("int main(int, char**) C", " ", TAU_DEFAULT); ScriptTcl *script = new ScriptTcl; Node::Object()->setScript(script); *************** *** 83,88 **** --- 84,90 ---- } #endif + TAU_PROFILE_EXIT("main exitting"); BackEnd::exit(); return 0; } diff -rNc ../orig/NAMD_2.5_Source/src/Sequencer.C ./src/Sequencer.C *** ../orig/NAMD_2.5_Source/src/Sequencer.C 2003-07-28 18:56:22.000000000 -0700 --- ./src/Sequencer.C 2005-04-11 09:46:54.347151512 -0700 *************** *** 4,9 **** --- 4,10 ---- *** All rights reserved. **/ + #include #include "Node.h" #include "SimParameters.h" #include "Sequencer.h" *************** *** 60,65 **** --- 61,67 ---- // Invoked by thread void Sequencer::threadRun(Sequencer* arg) { + TAU_REGISTER_THREAD(); arg->algorithm(); } *************** *** 1246,1251 **** --- 1248,1254 ---- } void Sequencer::terminate() { + TAU_PROFILE_EXIT("Sequencer::terminate"); CthFree(thread); CthSuspend(); } tau-2.16.4/examples/charm/pgm.C000066400000000000000000000027371062343042700162060ustar00rootroot00000000000000///////////////////////////////////////// // File: pgm.C // This file adapted from charm/pgms/converse/context-switch ///////////////////////////////////////// #include #include #include #define NUM_THREADS 3 CpvDeclare(int, exitHandlerIdx); static char endmsg[CmiMsgHeaderSizeBytes]; int numThreadsDone = 0; void ExitHandler(void *msg) { numThreadsDone++; if (numThreadsDone >= NUM_THREADS) CsdExitScheduler(); } int bar(int i) { TAU_PROFILE("bar", "", TAU_DEFAULT); double sum; if (i % 2) { CthYield(); } for (int j=0; j< 13453450; j++) { sum = sum * 5.6 * i * j; double bob = 5.6 * 3.0f; } } void Yielder(void *arg) { TAU_REGISTER_THREAD(); TAU_PROFILE("Yielder", "", TAU_DEFAULT); register int i; int id = (int)arg; for(i=0;i<3;i++) { bar(i); CmiPrintf("%d: yielding %d\n", id, i); CthYield(); } TAU_PROFILE_EXIT(); CmiSetHandler(endmsg, CpvAccess(exitHandlerIdx)); CmiSyncSend(CmiMyPe(), CmiMsgHeaderSizeBytes, endmsg); } void test_init(int argc, char **argv) { TAU_PROFILE_SET_NODE(CmiMyPe()); TAU_PROFILE("test_init", "", TAU_DEFAULT); CpvInitialize(int, exitHandlerIdx); CpvAccess(exitHandlerIdx) = CmiRegisterHandler((CmiHandler)ExitHandler); for (int i=0; i < NUM_THREADS; i++) { CthThread yielder = CthCreate((CthVoidFn)Yielder, (void*)1, 64000); CthAwaken(yielder); } } int main(int argc, char **argv) { ConverseInit(argc, argv, test_init, 0, 0); } tau-2.16.4/examples/cinstrument/000077500000000000000000000000001062343042700165675ustar00rootroot00000000000000tau-2.16.4/examples/cinstrument/Makefile000066400000000000000000000056531062343042700202400ustar00rootroot00000000000000#**************************************************************************** #* TAU Portable Profiling Package ** #* http://www.cs.uoregon.edu/research/tau ** #**************************************************************************** #* Copyright 1997 ** #* Department of Computer and Information Science, University of Oregon ** #* Advanced Computing Laboratory, Los Alamos National Laboratory ** #**************************************************************************** ####################################################################### ## pC++/Sage++ Copyright (C) 1993,1995 ## ## Indiana University University of Oregon University of Rennes ## ####################################################################### TAUROOTDIR = ../.. include $(TAUROOTDIR)/include/Makefile CXX = $(TAU_CXX) CC = $(TAU_CC) PDTPARSE = $(PDTDIR)/$(PDTARCHDIR)/bin/cparse TAUINSTR = $(TAUROOTDIR)/$(CONFIG_ARCH)/bin/tau_instrumentor CFLAGS = $(TAU_INCLUDE) $(TAU_DEFS) -w -UTAU_MPI LIBS = $(TAU_LIBS) LDFLAGS = $(USER_OPT) MAKEFILE = Makefile PRINT = pr RM = /bin/rm -f TARGET = klargest EXTRAOBJS = ############################################## # Original Rules ############################################## #all: $(TARGET) # #install: $(TARGET) # #$(TARGET): $(TARGET).o # $(CXX) $(LDFLAGS) $(TARGET).o -o $@ $(LIBS) # #$(TARGET).o : $(TARGET).c # $(CXX) $(CFLAGS) -c $(TARGET).c # #clean: # $(RM) $(TARGET).o $(TARGET) ############################################## ############################################## # Modified Rules ############################################## all: $(TARGET) $(PDTPARSE) $(TAUINSTR) $(TARGET): $(TARGET).o $(CXX) $(LDFLAGS) $(TARGET).o -o $@ $(LIBS) # Use the instrumented source code to generate the object code $(TARGET).o : $(TARGET).inst.c $(CC) -c $(CFLAGS) $(TARGET).inst.c -o $(TARGET).o # Generate the instrumented source from the original source and the pdb file $(TARGET).inst.c : $(TARGET).pdb $(TARGET).c $(TAUINSTR) $(TAUINSTR) $(TARGET).pdb $(TARGET).c -o $(TARGET).inst.c # Parse the source file to generate the pdb file $(TARGET).pdb : $(PDTPARSE) $(TARGET).c $(PDTPARSE) $(TARGET).c $(CFLAGS) clean: $(RM) $(TARGET).o $(TARGET).inst.c $(TARGET) $(TARGET).pdb ############################################## $(PDTPARSE): @echo "*********************************************************" @echo "Download and Install Program Database Toolkit " @echo "ERROR: Cannot find $(PDTPARSE)" @echo "*********************************************************" $(TAUINSTR): @echo "*********************************************************" @echo "Configure TAU with -pdt= configuration option to use" @echo "C++ instrumentation with PDT" @echo "ERROR: Cannot find $(TAUINSTR)" @echo "*********************************************************" tau-2.16.4/examples/cinstrument/decl.h000066400000000000000000000013041062343042700176450ustar00rootroot00000000000000/**************************************************************************** ** File : decl.h ** Author : Sameer Shende ** Contents : function prototypes for kl.c to calculate kth largest elt. *****************************************************************************/ #ifndef _DECL_H #define _DECL_H /* function declarations */ int select_kth_largest(int k, int *S, int n); void interchange(int *a, int *b); void setup(int *arr); void quicksort(int *arr, int m, int n); void sort_5elements(int *arr); int kth_largest_qs(int k, int *arr, int size); void display_array(int *A, int nelems); int floor (int num, int den); int ceil (int num, int den); #endif /* _DECL_H */ /* EOF decl.h */ tau-2.16.4/examples/cinstrument/klargest.c000066400000000000000000000305311062343042700205510ustar00rootroot00000000000000/**************************************************************************** ** File : klargest.c ** Author : Sameer Shende ** Contents : program to calculate the kth largest element in two ways ** Directory : $(TAUDIR)/examples/autoinstrument/ ** Usage : program [] [] ** e.g., % klargest 5000 675 *****************************************************************************/ #include #include #include /* for INT_MIN */ #include #include "decl.h" #define DEFAULT_SIZE 10000 #define DEFAULT_K 4 /* fourth largest element from the array */ #define middle(i) 5*i+2 /* the large array is partitioned into 5 elements each 2, 7, 12 etc. are positions of the middle elements in the array */ int size; /* global - size of the array */ int *M; /* the median array */ /************************************************************************** ** Function : select_kth_largest ** Parameters : k, array of integers S and n - the size of array. ** Description: The SELECT algorithm to find the kth largest element from ** the set of integers S in O(n) time. Used recursively. ** Returns : returns the kth largest element. ***************************************************************************/ int select_kth_largest(k, S, n) int k; int *S; int n; { /* return the kth largest element from the ordered set S of integers */ /* n is the number of elements in S */ /* Algorithm : if n < 50 then sort in dec. order S, return kth largest element in S else divide S into ceil(n/5) sequences of 5 elements each with upto four leftover elements sort in dec order each 5 element sequence let M be the sequence of medians of the 5 element sets m = select_kth_largest(ceil(n(M)/2), M, n/5); let S1, S2 and S3 be the sequences of elements in S greater than, equal to and less than m respectively. if n(S1) >=k then return select_kth_largest(k, S1, n(S1)); else if (n(S1) + n(S2) >= k) then return m else return select_kth_largest (k - n(S1) - n(S2), S3); */ int n_M, n_S1, n_S2, n_S3; /* number of elements in M, S1, S2 and S3 resp. */ int *S1, *S3; /* the other arrays */ int m; /* the median element */ int i, leftover, ret; if (n < 50) return kth_largest_qs(k, S, n); /* Use quicksort to sort the array S and return the kth largest element */ leftover = n % 5; /* upto four leftover elements */ if (leftover != 0) { /* then pad the remaining elements with min. negative values */ for (i=n; i< n + 5 - leftover; i++) S[i] = INT_MIN; /* number of leftover elements */ /* INT_MIN is defined for each system in /usr/include/limits.h */ } /* after padding the remaining array, sort the 5 element sequence */ n_M = ceil(n, 5); /* number of elements in M */ for(i=0; i< n_M; i++) { sort_5elements(&S[5*i]); /* beginning element */ } /* 5 element sequences are sorted */ /* display_array(S, ceil(n,5)*5); */ /* size of padded array is ceil(n,5)*5 */ S1 = (int *) malloc ((3*n/4) * sizeof(int)); /* allocate S1 */ S3 = (int *) malloc ((3*n/4) * sizeof(int)); /* allocate S3 */ if((S1 == (int *) NULL) || (S3 == (int *) NULL)) { perror("S1 or S3 malloc error"); exit(1); } for (i=0; i< n_M; i++) M[i] = S[middle(i)]; /* fill up the median array */ m = select_kth_largest(ceil(n_M,2), M, n_M); /* calculate the median element*/ /* construct S1, S2, and S3 as sequences of elements in S greater than, equal to and less than m. Don't need a separate S2 array. */ /* initialize the count of elements in S1, S2, S3 */ n_S1 = n_S2 = n_S3 = 0; /* go through every element in S */ for (i = 0; i < n; i++) { if(S[i] > m) S1[n_S1++] = S[i]; /* goes to S1 */ else if (S[i] < m) S3[n_S3++] = S[i]; /* goes to S3 */ else n_S2++; /* S2 count incremented goes to S2 */ } /* now we have S1, and S3 */ if(n_S1 >= k) /* S1 has the elements greater than m and there are greater than k elements, so its bound to be in this section */ { /* free memory */ /* don't need S3 */ free(S3); ret = select_kth_largest(k, S1, n_S1); free(S1); /* before returning clean up S1 */ return ret; } else { if(n_S1 + n_S2 >= k) /* its not in S1, but its in S2 */ { /* free memory */ /* don't need S1 and S3 */ free(S1); free(S3); return m; /* the median that we had calculated earlier */ } else /* its in S3 */ { /* free memory */ /* don't need S1 */ free(S1); ret = select_kth_largest(k - n_S1 - n_S2, S3, n_S3); free(S3); /* before returning clean up S3 */ return ret; } } } /************************************************************************** ** Function : interchange ** Parameters : two integer pointers a, and b ** Description: interchanges the contents of a and b. ** Returns : nothing ***************************************************************************/ void interchange(int *a, int *b) { /* interchanges the contents of the two variables containing integers. */ int temp; temp = *a; *a = *b; *b = temp; } /************************************************************************** ** Function : setup ** Parameters : array to be initialized ** Description: assigns values to elements in the array used for finding ** the kth largest element. ** Returns : nothing ***************************************************************************/ void setup(int *arr) { int i; /* setup */ arr[0] = 26; arr[1] = 5; arr[2] = 37; arr[3] = 1; arr[4] = 61; arr[5] = 11; arr[6] = 59; arr[7] = 15; arr[8] = 48; arr[9] = 19; if (size > 10) { for (i=10; i< size; i++) arr[i] = arr[i%10]; } /* Uses the first ten values repeatedly and fills the array */ } /************************************************************************** ** Function : quicksort ** Parameters : array to be sorted and lower and upper limits m and n resp. ** Description: uses quicksort recursively to sort elements in O(nlog n) ** time complexity in decreasing order.. ** Returns : nothing ***************************************************************************/ /* quick sort */ void quicksort(int *arr, int m, int n) { /* sort the array in decreasing order */ int k; /* control key */ int i, j; /* k is chosen as the control key and i and j are chosen such that at any time, arr[l] >= k for l < i and arr[l] <= k for l > j. It is assumed that arr[m] >= arr[n+1] */ /* printf("quicksort %d %d\n [", m, n); for(i=m; i k); /* Decreasing order for largest element first */ do { j = j - 1; } while (arr[j] < k); /* Decreasing order */ if (i < j) interchange(&arr[i], &arr[j]); } while (i < j); interchange(&arr[m], &arr[j]); /* pivot */ quicksort(arr, m, j - 1); /* left portion sorted */ quicksort(arr, j + 1, n); /* right side sorted - so array is sorted */ } /*if */ } /************************************************************************** ** Function : sort_5elements ** Parameters : array of 5 elements to be sorted ** Description: sorts the 5 elements in decreasing order ** Returns : nothing ***************************************************************************/ void sort_5elements(int *arr) { /* sort the first five elements of the array arr */ quicksort(arr, 0, 4); /* could be done by if statements too - but this way its easier to extend it for 7 element based select */ } /************************************************************************** ** Function : kth_largest_qs ** Parameters : k for kth largest, array to be sorted and size of array ** Description: sorts the array using quicksort and finds the kth largest ** element ** Returns : kth largest element ***************************************************************************/ int kth_largest_qs(int k, int *arr, int size) { /* first we sort the array and then return the kth largest element */ quicksort(arr, 0, size - 1); /* sort the array */ return arr[k-1]; /* return the kth largest */ } /************************************************************************** ** Function : display_array ** Parameters : array and size of array ** Description: for debugging, prints contents of the array ** Returns : nothing ***************************************************************************/ void display_array(int *A, int nelems) { int i; for(i=0; i < nelems; i++) { printf("A[%d] = %d\n", i, A[i]); } } /* utility functions */ /************************************************************************** ** Function : floor ** Parameters : numerator and denominator ** Description: calculates the floor of num/den ** Returns : floor ***************************************************************************/ int floor (int num, int den) { return num / den; } /************************************************************************** ** Function : ceil ** Parameters : numerator and denominator ** Description: calculates the ceiling of num/den ** Returns : ceiling ***************************************************************************/ int ceil (int num, int den) { return (num % den > 0) ? (num / den + 1) : (num / den); } /************************************************************************** ** Function : main ** Parameters : command line parameters. ** Description: Usage : main [] [] ** Calculates kth largest element using two different algorithms ** and returns the value and the time statistics for the two. ** Returns : nothing ***************************************************************************/ int main(int argc, char **argv) { int klarge, k; struct timeval tp1, tp2; float time_taken; int *A; /* extract the size of the array and k from the command line parameters */ if (argc > 1) size = atoi(argv[1]); else { size = DEFAULT_SIZE; printf(" Usage : klargest [] [] \n"); printf(" Calculates kth largest element using two different algorithms\n"); printf(" and returns the value and the time statistics for the two.\n"); } if (argc > 2) k = atoi(argv[2]); /* kth largest */ else k = DEFAULT_K; if (k > size) { printf("ERROR: Please specify a value for k (%d) that is less than the array size (%d)\n", k, size); exit(0); } /* there could be upto 4 leftover elements */ A = (int *) malloc((size + 4) * sizeof(int)); /* allocate the array */ if (A == (int *) NULL) { perror("Cannot malloc the size of array"); exit(1); } M = (int *) malloc(ceil(size,5)*sizeof(int)); /*allocate memory for Median*/ /* its ok to recycle this array so its allocated here instead of doing it in select_kth_largest */ if (M == (int *) NULL) { perror("Cannot malloc M array"); /* its ok to recycle this array so its allocated here instead of doing it in select_kth_largest */ exit(1); } /* setup */ setup(A); /* display_array(A,size); */ gettimeofday(&tp1, NULL); /* timing info. */ klarge = select_kth_largest(k, A, size); /* using SELECT O(n) algo. */ gettimeofday(&tp2, NULL); /* timing info. */ printf("****************************************************\n"); printf("Using select_kth_largest, size %d, %d th largest element = %d\n", size,k, klarge); time_taken = (tp2.tv_sec - tp1.tv_sec) + (tp2.tv_usec - tp1.tv_usec) * 1e-6; printf("Time taken (wall clock) = %f secs\n", time_taken); printf("- - - - - - - - - - - - - - - - - -\n"); /* Now calculate the kth largest element in A using the same array but the "quick and dirty" quicksort O(nlog n) algorithm */ gettimeofday(&tp1, NULL); /* timing info */ klarge = kth_largest_qs(k, A, size); /* calculates the kth largest element of A */ gettimeofday(&tp2, NULL); /* print results */ printf("Using quicksort, size %d, %d th largest element = %d\n", size, k, klarge); time_taken = (tp2.tv_sec - tp1.tv_sec) + (tp2.tv_usec - tp1.tv_usec) * 1e-6; printf("Time taken (wall clock) = %f secs\n", time_taken); /* printf("%d %f\n", size, time_taken); */ } /* EOF klargest.cpp */ tau-2.16.4/examples/cthreads/000077500000000000000000000000001062343042700160115ustar00rootroot00000000000000tau-2.16.4/examples/cthreads/Makefile000066400000000000000000000026471062343042700174620ustar00rootroot00000000000000#**************************************************************************** #* TAU Portable Profiling Package ** #* http://www.cs.uoregon.edu/research/tau ** #**************************************************************************** #* Copyright 1997 ** #* Department of Computer and Information Science, University of Oregon ** #* Advanced Computing Laboratory, Los Alamos National Laboratory ** #**************************************************************************** ####################################################################### ## pC++/Sage++ Copyright (C) 1993,1995 ## ## Indiana University University of Oregon University of Rennes ## ####################################################################### TAUROOTDIR = ../.. include $(TAUROOTDIR)/include/Makefile CXX = $(TAU_CXX) CC = $(TAU_CC) CFLAGS = $(TAU_INCLUDE) $(TAU_DEFS) LIBS = $(TAU_LIBS) -lpthread LDFLAGS = $(USER_OPT) MAKEFILE = Makefile PRINT = pr RM = /bin/rm -f TARGET = hello EXTRAOBJS = ############################################## all: $(TARGET) install: $(TARGET) $(TARGET): $(TARGET).o $(CXX) $(LDFLAGS) $(TARGET).o -o $@ $(LIBS) $(TARGET).o : $(TARGET).c $(CC) $(CFLAGS) -c $(TARGET).c clean: $(RM) $(TARGET).o $(TARGET) ############################################## tau-2.16.4/examples/cthreads/README000066400000000000000000000005621062343042700166740ustar00rootroot00000000000000This example demonstrates the use of pthreads with C and TAU profiling interface for C. Special care should be taken to register the thread as soon as it is created by calling TAU_REGISTER_THREAD() as shown in the example. The program creates another thread that sleeps for 5 secs and calls other functions. TAU_PROFILE_TIMERS are used in C rather than TAU_PROFILE. tau-2.16.4/examples/cthreads/hello.c000077500000000000000000000054241062343042700172700ustar00rootroot00000000000000#include #include #include #include #include int user_square(int count) { TAU_REGISTER_EVENT(ue1, "UserSquare Event"); TAU_EVENT(ue1, count * count); return 0; } int fourth(void) { int i; TAU_PROFILE_TIMER(tautimer,"fourth()", "int ()", TAU_DEFAULT); TAU_PROFILE_START(tautimer); printf("Reached fourth\n"); for (i = 0; i < 100; i++) user_square(i); TAU_PROFILE_STOP(tautimer); return 0; } int third(void) { TAU_PROFILE_TIMER(tautimer,"third()", "int ()", TAU_DEFAULT); TAU_PROFILE_START(tautimer); printf("third calling fourth()\n"); fourth(); TAU_PROFILE_STOP(tautimer); return 0; } int second(void) { TAU_PROFILE_TIMER(tautimer,"second()", "int ()", TAU_DEFAULT); TAU_PROFILE_START(tautimer); printf("second calling third\n"); third(); TAU_PROFILE_STOP(tautimer); return 0; } int first(void) { TAU_PROFILE_TIMER(tautimer,"first()", "int ()", TAU_DEFAULT); TAU_PROFILE_START(tautimer); printf("first.. calling second \n"); second(); TAU_PROFILE_STOP(tautimer); return 0; } int work (void) { TAU_PROFILE_TIMER(tautimer, "work()", "int ()", TAU_DEFAULT); TAU_PROFILE_START(tautimer); printf("Hello. This is thread work calling first\n"); sleep(5); first(); TAU_PROFILE_STOP(tautimer); return 0; } void * threaded_func(void *data) { TAU_REGISTER_THREAD(); { /**** NOTE WE START ANOTHER BLOCK IN THREAD */ TAU_PROFILE_TIMER(tautimer, "threaded_func()", "int ()", TAU_DEFAULT); TAU_PROFILE_START(tautimer); work(); /* work done by this thread */ TAU_PROFILE_STOP(tautimer); } return NULL; } int main (int argc, char **argv) { int ret, i; pthread_attr_t attr; pthread_t tid; TAU_PROFILE_TIMER(tautimer,"main()", "int (int, char **)", TAU_DEFAULT); TAU_PROFILE_START(tautimer); TAU_PROFILE_INIT(argc, argv); TAU_PROFILE_SET_NODE(0); pthread_attr_init(&attr); printf("Started Main...\n"); for (i = 0; i < 10; i++) user_square(i); if (ret = pthread_create(&tid, NULL, threaded_func, NULL) ) { printf(" pthread_create fails ret = %d\n", ret); TAU_PROFILE_EXIT("pthread_create"); exit(1); } if (ret = pthread_join(tid, NULL) ) { printf(" pthread_join error ret = %d\n", ret); TAU_PROFILE_EXIT("pthread_join"); exit(1); } /* prior to exiting, print statistics related to user defined events */ printf("Exiting main...\n"); TAU_PROFILE_STOP(tautimer); return 0; } /*************************************************************************** * $RCSfile: hello.c,v $ $Author: sameer $ * $Revision: 1.6 $ $Date: 1999/06/20 05:01:24 $ * POOMA_VERSION_ID: $Id: hello.c,v 1.6 1999/06/20 05:01:24 sameer Exp $ ***************************************************************************/ tau-2.16.4/examples/dyninst/000077500000000000000000000000001062343042700157045ustar00rootroot00000000000000tau-2.16.4/examples/dyninst/Makefile000066400000000000000000000027731062343042700173550ustar00rootroot00000000000000#**************************************************************************** #* TAU Portable Profiling Package ** #* http://www.cs.uoregon.edu/research/tau ** #**************************************************************************** #* Copyright 1997 ** #* Department of Computer and Information Science, University of Oregon ** #* Advanced Computing Laboratory, Los Alamos National Laboratory ** #**************************************************************************** ####################################################################### ## pC++/Sage++ Copyright (C) 1993,1995 ## ## Indiana University University of Oregon University of Rennes ## ####################################################################### TAUROOTDIR = ../.. include $(TAUROOTDIR)/include/Makefile CXX = $(TAU_CXX) CC = $(TAU_CC) #CFLAGS = $(TAU_INCLUDE) $(TAU_DEFS) CFLAGS = #LIBS = $(TAU_LIBS) #LIBS = $(TAUROOTDIR)/src/Profile/TauHooks.o $(TAU_LIBS) -ldl LDFLAGS = $(USER_OPT) MAKEFILE = Makefile PRINT = pr RM = /bin/rm -f TARGET = klargest EXTRAOBJS = ############################################## all: $(TARGET) install: $(TARGET) $(TARGET): $(TARGET).o $(CXX) $(LDFLAGS) $(TARGET).o -o $@ $(LIBS) $(TARGET).o : $(TARGET).cpp $(CXX) $(CFLAGS) -c $(TARGET).cpp clean: $(RM) $(TARGET).o $(TARGET) ############################################## tau-2.16.4/examples/dyninst/decl.h000066400000000000000000000013041062343042700167620ustar00rootroot00000000000000/**************************************************************************** ** File : decl.h ** Author : Sameer Shende ** Contents : function prototypes for kl.c to calculate kth largest elt. *****************************************************************************/ #ifndef _DECL_H #define _DECL_H /* function declarations */ int select_kth_largest(int k, int *S, int n); void interchange(int *a, int *b); void setup(int *arr); void quicksort(int *arr, int m, int n); void sort_5elements(int *arr); int kth_largest_qs(int k, int *arr, int size); void display_array(int *A, int nelems); int floor (int num, int den); int ceil (int num, int den); #endif /* _DECL_H */ /* EOF decl.h */ tau-2.16.4/examples/dyninst/klargest.cpp000066400000000000000000000305141062343042700202270ustar00rootroot00000000000000/**************************************************************************** ** File : klargest.c ** Author : Sameer Shende ** Contents : program to calculate the kth largest element in two ways ** Directory : $(TAUDIR)/examples/autoinstrument/ ** Usage : program [] [] ** e.g., % klargest 5000 675 *****************************************************************************/ #include #include #include /* for INT_MIN */ #include #include "decl.h" #define DEFAULT_SIZE 10000 #define DEFAULT_K 4 /* fourth largest element from the array */ #define middle(i) 5*i+2 /* the large array is partitioned into 5 elements each 2, 7, 12 etc. are positions of the middle elements in the array */ int size; /* global - size of the array */ int *M; /* the median array */ /************************************************************************** ** Function : select_kth_largest ** Parameters : k, array of integers S and n - the size of array. ** Description: The SELECT algorithm to find the kth largest element from ** the set of integers S in O(n) time. Used recursively. ** Returns : returns the kth largest element. ***************************************************************************/ int select_kth_largest(int k, int *S, int n) { /* return the kth largest element from the ordered set S of integers */ /* n is the number of elements in S */ /* Algorithm : if n < 50 then sort in dec. order S, return kth largest element in S else divide S into ceil(n/5) sequences of 5 elements each with upto four leftover elements sort in dec order each 5 element sequence let M be the sequence of medians of the 5 element sets m = select_kth_largest(ceil(n(M)/2), M, n/5); let S1, S2 and S3 be the sequences of elements in S greater than, equal to and less than m respectively. if n(S1) >=k then return select_kth_largest(k, S1, n(S1)); else if (n(S1) + n(S2) >= k) then return m else return select_kth_largest (k - n(S1) - n(S2), S3); */ int n_M, n_S1, n_S2, n_S3; /* number of elements in M, S1, S2 and S3 resp. */ int *S1, *S3; /* the other arrays */ int m; /* the median element */ int i, leftover, ret; if (n < 50) return kth_largest_qs(k, S, n); /* Use quicksort to sort the array S and return the kth largest element */ leftover = n % 5; /* upto four leftover elements */ if (leftover != 0) { /* then pad the remaining elements with min. negative values */ for (i=n; i< n + 5 - leftover; i++) S[i] = INT_MIN; /* number of leftover elements */ /* INT_MIN is defined for each system in /usr/include/limits.h */ } /* after padding the remaining array, sort the 5 element sequence */ n_M = ceil(n, 5); /* number of elements in M */ for(i=0; i< n_M; i++) { sort_5elements(&S[5*i]); /* beginning element */ } /* 5 element sequences are sorted */ /* display_array(S, ceil(n,5)*5); */ /* size of padded array is ceil(n,5)*5 */ S1 = (int *) malloc ((3*n/4) * sizeof(int)); /* allocate S1 */ S3 = (int *) malloc ((3*n/4) * sizeof(int)); /* allocate S3 */ if((S1 == (int *) NULL) || (S3 == (int *) NULL)) { perror("S1 or S3 malloc error"); exit(1); } for (i=0; i< n_M; i++) M[i] = S[middle(i)]; /* fill up the median array */ m = select_kth_largest(ceil(n_M,2), M, n_M); /* calculate the median element*/ /* construct S1, S2, and S3 as sequences of elements in S greater than, equal to and less than m. Don't need a separate S2 array. */ /* initialize the count of elements in S1, S2, S3 */ n_S1 = n_S2 = n_S3 = 0; /* go through every element in S */ for (i = 0; i < n; i++) { if(S[i] > m) S1[n_S1++] = S[i]; /* goes to S1 */ else if (S[i] < m) S3[n_S3++] = S[i]; /* goes to S3 */ else n_S2++; /* S2 count incremented goes to S2 */ } /* now we have S1, and S3 */ if(n_S1 >= k) /* S1 has the elements greater than m and there are greater than k elements, so its bound to be in this section */ { /* free memory */ /* don't need S3 */ free(S3); ret = select_kth_largest(k, S1, n_S1); free(S1); /* before returning clean up S1 */ return ret; } else { if(n_S1 + n_S2 >= k) /* its not in S1, but its in S2 */ { /* free memory */ /* don't need S1 and S3 */ free(S1); free(S3); return m; /* the median that we had calculated earlier */ } else /* its in S3 */ { /* free memory */ /* don't need S1 */ free(S1); ret = select_kth_largest(k - n_S1 - n_S2, S3, n_S3); free(S3); /* before returning clean up S3 */ return ret; } } } /************************************************************************** ** Function : interchange ** Parameters : two integer pointers a, and b ** Description: interchanges the contents of a and b. ** Returns : nothing ***************************************************************************/ void interchange(int *a, int *b) { /* interchanges the contents of the two variables containing integers. */ int temp; temp = *a; *a = *b; *b = temp; } /************************************************************************** ** Function : setup ** Parameters : array to be initialized ** Description: assigns values to elements in the array used for finding ** the kth largest element. ** Returns : nothing ***************************************************************************/ void setup(int *arr) { int i; /* setup */ arr[0] = 26; arr[1] = 5; arr[2] = 37; arr[3] = 1; arr[4] = 61; arr[5] = 11; arr[6] = 59; arr[7] = 15; arr[8] = 48; arr[9] = 19; if (size > 10) { for (i=10; i< size; i++) arr[i] = arr[i%10]; } /* Uses the first ten values repeatedly and fills the array */ } /************************************************************************** ** Function : quicksort ** Parameters : array to be sorted and lower and upper limits m and n resp. ** Description: uses quicksort recursively to sort elements in O(nlog n) ** time complexity in decreasing order.. ** Returns : nothing ***************************************************************************/ /* quick sort */ void quicksort(int *arr, int m, int n) { /* sort the array in decreasing order */ int k; /* control key */ int i, j; /* k is chosen as the control key and i and j are chosen such that at any time, arr[l] >= k for l < i and arr[l] <= k for l > j. It is assumed that arr[m] >= arr[n+1] */ /* printf("quicksort %d %d\n [", m, n); for(i=m; i k); /* Decreasing order for largest element first */ do { j = j - 1; } while (arr[j] < k); /* Decreasing order */ if (i < j) interchange(&arr[i], &arr[j]); } while (i < j); interchange(&arr[m], &arr[j]); /* pivot */ quicksort(arr, m, j - 1); /* left portion sorted */ quicksort(arr, j + 1, n); /* right side sorted - so array is sorted */ } /*if */ } /************************************************************************** ** Function : sort_5elements ** Parameters : array of 5 elements to be sorted ** Description: sorts the 5 elements in decreasing order ** Returns : nothing ***************************************************************************/ void sort_5elements(int *arr) { /* sort the first five elements of the array arr */ quicksort(arr, 0, 4); /* could be done by if statements too - but this way its easier to extend it for 7 element based select */ } /************************************************************************** ** Function : kth_largest_qs ** Parameters : k for kth largest, array to be sorted and size of array ** Description: sorts the array using quicksort and finds the kth largest ** element ** Returns : kth largest element ***************************************************************************/ int kth_largest_qs(int k, int *arr, int size) { /* first we sort the array and then return the kth largest element */ quicksort(arr, 0, size - 1); /* sort the array */ return arr[k-1]; /* return the kth largest */ } /************************************************************************** ** Function : display_array ** Parameters : array and size of array ** Description: for debugging, prints contents of the array ** Returns : nothing ***************************************************************************/ void display_array(int *A, int nelems) { int i; for(i=0; i < nelems; i++) { printf("A[%d] = %d\n", i, A[i]); } } /* utility functions */ /************************************************************************** ** Function : floor ** Parameters : numerator and denominator ** Description: calculates the floor of num/den ** Returns : floor ***************************************************************************/ int floor (int num, int den) { return num / den; } /************************************************************************** ** Function : ceil ** Parameters : numerator and denominator ** Description: calculates the ceiling of num/den ** Returns : ceiling ***************************************************************************/ int ceil (int num, int den) { return (num % den > 0) ? (num / den + 1) : (num / den); } /************************************************************************** ** Function : main ** Parameters : command line parameters. ** Description: Usage : main [] [] ** Calculates kth largest element using two different algorithms ** and returns the value and the time statistics for the two. ** Returns : nothing ***************************************************************************/ int main(int argc, char **argv) { int klarge, k; struct timeval tp1, tp2; float time_taken; int *A; /* extract the size of the array and k from the command line parameters */ if (argc > 1) size = atoi(argv[1]); else { size = DEFAULT_SIZE; printf(" Usage : main [] [] \n"); printf(" Calculates kth largest element using two different algorithms\n"); printf(" and returns the value and the time statistics for the two.\n"); } if (argc > 2) k = atoi(argv[2]); /* kth largest */ else k = DEFAULT_K; if (k > size) { printf("ERROR: Please specify a value for k (%d) that is less than the array size (%d)\n", k, size); exit(0); } /* there could be upto 4 leftover elements */ A = (int *) malloc((size + 4) * sizeof(int)); /* allocate the array */ if (A == (int *) NULL) { perror("Cannot malloc the size of array"); exit(1); } M = (int *) malloc(ceil(size,5)*sizeof(int)); /*allocate memory for Median*/ /* its ok to recycle this array so its allocated here instead of doing it in select_kth_largest */ if (M == (int *) NULL) { perror("Cannot malloc M array"); /* its ok to recycle this array so its allocated here instead of doing it in select_kth_largest */ exit(1); } /* setup */ setup(A); /* display_array(A,size); */ gettimeofday(&tp1, NULL); /* timing info. */ klarge = select_kth_largest(k, A, size); /* using SELECT O(n) algo. */ gettimeofday(&tp2, NULL); /* timing info. */ printf("****************************************************\n"); printf("Using select_kth_largest, size %d, %d th largest element = %d\n", size,k, klarge); time_taken = (tp2.tv_sec - tp1.tv_sec) + (tp2.tv_usec - tp1.tv_usec) * 1e-6; printf("Time taken (wall clock) = %f secs\n", time_taken); printf("- - - - - - - - - - - - - - - - - -\n"); /* Now calculate the kth largest element in A using the same array but the "quick and dirty" quicksort O(nlog n) algorithm */ gettimeofday(&tp1, NULL); /* timing info */ klarge = kth_largest_qs(k, A, size); /* calculates the kth largest element of A */ gettimeofday(&tp2, NULL); /* print results */ printf("Using quicksort, size %d, %d th largest element = %d\n", size, k, klarge); time_taken = (tp2.tv_sec - tp1.tv_sec) + (tp2.tv_usec - tp1.tv_usec) * 1e-6; printf("Time taken (wall clock) = %f secs\n", time_taken); /* printf("%d %f\n", size, time_taken); */ } /* EOF klargest.cpp */ tau-2.16.4/examples/dyninstthreads/000077500000000000000000000000001062343042700172575ustar00rootroot00000000000000tau-2.16.4/examples/dyninstthreads/Makefile000066400000000000000000000026401062343042700207210ustar00rootroot00000000000000#**************************************************************************** #* TAU Portable Profiling Package ** #* http://www.cs.uoregon.edu/research/tau ** #**************************************************************************** #* Copyright 1997 ** #* Department of Computer and Information Science, University of Oregon ** #* Advanced Computing Laboratory, Los Alamos National Laboratory ** #**************************************************************************** ####################################################################### ## pC++/Sage++ Copyright (C) 1993,1995 ## ## Indiana University University of Oregon University of Rennes ## ####################################################################### TAUROOTDIR = ../.. include $(TAUROOTDIR)/include/Makefile CXX = $(TAU_CXX) CC = $(TAU_CC) CFLAGS = $(TAU_INCLUDE) $(TAU_DEFS) LIBS = $(TAU_SHLIBS) LDFLAGS = $(USER_OPT) MAKEFILE = Makefile PRINT = pr RM = /bin/rm -f TARGET = hello EXTRAOBJS = ############################################## all: $(TARGET) install: $(TARGET) $(TARGET): $(TARGET).o $(CXX) $(LDFLAGS) $(TARGET).o -o $@ $(LIBS) $(TARGET).o : $(TARGET).cpp $(CXX) $(CFLAGS) -c $(TARGET).cpp clean: $(RM) $(TARGET).o $(TARGET) ############################################## tau-2.16.4/examples/dyninstthreads/hello.cpp000066400000000000000000000030301062343042700210620ustar00rootroot00000000000000 // Example code showing TAU monitoring a threaded application. // This program spawns one thread that calls a bunch of dummy functions // one of which sleeps for five seconds. It demonstrates that data can be // collected for the two threads and displayed according to each thread #include #include #include #include int fourth(void) { cout <<"Reached fourth " << endl; return 0; } int third(void) { cout <<"third calling fourth " < // for TAU #include #include int someA(void); int someB(void); int someC(void); int someD(void); /* experimenting with fork */ int pID; int main(int argc, char *argv[]) { TAU_PROFILE("main", "int (int, char **)", TAU_DEFAULT); TAU_PROFILE_INIT(argc, argv); TAU_PROFILE_SET_NODE(0); TAU_PROFILE_SET_CONTEXT(0); printf("Inside main\n"); someA(); return 0; } int someA() { TAU_PROFILE("someA","void (void)", TAU_USER); printf("Inside someA - sleeping for 3 secs\n"); sleep(3); someB(); return(0); } int someB() { TAU_PROFILE("someB","void (void)", TAU_USER); printf("Inside someB - sleeping for 5 secs\n"); sleep(5); someC(); return(0); } int someC() { TAU_PROFILE("someC","void (void)", TAU_USER); printf("Inside someC before fork\n"); pID = fork(); if (pID != 0) { printf("Parent : pid returned %d\n", pID); } else { // If we'd used the TAU_INCLUDE_PARENT_DATA, we'd get the performance // data from the parent in this process as well. TAU_REGISTER_FORK(1, TAU_EXCLUDE_PARENT_DATA); // Aliter: // TAU_REGISTER_FORK(1, TAU_INCLUDE_PARENT_DATA); printf("Child : pid = %d - sleeping for 2 secs\n", pID); sleep(2); someD(); } return(0); } int someD() { TAU_PROFILE("someD","void (void)", TAU_USER); printf("Inside someD in the child - sleeping for 9 secs\n"); sleep(9); return(0); } /*************************************************************************** * $RCSfile: fork.cpp,v $ $Author: amorris $ * $Revision: 1.5 $ $Date: 2006/07/08 00:52:52 $ * VERSION: $Id: fork.cpp,v 1.5 2006/07/08 00:52:52 amorris Exp $ ***************************************************************************/ tau-2.16.4/examples/fortran/000077500000000000000000000000001062343042700156675ustar00rootroot00000000000000tau-2.16.4/examples/fortran/Makefile000066400000000000000000000027751062343042700173420ustar00rootroot00000000000000#**************************************************************************** #* TAU Portable Profiling Package ** #* http://www.cs.uoregon.edu/research/tau ** #**************************************************************************** #* Copyright 1997 ** #* Department of Computer and Information Science, University of Oregon ** #* Advanced Computing Laboratory, Los Alamos National Laboratory ** #**************************************************************************** ####################################################################### ## pC++/Sage++ Copyright (C) 1993,1995 ## ## Indiana University University of Oregon University of Rennes ## ####################################################################### TAUROOTDIR = ../.. include $(TAUROOTDIR)/include/Makefile CXX = $(TAU_CXX) CC = $(TAU_CC) FFLAGS = $(TAU_INCLUDE) $(TAU_F90_FIXED) LIBS = $(TAU_LIBS) $(TAU_CXXLIBS) #LIBS = $(TAU_DISABLE) $(TAU_CXXLIBS) LDFLAGS = $(USER_OPT) MAKEFILE = Makefile PRINT = pr RM = /bin/rm -f F90 = $(TAU_F90) TARGET = hello EXTRAOBJS = ############################################## all: $(TARGET) install: $(TARGET) $(TARGET): $(TARGET).o $(F90) $(LDFLAGS) $(TARGET).o -o $@ $(LIBS) $(TARGET).o : $(TARGET).f $(F90) $(FFLAGS) -c $(TARGET).f clean: $(RM) $(TARGET).o $(TARGET) ############################################## tau-2.16.4/examples/fortran/hello.f000066400000000000000000000017331062343042700171450ustar00rootroot00000000000000cc hello.f cc -------- cc This file contains code for testing the Fortran interface to TAU cc It works with the Cray T3E F90 compiler with TAU. cc----------------------------------------------------------------------------- subroutine HELLOWORLD(iVal) integer iVal integer profiler(2) / 0, 0 / save profiler call TAU_PROFILE_TIMER(profiler,'HelloWorld()') call TAU_PROFILE_START(profiler) cc Do something here... print *, "Iteration = ", iVal call TAU_PROFILE_STOP(profiler) cc HelloWorld = iVal end program main integer i integer profiler(2) / 0, 0 / save profiler call TAU_PROFILE_INIT() call TAU_PROFILE_TIMER(profiler, 'main()') call TAU_PROFILE_START(profiler) call TAU_PROFILE_SET_NODE(0) print *, "test program" do 10, i = 1, 10 call HELLOWORLD(i) 10 continue call TAU_PROFILE_STOP(profiler) end tau-2.16.4/examples/gpshmem/000077500000000000000000000000001062343042700156545ustar00rootroot00000000000000tau-2.16.4/examples/gpshmem/README000066400000000000000000000022211062343042700165310ustar00rootroot00000000000000These examples are provided by Adam Leko, UFL, UPC group. We'd like to thank him for creating the GPSHMEM/PGPSHMEM interface and the TAU wrappers for GPSHMEM. To use GPSHMEM, please refer to instructions from: http://www.hcs.ufl.edu/~leko/pgpshmem/ for patching the gpshmem package. Then build TAU with GPSHMEM. For e.g., % configure -fortran=gnu -TRACE -shmemlib=/usr/local/packages/gpshmem-1.0/lib -shmeminc=/usr/local/packages/gpshmem-1.0/include -shmem -pdt=/usr/local/packages/pdtoolkit-3.3.1 -pdtcompdir=gcc -shmemlibrary='-lgpshmem -L/usr/local/packages/armci-1.1/lib/LINUX -L/usr/lib/gcc-lib/i386-pc-linux/3.2.3/ -lstdc++ -lgcc_s -larmci -L/opt/mpich-mpd/gnu/lib -lmpich' This way, we can pass the libraries that -lgpshmem needs on the configure command-line as these are system specific. By default, TAU will use -lgpshmem only. % cd tau-2.x/examples/gpshmem/pdt_fortran % make % mpirun -np 4 foxf77 Please send any questions or suggestions to tau-team@cs.uoregon.edu. DISCLAIMER: The Fortran examples included in this directory tree were obtained from the GPSHMEM distribution and are covered by the license included in the accompanying LICENSE file. tau-2.16.4/examples/gpshmem/c/000077500000000000000000000000001062343042700160765ustar00rootroot00000000000000tau-2.16.4/examples/gpshmem/c/Makefile000066400000000000000000000033731062343042700175440ustar00rootroot00000000000000#**************************************************************************** #* TAU Portable Profiling Package ** #* http://www.cs.uoregon.edu/research/tau ** #**************************************************************************** #* Copyright 1997 ** #* Department of Computer and Information Science, University of Oregon ** #* Advanced Computing Laboratory, Los Alamos National Laboratory ** #**************************************************************************** ####################################################################### ## pC++/Sage++ Copyright (C) 1993,1995 ## ## Indiana University University of Oregon University of Rennes ## ####################################################################### TAUROOTDIR = ../../.. include $(TAUROOTDIR)/include/Makefile CXX = $(TAU_CXX) CC = $(TAU_CC) CFLAGS = $(TAU_SHMEM_INCLUDE) $(TAU_DEFS) $(TAU_INCLUDE) # Pass these options using -shmemlibrary='-lgpshmem -L... -larmci ...' to # TAU's configure script. #LIBS = $(TAU_SHMEM_LIBS) -L/usr/local/packages/armci-1.1/lib/LINUX -L/usr/lib/gcc-lib/i386-pc-linux/3.2.3/ -lstdc++ -lgcc_s -larmci -L/opt/mpich-mpd/gnu/lib -lmpich $(TAU_LIBS) $(TAU_CXXLIBS) LIBS = $(TAU_SHMEM_LIBS) $(TAU_LIBS) $(TAU_CXXLIBS) MAKEFILE = Makefile RM = /bin/rm -f TARGET = fox ############################################## # Original Rules ############################################## all: $(TARGET) $(TARGET): $(TARGET).o $(CXX) $(LDFLAGS) $(TARGET).o -o $@ $(LIBS) $(TARGET).o : $(TARGET).c $(CC) $(CFLAGS) -c $(TARGET).c clean: $(RM) $(TARGET) $(TARGET).o $(TARGET).pdb *.vpt *.gz *.slog2 *.trc *.edf ############################################## tau-2.16.4/examples/gpshmem/c/fox.c000066400000000000000000000700141062343042700170400ustar00rootroot00000000000000/*---------------------------------------------------------------------------*\ $Id: fox.c,v 1.1 2005/06/29 19:15:30 sameer Exp $ \*---------------------------------------------------------------------------*/ /*--------------------------*\ All include files needed \*--------------------------*/ #include #include #include #include #include #include "gpshmem.h" #include /*------------*\ Definitions \*------------*/ /*--------------------------------------------------*\ A global debuging print level. Use with caution! \*--------------------------------------------------*/ #define UTIL_PRINTIT 0 /*--------------------*\ temp string length \*--------------------*/ #define TMPSTRLEN 1024 /*--------------------------------------------------------------------------*\ Constants for Matrix definitions. These values will have an impact on the final difference matrix norm through numerical roundoff. The final norm value will also be a function of the number of processes used. \*--------------------------------------------------------------------------*/ #define A_VAL ((double) 5/(double)8) #define B_VAL ((double) 1/(double)7) #define C_VAL ((double) 5.0) #define D_VAL ((double) -2/(double)13) #define E_VAL ((double) 6/(double)5) #define F_VAL ((double) 2.0) /*------------------------------------------------------------------------*\ functions used in the code \*------------------------------------------------------------------------*/ #define PROC_FROM_GRID(i,j,n) ((i)*(n)+(j)) #define INC_WRAP(i,j,n) (((i)+(j)+(n))%(n)) #define CLEANSTRING(s,l){\ int __i;\ char *__s = (char *)(s);\ for(__i=0;__i<(int)(l);__i++)__s[__i]=(char)0;\ } /*-----------------------------------*\ Define the rank of the full matrix \*-----------------------------------*/ #define RANK 840 #define LOCAL_RANK_PRINT_LIMIT 40 /*------------------------------------------------------------------------*\ 2*3 = 6; *4 = 24; *5 = 120; *6 = 720; *7 = 5040 \*------------------------------------------------------------------------*/ /*-----------*\ prototypes \*-----------*/ void output_seq(double *A, int ilo, int ihi, int jlo, int jhi, int numRows, int numCols, int fmt, double threshold); void output( double *A, int ilo, int ihi, int jlo, int jhi, int numRows, int numCols, int fmt, double threshold); double diffnorm(double *a, double *b, int len, int me); void mat_mul(double *a, double *b, double *c, int rowa, int cola, int colb); void foxit(double *A, double *B, double *C, int rank, int local_rank, int myrow, int mycol, int me, int nproc,int sqrtproc); void gen_A(double *buffer, int ilo, int ihi, int jlo, int jhi, int rowdim_A, int coldim_A); void gen_B(double *buffer, int ilo, int ihi, int jlo, int jhi, int rowdim_B, int coldim_B); void gen_C(double *buffer, int ilo, int ihi, int jlo, int jhi, int rowdim_C, int coldim_C, int crossDim); void printf_seq(char *string, int str_len); /*--------------------------------------------------------------------------*\ Main Fox Driver program. \*--------------------------------------------------------------------------*/ int main(int argc, char *argv[]) { int master = 0; /* master process ID */ int nproc; /* number of processes involved */ int nn; /* sqrt(nproc) */ int me; /* my process ID */ int nproctest; /* sqrt then squared test that nproc is perfect square */ int local_rank; /* rank of matrix patch for each process */ int myrow, mycol; /* row and column ID */ int my_low_r, my_high_r; /* row index range of patch of matrix */ int my_low_c, my_high_c; /* column index range of patch of matrix */ char tmps[TMPSTRLEN]; /* temp output string */ double *A_patch; /* patch of A matrix */ double *B_patch; /* patch of B matrix */ double *C_patch; /* patch of C matrix (computed) */ double *Z_patch; /* patch of C matrix (analytical) */ double mytime, mytime0, mytime1; /* timing variables */ double norm, normall; /* local and global norm */ int i,j; /* dummy loop variables */ /*----------------------------------------*\ Initialize TAU \*----------------------------------------*/ TAU_PROFILE_TIMER(t, "main()", "int (int, char **)", TAU_DEFAULT); TAU_PROFILE_START(t); /*----------------------------------------*\ Initialize SHMEM and process IDs, NPROC \*----------------------------------------*/ (void) gpshmem_init(&argc,&argv); nproc = gpnumpes(); me = gpmype(); master = (me == 0); CLEANSTRING(tmps,TMPSTRLEN); (void)sprintf(tmps," ME = %2d, NPROC = %2d ",me,nproc); (void)printf_seq(tmps,strlen(tmps)); /*------------------------------------------------------*\ Set NN Test that nproc is a perfect square or 1 (fox requirement) \*------------------------------------------------------*/ nn = ((int)sqrt((double)nproc)); nproctest = nn; nproctest *= nproctest; (void) gpshmem_barrier_all(); if (nproc > 1) { if (nproc != nproctest) { if (master) { (void)printf(" nproc not a perfect square!\n"); (void)printf(" nproctest = %d \n nproc = %d\n\n",nproctest,nproc); } (void)gpshmem_error(" fatal error "); TAU_PROFILE_EXIT("fatal error"); (void)exit((int)911); } } /*-------------------------------------------------*\ check rank remainder with respect to sqrt(nproc) \*-------------------------------------------------*/ if ((RANK % nn) != 0) { if (master) { (void)printf(" RANK not divisible by sqrt(nproc)!\n"); (void)printf(" RANK = %d; sqrt(nproc) = %d; remainder = %d\n", RANK,nn,(RANK % nn)); } (void)gpshmem_error(" fatal error "); TAU_PROFILE_EXIT("fatal error"); (void)exit((int)911); } /*-------------------------------------*\ compute process row and column IDs \*-------------------------------------*/ (void)gpshmem_barrier_all(); myrow = me / nn; mycol = me % nn; CLEANSTRING(tmps,TMPSTRLEN); (void)sprintf(tmps," ME = %2d, NPROC = %2d, row=%3d, col=%3d", me,nproc,myrow,mycol); (void)printf_seq(tmps,strlen(tmps)); /*-------------------------------*\ compute local rank and ranges \*-------------------------------*/ (void)gpshmem_barrier_all(); local_rank = RANK/nn; my_low_r = myrow*local_rank; my_high_r = my_low_r + local_rank - 1 ; my_low_c = mycol*local_rank; my_high_c = my_low_c + local_rank - 1; if (master) { (void)printf("RANK = %d; local_rank = %d\n",RANK,local_rank); (void)fflush(stdout); } CLEANSTRING(tmps,TMPSTRLEN); (void)sprintf(tmps,"ME=%2d row[low=%4d high=%4d] col[low=%4d high=%4d]", me,my_low_r,my_high_r,my_low_c,my_high_c); (void)printf_seq(tmps,strlen(tmps)); (void)gpshmem_barrier_all(); if (master) { (void)printf(" testing proc mapping \n"); for (i=0;i %d\n",i,j,PROC_FROM_GRID(i,j,nn)); } (void)fflush(stdout); } (void)gpshmem_barrier_all(); A_patch = gpshmalloc(sizeof(double)*local_rank*local_rank); B_patch = gpshmalloc(sizeof(double)*local_rank*local_rank); C_patch = (double *)malloc(sizeof(double)*local_rank*local_rank); for(i=0;i<(local_rank*local_rank);i++) C_patch[i]=(double)0.0; Z_patch = (double *)malloc(sizeof(double)*local_rank*local_rank); if (master) { printf("Generate A: .. "); fflush(stdout); } mytime0 = gpshmem_time(); gen_A(A_patch,my_low_r,my_high_r,my_low_c,my_high_c,RANK,RANK); mytime = gpshmem_time() - mytime0; if (master){ (void)printf("Time to generate A: %.3f seconds\n",mytime); fflush(stdout); } if (local_rank < LOCAL_RANK_PRINT_LIMIT) output_seq(A_patch,0,(local_rank-1),0,(local_rank-1),local_rank,local_rank,2,(double)1.0e-7); if (master) { printf("Generate B: .. "); fflush(stdout); } mytime0 = gpshmem_time(); gen_B(B_patch,my_low_r,my_high_r,my_low_c,my_high_c,RANK,RANK); mytime = gpshmem_time() - mytime0; if (master) { (void)printf("Time to generate B: %.3f seconds\n",mytime); fflush(stdout); } if (local_rank < LOCAL_RANK_PRINT_LIMIT) output_seq(B_patch,0,(local_rank-1),0,(local_rank-1),local_rank,local_rank,2,(double)1.0e-7); if (master) { printf("Generate C: .. "); fflush(stdout); } mytime0 = gpshmem_time(); gen_C(Z_patch,my_low_r,my_high_r,my_low_c,my_high_c,RANK,RANK,RANK); mytime = gpshmem_time() - mytime0; if (master) { (void)printf("Time to generate C: %.3f seconds\n",mytime); fflush(stdout); } if (local_rank < LOCAL_RANK_PRINT_LIMIT) output_seq(Z_patch,0,(local_rank-1),0,(local_rank-1),local_rank,local_rank,2,(double)1.0e-7); if (master) { printf("Compute C via fox: .."); fflush(stdout); } mytime0 = gpshmem_time(); foxit(A_patch,B_patch,C_patch,RANK,local_rank,myrow,mycol,me,nproc,nn); mytime = gpshmem_time() - mytime0; if (master) { (void)printf("Time to compute C: %.3f seconds\n",mytime); fflush(stdout); } if (local_rank < LOCAL_RANK_PRINT_LIMIT) output_seq(C_patch,0,(local_rank-1),0,(local_rank-1),local_rank,local_rank,1,(double)1.0e-7); norm = diffnorm(C_patch,Z_patch,(local_rank*local_rank),me); CLEANSTRING(tmps,TMPSTRLEN); (void)sprintf(tmps,"norm = %.20e",norm); (void)printf_seq(tmps,strlen(tmps)); (void) gpshmem_double_sum_to_all(&normall,&norm,1,0,0,nproc, (double *)NULL,(double *)NULL); if (master) (void)printf("global norm = %.20e\n",normall); gpshfree(A_patch); gpshfree(B_patch); free(C_patch); free(Z_patch); gpshmem_barrier_all(); gpshmem_finalize(); TAU_PROFILE_STOP(t); return (int)0; } void foxit(double *A, double *B, double *C, int rank, int local_rank, int myrow, int mycol, int me, int nproc,int sqrtproc) { /*--------------------------------------------------------------------------------*\ Fox's Algorithm (or Broadcast Multiply and Roll): * Assumptions level 1 - Square matrices of order N - Nproc processes where Nproc = N**2 - patches or Elements aij, bij, cij are mapped to processor i*n +j . This is defined as process (i,j) - There are N stages of the computation: . Each stage computes one dot product term on EACH processor aik*bkj - Stages are ?limited? . At stage 0 on process (i,j) broadcast diagonal A patch cij = aii*bij . The next stage each process multiplies: The element immediately to the right of the diagonal of A (in it's process row) by The element of B directly beneath its own element of B (in it's process column) . At stage 1 on process (i,j) cij += ai,i+1*bi+1,j . At stage k on process (i,j) cij += ai,i+k*bi+k,j \*--------------------------------------------------------------------------------*/ int stage; int i,j,count; int I,J,K; int *rowids, *colids; double *Atmp, *Btmp; char *mystring; TAU_PROFILE_TIMER(t, "foxit()", "", TAU_DEFAULT); TAU_PROFILE_START(t); I = myrow; J = mycol; Atmp = (double *)malloc(sizeof(double)*local_rank*local_rank); Btmp = (double *)malloc(sizeof(double)*local_rank*local_rank); mystring = (char *)malloc(1024); for(stage=0;stage BI+1,J -> BI-1,J <- BI,J \*--------------------------------------------------------------------------------*/ if (myrow == K) { for(i=0;i<(local_rank*local_rank);i++) Btmp[i] = B[i]; /*--------------------------------------------------------------------------------*\ (void)sprintf(mystring,"stage:%d multiply with B(%d,%d) node:%d",stage, K,J,me); \*--------------------------------------------------------------------------------*/ } else { /*--------------------------------------------------------------------------------*\ (void)sprintf(mystring,"stage:%d multiply with B(%d,%d) node:%d",stage, K,J, PROC_FROM_GRID(K,J,sqrtproc)); \*--------------------------------------------------------------------------------*/ gpshmem_get(Btmp,B,(local_rank*local_rank),PROC_FROM_GRID(K,J,sqrtproc)); } /*--------------------------------------------------------------------------------*\ (void)printf_seq(mystring,strlen(mystring)); count = 0; for(i=0;i (rowdim_A-1)) ; /* is ilo valid */ tih = (ihi < 0 || ihi > (rowdim_A-1)) ; /* ihi */ tjl = (jlo < 0 || jlo > (coldim_A-1)) ; /* jlo */ tjh = (jhi < 0 || jhi > (coldim_A-1)) ; /* jhi */ if (til || tih || tjl || tjh ) { (void)printf("-------------------*********--------------------/`\n"); (void)printf(" gen_A: fatal argument error %d%d%d%d\n",til,tih,tjl,tjh); (void)printf(" I range %d to %d \n",ilo,ihi); (void)printf(" J range %d to %d \n",jlo,jhi); (void)printf(" rows=%d columns=%d \n",rowdim_A,coldim_A); (void)exit((int) 911); /* in case of emergency call */ } /*---------------------------------------------------*\ initialize constants from definitions in the generation include file. Initialize count which indexes the input/output buffer. \*---------------------------------------------------*/ a = A_VAL; b = B_VAL; c = C_VAL; count = 0; /*------------------------------------------------------------------*\ Determine end loops so that (0,0,0,0) will give the first element \*------------------------------------------------------------------*/ iend = ilo + (ihi-ilo) + 1; if (iend > rowdim_A) iend=rowdim_A; /* should not be executed */ jend = jlo + (jhi-jlo) + 1; if (jend > coldim_A) jend=coldim_A; /* should not be executed */ /*-----------------------------------------------------------*\ Compute desired element, patch, or full matrix of Matrix A \*-----------------------------------------------------------*/ for (i=ilo;i (rowdim_B-1)) ; /* is ilo valid */ tih = (ihi < 0 || ihi > (rowdim_B-1)) ; /* ihi */ tjl = (jlo < 0 || jlo > (coldim_B-1)) ; /* jlo */ tjh = (jhi < 0 || jhi > (coldim_B-1)) ; /* jhi */ if (til || tih || tjl || tjh ) { (void)printf("-------------------*********--------------------/`\n"); (void)printf(" gen_B: fatal argument error %d%d%d%d\n",til,tih,tjl,tjh); (void)printf(" I range %d to %d \n",ilo,ihi); (void)printf(" J range %d to %d \n",jlo,jhi); (void)printf(" rows=%d columns=%d \n",rowdim_B,coldim_B); (void)exit((int) 911); /* in case of emergency call */ } /*---------------------------------------------------*\ initialize constants from definitions in the generation include file. Initialize count which indexes the input/output buffer. \*---------------------------------------------------*/ d = D_VAL; e = E_VAL; f = F_VAL; count = 0; /*------------------------------------------------------------------*\ Determine end loops so that (0,0,0,0) will give the first element \*------------------------------------------------------------------*/ iend = ilo + (ihi-ilo) + 1; if (iend > rowdim_B) iend=rowdim_B; jend = jlo + (jhi-jlo) + 1; if (jend > coldim_B) jend=coldim_B; /*-----------------------------------------------------------*\ Compute desired element, patch, or full matrix of Matrix B \*-----------------------------------------------------------*/ for (i=ilo;i (rowdim_C-1)) ; /* is ilo valid */ tih = (ihi < 0 || ihi > (rowdim_C-1)) ; /* ihi */ tjl = (jlo < 0 || jlo > (coldim_C-1)) ; /* jlo */ tjh = (jhi < 0 || jhi > (coldim_C-1)) ; /* jhi */ if (til || tih || tjl || tjh ) { (void)printf("-------------------*********--------------------/`\n"); (void)printf(" gen_C: fatal argument error %d%d%d%d\n",til,tih,tjl,tjh); (void)printf(" I range %d to %d \n",ilo,ihi); (void)printf(" J range %d to %d \n",jlo,jhi); (void)printf(" rows=%d columns=%d \n",rowdim_C,coldim_C); (void)exit((int) 911); /* in case of emergency call */ } /*---------------------------------------------------*\ initialize constants from definitions in the generation include file. Initialize count which indexes the input/output buffer. \*---------------------------------------------------*/ a = A_VAL; b = B_VAL; c = C_VAL; d = D_VAL; e = E_VAL; f = F_VAL; count = 0; /*------------------------------------------------------------------*\ Determine end loops so that (0,0,0,0) will give the first element \*------------------------------------------------------------------*/ iend = ilo + (ihi-ilo) + 1; if (iend > rowdim_C) iend=rowdim_C; jend = jlo + (jhi-jlo) + 1; if (jend > coldim_C) jend=coldim_C; /*-----------------------------------------------------------*\ Compute desired element, patch, or full matrix of Matrix C \*-----------------------------------------------------------*/ for (i=ilo;i %s\n",me,string); for(i=1;i %s\n",i,string); (void)fflush(stdout); } (void)strcpy(string,s2print); /* replace string with original contents */ } gpshfree(s2print); gpshmem_barrier_all(); TAU_PROFILE_STOP(t); } void output_seq(double *A, int ilo, int ihi, int jlo, int jhi, int numRows, int numCols, int fmt, double threshold) { int *whotodoit, valuegot; int nproc, me; int i; TAU_PROFILE_TIMER(t, "output_seq()", "", TAU_DEFAULT); TAU_PROFILE_START(t); whotodoit = gpshmalloc(sizeof(int)); nproc = gpnumpes(); me = gpmype(); gpshmem_barrier_all();gpshmem_barrier_all();gpshmem_barrier_all(); if (me==0) { printf("Beginning output from node: %d \n",me); fflush(stdout); output(A,ilo,ihi,jlo,jhi,numRows,numCols,fmt,threshold); fflush(stdout); printf("End of output from node: %d \n",me); fflush(stdout); } gpshmem_barrier_all();gpshmem_barrier_all();gpshmem_barrier_all(); for(i=1;i 2) { fprintf(stderr,"void output: illegal format request either 1 or 2 \n"); return; } if ((ihi= numRows) ihi = numRows - 1; if (jhi >= numCols) jhi = numCols - 1; for (i=ilo;i<=ihi;i++) { for (j=jlo;j<=jhi;j++) { if(fabs(A[(i*numCols+j)])>threshold) { zeromatrix = 0; i += numRows + 1; j += numCols + 1; /* kick out of loop at first non zero element */ } } } if (zeromatrix) { printf("\n zero matrix\n"); fflush(stdout); return; } for (j=jlo;j<=jhi;j += pntcol) { jbmax = j + pntcol; if (jbmax > (jhi+1)) jbmax = jhi+1; for(jb=j;jb threshold) { rownonzero++; jb += jbmax + 1; } } if (rownonzero) { printf("%5d ",i); for(jb=j;jb 1) then if (nproc /= nproctest) then if (master) then write(6,*)' nproc not a perfect square! ' write(6,*)' nproctest = ',nproctest write(6,*)' nproc = ',nproc endif call gpshmem_error('perfect square fatal error ') endif endif ! ! Check rank remainder with respect to sqrt(nproc) ! if (mod(rank,nn) /= 0) then if (master) then write(6,*)' rank not divisible by sqrt(nproc)!' write(6,*)' rank = ',rank,' sqrt(nproc) = ',nn, & ' remainder is:',mod(rank,nn) endif call gpshmem_error('remainder fatal error ') endif ! ! compute process row and column IDs ! call gpshmem_barrier_all() myrow = me / nn mycol = mod(me,nn) write(6,'(1x,a,i4,a,i4,a,i4,a,i4)')' me = ',me, & ' nproc = ',nproc,' row = ',myrow,' col = ',mycol ! ! compute local ranks and ranges ! call gpshmem_barrier_all() local_rank = rank/nn my_low_r = myrow*local_rank + 1 my_high_r = my_low_r + local_rank - 1 my_low_c = mycol*local_rank + 1 my_high_c = my_low_c + local_rank - 1 size = local_rank*local_rank write(6, & '(2x,a,i4,1x,a,i4,1x,a,i4,3x,a,i4,a,i4,a,1x,a,i4,1x,a,i4,a,/)') & 'me:',me,'rank:',rank,'local rank:',local_rank, & 'rows(',my_low_r,',',my_high_r,')', & 'cols(',my_low_c,',',my_high_c,')' call flush(6) handle_A = gpshmalloci(4,size,index_A) call fillit(GPS_DPREAL(index_A),size,0.0d00) call gen_a(GPS_DPREAL(index_A),my_low_r,my_high_r, & my_low_c,my_high_c,rank,rank) handle_B = gpshmalloci(4,size,index_B) call fillit(GPS_DPREAL(index_B),size,0.0d00) call gen_b(GPS_DPREAL(index_B),my_low_r,my_high_r, & my_low_c,my_high_c,rank,rank) ! if ((corefirst+size).gt.sizeofcore) then call TAU_PROFILE_EXIT('exit') stop ' mycore allocation error C' endif pcore_C = corefirst corefirst = corefirst + size if (master) write(6,*)' core used on node 0: ',(corefirst - 1) call fillit(mycore(pcore_C),size,0.0d00) if ((corefirst+size).gt.sizeofcore) then call TAU_PROFILE_EXIT('exit') stop ' mycore allocation error Z' endif pcore_Z = corefirst corefirst = corefirst + size if (master) write(6,*)' core used on node 0: ',(corefirst - 1) call fillit(mycore(pcore_Z),size,0.0d00) call gen_c(mycore(pcore_z),my_low_r,my_high_r, & my_low_c,my_high_c,rank,rank,rank) ! if ((corefirst+size).gt.sizeofcore) then call TAU_PROFILE_EXIT('exit') stop ' mycore allocation error Atmp' endif pcore_Atmp = corefirst corefirst = corefirst + size if (master) write(6,*)' core used on node 0: ',(corefirst - 1) call fillit(mycore(pcore_Atmp),size,0.0d00) if ((corefirst+size).gt.sizeofcore) then call TAU_PROFILE_EXIT('exit') stop ' mycore allocation error Btmp' endif pcore_Btmp = corefirst corefirst = corefirst + size if (master) write(6,*)' core used on node 0: ',(corefirst - 1) call fillit(mycore(pcore_Btmp),size,0.0d00) call foxit(GPS_DPREAL(index_A),GPS_DPREAL(index_B), & mycore(pcore_C), & rank,local_rank,myrow,mycol,me,nproc,nn, & mycore(pcore_Atmp),mycore(pcore_Btmp)) ! call gpshmem_barrier_all() call computenorm(norm,mycore(pcore_C),mycore(pcore_Z),size) call gpshmem_barrier_all() write(6,*)' norm on node:',me,' is ',norm call flush(6) call gpshmem_barrier_all() i = 0 j = 0 call gpshmem_double_sum_to_all(normall,norm,1,0,0,nproc,i,j) call gpshmem_barrier_all() if (master) & write(6,*)' global norm: ',normall call flush(6) ! call gpshfree_handle(handle_A) call gpshfree_handle(handle_B) call gpshmem_finalize() ! call TAU_PROFILE_STOP(profiler) end subroutine foxit(a,b,c,rank,local_rank,myrow,mycol,me,nproc,nn, & Atmp,Btmp) integer rank, local_rank, me, nproc, nn integer myrow, mycol double precision a(local_rank,local_rank) double precision b(local_rank,local_rank) double precision c(local_rank,local_rank) double precision Atmp(local_rank,local_rank) double precision Btmp(local_rank,local_rank) ! integer i,j,ii,jj,kk,n2ga,n2gb integer mysize integer stage ! integer procfromgrid, inc_wrap external procfromgrid, inc_wrap ! integer profiler(2) / 0, 0 / save profiler call TAU_PROFILE_TIMER(profiler,'FOXIT') call TAU_PROFILE_START(profiler) mysize = local_rank*local_rank ! do i=1,local_rank do j=1,local_rank Atmp(i,j) = 0.0d00 Btmp(i,j) = 0.0d00 enddo enddo ii = myrow jj = mycol do stage=0,(nn-1),1 call gpshmem_barrier_all() kk = inc_wrap(ii,stage,nn) if (mycol == kk) then do i=1,local_rank do j=1,local_rank Atmp(i,j) = A(i,j) enddo enddo else n2ga = procfromgrid(ii,kk,nn) call gpshmem_get(Atmp,A,mysize,n2ga) endif if (myrow == kk) then do i=1,local_rank do j=1,local_rank Btmp(i,j) = B(i,j) enddo enddo else n2gb = procfromgrid(kk,jj,nn) call gpshmem_get(Btmp,B,mysize,n2gb) endif ! call gpshmem_barrier_all() do i=1,local_rank do j=1,local_rank do k=1,local_rank C(i,j) = C(i,j) + Atmp(i,k)*Btmp(k,j) enddo enddo enddo enddo ! call TAU_PROFILE_STOP(profiler) end integer function inc_wrap(i,j,n) integer i,j,n integer profiler(2) / 0, 0 / save profiler call TAU_PROFILE_TIMER(profiler,'INC_WRAP') call TAU_PROFILE_START(profiler) inc_wrap = mod((i+j+n),n) call TAU_PROFILE_STOP(profiler) end integer function procfromgrid(i,j,n) integer i,j,n integer profiler(2) / 0, 0 / save profiler call TAU_PROFILE_TIMER(profiler,'PROCFROMGRID') call TAU_PROFILE_START(profiler) procfromgrid = i * n +j call TAU_PROFILE_STOP(profiler) end subroutine fillit(Z,len,value) implicit none integer len double precision z(len) double precision value integer i integer profiler(2) / 0, 0 / save profiler call TAU_PROFILE_TIMER(profiler,'FILLIT') call TAU_PROFILE_START(profiler) do i = 1,len Z(i) = value enddo call TAU_PROFILE_STOP(profiler) end subroutine gen_a(a,ilo,ihi,jlo,jhi,rowdim,coldim) implicit none double precision aval, bval, cval parameter (aval = 5.0d00/8.0d00) parameter (bval = 1.0d00/7.0d00) parameter (cval = 5.0d00) integer ilo, ihi, jlo, jhi integer rowdim, coldim double precision a(ilo:ihi,jlo:jhi) ! integer i,j, ii, jj logical oil, oih, ojl, ojh, ohilo, oall integer gpmype external gpmype ! integer profiler(2) / 0, 0 / save profiler call TAU_PROFILE_TIMER(profiler,'GEN_A') call TAU_PROFILE_START(profiler) ohilo = ((ilo > ihi).or.(jlo > jhi)) oil = ((ilo < 0) .or. (ilo > rowdim)) oih = ((ihi < 0) .or. (ihi > rowdim)) ojl = ((jlo < 0) .or. (jlo > coldim)) ojh = ((jhi < 0) .or. (jhi > coldim)) oall = ohilo.or.oil.or.oih.or.ojl.or.ojh if (oall) then write(6,*)' something wrong with gen_a arguments ',gpmype() write(6,*)' ilo = ',ilo, ' ihi = ',ihi write(6,*)' jlo = ',jlo, ' jhi = ',jhi write(6,*)' rowdim = ',rowdim,' coldim = ',coldim write(6,*)oall,ohilo,oil,oih,ojl,ojh call TAU_PROFILE_EXIT('exit') stop ' fatal error gen_a' endif do i = ilo,ihi ii = i - 1 do j = jlo,jhi jj = j - 1 A(i,j) = AVAL*dble(ii) + BVAL*dble(jj) + CVAL enddo enddo call TAU_PROFILE_STOP(profiler) end subroutine gen_b(b,ilo,ihi,jlo,jhi,rowdim,coldim) implicit none double precision dval, eval, fval parameter (dval = -2.0d00/13.0d00) parameter (eval = 6.0d00/5.0d00) parameter (fval = 2.0d00) integer ilo, ihi, jlo, jhi integer rowdim, coldim double precision b(ilo:ihi,jlo:jhi) ! integer i,j,ii,jj logical oil, oih, ojl, ojh, ohilo, oall integer gpmype external gpmype ! integer profiler(2) / 0, 0 / save profiler call TAU_PROFILE_TIMER(profiler,'GEN_B') call TAU_PROFILE_START(profiler) ohilo = ((ilo > ihi).or.(jlo > jhi)) oil = ((ilo < 0) .or. (ilo > rowdim)) oih = ((ihi < 0) .or. (ihi > rowdim)) ojl = ((jlo < 0) .or. (jlo > coldim)) ojh = ((jhi < 0) .or. (jhi > coldim)) oall = ohilo.or.oil.or.oih.or.ojl.or.ojh if (oall) then write(6,*)' something wrong with gen_b arguments ',gpmype() write(6,*)' ilo = ',ilo, ' ihi = ',ihi write(6,*)' jlo = ',jlo, ' jhi = ',jhi write(6,*)' rowdim = ',rowdim,' coldim = ',coldim write(6,*)oall,ohilo,oil,oih,ojl,ojh call TAU_PROFILE_EXIT('exit') stop ' fatal error gen_b' endif do i = ilo,ihi ii = i - 1 do j = jlo,jhi jj = j - 1 B(i,j) = DVAL*dble(ii) + EVAL*dble(jj) + FVAL enddo enddo call TAU_PROFILE_STOP(profiler) end subroutine gen_c(c,ilo,ihi,jlo,jhi,rowdim,coldim,crossdim) implicit none double precision aval, bval, cval, dval, eval, fval parameter (aval = 5.0d00/8.0d00) parameter (bval = 1.0d00/7.0d00) parameter (cval = 5.0d00) parameter (dval = -2.0d00/13.0d00) parameter (eval = 6.0d00/5.0d00) parameter (fval = 2.0d00) integer ilo, ihi, jlo, jhi integer rowdim, coldim, crossdim double precision c(ilo:ihi,jlo:jhi) ! double precision sum integer i,j,k, ii, jj, kk integer gpmype logical oil, oih, ojl, ojh, ohilo, oall external gpmype ! integer profiler(2) / 0, 0 / save profiler call TAU_PROFILE_TIMER(profiler,'GEN_C') call TAU_PROFILE_START(profiler) ohilo = ((ilo > ihi).or.(jlo > jhi)) oil = ((ilo < 0) .or. (ilo > rowdim)) oih = ((ihi < 0) .or. (ihi > rowdim)) ojl = ((jlo < 0) .or. (jlo > coldim)) ojh = ((jhi < 0) .or. (jhi > coldim)) oall = ohilo.or.oil.or.oih.or.ojl.or.ojh if (oall) then write(6,*)' something wrong with gen_c arguments ',gpmype() write(6,*)' ilo = ',ilo, ' ihi = ',ihi write(6,*)' jlo = ',jlo, ' jhi = ',jhi write(6,*)' rowdim = ',rowdim,' coldim = ',coldim write(6,*)oall,ohilo,oil,oih,ojl,ojh call TAU_PROFILE_EXIT('exit') stop ' fatal error gen_c' endif do i = ilo,ihi ii = i - 1 do j = jlo,jhi jj = j - 1 sum = 0.0d00 do k = 1,crossdim kk = k - 1 sum = sum + (aval*dble(ii)+bval*dble(kk)+cval)* & (dval*dble(kk)+eval*dble(jj)+fval) enddo C(i,j) = sum enddo enddo call TAU_PROFILE_STOP(profiler) end subroutine computenorm(norm,A,B,len) implicit none integer len, i double precision norm, diff double precision A(len), B(len) integer profiler(2) / 0, 0 / save profiler call TAU_PROFILE_TIMER(profiler,'COMPUTENORM') call TAU_PROFILE_START(profiler) norm = 0.0d00 do i = 1,len diff = A(i) - B(i) norm = norm + diff*diff enddo call TAU_PROFILE_STOP(profiler) end subroutine output (z,rowlow,rowhi,collow,colhi,rowdim,coldim,nctl) !c....................................................................... !c output prints a real*8 matrix in formatted form with numbered rows !c and columns. the input is as follows; !c matrix(*,*).........matrix to be output !c rowlow..............row number at which output is to begin !c rowhi...............row number at which output is to end !c collow..............column number at which output is to begin !c colhi...............column number at which output is to end !c rowdim..............row dimension of matrix(*,*) !c coldim..............column dimension of matrix(*,*) !c nctl................carriage control flag; 1 for single space !c 2 for double space !c 3 for triple space !c the parameters that follow matrix are all of type integer*4. the !c program is set up to handle 5 columns/page with a 1p5d24.15 format for !c the columns. if a different number of columns is required, change !c formats 1000 and 2000, and initialize kcol with the new number of !c columns. !c author; nelson h.f. beebe, quantum theory project, university of !c florida, gainesville !c....................................................................... !C implicit none integer rowlow,rowhi,collow,colhi,rowdim,coldim,begin,kcol integer nctl, i, j, last, k double precision z(rowdim,coldim), zero character*8 asa(3), ctl, blank data asa/' ','00000000' , '--------' /,blank/' '/ data kcol/8/ data zero/0.d00/ integer profiler(2) / 0, 0 / save profiler call TAU_PROFILE_TIMER(profiler,'OUTPUT') call TAU_PROFILE_START(profiler) do 11 i=rowlow,rowhi do 10 j=collow,colhi if (z(i,j).ne.zero) go to 15 10 continue 11 continue write (6,3000) 3000 format (/' zero matrix'/) go to 3 15 continue ctl = blank if ((nctl.le.3).and.(nctl.gt.0)) ctl = asa(nctl) if (rowhi.lt.rowlow) go to 3 if (colhi.lt.collow) go to 3 last = min(colhi,collow+kcol-1) do 2 begin = collow,colhi,kcol write (6,1000) (i,i = begin,last) do 1 k = rowlow,rowhi do 4 i=begin,last if (z(k,i).ne.zero) go to 5 4 continue go to 1 5 write (6,2000) ctl,k,(z(k,i), i = begin,last) 1 continue last = min(last+kcol,colhi) 2 continue 3 call TAU_PROFILE_STOP(profiler) return 1000 format (8x,7(' ',i3,3x),(' ',i3)) 2000 format (a1,i4,1x,8f9.4) call TAU_PROFILE_STOP(profiler) end tau-2.16.4/examples/gpshmem/pdt_fortran/000077500000000000000000000000001062343042700201765ustar00rootroot00000000000000tau-2.16.4/examples/gpshmem/pdt_fortran/Makefile000066400000000000000000000024751062343042700216460ustar00rootroot00000000000000TAUROOTDIR=../../../ include $(TAUROOTDIR)/include/Makefile TAULINK =$(TAU_CXXLIBS) $(TAU_LIBS) GPSHMEM_INCLUDE = $(TAU_SHMEM_INCLUDE) # Pass these options using -shmemlibrary='-lgpshem -L.... -larmci ... -lmpich' # to TAU's configure script. #GPSHMEM_LIBS = $(TAU_SHMEM_LIBS) -L/usr/local/packages/armci-1.1/lib/LINUX -L/usr/lib/gcc-lib/i386-pc-linux/3.2.3/ -lstdc++ -lgcc_s -larmci -L/opt/mpich-mpd/gnu/lib -lmpich GPSHMEM_LIBS = $(TAU_SHMEM_LIBS) MPI_LIBS = CC = $(TAU_CC) F77 = $(TAU_COMPILER) -optVerbose -optMpi $(TAU_F90) CFLAGS =-g $(TAU_INCLUDE) $(TAU_DEFS) $(GPSHMEM_INCLUDE) LIBS = $(GPSHMEM_LIBS) $(MPI_LIBS) -lm ALL = foxf77 mainf arraycopyf all: $(ALL) arraycopy: arraycopy.o $(WRAPPER) $(CC) -o $(@) $(@).o $(WRAPPER) $(LIBS) arraycopyf: arraycopyf.o $(WRAPPER) $(F77) -o $(@) $(@).o $(WRAPPER) $(LIBS) main: main.o $(WRAPPER) $(CC) -o $(@) $(@).o $(WRAPPER) $(LIBS) mainf: mainf.o $(WRAPPER) $(F77) -o $(@) $(@).o $(WRAPPER) $(LIBS) fox: fox.o $(WRAPPER) $(CC) -o $(@) $(@).o $(WRAPPER) $(LIBS) foxf77: foxf77.o $(WRAPPER) $(F77) -o $(@) $(@).o $(WRAPPER) $(LIBS) ###################### # implicit rules for making everything %.o: %.c $(CC) $(CFLAGS) -c -o $(@) $< %.o: %.f $(F77) $(CFLAGS) -c -o $(@) $< ###################### clean: rm -f profile.* *.o *.d *.trc *.edf rm -f $(ALL) tau-2.16.4/examples/gpshmem/pdt_fortran/arraycopyf.f000066400000000000000000000042751062343042700225340ustar00rootroot00000000000000! version of arraycopy.c in fortran program arraycopy implicit none include 'gps_arrays.Fh' ! External defs integer gpmype, gpnumpes external gpshmem_init, gpmype, gpnumpes external gpshmem_barrier_all external gpshmem_fence, gpshmem_get, gpshmem_put integer gpshmalloci external gpshmalloci, gpshfree_handle ! Variables integer N, sizeofint, i, nxt, prv integer handlesrc, handletgt, indexsrc, indextgt parameter (N=100000, sizeofint=4) integer me, npes ! init gpshmem call gpshmem_init() me = gpmype() npes = gpnumpes() nxt = mod(me + 1, npes) prv = mod(me - 1 + npes, npes) ! allocate memory handlesrc = gpshmalloci(0, N*sizeofint, indexsrc) handletgt = gpshmalloci(0, N*sizeofint, indextgt) call gpshmem_barrier_all() ! test get do i=0,N - 1 gps_int(indexsrc + i) = me enddo call gpshmem_barrier_all() if (me == 0) print *, "Testing get..." call gpshmem_barrier_all() call gpshmem_get(gps_int(indextgt), gps_int(indexsrc), N, nxt); call checkarray(gps_int(indextgt), N, nxt, me) ! test put call gpshmem_barrier_all() do i=0, N - 1 gps_int(indexsrc + i) = me enddo call gpshmem_barrier_all() if (me == 0) print *, "Testing put..." call gpshmem_put(gps_int(indextgt), gps_int(indexsrc), N, nxt); call gpshmem_barrier_all() call gpshmem_fence() call checkarray(gps_int(indextgt), N, prv, me) ! free up the memory call gpshmem_barrier_all() call gpshfree_handle(handletgt) call gpshfree_handle(handlesrc) ! we're done call gpshmem_finalize() end program arraycopy ! Checks the array for expected values subroutine checkarray(A, N, val, me) integer A(N), bad, val, me bad = 0 do i=1,N if (.not. (A(i) == val)) then bad = 1 print *, me, "Index ", i, " failed (got ", A(i), + ", should be ", val, ")" endif enddo if (bad .eq. 1) then print *, me, " Failed!" else print *, me, " Passed!" endif end subroutine checkarray tau-2.16.4/examples/gpshmem/pdt_fortran/foxf77.f000066400000000000000000000336311062343042700214730ustar00rootroot00000000000000! ! $Id: foxf77.f,v 1.1 2005/06/29 19:15:31 sameer Exp $ ! ! program in f77 for fox's code using internal shmem calls ! should work with g77 ! program foxf77 implicit none integer rank parameter (rank=840) integer coresize,corefirst parameter (coresize = 1 000 000) integer sizeofcore,pcore_C,pcore_Z, & pcore_Atmp,pcore_Btmp common /acoreinfo/sizeofcore,corefirst,pcore_C,pcore_Z, & pcore_Atmp,pcore_Btmp double precision mycore common /acore/mycore(coresize) integer size, error, abort integer i, j, k, nproc, me integer nn, nproctest integer local_rank, myrow, mycol integer my_low_r, my_high_r, my_low_c, my_high_c integer gpmype integer gpnumpes integer handle_A, index_A integer handle_B, index_B external gpmype external gpnumpes logical master double precision norm, normall include 'gps_arrays.Fh' integer gpshmalloci external gpshmalloci ! sizeofcore = coresize corefirst = 1 pcore_C = 0 pcore_Z = 0 pcore_Atmp = 0 pcore_Btmp = 0 ! ! Initialize SHMEM and process IDs, NPROC ! call gpshmem_init() me = gpmype() nproc = gpnumpes() master = me.eq.0 ! ! Check for perfect square ! nn = int(sqrt(dble(nproc))) nproctest = nn**2 call gpshmem_barrier_all() if (nproc > 1) then if (nproc /= nproctest) then if (master) then write(6,*)' nproc not a perfect square! ' write(6,*)' nproctest = ',nproctest write(6,*)' nproc = ',nproc endif call gpshmem_error('perfect square fatal error ') endif endif ! ! Check rank remainder with respect to sqrt(nproc) ! if (mod(rank,nn) /= 0) then if (master) then write(6,*)' rank not divisible by sqrt(nproc)!' write(6,*)' rank = ',rank,' sqrt(nproc) = ',nn, & ' remainder is:',mod(rank,nn) endif call gpshmem_error('remainder fatal error ') endif ! ! compute process row and column IDs ! call gpshmem_barrier_all() myrow = me / nn mycol = mod(me,nn) write(6,'(1x,a,i4,a,i4,a,i4,a,i4)')' me = ',me, & ' nproc = ',nproc,' row = ',myrow,' col = ',mycol ! ! compute local ranks and ranges ! call gpshmem_barrier_all() local_rank = rank/nn my_low_r = myrow*local_rank + 1 my_high_r = my_low_r + local_rank - 1 my_low_c = mycol*local_rank + 1 my_high_c = my_low_c + local_rank - 1 size = local_rank*local_rank write(6, & '(2x,a,i4,1x,a,i4,1x,a,i4,3x,a,i4,a,i4,a,1x,a,i4,1x,a,i4,a,/)') & 'me:',me,'rank:',rank,'local rank:',local_rank, & 'rows(',my_low_r,',',my_high_r,')', & 'cols(',my_low_c,',',my_high_c,')' call flush(6) handle_A = gpshmalloci(4,size,index_A) call fillit(GPS_DPREAL(index_A),size,0.0d00) call gen_a(GPS_DPREAL(index_A),my_low_r,my_high_r, & my_low_c,my_high_c,rank,rank) handle_B = gpshmalloci(4,size,index_B) call fillit(GPS_DPREAL(index_B),size,0.0d00) call gen_b(GPS_DPREAL(index_B),my_low_r,my_high_r, & my_low_c,my_high_c,rank,rank) ! if ((corefirst+size).gt.sizeofcore) then stop ' mycore allocation error C' endif pcore_C = corefirst corefirst = corefirst + size if (master) write(6,*)' core used on node 0: ',(corefirst - 1) call fillit(mycore(pcore_C),size,0.0d00) if ((corefirst+size).gt.sizeofcore) then stop ' mycore allocation error Z' endif pcore_Z = corefirst corefirst = corefirst + size if (master) write(6,*)' core used on node 0: ',(corefirst - 1) call fillit(mycore(pcore_Z),size,0.0d00) call gen_c(mycore(pcore_z),my_low_r,my_high_r, & my_low_c,my_high_c,rank,rank,rank) ! if ((corefirst+size).gt.sizeofcore) then stop ' mycore allocation error Atmp' endif pcore_Atmp = corefirst corefirst = corefirst + size if (master) write(6,*)' core used on node 0: ',(corefirst - 1) call fillit(mycore(pcore_Atmp),size,0.0d00) if ((corefirst+size).gt.sizeofcore) then stop ' mycore allocation error Btmp' endif pcore_Btmp = corefirst corefirst = corefirst + size if (master) write(6,*)' core used on node 0: ',(corefirst - 1) call fillit(mycore(pcore_Btmp),size,0.0d00) call foxit(GPS_DPREAL(index_A),GPS_DPREAL(index_B), & mycore(pcore_C), & rank,local_rank,myrow,mycol,me,nproc,nn, & mycore(pcore_Atmp),mycore(pcore_Btmp)) ! call gpshmem_barrier_all() call computenorm(norm,mycore(pcore_C),mycore(pcore_Z),size) call gpshmem_barrier_all() write(6,*)' norm on node:',me,' is ',norm call flush(6) call gpshmem_barrier_all() i = 0 j = 0 call gpshmem_double_sum_to_all(normall,norm,1,0,0,nproc,i,j) call gpshmem_barrier_all() if (master) & write(6,*)' global norm: ',normall call flush(6) ! call gpshfree_handle(handle_A) call gpshfree_handle(handle_B) call gpshmem_finalize() ! end subroutine foxit(a,b,c,rank,local_rank,myrow,mycol,me,nproc,nn, & Atmp,Btmp) integer rank, local_rank, me, nproc, nn integer myrow, mycol double precision a(local_rank,local_rank) double precision b(local_rank,local_rank) double precision c(local_rank,local_rank) double precision Atmp(local_rank,local_rank) double precision Btmp(local_rank,local_rank) ! integer i,j,ii,jj,kk,n2ga,n2gb integer mysize integer stage ! integer procfromgrid, inc_wrap external procfromgrid, inc_wrap ! mysize = local_rank*local_rank ! do i=1,local_rank do j=1,local_rank Atmp(i,j) = 0.0d00 Btmp(i,j) = 0.0d00 enddo enddo ii = myrow jj = mycol do stage=0,(nn-1),1 call gpshmem_barrier_all() kk = inc_wrap(ii,stage,nn) if (mycol == kk) then do i=1,local_rank do j=1,local_rank Atmp(i,j) = A(i,j) enddo enddo else n2ga = procfromgrid(ii,kk,nn) call gpshmem_get(Atmp,A,mysize,n2ga) endif if (myrow == kk) then do i=1,local_rank do j=1,local_rank Btmp(i,j) = B(i,j) enddo enddo else n2gb = procfromgrid(kk,jj,nn) call gpshmem_get(Btmp,B,mysize,n2gb) endif ! call gpshmem_barrier_all() do i=1,local_rank do j=1,local_rank do k=1,local_rank C(i,j) = C(i,j) + Atmp(i,k)*Btmp(k,j) enddo enddo enddo enddo ! end integer function inc_wrap(i,j,n) integer i,j,n inc_wrap = mod((i+j+n),n) end integer function procfromgrid(i,j,n) integer i,j,n procfromgrid = i * n +j end subroutine fillit(Z,len,value) implicit none integer len double precision z(len) double precision value integer i do i = 1,len Z(i) = value enddo end subroutine gen_a(a,ilo,ihi,jlo,jhi,rowdim,coldim) implicit none double precision aval, bval, cval parameter (aval = 5.0d00/8.0d00) parameter (bval = 1.0d00/7.0d00) parameter (cval = 5.0d00) integer ilo, ihi, jlo, jhi integer rowdim, coldim double precision a(ilo:ihi,jlo:jhi) ! integer i,j, ii, jj logical oil, oih, ojl, ojh, ohilo, oall integer gpmype external gpmype ! ohilo = ((ilo > ihi).or.(jlo > jhi)) oil = ((ilo < 0) .or. (ilo > rowdim)) oih = ((ihi < 0) .or. (ihi > rowdim)) ojl = ((jlo < 0) .or. (jlo > coldim)) ojh = ((jhi < 0) .or. (jhi > coldim)) oall = ohilo.or.oil.or.oih.or.ojl.or.ojh if (oall) then write(6,*)' something wrong with gen_a arguments ',gpmype() write(6,*)' ilo = ',ilo, ' ihi = ',ihi write(6,*)' jlo = ',jlo, ' jhi = ',jhi write(6,*)' rowdim = ',rowdim,' coldim = ',coldim write(6,*)oall,ohilo,oil,oih,ojl,ojh stop ' fatal error gen_a' endif do i = ilo,ihi ii = i - 1 do j = jlo,jhi jj = j - 1 A(i,j) = AVAL*dble(ii) + BVAL*dble(jj) + CVAL enddo enddo end subroutine gen_b(b,ilo,ihi,jlo,jhi,rowdim,coldim) implicit none double precision dval, eval, fval parameter (dval = -2.0d00/13.0d00) parameter (eval = 6.0d00/5.0d00) parameter (fval = 2.0d00) integer ilo, ihi, jlo, jhi integer rowdim, coldim double precision b(ilo:ihi,jlo:jhi) ! integer i,j,ii,jj logical oil, oih, ojl, ojh, ohilo, oall integer gpmype external gpmype ! ohilo = ((ilo > ihi).or.(jlo > jhi)) oil = ((ilo < 0) .or. (ilo > rowdim)) oih = ((ihi < 0) .or. (ihi > rowdim)) ojl = ((jlo < 0) .or. (jlo > coldim)) ojh = ((jhi < 0) .or. (jhi > coldim)) oall = ohilo.or.oil.or.oih.or.ojl.or.ojh if (oall) then write(6,*)' something wrong with gen_b arguments ',gpmype() write(6,*)' ilo = ',ilo, ' ihi = ',ihi write(6,*)' jlo = ',jlo, ' jhi = ',jhi write(6,*)' rowdim = ',rowdim,' coldim = ',coldim write(6,*)oall,ohilo,oil,oih,ojl,ojh stop ' fatal error gen_b' endif do i = ilo,ihi ii = i - 1 do j = jlo,jhi jj = j - 1 B(i,j) = DVAL*dble(ii) + EVAL*dble(jj) + FVAL enddo enddo end subroutine gen_c(c,ilo,ihi,jlo,jhi,rowdim,coldim,crossdim) implicit none double precision aval, bval, cval, dval, eval, fval parameter (aval = 5.0d00/8.0d00) parameter (bval = 1.0d00/7.0d00) parameter (cval = 5.0d00) parameter (dval = -2.0d00/13.0d00) parameter (eval = 6.0d00/5.0d00) parameter (fval = 2.0d00) integer ilo, ihi, jlo, jhi integer rowdim, coldim, crossdim double precision c(ilo:ihi,jlo:jhi) ! double precision sum integer i,j,k, ii, jj, kk integer gpmype logical oil, oih, ojl, ojh, ohilo, oall external gpmype ! ohilo = ((ilo > ihi).or.(jlo > jhi)) oil = ((ilo < 0) .or. (ilo > rowdim)) oih = ((ihi < 0) .or. (ihi > rowdim)) ojl = ((jlo < 0) .or. (jlo > coldim)) ojh = ((jhi < 0) .or. (jhi > coldim)) oall = ohilo.or.oil.or.oih.or.ojl.or.ojh if (oall) then write(6,*)' something wrong with gen_c arguments ',gpmype() write(6,*)' ilo = ',ilo, ' ihi = ',ihi write(6,*)' jlo = ',jlo, ' jhi = ',jhi write(6,*)' rowdim = ',rowdim,' coldim = ',coldim write(6,*)oall,ohilo,oil,oih,ojl,ojh stop ' fatal error gen_c' endif do i = ilo,ihi ii = i - 1 do j = jlo,jhi jj = j - 1 sum = 0.0d00 do k = 1,crossdim kk = k - 1 sum = sum + (aval*dble(ii)+bval*dble(kk)+cval)* & (dval*dble(kk)+eval*dble(jj)+fval) enddo C(i,j) = sum enddo enddo end subroutine computenorm(norm,A,B,len) implicit none integer len, i double precision norm, diff double precision A(len), B(len) norm = 0.0d00 do i = 1,len diff = A(i) - B(i) norm = norm + diff*diff enddo end subroutine output (z,rowlow,rowhi,collow,colhi,rowdim,coldim,nctl) !c....................................................................... !c output prints a real*8 matrix in formatted form with numbered rows !c and columns. the input is as follows; !c matrix(*,*).........matrix to be output !c rowlow..............row number at which output is to begin !c rowhi...............row number at which output is to end !c collow..............column number at which output is to begin !c colhi...............column number at which output is to end !c rowdim..............row dimension of matrix(*,*) !c coldim..............column dimension of matrix(*,*) !c nctl................carriage control flag; 1 for single space !c 2 for double space !c 3 for triple space !c the parameters that follow matrix are all of type integer*4. the !c program is set up to handle 5 columns/page with a 1p5d24.15 format for !c the columns. if a different number of columns is required, change !c formats 1000 and 2000, and initialize kcol with the new number of !c columns. !c author; nelson h.f. beebe, quantum theory project, university of !c florida, gainesville !c....................................................................... !C implicit none integer rowlow,rowhi,collow,colhi,rowdim,coldim,begin,kcol integer nctl, i, j, last, k double precision z(rowdim,coldim), zero character*8 asa(3), ctl, blank data asa/' ','00000000' , '--------' /,blank/' '/ data kcol/8/ data zero/0.d00/ do 11 i=rowlow,rowhi do 10 j=collow,colhi if (z(i,j).ne.zero) go to 15 10 continue 11 continue write (6,3000) 3000 format (/' zero matrix'/) go to 3 15 continue ctl = blank if ((nctl.le.3).and.(nctl.gt.0)) ctl = asa(nctl) if (rowhi.lt.rowlow) go to 3 if (colhi.lt.collow) go to 3 last = min(colhi,collow+kcol-1) do 2 begin = collow,colhi,kcol write (6,1000) (i,i = begin,last) do 1 k = rowlow,rowhi do 4 i=begin,last if (z(k,i).ne.zero) go to 5 4 continue go to 1 5 write (6,2000) ctl,k,(z(k,i), i = begin,last) 1 continue last = min(last+kcol,colhi) 2 continue 3 return 1000 format (8x,7(' ',i3,3x),(' ',i3)) 2000 format (a1,i4,1x,8f9.4) end tau-2.16.4/examples/gpshmem/pdt_fortran/mainf.f000066400000000000000000000007071062343042700214430ustar00rootroot00000000000000! Simple test of GPSHMEM Fortran program program mainf ! External defs integer gpmype, gpnumpes external gpshmem_init, gpshmem_finalize, gpshmem_barrier ! Vars integer me, numpes, i call gpshmem_init() me = gpmype() numpes = gpnumpes() print *, "Hello, world from ", me, " of ", numpes do i=1, 10 call gpshmem_barrier_all() enddo call gpshmem_finalize() end program tau-2.16.4/examples/headroom/000077500000000000000000000000001062343042700160125ustar00rootroot00000000000000tau-2.16.4/examples/headroom/README000066400000000000000000000130251062343042700166730ustar00rootroot00000000000000TAU's memory headroom API and -PROFILEHEADROOM measurement option ----------------------------------------------------------------- TAU's memory evaluation options fall into two categories: 1) Memory utilization options that examine how much heap memory is currently used, and 2) Memory headroom evaluation options that examine how much a program can grow (or how much headroom it has) before it runs out of free memory on the heap. TAU tries to call malloc with chunks that progressively increase in size, until all memory is exhausted. Then it frees those chunks, keeping track of how much memory it successfully allocated. In this document, we examine the second set of options. 2a) TAU_TRACK_MEMORY_HEADROOM() This call sets up a signal handler that is invoked every 10 seconds by an interrupt. Inside, it evaluates how much memory it can allocate and associates it with the callstack. The user can vary the size of the callstack by setting the environment variable TAU_CALLSTACK_DEPTH (default is 2). The examples/headroom/track subdirectory has an example that illustrates the use of this call. To disable tracking this headroom at runtime, the user may call: TAU_DISABLE_TRACKING_MEMORY_HEADROOM() and call TAU_ENABLE_TRACKING_MEMORY_HEADROOM() to re-enable tracking of the headroom. To set a different interrupt interval, call TAU_SET_INTERRUPT_INTERVAL(value) where value (in seconds) represents the inter-interrupt interval. A sample profile generated has: USER EVENTS Profile :NODE 0, CONTEXT 0, THREAD 0 --------------------------------------------------------------------------------------- NumSamples MaxValue MinValue MeanValue Std. Dev. Event Name --------------------------------------------------------------------------------------- 3 4067 4061 4065 2.828 Memory Headroom Left (in MB) 3 4067 4061 4065 2.828 Memory Headroom Left (in MB) : void quicksort(int *, int, int) => void quicksort(int *, int, int) -------------------------------------------------------------------------------- 2b) TAU_TRACK_MEMORY_HEADROOM_HERE() Sometimes it is useful to track the memory available at a certain point in the program, rather than rely on an interrupt. TAU_TRACK_MEMORY_HEADROOM_HERE() allows us to examine the memory available at a particular location in the source code and associate it with the currently executing callstack. The examples/headroom/here subdirectory has an example that illustrates this usage. ary = new double [1024*1024*50]; TAU_TRACK_MEMORY_HEADROOM_HERE(); /* takes a sample here! */ sleep(1); A sample profile looks like this: USER EVENTS Profile :NODE 0, CONTEXT 0, THREAD 0 --------------------------------------------------------------------------------------- NumSamples MaxValue MinValue MeanValue Std. Dev. Event Name --------------------------------------------------------------------------------------- 3 3672 3672 3672 0 Memory Headroom Left (in MB) 1 3672 3672 3672 0 Memory Headroom Left (in MB) : main() (calls f1, f5) => f1() (sleeps 1 sec, calls f2, f4) 1 3672 3672 3672 0 Memory Headroom Left (in MB) : main() (calls f1, f5) => f1() (sleeps 1 sec, calls f2, f4) => f4() (sleeps 4 sec, calls f2) 1 3672 3672 3672 0 Memory Headroom Left (in MB) : main() (calls f1, f5) => f5() (sleeps 5 sec) --------------------------------------------------------------------------------------- 2c) -PROFILEHEADROOM Similar to the -PROFILEMEMORY configuration option that takes a sample of the memory utilization at each function entry, we now have -PROFILEHEADROOM. In this -PROFILEHEADROOM option, a sample is taken at instrumented function's entry and associated with the function name. This option is meant to be used as a debugging aid due the high cost associated with executing a series of malloc calls. The cost was 106 microseconds on an IBM BG/L (700 MHz CPU). To use this option, simply configure TAU with the -PROFILEHEADROOM option and choose any method for instrumentation (PDT, MPI, hand instrumentation). You do not need to annotate the source code in any special way (as is required for 2a and 2b). The examples/headroom/available subdirectory has a simple example that produces the following profile when TAU is configured with the -PROFILEHEADROOM option. USER EVENTS Profile :NODE 0, CONTEXT 0, THREAD 0 --------------------------------------------------------------------------------------- NumSamples MaxValue MinValue MeanValue Std. Dev. Event Name --------------------------------------------------------------------------------------- 1 4071 4071 4071 0 f1() (sleeps 1 sec, calls f2, f4) - Memory Headroom Available (MB) 2 3671 3671 3671 0 f2() (sleeps 2 sec, calls f3) - Memory Headroom Available (MB) 2 3671 3671 3671 0 f3() (sleeps 3 sec) - Memory Headroom Available (MB) 1 3671 3671 3671 0 f4() (sleeps 4 sec, calls f2) - Memory Headroom Available (MB) 1 3671 3671 3671 0 f5() (sleeps 5 sec) - Memory Headroom Available (MB) 1 4071 4071 4071 0 main() (calls f1, f5) - Memory Headroom Available (MB) --------------------------------------------------------------------------------------- If you any suggestions for memory options in tau, please send us an e-mail at tau-team@cs.uoregon.edu. tau-2.16.4/examples/headroom/available/000077500000000000000000000000001062343042700177325ustar00rootroot00000000000000tau-2.16.4/examples/headroom/available/Makefile000066400000000000000000000026431062343042700213770ustar00rootroot00000000000000#**************************************************************************** #* TAU Portable Profiling Package ** #* http://www.cs.uoregon.edu/research/tau ** #**************************************************************************** #* Copyright 1997 ** #* Department of Computer and Information Science, University of Oregon ** #* Advanced Computing Laboratory, Los Alamos National Laboratory ** #**************************************************************************** ####################################################################### ## pC++/Sage++ Copyright (C) 1993,1995 ## ## Indiana University University of Oregon University of Rennes ## ####################################################################### TAUROOTDIR = ../../.. include $(TAUROOTDIR)/include/Makefile CXX = $(TAU_CXX) CC = $(TAU_CC) CFLAGS = $(TAU_INCLUDE) $(TAU_DEFS) LIBS = $(TAU_LIBS) LDFLAGS = $(USER_OPT) MAKEFILE = Makefile PRINT = pr RM = /bin/rm -f TARGET = simple EXTRAOBJS = ############################################## all: $(TARGET) install: $(TARGET) $(TARGET): $(TARGET).o $(CXX) $(LDFLAGS) $(TARGET).o -o $@ $(LIBS) $(TARGET).o : $(TARGET).cpp $(CXX) $(CFLAGS) -c $(TARGET).cpp clean: $(RM) $(TARGET).o $(TARGET) ############################################## tau-2.16.4/examples/headroom/available/simple.cpp000066400000000000000000000021111062343042700217220ustar00rootroot00000000000000#include #include #include int f1(); int f2(); int f3(); int f4(); int f5(); int f1(void) { double *ary; TAU_PROFILE("f1()", "(sleeps 1 sec, calls f2, f4)", TAU_USER); printf("Inside f1: sleeps 1 sec, calls f2, f4\n"); ary = new double [1024*1024*50]; sleep(1); f2(); f4(); return 0; } int f2(void) { TAU_PROFILE("f2()", "(sleeps 2 sec, calls f3)", TAU_USER); printf("Inside f2: sleeps 2 sec, calls f3\n"); sleep(2); f3(); return 0; } int f3(void) { TAU_PROFILE("f3()", "(sleeps 3 sec)", TAU_USER); printf("Inside f3: sleeps 3 sec\n"); sleep(3); return 0; } int f4(void) { TAU_PROFILE("f4()", "(sleeps 4 sec, calls f2)", TAU_USER); printf("Inside f4: sleeps 4 sec, calls f2\n"); sleep(4); f2(); return 0; } int f5(void) { TAU_PROFILE("f5()", "(sleeps 5 sec)", TAU_USER); printf("Inside f5: sleeps 5 sec\n"); sleep(5); return 0; } int main(int argc, char **argv) { TAU_PROFILE("main()", "(calls f1, f5)", TAU_DEFAULT); TAU_PROFILE_SET_NODE(0); printf("Inside main: calls f1, f5\n"); f1(); f5(); } tau-2.16.4/examples/headroom/here/000077500000000000000000000000001062343042700167355ustar00rootroot00000000000000tau-2.16.4/examples/headroom/here/Makefile000066400000000000000000000026431062343042700204020ustar00rootroot00000000000000#**************************************************************************** #* TAU Portable Profiling Package ** #* http://www.cs.uoregon.edu/research/tau ** #**************************************************************************** #* Copyright 1997 ** #* Department of Computer and Information Science, University of Oregon ** #* Advanced Computing Laboratory, Los Alamos National Laboratory ** #**************************************************************************** ####################################################################### ## pC++/Sage++ Copyright (C) 1993,1995 ## ## Indiana University University of Oregon University of Rennes ## ####################################################################### TAUROOTDIR = ../../.. include $(TAUROOTDIR)/include/Makefile CXX = $(TAU_CXX) CC = $(TAU_CC) CFLAGS = $(TAU_INCLUDE) $(TAU_DEFS) LIBS = $(TAU_LIBS) LDFLAGS = $(USER_OPT) MAKEFILE = Makefile PRINT = pr RM = /bin/rm -f TARGET = simple EXTRAOBJS = ############################################## all: $(TARGET) install: $(TARGET) $(TARGET): $(TARGET).o $(CXX) $(LDFLAGS) $(TARGET).o -o $@ $(LIBS) $(TARGET).o : $(TARGET).cpp $(CXX) $(CFLAGS) -c $(TARGET).cpp clean: $(RM) $(TARGET).o $(TARGET) ############################################## tau-2.16.4/examples/headroom/here/simple.cpp000066400000000000000000000022151062343042700207320ustar00rootroot00000000000000#include #include #include int f1(); int f2(); int f3(); int f4(); int f5(); int f1(void) { double *ary; TAU_PROFILE("f1()", "(sleeps 1 sec, calls f2, f4)", TAU_USER); printf("Inside f1: sleeps 1 sec, calls f2, f4\n"); ary = new double [1024*1024*50]; TAU_TRACK_MEMORY_HEADROOM_HERE(); sleep(1); f2(); f4(); return 0; } int f2(void) { TAU_PROFILE("f2()", "(sleeps 2 sec, calls f3)", TAU_USER); printf("Inside f2: sleeps 2 sec, calls f3\n"); sleep(2); f3(); return 0; } int f3(void) { TAU_PROFILE("f3()", "(sleeps 3 sec)", TAU_USER); printf("Inside f3: sleeps 3 sec\n"); sleep(3); return 0; } int f4(void) { TAU_PROFILE("f4()", "(sleeps 4 sec, calls f2)", TAU_USER); printf("Inside f4: sleeps 4 sec, calls f2\n"); sleep(4); f2(); return 0; } int f5(void) { TAU_PROFILE("f5()", "(sleeps 5 sec)", TAU_USER); printf("Inside f5: sleeps 5 sec\n"); sleep(5); return 0; } int main(int argc, char **argv) { TAU_PROFILE("main()", "(calls f1, f5)", TAU_DEFAULT); TAU_PROFILE_SET_NODE(0); printf("Inside main: calls f1, f5\n"); TAU_TRACK_MEMORY_HEADROOM(); f1(); f5(); } tau-2.16.4/examples/headroom/track/000077500000000000000000000000001062343042700171165ustar00rootroot00000000000000tau-2.16.4/examples/headroom/track/Makefile000066400000000000000000000026541062343042700205650ustar00rootroot00000000000000#**************************************************************************** #* TAU Portable Profiling Package ** #* http://www.cs.uoregon.edu/research/tau ** #**************************************************************************** #* Copyright 1997 ** #* Department of Computer and Information Science, University of Oregon ** #* Advanced Computing Laboratory, Los Alamos National Laboratory ** #**************************************************************************** ####################################################################### ## pC++/Sage++ Copyright (C) 1993,1995 ## ## Indiana University University of Oregon University of Rennes ## ####################################################################### TAUROOTDIR = ../../.. include $(TAUROOTDIR)/include/Makefile CXX = $(TAU_CXX) CC = $(TAU_CC) CFLAGS = $(TAU_INCLUDE) $(TAU_DEFS) -UTAU_MPI LIBS = $(TAU_LIBS) LDFLAGS = $(USER_OPT) MAKEFILE = Makefile PRINT = pr RM = /bin/rm -f TARGET = simple EXTRAOBJS = ############################################## all: $(TARGET) install: $(TARGET) $(TARGET): $(TARGET).o $(CXX) $(LDFLAGS) $(TARGET).o -o $@ $(LIBS) $(TARGET).o : $(TARGET).cpp $(CXX) $(CFLAGS) -c $(TARGET).cpp clean: $(RM) $(TARGET).o $(TARGET) ############################################## tau-2.16.4/examples/headroom/track/decl.h000066400000000000000000000013041062343042700201740ustar00rootroot00000000000000/**************************************************************************** ** File : decl.h ** Author : Sameer Shende ** Contents : function prototypes for kl.c to calculate kth largest elt. *****************************************************************************/ #ifndef _DECL_H #define _DECL_H /* function declarations */ int select_kth_largest(int k, int *S, int n); void interchange(int *a, int *b); void setup(int *arr); void quicksort(int *arr, int m, int n); void sort_5elements(int *arr); int kth_largest_qs(int k, int *arr, int size); void display_array(int *A, int nelems); int floor (int num, int den); int ceil (int num, int den); #endif /* _DECL_H */ /* EOF decl.h */ tau-2.16.4/examples/headroom/track/simple.cpp000066400000000000000000000320211062343042700211110ustar00rootroot00000000000000#include /**************************************************************************** ** File : klargest.c ** Author : Sameer Shende ** Contents : program to calculate the kth largest element in two ways ** Directory : $(TAUDIR)/examples/autoinstrument/ ** Usage : program [] [] ** e.g., % klargest 5000 675 *****************************************************************************/ #include #include using namespace std; #include #include #include /* for INT_MIN */ #include #include "decl.h" #define DEFAULT_SIZE 1000000 #define DEFAULT_K 454 /* fourth largest element from the array */ #define middle(i) 5*i+2 /* the large array is partitioned into 5 elements each 2, 7, 12 etc. are positions of the middle elements in the array */ int size; /* global - size of the array */ int *M; /* the median array */ /************************************************************************** ** Function : select_kth_largest ** Parameters : k, array of integers S and n - the size of array. ** Description: The SELECT algorithm to find the kth largest element from ** the set of integers S in O(n) time. Used recursively. ** Returns : returns the kth largest element. ***************************************************************************/ int select_kth_largest(int k, int *S, int n) { TAU_PROFILE("int select_kth_largest(int, int *, int)", " ", TAU_USER); /* return the kth largest element from the ordered set S of integers */ /* n is the number of elements in S */ /* Algorithm : if n < 50 then sort in dec. order S, return kth largest element in S else divide S into ceil(n/5) sequences of 5 elements each with upto four leftover elements sort in dec order each 5 element sequence let M be the sequence of medians of the 5 element sets m = select_kth_largest(ceil(n(M)/2), M, n/5); let S1, S2 and S3 be the sequences of elements in S greater than, equal to and less than m respectively. if n(S1) >=k then return select_kth_largest(k, S1, n(S1)); else if (n(S1) + n(S2) >= k) then return m else return select_kth_largest (k - n(S1) - n(S2), S3); */ int n_M, n_S1, n_S2, n_S3; /* number of elements in M, S1, S2 and S3 resp. */ int *S1, *S3; /* the other arrays */ int m; /* the median element */ int i, leftover, ret; if (n < 50) return kth_largest_qs(k, S, n); /* Use quicksort to sort the array S and return the kth largest element */ leftover = n % 5; /* upto four leftover elements */ if (leftover != 0) { /* then pad the remaining elements with min. negative values */ for (i=n; i< n + 5 - leftover; i++) S[i] = INT_MIN; /* number of leftover elements */ /* INT_MIN is defined for each system in /usr/include/limits.h */ } /* after padding the remaining array, sort the 5 element sequence */ n_M = ceil(n, 5); /* number of elements in M */ for(i=0; i< n_M; i++) { sort_5elements(&S[5*i]); /* beginning element */ } /* 5 element sequences are sorted */ /* display_array(S, ceil(n,5)*5); */ /* size of padded array is ceil(n,5)*5 */ S1 = (int *) malloc ((3*n/4) * sizeof(int)); /* allocate S1 */ S3 = (int *) malloc ((3*n/4) * sizeof(int)); /* allocate S3 */ if((S1 == (int *) NULL) || (S3 == (int *) NULL)) { perror("S1 or S3 malloc error"); exit(1); } for (i=0; i< n_M; i++) M[i] = S[middle(i)]; /* fill up the median array */ m = select_kth_largest(ceil(n_M,2), M, n_M); /* calculate the median element*/ /* construct S1, S2, and S3 as sequences of elements in S greater than, equal to and less than m. Don't need a separate S2 array. */ /* initialize the count of elements in S1, S2, S3 */ n_S1 = n_S2 = n_S3 = 0; /* go through every element in S */ for (i = 0; i < n; i++) { if(S[i] > m) S1[n_S1++] = S[i]; /* goes to S1 */ else if (S[i] < m) S3[n_S3++] = S[i]; /* goes to S3 */ else n_S2++; /* S2 count incremented goes to S2 */ } /* now we have S1, and S3 */ if(n_S1 >= k) /* S1 has the elements greater than m and there are greater than k elements, so its bound to be in this section */ { /* free memory */ /* don't need S3 */ free(S3); ret = select_kth_largest(k, S1, n_S1); free(S1); /* before returning clean up S1 */ return ret; } else { if(n_S1 + n_S2 >= k) /* its not in S1, but its in S2 */ { /* free memory */ /* don't need S1 and S3 */ free(S1); free(S3); return m; /* the median that we had calculated earlier */ } else /* its in S3 */ { /* free memory */ /* don't need S1 */ free(S1); ret = select_kth_largest(k - n_S1 - n_S2, S3, n_S3); free(S3); /* before returning clean up S3 */ return ret; } } } /************************************************************************** ** Function : interchange ** Parameters : two integer pointers a, and b ** Description: interchanges the contents of a and b. ** Returns : nothing ***************************************************************************/ void interchange(int *a, int *b) { /* interchanges the contents of the two variables containing integers. */ int temp; temp = *a; *a = *b; *b = temp; } /************************************************************************** ** Function : setup ** Parameters : array to be initialized ** Description: assigns values to elements in the array used for finding ** the kth largest element. ** Returns : nothing ***************************************************************************/ void setup(int *arr) { TAU_PROFILE("void setup(int *)", " ", TAU_USER); int i; /* setup */ arr[0] = 26; arr[1] = 5; arr[2] = 37; arr[3] = 1; arr[4] = 61; arr[5] = 11; arr[6] = 59; arr[7] = 15; arr[8] = 48; arr[9] = 19; if (size > 10) { for (i=10; i< size; i++) arr[i] = arr[i%10]; } /* Uses the first ten values repeatedly and fills the array */ } /************************************************************************** ** Function : quicksort ** Parameters : array to be sorted and lower and upper limits m and n resp. ** Description: uses quicksort recursively to sort elements in O(nlog n) ** time complexity in decreasing order.. ** Returns : nothing ***************************************************************************/ /* quick sort */ void quicksort(int *arr, int m, int n) { TAU_PROFILE("void quicksort(int *, int, int)", " ", TAU_USER); /* sort the array in decreasing order */ int k; /* control key */ int i, j; /* k is chosen as the control key and i and j are chosen such that at any time, arr[l] >= k for l < i and arr[l] <= k for l > j. It is assumed that arr[m] >= arr[n+1] */ /* printf("quicksort %d %d\n [", m, n); for(i=m; i k); /* Decreasing order for largest element first */ do { j = j - 1; } while (arr[j] < k); /* Decreasing order */ if (i < j) interchange(&arr[i], &arr[j]); } while (i < j); interchange(&arr[m], &arr[j]); /* pivot */ quicksort(arr, m, j - 1); /* left portion sorted */ quicksort(arr, j + 1, n); /* right side sorted - so array is sorted */ } /*if */ } /************************************************************************** ** Function : sort_5elements ** Parameters : array of 5 elements to be sorted ** Description: sorts the 5 elements in decreasing order ** Returns : nothing ***************************************************************************/ void sort_5elements(int *arr) { /* sort the first five elements of the array arr */ quicksort(arr, 0, 4); /* could be done by if statements too - but this way its easier to extend it for 7 element based select */ } /************************************************************************** ** Function : kth_largest_qs ** Parameters : k for kth largest, array to be sorted and size of array ** Description: sorts the array using quicksort and finds the kth largest ** element ** Returns : kth largest element ***************************************************************************/ int kth_largest_qs(int k, int *arr, int size) { TAU_PROFILE("int kth_largest_qs(int, int *, int)", " ", TAU_USER); /* first we sort the array and then return the kth largest element */ quicksort(arr, 0, size - 1); /* sort the array */ return arr[k-1]; /* return the kth largest */ } /************************************************************************** ** Function : display_array ** Parameters : array and size of array ** Description: for debugging, prints contents of the array ** Returns : nothing ***************************************************************************/ void display_array(int *A, int nelems) { TAU_PROFILE("void display_array(int *, int)", " ", TAU_USER); int i; for(i=0; i < nelems; i++) { printf("A[%d] = %d\n", i, A[i]); } } /* utility functions */ /************************************************************************** ** Function : floor ** Parameters : numerator and denominator ** Description: calculates the floor of num/den ** Returns : floor ***************************************************************************/ int floor (int num, int den) { TAU_PROFILE("int floor(int, int)", " ", TAU_USER); return num / den; } /************************************************************************** ** Function : ceil ** Parameters : numerator and denominator ** Description: calculates the ceiling of num/den ** Returns : ceiling ***************************************************************************/ int ceil (int num, int den) { TAU_PROFILE("int ceil(int, int)", " ", TAU_USER); return (num % den > 0) ? (num / den + 1) : (num / den); } /************************************************************************** ** Function : main ** Parameters : command line parameters. ** Description: Usage : main [] [] ** Calculates kth largest element using two different algorithms ** and returns the value and the time statistics for the two. ** Returns : nothing ***************************************************************************/ int main(int argc, char **argv) { TAU_PROFILE("int main(int, char **)", " ", TAU_DEFAULT); TAU_INIT(&argc, &argv); #ifndef TAU_MPI TAU_PROFILE_SET_NODE(0); #endif /* TAU_MPI */ int klarge, k; struct timeval tp1, tp2; float time_taken; int *A; TAU_TRACK_MEMORY_HEADROOM(); /* extract the size of the array and k from the command line parameters */ if (argc > 1) size = atoi(argv[1]); else { size = DEFAULT_SIZE; printf(" Usage : main [] [] \n"); printf(" Calculates kth largest element using two different algorithms\n"); printf(" and returns the value and the time statistics for the two.\n"); } if (argc > 2) k = atoi(argv[2]); /* kth largest */ else k = DEFAULT_K; if (k > size) { printf("ERROR: Please specify a value for k (%d) that is less than the array size (%d)\n", k, size); exit(0); } /* there could be upto 4 leftover elements */ A = (int *) malloc((size + 4) * sizeof(int)); /* allocate the array */ if (A == (int *) NULL) { perror("Cannot malloc the size of array"); exit(1); } M = (int *) malloc(ceil(size,5)*sizeof(int)); /*allocate memory for Median*/ /* its ok to recycle this array so its allocated here instead of doing it in select_kth_largest */ if (M == (int *) NULL) { perror("Cannot malloc M array"); /* its ok to recycle this array so its allocated here instead of doing it in select_kth_largest */ exit(1); } /* setup */ setup(A); /* display_array(A,size); */ gettimeofday(&tp1, NULL); /* timing info. */ klarge = select_kth_largest(k, A, size); /* using SELECT O(n) algo. */ gettimeofday(&tp2, NULL); /* timing info. */ printf("****************************************************\n"); printf("Using select_kth_largest, size %d, %d th largest element = %d\n", size,k, klarge); time_taken = (tp2.tv_sec - tp1.tv_sec) + (tp2.tv_usec - tp1.tv_usec) * 1e-6; printf("Time taken (wall clock) = %f secs\n", time_taken); printf("- - - - - - - - - - - - - - - - - -\n"); /* Now calculate the kth largest element in A using the same array but the "quick and dirty" quicksort O(nlog n) algorithm */ gettimeofday(&tp1, NULL); /* timing info */ klarge = kth_largest_qs(k, A, size); /* calculates the kth largest element of A */ gettimeofday(&tp2, NULL); /* print results */ printf("Using quicksort, size %d, %d th largest element = %d\n", size, k, klarge); time_taken = (tp2.tv_sec - tp1.tv_sec) + (tp2.tv_usec - tp1.tv_usec) * 1e-6; printf("Time taken (wall clock) = %f secs\n", time_taken); /* printf("%d %f\n", size, time_taken); */ } /* EOF klargest.cpp */ tau-2.16.4/examples/instrument/000077500000000000000000000000001062343042700164245ustar00rootroot00000000000000tau-2.16.4/examples/instrument/Makefile000066400000000000000000000026611062343042700200710ustar00rootroot00000000000000#**************************************************************************** #* TAU Portable Profiling Package ** #* http://www.cs.uoregon.edu/research/tau ** #**************************************************************************** #* Copyright 1997 ** #* Department of Computer and Information Science, University of Oregon ** #* Advanced Computing Laboratory, Los Alamos National Laboratory ** #**************************************************************************** ####################################################################### ## pC++/Sage++ Copyright (C) 1993,1995 ## ## Indiana University University of Oregon University of Rennes ## ####################################################################### TAUROOTDIR = ../.. include $(TAUROOTDIR)/default/lib/Makefile.tau CXX = $(TAU_CXX) CC = $(TAU_CC) CFLAGS = $(TAU_INCLUDE) $(TAU_DEFS) -UTAU_MPI LIBS = $(TAU_LIBS) LDFLAGS = $(USER_OPT) MAKEFILE = Makefile PRINT = pr RM = /bin/rm -f TARGET = simple EXTRAOBJS = ############################################## all: $(TARGET) install: $(TARGET) $(TARGET): $(TARGET).o $(CXX) $(LDFLAGS) $(TARGET).o -o $@ $(LIBS) $(TARGET).o : $(TARGET).cpp $(CXX) $(CFLAGS) -c $(TARGET).cpp clean: $(RM) $(TARGET).o $(TARGET) ############################################## tau-2.16.4/examples/instrument/decl.h000066400000000000000000000013041062343042700175020ustar00rootroot00000000000000/**************************************************************************** ** File : decl.h ** Author : Sameer Shende ** Contents : function prototypes for kl.c to calculate kth largest elt. *****************************************************************************/ #ifndef _DECL_H #define _DECL_H /* function declarations */ int select_kth_largest(int k, int *S, int n); void interchange(int *a, int *b); void setup(int *arr); void quicksort(int *arr, int m, int n); void sort_5elements(int *arr); int kth_largest_qs(int k, int *arr, int size); void display_array(int *A, int nelems); int floor (int num, int den); int ceil (int num, int den); #endif /* _DECL_H */ /* EOF decl.h */ tau-2.16.4/examples/instrument/simple.cpp000066400000000000000000000321521062343042700204240ustar00rootroot00000000000000#include /**************************************************************************** ** File : klargest.c ** Author : Sameer Shende ** Contents : program to calculate the kth largest element in two ways ** Directory : $(TAUDIR)/examples/autoinstrument/ ** Usage : program [] [] ** e.g., % klargest 5000 675 *****************************************************************************/ #include #include using namespace std; #include #include #include /* for INT_MIN */ #include #include "decl.h" #define DEFAULT_SIZE 10000 #define DEFAULT_K 4 /* fourth largest element from the array */ #define middle(i) 5*i+2 /* the large array is partitioned into 5 elements each 2, 7, 12 etc. are positions of the middle elements in the array */ int size; /* global - size of the array */ int *M; /* the median array */ /************************************************************************** ** Function : select_kth_largest ** Parameters : k, array of integers S and n - the size of array. ** Description: The SELECT algorithm to find the kth largest element from ** the set of integers S in O(n) time. Used recursively. ** Returns : returns the kth largest element. ***************************************************************************/ int select_kth_largest(int k, int *S, int n) { TAU_PROFILE("int select_kth_largest(int, int *, int)", " ", TAU_USER); /* return the kth largest element from the ordered set S of integers */ /* n is the number of elements in S */ /* Algorithm : if n < 50 then sort in dec. order S, return kth largest element in S else divide S into ceil(n/5) sequences of 5 elements each with upto four leftover elements sort in dec order each 5 element sequence let M be the sequence of medians of the 5 element sets m = select_kth_largest(ceil(n(M)/2), M, n/5); let S1, S2 and S3 be the sequences of elements in S greater than, equal to and less than m respectively. if n(S1) >=k then return select_kth_largest(k, S1, n(S1)); else if (n(S1) + n(S2) >= k) then return m else return select_kth_largest (k - n(S1) - n(S2), S3); */ int n_M, n_S1, n_S2, n_S3; /* number of elements in M, S1, S2 and S3 resp. */ int *S1, *S3; /* the other arrays */ int m; /* the median element */ int i, leftover, ret; if (n < 50) return kth_largest_qs(k, S, n); /* Use quicksort to sort the array S and return the kth largest element */ leftover = n % 5; /* upto four leftover elements */ if (leftover != 0) { /* then pad the remaining elements with min. negative values */ for (i=n; i< n + 5 - leftover; i++) S[i] = INT_MIN; /* number of leftover elements */ /* INT_MIN is defined for each system in /usr/include/limits.h */ } /* after padding the remaining array, sort the 5 element sequence */ n_M = ceil(n, 5); /* number of elements in M */ for(i=0; i< n_M; i++) { sort_5elements(&S[5*i]); /* beginning element */ } /* 5 element sequences are sorted */ /* display_array(S, ceil(n,5)*5); */ /* size of padded array is ceil(n,5)*5 */ S1 = (int *) malloc ((3*n/4) * sizeof(int)); /* allocate S1 */ S3 = (int *) malloc ((3*n/4) * sizeof(int)); /* allocate S3 */ if((S1 == (int *) NULL) || (S3 == (int *) NULL)) { perror("S1 or S3 malloc error"); exit(1); } for (i=0; i< n_M; i++) M[i] = S[middle(i)]; /* fill up the median array */ m = select_kth_largest(ceil(n_M,2), M, n_M); /* calculate the median element*/ /* construct S1, S2, and S3 as sequences of elements in S greater than, equal to and less than m. Don't need a separate S2 array. */ /* initialize the count of elements in S1, S2, S3 */ n_S1 = n_S2 = n_S3 = 0; /* go through every element in S */ for (i = 0; i < n; i++) { if(S[i] > m) S1[n_S1++] = S[i]; /* goes to S1 */ else if (S[i] < m) S3[n_S3++] = S[i]; /* goes to S3 */ else n_S2++; /* S2 count incremented goes to S2 */ } /* now we have S1, and S3 */ if(n_S1 >= k) /* S1 has the elements greater than m and there are greater than k elements, so its bound to be in this section */ { /* free memory */ /* don't need S3 */ free(S3); ret = select_kth_largest(k, S1, n_S1); free(S1); /* before returning clean up S1 */ return ret; } else { if(n_S1 + n_S2 >= k) /* its not in S1, but its in S2 */ { /* free memory */ /* don't need S1 and S3 */ free(S1); free(S3); return m; /* the median that we had calculated earlier */ } else /* its in S3 */ { /* free memory */ /* don't need S1 */ free(S1); ret = select_kth_largest(k - n_S1 - n_S2, S3, n_S3); free(S3); /* before returning clean up S3 */ return ret; } } } /************************************************************************** ** Function : interchange ** Parameters : two integer pointers a, and b ** Description: interchanges the contents of a and b. ** Returns : nothing ***************************************************************************/ void interchange(int *a, int *b) { TAU_PROFILE("void interchange(int *, int *)", " ", TAU_USER); /* interchanges the contents of the two variables containing integers. */ int temp; temp = *a; *a = *b; *b = temp; } /************************************************************************** ** Function : setup ** Parameters : array to be initialized ** Description: assigns values to elements in the array used for finding ** the kth largest element. ** Returns : nothing ***************************************************************************/ void setup(int *arr) { TAU_PROFILE("void setup(int *)", " ", TAU_USER); int i; /* setup */ arr[0] = 26; arr[1] = 5; arr[2] = 37; arr[3] = 1; arr[4] = 61; arr[5] = 11; arr[6] = 59; arr[7] = 15; arr[8] = 48; arr[9] = 19; if (size > 10) { for (i=10; i< size; i++) arr[i] = arr[i%10]; } /* Uses the first ten values repeatedly and fills the array */ } /************************************************************************** ** Function : quicksort ** Parameters : array to be sorted and lower and upper limits m and n resp. ** Description: uses quicksort recursively to sort elements in O(nlog n) ** time complexity in decreasing order.. ** Returns : nothing ***************************************************************************/ /* quick sort */ void quicksort(int *arr, int m, int n) { TAU_PROFILE("void quicksort(int *, int, int)", " ", TAU_USER); /* sort the array in decreasing order */ int k; /* control key */ int i, j; /* k is chosen as the control key and i and j are chosen such that at any time, arr[l] >= k for l < i and arr[l] <= k for l > j. It is assumed that arr[m] >= arr[n+1] */ /* printf("quicksort %d %d\n [", m, n); for(i=m; i k); /* Decreasing order for largest element first */ do { j = j - 1; } while (arr[j] < k); /* Decreasing order */ if (i < j) interchange(&arr[i], &arr[j]); } while (i < j); interchange(&arr[m], &arr[j]); /* pivot */ quicksort(arr, m, j - 1); /* left portion sorted */ quicksort(arr, j + 1, n); /* right side sorted - so array is sorted */ } /*if */ } /************************************************************************** ** Function : sort_5elements ** Parameters : array of 5 elements to be sorted ** Description: sorts the 5 elements in decreasing order ** Returns : nothing ***************************************************************************/ void sort_5elements(int *arr) { TAU_PROFILE("void sort_5elements(int *)", " ", TAU_USER); /* sort the first five elements of the array arr */ quicksort(arr, 0, 4); /* could be done by if statements too - but this way its easier to extend it for 7 element based select */ } /************************************************************************** ** Function : kth_largest_qs ** Parameters : k for kth largest, array to be sorted and size of array ** Description: sorts the array using quicksort and finds the kth largest ** element ** Returns : kth largest element ***************************************************************************/ int kth_largest_qs(int k, int *arr, int size) { TAU_PROFILE("int kth_largest_qs(int, int *, int)", " ", TAU_USER); /* first we sort the array and then return the kth largest element */ quicksort(arr, 0, size - 1); /* sort the array */ return arr[k-1]; /* return the kth largest */ } /************************************************************************** ** Function : display_array ** Parameters : array and size of array ** Description: for debugging, prints contents of the array ** Returns : nothing ***************************************************************************/ void display_array(int *A, int nelems) { TAU_PROFILE("void display_array(int *, int)", " ", TAU_USER); int i; for(i=0; i < nelems; i++) { printf("A[%d] = %d\n", i, A[i]); } } /* utility functions */ /************************************************************************** ** Function : floor ** Parameters : numerator and denominator ** Description: calculates the floor of num/den ** Returns : floor ***************************************************************************/ int floor (int num, int den) { TAU_PROFILE("int floor(int, int)", " ", TAU_USER); return num / den; } /************************************************************************** ** Function : ceil ** Parameters : numerator and denominator ** Description: calculates the ceiling of num/den ** Returns : ceiling ***************************************************************************/ int ceil (int num, int den) { TAU_PROFILE("int ceil(int, int)", " ", TAU_USER); return (num % den > 0) ? (num / den + 1) : (num / den); } /************************************************************************** ** Function : main ** Parameters : command line parameters. ** Description: Usage : main [] [] ** Calculates kth largest element using two different algorithms ** and returns the value and the time statistics for the two. ** Returns : nothing ***************************************************************************/ int main(int argc, char **argv) { TAU_PROFILE("int main(int, char **)", " ", TAU_DEFAULT); TAU_INIT(&argc, &argv); #ifndef TAU_MPI TAU_PROFILE_SET_NODE(0); #endif /* TAU_MPI */ int klarge, k; struct timeval tp1, tp2; float time_taken; int *A; /* extract the size of the array and k from the command line parameters */ if (argc > 1) size = atoi(argv[1]); else { size = DEFAULT_SIZE; printf(" Usage : main [] [] \n"); printf(" Calculates kth largest element using two different algorithms\n"); printf(" and returns the value and the time statistics for the two.\n"); } if (argc > 2) k = atoi(argv[2]); /* kth largest */ else k = DEFAULT_K; if (k > size) { printf("ERROR: Please specify a value for k (%d) that is less than the array size (%d)\n", k, size); exit(0); } /* there could be upto 4 leftover elements */ A = (int *) malloc((size + 4) * sizeof(int)); /* allocate the array */ if (A == (int *) NULL) { perror("Cannot malloc the size of array"); exit(1); } M = (int *) malloc(ceil(size,5)*sizeof(int)); /*allocate memory for Median*/ /* its ok to recycle this array so its allocated here instead of doing it in select_kth_largest */ if (M == (int *) NULL) { perror("Cannot malloc M array"); /* its ok to recycle this array so its allocated here instead of doing it in select_kth_largest */ exit(1); } /* setup */ setup(A); /* display_array(A,size); */ gettimeofday(&tp1, NULL); /* timing info. */ klarge = select_kth_largest(k, A, size); /* using SELECT O(n) algo. */ gettimeofday(&tp2, NULL); /* timing info. */ printf("****************************************************\n"); printf("Using select_kth_largest, size %d, %d th largest element = %d\n", size,k, klarge); time_taken = (tp2.tv_sec - tp1.tv_sec) + (tp2.tv_usec - tp1.tv_usec) * 1e-6; printf("Time taken (wall clock) = %f secs\n", time_taken); printf("- - - - - - - - - - - - - - - - - -\n"); /* Now calculate the kth largest element in A using the same array but the "quick and dirty" quicksort O(nlog n) algorithm */ gettimeofday(&tp1, NULL); /* timing info */ klarge = kth_largest_qs(k, A, size); /* calculates the kth largest element of A */ gettimeofday(&tp2, NULL); /* print results */ printf("Using quicksort, size %d, %d th largest element = %d\n", size, k, klarge); time_taken = (tp2.tv_sec - tp1.tv_sec) + (tp2.tv_usec - tp1.tv_usec) * 1e-6; printf("Time taken (wall clock) = %f secs\n", time_taken); /* printf("%d %f\n", size, time_taken); */ } /* EOF klargest.cpp */ tau-2.16.4/examples/java/000077500000000000000000000000001062343042700151355ustar00rootroot00000000000000tau-2.16.4/examples/java/api/000077500000000000000000000000001062343042700157065ustar00rootroot00000000000000tau-2.16.4/examples/java/api/Pi.java000066400000000000000000000026621062343042700171270ustar00rootroot00000000000000//Simple program that claculates pi //by integrating 4/(1+x^2) between 0 and 1. // //Takes an optional command line argument of //the number on increments between 0 and 1. //If a value is not specified then it assumes 100. import TAU.*; public class Pi { static TAU.Profile t1 = new TAU.Profile("Tau Timer", "(sleep for 5 secs)", "TAU_DEFAULT", TAU.Profile.TAU_DEFAULT); public static void main(String[] args) { int Steps = 0; if(args.length > 0) Steps = Integer.parseInt(args[0]); else Steps = 100; double Value = 0; //Create an instance of PiCalculateValue. PiCalculateValue pi = new PiCalculateValue(); Value = pi.getPi(Steps); System.out.println("The value of pi is: " + Value); t1.Start(); long then = System.currentTimeMillis(); while (System.currentTimeMillis() - then < 5000) {} t1.Stop(); } } class PiCalculateValue { //Default contructor is fine. public void loop(int StepsIn) { for(int i = 0; i < StepsIn; i++) { Xvalue = i*Increment; Yvalue = 4/(1+(Xvalue*Xvalue)); Sum = (Sum + (Yvalue*Increment)); //System.out.println("The value of YValue is: " + Yvalue); } } public double getPi(int StepsIn) { Increment = 1/(float)StepsIn; System.out.println("The value of Increment is: " + Increment); loop(StepsIn); return Sum; } double Increment = 1; double Xvalue = 0; double Yvalue = 0; double Sum = 0; } tau-2.16.4/examples/java/api/README000066400000000000000000000011401062343042700165620ustar00rootroot00000000000000This directory contains an example of the use of the TAU JAVA API. To use this, ensure that your CLASSPATH variable contains the //lib directory and your LD_LIBRARY_PATH variable contains //lib before other entries (so it can pick up the right libTAU.so file). For e.g., % configure -jdk=/usr/java % make clean install % cd examples/java/api % setenv CLASSPATH $CLASSPATH\:/home/grads/sameer/tau2/sgi8k/lib % setenv LD_LIBRARY_PATH /home/grads/sameer/tau2/sgi8k/lib/\:$LD_LIBRARY_PATH Now compile the JAVA application % javac Pi.java And run it % java -XrunTAU Pi 20000 % pprof tau-2.16.4/examples/java/pi/000077500000000000000000000000001062343042700155455ustar00rootroot00000000000000tau-2.16.4/examples/java/pi/Pi.java000066400000000000000000000022511062343042700167600ustar00rootroot00000000000000//Simple program that claculates pi //by integrating 4/(1+x^2) between 0 and 1. // //Takes an optional command line argument of //the number on increments between 0 and 1. //If a value is not specified then it assumes 100. public class Pi { public static void main(String[] args) { int Steps = 0; if(args.length > 0) Steps = Integer.parseInt(args[0]); else Steps = 100; double Value = 0; //Create an instance of PiCalculateValue. PiCalculateValue pi = new PiCalculateValue(); Value = pi.getPi(Steps); System.out.println("The value of pi is: " + Value); } } class PiCalculateValue { //Default contructor is fine. public void loop(int StepsIn) { for(int i = 0; i < StepsIn; i++) { Xvalue = i*Increment; Yvalue = 4/(1+(Xvalue*Xvalue)); Sum = (Sum + (Yvalue*Increment)); //System.out.println("The value of YValue is: " + Yvalue); } } public double getPi(int StepsIn) { Increment = 1/(float)StepsIn; System.out.println("The value of Increment is: " + Increment); loop(StepsIn); return Sum; } double Increment = 1; double Xvalue = 0; double Yvalue = 0; double Sum = 0; } tau-2.16.4/examples/javatracewriter/000077500000000000000000000000001062343042700174115ustar00rootroot00000000000000tau-2.16.4/examples/javatracewriter/README000066400000000000000000000013401062343042700202670ustar00rootroot00000000000000This directory contains an example of the java TAU trace writer API, equivalent to the C/C++ example in the tracewriter directory. The C/C++ API reference is applicable, but note that Time is passed as a java long primitive, character arrays are passed as strings and other numeric values are passed as ints. To use this API, ensure that your CLASSPATH contains the file //lib/tf_writer.jar. For example, starting in the TAU root directory, $ ./configure -TRACE $ make clean install $ cd examples/javatracewriter $ export CLASSPATH=/home/wspear/tau2/i386_linux/lib/tf_writer.jar Now compile the trace writer application. $ javac jtau_writer.java And run it $ java jtau_writer $ tau_convert -dump tau.trc tau.edf tau-2.16.4/examples/javatracewriter/jtau_writer.java000066400000000000000000000037721062343042700226240ustar00rootroot00000000000000import edu.uoregon.tau.tf_writer.*; class jtau_writer{ public static void main(String[] args) { System.out.println("Begin!\n"); int MAIN=1; int FOO=2; int BAR=3; int USER_EVENT_1=4; //TAU_tf_writer tau = new TAU_tf_writer(); Ttf_file file = TAU_tf_writer.Ttf_OpenFileForOutput("tau.trc","tau.edf"); if (file == null) { System.out.println("Error openging trace for output"); return;// -1; } TAU_tf_writer.Ttf_DefThread(file, 0, 0, "node 0"); TAU_tf_writer.Ttf_DefThread(file, 1, 0, "node 1"); TAU_tf_writer.Ttf_DefStateGroup(file, "TAU_DEFAULT", 1); TAU_tf_writer.Ttf_DefState(file, MAIN, "main", 1); TAU_tf_writer.Ttf_DefState(file, FOO, "foo", 1); TAU_tf_writer.Ttf_DefState(file, BAR, "bar", 1); TAU_tf_writer.Ttf_DefUserEvent(file, USER_EVENT_1, "User Event 1", 1); long s = (long)1e6; //int s=1; TAU_tf_writer.Ttf_EnterState(file, 1*s, 0, 0, MAIN); TAU_tf_writer.Ttf_EnterState(file, 2*s, 0, 0, FOO); TAU_tf_writer.Ttf_EnterState(file, 3*s, 0, 0, BAR); TAU_tf_writer.Ttf_EventTrigger(file, (long)(3.1*s), 0, 0, USER_EVENT_1, 500); TAU_tf_writer.Ttf_EventTrigger(file, (long)(3.9*s), 0, 0, USER_EVENT_1, 1000); TAU_tf_writer.Ttf_EnterState(file, 4*s, 1, 0, MAIN); TAU_tf_writer.Ttf_SendMessage(file, (long)(4.5*s), 1, 0, // from 1,0 0, 0, // to 0,0 500, // length 42, // tag 0); // communicator TAU_tf_writer.Ttf_EnterState(file, 5*s, 1, 0, FOO); TAU_tf_writer.Ttf_EnterState(file, 6*s, 1, 0, BAR); TAU_tf_writer.Ttf_LeaveState(file, 7*s, 1, 0, BAR); TAU_tf_writer.Ttf_LeaveState(file, 8*s, 1, 0, FOO); TAU_tf_writer.Ttf_LeaveState(file, 9*s, 1, 0, MAIN); TAU_tf_writer.Ttf_LeaveState(file, 10*s, 0, 0, BAR); TAU_tf_writer.Ttf_RecvMessage(file, (long)(10.5*s), 1, 0, // from 1,0 0, 0, // to 0,0 500, // length 42, // tag 0); // communicator TAU_tf_writer.Ttf_LeaveState(file, 11*s, 0, 0, FOO); TAU_tf_writer.Ttf_LeaveState(file, 12*s, 0, 0, MAIN); TAU_tf_writer.Ttf_CloseOutputFile(file); return ; }} tau-2.16.4/examples/loops/000077500000000000000000000000001062343042700153505ustar00rootroot00000000000000tau-2.16.4/examples/loops/README000066400000000000000000000104071062343042700162320ustar00rootroot00000000000000This directory (consisting of c, c++ and f90 subdirectories) illustrates how to instrument outer-loops in C and C++ and Fortran 90 using PDT. TAU must be configured with the -pdt= configuration option to use outer-loop level instrumentation. To instrument outer loops in a given routine, create a file that is passed as the selective instrumentation file to the tau_instrumentor. In this file, we specify an instrument section: BEGIN_INSTRUMENT_SECTION loops file="loop_test.cpp" routine="multiply" # it also understands # as the wildcard in routine name # and * and ? wildcards in file name. You can also specify the full # name of the routine as is found in profile files. #loops file="loop_test.cpp" routine="double multiply#" END_INSTRUMENT_SECTION For Fortran, you must specify only the name of the routine in upper case (it is case sensitive). For e.g., BEGIN_INSTRUMENT_SECTION loops file="loop_test.f90" routine="MULTIPLY" END_INSTRUMENT_SECTION Wildcard characters may be used to instrument all routines/files. It is recommended to use throttling of events using % setenv TAU_THROTTLE 1 when trying to instrument all outer loops. For e.g., BEGIN_INSTRUMENT_SECTION loops file="*" routine="#" END_INSTRUMENT_SECTION instruments all outer loops in all files. It is important to note that sometimes the instrumented source code may have a column width that exceeds 72 columns. This can cause problems in compiling a fixed format instrumented source file. Several compilers provide options that extend the source code column number. For e.g., the IBM xlf90_r compiler allows you to specify -qfixed=132 instead of the usual -qfixed to accomodate such files. The Intel compiler provides -132 command-line option. We strongly recommend using these options in your list of compilation options if you enable outer-loop level instrumentation in fixed format source code. For e.g., F90 = ifort FFLAGS = -O3 changes to: include OPTS = -optKeepFiles -optVerbose -optTauSelectFile=select.tau F90 = $(TAU_COMPILER) $(OPTS) ifort FFLAGS = -O3 -132 A typical output of running pprof after executing the instrumented program is given below: Reading Profile files in profile.* NODE 0;CONTEXT 0;THREAD 0: --------------------------------------------------------------------------------------- %Time Exclusive Inclusive #Call #Subrs Inclusive Name msec total msec usec/call --------------------------------------------------------------------------------------- 100.0 0.015 865 1 1 865117 int main(int, char **) 100.0 0.161 865 1 4 865102 double multiply() 56.8 491 491 1 0 491203 Loop: double multiply()[ file = line,col = <23,3> to <30,3> ] 41.5 358 358 1 0 358627 Loop: double multiply()[ file = line,col = <38,3> to <46,7> ] 1.6 13 13 1 0 13664 Loop: double multiply()[ file = line,col = <16,10> to <21,12> ] 0.2 1 1 1 0 1447 Loop: double multiply()[ file = line,col = <34,3> to <36,18> ] Other forms of instrumentation understood in the selective instrumentation file is: 1) Entry/Exit instrumentation for C/C++/F90: BEGIN_INSTRUMENT_SECTION exit routine ="int foo()" code = "cout <<\"exiting foo\"< int main(int argc, char **argv) { int i; for (i=0; i < 5; i++) { printf("Inside main\n"); } return 0; } $ cat select.tau BEGIN_INSTRUMENT_SECTION file = "line_test.cpp" line = 9 code = "printf(\"i=%d: \", i);" END_INSTRUMENT_SECTION tau-2.16.4/examples/loops/c++/000077500000000000000000000000001062343042700157205ustar00rootroot00000000000000tau-2.16.4/examples/loops/c++/Makefile000066400000000000000000000004261062343042700173620ustar00rootroot00000000000000CC=tau_cxx.sh -tau_makefile=../../../include/Makefile -tau_options='-optTauSelectFile=select.tau -optVerbose -optKeepFiles ' APP=loop_test $(APP): $(APP).o $(CC) $(APP).o -o $@ $(APP).o: $(APP).cpp $(CC) -c $(APP).cpp clean: /bin/rm -f *.o *.pdb *.inst.* $(APP) profile.* tau-2.16.4/examples/loops/c++/README000066400000000000000000000065471062343042700166140ustar00rootroot00000000000000This example describes how to instrument outer-loops in C and C++. Fortran support is illustrated in the ../f90 directory. To instrument outer loops in a given routine, create a file that is passed as the selective instrumentation file to the tau_instrumentor. In this file, we specify an instrument section: BEGIN_INSTRUMENT_SECTION loops file="loop_test.cpp" routine="multiply" # it also understands # as the wildcard in routine name # and * and ? wildcards in file name. You can also specify the full # name of the routine as is found in profile files. #loops file="loop_test.cpp" routine="double multiply#" END_INSTRUMENT_SECTION For Fortran, you must specify only the name of the routine in upper case (it is case sensitive). For e.g., BEGIN_INSTRUMENT_SECTION loops file="loop_test.f90" routine="MULTIPLY" END_INSTRUMENT_SECTION Wildcard characters may be used to instrument all routines/files. It is recommended to use throttling of events using % setenv TAU_THROTTLE 1 when trying to instrument all outer loops. For e.g., BEGIN_INSTRUMENT_SECTION loops file="*" routine="#" END_INSTRUMENT_SECTION instruments all outer loops in all files. A typical output of running pprof after executing the instrumented program is given below: Reading Profile files in profile.* NODE 0;CONTEXT 0;THREAD 0: --------------------------------------------------------------------------------------- %Time Exclusive Inclusive #Call #Subrs Inclusive Name msec total msec usec/call --------------------------------------------------------------------------------------- 100.0 0.015 865 1 1 865117 int main(int, char **) 100.0 0.161 865 1 4 865102 double multiply() 56.8 491 491 1 0 491203 Loop: double multiply()[ file = line,col = <23,3> to <30,3> ] 41.5 358 358 1 0 358627 Loop: double multiply()[ file = line,col = <38,3> to <46,7> ] 1.6 13 13 1 0 13664 Loop: double multiply()[ file = line,col = <16,10> to <21,12> ] 0.2 1 1 1 0 1447 Loop: double multiply()[ file = line,col = <34,3> to <36,18> ] Other forms of instrumentation understood in the selective instrumentation file is: 1) Entry/Exit instrumentation for C/C++/F90: BEGIN_INSTRUMENT_SECTION exit routine ="int foo()" code = "cout <<\"exiting foo\"< int main(int argc, char **argv) { int i; for (i=0; i < 5; i++) { printf("Inside main\n"); } return 0; } $ cat select.tau BEGIN_INSTRUMENT_SECTION file = "line_test.cpp" line = 9 code = "printf(\"i=%d: \", i);" END_INSTRUMENT_SECTION tau-2.16.4/examples/loops/c++/loop_test.cpp000066400000000000000000000025231062343042700204360ustar00rootroot00000000000000/* This demonstrates how data cache misses can affect the performance of an application. We show how the time/counts for a simple matrix multiplication algorithm dramatically reduce when we employ a strip mining optimization. */ #define SIZE 512 #define CACHE 64 double A[SIZE][SIZE], B[SIZE][SIZE], C[SIZE][SIZE]; double multiply(void) { int i, j, k, n, m; int vl, sz, strip; /*begin*/for (n = 0; n < SIZE; n++) for (m = 0; m < SIZE; m++) { /* this belongs to the second loop */ A[n][m] = B[n][m] = n + m ; C[n][m] = 0; /*ending */}/*for the second loop, not the first!*/ for (i = 0; i < SIZE; i ++) { for (j = 0; j < SIZE; j++) { for (k = 0; k < SIZE; k++) C[i][j] += A[i][k] * B[k][j]; } } /* Now we employ the strip mining optimization */ for(n = 0; n < SIZE; n++) for(m = 0; m < SIZE; m++) C[n][m] = 0; for(i=0; i < SIZE; i++) for(k=0; k < SIZE; k++) for(sz = 0; sz < SIZE; sz+=CACHE) { //vl = min(SIZE-sz, CACHE); vl = (SIZE - sz < CACHE ? SIZE - sz : CACHE); for(strip = sz; strip < sz+vl; strip++) C[i][strip] += A[i][k]*B[k][strip]; } return C[SIZE-10][SIZE-10]; // So KCC doesn't optimize this loop away. } int main(int argc, char **argv) { multiply(); return 0; } tau-2.16.4/examples/loops/c++/select.tau000066400000000000000000000005061062343042700177130ustar00rootroot00000000000000BEGIN_INSTRUMENT_SECTION loops file="loop_test.cpp" routine="multiply" # it also understands # as the wildcard in routine name # and * and ? wildcards in file name. You can also specify the full # name of the routine as is found in profile files. #loops file="loop_test.cpp" routine="double multiply#" END_INSTRUMENT_SECTION tau-2.16.4/examples/loops/c/000077500000000000000000000000001062343042700155725ustar00rootroot00000000000000tau-2.16.4/examples/loops/c/Makefile000066400000000000000000000004211062343042700172270ustar00rootroot00000000000000CC=tau_cc.sh -tau_makefile=../../../include/Makefile -tau_options='-optTauSelectFile=select.tau -optVerbose -optKeepFiles ' APP=loop_test $(APP): $(APP).o $(CC) $(APP).o -o $@ $(APP).o: $(APP).c $(CC) -c $(APP).c clean: /bin/rm -f *.o *.pdb *.inst.* $(APP) profile.* tau-2.16.4/examples/loops/c/README000066400000000000000000000000301062343042700164430ustar00rootroot00000000000000See ../c++/README file. tau-2.16.4/examples/loops/c/loop_test.c000066400000000000000000000024511062343042700177500ustar00rootroot00000000000000/* This demonstrates how data cache misses can affect the performance of an application. We show how the time/counts for a simple matrix multiplication algorithm dramatically reduce when we employ a strip mining optimization. */ #define SIZE 512 #define CACHE 64 double A[SIZE][SIZE], B[SIZE][SIZE], C[SIZE][SIZE]; double multiply(void) { int i, j, k, n, m; int vl, sz, strip; /*begin*/for (n = 0; n < SIZE; n++) for (m = 0; m < SIZE; m++) { /* this belongs to the second loop */ A[n][m] = B[n][m] = n + m ; C[n][m] = 0; /*ending */}/*for the second loop, not the first!*/ for (i = 0; i < SIZE; i ++) { for (j = 0; j < SIZE; j++) { for (k = 0; k < SIZE; k++) C[i][j] += A[i][k] * B[k][j]; } } /* Now we employ the strip mining optimization */ for(n = 0; n < SIZE; n++) for(m = 0; m < SIZE; m++) C[n][m] = 0; for(i=0; i < SIZE; i++) for(k=0; k < SIZE; k++) for(sz = 0; sz < SIZE; sz+=CACHE) { /*vl = min(SIZE-sz, CACHE); */ vl = (SIZE - sz < CACHE ? SIZE - sz : CACHE); for(strip = sz; strip < sz+vl; strip++) C[i][strip] += A[i][k]*B[k][strip]; } return C[SIZE-10][SIZE-10]; } int main(int argc, char **argv) { multiply(); return 0; } tau-2.16.4/examples/loops/c/select.tau000066400000000000000000000001531062343042700175630ustar00rootroot00000000000000BEGIN_INSTRUMENT_SECTION loops file="loop_test.c" routine="double multiply(void) C" END_INSTRUMENT_SECTION tau-2.16.4/examples/loops/f90/000077500000000000000000000000001062343042700157465ustar00rootroot00000000000000tau-2.16.4/examples/loops/f90/Makefile000066400000000000000000000010251062343042700174040ustar00rootroot00000000000000TAUROOTDIR = ../../.. .SUFFIXES : .f90 include $(TAUROOTDIR)/include/Makefile # We use TAU_COMPILER (defined in the above stub Makefile) for instrumenting # the source code. We can pass it optional arguments. See tau_compiler.sh -help OPTS = -optVerbose -optTauSelectFile=select.tau -optCompile=$(TAU_F90_SUFFIX) -optKeepFiles F90=$(TAU_COMPILER) $(OPTS) $(TAU_F90) APP=loop_test $(APP): $(APP).o @$(F90) $(APP).o -o $@ $(APP).o: $(APP).f90 @$(F90) -c $(APP).f90 clean: /bin/rm -f *.o *.pdb *.inst.* $(APP) profile.* tau-2.16.4/examples/loops/f90/loop_test.f90000066400000000000000000000010361062343042700202760ustar00rootroot00000000000000subroutine bar(arg) integer arg print *, "inside bar arg = ", arg end subroutine bar subroutine foo(iVal) integer iVal integer j, k ! Do something here... print *, "Iteration = ", iVal do j = 1, 5 do k = 1, 2 print *, "j = ", j end do end do do 10, i = 1, 3 call bar(i+iVal) 10 continue print *, "after calling bar in foo" end program main integer i print *, "test program" do 10, i = 1, 3 call foo(i) 10 continue end program main tau-2.16.4/examples/loops/f90/select.tau000066400000000000000000000003671062343042700177460ustar00rootroot00000000000000BEGIN_INSTRUMENT_SECTION loops file="loop_test.f90" routine="FOO" # it also understands # as the wildcard in routine name # and * and ? wildcards in file name. The routine # name must be in uppercase letters as shown above END_INSTRUMENT_SECTION tau-2.16.4/examples/malloc/000077500000000000000000000000001062343042700154635ustar00rootroot00000000000000tau-2.16.4/examples/malloc/Makefile000066400000000000000000000025611062343042700171270ustar00rootroot00000000000000#**************************************************************************** #* TAU Portable Profiling Package ** #* http://www.cs.uoregon.edu/research/tau ** #**************************************************************************** #* Copyright 2004 ** #* Department of Computer and Information Science, University of Oregon ** #* Advanced Computing Laboratory, Los Alamos National Laboratory ** #**************************************************************************** ####################################################################### ## pC++/Sage++ Copyright (C) 1993,1995 ## ## Indiana University University of Oregon University of Rennes ## ####################################################################### TAUROOTDIR = ../.. include $(TAUROOTDIR)/include/Makefile CXX = $(TAU_CXX) CC = $(TAU_CC) CFLAGS = $(TAU_INCLUDE) $(TAU_INCLUDE_MEMORY) $(TAU_DEFS) -UTAU_MPI LIBS = $(TAU_LIBS) LDFLAGS = $(USER_OPT) RM = /bin/rm -f TARGET = klargest OBJS = main.o select.o ############################################## all: $(TARGET) install: $(TARGET) $(TARGET): $(OBJS) $(CXX) $(LDFLAGS) $(OBJS) -o $@ $(LIBS) %.o:%.cpp $(CXX) $(CFLAGS) -c $< clean: $(RM) $(OBJS) $(TARGET) ############################################## tau-2.16.4/examples/malloc/README000066400000000000000000000042461062343042700163510ustar00rootroot00000000000000To use TAU's malloc and track the size of memory and location in source code where allocation and deallocation of memory takes place, follow the following steps as shown in this example: 1) Add header to your source code after #include 2) Instrument the application as you'd normally instrument (main must be instrumented). 3) Change your Makefile and add $(TAU_INCLUDE_MEMORY) to the compilation of C/C++ source code: CFLAGS = $(TAU_INCLUDE) $(TAU_INCLUDE_MEMORY) $(TAU_DEFS) LDFLAGS = $(TAU_LIBS) We substitute malloc.h from TAU's include/Memory directory by specifying this flag 4) Execute the application. For a sample run, we see at the end of pprof output: USER EVENTS Profile :NODE 0, CONTEXT 0, THREAD 0 --------------------------------------------------------------------------------------- NumSamples MaxValue MinValue MeanValue Std. Dev. Event Name --------------------------------------------------------------------------------------- 1 4.002E+04 4.002E+04 4.002E+04 0 free size 1 8000 8000 8000 0 free size 3 3E+04 6000 1.7E+04 9899 free size 3 3E+04 6000 1.7E+04 9899 free size 7 6000 600 2229 1806 free size 7 6000 600 2229 1806 free size 2 240 240 240 0 free size 2 240 240 240 0 free size 1 4.002E+04 4.002E+04 4.002E+04 0 malloc size 1 8000 8000 8000 0 malloc size 12 3E+04 240 5590 8385 malloc size 12 3E+04 240 5590 8385 malloc size --------------------------------------------------------------------------------------- tau-2.16.4/examples/malloc/decl.h000066400000000000000000000014731062343042700165500ustar00rootroot00000000000000/**************************************************************************** ** File : decl.h ** Author : Sameer Shende ** Contents : function prototypes for kl.c to calculate kth largest elt. *****************************************************************************/ #ifndef _DECL_H #define _DECL_H /* function declarations */ int select_kth_largest(int k, int *S, int n); void interchange(int *a, int *b); void setup(int *arr); void quicksort(int *arr, int m, int n); void sort_5elements(int *arr); int kth_largest_qs(int k, int *arr, int size); void display_array(int *A, int nelems); int floor (int num, int den); int ceil (int num, int den); #define DEFAULT_SIZE 10000 #define DEFAULT_K 4 /* fourth largest element from the array */ #define middle(i) 5*i+2 #endif /* _DECL_H */ /* EOF decl.h */ tau-2.16.4/examples/malloc/main.cpp000066400000000000000000000222151062343042700171150ustar00rootroot00000000000000#include /**************************************************************************** ** File : klargest.c ** Author : Sameer Shende ** Contents : program to calculate the kth largest element in two ways ** Directory : $(TAUDIR)/examples/autoinstrument/ ** Usage : program [] [] ** e.g., % klargest 5000 675 *****************************************************************************/ #include #include #include using namespace std; #include #include #include /* for INT_MIN */ #include #include "decl.h" /* the large array is partitioned into 5 elements each 2, 7, 12 etc. are positions of the middle elements in the array */ int size; /* global - size of the array */ int *M; /* the median array */ /************************************************************************** ** Function : interchange ** Parameters : two integer pointers a, and b ** Description: interchanges the contents of a and b. ** Returns : nothing ***************************************************************************/ void interchange(int *a, int *b) { //TAU_PROFILE("void interchange(int *, int *)", " ", TAU_USER); /* interchanges the contents of the two variables containing integers. */ int temp; temp = *a; *a = *b; *b = temp; } /************************************************************************** ** Function : setup ** Parameters : array to be initialized ** Description: assigns values to elements in the array used for finding ** the kth largest element. ** Returns : nothing ***************************************************************************/ void setup(int *arr) { TAU_PROFILE("void setup(int *)", " ", TAU_USER); int i; /* setup */ arr[0] = 26; arr[1] = 5; arr[2] = 37; arr[3] = 1; arr[4] = 61; arr[5] = 11; arr[6] = 59; arr[7] = 15; arr[8] = 48; arr[9] = 19; if (size > 10) { for (i=10; i< size; i++) arr[i] = arr[i%10]; } /* Uses the first ten values repeatedly and fills the array */ } /************************************************************************** ** Function : quicksort ** Parameters : array to be sorted and lower and upper limits m and n resp. ** Description: uses quicksort recursively to sort elements in O(nlog n) ** time complexity in decreasing order.. ** Returns : nothing ***************************************************************************/ /* quick sort */ void quicksort(int *arr, int m, int n) { TAU_PROFILE("void quicksort(int *, int, int)", " ", TAU_USER); /* sort the array in decreasing order */ int k; /* control key */ int i, j; /* k is chosen as the control key and i and j are chosen such that at any time, arr[l] >= k for l < i and arr[l] <= k for l > j. It is assumed that arr[m] >= arr[n+1] */ /* printf("quicksort %d %d\n [", m, n); for(i=m; i k); /* Decreasing order for largest element first */ do { j = j - 1; } while (arr[j] < k); /* Decreasing order */ if (i < j) interchange(&arr[i], &arr[j]); } while (i < j); interchange(&arr[m], &arr[j]); /* pivot */ quicksort(arr, m, j - 1); /* left portion sorted */ quicksort(arr, j + 1, n); /* right side sorted - so array is sorted */ } /*if */ } /************************************************************************** ** Function : sort_5elements ** Parameters : array of 5 elements to be sorted ** Description: sorts the 5 elements in decreasing order ** Returns : nothing ***************************************************************************/ void sort_5elements(int *arr) { TAU_PROFILE("void sort_5elements(int *)", " ", TAU_USER); /* sort the first five elements of the array arr */ quicksort(arr, 0, 4); /* could be done by if statements too - but this way its easier to extend it for 7 element based select */ } /************************************************************************** ** Function : kth_largest_qs ** Parameters : k for kth largest, array to be sorted and size of array ** Description: sorts the array using quicksort and finds the kth largest ** element ** Returns : kth largest element ***************************************************************************/ int kth_largest_qs(int k, int *arr, int size) { TAU_PROFILE("int kth_largest_qs(int, int *, int)", " ", TAU_USER); /* first we sort the array and then return the kth largest element */ quicksort(arr, 0, size - 1); /* sort the array */ return arr[k-1]; /* return the kth largest */ } /************************************************************************** ** Function : display_array ** Parameters : array and size of array ** Description: for debugging, prints contents of the array ** Returns : nothing ***************************************************************************/ void display_array(int *A, int nelems) { TAU_PROFILE("void display_array(int *, int)", " ", TAU_USER); int i; for(i=0; i < nelems; i++) { printf("A[%d] = %d\n", i, A[i]); } } /* utility functions */ /************************************************************************** ** Function : floor ** Parameters : numerator and denominator ** Description: calculates the floor of num/den ** Returns : floor ***************************************************************************/ int floor (int num, int den) { TAU_PROFILE("int floor(int, int)", " ", TAU_USER); return num / den; } /************************************************************************** ** Function : ceil ** Parameters : numerator and denominator ** Description: calculates the ceiling of num/den ** Returns : ceiling ***************************************************************************/ int ceil (int num, int den) { //TAU_PROFILE("int ceil(int, int)", " ", TAU_USER); return (num % den > 0) ? (num / den + 1) : (num / den); } /************************************************************************** ** Function : main ** Parameters : command line parameters. ** Description: Usage : main [] [] ** Calculates kth largest element using two different algorithms ** and returns the value and the time statistics for the two. ** Returns : nothing ***************************************************************************/ int main(int argc, char **argv) { TAU_PROFILE("int main(int, char **)", " ", TAU_DEFAULT); TAU_INIT(&argc, &argv); #ifndef TAU_MPI TAU_PROFILE_SET_NODE(0); #endif /* TAU_MPI */ int klarge, k; struct timeval tp1, tp2; float time_taken; int *A; /* extract the size of the array and k from the command line parameters */ if (argc > 1) size = atoi(argv[1]); else { size = DEFAULT_SIZE; printf(" Usage : main [] [] \n"); printf(" Calculates kth largest element using two different algorithms\n"); printf(" and returns the value and the time statistics for the two.\n"); } if (argc > 2) k = atoi(argv[2]); /* kth largest */ else k = DEFAULT_K; if (k > size) { printf("ERROR: Please specify a value for k (%d) that is less than the array size (%d)\n", k, size); exit(0); } /* there could be upto 4 leftover elements */ A = (int *) malloc((size + 4) * sizeof(int)); /* allocate the array */ if (A == (int *) NULL) { perror("Cannot malloc the size of array"); exit(1); } M = (int *) malloc(ceil(size,5)*sizeof(int)); /*allocate memory for Median*/ /* its ok to recycle this array so its allocated here instead of doing it in select_kth_largest */ if (M == (int *) NULL) { perror("Cannot malloc M array"); /* its ok to recycle this array so its allocated here instead of doing it in select_kth_largest */ exit(1); } /* setup */ setup(A); /* display_array(A,size); */ gettimeofday(&tp1, NULL); /* timing info. */ klarge = select_kth_largest(k, A, size); /* using SELECT O(n) algo. */ gettimeofday(&tp2, NULL); /* timing info. */ printf("****************************************************\n"); printf("Using select_kth_largest, size %d, %d th largest element = %d\n", size,k, klarge); time_taken = (tp2.tv_sec - tp1.tv_sec) + (tp2.tv_usec - tp1.tv_usec) * 1e-6; printf("Time taken (wall clock) = %f secs\n", time_taken); printf("- - - - - - - - - - - - - - - - - -\n"); /* Now calculate the kth largest element in A using the same array but the "quick and dirty" quicksort O(nlog n) algorithm */ gettimeofday(&tp1, NULL); /* timing info */ klarge = kth_largest_qs(k, A, size); /* calculates the kth largest element of A */ gettimeofday(&tp2, NULL); /* print results */ printf("Using quicksort, size %d, %d th largest element = %d\n", size, k, klarge); time_taken = (tp2.tv_sec - tp1.tv_sec) + (tp2.tv_usec - tp1.tv_usec) * 1e-6; printf("Time taken (wall clock) = %f secs\n", time_taken); /* printf("%d %f\n", size, time_taken); */ free(A); free(M); } /* EOF klargest.cpp */ tau-2.16.4/examples/malloc/select.cpp000066400000000000000000000110611062343042700174450ustar00rootroot00000000000000#include /**************************************************************************** ** File : select.cpp ** Author : Sameer Shende ** Contents : program to calculate the kth largest element in two ways ** Directory : $(TAUDIR)/examples/autoinstrument/ ** Usage : program [] [] ** e.g., % klargest 5000 675 *****************************************************************************/ #include #include #include using namespace std; #include #include #include /* for INT_MIN */ #include #include "decl.h" extern int *M; /* the median array */ /************************************************************************** ** Function : select_kth_largest ** Parameters : k, array of integers S and n - the size of array. ** Description: The SELECT algorithm to find the kth largest element from ** the set of integers S in O(n) time. Used recursively. ** Returns : returns the kth largest element. ***************************************************************************/ int select_kth_largest(int k, int *S, int n) { TAU_PROFILE("int select_kth_largest(int, int *, int)", " ", TAU_USER); /* return the kth largest element from the ordered set S of integers */ /* n is the number of elements in S */ /* Algorithm : if n < 50 then sort in dec. order S, return kth largest element in S else divide S into ceil(n/5) sequences of 5 elements each with upto four leftover elements sort in dec order each 5 element sequence let M be the sequence of medians of the 5 element sets m = select_kth_largest(ceil(n(M)/2), M, n/5); let S1, S2 and S3 be the sequences of elements in S greater than, equal to and less than m respectively. if n(S1) >=k then return select_kth_largest(k, S1, n(S1)); else if (n(S1) + n(S2) >= k) then return m else return select_kth_largest (k - n(S1) - n(S2), S3); */ int n_M, n_S1, n_S2, n_S3; /* number of elements in M, S1, S2 and S3 resp. */ int *S1, *S3; /* the other arrays */ int m; /* the median element */ int i, leftover, ret; if (n < 50) return kth_largest_qs(k, S, n); /* Use quicksort to sort the array S and return the kth largest element */ leftover = n % 5; /* upto four leftover elements */ if (leftover != 0) { /* then pad the remaining elements with min. negative values */ for (i=n; i< n + 5 - leftover; i++) S[i] = INT_MIN; /* number of leftover elements */ /* INT_MIN is defined for each system in /usr/include/limits.h */ } /* after padding the remaining array, sort the 5 element sequence */ n_M = ceil(n, 5); /* number of elements in M */ for(i=0; i< n_M; i++) { sort_5elements(&S[5*i]); /* beginning element */ } /* 5 element sequences are sorted */ /* display_array(S, ceil(n,5)*5); */ /* size of padded array is ceil(n,5)*5 */ S1 = (int *) malloc ((3*n/4) * sizeof(int)); /* allocate S1 */ S3 = (int *) malloc ((3*n/4) * sizeof(int)); /* allocate S3 */ if((S1 == (int *) NULL) || (S3 == (int *) NULL)) { perror("S1 or S3 malloc error"); exit(1); } for (i=0; i< n_M; i++) M[i] = S[middle(i)]; /* fill up the median array */ m = select_kth_largest(ceil(n_M,2), M, n_M); /* calculate the median element*/ /* construct S1, S2, and S3 as sequences of elements in S greater than, equal to and less than m. Don't need a separate S2 array. */ /* initialize the count of elements in S1, S2, S3 */ n_S1 = n_S2 = n_S3 = 0; /* go through every element in S */ for (i = 0; i < n; i++) { if(S[i] > m) S1[n_S1++] = S[i]; /* goes to S1 */ else if (S[i] < m) S3[n_S3++] = S[i]; /* goes to S3 */ else n_S2++; /* S2 count incremented goes to S2 */ } /* now we have S1, and S3 */ if(n_S1 >= k) /* S1 has the elements greater than m and there are greater than k elements, so its bound to be in this section */ { /* free memory */ /* don't need S3 */ free(S3); ret = select_kth_largest(k, S1, n_S1); free(S1); /* before returning clean up S1 */ return ret; } else { if(n_S1 + n_S2 >= k) /* its not in S1, but its in S2 */ { /* free memory */ /* don't need S1 and S3 */ free(S1); free(S3); return m; /* the median that we had calculated earlier */ } else /* its in S3 */ { /* free memory */ /* don't need S1 */ free(S1); ret = select_kth_largest(k - n_S1 - n_S2, S3, n_S3); free(S3); /* before returning clean up S3 */ return ret; } } } tau-2.16.4/examples/mapping/000077500000000000000000000000001062343042700156475ustar00rootroot00000000000000tau-2.16.4/examples/mapping/README000066400000000000000000000047531062343042700165400ustar00rootroot00000000000000This directory contains an illustration of the TAU mapping API and how we can use it to relate the performance data on a per-object basis. In this simple demonstration, there is a class (Myclass) with a method (Run()) that we wish to track for different instances of the class. There are objects x, y, z that are created and an object a (which is a special object that we wish to track). The macros can be placed in two ways. In the first case, the mappings are "embedded", or the class definition is extended by embedded the TAU timer in it. In the second case, an "external" association is used, in which case, there's no need for any extensions to the class definition. In both cases, we profile the method as well (so we can see the aggregate time spent in both cases). For the sake of simplicity, the Run method uses a "sleep(2)" delay. So, we can see the contribution (inclusive time) of "MyClass::Run() for object a" to be 2 secs as shown below: NODE 0;CONTEXT 0;THREAD 0: --------------------------------------------------------------------------------------- %Time Exclusive Inclusive #Call #Subrs Inclusive Name msec total msec usec/call --------------------------------------------------------------------------------------- 100.0 0.213 6,021 1 3 6021741 main() int (int, char **) 100.0 6,021 6,021 3 0 2007173 MyClass::Run() void (void) 33.2 0.009 2,001 1 1 2001652 MyClass::Run() for object a For external association, we use the object address as a key for mapping data. Here, we show the performance data for the MyClass::Run() method for two different objects "a" and "x". Reading Profile files in profile.* NODE 0;CONTEXT 0;THREAD 0: --------------------------------------------------------------------------------------- %Time Exclusive Inclusive #Call #Subrs Inclusive Name msec total msec usec/call --------------------------------------------------------------------------------------- 100.0 0.22 6,028 1 3 6028623 main() int (int, char **) 100.0 6,028 6,028 3 0 2009463 MyClass::Run() void (void) 33.3 0.004 2,009 1 1 2009990 MyClass::Run() for object x 33.3 0.009 2,008 1 1 2008423 MyClass::Run() for object a tau-2.16.4/examples/mapping/embedded/000077500000000000000000000000001062343042700174005ustar00rootroot00000000000000tau-2.16.4/examples/mapping/embedded/Makefile000066400000000000000000000026621062343042700210460ustar00rootroot00000000000000#**************************************************************************** #* TAU Portable Profiling Package ** #* http://www.cs.uoregon.edu/research/tau ** #**************************************************************************** #* Copyright 1997 ** #* Department of Computer and Information Science, University of Oregon ** #* Advanced Computing Laboratory, Los Alamos National Laboratory ** #**************************************************************************** ####################################################################### ## pC++/Sage++ Copyright (C) 1993,1995 ## ## Indiana University University of Oregon University of Rennes ## ####################################################################### TAUROOTDIR = ../../.. include $(TAUROOTDIR)/default/lib/Makefile.tau CXX = $(TAU_CXX) CC = $(TAU_CC) CFLAGS = $(TAU_INCLUDE) $(TAU_DEFS) LIBS = $(TAU_LIBS) $(LEXTRA1) LDFLAGS = $(USER_OPT) MAKEFILE = Makefile PRINT = pr RM = /bin/rm -f TARGET = embedded EXTRAOBJS = ############################################## all: $(TARGET) install: $(TARGET) $(TARGET): $(TARGET).o $(CXX) $(LDFLAGS) $(TARGET).o -o $@ $(LIBS) $(TARGET).o : inst.cpp $(CXX) $(CFLAGS) -c inst.cpp -o $@ clean: $(RM) $(TARGET).o $(TARGET) ############################################## tau-2.16.4/examples/mapping/embedded/inst.cpp000066400000000000000000000017111062343042700210610ustar00rootroot00000000000000/* This example illustrates the use of the TAU Mapping API for tracking the time spent in each instance of an object. We use an embedded association here. */ #include #include #include #include class MyClass { public: MyClass() { TAU_MAPPING_LINK(runtimer, TAU_USER); } ~MyClass() { } void Run(void) { TAU_MAPPING_PROFILE(runtimer); // For one object TAU_PROFILE("MyClass::Run()", " void (void)", TAU_USER1); // For all cout <<"Sleeping for 2 secs..."< #include #include #include class MyClass { public: MyClass() { } ~MyClass() { } void Run(void) { TAU_MAPPING_OBJECT(runtimer) TAU_MAPPING_LINK(runtimer, (TauGroup_t) this); // EXTERNAL ASSOCIATION TAU_MAPPING_PROFILE(runtimer); // For one object TAU_PROFILE("MyClass::Run()", " void (void)", TAU_USER1); // For all cout <<"Sleeping for 2 secs..."< /* This example demonstrates the use of TAU_TRACK_MEMORY... macros in TAU. */ /* There are two modes of operation: 1) the user explicitly inserts TAU_TRACK_MEMORY_HERE() calls in the source code and the memory event is triggered at those locations, and 2) the user enables tracking memory by calling TAU_TRACK_MEMORY() and an interrupt is generated every 10 seconds and the memory event is triggered with the current value. Also, this interrupt interval can be changed by calling TAU_SET_INTERRUPT_INTERVAL(value). The tracking of memory events in both cases can be explictly enabled or disabled by calling the macros TAU_ENABLE_TRACKING_MEMORY() or TAU_DISABLE_TRACKING_MEMORY() respectively.*/ int main(int argc, char **argv) { TAU_PROFILE("main()", " ", TAU_DEFAULT); TAU_PROFILE_SET_NODE(0); TAU_TRACK_MEMORY_HERE(); int *x = new int[5*1024*1024]; TAU_TRACK_MEMORY_HERE(); return 0; } tau-2.16.4/examples/memoryleakdetect/000077500000000000000000000000001062343042700175525ustar00rootroot00000000000000tau-2.16.4/examples/memoryleakdetect/c/000077500000000000000000000000001062343042700177745ustar00rootroot00000000000000tau-2.16.4/examples/memoryleakdetect/c/Makefile000066400000000000000000000004411062343042700214330ustar00rootroot00000000000000include ../../../include/Makefile TAUOPTS = -optVerbose -optKeepFiles -optDetectMemoryLeaks CC= $(TAU_COMPILER) $(TAUOPTS) $(TAU_CC) simple: simple.o @$(CC) $< -o $@ simple.o: simple.c @$(CC) -c $< clean: /bin/rm -rf simple simple.o *.inst.* *.pdb profile.* *.trc MULTI_* *.edf tau-2.16.4/examples/memoryleakdetect/c/simple.c000066400000000000000000000017211062343042700214320ustar00rootroot00000000000000#include #include /* there is a memory leak in bar when it is invoked with 5 < value <= 15 */ int bar(int value) { printf("Inside bar: %d\n", value); int *x; if (value > 5) { printf("looks like it came here from g!\n"); x = (int *) malloc(sizeof(int) * value); x[2]= 2; /* do not free it! create a memory leak, unless the value is > 15 */ if (value > 15) free(x); } else { /* value <=5 no leak */ printf("looks like it came here from foo!\n"); x = (int *) malloc(sizeof(int) * 45); x[23]= 2; free(x); } return 0; } int g(int value) { printf("Inside g: %d\n", value); return bar(value); } int foo(int value) { printf("Inside f: %d\n", value); if (value > 5) g(value); else bar(value); return 0; } int main(int argc, char **argv) { int *x; int *y; printf ("Inside main\n"); foo(12); /* leak */ foo(20); /* no leak */ foo(2); /* no leak */ foo(13); /* leak */ } tau-2.16.4/examples/memoryleakdetect/f90/000077500000000000000000000000001062343042700201505ustar00rootroot00000000000000tau-2.16.4/examples/memoryleakdetect/f90/Makefile000066400000000000000000000005561062343042700216160ustar00rootroot00000000000000F90= tau_f90.sh -tau_makefile=../../../include/Makefile -tau_options='-optVerbose -optKeepFiles -optTauSelectFile=select.tau ' # You may also invoke it #F90= tau_f90.sh -tau_makefile=../../../include/Makefile -tau_options='-optVerbose -optKeepFiles -optDetectMemoryLeaks' foo: foo.f90 $(F90) foo.f90 -o foo clean: /bin/rm -f foo.o foo *.pdb *.inst.f90 profile.* tau-2.16.4/examples/memoryleakdetect/f90/foo.f90000066400000000000000000000022401062343042700212510ustar00rootroot00000000000000 subroutine bar(value) integer:: value integer, dimension(:), allocatable:: X if (value .gt. 3) then print *, "bar called with value=", value allocate(X(value)) X(2) = 2 ! Do not free X. Create a memory leak unless value > 15 if (value .gt. 15) deallocate(X) else print *, "bar called from foo!" allocate(X(45)) X(23) = 2 deallocate(X) endif end subroutine bar subroutine g(value) integer:: value print *, "Inside g: value = ", value call bar(value) end subroutine g subroutine foo(value) integer:: value, ierr print *, "Inside foo: value = ", value ! Create two distinct paths to reach bar if (value .gt. 5) then call g(value) else call bar(value) endif end subroutine foo program main call TAU_PROFILE_SET_NODE(0) call foo(12) ! leak call foo(20) ! no leak call foo(2) ! no leak call foo(13) ! leak call foo(4) ! leak end program main tau-2.16.4/examples/memoryleakdetect/f90/select.tau000066400000000000000000000001651062343042700221440ustar00rootroot00000000000000BEGIN_INSTRUMENT_SECTION #memory file="foo.f90" routine="#" memory file="foo.f90" routine="#" END_INSTRUMENT_SECTION tau-2.16.4/examples/mixedmode/000077500000000000000000000000001062343042700161675ustar00rootroot00000000000000tau-2.16.4/examples/mixedmode/Makefile000066400000000000000000000065161062343042700176370ustar00rootroot00000000000000#**************************************************************************** #* TAU Portable Profiling Package ** #* http://www.cs.uoregon.edu/research/tau ** #**************************************************************************** #* Copyright 2001 ** #* Department of Computer and Information Science, University of Oregon ** #* Advanced Computing Laboratory, Los Alamos National Laboratory ** #**************************************************************************** TAUROOTDIR = ../.. include $(TAUROOTDIR)/include/Makefile USE_TAU = 1 # Comment above line to disable TAU CXX = $(TAU_CXX) CC = $(TAU_CC) PDTPARSE = $(PDTDIR)/$(PDTARCHDIR)/bin/cxxparse TAUINSTR = $(TAUROOTDIR)/$(CONFIG_ARCH)/bin/tau_instrumentor CFLAGS = $(TAU_INCLUDE) $(TAU_DEFS) $(TAU_MPI_INCLUDE) LIBS = $(TAU_MPI_LIBS) $(TAU_LIBS) -lm LDFLAGS = $(USER_OPT) $(TAU_LDFLAGS) TARGET = app EXTRAOBJS = TAU_WRAPPER_LIB = libTauWrapper.a RM = /bin/rm -f ############################################## ifdef USE_TAU COMP_RULE = $(PDTPARSE) $< $(CFLAGS); \ $(TAUINSTR) $*.pdb $< -o $*.inst.cpp ; \ $(CXX) $(CFLAGS) -c $*.inst.cpp -o $@ ; \ rm -f $*.pdb ; else # DISABLE TAU INSTRUMENTATION TAU_DEFS = # Don't use TAU MPI wrapper library TAU_MPI_LIBS = -L/usr/local/packages/mpich/lib -lmpich TAU_LIBS = TAU_WRAPPER_LIB = COMP_RULE = $(CXX) $(CFLAGS) -c $< -o $@ ; endif AR = ar ARFLAGS = rcv ############# For KAI KCC compiler, replace AR accordingly ####### #KAI#AR = $(CXX) #ENDIF# #KAI#ARFLAGS = --one_per -o #ENDIF# ################################################################## ############# For SGI CC compiler, replace AR accordingly ####### #SGICC#AR = $(CXX) -ar #ENDIF# #SGICC#ARFLAGS = -o #ENDIF# ################################################################## ############# For FUJITSU FCC compiler, replace AR accordingly ####### #FUJITSU#AR = $(CXX) --ar #ENDIF# #FUJITSU#ARFLAGS = -o #ENDIF# ################################################################## ############# For SUN CC compiler, replace AR accordingly ####### #SOL2CC#AR = $(CXX) -xar #ENDIF# #SOL2CC#ARFLAGS = -o #ENDIF# ################################################################## ############################################## all: $(TARGET) install: $(TARGET) OBJS = app.o thr.o processing.o $(TARGET): $(OBJS) $(TAU_WRAPPER_LIB) $(CXX) $(LDFLAGS) $(OBJS) $(TAU_WRAPPER_LIB) -o $@ $(LIBS) # Compilation rule .cpp.o: $(COMP_RULE) # Exception to the above rule: # Thread file cannot use PDT (static analysis limits: TAU_REGISTER_THREAD ) thr.o: thr.cpp $(CXX) $(CFLAGS) -c $< -o $@ # Make the library libTauWrapper.a: TauWrapper.o $(AR) $(ARFLAGS) libTauWrapper.a TauWrapper.o TauWrapper.o: TauWrapper.cpp $(CXX) $(CFLAGS) -c $< -o $@ # #$(TARGET).o : $(TARGET).cpp # $(CXX) $(CFLAGS) -c $(TARGET).cpp clean: $(RM) $(OBJS) $(TARGET) $(OBJS:.o=.inst.cpp) \ TauWrapper.o libTauWrapper.a profile.* tautrace.* events.* ############################################## tau-2.16.4/examples/mixedmode/README000066400000000000000000000416521062343042700170570ustar00rootroot00000000000000This example illustrates the use of PDT, hand-instrumentation (for threads), MPI library instrumentation and TAU system call wrapper library instrumentation. To use this, you must configure TAU using: % configure -mpiinc= -mpilib= -pdt= -pthread The application spawns a thread. The thread calls work() which calls sleep, getpid and write calls. We want to track the time spent in system calls getpid, sleep and write (invoked by work() in processing.cpp). The Makefile is organized such that TAU is enabled or disabled by uncommenting or commenting the USE_TAU variable in the Makefile respectively. Note: since the threaded function cannot be instrumented using PDT, we put it in thr.c and have a special rule for compiling this file (not using PDT). The default .cpp.o rule compiles all files (app.cpp, processing.cpp) using PDT. Run the example using: % mpirun -np 2 app and you'll see that performance data on thread 1 in each context has getpid, sleep and write routines. You'll also see that MPI calls are present on thread 1 (rank 0 sends an int to rank 1). This can help you build an appropriate syscall wrapper library to instrument those functions whose source code is not available for instrumentation. [sameer@neutron mixedmode]$ ls Makefile TauWrapper.cpp TauWrapper.h app.cpp processing.cpp thr.cpp [sameer@neutron mixedmode]$ cat ../../.last_config -pdt=/scratch1/sameer/pdt/pdtoolkit-2.0 -mpiinc=/usr/local/packages/mpich/include -mpilib=/usr/local/packages/mpich/lib -pthread [sameer@neutron mixedmode]$ head -15 Makefile #**************************************************************************** #* TAU Portable Profiling Package ** #* http://www.cs.uoregon.edu/research/tau ** #**************************************************************************** #* Copyright 2001 ** #* Department of Computer and Information Science, University of Oregon ** #* Advanced Computing Laboratory, Los Alamos National Laboratory ** #**************************************************************************** TAUROOTDIR = ../.. include $(TAUROOTDIR)/include/Makefile USE_TAU = 1 # Comment above line to disable TAU [sameer@neutron mixedmode]$ make make: *** Warning: File `../../include/Makefile' has modification time in the future (2001-12-10 21:17:14 > 2001-12-10 15:24:32) /scratch1/sameer/pdt/pdtoolkit-2.0/i386_linux/bin/cxxparse app.cpp -I/home/users/sameer/tau2/include -DPROFILING_ON -DTAU_STDCXXLIB -DNO_RTTI -DTAU_GNU -DPTHREADS -DTAU_MPI -I/usr/local/packages/mpich/include; ../../i386_linux/bin/tau_instrumentor app.pdb app.cpp -o app.inst.cpp ; g++ -I/home/users/sameer/tau2/include -DPROFILING_ON -DTAU_STDCXXLIB -DNO_RTTI -DTAU_GNU -DPTHREADS -DTAU_MPI -I/usr/local/packages/mpich/include -c app.inst.cpp -o app.o ; rm -f app.pdb ; edgcpfe app.cpp --> /tmp/13928.il taucpdisp -t /tmp/13928.il --> app.pdb g++ -I/home/users/sameer/tau2/include -DPROFILING_ON -DTAU_STDCXXLIB -DNO_RTTI -DTAU_GNU -DPTHREADS -DTAU_MPI -I/usr/local/packages/mpich/include -c thr.cpp -o thr.o /scratch1/sameer/pdt/pdtoolkit-2.0/i386_linux/bin/cxxparse processing.cpp -I/home/users/sameer/tau2/include -DPROFILING_ON -DTAU_STDCXXLIB -DNO_RTTI -DTAU_GNU -DPTHREADS -DTAU_MPI -I/usr/local/packages/mpich/include; ../../i386_linux/bin/tau_instrumentor processing.pdb processing.cpp -o processing.inst.cpp ; g++ -I/home/users/sameer/tau2/include -DPROFILING_ON -DTAU_STDCXXLIB -DNO_RTTI -DTAU_GNU -DPTHREADS -DTAU_MPI -I/usr/local/packages/mpich/include -c processing.inst.cpp -o processing.o ; rm -f processing.pdb ; edgcpfe processing.cpp --> /tmp/13943.il taucpdisp -t /tmp/13943.il --> processing.pdb g++ -I/home/users/sameer/tau2/include -DPROFILING_ON -DTAU_STDCXXLIB -DNO_RTTI -DTAU_GNU -DPTHREADS -DTAU_MPI -I/usr/local/packages/mpich/include -c TauWrapper.cpp -o TauWrapper.o ar rcv libTauWrapper.a TauWrapper.o a - TauWrapper.o g++ app.o thr.o processing.o libTauWrapper.a -o app -L/home/users/sameer/tau2/i386_linux/lib -lTauMpi-pthread -L/usr/local/packages/mpich/lib -lpmpich -lmpich -L/home/users/sameer/tau2/i386_linux/lib -ltau-pthread -lpthread -lm make: *** Warning: Clock skew detected. Your build may be incomplete. [sameer@neutron mixedmode]$ ls Makefile TauWrapper.o app.inst.cpp processing.cpp thr.cpp TauWrapper.cpp app app.o processing.inst.cpp thr.o TauWrapper.h app.cpp libTauWrapper.a processing.o [sameer@neutron mixedmode]$ mpirun -np 2 app After Initialization - my rank is 0 out of 2 procs Inside work (called from threaded_func): rank 0, pid = 14057 Inside work (called from threaded_func): rank 1, pid = 14056 After Initialization - my rank is 1 out of 2 procs rank = 1:Received data = 5767, tag = 34, source = 0 [sameer@neutron mixedmode]$ ls Makefile app libTauWrapper.a profile.0.0.0 thr.cpp TauWrapper.cpp app.cpp processing.cpp profile.0.0.1 thr.o TauWrapper.h app.inst.cpp processing.inst.cpp profile.1.0.0 TauWrapper.o app.o processing.o profile.1.0.1 [sameer@neutron mixedmode]$ pprof Reading Profile files in profile.* NODE 0;CONTEXT 0;THREAD 0: --------------------------------------------------------------------------------------- %Time Exclusive Inclusive #Call #Subrs Inclusive Name msec total msec usec/call --------------------------------------------------------------------------------------- 100.0 1 2,202 1 5 2202686 int main(int, char **) 91.4 2,011 2,012 1 2 2012498 MPI_Finalize() 8.6 188 188 1 35 188501 MPI_Init() 0.0 0.648 0.65 1 1 650 MPI_Sendrecv() 0.0 0.291 0.291 1 0 291 MPI_Send() 0.0 0.105 0.105 1 0 105 MPI_Keyval_create() 0.0 0.044 0.044 5 0 9 MPI_Type_struct() 0.0 0.025 0.025 8 0 3 MPI_Attr_put() 0.0 0.025 0.025 6 0 4 MPI_Type_contiguous() 0.0 0.021 0.021 11 0 2 MPI_Type_commit() 0.0 0.012 0.012 4 0 3 MPI_Errhandler_set() 0.0 0.007 0.007 1 0 7 MPI_Keyval_free() 0.0 0.002 0.002 1 0 2 MPI_Comm_rank() 0.0 0.002 0.002 1 0 2 MPI_Comm_size() 0.0 0.002 0.002 1 0 2 MPI_Type_size() NODE 0;CONTEXT 0;THREAD 1: --------------------------------------------------------------------------------------- %Time Exclusive Inclusive #Call #Subrs Inclusive Name msec total msec usec/call --------------------------------------------------------------------------------------- 100.0 0.061 2,005 1 1 2005330 threaded_func() int () 100.0 0.164 2,005 1 3 2005269 int work(int) 100.0 2,005 2,005 1 0 2005039 sleep() int (int) 0.0 0.063 0.063 1 0 63 write() int (int, char *, int) 0.0 0.003 0.003 1 0 3 getpid() pid_t () NODE 1;CONTEXT 0;THREAD 0: --------------------------------------------------------------------------------------- %Time Exclusive Inclusive #Call #Subrs Inclusive Name msec total msec usec/call --------------------------------------------------------------------------------------- 100.0 2,006 2,037 1 5 2037470 int main(int, char **) 1.4 28 28 1 35 28415 MPI_Init() 0.1 1 1 1 2 1873 MPI_Finalize() 0.0 0.507 0.507 1 0 507 MPI_Recv() 0.0 0.471 0.475 1 1 475 MPI_Sendrecv() 0.0 0.148 0.148 1 0 148 MPI_Keyval_create() 0.0 0.043 0.043 5 0 9 MPI_Type_struct() 0.0 0.028 0.028 6 0 5 MPI_Type_contiguous() 0.0 0.026 0.026 11 0 2 MPI_Type_commit() 0.0 0.024 0.024 8 0 3 MPI_Attr_put() 0.0 0.014 0.014 4 0 4 MPI_Errhandler_set() 0.0 0.006 0.006 1 0 6 MPI_Keyval_free() 0.0 0.004 0.004 1 0 4 MPI_Type_size() 0.0 0.003 0.003 1 0 3 MPI_Comm_size() 0.0 0.002 0.002 1 0 2 MPI_Comm_rank() NODE 1;CONTEXT 0;THREAD 1: --------------------------------------------------------------------------------------- %Time Exclusive Inclusive #Call #Subrs Inclusive Name msec total msec usec/call --------------------------------------------------------------------------------------- 100.0 0.09 2,005 1 1 2005272 threaded_func() int () 100.0 0.215 2,005 1 3 2005182 int work(int) 100.0 2,004 2,004 1 0 2004914 sleep() int (int) 0.0 0.05 0.05 1 0 50 write() int (int, char *, int) 0.0 0.003 0.003 1 0 3 getpid() pid_t () FUNCTION SUMMARY (total): --------------------------------------------------------------------------------------- %Time Exclusive Inclusive #Call #Subrs Inclusive Name msec total msec usec/call --------------------------------------------------------------------------------------- 51.4 2,008 4,240 2 10 2120078 int main(int, char **) 48.6 0.151 4,010 2 2 2005301 threaded_func() int () 48.6 0.379 4,010 2 6 2005226 int work(int) 48.6 4,009 4,009 2 0 2004976 sleep() int (int) 24.4 2,013 2,014 2 4 1007186 MPI_Finalize() 2.6 216 216 2 70 108458 MPI_Init() 0.0 1 1 2 2 562 MPI_Sendrecv() 0.0 0.507 0.507 1 0 507 MPI_Recv() 0.0 0.291 0.291 1 0 291 MPI_Send() 0.0 0.253 0.253 2 0 126 MPI_Keyval_create() 0.0 0.113 0.113 2 0 56 write() int (int, char *, int) 0.0 0.087 0.087 10 0 9 MPI_Type_struct() 0.0 0.053 0.053 12 0 4 MPI_Type_contiguous() 0.0 0.049 0.049 16 0 3 MPI_Attr_put() 0.0 0.047 0.047 22 0 2 MPI_Type_commit() 0.0 0.026 0.026 8 0 3 MPI_Errhandler_set() 0.0 0.013 0.013 2 0 6 MPI_Keyval_free() 0.0 0.006 0.006 2 0 3 MPI_Type_size() 0.0 0.006 0.006 2 0 3 getpid() pid_t () 0.0 0.005 0.005 2 0 2 MPI_Comm_size() 0.0 0.004 0.004 2 0 2 MPI_Comm_rank() FUNCTION SUMMARY (mean): --------------------------------------------------------------------------------------- %Time Exclusive Inclusive #Call #Subrs Inclusive Name msec total msec usec/call --------------------------------------------------------------------------------------- 51.4 502 1,060 0.5 2.5 2120078 int main(int, char **) 48.6 0.0377 1,002 0.5 0.5 2005301 threaded_func() int () 48.6 0.0948 1,002 0.5 1.5 2005226 int work(int) 48.6 1,002 1,002 0.5 0 2004976 sleep() int (int) 24.4 503 503 0.5 1 1007186 MPI_Finalize() 2.6 54 54 0.5 17.5 108458 MPI_Init() 0.0 0.28 0.281 0.5 0.5 562 MPI_Sendrecv() 0.0 0.127 0.127 0.25 0 507 MPI_Recv() 0.0 0.0727 0.0727 0.25 0 291 MPI_Send() 0.0 0.0633 0.0633 0.5 0 126 MPI_Keyval_create() 0.0 0.0283 0.0283 0.5 0 56 write() int (int, char *, int) 0.0 0.0217 0.0217 2.5 0 9 MPI_Type_struct() 0.0 0.0132 0.0132 3 0 4 MPI_Type_contiguous() 0.0 0.0123 0.0123 4 0 3 MPI_Attr_put() 0.0 0.0118 0.0118 5.5 0 2 MPI_Type_commit() 0.0 0.0065 0.0065 2 0 3 MPI_Errhandler_set() 0.0 0.00325 0.00325 0.5 0 6 MPI_Keyval_free() 0.0 0.0015 0.0015 0.5 0 3 MPI_Type_size() 0.0 0.0015 0.0015 0.5 0 3 getpid() pid_t () 0.0 0.00125 0.00125 0.5 0 2 MPI_Comm_size() 0.0 0.001 0.001 0.5 0 2 MPI_Comm_rank() [sameer@neutron mixedmode]$ echo "Commenting USE_TAU variable in Makefile to disable TAU instrumentation" Commenting USE_TAU variable in Makefile to disable TAU instrumentation [sameer@neutron mixedmode]$ head -15 Makefile #**************************************************************************** #* TAU Portable Profiling Package ** #* http://www.cs.uoregon.edu/research/tau ** #**************************************************************************** #* Copyright 2001 ** #* Department of Computer and Information Science, University of Oregon ** #* Advanced Computing Laboratory, Los Alamos National Laboratory ** #**************************************************************************** TAUROOTDIR = ../.. include $(TAUROOTDIR)/include/Makefile # USE_TAU = 1 # Comment above line to disable TAU [sameer@neutron mixedmode]$ make clean make: *** Warning: File `../../include/Makefile' has modification time in the future (2001-12-10 21:17:14 > 2001-12-10 15:26:03) /bin/rm -f app.o thr.o processing.o app app.inst.cpp thr.inst.cpp processing.inst.cpp \ TauWrapper.o libTauWrapper.a profile.* tautrace.* events.* make: *** Warning: Clock skew detected. Your build may be incomplete. [sameer@neutron mixedmode]$ make make: *** Warning: File `../../include/Makefile' has modification time in the future (2001-12-10 21:17:14 > 2001-12-10 15:26:07) g++ -I/home/users/sameer/tau2/include -I/usr/local/packages/mpich/include -c app.cpp -o app.o ; g++ -I/home/users/sameer/tau2/include -I/usr/local/packages/mpich/include -c thr.cpp -o thr.o g++ -I/home/users/sameer/tau2/include -I/usr/local/packages/mpich/include -c processing.cpp -o processing.o ; g++ app.o thr.o processing.o -o app -L/usr/local/packages/mpich/lib -lmpich -lpthread -lm make: *** Warning: Clock skew detected. Your build may be incomplete. [sameer@neutron mixedmode]$ ls Makefile TauWrapper.h app.cpp processing.cpp thr.cpp TauWrapper.cpp app app.o processing.o thr.o [sameer@neutron mixedmode]$ mpirun -np 2 app After Initialization - my rank is 0 out of 2 procs Inside work (called from threaded_func): rank 0, pid = 14184 Inside work (called from threaded_func): rank 1, pid = 14183 After Initialization - my rank is 1 out of 2 procs rank = 1:Received data = 5767, tag = 34, source = 0 [sameer@neutron mixedmode]$ ls Makefile TauWrapper.h app.cpp processing.cpp thr.cpp TauWrapper.cpp app app.o processing.o thr.o tau-2.16.4/examples/mixedmode/TauWrapper.cpp000066400000000000000000000010051062343042700207610ustar00rootroot00000000000000#include #include #include #include #include /* Wrapper routines */ int tau__write(int fd, char * buffer, int bytes) { TAU_PROFILE("write()", "int (int, char *, int)", TAU_USER); return write(fd, buffer, bytes); } pid_t tau__getpid(void) { TAU_PROFILE("getpid()", "pid_t ()", TAU_USER); return getpid(); } int tau__sleep(int time) { TAU_PROFILE("sleep()", "int (int)", TAU_USER); return sleep(time); } tau-2.16.4/examples/mixedmode/TauWrapper.h000066400000000000000000000010021062343042700204230ustar00rootroot00000000000000#ifndef _TAU_WRAPPER_H_ #define _TAU_WRAPPER_H_ #if (defined(PROFILING_ON) || (TRACING_ON)) /* System wrapper functions for sleep, write and getpid */ extern int tau__sleep(int secs); extern int tau__write(int fd, char * buffer, int bytes); extern pid_t tau__getpid(void); #define getpid() tau__getpid() #define write(fd, buffer, bytes) tau__write(fd, buffer, bytes) #define sleep(secs) tau__sleep(secs) #endif /* PROFILING_ON || TRACING_ON */ #endif /* _TAU_WRAPPER_H_ */ tau-2.16.4/examples/mixedmode/app.cpp000066400000000000000000000027031062343042700174550ustar00rootroot00000000000000#include #include "mpi.h" #include void * threaded_func(void *data); int main (int argc, char **argv) { MPI_Status status; int rank, ret, size; int data_to_send, data_to_recv, message_tag; int count, destination_tid; ret = MPI_Init(&argc, &argv); ret = MPI_Comm_size(MPI_COMM_WORLD, &size); ret = MPI_Comm_rank(MPI_COMM_WORLD, &rank); if (size != 2) { printf("Please use only 2 MPI processes (mpirun -np 2 app)\n"); MPI_Finalize(); return(1); } printf("After Initialization - my rank is %d out of %d procs\n", rank, size); /* send data from rank 0 to 1 */ pthread_attr_t attr; pthread_t tid; pthread_attr_init(&attr); if (ret = pthread_create(&tid, NULL, threaded_func, &rank) ) { perror("pthread_create fails"); return 1; } if (rank == 0) { /* send data */ data_to_send = 5767; count = 1; destination_tid = 1; message_tag = 34; ret = MPI_Send(&data_to_send, count, MPI_INT, destination_tid, message_tag, MPI_COMM_WORLD); } else { /* recv data */ count = 1; ret = MPI_Recv(&data_to_recv, count, MPI_INT, MPI_ANY_SOURCE, MPI_ANY_TAG, MPI_COMM_WORLD, &status); printf("rank = %d:Received data = %d, tag = %d, source = %d\n", rank, data_to_recv,status.MPI_TAG, status.MPI_SOURCE); } ret = MPI_Finalize(); if (ret = pthread_join(tid, NULL) ) { perror("pthread_join failed"); return ret; } } tau-2.16.4/examples/mixedmode/processing.cpp000066400000000000000000000004731062343042700210530ustar00rootroot00000000000000#include #include #include #include #include "TauWrapper.h" /* For syscalls */ int work(int rank) { char buf[64]; sleep(2); sprintf(buf,"Inside work (called from threaded_func): rank %d, pid = %d\n", rank, getpid()); write(1, buf, strlen(buf)); return 0; } tau-2.16.4/examples/mixedmode/thr.cpp000066400000000000000000000005131062343042700174670ustar00rootroot00000000000000#include #include #include #include #include int work(int data); void * threaded_func(void *data) { TAU_REGISTER_THREAD(); TAU_PROFILE("threaded_func()", "int ()", TAU_DEFAULT); work((int) *((int *) data)); /* work done by this thread */ return NULL; } tau-2.16.4/examples/mpishlib/000077500000000000000000000000001062343042700160235ustar00rootroot00000000000000tau-2.16.4/examples/mpishlib/Makefile000066400000000000000000000032201062343042700174600ustar00rootroot00000000000000#**************************************************************************** #* TAU Portable Profiling Package ** #* http://www.cs.uoregon.edu/research/tau ** #**************************************************************************** #* Copyright 1997 ** #* Department of Computer and Information Science, University of Oregon ** #* Advanced Computing Laboratory, Los Alamos National Laboratory ** #**************************************************************************** ####################################################################### ## pC++/Sage++ Copyright (C) 1993,1995 ## ## Indiana University University of Oregon University of Rennes ## ####################################################################### TAUROOTDIR = ../.. include $(TAUROOTDIR)/include/Makefile CXX = $(TAU_CXX) CC = $(TAU_CC) CFLAGS = $(TAU_INCLUDE) $(TAU_DEFS) $(TAU_MPI_INCLUDE) LIBS = ./libring.so $(TAU_MPI_LIBS) $(TAU_SHLIBS) -lm LDFLAGS = $(USER_OPT) $(TAU_LDFLAGS) MAKEFILE = Makefile PRINT = pr RM = /bin/rm -f TARGET = cpi EXTRAOBJS = ############################################## all: $(TARGET) install: $(TARGET) $(TARGET): $(TARGET).o libring.so $(CXX) $(LDFLAGS) $(TARGET).o -o $@ $(LIBS) $(TARGET).o : $(TARGET).cpp $(CXX) $(CFLAGS) -c $(TARGET).cpp libring.so: ring.o $(CXX) $(TAU_SHFLAGS) libring.so ring.o $(TAU_MPI_LIBS) $(TAU_SHLIBS) ring.o: ring.cpp $(CXX) $(CFLAGS) -c ring.cpp clean: $(RM) $(TARGET).o $(TARGET) ring.o libring.so ############################################## tau-2.16.4/examples/mpishlib/README000066400000000000000000000011011062343042700166740ustar00rootroot00000000000000Demonstrates the use of MPI wrapper library in instrumenting a shared object. TAU needs to be configured with -mpiinc= and -mpilib= flags. Application: ------------ cpi.cpp builds the main application, ring.cpp builds libring.so and we use the TAU MPI wrapper library as well. To use this set LD_LIBRARY_PATH in your .cshrc file for mpirun. setenv LD_LIBRARY_PATH $LD_LIBRARY_PATH\:/examples/mpishlib % mpirun -np cpi executes the application and generates the performance data. Functions in cpi.cpp, ring.cpp and MPI routines are instrumented. tau-2.16.4/examples/mpishlib/cpi.cpp000066400000000000000000000072121062343042700173040ustar00rootroot00000000000000/**************************************************************************** ** TAU Portable Profiling Package ** ** http://www.cs.uoregon.edu/research/tau ** ***************************************************************************** ** Copyright 1997 ** ** Department of Computer and Information Science, University of Oregon ** ** Advanced Computing Laboratory, Los Alamos National Laboratory ** ****************************************************************************/ // This application calculates the value of pi and e using a parallel // algorithm for integrating a function using Riemann sum. Uses MPI. #include "mpi.h" #include #include #include #include "ring.h" #ifndef M_E #define M_E 2.7182818284590452354 /* e */ #endif #ifndef M_PI #define M_PI 3.14159265358979323846 /* pi */ #endif double f(double a) { TAU_PROFILE("f()", "double (double)", TAU_USER); return (4.0 / (1.0 + a*a)); } int main(int argc, char* argv[]) { int i, n, myid, numprocs, namelen; double mySum, h, sum, x; double startwtime, timePi, timeE, time1; char processor_name[MPI_MAX_PROCESSOR_NAME]; TAU_PROFILE("main()", "int (int, char **)", TAU_DEFAULT); TAU_PROFILE_INIT(argc,argv); MPI_Init(&argc,&argv); TAU_PROFILE_TIMER(t1, "main-init()", "int (int, char **)", TAU_USER); TAU_PROFILE_START(t1); MPI_Comm_size(MPI_COMM_WORLD,&numprocs); MPI_Comm_rank(MPI_COMM_WORLD,&myid); MPI_Get_processor_name(processor_name,&namelen); TAU_PROFILE_SET_NODE(myid); fprintf(stderr,"Process %d on %s\n", myid, processor_name); C c(myid, numprocs); c.method(); n = 1000; TAU_PROFILE_STOP(t1); /* // Calculate pi by integrating 4/(1 + x^2) from 0 to 1. */ startwtime = MPI_Wtime(); h = 1.0 / (double) n; sum = 0.0; for (i = myid + 1; i <= n; i += numprocs) { x = h * ((double)i - 0.5); sum += f(x); } mySum = h * sum; /* REGION A */ MPI_Reduce(&mySum, &sum, 1, MPI_DOUBLE, MPI_SUM, 0, MPI_COMM_WORLD); if (myid == 0) { timePi = MPI_Wtime() - startwtime; printf("\nFor %d integration intervals:\n", n); printf(" pi is approximately %.16f, Error is %.16f\n", sum, fabs(sum - M_PI)); } /* // Calculate e by integrating exp(x) from 0 to 1. */ startwtime = MPI_Wtime(); h = 1.0 / (double) n; sum = 0.0; for (i = myid + 1; i <= n; i += numprocs) { x = h * ((double)i - 0.5); sum += exp(x); } mySum = h * sum; MPI_Reduce(&mySum, &sum, 1, MPI_DOUBLE, MPI_SUM, 0, MPI_COMM_WORLD); if (myid == 0) { sum += 1; /* integral = e - 1, so add 1 */ timeE = MPI_Wtime() - startwtime; printf(" e is approximately %.16f, Error is %.16f\n", sum, fabs(sum - M_E)); } /* // Calculate 1.0 by integrating cos(th) from 0 to pi/2. */ startwtime = MPI_Wtime(); h = (M_PI / 2.0) / (double) n; sum = 0.0; for (i = myid + 1; i <= n; i += numprocs) { x = h * ((double)i - 0.5); sum += cos(x); } mySum = h * sum; MPI_Reduce(&mySum, &sum, 1, MPI_DOUBLE, MPI_SUM, 0, MPI_COMM_WORLD); if (myid == 0) { time1 = MPI_Wtime() - startwtime; printf(" sum is %.16f, Error is %.16f\n\n", sum, fabs(1.0 - sum)); printf("wall clock time for pi = %f\n", timePi); printf("wall clock time for e = %f\n", timeE); printf("wall clock time for 1 = %f\n", time1); printf("Total time = %f\n\n", timePi + timeE + time1); } /* // finished */ MPI_Finalize(); return 0; } tau-2.16.4/examples/mpishlib/ring.cpp000066400000000000000000000016011062343042700174640ustar00rootroot00000000000000#include #ifndef TAU_GROUP_RING #define TAU_GROUP_RING TAU_GET_PROFILE_GROUP("RING") #endif /* TAU_GROUP_RING */ #include #include #include "ring.h" static const int anz = 512; void C::method() { TAU_PROFILE("void C::method()", CT(*this), TAU_GROUP_RING); int i; int field[anz]; MPI_Status status; for (i=0; i class C { public: C(int m, int p) : me(m), proc(p) { TAU_PROFILE("C &C::C(int, int)", " ", TAU_DEFAULT); } void method(); private: int proc, me; }; #endif /* _RING_H_ */ tau-2.16.4/examples/mpitrace/000077500000000000000000000000001062343042700160205ustar00rootroot00000000000000tau-2.16.4/examples/mpitrace/Makefile000066400000000000000000000027421062343042700174650ustar00rootroot00000000000000#**************************************************************************** #* TAU Portable Profiling Package ** #* http://www.cs.uoregon.edu/research/tau ** #**************************************************************************** #* Copyright 1997 ** #* Department of Computer and Information Science, University of Oregon ** #* Advanced Computing Laboratory, Los Alamos National Laboratory ** #**************************************************************************** ####################################################################### ## pC++/Sage++ Copyright (C) 1993,1995 ## ## Indiana University University of Oregon University of Rennes ## ####################################################################### TAUROOTDIR = ../.. include $(TAUROOTDIR)/include/Makefile CXX = $(TAU_CXX) CC = $(TAU_CC) CFLAGS = $(TAU_INCLUDE) $(TAU_DEFS) $(TAU_MPI_INCLUDE) LIBS = $(TAU_MPI_LIBS) $(TAU_LIBS) -lm LDFLAGS = $(USER_OPT) $(TAU_LDFLAGS) MAKEFILE = Makefile PRINT = pr RM = /bin/rm -f TARGET = ring EXTRAOBJS = ############################################## all: $(TARGET) install: $(TARGET) $(TARGET): $(TARGET).o $(CXX) $(LDFLAGS) $(TARGET).o -o $@ $(LIBS) $(TARGET).o : $(TARGET).cpp $(CXX) $(CFLAGS) -c $(TARGET).cpp clean: $(RM) $(TARGET).o $(TARGET) *.trc *.edf ############################################## tau-2.16.4/examples/mpitrace/ring.cpp000066400000000000000000000025461062343042700174720ustar00rootroot00000000000000#include #ifndef TAU_GROUP_RING #define TAU_GROUP_RING TAU_GET_PROFILE_GROUP("RING") #endif /* TAU_GROUP_RING */ #include #include static const int anz = 512; class C { public: C(int m, int p) : me(m), proc(p) { TAU_PROFILE("C &C::C(int, int)", CT(*this), TAU_GROUP_RING); } void method() { TAU_PROFILE("void C::method()", CT(*this), TAU_GROUP_RING); int i; int field[anz]; MPI_Status status; for (i=0; i will allow you to use linux timers, cpu time, and all papi metrics. After you have configured TAU, you will then need to set environment variables denoting which metrics you wish to use for any given run. You can set up to 25 counters (depending on your hardware). For papi native events under multiple counters only, prefix the name by: PAPI_NATIVE_. Thus, if your native event were called "something-native", specify it in the environment by setting COUNTERx to be "PAPI_NATIVE_something-native". As an example of papi native events: setenv COUNTER1 PAPI_NATIVE_packed_DP_uop_all The following example uses PAPI_FP_INS for papi floating point instructions, GET_TIME_OF_DAY for the standard gettimeofday function, CPU_TIME for cpu time, LINUX_TIMERS for linux timers, and PAPI_L1_DCM for L1 data cache misses (See note below). [tau2/examples/multicounter]$ setenv COUNTER1 PAPI_FP_INS [tau2/examples/multicounter]$ setenv COUNTER2 GET_TIME_OF_DAY [tau2/examples/multicounter]$ setenv COUNTER3 CPU_TIME [tau2/examples/multicounter]$ setenv COUNTER4 LINUX_TIMERS [tau2/examples/multicounter]$ setenv COUNTER5 PAPI_L1_DCM [tau2/examples/multicounter]$ ./simple You will then have five directories containing data for each of the selected metrics: [tau2/examples/multicounter]$ ls -la drwxr-xr-x 8 bertie paraduck 4096 Mar 15 18:57 . drwxr-xr-x 26 bertie paraduck 4096 Mar 15 18:42 .. drwxr-xr-x 2 bertie paraduck 4096 Mar 15 18:57 MULTI__CPU_TIME drwxr-xr-x 2 bertie paraduck 4096 Mar 15 18:41 CVS drwxr-xr-x 2 bertie paraduck 4096 Mar 15 18:57 MULTI__GET_TIME_OF_DAY drwxr-xr-x 2 bertie paraduck 4096 Mar 15 18:57 MULTI__LINUX_TIMERS -rw-r--r-- 1 bertie paraduck 1440 Mar 15 18:50 Makefile drwxr-xr-x 2 bertie paraduck 4096 Mar 15 18:57 MULTI__PAPI_FP_INS drwxr-xr-x 2 bertie paraduck 4096 Mar 15 18:57 MULTI__PAPI_L1_DCM -rw-r--r-- 1 bertie paraduck 2214 Feb 23 2000 README -rwxr-xr-x 1 bertie paraduck 131458 Mar 15 18:52 simple -rw-r--r-- 1 bertie paraduck 1701 Mar 15 18:21 simple.cpp -rw-r--r-- 1 bertie paraduck 6980 Mar 15 18:52 simple.o Move into those directories to see that data: [tau2/examples/multicounter]cd MULTI__PAPI_FP_INS [tau2/examples/multicounter/MULTI__PAPI_FP_INS]pprof Reading Profile files in profile.* NODE 0;CONTEXT 0;THREAD 0: --------------------------------------------------------------------------------------- %Time Exclusive Inclusive #Call #Subrs Count/Call Name counts total counts --------------------------------------------------------------------------------------- 100.0 121 8.405E+06 1 1 8405368 main() int (int, char **) 100.0 1.662E+04 8.405E+06 1 2 8405247 multiply void (void) 49.9 4.194E+06 4.194E+06 1 0 4194315 multiply-regular void (void) 49.9 4.194E+06 4.194E+06 1 0 4194315 multiply-with-strip-mining-optimization void (void) [tau2/examples/multicounter]$ cd MULTI__PAPI_L1_DCM/ [tau2/examples/multicounter/MULTI__PAPI_L1_DCM]$ pprof Reading Profile files in profile.* NODE 0;CONTEXT 0;THREAD 0: --------------------------------------------------------------------------------------- %Time Exclusive Inclusive #Call #Subrs Count/Call Name counts total counts --------------------------------------------------------------------------------------- 100.0 98 2.648E+06 1 1 2648032 main() int (int, char **) 100.0 6282 2.648E+06 1 2 2647934 multiply void (void) 79.7 2.111E+06 2.111E+06 1 0 2110998 multiply-regular void (void) 20.0 5.307E+05 5.307E+05 1 0 530654 multiply-with-strip-mining-optimization void (void) [tau2/examples/multicounter]$ cd MULTI__GET_TIME_OF_DAY/ [tau2/examples/multicounter/MULTI__GET_TIME_OF_DAY]$ pprof Reading Profile files in profile.* NODE 0;CONTEXT 0;THREAD 0: --------------------------------------------------------------------------------------- %Time Exclusive Inclusive #Call #Subrs Inclusive Name msec total msec usec/call --------------------------------------------------------------------------------------- 100.0 32 520 1 1 520326 main() int (int, char **) 93.8 5 487 1 2 487898 multiply void (void) 52.0 270 270 1 0 270721 multiply-regular void (void) 40.6 211 211 1 0 211472 multiply-with-strip-mining-optimization void (void) Simply resetting the counters will give you cause the system to track different metrics. LIST OF COUNTERS: ----------------- Set the following values for the COUNTER<1-25> environment variables. GET_TIME_OF_DAY --- For the default profiling option using gettimeofday() BGL_TIMERS --- For -BGLTIMERS configuration option on IBM BG/L SGI_TIMERS --- For -SGITIMERS configuration option under IRIX LINUX_TIMERS --- For -LINUXTIMERS configuration option under Linux CPU_TIME --- For user+system time from getrusage() call with -CPUTIME CRAY_TIMERS --- For cray timers TAU_MUSE --- For MAGNET User-Space Environment TAU_MPI_MESSAGE_SIZE - For tracking mpi message event for all MPI operations P_WALL_CLOCK_TIME --- For PAPI's WALLCLOCK time using -PAPIWALLCLOCK P_VIRTUAL_TIME --- For PAPI's process virtual time using -PAPIVIRTUAL PAPI/PCL options that can be found in the TAU user's guide or on their respective websites. For e.g., PCL_FP_INSTR --- For floating point operations using PCL (-pcl=) PAPI_FP_INS --- For floating point operations using PAPI (-papi=) NOTE: When -MULTIPLECOUNTERS is used with -TRACE option, the tracing library uses the wallclock time from the function specified in the COUNTER1 variable. This must point to GET_TIME_OF_DAY. tau-2.16.4/examples/multicounter/simple.cpp000066400000000000000000000032441062343042700207460ustar00rootroot00000000000000/* This demonstrates how data cache misses can affect the performance of an application. We show how the time/counts for a simple matrix multiplication algorithm dramatically reduce when we employ a strip mining optimization. */ #include #define SIZE 64 #define CACHE 64 double A[SIZE][SIZE], B[SIZE][SIZE], C[SIZE][SIZE]; double multiply(void) { int i, j, k, n, m; int vl, sz, strip; TAU_PROFILE("multiply", "void (void)", TAU_USER); TAU_PROFILE_TIMER(t1,"multiply-regular", "void (void)", TAU_USER); TAU_PROFILE_TIMER(strip_timer,"multiply-with-strip-mining-optimization", "void (void)", TAU_USER); for (n = 0; n < SIZE; n++) for (m = 0; m < SIZE; m++) { A[n][m] = B[n][m] = n + m ; C[n][m] = 0; } TAU_PROFILE_START(t1); for (i = 0; i < SIZE; i ++) { for (j = 0; j < SIZE; j++) { for (k = 0; k < SIZE; k++) C[i][j] += A[i][k] * B[k][j]; } } TAU_PROFILE_STOP(t1); /* Now we employ the strip mining optimization */ for(n = 0; n < SIZE; n++) for(m = 0; m < SIZE; m++) C[n][m] = 0; TAU_PROFILE_START(strip_timer); for(i=0; i < SIZE; i++) for(k=0; k < SIZE; k++) for(sz = 0; sz < SIZE; sz+=CACHE) { //vl = min(SIZE-sz, CACHE); vl = (SIZE - sz < CACHE ? SIZE - sz : CACHE); for(strip = sz; strip < sz+vl; strip++) C[i][strip] += A[i][k]*B[k][strip]; } TAU_PROFILE_STOP(strip_timer); return C[SIZE-10][SIZE-10]; // So KCC doesn't optimize this loop away. } int main(int argc, char **argv) { TAU_PROFILE("main()", "int (int, char **)", TAU_DEFAULT); TAU_PROFILE_SET_NODE(0); multiply(); return 0; } tau-2.16.4/examples/opari/000077500000000000000000000000001062343042700153265ustar00rootroot00000000000000tau-2.16.4/examples/opari/c++/000077500000000000000000000000001062343042700156765ustar00rootroot00000000000000tau-2.16.4/examples/opari/c++/Makefile000066400000000000000000000035731062343042700173460ustar00rootroot00000000000000#**************************************************************************** #* TAU Portable Profiling Package ** #* http://www.cs.uoregon.edu/research/tau ** #**************************************************************************** #* Copyright 1997 ** #* Department of Computer and Information Science, University of Oregon ** #* Advanced Computing Laboratory, Los Alamos National Laboratory ** #**************************************************************************** ####################################################################### ## pC++/Sage++ Copyright (C) 1993,1995 ## ## Indiana University University of Oregon University of Rennes ## ####################################################################### TAUROOTDIR = ../../.. include $(TAUROOTDIR)/include/Makefile CXX = $(TAU_CXX) CC = $(TAU_CC) CFLAGS = $(TAU_INCLUDE) $(TAU_DEFS) -DSTD_COMPLEX LIBS = $(TAU_LIBS) LDFLAGS = $(CFLAGS) MAKEFILE = Makefile PRINT = pr RM = /bin/rm -f TARGET = mandel EXTRAOBJS = ############################################## all: $(TARGET) install: $(TARGET) $(TARGET): $(TARGET).mod.o mytimer.o ppmwrite.o opari.tab.o $(CXX) $(LDFLAGS) $(TARGET).mod.o opari.tab.o mytimer.o ppmwrite.o -o $@ $(LIBS) $(TARGET).mod.o : $(TARGET).mod.cpp $(CXX) $(CFLAGS) -c $(TARGET).mod.cpp $(TARGET).mod.cpp : $(TARGET).cpp $(RM) opari.rc $(TAU_OPARI_TOOL) -table opari.tab.c $(TARGET).cpp opari.tab.o: opari.tab.c $(TARGET).mod.cpp $(CC) $(CFLAGS) -c opari.tab.c mytimer.o : mytimer.c $(CC) -c $< ppmwrite.o : ppmwrite.cpp $(CXX) $(CFLAGS) -c $< clean: $(RM) $(TARGET).mod.o $(TARGET).cpp.opari.inc $(TARGET).mod.cpp \ $(TARGET) ppmwrite.o mytimer.o opari.rc opari.tab.c opari.tab.o ############################################## tau-2.16.4/examples/opari/c++/TComplex.h000066400000000000000000000013041062343042700176000ustar00rootroot00000000000000#ifndef TComplex_H #define TComplex_H #include template class TComplex { public: // default constructor TComplex(T r = 0.0, T i = 0.0) {re = r; im = i;} // field access functions T real(void) const {return re;} T imag(void) const {return im;} // addition operator const TComplex operator+(const TComplex& rhs) const { return TComplex(re+rhs.re, im+rhs.im); } // multiplication operator const TComplex operator*(const TComplex& rhs) const { return TComplex(re*rhs.re - im*rhs.im, re*rhs.im + im*rhs.re); } private: T re, im; }; template T norm(const TComplex& x) { return x.real()*x.real() + x.imag()*x.imag(); } #endif tau-2.16.4/examples/opari/c++/mandel.cpp000066400000000000000000000045611062343042700176500ustar00rootroot00000000000000/* This program was written by Bernd Mohr, FZJ, Germany. It illustrates the use of OpenMP in this Mandelbrot program. The output of this program is an image stored in mandel.ppm. */ // #include // using std::fprintf; // using std::printf; #include // #include // using std::strtod; // using std::atoi; // using std::exit; #include #include #include extern "C" void mytimer_(int *); #ifdef STD_COMPLEX # include typedef std::complex dcomplex; using std::norm; #else # include "TComplex.h" typedef TComplex dcomplex; #endif #ifdef _OPENMP extern "C" { # include } #endif #include "ppmwrite.h" field iterations; int main(int argc, char *argv[]) { double xmin, xmax, ymin, ymax; int maxiter; TAU_PROFILE("main()", "int (int, char **)", TAU_DEFAULT); TAU_PROFILE_SET_NODE(0); // --- init input parameter // -1.5 0.5 -1.0 1.0 // -.59 -.54 -.58 -.53 // -.65 -.4 .475 .725 // -.65 -.5 .575 .725 // -.59 -.56 .47 .5 // -.535 -.555 .49 .51 if ( argc != 6 ) { fprintf(stderr, "%s: xmin xmax ymin ymax maxiter\n", argv[0]); fprintf(stderr, "Using defaults: -.59 -.56 .47 .5 216\n"); xmin = -.59; xmax = -.56; ymin = .47; ymax = .5; maxiter = 216; } else { xmin = strtod(argv[1], 0); xmax = strtod(argv[2], 0); ymin = strtod(argv[3], 0); ymax = strtod(argv[4], 0); maxiter = atoi(argv[5]); cout <<"Using xmin = "< #include void mytimer_(int* arg) { static struct timeval t1, t2; double elapsed; if (arg && *arg) { /* -- arg contains numpe, stop timing -- */ gettimeofday(&t2, 0); elapsed = (t2.tv_sec - t1.tv_sec) + (t2.tv_usec - t1.tv_usec) * 1.0e-6; fprintf(stdout, "... %6.3f sec on %d pe(s)\n", elapsed, *arg); fflush(stdout); } else { /* -- start timing -- */ fprintf(stdout, "start ...\n"); fflush(stdout); gettimeofday(&t1, 0); } } tau-2.16.4/examples/opari/c++/ppm.h000066400000000000000000000005371062343042700166500ustar00rootroot00000000000000#define width 800 /* Resolution */ #define height 800 typedef int field[width][height]; /* Type to store iteration counts */ extern void ppmwrite(char *fname, /* Name of PPM file */ field iterations, /* Calculated iteration counts */ int maxiter); /* Iteration count limit */ tau-2.16.4/examples/opari/c++/ppmwrite.cpp000066400000000000000000000074651062343042700202650ustar00rootroot00000000000000#include #include #include #include #include #include "ppmwrite.h" /* * ColorTable */ char ColorTable::operator()(int i, base b) const { return tab[i].c[b]; } ColorTable::~ColorTable() { TAU_PROFILE("ColorTable::~ColorTable()", "void ()", TAU_DEFAULT); delete [] tab; } int ColorTable::numColors() const { TAU_PROFILE("ColorTable::numColors()", "int (void)", TAU_DEFAULT); return num; } int ColorTable::shades() const { TAU_PROFILE("ColorTable::shades()", "int (void)", TAU_DEFAULT); return sds; } ColorTable::ColorTable(int shades, int numColors) : sds(shades), num(numColors) { TAU_PROFILE("ColorTable::ColorTable()", "void (int, int)", TAU_DEFAULT); tab = new Color[num]; } /* * PermutationColorTable */ PermutationColorTable:: PermutationColorTable(int shades, direction d, base b1, base b2, base b3) : ColorTable(shades, shades*shades*shades) { TAU_PROFILE("PermutationColorTable::PermutationColorTable()", "void (int, direction, base, base, base)", TAU_DEFAULT); int count = d==fwd ? 0 : numColors()-1; for (int ix=0; ix= buflen ) { write(out, buf, buflen); b = 0; } } } else { idx = int (idx / factor); for (int iz=0; iz<3; ++iz) { buf[b++] = table(idx, base(iz)); if ( b >= buflen ) { write(out, buf, buflen); b = 0; } } } } } write(out, buf, b); close(out); printf("%d total iterations\n", total); } tau-2.16.4/examples/opari/c++/ppmwrite.h000066400000000000000000000022501062343042700177150ustar00rootroot00000000000000enum base { red, green, blue }; enum direction { back=-1, fwd=1 }; class ColorTable { public: char operator()(int i, base b) const; ~ColorTable(); int numColors() const; int shades() const; protected: ColorTable(int shades, int numColors); struct Color { char c[3]; }; Color* tab; private: int sds; int num; }; class PermutationColorTable : public ColorTable { public: PermutationColorTable(int shades, direction d=fwd, base b1=red, base b2=green, base b3=blue); }; class SmoothColorTable : public ColorTable { public: SmoothColorTable(int shades, direction d=fwd, base b1=red, base b2=green, base b3=blue); }; const int width=800, height=800; // Resolution typedef int field[width][height]; // Type to store iteration counts void ppmwrite(char *fname, // Name of PPM file field iterations, // Calculated iteration counts int maxiter, // Iteration count limit const ColorTable& table=SmoothColorTable(10, fwd, blue, green, red)); // Default color table tau-2.16.4/examples/opari/openmpi/000077500000000000000000000000001062343042700167755ustar00rootroot00000000000000tau-2.16.4/examples/opari/openmpi/Makefile000066400000000000000000000034371062343042700204440ustar00rootroot00000000000000#**************************************************************************** #* TAU Portable Profiling Package ** #* http://www.cs.uoregon.edu/research/tau ** #**************************************************************************** #* Copyright 1997 ** #* Department of Computer and Information Science, University of Oregon ** #* Advanced Computing Laboratory, Los Alamos National Laboratory ** #**************************************************************************** ####################################################################### ## pC++/Sage++ Copyright (C) 1993,1995 ## ## Indiana University University of Oregon University of Rennes ## ####################################################################### TAUROOTDIR = ../../.. include $(TAUROOTDIR)/include/Makefile CXX = $(TAU_CXX) CC = $(TAU_CC) CFLAGS = $(TAU_INCLUDE) $(TAU_DEFS) $(TAU_MPI_INCLUDE) LIBS = $(TAU_MPI_LIBS) $(TAU_LIBS) $(LEXTRA1) $(EXTRALIBS) -lm LDFLAGS = $(USER_OPT) $(TAU_LDFLAGS) MAKEFILE = Makefile PRINT = pr RM = /bin/rm -f TARGET = stommel EXTRAOBJS = ############################################## all: $(TARGET) install: $(TARGET) $(TARGET): $(TARGET).mod.o opari.tab.o $(CXX) $(LDFLAGS) $(TARGET).mod.o opari.tab.o -o $@ $(LIBS) $(TARGET).mod.o : $(TARGET).mod.c $(CC) $(CFLAGS) -c $(TARGET).mod.c $(TARGET).mod.c : $(TARGET).c $(RM) opari.rc $(TAU_OPARI_TOOL) -table opari.tab.c $(TARGET).c opari.tab.o: opari.tab.c $(TARGET).mod.c $(CC) $(CFLAGS) -c opari.tab.c clean: $(RM) $(TARGET).mod.o $(TARGET) $(TARGET).mod.c opari.tab.c *.pv *.trc *.edf profile.* opari.rc *.inc opari.tab.o ############################################## tau-2.16.4/examples/opari/openmpi/README000066400000000000000000000015511062343042700176570ustar00rootroot00000000000000This example was written by Timothy H. Kaiser (SDSC) and it demonstrates the use of TAU instrumentation for OpenMPI (OpenMP+MPI) programs. It uses C source level instrumentation in addition to Opari's OpenMP instrumentation and MPI wrapper library level instrumentation. It solves the 2d Stommel Model of Ocean Circulation using a Five-point stencil and Jacobi iteration gamma*((d(d(psi)/dx)/dx) + (d(d(psi)/dy)/dy)) +beta(d(psi)/dx)=-alpha*sin(pi*y/(2*ly)) More information on this and OpenMPI is available at: http://www.sdsc.edu/~tkaiser/ http://www.npaci.edu/Training/AHM00/examples/openmp_ibm/ We gratefully acknowledge the help of Tim Kaiser for making this example available to us. To execute the program: % setenv OMP_NUM_THREADS 2 % mpirun -np 2 stommel It reads st.in file (which should be present in this directory) and generates performance data. tau-2.16.4/examples/opari/openmpi/st.in000066400000000000000000000000721062343042700177520ustar00rootroot00000000000000200 200 2000000 2000000 1.0e-9 2.25e-11 3.0e-6 1000 7500 tau-2.16.4/examples/opari/openmpi/stommel.c000066400000000000000000000337331062343042700206320ustar00rootroot00000000000000/* poe -rmpool 1 -procs 1 mpcc_r -qsmp=noauto:omp:explicit -O3 -qarch=pwr3 -qtune=pwr3 ompc_02.c bind.o -lm -o ompc_02 */ #define FLT double #define INT int #include #include "mpi.h" #include #include #include #include #if macintosh #include #endif FLT **matrix(INT nrl,INT nrh,INT ncl,INT nch); FLT *vector(INT nl, INT nh); INT *ivector(INT nl, INT nh); INT mint(FLT x); FLT walltime(); void bc(FLT ** psi,INT i1,INT i2,INT j1,INT j2); void do_jacobi(FLT ** psi,FLT ** new_psi,FLT *diff,INT i1,INT i2,INT j1,INT j2); void write_grid(FLT ** psi,INT i1,INT i2,INT j1,INT j2); void do_transfer(FLT ** psi,INT i1,INT i2,INT j1,INT j2); void do_force (INT i1,INT i2,INT j1,INT j2); void do_transfer(FLT ** psi,INT i1,INT i2,INT j1,INT j2); char* unique(char *name); FLT force(FLT y); #define pi 3.141592653589793239 FLT **the_for; FLT dx,dy,a1,a2,a3,a4,a5,a6; INT nx,ny; FLT alpha; FLT *svec1,*svec2,*rvec1,*rvec2; INT numnodes,myid,mpi_err; #define mpi_master 0 INT myrow,mycol; INT nrow,ncol; INT myrow,mycol; INT myid_col,myid_row,nodes_row,nodes_col; MPI_Status status; MPI_Comm ROW_COMM,COL_COMM; INT mytop,mybot,myleft,myright; int main(int argc, char **argv) { FLT lx,ly,beta,gamma; INT steps; FLT t1,t2; /*FLT t3,t4,dt; */ /* FLT diff */ FLT mydiff,diff; FLT dx2,dy2,bottom; FLT di,dj; FLT **psi; /* our calculation grid */ FLT **new_psi; /* temp storage for the grid */ INT i,j,i1,i2,j1,j2; INT iout; TAU_PROFILE_TIMER(maintimer, "main()", "int (int, char **)", TAU_DEFAULT); TAU_PROFILE_INIT(argc, argv); TAU_PROFILE_START(maintimer); #if macintosh argc=ccommand(&argv); #endif mpi_err=MPI_Init(&argc,&argv); mpi_err=MPI_Comm_size(MPI_COMM_WORLD,&numnodes); mpi_err=MPI_Comm_rank(MPI_COMM_WORLD,&myid); /* #pragma omp parallel #pragma omp critical { thread_bind(); } */ /* ! find a reasonable grid topology based on the number ! of processors */ nrow=mint(sqrt((FLT)(numnodes))); ncol=numnodes/nrow; while (nrow*ncol != numnodes) { nrow=nrow+1; ncol=numnodes/nrow; } if(nrow > ncol){ i=ncol; ncol=nrow; nrow=i; } myrow=myid/ncol+1; mycol=myid - (myrow-1)*ncol + 1; if(myid == mpi_master) printf(" nrow= %d ncol= %d\n",nrow ,ncol); /* ! make the row and col communicators ! all processors with the same row will be in the same ROW_COMM */ mpi_err=MPI_Comm_split(MPI_COMM_WORLD,myrow,mycol,&ROW_COMM); mpi_err=MPI_Comm_rank( ROW_COMM, &myid_row); mpi_err=MPI_Comm_size( ROW_COMM, &nodes_row); /* ! all processors with the same col will be in the same COL_COMM */ mpi_err=MPI_Comm_split(MPI_COMM_WORLD,mycol,myrow,&COL_COMM); mpi_err=MPI_Comm_rank( COL_COMM, &myid_col); mpi_err=MPI_Comm_size( COL_COMM,& nodes_col); /* ! find id of neighbors using the communicators created above */ mytop = myid_col-1;if( mytop < 0 )mytop = MPI_PROC_NULL; mybot = myid_col+1;if( mybot == nodes_col)mybot = MPI_PROC_NULL; myleft = myid_row-1;if( myleft < 0 )myleft = MPI_PROC_NULL; myright = myid_row+1;if( myright == nodes_row)myright = MPI_PROC_NULL; if(myid == mpi_master) { FILE *fp = fopen("st.in", "r"); if (fp == NULL) { perror("Couldn't open file st.in"); exit(1); } fscanf(fp,"%d %d",&nx,&ny); fscanf(fp,"%lg %lg",&lx,&ly); fscanf(fp,"%lg %lg %lg",&alpha,&beta,&gamma); fscanf(fp,"%d",&steps); printf("%d %d\n",nx,ny); printf("%g %g\n",lx,ly); printf("%g %g %g\n",alpha,beta,gamma); printf("%d\n",steps); } mpi_err=MPI_Bcast(&nx, 1,MPI_INT, mpi_master,MPI_COMM_WORLD); mpi_err=MPI_Bcast(&ny, 1,MPI_INT, mpi_master,MPI_COMM_WORLD); mpi_err=MPI_Bcast(&steps,1,MPI_INT, mpi_master,MPI_COMM_WORLD); mpi_err=MPI_Bcast(&lx, 1,MPI_DOUBLE,mpi_master,MPI_COMM_WORLD); mpi_err=MPI_Bcast(&ly, 1,MPI_DOUBLE,mpi_master,MPI_COMM_WORLD); mpi_err=MPI_Bcast(&alpha,1,MPI_DOUBLE,mpi_master,MPI_COMM_WORLD); mpi_err=MPI_Bcast(&beta, 1,MPI_DOUBLE,mpi_master,MPI_COMM_WORLD); mpi_err=MPI_Bcast(&gamma,1,MPI_DOUBLE,mpi_master,MPI_COMM_WORLD); /* calculate the constants for the calculations */ dx=lx/(nx+1); dy=ly/(ny+1); dx2=dx*dx; dy2=dy*dy; bottom=2.0*(dx2+dy2); a1=(dy2/bottom)+(beta*dx2*dy2)/(2.0*gamma*dx*bottom); a2=(dy2/bottom)-(beta*dx2*dy2)/(2.0*gamma*dx*bottom); a3=dx2/bottom; a4=dx2/bottom; a5=dx2*dy2/(gamma*bottom); a6=pi/(ly); /* set the indices for the interior of the grid */ dj=(FLT)ny/(FLT)nodes_row; j1=mint(1.0+myid_row*dj); j2=mint(1.0+(myid_row+1)*dj)-1; di=(FLT)nx/(FLT)nodes_col; i1=mint(1.0+myid_col*di); i2=mint(1.0+(myid_col+1)*di)-1; if(myid == mpi_master)printf("nodes_row= %d nodes_col= %d\n",nodes_row,nodes_col); printf("myid= %d myrow= %d mycol= %d\n",myid,myrow,mycol); printf("myid= %d myid_row= %d myid_col= %d\n",myid,myid_row,myid_col); printf("myid= %d holds [%d:%d][%d:%d]\n",myid,i1,i2,j1,j2); /* allocate the grid to (i1-1:i2+1,j1-1:j2+1) this includes boundary cells */ psi= matrix((INT)(i1-1),(INT)(i2+1),(INT)(j1-1),(INT)(j2+1)); new_psi=matrix((INT)(i1-1),(INT)(i2+1),(INT)(j1-1),(INT)(j2+1)); the_for=matrix((INT)(i1-1),(INT)(i2+1),(INT)(j1-1),(INT)(j2+1)); svec1=vector((INT)(i1-1),(INT)(i2+1)); svec2=vector((INT)(i1-1),(INT)(i2+1)); rvec1=vector((INT)(i1-1),(INT)(i2+1)); rvec2=vector((INT)(i1-1),(INT)(i2+1)); /* set initial guess for the value of the grid */ for(i=i1-1;i<=i2+1;i++) for(j=j1-1;j<=j2+1;j++) psi[i][j]=1.0; /* set boundary conditions */ bc(psi,i1,i2,j1,j2); do_force(i1,i2,j1,j2); /* do the jacobian iterations */ t1=MPI_Wtime(); iout=steps/100; if(iout == 0)iout=1; if(steps > 0){ for( i=1; i<=steps;i++) { do_jacobi(psi,new_psi,&mydiff,i1,i2,j1,j2); do_transfer(psi,i1,i2,j1,j2); mpi_err= MPI_Reduce(&mydiff,&diff,1,MPI_DOUBLE,MPI_SUM,mpi_master,MPI_COMM_WORLD); if(myid == mpi_master && i % iout == 0){ printf("%8d %15.5f\n",i,diff); } } } t2=MPI_Wtime(); if(myid == mpi_master)printf("run time = %10.3g\n",t2-t1); /* write_grid(psi,i1,i2,j1,j2); */ mpi_err = MPI_Finalize(); TAU_PROFILE_STOP(maintimer); return 0; } void bc(FLT ** psi,INT i1,INT i2,INT j1,INT j2){ /* sets the boundary conditions */ /* input is the grid and the indices for the interior cells */ INT j; TAU_PROFILE_TIMER(bctimer, "bc()", "void (FLT **, INT, INT, INT, INT)", TAU_DEFAULT); TAU_PROFILE_START(bctimer); /* do the top edges */ if(i1 == 1) { for(j=j1-1;j<=j2+1;j++) psi[i1-1][j]=0.0; } /* do the bottom edges */ if(i2 == ny) { for(j=j1-1;j<=j2+1;j++) psi[i2+1][j]=0.0; } /* do left edges */ if(j1 == 1) { for(j=i1-1;j<=i2+1;j++) psi[j][j1-1]=0.0; } /* do right edges */ if(j2 == nx) { for(j=i1-1;j<=i2+1;j++) psi[j][j2+1]=0.0; } TAU_PROFILE_STOP(bctimer); } void do_jacobi(FLT ** psi,FLT ** new_psi,FLT *diff_in,INT i1,INT i2,INT j1,INT j2){ /* ! does a single Jacobi iteration step ! input is the grid and the indices for the interior cells ! new_psi is temp storage for the the updated grid ! output is the updated grid in psi and diff which is ! the sum of the differences between the old and new grids */ INT i,j; FLT diff; #pragma omp parallel { diff=0.0; /*#pragma omp parallel for schedule(static) reduction(+: diff) private(j) firstprivate (a1,a2,a3,a4,a5) */ #pragma omp for schedule(static) reduction(+: diff) private(j) firstprivate (a1,a2,a3,a4,a5) for( i=i1;i<=i2;i++) { for(j=j1;j<=j2;j++){ new_psi[i][j]=a1*psi[i+1][j] + a2*psi[i-1][j] + a3*psi[i][j+1] + a4*psi[i][j-1] - a5*the_for[i][j]; diff=diff+fabs(new_psi[i][j]-psi[i][j]); } } *diff_in=diff; #pragma omp for schedule(static) private(j) for( i=i1;i<=i2;i++) { for(j=j1;j<=j2;j++) psi[i][j]=new_psi[i][j]; } } } void do_force (INT i1,INT i2,INT j1,INT j2) { /* ! sets the force conditions ! input is the grid and the indices for the interior cells */ FLT y; INT i,j; TAU_PROFILE_TIMER(forcetimer, "do_force()", "void (INT, INT, INT, INT)", TAU_DEFAULT); TAU_PROFILE_START(forcetimer); for( i=i1;i<=i2;i++) { for(j=j1;j<=j2;j++){ y=j*dy; the_for[i][j]=force(y); } } TAU_PROFILE_STOP(forcetimer); } FLT force(FLT y) { return (-alpha*sin(y*a6)); } /* The routines matrix, ivector and vector were adapted from Numerical Recipes in C The Art of Scientific Computing Press, Flannery, Teukolsky, Vetting Cambridge University Press, 1988. */ FLT **matrix(INT nrl,INT nrh,INT ncl,INT nch) { INT i; FLT **m; TAU_PROFILE_TIMER(mat, "matrix()", "FLT ** (INT, INT, INT, INT)", TAU_DEFAULT); TAU_PROFILE_START(mat); m=(FLT **) malloc((unsigned) (nrh-nrl+1)*sizeof(FLT*)); if (!m){ printf("allocation failure 1 in matrix()\n"); TAU_PROFILE_EXIT("malloc error"); exit(1); } m -= nrl; for(i=nrl;i<=nrh;i++) { if(i == nrl){ m[i]=(FLT *) malloc((unsigned) (nrh-nrl+1)*(nch-ncl+1)*sizeof(FLT)); if (!m[i]){ printf("allocation failure 2 in matrix()\n"); TAU_PROFILE_EXIT("malloc error"); exit(1); } m[i] -= ncl; } else { m[i]=m[i-1]+(nch-ncl+1); } } TAU_PROFILE_STOP(mat); return m; } INT *ivector(INT nl, INT nh) { INT *v; v=(INT *)malloc((unsigned) (nh-nl+1)*sizeof(INT)); if (!v) { printf("allocation failure in ivector()\n"); exit(1); } return v-nl; } FLT *vector(INT nl, INT nh) { FLT *v; v=(FLT *)malloc((unsigned) (nh-nl+1)*sizeof(FLT)); if (!v) { printf("allocation failure in vector()\n"); exit(1); } return v-nl; } void do_transfer(FLT ** psi,INT i1,INT i2,INT j1,INT j2) { INT num_x,num_y; INT i; TAU_PROFILE_TIMER(trf, "do_transfer()", "void (FLT **, INT, INT, INT, INT)", TAU_DEFAULT); TAU_PROFILE_START(trf); num_x=i2-i1+3; num_y=j2-j1+3; for(i=i1-1;i<=i2+1;i++){ svec1[i]=psi[i][j1]; svec2[i]=psi[i][j2]; } if((myid_col % 2) == 0){ /* send to left */ mpi_err=MPI_Send(&svec1[i1-1],num_x,MPI_DOUBLE,myleft,100,ROW_COMM); /* rec from left */ mpi_err=MPI_Recv(&rvec1[i1-1],num_x,MPI_DOUBLE,myleft,100,ROW_COMM,&status); /* rec from right */ mpi_err=MPI_Recv(&rvec2[i1-1],num_x,MPI_DOUBLE,myright,100,ROW_COMM,&status); /* send to right */ mpi_err=MPI_Send(&svec2[i1-1],num_x,MPI_DOUBLE,myright,100,ROW_COMM); } else { /* we are on an odd col processor */ /* rec from right */ mpi_err=MPI_Recv(&rvec2[i1-1],num_x,MPI_DOUBLE,myright,100,ROW_COMM,&status); /* send to right */ mpi_err=MPI_Send(&svec2[i1-1],num_x,MPI_DOUBLE,myright,100,ROW_COMM); /* send to left */ mpi_err=MPI_Send(&svec1[i1-1],num_x,MPI_DOUBLE,myleft,100,ROW_COMM); /* rec from left */ mpi_err=MPI_Recv(&rvec1[i1-1],num_x,MPI_DOUBLE,myleft,100,ROW_COMM,&status); } if(myleft != MPI_PROC_NULL){ for(i=i1-1;i<=i2+1;i++){ psi[i][j1-1]=rvec1[i]; } } if(myright != MPI_PROC_NULL){ for(i=i1-1;i<=i2+1;i++){ psi[i][j2+1]=rvec2[i]; } } if((myid_row % 2) == 0){ /* send to top */ mpi_err=MPI_Send(&psi[i1][j1-1], num_y,MPI_DOUBLE,mytop,10, COL_COMM); /* rec from top */ mpi_err=MPI_Recv(&psi[i1-1][j1-1],num_y,MPI_DOUBLE,mytop,10,COL_COMM,&status); /* rec from bot */ mpi_err=MPI_Recv(&psi[i2+1][j1-1],num_y,MPI_DOUBLE,mybot,10,COL_COMM,&status); /* send to bot */ mpi_err=MPI_Send(&psi[i2][j1-1], num_y,MPI_DOUBLE,mybot,10, COL_COMM); } else{ /* rec from bot */ mpi_err=MPI_Recv(&psi[i2+1][j1-1],num_y,MPI_DOUBLE,mybot,10,COL_COMM,&status); /* send to bot */ mpi_err=MPI_Send(&psi[i2][j1-1], num_y,MPI_DOUBLE,mybot,10,COL_COMM); /* send to top */ mpi_err=MPI_Send(&psi[i1][j1-1], num_y,MPI_DOUBLE,mytop,10,COL_COMM); /* rec from top */ mpi_err=MPI_Recv(&psi[i1-1][j1-1],num_y,MPI_DOUBLE,mytop,10,COL_COMM,&status); } TAU_PROFILE_STOP(trf); } char* unique(char *name) { static char unique_str[40]; int i; for(i=0;i<40;i++) unique_str[i]=(char)0; if(myid > 99){ sprintf(unique_str,"%s%d",name,myid); } else { if(myid > 9) sprintf(unique_str,"%s0%d",name,myid); else sprintf(unique_str,"%s00%d",name,myid); } return unique_str; } void write_grid(FLT ** psi,INT i1,INT i2,INT j1,INT j2) { /* ! input is the grid and the indices for the interior cells */ INT i,j,i0,j0,i3,j3; FILE *f18; TAU_PROFILE_TIMER(gr, "write_grid()", "void (FLT **, INT, INT, INT, INT)", TAU_DEFAULT); TAU_PROFILE_START(gr); if(i1==1) { i0=0; } else { i0=i1; } if(i2==nx) { i3=nx+1; } else { i3=i2; } if(j1==1) { j0=0; } else { j0=j1; } if(j2==ny) { j3=ny+1; } else { j3=j2; } f18=fopen(unique("out2c_"),"w"); fprintf(f18,"%6d %6d\n",i3-i0+1,j3-j0+1); for( i=i0;i<=i3;i++){ for( j=j0;j<=j3;j++){ fprintf(f18,"%14.7g",psi[i][j]); if(j != j3)fprintf(f18," "); } fprintf(f18,"\n"); } fclose(f18); TAU_PROFILE_STOP(gr); } INT mint(FLT x) { FLT y; INT j; j=(INT)x; y=(FLT)j; if(x-y >= 0.5)j++; return j; } FLT walltime() { return((FLT)clock()/((FLT)CLOCKS_PER_SEC)); } tau-2.16.4/examples/opari/pdt_f90/000077500000000000000000000000001062343042700165735ustar00rootroot00000000000000tau-2.16.4/examples/opari/pdt_f90/Makefile000066400000000000000000000076511062343042700202440ustar00rootroot00000000000000#**************************************************************************** #* TAU Portable Profiling Package ** #* http://www.cs.uoregon.edu/research/tau ** #**************************************************************************** #* Copyright 1997 ** #* Department of Computer and Information Science, University of Oregon ** #* Advanced Computing Laboratory, Los Alamos National Laboratory ** #**************************************************************************** ####################################################################### ## pC++/Sage++ Copyright (C) 1993,1995 ## ## Indiana University University of Oregon University of Rennes ## ####################################################################### TAUROOTDIR = ../../.. include $(TAUROOTDIR)/include/Makefile CXX = $(TAU_CXX) CC = $(TAU_CC) PDTCPARSE = $(PDTDIR)/$(PDTARCHDIR)/bin/cparse PDTF90PARSE = $(PDTDIR)/$(PDTARCHDIR)/bin/f95parse TAUINSTR = $(TAUROOTDIR)/$(CONFIG_ARCH)/bin/tau_instrumentor OPARI_TOOL = $(TAU_OPARI_TOOL) CFLAGS = $(TAU_INCLUDE) $(TAU_DEFS) FFLAGS = $(TAU_F90_SUFFIX) -g LIBS = $(TAU_LIBS) $(TAU_FORTRANLIBS) $(LEXTRA1) #LIBS = $(TAU_DISABLE) $(TAU_FORTRANLIBS) LDFLAGS = $(USER_OPT) MAKEFILE = Makefile PRINT = pr RM = /bin/rm -f F90 = $(TAU_F90) TARGET = mandel EXTRAOBJS = ############################################## all: $(TARGET) $(PDTF90PARSE) $(TAUINSTR) $(OPARI_TOOL) install: $(TARGET) $(TARGET): ppm.o $(TARGET).o mytimer.o opari.tab.o @echo "*********************************************************" @echo "LINKING: " $(TAU_LINKER) $(LDFLAGS) $(TARGET).o ppm.o mytimer.o opari.tab.o -o $@ $(LIBS) $(TARGET).o : $(TARGET).f90 ppm.o @echo "*********************************************************" @echo "Creating $(TARGET).o:" $(RM) opari.rc $(OPARI_TOOL) -nosrc -table opari.tab.c $*.f90 $*.pomp.f90 $(PDTF90PARSE) $*.pomp.f90 -MPDT_MODULES $(TAUINSTR) $*.pomp.pdb $*.pomp.f90 -o $*.inst.f90 $(F90) $(FFLAGS) -c $*.inst.f90 -o $@ ppm.o : ppm.f90 @echo "*********************************************************" @echo "Creating ppm.o: " $(PDTF90PARSE) $< if [ -d PDT_MODULES ] ; then true; \ else mkdir PDT_MODULES ; fi if [ ! -f PPM.mod ] ; then true ; \ else mv PPM.mod PDT_MODULES ; fi $(TAUINSTR) $*.pdb $< -o $*.inst.f90 $(F90) $(FFLAGS) -c $*.inst.f90 -o $@ opari.tab.o: $(TARGET).o @echo "*********************************************************" @echo "Creating opari.tab.o:" $(CC) $(CFLAGS) -c opari.tab.c mytimer.o : mytimer.c @echo "*********************************************************" @echo "Creating mytimer.o:" $(PDTCPARSE) $< $(TAUINSTR) $*.pdb $< -o $*.inst.c $(CC) $(CFLAGS) -c $*.inst.c -o $@ clean: @echo "*********************************************************" @echo "Cleaning... :" $(RM) -r $(TARGET).o $(TARGET) mytimer.o ppm.o *.mod* *.pdb *.tab.* *.pomp.f90 *.inst.* opari.rc *.inc PDT_MODULES ############################################## $(PDTF90PARSE): @echo "*********************************************************" @echo "Download and Install Program Database Toolkit " @echo "ERROR: Cannot find $(PDTPARSE)" @echo "*********************************************************" $(TAUINSTR): @echo "*********************************************************" @echo "Configure TAU with -pdt= configuration option to use" @echo "C++ instrumentation with PDT" @echo "ERROR: Cannot find $(TAUINSTR)" @echo "*********************************************************" $(OPARITOOL): @echo "*********************************************************" @echo "Configure TAU with -opari= configuration option to use" @echo "Opari OpenMP directive rewriting tool" @echo "ERROR: Cannot find $(OPARITOOL)" @echo "*********************************************************" tau-2.16.4/examples/opari/pdt_f90/README000066400000000000000000000001651062343042700174550ustar00rootroot00000000000000This example illustrates the use of Opari with PDT to instrument a Fortran program. See the Makefile for details. tau-2.16.4/examples/opari/pdt_f90/mandel.f90000066400000000000000000000032261062343042700203560ustar00rootroot00000000000000 program mandel use ppm implicit none integer, parameter :: dp=selected_real_kind(13) complex(kind=dp) :: c, z integer :: ix, iy, cnt integer :: numpe, maxiter integer, parameter :: width=800, height=800 integer, dimension(width,height) :: iterations real(kind=dp) :: xmin, xmax, ymin, ymax, x, y, dx, dy external mytimer !$ integer OMP_GET_NUM_THREADS ! --- init ! -1.5 0.5 -1.0 1.0 ! -.59 -.54 -.58 -.53 ! -.65 -.4 .475 .725 ! -.65 -.5 .575 .725 ! -.59 -.56 .47 .5 write(unit=*, fmt="(A)") "xmin xmax ymin ymax maxiter (Sample: -.59 -.56 .47 .5 216) ?" read (unit=*, fmt=*) xmin, xmax, ymin, ymax, maxiter ! --- initialization dx = (xmax - xmin) / width dy = (ymax - ymin) / height numpe = 1 ! --- calculate mandelbrot set call mytimer(0) !$OMP PARALLEL !$ numpe = OMP_GET_NUM_THREADS() !$OMP DO PRIVATE(ix,x,y,c,z,cnt) do iy=1,height y = ymin + iy*dy do ix=1,width x = xmin + ix*dx c = cmplx(x,y) z = (0.0,0.0) cnt = 0 do z = z*z + c cnt = cnt+1 if ( (dble(z)*dble(z) + aimag(z)*aimag(z)) >= 16 .or. & cnt >= maxiter ) then exit end if end do iterations(ix,iy) = cnt end do end do !$OMP END DO !$OMP END PARALLEL call mytimer(numpe) ! --- generate ppm file write (unit=*, fmt="(A)") "generate ppm file..." call ppmwrite("mandel.ppm", iterations, maxiter) end program mandel tau-2.16.4/examples/opari/pdt_f90/mytimer.c000066400000000000000000000012031062343042700204210ustar00rootroot00000000000000#include #include void mytimer_(int* arg) { static struct timeval t1, t2; double elapsed; if (arg && *arg) { /* -- arg contains numpe, stop timing -- */ gettimeofday(&t2, 0); elapsed = (t2.tv_sec - t1.tv_sec) + (t2.tv_usec - t1.tv_usec) * 1.0e-6; fprintf(stdout, "... %6.3f sec on %d pe(s)\n", elapsed, *arg); fflush(stdout); } else { /* -- start timing -- */ fprintf(stdout, "start ...\n"); fflush(stdout); gettimeofday(&t1, 0); } } void mytimer(int* arg) { mytimer_(arg); } void mytimer__(int* arg) { mytimer_(arg); } void MYTIMER(int* arg) { mytimer_(arg); } tau-2.16.4/examples/opari/pdt_f90/ppm.f90000066400000000000000000000071631062343042700177160ustar00rootroot00000000000000 module ppm implicit none public :: ppmwrite_ascii, ppmwrite contains subroutine ppmwrite_ascii(fname, iterations, maxiter) character(len=*), intent(in) :: fname integer, dimension(:,:), intent(in) :: iterations integer, intent(in) :: maxiter integer :: width, height integer :: ix, iy, iz, cnt, idx integer, parameter :: maxc = 3 integer, parameter :: maxcols = (maxc+1)*(maxc+1)*(maxc+1) integer, dimension(maxcols,3) :: col real :: factor ! --- initialization width = size(iterations,1) height = size(iterations,2) factor = real(maxiter) / maxcols ! --- generate color map cnt = maxcols do ix=0,maxc do iy=0,maxc do iz=0,maxc col(cnt,1) = ix col(cnt,2) = iy col(cnt,3) = iz cnt = cnt-1 end do end do end do ! --- generate ppm file open(unit=9, file=fname, status="replace", action="write") write(unit=9, fmt="('P3 ', 2i5, i2)") width, height, maxc do iy=1,height do ix=1,width if ( iterations(ix,iy) == maxiter ) then write(unit=9, fmt="(A)") "0 0 0" else idx = iterations(ix,iy) / factor + 1 write(unit=9, fmt="(3i2)") col(idx,1), col(idx,2), col(idx,3) end if end do end do close(unit=9) end subroutine ppmwrite_ascii subroutine ppmwrite(fname, iterations, maxiter) character(len=*), intent(in) :: fname integer, dimension(:,:), intent(in) :: iterations integer, intent(in) :: maxiter integer :: width, height integer :: ix, iy, iz, cnt, idx, b, r, i, total integer, parameter :: maxc = 3, buflen=512 integer, parameter :: maxcols = (maxc+1)*(maxc+1)*(maxc+1) real :: factor character(len=1), dimension(maxcols,3) :: col character(len=buflen) :: buf character(len=20) :: tmpbuf ! --- initialization width = size(iterations,1) height = size(iterations,2) factor = real(maxiter) / maxcols b = 1 total = 0 ! --- generate color map cnt = maxcols do ix=0,maxc do iy=0,maxc do iz=0,maxc col(cnt,1) = char(ix) col(cnt,2) = char(iy) col(cnt,3) = char(iz) cnt = cnt-1 end do end do end do ! --- generate ppm file open(unit=9, file=fname, access="direct", recl=buflen, & action="write", status="replace") write(unit=tmpbuf, fmt="('P6 ', 2i5, i2)") width, height, maxc buf(1:15) = tmpbuf(1:15) buf(16:16) = char(10) b = 17 r = 1 do iy=1,height do ix=1,width total = total + iterations(ix,iy) if ( iterations(ix,iy) == maxiter ) then do i=1,3 buf(b:b) = char(0) b = b+1 if ( b > buflen ) then write(unit=9, rec=r) buf b = 1 r = r+1 endif enddo else idx = iterations(ix,iy) / factor + 1 do i=1,3 buf(b:b) = col(idx,i) b = b+1 if ( b > buflen ) then write(unit=9, rec=r) buf b = 1 r = r+1 endif end do end if end do end do write(unit=9, rec=r) buf close(unit=9) ! write (unit=*, fmt="(I A)") total, " total iterations" end subroutine ppmwrite end module ppm tau-2.16.4/examples/openmp/000077500000000000000000000000001062343042700155125ustar00rootroot00000000000000tau-2.16.4/examples/openmp/README000066400000000000000000000040111062343042700163660ustar00rootroot00000000000000This directory contains examples of OpenMP programs written in C and C++. To illustrate the use of TAU, we provide a Mandelbrot program (written by Bernd Mohr, FZJ, Germany) in the subdirectories. To use it: % make % setenv OMP_NUM_THREADS % mandel It will pick up default arguments and run the program. % pprof; racy NOTE: It is VERY important to include the -mp flag on the link command-line for ***** OpenMP programs (for PGI). Since this is not a universal option applicable to all OpenMP compilers, TAU doesn't add this. If this option is not included, the linker may not find all the mp routines. The implementation of Mandelbrot is described below (by Bernd in German) :) Berechnung der Mandelbrotmenge ("Apfelmännchen") ================================================ Schreiben Sie ein Programm zur Berechnung der Mandelbrotmenge. Diese ergibt sich aus der Berechnung der Anzahl von Iterationen die nötig sind damit die komplexe Rekursionsformel complex z, c c = cmplx(x,y) z_0 = (0,0) z_n+1 = z_n * z_n + c das Abbruchkriterium norm(z) >= 16 erfüllt bzw. eine maximale Iterationsanzahl erreicht (wählen Sie hier ein Vielfaches von 64), und zwar für jeden Punkt der komplexen Ebene gegeben durch (xmin + ymin i) und (xmax + ymax i). Führen Sie Berechnung für eine geeigneten Auflösung (z.B. 800x800) aus. Zur Erzeugung des Bildes können Sie die in der Datei "ppm.f" vorgegebene Funktion "ppmwrite" benutzen, welche ein Bild im PPM-Format erzeugt. Dieses kann z.B. mit dem Kommando "xv" betrachet werden. subroutine ppmwrite(fname, iterations, maxiter) character(len=*) fname ! Dateiname integer iterations(:,:) ! Anzahl Iterationen für jeden Pixel integer maxiter ! Maximale Iterationsanzahl Beschleunigen Sie die Berechnung der Mandelbrotmenge durch Parallelisierung und bestimmen Sie den erreichten Speedup. Hinweis: einige interessante Gebiete: -1.5 - 1.0i 0.5 + 1.0i -0.59 - 0.58i -0.54 - 0.53i -0.59 + 0.47i -0.56 + 0.5i tau-2.16.4/examples/openmp/c++/000077500000000000000000000000001062343042700160625ustar00rootroot00000000000000tau-2.16.4/examples/openmp/c++/Makefile000066400000000000000000000031101062343042700175150ustar00rootroot00000000000000#**************************************************************************** #* TAU Portable Profiling Package ** #* http://www.cs.uoregon.edu/research/tau ** #**************************************************************************** #* Copyright 1997 ** #* Department of Computer and Information Science, University of Oregon ** #* Advanced Computing Laboratory, Los Alamos National Laboratory ** #**************************************************************************** ####################################################################### ## pC++/Sage++ Copyright (C) 1993,1995 ## ## Indiana University University of Oregon University of Rennes ## ####################################################################### TAUROOTDIR = ../../.. include $(TAUROOTDIR)/include/Makefile CXX = $(TAU_CXX) CC = $(TAU_CC) CFLAGS = $(TAU_INCLUDE) $(TAU_DEFS) -DSTD_COMPLEX LIBS = $(TAU_LIBS) LDFLAGS = $(CFLAGS) MAKEFILE = Makefile PRINT = pr RM = /bin/rm -f TARGET = mandel EXTRAOBJS = ############################################## all: $(TARGET) install: $(TARGET) $(TARGET): $(TARGET).o mytimer.o ppmwrite.o $(CXX) $(LDFLAGS) $(TARGET).o mytimer.o ppmwrite.o -o $@ $(LIBS) $(TARGET).o : $(TARGET).cpp $(CXX) $(CFLAGS) -c $(TARGET).cpp mytimer.o : mytimer.c $(CC) -c $< ppmwrite.o : ppmwrite.cpp $(CXX) $(CFLAGS) -c $< clean: $(RM) $(TARGET).o $(TARGET) ppmwrite.o mytimer.o ############################################## tau-2.16.4/examples/openmp/c++/TComplex.h000066400000000000000000000013041062343042700177640ustar00rootroot00000000000000#ifndef TComplex_H #define TComplex_H #include template class TComplex { public: // default constructor TComplex(T r = 0.0, T i = 0.0) {re = r; im = i;} // field access functions T real(void) const {return re;} T imag(void) const {return im;} // addition operator const TComplex operator+(const TComplex& rhs) const { return TComplex(re+rhs.re, im+rhs.im); } // multiplication operator const TComplex operator*(const TComplex& rhs) const { return TComplex(re*rhs.re - im*rhs.im, re*rhs.im + im*rhs.re); } private: T re, im; }; template T norm(const TComplex& x) { return x.real()*x.real() + x.imag()*x.imag(); } #endif tau-2.16.4/examples/openmp/c++/mandel.cpp000066400000000000000000000050041062343042700200250ustar00rootroot00000000000000/* This program was written by Bernd Mohr, FZJ, Germany. It illustrates the use of OpenMP in this Mandelbrot program. The output of this program is an image stored in mandel.ppm. */ // #include // using std::fprintf; // using std::printf; #include // #include // using std::strtod; // using std::atoi; // using std::exit; #include #include #include using namespace std; extern "C" void mytimer_(int *); #ifdef STD_COMPLEX # include typedef std::complex dcomplex; using std::norm; #else # include "TComplex.h" typedef TComplex dcomplex; #endif #ifdef _OPENMP extern "C" { # include } #endif #include "ppmwrite.h" void foo(void) { TAU_PROFILE("foo", " ", TAU_DEFAULT); } field iterations; int main(int argc, char *argv[]) { double xmin, xmax, ymin, ymax; int maxiter; TAU_PROFILE("main()", "int (int, char **)", TAU_DEFAULT); TAU_PROFILE_SET_NODE(0); // --- init input parameter // -1.5 0.5 -1.0 1.0 // -.59 -.54 -.58 -.53 // -.65 -.4 .475 .725 // -.65 -.5 .575 .725 // -.59 -.56 .47 .5 // -.535 -.555 .49 .51 if ( argc != 6 ) { fprintf(stderr, "%s: xmin xmax ymin ymax maxiter\n", argv[0]); fprintf(stderr, "Using defaults: -.59 -.56 .47 .5 216\n"); xmin = -.59; xmax = -.56; ymin = .47; ymax = .5; maxiter = 216; } else { xmin = strtod(argv[1], 0); xmax = strtod(argv[2], 0); ymin = strtod(argv[3], 0); ymax = strtod(argv[4], 0); maxiter = atoi(argv[5]); cout <<"Using xmin = "< #include void mytimer_(int* arg) { static struct timeval t1, t2; double elapsed; if (arg && *arg) { /* -- arg contains numpe, stop timing -- */ gettimeofday(&t2, 0); elapsed = (t2.tv_sec - t1.tv_sec) + (t2.tv_usec - t1.tv_usec) * 1.0e-6; fprintf(stdout, "... %6.3f sec on %d pe(s)\n", elapsed, *arg); fflush(stdout); } else { /* -- start timing -- */ fprintf(stdout, "start ...\n"); fflush(stdout); gettimeofday(&t1, 0); } } tau-2.16.4/examples/openmp/c++/ppm.h000066400000000000000000000005371062343042700170340ustar00rootroot00000000000000#define width 800 /* Resolution */ #define height 800 typedef int field[width][height]; /* Type to store iteration counts */ extern void ppmwrite(char *fname, /* Name of PPM file */ field iterations, /* Calculated iteration counts */ int maxiter); /* Iteration count limit */ tau-2.16.4/examples/openmp/c++/ppmwrite.cpp000066400000000000000000000074651062343042700204510ustar00rootroot00000000000000#include #include #include #include #include #include "ppmwrite.h" /* * ColorTable */ char ColorTable::operator()(int i, base b) const { return tab[i].c[b]; } ColorTable::~ColorTable() { TAU_PROFILE("ColorTable::~ColorTable()", "void ()", TAU_DEFAULT); delete [] tab; } int ColorTable::numColors() const { TAU_PROFILE("ColorTable::numColors()", "int (void)", TAU_DEFAULT); return num; } int ColorTable::shades() const { TAU_PROFILE("ColorTable::shades()", "int (void)", TAU_DEFAULT); return sds; } ColorTable::ColorTable(int shades, int numColors) : sds(shades), num(numColors) { TAU_PROFILE("ColorTable::ColorTable()", "void (int, int)", TAU_DEFAULT); tab = new Color[num]; } /* * PermutationColorTable */ PermutationColorTable:: PermutationColorTable(int shades, direction d, base b1, base b2, base b3) : ColorTable(shades, shades*shades*shades) { TAU_PROFILE("PermutationColorTable::PermutationColorTable()", "void (int, direction, base, base, base)", TAU_DEFAULT); int count = d==fwd ? 0 : numColors()-1; for (int ix=0; ix= buflen ) { write(out, buf, buflen); b = 0; } } } else { idx = int (idx / factor); for (int iz=0; iz<3; ++iz) { buf[b++] = table(idx, base(iz)); if ( b >= buflen ) { write(out, buf, buflen); b = 0; } } } } } write(out, buf, b); close(out); printf("%d total iterations\n", total); } tau-2.16.4/examples/openmp/c++/ppmwrite.h000066400000000000000000000022501062343042700201010ustar00rootroot00000000000000enum base { red, green, blue }; enum direction { back=-1, fwd=1 }; class ColorTable { public: char operator()(int i, base b) const; ~ColorTable(); int numColors() const; int shades() const; protected: ColorTable(int shades, int numColors); struct Color { char c[3]; }; Color* tab; private: int sds; int num; }; class PermutationColorTable : public ColorTable { public: PermutationColorTable(int shades, direction d=fwd, base b1=red, base b2=green, base b3=blue); }; class SmoothColorTable : public ColorTable { public: SmoothColorTable(int shades, direction d=fwd, base b1=red, base b2=green, base b3=blue); }; const int width=800, height=800; // Resolution typedef int field[width][height]; // Type to store iteration counts void ppmwrite(char *fname, // Name of PPM file field iterations, // Calculated iteration counts int maxiter, // Iteration count limit const ColorTable& table=SmoothColorTable(10, fwd, blue, green, red)); // Default color table tau-2.16.4/examples/openmp/c/000077500000000000000000000000001062343042700157345ustar00rootroot00000000000000tau-2.16.4/examples/openmp/c/Makefile000066400000000000000000000030321062343042700173720ustar00rootroot00000000000000#**************************************************************************** #* TAU Portable Profiling Package ** #* http://www.cs.uoregon.edu/research/tau ** #**************************************************************************** #* Copyright 1997 ** #* Department of Computer and Information Science, University of Oregon ** #* Advanced Computing Laboratory, Los Alamos National Laboratory ** #**************************************************************************** ####################################################################### ## pC++/Sage++ Copyright (C) 1993,1995 ## ## Indiana University University of Oregon University of Rennes ## ####################################################################### TAUROOTDIR = ../../.. include $(TAUROOTDIR)/include/Makefile CXX = $(TAU_CXX) CC = $(TAU_CC) CFLAGS = $(TAU_INCLUDE) $(TAU_DEFS) LIBS = $(TAU_LIBS) LDFLAGS = $(CFLAGS) MAKEFILE = Makefile PRINT = pr RM = /bin/rm -f TARGET = mandel EXTRAOBJS = ############################################## all: $(TARGET) install: $(TARGET) $(TARGET): $(TARGET).o mytimer.o ppm.o $(CXX) $(LDFLAGS) $(TARGET).o mytimer.o ppm.o -o $@ $(LIBS) $(TARGET).o : $(TARGET).c $(CC) $(CFLAGS) -c $(TARGET).c mytimer.o : mytimer.c $(CC) -c $< ppm.o : ppm.c $(CC) $(CFLAGS) -c $< clean: $(RM) $(TARGET).o $(TARGET) ppm.o mytimer.o ############################################## tau-2.16.4/examples/openmp/c/TComplex.h000066400000000000000000000013041062343042700176360ustar00rootroot00000000000000#ifndef TComplex_H #define TComplex_H #include template class TComplex { public: // default constructor TComplex(T r = 0.0, T i = 0.0) {re = r; im = i;} // field access functions T real(void) const {return re;} T imag(void) const {return im;} // addition operator const TComplex operator+(const TComplex& rhs) const { return TComplex(re+rhs.re, im+rhs.im); } // multiplication operator const TComplex operator*(const TComplex& rhs) const { return TComplex(re*rhs.re - im*rhs.im, re*rhs.im + im*rhs.re); } private: T re, im; }; template T norm(const TComplex& x) { return x.real()*x.real() + x.imag()*x.imag(); } #endif tau-2.16.4/examples/openmp/c/mandel.c000066400000000000000000000036401062343042700173430ustar00rootroot00000000000000#include #include #include extern void mytimer_(int *); #ifdef _OPENMP # include #endif #include "ppm.h" field iterations; int main(int argc, char *argv[]) { double xmin, xmax, ymin, ymax, dx, dy; int numpe, maxiter, ix, iy; TAU_PROFILE_TIMER(mt, "main()", "int (int, char **)", TAU_DEFAULT); TAU_PROFILE_SET_NODE(0); TAU_PROFILE_START(mt); if ( argc != 6 ) { fprintf(stderr, "%s: xmin xmax ymin ymax maxiter\n", argv[0]); fprintf(stderr, "Using defaults: -.59 -.56 .47 .5 216\n"); xmin = -.59; xmax = -.56; ymin = .47; ymax = .5; maxiter = 216; } else { xmin = strtod(argv[1], 0); xmax = strtod(argv[2], 0); ymin = strtod(argv[3], 0); ymax = strtod(argv[4], 0); maxiter = atoi(argv[5]); } /* --- initialization -- */ numpe = 1; dx = (xmax - xmin) / width; dy = (ymax - ymin) / height; /* --- calculate mandelbrot set -- */ mytimer_(0); #pragma omp parallel { TAU_PROFILE_TIMER(pt, "Parallel Region", " " , TAU_DEFAULT); TAU_PROFILE_START(pt); #ifdef _OPENMP numpe = omp_get_num_threads(); #endif #pragma omp for private(ix,iy) for (ix=0; ix #include void mytimer_(int* arg) { static struct timeval t1, t2; double elapsed; if (arg && *arg) { /* -- arg contains numpe, stop timing -- */ gettimeofday(&t2, 0); elapsed = (t2.tv_sec - t1.tv_sec) + (t2.tv_usec - t1.tv_usec) * 1.0e-6; fprintf(stdout, "... %6.3f sec on %d pe(s)\n", elapsed, *arg); fflush(stdout); } else { /* -- start timing -- */ fprintf(stdout, "start ...\n"); fflush(stdout); gettimeofday(&t1, 0); } } tau-2.16.4/examples/openmp/c/ppm.c000066400000000000000000000031501062343042700166730ustar00rootroot00000000000000#include #include #include #include #include #include "ppm.h" #define BUFLEN 2048 #define NUMCOLORS 64 #define NUMSHADES 3 void ppmwrite(char *fname, field iterations, int maxiter) { double factor; char buf[BUFLEN]; int b, ix, iy, iz, idx, total; char table[NUMCOLORS][NUMSHADES]; int out; TAU_PROFILE_TIMER(pt, "ppmwrite()", "void (char *, field, int)", TAU_DEFAULT); TAU_PROFILE_START(pt); out = creat(fname, 0666); if ( out == -1 ) { perror(fname); TAU_PROFILE_STOP(pt); TAU_PROFILE_EXIT("exit on error"); exit(1); } idx = NUMCOLORS; for (iy=0; iy<=NUMSHADES; ++iy) { for (ix=0; ix<=NUMSHADES; ++ix) { for (iz=0; iz<=NUMSHADES; ++iz) { --idx; table[idx][0] = ix; table[idx][1] = iy; table[idx][2] = iz; } } } total = 0; factor = (double)maxiter / NUMCOLORS; b = sprintf(buf, "P6 %5d %5d %d\n", width, height, NUMSHADES); for (iy=0; iy= BUFLEN ) { write(out, buf, BUFLEN); b = 0; } } } else { idx = (int) (idx / factor); for (iz=0; iz<3; ++iz) { buf[b++] = table[idx][iz]; if ( b >= BUFLEN ) { write(out, buf, BUFLEN); b = 0; } } } } } write(out, buf, b); close(out); printf("%d total iterations\n", total); TAU_PROFILE_STOP(pt); } tau-2.16.4/examples/openmp/c/ppm.h000066400000000000000000000005371062343042700167060ustar00rootroot00000000000000#define width 800 /* Resolution */ #define height 800 typedef int field[width][height]; /* Type to store iteration counts */ extern void ppmwrite(char *fname, /* Name of PPM file */ field iterations, /* Calculated iteration counts */ int maxiter); /* Iteration count limit */ tau-2.16.4/examples/openmp/c/ppmwrite.h000066400000000000000000000022501062343042700177530ustar00rootroot00000000000000enum base { red, green, blue }; enum direction { back=-1, fwd=1 }; class ColorTable { public: char operator()(int i, base b) const; ~ColorTable(); int numColors() const; int shades() const; protected: ColorTable(int shades, int numColors); struct Color { char c[3]; }; Color* tab; private: int sds; int num; }; class PermutationColorTable : public ColorTable { public: PermutationColorTable(int shades, direction d=fwd, base b1=red, base b2=green, base b3=blue); }; class SmoothColorTable : public ColorTable { public: SmoothColorTable(int shades, direction d=fwd, base b1=red, base b2=green, base b3=blue); }; const int width=800, height=800; // Resolution typedef int field[width][height]; // Type to store iteration counts void ppmwrite(char *fname, // Name of PPM file field iterations, // Calculated iteration counts int maxiter, // Iteration count limit const ColorTable& table=SmoothColorTable(10, fwd, blue, green, red)); // Default color table tau-2.16.4/examples/openmp/f90/000077500000000000000000000000001062343042700161105ustar00rootroot00000000000000tau-2.16.4/examples/openmp/f90/Makefile000066400000000000000000000032231062343042700175500ustar00rootroot00000000000000#**************************************************************************** #* TAU Portable Profiling Package ** #* http://www.cs.uoregon.edu/research/tau ** #**************************************************************************** #* Copyright 1997 ** #* Department of Computer and Information Science, University of Oregon ** #* Advanced Computing Laboratory, Los Alamos National Laboratory ** #**************************************************************************** ####################################################################### ## pC++/Sage++ Copyright (C) 1993,1995 ## ## Indiana University University of Oregon University of Rennes ## ####################################################################### TAUROOTDIR = ../../.. include $(TAUROOTDIR)/include/Makefile CXX = $(TAU_CXX) CC = $(TAU_CC) FFLAGS = LIBS = $(TAU_LIBS) $(TAU_FORTRANLIBS) $(LEXTRA1) #LIBS = $(TAU_DISABLE) $(TAU_FORTRANLIBS) LDFLAGS = $(USER_OPT) MAKEFILE = Makefile PRINT = pr RM = /bin/rm -f F90 = $(TAU_F90) $(TAU_F90_SUFFIX) TARGET = mandel EXTRAOBJS = ############################################## all: $(TARGET) install: $(TARGET) $(TARGET): ppm.o $(TARGET).o mytimer.o $(TAU_LINKER) $(LDFLAGS) $(TARGET).o ppm.o mytimer.o -o $@ $(LIBS) $(TARGET).o : $(TARGET).f90 $(F90) $(FFLAGS) -c $(TARGET).f90 ppm.o : ppm.f90 $(F90) $(FFLAGS) -c $< mytimer.o : mytimer.c $(CC) -c $< clean: $(RM) $(TARGET).o $(TARGET) mytimer.o ppm.o *.mod ############################################## tau-2.16.4/examples/openmp/f90/mandel.f90000066400000000000000000000043511062343042700176730ustar00rootroot00000000000000 program mandel use ppm implicit none integer, parameter :: dp=selected_real_kind(13) complex(kind=dp) :: c, z integer :: ix, iy, cnt integer :: numpe, maxiter integer, parameter :: width=800, height=800 integer, dimension(width,height) :: iterations real(kind=dp) :: xmin, xmax, ymin, ymax, x, y, dx, dy external mytimer integer mandelprofiler(2), parprof(2), loopprof(2) !$ integer OMP_GET_NUM_THREADS save mandelprofiler, parprof, loopprof call TAU_PROFILE_INIT() call TAU_PROFILE_TIMER(mandelprofiler, 'PROGRAM MANDEL') call TAU_PROFILE_TIMER(parprof, 'OpenMP Parallel Region') call TAU_PROFILE_TIMER(loopprof, 'OpenMP Loop') call TAU_PROFILE_START(mandelprofiler) call TAU_PROFILE_SET_NODE(0) ! --- init ! -1.5 0.5 -1.0 1.0 ! -.59 -.54 -.58 -.53 ! -.65 -.4 .475 .725 ! -.65 -.5 .575 .725 ! -.59 -.56 .47 .5 write(unit=*, fmt="(A)") "xmin xmax ymin ymax maxiter (Sample: -.59 -.56 .47 .5 216) ?" read (unit=*, fmt=*) xmin, xmax, ymin, ymax, maxiter ! --- initialization dx = (xmax - xmin) / width dy = (ymax - ymin) / height numpe = 1 ! --- calculate mandelbrot set call mytimer(0) !$OMP PARALLEL call TAU_PROFILE_START(parprof) !$ numpe = OMP_GET_NUM_THREADS() !$OMP DO PRIVATE(ix,x,y,c,z,cnt) do iy=1,height call TAU_PROFILE_START(loopprof) y = ymin + iy*dy do ix=1,width x = xmin + ix*dx c = cmplx(x,y) z = (0.0,0.0) cnt = 0 do z = z*z + c cnt = cnt+1 if ( (dble(z)*dble(z) + dimag(z)*dimag(z)) >= 16 .or. & cnt >= maxiter ) then exit end if end do iterations(ix,iy) = cnt end do call TAU_PROFILE_STOP(loopprof) end do call TAU_PROFILE_STOP(parprof) !$OMP END PARALLEL call mytimer(numpe) ! --- generate ppm file write (unit=*, fmt="(A)") "generate ppm file..." call ppmwrite("mandel.ppm", iterations, maxiter) call TAU_PROFILE_STOP(mandelprofiler) end program mandel tau-2.16.4/examples/openmp/f90/mytimer.c000066400000000000000000000012031062343042700177360ustar00rootroot00000000000000#include #include void mytimer_(int* arg) { static struct timeval t1, t2; double elapsed; if (arg && *arg) { /* -- arg contains numpe, stop timing -- */ gettimeofday(&t2, 0); elapsed = (t2.tv_sec - t1.tv_sec) + (t2.tv_usec - t1.tv_usec) * 1.0e-6; fprintf(stdout, "... %6.3f sec on %d pe(s)\n", elapsed, *arg); fflush(stdout); } else { /* -- start timing -- */ fprintf(stdout, "start ...\n"); fflush(stdout); gettimeofday(&t1, 0); } } void mytimer(int* arg) { mytimer_(arg); } void mytimer__(int* arg) { mytimer_(arg); } void MYTIMER(int* arg) { mytimer_(arg); } tau-2.16.4/examples/openmp/f90/ppm.f90000066400000000000000000000071631062343042700172330ustar00rootroot00000000000000 module ppm implicit none public :: ppmwrite_ascii, ppmwrite contains subroutine ppmwrite_ascii(fname, iterations, maxiter) character(len=*), intent(in) :: fname integer, dimension(:,:), intent(in) :: iterations integer, intent(in) :: maxiter integer :: width, height integer :: ix, iy, iz, cnt, idx integer, parameter :: maxc = 3 integer, parameter :: maxcols = (maxc+1)*(maxc+1)*(maxc+1) integer, dimension(maxcols,3) :: col real :: factor ! --- initialization width = size(iterations,1) height = size(iterations,2) factor = real(maxiter) / maxcols ! --- generate color map cnt = maxcols do ix=0,maxc do iy=0,maxc do iz=0,maxc col(cnt,1) = ix col(cnt,2) = iy col(cnt,3) = iz cnt = cnt-1 end do end do end do ! --- generate ppm file open(unit=9, file=fname, status="replace", action="write") write(unit=9, fmt="('P3 ', 2i5, i2)") width, height, maxc do iy=1,height do ix=1,width if ( iterations(ix,iy) == maxiter ) then write(unit=9, fmt="(A)") "0 0 0" else idx = iterations(ix,iy) / factor + 1 write(unit=9, fmt="(3i2)") col(idx,1), col(idx,2), col(idx,3) end if end do end do close(unit=9) end subroutine ppmwrite_ascii subroutine ppmwrite(fname, iterations, maxiter) character(len=*), intent(in) :: fname integer, dimension(:,:), intent(in) :: iterations integer, intent(in) :: maxiter integer :: width, height integer :: ix, iy, iz, cnt, idx, b, r, i, total integer, parameter :: maxc = 3, buflen=512 integer, parameter :: maxcols = (maxc+1)*(maxc+1)*(maxc+1) real :: factor character(len=1), dimension(maxcols,3) :: col character(len=buflen) :: buf character(len=20) :: tmpbuf ! --- initialization width = size(iterations,1) height = size(iterations,2) factor = real(maxiter) / maxcols b = 1 total = 0 ! --- generate color map cnt = maxcols do ix=0,maxc do iy=0,maxc do iz=0,maxc col(cnt,1) = char(ix) col(cnt,2) = char(iy) col(cnt,3) = char(iz) cnt = cnt-1 end do end do end do ! --- generate ppm file open(unit=9, file=fname, access="direct", recl=buflen, & action="write", status="replace") write(unit=tmpbuf, fmt="('P6 ', 2i5, i2)") width, height, maxc buf(1:15) = tmpbuf(1:15) buf(16:16) = char(10) b = 17 r = 1 do iy=1,height do ix=1,width total = total + iterations(ix,iy) if ( iterations(ix,iy) == maxiter ) then do i=1,3 buf(b:b) = char(0) b = b+1 if ( b > buflen ) then write(unit=9, rec=r) buf b = 1 r = r+1 endif enddo else idx = iterations(ix,iy) / factor + 1 do i=1,3 buf(b:b) = col(idx,i) b = b+1 if ( b > buflen ) then write(unit=9, rec=r) buf b = 1 r = r+1 endif end do end if end do end do write(unit=9, rec=r) buf close(unit=9) ! write (unit=*, fmt="(I A)") total, " total iterations" end subroutine ppmwrite end module ppm tau-2.16.4/examples/openmpi/000077500000000000000000000000001062343042700156635ustar00rootroot00000000000000tau-2.16.4/examples/openmpi/Makefile000066400000000000000000000027261062343042700173320ustar00rootroot00000000000000#**************************************************************************** #* TAU Portable Profiling Package ** #* http://www.cs.uoregon.edu/research/tau ** #**************************************************************************** #* Copyright 1997 ** #* Department of Computer and Information Science, University of Oregon ** #* Advanced Computing Laboratory, Los Alamos National Laboratory ** #**************************************************************************** ####################################################################### ## pC++/Sage++ Copyright (C) 1993,1995 ## ## Indiana University University of Oregon University of Rennes ## ####################################################################### TAUROOTDIR = ../.. include $(TAUROOTDIR)/include/Makefile CXX = $(TAU_CXX) CC = $(TAU_CC) CFLAGS = $(TAU_INCLUDE) $(TAU_DEFS) $(TAU_MPI_INCLUDE) LIBS = $(TAU_MPI_LIBS) $(TAU_LIBS) -lm LDFLAGS = $(CFLAGS) $(TAU_LDFLAGS) MAKEFILE = Makefile PRINT = pr RM = /bin/rm -f TARGET = stommel EXTRAOBJS = ############################################## all: $(TARGET) install: $(TARGET) $(TARGET): $(TARGET).o $(CXX) $(LDFLAGS) $(TARGET).o -o $@ $(LIBS) $(TARGET).o : $(TARGET).c $(CC) $(CFLAGS) -c $(TARGET).c clean: $(RM) $(TARGET).o $(TARGET) ############################################## tau-2.16.4/examples/openmpi/README000066400000000000000000000015061062343042700165450ustar00rootroot00000000000000This example was written by Timothy H. Kaiser (SDSC) and it demonstrates the use of TAU instrumentation for OpenMPI (OpenMP+MPI) programs. It uses C source level instrumentation in addition of MPI wrapper library level instrumentation. It solves the 2d Stommel Model of Ocean Circulation using a Five-point stencil and Jacobi iteration gamma*((d(d(psi)/dx)/dx) + (d(d(psi)/dy)/dy)) +beta(d(psi)/dx)=-alpha*sin(pi*y/(2*ly)) More information on this and OpenMPI is available at: http://www.sdsc.edu/~tkaiser/ http://www.npaci.edu/Training/AHM00/examples/openmp_ibm/ We gratefully acknowledge the help of Tim Kaiser for making this example available to us. To execute the program: % setenv OMP_NUM_THREADS 2 % mpirun -np 3 stommel It reads st.in file (which should be present in this directory) and generates performance data. tau-2.16.4/examples/openmpi/st.in000066400000000000000000000000721062343042700166400ustar00rootroot00000000000000200 200 2000000 2000000 1.0e-9 2.25e-11 3.0e-6 1000 7500 tau-2.16.4/examples/openmpi/stommel.c000066400000000000000000000345201062343042700175130ustar00rootroot00000000000000/* poe -rmpool 1 -procs 1 mpcc_r -qsmp=noauto:omp:explicit -O3 -qarch=pwr3 -qtune=pwr3 ompc_02.c bind.o -lm -o ompc_02 */ #define FLT double #define INT int #include #include "mpi.h" #include #include #include #include #if macintosh #include #endif FLT **matrix(INT nrl,INT nrh,INT ncl,INT nch); FLT *vector(INT nl, INT nh); INT *ivector(INT nl, INT nh); INT mint(FLT x); FLT walltime(); void bc(FLT ** psi,INT i1,INT i2,INT j1,INT j2); void do_jacobi(FLT ** psi,FLT ** new_psi,FLT *diff,INT i1,INT i2,INT j1,INT j2); void write_grid(FLT ** psi,INT i1,INT i2,INT j1,INT j2); void do_transfer(FLT ** psi,INT i1,INT i2,INT j1,INT j2); void do_force (INT i1,INT i2,INT j1,INT j2); void do_transfer(FLT ** psi,INT i1,INT i2,INT j1,INT j2); char* unique(char *name); FLT force(FLT y); #define pi 3.141592653589793239 FLT **the_for; FLT dx,dy,a1,a2,a3,a4,a5,a6; INT nx,ny; FLT alpha; FLT *svec1,*svec2,*rvec1,*rvec2; INT numnodes,myid,mpi_err; #define mpi_master 0 INT myrow,mycol; INT nrow,ncol; INT myrow,mycol; INT myid_col,myid_row,nodes_row,nodes_col; MPI_Status status; MPI_Comm ROW_COMM,COL_COMM; INT mytop,mybot,myleft,myright; int main(int argc, char **argv) { FLT lx,ly,beta,gamma; INT steps; FLT t1,t2; /*FLT t3,t4,dt; */ /* FLT diff */ FLT mydiff,diff; FLT dx2,dy2,bottom; FLT di,dj; FLT **psi; /* our calculation grid */ FLT **new_psi; /* temp storage for the grid */ INT i,j,i1,i2,j1,j2; INT iout; TAU_PROFILE_TIMER(maintimer, "main()", "int (int, char **)", TAU_DEFAULT); TAU_PROFILE_INIT(argc, argv); TAU_PROFILE_START(maintimer); #if macintosh argc=ccommand(&argv); #endif mpi_err=MPI_Init(&argc,&argv); mpi_err=MPI_Comm_size(MPI_COMM_WORLD,&numnodes); mpi_err=MPI_Comm_rank(MPI_COMM_WORLD,&myid); /* #pragma omp parallel #pragma omp critical { thread_bind(); } */ /* ! find a reasonable grid topology based on the number ! of processors */ nrow=mint(sqrt((FLT)(numnodes))); ncol=numnodes/nrow; while (nrow*ncol != numnodes) { nrow=nrow+1; ncol=numnodes/nrow; } if(nrow > ncol){ i=ncol; ncol=nrow; nrow=i; } myrow=myid/ncol+1; mycol=myid - (myrow-1)*ncol + 1; if(myid == mpi_master) printf(" nrow= %d ncol= %d\n",nrow ,ncol); /* ! make the row and col communicators ! all processors with the same row will be in the same ROW_COMM */ mpi_err=MPI_Comm_split(MPI_COMM_WORLD,myrow,mycol,&ROW_COMM); mpi_err=MPI_Comm_rank( ROW_COMM, &myid_row); mpi_err=MPI_Comm_size( ROW_COMM, &nodes_row); /* ! all processors with the same col will be in the same COL_COMM */ mpi_err=MPI_Comm_split(MPI_COMM_WORLD,mycol,myrow,&COL_COMM); mpi_err=MPI_Comm_rank( COL_COMM, &myid_col); mpi_err=MPI_Comm_size( COL_COMM,& nodes_col); /* ! find id of neighbors using the communicators created above */ mytop = myid_col-1;if( mytop < 0 )mytop = MPI_PROC_NULL; mybot = myid_col+1;if( mybot == nodes_col)mybot = MPI_PROC_NULL; myleft = myid_row-1;if( myleft < 0 )myleft = MPI_PROC_NULL; myright = myid_row+1;if( myright == nodes_row)myright = MPI_PROC_NULL; if(myid == mpi_master) { FILE *fp = fopen("st.in", "r"); if (fp == NULL) { perror("Couldn't open file st.in"); exit(1); } fscanf(fp,"%d %d",&nx,&ny); fscanf(fp,"%lg %lg",&lx,&ly); fscanf(fp,"%lg %lg %lg",&alpha,&beta,&gamma); fscanf(fp,"%d",&steps); printf("%d %d\n",nx,ny); printf("%g %g\n",lx,ly); printf("%g %g %g\n",alpha,beta,gamma); printf("%d\n",steps); } mpi_err=MPI_Bcast(&nx, 1,MPI_INT, mpi_master,MPI_COMM_WORLD); mpi_err=MPI_Bcast(&ny, 1,MPI_INT, mpi_master,MPI_COMM_WORLD); mpi_err=MPI_Bcast(&steps,1,MPI_INT, mpi_master,MPI_COMM_WORLD); mpi_err=MPI_Bcast(&lx, 1,MPI_DOUBLE,mpi_master,MPI_COMM_WORLD); mpi_err=MPI_Bcast(&ly, 1,MPI_DOUBLE,mpi_master,MPI_COMM_WORLD); mpi_err=MPI_Bcast(&alpha,1,MPI_DOUBLE,mpi_master,MPI_COMM_WORLD); mpi_err=MPI_Bcast(&beta, 1,MPI_DOUBLE,mpi_master,MPI_COMM_WORLD); mpi_err=MPI_Bcast(&gamma,1,MPI_DOUBLE,mpi_master,MPI_COMM_WORLD); /* calculate the constants for the calculations */ dx=lx/(nx+1); dy=ly/(ny+1); dx2=dx*dx; dy2=dy*dy; bottom=2.0*(dx2+dy2); a1=(dy2/bottom)+(beta*dx2*dy2)/(2.0*gamma*dx*bottom); a2=(dy2/bottom)-(beta*dx2*dy2)/(2.0*gamma*dx*bottom); a3=dx2/bottom; a4=dx2/bottom; a5=dx2*dy2/(gamma*bottom); a6=pi/(ly); /* set the indices for the interior of the grid */ dj=(FLT)ny/(FLT)nodes_row; j1=mint(1.0+myid_row*dj); j2=mint(1.0+(myid_row+1)*dj)-1; di=(FLT)nx/(FLT)nodes_col; i1=mint(1.0+myid_col*di); i2=mint(1.0+(myid_col+1)*di)-1; if(myid == mpi_master)printf("nodes_row= %d nodes_col= %d\n",nodes_row,nodes_col); printf("myid= %d myrow= %d mycol= %d\n",myid,myrow,mycol); printf("myid= %d myid_row= %d myid_col= %d\n",myid,myid_row,myid_col); printf("myid= %d holds [%d:%d][%d:%d]\n",myid,i1,i2,j1,j2); /* allocate the grid to (i1-1:i2+1,j1-1:j2+1) this includes boundary cells */ psi= matrix((INT)(i1-1),(INT)(i2+1),(INT)(j1-1),(INT)(j2+1)); new_psi=matrix((INT)(i1-1),(INT)(i2+1),(INT)(j1-1),(INT)(j2+1)); the_for=matrix((INT)(i1-1),(INT)(i2+1),(INT)(j1-1),(INT)(j2+1)); svec1=vector((INT)(i1-1),(INT)(i2+1)); svec2=vector((INT)(i1-1),(INT)(i2+1)); rvec1=vector((INT)(i1-1),(INT)(i2+1)); rvec2=vector((INT)(i1-1),(INT)(i2+1)); /* set initial guess for the value of the grid */ for(i=i1-1;i<=i2+1;i++) for(j=j1-1;j<=j2+1;j++) psi[i][j]=1.0; /* set boundary conditions */ bc(psi,i1,i2,j1,j2); do_force(i1,i2,j1,j2); /* do the jacobian iterations */ t1=MPI_Wtime(); iout=steps/100; if(iout == 0)iout=1; if(steps > 0){ for( i=1; i<=steps;i++) { do_jacobi(psi,new_psi,&mydiff,i1,i2,j1,j2); do_transfer(psi,i1,i2,j1,j2); mpi_err= MPI_Reduce(&mydiff,&diff,1,MPI_DOUBLE,MPI_SUM,mpi_master,MPI_COMM_WORLD); if(myid == mpi_master && i % iout == 0){ printf("%8d %15.5f\n",i,diff); } } } t2=MPI_Wtime(); if(myid == mpi_master)printf("run time = %10.3g\n",t2-t1); /* write_grid(psi,i1,i2,j1,j2); */ mpi_err = MPI_Finalize(); TAU_PROFILE_STOP(maintimer); return 0; } void bc(FLT ** psi,INT i1,INT i2,INT j1,INT j2){ /* sets the boundary conditions */ /* input is the grid and the indices for the interior cells */ INT j; TAU_PROFILE_TIMER(bctimer, "bc()", "void (FLT **, INT, INT, INT, INT)", TAU_DEFAULT); TAU_PROFILE_START(bctimer); /* do the top edges */ if(i1 == 1) { for(j=j1-1;j<=j2+1;j++) psi[i1-1][j]=0.0; } /* do the bottom edges */ if(i2 == ny) { for(j=j1-1;j<=j2+1;j++) psi[i2+1][j]=0.0; } /* do left edges */ if(j1 == 1) { for(j=i1-1;j<=i2+1;j++) psi[j][j1-1]=0.0; } /* do right edges */ if(j2 == nx) { for(j=i1-1;j<=i2+1;j++) psi[j][j2+1]=0.0; } TAU_PROFILE_STOP(bctimer); } void do_jacobi(FLT ** psi,FLT ** new_psi,FLT *diff_in,INT i1,INT i2,INT j1,INT j2){ /* ! does a single Jacobi iteration step ! input is the grid and the indices for the interior cells ! new_psi is temp storage for the the updated grid ! output is the updated grid in psi and diff which is ! the sum of the differences between the old and new grids */ INT i,j; FLT diff; TAU_PROFILE_TIMER(jac, "do_jacobi()", "void (FLT **, FLT **, FLT **, INT, INT, INT, INT)", TAU_DEFAULT); #pragma omp parallel { TAU_PROFILE_TIMER(par, "OpenMP Parallel for (do_jacobi)", " ", TAU_DEFAULT); TAU_PROFILE_START(jac); diff=0.0; /*#pragma omp parallel for schedule(static) reduction(+: diff) private(j) firstprivate (a1,a2,a3,a4,a5) */ #pragma omp for schedule(static) reduction(+: diff) private(j) firstprivate (a1,a2,a3,a4,a5) for( i=i1;i<=i2;i++) { TAU_PROFILE_START(par); for(j=j1;j<=j2;j++){ new_psi[i][j]=a1*psi[i+1][j] + a2*psi[i-1][j] + a3*psi[i][j+1] + a4*psi[i][j-1] - a5*the_for[i][j]; diff=diff+fabs(new_psi[i][j]-psi[i][j]); } TAU_PROFILE_STOP(par); } *diff_in=diff; #pragma omp for schedule(static) private(j) for( i=i1;i<=i2;i++) { TAU_PROFILE_START(par); for(j=j1;j<=j2;j++) psi[i][j]=new_psi[i][j]; TAU_PROFILE_STOP(par); } TAU_PROFILE_STOP(jac); } } void do_force (INT i1,INT i2,INT j1,INT j2) { /* ! sets the force conditions ! input is the grid and the indices for the interior cells */ FLT y; INT i,j; TAU_PROFILE_TIMER(forcetimer, "do_force()", "void (INT, INT, INT, INT)", TAU_DEFAULT); TAU_PROFILE_START(forcetimer); for( i=i1;i<=i2;i++) { for(j=j1;j<=j2;j++){ y=j*dy; the_for[i][j]=force(y); } } TAU_PROFILE_STOP(forcetimer); } FLT force(FLT y) { return (-alpha*sin(y*a6)); } /* The routines matrix, ivector and vector were adapted from Numerical Recipes in C The Art of Scientific Computing Press, Flannery, Teukolsky, Vetting Cambridge University Press, 1988. */ FLT **matrix(INT nrl,INT nrh,INT ncl,INT nch) { INT i; FLT **m; TAU_PROFILE_TIMER(mat, "matrix()", "FLT ** (INT, INT, INT, INT)", TAU_DEFAULT); TAU_PROFILE_START(mat); m=(FLT **) malloc((unsigned) (nrh-nrl+1)*sizeof(FLT*)); if (!m){ printf("allocation failure 1 in matrix()\n"); TAU_PROFILE_EXIT("malloc error"); exit(1); } m -= nrl; for(i=nrl;i<=nrh;i++) { if(i == nrl){ m[i]=(FLT *) malloc((unsigned) (nrh-nrl+1)*(nch-ncl+1)*sizeof(FLT)); if (!m[i]){ printf("allocation failure 2 in matrix()\n"); TAU_PROFILE_EXIT("malloc error"); exit(1); } m[i] -= ncl; } else { m[i]=m[i-1]+(nch-ncl+1); } } TAU_PROFILE_STOP(mat); return m; } INT *ivector(INT nl, INT nh) { INT *v; v=(INT *)malloc((unsigned) (nh-nl+1)*sizeof(INT)); if (!v) { printf("allocation failure in ivector()\n"); exit(1); } return v-nl; } FLT *vector(INT nl, INT nh) { FLT *v; v=(FLT *)malloc((unsigned) (nh-nl+1)*sizeof(FLT)); if (!v) { printf("allocation failure in vector()\n"); exit(1); } return v-nl; } void do_transfer(FLT ** psi,INT i1,INT i2,INT j1,INT j2) { INT num_x,num_y; INT i; TAU_PROFILE_TIMER(trf, "do_transfer()", "void (FLT **, INT, INT, INT, INT)", TAU_DEFAULT); TAU_PROFILE_START(trf); num_x=i2-i1+3; num_y=j2-j1+3; for(i=i1-1;i<=i2+1;i++){ svec1[i]=psi[i][j1]; svec2[i]=psi[i][j2]; } if((myid_col % 2) == 0){ /* send to left */ mpi_err=MPI_Send(&svec1[i1-1],num_x,MPI_DOUBLE,myleft,100,ROW_COMM); /* rec from left */ mpi_err=MPI_Recv(&rvec1[i1-1],num_x,MPI_DOUBLE,myleft,100,ROW_COMM,&status); /* rec from right */ mpi_err=MPI_Recv(&rvec2[i1-1],num_x,MPI_DOUBLE,myright,100,ROW_COMM,&status); /* send to right */ mpi_err=MPI_Send(&svec2[i1-1],num_x,MPI_DOUBLE,myright,100,ROW_COMM); } else { /* we are on an odd col processor */ /* rec from right */ mpi_err=MPI_Recv(&rvec2[i1-1],num_x,MPI_DOUBLE,myright,100,ROW_COMM,&status); /* send to right */ mpi_err=MPI_Send(&svec2[i1-1],num_x,MPI_DOUBLE,myright,100,ROW_COMM); /* send to left */ mpi_err=MPI_Send(&svec1[i1-1],num_x,MPI_DOUBLE,myleft,100,ROW_COMM); /* rec from left */ mpi_err=MPI_Recv(&rvec1[i1-1],num_x,MPI_DOUBLE,myleft,100,ROW_COMM,&status); } if(myleft != MPI_PROC_NULL){ for(i=i1-1;i<=i2+1;i++){ psi[i][j1-1]=rvec1[i]; } } if(myright != MPI_PROC_NULL){ for(i=i1-1;i<=i2+1;i++){ psi[i][j2+1]=rvec2[i]; } } if((myid_row % 2) == 0){ /* send to top */ mpi_err=MPI_Send(&psi[i1][j1-1], num_y,MPI_DOUBLE,mytop,10, COL_COMM); /* rec from top */ mpi_err=MPI_Recv(&psi[i1-1][j1-1],num_y,MPI_DOUBLE,mytop,10,COL_COMM,&status); /* rec from bot */ mpi_err=MPI_Recv(&psi[i2+1][j1-1],num_y,MPI_DOUBLE,mybot,10,COL_COMM,&status); /* send to bot */ mpi_err=MPI_Send(&psi[i2][j1-1], num_y,MPI_DOUBLE,mybot,10, COL_COMM); } else{ /* rec from bot */ mpi_err=MPI_Recv(&psi[i2+1][j1-1],num_y,MPI_DOUBLE,mybot,10,COL_COMM,&status); /* send to bot */ mpi_err=MPI_Send(&psi[i2][j1-1], num_y,MPI_DOUBLE,mybot,10,COL_COMM); /* send to top */ mpi_err=MPI_Send(&psi[i1][j1-1], num_y,MPI_DOUBLE,mytop,10,COL_COMM); /* rec from top */ mpi_err=MPI_Recv(&psi[i1-1][j1-1],num_y,MPI_DOUBLE,mytop,10,COL_COMM,&status); } TAU_PROFILE_STOP(trf); } char* unique(char *name) { static char unique_str[40]; int i; for(i=0;i<40;i++) unique_str[i]=(char)0; if(myid > 99){ sprintf(unique_str,"%s%d",name,myid); } else { if(myid > 9) sprintf(unique_str,"%s0%d",name,myid); else sprintf(unique_str,"%s00%d",name,myid); } return unique_str; } void write_grid(FLT ** psi,INT i1,INT i2,INT j1,INT j2) { /* ! input is the grid and the indices for the interior cells */ INT i,j,i0,j0,i3,j3; FILE *f18; TAU_PROFILE_TIMER(gr, "write_grid()", "void (FLT **, INT, INT, INT, INT)", TAU_DEFAULT); TAU_PROFILE_START(gr); if(i1==1) { i0=0; } else { i0=i1; } if(i2==nx) { i3=nx+1; } else { i3=i2; } if(j1==1) { j0=0; } else { j0=j1; } if(j2==ny) { j3=ny+1; } else { j3=j2; } f18=fopen(unique("out2c_"),"w"); fprintf(f18,"%6d %6d\n",i3-i0+1,j3-j0+1); for( i=i0;i<=i3;i++){ for( j=j0;j<=j3;j++){ fprintf(f18,"%14.7g",psi[i][j]); if(j != j3)fprintf(f18," "); } fprintf(f18,"\n"); } fclose(f18); TAU_PROFILE_STOP(gr); } INT mint(FLT x) { FLT y; INT j; j=(INT)x; y=(FLT)j; if(x-y >= 0.5)j++; return j; } FLT walltime() { return((FLT)clock()/((FLT)CLOCKS_PER_SEC)); } tau-2.16.4/examples/papi/000077500000000000000000000000001062343042700151455ustar00rootroot00000000000000tau-2.16.4/examples/papi/Makefile000066400000000000000000000026371062343042700166150ustar00rootroot00000000000000#**************************************************************************** #* TAU Portable Profiling Package ** #* http://www.cs.uoregon.edu/research/tau ** #**************************************************************************** #* Copyright 1997 ** #* Department of Computer and Information Science, University of Oregon ** #* Advanced Computing Laboratory, Los Alamos National Laboratory ** #**************************************************************************** ####################################################################### ## pC++/Sage++ Copyright (C) 1993,1995 ## ## Indiana University University of Oregon University of Rennes ## ####################################################################### TAUROOTDIR = ../.. include $(TAUROOTDIR)/include/Makefile CXX = $(TAU_CXX) CC = $(TAU_CC) CFLAGS = $(TAU_INCLUDE) $(TAU_DEFS) LIBS = $(TAU_LIBS) LDFLAGS = $(USER_OPT) MAKEFILE = Makefile PRINT = pr RM = /bin/rm -f TARGET = simple EXTRAOBJS = ############################################## all: $(TARGET) install: $(TARGET) $(TARGET): $(TARGET).o $(CXX) $(LDFLAGS) $(TARGET).o -o $@ $(LIBS) $(TARGET).o : $(TARGET).cpp $(CXX) $(CFLAGS) -c $(TARGET).cpp clean: $(RM) $(TARGET).o $(TARGET) ############################################## tau-2.16.4/examples/papi/README000066400000000000000000000042461062343042700160330ustar00rootroot00000000000000We show the effect of using a strip mining optimization with the matrix multiply algorithm. Although both the regular multiply algorithm and the strip mining algorithm have the same number of floating point operations, they have dramatically different cache behaviors. Using PAPI we can see the exact number of floating point operations and secondary data cache misses as shown below. To use papi, configure TAU with % configure -papi= pyros [tau2/examples/papi]% setenv PAPI_EVENT PAPI_FP_INS pyros [tau2/examples/papi]% simple pyros [tau2/examples/papi]% pprof Reading Profile files in profile.* NODE 0;CONTEXT 0;THREAD 0: --------------------------------------------------------------------------------------- %Time Exclusive Inclusive #Call #Subrs Count/Call Name counts total counts --------------------------------------------------------------------------------------- 100.0 6 5.409E+07 1 1 54090019 main() int (int, char **) 100.0 9.001E+04 5.409E+07 1 2 54090013 multiply void (void) 49.9 2.7E+07 2.7E+07 1 0 27000001 multiply-with-strip-mining-optimization void (void) 49.9 2.7E+07 2.7E+07 1 0 27000001 multiply-regular void (void) pyros [tau2/examples/papi]% setenv PAPI_EVENT PAPI_L2_DCM pyros [tau2/examples/papi]% simple pyros [tau2/examples/papi]% pprof Reading Profile files in profile.* NODE 0;CONTEXT 0;THREAD 0: --------------------------------------------------------------------------------------- %Time Exclusive Inclusive #Call #Subrs Count/Call Name counts total counts --------------------------------------------------------------------------------------- 100.0 3 1.553E+04 1 1 15534 main() int (int, char **) 100.0 1295 1.553E+04 1 2 15531 multiply void (void) 66.9 1.04E+04 1.04E+04 1 0 10398 multiply-regular void (void) 24.7 3838 3838 1 0 3838 multiply-with-strip-mining-optimization void (void) tau-2.16.4/examples/papi/simple.cpp000066400000000000000000000032451062343042700171460ustar00rootroot00000000000000/* This demonstrates how data cache misses can affect the performance of an application. We show how the time/counts for a simple matrix multiplication algorithm dramatically reduce when we employ a strip mining optimization. */ #include #define SIZE 128 #define CACHE 64 double A[SIZE][SIZE], B[SIZE][SIZE], C[SIZE][SIZE]; double multiply(void) { int i, j, k, n, m; int vl, sz, strip; TAU_PROFILE("multiply", "void (void)", TAU_USER); TAU_PROFILE_TIMER(t1,"multiply-regular", "void (void)", TAU_USER); TAU_PROFILE_TIMER(strip_timer,"multiply-with-strip-mining-optimization", "void (void)", TAU_USER); for (n = 0; n < SIZE; n++) for (m = 0; m < SIZE; m++) { A[n][m] = B[n][m] = n + m ; C[n][m] = 0; } TAU_PROFILE_START(t1); for (i = 0; i < SIZE; i ++) { for (j = 0; j < SIZE; j++) { for (k = 0; k < SIZE; k++) C[i][j] += A[i][k] * B[k][j]; } } TAU_PROFILE_STOP(t1); /* Now we employ the strip mining optimization */ for(n = 0; n < SIZE; n++) for(m = 0; m < SIZE; m++) C[n][m] = 0; TAU_PROFILE_START(strip_timer); for(i=0; i < SIZE; i++) for(k=0; k < SIZE; k++) for(sz = 0; sz < SIZE; sz+=CACHE) { //vl = min(SIZE-sz, CACHE); vl = (SIZE - sz < CACHE ? SIZE - sz : CACHE); for(strip = sz; strip < sz+vl; strip++) C[i][strip] += A[i][k]*B[k][strip]; } TAU_PROFILE_STOP(strip_timer); return C[SIZE-10][SIZE-10]; // So KCC doesn't optimize this loop away. } int main(int argc, char **argv) { TAU_PROFILE("main()", "int (int, char **)", TAU_DEFAULT); TAU_PROFILE_SET_NODE(0); multiply(); return 0; } tau-2.16.4/examples/papithreads/000077500000000000000000000000001062343042700165205ustar00rootroot00000000000000tau-2.16.4/examples/papithreads/Makefile000066400000000000000000000026371062343042700201700ustar00rootroot00000000000000#**************************************************************************** #* TAU Portable Profiling Package ** #* http://www.cs.uoregon.edu/research/tau ** #**************************************************************************** #* Copyright 1997 ** #* Department of Computer and Information Science, University of Oregon ** #* Advanced Computing Laboratory, Los Alamos National Laboratory ** #**************************************************************************** ####################################################################### ## pC++/Sage++ Copyright (C) 1993,1995 ## ## Indiana University University of Oregon University of Rennes ## ####################################################################### TAUROOTDIR = ../.. include $(TAUROOTDIR)/include/Makefile CXX = $(TAU_CXX) CC = $(TAU_CC) CFLAGS = $(TAU_INCLUDE) $(TAU_DEFS) LIBS = $(TAU_LIBS) LDFLAGS = $(USER_OPT) MAKEFILE = Makefile PRINT = pr RM = /bin/rm -f TARGET = simple EXTRAOBJS = ############################################## all: $(TARGET) install: $(TARGET) $(TARGET): $(TARGET).o $(CXX) $(LDFLAGS) $(TARGET).o -o $@ $(LIBS) $(TARGET).o : $(TARGET).cpp $(CXX) $(CFLAGS) -c $(TARGET).cpp clean: $(RM) $(TARGET).o $(TARGET) ############################################## tau-2.16.4/examples/papithreads/README000066400000000000000000000010001062343042700173670ustar00rootroot00000000000000This example shows the use of PAPI Hardware Performance Counters API with pthreads and TAU. It has been tested under Linux. % setenv PAPI_EVENT PAPI_FP_INS % make; simple % pprof For 50x50 matrix multiplication, we'd expect 50^3*2 (ax+b is one operation on Intel) floating point operations in each multiply loop on each thread. There are two ways to multiply the matrices. If you increase the SIZE, remember that it may exceed the default stack size set on your machine (esp. under Linux) (see limit). tau-2.16.4/examples/papithreads/simple.cpp000066400000000000000000000056361062343042700205270ustar00rootroot00000000000000/* This demonstrates how data cache misses can affect the performance of an application. We show how the time/counts for a simple matrix multiplication algorithm dramatically reduce when we employ a strip mining optimization. */ #include #include #include #include #define SIZE 50 #define CACHE 64 double multiply(void) { double A[SIZE][SIZE], B[SIZE][SIZE], C[SIZE][SIZE]; int i, j, k, n, m; int vl, sz, strip; TAU_PROFILE("multiply", "void (void)", TAU_USER); TAU_PROFILE_TIMER(t1,"multiply-regular", "void (void)", TAU_USER); TAU_PROFILE_TIMER(strip_timer,"multiply-with-strip-mining-optimization", "void (void)", TAU_USER); for (n = 0; n < SIZE; n++) for (m = 0; m < SIZE; m++) { A[n][m] = B[n][m] = n + m ; C[n][m] = 0; } TAU_PROFILE_START(t1); for (i = 0; i < SIZE; i ++) { for (j = 0; j < SIZE; j++) { for (k = 0; k < SIZE; k++) C[i][j] += A[i][k] * B[k][j]; } sched_yield(); } TAU_PROFILE_STOP(t1); /* Now we employ the strip mining optimization */ for(n = 0; n < SIZE; n++) for(m = 0; m < SIZE; m++) C[n][m] = 0; TAU_PROFILE_START(strip_timer); for(i=0; i < SIZE; i++) for(k=0; k < SIZE; k++) for(sz = 0; sz < SIZE; sz+=CACHE) { sched_yield(); //vl = min(SIZE-sz, CACHE); vl = (SIZE - sz < CACHE ? SIZE - sz : CACHE); for(strip = sz; strip < sz+vl; strip++) C[i][strip] += A[i][k]*B[k][strip]; } TAU_PROFILE_STOP(strip_timer); return C[SIZE-10][SIZE-10]; // So KCC doesn't optimize this loop away. } extern "C" void * threaded_func(void *data) { TAU_REGISTER_THREAD(); TAU_PROFILE("threaded_func()", "int ()", TAU_DEFAULT); multiply(); // work done by this thread return NULL; } int main(int argc, char **argv) { TAU_PROFILE("main()", "int (int, char **)", TAU_DEFAULT); TAU_PROFILE_SET_NODE(0); int ret; pthread_attr_t attr; pthread_t tid1, tid2, tid3; pthread_attr_init(&attr); cout <<"Multiplying "< = <2> ] 31.6 6,000 6,000 5 0 1200110 f2() 31.6 3,999 6,000 1 1 6000008 f1() [ = <4> ] 21.1 3,000 4,000 1 1 4000144 f1() [ = <3> ] 15.8 3,000 3,000 3 0 1000130 f2() [ = <2> ] 10.5 2,000 2,000 1 0 2000049 f2() [ = <4> ] 5.3 1,000 1,000 1 0 1000111 f2() [ = <3> ] tau-2.16.4/examples/param/simple.cpp000066400000000000000000000012241062343042700173100ustar00rootroot00000000000000#include #include #include int f2(int y) { TAU_PROFILE("f2()", "", TAU_USER); static string s("y"); TAU_PROFILE_PARAM1L((long) y, s); printf("Inside f2: sleeping for %d seconds\n", y/2); sleep(y/2); } int f1(int x) { TAU_PROFILE("f1()", "", TAU_USER); static string s("x"); TAU_PROFILE_PARAM1L((long) x, s); printf("Inside f1: sleeping for %d seconds, calling f2\n", x); sleep(x); f2(x); return 0; } int main(int argc, char **argv) { TAU_PROFILE("main()", "(calls f1, f5)", TAU_DEFAULT); TAU_PROFILE_SET_NODE(0); printf("Inside main: calling f1\n"); f1(2); f1(4); f1(3); f1(2); f1(2); } tau-2.16.4/examples/pdt_mpi/000077500000000000000000000000001062343042700156505ustar00rootroot00000000000000tau-2.16.4/examples/pdt_mpi/c++/000077500000000000000000000000001062343042700162205ustar00rootroot00000000000000tau-2.16.4/examples/pdt_mpi/c++/Makefile000066400000000000000000000036221062343042700176630ustar00rootroot00000000000000#**************************************************************************** #* TAU Portable Profiling Package ** #* http://www.cs.uoregon.edu/research/tau ** #**************************************************************************** #* Copyright 2001 ** #* Department of Computer and Information Science, University of Oregon ** #* Advanced Computing Laboratory, Los Alamos National Laboratory ** #**************************************************************************** TAUROOTDIR = ../../.. include $(TAUROOTDIR)/include/Makefile USE_TAU = 1 # Comment above line to disable TAU CXX = $(TAU_CXX) CC = $(TAU_CC) PDTCXXPARSE = $(PDTDIR)/$(PDTARCHDIR)/bin/cxxparse TAUINSTR = $(TAUROOTDIR)/$(CONFIG_ARCH)/bin/tau_instrumentor CFLAGS = $(TAU_INCLUDE) $(TAU_DEFS) $(TAU_MPI_INCLUDE) LIBS = $(TAU_MPI_LIBS) $(TAU_LIBS) $(LEXTRA1) $(EXTRALIBS) -lm LDFLAGS = $(USER_OPT) $(TAU_LDFLAGS) TARGET = ring EXTRAOBJS = RM = /bin/rm -f ############################################## ifdef USE_TAU COMP_RULE = $(PDTCXXPARSE) $< $(CFLAGS); \ $(TAUINSTR) $*.pdb $< -o $*.inst.cpp -g RING; \ $(CXX) $(CFLAGS) -c $*.inst.cpp -o $@ ; \ rm -f $*.pdb ; else # DISABLE TAU INSTRUMENTATION TAU_DEFS = # Don't use TAU MPI wrapper library TAU_MPI_LIBS = -L/usr/local/lib -lmpich TAU_LIBS = TAU_WRAPPER_LIB = TAU_INCLUDE = COMP_RULE = $(CXX) $(CFLAGS) -c $< -o $@ ; endif AR = ar ARFLAGS = rcv ############################################## all: $(TARGET) install: $(TARGET) OBJS = ring.o $(TARGET): $(OBJS) $(CXX) $(LDFLAGS) $(OBJS) -o $@ $(LIBS) # Compilation rule .cpp.o: $(COMP_RULE) # #$(TARGET).o : $(TARGET).cpp # $(CXX) $(CFLAGS) -c $(TARGET).cpp clean: $(RM) $(OBJS) $(TARGET) $(OBJS:.o=.inst.cpp) \ profile.* tautrace.* events.* *.ti *.elg ############################################## tau-2.16.4/examples/pdt_mpi/c++/ring.cpp000066400000000000000000000017231062343042700176660ustar00rootroot00000000000000#include #include static const int anz = 512; class C { public: C(int m, int p) : me(m), proc(p) {} void method() { int i; int field[anz]; MPI_Status status; for (i=0; i #include #define SIZE 10 void func(int me, int proc) { int i; int field[SIZE]; MPI_Status status; for (i=0; i f1() => f2() => f3()" as the time spent in f3 when it was called by f2, when it was called by f1, when it was called by main. With callpath profiling, if f2 is instrumented as a phase, we get: "main => f1" "main => f2" "f2 => f3" but there's no main => f3 as scoping rules for phases assigns f3 to phase f2 instead of the default application phase of main. b) The length of callpath profiles can be specified at runtime using TAU_CALLPATH_DEPTH. However, a phase profile is always 2 deep (phase => routine). tau-2.16.4/examples/phase/c++/000077500000000000000000000000001062343042700156645ustar00rootroot00000000000000tau-2.16.4/examples/phase/c++/Makefile000066400000000000000000000026421062343042700173300ustar00rootroot00000000000000#**************************************************************************** #* TAU Portable Profiling Package ** #* http://www.cs.uoregon.edu/research/tau ** #**************************************************************************** #* Copyright 1997 ** #* Department of Computer and Information Science, University of Oregon ** #* Advanced Computing Laboratory, Los Alamos National Laboratory ** #**************************************************************************** ####################################################################### ## pC++/Sage++ Copyright (C) 1993,1995 ## ## Indiana University University of Oregon University of Rennes ## ####################################################################### TAUROOTDIR = ../../.. include $(TAUROOTDIR)/include/Makefile CXX = $(TAU_CXX) CC = $(TAU_CC) CFLAGS = $(TAU_INCLUDE) $(TAU_DEFS) LIBS = $(TAU_LIBS) LDFLAGS = $(USER_OPT) MAKEFILE = Makefile PRINT = pr RM = /bin/rm -f TARGET = simple EXTRAOBJS = ############################################## all: $(TARGET) install: $(TARGET) $(TARGET): $(TARGET).o $(CXX) $(LDFLAGS) $(TARGET).o -o $@ $(LIBS) $(TARGET).o : $(TARGET).cpp $(CXX) $(CFLAGS) -c $(TARGET).cpp clean: $(RM) $(TARGET).o $(TARGET) ############################################## tau-2.16.4/examples/phase/c++/README000066400000000000000000000134401062343042700165460ustar00rootroot00000000000000 Running this code when TAU is configured with -PROFILEPHASE should result in profiles such as: > pprof Reading Profile files in profile.* NODE 0;CONTEXT 0;THREAD 0: --------------------------------------------------------------------------------------- %Time Exclusive Inclusive #Call #Subrs Inclusive Name msec total msec usec/call --------------------------------------------------------------------------------------- 100.0 0.184 27,041 1 7 27041782 main() 37.1 0.278 10,019 5 5 2003920 f2() 37.1 0.22 10,019 5 10 2003864 IO Phase 37.0 10,006 10,006 5 0 2001294 f3() 25.9 0.087 7,007 1 3 7007572 Iteration 4 25.9 0.087 7,007 1 3 7007572 main() => Iteration 4 22.2 6,012 6,012 6 0 1002145 f1() 22.2 0.089 6,006 1 3 6006710 Iteration 3 22.2 0.089 6,006 1 3 6006710 main() => Iteration 3 18.5 5,009 5,009 5 0 1001946 IO Phase => output 18.5 5,009 5,009 5 0 1001946 output 18.5 5,009 5,009 5 0 1001874 IO Phase => input 18.5 5,009 5,009 5 0 1001874 input 18.5 0.085 5,007 1 3 5007739 Iteration 2 18.5 0.085 5,007 1 3 5007739 main() => Iteration 2 14.8 0.082 4,008 1 3 4008758 Iteration 1 14.8 0.082 4,008 1 3 4008758 main() => Iteration 1 14.8 4,001 4,001 1 0 4001734 Iteration 4 => f3() 11.1 0.398 3,006 1 3 3006980 Iteration 0 11.1 0.398 3,006 1 3 3006980 main() => Iteration 0 11.1 3,000 3,000 1 0 3000879 Iteration 3 => f3() 7.4 0.06 2,004 1 1 2004009 Iteration 0 => f2() 7.4 0.07 2,003 1 2 2003949 Iteration 0 => IO Phase 7.4 0.054 2,003 1 1 2003927 Iteration 1 => f2() 7.4 0.053 2,003 1 1 2003900 Iteration 2 => f2() 7.4 0.057 2,003 1 1 2003900 Iteration 4 => f2() 7.4 0.04 2,003 1 2 2003873 Iteration 1 => IO Phase 7.4 0.054 2,003 1 1 2003863 Iteration 3 => f2() 7.4 0.035 2,003 1 2 2003847 Iteration 2 => IO Phase 7.4 0.038 2,003 1 2 2003843 Iteration 4 => IO Phase 7.4 0.037 2,003 1 2 2003809 Iteration 3 => IO Phase 7.4 2,001 2,001 1 0 2001871 Iteration 2 => f3() 3.7 1,002 1,002 1 0 1002797 Iteration 1 => f1() 3.7 1,002 1,002 1 0 1002538 Iteration 0 => f1() 3.7 1,001 1,001 1 0 1001952 Iteration 1 => f3() 3.7 1,001 1,001 1 0 1001923 main() => f1() 3.7 1,001 1,001 1 0 1001916 f4() 3.7 1,001 1,001 1 0 1001916 main() => f4() 3.7 1,001 1,001 1 0 1001883 Iteration 2 => f1() 3.7 1,001 1,001 1 0 1001879 Iteration 3 => f1() 3.7 1,001 1,001 1 0 1001851 Iteration 4 => f1() 0.0 0.035 0.035 1 0 35 Iteration 0 => f3() This program has 7 phases, 'main()', Iteration 0-4, and 'IO Phase'. This sample demonstrates both dynamic and static phase definitions. The iterations are dynamic phases since the name changes each time (registration occurs each time). IO Phase is a static phase because the name will never change. Static phases should be preferred due to the lower overhead (registration occurs only once). If the sample is executed when TAU is configured without -PROFILEPHASE, a profile similar to the following will result. > pprof Reading Profile files in profile.* NODE 0;CONTEXT 0;THREAD 0: --------------------------------------------------------------------------------------- %Time Exclusive Inclusive #Call #Subrs Inclusive Name msec total msec usec/call --------------------------------------------------------------------------------------- 100.0 0.211 27,039 1 7 27039693 main() 37.1 0.108 10,019 5 5 2003880 f2() 37.1 0.149 10,019 5 10 2003858 IO Phase 37.0 10,007 10,007 5 0 2001466 f3() 25.9 0.31 7,007 1 3 7007619 Iteration 4 22.2 6,010 6,010 6 0 1001825 f1() 22.2 0.335 6,007 1 3 6007563 Iteration 3 18.5 5,009 5,009 5 0 1001924 input 18.5 5,009 5,009 5 0 1001905 output 18.5 0.056 5,007 1 3 5007634 Iteration 2 14.8 0.055 4,007 1 3 4007673 Iteration 1 11.1 0.116 3,006 1 3 3006139 Iteration 0 3.7 1,000 1,000 1 0 1000930 f4() tau-2.16.4/examples/phase/c++/simple.cpp000066400000000000000000000020001062343042700176510ustar00rootroot00000000000000#include #include #include int f1(void) { TAU_PROFILE("f1()", "", TAU_USER); sleep(1); return 0; } int input(void) { TAU_PROFILE("input", "", TAU_USER); sleep(1); } int output(void) { TAU_PROFILE("output", "", TAU_USER); sleep(1); } int f2(void) { TAU_PROFILE("f2()", "", TAU_USER); TAU_PHASE_CREATE_STATIC(t,"IO Phase", "", TAU_USER); TAU_PHASE_START(t); input(); output(); TAU_PHASE_STOP(t); return 0; } int f3(int x) { TAU_PROFILE("f3()", "", TAU_USER); sleep(x); return 0; } int f4(void) { TAU_PROFILE("f4()", "", TAU_USER); sleep(1); return 0; } int main(int argc, char **argv) { TAU_PROFILE("main()", "", TAU_DEFAULT); TAU_PROFILE_SET_NODE(0); for (int i=0; i<5; i++) { char buf[32]; sprintf(buf, "Iteration %d", i); TAU_PHASE_CREATE_DYNAMIC(phase, buf, "", TAU_USER); TAU_PHASE_START(phase); printf("Iteration %d\n", i); f1(); f2(); f3(i); TAU_PHASE_STOP(phase); } f1(); f4(); } tau-2.16.4/examples/phase/c/000077500000000000000000000000001062343042700155365ustar00rootroot00000000000000tau-2.16.4/examples/phase/c/Makefile000066400000000000000000000026541062343042700172050ustar00rootroot00000000000000#**************************************************************************** #* TAU Portable Profiling Package ** #* http://www.cs.uoregon.edu/research/tau ** #**************************************************************************** #* Copyright 1997 ** #* Department of Computer and Information Science, University of Oregon ** #* Advanced Computing Laboratory, Los Alamos National Laboratory ** #**************************************************************************** ####################################################################### ## pC++/Sage++ Copyright (C) 1993,1995 ## ## Indiana University University of Oregon University of Rennes ## ####################################################################### TAUROOTDIR = ../../.. include $(TAUROOTDIR)/include/Makefile CXX = $(TAU_CXX) CC = $(TAU_CC) CFLAGS = $(TAU_INCLUDE) $(TAU_DEFS) LIBS = $(TAU_LIBS) $(TAU_CXXLIBS) LDFLAGS = $(USER_OPT) MAKEFILE = Makefile PRINT = pr RM = /bin/rm -f TARGET = simple EXTRAOBJS = ############################################## all: $(TARGET) install: $(TARGET) $(TARGET): $(TARGET).o $(CC) $(LDFLAGS) $(TARGET).o -o $@ $(LIBS) $(TARGET).o : $(TARGET).c $(CC) $(CFLAGS) -c $(TARGET).c clean: $(RM) $(TARGET).o $(TARGET) ############################################## tau-2.16.4/examples/phase/c/README000066400000000000000000000134401062343042700164200ustar00rootroot00000000000000 Running this code when TAU is configured with -PROFILEPHASE should result in profiles such as: > pprof Reading Profile files in profile.* NODE 0;CONTEXT 0;THREAD 0: --------------------------------------------------------------------------------------- %Time Exclusive Inclusive #Call #Subrs Inclusive Name msec total msec usec/call --------------------------------------------------------------------------------------- 100.0 0.184 27,041 1 7 27041782 main() 37.1 0.278 10,019 5 5 2003920 f2() 37.1 0.22 10,019 5 10 2003864 IO Phase 37.0 10,006 10,006 5 0 2001294 f3() 25.9 0.087 7,007 1 3 7007572 Iteration 4 25.9 0.087 7,007 1 3 7007572 main() => Iteration 4 22.2 6,012 6,012 6 0 1002145 f1() 22.2 0.089 6,006 1 3 6006710 Iteration 3 22.2 0.089 6,006 1 3 6006710 main() => Iteration 3 18.5 5,009 5,009 5 0 1001946 IO Phase => output 18.5 5,009 5,009 5 0 1001946 output 18.5 5,009 5,009 5 0 1001874 IO Phase => input 18.5 5,009 5,009 5 0 1001874 input 18.5 0.085 5,007 1 3 5007739 Iteration 2 18.5 0.085 5,007 1 3 5007739 main() => Iteration 2 14.8 0.082 4,008 1 3 4008758 Iteration 1 14.8 0.082 4,008 1 3 4008758 main() => Iteration 1 14.8 4,001 4,001 1 0 4001734 Iteration 4 => f3() 11.1 0.398 3,006 1 3 3006980 Iteration 0 11.1 0.398 3,006 1 3 3006980 main() => Iteration 0 11.1 3,000 3,000 1 0 3000879 Iteration 3 => f3() 7.4 0.06 2,004 1 1 2004009 Iteration 0 => f2() 7.4 0.07 2,003 1 2 2003949 Iteration 0 => IO Phase 7.4 0.054 2,003 1 1 2003927 Iteration 1 => f2() 7.4 0.053 2,003 1 1 2003900 Iteration 2 => f2() 7.4 0.057 2,003 1 1 2003900 Iteration 4 => f2() 7.4 0.04 2,003 1 2 2003873 Iteration 1 => IO Phase 7.4 0.054 2,003 1 1 2003863 Iteration 3 => f2() 7.4 0.035 2,003 1 2 2003847 Iteration 2 => IO Phase 7.4 0.038 2,003 1 2 2003843 Iteration 4 => IO Phase 7.4 0.037 2,003 1 2 2003809 Iteration 3 => IO Phase 7.4 2,001 2,001 1 0 2001871 Iteration 2 => f3() 3.7 1,002 1,002 1 0 1002797 Iteration 1 => f1() 3.7 1,002 1,002 1 0 1002538 Iteration 0 => f1() 3.7 1,001 1,001 1 0 1001952 Iteration 1 => f3() 3.7 1,001 1,001 1 0 1001923 main() => f1() 3.7 1,001 1,001 1 0 1001916 f4() 3.7 1,001 1,001 1 0 1001916 main() => f4() 3.7 1,001 1,001 1 0 1001883 Iteration 2 => f1() 3.7 1,001 1,001 1 0 1001879 Iteration 3 => f1() 3.7 1,001 1,001 1 0 1001851 Iteration 4 => f1() 0.0 0.035 0.035 1 0 35 Iteration 0 => f3() This program has 7 phases, 'main()', Iteration 0-4, and 'IO Phase'. This sample demonstrates both dynamic and static phase definitions. The iterations are dynamic phases since the name changes each time (registration occurs each time). IO Phase is a static phase because the name will never change. Static phases should be preferred due to the lower overhead (registration occurs only once). If the sample is executed when TAU is configured without -PROFILEPHASE, a profile similar to the following will result. > pprof Reading Profile files in profile.* NODE 0;CONTEXT 0;THREAD 0: --------------------------------------------------------------------------------------- %Time Exclusive Inclusive #Call #Subrs Inclusive Name msec total msec usec/call --------------------------------------------------------------------------------------- 100.0 0.211 27,039 1 7 27039693 main() 37.1 0.108 10,019 5 5 2003880 f2() 37.1 0.149 10,019 5 10 2003858 IO Phase 37.0 10,007 10,007 5 0 2001466 f3() 25.9 0.31 7,007 1 3 7007619 Iteration 4 22.2 6,010 6,010 6 0 1001825 f1() 22.2 0.335 6,007 1 3 6007563 Iteration 3 18.5 5,009 5,009 5 0 1001924 input 18.5 5,009 5,009 5 0 1001905 output 18.5 0.056 5,007 1 3 5007634 Iteration 2 14.8 0.055 4,007 1 3 4007673 Iteration 1 11.1 0.116 3,006 1 3 3006139 Iteration 0 3.7 1,000 1,000 1 0 1000930 f4() tau-2.16.4/examples/phase/c/simple.c000066400000000000000000000031441062343042700171750ustar00rootroot00000000000000#include #include #include int f1(void) { TAU_PROFILE_TIMER(t,"f1()", "", TAU_USER); TAU_PROFILE_START(t); sleep(1); TAU_PROFILE_STOP(t); return 0; } int input(void) { TAU_PROFILE_TIMER(t,"input", "", TAU_USER); TAU_PROFILE_START(t); sleep(1); TAU_PROFILE_STOP(t); } int output(void) { TAU_PROFILE_TIMER(t,"output", "", TAU_USER); TAU_PROFILE_START(t); sleep(1); TAU_PROFILE_STOP(t); } int f2(void) { TAU_PROFILE_TIMER(t,"f2()", "", TAU_USER); TAU_PROFILE_START(t); TAU_PHASE_CREATE_STATIC(t2,"IO Phase", "", TAU_USER); TAU_PHASE_START(t2); input(); output(); TAU_PHASE_STOP(t2); TAU_PROFILE_STOP(t); return 0; } int f3(int x) { TAU_PROFILE_TIMER(t,"f3()", "", TAU_USER); TAU_PROFILE_START(t); sleep(x); TAU_PROFILE_STOP(t); return 0; } int f4(void) { TAU_PROFILE_TIMER(t,"f4()", "", TAU_USER); TAU_PROFILE_START(t); sleep(1); TAU_PROFILE_STOP(t); return 0; } int main(int argc, char **argv) { int i; TAU_PROFILE_TIMER(t,"main()", "", TAU_DEFAULT); TAU_PROFILE_SET_NODE(0); TAU_PROFILE_START(t); for (i=0; i<5; i++) { char buf[32]; sprintf(buf, "Iteration %d", i); TAU_PHASE_CREATE_DYNAMIC(phase, buf, "", TAU_USER); TAU_PHASE_START(phase); // Alternatively, we could use a dynamically name timer, but we would not get phase info // TAU_PROFILE_TIMER_DYNAMIC(t2, buf, "", TAU_USER); // TAU_PROFILE_START(t2); printf("Iteration %d\n", i); f1(); f2(); f3(i); // TAU_PROFILE_STOP(t2); TAU_PHASE_STOP(phase); } f1(); f4(); TAU_PROFILE_STOP(t); } tau-2.16.4/examples/phase/fortran/000077500000000000000000000000001062343042700167675ustar00rootroot00000000000000tau-2.16.4/examples/phase/fortran/Makefile000066400000000000000000000027171062343042700204360ustar00rootroot00000000000000#**************************************************************************** #* TAU Portable Profiling Package ** #* http://www.cs.uoregon.edu/research/tau ** #**************************************************************************** #* Copyright 1997 ** #* Department of Computer and Information Science, University of Oregon ** #* Advanced Computing Laboratory, Los Alamos National Laboratory ** #**************************************************************************** ####################################################################### ## pC++/Sage++ Copyright (C) 1993,1995 ## ## Indiana University University of Oregon University of Rennes ## ####################################################################### TAUROOTDIR = ../../.. include $(TAUROOTDIR)/include/Makefile CXX = $(TAU_CXX) CC = $(TAU_CC) FFLAGS = $(TAU_INCLUDE) $(TAU_F90_FIXED) LIBS = $(TAU_LIBS) $(TAU_CXXLIBS) LDFLAGS = $(USER_OPT) MAKEFILE = Makefile PRINT = pr RM = /bin/rm -f F90 = $(TAU_F90) TARGET = simple EXTRAOBJS = ############################################## all: $(TARGET) install: $(TARGET) $(TARGET): $(TARGET).o $(F90) $(LDFLAGS) $(TARGET).o -o $@ $(LIBS) $(TARGET).o : $(TARGET).f $(F90) $(FFLAGS) -c $(TARGET).f clean: $(RM) $(TARGET).o $(TARGET) ############################################## tau-2.16.4/examples/phase/fortran/README000066400000000000000000000135431062343042700176550ustar00rootroot00000000000000 Running this code when TAU is configured with -PROFILEPHASE should result in profiles such as: > pprof Reading Profile files in profile.* NODE 0;CONTEXT 0;THREAD 0: --------------------------------------------------------------------------------------- %Time Exclusive Inclusive #Call #Subrs Inclusive Name msec total msec usec/call --------------------------------------------------------------------------------------- 100.0 0.641 27,040 1 7 27040906 main() 37.1 0.235 10,018 5 5 2003745 f2() 37.0 0.225 10,018 5 10 2003698 IO Phase 37.0 10,006 10,006 5 0 2001320 f3() 25.9 0.075 7,006 1 3 7006714 Iteration 4 25.9 0.075 7,006 1 3 7006714 main() => Iteration 4 22.2 6,012 6,012 6 0 1002100 f1() 22.2 0.08 6,006 1 3 6006796 Iteration 3 22.2 0.08 6,006 1 3 6006796 main() => Iteration 3 18.5 5,009 5,009 5 0 1001904 IO Phase => input 18.5 5,009 5,009 5 0 1001904 input 18.5 5,008 5,008 5 0 1001749 IO Phase => output 18.5 5,008 5,008 5 0 1001749 output 18.5 0.074 5,007 1 3 5007764 Iteration 2 18.5 0.074 5,007 1 3 5007764 main() => Iteration 2 14.8 0.065 4,008 1 3 4008717 Iteration 1 14.8 0.065 4,008 1 3 4008717 main() => Iteration 1 14.8 4,000 4,000 1 0 4000865 Iteration 4 => f3() 11.1 0.103 3,006 1 3 3006373 Iteration 0 11.1 0.103 3,006 1 3 3006373 main() => Iteration 0 11.1 3,001 3,001 1 0 3001887 Iteration 3 => f3() 7.4 0.03 2,003 1 1 2003965 Iteration 0 => f2() 7.4 0.05 2,003 1 1 2003951 Iteration 2 => f2() 7.4 0.053 2,003 1 2 2003935 Iteration 0 => IO Phase 7.4 0.052 2,003 1 1 2003931 Iteration 4 => f2() 7.4 0.049 2,003 1 1 2003915 Iteration 1 => f2() 7.4 0.041 2,003 1 2 2003901 Iteration 2 => IO Phase 7.4 0.041 2,003 1 2 2003879 Iteration 4 => IO Phase 7.4 0.05 2,003 1 2 2003866 Iteration 1 => IO Phase 7.4 0.054 2,002 1 1 2002964 Iteration 3 => f2() 7.4 0.04 2,002 1 2 2002910 Iteration 3 => IO Phase 7.4 2,001 2,001 1 0 2001881 Iteration 2 => f3() 3.7 1,002 1,002 1 0 1002799 Iteration 1 => f1() 3.7 1,002 1,002 1 0 1002277 Iteration 0 => f1() 3.7 1,001 1,001 1 0 1001959 main() => f1() 3.7 1,001 1,001 1 0 1001942 f4() 3.7 1,001 1,001 1 0 1001942 main() => f4() 3.7 1,001 1,001 1 0 1001938 Iteration 1 => f3() 3.7 1,001 1,001 1 0 1001865 Iteration 3 => f1() 3.7 1,001 1,001 1 0 1001858 Iteration 2 => f1() 3.7 1,001 1,001 1 0 1001843 Iteration 4 => f1() 0.0 0.028 0.028 1 0 28 Iteration 0 => f3() This program has 7 phases, 'main()', Iteration 0-4, and 'IO Phase'. This sample demonstrates both dynamic and static phase definitions. The iterations are dynamic phases since the name changes each time (registration occurs each time). IO Phase is a static phase because the name will never change. Static phases should be preferred due to the lower overhead (registration occurs only once). If the sample is executed when TAU is configured without -PROFILEPHASE, a profile similar to the following will result. > pprof Reading Profile files in profile.* NODE 0;CONTEXT 0;THREAD 0: --------------------------------------------------------------------------------------- %Time Exclusive Inclusive #Call #Subrs Inclusive Name msec total msec usec/call --------------------------------------------------------------------------------------- 100.0 0.63 27,039 1 7 27039549 main() 37.1 0.081 10,018 5 5 2003757 f2() 37.1 0.193 10,018 5 10 2003741 IO Phase 37.0 10,006 10,006 5 0 2001397 f3() 25.9 0.046 7,007 1 3 7007212 Iteration 4 22.2 6,010 6,010 6 0 1001827 f1() 22.2 0.049 6,007 1 3 6007346 Iteration 3 18.5 5,009 5,009 5 0 1001917 input 18.5 5,008 5,008 5 0 1001785 output 18.5 0.047 5,007 1 3 5007361 Iteration 2 14.8 0.044 4,007 1 3 4007480 Iteration 1 11.1 0.093 3,005 1 3 3005671 Iteration 0 3.7 1,001 1,001 1 0 1001906 f4() tau-2.16.4/examples/phase/fortran/simple.f000066400000000000000000000053661062343042700204410ustar00rootroot00000000000000cc simple.f cc -------- cc This file contains sample code for phased based profiling with TAU cc----------------------------------------------------------------------------- subroutine F1() integer profiler(2) / 0, 0 / save profiler call TAU_PROFILE_TIMER(profiler,'f1()') call TAU_PROFILE_START(profiler) call SLEEP(1) call TAU_PROFILE_STOP(profiler) end subroutine INPUT() integer profiler(2) / 0, 0 / save profiler call TAU_PROFILE_TIMER(profiler,'input') call TAU_PROFILE_START(profiler) call SLEEP(1) call TAU_PROFILE_STOP(profiler) end subroutine OUTPUT() integer profiler(2) / 0, 0 / save profiler call TAU_PROFILE_TIMER(profiler,'output') call TAU_PROFILE_START(profiler) call SLEEP(1) call TAU_PROFILE_STOP(profiler) end subroutine F2() integer profiler(2) / 0, 0 / save profiler integer phase(2) / 0, 0 / save phase call TAU_PROFILE_TIMER(profiler,'f2()') call TAU_PROFILE_START(profiler) call TAU_PHASE_CREATE_STATIC(phase,'IO Phase') call TAU_PHASE_START(phase) call INPUT() call OUTPUT() call TAU_PHASE_STOP(phase) call TAU_PROFILE_STOP(profiler) end subroutine F3(val) integer val integer profiler(2) / 0, 0 / save profiler call TAU_PROFILE_TIMER(profiler,'f3()') call TAU_PROFILE_START(profiler) call SLEEP(val) call TAU_PROFILE_STOP(profiler) end subroutine F4() integer profiler(2) / 0, 0 / save profiler call TAU_PROFILE_TIMER(profiler,'f4()') call TAU_PROFILE_START(profiler) call SLEEP(1) call TAU_PROFILE_STOP(profiler) end subroutine ITERATION(val) integer val / 0 / character(13) cvar integer profiler(2) / 0, 0 / save profiler, val print *, "Iteration ", val write (cvar,'(a9,i2)') 'Iteration', val call TAU_PHASE_CREATE_DYNAMIC(profiler, cvar) call TAU_PHASE_START(profiler) val = val + 1 call F1() call F2() call F3(val) call TAU_PHASE_STOP(profiler) return end program main integer i integer profiler(2) / 0, 0 / save profiler call TAU_PROFILE_INIT() call TAU_PROFILE_TIMER(profiler, 'main()') call TAU_PROFILE_START(profiler) call TAU_PROFILE_SET_NODE(0) do 10, i = 0, 4 call ITERATION(i) 10 continue call F1() call F4() call TAU_PROFILE_STOP(profiler) end tau-2.16.4/examples/pi/000077500000000000000000000000001062343042700146245ustar00rootroot00000000000000tau-2.16.4/examples/pi/Makefile000066400000000000000000000027251062343042700162720ustar00rootroot00000000000000#**************************************************************************** #* TAU Portable Profiling Package ** #* http://www.cs.uoregon.edu/research/tau ** #**************************************************************************** #* Copyright 1997 ** #* Department of Computer and Information Science, University of Oregon ** #* Advanced Computing Laboratory, Los Alamos National Laboratory ** #**************************************************************************** ####################################################################### ## pC++/Sage++ Copyright (C) 1993,1995 ## ## Indiana University University of Oregon University of Rennes ## ####################################################################### TAUROOTDIR = ../.. include $(TAUROOTDIR)/include/Makefile CXX = $(TAU_CXX) CC = $(TAU_CC) CFLAGS = $(TAU_INCLUDE) $(TAU_DEFS) $(TAU_MPI_INCLUDE) LIBS = $(TAU_MPI_LIBS) $(TAU_LIBS) -lm LDFLAGS = $(USER_OPT) $(TAU_LDFLAGS) MAKEFILE = Makefile PRINT = pr RM = /bin/rm -f TARGET = cpi EXTRAOBJS = ############################################## all: $(TARGET) install: $(TARGET) $(TARGET): $(TARGET).o $(CXX) $(LDFLAGS) $(TARGET).o -o $@ $(LIBS) $(TARGET).o : $(TARGET).cpp $(CXX) $(CFLAGS) -c $(TARGET).cpp clean: $(RM) $(TARGET).o $(TARGET) ############################################## tau-2.16.4/examples/pi/cpi.cpp000066400000000000000000000072511062343042700161100ustar00rootroot00000000000000/**************************************************************************** ** TAU Portable Profiling Package ** ** http://www.cs.uoregon.edu/research/tau ** ***************************************************************************** ** Copyright 1997 ** ** Department of Computer and Information Science, University of Oregon ** ** Advanced Computing Laboratory, Los Alamos National Laboratory ** ****************************************************************************/ // This application calculates the value of pi and e using a parallel // algorithm for integrating a function using Riemann sum. Uses MPI. #include "mpi.h" #include #include #include #ifndef M_E #define M_E 2.7182818284590452354 /* e */ #endif #ifndef M_PI #define M_PI 3.14159265358979323846 /* pi */ #endif double f(double a) { TAU_PROFILE("f()", "double (double)", TAU_USER); return (4.0 / (1.0 + a*a)); } int main(int argc, char* argv[]) { int i, n, myid, numprocs, namelen; double mySum, h, sum, x; double startwtime, timePi, timeE, time1; char processor_name[MPI_MAX_PROCESSOR_NAME]; TAU_PROFILE("main()", "int (int, char **)", TAU_DEFAULT); TAU_PROFILE_INIT(argc,argv); MPI_Init(&argc,&argv); TAU_PROFILE_TIMER(t1, "main-init()", "int (int, char **)", TAU_USER); TAU_PROFILE_START(t1); MPI_Comm_size(MPI_COMM_WORLD,&numprocs); MPI_Comm_rank(MPI_COMM_WORLD,&myid); MPI_Get_processor_name(processor_name,&namelen); TAU_PROFILE_SET_NODE(myid); fprintf(stderr,"Process %d on %s\n", myid, processor_name); if (argc > 1) { sscanf(argv[1], "%d", &n); } else { n = 1000000; } TAU_PROFILE_STOP(t1); /* // Calculate pi by integrating 4/(1 + x^2) from 0 to 1. */ startwtime = MPI_Wtime(); h = 1.0 / (double) n; sum = 0.0; for (i = myid + 1; i <= n; i += numprocs) { x = h * ((double)i - 0.5); sum += f(x); } mySum = h * sum; /* REGION A */ MPI_Reduce(&mySum, &sum, 1, MPI_DOUBLE, MPI_SUM, 0, MPI_COMM_WORLD); if (myid == 0) { timePi = MPI_Wtime() - startwtime; printf("\nFor %d integration intervals:\n", n); printf(" pi is approximately %.16f, Error is %.16f\n", sum, fabs(sum - M_PI)); } /* // Calculate e by integrating exp(x) from 0 to 1. */ startwtime = MPI_Wtime(); h = 1.0 / (double) n; sum = 0.0; for (i = myid + 1; i <= n; i += numprocs) { x = h * ((double)i - 0.5); sum += exp(x); } mySum = h * sum; MPI_Reduce(&mySum, &sum, 1, MPI_DOUBLE, MPI_SUM, 0, MPI_COMM_WORLD); if (myid == 0) { sum += 1; /* integral = e - 1, so add 1 */ timeE = MPI_Wtime() - startwtime; printf(" e is approximately %.16f, Error is %.16f\n", sum, fabs(sum - M_E)); } /* // Calculate 1.0 by integrating cos(th) from 0 to pi/2. */ startwtime = MPI_Wtime(); h = (M_PI / 2.0) / (double) n; sum = 0.0; for (i = myid + 1; i <= n; i += numprocs) { x = h * ((double)i - 0.5); sum += cos(x); } mySum = h * sum; MPI_Reduce(&mySum, &sum, 1, MPI_DOUBLE, MPI_SUM, 0, MPI_COMM_WORLD); if (myid == 0) { time1 = MPI_Wtime() - startwtime; printf(" sum is %.16f, Error is %.16f\n\n", sum, fabs(1.0 - sum)); printf("wall clock time for pi = %f\n", timePi); printf("wall clock time for e = %f\n", timeE); printf("wall clock time for 1 = %f\n", time1); printf("Total time = %f\n\n", timePi + timeE + time1); } /* // finished */ MPI_Finalize(); return 0; } tau-2.16.4/examples/python/000077500000000000000000000000001062343042700155355ustar00rootroot00000000000000tau-2.16.4/examples/python/auto.py000077500000000000000000000003471062343042700170660ustar00rootroot00000000000000#!/usr/bin/env python import tau from time import sleep def f2(): print "Inside f2: sleeping for 2 secs..." sleep(2) def f1(): print "Inside f1, calling f2..." f2() def OurMain(): f1() tau.run('OurMain()') tau-2.16.4/examples/python/manual.py000077500000000000000000000004741062343042700173740ustar00rootroot00000000000000#!/usr/bin/env python import pytau from time import sleep x = pytau.profileTimer("A Sleep for excl 5 secs") y = pytau.profileTimer("B Sleep for excl 2 secs") pytau.start(x) print "Sleeping for 5 secs ..." sleep(5) pytau.start(y) print "Sleeping for 2 secs ..." sleep(2) pytau.stop(y) pytau.dbDump() pytau.stop(x) tau-2.16.4/examples/reduce/000077500000000000000000000000001062343042700154635ustar00rootroot00000000000000tau-2.16.4/examples/reduce/Makefile000066400000000000000000000072471062343042700171350ustar00rootroot00000000000000#**************************************************************************** #* TAU Portable Profiling Package ** #* http://www.cs.uoregon.edu/research/tau ** #**************************************************************************** #* Copyright 1997 ** #* Department of Computer and Information Science, University of Oregon ** #* Advanced Computing Laboratory, Los Alamos National Laboratory ** #**************************************************************************** ####################################################################### ## pC++/Sage++ Copyright (C) 1993,1995 ## ## Indiana University University of Oregon University of Rennes ## ####################################################################### TAUROOTDIR = ../.. include $(TAUROOTDIR)/include/Makefile CXX = $(TAU_CXX) CC = $(TAU_CC) PDTPARSE = $(PDTDIR)/$(PDTARCHDIR)/bin/cxxparse TAUINSTR = $(TAUROOTDIR)/$(CONFIG_ARCH)/bin/tau_instrumentor TAUREDUCE = $(TAUROOTDIR)/$(CONFIG_ARCH)/bin/tau_reduce TAUPPROF = $(TAUROOTDIR)/$(CONFIG_ARCH)/bin/pprof CFLAGS = $(TAU_INCLUDE) $(TAU_DEFS) -UTAU_MPI LIBS = $(TAU_LIBS) LDFLAGS = $(USER_OPT) MAKEFILE = Makefile PRINT = pr RM = /bin/rm -f TARGET = klargest ARGS = 1000000 2324 EXTRAOBJS = ############################################## # Original Rules ############################################## #all: $(TARGET) # #install: $(TARGET) # #$(TARGET): $(TARGET).o # $(CXX) $(LDFLAGS) $(TARGET).o -o $@ $(LIBS) # #$(TARGET).o : $(TARGET).cpp # $(CXX) $(CFLAGS) -c $(TARGET).cpp # #clean: ############################################## ############################################## # Modified Rules ############################################## all: showdata $(TARGET) $(PDTPARSE) $(TAUINSTR) showdata: run2 $(TAUPPROF) run2: $(TARGET).refined ./$(TARGET).refined $(ARGS) $(TARGET).refined: $(TARGET).refined.o $(CXX) $(LDFLAGS) $(TARGET).refined.o -o $@ $(LIBS) $(TARGET).refined.o: $(TARGET).inst.refined.cpp $(CXX) -c $(CFLAGS) $(TARGET).inst.refined.cpp -o $@ $(TARGET).inst.refined.cpp: select.refined $(TARGET).pdb $(TAUINSTR) $(TARGET).pdb $(TARGET).cpp -o $(TARGET).inst.refined.cpp -f select.refined select.refined: pprof.dat $(TAUREDUCE) -f pprof.dat -r rules.prop -o select.refined pprof.dat: run1 $(TAUPPROF) -d > pprof.dat run1: $(TARGET) ./$(TARGET) $(ARGS) $(TARGET): $(TARGET).o $(CXX) $(LDFLAGS) $(TARGET).o -o $@ $(LIBS) # Use the instrumented source code to generate the object code $(TARGET).o : $(TARGET).inst.cpp $(CXX) -c $(CFLAGS) $(TARGET).inst.cpp -o $(TARGET).o # Generate the instrumented source from the original source and the pdb file $(TARGET).inst.cpp : $(TARGET).pdb $(TARGET).cpp $(TAUINSTR) $(TAUINSTR) $(TARGET).pdb $(TARGET).cpp -o $(TARGET).inst.cpp # Parse the source file to generate the pdb file $(TARGET).pdb : $(PDTPARSE) $(TARGET).cpp $(PDTPARSE) $(TARGET).cpp $(CFLAGS) clean: $(RM) $(TARGET).o $(TARGET).inst.cpp $(TARGET) $(TARGET).pdb *.refined* profile* pprof.dat ############################################## $(PDTPARSE): @echo "*********************************************************" @echo "Download and Install Program Database Toolkit " @echo "ERROR: Cannot find $(PDTPARSE)" @echo "*********************************************************" $(TAUINSTR): @echo "*********************************************************" @echo "Configure TAU with -pdt= configuration option to use" @echo "C++ instrumentation with PDT" @echo "ERROR: Cannot find $(TAUINSTR)" @echo "*********************************************************" tau-2.16.4/examples/reduce/decl.h000066400000000000000000000013041062343042700165410ustar00rootroot00000000000000/**************************************************************************** ** File : decl.h ** Author : Sameer Shende ** Contents : function prototypes for kl.c to calculate kth largest elt. *****************************************************************************/ #ifndef _DECL_H #define _DECL_H /* function declarations */ int select_kth_largest(int k, int *S, int n); void interchange(int *a, int *b); void setup(int *arr); void quicksort(int *arr, int m, int n); void sort_5elements(int *arr); int kth_largest_qs(int k, int *arr, int size); void display_array(int *A, int nelems); int floor (int num, int den); int ceil (int num, int den); #endif /* _DECL_H */ /* EOF decl.h */ tau-2.16.4/examples/reduce/klargest.cpp000066400000000000000000000305141062343042700200060ustar00rootroot00000000000000/**************************************************************************** ** File : klargest.c ** Author : Sameer Shende ** Contents : program to calculate the kth largest element in two ways ** Directory : $(TAUDIR)/examples/autoinstrument/ ** Usage : program [] [] ** e.g., % klargest 5000 675 *****************************************************************************/ #include #include #include /* for INT_MIN */ #include #include "decl.h" #define DEFAULT_SIZE 10000 #define DEFAULT_K 4 /* fourth largest element from the array */ #define middle(i) 5*i+2 /* the large array is partitioned into 5 elements each 2, 7, 12 etc. are positions of the middle elements in the array */ int size; /* global - size of the array */ int *M; /* the median array */ /************************************************************************** ** Function : select_kth_largest ** Parameters : k, array of integers S and n - the size of array. ** Description: The SELECT algorithm to find the kth largest element from ** the set of integers S in O(n) time. Used recursively. ** Returns : returns the kth largest element. ***************************************************************************/ int select_kth_largest(int k, int *S, int n) { /* return the kth largest element from the ordered set S of integers */ /* n is the number of elements in S */ /* Algorithm : if n < 50 then sort in dec. order S, return kth largest element in S else divide S into ceil(n/5) sequences of 5 elements each with upto four leftover elements sort in dec order each 5 element sequence let M be the sequence of medians of the 5 element sets m = select_kth_largest(ceil(n(M)/2), M, n/5); let S1, S2 and S3 be the sequences of elements in S greater than, equal to and less than m respectively. if n(S1) >=k then return select_kth_largest(k, S1, n(S1)); else if (n(S1) + n(S2) >= k) then return m else return select_kth_largest (k - n(S1) - n(S2), S3); */ int n_M, n_S1, n_S2, n_S3; /* number of elements in M, S1, S2 and S3 resp. */ int *S1, *S3; /* the other arrays */ int m; /* the median element */ int i, leftover, ret; if (n < 50) return kth_largest_qs(k, S, n); /* Use quicksort to sort the array S and return the kth largest element */ leftover = n % 5; /* upto four leftover elements */ if (leftover != 0) { /* then pad the remaining elements with min. negative values */ for (i=n; i< n + 5 - leftover; i++) S[i] = INT_MIN; /* number of leftover elements */ /* INT_MIN is defined for each system in /usr/include/limits.h */ } /* after padding the remaining array, sort the 5 element sequence */ n_M = ceil(n, 5); /* number of elements in M */ for(i=0; i< n_M; i++) { sort_5elements(&S[5*i]); /* beginning element */ } /* 5 element sequences are sorted */ /* display_array(S, ceil(n,5)*5); */ /* size of padded array is ceil(n,5)*5 */ S1 = (int *) malloc ((3*n/4) * sizeof(int)); /* allocate S1 */ S3 = (int *) malloc ((3*n/4) * sizeof(int)); /* allocate S3 */ if((S1 == (int *) NULL) || (S3 == (int *) NULL)) { perror("S1 or S3 malloc error"); exit(1); } for (i=0; i< n_M; i++) M[i] = S[middle(i)]; /* fill up the median array */ m = select_kth_largest(ceil(n_M,2), M, n_M); /* calculate the median element*/ /* construct S1, S2, and S3 as sequences of elements in S greater than, equal to and less than m. Don't need a separate S2 array. */ /* initialize the count of elements in S1, S2, S3 */ n_S1 = n_S2 = n_S3 = 0; /* go through every element in S */ for (i = 0; i < n; i++) { if(S[i] > m) S1[n_S1++] = S[i]; /* goes to S1 */ else if (S[i] < m) S3[n_S3++] = S[i]; /* goes to S3 */ else n_S2++; /* S2 count incremented goes to S2 */ } /* now we have S1, and S3 */ if(n_S1 >= k) /* S1 has the elements greater than m and there are greater than k elements, so its bound to be in this section */ { /* free memory */ /* don't need S3 */ free(S3); ret = select_kth_largest(k, S1, n_S1); free(S1); /* before returning clean up S1 */ return ret; } else { if(n_S1 + n_S2 >= k) /* its not in S1, but its in S2 */ { /* free memory */ /* don't need S1 and S3 */ free(S1); free(S3); return m; /* the median that we had calculated earlier */ } else /* its in S3 */ { /* free memory */ /* don't need S1 */ free(S1); ret = select_kth_largest(k - n_S1 - n_S2, S3, n_S3); free(S3); /* before returning clean up S3 */ return ret; } } } /************************************************************************** ** Function : interchange ** Parameters : two integer pointers a, and b ** Description: interchanges the contents of a and b. ** Returns : nothing ***************************************************************************/ void interchange(int *a, int *b) { /* interchanges the contents of the two variables containing integers. */ int temp; temp = *a; *a = *b; *b = temp; } /************************************************************************** ** Function : setup ** Parameters : array to be initialized ** Description: assigns values to elements in the array used for finding ** the kth largest element. ** Returns : nothing ***************************************************************************/ void setup(int *arr) { int i; /* setup */ arr[0] = 26; arr[1] = 5; arr[2] = 37; arr[3] = 1; arr[4] = 61; arr[5] = 11; arr[6] = 59; arr[7] = 15; arr[8] = 48; arr[9] = 19; if (size > 10) { for (i=10; i< size; i++) arr[i] = arr[i%10]; } /* Uses the first ten values repeatedly and fills the array */ } /************************************************************************** ** Function : quicksort ** Parameters : array to be sorted and lower and upper limits m and n resp. ** Description: uses quicksort recursively to sort elements in O(nlog n) ** time complexity in decreasing order.. ** Returns : nothing ***************************************************************************/ /* quick sort */ void quicksort(int *arr, int m, int n) { /* sort the array in decreasing order */ int k; /* control key */ int i, j; /* k is chosen as the control key and i and j are chosen such that at any time, arr[l] >= k for l < i and arr[l] <= k for l > j. It is assumed that arr[m] >= arr[n+1] */ /* printf("quicksort %d %d\n [", m, n); for(i=m; i k); /* Decreasing order for largest element first */ do { j = j - 1; } while (arr[j] < k); /* Decreasing order */ if (i < j) interchange(&arr[i], &arr[j]); } while (i < j); interchange(&arr[m], &arr[j]); /* pivot */ quicksort(arr, m, j - 1); /* left portion sorted */ quicksort(arr, j + 1, n); /* right side sorted - so array is sorted */ } /*if */ } /************************************************************************** ** Function : sort_5elements ** Parameters : array of 5 elements to be sorted ** Description: sorts the 5 elements in decreasing order ** Returns : nothing ***************************************************************************/ void sort_5elements(int *arr) { /* sort the first five elements of the array arr */ quicksort(arr, 0, 4); /* could be done by if statements too - but this way its easier to extend it for 7 element based select */ } /************************************************************************** ** Function : kth_largest_qs ** Parameters : k for kth largest, array to be sorted and size of array ** Description: sorts the array using quicksort and finds the kth largest ** element ** Returns : kth largest element ***************************************************************************/ int kth_largest_qs(int k, int *arr, int size) { /* first we sort the array and then return the kth largest element */ quicksort(arr, 0, size - 1); /* sort the array */ return arr[k-1]; /* return the kth largest */ } /************************************************************************** ** Function : display_array ** Parameters : array and size of array ** Description: for debugging, prints contents of the array ** Returns : nothing ***************************************************************************/ void display_array(int *A, int nelems) { int i; for(i=0; i < nelems; i++) { printf("A[%d] = %d\n", i, A[i]); } } /* utility functions */ /************************************************************************** ** Function : floor ** Parameters : numerator and denominator ** Description: calculates the floor of num/den ** Returns : floor ***************************************************************************/ int floor (int num, int den) { return num / den; } /************************************************************************** ** Function : ceil ** Parameters : numerator and denominator ** Description: calculates the ceiling of num/den ** Returns : ceiling ***************************************************************************/ int ceil (int num, int den) { return (num % den > 0) ? (num / den + 1) : (num / den); } /************************************************************************** ** Function : main ** Parameters : command line parameters. ** Description: Usage : main [] [] ** Calculates kth largest element using two different algorithms ** and returns the value and the time statistics for the two. ** Returns : nothing ***************************************************************************/ int main(int argc, char **argv) { int klarge, k; struct timeval tp1, tp2; float time_taken; int *A; /* extract the size of the array and k from the command line parameters */ if (argc > 1) size = atoi(argv[1]); else { size = DEFAULT_SIZE; printf(" Usage : main [] [] \n"); printf(" Calculates kth largest element using two different algorithms\n"); printf(" and returns the value and the time statistics for the two.\n"); } if (argc > 2) k = atoi(argv[2]); /* kth largest */ else k = DEFAULT_K; if (k > size) { printf("ERROR: Please specify a value for k (%d) that is less than the array size (%d)\n", k, size); exit(0); } /* there could be upto 4 leftover elements */ A = (int *) malloc((size + 4) * sizeof(int)); /* allocate the array */ if (A == (int *) NULL) { perror("Cannot malloc the size of array"); exit(1); } M = (int *) malloc(ceil(size,5)*sizeof(int)); /*allocate memory for Median*/ /* its ok to recycle this array so its allocated here instead of doing it in select_kth_largest */ if (M == (int *) NULL) { perror("Cannot malloc M array"); /* its ok to recycle this array so its allocated here instead of doing it in select_kth_largest */ exit(1); } /* setup */ setup(A); /* display_array(A,size); */ gettimeofday(&tp1, NULL); /* timing info. */ klarge = select_kth_largest(k, A, size); /* using SELECT O(n) algo. */ gettimeofday(&tp2, NULL); /* timing info. */ printf("****************************************************\n"); printf("Using select_kth_largest, size %d, %d th largest element = %d\n", size,k, klarge); time_taken = (tp2.tv_sec - tp1.tv_sec) + (tp2.tv_usec - tp1.tv_usec) * 1e-6; printf("Time taken (wall clock) = %f secs\n", time_taken); printf("- - - - - - - - - - - - - - - - - -\n"); /* Now calculate the kth largest element in A using the same array but the "quick and dirty" quicksort O(nlog n) algorithm */ gettimeofday(&tp1, NULL); /* timing info */ klarge = kth_largest_qs(k, A, size); /* calculates the kth largest element of A */ gettimeofday(&tp2, NULL); /* print results */ printf("Using quicksort, size %d, %d th largest element = %d\n", size, k, klarge); time_taken = (tp2.tv_sec - tp1.tv_sec) + (tp2.tv_usec - tp1.tv_usec) * 1e-6; printf("Time taken (wall clock) = %f secs\n", time_taken); /* printf("%d %f\n", size, time_taken); */ } /* EOF klargest.cpp */ tau-2.16.4/examples/reduce/rules.prop000066400000000000000000000011461062343042700175210ustar00rootroot00000000000000#example rule file #rule grammar: FIELD OPERATOR NUMBER #FIELD = numcalls, numsubrs, usec, cumusec, stddev, count, totalcount, # percent, usecs/call, counts/call #OPERATOR = <, >, = #NUMBER = any number (may use scientific notation, ie, 1000000 or 1e+6) usec > 1000 & numcalls > 400000 & usecs/call < 30 & percent > 25 #this rule should give same results of the previous rule--which #will ultimately be ignored because the results are duplicated TAU_USER: usec > 1000 & numcalls > 400000 & usecs/call < 30 & percent > 25 #uncommenting this rule will give an error because there is no field #TAU_DEFAULT: tau-2.16.4/examples/selective/000077500000000000000000000000001062343042700161775ustar00rootroot00000000000000tau-2.16.4/examples/selective/Makefile000066400000000000000000000043461062343042700176460ustar00rootroot00000000000000#**************************************************************************** #* TAU Portable Profiling Package ** #* http://www.cs.uoregon.edu/research/tau ** #**************************************************************************** #* Copyright 2001 ** #* Department of Computer and Information Science, University of Oregon ** #* Advanced Computing Laboratory, Los Alamos National Laboratory ** #**************************************************************************** TAUROOTDIR = ../.. include $(TAUROOTDIR)/include/Makefile USE_TAU = 1 # Comment above line to disable TAU CXX = $(TAU_CXX) CC = $(TAU_CC) CPARSE = $(PDTDIR)/$(PDTARCHDIR)/bin/cparse F90PARSE = $(PDTDIR)/$(PDTARCHDIR)/bin/f95parse TAUINSTR = $(TAUROOTDIR)/$(CONFIG_ARCH)/bin/tau_instrumentor CFLAGS = $(TAU_INCLUDE) $(TAU_DEFS) #FFLAGS = -W132 FFLAGS = $(TAU_F90_SUFFIX) LIBS = $(TAU_LIBS) $(TAU_FORTRANLIBS) LDFLAGS = $(USER_OPT) TARGET = app EXTRAOBJS = RM = /bin/rm -f ############################################## ifdef USE_TAU COMPC_RULE = $(CPARSE) $< ; \ $(TAUINSTR) $*.pdb $< -o $*.inst.c ; \ $(CC) $(CFLAGS) -c $*.inst.c -o $@ ; \ rm -f $*.pdb ; COMPF_RULE1 = $(F90PARSE) $< ; \ $(TAUINSTR) $*.pdb $< -o $*.inst.f90 -g Fort1; \ $(TAU_F90) $(FFLAGS) -c $*.inst.f90 -o $@ ; \ rm -f $*.pdb ; COMPF_RULE2 = $(F90PARSE) $< ; \ $(TAUINSTR) $*.pdb $< -o $*.inst.f90 -g Fort2; \ $(TAU_F90) $(FFLAGS) -c $*.inst.f90 -o $@ ; \ rm -f $*.pdb ; else # DISABLE TAU INSTRUMENTATION TAU_DEFS = COMPC_RULE = $(CC) $(CFLAGS) -c $< -o $@ ; COMPF_RULE1 = $(TAU_F90) $(FFLAGS) -c $< -o $@ ; COMPF_RULE2 = $(TAU_F90) $(FFLAGS) -c $< -o $@ ; LIBS = $(TAU_FORTRANLIBS) endif ############################################## all: $(TARGET) install: $(TARGET) OBJS = main.o f1.o f2.o $(TARGET): $(OBJS) $(TAU_LINKER) $(LDFLAGS) $(OBJS) -o $@ $(LIBS) # Compilation rule main.o : main.c $(COMPC_RULE) f1.o : f1.f90 $(COMPF_RULE1) f2.o : f2.f90 $(COMPF_RULE2) clean: $(RM) $(OBJS) $(TARGET) f1.inst.f90 f2.inst.f90 main.inst.c core\ profile.* tautrace.* events.* *~ ############################################## tau-2.16.4/examples/selective/f1.f90000066400000000000000000000002351062343042700170250ustar00rootroot00000000000000 subroutine F1() implicit none print *, "Inside f1()" call F2() print *, "After calling f2()" end subroutine F1 tau-2.16.4/examples/selective/f2.f90000066400000000000000000000001451062343042700170260ustar00rootroot00000000000000 subroutine F2() implicit none print *, "Inside f2()" end subroutine F2 tau-2.16.4/examples/selective/main.c000066400000000000000000000010031062343042700172610ustar00rootroot00000000000000#include void f1_(void); int other_c_routine(void) { printf("Inside other_c_routine\n"); return 0; } int main(int argc, char **argv) { /* Invoke program with --profile Fort1+Fort2 */ int i; /* Comment this out */ #if (defined (PROFILING_ON) || defined (TRACING_ON)) TAU_DISABLE_GROUP_NAME("Fort2"); #endif /* PROFILING_ON */ for (i = 0; i < argc; i++) { printf("Argv[%d] = %s\n", i, argv[i]); } f1_(); printf("Inside main: after calling f1()\n"); other_c_routine(); return 0; } tau-2.16.4/examples/selectiveAccess/000077500000000000000000000000001062343042700173215ustar00rootroot00000000000000tau-2.16.4/examples/selectiveAccess/Makefile000066400000000000000000000026471062343042700207720ustar00rootroot00000000000000#**************************************************************************** #* TAU Portable Profiling Package ** #* http://www.cs.uoregon.edu/research/tau ** #**************************************************************************** #* Copyright 1997 ** #* Department of Computer and Information Science, University of Oregon ** #* Advanced Computing Laboratory, Los Alamos National Laboratory ** #**************************************************************************** ####################################################################### ## pC++/Sage++ Copyright (C) 1993,1995 ## ## Indiana University University of Oregon University of Rennes ## ####################################################################### TAUROOTDIR = ../.. include $(TAUROOTDIR)/default/lib/Makefile.tau CXX = $(TAU_CXX) CC = $(TAU_CC) CFLAGS = $(TAU_INCLUDE) $(TAU_DEFS) LIBS = $(TAU_LIBS) LDFLAGS = $(USER_OPT) MAKEFILE = Makefile PRINT = pr RM = /bin/rm -f TARGET = simple EXTRAOBJS = ############################################## all: $(TARGET) install: $(TARGET) $(TARGET): $(TARGET).o $(CXX) $(LDFLAGS) $(TARGET).o -o $@ $(LIBS) $(TARGET).o : $(TARGET).cpp $(CXX) $(CFLAGS) -c $(TARGET).cpp clean: $(RM) $(TARGET).o $(TARGET) ############################################## tau-2.16.4/examples/selectiveAccess/README000066400000000000000000000045001062343042700202000ustar00rootroot00000000000000This API basically allow an application access to TAU's internal data. You can access the function list, and all data at function name resolution. Also, you can access user defined event data. In the example, the beginning and end of the main() function contains internal data access function examples. The list of macros that are used in this example are: ----------------------------------------------------- * TAU_GET_FUNC_NAMES(functionList, numOfFunctions); It gets the list of routines that are active. * TAU_DUMP_FUNC_NAMES(); It writes the names of active functions to a file (dump_functionnames_n,c.0.0). * TAU_GET_COUNTER_NAMES(counterList, numOfCounters); It gets the list of counters. * TAU_GET_FUNC_VALS(inFuncs, 2, counterExclusiveValues, counterInclusiveValues, numOfCalls, numOfSubRoutines, counterNames, numOfCouns); It gets detailed performance data for the list of routines. The user specifies inFuncs and and the number of routines (2); TAU then returns the other arguments with the performance data. counterExclusiveValues and counterInclusiveValues are two dimensional arrays: the first dimension is the routine id and the second is counter id. The value is indexed by these two dimensions. numOfCalls and numOfSubRoutines are one dimensional arrays. See the simple.cpp file for its usage. * TAU_DUMP_FUNC_VALS_INCR(inFuncs, 1); Does the same as above, except that it dumps the results with a date stamp to the filename: sel_dump__Thu-Mar-28-16:30:48-2002__.0.0.0 The result is that previous TAU_DUMP_FUNC_VALS_INCR(...) are not overwritten (unless they occur within a second). * TAU_DB_DUMP_INCR(); Similar to TAU_DB_DUMP except that it, like the above, dumps with a date stamp to the file name. * TAU_GET_EVENT_NAMES(eventList, numEvents); Retrieves a list of user defined events. * TAU_GET_EVENT_VALS(eventList, numEvents, numSamples, max, min, mean, sumSqr); Retrieves user defined event data. The user specifies the list of events to get, and gets back 5 arrays. numSamples, an array of integers corresponding to the number of samples taken for the given user event. Max, min, mean, and sumSqr (sum squared) contain the statistical data available for user defined events. tau-2.16.4/examples/selectiveAccess/decl.h000066400000000000000000000013041062343042700203770ustar00rootroot00000000000000/**************************************************************************** ** File : decl.h ** Author : Sameer Shende ** Contents : function prototypes for kl.c to calculate kth largest elt. *****************************************************************************/ #ifndef _DECL_H #define _DECL_H /* function declarations */ int select_kth_largest(int k, int *S, int n); void interchange(int *a, int *b); void setup(int *arr); void quicksort(int *arr, int m, int n); void sort_5elements(int *arr); int kth_largest_qs(int k, int *arr, int size); void display_array(int *A, int nelems); int floor (int num, int den); int ceil (int num, int den); #endif /* _DECL_H */ /* EOF decl.h */ tau-2.16.4/examples/selectiveAccess/simple.cpp000066400000000000000000000407521062343042700213260ustar00rootroot00000000000000 #include /**************************************************************************** ** File : klargest.c ** Author : Sameer Shende ** Contents : program to calculate the kth largest element in two ways ** Directory : $(TAUDIR)/examples/autoinstrument/ ** Usage : program [] [] ** e.g., % klargest 5000 675 *****************************************************************************/ #include #include #include using namespace std; #include #include #include /* for INT_MIN */ #include #include "decl.h" #define DEFAULT_SIZE 1000000 #define DEFAULT_K 4 /* fourth largest element from the array */ #define middle(i) 5*i+2 /* the large array is partitioned into 5 elements each 2, 7, 12 etc. are positions of the middle elements in the array */ int size; /* global - size of the array */ int *M; /* the median array */ TAU_REGISTER_EVENT(qsize, "Size of Array given to QuickSort"); TAU_REGISTER_EVENT(ksize, "Size of Array given to Select Kth Largest"); /************************************************************************** ** Function : select_kth_largest ** Parameters : k, array of integers S and n - the size of array. ** Description: The SELECT algorithm to find the kth largest element from ** the set of integers S in O(n) time. Used recursively. ** Returns : returns the kth largest element. ***************************************************************************/ int select_kth_largest(int k, int *S, int n) { TAU_PROFILE("int select_kth_largest(int, int *, int)", " ", TAU_USER); TAU_EVENT(ksize, n); /* return the kth largest element from the ordered set S of integers */ /* n is the number of elements in S */ /* Algorithm : if n < 50 then sort in dec. order S, return kth largest element in S else divide S into ceil(n/5) sequences of 5 elements each with upto four leftover elements sort in dec order each 5 element sequence let M be the sequence of medians of the 5 element sets m = select_kth_largest(ceil(n(M)/2), M, n/5); let S1, S2 and S3 be the sequences of elements in S greater than, equal to and less than m respectively. if n(S1) >=k then return select_kth_largest(k, S1, n(S1)); else if (n(S1) + n(S2) >= k) then return m else return select_kth_largest (k - n(S1) - n(S2), S3); */ int n_M, n_S1, n_S2, n_S3; /* number of elements in M, S1, S2 and S3 resp. */ int *S1, *S3; /* the other arrays */ int m; /* the median element */ int i, leftover, ret; if (n < 50) return kth_largest_qs(k, S, n); /* Use quicksort to sort the array S and return the kth largest element */ leftover = n % 5; /* upto four leftover elements */ if (leftover != 0) { /* then pad the remaining elements with min. negative values */ for (i=n; i< n + 5 - leftover; i++) S[i] = INT_MIN; /* number of leftover elements */ /* INT_MIN is defined for each system in /usr/include/limits.h */ } /* after padding the remaining array, sort the 5 element sequence */ n_M = ceil(n, 5); /* number of elements in M */ for(i=0; i< n_M; i++) { sort_5elements(&S[5*i]); /* beginning element */ } /* 5 element sequences are sorted */ /* display_array(S, ceil(n,5)*5); */ /* size of padded array is ceil(n,5)*5 */ S1 = (int *) malloc ((3*n/4) * sizeof(int)); /* allocate S1 */ S3 = (int *) malloc ((3*n/4) * sizeof(int)); /* allocate S3 */ if((S1 == (int *) NULL) || (S3 == (int *) NULL)) { perror("S1 or S3 malloc error"); exit(1); } for (i=0; i< n_M; i++) M[i] = S[middle(i)]; /* fill up the median array */ m = select_kth_largest(ceil(n_M,2), M, n_M); /* calculate the median element*/ /* construct S1, S2, and S3 as sequences of elements in S greater than, equal to and less than m. Don't need a separate S2 array. */ /* initialize the count of elements in S1, S2, S3 */ n_S1 = n_S2 = n_S3 = 0; /* go through every element in S */ for (i = 0; i < n; i++) { if(S[i] > m) S1[n_S1++] = S[i]; /* goes to S1 */ else if (S[i] < m) S3[n_S3++] = S[i]; /* goes to S3 */ else n_S2++; /* S2 count incremented goes to S2 */ } /* now we have S1, and S3 */ if(n_S1 >= k) /* S1 has the elements greater than m and there are greater than k elements, so its bound to be in this section */ { /* free memory */ /* don't need S3 */ free(S3); ret = select_kth_largest(k, S1, n_S1); free(S1); /* before returning clean up S1 */ return ret; } else { if(n_S1 + n_S2 >= k) /* its not in S1, but its in S2 */ { /* free memory */ /* don't need S1 and S3 */ free(S1); free(S3); return m; /* the median that we had calculated earlier */ } else /* its in S3 */ { /* free memory */ /* don't need S1 */ free(S1); ret = select_kth_largest(k - n_S1 - n_S2, S3, n_S3); free(S3); /* before returning clean up S3 */ return ret; } } } /************************************************************************** ** Function : interchange ** Parameters : two integer pointers a, and b ** Description: interchanges the contents of a and b. ** Returns : nothing ***************************************************************************/ void interchange(int *a, int *b) { TAU_PROFILE("void interchange(int *, int *)", " ", TAU_USER); /* interchanges the contents of the two variables containing integers. */ int temp; temp = *a; *a = *b; *b = temp; } /************************************************************************** ** Function : setup ** Parameters : array to be initialized ** Description: assigns values to elements in the array used for finding ** the kth largest element. ** Returns : nothing ***************************************************************************/ void setup(int *arr) { TAU_PROFILE("void setup(int *)", " ", TAU_USER); int i; /* setup */ arr[0] = 26; arr[1] = 5; arr[2] = 37; arr[3] = 1; arr[4] = 61; arr[5] = 11; arr[6] = 59; arr[7] = 15; arr[8] = 48; arr[9] = 19; if (size > 10) { for (i=10; i< size; i++) arr[i] = arr[i%10]; } /* Uses the first ten values repeatedly and fills the array */ } /************************************************************************** ** Function : quicksort ** Parameters : array to be sorted and lower and upper limits m and n resp. ** Description: uses quicksort recursively to sort elements in O(nlog n) ** time complexity in decreasing order.. ** Returns : nothing ***************************************************************************/ /* quick sort */ void quicksort(int *arr, int m, int n) { TAU_PROFILE("void quicksort(int *, int, int)", " ", TAU_USER); /* sort the array in decreasing order */ TAU_EVENT(qsize, n); int k; /* control key */ int i, j; /* k is chosen as the control key and i and j are chosen such that at any time, arr[l] >= k for l < i and arr[l] <= k for l > j. It is assumed that arr[m] >= arr[n+1] */ /* printf("quicksort %d %d\n [", m, n); for(i=m; i k); /* Decreasing order for largest element first */ do { j = j - 1; } while (arr[j] < k); /* Decreasing order */ if (i < j) interchange(&arr[i], &arr[j]); } while (i < j); interchange(&arr[m], &arr[j]); /* pivot */ quicksort(arr, m, j - 1); /* left portion sorted */ quicksort(arr, j + 1, n); /* right side sorted - so array is sorted */ } /*if */ } /************************************************************************** ** Function : sort_5elements ** Parameters : array of 5 elements to be sorted ** Description: sorts the 5 elements in decreasing order ** Returns : nothing ***************************************************************************/ void sort_5elements(int *arr) { TAU_PROFILE("void sort_5elements(int *)", " ", TAU_USER); //Dump this function's values every time we reach 100000 calls. static int counter = 0; counter++; if(counter == 100000){ const char **inFuncs = (const char **) malloc(sizeof(const char *) * 2); inFuncs[0] = "void sort_5elements(int *)"; TAU_DUMP_FUNC_VALS_INCR(inFuncs, 1); counter = 0; } /* sort the first five elements of the array arr */ quicksort(arr, 0, 4); /* could be done by if statements too - but this way its easier to extend it for 7 element based select */ } /************************************************************************** ** Function : kth_largest_qs ** Parameters : k for kth largest, array to be sorted and size of array ** Description: sorts the array using quicksort and finds the kth largest ** element ** Returns : kth largest element ***************************************************************************/ int kth_largest_qs(int k, int *arr, int size) { TAU_PROFILE("int kth_largest_qs(int, int *, int)", " ", TAU_USER); /* first we sort the array and then return the kth largest element */ quicksort(arr, 0, size - 1); /* sort the array */ return arr[k-1]; /* return the kth largest */ } /************************************************************************** ** Function : display_array ** Parameters : array and size of array ** Description: for debugging, prints contents of the array ** Returns : nothing ***************************************************************************/ void display_array(int *A, int nelems) { TAU_PROFILE("void display_array(int *, int)", " ", TAU_USER); int i; for(i=0; i < nelems; i++) { printf("A[%d] = %d\n", i, A[i]); } } /* utility functions */ /************************************************************************** ** Function : floor ** Parameters : numerator and denominator ** Description: calculates the floor of num/den ** Returns : floor ***************************************************************************/ int floor (int num, int den) { TAU_PROFILE("int floor(int, int)", " ", TAU_USER); return num / den; } /************************************************************************** ** Function : ceil ** Parameters : numerator and denominator ** Description: calculates the ceiling of num/den ** Returns : ceiling ***************************************************************************/ int ceil (int num, int den) { TAU_PROFILE("int ceil(int, int)", " ", TAU_USER); return (num % den > 0) ? (num / den + 1) : (num / den); } /************************************************************************** ** Function : main ** Parameters : command line parameters. ** Description: Usage : main [] [] ** Calculates kth largest element using two different algorithms ** and returns the value and the time statistics for the two. ** Returns : nothing ***************************************************************************/ int main(int argc, char **argv) { TAU_PROFILE("int main(int, char **)", " ", TAU_DEFAULT); TAU_INIT(&argc, &argv); #ifndef TAU_MPI TAU_PROFILE_SET_NODE(0); #endif /* TAU_MPI */ int numOfFunctions; const char ** functionList; TAU_GET_FUNC_NAMES(functionList, numOfFunctions); for(int i=0;i 1) size = atoi(argv[1]); else { size = DEFAULT_SIZE; printf(" Usage : main [] [] \n"); printf(" Calculates kth largest element using two different algorithms\n"); printf(" and returns the value and the time statistics for the two.\n"); } if (argc > 2) k = atoi(argv[2]); /* kth largest */ else k = DEFAULT_K; if (k > size) { printf("ERROR: Please specify a value for k (%d) that is less than the array size (%d)\n", k, size); exit(0); } /* there could be upto 4 leftover elements */ A = (int *) malloc((size + 4) * sizeof(int)); /* allocate the array */ if (A == (int *) NULL) { perror("Cannot malloc the size of array"); exit(1); } M = (int *) malloc(ceil(size,5)*sizeof(int)); /*allocate memory for Median*/ /* its ok to recycle this array so its allocated here instead of doing it in select_kth_largest */ if (M == (int *) NULL) { perror("Cannot malloc M array"); /* its ok to recycle this array so its allocated here instead of doing it in select_kth_largest */ exit(1); } /* setup */ setup(A); /* display_array(A,size); */ gettimeofday(&tp1, NULL); /* timing info. */ klarge = select_kth_largest(k, A, size); /* using SELECT O(n) algo. */ gettimeofday(&tp2, NULL); /* timing info. */ printf("****************************************************\n"); printf("Using select_kth_largest, size %d, %d th largest element = %d\n", size,k, klarge); time_taken = (tp2.tv_sec - tp1.tv_sec) + (tp2.tv_usec - tp1.tv_usec) * 1e-6; printf("Time taken (wall clock) = %f secs\n", time_taken); printf("- - - - - - - - - - - - - - - - - -\n"); /* Now calculate the kth largest element in A using the same array but the "quick and dirty" quicksort O(nlog n) algorithm */ gettimeofday(&tp1, NULL); /* timing info */ klarge = kth_largest_qs(k, A, size); /* calculates the kth largest element of A */ gettimeofday(&tp2, NULL); /* print results */ printf("Using quicksort, size %d, %d th largest element = %d\n", size, k, klarge); time_taken = (tp2.tv_sec - tp1.tv_sec) + (tp2.tv_usec - tp1.tv_usec) * 1e-6; printf("Time taken (wall clock) = %f secs\n", time_taken); /* printf("%d %f\n", size, time_taken); */ const char **inFuncs; /* The first dimension is functions, and the second dimension is counters */ double **counterExclusiveValues; double **counterInclusiveValues; int *numOfCalls; int *numOfSubRoutines; const char **counterNames; int numOfCouns; TAU_GET_FUNC_NAMES(functionList, numOfFunctions); /* We are only interested in the first two routines that are executing in this context. So, we allocate space for two routine names and get the performance data for these two routines at runtime. */ if(numOfFunctions >=2 ){ inFuncs = (const char **) malloc(sizeof(const char *) * 2); inFuncs[0] = functionList[0]; inFuncs[1] = functionList[1]; //Just to show consistency. TAU_DB_DUMP(); TAU_GET_FUNC_VALS(inFuncs, 2, counterExclusiveValues, counterInclusiveValues, numOfCalls, numOfSubRoutines, counterNames, numOfCouns); TAU_DUMP_FUNC_VALS_INCR(inFuncs, 2); cout << "@@@@@@@@@@@@@@@" << endl; cout << "The number of counters is: " << numOfCouns << endl; cout << "The first counter is: " << counterNames[0] << endl; cout << "The Exclusive value of: " << inFuncs[0] << " is: " << counterExclusiveValues[0][0] << endl; cout << "The numOfSubRoutines of: " << inFuncs[0] << " is: " << numOfSubRoutines[0] << endl; cout << "The Inclusive value of: " << inFuncs[1] << " is: " << counterInclusiveValues[1][0] << endl; cout << "The numOfCalls of: " << inFuncs[1] << " is: " << numOfCalls[1] << endl; cout << "@@@@@@@@@@@@@@@" << endl; } TAU_DB_DUMP_INCR(); const char **eventList; int numEvents; TAU_GET_EVENT_NAMES(eventList, numEvents); cout << "numEvents: " << numEvents << endl; if (numEvents > 0) { int *numSamples; double *max; double *min; double *mean; double *sumSqr; TAU_GET_EVENT_VALS(eventList, numEvents, numSamples, max, min, mean, sumSqr); for (int i=0; i//bin directory should be in your path. # Please set TAU_MAKEFILE environment variable to point to your stub Makefile # that is typically found in //lib/Makefile.tau- # You may also pass parameters to the above script by setting the environment # variable TAU_OPTIONS. Please see tau_compiler.sh -help for a full listing # and refer to the README file in this directory for more information. simple: simple.cpp $(CXX) $(INCLUDE) simple.cpp -o simple $(LIB) clean: rm simple tau-2.16.4/examples/shmem/c++/simple.cpp000066400000000000000000000011221062343042700176660ustar00rootroot00000000000000#include #include /* Copyright: This example is taken from the Cray man shmem command on XT3 */ int main(int argc, char **argv) { long source[10] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }; static long target[10]; start_pes(0); target[0] = 0; if (shmem_my_pe() == 0) { /* put 10 words into target on PE 1 */ shmem_long_put(target, source, 10, 1); } shmem_barrier_all(); /* sync sender and receiver */ printf("target[0] on PE %d is %d\n", shmem_my_pe(), target[0]); shmem_finalize(); } tau-2.16.4/examples/shmem/f90/000077500000000000000000000000001062343042700157235ustar00rootroot00000000000000tau-2.16.4/examples/shmem/f90/Makefile000066400000000000000000000003361062343042700173650ustar00rootroot00000000000000include ../../../include/Makefile F90=$(TAU_COMPILER) $(TAU_F90) INCLUDE=$(TAU_SHMEM_INCLUDE) LIB=$(TAU_SHMEM_LIBS) simple: simple.f90 $(F90) $(INCLUDE) simple.f90 -o simple $(LIB) clean: /bin/rm -f simple simple.o tau-2.16.4/examples/shmem/f90/simple.f90000066400000000000000000000012331062343042700175330ustar00rootroot00000000000000 PROGRAM REDUCTION INCLUDE 'shmem.fh' REAL VALUES, SUM COMMON /C/ VALUES REAL WORK CALL START_PES(0) VALUES = SHMEM_MY_PE() CALL SHMEM_BARRIER_ALL ! Synchronize all PEs SUM = 0.0 DO I = 0,SHMEM_N_PES()-1 CALL SHMEM_GET(WORK, VALUES, 1, I) ! Get next value SUM = SUM + WORK ! Sum it ENDDO PRINT*,'PE ',SHMEM_MY_PE(),' COMPUTED SUM=',SUM CALL SHMEM_BARRIER_ALL CALL SHMEM_FINALIZE END tau-2.16.4/examples/sproc/000077500000000000000000000000001062343042700153425ustar00rootroot00000000000000tau-2.16.4/examples/sproc/Makefile000066400000000000000000000026421062343042700170060ustar00rootroot00000000000000#**************************************************************************** #* TAU Portable Profiling Package ** #* http://www.cs.uoregon.edu/research/tau ** #**************************************************************************** #* Copyright 1997 ** #* Department of Computer and Information Science, University of Oregon ** #* Advanced Computing Laboratory, Los Alamos National Laboratory ** #**************************************************************************** ####################################################################### ## pC++/Sage++ Copyright (C) 1993,1995 ## ## Indiana University University of Oregon University of Rennes ## ####################################################################### TAUROOTDIR = ../.. include $(TAUROOTDIR)/include/Makefile CXX = $(TAU_CXX) CC = $(TAU_CC) CFLAGS = $(TAU_INCLUDE) $(TAU_DEFS) LIBS = $(TAU_LIBS) LDFLAGS = $(USER_OPT) MAKEFILE = Makefile PRINT = pr RM = /bin/rm -f TARGET = hello EXTRAOBJS = ############################################## all: $(TARGET) install: $(TARGET) $(TARGET): $(TARGET).o $(CXX) $(LDFLAGS) $(TARGET).o -o $@ $(LIBS) $(TARGET).o : $(TARGET).cpp $(CXX) $(CFLAGS) -c $(TARGET).cpp clean: $(RM) $(TARGET).o $(TARGET) ############################################## tau-2.16.4/examples/sproc/hello.cpp000066400000000000000000000072401062343042700171540ustar00rootroot00000000000000 //Example code showing TAU monitoring a threaded application. //Threading example code updated to include Windows Threads. //Original code by Sameer Shende. #ifdef TAU_DOT_H_LESS_HEADERS #include using namespace std; #else /* TAU_DOT_H_LESS_HEADERS */ #include #endif /* TAU_DOT_H_LESS_HEADERS */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include int GetTid(void) { return RtsLayer::myThread(); } int fourth(void) { TAU_PROFILE("fourth()", "int ()", TAU_DEFAULT); // cout <<"Reached fourth Thread:" << GetTid()<stacklen = 128*1024; usptr_t *arena = usinit("/dev/zero"); if (!arena) cout <<"Arena not initialized!"<bstacksize=0; sginap(40); priv_->pid=sprocsp(threaded_func, PR_SALL, priv_, priv_->sp, priv_->stacklen); if(priv_->pid == -1) { perror("sprocsp ERROR"); return 1; } sginap(40); priv_->pid=sprocsp(threaded_func, PR_SALL, priv_, priv_->sp, priv_->stacklen); if(priv_->pid == -1) { perror("sprocsp ERROR"); return 1; } sginap(40); priv_->pid=sprocsp(threaded_func, PR_SALL, priv_, priv_->sp, priv_->stacklen); if(priv_->pid == -1) { perror("sprocsp ERROR"); return 1; } cout <<"Started Main... tid = "<< GetTid() <] [] ** e.g., % klargest 5000 675 *****************************************************************************/ #include #include #include /* for INT_MIN */ #include #include "decl.h" #define DEFAULT_SIZE 10000 #define DEFAULT_K 4 /* fourth largest element from the array */ #define middle(i) 5*i+2 /* the large array is partitioned into 5 elements each 2, 7, 12 etc. are positions of the middle elements in the array */ int size; /* global - size of the array */ int *M; /* the median array */ /************************************************************************** ** Function : select_kth_largest ** Parameters : k, array of integers S and n - the size of array. ** Description: The SELECT algorithm to find the kth largest element from ** the set of integers S in O(n) time. Used recursively. ** Returns : returns the kth largest element. ***************************************************************************/ int select_kth_largest(int k, int *S, int n) { /* return the kth largest element from the ordered set S of integers */ /* n is the number of elements in S */ /* Algorithm : if n < 50 then sort in dec. order S, return kth largest element in S else divide S into ceil(n/5) sequences of 5 elements each with upto four leftover elements sort in dec order each 5 element sequence let M be the sequence of medians of the 5 element sets m = select_kth_largest(ceil(n(M)/2), M, n/5); let S1, S2 and S3 be the sequences of elements in S greater than, equal to and less than m respectively. if n(S1) >=k then return select_kth_largest(k, S1, n(S1)); else if (n(S1) + n(S2) >= k) then return m else return select_kth_largest (k - n(S1) - n(S2), S3); */ int n_M, n_S1, n_S2, n_S3; /* number of elements in M, S1, S2 and S3 resp. */ int *S1, *S3; /* the other arrays */ int m; /* the median element */ int i, leftover, ret; if (n < 50) return kth_largest_qs(k, S, n); /* Use quicksort to sort the array S and return the kth largest element */ leftover = n % 5; /* upto four leftover elements */ if (leftover != 0) { /* then pad the remaining elements with min. negative values */ for (i=n; i< n + 5 - leftover; i++) S[i] = INT_MIN; /* number of leftover elements */ /* INT_MIN is defined for each system in /usr/include/limits.h */ } /* after padding the remaining array, sort the 5 element sequence */ n_M = ceil(n, 5); /* number of elements in M */ for(i=0; i< n_M; i++) { sort_5elements(&S[5*i]); /* beginning element */ } /* 5 element sequences are sorted */ /* display_array(S, ceil(n,5)*5); */ /* size of padded array is ceil(n,5)*5 */ S1 = (int *) malloc ((3*n/4) * sizeof(int)); /* allocate S1 */ S3 = (int *) malloc ((3*n/4) * sizeof(int)); /* allocate S3 */ if((S1 == (int *) NULL) || (S3 == (int *) NULL)) { perror("S1 or S3 malloc error"); exit(1); } for (i=0; i< n_M; i++) M[i] = S[middle(i)]; /* fill up the median array */ m = select_kth_largest(ceil(n_M,2), M, n_M); /* calculate the median element*/ /* construct S1, S2, and S3 as sequences of elements in S greater than, equal to and less than m. Don't need a separate S2 array. */ /* initialize the count of elements in S1, S2, S3 */ n_S1 = n_S2 = n_S3 = 0; /* go through every element in S */ for (i = 0; i < n; i++) { if(S[i] > m) S1[n_S1++] = S[i]; /* goes to S1 */ else if (S[i] < m) S3[n_S3++] = S[i]; /* goes to S3 */ else n_S2++; /* S2 count incremented goes to S2 */ } /* now we have S1, and S3 */ if(n_S1 >= k) /* S1 has the elements greater than m and there are greater than k elements, so its bound to be in this section */ { /* free memory */ /* don't need S3 */ free(S3); ret = select_kth_largest(k, S1, n_S1); free(S1); /* before returning clean up S1 */ return ret; } else { if(n_S1 + n_S2 >= k) /* its not in S1, but its in S2 */ { /* free memory */ /* don't need S1 and S3 */ free(S1); free(S3); return m; /* the median that we had calculated earlier */ } else /* its in S3 */ { /* free memory */ /* don't need S1 */ free(S1); ret = select_kth_largest(k - n_S1 - n_S2, S3, n_S3); free(S3); /* before returning clean up S3 */ return ret; } } } /************************************************************************** ** Function : interchange ** Parameters : two integer pointers a, and b ** Description: interchanges the contents of a and b. ** Returns : nothing ***************************************************************************/ void interchange(int *a, int *b) { /* interchanges the contents of the two variables containing integers. */ int temp; temp = *a; *a = *b; *b = temp; } /************************************************************************** ** Function : setup ** Parameters : array to be initialized ** Description: assigns values to elements in the array used for finding ** the kth largest element. ** Returns : nothing ***************************************************************************/ void setup(int *arr) { int i; /* setup */ arr[0] = 26; arr[1] = 5; arr[2] = 37; arr[3] = 1; arr[4] = 61; arr[5] = 11; arr[6] = 59; arr[7] = 15; arr[8] = 48; arr[9] = 19; if (size > 10) { for (i=10; i< size; i++) arr[i] = arr[i%10]; } /* Uses the first ten values repeatedly and fills the array */ } /************************************************************************** ** Function : quicksort ** Parameters : array to be sorted and lower and upper limits m and n resp. ** Description: uses quicksort recursively to sort elements in O(nlog n) ** time complexity in decreasing order.. ** Returns : nothing ***************************************************************************/ /* quick sort */ void quicksort(int *arr, int m, int n) { /* sort the array in decreasing order */ int k; /* control key */ int i, j; /* k is chosen as the control key and i and j are chosen such that at any time, arr[l] >= k for l < i and arr[l] <= k for l > j. It is assumed that arr[m] >= arr[n+1] */ /* printf("quicksort %d %d\n [", m, n); for(i=m; i k); /* Decreasing order for largest element first */ do { j = j - 1; } while (arr[j] < k); /* Decreasing order */ if (i < j) interchange(&arr[i], &arr[j]); } while (i < j); interchange(&arr[m], &arr[j]); /* pivot */ quicksort(arr, m, j - 1); /* left portion sorted */ quicksort(arr, j + 1, n); /* right side sorted - so array is sorted */ } /*if */ } /************************************************************************** ** Function : sort_5elements ** Parameters : array of 5 elements to be sorted ** Description: sorts the 5 elements in decreasing order ** Returns : nothing ***************************************************************************/ void sort_5elements(int *arr) { /* sort the first five elements of the array arr */ quicksort(arr, 0, 4); /* could be done by if statements too - but this way its easier to extend it for 7 element based select */ } /************************************************************************** ** Function : kth_largest_qs ** Parameters : k for kth largest, array to be sorted and size of array ** Description: sorts the array using quicksort and finds the kth largest ** element ** Returns : kth largest element ***************************************************************************/ int kth_largest_qs(int k, int *arr, int size) { /* first we sort the array and then return the kth largest element */ quicksort(arr, 0, size - 1); /* sort the array */ return arr[k-1]; /* return the kth largest */ } /************************************************************************** ** Function : display_array ** Parameters : array and size of array ** Description: for debugging, prints contents of the array ** Returns : nothing ***************************************************************************/ void display_array(int *A, int nelems) { int i; for(i=0; i < nelems; i++) { printf("A[%d] = %d\n", i, A[i]); } } /* utility functions */ /************************************************************************** ** Function : floor ** Parameters : numerator and denominator ** Description: calculates the floor of num/den ** Returns : floor ***************************************************************************/ int floor (int num, int den) { return num / den; } /************************************************************************** ** Function : ceil ** Parameters : numerator and denominator ** Description: calculates the ceiling of num/den ** Returns : ceiling ***************************************************************************/ int ceil (int num, int den) { return (num % den > 0) ? (num / den + 1) : (num / den); } /************************************************************************** ** Function : main ** Parameters : command line parameters. ** Description: Usage : main [] [] ** Calculates kth largest element using two different algorithms ** and returns the value and the time statistics for the two. ** Returns : nothing ***************************************************************************/ int main(int argc, char **argv) { int klarge, k; struct timeval tp1, tp2; float time_taken; int *A; /* extract the size of the array and k from the command line parameters */ if (argc > 1) size = atoi(argv[1]); else { size = DEFAULT_SIZE; printf(" Usage : main [] [] \n"); printf(" Calculates kth largest element using two different algorithms\n"); printf(" and returns the value and the time statistics for the two.\n"); } if (argc > 2) k = atoi(argv[2]); /* kth largest */ else k = DEFAULT_K; if (k > size) { printf("ERROR: Please specify a value for k (%d) that is less than the array size (%d)\n", k, size); exit(0); } /* there could be upto 4 leftover elements */ A = (int *) malloc((size + 4) * sizeof(int)); /* allocate the array */ if (A == (int *) NULL) { perror("Cannot malloc the size of array"); exit(1); } M = (int *) malloc(ceil(size,5)*sizeof(int)); /*allocate memory for Median*/ /* its ok to recycle this array so its allocated here instead of doing it in select_kth_largest */ if (M == (int *) NULL) { perror("Cannot malloc M array"); /* its ok to recycle this array so its allocated here instead of doing it in select_kth_largest */ exit(1); } /* setup */ setup(A); /* display_array(A,size); */ gettimeofday(&tp1, NULL); /* timing info. */ klarge = select_kth_largest(k, A, size); /* using SELECT O(n) algo. */ gettimeofday(&tp2, NULL); /* timing info. */ printf("****************************************************\n"); printf("Using select_kth_largest, size %d, %d th largest element = %d\n", size,k, klarge); time_taken = (tp2.tv_sec - tp1.tv_sec) + (tp2.tv_usec - tp1.tv_usec) * 1e-6; printf("Time taken (wall clock) = %f secs\n", time_taken); printf("- - - - - - - - - - - - - - - - - -\n"); /* Now calculate the kth largest element in A using the same array but the "quick and dirty" quicksort O(nlog n) algorithm */ gettimeofday(&tp1, NULL); /* timing info */ klarge = kth_largest_qs(k, A, size); /* calculates the kth largest element of A */ gettimeofday(&tp2, NULL); /* print results */ printf("Using quicksort, size %d, %d th largest element = %d\n", size, k, klarge); time_taken = (tp2.tv_sec - tp1.tv_sec) + (tp2.tv_usec - tp1.tv_usec) * 1e-6; printf("Time taken (wall clock) = %f secs\n", time_taken); /* printf("%d %f\n", size, time_taken); */ } /* EOF klargest.cpp */ tau-2.16.4/examples/taucompiler/c/000077500000000000000000000000001062343042700167625ustar00rootroot00000000000000tau-2.16.4/examples/taucompiler/c/Makefile000066400000000000000000000025461062343042700204310ustar00rootroot00000000000000#**************************************************************************** #* TAU Portable Profiling Package ** #* http://www.cs.uoregon.edu/research/tau ** #**************************************************************************** #* Copyright 1997 ** #* Department of Computer and Information Science, University of Oregon ** #* Advanced Computing Laboratory, Los Alamos National Laboratory ** #**************************************************************************** ####################################################################### ## pC++/Sage++ Copyright (C) 1993,1995 ## ## Indiana University University of Oregon University of Rennes ## ####################################################################### TAUROOTDIR = ../../.. include $(TAUROOTDIR)/include/Makefile CC = $(TAU_COMPILER) $(TAU_CC) MAKEFILE = Makefile PRINT = pr RM = /bin/rm -f TARGET = ring EXTRAOBJS = ############################################## # Original Rules ############################################## all: $(TARGET) $(TARGET): $(TARGET).o $(CC) $(LDFLAGS) $(TARGET).o -o $@ $(LIBS) $(TARGET).o : $(TARGET).c $(CC) $(CFLAGS) -c $(TARGET).c clean: $(RM) $(TARGET) $(TARGET).o $(TARGET).pdb ############################################## tau-2.16.4/examples/taucompiler/c/ring.c000066400000000000000000000015351062343042700200710ustar00rootroot00000000000000#include #include #define SIZE 10 void func(int me, int proc) { int i; int field[SIZE]; MPI_Status status; for (i=0; i #include #include int main (int argc, char *argv[]) { int nthreads, tid; /* Fork a team of threads giving them their own copies of variables */ #pragma omp parallel private(nthreads, tid) { /* Obtain thread number */ tid = omp_get_thread_num(); printf("Hello World from thread = %d\n", tid); /* Only master thread does this */ if (tid == 0) { nthreads = omp_get_num_threads(); printf("Number of threads = %d\n", nthreads); } } /* All threads join master thread and disband */ } tau-2.16.4/examples/taucompiler/opari_f90/000077500000000000000000000000001062343042700203305ustar00rootroot00000000000000tau-2.16.4/examples/taucompiler/opari_f90/Makefile000066400000000000000000000040711062343042700217720ustar00rootroot00000000000000#**************************************************************************** #* TAU Portable Profiling Package ** #* http://www.cs.uoregon.edu/research/tau ** #**************************************************************************** #* Copyright 1997 ** #* Department of Computer and Information Science, University of Oregon ** #* Advanced Computing Laboratory, Los Alamos National Laboratory ** #**************************************************************************** ####################################################################### ## pC++/Sage++ Copyright (C) 1993,1995 ## ## Indiana University University of Oregon University of Rennes ## ####################################################################### TAUROOTDIR = ../../.. include $(TAUROOTDIR)/include/Makefile F90 = $(TAU_COMPILER) -optReset="" $(TAU_F90) CXX = $(TAU_COMPILER) $(TAU_CXX) CC = $(TAU_COMPILER) $(TAU_CC) CFLAGS = FFLAGS = $(TAU_F90_SUFFIX) LIBS = LDFLAGS = $(USER_OPT) MAKEFILE = Makefile RM = /bin/rm -f TARGET = mandel ############################################## all: $(TARGET) install: $(TARGET) $(TARGET): ppm.o $(TARGET).o mytimer.o @echo "*********************************************************" @echo "LINKING: " $(F90) $(LDFLAGS) $(TARGET).o ppm.o mytimer.o -o $@ $(LIBS) $(TARGET).o : $(TARGET).f90 ppm.o @echo "*********************************************************" @echo "Creating $(TARGET).o:" $(F90) $(FFLAGS) -c $< ppm.o : ppm.f90 @echo "*********************************************************" @echo "Creating ppm.o: " $(F90) $(FFLAGS) -c $< -o $@ mytimer.o : mytimer.c @echo "*********************************************************" @echo "Creating mytimer.o:" $(CC) $(CFLAGS) -c $< -o $@ clean: @echo "*********************************************************" @echo "Cleaning... :" $(RM) -r $(TARGET).o $(TARGET) mytimer.o ppm.o *.mod* ############################################## tau-2.16.4/examples/taucompiler/opari_f90/README000066400000000000000000000001431062343042700212060ustar00rootroot00000000000000This example shows how TAU_COMPILER can be used to instrument a program using both Opari and PDT. tau-2.16.4/examples/taucompiler/opari_f90/mandel.f90000066400000000000000000000032261062343042700221130ustar00rootroot00000000000000 program mandel use ppm implicit none integer, parameter :: dp=selected_real_kind(13) complex(kind=dp) :: c, z integer :: ix, iy, cnt integer :: numpe, maxiter integer, parameter :: width=800, height=800 integer, dimension(width,height) :: iterations real(kind=dp) :: xmin, xmax, ymin, ymax, x, y, dx, dy external mytimer !$ integer OMP_GET_NUM_THREADS ! --- init ! -1.5 0.5 -1.0 1.0 ! -.59 -.54 -.58 -.53 ! -.65 -.4 .475 .725 ! -.65 -.5 .575 .725 ! -.59 -.56 .47 .5 write(unit=*, fmt="(A)") "xmin xmax ymin ymax maxiter (Sample: -.59 -.56 .47 .5 216) ?" read (unit=*, fmt=*) xmin, xmax, ymin, ymax, maxiter ! --- initialization dx = (xmax - xmin) / width dy = (ymax - ymin) / height numpe = 1 ! --- calculate mandelbrot set call mytimer(0) !$OMP PARALLEL !$ numpe = OMP_GET_NUM_THREADS() !$OMP DO PRIVATE(ix,x,y,c,z,cnt) do iy=1,height y = ymin + iy*dy do ix=1,width x = xmin + ix*dx c = cmplx(x,y) z = (0.0,0.0) cnt = 0 do z = z*z + c cnt = cnt+1 if ( (dble(z)*dble(z) + aimag(z)*aimag(z)) >= 16 .or. & cnt >= maxiter ) then exit end if end do iterations(ix,iy) = cnt end do end do !$OMP END DO !$OMP END PARALLEL call mytimer(numpe) ! --- generate ppm file write (unit=*, fmt="(A)") "generate ppm file..." call ppmwrite("mandel.ppm", iterations, maxiter) end program mandel tau-2.16.4/examples/taucompiler/opari_f90/mytimer.c000066400000000000000000000012031062343042700221560ustar00rootroot00000000000000#include #include void mytimer_(int* arg) { static struct timeval t1, t2; double elapsed; if (arg && *arg) { /* -- arg contains numpe, stop timing -- */ gettimeofday(&t2, 0); elapsed = (t2.tv_sec - t1.tv_sec) + (t2.tv_usec - t1.tv_usec) * 1.0e-6; fprintf(stdout, "... %6.3f sec on %d pe(s)\n", elapsed, *arg); fflush(stdout); } else { /* -- start timing -- */ fprintf(stdout, "start ...\n"); fflush(stdout); gettimeofday(&t1, 0); } } void mytimer(int* arg) { mytimer_(arg); } void mytimer__(int* arg) { mytimer_(arg); } void MYTIMER(int* arg) { mytimer_(arg); } tau-2.16.4/examples/taucompiler/opari_f90/ppm.f90000066400000000000000000000071631062343042700214530ustar00rootroot00000000000000 module ppm implicit none public :: ppmwrite_ascii, ppmwrite contains subroutine ppmwrite_ascii(fname, iterations, maxiter) character(len=*), intent(in) :: fname integer, dimension(:,:), intent(in) :: iterations integer, intent(in) :: maxiter integer :: width, height integer :: ix, iy, iz, cnt, idx integer, parameter :: maxc = 3 integer, parameter :: maxcols = (maxc+1)*(maxc+1)*(maxc+1) integer, dimension(maxcols,3) :: col real :: factor ! --- initialization width = size(iterations,1) height = size(iterations,2) factor = real(maxiter) / maxcols ! --- generate color map cnt = maxcols do ix=0,maxc do iy=0,maxc do iz=0,maxc col(cnt,1) = ix col(cnt,2) = iy col(cnt,3) = iz cnt = cnt-1 end do end do end do ! --- generate ppm file open(unit=9, file=fname, status="replace", action="write") write(unit=9, fmt="('P3 ', 2i5, i2)") width, height, maxc do iy=1,height do ix=1,width if ( iterations(ix,iy) == maxiter ) then write(unit=9, fmt="(A)") "0 0 0" else idx = iterations(ix,iy) / factor + 1 write(unit=9, fmt="(3i2)") col(idx,1), col(idx,2), col(idx,3) end if end do end do close(unit=9) end subroutine ppmwrite_ascii subroutine ppmwrite(fname, iterations, maxiter) character(len=*), intent(in) :: fname integer, dimension(:,:), intent(in) :: iterations integer, intent(in) :: maxiter integer :: width, height integer :: ix, iy, iz, cnt, idx, b, r, i, total integer, parameter :: maxc = 3, buflen=512 integer, parameter :: maxcols = (maxc+1)*(maxc+1)*(maxc+1) real :: factor character(len=1), dimension(maxcols,3) :: col character(len=buflen) :: buf character(len=20) :: tmpbuf ! --- initialization width = size(iterations,1) height = size(iterations,2) factor = real(maxiter) / maxcols b = 1 total = 0 ! --- generate color map cnt = maxcols do ix=0,maxc do iy=0,maxc do iz=0,maxc col(cnt,1) = char(ix) col(cnt,2) = char(iy) col(cnt,3) = char(iz) cnt = cnt-1 end do end do end do ! --- generate ppm file open(unit=9, file=fname, access="direct", recl=buflen, & action="write", status="replace") write(unit=tmpbuf, fmt="('P6 ', 2i5, i2)") width, height, maxc buf(1:15) = tmpbuf(1:15) buf(16:16) = char(10) b = 17 r = 1 do iy=1,height do ix=1,width total = total + iterations(ix,iy) if ( iterations(ix,iy) == maxiter ) then do i=1,3 buf(b:b) = char(0) b = b+1 if ( b > buflen ) then write(unit=9, rec=r) buf b = 1 r = r+1 endif enddo else idx = iterations(ix,iy) / factor + 1 do i=1,3 buf(b:b) = col(idx,i) b = b+1 if ( b > buflen ) then write(unit=9, rec=r) buf b = 1 r = r+1 endif end do end if end do end do write(unit=9, rec=r) buf close(unit=9) ! write (unit=*, fmt="(I A)") total, " total iterations" end subroutine ppmwrite end module ppm tau-2.16.4/examples/tauex/000077500000000000000000000000001062343042700153425ustar00rootroot00000000000000tau-2.16.4/examples/tauex/f90/000077500000000000000000000000001062343042700157405ustar00rootroot00000000000000tau-2.16.4/examples/tauex/f90/Makefile000066400000000000000000000022441062343042700174020ustar00rootroot00000000000000#**************************************************************************** #* TAU Portable Profiling Package ** #* http://www.cs.uoregon.edu/research/tau ** #**************************************************************************** #* Copyright 2004 ** #* Department of Computer and Information Science, University of Oregon ** #* Advanced Computing Laboratory, Los Alamos National Laboratory ** #**************************************************************************** # Use gmake to build ring TAUROOTDIR = ../../.. .SUFFIXES : .f90 include $(TAUROOTDIR)/include/Makefile # We use TAU_COMPILER (defined in the above stub Makefile) for instrumenting # the source code. We can pass it optional arguments. See tau_compiler.sh -help OPTS = -optVerbose -optShared -optCompile=$(TAU_F90_SUFFIX) F90=$(TAU_COMPILER) $(OPTS) $(TAU_F90) LIBS= INCLUDE= OBJS= ring.o ring: $(OBJS) $(F90) $(OBJS) -o ring $(LIBS) .f90.o: echo "Building $@ from $<" $(F90) -c $(INCLUDE) $< -o $@ clean: /bin/rm -f ring.o ring *.pdb profile.* tau-2.16.4/examples/tauex/f90/README000066400000000000000000000015421062343042700166220ustar00rootroot00000000000000 tauex README ------------ Configure several TAU libraries: export BASE="-pdt=/usr/local/packages/pdtoolkit-3.9 -cc=icc -c++=icpc -fortran=intel -mpiinc=/usr/local/packages/mpich2-1.0.4p1/gnu-3.4.6/include -mpilib=/usr/local/packages/mpich2-1.0.4p1/gnu-3.4.6/lib -MULTIPLECOUNTERS -papi=/usr/local/packages/papi" ./configure $BASE -PROFILE make clean install -j ./configure $BASE -TRACE make clean install -j ./configure $BASE -PROFILE -TRACE make clean install -j ./configure $BASE -PROFILECALLPATH make clean install -j Example 1: 1) go to examples/tauex/f90 2) make 3) run with tauex: mpirun -np 4 tauex -T MPI -- ./ring mpirun -np 4 tauex -T MPI,CALLPATH -- ./ring mpirun -np 4 tauex -T MPI,TRACE -- ./ring mpirun -np 4 tauex -e PAPI_FP_OPS -e PAPI_L1_DCM -T MPI -- ./ring mpirun -np 4 tauex -e PAPI_FP_OPS -e PAPI_L1_DCM -T MPI,TRACE -- ./ring tau-2.16.4/examples/tauex/f90/ring.f90000066400000000000000000000021761062343042700172250ustar00rootroot00000000000000 SUBROUTINE FUNC(me, proc) INCLUDE 'mpif.h' INTEGER i, proc, me, err INTEGER f(10) INTEGER s(MPI_STATUS_SIZE) WRITE(*,*) me, 'started.' DO I=1,10 f(i) = i ENDDO CALL MPI_Barrier(MPI_COMM_WORLD, err) IF (me .EQ. 0) THEN CALL MPI_Send(f, 10, MPI_INTEGER, 1, 42, MPI_COMM_WORLD, err) CALL MPI_Recv(f, 10, MPI_INTEGER, proc-1, 42, MPI_COMM_WORLD, s, err) ELSE CALL MPI_Recv(f, 10, MPI_INTEGER, me-1, 42, MPI_COMM_WORLD, s, err) IF (me .EQ. proc-1) THEN CALL MPI_Send(f, 10, MPI_INTEGER, 0, 42, MPI_COMM_WORLD, err) ELSE CALL MPI_Send(f, 10, MPI_INTEGER, me+1, 42, MPI_COMM_WORLD, err) ENDIF ENDIF CALL MPI_Bcast (f, 10, MPI_INTEGER, 0, MPI_COMM_WORLD, err) WRITE(*,*) me, 'done.' RETURN END SUBROUTINE FUNC PROGRAM main INCLUDE 'mpif.h' INTEGER i, proc, me, err CALL MPI_Init (err) CALL MPI_Comm_size (MPI_COMM_WORLD, proc, err) CALL MPI_Comm_rank (MPI_COMM_WORLD, me, err) CALL FUNC(me, proc) CALL MPI_Finalize (err) END tau-2.16.4/examples/taututorial/000077500000000000000000000000001062343042700165715ustar00rootroot00000000000000tau-2.16.4/examples/taututorial/Makefile000066400000000000000000000010731062343042700202320ustar00rootroot00000000000000CXX=tau_cxx.sh # IMPORTANT NOTE: The //bin directory should be in your path. # Please set TAU_MAKEFILE environment variable to point to your stub Makefile # that is typically found in //lib/Makefile.tau- # You may also pass parameters to the above script by setting the environment # variable TAU_OPTIONS. Please see tau_compiler.sh -help for a full listing # and refer to the README file in this directory for more information. computePi: computePi.cpp $(CXX) $(INCLUDE) computePi.cpp -o computePi $(LIB) clean: rm computePi tau-2.16.4/examples/taututorial/Makefile.tau_compiler000066400000000000000000000002631062343042700227140ustar00rootroot00000000000000include ../../include/Makefile CXX=$(TAU_COMPILER) $(TAU_CXX) INCLUDE= LIB= computePi: computePi.cpp $(CXX) $(INCLUDE) computePi.cpp -o computePi $(LIB) clean: rm computePi tau-2.16.4/examples/taututorial/README000066400000000000000000000054651062343042700174630ustar00rootroot00000000000000This tutorial example is documented in the TAU homepage. TAU provides shell scripts tau_cxx.sh, tau_f90.sh and tau_cc.sh for C++,F90 and C compilers. These are typically installed in //bin directory. You may replace the compiler in your Makefiles with these scripts. These scripts may also be used on the command line. Each configuration of TAU has a stub makefile associated with it. For instance, tau-2.x/ibm64/lib/Makefile.tau-mpi-pdt This makefile specifies the measurement components that have been configured with it. In this case it shows that TAU's MPI wrapper interposition library and PDT have been configured. You need to set the environment variable: TAU_MAKEFILE to point to this stub makefile. You can also pass arguments to the four stages of compilation using the environment variable TAU_OPTIONS. For a complete list of options that tau_compiler.sh takes (these scripts invoke tau_compiler.sh) please see % tau_compiler.sh -help To keep intermediate files, turn on the verbose mode and use a selective instrumentation file select.tau, we can set: % set path=($path //bin) % setenv TAU_MAKEFILE //lib/Makefile.tau-mpi-pdt % setenv TAU_OPTIONS '-optKeepFiles -optVerbose -optTauSelectFile="select.tau"' and then use: % tau_f90.sh foo.f90 -o foo to compiler foo.f90 and create an executable called foo. or in this case, % tau_cxx.sh computePi.cpp -o computePi TAU also has an environment variable TAU_THROTTLE which may be turned on to enable runtime throttling of events that are lightweight. TAU uses a default rule of numcalls > 100000 && usecs/call < 10 which means that if a function executes greater than 100000 times and has an inclusive time per call of less than 10 microseconds, that function will be disabled after that threshold is reached. To change the values of numcalls and usecs/call the user may optionally set environment variables: % setenv TAU_THROTTLE 1 % setenv TAU_THROTTLE_NUMCALLS 2000000 % setenv TAU_THROTTLE_PERCALL 5 to change the values to 2 million and 5 microseconds per call. Throttling is disabled by default and will not take effect unless the TAU_THROTTLE environment variable is set to some value. Instead of using the shell scripts tau_f90.sh, tau_cxx.sh and tau_cc.sh, the user may directly invoke the tau_compiler.sh shell script by first including the TAU stub makefile and then using a prefix $(TAU_COMPILER) for the name of the compiler. For e.g., include //lib/Makefile.tau-mpi-pdt F90 = $(TAU_COMPILER) mpxlf90_r or include //lib/Makefile.tau-mpi-pdt OPTIONS = '-optVerbose -optTauSelectFile="select.tau"' CXX = $(TAU_COMPILER) $(OPTIONS) icpc The /include/Makefile always points to the last configured version of TAU. To see all configurations, please refer to the /.all_configs file. tau-2.16.4/examples/taututorial/computePi.cpp000066400000000000000000000075351062343042700212540ustar00rootroot00000000000000#include #include #include #include // This example is adapted from "Using MPI, second edition" // by Gropp, Lusk, and Skellum void initialize( int argc, char* argv[] ) { MPI_Init( &argc, &argv ); } void identifyRankAndSize( int& rank, int& size, MPI_Comm comm ) { MPI_Comm_rank( comm, &rank ); MPI_Comm_size( comm, &size); } void constructWorkerCommGroup( MPI_Comm& workerComm, int size ) { // construct the world group MPI_Group worldGroup; MPI_Comm_group( MPI_COMM_WORLD, &worldGroup ); // construct the worker group MPI_Group workerGroup; int ranks[1]; ranks[0] = size - 1; // exclude the server MPI_Group_excl( worldGroup, 1, ranks, &workerGroup ); MPI_Comm_create( MPI_COMM_WORLD, workerGroup, &workerComm ); MPI_Group_free( &worldGroup ); MPI_Group_free( &workerGroup ); } int computeRandom() { return random(); } void runServer( ) { const int numRands = 1000; int* rands = new int[ numRands ]; MPI_Request request; const int c_fin = 0; const int c_req = 1; const int c_rep = 2; do { MPI_Status status; MPI_Recv( &request, 1, MPI_INT, MPI_ANY_SOURCE, c_req, MPI_COMM_WORLD, &status ); if ( request ) { for ( int i = 0; i < numRands; ) { rands[i] = computeRandom(); if ( rands[i] <= INT_MAX ) ++i; } MPI_Send( rands, numRands, MPI_INT, status.MPI_SOURCE, c_rep, MPI_COMM_WORLD ); } } while ( request > 0 ); delete[] rands; } double runWorker( MPI_Comm& workerComm, int rank, int size) { const int numRands = 1000; int* rands = new int[ numRands ]; // request constants const int c_fin = 0; const int c_req = 1; const int c_rep = 2; double x; double y; bool notDone = true; int in = 0; int out = 0; int totalin = 0; int totalout = 0; double epsilon = 0.00000001; double error; double Pi; int request = c_req; int server = size - 1; MPI_Status status; MPI_Send( &request, 1, MPI_INT, server, c_req, MPI_COMM_WORLD ); while ( notDone ) { MPI_Recv( rands, numRands, MPI_INT, MPI_ANY_SOURCE, c_rep, MPI_COMM_WORLD, &status ); for ( int i = 0; i < numRands; ) { x = (((double)(rands[i++]))/(double)(INT_MAX)) * 2 - 1; y = (((double)(rands[i++]))/(double)(INT_MAX)) * 2 - 1; if (( x*x + y*y ) < 1.0 ) ++in; else ++out; } MPI_Allreduce(&in, &totalin, 1, MPI_INT, MPI_SUM, workerComm ); MPI_Allreduce(&out, &totalout, 1, MPI_INT, MPI_SUM, workerComm ); Pi = (4.0 * totalin) / ( totalin + totalout ); error = fabs( Pi - 3.141592653589793238462643 ); notDone = ( (error > epsilon) && (totalin + totalout) < 10000000 ); if ( rank == 0 && !notDone ) { request = c_fin; MPI_Send( &request, 1, MPI_INT, server, c_req, MPI_COMM_WORLD ); } else { request = c_req; if ( notDone ) { MPI_Send( &request, 1, MPI_INT, server, c_req, MPI_COMM_WORLD ); } } } MPI_Comm_free( &workerComm ); delete[] rands; return Pi; } int main( int argc, char* argv[] ) { initialize( argc, argv ); int myRank; int worldSize; identifyRankAndSize( myRank, worldSize, MPI_COMM_WORLD ); MPI_Comm workerComm; constructWorkerCommGroup( workerComm, worldSize ); double pi; if ( myRank == worldSize - 1 ) { runServer(); } else { pi = runWorker( workerComm, myRank, worldSize ); } if (myRank == 0 ) { std::cout << "Pi is " << pi << std::endl; } MPI_Finalize(); } tau-2.16.4/examples/threads/000077500000000000000000000000001062343042700156465ustar00rootroot00000000000000tau-2.16.4/examples/threads/Makefile000066400000000000000000000026531062343042700173140ustar00rootroot00000000000000#**************************************************************************** #* TAU Portable Profiling Package ** #* http://www.cs.uoregon.edu/research/tau ** #**************************************************************************** #* Copyright 1997 ** #* Department of Computer and Information Science, University of Oregon ** #* Advanced Computing Laboratory, Los Alamos National Laboratory ** #**************************************************************************** ####################################################################### ## pC++/Sage++ Copyright (C) 1993,1995 ## ## Indiana University University of Oregon University of Rennes ## ####################################################################### TAUROOTDIR = ../.. include $(TAUROOTDIR)/include/Makefile CXX = $(TAU_CXX) CC = $(TAU_CC) CFLAGS = $(TAU_INCLUDE) $(TAU_DEFS) LIBS = $(TAU_LIBS) -lpthread LDFLAGS = $(USER_OPT) MAKEFILE = Makefile PRINT = pr RM = /bin/rm -f TARGET = hello EXTRAOBJS = ############################################## all: $(TARGET) install: $(TARGET) $(TARGET): $(TARGET).o $(CXX) $(LDFLAGS) $(TARGET).o -o $@ $(LIBS) $(TARGET).o : $(TARGET).cpp $(CXX) $(CFLAGS) -c $(TARGET).cpp clean: $(RM) $(TARGET).o $(TARGET) ############################################## tau-2.16.4/examples/threads/hello.cpp000066400000000000000000000066501062343042700174640ustar00rootroot00000000000000 //Example code showing TAU monitoring a threaded application. //Threading example code updated to include Windows Threads. //October 1999 ... Robert Ansell-Bell. //Original code by Sameer Shende. #ifdef TAU_DOT_H_LESS_HEADERS #include using namespace std; #else /* TAU_DOT_H_LESS_HEADERS */ #include #endif /* TAU_DOT_H_LESS_HEADERS */ #if (!defined(TAU_WINDOWS)) #include #include #include #endif //TAU_WINDOWS #include #ifdef TAU_WINDOWS #include #endif //TAU_WINDOWS #include TAU_REGISTER_EVENT(iters, "Number of Iterates"); TAU_REGISTER_EVENT(mem, "Memory allocated by arrays"); int fourth(void) { TAU_PROFILE("fourth()", "int ()", TAU_DEFAULT); TAU_EVENT(iters, 1); cout <<"Reached fourth " << endl; return 0; } int third(void) { TAU_PROFILE("third()", "int ()", TAU_DEFAULT); cout <<"third calling fourth " < #include #include #include using namespace std; int debugPrint = 1; #define dprintf if (debugPrint) printf /* implementation of callback routines */ map< pair, int, less< pair > > EOF_Trace; int EndOfTrace = 0; /* false */ /* implementation of callback routines */ int EnterState(void *userData, double time, unsigned int nodeid, unsigned int tid, unsigned int stateid) { dprintf("Entered state %d time %g nid %d tid %d\n", stateid, time, nodeid, tid); return 0; } int LeaveState(void *userData, double time, unsigned int nid, unsigned int tid, unsigned int stateid) { dprintf("Leaving state %d time %g nid %d tid %d\n", stateid, time, nid, tid); return 0; } int ClockPeriod( void* userData, double clkPeriod ) { dprintf("Clock period %g\n", clkPeriod); return 0; } int DefThread(void *userData, unsigned int nodeToken, unsigned int threadToken, const char *threadName ) { dprintf("DefThread nid %d tid %d, thread name %s\n", nodeToken, threadToken, threadName); EOF_Trace[pair (nodeToken,threadToken) ] = 0; /* initialize it */ return 0; } int EndTrace( void *userData, unsigned int nodeToken, unsigned int threadToken) { dprintf("EndTrace nid %d tid %d\n", nodeToken, threadToken); EOF_Trace[pair (nodeToken,threadToken) ] = 1; /* flag it as over */ /* yes, it is over */ map < pair, int, less< pair > >::iterator it; EndOfTrace = 1; /* Lets assume that it is over */ for (it = EOF_Trace.begin(); it != EOF_Trace.end(); it++) { /* cycle through all pairs to see if it really over */ if ((*it).second == 0) { EndOfTrace = 0; /* not over! */ /* If there's any processor that is not over, then the trace is not over */ } } return 0; } int DefStateGroup( void *userData, unsigned int stateGroupToken, const char *stateGroupName ) { dprintf("StateGroup groupid %d, group name %s\n", stateGroupToken, stateGroupName); return 0; } int DefState( void *userData, unsigned int stateToken, const char *stateName, unsigned int stateGroupToken ) { dprintf("DefState stateid %d stateName %s stategroup id %d\n", stateToken, stateName, stateGroupToken); return 0; } int DefUserEvent( void *userData, unsigned int userEventToken, const char *userEventName, int monotonicallyIncreasing ) { dprintf("DefUserEvent event id %d user event name %s, monotonically increasing = %d\n", userEventToken, userEventName, monotonicallyIncreasing); return 0; } int EventTrigger( void *userData, double time, unsigned int nodeToken, unsigned int threadToken, unsigned int userEventToken, long long userEventValue) { dprintf("EventTrigger: time %g, nid %d tid %d event id %d triggered value %lld \n", time, nodeToken, threadToken, userEventToken, userEventValue); return 0; } int SendMessage( void *userData, double time, unsigned int sourceNodeToken, unsigned int sourceThreadToken, unsigned int destinationNodeToken, unsigned int destinationThreadToken, unsigned int messageSize, unsigned int messageTag, unsigned int messageComm ) { dprintf("SendMessage: time %g, source nid %d tid %d, destination nid %d tid %d, size %d, tag %d\n", time, sourceNodeToken, sourceThreadToken, destinationNodeToken, destinationThreadToken, messageSize, messageTag); return 0; } int RecvMessage( void *userData, double time, unsigned int sourceNodeToken, unsigned int sourceThreadToken, unsigned int destinationNodeToken, unsigned int destinationThreadToken, unsigned int messageSize, unsigned int messageTag, unsigned int messageComm ) { dprintf("RecvMessage: time %g, source nid %d tid %d, destination nid %d tid %d, size %d, tag %d\n", time, sourceNodeToken, sourceThreadToken, destinationNodeToken, destinationThreadToken, messageSize, messageTag); return 0; } int main(int argc, char **argv) { Ttf_FileHandleT fh; int recs_read, pos; char *trace_file; char *edf_file; int no_state_flag=0, no_message_flag=0; /* main program: Usage app [-nostate] [-nomessage] */ if (argc < 3) { printf("Usage: %s [-nostate] [-nomessage]\n", argv[0]); exit(1); } for (int i = 0; i < argc ; i++) { switch(i) { case 0: trace_file = argv[1]; break; case 1: edf_file = argv[2]; break; default: if (strcmp(argv[i], "-nostate")==0) { no_state_flag = 1; } if (strcmp(argv[i], "-nomessage")==0) { no_message_flag = 1; } break; } } fh = Ttf_OpenFileForInput( argv[1], argv[2]); if (!fh) { printf("ERROR:Ttf_OpenFileForInput fails"); exit(1); } Ttf_CallbacksT cb; /* Fill the callback struct */ cb.UserData = 0; cb.DefClkPeriod = ClockPeriod; cb.DefThread = DefThread; cb.DefStateGroup = DefStateGroup; cb.DefState = DefState; cb.DefUserEvent = DefUserEvent; cb.EventTrigger = EventTrigger; cb.EndTrace = EndTrace; /* should state transitions be displayed? */ if (no_state_flag) { cb.EnterState = 0; cb.LeaveState = 0; } else { cb.EnterState = EnterState; cb.LeaveState = LeaveState; } /* should messages be displayed? */ if (no_message_flag) { cb.SendMessage = 0; cb.RecvMessage = 0; } else { cb.SendMessage = SendMessage; cb.RecvMessage = RecvMessage; } /* Go through each record until the end of the trace file */ do { recs_read = Ttf_ReadNumEvents(fh,cb, 1024); if (recs_read != 0) cout <<"Read "<=0) && (!EndOfTrace)); Ttf_CloseFile(fh); return 0; } tau-2.16.4/examples/traceinput/c/000077500000000000000000000000001062343042700166145ustar00rootroot00000000000000tau-2.16.4/examples/traceinput/c/Makefile000066400000000000000000000026661062343042700202660ustar00rootroot00000000000000#**************************************************************************** #* TAU Portable Profiling Package ** #* http://www.cs.uoregon.edu/research/tau ** #**************************************************************************** #* Copyright 1997 ** #* Department of Computer and Information Science, University of Oregon ** #* Advanced Computing Laboratory, Los Alamos National Laboratory ** #**************************************************************************** ####################################################################### ## pC++/Sage++ Copyright (C) 1993,1995 ## ## Indiana University University of Oregon University of Rennes ## ####################################################################### TAUROOTDIR = ../../.. include $(TAUROOTDIR)/include/Makefile CXX = $(TAU_CXX) CC = $(TAU_CC) CFLAGS = $(TAU_INCLUDE) $(TAU_DEFS) -UTAU_MPI LIBS = $(TAU_TRACE_INPUT_LIB) LDFLAGS = $(USER_OPT) MAKEFILE = Makefile PRINT = pr RM = /bin/rm -f TARGET = tau_reader EXTRAOBJS = ############################################## all: $(TARGET) install: $(TARGET) $(TARGET): $(TARGET).o $(CXX) $(LDFLAGS) $(TARGET).o -o $@ $(LIBS) $(TARGET).o : $(TARGET).c $(CC) $(CFLAGS) -c $(TARGET).c clean: $(RM) $(TARGET).o $(TARGET) ############################################## tau-2.16.4/examples/traceinput/c/tau_reader.c000066400000000000000000000131641062343042700211000ustar00rootroot00000000000000/**************************************************************************** ** TAU Portable Profiling Package ** ** http://www.cs.uoregon.edu/research/paracomp/tau ** ***************************************************************************** ** Copyright 2003 ** ** Department of Computer and Information Science, University of Oregon ** ** Advanced Computing Laboratory, Los Alamos National Laboratory ** ** Research Center Juelich, Germany ** ****************************************************************************/ /*************************************************************************** ** File : app.c ** ** Description : TAU trace format reader application (uses C API)** ** Author : Sameer Shende ** ** Contact : sameer@cs.uoregon.edu ** ***************************************************************************/ #include #include /* implementation of callback routines */ int EnterState(void *userData, double time, unsigned int nodeid, unsigned int tid, unsigned int stateid) { printf("Entered state %d time %g nid %d tid %d\n", stateid, time, nodeid, tid); return 0; } int LeaveState(void *userData, double time, unsigned int nid, unsigned int tid, unsigned int stateid) { printf("Leaving state %d time %g nid %d tid %d\n", stateid, time, nid, tid); return 0; } int ClockPeriod( void* userData, double clkPeriod ) { printf("Clock period %g\n", clkPeriod); return 0; } int DefThread(void *userData, unsigned int nodeid, unsigned int threadToken, const char *threadName ) { printf("DefThread nid %d tid %d, thread name %s\n", nodeid, threadToken, threadName); return 0; } int EndTrace( void *userData, unsigned int nodeid, unsigned int threadid) { printf("EndTrace nid %d tid %d\n", nodeid, threadid); return 0; } int DefStateGroup( void *userData, unsigned int stateGroupToken, const char *stateGroupName ) { printf("StateGroup groupid %d, group name %s\n", stateGroupToken, stateGroupName); return 0; } int DefState( void *userData, unsigned int stateToken, const char *stateName, unsigned int stateGroupToken ) { printf("DefState stateid %d stateName %s stategroup id %d\n", stateToken, stateName, stateGroupToken); return 0; } int DefUserEvent( void *userData, unsigned int userEventToken, const char *userEventName, int monotonicallyIncreasing ) { printf("DefUserEvent event id %d user event name %s, monotonically increasing = %d\n", userEventToken, userEventName, monotonicallyIncreasing); return 0; } int EventTrigger( void *userData, double time, unsigned int nodeToken, unsigned int threadToken, unsigned int userEventToken, long long userEventValue) { printf("EventTrigger: time %g, nid %d tid %d event id %d triggered value %lld \n", time, nodeToken, threadToken, userEventToken, userEventValue); return 0; } int SendMessage ( void* userData, double time, unsigned int sourceNodeToken, unsigned int sourceThreadToken, unsigned int destinationNodeToken, unsigned int destinationThreadToken, unsigned int messageSize, unsigned int messageTag, unsigned int messageComm ) { printf("Message Send: time %g, nid %d, tid %d dest nid %d dest tid %d messageSize %d messageComm %d messageTag %lld \n", time, sourceNodeToken, sourceThreadToken, destinationNodeToken, destinationThreadToken, messageSize, messageComm, messageTag); return 0; } int RecvMessage ( void* userData, double time, unsigned int sourceNodeToken, unsigned int sourceThreadToken, unsigned int destinationNodeToken, unsigned int destinationThreadToken, unsigned int messageSize, unsigned int messageTag, unsigned int messageComm ) { printf("Message Recv: time %g, nid %d, tid %d dest nid %d dest tid %d messageSize %d messageComm %d messageTag %lld \n", time, sourceNodeToken, sourceThreadToken, destinationNodeToken, destinationThreadToken, messageSize, messageComm, messageTag); return 0; } /* Reader module */ int main(int argc, char **argv) { Ttf_FileHandleT fh; int recs_read, pos; Ttf_CallbacksT cb; /* main program: Usage app */ if (argc != 3) { printf("Usage: %s \n", argv[0]); exit(1); } /* open trace file */ fh = Ttf_OpenFileForInput( argv[1], argv[2]); if (!fh) { printf("ERROR:Ttf_OpenFileForInput fails"); exit(1); } /* Fill the callback struct */ cb.UserData = 0; cb.DefClkPeriod = ClockPeriod; cb.DefThread = DefThread; cb.DefStateGroup = DefStateGroup; cb.DefState = DefState; cb.EndTrace = EndTrace; cb.EnterState = EnterState; cb.LeaveState = LeaveState; cb.DefUserEvent = DefUserEvent; cb.EventTrigger = EventTrigger; cb.SendMessage = SendMessage; cb.RecvMessage = RecvMessage; pos = Ttf_RelSeek(fh,2); printf("Position returned %d\n", pos); recs_read = Ttf_ReadNumEvents(fh, cb, 4); printf("Read %d records\n", recs_read); recs_read = Ttf_ReadNumEvents(fh, cb, 100); printf("Read %d records\n", recs_read); Ttf_CloseFile(fh); return 0; } /*************************************************************************** * $RCSfile: tau_reader.c,v $ $Author: scottb $ * $Revision: 1.5 $ $Date: 2006/09/22 18:15:20 $ * TAU_VERSION_ID: $Id: tau_reader.c,v 1.5 2006/09/22 18:15:20 scottb Exp $ ***************************************************************************/ tau-2.16.4/examples/tracewriter/000077500000000000000000000000001062343042700165475ustar00rootroot00000000000000tau-2.16.4/examples/tracewriter/Makefile000066400000000000000000000026731062343042700202170ustar00rootroot00000000000000#**************************************************************************** #* TAU Portable Profiling Package ** #* http://www.cs.uoregon.edu/research/tau ** #**************************************************************************** #* Copyright 1997 ** #* Department of Computer and Information Science, University of Oregon ** #* Advanced Computing Laboratory, Los Alamos National Laboratory ** #**************************************************************************** ####################################################################### ## pC++/Sage++ Copyright (C) 1993,1995 ## ## Indiana University University of Oregon University of Rennes ## ####################################################################### TAUROOTDIR = ../.. include $(TAUROOTDIR)/include/Makefile CXX = $(TAU_CXX) CC = $(TAU_CC) CFLAGS = $(TAU_INCLUDE) $(TAU_DEFS) -UTAU_MPI -g LIBS = $(TAU_TRACE_INPUT_LIB) LDFLAGS = $(USER_OPT) MAKEFILE = Makefile PRINT = pr RM = /bin/rm -f TARGET = tau_writer EXTRAOBJS = ############################################## all: $(TARGET) install: $(TARGET) $(TARGET): $(TARGET).o $(CXX) $(LDFLAGS) $(TARGET).o -o $@ $(LIBS) $(TARGET).o : $(TARGET).cpp $(CXX) $(CFLAGS) -c $(TARGET).cpp clean: $(RM) $(TARGET).o $(TARGET) ############################################## tau-2.16.4/examples/tracewriter/tau_writer.cpp000066400000000000000000000030721062343042700214420ustar00rootroot00000000000000#include #include #define MAIN 1 #define FOO 2 #define BAR 3 #define USER_EVENT_1 4 int main(int argc, char** argv) { printf ("Begin!\n"); Ttf_FileHandleT file; file = Ttf_OpenFileForOutput("tau.trc","tau.edf"); if (file == NULL) { fprintf (stderr, "Error openging trace for output\n"); return -1; } Ttf_DefThread(file, 0, 0, "node 0"); Ttf_DefThread(file, 1, 0, "node 1"); Ttf_DefStateGroup(file, "TAU_DEFAULT", 1); Ttf_DefState(file, MAIN, "main", 1); Ttf_DefState(file, FOO, "foo", 1); Ttf_DefState(file, BAR, "bar", 1); Ttf_DefUserEvent(file, USER_EVENT_1, "User Event 1", 1); long long s = 1e6; Ttf_EnterState(file, 1*s, 0, 0, MAIN); Ttf_EnterState(file, 2*s, 0, 0, FOO); Ttf_EnterState(file, 3*s, 0, 0, BAR); Ttf_EventTrigger(file, 3.1*s, 0, 0, USER_EVENT_1, 500); Ttf_EventTrigger(file, 3.9*s, 0, 0, USER_EVENT_1, 1000); Ttf_EnterState(file, 4*s, 1, 0, MAIN); Ttf_SendMessage(file, 4.5*s, 1, 0, // from 1,0 0, 0, // to 0,0 500, // length 42, // tag 0); // communicator Ttf_EnterState(file, 5*s, 1, 0, FOO); Ttf_EnterState(file, 6*s, 1, 0, BAR); Ttf_LeaveState(file, 7*s, 1, 0, BAR); Ttf_LeaveState(file, 8*s, 1, 0, FOO); Ttf_LeaveState(file, 9*s, 1, 0, MAIN); Ttf_LeaveState(file, 10*s, 0, 0, BAR); Ttf_RecvMessage(file, 10.5*s, 1, 0, // from 1,0 0, 0, // to 0,0 500, // length 42, // tag 0); // communicator Ttf_LeaveState(file, 11*s, 0, 0, FOO); Ttf_LeaveState(file, 12*s, 0, 0, MAIN); Ttf_CloseOutputFile(file); return 0; } tau-2.16.4/examples/userevent/000077500000000000000000000000001062343042700162345ustar00rootroot00000000000000tau-2.16.4/examples/userevent/Makefile000066400000000000000000000026401062343042700176760ustar00rootroot00000000000000#**************************************************************************** #* TAU Portable Profiling Package ** #* http://www.cs.uoregon.edu/research/tau ** #**************************************************************************** #* Copyright 1997 ** #* Department of Computer and Information Science, University of Oregon ** #* Advanced Computing Laboratory, Los Alamos National Laboratory ** #**************************************************************************** ####################################################################### ## pC++/Sage++ Copyright (C) 1993,1995 ## ## Indiana University University of Oregon University of Rennes ## ####################################################################### TAUROOTDIR = ../.. include $(TAUROOTDIR)/include/Makefile CXX = $(TAU_CXX) CC = $(TAU_CC) CFLAGS = $(TAU_INCLUDE) $(TAU_DEFS) LIBS = $(TAU_LIBS) LDFLAGS = $(USER_OPT) MAKEFILE = Makefile PRINT = pr RM = /bin/rm -f TARGET = simple EXTRAOBJS = ############################################## all: $(TARGET) install: $(TARGET) $(TARGET): $(TARGET).o $(CXX) $(LDFLAGS) $(TARGET).o -o $@ $(LIBS) $(TARGET).o : $(TARGET).cpp $(CXX) $(CFLAGS) -c $(TARGET).cpp clean: $(RM) $(TARGET).o $(TARGET) ############################################## tau-2.16.4/examples/userevent/simple.cpp000066400000000000000000000027121062343042700202330ustar00rootroot00000000000000/* This program illustrates the use of TAU_REGISTER_CONTEXT_EVENT and TAU_CONTEXT_EVENT calls to track a user defined event associated with the executing context or callpath. You can enable or disable the tracking of context at runtime */ #include #include #include int f1(); int f2(); int f3(); int f4(); int f5(); int f1(void) { TAU_PROFILE("f1()", "(sleeps 1 sec, calls f2, f4)", TAU_USER); printf("Inside f1: sleeps 1 sec, calls f2, f4\n"); sleep(1); f2(); f4(); return 0; } int f2(void) { static int count = 0; count ++; TAU_PROFILE("f2()", "(sleeps 2 sec, calls f3)", TAU_USER); TAU_REGISTER_CONTEXT_EVENT(event, "Iteration count"); /* if (count == 2) TAU_DISABLE_CONTEXT_EVENT(event); */ printf("Inside f2: sleeps 2 sec, calls f3\n"); TAU_CONTEXT_EVENT(event, 232+count); sleep(2); f3(); return 0; } int f3(void) { TAU_PROFILE("f3()", "(sleeps 3 sec)", TAU_USER); printf("Inside f3: sleeps 3 sec\n"); sleep(3); return 0; } int f4(void) { TAU_PROFILE("f4()", "(sleeps 4 sec, calls f2)", TAU_USER); printf("Inside f4: sleeps 4 sec, calls f2\n"); sleep(4); f2(); return 0; } int f5(void) { TAU_PROFILE("f5()", "(sleeps 5 sec)", TAU_USER); printf("Inside f5: sleeps 5 sec\n"); sleep(5); return 0; } int main(int argc, char **argv) { TAU_PROFILE("main()", "(calls f1, f5)", TAU_DEFAULT); TAU_PROFILE_SET_NODE(0); printf("Inside main: calls f1, f5\n"); f1(); f5(); } tau-2.16.4/examples/validate/000077500000000000000000000000001062343042700160055ustar00rootroot00000000000000tau-2.16.4/examples/validate/c/000077500000000000000000000000001062343042700162275ustar00rootroot00000000000000tau-2.16.4/examples/validate/c/Makefile000066400000000000000000000011471062343042700176720ustar00rootroot00000000000000include $(TAU_TEST_MAKEFILE) CXX = $(TAU_CXX) CC = $(TAU_CC) CFLAGS = $(TAU_INCLUDE) $(TAU_DEFS) LIBS = $(TAU_LIBS) $(LEXTRA) $(LEXTRA1) LDFLAGS = $(USER_OPT) RM = /bin/rm -f TARGET = simple ############################################## all: $(TARGET) install: $(TARGET) $(TARGET): $(TARGET).o $(CXX) $(LDFLAGS) $(TARGET).o -o $@ $(LIBS) $(TARGET).o : $(TARGET).c $(CC) $(CFLAGS) -c $(TARGET).c clean: $(RM) $(TARGET).o $(TARGET) profile.* *.trc *.edf *.elg ############################################## tau-2.16.4/examples/validate/c/simple.c000066400000000000000000000004721062343042700176670ustar00rootroot00000000000000 #include #include int main (int argc, char **argv) { TAU_PROFILE_TIMER(tautimer,"main()", "int (int, char **)", TAU_DEFAULT); TAU_PROFILE_START(tautimer); TAU_PROFILE_INIT(argc, argv); TAU_PROFILE_SET_NODE(0); printf ("Hello, world\n"); TAU_PROFILE_STOP(tautimer); return 0; } tau-2.16.4/examples/validate/fclink/000077500000000000000000000000001062343042700172535ustar00rootroot00000000000000tau-2.16.4/examples/validate/fclink/Makefile000066400000000000000000000011371062343042700207150ustar00rootroot00000000000000include $(TAU_TEST_MAKEFILE) CXX = $(TAU_CXX) CC = $(TAU_CC) FFLAGS = $(TAU_INCLUDE) $(TAU_F90_FIXED) LIBS = $(TAU_LIBS) $(TAU_FORTRANLIBS) $(TAU_CXXLIBS) $(LEXTRA1) LDFLAGS = $(USER_OPT) RM = /bin/rm -f F90 = $(TAU_F90) TARGET = simple EXTRAOBJS = ############################################## all: $(TARGET) install: $(TARGET) $(TARGET): $(TARGET).o $(CC) $(LDFLAGS) $(TARGET).o -o $@ $(LIBS) $(TARGET).o : $(TARGET).f $(F90) $(FFLAGS) -c $(TARGET).f clean: $(RM) $(TARGET).o $(TARGET) ############################################## tau-2.16.4/examples/validate/fclink/simple.f000066400000000000000000000012661062343042700207200ustar00rootroot00000000000000cc34567 Cubes program PROGRAM SUM_OF_CUBES integer profiler(2) / 0, 0 / save profiler INTEGER :: H, T, U call TAU_PROFILE_INIT() call TAU_PROFILE_TIMER(profiler, 'PROGRAM SUM_OF_CUBES') call TAU_PROFILE_START(profiler) call TAU_PROFILE_SET_NODE(0) ! This program prints all 3-digit numbers that ! equal the sum of the cubes of their digits. DO H = 1, 9 DO T = 0, 9 DO U = 0, 9 IF (100*H + 10*T + U == H**3 + T**3 + U**3) THEN PRINT "(3I1)", H, T, U ENDIF END DO END DO END DO call TAU_PROFILE_STOP(profiler) END PROGRAM SUM_OF_CUBES tau-2.16.4/examples/validate/fcpplink/000077500000000000000000000000001062343042700176135ustar00rootroot00000000000000tau-2.16.4/examples/validate/fcpplink/Makefile000066400000000000000000000011211062343042700212460ustar00rootroot00000000000000include $(TAU_TEST_MAKEFILE) CXX = $(TAU_CXX) CC = $(TAU_CC) FFLAGS = $(TAU_INCLUDE) $(TAU_F90_FIXED) LIBS = $(TAU_LIBS) $(TAU_FORTRANLIBS) $(LEXTRA1) LDFLAGS = $(USER_OPT) RM = /bin/rm -f F90 = $(TAU_F90) TARGET = simple EXTRAOBJS = ############################################## all: $(TARGET) install: $(TARGET) $(TARGET): $(TARGET).o $(CXX) $(LDFLAGS) $(TARGET).o -o $@ $(LIBS) $(TARGET).o : $(TARGET).f $(F90) $(FFLAGS) -c $(TARGET).f clean: $(RM) $(TARGET).o $(TARGET) ############################################## tau-2.16.4/examples/validate/fcpplink/simple.f000066400000000000000000000012661062343042700212600ustar00rootroot00000000000000cc34567 Cubes program PROGRAM SUM_OF_CUBES integer profiler(2) / 0, 0 / save profiler INTEGER :: H, T, U call TAU_PROFILE_INIT() call TAU_PROFILE_TIMER(profiler, 'PROGRAM SUM_OF_CUBES') call TAU_PROFILE_START(profiler) call TAU_PROFILE_SET_NODE(0) ! This program prints all 3-digit numbers that ! equal the sum of the cubes of their digits. DO H = 1, 9 DO T = 0, 9 DO U = 0, 9 IF (100*H + 10*T + U == H**3 + T**3 + U**3) THEN PRINT "(3I1)", H, T, U ENDIF END DO END DO END DO call TAU_PROFILE_STOP(profiler) END PROGRAM SUM_OF_CUBES tau-2.16.4/examples/validate/fflink/000077500000000000000000000000001062343042700172565ustar00rootroot00000000000000tau-2.16.4/examples/validate/fflink/Makefile000066400000000000000000000011141062343042700207130ustar00rootroot00000000000000include $(TAU_TEST_MAKEFILE) CXX = $(TAU_CXX) CC = $(TAU_CC) FFLAGS = $(TAU_INCLUDE) $(TAU_F90_FIXED) LIBS = $(TAU_LIBS) $(TAU_CXXLIBS) $(LEXTRA1) LDFLAGS = $(USER_OPT) RM = /bin/rm -f F90 = $(TAU_F90) TARGET = simple EXTRAOBJS = ############################################## all: $(TARGET) install: $(TARGET) $(TARGET): $(TARGET).o $(F90) $(LDFLAGS) $(TARGET).o -o $@ $(LIBS) $(TARGET).o : $(TARGET).f $(F90) $(FFLAGS) -c $(TARGET).f clean: $(RM) $(TARGET).o $(TARGET) ############################################## tau-2.16.4/examples/validate/fflink/simple.f000066400000000000000000000017331062343042700207220ustar00rootroot00000000000000cc hello.f cc -------- cc This file contains code for testing the Fortran interface to TAU cc It works with the Cray T3E F90 compiler with TAU. cc----------------------------------------------------------------------------- subroutine HELLOWORLD(iVal) integer iVal integer profiler(2) / 0, 0 / save profiler call TAU_PROFILE_TIMER(profiler,'HelloWorld()') call TAU_PROFILE_START(profiler) cc Do something here... print *, "Iteration = ", iVal call TAU_PROFILE_STOP(profiler) cc HelloWorld = iVal end program main integer i integer profiler(2) / 0, 0 / save profiler call TAU_PROFILE_INIT() call TAU_PROFILE_TIMER(profiler, 'main()') call TAU_PROFILE_START(profiler) call TAU_PROFILE_SET_NODE(0) print *, "test program" do 10, i = 1, 10 call HELLOWORLD(i) 10 continue call TAU_PROFILE_STOP(profiler) end tau-2.16.4/examples/validate/mpic/000077500000000000000000000000001062343042700167355ustar00rootroot00000000000000tau-2.16.4/examples/validate/mpic/Makefile000066400000000000000000000013431062343042700203760ustar00rootroot00000000000000 include $(TAU_TEST_MAKEFILE) CXX = $(TAU_CXX) CC = $(TAU_CC) CFLAGS = $(TAU_INCLUDE) $(TAU_DEFS) $(TAU_MPI_INCLUDE) LIBS = $(TAU_MPI_LIBS) $(TAU_LIBS) $(LEXTRA1) $(EXTRALIBS) -lm LDFLAGS = $(USER_OPT) $(TAU_LDFLAGS) TARGET = simple EXTRAOBJS = RM = /bin/rm -f ############################################## all: $(TARGET) install: $(TARGET) OBJS = simple.o $(TARGET): $(OBJS) $(CXX) $(LDFLAGS) $(OBJS) -o $@ $(LIBS) # Compilation rule .c.o: $(CC) $(CFLAGS) -c $< -o $@ # #$(TARGET).o : $(TARGET).cpp # $(CXX) $(CFLAGS) -c $(TARGET).c clean: $(RM) $(OBJS) $(TARGET) $(OBJS:.o=.inst.c) \ profile.* tautrace.* events.* *.elg ############################################## tau-2.16.4/examples/validate/mpic/simple.c000066400000000000000000000072571062343042700204050ustar00rootroot00000000000000/**************************************************************************** ** TAU Portable Profiling Package ** ** http://www.cs.uoregon.edu/research/tau ** ***************************************************************************** ** Copyright 1997 ** ** Department of Computer and Information Science, University of Oregon ** ** Advanced Computing Laboratory, Los Alamos National Laboratory ** ****************************************************************************/ /* This application calculates the value of pi and e using a parallel */ /* algorithm for integrating a function using Riemann sum. Uses MPI. */ #include "mpi.h" #include #include #include #ifndef M_E #define M_E 2.7182818284590452354 /* e */ #endif #ifndef M_PI #define M_PI 3.14159265358979323846 /* pi */ #endif double f(double a) { TAU_PROFILE("f()", "double (double)", TAU_USER); return (4.0 / (1.0 + a*a)); } int main(int argc, char* argv[]) { int i, n, myid, numprocs, namelen; double mySum, h, sum, x; double startwtime, timePi, timeE, time1; char processor_name[MPI_MAX_PROCESSOR_NAME]; TAU_PROFILE("main()", "int (int, char **)", TAU_DEFAULT); TAU_PROFILE_INIT(argc,argv); MPI_Init(&argc,&argv); TAU_PROFILE_TIMER(t1, "main-init()", "int (int, char **)", TAU_USER); TAU_PROFILE_START(t1); MPI_Comm_size(MPI_COMM_WORLD,&numprocs); MPI_Comm_rank(MPI_COMM_WORLD,&myid); MPI_Get_processor_name(processor_name,&namelen); TAU_PROFILE_SET_NODE(myid); fprintf(stderr,"Process %d on %s\n", myid, processor_name); if (argc > 1) { sscanf(argv[1], "%d", &n); } else { n = 1000000; } TAU_PROFILE_STOP(t1); /* // Calculate pi by integrating 4/(1 + x^2) from 0 to 1. */ startwtime = MPI_Wtime(); h = 1.0 / (double) n; sum = 0.0; for (i = myid + 1; i <= n; i += numprocs) { x = h * ((double)i - 0.5); sum += f(x); } mySum = h * sum; /* REGION A */ MPI_Reduce(&mySum, &sum, 1, MPI_DOUBLE, MPI_SUM, 0, MPI_COMM_WORLD); if (myid == 0) { timePi = MPI_Wtime() - startwtime; printf("\nFor %d integration intervals:\n", n); printf(" pi is approximately %.16f, Error is %.16f\n", sum, fabs(sum - M_PI)); } /* // Calculate e by integrating exp(x) from 0 to 1. */ startwtime = MPI_Wtime(); h = 1.0 / (double) n; sum = 0.0; for (i = myid + 1; i <= n; i += numprocs) { x = h * ((double)i - 0.5); sum += exp(x); } mySum = h * sum; MPI_Reduce(&mySum, &sum, 1, MPI_DOUBLE, MPI_SUM, 0, MPI_COMM_WORLD); if (myid == 0) { sum += 1; /* integral = e - 1, so add 1 */ timeE = MPI_Wtime() - startwtime; printf(" e is approximately %.16f, Error is %.16f\n", sum, fabs(sum - M_E)); } /* // Calculate 1.0 by integrating cos(th) from 0 to pi/2. */ startwtime = MPI_Wtime(); h = (M_PI / 2.0) / (double) n; sum = 0.0; for (i = myid + 1; i <= n; i += numprocs) { x = h * ((double)i - 0.5); sum += cos(x); } mySum = h * sum; MPI_Reduce(&mySum, &sum, 1, MPI_DOUBLE, MPI_SUM, 0, MPI_COMM_WORLD); if (myid == 0) { time1 = MPI_Wtime() - startwtime; printf(" sum is %.16f, Error is %.16f\n\n", sum, fabs(1.0 - sum)); printf("wall clock time for pi = %f\n", timePi); printf("wall clock time for e = %f\n", timeE); printf("wall clock time for 1 = %f\n", time1); printf("Total time = %f\n\n", timePi + timeE + time1); } /* // finished */ MPI_Finalize(); return 0; } tau-2.16.4/examples/validate/mpif/000077500000000000000000000000001062343042700167405ustar00rootroot00000000000000tau-2.16.4/examples/validate/mpif/Makefile000066400000000000000000000030701062343042700204000ustar00rootroot00000000000000#**************************************************************************** #* TAU Portable Profiling Package ** #* http://www.cs.uoregon.edu/research/tau ** #**************************************************************************** #* Copyright 2001 ** #* Department of Computer and Information Science, University of Oregon ** #* Advanced Computing Laboratory, Los Alamos National Laboratory ** #**************************************************************************** TAUROOTDIR = ../../.. .SUFFIXES : .f90 include $(TAU_TEST_MAKEFILE) USE_TAU = 1 # Comment above line to disable TAU CXX = $(TAU_CXX) CC = $(TAU_CC) F90 = $(TAU_F90) PDTF90PARSE = $(PDTDIR)/$(PDTARCHDIR)/bin/f95parse TAUINSTR = $(TAUROOTDIR)/$(CONFIG_ARCH)/bin/tau_instrumentor CFLAGS = $(TAU_INCLUDE) $(TAU_DEFS) $(TAU_MPI_INCLUDE) FFLAGS = $(TAU_INCLUDE) $(TAU_MPI_INCLUDE) $(TAU_F90_SUFFIX) LIBS = $(TAU_MPI_FLIBS) $(TAU_LIBS) $(TAU_CXXLIBS) LDFLAGS = $(USER_OPT) $(TAU_LDFLAGS) LINKER = $(TAU_LINKER) LINKER = $(TAU_F90) TARGET = simple EXTRAOBJS = RM = /bin/rm -f AR = ar ARFLAGS = rcv ############################################## all: $(TARGET) install: $(TARGET) OBJS = simple.o $(TARGET): $(OBJS) $(LINKER) $(LDFLAGS) $(OBJS) -o $@ $(LIBS) # Compilation rule .f90.o: $(F90) $(FFLAGS) -c $(TARGET).f90 clean: $(RM) $(OBJS) $(TARGET) $(OBJS:.o=.inst.f90) \ profile.* tautrace.* events.* *.elg ############################################## tau-2.16.4/examples/validate/mpif/simple.f90000066400000000000000000000022101062343042700205440ustar00rootroot00000000000000 SUBROUTINE FUNC(me, proc) INCLUDE 'mpif.h' INTEGER i, proc, me, err INTEGER f(10) INTEGER s(MPI_STATUS_SIZE) WRITE(*,*) me, 'started.' DO I=1,10 f(i) = i ENDDO CALL MPI_Barrier(MPI_COMM_WORLD, err) IF (me .EQ. 0) THEN CALL MPI_Send(f, 10, MPI_INTEGER, 1, 4711, MPI_COMM_WORLD, err) CALL MPI_Recv(f, 10, MPI_INTEGER, proc-1, 4711, MPI_COMM_WORLD, s, err) ELSE CALL MPI_Recv(f, 10, MPI_INTEGER, me-1, 4711, MPI_COMM_WORLD, s, err) IF (me .EQ. proc-1) THEN CALL MPI_Send(f, 10, MPI_INTEGER, 0, 4711, MPI_COMM_WORLD, err) ELSE CALL MPI_Send(f, 10, MPI_INTEGER, me+1, 4711, MPI_COMM_WORLD, err) ENDIF ENDIF CALL MPI_Bcast (f, 10, MPI_INTEGER, 0, MPI_COMM_WORLD, err) WRITE(*,*) me, 'done.' RETURN END SUBROUTINE FUNC PROGRAM main INCLUDE 'mpif.h' INTEGER i, proc, me, err CALL MPI_Init (err) CALL MPI_Comm_size (MPI_COMM_WORLD, proc, err) CALL MPI_Comm_rank (MPI_COMM_WORLD, me, err) CALL FUNC(me, proc) CALL MPI_Finalize (err) END tau-2.16.4/examples/validate/pdtc/000077500000000000000000000000001062343042700167375ustar00rootroot00000000000000tau-2.16.4/examples/validate/pdtc/Makefile000066400000000000000000000011611062343042700203760ustar00rootroot00000000000000include $(TAU_TEST_MAKEFILE) # I'm using -optLinkReset because I don't want to link in MPI, otherwise I may not # be able to run the resuling executable CC = $(TAU_COMPILER) $(TAU_CC) -optKeepFiles -optNoRevert -optVerbose -optLinkReset="$(TAU_LIBS) $(TAU_CXXLIBS)" -optTauSelectFile=select.tau RM = /bin/rm -f TARGET = simple ############################################## all: $(TARGET) $(TARGET): $(TARGET).o $(CC) $(TARGET).o -o $@ $(TARGET).o : $(TARGET).c $(CC) -c $(TARGET).c clean: $(RM) $(TARGET) $(TARGET).o $(TARGET).pdb $(TARGET).inst.c ############################################## tau-2.16.4/examples/validate/pdtc/select.tau000066400000000000000000000001541062343042700207310ustar00rootroot00000000000000BEGIN_INSTRUMENT_SECTION entry routine ="int main#" code = "TAU_PROFILE_SET_NODE(0)" END_INSTRUMENT_SECTION tau-2.16.4/examples/validate/pdtc/simple.c000066400000000000000000000001451062343042700203740ustar00rootroot00000000000000 #include int main (int argc, char **argv) { printf ("Hello, world\n"); return 0; } tau-2.16.4/examples/validate/pdtcpp/000077500000000000000000000000001062343042700172775ustar00rootroot00000000000000tau-2.16.4/examples/validate/pdtcpp/Makefile000066400000000000000000000011701062343042700207360ustar00rootroot00000000000000include $(TAU_TEST_MAKEFILE) # I'm using -optLinkReset because I don't want to link in MPI, otherwise I may not # be able to run the resuling executable CXX = $(TAU_COMPILER) $(TAU_CXX) -optKeepFiles -optNoRevert -optVerbose -optLinkReset="$(TAU_LIBS) $(TAU_CXXLIBS)" -optTauSelectFile=select.tau RM = /bin/rm -f TARGET = simple ############################################## all: $(TARGET) $(TARGET): $(TARGET).o $(CXX) $(TARGET).o -o $@ $(TARGET).o : $(TARGET).cc $(CXX) -c $(TARGET).cc clean: $(RM) $(TARGET) $(TARGET).o $(TARGET).pdb $(TARGET).inst.cc ############################################## tau-2.16.4/examples/validate/pdtcpp/select.tau000066400000000000000000000001541062343042700212710ustar00rootroot00000000000000BEGIN_INSTRUMENT_SECTION entry routine ="int main#" code = "TAU_PROFILE_SET_NODE(0)" END_INSTRUMENT_SECTION tau-2.16.4/examples/validate/pdtcpp/simple.cc000066400000000000000000000001431062343042700210750ustar00rootroot00000000000000 #include int main (int argc, char **argv) { printf ("Hello, world\n"); return 0; } tau-2.16.4/examples/validate/pdtf/000077500000000000000000000000001062343042700167425ustar00rootroot00000000000000tau-2.16.4/examples/validate/pdtf/Makefile000066400000000000000000000011071062343042700204010ustar00rootroot00000000000000 .SUFFIXES : .f90 include $(TAU_TEST_MAKEFILE) # We use TAU_COMPILER (defined in the above stub Makefile) for instrumenting # the source code. We can pass it optional arguments. See tau_compiler.sh -help OPTS = -optVerbose -optCompile=$(TAU_F90_SUFFIX) -optKeepFiles -optLinkReset="$(TAU_LIBS) $(TAU_CXXLIBS)" -optNoRevert F90=$(TAU_COMPILER) $(OPTS) $(TAU_F90) LIBS= INCLUDE= OBJS= simple.o all: simple simple: $(OBJS) $(F90) $(OBJS) -o simple $(LIBS) .f90.o: echo "Building $@ from $<" $(F90) -c $(INCLUDE) $< -o $@ clean: /bin/rm -f simple.o simple *.pdb profile.* tau-2.16.4/examples/validate/pdtf/select.tau000066400000000000000000000001731062343042700207350ustar00rootroot00000000000000BEGIN_INSTRUMENT_SECTION entry routine ="SUM_OF_CUBES" code = " call TAU_PROFILE_SET_NODE(0)" END_INSTRUMENT_SECTION tau-2.16.4/examples/validate/pdtf/simple.f90000066400000000000000000000006741062343042700205620ustar00rootroot00000000000000 PROGRAM SUM_OF_CUBES INTEGER :: H, T, U CALL TAU_PROFILE_SET_NODE(0) ! This program prints all 3-digit numbers that ! equal the sum of the cubes of their digits. DO H = 1, 9 DO T = 0, 9 DO U = 0, 9 IF (100*H + 10*T + U == H**3 + T**3 + U**3) THEN PRINT "(3I1)", H, T, U ENDIF END DO END DO END DO END PROGRAM SUM_OF_CUBES tau-2.16.4/examples/validate/pdtgf/000077500000000000000000000000001062343042700171115ustar00rootroot00000000000000tau-2.16.4/examples/validate/pdtgf/Makefile000066400000000000000000000011371062343042700205530ustar00rootroot00000000000000 .SUFFIXES : .f90 include $(TAU_TEST_MAKEFILE) # We use TAU_COMPILER (defined in the above stub Makefile) for instrumenting # the source code. We can pass it optional arguments. See tau_compiler.sh -help OPTS = -optVerbose -optCompile=$(TAU_F90_SUFFIX) -optKeepFiles -optLinkReset="$(TAU_LIBS) $(TAU_CXXLIBS)" -optNoRevert -optPdtGnuFortranParser F90=$(TAU_COMPILER) $(OPTS) $(TAU_F90) LIBS= INCLUDE= OBJS= simple.o all: simple simple: $(OBJS) $(F90) $(OBJS) -o simple $(LIBS) .f90.o: echo "Building $@ from $<" $(F90) -c $(INCLUDE) $< -o $@ clean: /bin/rm -f simple.o simple *.pdb profile.* tau-2.16.4/examples/validate/pdtgf/select.tau000066400000000000000000000001601062343042700211000ustar00rootroot00000000000000BEGIN_INSTRUMENT_SECTION entry routine ="#" code = " call TAU_PROFILE_SET_NODE(0)" END_INSTRUMENT_SECTION tau-2.16.4/examples/validate/pdtgf/simple.f90000066400000000000000000000006741062343042700207310ustar00rootroot00000000000000 PROGRAM SUM_OF_CUBES INTEGER :: H, T, U CALL TAU_PROFILE_SET_NODE(0) ! This program prints all 3-digit numbers that ! equal the sum of the cubes of their digits. DO H = 1, 9 DO T = 0, 9 DO U = 0, 9 IF (100*H + 10*T + U == H**3 + T**3 + U**3) THEN PRINT "(3I1)", H, T, U ENDIF END DO END DO END DO END PROGRAM SUM_OF_CUBES tau-2.16.4/examples/validate/pdtmpic/000077500000000000000000000000001062343042700174455ustar00rootroot00000000000000tau-2.16.4/examples/validate/pdtmpic/Makefile000066400000000000000000000010511062343042700211020ustar00rootroot00000000000000include $(TAU_TEST_MAKEFILE) # I'm using -optLinkReset because I don't want to link in MPI, otherwise I may not # be able to run the resuling executable CC = $(TAU_COMPILER) $(TAU_CC) -optKeepFiles -optNoRevert -optVerbose RM = /bin/rm -f TARGET = simple ############################################## all: $(TARGET) $(TARGET): $(TARGET).o $(CC) $(TARGET).o -o $@ $(TARGET).o : $(TARGET).c $(CC) -c $(TARGET).c clean: $(RM) $(TARGET) $(TARGET).o $(TARGET).pdb $(TARGET).inst.c ############################################## tau-2.16.4/examples/validate/pdtmpic/simple.c000066400000000000000000000015351062343042700211060ustar00rootroot00000000000000#include #include #define SIZE 10 void func(int me, int proc) { int i; int field[SIZE]; MPI_Status status; for (i=0; i #include static const int anz = 512; class C { public: C(int m, int p) : me(m), proc(p) {} void method() { int i; int field[anz]; MPI_Status status; for (i=0; i5œv$JŸ?‡Íüh$(Ú’jÁ×ó–H•R1ðà "’-*x˜•ãš”^pàAÙZ‘he!q`Šoy`DfS$qó>"‰AÚ$'ÉèœÃÊJg 0˜õ—±–‘NbÊQË(py&›ì,Ò ¯`â6o‘¦ñ£ ÔšZ`9À=ûVƒšæ»Ë[0ÀcSdGVСAåÞ€)ù‹ŒrƘPâç–\èst0ÜÈ”íÅ–akÛHòøçà‹èÜ›:Á"bûì‡uü,ùmàÐ(a]UYÔþaV¥8°Á}ÿ]±Æ;£ðŒXoe%£ @ƒò€À\×G~ÜÁ| Ó„ŒXbˆW\ˆÞ(ê±·’yÞøˆQÒ˜Äë “J:*džuJ‘Á¢70™s¶@$›QS_edÙa¬%ôXð$A©ˆš-¸Ø€‰Ž ˆcâ0b7&œ¤¼ Ÿ<3cM‰äc-umWM›( HMàIhL|G av™auPYÍ1Lj.®£xŠ" Ëx€:’ÑHšŠzB$š£žâ§o’3‰‡ÊŠƒœÒÄ“(yŽHÖ¨­L«°%´Ù³®þ:Ž—XHö…£ãH˵К°ÆÏúˆà€ËÑ9ä!$Òn ð+OŽêêÀ#TþŒ[î¼"`öž<&I$oÂô®xwÌ,ÊÃ…ggÔ·!¶ˆ ÔšÃ:Èxp--y Æ8ägÈ“2n«›ðª˜ µ´A‰ÿš`á Z$e©-ïPf¾qÒ)Ë+<3óþxXdÏ:ЪAÅ-JÏ‹FxÓÁz@7òÚ@Á2Mo¥+IÉF¯"þNÍŽ€Š6ÇJªÇðÚCÜ D=ŽÑ0z}CD®ífÁ<‹éiaCšÞ;0ÑÕ0¬`%'Cn5Ö‘W¹y/Z®ùæ;™âþˆë ÉB>Àé¨# úê¬Ë¼ë°·ÞÄ‚±×n;ìxe!tÞ¡í ÌglB—3 $0Ãñ Ä¡üòq óÐ Å+ôÔWÏ< —`±³D÷>ÄÝç`%ñÆ3Ѐ ¤Ãúì·ÿÅ$…´¿~²Ä/ÿýø³ŠÝ;\¸±÷{«ƒø':º  |. ‰ê€”làŒà;àEH0‚mð.ÈÁJ c!Ù @ÒpX »F~`>0Ð Oˆá<@ÃÚІøÀ q¨Ãúð‡;¼Ú‚r—ÅùÍkùá\‘€¾p†5Ì¡§HÅ*ZñŠXÌ"5˜"¥¼;ÿ¡ ²3ž¬ÀÉ£ƒ¢ø ¸1ˆ£çHÇ:ÚñŽxÌc9 ˆ.ŠpmjHøÄxX\ÀŒ@cèàÀñ €$'IÉJZò’˜Ì¤&1™>ñ*ø•t™ƒQ‚€'@c>6€lò•°Œ¥,'ÙI!†p‰†$!ç¶au¡À,‡IÌbÖÒH0ZÃHÙ˜xíÀB§x@1§IMXó“d3;–¢en ¨€+«IÎrRòš·4‚À¸·MT§ ¾d@ÌIOs¢Ó‹;àÂcÚ©9‘A„Мg=JÍ{‚ÒkÑÇOˆ‹;tIÀJQcz2= pþzB£/4X€0+JÒX´“é%?m°³Ã¥# ˆdIgºÉ“fT$]iËH¯H“¦@å$±Éƒ@šP§:@j0€ :Õ’€ñ‰QZ ©#4%ŠÓ ™>õ«X  ¨jä•X%ÀTŠ‘‰~õ­Hô€Ö<£9ˆÔ©Óþ'‚®¾õ­8^8ô0%¦uk• FÆù×§uœèÁ]½yXƒ|á3@c߀Ä^•ƒ"ƾ@V»ÚÀR‡3 à†’ºÃC:hh3aJX!³¯ŒÀ°Œà•€-«ÖcÊzšnwþËËÀ´–D­ЦÙMB¶¨DeBæÒ>‰„²»m¦oIT€d½Aw5ù]!†çGÝiØôö¯"K@S/ù*d¯Ö$ú8Ö,In8:Ùüë³/0À«“”@Å[W$8“ ¾ÚXíæh¤ ¦˜Ù‰)\kaX’/]G0>ò¯yêsá°{ÉëP làï`¿ô5 ‚ìéŠÛ1‘„ŠÅ@$'0É ÄÉCŸCf‘Ç–ì¤ÇlE%$zƒެ€âíâÀ›ÌÓ \º x¤à€ ½cZÓÇÞE‡[f¡&¾ÀÙ?Ö´ªða ÄÀW`À|5©\n‡’9aBÃf&‡qׂϖê0ØdƒÇsø¹˜j94¼"éܨ†ï×(ûÆäwe^æÚ ;“x(Â,ü+0y£ÖÀÄ¡ ø† š‹lB)nˆ6[‚ †À‚ñ ‡éþžà9xÅÛ4ok!(.k»#.ó¡ç&  «ëcÛ]·i+ð@¦'á7H:=ù­ƒšâ WUoùŠƒMb:Wî\ó*­“ÛÌ_‡¯ÑEmIB·*ͨ$ v¨2£Uðƒj$3©â9§àPÎ÷‹üRóÕæüàMà,õàèp]hJ†xªëÁˆÐ5¤ƒ¬gô/Ýz×MÜ©‰ïÛ6ö:d-îá7}ký$1Àû$õRÍ9@¶Õù(ý@’¨ŸÇß6("YLo0úƒ| aÊ—ä¡ï0Ö"`Ò+.Á–râpë+À mÒjñ¡lþ[äuGÅ«‡'ÖÄ{XÏ@{E@+í¢K—Ñ}’ ±§N Vrõ‡B³8<"@XÚ¦~c!Nðdùd-*G rßb.Ç€h÷;ZÑ1x0‚DwDm¢ñw–Sä`l0 !“xñì$>ˆ!‡Iý¶’u2pPÙá+X ø ‘5W 貃eQÁ)¢ð$Y˜]ý~ù„ !>ô0JRÑ&«gEq èÂeá!‚xæÇ†Ðx•4r‘bvG„#ú1²T^ …è{Ô@Ób ½äˆÿ”ôl‡‡"r2À,Ò²4ø¡‰„c‰ðë…,¨‚‡¼ƒŠËwQñ•OF±‡*Û¢‹qB¸8†@AÜ2&A}*0Àˆ"~ðz †”HwÍ53 3¡AqGrZ7°‚8Á&¢Ü8˜('‡¡qaR}ñ`~–‡P (FsHÅq RÚ¸~ÉÀg¤QßÖ ¿242"Ñä"$ОB“1Š'ðb—Äíw[p%ð`\ðr‘$  %i" 51{UxÈ~·(7("@Bc3Rñ’YH¸H”o!44A*¨²Fkÿ (…Û2["1€!‚×x CÈm2³*ØH…ÇoR©‹ä‡°°u¢²Ñ Œ á Q‡“*W‡–ôc?Èv9#·Æ/uò’‚°•²ÒiÎa-ò¢—”[H—V‘€ƒcÂÑð‚΀3lP–%À˜Òv‡tiTÀ€^P’†™Ð2…¦8†ÀhxKÇŠXpk·È‰u‚šô™ù!©’+ðš‰Ø½ ާ™šº.æç›*œ Fr’Ȱ Ž²‚›iœ4Ém“)àœ«Šcôh’Àub™x0—ÂRuÐŽ* žùHû4)„Ù•ð•éáwe›ÿ&àž¶4ŒIp‰û¹›©—!ˆ”øH(FEÌ8a'àŸÈ”rY$kÀSc¢•#“tI¯±-â ìù ¯tLÝ(pú(kq4õ˜F Q¹¡Õ@F%îðP$fg|Règ4"‚Ä‘‰‘©”?ñv”ðFñ€(`Mßw’gus6R"s= ù…J •!Ó)d¢-yLÊ“‰Ž2 .s•ãþÈ"¿ÁeÚ-‘ð4• &2¦ ‰>zJ`µØå}6`¸hˆ–‘Dx…Ò.d!kMZ¥(&y]#0Ò5¸p‹Qz€ó‰–z•*‡v\øZ§wÿ*À”0š`±zÚ„( ©Šm ©1y²q–™”C"FYà£GÙ ¶‡6 ÈŸMóªžù Hž³²x¼š“¤«SŸ˜! cˆr‰·#ì’ˆKÄ7O¦ )ƒvD­’$­DåY¦ªˆR”ŽArh¨ *2‡+Q¦™^èæJè y=à8³gžCŠ¿‘3 „Ä+ZT.ƒ²™'‹Ð1ã¹ýŠ®Ñ©a­» Bê ãЂ‰qªý—„±5•ãà4ç¸âqŸЯôGd ›(?wÈѰhNïC—Ò}ù~±êÎ5‰2Ë—þ&:a9 ÿ›Æ«'÷DZ Ÿ÷}M´ùEC±5|¬F÷ް´Í—W [Õ°( ,!ê8|®Gøy\;¢÷7•—Wâñ"5¢ñV¢EÕ?ö°WUyËÅuÁÇ“öš~WuC5«Ñ%·7‡@e †±ÛSf8y:,sŸ+„wšg_* º÷>°xaw>ʬˆ p£©øl)«£¥TŽ´q˜/2J”vg<9' zÇyP‚sa¼<v9›;+!/Lô•p Ô¹.³ÀÒÄ|$¸,[wS·HçuXW´}w}Œ4sòfq–%ëÀš«…èšÿº’ Iu›µ¡d6*árås373XW²–ÊlïÖHÖklîë ‹Ÿågµ«Ib¶yØ;á¿“ÄÁ5ƒ¯¾fpU—pW7W¬l¡F¾ðffc`àÀj~m:I™¤Š¸‹^[4‚[¿†ÇE€[áv@ʦy(Œn §née@M”@ë‰pĶA!ÁrÀj»PÚÓæFö‹IÉe½†Ðp€tðSðD\ Hük·žLEW#ÁÈöi(`w?ð@óÓ4lĦA–Åëcd°qôûÐÈŽìÈ>¦\o0ŒækŽ ðr4³4ALÜg˜F›Æuÿc  + eG!|\ÂZF"\fid˲Lf0Ãifd‡l1[e Ç<05†ZÃÇr¬etGbF¿o´ÌÀG—C$d:çHt4k<éfKJ %‹¾¬©)’­H`y–ÉdìÌüœv<2 {iKÛŠ ÁÀHu”¥‡Á…æ|j†,Wï¦Øe{ʉTBì_('»W°oŠœÁ—¤Ï ŒÅYì}ÀÆËG³ˆÁ ÝÍR:w~PIGΘbÑ14lÿ UöµÂ.K¯B°~`Z€ÁmI°ÏWäІ¶«û[2N&ÏÌDBõŸöˆ ÖJÞ…%½½ÿLýJmIðºk¦±VÔ vš G÷KVöH˜UÇÒ¤8ZFÍOga¹ mIæFÖ›4!M½=F¦FÝ‘”ùÒ ]µ8@’5ÝFcüJ€ÃPm»µÜ Øü´5Ïõ'tþ›¹u]ÓþÛz°ÒQxO“ÕüÓBMz—tØn„#•IÀÔõK×ç”»¢¦žÆÑ[ã[¤p£¶È« ׊Œ×—¡‡ÖâSñÊÑL€‰”MÆ® ½a8 GÏ]Iö&cUJƒ‚ÝÜiÁܸJI­ G`&tÒ­I¶ÄÝOŸuÐÛHÆÚ…†Ú›Ôô[Øem·ÿé ¾×¬]ÂÚŒi×ÍÌӚɰMI`·E§Ù 5@i Àx×T&à"­Iqu·Ž0"a‚¾á2‘É&­×Úþ+Mšì¿Ó Ò{·Ö*&‡¤Ç¹4`»Á™Ôš Õé·a Þ'þýi(—¯µŒ–=à9.¹?}ÕºÑZm}M ¨xØ|Ľ>IðÄLf mÍâ=“ÊZŽ`ºÓÛ ÜÙ_.NVæ„"4o(3^IÝoäÜR oÖå|x4,> 1FÞµËÔQ=I ~açý£1æQh~`Ùµ;š­Ô0èW¾0¹[£Ã³µ@ØÒÖIÿR±;†., µIñ*“ý=Ôø«ñO»eê?A$Gº’ÕÑË6±é¡µ=Þ³di"¯p5ü€¿³èÿ¡4ÿ-5¶Á'Ù¥í“RBœÞ,8Ó*ÉÞ}à4ÜÎ1±®ë Qò$ ²ê8³ 0Q© qk69BšøÞãDôNH`Á­þW¹ì%_ï°îºs kÎO e[q,ÿ2¥}´å+å4at7 š+ýÃŽ {„L~íC*Jn$r䚊+¿^#ÒÝ 6‘ëw,áê$F ¡-ÙÏ~-uÙ_Cý3þ@¬\Áñ&ð—(Ï&s"ð„B$Fx[L ôÿ³â©Ô>,ºìØ!@ý’í,>1*Ö/ ÞNòôŠˆn] ùíœñ!Û´3"_!—Hö)`1a_…!õoáOþî¶ް,¡¦r_H ÅL´áÄÐîå.~ Âôˆ¡MøÎŸ÷‹€¾ÄŠî1š"@Ç€ðÃÐûaôò^£ÈN[-‹8Ï>ñqr!MN ’ߥ)‹ß2¿‚•¤À7ƒO r†R+„ä,ÐEîCOÞ6ùƒaö Åi¿)LÉöI 3±O ³û-ãá4÷ø!ú}0'ô*†¯$Ty¨ÿ%F³ šokµÝ;õ’ýUÅ.·a¯Áéòú$²÷6ñ÷E»$‚™þŽ5‚øÞc8%O/,‡8’¥y¢©jަ1Ä:ÓbmI½ó½ÿGÈk]4Áèô ÍÅ1xÒ .¶ëõ›å•pl`ˆ2…`h6]›$Ý(Šõ=ŸoèÕ$Xt\Äôñ0\tX$ÈìL1$Z¶0ŒE¶ $$Yp]ò)XP%\ 6l0޾e޹~-‚p– ˜æ~M²ÒêÓh6Ô!L­+¯*9³­V>_Ï(t4?(8x¦b³ 0z8(t;4tˆ–Ë—ÀY!(€æÍc–R)˜†¥€)kýú%ØpA ^.ª hr’XaçÁþ…û HBljã>î9·O¢“TÈ¡¼Ö ϽË:>‚³Œ'0ìfƒ;‹­²d@)C ‚-ó¦Q(£5ZŒ‰ŠMŒ†‘;JH‡T,üîðƒ¾ÒaÍÝÛá8v ´Çûþbí×´v¬~0éå5Œ_,|~ŸÖþɰ¯ pÙ¤ xMt Æ´ ƒ)|¡„jðƒ^sá(4a2>hÈCˆÙ`8‚yˆÐ‚!²X¢ŠŒ8à„Vb‰ÆÄXÂZx# 9¦ã‰6ì¸"†-nˆ@‘0ú˜àGè¦S0å#\>é!åU)Bx!CS’peM–ЛWi&w‚ Ø%]¦Ø&›kjõ¤‘2¹¡†FX ’€~`  ZÂæEˆhŸ„*¡h0)ž=*a%‹J訆 È6¤qHèQˆ •ºæ›êLȪŸGF¨a„®Šà€„]y¹c„µ¥gŸ{ö)ÇŽüª¡°¡jxþÁ¤MÚ:„yÄ‹²*+á a2`+´»JKl³.L»a˜t„I!¸†¸£³Ö•°ªK6€dŸïZ/† z`J¨¨{.^¾Žˆ$ ¾ZðÀŽ*²iÂwÁ}¼a•¢Ù!±DØ[¬c˜@Çh)ǺZq!ÎZ–«þZ,¬ûäŽ\¤lò¿p’ðËÀÊûë“]2péÎ>ãÜ2 |pbx¦3ŸAë ó—ÄNjß­Eýº¬uXçìãN» ó¯Zà€´(j]—€ý\bÏò‚ýs“ËR1tˆró¹åŒ‚M7Òbï˜@˜”MQê¯R0ºï™yðµÛ;¿!…/¼ÿ â†÷Z4°‹ ÷ã³K1ã`6°“^ B¢$tˆådNz¡¦Ьuç xN¬â~€î¤7Àƾ‡™ Øžó™îFÙûïXîä+ÆžÁa7ä±'«u arÇhË!Üåê¨yã²ÅÎ}õbO¿üÜ+h>¾ß´ü%˜—¯´¬ñ)È÷‰ÿö‚¦Ô/÷#‹¯Î»Î]/y%:ÔêD%¡ Œ l¢óŒ¾Ä?ÖMètÌàu…”kV¿Ba«L€ª }¨~Ö  5"NIèC,”ŠÚÒ› 4à4Kó݉Ȧ±ˆH´˜‚¦l%ã‡K4₨›"YŠÀLvXš‹ÅH‹"ËbFE”O)Ê–€R&³]1‰rÌ"§è0³ dmTãƒzкÿ™§F‚‰ßðúhÈ¥$L|<Š®yÈGú€wyL!é…;tau-2.16.4/html/index.html000066400000000000000000000020351062343042700153370ustar00rootroot00000000000000 Tuning and Analysis Utilities

Powered by DOE2000 and ASCI

Introduction

TAU provides a suite of static and dynamic tools that provide graphical user interaction and interoperation to form an integrated analysis environment for parallel C++ applications.

Documentation

tau-2.16.4/include/000077500000000000000000000000001062343042700140215ustar00rootroot00000000000000tau-2.16.4/include/Makefile000066400000000000000000001171731062343042700154730ustar00rootroot00000000000000#**************************************************************************** #* TAU Portable Profiling Package ** #* http://www.cs.uoregon.edu/research/tau ** #**************************************************************************** #* Copyright 1997-2002 ** #* Department of Computer and Information Science, University of Oregon ** #* Advanced Computing Laboratory, Los Alamos National Laboratory ** #**************************************************************************** ####################################################################### ## pC++/Sage++ Copyright (C) 1993,1995 ## ## Indiana University University of Oregon University of Rennes ## ####################################################################### ####################################################################### # This is a sample Makefile that contains the Profiling and Tracing # options. Makefiles of other applications and libraries (not included # in this distribution) should include this Makefile. # It defines the following variables that should be added to CFLAGS # TAU_INCLUDE - Include path for tau headers # TAU_DEFS - Defines that are needed for tracing and profiling only. # And for linking add to LIBS # TAU_LIBS - TAU Tracing and Profiling library libprof.a # # When the user needs to turn off tracing and profiling and run the # application without any runtime overhead of instrumentation, simply # remove TAUDEFS and TAULIBS from CFLAGS and LIBS respectively but keep # TAUINC. ####################################################################### ########### Automatically modified by the configure script ############ CONFIG_ARCH=default TAU_ARCH=default CONFIG_CC=gcc CONFIG_CXX=g++ TAU_CC_FE=$(CONFIG_CC) #BGL#TAU_CC_FE=xlc #ENDIF# #CATAMOUNT#TAU_CC_FE=gcc #ENDIF# PCXX_OPT=-g USER_OPT=-g EXTRADIR= EXTRADIRCXX= TAUROOT= TULIPDIR= TAUGCCLIBOPTS= TAUGCCLIBDIR= PCLDIR= PAPIDIR= PAPISUBDIR= CHARMDIR= PDTDIR= PDTCOMPDIR= DYNINSTDIR= JDKDIR= SLOG2DIR= OPARIDIR= TAU_OPARI_TOOL= EPILOGDIR= EPILOGBINDIR= EPILOGINCDIR= EPILOGLIBDIR= EPILOGEXTRALINKCMD= VAMPIRTRACEDIR= KTAU_INCDIR= KTAU_INCUSERDIR= KTAU_LIB= KTAU_KALLSYMS_PATH= PYTHON_INCDIR= PYTHON_LIBDIR= PERFINCDIR= PERFLIBDIR= PERFLIBRARY= TAU_SHMEM_INC= TAU_SHMEM_LIB= TAU_CONFIG= TAU_MPI_INC= TAU_MPI_LIB= TAU_MPI_FLIB= TAU_MPILIB_DIR= TAU_PREFIX_INSTALL_DIR= ####################################################################### #ENABLE64BIT#ABI = -64 #ENDIF# #ENABLEN32BIT#ABI = -n32 #ENDIF# #ENABLE32BIT#ABI = -32 #ENDIF# ####################################################################### #SP1#IBM_XLC_ABI = -q32 #ENDIF# #SP1#IBM_GNU_ABI = -maix32 #ENDIF# #IBM64#IBM_XLC_ABI = -q64 #ENDIF# #IBM64#IBM_GNU_ABI = -maix64 #ENDIF# #IBM64LINUX#IBM_XLC_ABI = -q64 #ENDIF# #IBM64LINUX#IBM_GNU_ABI = -m64 #ENDIF# #SUNX86_64#SUN_GNU_ABI = -m64 #ENDIF# #SUNX86_64#SUN_CC_ABI = -xarch=amd64 #ENDIF# #USE_IBMXLC#IBM_ABI = $(IBM_XLC_ABI) #ENDIF# #GNU#IBM_ABI = $(IBM_GNU_ABI) #ENDIF# #SP1# ABI = $(IBM_ABI) #ENDIF# #PPC64# ABI = $(IBM_ABI) #ENDIF# #SOLARIS64#SUN_GNU_ABI = -mcpu=v9 -m64 #ENDIF# #SOLARIS64#SUN_CC_ABI = -xarch=v9 -xcode=pic32 #ENDIF# #SOL2CC#SUN_ABI = $(SUN_CC_ABI) #ENDIF# #GNU#SUN_ABI = $(SUN_GNU_ABI) #ENDIF# #SOL2#ABI = $(SUN_ABI) #ENDIF# #SUNX86_64#ABI = $(SUN_ABI) #ENDIF# #FORCEIA32#ABI = -m32#ENDIF# ####################################################################### F90_ABI = $(ABI) #IBM64_FORTRAN#F90_ABI = -q64 #ENDIF# ####################################################################### ############# Standard Defines ############## TAU_CC = $(CONFIG_CC) $(ABI) $(ISA) TAU_CXX = $(CONFIG_CXX) $(ABI) $(ISA) $(USER_OPT) TAU_INSTALL = /bin/cp TAU_SHELL = /bin/sh LSX = .a ############################################# # JAVA DEFAULT ARCH ############################################# JDKARCH = linux #COMPAQ_ALPHA#JDKARCH = alpha #ENDIF# #SOL2#JDKARCH = solaris #ENDIF# #SGIMP#JDKARCH = irix #ENDIF# #SP1#JDKARCH = aix #ENDIF# #T3E#JDKARCH = cray #ENDIF# ############################################# # JAVA OBJECTS ############################################# #JAVA#TAU_JAVA_O = TauJava.o TauJAPI.o #ENDIF# #JAVA#TAUJAPI = Profile.class #ENDIF# ############################################# # OpenMP OBJECTS ############################################# #OPENMP#OPENMP_O = OpenMPLayer.o #ENDIF# #GNU#OPENMP_O = #ENDIF# # GNU G++ does not currently support OpenMP ############################################# # Opari OBJECTS ############################################# #OPARI#OPARI_O = TauOpari.o #ENDIF# #KOJAKOPARI#OPARI_O = TauKojakOpari.o #ENDIF# #EPILOG#OPARI_O = #ENDIF# #VAMPIRTRACE#OPARI_O = #ENDIF# #GNU#OPARI_O = #ENDIF# ############################################# # CallPath OBJECTS ############################################# #PROFILECALLPATH#CALLPATH_O = TauCallPath.o #ENDIF# #PROFILEPARAM#PARAM_O = ProfileParam.o #ENDIF# ############################################# # Python Binding OBJECTS ############################################# #PYTHON#PYTHON_O = PyGroups.o PyExceptions.o PyDatabase.o PyBindings.o PyTimer.o PyTau.o #ENDIF# ############################################# # DYNINST DEFAULT ARCH ############################################# DYNINST_PLATFORM = $(PLATFORM) #PCL##include $(TAU_PREFIX_INSTALL_DIR)/include/makefiles/PCLMakefile.stub #ENDIF# ############# OpenMP Fortran Option ######## #OPENMP#TAU_F90_OPT = -mp #ENDIF# #SOL2CC_OPENMP#TAU_F90_OPT = -xopenmp #ENDIF# #SUNCC_OPENMP#TAU_F90_OPT = -xopenmp=parallel #ENDIF# #COMPAQCXX_OPENMP#TAU_F90_OPT = -omp #ENDIF# #IBMXLC_OPENMP#TAU_F90_OPT = -qsmp=omp #ENDIF# #GUIDE#TAU_F90_OPT = #ENDIF# #PGIOPENMP#TAU_F90_OPT = -mp #ENDIF# #INTELOPENMP#TAU_F90_OPT = -openmp #ENDIF# #HITACHI_OPENMP#TAU_F90_OPT = #ENDIF# #THREADSAFE_COMPILERS#TAU_R =_r #ENDIF# ############# Fortran Compiler ############# #GNU_FORTRAN#TAU_F90 = g77 $(F90_ABI) $(TAU_F90_OPT) #ENDIF# #GNU_GFORTRAN#TAU_F90 = gfortran $(F90_ABI) $(TAU_F90_OPT) #ENDIF# #SGI_FORTRAN#TAU_F90 = f90 $(F90_ABI) $(TAU_F90_OPT) #ENDIF# #IBM_FORTRAN#TAU_F90 = xlf90$(TAU_R) $(F90_ABI) $(TAU_F90_OPT) #ENDIF# #BGL#TAU_F90 = blrts_xlf90$(TAU_R) $(F90_ABI) $(TAU_F90_OPT) #ENDIF# #IBM64_FORTRAN#TAU_F90 = xlf90$(TAU_R) $(F90_ABI) $(TAU_F90_OPT) #ENDIF# #IBMXLFAPPLE#TAU_F90 = xlf90$(TAU_R) $(F90_ABI) $(TAU_F90_OPT) #ENDIF# #CRAY_FORTRAN#TAU_F90 = f90 $(F90_ABI) $(TAU_F90_OPT) #ENDIF# #CRAY_X1_FORTRAN#TAU_F90 = ftn $(F90_ABI) $(TAU_F90_OPT) #ENDIF# #PGI_FORTRAN#TAU_F90 = pgf90 $(F90_ABI) $(TAU_F90_OPT) #ENDIF# #PGI_CATAMOUNT#TAU_F90 = qk-pgf90 $(F90_ABI) $(TAU_F90_OPT) #ENDIF# #ABSOFT_FORTRAN#TAU_F90 = f90 $(F90_ABI) $(TAU_F90_OPT) #ENDIF# #LAHEY_FORTRAN#TAU_F90 = lf95 $(F90_ABI) $(TAU_F90_OPT) #ENDIF# #NAGWARE_FORTRAN#TAU_F90 = f95 $(F90_ABI) $(TAU_F90_OPT) #ENDIF# #FUJITSU_FORTRAN#TAU_F90 = F90 $(F90_ABI) $(TAU_F90_OPT) #ENDIF# #FUJITSU_SOLARIS#TAU_F90 = f90 $(F90_ABI) $(TAU_F90_OPT) #ENDIF# #SUN_FORTRAN#TAU_F90 = f90 $(F90_ABI) $(TAU_F90_OPT) #ENDIF# #COMPAQ_FORTRAN#TAU_F90 = f90 $(F90_ABI) $(TAU_F90_OPT) #ENDIF# #KAI_FORTRAN#TAU_F90 = guidef90 $(F90_ABI) $(TAU_F90_OPT) #ENDIF# #HP_FORTRAN#TAU_F90 = f90 $(F90_ABI) $(TAU_F90_OPT) #ENDIF# #HITACHI_FORTRAN#TAU_F90 = f90 $(F90_ABI) $(TAU_F90_OPT) #ENDIF# #INTEL_FORTRAN#TAU_F90 = efc $(F90_ABI) $(TAU_F90_OPT) #ENDIF# #INTEL32_FORTRAN#TAU_F90 = ifc $(F90_ABI) $(TAU_F90_OPT) #ENDIF# #INTELIFORT#TAU_F90 = ifort $(F90_ABI) $(TAU_F90_OPT) #ENDIF# #PATHSCALE_FORTRAN#TAU_F90 = pathf90 $(F90_ABI) $(TAU_F90_OPT) #ENDIF# #OPEN64ORC_FORTRAN#TAU_F90 = orf90 $(F90_ABI) $(TAU_F90_OPT) #ENDIF# #NEC_FORTRAN#TAU_F90 = f90 $(F90_ABI) $(TAU_F90_OPT) #ENDIF# ############# Portable F90 Options ############# #IBM64_FORTRAN#TAU_F90_FIXED = -qfixed #ENDIF# #IBM_FORTRAN#TAU_F90_FIXED = -qfixed #ENDIF# #IBM_FORTRAN#TAU_F90_SUFFIX = -qsuffix=f=f90 #ENDIF# #IBMXLFAPPLE#TAU_F90_FIXED = -qfixed #ENDIF# #IBMXLFAPPLE#TAU_F90_SUFFIX = -qsuffix=f=f90 #ENDIF# #IBM64_FORTRAN#TAU_F90_SUFFIX = -qsuffix=f=f90 #ENDIF# ############# Profiling Options ############# #PROFILE#PROFILEOPT1 = -DPROFILING_ON #ENDIF# #PCL#PROFILEOPT3 = -DTAU_PCL -I$(PCLDIR)/include #ENDIF# #PAPI#PROFILEOPT3 = -DTAU_PAPI -I$(PAPIDIR)/src -I$(PAPIDIR)/include #ENDIF# #PCL#PCL_O = PclLayer.o #ENDIF# #PAPI#PAPI_O = PapiLayer.o #ENDIF# #MULTIPLECOUNTERS#MULT_O = MultipleCounters.o #ENDIF# #PROFILECALLS#PROFILEOPT4 = -DPROFILE_CALLS #ENDIF# #PROFILESTATS#PROFILEOPT5 = -DPROFILE_STATS #ENDIF# #DEBUGPROF#PROFILEOPT6 = -DDEBUG_PROF #ENDIF# #STDCXXLIB#PROFILEOPT7 = -DTAU_STDCXXLIB #ENDIF# #CRAYX1CC#PROFILEOPT7 = #ENDIF# #CRAYCC#PROFILEOPT7 = #ENDIF# #INTELTFLOP#PROFILEOPT8 = -DPOOMA_TFLOP #ENDIF# #NORTTI#PROFILEOPT9 = -DNO_RTTI #ENDIF# #RTTI#PROFILEOPT9 = -DRTTI #ENDIF# #GNU#PROFILEOPT10 = -DTAU_GNU -DTAU_DOT_H_LESS_HEADERS -fPIC #ENDIF# #APPLECXX#PROFILEOPT10 = -DTAU_GNU -DTAU_DOT_H_LESS_HEADERS -fPIC #ENDIF# #SOL2CC#PROFILEOPT10 = -DTAU_SOL2CC -DTAU_DOT_H_LESS_HEADERS #ENDIF# #SUNCC#PROFILEOPT10 = -DTAU_SOL2CC -DTAU_DOT_H_LESS_HEADERS #ENDIF# #USE_PATHCC#PROFILEOPT10 = -DTAU_DOT_H_LESS_HEADERS -fPIC -DTAU_PATHSCALE #ENDIF# #OPEN64ORC#PROFILEOPT10 = -DTAU_DOT_H_LESS_HEADERS -DTAU_OPEN64ORC -fpic #ENDIF# #CALLSTACK#PROFILEOPT11 = -DPROFILE_CALLSTACK #ENDIF# #PGI1.7#PROFILEOPT12 = -DPGI #ENDIF# #CRAYKAI#PROFILEOPT12 = -DCRAYKAI #ENDIF# #HP_FORTRAN#PROFILEOPT12 = -DHP_FORTRAN #ENDIF# #CRAYCC#PROFILEOPT13 = -h instantiate=used -DCRAYCC -DTAU_DOT_H_LESS_HEADERS #ENDIF# #CRAYX1CC#PROFILEOPT13 = -DTAU_DOT_H_LESS_HEADERS #ENDIF# #SGICC#TAU_CXX = $(CONFIG_CXX) $(ABI) $(ISA) $(USER_OPT) -LANG:std #ENDIF# #INTELCXXLIBICC#TAU_CXX = $(CONFIG_CXX) $(ABI) $(ISA) $(USER_OPT) -cxxlib-icc #ENDIF# #PTHREAD_AVAILABLE#PROFILEOPT15 = -DPTHREADS #ENDIF# #COMPAQCXX_PTHREAD#PROFILEOPT15 = -DPTHREADS -pthread #ENDIF# #TAU_SPROC#PROFILEOPT15 = -DTAU_SPROC #ENDIF# #TAU_PAPI_THREADS#PROFILEOPT15 = -DTAU_PAPI_THREADS #ENDIF# #TULIPTHREADS#PROFILEOPT16 = -DTULIPTHREADS #ENDIF# #TRACE#TRACEOPT = -DTRACING_ON #ENDIF# #TRACE#EVENTS_O = Tracer.o #ENDIF# #KTAU#KTAU_O = TauKtau.o KtauProfiler.o KtauSymbols.o #ENDIF# #KTAU_MERGE#KTAU_MERGE_O = KtauFuncInfo.o KtauMergeInfo.o ktau_syscall.o #ENDIF# #KTAU_SHCTR#KTAU_SHCTR_O = KtauCounters.o #ENDIF# #MPITRACE#TRACEOPT = -DTAU_MPITRACE -DTRACING_ON #ENDIF# #MPITRACE#EVENTS_O = Tracer.o #ENDIF# #MUSE#MUSE_O = TauMuse.o TauMuseFilters.o TauMuseHandlers.o TauMusePackages.o #ENDIF# #MUSE_EVENT#MUSE_O = TauMuse.o TauMuseFilters.o TauMuseHandlers.o TauMusePackages.o #ENDIF# #MUSE_MULTIPLE#MUSE_O = TauMuse.o TauMuseFilters.o TauMuseHandlers.o TauMusePackages.o #ENDIF# #COMPENSATE#COMPENSATE_O = TauCompensate.o #ENDIF# #PTHREAD_AVAILABLE#THR_O = PthreadLayer.o #ENDIF# #TAU_PAPI_THREADS#THR_O = PapiThreadLayer.o #ENDIF# #TAU_SPROC#THR_O = SprocLayer.o #ENDIF# #JAVA#THR_O = JavaThreadLayer.o #ENDIF# #TULIPTHREADS#THR_O = TulipThreadLayer.o #ENDIF# #LINUXTIMERS#PLATFORM_O = TauLinuxTimers.o #ENDIF# #TULIPTHREADS#PROFILEOPT17 = -I$(TULIPDIR)/include -I$(TULIPDIR)/Tuliplib #ENDIF# #SMARTS#PROFILEOPT17 = -I$(TULIPDIR)/include -I$(TULIPDIR)/lib -I$(TULIPDIR)/machine-specific/$(HOSTTYPE) #ENDIF# #SMARTS#PROFILEOPT18 = -DSMARTS #ENDIF# #KAI#PROFILEOPT19 = -DKAI -DTAU_DOT_H_LESS_HEADERS #ENDIF# #USE_DECCXX#PROFILEOPT19 = -DTAU_DOT_H_LESS_HEADERS #ENDIF# #SGICC#PROFILEOPT19 = -DTAU_DOT_H_LESS_HEADERS #ENDIF# #USE_INTELCXX#PROFILEOPT19 = -DTAU_DOT_H_LESS_HEADERS -fPIC #ENDIF# #USE_NECCXX#PROFILEOPT19 = -DTAU_DOT_H_LESS_HEADERS #ENDIF# #PGI#PROFILEOPT19 = -DTAU_DOT_H_LESS_HEADERS -fPIC #ENDIF# #ACC#PROFILEOPT19 = -AA +z -DTAU_DOT_H_LESS_HEADERS -DTAU_HPUX #ENDIF# #FUJITSU#PROFILEOPT19 = -DFUJITSU -DTAU_DOT_H_LESS_HEADERS #ENDIF# #KAINOEX#PROFILEOPT20 = --no_exceptions #ENDIF# #SGICCNOEX#PROFILEOPT20 = -LANG:exceptions=off #ENDIF# #HPGNU#PROFILEOPT21 = -fPIC #ENDIF# #HITACHI#PROFILEOPT21 = -DTAU_HITACHI #ENDIF# #SP1#PROFILEOPT21 = -D_POSIX_SOURCE -DTAU_AIX #ENDIF# #PPC64#TAU_PIC_PROFILEOPT21 = -qpic=large #ENDIF# #BGL#TAU_PIC_PROFILEOPT21 = #ENDIF# #USE_IBMXLC#PROFILEOPT21 = -DTAU_DOT_H_LESS_HEADERS -DTAU_XLC $(TAU_PIC_PROFILEOPT21) #ENDIF# #IBMXLCAPPLE#PROFILEOPT21 = -DTAU_DOT_H_LESS_HEADERS -DTAU_XLC -DTAU_APPLE_XLC #ENDIF# #PCLPTHREAD#PROFILEOPT22 = -DPCL_MUTEX_LOCK #ENDIF# #JAVA#PROFILEOPT23 = -DJAVA #ENDIF# #MONITOR#PROFILEOPT24 = -DMONITORING_ON #ENDIF# #JAVA#PROFILEOPT25 = -I$(JDKDIR)/include -I$(JDKDIR)/include/$(JDKARCH) #ENDIF# #MPI#PROFILEOPT26 = -DTAU_MPI #ENDIF# #MPI_THREADED#PROFILEOPT26 = -DTAU_MPI -DTAU_MPI_THREADED #ENDIF# #OPENMP#PROFILEOPT27 = -mp -DTAU_OPENMP#ENDIF# #GNU#PROFILEOPT27 = #ENDIF# #SOL2CC_OPENMP#PROFILEOPT27 = -xopenmp -DTAU_OPENMP#ENDIF# #SUNCC_OPENMP#PROFILEOPT27 = -xopenmp=parallel -DTAU_OPENMP#ENDIF# #SUNCC_OPENMP#PROFILEOPT27 = -xopenmp=parallel -DTAU_OPENMP#ENDIF# #HITACHI_OPENMP#PROFILEOPT27 = -DTAU_OPENMP#ENDIF# #COMPAQCXX_OPENMP#PROFILEOPT27 = -omp -DTAU_OPENMP#ENDIF# #IBMXLC_OPENMP#PROFILEOPT27 = -qsmp=omp -DTAU_OPENMP #ENDIF# #OPEN64_OPENMP#PROFILEOPT27 = -mp -DTAU_OPENMP #ENDIF# #GUIDE#PROFILEOPT27 = -DTAU_OPENMP #ENDIF# #PGIOPENMP#PROFILEOPT27 = -mp -D_OPENMP -DTAU_OPENMP -U_RWSTD_MULTI_THREAD -U_REENTRANT #ENDIF# #INTELOPENMP#PROFILEOPT27 = -openmp -DTAU_OPENMP #ENDIF# #OPARI#PROFILEOPT28 = -I$(OPARIDIR)/lib -I$(OPARIDIR)/include #ENDIF# #OPARI_REGION#PROFILEOPT28 = -DTAU_OPARI_REGION -I$(OPARIDIR)/lib -I$(OPARIDIR)/include #ENDIF# #OPARI_CONSTRUCT#PROFILEOPT28 = -DTAU_OPARI_CONSTRUCT -I$(OPARIDIR)/lib -I$(OPARIDIR)/include #ENDIF# #MULTIPLECOUNTERS#PROFILEOPT29 = -DTAU_MULTIPLE_COUNTERS #ENDIF# #SGITIMERS#PROFILEOPT30 = -DSGI_TIMERS #ENDIF# #BGLTIMERS#PROFILEOPT30 = -DBGL_TIMERS -I/bgl/BlueLight/ppcfloor/bglsys/include #ENDIF# #CRAYTIMERS#PROFILEOPT30 = -DCRAY_TIMERS #ENDIF# #LINUXTIMERS#PROFILEOPT31 = -DTAU_LINUX_TIMERS #ENDIF# #ALPHATIMERS#PROFILEOPT31 = -DTAU_ALPHA_TIMERS #ENDIF# #CPUTIME#PROFILEOPT32 = -DCPU_TIME #ENDIF# #PAPIWALLCLOCK#PROFILEOPT33 = -DTAU_PAPI_WALLCLOCKTIME #ENDIF# #PAPIVIRTUAL#PROFILEOPT34 = -DTAU_PAPI_VIRTUAL #ENDIF# #SGICOUNTERS#PROFILEOPT35 = -DSGI_HW_COUNTERS #ENDIF# #EPILOG#PROFILEOPT36 = -DTAU_EPILOG -I$(EPILOGINCDIR) #ENDIF# #VAMPIRTRACEINTS#TAU_VAMPIRTRACEOPTS = -DTAU_64BITTYPES_NEEDED -DHAVE_INTTYPES_H #ENDIF# #VAMPIRTRACE#PROFILEOPT36 = -DTAU_VAMPIRTRACE -I$(VAMPIRTRACEDIR)/vtlib -I$(VAMPIRTRACEDIR)/include $(TAU_VAMPIRTRACEOPTS)#ENDIF# #PROFILECALLPATH#PROFILEOPT36 = -DTAU_CALLPATH #ENDIF# #PROFILEPHASE#PROFILEOPT36 = -DTAU_CALLPATH -DTAU_PROFILEPHASE#ENDIF# #PYTHON#PROFILEOPT37 = -I$(PYTHON_INCDIR) #ENDIF# #NOCOMM#PROFILEOPT38 = -DTAU_NOCOMM #ENDIF# #MUSE#PROFILEOPT39 = -DTAU_MUSE #ENDIF# #SETNODE0#PROFILEOPT40 = -DTAU_SETNODE0 #ENDIF# #COMPENSATE#PROFILEOPT41 = -DTAU_COMPENSATE #ENDIF# #MUSE_EVENT#PROFILEOPT42 = -DTAU_MUSE_EVENT #ENDIF# #MUSE_MULTIPLE#PROFILEOPT43 = -DTAU_MUSE_MULTIPLE #ENDIF# #DYNINST41##PROFILEOPT44 = -DTAU_DYNINST41BUGFIX #ENDIF# # DyninstAPI v4.2.1 fixes the bug, so we don't need OPT44 anymore #PROFILEMEMORY#PROFILEOPT45 = -DTAU_PROFILEMEMORY #ENDIF# #MPIGREQUEST#PROFILEOPT46 = -DTAU_MPIGREQUEST #ENDIF# #MPIOREQUEST#PROFILEOPT47 = -DTAU_MPIOREQUEST #ENDIF# #MPIDATAREP#PROFILEOPT48 = -DTAU_MPIDATAREP #ENDIF# #MPIERRHANDLER#PROFILEOPT49 = -DTAU_MPIERRHANDLER #ENDIF# #CATAMOUNT#PROFILEOPT50 = -DTAU_CATAMOUNT #ENDIF# #MPICONSTCHAR#PROFILEOPT51 = -DTAU_MPICONSTCHAR #ENDIF# #MPIATTR#PROFILEOPT52 = -DTAU_MPIATTRFUNCTION #ENDIF# #MPITYPEEX#PROFILEOPT53 = -DTAU_MPITYPEEX #ENDIF# #MPIADDERROR#PROFILEOPT54 = -DTAU_MPIADDERROR #ENDIF# #MPINEEDSTATUSCONV#PROFILEOPT55 = -DTAU_MPI_NEEDS_STATUS #ENDIF# #DEPTHLIMIT#PROFILEOPT56 = -DTAU_DEPTH_LIMIT #ENDIF# #TAU_CHARM#PROFILEOPT57 = -DTAU_CHARM -I$(CHARMDIR)/include #ENDIF# #PROFILEHEADROOM#PROFILEOPT58 = -DTAU_PROFILEHEADROOM #ENDIF# #JAVACPUTIME#PROFILEOPT59 = -DJAVA_CPU_TIME #ENDIF# #TAU_LARGEFILE#PROFILEOPT60 = -DTAU_LARGEFILE -D_LARGEFILE64_SOURCE #ENDIF# #SHMEM#PROFILEOPT61 = -DTAU_SHMEM #ENDIF# #KTAU#PROFILEOPT62 = -DTAUKTAU -DKTAU_USER_SRC_COMPILE -I$(KTAU_INCDIR) -I$(KTAU_INCUSERDIR) -DKTAU_INCUSERDIR=\"$(KTAU_INCUSERDIR)\" -DKTAU_KALLSYMS_PATH=\"$(KTAU_KALLSYMS_PATH)\" #ENDIF# #KTAU_MERGE#PROFILEOPT63 = -DTAUKTAU_MERGE -DKTAU_USER_SRC_COMPILE -I$(KTAU_INCDIR) -DKTAU_INCUSERDIR=\"$(KTAU_INCUSERDIR)\" -DKTAU_KALLSYMS_PATH=\"$(KTAU_KALLSYMS_PATH)\" #ENDIF# #FREEBSD#PROFILEOPT64 = -DTAU_FREEBSD #ENDIF# #PROFILEPARAM#PROFILEOPT65 = -DTAU_PROFILEPARAM #ENDIF# #IBMMPI#PROFILEOPT66 = -DTAU_IBM_MPI #ENDIF# #WEAKMPIINIT#PROFILEOPT67 = -DTAU_WEAK_MPI_INIT #ENDIF# #LAMPI#PROFILEOPT68 = -DTAU_LAMPI #ENDIF# #MPICH_IGNORE_CXX_SEEK#PROFILEOPT68 = -DMPICH_IGNORE_CXX_SEEK #ENDIF# ############# RENCI Scalable Trace Lib Options ############# STFF_DIR= SDDF_DIR= #RENCI_STFF#PROFILEOPT69 = -DRENCI_STFF -I$(STFF_DIR)/include #ENDIF# #RENCI_STFF#TAU_LINKER_OPT11 = -L$(STFF_DIR)/lib -lstff -L$(SDDF_DIR)/lib -lPablo $(TAU_MPI_LIB) #ENDIF# #RENCI_STFF#RENCI_STFF_O = RenciSTFF.o #ENDIF# ############# KTAU (again) ############# #KTAU_SHCTR#PROFILEOPT70 = -DTAUKTAU_SHCTR -DKTAU_USER_SRC_COMPILE -I$(KTAU_INCDIR) -DKTAU_INCUSERDIR=\"$(KTAU_INCUSERDIR)\" -DKTAU_KALLSYMS_PATH=\"$(KTAU_KALLSYMS_PATH)\" #ENDIF# #KTAU#TAU_LINKER_OPT12 = -L$(KTAU_LIB) -lktau #ENDIF# #For F90 support for all platforms FWRAPPER = TauFMpi.o #MPI2#MPI2EXTENSIONS = TauMpiExtensions.o #ENDIF# #CRAYX1CC#MPI2EXTENSIONS = #ENDIF# #SGICOUNTERS#LEXTRA = -lperfex #ENDIF# #ALPHATIMERS#LEXTRA = -lrt #ENDIF# #SOL2#PCL_EXTRA_LIBS = -lcpc #ENDIF# #PCL#LEXTRA = -L$(PCLDIR)/lib -lpcl $(PCL_EXTRA_LIBS) #ENDIF# #PAPI#LEXTRA = $(PAPIDIR)/$(PAPISUBDIR)/libpapi.a #ENDIF# #IA64PAPI#LEXTRA = -L$(PAPIDIR)/$(PAPISUBDIR) -lpapi #ENDIF# #PAPIPFM#LEXTRA = -L$(PAPIDIR)/$(PAPISUBDIR) -lpfm -lpapi -lpfm #ENDIF# #SOL2PAPI#LEXTRA = $(PAPIDIR)/$(PAPISUBDIR)/libpapi.a -lcpc #ENDIF# #IBMPAPI#LEXTRA = $(PAPIDIR)/$(PAPISUBDIR)/libpapi.a -L/usr/lpp/pmtoolkit/lib -L/usr/pmapi/lib -lpmapi#ENDIF# #PPC64PAPI#LEXTRA = $(PAPIDIR)/$(PAPISUBDIR)/libpapi.a #ENDIF# #BGLPAPI_RTS#LEXTRA = $(PAPIDIR)/$(PAPISUBDIR)/libpapi.rts.a -L/bgl/BlueLight/ppcfloor/bglsys/lib -lbgl_perfctr.rts -lrts.rts -ldevices.rts #ENDIF# #BGLPAPI#LEXTRA = $(PAPIDIR)/$(PAPISUBDIR)/libpapi.a -L/bgl/BlueLight/ppcfloor/bglsys/lib -lbgl_perfctr.rts -lrts.rts -ldevices.rts #ENDIF# #X86_64PAPI#LEXTRA = -L$(PAPIDIR)/$(PAPISUBDIR)/ -L$(PAPIDIR)/lib64/ -lpapi -lperfctr #ENDIF# #IBM64PAPI#LEXTRA = $(PAPIDIR)/$(PAPISUBDIR)/libpapi64.a -L/usr/lpp/pmtoolkit/lib -L/usr/pmapi/lib -lpmapi #ENDIF# #IBM64PAPILINUX#LEXTRA = $(PAPIDIR)/$(PAPISUBDIR)/libpapi.a #ENDIF# #SGI64PAPI#LEXTRA = -L$(PAPIDIR)/$(PAPISUBDIR) -lpapi64 #ENDIF# #ALPHAPAPI#LEXTRA = $(PAPIDIR)/$(PAPISUBDIR)/libpapi.a /usr/lib/dcpi/dadd.a -lclu -lrt #ENDIF# # By default make TAU_PAPI_RPATH null. Support it on a compiler by compiler basis. #PAPI###TAU_PAPI_RPATH = -rpath $(PAPIDIR)/$(PAPISUBDIR) #ENDIF# #PAPI##TAU_PAPI_RPATH = #ENDIF# #PPC64PAPI#TAU_PAPI_RPATH = #ENDIF# #BGLPAPI#TAU_PAPI_RPATH = #ENDIF# #USE_INTELCXX#TAU_PAPI_RPATH = #ENDIF# #CRAYX1CC#TAU_PAPI_RPATH = #ENDIF# #PGI#TAU_PAPI_RPATH = -R $(PAPIDIR)/$(PAPISUBDIR) #ENDIF# #GNU#TAU_PAPI_RPATH = -Wl,-rpath $(PAPIDIR)/$(PAPISUBDIR) #ENDIF# #USE_PATHCC#TAU_PAPI_RPATH = #ENDIF# # if the user has specified -cc=gcc -c++=g++ -fortran=intel, we shouldn't use -rpath # because they are likely going to link with ifort #INTEL32_FORTRAN#TAU_PAPI_RPATH = #ENDIF# #SOL2PAPI#TAU_PAPI_RPATH = #ENDIF# #IBMPAPI#TAU_PAPI_RPATH = #ENDIF# #IBM64PAPI#TAU_PAPI_RPATH = #ENDIF# #PAPI#TAU_LINKER_OPT1 = $(TAU_PAPI_RPATH) #ENDIF# #PTHREAD_AVAILABLE#LEXTRA1 = -lpthread #ENDIF# #TULIPTHREADS#LEXTRA1 = -L$(TULIPDIR)/Tuliplib -ltulip #ENDIF# #SMARTS##include $(TAU_PREFIX_INSTALL_DIR)/include/makefiles/GNUmakefile-$(HOSTTYPE) #ENDIF# #SMARTS#LEXTRA1 = $(LSMARTS) #ENDIF# TAU_GCCLIB = -lgcc_s #INTEL32_ON_64#TAU_GCCLIB = -lgcc #ENDIF# #FREEBSD#TAU_GCCLIB = -lgcc #ENDIF# #BGL#TAU_GCCLIB = -lgcc #ENDIF# #GNU#TAU_FORTRANLIBS = -L$(TAUGCCLIBDIR) $(TAUGCCLIBOPTS) -lstdc++ $(TAU_GCCLIB) #ENDIF# #OPEN64ORC_FORTRAN#TAU_FORTRANLIBS = -lfortran -lffio #ENDIF# #PATHSCALE_FORTRAN#TAU_FORTRANLIBS = -lpathfstart -lpathfortran #ENDIF# #NAGWARE_FORTRAN#TAU_FORTRANLIBS = $(EXTRADIR)/lib/quickfit.o -L$(EXTRADIR)/lib -lf96 #ENDIF# #GNU_FORTRAN#TAU_FORTRANLIBS = -lg2c #ENDIF# #GNU_GFORTRAN#TAU_FORTRANLIBS = -lg2c #ENDIF# #SGI_FORTRAN#TAU_FORTRANLIBS = -lfortran -lftn #ENDIF# #USE_IBMXLC#TAU_IBM_FORTRANLIBS = -bh:4 -bpT:0x10000000 -bpD:0x20000000 /lib/crt0.o -lxlf90 -lm -lc #ENDIF# #GNU#TAU_IBM_FORTRANLIBS = -Wl,-bh:4 -Wl,-bpT:0x10000000 -Wl,-bpD:0x20000000 /lib/crt0.o -lxlf90 -lm -lc #ENDIF# #KAI#TAU_IBM_FORTRANLIBS = --backend -bh:4 --backend -bpT:0x10000000 --backend -bpD:0x20000000 /lib/crt0.o -lxlf90 -lm -lc #ENDIF# #IBM_FORTRAN#TAU_FORTRANLIBS = $(TAU_IBM_FORTRANLIBS) #ENDIF# #USE_IBMXLC#TAU_IBM64_FORTRANLIBS = -bh:4 -bpT:0x10000000 -bpD:0x20000000 -b64 /lib/crt0_64.o -lxlf90 -lm -lc #ENDIF# #GNU#TAU_IBM64_FORTRANLIBS = -Wl,-bh:4 -Wl,-bpT:0x10000000 -Wl,-bpD:0x20000000 -Wl,-b64 /lib/crt0_64.o -lxlf90 -lm -lc #ENDIF# #KAI#TAU_IBM64_FORTRANLIBS = --backend -bh:4 --backend -bpT:0x10000000 --backend -bpD:0x20000000 --backend -b64 /lib/crt0_64.o -lxlf90 -lm -lc #ENDIF# #IBM64_FORTRAN#TAU_FORTRANLIBS = $(TAU_IBM64_FORTRANLIBS) #ENDIF# #IBM64_FORTRAN#TAU_FORLIBDIR=lib64 #ENDIF# #IBM_FORTRAN#TAU_FORLIBDIR=lib #ENDIF# #BGL#TAU_FORLIBDIR=blrts_dev_lib #ENDIF# #PPC64#TAU_FORTRANLIBS = -L$(EXTRADIR)/$(TAU_FORLIBDIR) -lxlf90 -lxlfmath -lxl #ENDIF# #BGL#TAU_FORTRANLIBS = -L$(EXTRADIR)/$(TAU_FORLIBDIR) -L$(EXTRADIR)/blrts_lib -lxlf90 -lxlfmath -lxl #ENDIF# #IBMXLFAPPLE#TAU_FORTRANLIBS = -L$(EXTRADIR)/lib -lxlf90 -lxlfmath -lxl #ENDIF# #CRAY_FORTRAN#TAU_FORTRANLIBS = #ENDIF# #CRAY_X1_FORTRAN#TAU_FORTRANLIBS = #ENDIF# #PGI_FORTRAN#TAU_FORTRANLIBS = $(EXTRADIR)/lib/f90main.o -lpgf90 -lpgf90rtl -lpgf90_rpm1 -lpgf902 -lpgftnrtl #ENDIF# #HP_FORTRAN#TAU_FORTRANLIBS = -L$(EXTRADIR)/lib/pa2.0 -lF90 -lcl #ENDIF# #INTEL_FORTRAN#TAU_FORTRANLIBS = -lcprts -lPEPCF90 #ENDIF# #INTEL32_FORTRAN#TAU_FORTRANLIBS = -lcprts -lCEPCF90 -lF90 #ENDIF# #INTELIFORT#TAU_FORTRANLIBS = -lcprts #ENDIF# #INTEL81FIX#TAU_FORTRANLIBS = -L$(TAUGCCLIBDIR) $(TAUGCCLIBOPTS) -lstdc++ $(TAU_GCCLIB) -lcxa -lunwind -L$(EXTRADIR)/lib -lifcore $(EXTRADIR)/lib/for_main.o #ENDIF# #INTELCXXLIBICC#TAU_FORTRANLIBS = -lcprts -L$(EXTRADIR)/lib -lifcore $(EXTRADIR)/lib/for_main.o #ENDIF# #PGI1.7#LEXTRA = -lstd -lstrm#ENDIF# #PGI1.7#TAUHELPER = $(TAUROOT)/src/Profile/TauPGIHelper.cpp #ENDIF# # LINKER OPTIONS TAU_LINKER_OPT2 = $(LEXTRA) #ACC#TAUHELPER = -AA #ENDIF# #FUJITSU_FORTRAN#TAU_FORTRANLIBS = $(EXTRADIR)/lib/fj90rt0.o -L$(EXTRADIR)/lib -lfj9i6 -lfj9f6 -lfj9e6 #ENDIF# #FUJITSU_SOLARIS#TAU_FORTRANLIBS = $(EXTRADIR)/lib/fj90rt0.o -L$(EXTRADIR)/lib -lfj90l -lfj90f #ENDIF# #SUN_FORTRAN#TAU_FORTRANLIBS = -lfui -lfsumai -lfprodai -lfminlai -lfmaxlai -lfminvai -lfmaxvai -lfsu -lsunmath #ENDIF# #SUN_FORTRAN#TAU_FORTRANLIBS_SUN_OPTERON = -lfsu -lsunmath #ENDIF# #SUN_FORTRAN#TAU_FORTRANLIBS_SUNCC = -lfsu #ENDIF# #SUN386I#TAU_FORTRANLIBS = $(TAU_FORTRANLIBS_SUN_OPTERON) #ENDIF# #SUNX86_64#TAU_FORTRANLIBS = $(TAU_FORTRANLIBS_SUN_OPTERON) #ENDIF# #SUNCC#TAU_FORTRANLIBS = $(TAU_FORTRANLIBS_SUNCC) #ENDIF# #SOL2#EXTRALIBS = -lsocket -lnsl #ENDIF# #SUN386I#EXTRALIBS = -lsocket -lnsl -lrt #ENDIF# #SUNX86_64#EXTRALIBS = -lsocket -lnsl -lrt #ENDIF# #COMPAQ_FORTRAN#TAU_FORTRANLIBS = $(EXTRADIR)/lib/cmplrs/fort90/for_main.o -L$(EXTRADIR)/lib -L$(EXTRADIR)/lib/cmplrs/fort90 -L$(EXTRADIR)/lib/cmplrs/fort90 -lUfor -lfor -lFutil -lm -lmld -lexc -lc #ENDIF# #ABSOFT_FORTRAN#TAU_FORTRANLIBS = -L$(EXTRADIR)/lib -lfio -lf90math -lU77 -lf77math -lfio #ENDIF# #LAHEY_FORTRAN#TAU_FORTRANLIBS = $(EXTRADIR)/lib/fj90rt0.o -L$(EXTRADIR)/lib -lfj9i6 -lfj9f6 -lfj9e6 -lfccx86_6a #ENDIF# #HITACHI_FORTRAN#TAU_FORTRANLIBS = -lf90 -lhf90math #ENDIF# #NEC_FORTRAN#TAU_FORTRANLIBS = -f90lib #ENDIF# #COMPAQ_GUIDEF90#TAU_FORTRANLIBS = $(EXTRADIR)/lib/cmplrs/fort90/for_main.o -lfor #ENDIF# #HITACHI#TAU_HITACHI_EXTRA = -L/usr/local/lib -llrz32 #ENDIF# ## To use the standard F90 linker instead of TAU_LINKER + TAU_FORTRANLIBS, add #GNU#TAU_CXXLIBS = -L$(TAUGCCLIBDIR) $(TAUGCCLIBOPTS) -lstdc++ $(TAU_GCCLIB) #ENDIF# #GNU#TAU_GNUCXXLIBS = -L$(TAUGCCLIBDIR) -lstdc++ $(TAU_GCCLIB) #ENDIF# #OPEN64ORC#TAU_CXXLIBS = -lstdc++ #ENDIF# #PATHSCALE_FORTRAN#TAU_CXXLIBS = -lstdc++ #ENDIF# #LAHEY_FORTRAN#TAU_CXXLIBS = $(TAU_GNUCXXLIBS) /usr/lib/libc.a #ENDIF# #NAGWARE_FORTRAN#TAU_CXXLIBS = $(TAU_GNUCXXLIBS) /usr/lib/libc.a #ENDIF# #PGI#TAU_CXXLIBS = -lstd -lC #ENDIF# #CRAYX1CC#TAU_CXXLIBS = -L/opt/ctl/CC/CC/lib -lC #ENDIF# TAU_SGI_INIT = /usr/lib32/c++init.o #ENABLE64BIT#TAU_SGI_INIT = /usr/lib64/c++init.o #ENDIF# #ENABLEN32BIT#TAU_SGI_INIT = /usr/lib32/c++init.o #ENDIF# #ENABLE32BIT#TAU_SGI_INIT = /usr/lib/c++init.o #ENDIF# #SGICC#TAU_CXXLIBS = $(TAU_SGI_INIT) -lC #ENDIF# #APPLECXX#TAU_CXXLIBS = -lstd -lC #ENDIF# #SOL2#TAU_CXXLIBS = -lCstd -lCrun #ENDIF# #SOL2CC#TAU_CXXLIBS_SUN_OPTERON = -lCstd -lCrun #ENDIF# #SUNCC#TAU_CXXLIBS_SUNCC = -lCstd -lCrun #ENDIF# #SUN386I#TAU_CXXLIBS = $(TAU_CXXLIBS_SUN_OPTERON) #ENDIF# #SUNCC#TAU_CXXLIBS = $(TAU_CXXLIBS_SUNCC) #ENDIF# #SUNX86_64#TAU_CXXLIBS = $(TAU_CXXLIBS_SUN_OPTERON) #ENDIF# #FUJITSU_SOLARIS#TAU_CXXLIBS = -lstd -lstdm #ENDIF# #PPC64#TAU_XLCLIBS = -L$(EXTRADIRCXX)/$(TAU_FORLIBDIR) -libmc++ -lstdc++ #ENDIF# #IBMXLCAPPLE#TAU_FORLIBDIR =lib #ENDIF# #IBMXLCAPPLE#TAU_XLCLIBS = -L$(EXTRADIRCXX)/$(TAU_FORLIBDIR) -libmc++ -lstdc++ #ENDIF# #BGL#TAU_XLCLIBS = -L$(EXTRADIRCXX)/blrts_dev_lib -L$(EXTRADIRCXX)/blrts_lib -libmc++ -L/bgl/BlueLight/ppcfloor/blrts-gnu/powerpc-bgl-blrts-gnu/lib -lstdc++ #ENDIF# #SP1#TAU_XLCLIBS = -lC #ENDIF# #USE_IBMXLC#TAU_CXXLIBS = $(TAU_XLCLIBS) #ENDIF# #USE_DECCXX#TAU_CXXLIBS = -lcxxstd -lcxx #ENDIF# #USE_INTELCXX#TAU_CXXLIBS_INTEL = -lcprts -lPEPCF90 #ENDIF# #USE_INTELCXX#TAU_CXXLIBS_INTEL = -lcprts #ENDIF# #INTELIFORT#TAU_CXXLIBS_INTEL = -lcprts #ENDIF# #INTEL81FIX#TAU_CXXLIBS_INTEL = -L$(TAUGCCLIBDIR) $(TAUGCCLIBOPTS) -lstdc++ $(TAU_GCCLIB) -lcxa -lunwind#ENDIF# #INTELCXXLIBICC#TAU_CXXLIBS_INTEL = -lcprts #ENDIF# #USE_INTELCXX#TAU_CXXLIBS = $(TAU_CXXLIBS_INTEL) #ENDIF# #APPLECXX#TAU_CXXLIBS = -lstdc++ -L$(TAUGCCLIBDIR) $(TAUGCCLIBOPTS) -lgcc_s.1 -lSystemStubs #ENDIF# # EXTERNAL PACKAGES: VAMPIRTRACE #VAMPIRTRACE#TAU_LINKER_OPT3 = -L$(VAMPIRTRACEDIR)/lib -L$(VAMPIRTRACEDIR)/vtlib -lvt -lotf -lz $(TAU_HITACHI_EXTRA) #ENDIF# #VAMPIRTRACEMPI#TAU_LINKER_OPT3 = -L$(VAMPIRTRACEDIR)/lib -L$(VAMPIRTRACEDIR)/vtlib -lvt.mpi -lotf -lz $(TAU_HITACHI_EXTRA) #ENDIF# #VAMPIRTRACEOMPI#TAU_LINKER_OPT3 = -L$(VAMPIRTRACEDIR)/lib -L$(VAMPIRTRACEDIR)/vtlib -lvt.ompi -lotf -lz $(TAU_HITACHI_EXTRA) #ENDIF# #VAMPIRTRACEOMP#TAU_LINKER_OPT3 = -L$(VAMPIRTRACEDIR)/lib -L$(VAMPIRTRACEDIR)/vtlib -lvt.omp -lotf -lz $(TAU_HITACHI_EXTRA) #ENDIF# # EXTERNAL PACKAGES: EPILOG #EPILOG#TAU_LINKER_OPT3 = -L$(EPILOGLIBDIR) -lelg $(EPILOGEXTRALINKCMD) $(TAU_HITACHI_EXTRA) #ENDIF# #EPILOGMPI#TAU_LINKER_OPT3 = -L$(EPILOGLIBDIR) -lelg.mpi $(EPILOGEXTRALINKCMD) $(TAU_HITACHI_EXTRA) #ENDIF# #EPILOGOMPI#TAU_LINKER_OPT3 = -L$(EPILOGLIBDIR) -lelg.ompi $(EPILOGEXTRALINKCMD) $(TAU_HITACHI_EXTRA) #ENDIF# #EPILOGOMP#TAU_LINKER_OPT3 = -L$(EPILOGLIBDIR) -lelg.omp $(EPILOGEXTRALINKCMD) $(TAU_HITACHI_EXTRA) #ENDIF# TAU_LINKER_OPT4 = $(LEXTRA1) #HITACHI_OPENMP#TAU_LINKER_OPT4 = -lcompas -lpthreads -lc_r #ENDIF# #OPENMP#TAU_LINKER_OPT5 = -mp #ENDIF# #SOL2CC_OPENMP#TAU_LINKER_OPT5 = -xopenmp #ENDIF# #SUNCC_OPENMP#TAU_LINKER_OPT5 = -xopenmp=parallel #ENDIF# #GNU#TAU_LINKER_OPT5 = #ENDIF# #COMPAQCXX_OPENMP#TAU_LINKER_OPT5 = -omp #ENDIF# #IBMXLC_OPENMP#TAU_LINKER_OPT5 = -qsmp=omp #ENDIF# #OPEN64_OPENMP#TAU_LINKER_OPT5 = -mp #ENDIF# #GUIDE#TAU_LINKER_OPT5 = #ENDIF# #PGIOPENMP#TAU_LINKER_OPT5 = -mp #ENDIF# #INTELOPENMP#TAU_LINKER_OPT5 = -openmp #ENDIF# # MALLINFO needs -lmalloc on sgi, sun #SGIMP#TAU_LINKER_OPT6 = -lmalloc #ENDIF# #SOL2#TAU_LINKER_OPT6 = #ENDIF# #SUN386I#TAU_LINKER_OPT6 = -lmalloc #ENDIF# #SUNX86_64#TAU_LINKER_OPT6 = -lmalloc #ENDIF# # We need -lCio with SGI CC 7.4+ #SGICC#TAU_LINKER_OPT7 = -lCio #ENDIF# # charm #TAU_CHARM#TAU_LINKER_OPT8 = -lconv-core #ENDIF# # extra libs #SUN386I#TAU_LINKER_OPT9 = $(EXTRALIBS) #ENDIF# #SUNX86_64#TAU_LINKER_OPT9 = $(EXTRALIBS) #ENDIF# #SOL2#TAU_LINKER_OPT9 = $(ExTRALIBS) #ENDIF# #BGLTIMERS#TAU_LINKER_OPT10 = -L/bgl/BlueLight/ppcfloor/bglsys/lib -lrts.rts #ENDIF# #USE_IBMXLC#TAU_IBM_PYTHON_SHFLAG = -Wl,-bI:$(PYTHON_LIBDIR)/config/python.exp -Wl,-einitpytau#ENDIF# #GNU#TAU_IBM_PYTHON_SHFLAG = -Wl,-bI:$(PYTHON_LIBDIR)/config/python.exp -Wl,-einitpytau#ENDIF# #KAI#TAU_IBM_PYTHON_SHFLAG = --backend -Wl,-bI:$(PYTHON_LIBDIR)/config/python.exp --backend -Wl,-einitpytau#ENDIF# #ACC#TAU_HPUX_PYTHON_SHFLAG = -lstd_v2 -lCsup_v2 -lm -lcl -lc #ENDIF# #USE_IBMXLC#TAU_IBM_LD_FLAGS = -binitfini:poe_remote_main #ENDIF# #GNU#TAU_IBM_LD_FLAGS = -Wl,-binitfini:poe_remote_main #ENDIF# #KAI#TAU_IBM_LD_FLAGS = --backend -binitfini:poe_remote_main #ENDIF# #PYTHON#TAU_IBM_SHFLAGS = $(TAU_IBM_PYTHON_SHFLAG) #ENDIF# #PYTHON#TAU_HPUX_SHFLAGS = $(TAU_HPUX_PYTHON_SHFLAG) #ENDIF# #SP1#TAU_EXTRA_LIBRARY_FLAGS = $(TAU_IBM_SHFLAGS) #ENDIF# #SOL2#TAU_EXTRA_LIBRARY_FLAGS = #ENDIF# #SGIMP#TAU_EXTRA_LIBRARY_FLAGS = -lmalloc #ENDIF# #HP#TAU_EXTRA_LIBRARY_FLAGS = $(TAU_HPUX_SHFLAGS) #ENDIF# #MPI#TAU_MPI_WRAPPER_LIB= -L$(TAU_PREFIX_INSTALL_DIR)/$(CONFIG_ARCH)/lib -lTauMpi$(TAU_CONFIG) #ENDIF# #EPILOGMPI#TAU_MPI_WRAPPER_LIB= #ENDIF# #EPILOGOMPI#TAU_MPI_WRAPPER_LIB= #ENDIF# ############################################## # Build TAU_LINKER_SHOPTS #GNU#TAU_IBM_LINKER_SHOPTS=-Wl,-brtl -Wl,-bexpall #ENDIF# #USE_IBMXLC#TAU_IBM_LINKER_SHOPTS= -brtl -bexpall #ENDIF# #KAI#TAU_IBM_LINKER_SHOPTS= --backend -brtl #ENDIF# #SP1#TAU_LINKER_SHOPTS= $(TAU_IBM_LINKER_SHOPTS) #ENDIF# ############################################## # MPI _r suffix check (as in libmpi_r) #MPI_R_SUFFIX#TAU_MPI_R_SUFFIX=_r #ENDIF# ############################################## # Flags to build a shared object: TAU_SHFLAGS #GNU#AR_SHFLAGS = -shared #ENDIF# #PGI#AR_SHFLAGS = -shared #ENDIF# #SGICC#AR_SHFLAGS = -shared #ENDIF# #APPLECXX#AR_SHFLAGS = -dynamiclib -flat_namespace -undefined suppress #ENDIF# #SOL2#AR_SHFLAGS = -G #ENDIF# #SUN386I#AR_SHFLAGS = -G #ENDIF# #SUNX86_64#AR_SHFLAGS = -G #ENDIF# #USE_IBMXLC#AR_SHFLAGS = -G #ENDIF# #USE_DECCXX#AR_SHFLAGS = -shared #ENDIF# #USE_INTELCXX#AR_SHFLAGS = -shared #ENDIF# #ACC#AR_SHFLAGS = -b #ENDIF# TAU_SHFLAGS = $(AR_SHFLAGS) -o ############# RANLIB Options ############# TAU_RANLIB = echo "Built" #APPLECXX#TAU_RANLIB = ranlib #ENDIF# #IBMXLCAPPLE#TAU_RANLIB = ranlib #ENDIF# ############################################## TAU_AR = ar #ENDIF# #SP1#TAU_AR = ar -X32 #ENDIF# #IBM64#TAU_AR = ar -X64 #ENDIF# #PPC64#TAU_AR = ar #ENDIF# #IBM64LINUX#TAU_AR = ar #ENDIF# ############################################## # PDT OPTIONS # You can specify -pdtcompdir=intel -pdtarchdir=x86_64 # If nothing is specified, PDTARCHDIR uses TAU_ARCH PDTARCHDIRORIG=$(TAU_ARCH) PDTARCHITECTURE=x86_64 PDTARCHDIRFINAL=$(PDTARCHDIRORIG) #PDTARCHITECTURE#PDTARCHDIRFINAL=$(PDTARCHITECTURE)#ENDIF# PDTARCHDIR=$(PDTARCHDIRFINAL) #PDTARCH#PDTARCHDIR=$(PDTARCHDIRFINAL)/$(PDTCOMPDIR)#ENDIF# ############################################## PROFILEOPTS = $(PROFILEOPT1) $(PROFILEOPT2) $(PROFILEOPT3) $(PROFILEOPT4) \ $(PROFILEOPT5) $(PROFILEOPT6) $(PROFILEOPT7) $(PROFILEOPT8) \ $(PROFILEOPT9) $(PROFILEOPT10) $(PROFILEOPT11) $(PROFILEOPT12) \ $(PROFILEOPT13) $(PROFILEOPT14) $(PROFILEOPT15) $(PROFILEOPT16) \ $(PROFILEOPT17) $(PROFILEOPT18) $(PROFILEOPT19) $(PROFILEOPT20) \ $(PROFILEOPT21) $(PROFILEOPT22) $(PROFILEOPT23) $(PROFILEOPT24) \ $(PROFILEOPT25) $(PROFILEOPT26) $(PROFILEOPT27) $(PROFILEOPT28) \ $(PROFILEOPT29) $(PROFILEOPT30) $(PROFILEOPT31) $(PROFILEOPT32) \ $(PROFILEOPT33) $(PROFILEOPT34) $(PROFILEOPT35) $(PROFILEOPT36) \ $(PROFILEOPT37) $(PROFILEOPT38) $(PROFILEOPT39) $(PROFILEOPT40) \ $(PROFILEOPT41) $(PROFILEOPT42) $(PROFILEOPT43) $(PROFILEOPT44) \ $(PROFILEOPT45) $(PROFILEOPT46) $(PROFILEOPT47) $(PROFILEOPT48) \ $(PROFILEOPT49) $(PROFILEOPT50) $(PROFILEOPT51) $(PROFILEOPT52) \ $(PROFILEOPT53) $(PROFILEOPT54) $(PROFILEOPT55) $(PROFILEOPT56) \ $(PROFILEOPT57) $(PROFILEOPT58) $(PROFILEOPT59) $(PROFILEOPT60) \ $(PROFILEOPT61) $(PROFILEOPT62) $(PROFILEOPT63) $(PROFILEOPT64) \ $(PROFILEOPT65) $(PROFILEOPT66) $(PROFILEOPT67) $(PROFILEOPT68) \ $(PROFILEOPT69) $(PROFILEOPT70) \ $(TRACEOPT) ############################################## TAU_LINKER_OPTS = $(TAU_LINKER_OPT1) $(TAU_LINKER_OPT2) $(TAU_LINKER_OPT3) \ $(TAU_LINKER_OPT4) $(TAU_LINKER_OPT5) $(TAU_LINKER_OPT6) \ $(TAU_LINKER_OPT7) $(TAU_LINKER_OPT8) $(TAU_LINKER_OPT9) \ $(TAU_LINKER_OPT10) $(TAU_LINKER_OPT11) $(TAU_LINKER_OPT12) ############################################## ############# TAU Fortran #################### TAU_LINKER=$(TAU_CXX) #INTEL_FORTRAN##TAU_LINKER=$(TAU_F90) #ENDIF# #INTEL32_FORTRAN##TAU_LINKER=$(TAU_F90) #ENDIF# # Intel efc compiler acts as a linker - NO. Let C++ be the linker. ############################################## ############# TAU Options #################### TAUDEFS = $(PROFILEOPTS) TAUINC = -I$(TAU_PREFIX_INSTALL_DIR)/include TAULIBS = $(TAUHELPER) -L$(TAU_PREFIX_INSTALL_DIR)/$(CONFIG_ARCH)/lib -ltau$(TAU_CONFIG) $(TAU_LINKER_OPTS) TAUMPILIBS = $(TAU_MPI_LIB) TAUMPIFLIBS = $(TAU_MPI_FLIB) ### ACL S/W requirement TAU_DEFS = $(TAUDEFS) TAU_INCLUDE = -I$(TAU_PREFIX_INSTALL_DIR)/include #PERFLIB#TAU_INCLUDE = -I$(PERFINCDIR) #ENDIF# #PERFLIB#TAU_DEFS = #ENDIF# #PERFLIB#TAU_COMPILER_EXTRA_OPTIONS=-optTau=-p #ENDIF# TAU_INCLUDE_MEMORY = -I$(TAU_PREFIX_INSTALL_DIR)/include/Memory #IBMXLCAPPLE#TAU_INCLUDE_MEMORY = -I$(TAU_PREFIX_INSTALL_DIR)/include/MemoryWrapper #ENDIF# #APPLECXX#TAU_INCLUDE_MEMORY = -I$(TAU_PREFIX_INSTALL_DIR)/include/MemoryWrapper #ENDIF# TAU_LIBS = $(TAUHELPER) -L$(TAU_PREFIX_INSTALL_DIR)/$(CONFIG_ARCH)/lib -ltau$(TAU_CONFIG) $(TAU_LINKER_OPTS) #PERFLIB#TAU_LIBS = #ENDIF# TAU_SHLIBS = $(TAUHELPER) -L$(TAU_PREFIX_INSTALL_DIR)/$(CONFIG_ARCH)/lib -lTAUsh$(TAU_CONFIG) $(TAU_LINKER_OPTS) $(TAU_LINKER_SHOPTS) $(TAU_MPI_LIB) #PERFLIB#TAU_SHLIBS = #ENDIF# TAU_EXLIBS = $(TAUHELPER) -L$(TAU_PREFIX_INSTALL_DIR)/$(CONFIG_ARCH)/lib -lTAU $(TAU_LINKER_OPTS) $(TAU_LINKER_SHOPTS) $(TAU_MPI_LIB) TAU_SHLIBS_NOSHOPTS = $(TAUHELPER) -L$(TAU_PREFIX_INSTALL_DIR)/$(CONFIG_ARCH)/lib -lTAUsh$(TAU_CONFIG) $(TAU_LINKER_OPTS) TAU_DISABLE = $(TAUHELPER) -L$(TAU_PREFIX_INSTALL_DIR)/$(CONFIG_ARCH)/lib -lTauDisable TAU_MPI_INCLUDE = $(TAU_MPI_INC) TAU_MPI_LIBS = $(TAU_MPI_LIB) TAU_MPI_FLIBS = $(TAU_MPI_FLIB) ## TAU TRACE INPUT LIBRARY (can build a trace converter using TAU TIL) TAU_TRACE_INPUT_LIB = -L$(TAU_PREFIX_INSTALL_DIR)/$(CONFIG_ARCH)/lib -lTAU_traceinput$(TAU_CONFIG) ## Don't include -lpthread or -lsmarts. Let app. do that. ############################################# ## IBM SPECIFIC CHANGES TO TAU_MPI_LIBS #SP1#TAU_MPI_LDFLAGS = $(TAU_IBM_LD_FLAGS) #ENDIF# #MPI#TAU_LDFLAGS = $(TAU_MPI_LDFLAGS) #ENDIF# #SP1#TAU_IBM_MPI_LIBS = $(TAU_MPI_LIB) -L$(TAU_MPILIB_DIR)/ip -lvtd$(TAU_MPI_R_SUFFIX) #ENDIF# #SP1#TAU_IBM_FMPI_LIBS = $(TAU_MPI_FLIB) -L$(TAU_MPILIB_DIR)/ip -lvtd$(TAU_MPI_R_SUFFIX) #ENDIF# #SP1#TAU_MPI_LIBS_FLAGS= $(TAU_IBM_MPI_LIBS) #ENDIF# #SP1#TAU_MPI_FLIBS_FLAGS = $(TAU_IBM_MPI_FLIBS) #ENDIF# #MPI#TAU_MPI_LIBS_FLAGS = $(TAU_MPI_LIB) #ENDIF# #MPI#TAU_MPI_FLIBS_FLAGS = $(TAU_MPI_FLIB) #ENDIF# #MPI#TAU_MPI_LIBS = $(TAU_MPI_LIBS_FLAGS) #ENDIF# #MPI#TAU_MPI_FLIBS = $(TAU_MPI_FLIBS_FLAGS) #ENDIF# #SP1#TAUMPILIBS = $(TAU_MPI_LIBS) #ENDIF# #SP1#TAUMPIFLIBS = $(TAU_MPI_FLIBS) #ENDIF# ############################################# #SHMEM#TAU_SHMEM_OBJS = TauShmemCray.o #ENDIF# #SP1#TAU_SHMEM_OBJS = TauShmemTurbo.o #ENDIF# #GPSHMEM#TAU_SHMEM_OBJS = TauShmemGpshmem.o #ENDIF# TAU_SHMEM_INCLUDE = $(TAU_SHMEM_INC) TAU_SHMEM_LIBS = -L$(TAU_PREFIX_INSTALL_DIR)/$(CONFIG_ARCH)/ -lTauShmem$(TAU_CONFIG) $(TAU_SHMEM_LIB) ############################################# # TAU COMPILER SHELL SCRIPT OPTIONS TAUCOMPILEROPTS= -optPdtDir="$(PDTDIR)/${PDTARCHDIR}"\ -optPdtCOpts="$(TAU_INCLUDE) $(TAU_DEFS) $(TAU_MPI_INCLUDE)"\ -optPdtCxxOpts="$(TAU_INCLUDE) $(TAU_DEFS) $(TAU_MPI_INCLUDE)"\ -optTauInstr="$(TAU_PREFIX_INSTALL_DIR)/$(CONFIG_ARCH)/bin/tau_instrumentor" \ -optNoMpi \ -optOpariDir="$(OPARIDIR)" -optOpariTool="$(TAU_OPARI_TOOL)" \ -optTauCC="$(TAU_CC)" \ -optTauIncludes="$(TAU_INCLUDE) $(TAU_MPI_INCLUDE)" \ -optTauDefs="$(TAU_DEFS)" \ -optTauCompile="$(TAU_INCLUDE) $(TAU_MPI_INCLUDE) $(TAU_DEFS) "\ -optLinking="$(TAU_MPI_FLIBS) $(TAU_LIBS) $(TAU_LDFLAGS) $(TAU_CXXLIBS)"\ -optSharedLinking="$(TAU_MPI_FLIBS) $(TAU_EXLIBS) $(TAU_LDFLAGS) $(TAU_CXXLIBS)"\ $(TAU_COMPILER_EXTRA_OPTIONS) \ -optIncludeMemory="$(TAU_INCLUDE_MEMORY)" ############################################# TAU_COMPILER=$(TAU_PREFIX_INSTALL_DIR)/$(CONFIG_ARCH)/bin/tau_compiler.sh $(TAUCOMPILEROPTS) ############################################# # These options could be included in the application Makefile as #CFLAGS = $(TAUDEFS) $(TAUINC) # #LIBS = $(TAULIBS) # # To run the application without Profiling/Tracing use #CFLAGS = $(TAUINC) # Don't use TAUDEFS but do include TAUINC # Also ignore TAULIBS when Profiling/Tracing is not used. ############################################# tau-2.16.4/include/Memory/000077500000000000000000000000001062343042700152715ustar00rootroot00000000000000tau-2.16.4/include/Memory/malloc.h000066400000000000000000000062151062343042700167150ustar00rootroot00000000000000/**************************************************************************** ** TAU Portable Profiling Package ** ** http://www.cs.uoregon.edu/research/paracomp/tau ** ***************************************************************************** ** Copyright 2004 ** ** Department of Computer and Information Science, University of Oregon ** ** Advanced Computing Laboratory, Los Alamos National Laboratory ** ****************************************************************************/ /*************************************************************************** ** File : TauHandler.cpp ** ** Description : TAU Profiling Package ** ** Author : Sameer Shende ** ** Contact : sameer@cs.uoregon.edu sameer@acl.lanl.gov ** ** Documentation : See http://www.cs.uoregon.edu/research/tau ** ***************************************************************************/ #ifndef _TAU_MALLOC_H_ #define _TAU_MALLOC_H_ #define _MALLOC_H 1 #include #include /* needed for Linux stdlib.h */ #define __malloc_and_calloc_defined #define __need_malloc_and_calloc #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ void *malloc (size_t size); void *Tau_malloc_C( const char *file, int line, size_t size); void Tau_free_C(const char *file, int line, void *p); void *Tau_realloc_C(const char *file, int line, void *p, size_t size); void free(void *p); void *calloc(size_t nmemb, size_t size); void *realloc(void *ptr, size_t size); #ifdef __cplusplus } #endif /* __cplusplus */ /* ////////////////////////////////////////////////////////////////////// // Include Files ////////////////////////////////////////////////////////////////////// */ /********************************************************************/ /* For further details see David Mazieres (NYU) article: * http://www.scs.cs.nyu.edu/~dm/c++-new.html * The above article describes the core design ideas on which the * TAU memory allocator is based */ /********************************************************************/ #include #ifndef TAU_USE_CXX_MALLOC_API /* For C */ /* void *Tau_malloc_C( const char *file, int line, size_t size); */ #define malloc(size) Tau_malloc_C(__FILE__, __LINE__, size) /* void free (void *); void Tau_free_C(const char *file, int line, void *p); */ #define free(p) Tau_free_C(__FILE__, __LINE__, p) #define realloc(p, s) Tau_realloc_C(__FILE__, __LINE__, p, s) #else /* TAU_USE_CXX_MALLOC_API */ /* For C++ */ class TauVoidPointer { void *p; public: TauVoidPointer (void *pp) : p (pp) { } template operator T *() { return (T *) p; } }; TauVoidPointer Tau_malloc(const char *file, int line, size_t size); void Tau_free(const char *file, int line, TauVoidPointer p); #define malloc(size) Tau_malloc(__FILE__, __LINE__, size) #define free(p) Tau_free(__FILE__, __LINE__, p) #endif /* TAU_USE_CXX_MALLOC_API */ #endif /* _TAU_MALLOC_H_ */ tau-2.16.4/include/Profile/000077500000000000000000000000001062343042700154215ustar00rootroot00000000000000tau-2.16.4/include/Profile/FunctionInfo.h000066400000000000000000000300141062343042700201710ustar00rootroot00000000000000/**************************************************************************** ** TAU Portable Profiling Package ** ** http://www.cs.uoregon.edu/research/tau ** ***************************************************************************** ** Copyright 1997 ** ** Department of Computer and Information Science, University of Oregon ** ** Advanced Computing Laboratory, Los Alamos National Laboratory ** ****************************************************************************/ /*************************************************************************** ** File : FunctionInfo.h ** ** Description : TAU Profiling Package ** ** Author : Sameer Shende ** ** Contact : sameer@cs.uoregon.edu sameer@acl.lanl.gov ** ** Flags : Compile with ** ** -DPROFILING_ON to enable profiling (ESSENTIAL) ** ** -DPROFILE_STATS for Std. Deviation of Excl Time ** ** -DSGI_HW_COUNTERS for using SGI counters ** ** -DPROFILE_CALLS for trace of each invocation ** ** -DSGI_TIMERS for SGI fast nanosecs timer ** ** -DTULIP_TIMERS for non-sgi Platform ** ** -DPOOMA_STDSTL for using STD STL in POOMA src ** ** -DPOOMA_TFLOP for Intel Teraflop at SNL/NM ** ** -DPOOMA_KAI for KCC compiler ** ** -DDEBUG_PROF for internal debugging messages ** ** -DPROFILE_CALLSTACK to enable callstack traces ** ** Documentation : See http://www.cs.uoregon.edu/research/tau ** ***************************************************************************/ #ifndef _FUNCTIONINFO_H_ #define _FUNCTIONINFO_H_ ///////////////////////////////////////////////////////////////////// // // class FunctionInfo // // This class is intended to be instantiated once per function // (or other code block to be timed) as a static variable. // // It will be constructed the first time the function is called, // and that constructor registers this object (and therefore the // function) with the timer system. // ////////////////////////////////////////////////////////////////////// #define TAU_STORAGE(type, variable) type variable[TAU_MAX_THREADS] #ifdef TAU_MULTIPLE_COUNTERS #define TAU_MULTSTORAGE(type, variable) type variable[TAU_MAX_THREADS][MAX_TAU_COUNTERS] #endif//TAU_MULTIPLE_COUNTERS #if defined(TAUKTAU) && defined(TAUKTAU_MERGE) #include #endif /* TAUKTAU && TAUKTAU_MERGE */ #ifdef RENCI_STFF #include "Profile/RenciSTFF.h" #endif //RENCI_STFF class TauUserEvent; class FunctionInfo { public: // Construct with the name of the function and its type. FunctionInfo(const char* name, const char * type, TauGroup_t ProfileGroup = TAU_DEFAULT, const char *ProfileGroupName = "TAU_DEFAULT", bool InitData = true, int tid = RtsLayer::myThread()); FunctionInfo(const char* name, const string& type, TauGroup_t ProfileGroup = TAU_DEFAULT, const char *ProfileGroupName = "TAU_DEFAULT", bool InitData = true, int tid = RtsLayer::myThread()); FunctionInfo(const string& name, const string& type, TauGroup_t ProfileGroup = TAU_DEFAULT, const char *ProfileGroupName = "TAU_DEFAULT", bool InitData = true, int tid = RtsLayer::myThread()); FunctionInfo(const string& name, const char * type, TauGroup_t ProfileGroup = TAU_DEFAULT, const char *ProfileGroupName = "TAU_DEFAULT", bool InitData = true, int tid = RtsLayer::myThread()); FunctionInfo(const FunctionInfo& X) ; // When we exit, we have to clean up. ~FunctionInfo(); FunctionInfo& operator= (const FunctionInfo& X) ; void FunctionInfoInit(TauGroup_t PGroup, const char *PGroupName, bool InitData, int tid ); #if defined(TAUKTAU) && defined(TAUKTAU_MERGE) KtauFuncInfo* GetKtauFuncInfo(int tid) { return &(KernelFunc[tid]); } #endif /* TAUKTAU && TAUKTAU_MERGE */ #ifndef TAU_MULTIPLE_COUNTERS // Tell it about a function call finishing. inline void ExcludeTime(double t, int tid); // Removing void IncludeTime(double t, int tid); // and replacing with inline void AddInclTime(double t, int tid); inline void AddExclTime(double t, int tid); #else//TAU_MULTIPLE_COUNTERS inline void ExcludeTime(double *t, int tid); inline void AddInclTime(double *t, int tid); inline void AddExclTime(double *t, int tid); #endif//TAU_MULTIPLE_COUNTERS inline void IncrNumCalls(int tid); inline void IncrNumSubrs(int tid); inline bool GetAlreadyOnStack(int tid); inline void SetAlreadyOnStack(bool value, int tid); // A container of all of these. // The ctor registers with this. //static TAU_STD_NAMESPACE vector FunctionDB[TAU_MAX_THREADS]; #ifdef PROFILE_CALLS std::list < std::pair > *ExclInclCallList; // Make this a ptr to a list so that ~FunctionInfo doesn't destroy it. // time spent in each call int AppendExclInclTimeThisCall(double ex, double in); // to ExclInclCallList #endif // PROFILE_CALLS #ifdef TAU_PROFILEMEMORY TauUserEvent * MemoryEvent; TauUserEvent * GetMemoryEvent(void) { return MemoryEvent; } #endif // TAU_PROFILEMEMORY #ifdef TAU_PROFILEHEADROOM TauUserEvent * HeadroomEvent; TauUserEvent * GetHeadroomEvent(void) { return HeadroomEvent; } #endif // TAU_PROFILEHEADROOM #ifdef RENCI_STFF #ifndef TAU_MULTIPLE_COUNTERS // signatures for inclusive time for each thread TAU_STORAGE(ApplicationSignature*, Signatures); ApplicationSignature* GetSignature(int tid) { return Signatures[tid]; } void SetSignature(ApplicationSignature *sig, int tid) { Signatures[tid] = sig; } #else // TAU_MULTIPLE_COUNTERS // signatures for inclusive time for each counter in each thread TAU_MULTSTORAGE(ApplicationSignature*, Signatures); ApplicationSignature** GetSignature(int tid) { return Signatures[tid]; } #endif // TAU_MULTIPLE_COUNTERS #endif //RENCI_STFF #ifdef PROFILE_CALLSTACK double InclTime_cs; double ExclTime_cs; #endif // PROFILE_CALLSTACK private: // A record of the information unique to this function. // Statistics about calling this function. #if defined(TAUKTAU) && defined(TAUKTAU_MERGE) TAU_STORAGE(KtauFuncInfo, KernelFunc); #endif /* KTAU && KTAU_MERGE */ TAU_STORAGE(long, NumCalls); TAU_STORAGE(long, NumSubrs); #ifndef TAU_MULTIPLE_COUNTERS TAU_STORAGE(double, ExclTime); TAU_STORAGE(double, InclTime); #else //TAU_MULTIPLE_COUNTERS TAU_MULTSTORAGE(double, ExclTime); TAU_MULTSTORAGE(double, InclTime); #endif//TAU_MULTIPLE_COUNTERS TAU_STORAGE(bool, AlreadyOnStack); #ifdef PROFILE_STATS TAU_STORAGE(double, SumExclSqr); #endif //PROFILE_STATS public: string Name; string Type; string GroupName; string AllGroups; long FunctionId; // Cough up the information about this function. void SetName(string& str) { Name = str; } const char* GetName() const { return Name.c_str(); } void SetType(string& str) { Type = str; } const char* GetType() const { return Type.c_str(); } const char* GetPrimaryGroup() const { return GroupName.c_str(); } const char* GetAllGroups() const { return AllGroups.c_str(); } void SetPrimaryGroupName(const char *newname) { GroupName = newname; AllGroups = newname; /* to make it to the profile */ } void SetPrimaryGroupName(string newname) { GroupName = newname; AllGroups = newname; /* to make it to the profile */ } long GetFunctionId() ; long GetCalls(int tid) { return NumCalls[tid]; } void SetCalls(int tid, long calls) { NumCalls[tid] = calls; } long GetSubrs(int tid) { return NumSubrs[tid]; } void SetSubrs(int tid, long subrs) { NumSubrs[tid] = subrs; } void ResetExclTimeIfNegative(int tid); #ifndef TAU_MULTIPLE_COUNTERS double GetExclTime(int tid) { return ExclTime[tid]; } void SetExclTime(int tid, double excltime) { ExclTime[tid] = excltime; } double GetInclTime(int tid) { return InclTime[tid]; } void SetInclTime(int tid, double incltime) { InclTime[tid] = incltime; } #else//TAU_MULTIPLE_COUNTERS //Returns the array of exclusive counter values. //double * GetExclTime(int tid) { return ExclTime[tid]; } double * GetExclTime(int tid); void SetExclTime(int tid, double *excltime) { for(int i=0;i& TheFunctionDB(void); int& TheSafeToDumpData(void); int& TheUsingDyninst(void); // // For efficiency, make the timing updates inline. // #ifndef TAU_MULTIPLE_COUNTERS inline void FunctionInfo::ExcludeTime(double t, int tid) { // called by a function to decrease its parent functions time ExclTime[tid] -= t; // exclude from it the time spent in child function } inline void FunctionInfo::AddInclTime(double t, int tid) { InclTime[tid] += t; // Add Inclusive time } inline void FunctionInfo::AddExclTime(double t, int tid) { ExclTime[tid] += t; // Add Total Time to Exclusive time (-ve) } #else //TAU_MULTIPLE_COUNTERS inline void FunctionInfo::ExcludeTime(double *t, int tid) { // called by a function to decrease its parent functions time // exclude from it the time spent in child function for(int i=0;i class JavaThreadLayer { // Layer for JavaThreadLayer to interact with Java Threads public: JavaThreadLayer () { } // defaults ~JavaThreadLayer () { } static int * RegisterThread(JNIEnv * env_id); static int InitializeThreadData(void); // init thread mutexes static int InitializeDBMutexData(void); // init tauDB mutex static int InitializeEnvMutexData(void); // init tauEnv mutex static int GetThreadId(void); // gets 0..N-1 thread id static int GetThreadId(JNIEnv *env_id); // gets 0..N-1 thread id static int LockDB(void); // locks the tauDBMutex static int UnLockDB(void); // unlocks the tauDBMutex static int LockEnv(void); // locks the tauEnvMutex static int UnLockEnv(void); // unlocks the tauEnvMutex static int TotalThreads(void); // returns the thread count // return the current thread's cpu time, in nanoseconds (as reported by jvmpi) static jlong getCurrentThreadCpuTime(void); static JVMPI_Interface *tau_jvmpi_interface; static JavaVM *tauVM; // Virtual machine private: static int tauThreadCount; // Number of threads static JVMPI_RawMonitor tauNumThreadsLock; // to protect counter static JVMPI_RawMonitor tauDBMutex; // to protect counter static JVMPI_RawMonitor tauEnvMutex; // second mutex }; #endif // JAVA #endif // _JAVATHREADLAYER_H_ /*************************************************************************** * $RCSfile: JavaThreadLayer.h,v $ $Author: amorris $ * $Revision: 1.4 $ $Date: 2005/11/11 03:46:47 $ * POOMA_VERSION_ID: $Id: JavaThreadLayer.h,v 1.4 2005/11/11 03:46:47 amorris Exp $ ***************************************************************************/ tau-2.16.4/include/Profile/KtauCounters.h000066400000000000000000000050211062343042700202170ustar00rootroot00000000000000/**************************************************************************** ** TAU Portable Profiling Package ** ** http://www.cs.uoregon.edu/research/tau ** ***************************************************************************** ** Copyright 1997-2006 ** ** Department of Computer and Information Science, University of Oregon ** ** Advanced Computing Laboratory, Los Alamos National Laboratory ** ****************************************************************************/ /**************************************************************************** ** File : KtauCounters.h ** ** Description : TAU Profiling Package ** ** Contact : anataraj@cs.uoregon.edu ** ** Documentation : See http://www.cs.uoregon.edu/research/tau ** ****************************************************************************/ #ifndef _KTAU_COUNTERS_H_ #define _KTAU_COUNTERS_H_ #ifdef TAU_MULTIPLE_COUNTERS #ifdef TAUKTAU_SHCTR extern "C" { #include } /* This wraps the shared-ctr * * ptr - so as to dealloc is * * on program termination. * * the obj. will be class- * * -static. */ class KtauCtrThread { public: int ThreadID; ktau_ushcont* shcont; ktau_ush_ctr* shctr; unsigned long long* CounterValues; KtauCtrThread() { ThreadID = -1; shcont = NULL; shctr = NULL; CounterValues = NULL; } ~KtauCtrThread(); private: //protect copy cons - dont allow it to be called //This is so that same shctr is not destructed twice! KtauCtrThread(KtauCtrThread& ref) {} }; #define KTAU_CTRSYM_MAXSZ 32 #define KTAU_SHCTR_NOTYPE 0 #define KTAU_SHCTR_INCL 1 #define KTAU_SHCTR_CNT 2 #define KTAU_SHCTR_EXCL 3 class KtauCounters { public: static int initializeKtauCounters(bool lock = true); static int initializeSingleCounter(); static long long *getAllCounters(int tid, int *numValues); static long long getSingleCounter(int tid); static int reinitializeKtauCtr(void); static int addCounter(char *name); static int RegisterFork(int type); private: static int initializeThread(int tid); static int initializeKtauCtr(void); static bool ktauInitialized; static KtauCtrThread ThreadList[TAU_MAX_THREADS]; static int numCounters; static unsigned long counterList[MAX_TAU_COUNTERS]; static char counterSyms[MAX_TAU_COUNTERS][KTAU_CTRSYM_MAXSZ]; }; #endif /* TAU_MULTIPLE_COUNTERS */ #endif /* TAUKTAU_SHCTR */ #endif /* _KTAU_COUNTERS_H_ */ tau-2.16.4/include/Profile/KtauFuncInfo.h000077500000000000000000000104651062343042700201370ustar00rootroot00000000000000/**************************************************************************** ** TAU Portable Profiling Package ** ** http://www.acl.lanl.gov/tau ** ***************************************************************************** ** Copyright 1997 ** ** Department of Computer and Information Science, University of Oregon ** ** Advanced Computing Laboratory, Los Alamos National Laboratory ** ****************************************************************************/ /*************************************************************************** ** File : KtauFuncInfo.h ** ** Description : TAU Kernel Profiling Interface ** ** Author : Aroon Nataraj ** ** : Suravee Suthikulpanit ** ** Contact : {anataraj,suravee}@cs.uoregon.edu ** ** Flags : Compile with ** ** -DTAU_KTAU to enable KTAU ** ** Documentation : ** ***************************************************************************/ #ifndef _KTAUFUNCINFO_H_ #define _KTAUFUNCINFO_H_ #include #if (defined(PTHREADS) || defined(TULIPTHREADS) || defined(JAVA) || defined(TAU_WINDOWS) || defined (TAU_OPENMP) || defined (TAU_SPROC)) #ifndef TAU_MAX_THREADS #ifdef TAU_CHARM #define TAU_MAX_THREADS 512 #else #define TAU_MAX_THREADS 128 #endif #endif //ifndef TAU_MAX_THREADS #else #define TAU_MAX_THREADS 1 #endif //defined(PTHREADS) || defined(TULIPTHREADS) || defined(JAVA) || defined(TAU_WINDOWS) || defined (TAU_OPENMP) || defined (TAU_SPROC) class KtauFuncInfo { public: KtauFuncInfo(); ~KtauFuncInfo(); unsigned long long GetInclTicks(int grp) { return inclticks[grp]; } void AddInclTicks(unsigned long long ticks, int grp) { inclticks[grp] += ticks; } unsigned long long GetExclTicks(int grp) { return exclticks[grp]; } void AddExclTicks(unsigned long long ticks, int grp) { exclticks[grp] += ticks; } unsigned long long GetInclKExcl(int grp) { return inclKExcl[grp]; } void AddInclKExcl(unsigned long long ticks, int grp) { inclKExcl[grp] += ticks; } unsigned long long GetExclKExcl(int grp) { return exclKExcl[grp]; } void AddExclKExcl(unsigned long long ticks, int grp) { exclKExcl[grp] += ticks; } unsigned long long GetInclCalls(int grp) { return inclcalls[grp]; } void AddInclCalls(unsigned long long calls, int grp) { inclcalls[grp] += calls; } unsigned long long GetExclCalls(int grp) { return exclcalls[grp]; } void AddExclCalls(unsigned long long calls, int grp) { exclcalls[grp] += calls; } unsigned long long GetKernelGrpCalls(int tid, int grp) { return kernelGrpCalls[tid][grp];} unsigned long long GetKernelGrpIncl(int tid, int grp) { return kernelGrpIncl[tid][grp];} unsigned long long GetKernelGrpExcl(int tid, int grp) { return kernelGrpExcl[tid][grp];} void ResetCounters(int tid, int grp) { inclticks[grp] = exclticks[grp] = inclKExcl[grp] = exclKExcl[grp] = inclcalls[grp] = exclcalls[grp] = 0; } void ResetAllCounters(int tid) { for(int i = 0; i class KtauMergeInfo { public: //PUBLIC KtauMergeInfo() { for(int i=0; i #include #include #include extern double KTauGetMHz(void); class KtauProfiler { public: //PUBLIC // managing thread-specific life-cycle using factory methods static KtauProfiler* GetKtauProfiler(int tid = RtsLayer::myThread()); static void PutKtauProfiler(int tid = RtsLayer::myThread()); //Instrumentation Methods void Start(Profiler *profiler, int tid = RtsLayer::myThread()); void Stop(Profiler *profiler, bool AddInclFlag, int tid = RtsLayer::myThread()); //RegisterFork - to handle forking void RegisterFork(Profiler* profiler, int nodeid, int tid, enum TauFork_t opcode); //output functions static FILE* OpenOutStream(char* dirname, int node, int context, int tid); static void CloseOutStream(FILE* ktau_fp); int SetStartState(ktau_state* pstate, Profiler* pProfiler, int tid, bool stackTop); int SetStopState(ktau_state* pstate, bool AddInclFlag, Profiler* pProfiler, int tid, bool stackTop); int VerifyMerge(FunctionInfo* thatFunction); static KtauSymbols& getKtauSym() { return KtauSym; } //The actual profile state TauKtau KernProf; ~KtauProfiler(); private: //PRIVATE //cons KtauProfiler(); KtauProfiler(int tid); /* private so that only factory-methods can be used */ //data members int tid; //thread-id #ifdef TAUKTAU_MERGE //merge related ktau_state* current_ktau_state; volatile int active_merge_index; #endif /* TAUKTAU_MERGE */ //statics //------- static KtauProfiler * CurrentKtauProfiler[TAU_MAX_THREADS]; static long long refCount[TAU_MAX_THREADS]; static KtauSymbols KtauSym; }; #ifdef TAUKTAU_MERGE #define NO_MERGE_GRPS 10 extern char* merge_grp_name[NO_MERGE_GRPS+1]; #endif /* TAUKTAU_MERGE */ #endif /* TAUKTAU */ #endif /* _KTAUPROFILER_H_ */ /*************************************************************************** * $RCSfile: KtauProfiler.h,v $ $Author: anataraj $ * $Revision: 1.5 $ $Date: 2007/04/19 03:21:44 $ * POOMA_VERSION_ID: $Id: KtauProfiler.h,v 1.5 2007/04/19 03:21:44 anataraj Exp $ ***************************************************************************/ tau-2.16.4/include/Profile/KtauSymbols.h000077500000000000000000000037571062343042700200660ustar00rootroot00000000000000/**************************************************************************** ** TAU Portable Profiling Package ** ** http://www.acl.lanl.gov/tau ** ***************************************************************************** ** Copyright 1997 ** ** Department of Computer and Information Science, University of Oregon ** ** Advanced Computing Laboratory, Los Alamos National Laboratory ** ****************************************************************************/ /*************************************************************************** ** File : KtauSymbols.h ** ** Description : TAU Kernel Profiling Interface ** ** Author : Aroon Nataraj ** ** : Suravee Suthikulpanit ** ** Contact : {suravee,anataraj}@cs.uoregon.edu ** ** Flags : Compile with ** ** -DTAU_KTAU to enable KTAU ** ** Documentation : ** ***************************************************************************/ #ifndef _KTAUSYMBOLS_H_ #define _KTAUSYMBOLS_H_ //-------------------------------------------------------- #include #include using namespace std; class KtauSymbols { public: //cons / dest KtauSymbols(const string& path); ~KtauSymbols(); string& MapSym(unsigned int); unsigned long MapRevSym(string); int ReadKallsyms(); private: //stl map to hold the addr-to-name lookup data typedef map KERN_SYMTAB; KERN_SYMTAB table; typedef map KERN_REV_SYMTAB; KERN_REV_SYMTAB rev_table; //file-path to the kernel-symbol info const string filepath; }; #endif /* _KTAUSYMBOLS_H_ */ /*************************************************************************** * $RCSfile: KtauSymbols.h,v $ $Author: anataraj $ * $Revision: 1.2 $ $Date: 2007/04/19 03:21:44 $ * POOMA_VERSION_ID: $Id: KtauSymbols.h,v 1.2 2007/04/19 03:21:44 anataraj Exp $ ***************************************************************************/ tau-2.16.4/include/Profile/MultipleCounters.h000066400000000000000000000132311062343042700211100ustar00rootroot00000000000000///////////////////////////////////////////////// //Header file for the multiple counter layer. // //Author: Robert Bell //Created: January 2002 // ///////////////////////////////////////////////// #ifndef _MULTIPLE_COUNTER_LAYER_H_ #define _MULTIPLE_COUNTER_LAYER_H_ #ifdef TAU_MULTIPLE_COUNTERS //If we are going to use Papi, include its headers. #ifdef TAU_PAPI extern "C" { /*#include "papiStdEventDefs.h" */ #include "papi.h" /* #include "papi_internal.h" */ } #endif /* TAU_PAPI */ #ifdef BGL_TIMERS #include #include #endif #ifdef TAUKTAU_SHCTR extern "C" { #include "KtauCounters.h" } #endif /* TAUKTAU_SHCTR */ #define SIZE_OF_INIT_ARRAY 14 //!!Change this if functions are added to the system!! //Some useful typedefs typedef bool (*firstListType)(int); typedef void (*secondListType)(int, double[]); class MultipleCounterLayer { public: static bool initializeMultiCounterLayer(void); static bool * getCounterUsedList(); static bool getCounterUsed(int inPosition); static int getNumberOfCountersUsed(void); static void setCounterUsed(bool inValue, int inPosition); static void getCounters(int tid, double values[]); static double getSingleCounter(int tid, int counter); static char * getCounterNameAt(int position); static void theCounterList(const char ***inPtr, int *numOfCounters); static void theCounterListInternal(const char ***inPtr, int *numOfCounters, bool **tmpPtr); #ifdef TRACING_ON static void triggerCounterEvents(unsigned long long timestamp, double *values, int tid); #endif /* TRACING_ON */ //********************* //The list of counter functions, and their init. functions. //Please see the help files on multiple //counters to see our conventions. //********************* private: static bool gettimeofdayMCLInit(int functionPosition); static void gettimeofdayMCL(int tid, double values[]); static bool linuxTimerMCLInit(int functionPosition); static void linuxTimerMCL(int tid, double values[]); static bool bglTimersMCLInit(int functionPosition); static void bglTimersMCL(int tid, double values[]); static bool sgiTimersMCLInit(int functionPosition); static void sgiTimersMCL(int tid, double values[]); static bool crayTimersMCLInit(int functionPosition); static void crayTimersMCL(int tid, double values[]); static bool cpuTimeMCLInit(int functionPosition); static void cpuTimeMCL(int tid, double values[]); static bool javaCpuTimeMCLInit(int functionPosition); static void javaCpuTimeMCL(int tid, double values[]); static bool tauMUSEMCLInit(int functionPosition); static void tauMUSEMCL(int tid, double values[]); static bool tauMPIMessageSizeMCLInit(int functionPosition); static void tauMPIMessageSizeMCL(int tid, double values[]); static bool papiMCLInit(int functionPosition); static void papiMCL(int tid, double values[]); static bool papiWallClockMCLInit(int functionPosition); static void papiWallClockMCL(int tid, double values[]); static bool papiVirtualMCLInit(int functionPosition); static void papiVirtualMCL(int tid, double values[]); static bool pclMCLInit(int functionPosition); static void pclMCL(int tid, double values[]); static bool ktauMCLInit(int functionPosition); static void ktauMCL(int tid, double values[]); //********************* //End - List of counter and init. functions. //********************* //Other class stuff. static char environment[25][10]; static int gettimeofdayMCL_CP[1]; static int gettimeofdayMCL_FP; #ifdef TAU_LINUX_TIMERS static int linuxTimerMCL_CP[1]; static int linuxTimerMCL_FP; #endif //TAU_LINUX_TIMERS #ifdef BGL_TIMERS static int bglTimersMCL_CP[1]; static int bglTimersMCL_FP; #endif // BGL_TIMERS #ifdef SGI_TIMERS static int sgiTimersMCL_CP[1]; static int sgiTimersMCL_FP; #endif // SGI_TIMERS #ifdef CRAY_TIMERS static int crayTimersMCL_CP[1]; static int crayTimersMCL_FP; #endif // CRAY_TIMERS #ifdef CPU_TIME static int cpuTimeMCL_CP[1]; static int cpuTimeMCL_FP; #endif // CPU_TIME #ifdef JAVA_CPU_TIME static int javaCpuTimeMCL_CP[1]; static int javaCpuTimeMCL_FP; #endif // JAVA_CPU_TIME #ifdef TAU_MUSE static int tauMUSEMCL_CP[1]; static int tauMUSEMCL_FP; #endif // TAU_MUSE #ifdef TAU_MPI static int tauMPIMessageSizeMCL_CP[1]; static int tauMPIMessageSizeMCL_FP; #endif // TAU_MPI #ifdef TAU_PAPI static int papiMCL_CP[MAX_TAU_COUNTERS]; static int papiWallClockMCL_CP[1]; static int papiVirtualMCL_CP[1]; static int papiMCL_FP; static int papiWallClockMCL_FP; static int papiVirtualMCL_FP; #endif//TAU_PAPI #ifdef TAU_PCL static int pclMCL_CP[MAX_TAU_COUNTERS]; static int pclMCL_FP; //Data specific to the pclMCL function. static int numberOfPCLHWCounters; static int PCL_CounterCodeList[MAX_TAU_COUNTERS]; static unsigned int PCL_Mode; static PCL_DESCR_TYPE descr; static bool threadInit[TAU_MAX_THREADS]; static PCL_CNT_TYPE CounterList[MAX_TAU_COUNTERS]; static PCL_FP_CNT_TYPE FpCounterList[MAX_TAU_COUNTERS]; #endif//TAU_PCL #ifdef TAUKTAU_SHCTR static int ktauMCL_CP[MAX_TAU_COUNTERS]; static int ktauMCL_FP; #endif//TAUKTAU_SHCTR static firstListType initArray[SIZE_OF_INIT_ARRAY]; static secondListType functionArray[MAX_TAU_COUNTERS]; static int numberOfActiveFunctions; static char * names[MAX_TAU_COUNTERS]; static bool counterUsed[MAX_TAU_COUNTERS]; static int numberOfCounters[MAX_TAU_COUNTERS]; #ifdef TRACING_ON static TauUserEvent **counterEvents; #endif /* TRACING_ON */ }; #endif /* TAU_MULTIPLE_COUNTERS */ #endif /* _MULTIPLE_COUNTER_LAYER_H_ */ ///////////////////////////////////////////////// // //End - Multiple counter layer. // ///////////////////////////////////////////////// tau-2.16.4/include/Profile/OpenMPLayer.h000066400000000000000000000063531062343042700177340ustar00rootroot00000000000000/**************************************************************************** ** TAU Portable Profiling Package ** ** http://www.cs.uoregon.edu/research/tau ** ***************************************************************************** ** Copyright 1997 ** ** Department of Computer and Information Science, University of Oregon ** ** Advanced Computing Laboratory, Los Alamos National Laboratory ** ****************************************************************************/ /*************************************************************************** ** File : OpenMPLayer.h ** ** Description : TAU Profiling Package OpenMP Support Layer ** ** Author : Sameer Shende ** ** Contact : sameer@cs.uoregon.edu sameer@acl.lanl.gov ** ** Flags : Compile with ** ** -DPROFILING_ON to enable profiling (ESSENTIAL) ** ** -DPROFILE_STATS for Std. Deviation of Excl Time ** ** -DSGI_HW_COUNTERS for using SGI counters ** ** -DPROFILE_CALLS for trace of each invocation ** ** -DSGI_TIMERS for SGI fast nanosecs timer ** ** -DTULIP_TIMERS for non-sgi Platform ** ** -DPOOMA_STDSTL for using STD STL in POOMA src ** ** -DPOOMA_TFLOP for Intel Teraflop at SNL/NM ** ** -DPOOMA_KAI for KCC compiler ** ** -DDEBUG_PROF for internal debugging messages ** ** -DPROFILE_CALLSTACK to enable callstack traces ** ** Documentation : See http://www.cs.uoregon.edu/research/tau ** ***************************************************************************/ #ifndef _TAU_OPENMP_LAYER_H_ #define _TAU_OPENMP_LAYER_H_ ////////////////////////////////////////////////////////////////////// // // class OpenMPLayer // // This class is used for supporting OpenMP Threads in RtsLayer class. ////////////////////////////////////////////////////////////////////// #ifdef TAU_OPENMP extern "C" { #include #ifndef _OPENMP #define _OPENMP #endif /* _OPENMP */ } class OpenMPLayer { // Layer for RtsLayer to interact with OpenMP public: OpenMPLayer () { } // defaults ~OpenMPLayer () { } static int RegisterThread(void); // called before any profiling code static int InitializeThreadData(void); // init thread mutexes static int InitializeDBMutexData(void); // init tauDB mutex static int InitializeEnvMutexData(void); // init tauEnv mutex static int GetThreadId(void); // gets 0..N-1 thread id static int TotalThreads(void); // gets number of threads static int LockDB(void); // locks the tauDBMutex static int UnLockDB(void); // unlocks the tauDBMutex static int LockEnv(void); // locks the tauEnvMutex static int UnLockEnv(void); // unlocks the tauEnvMutex private: static omp_lock_t tauDBmutex; // to protect TheFunctionDB static omp_lock_t tauEnvmutex; // second lock }; #endif // TAU_OPENMP #endif // _TAU_OPENMP_LAYER_H_ /*************************************************************************** * $RCSfile: OpenMPLayer.h,v $ $Author: amorris $ * $Revision: 1.5 $ $Date: 2005/11/11 03:46:47 $ * POOMA_VERSION_ID: $Id: OpenMPLayer.h,v 1.5 2005/11/11 03:46:47 amorris Exp $ ***************************************************************************/ tau-2.16.4/include/Profile/PapiLayer.h000066400000000000000000000036411062343042700174640ustar00rootroot00000000000000/**************************************************************************** ** TAU Portable Profiling Package ** ** http://www.cs.uoregon.edu/research/tau ** ***************************************************************************** ** Copyright 1997-2006 ** ** Department of Computer and Information Science, University of Oregon ** ** Advanced Computing Laboratory, Los Alamos National Laboratory ** ****************************************************************************/ /**************************************************************************** ** File : PapiLayer.h ** ** Description : TAU Profiling Package ** ** Contact : tau-team@cs.uoregon.edu ** ** Documentation : See http://www.cs.uoregon.edu/research/tau ** ****************************************************************************/ #ifndef _PAPI_LAYER_H_ #define _PAPI_LAYER_H_ #ifdef TAU_PAPI extern "C" { #include "papi.h" } struct ThreadValue { int ThreadID; int EventSet; long long *CounterValues; }; class PapiLayer { public: static int initializePapiLayer(bool lock = true); static long long getSingleCounter(int tid); static long long *getAllCounters(int tid, int *numValues); static long long getWallClockTime(void); static long long getVirtualTime(void); static int reinitializePAPI(void); static int addCounter(char *name); private: static int initializeSingleCounter(); static int initializeThread(int tid); static int initializePAPI(void); static void checkDomain(int domain, char* domainstr); static bool papiInitialized; static ThreadValue *ThreadList[TAU_MAX_THREADS]; static int numCounters; #ifdef TAU_MULTIPLE_COUNTERS static int counterList[MAX_TAU_COUNTERS]; #else static int counterList[1]; #endif }; #endif /* TAU_PAPI */ #endif /* _PAPI_LAYER_H_ */ tau-2.16.4/include/Profile/PapiThreadLayer.h000066400000000000000000000060631062343042700206150ustar00rootroot00000000000000/**************************************************************************** ** TAU Portable Profiling Package ** ** http://www.cs.uoregon.edu/research/tau ** ***************************************************************************** ** Copyright 2007 ** ** Department of Computer and Information Science, University of Oregon ** ** Advanced Computing Laboratory, Los Alamos National Laboratory ** ****************************************************************************/ /*************************************************************************** ** File : Papi_ThreadLayer.h ** ** Description : TAU Profiling Package Papi Thread Support Layer ** ** Author : Sameer Shende ** ** Contact : sameer@cs.uoregon.edu sameer@acl.lanl.gov ** ** Flags : Compile with ** ** -DPROFILING_ON to enable profiling (ESSENTIAL) ** ** -DPROFILE_STATS for Std. Deviation of Excl Time ** ** -DSGI_HW_COUNTERS for using SGI counters ** ** -DPROFILE_CALLS for trace of each invocation ** ** -DSGI_TIMERS for SGI fast nanosecs timer ** ** -DTULIP_TIMERS for non-sgi Platform ** ** -DPOOMA_STDSTL for using STD STL in POOMA src ** ** -DPOOMA_TFLOP for Intel Teraflop at SNL/NM ** ** -DPOOMA_KAI for KCC compiler ** ** -DDEBUG_PROF for internal debugging messages ** ** -DPROFILE_CALLSTACK to enable callstack traces ** ** Documentation : See http://www.cs.uoregon.edu/research/tau ** ***************************************************************************/ #ifndef _PAPI_THREADLAYER_H_ #define _PAPI_THREADLAYER_H_ ////////////////////////////////////////////////////////////////////// // // class Papi_ThreadLayer // // This class is used for supporting papi_threads in RtsLayer class. ////////////////////////////////////////////////////////////////////// #ifdef TAU_PAPI_THREADS #include class PapiThreadLayer { // Layer for RtsLayer to interact with papi_threads public: PapiThreadLayer () { } // defaults ~PapiThreadLayer () { } static int RegisterThread(void); // called before any profiling code static int InitializeThreadData(void); // init thread mutexes static int InitializeDBMutexData(void); // init tauDB mutex static int InitializeEnvMutexData(void); // init tauEnv mutex static int GetThreadId(void); // gets 0..N-1 thread id static int LockDB(void); // locks the tauDBMutex static int UnLockDB(void); // unlocks the tauDBMutex static int LockEnv(void); // locks the tauEnvMutex static int UnLockEnv(void); // unlocks the tauEnvMutex private: }; #endif // TAU_PAPI_THREADS #endif // _PAPI_THREADLAYER_H_ /*************************************************************************** * $RCSfile: PapiThreadLayer.h,v $ $Author: amorris $ * $Revision: 1.1 $ $Date: 2007/03/16 23:48:09 $ * POOMA_VERSION_ID: $Id: PapiThreadLayer.h,v 1.1 2007/03/16 23:48:09 amorris Exp $ ***************************************************************************/ tau-2.16.4/include/Profile/PclLayer.h000066400000000000000000000016031062343042700173050ustar00rootroot00000000000000///////////////////////////////////////////////// //Class definintion file for the PCL_Layer class. // //Author: Robert Ansell-Bell //Created: July 1999 // ///////////////////////////////////////////////// #ifndef _PCL_LAYER_H_ #define _PCL_LAYER_H_ #ifdef TAU_PCL #include "pcl.h" struct ThreadValue{ int ThreadID; PCL_FP_CNT_TYPE CounterValue; }; class PCL_Layer { //No need to define constructors and destructors. //The default ones will do. public: //Default getCounters. static int map_eventnames(char *name); static int PCLLayerInit(PCL_DESCR_TYPE *descr); static void multiCounterPCLInit(PCL_DESCR_TYPE *descr); static PCL_FP_CNT_TYPE getCounters(int tid); }; #endif /* TAU_PCL */ #endif /* _PCL_LAYER_H_ */ ///////////////////////////////////////////////// // //End PCL_Layer class definition. // ///////////////////////////////////////////////// tau-2.16.4/include/Profile/ProfileGroups.h000066400000000000000000000117671062343042700204060ustar00rootroot00000000000000/**************************************************************************** ** TAU Portable Profiling Package ** ** http://www.cs.uoregon.edu/research/tau ** ***************************************************************************** ** Copyright 1997 ** ** Department of Computer and Information Science, University of Oregon ** ** Advanced Computing Laboratory, Los Alamos National Laboratory ** ****************************************************************************/ /*************************************************************************** ** File : ProfileGroups.h ** ** Description : TAU profile groups description ** ** Author : Sameer Shende ** ** Contact : sameer@cs.uoregon.edu sameer@acl.lanl.gov ** ** Flags : Compile with ** ** -DPROFILING_ON to enable profiling (ESSENTIAL) ** ** -DPROFILE_STATS for Std. Deviation of Excl Time ** ** -DSGI_HW_COUNTERS for using SGI counters ** ** -DPROFILE_CALLS for trace of each invocation ** ** -DSGI_TIMERS for SGI fast nanosecs timer ** ** -DTULIP_TIMERS for non-sgi Platform ** ** -DPOOMA_STDSTL for using STD STL in POOMA src ** ** -DPOOMA_TFLOP for Intel Teraflop at SNL/NM ** ** -DPOOMA_KAI for KCC compiler ** ** -DDEBUG_PROF for internal debugging messages ** ** -DPROFILE_CALLSTACK to enable callstack traces ** ** Documentation : See http://www.cs.uoregon.edu/research/tau ** ***************************************************************************/ #ifndef _PROFILE_GROUPS_H_ #define _PROFILE_GROUPS_H_ typedef unsigned long TauGroup_t; enum TauFork_t { TAU_EXCLUDE_PARENT_DATA, TAU_INCLUDE_PARENT_DATA}; /* TAU PROFILING GROUPS. More will be added later. */ #define TAU_DEFAULT 0xffffffff /* All profiling groups enabled*/ #define TAU_MESSAGE 0x00000001 /* Message 'm'*/ #define TAU_PETE 0x00000002 /* PETE 'p' */ #define TAU_VIZ 0x00000004 /* ACLVIZ 'v' */ #define TAU_ASSIGN 0x00000008 /* ASSIGN Expression Evaluation 'a' */ #define TAU_IO 0x00000010 /* IO routines 'i' */ #define TAU_FIELD 0x00000020 /* Field Classes 'f' */ #define TAU_LAYOUT 0x00000040 /* Field Layout 'l' */ #define TAU_SPARSE 0x00000080 /* Sparse Index 's' */ #define TAU_DOMAINMAP 0x00000100 /* Domain Map 'd' */ #define TAU_UTILITY 0x00000200 /* Utility 'Ut' */ #define TAU_REGION 0x00000400 /* Region 'r' */ #define TAU_PARTICLE 0x00000800 /* Particle 'pa' */ #define TAU_MESHES 0x00001000 /* Meshes 'mesh' */ #define TAU_SUBFIELD 0x00002000 /* SubField 'su' */ #define TAU_COMMUNICATION 0x00004000 /* A++ Commm 'c' */ #define TAU_DESCRIPTOR_OVERHEAD 0x00008000 /* A++ Descriptor Overhead 'de' */ #define TAU_BLITZ 0x00010000 /* Blitz++ 'b' */ #define TAU_HPCXX 0x00020000 /* HPC++ 'h' */ /* SPACE for 0x00040000 SPACE for 0x00080000 */ #define TAU_FFT 0x00100000 /* FFT 'ff' */ #define TAU_ACLMPL 0x00200000 /* ACLMPL 'ac' */ #define TAU_PAWS1 0x00400000 /* PAWS1 'paws1' */ #define TAU_PAWS2 0x00800000 /* PAWS2 'paws2' */ #define TAU_PAWS3 0x01000000 /* PAWS3 'paws3' */ /* SPACE for 0x02000000 SPACE for 0x04000000 */ #define TAU_USER4 0x08000000 /* User4 '4' */ #define TAU_USER3 0x10000000 /* User3 '3' */ #define TAU_USER2 0x20000000 /* User2 '2' */ #define TAU_USER1 0x40000000 /* User1 '1' */ #define TAU_USER 0x80000000 /* User 'u' */ #define TAU_GROUP_0 0x80000000 #define TAU_GROUP_1 0x40000000 #define TAU_GROUP_2 0x20000000 #define TAU_GROUP_3 0x10000000 #define TAU_GROUP_4 0x08000000 #define TAU_GROUP_5 0x04000000 #define TAU_GROUP_6 0x02000000 #define TAU_GROUP_7 0x01000000 #define TAU_GROUP_8 0x00800000 #define TAU_GROUP_9 0x00400000 #define TAU_GROUP_10 0x00200000 #define TAU_GROUP_11 0x00100000 #define TAU_GROUP_12 0x00080000 #define TAU_GROUP_13 0x00040000 #define TAU_GROUP_14 0x00020000 #define TAU_GROUP_15 0x00010000 #define TAU_GROUP_16 0x00008000 #define TAU_GROUP_17 0x00004000 #define TAU_GROUP_18 0x00002000 #define TAU_GROUP_19 0x00001000 #define TAU_GROUP_20 0x00000800 #define TAU_GROUP_21 0x00000400 #define TAU_GROUP_22 0x00000200 #define TAU_GROUP_23 0x00000100 #define TAU_GROUP_24 0x00000080 #define TAU_GROUP_25 0x00000040 #define TAU_GROUP_26 0x00000020 #define TAU_GROUP_27 0x00000010 #define TAU_GROUP_28 0x00000008 #define TAU_GROUP_29 0x00000004 #define TAU_GROUP_30 0x00000002 #define TAU_GROUP_31 0x00000001 #define TAU_DISABLE 0x00000000 #endif /* _PROFILE_GROUPS_H_ */ /*************************************************************************** * $RCSfile: ProfileGroups.h,v $ $Author: amorris $ * $Revision: 1.8 $ $Date: 2005/11/11 03:46:47 $ * POOMA_VERSION_ID: $Id: ProfileGroups.h,v 1.8 2005/11/11 03:46:47 amorris Exp $ ***************************************************************************/ tau-2.16.4/include/Profile/ProfileHeaders.h000066400000000000000000000053551062343042700204760ustar00rootroot00000000000000/**************************************************************************** ** TAU Portable Profiling Package ** ** http://www.cs.uoregon.edu/research/tau ** ***************************************************************************** ** Copyright 1997 ** ** Department of Computer and Information Science, University of Oregon ** ** Advanced Computing Laboratory, Los Alamos National Laboratory ** ****************************************************************************/ /*************************************************************************** ** File : ProfileHeaders.h ** ** Description : TAU Profiling Package include files ** ** Author : Sameer Shende ** ** Contact : sameer@cs.uoregon.edu sameer@acl.lanl.gov ** ** Flags : Compile with ** ** -DPROFILING_ON to enable profiling (ESSENTIAL) ** ** -DPROFILE_STATS for Std. Deviation of Excl Time ** ** -DSGI_HW_COUNTERS for using SGI counters ** ** -DPROFILE_CALLS for trace of each invocation ** ** -DSGI_TIMERS for SGI fast nanosecs timer ** ** -DTULIP_TIMERS for non-sgi Platform ** ** -DPOOMA_STDSTL for using STD STL in POOMA src ** ** -DPOOMA_TFLOP for Intel Teraflop at SNL/NM ** ** -DPOOMA_KAI for KCC compiler ** ** -DDEBUG_PROF for internal debugging messages ** ** -DPROFILE_CALLSTACK to enable callstack traces ** ** Documentation : See http://www.cs.uoregon.edu/research/tau ** ***************************************************************************/ #ifndef _PROFILE_HEADERS_H_ #define _PROFILE_HEADERS_H_ #include #if (defined(TAU_DOT_H_LESS_HEADERS) || defined (TAU_STDCXXLIB)) #include #include #include #include #include using std::string; #define TAU_STD_NAMESPACE std:: #ifdef TAU_LIBRARY_SOURCE using std::vector; using std::pair; using std::list; using std::map; #endif /* TAU_LIBRARY_SOURCE */ #else #define __BOOL_DEFINED #include "Profile/bstring.h" #include #include #include #include #endif /* TAU_DOT_H_LESS_HEADERS || TAU_STDCXXLIB */ #ifndef NO_RTTI /* RTTI is present */ #ifdef RTTI #include #else /* RTTI */ #include using std::type_info; /* This is by default */ #endif /* RTTI */ #endif /* NO_RTTI */ #endif /* _PROFILE_HEADERS_H_ */ /*************************************************************************** * $RCSfile: ProfileHeaders.h,v $ $Author: amorris $ * $Revision: 1.7 $ $Date: 2005/11/11 03:46:47 $ * POOMA_VERSION_ID: $Id: ProfileHeaders.h,v 1.7 2005/11/11 03:46:47 amorris Exp $ ***************************************************************************/ tau-2.16.4/include/Profile/Profiler.h000066400000000000000000000237031062343042700173610ustar00rootroot00000000000000/**************************************************************************** ** TAU Portable Profiling Package ** ** http://www.cs.uoregon.edu/research/tau ** ***************************************************************************** ** Copyright 1997 ** ** Department of Computer and Information Science, University of Oregon ** ** Advanced Computing Laboratory, Los Alamos National Laboratory ** ****************************************************************************/ /*************************************************************************** ** File : Profiler.h ** ** Description : TAU Profiling Package ** ** Author : Sameer Shende ** ** Contact : sameer@cs.uoregon.edu sameer@acl.lanl.gov ** ** Flags : Compile with ** ** -DPROFILING_ON to enable profiling (ESSENTIAL) ** ** -DPROFILE_STATS for Std. Deviation of Excl Time ** ** -DSGI_HW_COUNTERS for using SGI counters ** ** -DPROFILE_CALLS for trace of each invocation ** ** -DSGI_TIMERS for SGI fast nanosecs timer ** ** -DTULIP_TIMERS for non-sgi Platform ** ** -DPOOMA_STDSTL for using STD STL in POOMA src ** ** -DPOOMA_TFLOP for Intel Teraflop at SNL/NM ** ** -DPOOMA_KAI for KCC compiler ** ** -DDEBUG_PROF for internal debugging messages ** ** -DPROFILE_CALLSTACK to enable callstack traces ** ** Documentation : See http://www.cs.uoregon.edu/research/tau ** ***************************************************************************/ #ifndef PROFILER_H #define PROFILER_H #if (defined(TAU_WINDOWS)) #pragma warning( disable : 4786 ) #endif /* TAU_WINDOWS */ #if (!defined(TAU_LIBRARY_SOURCE) && !defined(TAU_WINDOWS)) #include #include #undef fork #define fork() \ tau_fork() #ifdef __cplusplus extern "C" #endif pid_t tau_fork (void); #ifdef PTHREADS /* pthread_create wrapper */ #include #undef pthread_create #define pthread_create(thread, attr, function, arg) \ tau_pthread_create(thread, attr, function, arg) #ifdef __cplusplus extern "C" #endif int tau_pthread_create (pthread_t *threadp, const pthread_attr_t *attr, void *(*start_routine) (void *), void *arg); #endif /* PTHREADS */ #endif /* TAU_LIBRARY_SOURCE */ /* This is to get TAU_START/TAU_STOP since some codes just #include */ #include #if (defined (__cplusplus ) && !defined (TAU_USE_C_API)) #include #ifdef TAU_MULTIPLE_COUNTERS #define MAX_TAU_COUNTERS 25 #endif /* TAU_MULTIPLE_COUNTERS */ #if (defined(PTHREADS) || defined(TULIPTHREADS) || defined(JAVA) || defined(TAU_WINDOWS) || defined (TAU_OPENMP) || defined (TAU_SPROC) || defined(TAU_PAPI_THREADS)) #ifndef TAU_MAX_THREADS #ifdef TAU_CHARM #define TAU_MAX_THREADS 512 #else #define TAU_MAX_THREADS 128 #endif #endif #else #define TAU_MAX_THREADS 1 #endif /* PTHREADS || TULIPTHREADS || JAVA || TAU_WINDOWS || OPENMP || SPROC */ /* We should throttle if number n > a && percall < b .a and b are given below */ #define TAU_THROTTLE_NUMCALLS_DEFAULT 100000 #define TAU_THROTTLE_PERCALL_DEFAULT 10 #include #if (defined(PROFILING_ON) || defined(TRACING_ON)) #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #if defined(TAUKTAU) class KtauProfiler; #ifdef TAUKTAU_MERGE #include #endif /* defined(TAUKTAU_MERGE) */ #endif /* defined(TAUKTAU) */ /* ////////////////////////////////////////////////////////////////////// // // class Profiler // // This class is intended to be instantiated once per function // (or other code block to be timed) as an auto variable. // // It will be constructed each time the block is entered // and destroyed when the block is exited. The constructor // turns on the timer, and the destructor turns it off. // ////////////////////////////////////////////////////////////////////// */ namespace tau { class Profiler { public: Profiler(FunctionInfo * fi, TauGroup_t ProfileGroup = TAU_DEFAULT, bool StartStop = false, int tid = RtsLayer::myThread()); void Start(int tid = RtsLayer::myThread()); Profiler(const Profiler& X); Profiler& operator= (const Profiler& X); /* Clean up data from this invocation. */ void Stop(int tid = RtsLayer::myThread(), bool useLastTimeStamp = false); ~Profiler(); #ifdef TAU_CALLPATH void CallPathStart(int tid); #ifdef TAU_MULTIPLE_COUNTERS void CallPathStop(double* totaltime, int tid); #else /* TAU_MULTIPLE_COUNTERS */ void CallPathStop(double totaltime, int tid); #endif /* TAU_MULTIPLE_COUNTERS */ #endif /* TAU_CALLPATH */ #ifdef TAU_PROFILEPARAM #ifdef TAU_MULTIPLE_COUNTERS void ProfileParamStop(double* totaltime, int tid); #else /* TAU_MULTIPLE_COUNTERS */ void ProfileParamStop(double totaltime, int tid); #endif /* TAU_MULTIPLE_COUNTERS */ #endif /* TAU_PROFILEPARAM */ static void ProfileExit(const char *message=0, int tid = RtsLayer::myThread()); static bool createDirectories(); static int StoreData(int tid = RtsLayer::myThread()); static int DumpData(bool increment = false, int tid = RtsLayer::myThread(), char *prefix = "dump"); static void PurgeData(int tid = RtsLayer::myThread()); static int Snapshot(char *name, bool finalize = false, int tid = RtsLayer::myThread()); static void theFunctionList(const char ***inPtr, int *numOfFunctions, bool addName = false, const char * inString = NULL); static void dumpFunctionNames(); #ifndef TAU_MULTIPLE_COUNTERS static void theCounterList(const char ***inPtr, int *numOfCounters); #endif /* TAU_MULTIPLE_COUNTERS */ static void getFunctionValues(const char **inFuncs, int numOfFuncs, double ***counterExclusiveValues, double ***counterInclusiveValues, int **numOfCalls, int **numOfSubRoutines, const char ***counterNames, int *numOfCounters, int tid = RtsLayer::myThread()); static int dumpFunctionValues(const char **inFuncs, int numOfFuncs, bool increment = false, int tid = RtsLayer::myThread(), char *prefix = "dump"); static void getUserEventList(const char ***inPtr, int *numUserEvents); static void getUserEventValues(const char **inUserEvents, int numUserEvents, int **numEvents, double **max, double **min, double **mean, double **sumSqr, int tid = RtsLayer::myThread()); #if ( defined(PROFILE_CALLS) || defined(PROFILE_STATS) || defined(PROFILE_CALLSTACK) ) int ExcludeTimeThisCall(double t); double ExclTimeThisCall; /* for this invocation of the function */ #endif /* PROFILE_CALLS || PROFILE_STATS */ static Profiler * CurrentProfiler[TAU_MAX_THREADS]; #ifndef TAU_MULTIPLE_COUNTERS double StartTime; #else /* TAU_MULTIPLE_COUNTERS */ double StartTime[MAX_TAU_COUNTERS]; double CurrentTime[MAX_TAU_COUNTERS]; double TotalTime[MAX_TAU_COUNTERS]; #endif /* TAU_MULTIPLE_COUNTERS */ FunctionInfo * ThisFunction; #ifdef TAU_CALLPATH FunctionInfo * CallPathFunction; bool AddInclCallPathFlag; #endif /* TAU_CALLPATH */ #ifdef TAU_PROFILEPARAM FunctionInfo * ProfileParamFunction; bool AddInclProfileParamFlag; static void AddProfileParamData(long key, string& keyname); #endif /* TAU_PROFILEPARAM */ #ifdef TAU_COMPENSATE /* Compensate for instrumentation overhead based on total number of child calls executed under the given timer */ long NumChildren; void SetNumChildren(long n); long GetNumChildren(void); void AddNumChildren(long value); #endif /* TAU_COMPENSATE */ Profiler * ParentProfiler; #ifdef PROFILE_CALLSTACK double InclTime_cs; double ExclTime_cs; static void CallStackTrace(int tid = RtsLayer::myThread()); #endif /* PROFILE_CALLSTACK */ #ifdef TAU_PROFILEPHASE bool GetPhase(void); void SetPhase(bool flag); #endif /* TAU_PROFILEPHASE */ #ifdef TAU_DEPTH_LIMIT int GetDepthLimit(void); void SetDepthLimit(int value); #endif /* TAU_DEPTH_LIMIT */ #ifdef TAU_MPITRACE void EnableAllEventsOnCallStack(int tid, Profiler *current); #endif /* TAU_MPITRACE */ bool& TheTauThrottle(void); double& TheTauThrottlePerCall(void); double& TheTauThrottleNumCalls(void); #if defined(TAUKTAU) KtauProfiler* ThisKtauProfiler; #if defined(TAUKTAU_MERGE) KtauMergeInfo ThisKtauMergeInfo; #endif /* TAUKTAU_MERGE */ #endif /* TAUKTAU */ private: TauGroup_t MyProfileGroup_; bool StartStopUsed_; bool AddInclFlag; /* There is a class that will do some initialization of FunctionStack that can't be done with just the constructor. friend class ProfilerInitializer; */ bool PhaseFlag; #ifdef TAU_DEPTH_LIMIT int profiledepth; #endif /* TAU_DEPTH_LIMIT */ #ifdef TAU_MPITRACE bool RecordEvent; /* true when an MPI call is in the callpath */ #endif /* TAU_MPITRACE */ }; }; #ifdef TAU_LIBRARY_SOURCE using tau::Profiler; #endif /* TAU_LIBRARY_SOURCE */ #endif /* PROFILING_ON || TRACING_ON */ #include /* included after class Profiler is defined. */ #else /* __cplusplus && ! TAU_USE_C_API */ #include /* For C program */ #endif /* __cplusplus && ! TAU_USE_C_API */ #endif /* PROFILER_H */ /*************************************************************************** * $RCSfile: Profiler.h,v $ $Author: sameer $ * $Revision: 1.77 $ $Date: 2007/04/25 01:07:04 $ * POOMA_VERSION_ID: $Id: Profiler.h,v 1.77 2007/04/25 01:07:04 sameer Exp $ ***************************************************************************/ tau-2.16.4/include/Profile/PthreadLayer.h000066400000000000000000000067611062343042700201700ustar00rootroot00000000000000/**************************************************************************** ** TAU Portable Profiling Package ** ** http://www.cs.uoregon.edu/research/tau ** ***************************************************************************** ** Copyright 1997 ** ** Department of Computer and Information Science, University of Oregon ** ** Advanced Computing Laboratory, Los Alamos National Laboratory ** ****************************************************************************/ /*************************************************************************** ** File : PthreadLayer.h ** ** Description : TAU Profiling Package Pthread Support Layer ** ** Author : Sameer Shende ** ** Contact : sameer@cs.uoregon.edu sameer@acl.lanl.gov ** ** Flags : Compile with ** ** -DPROFILING_ON to enable profiling (ESSENTIAL) ** ** -DPROFILE_STATS for Std. Deviation of Excl Time ** ** -DSGI_HW_COUNTERS for using SGI counters ** ** -DPROFILE_CALLS for trace of each invocation ** ** -DSGI_TIMERS for SGI fast nanosecs timer ** ** -DTULIP_TIMERS for non-sgi Platform ** ** -DPOOMA_STDSTL for using STD STL in POOMA src ** ** -DPOOMA_TFLOP for Intel Teraflop at SNL/NM ** ** -DPOOMA_KAI for KCC compiler ** ** -DDEBUG_PROF for internal debugging messages ** ** -DPROFILE_CALLSTACK to enable callstack traces ** ** Documentation : See http://www.cs.uoregon.edu/research/tau ** ***************************************************************************/ #ifndef _PTHREADLAYER_H_ #define _PTHREADLAYER_H_ ////////////////////////////////////////////////////////////////////// // // class PthreadLayer // // This class is used for supporting pthreads in RtsLayer class. ////////////////////////////////////////////////////////////////////// #ifdef PTHREADS #ifdef TAU_CHARM extern "C" { #include } #else #include #endif class PthreadLayer { // Layer for RtsLayer to interact with pthreads public: PthreadLayer () { } // defaults ~PthreadLayer () { } static int RegisterThread(void); // called before any profiling code static int InitializeThreadData(void); // init thread mutexes static int InitializeDBMutexData(void); // init tauDB mutex static int InitializeEnvMutexData(void); // init tauEnv mutex static int GetThreadId(void); // gets 0..N-1 thread id static int LockDB(void); // locks the tauDBMutex static int UnLockDB(void); // unlocks the tauDBMutex static int LockEnv(void); // locks the tauEnvMutex static int UnLockEnv(void); // unlocks the tauEnvMutex private: static pthread_key_t tauPthreadId; // tid static pthread_mutex_t tauThreadcountMutex; // to protect counter static pthread_mutexattr_t tauThreadcountAttr; // count attribute static int tauThreadCount; // counter static pthread_mutex_t tauDBMutex; // to protect TheFunctionDB static pthread_mutex_t tauEnvMutex; // to protect TheFunctionDB static pthread_mutexattr_t tauDBAttr; // DB mutex attribute }; #endif // PTHREADS #endif // _PTHREADLAYER_H_ /*************************************************************************** * $RCSfile: PthreadLayer.h,v $ $Author: amorris $ * $Revision: 1.7 $ $Date: 2006/05/05 19:17:02 $ * POOMA_VERSION_ID: $Id: PthreadLayer.h,v 1.7 2006/05/05 19:17:02 amorris Exp $ ***************************************************************************/ tau-2.16.4/include/Profile/PyBindings.h000066400000000000000000000022361062343042700176430ustar00rootroot00000000000000// -*- C++ -*- // //----------------------------------------------------------------------------- // // VTF Development Team // California Institute of Technology // (C) 2002 All Rights Reserved // // // //----------------------------------------------------------------------------- // // $Log: PyBindings.h,v $ // Revision 1.1 2003/02/28 23:29:08 sameer // Added Python Bindings headers to TAU. // // Revision 1.1 2002/01/16 02:05:07 cummings // Original source and build procedure files for Python bindings of // TAU runtime API. These bindings allow you to do some rudimentary // things from the Python script, such as enable/disable all Tau // instrumentation, enable/disable a particular Tau profile group, // and dump or purge the current Tau statistics. Still to come are // bindings for creating and using Tau global timers and user events. // // #if !defined(pytau_bindings_h) #define pytau_bindings_h // the method table extern struct PyMethodDef pytau_methods[]; #endif // pytau_bindings_h // version // $Id: PyBindings.h,v 1.1 2003/02/28 23:29:08 sameer Exp $ // End of file tau-2.16.4/include/Profile/PyDatabase.h000066400000000000000000000054231062343042700176130ustar00rootroot00000000000000// -*- C++ -*- // //----------------------------------------------------------------------------- // // VTF Development Team // California Institute of Technology // (C) 2002 All Rights Reserved // // // //----------------------------------------------------------------------------- // // $Log: PyDatabase.h,v $ // Revision 1.2 2007/03/02 02:35:37 amorris // Added snapshot API for python // // Revision 1.1 2003/02/28 23:29:08 sameer // Added Python Bindings headers to TAU. // // Revision 1.2 2002/11/14 02:28:50 cummings // Added bindings for some new Tau functions that let you access the // profiling statistics database at run time. // // Revision 1.1 2002/01/16 02:05:07 cummings // Original source and build procedure files for Python bindings of // TAU runtime API. These bindings allow you to do some rudimentary // things from the Python script, such as enable/disable all Tau // instrumentation, enable/disable a particular Tau profile group, // and dump or purge the current Tau statistics. Still to come are // bindings for creating and using Tau global timers and user events. // // #if !defined(pytau_database_h) #define pytau_database_h extern char pytau_snapshot__name__[]; extern char pytau_snapshot__doc__[]; extern "C" PyObject * pytau_snapshot(PyObject *, PyObject *); extern char pytau_dbDump__name__[]; extern char pytau_dbDump__doc__[]; extern "C" PyObject * pytau_dbDump(PyObject *, PyObject *); extern char pytau_dbDumpIncr__name__[]; extern char pytau_dbDumpIncr__doc__[]; extern "C" PyObject * pytau_dbDumpIncr(PyObject *, PyObject *); extern char pytau_dbPurge__name__[]; extern char pytau_dbPurge__doc__[]; extern "C" PyObject * pytau_dbPurge(PyObject *, PyObject *); extern char pytau_getFuncNames__name__[]; extern char pytau_getFuncNames__doc__[]; extern "C" PyObject * pytau_getFuncNames(PyObject *, PyObject *); extern char pytau_dumpFuncNames__name__[]; extern char pytau_dumpFuncNames__doc__[]; extern "C" PyObject * pytau_dumpFuncNames(PyObject *, PyObject *); extern char pytau_getCounterNames__name__[]; extern char pytau_getCounterNames__doc__[]; extern "C" PyObject * pytau_getCounterNames(PyObject *, PyObject *); extern char pytau_getFuncVals__name__[]; extern char pytau_getFuncVals__doc__[]; extern "C" PyObject * pytau_getFuncVals(PyObject *, PyObject *); extern char pytau_dumpFuncVals__name__[]; extern char pytau_dumpFuncVals__doc__[]; extern "C" PyObject * pytau_dumpFuncVals(PyObject *, PyObject *); extern char pytau_dumpFuncValsIncr__name__[]; extern char pytau_dumpFuncValsIncr__doc__[]; extern "C" PyObject * pytau_dumpFuncValsIncr(PyObject *, PyObject *); #endif // pytau_database_h // version // $Id: PyDatabase.h,v 1.2 2007/03/02 02:35:37 amorris Exp $ // End of file tau-2.16.4/include/Profile/PyExceptions.h000066400000000000000000000022441062343042700202260ustar00rootroot00000000000000// -*- C++ -*- // //----------------------------------------------------------------------------- // // VTF Development Team // California Institute of Technology // (C) 2002 All Rights Reserved // // // //----------------------------------------------------------------------------- // // $Log: PyExceptions.h,v $ // Revision 1.1 2003/02/28 23:29:09 sameer // Added Python Bindings headers to TAU. // // Revision 1.1 2002/01/16 02:05:07 cummings // Original source and build procedure files for Python bindings of // TAU runtime API. These bindings allow you to do some rudimentary // things from the Python script, such as enable/disable all Tau // instrumentation, enable/disable a particular Tau profile group, // and dump or purge the current Tau statistics. Still to come are // bindings for creating and using Tau global timers and user events. // // #if !defined(pytau_exceptions_h) #define pytau_exceptions_h // Exceptions extern PyObject *pytau_badArgument; #endif // pytau_exceptions_h // version // $Id: PyExceptions.h,v 1.1 2003/02/28 23:29:09 sameer Exp $ // End of file tau-2.16.4/include/Profile/PyGroups.h000066400000000000000000000055221062343042700173660ustar00rootroot00000000000000// -*- C++ -*- // //----------------------------------------------------------------------------- // // VTF Development Team // California Institute of Technology // (C) 2002 All Rights Reserved // // // //----------------------------------------------------------------------------- // // $Log: PyGroups.h,v $ // Revision 1.1 2003/02/28 23:29:09 sameer // Added Python Bindings headers to TAU. // // Revision 1.2 2002/01/23 02:47:38 cummings // Added Python wrappers for new Tau functions enableAllGroups() and // disableAllGroups(), which will enable or disable profiling for all // existing profile groups with one function call. The only exception // is the group TAU_DEFAULT, which includes main() and cannot be disabled. // // Revision 1.1 2002/01/16 02:05:07 cummings // Original source and build procedure files for Python bindings of // TAU runtime API. These bindings allow you to do some rudimentary // things from the Python script, such as enable/disable all Tau // instrumentation, enable/disable a particular Tau profile group, // and dump or purge the current Tau statistics. Still to come are // bindings for creating and using Tau global timers and user events. // // #if !defined(pytau_groups_h) #define pytau_groups_h extern char pytau_getProfileGroup__name__[]; extern char pytau_getProfileGroup__doc__[]; extern "C" PyObject * pytau_getProfileGroup(PyObject *, PyObject *); extern char pytau_enableGroup__name__[]; extern char pytau_enableGroup__doc__[]; extern "C" PyObject * pytau_enableGroup(PyObject *, PyObject *); extern char pytau_disableGroup__name__[]; extern char pytau_disableGroup__doc__[]; extern "C" PyObject * pytau_disableGroup(PyObject *, PyObject *); extern char pytau_enableGroupName__name__[]; extern char pytau_enableGroupName__doc__[]; extern "C" PyObject * pytau_enableGroupName(PyObject *, PyObject *); extern char pytau_disableGroupName__name__[]; extern char pytau_disableGroupName__doc__[]; extern "C" PyObject * pytau_disableGroupName(PyObject *, PyObject *); extern char pytau_enableAllGroups__name__[]; extern char pytau_enableAllGroups__doc__[]; extern "C" PyObject * pytau_enableAllGroups(PyObject *, PyObject *); extern char pytau_disableAllGroups__name__[]; extern char pytau_disableAllGroups__doc__[]; extern "C" PyObject * pytau_disableAllGroups(PyObject *, PyObject *); extern char pytau_enableInstrumentation__name__[]; extern char pytau_enableInstrumentation__doc__[]; extern "C" PyObject * pytau_enableInstrumentation(PyObject *, PyObject *); extern char pytau_disableInstrumentation__name__[]; extern char pytau_disableInstrumentation__doc__[]; extern "C" PyObject * pytau_disableInstrumentation(PyObject *, PyObject *); #endif // pytau_groups_h // version // $Id: PyGroups.h,v 1.1 2003/02/28 23:29:09 sameer Exp $ // End of file tau-2.16.4/include/Profile/PyTimer.h000066400000000000000000000024441062343042700171670ustar00rootroot00000000000000// -*- C++ -*- // //----------------------------------------------------------------------------- // // TAU Development Team // University of Oregon, Los Alamos National Laboratory, // FZJ Germany // (C) 2003 All Rights Reserved // // // //----------------------------------------------------------------------------- // // $Log: PyTimer.h,v $ // Revision 1.2 2007/03/01 22:14:37 amorris // Added phase API for python // // Revision 1.1 2003/02/28 23:29:09 sameer // Added Python Bindings headers to TAU. // // #if !defined(pytau_timer_h) #define pytau_timer_h extern char pytau_profileTimer__name__[]; extern char pytau_profileTimer__doc__[]; extern "C" PyObject * pytau_profileTimer(PyObject *, PyObject *); extern char pytau_phase__name__[]; extern char pytau_phase__doc__[]; extern "C" PyObject * pytau_phase(PyObject *, PyObject *); extern char pytau_start__name__[]; extern char pytau_start__doc__[]; extern "C" PyObject * pytau_start(PyObject *, PyObject *); extern char pytau_stop__name__[]; extern char pytau_stop__doc__[]; extern "C" PyObject * pytau_stop(PyObject *, PyObject *); #endif // pytau_timer_h // version // $Id: PyTimer.h,v 1.2 2007/03/01 22:14:37 amorris Exp $ // End of file tau-2.16.4/include/Profile/RenciSTFF.h000066400000000000000000000072201062343042700173160ustar00rootroot00000000000000////////////////////////////////////////////////////////////////////// // // RENCI STFF Layer // // This layer is used for capturing signtaures using the RENCI // Scalable Time-series Filter Framework. Data collected by the // TAU profiler can be passed to this layer, and signatures are // made per function/callsite/counter. // // Scalable Traces compress runtime trace data using least // squares and other fitting methods. // // For more information about STFF contact: // // Todd Gamblin tgamblin@cs.unc.edu // Rob Fowler rjf@renci.org // // Or, visit http://www.renci.org // ////////////////////////////////////////////////////////////////////// #ifndef TAU_RENCI_STFF_H #define TAU_RENCI_STFF_H #include #include "stff/ApplicationSignature.h" using renci_stff::ApplicationSignature; using renci_stff::Point; using renci_stff::SigId; #include "Profile/Profiler.h" class FunctionInfo; /** * This class is entirely static, in the vein of TAU's other layers. * The STFF layer will initialize itself automatically when recordValues * is called. recordValues should be called only after the multiple * counter layer is inited, as the STFF layer's init function needs * to know the names of the counters. * * NOTE: if, in a future release of TAU, counter setup changes dynamically, * this layer will also need to change. */ class RenciSTFF { private: /** * Whether stff lib has been inited. We make sure this happens * after MPI_Init() if MPI is enable for the stff library. */ static bool inited; /** Names of counters retrieved from counter layer at init time. */ static const char **counterList; /** Local copy of number of TAU counters, obtained at init time. */ static int numCounters; /** Vector of all signatures instantiated, so we can stop them easily at the end. */ static std::vector signatures; /** * Creates an application signature and inits it with proper metadata * for the provided metric. */ static ApplicationSignature *createSignature( const Point &point, const FunctionInfo *info, int tid, int metricId = 0 ); /** Custom handle to string function, for signature filenames. */ static string function_info_to_string(const void *id); /** Custom id to string function, for signature filenames. */ static string handle_to_string(int handle); /** * Initializes the signature layer by creating a signature for each metric monitored. * Called by recordValues(). */ static bool init(); public: #ifdef TAU_MULTIPLE_COUNTERS /** * Multiple counter version of routine. * * Adds measurements to all signatures, from the array of provided values. * @param function FunctionInfo describing the function being profiled * @param timestamp time the observation is taken * @param metricValue double value of counter, taken from FunctionInfo */ static void recordValues(FunctionInfo *function, double timestamp, const double *metricValue, int tid); #else //TAU_MULTIPLE_COUNTERS /** * Multiple counter version of routine. * * Adds measurements to all signatures, from the array of provided values. * @param FunctionInfo FunctionInfo describing the function being profiled * @param timestamp time the observation is taken * @param metricValue double value of counter, taken from FunctionInfo */ static void recordValues(FunctionInfo *function, double timestamp, double metricValue, int tid); #endif //TAU_MULTIPLE_COUNTERS /** * Shuts down the signature layer and writes all signatures out to specially * named files. */ static void cleanup(); }; #endif //TAU_RENCI_STFF_H tau-2.16.4/include/Profile/RtsLayer.h000066400000000000000000000121521062343042700173400ustar00rootroot00000000000000/**************************************************************************** ** TAU Portable Profiling Package ** ** http://www.cs.uoregon.edu/research/tau ** ***************************************************************************** ** Copyright 1997 ** ** Department of Computer and Information Science, University of Oregon ** ** Advanced Computing Laboratory, Los Alamos National Laboratory ** ****************************************************************************/ /*************************************************************************** ** File : RtsLayer.h ** ** Description : TAU Profiling Package Runtime System Layer ** ** Author : Sameer Shende ** ** Contact : sameer@cs.uoregon.edu sameer@acl.lanl.gov ** ** Flags : Compile with ** ** -DPROFILING_ON to enable profiling (ESSENTIAL) ** ** -DPROFILE_STATS for Std. Deviation of Excl Time ** ** -DSGI_HW_COUNTERS for using SGI counters ** ** -DPROFILE_CALLS for trace of each invocation ** ** -DSGI_TIMERS for SGI fast nanosecs timer ** ** -DTULIP_TIMERS for non-sgi Platform ** ** -DPOOMA_STDSTL for using STD STL in POOMA src ** ** -DPOOMA_TFLOP for Intel Teraflop at SNL/NM ** ** -DPOOMA_KAI for KCC compiler ** ** -DDEBUG_PROF for internal debugging messages ** ** -DPROFILE_CALLSTACK to enable callstack traces ** ** Documentation : See http://www.cs.uoregon.edu/research/tau ** ***************************************************************************/ #ifndef _RTSLAYER_H_ #define _RTSLAYER_H_ ////////////////////////////////////////////////////////////////////// // // class RtsLayer // // This class is used for porting the TAU Profiling package to other // platforms and software frameworks. It contains functions to get // the node id, thread id etc. When Threads are implemented, myThread() // method should return the thread id in {0..N-1} where N is the total // number of threads. All interaction with the outside world should be // restrained to this class. ////////////////////////////////////////////////////////////////////// typedef std::map > ProfileMap_t; class RtsLayer { // Layer for Profiler to interact with the Runtime System public: RtsLayer () { } // defaults ~RtsLayer () { } static TauGroup_t & TheProfileMask(void); static bool& TheEnableInstrumentation(void); static bool& TheShutdown(void); static int& TheNode(void); static int& TheContext(void); static long GenerateUniqueId(void); static ProfileMap_t& TheProfileMap(void); static TauGroup_t getProfileGroup(char * ProfileGroup) ; static TauGroup_t enableProfileGroup(TauGroup_t ProfileGroup) ; static TauGroup_t disableProfileGroup(TauGroup_t ProfileGroup) ; static TauGroup_t generateProfileGroup(void) ; static TauGroup_t enableProfileGroupName(char * ProfileGroup) ; static TauGroup_t disableProfileGroupName(char * ProfileGroup) ; static TauGroup_t enableAllGroups(void) ; static TauGroup_t disableAllGroups(void) ; static TauGroup_t resetProfileGroup(void) ; static int setAndParseProfileGroups (char *prog, char *str) ; static bool isEnabled(TauGroup_t ProfileGroup) ; static void ProfileInit(int& argc, char**& argv); static string PrimaryGroup(const char *ProfileGroupName); static bool isCtorDtor(const char *name); static void TraceSendMsg(int type, int destination, int length); static void TraceRecvMsg(int type, int source, int length); static std::string GetRTTI(const char *name); inline static const char * CheckNotNull(const char * str) { if (str == 0) return " "; else return str; } static int SetEventCounter(void); static double GetEventCounter(void); #ifndef TAU_MULTIPLE_COUNTERS static double getUSecD(int tid); #else //TAU_MULTIPLE_COUNTERS static void getUSecD(int tid, double *values); #endif //TAU_MULTIPLE_COUNTERS static int setMyNode(int NodeId, int tid=RtsLayer::myThread()); static int setMyContext(int ContextId); // For tracing static int DumpEDF(int tid); // For tracing static int MergeAndConvertTracesIfNecessary(); // Return the number of the 'current' node. static int myNode(void); // Return the number of the 'current' context. static int myContext(void); // Return the number of the 'current' thread. 0..TAU_MAX_THREADS-1 static int myThread(void); static void RegisterThread(); static void RegisterFork(int nodeid, enum TauFork_t opcode); // This ensure that the FunctionDB (global) is locked while updating static void LockDB(void); static void UnLockDB(void); static void LockEnv(void); static void UnLockEnv(void); }; #endif /* _RTSLAYER_H_ */ /*************************************************************************** * $RCSfile: RtsLayer.h,v $ $Author: amorris $ * $Revision: 1.22 $ $Date: 2005/11/11 03:46:47 $ * POOMA_VERSION_ID: $Id: RtsLayer.h,v 1.22 2005/11/11 03:46:47 amorris Exp $ ***************************************************************************/ tau-2.16.4/include/Profile/SprocLayer.h000066400000000000000000000064121062343042700176600ustar00rootroot00000000000000/**************************************************************************** ** TAU Portable Profiling Package ** ** http://www.cs.uoregon.edu/research/tau ** ***************************************************************************** ** Copyright 1997 ** ** Department of Computer and Information Science, University of Oregon ** ** Advanced Computing Laboratory, Los Alamos National Laboratory ** ****************************************************************************/ /*************************************************************************** ** File : SprocLayer.h ** ** Description : TAU Profiling Package Sproc Support Layer ** ** Author : Sameer Shende ** ** Contact : sameer@cs.uoregon.edu sameer@acl.lanl.gov ** ** Flags : Compile with ** ** -DPROFILING_ON to enable profiling (ESSENTIAL) ** ** -DPROFILE_STATS for Std. Deviation of Excl Time ** ** -DSGI_HW_COUNTERS for using SGI counters ** ** -DPROFILE_CALLS for trace of each invocation ** ** -DSGI_TIMERS for SGI fast nanosecs timer ** ** -DTULIP_TIMERS for non-sgi Platform ** ** -DPOOMA_STDSTL for using STD STL in POOMA src ** ** -DPOOMA_TFLOP for Intel Teraflop at SNL/NM ** ** -DPOOMA_KAI for KCC compiler ** ** -DDEBUG_PROF for internal debugging messages ** ** -DPROFILE_CALLSTACK to enable callstack traces ** ** Documentation : See http://www.cs.uoregon.edu/research/tau ** ***************************************************************************/ #ifndef _SPROCLAYER_H_ #define _SPROCLAYER_H_ ////////////////////////////////////////////////////////////////////// // // class SprocLayer // // This class is used for supporting pthreads in RtsLayer class. ////////////////////////////////////////////////////////////////////// #ifdef TAU_SPROC #include class SprocLayer { // Layer for RtsLayer to interact with pthreads public: SprocLayer () { } // defaults ~SprocLayer () { } static int RegisterThread(void); // called before any profiling code static int InitializeThreadData(void); // init thread mutexes static int InitializeDBMutexData(void); // init tauDB mutex static int InitializeEnvMutexData(void); // init tauEnv mutex static int GetThreadId(void); // gets 0..N-1 thread id static int LockDB(void); // locks the tauDBMutex static int UnLockDB(void); // unlocks the tauDBMutex static int LockEnv(void); // locks the tauEnvMutex static int UnLockEnv(void); // unlocks the tauEnvMutex private: static usptr_t * tauArena; // Shared memory arena /dev/zero on SGI static int tauThreadCount; // counter static usema_t * tauThreadCountMutex; // to protect tauThreadCount static usema_t * tauDBMutex; // to protect TheFunctionDB static usema_t * tauEnvMutex; // second mutex }; #endif // TAU_SPROC #endif // _SPROCLAYER_H_ /*************************************************************************** * $RCSfile: SprocLayer.h,v $ $Author: amorris $ * $Revision: 1.3 $ $Date: 2005/11/11 03:46:47 $ * POOMA_VERSION_ID: $Id: SprocLayer.h,v 1.3 2005/11/11 03:46:47 amorris Exp $ ***************************************************************************/ tau-2.16.4/include/Profile/TauAPI.h000066400000000000000000000500721062343042700166610ustar00rootroot00000000000000/**************************************************************************** ** TAU Portable Profiling Package ** ** http://www.cs.uoregon.edu/research/tau ** ***************************************************************************** ** Copyright 1997 ** ** Department of Computer and Information Science, University of Oregon ** ** Advanced Computing Laboratory, Los Alamos National Laboratory ** ****************************************************************************/ /*************************************************************************** ** File : Profiler.h ** ** Description : TAU Profiling Package API ** ** Author : Sameer Shende ** ** Contact : sameer@cs.uoregon.edu sameer@acl.lanl.gov ** ** Flags : Compile with ** ** -DPROFILING_ON to enable profiling (ESSENTIAL) ** ** -DPROFILE_STATS for Std. Deviation of Excl Time ** ** -DSGI_HW_COUNTERS for using SGI counters ** ** -DPROFILE_CALLS for trace of each invocation ** ** -DSGI_TIMERS for SGI fast nanosecs timer ** ** -DTULIP_TIMERS for non-sgi Platform ** ** -DPOOMA_STDSTL for using STD STL in POOMA src ** ** -DPOOMA_TFLOP for Intel Teraflop at SNL/NM ** ** -DPOOMA_KAI for KCC compiler ** ** -DDEBUG_PROF for internal debugging messages ** ** -DPROFILE_CALLSTACK to enable callstack traces ** ** Documentation : See http://www.cs.uoregon.edu/research/tau ** ***************************************************************************/ #ifndef _TAU_API_H_ #define _TAU_API_H_ #if (defined(PROFILING_ON) || defined(TRACING_ON) ) ////////////////////////////////////////////////////////////////////// // TAU PROFILING API MACROS. // To ensure that Profiling does not add any runtime overhead when it // is turned off, these macros expand to null. ////////////////////////////////////////////////////////////////////// extern "C" void Tau_start(char *name); extern "C" void Tau_stop(char *name); extern "C" void Tau_start_timer(void * function_info, int phase ); extern "C" void Tau_stop_timer(void * function_info); extern "C" void Tau_create_top_level_timer_if_necessary(void); extern "C" void Tau_stop_top_level_timer_if_necessary(void); extern "C" char * Tau_phase_enable(const char *group); extern "C" void Tau_profile_snapshot(char *name); extern "C" void Tau_metadata(char *name, char *value); extern "C" void Tau_profile_snapshot_1l(char *name, int number); #define TAU_TYPE_STRING(profileString, str) static string profileString(str); #if (TAU_MAX_THREADS == 1) // If we're not multi-threaded, just use the non-thread-safe static initializer #define TAU_PROFILE(name, type, group) \ static TauGroup_t tau_gr = group; \ static FunctionInfo tauFI(name, type, tau_gr, #group); \ tau::Profiler tauFP(&tauFI, tau_gr); #ifdef TAU_PROFILEPHASE #define TAU_PHASE(name, type, group) \ static TauGroup_t tau_group = group; \ static char * TauGroupNameUsed = Tau_phase_enable(#group); \ static FunctionInfo tauFInfo(name, type, tau_group, TauGroupNameUsed); \ tau::Profiler tauFProf(&tauFInfo, tau_group); \ tauFProf.SetPhase(1); #else /* TAU_PROFILEPHASE */ #define TAU_PHASE TAU_PROFILE #endif /* TAU_PROFILEPHASE */ #define TAU_PROFILE_TIMER(var, name, type, group) \ static TauGroup_t var##tau_gr = group; \ static FunctionInfo *var##fi = new FunctionInfo(name, type, var##tau_gr, #group); #define TAU_PROFILE_TIMER_DYNAMIC(var, name, type, group) \ TauGroup_t var##tau_gr = group; \ FunctionInfo *var##fi = new FunctionInfo(name, type, var##tau_gr, #group); #ifdef TAU_PROFILEPHASE #define TAU_PHASE_CREATE_STATIC(var, name, type, group) \ static TauGroup_t var##tau_group = group; \ static char * TauGroupNameUsed##var = Tau_phase_enable(#group); \ static FunctionInfo *var##finfo = new FunctionInfo(name, type, var##tau_group, TauGroupNameUsed##var); #define TAU_PHASE_CREATE_DYNAMIC(var, name, type, group) \ TauGroup_t var##tau_group = group; \ static char * TauGroupNameUsed##var = Tau_phase_enable(#group); \ FunctionInfo *var##finfo = new FunctionInfo(name, type, var##tau_group, TauGroupNameUsed##var); #define TAU_PHASE_START(var) if (var##tau_group & RtsLayer::TheProfileMask()) \ Tau_start_timer(var##finfo, 1); #define TAU_PHASE_STOP(var) if (var##tau_group & RtsLayer::TheProfileMask()) \ Tau_stop_timer(var##finfo); #else /* TAU_PROFILEPHASE */ #define TAU_PHASE_CREATE_STATIC TAU_PROFILE_TIMER #define TAU_PHASE_CREATE_DYNAMIC TAU_PROFILE_TIMER_DYNAMIC #define TAU_PHASE_START TAU_PROFILE_START #define TAU_PHASE_STOP TAU_PROFILE_STOP #endif /* TAU_PROFILEPHASE */ /* The macros below refer to TAU's FunctionInfo object. This object is created with a new call for multi-threaded applications and with a static constructor when a single thread of execution is used. Correspondingly we either use tauFI.method() or tauFI->method(); */ #define TAU_PROFILE_SET_GROUP_NAME(newname) tauFI.SetPrimaryGroupName(newname); #define TAU_PROFILE_TIMER_SET_GROUP_NAME(t, newname) t##fi.SetPrimaryGroupName(newname); #define TAU_PROFILE_TIMER_SET_NAME(t, newname) t##fi.SetName(newname); #define TAU_PROFILE_TIMER_SET_TYPE(t, newname) t##fi.SetType(newname); #define TAU_PROFILE_TIMER_SET_GROUP(t, id) t##fi.SetProfileGroup(id); #else /* TAU_MAX_THREADS */ // Multithreaded, we should use thread-safe tauCreateFI to create the FunctionInfo object // Note: It's still not absolutely theoretically 100% thread-safe, since the static // initializer is not in a lock, but we don't want to pay that price for every function call #define TAU_PROFILE(name, type, group) \ static TauGroup_t tau_gr = group; \ static FunctionInfo *tauFI = NULL; \ if (tauFI == 0) \ tauCreateFI(&tauFI, name, type, tau_gr, #group); \ tau::Profiler tauFP(tauFI, tau_gr); #ifdef TAU_PROFILEPHASE #define TAU_PHASE(name, type, group) \ static TauGroup_t tau_group = group; \ static FunctionInfo *tauFInfo = NULL; \ static char * TauGroupNameUsed = Tau_phase_enable(#group); \ tauCreateFI(&tauFInfo, name, type, tau_group, TauGroupNameUsed); \ tau::Profiler tauFProf(tauFInfo, tau_group); \ tauFProf.SetPhase(1); #else #define TAU_PHASE TAU_PROFILE #endif /* TAU_PROFILEPHASE */ #define TAU_PROFILE_TIMER(var, name, type, group) \ static TauGroup_t var##tau_gr = group; \ static FunctionInfo *var##fi = NULL; \ if (var##fi == 0) \ tauCreateFI(&var##fi, name, type, var##tau_gr, #group); #define TAU_PROFILE_TIMER_DYNAMIC(var, name, type, group) \ TauGroup_t var##tau_gr = group; \ FunctionInfo *var##fi = new FunctionInfo(name, type, var##tau_gr, #group); #ifdef TAU_PROFILEPHASE #define TAU_PHASE_CREATE_STATIC(var, name, type, group) \ static TauGroup_t var##tau_group = group; \ static FunctionInfo *var##finfo = NULL; \ static char * TauGroupNameUsed##var = Tau_phase_enable(#group); \ tauCreateFI(&var##finfo, name, type, var##tau_group, TauGroupNameUsed##var); #define TAU_PHASE_CREATE_DYNAMIC(var, name, type, group) \ TauGroup_t var##tau_group = group; \ FunctionInfo *var##finfo = NULL; \ static char * TauGroupNameUsed##var = Tau_phase_enable(#group); \ tauCreateFI(&var##finfo, name, type, var##tau_group, TauGroupNameUsed##var); #else #define TAU_PHASE_CREATE_STATIC TAU_PROFILE_TIMER #define TAU_PHASE_CREATE_DYNAMIC TAU_PROFILE_TIMER_DYNAMIC #endif /* TAU_PROFILEPHASE */ // Construct a tau::Profiler obj and a FunctionInfo obj with an extended name // e.g., FunctionInfo loop1fi(); tau::Profiler loop1(); #define TAU_PROFILE_START(var) if (var##tau_gr & RtsLayer::TheProfileMask()) \ Tau_start_timer(var##fi, 0); #ifdef TAU_PROFILEPHASE #define TAU_PHASE_START(var) if (var##tau_group & RtsLayer::TheProfileMask()) \ Tau_start_timer(var##finfo, 1); #else #define TAU_PHASE_START TAU_PROFILE_START #endif /* TAU_PROFILEPHASE */ #ifdef TAU_PROFILEPHASE #define TAU_PHASE_STOP(var) if (var##tau_group & RtsLayer::TheProfileMask()) \ Tau_stop_timer(var##finfo); #else #define TAU_PHASE_STOP TAU_PROFILE_STOP #endif /* TAU_PROFILEPHASE */ /* The macros below refer to TAU's FunctionInfo object. This object is created with a new call for multi-threaded applications and with a static constructor when a single thread of execution is used. Correspondingly we either use tauFI.method() or tauFI->method(); */ #define TAU_PROFILE_SET_GROUP_NAME(newname) tauFI->SetPrimaryGroupName(newname); #define TAU_PROFILE_TIMER_SET_GROUP_NAME(t, newname) t##fi->SetPrimaryGroupName(newname); #define TAU_PROFILE_TIMER_SET_NAME(t, newname) t##fi->SetName(newname); #define TAU_PROFILE_TIMER_SET_TYPE(t, newname) t##fi->SetType(newname); #define TAU_PROFILE_TIMER_SET_GROUP(t, id) t##fi->SetProfileGroup(id); #endif /* TAU_MAX_THREADS */ #ifdef TAU_PROFILEPARAM #define TAU_PROFILE_PARAM1L(b,c) tau::Profiler::AddProfileParamData(b,c) #else /* TAU_PROFILEPARAM */ #define TAU_PROFILE_PARAM1L(b,c) #endif /* TAU_PROFILEPARAM */ // Construct a tau::Profiler obj and a FunctionInfo obj with an extended name // e.g., FunctionInfo loop1fi(); tau::Profiler loop1(); #define TAU_PROFILE_START(var) if (var##tau_gr & RtsLayer::TheProfileMask()) \ Tau_start_timer(var##fi, 0); #define TAU_PROFILE_STOP(var) if (var##tau_gr & RtsLayer::TheProfileMask()) \ Tau_stop_timer(var##fi); #define TAU_PROFILE_STMT(stmt) stmt; #define TAU_PROFILE_EXIT(msg) tau::Profiler::ProfileExit(msg); #define TAU_PROFILE_INIT(argc, argv) RtsLayer::ProfileInit(argc, argv); #define TAU_INIT(argc, argv) RtsLayer::ProfileInit(*argc, *argv); #define TAU_PROFILE_SET_NODE(node) RtsLayer::setMyNode(node); #define TAU_PROFILE_SET_CONTEXT(context) RtsLayer::setMyContext(context); #define TAU_GLOBAL_TIMER(timer, name, type, group) FunctionInfo& timer (void) { \ static FunctionInfo *timer##fi = NULL; \ tauCreateFI(&timer##fi, name, type, group, #group); \ return *timer##fi; } #define TAU_GLOBAL_TIMER_START(timer) { static FunctionInfo *timer##fptr= & timer (); \ int tau_tid = RtsLayer::myThread(); \ tau::Profiler *t = new tau::Profiler (timer##fptr, timer##fptr != (FunctionInfo *) 0 ? timer##fptr->GetProfileGroup() : TAU_DEFAULT, true, tau_tid); \ t->Start(tau_tid); } #define TAU_GLOBAL_TIMER_STOP() {int tau_threadid = RtsLayer::myThread(); \ tau::Profiler *p = tau::Profiler::CurrentProfiler[tau_threadid]; \ p->Stop(tau_threadid); \ delete p; \ } #define TAU_GLOBAL_TIMER_EXTERNAL(timer) extern FunctionInfo& timer(void); #ifdef TAU_PROFILEPHASE #define TAU_GLOBAL_PHASE(timer, name, type, group) FunctionInfo& timer() { \ static FunctionInfo *timer##fi = NULL; \ tauCreateFI(&timer##fi, name, type, group, Tau_enable_phase(#group)); \ return *timer##fi; } #define TAU_GLOBAL_PHASE_START(timer) { static FunctionInfo *timer##fptr= & timer (); \ int tau_tid = RtsLayer::myThread(); \ tau::Profiler *t = new tau::Profiler (timer##fptr, timer##fptr != (FunctionInfo *) 0 ? timer##fptr->GetProfileGroup() : TAU_DEFAULT, true, tau_tid); \ t->SetPhase(1); \ t->Start(tau_tid); } #define TAU_GLOBAL_PHASE_STOP(timer) Tau_stop_timer(&timer()); #define TAU_GLOBAL_PHASE_EXTERNAL(timer) extern FunctionInfo& timer(void); #else /* TAU_PROFILEPHASE */ #define TAU_GLOBAL_PHASE TAU_GLOBAL_TIMER #define TAU_GLOBAL_PHASE_START TAU_GLOBAL_TIMER_START #define TAU_GLOBAL_PHASE_STOP(timer) TAU_GLOBAL_TIMER_STOP() #define TAU_GLOBAL_PHASE_EXTERNAL TAU_GLOBAL_TIMER_EXTERNAL #endif /* TAU_PROFILEPHASE */ /* The above macros are for use with global timers in a multi-threaded application */ #ifdef PROFILE_CALLSTACK #define TAU_PROFILE_CALLSTACK() tau::Profiler::CallStackTrace(); #else #define TAU_PROFILE_CALLSTACK() #endif /* PROFILE_CALLSTACK */ #define TAU_DB_DUMP() tau::Profiler::DumpData(); #define TAU_DB_DUMP_PREFIX(prefix) tau::Profiler::DumpData(false, RtsLayer::myThread(), prefix); #define TAU_DB_DUMP_INCR() tau::Profiler::DumpData(true); #define TAU_DB_PURGE() tau::Profiler::PurgeData(); #define TAU_GET_FUNC_NAMES(functionList, num) tau::Profiler::theFunctionList(&functionList, &num); #define TAU_DUMP_FUNC_NAMES() tau::Profiler::dumpFunctionNames(); #ifdef TAU_MULTIPLE_COUNTERS #define TAU_GET_COUNTER_NAMES(counterList, num) MultipleCounterLayer::theCounterList(&counterList, &num); #else //TAU_MULTIPLE_COUNTERS #define TAU_GET_COUNTER_NAMES(counterList, num) tau::Profiler::theCounterList(&counterList, &num); #endif //TAU_MULTIPLE_COUNTERS #define TAU_GET_FUNC_VALS(v1,v2,v3,v4,v5,v6,v7,v8) \ tau::Profiler::getFunctionValues(v1,v2,&v3,&v4,&v5,&v6,&v7,&v8); #define TAU_DUMP_FUNC_VALS(v1,v2) \ tau::Profiler::dumpFunctionValues(v1,v2); #define TAU_DUMP_FUNC_VALS_INCR(v1,v2) \ tau::Profiler::dumpFunctionValues(v1,v2,true); // UserEvents #define TAU_GET_EVENT_NAMES(eventList, num) tau::Profiler::getUserEventList(&eventList, &num); #define TAU_GET_EVENT_VALS(v1,v2,v3,v4,v5,v6,v7) \ tau::Profiler::getUserEventValues(v1,v2,&v3,&v4,&v5,&v6,&v7); #define TAU_REGISTER_EVENT(event, name) static TauUserEvent event(name); #define TAU_EVENT(event, data) (event).TriggerEvent(data); #define TAU_EVENT_SET_NAME(event, name) (event).SetEventName(name); #define TAU_EVENT_DISABLE_MIN(event) (event).SetDisableMin(true); #define TAU_EVENT_DISABLE_MAX(event) (event).SetDisableMax(true); #define TAU_EVENT_DISABLE_MEAN(event) (event).SetDisableMean(true); #define TAU_EVENT_DISABLE_STDDEV(event) (event).SetDisableStdDev(true); #define TAU_REPORT_STATISTICS() TauUserEvent::ReportStatistics(); #define TAU_REPORT_THREAD_STATISTICS() TauUserEvent::ReportStatistics(true); #define TAU_REGISTER_CONTEXT_EVENT(event, name) static TauContextUserEvent event(name); #define TAU_CONTEXT_EVENT(event, data) (event).TriggerEvent(data); #define TAU_DISABLE_CONTEXT_EVENT(event) (event).SetDisableContext(true); #define TAU_ENABLE_CONTEXT_EVENT(event) (event).SetDisableContext(false); #define TAU_REGISTER_THREAD() RtsLayer::RegisterThread(); #define TAU_REGISTER_FORK(id, op) RtsLayer::RegisterFork(id, op); #define TAU_ENABLE_INSTRUMENTATION() RtsLayer::TheEnableInstrumentation() = true; #define TAU_DISABLE_INSTRUMENTATION() RtsLayer::TheEnableInstrumentation() = false; #define TAU_ENABLE_GROUP(group) RtsLayer::enableProfileGroup(group) #define TAU_DISABLE_GROUP(group) RtsLayer::disableProfileGroup(group) #define TAU_ENABLE_GROUP_NAME(group) RtsLayer::enableProfileGroupName(group) #define TAU_DISABLE_GROUP_NAME(group) RtsLayer::disableProfileGroupName(group) #define TAU_ENABLE_ALL_GROUPS() RtsLayer::enableAllGroups() #define TAU_DISABLE_ALL_GROUPS() RtsLayer::disableAllGroups() #define TAU_GET_PROFILE_GROUP(group) RtsLayer::getProfileGroup(group) #define TAU_ENABLE_TRACKING_MEMORY() TauEnableTrackingMemory() #define TAU_DISABLE_TRACKING_MEMORY() TauDisableTrackingMemory() #define TAU_ENABLE_TRACKING_MEMORY_HEADROOM() TauEnableTrackingMemoryHeadroom() #define TAU_DISABLE_TRACKING_MEMORY_HEADROOM() TauDisableTrackingMemoryHeadroom() #define TAU_TRACK_MEMORY() TauTrackMemoryUtilization(true) #define TAU_TRACK_MEMORY_HEADROOM() TauTrackMemoryUtilization(false) #define TAU_TRACK_MEMORY_HERE() TauTrackMemoryHere() #define TAU_TRACK_MEMORY_HEADROOM_HERE() TauTrackMemoryHeadroomHere() #define TAU_ENABLE_TRACKING_MUSE_EVENTS() TauEnableTrackingMuseEvents() #define TAU_DISABLE_TRACKING_MUSE_EVENTS() TauDisableTrackingMuseEvents() #define TAU_TRACK_MUSE_EVENTS() TauTrackMuseEvents() #define TAU_SET_INTERRUPT_INTERVAL(value) TauSetInterruptInterval(value) #define TAU_NEW(expr, size) Tau_new(__FILE__, __LINE__, size, expr) #define TAU_DELETE(expr, variable) Tau_track_memory_deallocation(__FILE__, __LINE__, variable) , expr #define TAU_PROFILE_SNAPSHOT(name) Tau_profile_snapshot(name); #define TAU_PROFILE_SNAPSHOT_1L(name, expr) Tau_profile_snapshot_1l(name, expr); #define TAU_METADATA(name, value) Tau_metadata(name, value); #ifdef NO_RTTI /* #define CT(obj) string(#obj) */ #define CT(obj) string(" ") #else // RTTI is present //#define CT(obj) string(RtsLayer::CheckNotNull(typeid(obj).name())) #define CT(obj) RtsLayer::GetRTTI(typeid(obj).name()) #endif //NO_RTTI #else /* PROFILING_ON */ /* In the absence of profiling, define the functions as null */ #define TYPE_STRING(profileString, str) #define PROFILED_BLOCK(name, type) #define TAU_TYPE_STRING(profileString, str) #define TAU_PROFILE(name, type, group) #define TAU_PROFILE_TIMER(var, name, type, group) #define TAU_PROFILE_START(var) #define TAU_PROFILE_STOP(var) #define TAU_PROFILE_STMT(stmt) #define TAU_PROFILE_EXIT(msg) #define TAU_PROFILE_INIT(argc, argv) #define TAU_INIT(argc, argv) #define TAU_PROFILE_SET_NODE(node) #define TAU_PROFILE_SET_CONTEXT(context) #define TAU_PROFILE_SET_GROUP_NAME(newname) #define TAU_PROFILE_TIMER_SET_GROUP_NAME(t, newname) #define TAU_PROFILE_TIMER_SET_NAME(t, newname) #define TAU_PROFILE_TIMER_SET_TYPE(t, newname) #define TAU_PROFILE_TIMER_SET_GROUP(t, id) #define TAU_PROFILE_CALLSTACK() #define TAU_DB_DUMP() #define TAU_DB_DUMP_PREFIX(prefix) #define TAU_DB_DUMP_INCR() #define TAU_DB_PURGE() #define TAU_GET_FUNC_NAMES(functionList, num) #define TAU_DUMP_FUNC_NAMES() #define TAU_GET_COUNTER_NAMES(counterList, num) #define TAU_GET_FUNC_VALS(v1,v2,v3,v4,v5,v6,v7,v8) #define TAU_DUMP_FUNC_VALS(v1,v2) #define TAU_DUMP_FUNC_VALS_INCR(v1,v2) #define TAU_REGISTER_EVENT(event, name) #define TAU_EVENT(event, data) #define TAU_EVENT_SET_NAME(event, name) #define TAU_EVENT_DISABLE_MIN(event) #define TAU_EVENT_DISABLE_MAX(event) #define TAU_EVENT_DISABLE_MEAN(event) #define TAU_EVENT_DISABLE_STDDEV(event) #define TAU_REPORT_STATISTICS() #define TAU_REPORT_THREAD_STATISTICS() #define TAU_REGISTER_THREAD() #define TAU_REGISTER_FORK(id, op) #define TAU_ENABLE_INSTRUMENTATION() #define TAU_DISABLE_INSTRUMENTATION() #define TAU_ENABLE_GROUP(group) #define TAU_DISABLE_GROUP(group) #define TAU_ENABLE_GROUP_NAME(group) #define TAU_DISABLE_GROUP_NAME(group) #define TAU_ENABLE_ALL_GROUPS() #define TAU_DISABLE_ALL_GROUPS() #define TAU_ENABLE_TRACKING_MEMORY() #define TAU_DISABLE_TRACKING_MEMORY() #define TAU_TRACK_MEMORY() #define TAU_TRACK_MEMORY_HERE() #define TAU_ENABLE_TRACKING_MUSE_EVENTS() #define TAU_DISABLE_TRACKING_MUSE_EVENTS() #define TAU_TRACK_MUSE_EVENTS() #define TAU_SET_INTERRUPT_INTERVAL(value) #define TAU_PHASE_CREATE_STATIC(var, name, type, group) #define TAU_PHASE_CREATE_DYNAMIC(var, name, type, group) #define TAU_PHASE_START(var) #define TAU_PHASE_STOP(var) #define TAU_GLOBAL_PHASE(timer, name, type, group) #define TAU_GLOBAL_PHASE_START(timer) #define TAU_GLOBAL_PHASE_STOP(timer) #define TAU_GLOBAL_PHASE_EXTERNAL(timer) #define TAU_GLOBAL_TIMER(timer, name, type, group) #define TAU_GLOBAL_TIMER_EXTERNAL(timer) #define TAU_GLOBAL_TIMER_START(timer) #define TAU_GLOBAL_TIMER_STOP() #define TAU_REGISTER_CONTEXT_EVENT(event, name) #define TAU_CONTEXT_EVENT(event, data) #define TAU_DISABLE_CONTEXT_EVENT(event) #define TAU_ENABLE_CONTEXT_EVENT(event) #define TAU_PROFILE_PARAM1L(b,c) #define TAU_TRACK_NEW(expr, size) expr #define TAU_TRACK_DELETE(expr, variable) expr #define TAU_PROFILE_SNAPSHOT(name) #define TAU_PROFILE_SNAPSHOT_1L(name, expr) #define CT(obj) #endif /* PROFILING_ON */ #ifdef TRACING_ON #define TAU_TRACE_SENDMSG(type, destination, length) \ RtsLayer::TraceSendMsg(type, destination, length); #define TAU_TRACE_RECVMSG(type, source, length) \ RtsLayer::TraceRecvMsg(type, source, length); #else /* TRACING_ON */ #define TAU_TRACE_SENDMSG(type, destination, length) #define TAU_TRACE_RECVMSG(type, source, length) #endif /* TRACING_ON */ #ifdef DEBUG_PROF #define DEBUGPROFMSG(msg) { cout<< msg; } #else #define DEBUGPROFMSG(msg) #endif // DEBUG_PROF #endif /* _TAU_API_H_ */ /*************************************************************************** * $RCSfile: TauAPI.h,v $ $Author: sameer $ * $Revision: 1.62 $ $Date: 2007/04/25 01:07:04 $ * POOMA_VERSION_ID: $Id: TauAPI.h,v 1.62 2007/04/25 01:07:04 sameer Exp $ ***************************************************************************/ tau-2.16.4/include/Profile/TauCAPI.h000066400000000000000000000413311062343042700167620ustar00rootroot00000000000000 /**************************************************************************** ** TAU Portable Profiling Package ** ** http://www.cs.uoregon.edu/research/tau ** ***************************************************************************** ** Copyright 1997 ** ** Department of Computer and Information Science, University of Oregon ** ** Advanced Computing Laboratory, Los Alamos National Laboratory ** ****************************************************************************/ /*************************************************************************** ** File : TauCAPI.h ** ** Description : TAU Profiling Package API for C ** ** Author : Sameer Shende ** ** Contact : sameer@cs.uoregon.edu sameer@acl.lanl.gov ** ** Flags : Compile with ** ** -DPROFILING_ON to enable profiling (ESSENTIAL) ** ** -DPROFILE_STATS for Std. Deviation of Excl Time ** ** -DSGI_HW_COUNTERS for using SGI counters ** ** -DPROFILE_CALLS for trace of each invocation ** ** -DSGI_TIMERS for SGI fast nanosecs timer ** ** -DTULIP_TIMERS for non-sgi Platform ** ** -DPOOMA_STDSTL for using STD STL in POOMA src ** ** -DPOOMA_TFLOP for Intel Teraflop at SNL/NM ** ** -DPOOMA_KAI for KCC compiler ** ** -DDEBUG_PROF for internal debugging messages ** ** -DPROFILE_CALLSTACK to enable callstack traces ** ** Documentation : See http://www.cs.uoregon.edu/research/tau ** ***************************************************************************/ #ifndef _TAU_CAPI_H_ #define _TAU_CAPI_H_ #if ((! defined( __cplusplus)) || defined (TAU_USE_C_API)) #ifdef TAU_USE_C_API extern "C" { #endif /* TAU_USE_C_API */ /* For C */ #include #include /* C API Definitions follow */ #if (defined(PROFILING_ON) || defined(TRACING_ON) ) #define TAU_PROFILE(name, type, group) /* OLD CODE. Not thread-safe */ /* #define TAU_PROFILE_TIMER(var,name, type, group) static int taufirst##var = 1;\ static void *var; \ if (taufirst##var == 1) { \ var = Tau_get_profiler(name, type, group, #group); \ taufirst##var = 0; } */ #define TAU_PROFILE_TIMER(var,name, type, group) static void *var=NULL; Tau_profile_c_timer(&var, name, type, group, #group); #define TAU_PROFILE_DECLARE_TIMER(var) static void *var=NULL; #define TAU_PROFILE_CREATE_TIMER(var,name,type,group) Tau_profile_c_timer(&var, name, type, group, #group); #define TAU_PROFILE_START(var) Tau_start_timer(var, 0); #define TAU_PROFILE_STOP(var) Tau_stop_timer(var); #define TAU_PROFILE_STMT(stmt) stmt; #define TAU_PROFILE_EXIT(msg) Tau_exit(msg); #define TAU_PROFILE_INIT(argc, argv) Tau_init(argc, argv); #define TAU_INIT(argc, argv) Tau_init_ref(argc, argv); #define TAU_PROFILE_SET_NODE(node) Tau_set_node(node); #define TAU_PROFILE_SET_CONTEXT(context) Tau_set_context(context); #define TAU_PROFILE_CALLSTACK() Tau_profile_callstack(); #define TAU_DB_DUMP() Tau_dump(); #define TAU_DB_DUMP_PREFIX(prefix) Tau_dump_prefix(prefix); #define TAU_DB_DUMP_INCR() Tau_dump_incr(); #define TAU_DB_PURGE() Tau_purge(); #define TAU_GET_FUNC_NAMES(functionList, num) Tau_the_function_list(&functionList, &num); #define TAU_DUMP_FUNC_NAMES() Tau_dump_function_names(); #define TAU_GET_COUNTER_NAMES(counterList, num) Tau_the_counter_names(counterList, num); #define TAU_GET_FUNC_VALS(v1,v2,v3,v4,v5,v6,v7,v8) Tau_get_function_values(v1,v2,&v3,&v4,&v5,&v6,&v7,&v8); #define TAU_DUMP_FUNC_VALS(functionList, num) Tau_dump_function_values(functionList, num); #define TAU_DUMP_FUNC_VALS_incr(functionList, num) Tau_dump_function_values_incr(functionList, num); #define TAU_GET_EVENT_NAMES(eventList, num) Tau_get_event_names(&eventList, &num); #define TAU_GET_EVENT_VALS(v1,v2,v3,v4,v5,v6) Tau_get_event_vals(v1,v2,&v3,&v4,&v5,&v6); /* #define TAU_REGISTER_EVENT(event, name) static int tauuser##event = 1;\ static void *event; \ if (tauuser##event == 1) { \ event = Tau_get_userevent(name); \ tauuser##event = 0; } */ #define TAU_REGISTER_EVENT(event, name) static int taufirst##event = 1;\ static void *event; \ if (taufirst##event == 1) { \ event = Tau_get_userevent(name); \ taufirst##event = 0; } #define TAU_REGISTER_CONTEXT_EVENT(event, name) static int taufirst##event = 1;\ static void *event; \ if (taufirst##event == 1) { \ event = Tau_get_context_userevent(name); \ taufirst##event = 0; } #define TAU_EVENT(event, data) Tau_userevent(event, data); #define TAU_CONTEXT_EVENT(event, data) Tau_context_userevent(event, data); #define TAU_EVENT_SET_NAME(event, name) Tau_set_event_name(event, name); #define TAU_REPORT_STATISTICS() Tau_report_statistics(); #define TAU_REPORT_THREAD_STATISTICS() Tau_report_thread_statistics(); #define TAU_EVENT_DISABLE_MIN(event) Tau_event_disable_min(event); #define TAU_EVENT_DISABLE_MAX(event) Tau_event_disable_max(event); #define TAU_EVENT_DISABLE_MEAN(event) Tau_event_disable_mean(event); #define TAU_EVENT_DISABLE_STDDEV(event) Tau_event_disable_stddev(event); #define TAU_STORE_ALL_EVENTS #define TYPE_STRING(profileString, str) #define PROFILED_BLOCK(name, type) /* C doesn't support runtime type information */ #define CT(obj) #define TAU_REGISTER_THREAD() Tau_register_thread(); #define TAU_REGISTER_FORK(nodeid, op) Tau_register_fork(nodeid, op); #define TAU_ENABLE_INSTRUMENTATION() Tau_enable_instrumentation(); #define TAU_DISABLE_INSTRUMENTATION() Tau_disable_instrumentation(); #define TAU_ENABLE_GROUP(group) Tau_enable_group(group); #define TAU_DISABLE_GROUP(group) Tau_disable_group(group); #define TAU_ENABLE_GROUP_NAME(group) Tau_enable_group_name(group) #define TAU_DISABLE_GROUP_NAME(group) Tau_disable_group_name(group) #define TAU_ENABLE_ALL_GROUPS() Tau_enable_all_groups() #define TAU_DISABLE_ALL_GROUPS() Tau_disable_all_groups() #define TAU_DISABLE_GROUP_NAME(group) Tau_disable_group_name(group) #define TAU_GET_PROFILE_GROUP(group) Tau_get_profile_group(group) #define TAU_BCAST_DATA(data) Tau_bcast_data(data) #define TAU_REDUCE_DATA(data) Tau_reduce_data(data) #define TAU_ALLTOALL_DATA(data) Tau_alltoall_data(data) #define TAU_SCATTER_DATA(data) Tau_scatter_data(data) #define TAU_GATHER_DATA(data) Tau_gather_data(data) #define TAU_ALLREDUCE_DATA(data) Tau_allreduce_data(data) #define TAU_ALLGATHER_DATA(data) Tau_allgather_data(data) #define TAU_REDUCESCATTER_DATA(data) Tau_reducescatter_data(data) #define TAU_SCAN_DATA(data) Tau_scan_data(data) #define TAU_ENABLE_TRACKING_MEMORY() Tau_enable_tracking_memory() #define TAU_DISABLE_TRACKING_MEMORY() Tau_disable_tracking_memory() #define TAU_TRACK_MEMORY() Tau_track_memory() #define TAU_TRACK_MEMORY_HERE() Tau_track_memory_here() #define TAU_TRACK_MEMORY_HEADROOM() Tau_track_memory_headroom() #define TAU_TRACK_MEMORY_HEADROOM_HERE() Tau_track_memory_headroom_here() #define TAU_ENABLE_TRACKING_MEMORY_HEADROOM() Tau_enable_tracking_memory_headroom() #define TAU_DISABLE_TRACKING_MEMORY_HEADROOM() Tau_disable_tracking_memory_headroom() #define TAU_ENABLE_TRACKING_MUSE_EVENTS() Tau_enable_tracking_muse_events() #define TAU_DISABLE_TRACKING_MUSE_EVENTS() Tau_disable_tracking_muse_events() #define TAU_TRACK_MUSE_EVENTS() Tau_track_muse_events() #define TAU_SET_INTERRUPT_INTERVAL(value) Tau_set_interrupt_interval(value) #define TAU_PHASE_CREATE_STATIC(var, name, type, group) static void *var##finfo = NULL; Tau_profile_c_timer(&var##finfo, name, type, group, Tau_phase_enable_once(#group, &var##finfo)) #define TAU_PHASE_CREATE_DYNAMIC(var, name, type, group) void *var##finfo = NULL; Tau_profile_c_timer(&var##finfo, name, type, group, Tau_phase_enable_once(#group, &var##finfo)) #define TAU_PROFILE_TIMER_DYNAMIC(var, name, type, group) void *var = NULL; Tau_profile_c_timer(&var, name, type, group, #group) #define TAU_PHASE_START(var) Tau_start_timer(var##finfo, 1) #define TAU_PHASE_STOP(var) Tau_stop_timer(var##finfo) #define TAU_GLOBAL_PHASE(timer, name, type, group) void * TauGlobalPhase##timer(void) \ { static void *ptr = NULL; \ Tau_profile_c_timer(&ptr, name, type, group, #group); \ return ptr; \ } #define TAU_GLOBAL_PHASE_START(timer) { void *ptr = TauGlobalPhase##timer(); \ Tau_start_timer(ptr, 1); } #define TAU_GLOBAL_PHASE_STOP(timer) { void *ptr = TauGlobalPhase##timer(); \ Tau_stop_timer(ptr); } #define TAU_GLOBAL_PHASE_EXTERNAL(timer) extern void * TauGlobalPhase##timer(void) #define TAU_GLOBAL_TIMER(timer, name, type, group) void * TauGlobal##timer(void) \ { void *ptr = NULL; \ Tau_profile_c_timer(&ptr, name, type, group, #group); \ return ptr; \ } #define TAU_GLOBAL_TIMER_START(timer) { void *ptr = TauGlobal##timer(); \ Tau_start_timer(ptr, 0); } #define TAU_GLOBAL_TIMER_STOP() Tau_global_stop() #define TAU_GLOBAL_TIMER_EXTERNAL(timer) extern void* TauGlobal##timer(void); #ifdef TAU_PROFILEPARAM #define TAU_PROFILE_PARAM1L(b,c) Tau_profile_param1l(b,c) #else /* TAU_PROFILEPARAM */ #define TAU_PROFILE_PARAM1L(b,c) #endif /* TAU_PROFILEPARAM */ #define TAU_PROFILE_SNAPSHOT(name) Tau_profile_snapshot(name); #define TAU_PROFILE_SNAPSHOT_1L(name, expr) Tau_profile_snapshot(name, expr); extern void Tau_start(char *name); extern void Tau_stop(char *name); extern void Tau_specify_mapping_data1(long data, const char *name); extern void Tau_bcast_data(int data); extern void Tau_reduce_data(int data); extern void Tau_alltoall_data(int data); extern void Tau_scatter_data(int data); extern void Tau_gather_data(int data); extern void Tau_allreduce_data(int data); extern void Tau_allgather_data(int data); extern void Tau_reducescatter_data(int data); extern void Tau_scan_data(int data); extern void * Tau_get_profiler(char *fname, char *type, TauGroup_t group, char *gr_name); extern void Tau_start_timer(void *profiler, int phase); extern void Tau_stop_timer(void *profiler); extern void Tau_exit(char *msg); extern void Tau_init(int argc, char **argv); extern void Tau_init_ref(int* argc, char ***argv); extern void Tau_set_node(int node); extern void Tau_set_context(int context); extern void Tau_callstack(void); extern int Tau_dump(void); extern int Tau_dump_incr(void); extern void Tau_purge(void); extern void Tau_theFunctionList(const char ***functionList, int *num); extern void Tau_dump_function_names(); extern void Tau_the_counter_names(const char **counterList, int num); extern void Tau_get_function_values(const char **inFuncs, int numOfFuncs, double ***counterExclusiveValues, double ***counterInclusiveValues, int **numOfCalls, int **numOfSubRoutines, const char ***counterNames, int *numOfCounters); extern void Tau_dump_function_values(const char **functionList, int num); extern void Tau_dump_function_values_incr(const char **functionList, int num); extern void Tau_register_thread(); extern void Tau_register_fork(int nodeid, enum TauFork_t opcode); extern void * Tau_get_userevent(char *name); extern void * Tau_get_context_userevent(char *name); extern void Tau_userevent(void *event, double data); extern void Tau_context_userevent(void *event, double data); extern void Tau_set_event_name(void *event, char * name); extern void Tau_report_statistics(void); extern void Tau_report_thread_statistics(void); extern void Tau_event_disable_min(void *event); extern void Tau_event_disable_max(void *event); extern void Tau_event_disable_mean(void *event); extern void Tau_event_disable_stddev(void *event); extern void Tau_trace_sendmsg(int type, int destination, int length); extern void Tau_trace_recvmsg(int type, int source, int length); extern TauGroup_t Tau_enable_group_name(char *group); extern TauGroup_t Tau_disable_group_name(char *group); extern TauGroup_t Tau_get_profile_group(char *group); extern void Tau_profile_c_timer(void **ptr, char *fname, char *type, TauGroup_t group, char *group_name); extern void Tau_create_top_level_timer_if_necessary(void); extern void Tau_stop_top_level_timer_if_necessary(void); extern void Tau_track_memory(void); extern void Tau_track_muse_events(void); extern void Tau_enable_tracking_memory(void); extern void Tau_disable_tracking_memory(void); extern void Tau_enable_tracking_muse_events(void); extern void Tau_disable_tracking_muse_events(void); extern void Tau_set_interrupt_interval(int value); extern void Tau_enable_instrumentation(void); extern void Tau_disable_instrumentation(void); extern void Tau_global_stop(void); extern char * Tau_phase_enable_once(const char *group, void **ptr); extern void Tau_profile_snapshot(char *name); extern void Tau_profile_snapshot_1l(char *name, int number); #else /* PROFILING_ON */ /* In the absence of profiling, define the functions as null */ #define TYPE_STRING(profileString, str) #define PROFILED_BLOCK(name, type) #define TAU_TYPE_STRING(profileString, str) #define TAU_PROFILE(name, type, group) #define TAU_PROFILE_TIMER(var, name, type, group) #define TAU_PROFILE_START(var) #define TAU_PROFILE_STOP(var) #define TAU_PROFILE_STMT(stmt) #define TAU_PROFILE_EXIT(msg) #define TAU_PROFILE_INIT(argc, argv) #define TAU_INIT(argc, argv) #define TAU_PROFILE_SET_NODE(node) #define TAU_PROFILE_SET_CONTEXT(context) #define TAU_PROFILE_CALLSTACK() #define TAU_DB_DUMP() #define TAU_DB_DUMP_PREFIX() #define TAU_DB_DUMP_INCR() #define TAU_DB_PURGE() #define TAU_GET_FUNC_NAMES(functionList, num) #define TAU_DUMP_FUNC_NAMES() #define TAU_GET_COUNTER_NAMES(counterList, num) #define TAU_GET_FUNC_VALS(v1,v2,v3,v4,v5,v6,v7,v8) #define TAU_DUMP_FUNC_VALS(functionList, num) #define TAU_DUMP_FUNC_VALS_incr(functionList, num) #define TAU_REGISTER_EVENT(event, name) #define TAU_EVENT(event, data) #define TAU_EVENT_SET_NAME(event, name) #define TAU_REPORT_STATISTICS() #define TAU_REPORT_THREAD_STATISTICS() #define TAU_EVENT_DISABLE_MIN(event) #define TAU_EVENT_DISABLE_MAX(event) #define TAU_EVENT_DISABLE_MEAN(event) #define TAU_EVENT_DISABLE_STDDEV(event) #define TAU_STORE_ALL_EVENTS #define TAU_REGISTER_THREAD() #define TAU_REGISTER_FORK(nodeid, op) #define TAU_ENABLE_INSTRUMENTATION() #define TAU_DISABLE_INSTRUMENTATION() #define TAU_ENABLE_GROUP(group) #define TAU_DISABLE_GROUP(group) #define TAU_ENABLE_GROUP_NAME(group) #define TAU_DISABLE_GROUP_NAME(group) #define TAU_GET_PROFILE_GROUP(group) #define TAU_BCAST_DATA(data) #define TAU_REDUCE_DATA(data) #define TAU_ALLREDUCE_DATA(data) #define TAU_ALLTOALL_DATA(data) #define TAU_SCATTER_DATA(data) #define TAU_GATHER_DATA(data) #define TAU_ALLGATHER_DATA(data) #define TAU_ENABLE_TRACKING_MEMORY() #define TAU_DISABLE_TRACKING_MEMORY() #define TAU_TRACK_MEMORY() #define TAU_TRACK_MEMORY_HERE() #define TAU_ENABLE_TRACKING_MUSE_EVENTS() #define TAU_DISABLE_TRACKING_MUSE_EVENTS() #define TAU_TRACK_MUSE_EVENTS() #define TAU_SET_INTERRUPT_INTERVAL(value) #define CT(obj) #define TAU_PHASE_CREATE_STATIC(var, name, type, group) #define TAU_PHASE_CREATE_DYNAMIC(var, name, type, group) #define TAU_PROFILE_TIMER_DYNAMIC(var, name, type, group) #define TAU_PHASE_START(var) #define TAU_PHASE_STOP(var) #define TAU_GLOBAL_PHASE(timer, name, type, group) #define TAU_GLOBAL_PHASE_START(timer) #define TAU_GLOBAL_PHASE_STOP(timer) #define TAU_GLOBAL_PHASE_EXTERNAL(timer) #define TAU_GLOBAL_TIMER(timer, name, type, group) #define TAU_GLOBAL_TIMER_EXTERNAL(timer) #define TAU_GLOBAL_TIMER_START(timer) #define TAU_GLOBAL_TIMER_STOP() #define TAU_PROFILE_PARAM1L(b,c) #endif /* PROFILING_ON */ #ifdef TRACING_ON #define TAU_TRACE_SENDMSG(type, destination, length) \ Tau_trace_sendmsg(type, destination, length); #define TAU_TRACE_RECVMSG(type, source, length) \ Tau_trace_recvmsg(type, source, length); #else /* TRACING_ON */ #define TAU_TRACE_SENDMSG(type, destination, length) \ Tau_trace_sendmsg(type, destination, length); #define TAU_TRACE_RECVMSG(type, source, length) \ Tau_trace_recvmsg(type, source, length); #endif /* TRACING_ON */ #ifdef TAU_USE_C_API } #endif /* TAU_USE_C_API */ #endif /* ! __cplusplus || TAU_C_API */ #endif /* _TAU_CAPI_H_ */ /*************************************************************************** * $RCSfile: TauCAPI.h,v $ $Author: sameer $ * $Revision: 1.46 $ $Date: 2007/03/24 01:56:06 $ * POOMA_VERSION_ID: $Id: TauCAPI.h,v 1.46 2007/03/24 01:56:06 sameer Exp $ ***************************************************************************/ tau-2.16.4/include/Profile/TauCompensate.h000066400000000000000000000034011062343042700203400ustar00rootroot00000000000000/**************************************************************************** ** TAU Portable Profiling Package ** ** http://www.cs.uoregon.edu/research/tau ** ***************************************************************************** ** Copyright 2004 ** ** Department of Computer and Information Science, University of Oregon ** ** Advanced Computing Laboratory, Los Alamos National Laboratory ** ****************************************************************************/ /*************************************************************************** ** File : TauCompensate.h ** ** Description : TAU Profiling Package ** ** Author : Sameer Shende ** ** Contact : sameer@cs.uoregon.edu ** ** Flags : Compile with ** ** -DTAU_COMPENSATE for instrumentation overhead ** ** compensation to correct profiles ** ** -DPROFILING_ON to enable profiling (ESSENTIAL) ** ** Documentation : http://www.cs.uoregon.edu/research/paracomp/tau ** ***************************************************************************/ ////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////// #ifndef _TAU_COMPENSATE_H_ #define _TAU_COMPENSATE_H_ #ifdef TAU_COMPENSATE enum TauOverhead { TauNullTimerOverhead, TauFullTimerOverhead }; void TauCalibrateOverhead(void); #ifndef TAU_MULTIPLE_COUNTERS double TauGetSingleTimerOverhead(void); double TauGetTimerOverhead(enum TauOverhead); #else /* TAU_MULTIPLE_COUNTERS */ double* TauGetSingleTimerOverhead(void); double* TauGetTimerOverhead(enum TauOverhead); #endif /* TAU_MULTIPLE_COUNTERS */ #endif /* TAU_COMPENSATE */ #endif /* _TAU_COMPENSATE_H_ */ tau-2.16.4/include/Profile/TauFAPI.h000066400000000000000000000065631062343042700167750ustar00rootroot00000000000000!**************************************************************************** !* TAU Portable Profiling Package ** !* http://www.cs.uoregon.edu/research/tau ** !**************************************************************************** !* Copyright 1997 ** !* Department of Computer and Information Science, University of Oregon ** !* Advanced Computing Laboratory, Los Alamos National Laboratory ** !**************************************************************************** !**************************************************************************** !* File : TauFAPI.h ** !* Description : TAU Profiling Package API for Fortran ** !* Author : Sameer Shende ** !* Contact : sameer@cs.uoregon.edu sameer@acl.lanl.gov ** !* Flags : Compile with ** !* -DPROFILING_ON to enable profiling (ESSENTIAL) ** !* -DPROFILE_STATS for Std. Deviation of Excl Time ** !* -DSGI_HW_COUNTERS for using SGI counters ** !* -DPROFILE_CALLS for trace of each invocation ** !* -DSGI_TIMERS for SGI fast nanosecs timer ** !* -DTULIP_TIMERS for non-sgi Platform ** !* -DPOOMA_STDSTL for using STD STL in POOMA src ** !* -DPOOMA_TFLOP for Intel Teraflop at SNL/NM ** !* -DPOOMA_KAI for KCC compiler ** !* -DDEBUG_PROF for internal debugging messages ** !* -DPROFILE_CALLSTACK to enable callstack traces ** !* Documentation : See http://www.cs.uoregon.edu/research/tau ** !**************************************************************************** integer TAU_DEFAULT integer TAU_MESSAGE integer TAU_PETE integer TAU_VIZ integer TAU_ASSIGN integer TAU_IO integer TAU_FIELD integer TAU_LAYOUT integer TAU_SPARSE integer TAU_DOMAINMAP integer TAU_UTILITY integer TAU_REGION integer TAU_PARTICLE integer TAU_MESHES integer TAU_SUBFIELD integer TAU_COMMUNICATION integer TAU_DESCRIPTOR_OVERHEAD integer TAU_BLITZ integer TAU_HPCXX integer TAU_FFT integer TAU_ACLMPL integer TAU_PAWS1 integer TAU_PAWS2 integer TAU_PAWS3 integer TAU_USER4 integer TAU_USER3 integer TAU_USER2 integer TAU_USER1 integer TAU_USER parameter (TAU_DEFAULT = Z"ffffffff") parameter (TAU_MESSAGE = Z"00000001") parameter (TAU_PETE = Z"00000002") parameter (TAU_VIZ = Z"00000004") parameter (TAU_ASSIGN = Z"00000008") parameter (TAU_IO = Z"00000010") parameter (TAU_FIELD = Z"00000020") parameter (TAU_LAYOUT = Z"00000040") parameter (TAU_SPARSE = Z"00000080") parameter (TAU_DOMAINMAP = Z"00000100") parameter (TAU_UTILITY = Z"00000200") parameter (TAU_REGION = Z"00000400") parameter (TAU_PARTICLE = Z"00000800") parameter (TAU_MESHES = Z"00001000") parameter (TAU_SUBFIELD = Z"00002000") parameter (TAU_COMMUNICATION = Z"00004000") parameter (TAU_DESCRIPTOR_OVERHEAD = Z"00008000") parameter (TAU_BLITZ = Z"00010000") parameter (TAU_HPCXX = Z"00020000") parameter (TAU_FFT = Z"00100000") parameter (TAU_ACLMPL = Z"00200000") parameter (TAU_PAWS1 = Z"00400000") parameter (TAU_PAWS2 = Z"00800000") parameter (TAU_PAWS3 = Z"01000000") parameter (TAU_USER4 = Z"08000000") parameter (TAU_USER3 = Z"10000000") parameter (TAU_USER2 = Z"20000000") parameter (TAU_USER1 = Z"40000000") parameter (TAU_USER = Z"80000000") tau-2.16.4/include/Profile/TauHandler.h000066400000000000000000000037271062343042700176320ustar00rootroot00000000000000/**************************************************************************** ** TAU Portable Profiling Package ** ** http://www.cs.uoregon.edu/research/paracomp/tau ** ***************************************************************************** ** Copyright 2004 ** ** Department of Computer and Information Science, University of Oregon ** ** Advanced Computing Laboratory, Los Alamos National Laboratory ** ****************************************************************************/ /*************************************************************************** ** File : TauHandler.h ** ** Description : TAU Profiling Package ** ** Author : Sameer Shende ** ** Contact : sameer@cs.uoregon.edu sameer@acl.lanl.gov ** ** Documentation : See http://www.cs.uoregon.edu/research/tau ** ***************************************************************************/ ////////////////////////////////////////////////////////////////////// // Routines ////////////////////////////////////////////////////////////////////// #ifndef _TAU_HANDLER_H_ #define _TAU_HANDLER_H_ int TauEnableTrackingMemory(void); int TauDisableTrackingMemory(void); void TauEnableTrackingMuseEvents(void); void TauDisableTrackingMuseEvents(void); void TauSetInterruptInterval(int interval); void TauTrackMemoryUtilization(bool allocated); void TauTrackMuseEvents(void); void TauTrackMemoryHere(void); double TauGetMaxRSS(void); int TauGetFreeMemory(void); void TauTrackMemoryHeadroomHere(void); int TauEnableTrackingMemoryHeadroom(void); int TauDisableTrackingMemoryHeadroom(void); #endif /* _TAU_HANDLER_H_ */ /*************************************************************************** * $RCSfile: TauHandler.h,v $ $Author: amorris $ * $Revision: 1.7 $ $Date: 2005/11/11 03:46:47 $ * POOMA_VERSION_ID: $Id: TauHandler.h,v 1.7 2005/11/11 03:46:47 amorris Exp $ ***************************************************************************/ tau-2.16.4/include/Profile/TauJAPI.h000066400000000000000000000022341062343042700167700ustar00rootroot00000000000000/* DO NOT EDIT THIS FILE - it is machine generated */ #include /* Header for class TAU_0002fProfile */ #ifndef _Included_TAU_0002fProfile #define _Included_TAU_0002fProfile #ifdef __cplusplus extern "C" { #endif #undef TAU_0002fProfile_TAU_DEFAULT #define TAU_0002fProfile_TAU_DEFAULT 4294967295LL /* * Class: TAU_0002fProfile * Method: NativeProfile * Signature: (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;J)V */ JNIEXPORT void JNICALL Java_TAU_Profile_NativeProfile (JNIEnv *, jobject, jstring, jstring, jstring, jlong) #if defined(__cplusplus) && defined(JAVA_NATIVE_METHOD_THROW_CLAUSE) throw() #endif ; /* * Class: TAU_0002fProfile * Method: NativeStart * Signature: ()V */ JNIEXPORT void JNICALL Java_TAU_Profile_NativeStart (JNIEnv *, jobject) #if defined(__cplusplus) && defined(JAVA_NATIVE_METHOD_THROW_CLAUSE) throw() #endif ; /* * Class: TAU_0002fProfile * Method: NativeStop * Signature: ()V */ JNIEXPORT void JNICALL Java_TAU_Profile_NativeStop (JNIEnv *, jobject) #if defined(__cplusplus) && defined(JAVA_NATIVE_METHOD_THROW_CLAUSE) throw() #endif ; #ifdef __cplusplus } #endif #endif tau-2.16.4/include/Profile/TauJava.h000066400000000000000000000060541062343042700171320ustar00rootroot00000000000000/**************************************************************************** ** TAU Portable Profiling Package ** ** http://www.cs.uoregon.edu/research/tau ** ***************************************************************************** ** Copyright 1997 ** ** Department of Computer and Information Science, University of Oregon ** ** Advanced Computing Laboratory, Los Alamos National Laboratory ** ****************************************************************************/ /*************************************************************************** ** File : TauJava.h ** ** Description : TAU interface for JVMPI ** ** Author : Sameer Shende ** ** Contact : sameer@cs.uoregon.edu sameer@acl.lanl.gov ** ** Flags : Compile with ** ** -DPROFILING_ON to enable profiling (ESSENTIAL) ** ** -DPROFILE_STATS for Std. Deviation of Excl Time ** ** -DSGI_HW_COUNTERS for using SGI counters ** ** -DPROFILE_CALLS for trace of each invocation ** ** -DSGI_TIMERS for SGI fast nanosecs timer ** ** -DTULIP_TIMERS for non-sgi Platform ** ** -DPOOMA_STDSTL for using STD STL in POOMA src ** ** -DPOOMA_TFLOP for Intel Teraflop at SNL/NM ** ** -DPOOMA_KAI for KCC compiler ** ** -DDEBUG_PROF for internal debugging messages ** ** -DPROFILE_CALLSTACK to enable callstack traces ** ** Documentation : See http://www.cs.uoregon.edu/research/tau ** ***************************************************************************/ ////////////////////////////////////////////////////////////////////// // Declarations ////////////////////////////////////////////////////////////////////// #ifndef _TAU_JAVA_H_ #define _TAU_JAVA_H_ struct TauJavaLayer { static void Init(char *options); static void NotifyEvent(JVMPI_Event *event); static void ClassLoad(JVMPI_Event *event); static void MethodEntry(JVMPI_Event *event); static void MethodExit(JVMPI_Event *event); static void ThreadStart(JVMPI_Event *event); static void ThreadEnd(JVMPI_Event *event); static void ShutDown(JVMPI_Event *event); static void DataDump(JVMPI_Event *event); static void DataPurge(JVMPI_Event *event); static int *RegisterThread(JVMPI_Event *event); static void CreateTopLevelRoutine(char *name, char *type, char *groupname, int tid); static int GetTid(JVMPI_Event *event); static int NumThreads; }; extern "C" { JNIEXPORT jint JNICALL JVM_OnLoad(JavaVM *jvm, char *options, void *reserved); } #endif /* _TAU_JAVA_H_ */ tau-2.16.4/include/Profile/TauKtau.h000077500000000000000000000056561062343042700171670ustar00rootroot00000000000000/**************************************************************************** ** TAU Portable Profiling Package ** ** http://www.acl.lanl.gov/tau ** ***************************************************************************** ** Copyright 1997 ** ** Department of Computer and Information Science, University of Oregon ** ** Advanced Computing Laboratory, Los Alamos National Laboratory ** ****************************************************************************/ /*************************************************************************** ** File : TauKtau.h ** ** Description : TAU Kernel Profiling Interface ** ** Author : Suravee Suthikulpanit ** ** : Aroon Nataraj ** ** Contact : suravee@cs.uoregon.edu ** ** : anataraj@cs.uoregon.edu ** ** Flags : Compile with ** ** -DTAU_KTAU to enable KTAU ** ** Documentation : ** ***************************************************************************/ #ifndef _TAUKTAU_H_ #define _TAUKTAU_H_ #include #include #include //for enum TauFork_t #define NAME_SIZE 100 #define MAP_SIZE 10 * 1024 ///////////////////////////////////////////////////////////////////// // // class TauKtau // ////////////////////////////////////////////////////////////////////// typedef struct _ktau_output_info{ pid_t pid; unsigned int templ_fun_counter; unsigned int user_ev_counter; }ktau_output_info; class TauKtau { public: char *startBuf; char *stopBuf; long startSize; long stopSize; long outSize; ktau_output *diffOutput; char *startBufTWO; char *stopBufTWO; long startSizeTWO; long stopSizeTWO; long outSizeTWO; ktau_output *diffOutputTWO; // Constructor TauKtau(KtauSymbols& sym); // Destructor ~TauKtau(); // APIs int StartKProfile(); int StopKProfile(); int DumpKProfile(); int DumpKProfileOut(); int StopKProfileTWO(); int DumpKProfileTWO(int, ktau_output*, char*); int MergingKProfileFunc(FILE * fp); int MergingKProfileEvent(FILE * fp); int GetNumKProfileFunc(); int GetNumKProfileEvent(); int AggrKProfiles(char* start, int startSz, char* stop, int stopSz, ktau_output** aggrprofs); static int RegisterFork(TauKtau* pKernProf, enum TauFork_t opcode); private: ktau_output_info ThisKtauOutputInfo; int GetKProfileInfo(); int ReadKallsyms(); int DiffKProfile(); int DiffKProfileTWO(char* startB, char* stopB, int startSz, int stopSz, ktau_output** pdiffOut); KtauSymbols& KtauSym; }; #endif /* _TAUKTAU_H_*/ /*************************************************************************** * $RCSfile: TauKtau.h,v $ $Author: anataraj $ * $Revision: 1.3 $ $Date: 2007/04/19 03:21:44 $ * POOMA_VERSION_ID: $Id: TauKtau.h,v 1.3 2007/04/19 03:21:44 anataraj Exp $ ***************************************************************************/ tau-2.16.4/include/Profile/TauMapping.h000066400000000000000000000202121062343042700176340ustar00rootroot00000000000000/**************************************************************************** ** TAU Portable Profiling Package ** ** http://www.cs.uoregon.edu/research/tau ** ***************************************************************************** ** Copyright 1999 ** ** Department of Computer and Information Science, University of Oregon ** ** Advanced Computing Laboratory, Los Alamos National Laboratory ** ****************************************************************************/ /*************************************************************************** ** File : Profiler.cpp ** ** Description : TAU Mappings for relating profile data from one ** ** layer to another ** ** Author : Sameer Shende ** ** Contact : sameer@cs.uoregon.edu sameer@acl.lanl.gov ** ** Flags : Compile with ** ** -DPROFILING_ON to enable profiling (ESSENTIAL) ** ** -DPROFILE_STATS for Std. Deviation of Excl Time ** ** -DSGI_HW_COUNTERS for using SGI counters ** ** -DPROFILE_CALLS for trace of each invocation ** ** -DSGI_TIMERS for SGI fast nanosecs timer ** ** -DTULIP_TIMERS for non-sgi Platform ** ** -DPOOMA_STDSTL for using STD STL in POOMA src ** ** -DPOOMA_TFLOP for Intel Teraflop at SNL/NM ** ** -DPOOMA_KAI for KCC compiler ** ** -DDEBUG_PROF for internal debugging messages ** ** -DPROFILE_CALLSTACK to enable callstack traces ** ** Documentation : See http://www.cs.uoregon.edu/research/tau ** ***************************************************************************/ /* TAU Mappings */ #ifndef _TAU_MAPPING_H_ #define _TAU_MAPPING_H_ #if (PROFILING_ON || TRACING_ON) // For Mapping, global variables used between layers FunctionInfo *& TheTauMapFI(TauGroup_t ProfileGroup=TAU_DEFAULT); #if (TAU_MAX_THREADS == 1) // If we're not multi-threaded, just use the non-thread-safe static initializer #define TAU_MAPPING(stmt, group) \ { \ static FunctionInfo TauMapFI(#stmt, " " , group, #group); \ static tau::Profiler *TauMapProf = new tau::Profiler(&TauMapFI, group, true); \ TheTauMapFI(group) = &TauMapFI; \ TauMapProf->Start(); \ stmt; \ TauMapProf->Stop(); \ } #else // Multithreaded, we should use thread-safe tauCreateFI to create the FunctionInfo object // Note: It's still not absolutely theoretically 100% thread-safe, since the static // initializer is not in a lock, but we don't want to pay that price for every function call #define TAU_MAPPING(stmt, group) \ { \ static FunctionInfo *TauMapFI = NULL; \ tauCreateFI(&TauMapFI, #stmt, " " , group, #group); \ static tau::Profiler *TauMapProf = new tau::Profiler(TauMapFI, group, true); \ TheTauMapFI(group) = TauMapFI; \ TauMapProf->Start(); \ stmt; \ TauMapProf->Stop(); \ delete TauMapProf; \ } #endif #define TAU_MAPPING_REGISTER(stmt, group) { \ static FunctionInfo *TauMapFI = NULL; \ tauCreateFI(&TauMapFI,stmt, " " , group, #group); \ TheTauMapFI(group) = TauMapFI; \ } #define TAU_MAPPING_CREATE(name, type, key, groupname, tid) { FunctionInfo *TauMapFI = new FunctionInfo(name, type, key, groupname, true, tid); \ if (TauMapFI == (FunctionInfo *) NULL) { \ printf("ERROR: new returns NULL"); exit(1); \ } \ TheTauMapFI(key) = TauMapFI; \ } /* TAU_MAPPING_OBJECT creates a functionInfo pointer that may be stored in the object that is used to relate a lower level layer with a higher level layer */ #define TAU_MAPPING_CREATE1(name, type, key1, groupid, groupname, tid) { FunctionInfo *TauMapFI = new FunctionInfo(name, type, groupid, groupname, true, tid); \ if (TauMapFI == (FunctionInfo *) NULL) { \ printf("ERROR: new returns NULL"); exit(1); \ } \ TheTauMapFI(key1) = TauMapFI; \ } /* TAU_MAPPING_OBJECT creates a functionInfo pointer that may be stored in the object that is used to relate a lower level layer with a higher level layer */ /* TAU_MAPPING_TIMER_CREATE creates a functionInfo pointer with a specified group name. */ #define TAU_MAPPING_TIMER_CREATE(t, name, type, gr, group_name) t = new FunctionInfo((string &) name, type, gr, group_name, true, RtsLayer::myThread()); #define TAU_MAPPING_OBJECT(FuncInfoVar) FunctionInfo * FuncInfoVar; /* TAU_MAPPING_LINK gets in a var the function info object associated with the given key (Group) */ /* This error should be reported when FuncInfoVar is NULL //printf("ERROR: TAU_MAPPING_LINK map returns NULL FunctionInfo *\n"); \ There's no error when FunctionInfo * is NULL. A region may not be active. */ /* OLD --> did a return. Instead tau::Profiler should check for Null. */ /* #define TAU_MAPPING_LINK(FuncInfoVar, Group) FuncInfoVar = TheTauMapFI(Group); \ if (FuncInfoVar == (FunctionInfo *)NULL) { \ return; \ } */ #define TAU_MAPPING_LINK(FuncInfoVar, Group) FuncInfoVar = TheTauMapFI(Group); /* TAU_MAPPING_PROFILE profiles the entire routine by creating a profiler objeca and this behaves pretty much like TAU_PROFILE macro, except this gives in the FunctionInfo object pointer instead of name and type strings. */ #define TAU_MAPPING_PROFILE(FuncInfoVar) tau::Profiler FuncInfoVar##Prof(FuncInfoVar, FuncInfoVar != (FunctionInfo *) 0 ? FuncInfoVar->GetProfileGroup() : TAU_DEFAULT, false); /* TAU_MAPPING_PROFILE_TIMER acts like TAU_PROFILE_TIMER by creating a profiler object that can be subsequently used with TAU_PROFILE_START and TAU_PROFILE_STOP */ #define TAU_MAPPING_PROFILE_TIMER(Timer, FuncInfoVar, tid) tau::Profiler *Timer; \ Timer = new tau::Profiler(FuncInfoVar, FuncInfoVar != (FunctionInfo *) 0 ? FuncInfoVar->GetProfileGroup() : TAU_DEFAULT, true, tid); \ if (Timer == (tau::Profiler *) NULL) {\ printf("ERROR: TAU_MAPPING_PROFILE_TIMER: new returns NULL Profiler *\n");\ } /* TAU_MAPPING_PROFILE_START acts like TAU_PROFILE_START by starting the timer */ #define TAU_MAPPING_PROFILE_START(Timer, tid) Timer->Start(tid); /* TAU_MAPPING_PROFILE_STOP acts like TAU_PROFILE_STOP by stopping the timer */ #define TAU_MAPPING_PROFILE_STOP(tid) { tau::Profiler *cur = tau::Profiler::CurrentProfiler[tid]; cur->Stop(tid); delete cur; } #define TAU_MAPPING_PROFILE_EXIT(msg, tid) tau::Profiler::ProfileExit(msg, tid); #define TAU_MAPPING_DB_DUMP(tid) tau::Profiler::DumpData(tid); #define TAU_MAPPING_DB_PURGE(tid) tau::Profiler::PurgeData(tid); #define TAU_MAPPING_PROFILE_SET_NODE(node, tid) RtsLayer::setMyNode(node, tid); #define TAU_MAPPING_PROFILE_SET_GROUP_NAME(timer, name) timer->SetPrimaryGroupName(name); #define TAU_MAPPING_PROFILE_GET_GROUP_NAME(timer) timer->GetPrimaryGroup(); #define TAU_MAPPING_PROFILE_GET_GROUP(timer) timer->GetProfileGroup(); #define TAU_MAPPING_PROFILE_SET_NAME(timer, name) timer->SetName(name); #define TAU_MAPPING_PROFILE_GET_NAME(timer) timer->GetName(); #define TAU_MAPPING_PROFILE_SET_TYPE(timer, name) timer->SetType(name); #define TAU_MAPPING_PROFILE_GET_TYPE(timer) timer->GetType(); #define TAU_MAPPING_PROFILE_SET_GROUP(timer, id) timer->SetProfileGroup(id); #else /* Create null , except the main statement which should be executed as it is*/ #define TAU_MAPPING(stmt, group) stmt #define TAU_MAPPING_OBJECT(FuncInfoVar) #define TAU_MAPPING_LINK(FuncInfoVar, Group) #define TAU_MAPPING_PROFILE(FuncInfoVar) #define TAU_MAPPING_CREATE(name, type, key, groupname, tid) #define TAU_MAPPING_PROFILE_TIMER(Timer, FuncInfoVar, tid) #define TAU_MAPPING_TIMER_CREATE(t, name, type, gr, group_name) #define TAU_MAPPING_PROFILE_START(Timer, tid) #define TAU_MAPPING_PROFILE_STOP(tid) #define TAU_MAPPING_PROFILE_EXIT(msg, tid) #define TAU_MAPPING_DB_DUMP(tid) #define TAU_MAPPING_DB_PURGE(tid) #define TAU_MAPPING_PROFILE_SET_NODE(node, tid) #define TAU_MAPPING_PROFILE_SET_GROUP_NAME(timer, name) #define TAU_MAPPING_PROFILE_SET_NAME(timer, name) #define TAU_MAPPING_PROFILE_SET_TYPE(timer, name) #define TAU_MAPPING_PROFILE_SET_GROUP(timer, id) #define TAU_MAPPING_PROFILE_GET_GROUP_NAME(timer) #define TAU_MAPPING_PROFILE_GET_GROUP(timer) #define TAU_MAPPING_PROFILE_GET_NAME(timer) #define TAU_MAPPING_PROFILE_GET_TYPE(timer) #endif /* PROFILING_ON or TRACING_ON */ #endif /* _TAU_MAPPING_H_ */ tau-2.16.4/include/Profile/TauMemory.h000066400000000000000000000042361062343042700175210ustar00rootroot00000000000000/**************************************************************************** ** TAU Portable Profiling Package ** ** http://www.cs.uoregon.edu/research/tau ** ***************************************************************************** ** Copyright 2006 ** ** Department of Computer and Information Science, University of Oregon ** ** Advanced Computing Laboratory, Los Alamos National Laboratory ** ****************************************************************************/ /*************************************************************************** ** File : TauMemory.h ** ** Description : TAU Profiling Package ** ** Author : Sameer Shende ** ** Contact : sameer@cs.uoregon.edu sameer@paratools.com ** ** Flags : Compile with ** ** Documentation : See http://www.cs.uoregon.edu/research/tau ** ***************************************************************************/ ////////////////////////////////////////////////////////////////////// // Include Files ////////////////////////////////////////////////////////////////////// #ifndef _TAU_MEMORY_H_ #define _TAU_MEMORY_H_ ////////////////////////////////////////////////////////////////////// // This class allows us to convert void * to the desired type in malloc ////////////////////////////////////////////////////////////////////// class TauVoidPointer { void *p; public: TauVoidPointer (void *pp) : p (pp) { } template operator T *() { return (T *) p; } }; int TauDetectMemoryLeaks(void); void Tau_track_memory_allocation(const char *file, int line, size_t size, TauVoidPointer ptr); void Tau_track_memory_deallocation(const char *file, int line, TauVoidPointer ptr); TauVoidPointer Tau_new(const char *file, int line, size_t size, TauVoidPointer ptr); #endif /* _TAU_MEMORY_H_ */ /*************************************************************************** * $RCSfile: TauMemory.h,v $ $Author: sameer $ * $Revision: 1.3 $ $Date: 2006/07/24 15:49:21 $ * TAU_VERSION_ID: $Id: TauMemory.h,v 1.3 2006/07/24 15:49:21 sameer Exp $ ***************************************************************************/ tau-2.16.4/include/Profile/TauMuse.h000066400000000000000000000175751062343042700171740ustar00rootroot00000000000000#ifndef _TAU_MUSE_H_ #define _TAU_MUSE_H_ /* The TAU MAGNET/MUSE API */ #if (defined(TAU_MUSE) || defined(TAU_MUSE_EVENT) || defined(TAU_MUSE_MULTIPLE)) #include #define MAX_ARGLEN 255 #define MAX_REPLY_LENGTH 1024 #define MAXNUMOFCPU 2 #define MAXNUMOF_HANDLERS 4 #define MAXNUMOF_FILTERS 4 #define MAXNUMOF_ADDFILTERS 4 #define MAX_HANDLER_NAME_LEN 30 #define MAX_ADDFILTERS_ARGS_LEN 100 #define MAXNUMOF_COUNTERS 10 #define MAXNUMOF_PACKAGES 10 #define MAXNUMOF_METRICS 100 #define MAX_METRIC_LEN 100 #define AF_UNIX_MODE #define VAR_LOCK_DIRECTORY "/tmp" //#define VAR_LOCK_DIRECTORY "/var/lock" struct filter_info{ int filter_argc; //Number of addfilter command char args[MAXNUMOF_ADDFILTERS][MAX_ADDFILTERS_ARGS_LEN]; //Actual addfilter command }; struct metric_info{ char info[MAX_METRIC_LEN]; }; struct handler_info{ int handlerID; //handlerID char handler_name[MAX_HANDLER_NAME_LEN]; //handler names int numoffilters; //Number of filters. struct filter_info filters[MAXNUMOF_FILTERS]; //filters struct metric_info metrics[MAXNUMOF_METRICS]; int numofcounters; }; struct package_info{ int numofhandlers; //Number of handlers. int totalcounters; char package_name[MAX_HANDLER_NAME_LEN]; //handler names struct handler_info handlers[MAXNUMOF_HANDLERS]; //handlers }; struct package_list_info{ int numofpackages; int initialized; struct package_info packages[MAXNUMOF_PACKAGES]; }; /* TheMuseSockId() is a global variable now */ int& TheMuseSockId(void); #if (defined(TAU_MUSE) || defined(TAU_MUSE_MULTIPLE)) struct package_list_info& Mono_PkgList(void); #endif // (defined(TAU_MUSE) || defined(TAU_MUSE_MULTIPLE)) #ifdef TAU_MUSE_EVENT struct package_list_info& NonMono_PkgList(void); #endif //TAU_MUSE_EVENT /*************************************************************************************** * This is for handlers stuff * *************************************************************************************/ //===================================== // TAU_count handler //===================================== /********************* * Description : Struct for input data for count. * From : handler/count/count.h *********************/ struct count_handler_input_data { int fsize; int fname_size; }; /********************* * Description : Struct for return data for count. * From : handler/count/count.h *********************/ struct count_handler_return_data { int count; }; int CreateTauCountEncode(char *ascii_command, int size, char *binary_command); double QueryTauCountDecode(const char *binary_command, const char *binary_reply, int size, char *ascii_reply,double data[]); //===================================== // process_scheduling handler //===================================== struct process_scheduling_handler_input_data{ }; struct cpu_stat{ double numofcontextswitch; unsigned long long time_busy; unsigned long long time_sched; }; struct process_scheduling_handler_return_data{ unsigned long long total_time; unsigned long long cpu_speed; unsigned int numofcpu; struct cpu_stat stat[MAXNUMOFCPU]; }; int CreateProcessSchedulingEncode(char *ascii_command, int size, char *binary_command); double QueryProcessSchedulingDecode(const char *binary_command, const char *binary_reply, int size, char *ascii_reply,double data[]); //===================================== // bandwidth handler //===================================== struct bandwidth_handler_input_data { /* All of these values are assumed to be Big Endian */ double delta_time; /*length of time to collect events for each block*/ int fsize; /*maximum size for tracefile. Set to 0 for default size*/ int fname_size; /*Number of bytes following this struct in the data stream. These bytes are a null terminated ASCII stream representing the tracefile name. Set to zero for no tracefile*/ }; struct bandwidth_handler_return_data { /* All of these values are assumed to be Big Endian*/ double send_average_bandwidth; double recv_average_bandwidth; double send_recent_bandwidth; double recv_recent_bandwidth; double block_start_time; int block_id; int lost_events; }; int CreateBandwidthEncode(char *ascii_command, int size, char *binary_command); double QueryBandwidthDecode(const char *binary_command, const char *binary_reply, int size, char *ascii_reply,double data[]); //===================================== // tcpbandwidth handler //===================================== struct tcpbandwidth_handler_input_data { /* All of these values are assumed to be Big Endian */ double delta_time; /*length of time to collect events for each block*/ int fsize; /*maximum size for tracefile. Set to 0 for default size*/ int fname_size; /*Number of bytes following this struct in the data stream. These bytes are a null terminated ASCII stream representing the tracefile name. Set to zero for no tracefile*/ }; struct tcpbandwidth_handler_return_data { /* All of these values are assumed to be Big Endian*/ double send_average_bandwidth; double recv_average_bandwidth; double send_recent_bandwidth; double recv_recent_bandwidth; double block_start_time; int block_id; int lost_events; }; int CreateTcpBandwidthEncode(char *ascii_command, int size, char *binary_command); double QueryTcpBandwidthDecode(const char *binary_command, const char *binary_reply, int size, char *ascii_reply,double data[]); //===================================== // accumulator handler //===================================== struct accumulator_handler_input_data { }; struct accumulator_handler_return_data { unsigned long long sum; }; int CreateAccumulatorEncode(char *ascii_command, int size, char *binary_command); double QueryAccumulatorDecode(const char *binary_command, const char *binary_reply, int size, char *ascii_reply,double data[]); /*************************************************************************************** * This is for filters stuff * *************************************************************************************/ int AddFilterProcessFilterEncode(char *ascii_command, int size, char *binary_command); int AddFilterSocketFilterEncode(char *ascii_command, int size, char *binary_command); /*************************************************************************************** * This is for Packages stuff * *************************************************************************************/ int create_encode_selector(char *handler_name,char *ascii_command,int size, char *binary_command); double query_decode_selector(char *handler_name, const char *binary_command, const char *binary_reply, int size, char *ascii_reply, double data[]); int addfilter_encode_selector(char *filter_name,char *ascii_command,int size, char *binary_command); int monotonic_package_selector(struct package_info *pkg); int nonmonotonic_package_selector(struct package_info *pkg); //int report_user_defined_events(double data[]); /*************************************************************************************** * This is for TauMuse stuff * *************************************************************************************/ int TauMuseInit(void); int TauMuseCreate(struct package_info *pkg); #ifdef TAU_MUSE double TauMuseQuery(void); #endif //TAU_MUSE #ifdef TAU_MUSE_EVENT int TauMuseEventQuery(double data[],int size); int TauMuseGetMetricsNonMono(char *data[],int size); //int TauMuseGetSizeNonMono(void); #endif //TAU_MUSE_EVENT #ifdef TAU_MUSE_MULTIPLE int TauMuseMultipleQuery(double data[],int size); int TauMuseGetMetricsMono(char *data[],int size); //int TauMuseGetSizeMono(void); #endif //TAU_MUSE_MULTIPLE void TauMuseDestroy(void); #endif /* (defined(TAU_MUSE) || defined(TAU_MUSE_EVENT) || defined(TAU_MUSE_MULTIPLE))*/ #endif /* _TAU_MUSE_H_ */ tau-2.16.4/include/Profile/TauUtil.h000066400000000000000000000051721062343042700171660ustar00rootroot00000000000000/**************************************************************************** ** TAU Portable Profiling Package ** ** http://www.cs.uoregon.edu/research/paracomp/tau ***************************************************************************** ** Copyright 2004 ** ** Department of Computer and Information Science, University of Oregon ** ** Advanced Computing Laboratory, Los Alamos National Laboratory ** ****************************************************************************/ /*************************************************************************** ** File : TauUtil.h ** ** Description : TAU Utilities ** Author : Sameer Shende ** ** Contact : sameer@cs.uoregon.edu ** Documentation : See http://www.cs.uoregon.edu/research/paracomp/tau ***************************************************************************/ #ifndef _TAU_UTIL_H_ #define _TAU_UTIL_H_ #include /* The following macros help create a local array and assign to elements of the local C array, values from Fortran array after conversion using f2c MPI macros. Need to optimize the implementation. Use static array instead of malloc */ #if (defined(sgi) || defined (TAU_WRAPPER_BLANK) || defined(__blrts__)) #define TAU_DECL_LOCAL(mtype, l) MPI_Fint * l #define TAU_ALLOC_LOCAL(mtype, l, size) #define TAU_DECL_ALLOC_LOCAL(mtype, l, size) MPI_Fint * l #define TAU_ASSIGN_VALUES(dest, src, size, func) dest = src #define TAU_ASSIGN_STATUS_F2C(dest, src, size, func) dest = src #define TAU_ASSIGN_STATUS_C2F(dest, src, size, func) dest = src #define TAU_FREE_LOCAL(l) #else #define TAU_DECL_LOCAL(mtype, l) mtype *l #define TAU_ALLOC_LOCAL(mtype, l, size) l = (mtype *) malloc(sizeof(mtype) * size) #define TAU_DECL_ALLOC_LOCAL(mtype, l, size) TAU_DECL_LOCAL(mtype, l) = TAU_ALLOC_LOCAL(mtype, l, size) #define TAU_ASSIGN_VALUES(dest, src, size, func) { int i; for (i = 0; i < size; i++) dest[i] = func(src[i]); } #define TAU_ASSIGN_STATUS_F2C(dest, src, size, func) { int i; for (i = 0; i < size; i++) func((MPI_Fint*)&((MPI_Status*)src)[i], &((MPI_Status*)dest)[i]); } #define TAU_ASSIGN_STATUS_C2F(dest, src, size, func) { int i; for (i = 0; i < size; i++) func(&((MPI_Status*)src)[i], (MPI_Fint*)&((MPI_Status*)dest)[i]); } #define TAU_FREE_LOCAL(l) free(l) #endif /* sgi || TAU_MPI_NEEDS_STATUS */ /******************************************************/ #if (defined(sgi) || defined(TAU_MPI_NEEDS_STATUS)) #define MPI_Status_c2f(c,f) *(MPI_Status *)f=*(MPI_Status *)c #define MPI_Status_f2c(f,c) *(MPI_Status *)c=*(MPI_Status *)f #endif /* sgi || TAU_MPI_NEEDS_STATUS */ #endif /* _TAU_UTIL_H_ */ tau-2.16.4/include/Profile/TauVampirTrace.h000066400000000000000000000017751062343042700204730ustar00rootroot00000000000000#ifndef __TAU_VAMPIRTRACE_H__ #define __TAU_VAMPIRTRACE_H__ #ifdef TAU_64BITTYPES_NEEDED #include #endif /* TAU_64BITTYPES_NEEDED */ #ifndef VT_NO_ID #define VT_NO_ID 0xFFFFFFFF #endif /* VT_NO_ID */ #ifndef VT_NO_LNO #define VT_NO_LNO 0xFFFFFFFF #endif /* VT_NO_LNO */ #ifndef VT_FUNCTION #define VT_FUNCTION 1 #endif /* VT_FUNCTION */ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ void vt_open(void); void vt_close(void); uint32_t vt_def_region ( const char* rname, uint32_t fid, uint32_t begln, uint32_t endln, const char* rdesc, uint8_t rtype ); void vt_enter(uint64_t* time, uint32_t rid); void vt_exit(uint64_t* time); uint64_t vt_pform_wtime(void); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __TAU_VAMPIRTRACE_H__ */ tau-2.16.4/include/Profile/TulipThreadLayer.h000077500000000000000000000067161062343042700210310ustar00rootroot00000000000000/**************************************************************************** ** TAU Portable Profiling Package ** ** http://www.cs.uoregon.edu/research/tau ** ***************************************************************************** ** Copyright 1997 ** ** Department of Computer and Information Science, University of Oregon ** ** Advanced Computing Laboratory, Los Alamos National Laboratory ** ****************************************************************************/ /*************************************************************************** ** File : TulipThreadLayer.h ** ** Description : TAU Profiling Package TulipThread Support Layer ** ** Author : Sameer Shende ** ** Contact : sameer@cs.uoregon.edu sameer@acl.lanl.gov ** ** Flags : Compile with ** ** -DSMARTS for SMARTS interface instead of TULIP ** ** -DPROFILING_ON to enable profiling (ESSENTIAL) ** ** -DPROFILE_STATS for Std. Deviation of Excl Time ** ** -DSGI_HW_COUNTERS for using SGI counters ** ** -DPROFILE_CALLS for trace of each invocation ** ** -DSGI_TIMERS for SGI fast nanosecs timer ** ** -DTULIP_TIMERS for non-sgi Platform ** ** -DPOOMA_STDSTL for using STD STL in POOMA src ** ** -DPOOMA_TFLOP for Intel Teraflop at SNL/NM ** ** -DPOOMA_KAI for KCC compiler ** ** -DDEBUG_PROF for internal debugging messages ** ** -DPROFILE_CALLSTACK to enable callstack traces ** ** Documentation : See http://www.cs.uoregon.edu/research/tau ** ***************************************************************************/ #ifndef _TULIPTHREADLAYER_H_ #define _TULIPTHREADLAYER_H_ ////////////////////////////////////////////////////////////////////// // // class TulipThreadLayer // // This class is used for supporting pthreads in RtsLayer class. ////////////////////////////////////////////////////////////////////// #ifdef TULIPTHREADS #ifdef SMARTS #include using Smarts::Mutex; #else // SMARTS #include #endif // SMARTS class TulipThreadLayer { // Layer for RtsLayer to interact with pthreads public: TulipThreadLayer () { } // defaults ~TulipThreadLayer () { } static int RegisterThread(void); // called before any profiling code static int InitializeThreadData(void); // init thread mutexes static int InitializeDBMutexData(void); // init tauDB mutex static int InitializeEnvMutexData(void); // init tauEnv mutex static int GetThreadId(void); // gets 0..N-1 thread id static int LockDB(void); // locks the tauDBMutex static int UnLockDB(void); // unlocks the tauDBMutex static int LockEnv(void); // locks the tauEnvMutex static int UnLockEnv(void); // unlocks the tauEnvMutex private: #ifdef SMARTS static Mutex tauDBMutex; // to protect TheFunctionDB static Mutex tauEnvMutex; // second mutex #else // SMARTS static Tulip_Mutex tauDBMutex; // to protect TheFunctionDB static Tulip_Mutex tauEnvMutex; // second mutex #endif // SMARTS }; #endif // TULIPTHREADS #endif // _TULIPTHREADLAYER_H_ /*************************************************************************** * $RCSfile: TulipThreadLayer.h,v $ $Author: amorris $ * $Revision: 1.5 $ $Date: 2005/11/11 03:46:48 $ * POOMA_VERSION_ID: $Id: TulipThreadLayer.h,v 1.5 2005/11/11 03:46:48 amorris Exp $ ***************************************************************************/ tau-2.16.4/include/Profile/TulipTimers.h000066400000000000000000000134041062343042700200550ustar00rootroot00000000000000/**************************************************************************** ** TAU Portable Profiling Package ** ** http://www.cs.uoregon.edu/research/tau ** ***************************************************************************** ** Copyright 1997 ** ** Department of Computer and Information Science, University of Oregon ** ** Advanced Computing Laboratory, Los Alamos National Laboratory ** ****************************************************************************/ /*********************************************************************/ /* pC++/Sage++ Copyright (C) 1994 */ /* Indiana University University of Oregon University of Rennes */ /*********************************************************************/ /* * pcxx_timer.h: timer definitions and macros * * (c) 1994 Jerry Manic Saftware * * Version 3.0 */ /* Written by Bernd Mohr & Pete Beckman */ /* Last overhauled Jun 1994 */ /* Things are setup, so that the different machines are recognized */ /* automatically, if this file is compiled with a decent compiler. */ /* EXCEPTION: There is no way in a C program of distinguishing */ /* between a Sun and a Meiko, and a Rs6000 and a SP1. */ /* The user of this package has to set __MEIKO__ or */ /* __SP1__ respectively. */ /* NOTE: This package was primarily written for parallel machines. */ /* However, it runs also on basically every UNIX workstation, */ /* but it makes no use of special high resolution timers on */ /* these machines (as these are VERY unportable). */ #ifndef __PCXX_TIMERS_H__ #define __PCXX_TIMERS_H__ // Hack. For now, we've disabled PCXX_EVENT # define PCXX_EVENT(c, e, p) # define PCXX_WTIMER_CLEAR 60199 # define PCXX_WTIMER_START 60100 # define PCXX_WTIMER_STOP 60200 # define PCXX_UTIMER_CLEAR 60399 # define PCXX_UTIMER_START 60300 # define PCXX_UTIMER_STOP 60400 #ifdef __cplusplus # define LANG "C" #else # define LANG #endif /* __cplusplus */ /*********************************************************************/ /* long pcxx_GetUSecL: get microseconds as long (for tracing) */ /* double pcxx_GetUSecD: get microseconds as double (for profiling) */ /* double tulip_WallClock */ /*********************************************************************/ #ifdef __PARAGON__ /* -- clock resolution 100ns -- */ extern LANG double pcxxT_dclock (); extern LANG double pcxxT_start; # define pcxx_GetUSecL() ((pcxxT_dclock() - pcxxT_start) * 0.1) # define pcxx_GetUSecD() (pcxxT_dclock() * 0.1) # define tulip_WallClock() (pcxxT_dclock() * 1.0e-7) #else #ifdef __ksr__ # include # define pcxx_GetUSecL() x_all_timer() # define pcxx_GetUSecD() (all_seconds() * 1.0e6) # define tulip_WallClock() (all_seconds()) # define tulip_UserClock() (user_seconds()) #else #if defined(_SEQUENT_) || defined(sequent) /* -- clock resolution 1us -- */ # include # define pcxx_GetUSecL() GETUSCLK() # define pcxx_GetUSecD() ((double) GETUSCLK()) # define tulip_WallClock() ((double) GETUSCLK() * 1.0e-6) #else #ifdef butterfly extern LANG long getusecclock (); # define pcxx_GetUSecL() getusecclock() # define pcxx_GetUSecD() ((double) getusecclock()) # define tulip_WallClock() ((double) getusecclock() * 1.0e-6) #else /* added SP1_T instead of SP1 by elj 3/26/97 -- tb0time not available on SP2 */ #ifdef __SP1_T__ /* -- clock resolution 1ms -- */ extern LANG double pcxxT_time; extern LANG double pcxxT_start; extern LANG void tb0time(double*); # define pcxx_GetUSecL() (tb0time(&pcxxT_time),(pcxxT_time-pcxxT_start)*1.0e3) # define pcxx_GetUSecD() (tb0time(&pcxxT_time),pcxxT_time*1.0e3) # define tulip_WallClock() (tb0time(&pcxxT_time),pcxxT_time*1.0e-3) #else #ifdef __MEIKO__ # define pcxx_GetUSecL() # define pcxx_GetUSecD() # define tulip_WallClock() #else #ifdef __T3D__ /* -- clock speed 150MHz -- */ # include # define pcxx_GetUSecL() (rtclock() / 150) # define pcxx_GetUSecD() ((double) rtclock() * 0.6666666667e-2) # define tulip_WallClock() ((double) rtclock() * 0.6666666667e-8) # define tulip_UserClock() ((double) cpused() * 0.6666666667e-8) # define tulip_InitClocks() #else #ifdef _CRAYT3E /* -- clock speed 300MHz -- */ # include # define pcxx_GetUSecL() (rtclock() / 300) # define pcxx_GetUSecD() ((double) rtclock() * 0.3333333333e-2) # define tulip_WallClock() ((double) rtclock() * 0.3333333333e-8) # define tulip_UserClock() ((double) cpused() * 0.3333333333e-8) # define tulip_InitClocks() #else extern LANG unsigned long int pcxxT_GetClock (); # define pcxx_GetUSecL() pcxxT_GetClock() # define pcxx_GetUSecD() ((double) pcxxT_GetClock()) # define tulip_WallClock() ((double) pcxxT_GetClock() * 1.0e-6) #endif #endif #endif #endif #endif #endif #endif #endif /*******************************************************************/ /* Declarations for the rest of the Timers and Clocks Package */ /*******************************************************************/ #if !defined(__T3D__) && !defined(_CRAYT3E) extern LANG void tulip_InitClocks (); #endif #if !defined(__ksr__) && !defined(__T3D__) && !defined(_CRAYT3E) extern LANG double tulip_UserClock(); #endif extern LANG int tulip_UserTimerClear(int); extern LANG int tulip_UserTimerStart(int); extern LANG int tulip_UserTimerStop(int); extern LANG double tulip_UserTimerElapsed(int); extern LANG int tulip_WallTimerClear(int); extern LANG int tulip_WallTimerStart(int); extern LANG int tulip_WallTimerStop(int); extern LANG double tulip_WallTimerElapsed(int); #endif /* __PCXX_TIMERS_H__ */ tau-2.16.4/include/Profile/UserEvent.h000066400000000000000000000124701062343042700175160ustar00rootroot00000000000000/**************************************************************************** ** TAU Portable Profiling Package ** ** http://www.cs.uoregon.edu/research/tau ** ***************************************************************************** ** Copyright 1997 ** ** Department of Computer and Information Science, University of Oregon ** ** Advanced Computing Laboratory, Los Alamos National Laboratory ** ****************************************************************************/ /*************************************************************************** ** File : UserEvent.h ** ** Description : TAU Profiling Package ** ** Author : Sameer Shende ** ** Contact : sameer@cs.uoregon.edu sameer@acl.lanl.gov ** ** Flags : Compile with ** ** -DPROFILING_ON to enable profiling (ESSENTIAL) ** ** -DPROFILE_STATS for Std. Deviation of Excl Time ** ** -DSGI_HW_COUNTERS for using SGI counters ** ** -DPROFILE_CALLS for trace of each invocation ** ** -DSGI_TIMERS for SGI fast nanosecs timer ** ** -DTULIP_TIMERS for non-sgi Platform ** ** -DPOOMA_STDSTL for using STD STL in POOMA src ** ** -DPOOMA_TFLOP for Intel Teraflop at SNL/NM ** ** -DPOOMA_KAI for KCC compiler ** ** -DDEBUG_PROF for internal debugging messages ** ** -DPROFILE_CALLSTACK to enable callstack traces ** ** Documentation : See http://www.cs.uoregon.edu/research/tau ** ***************************************************************************/ ////////////////////////////////////////////////////////////////////// // Include Files ////////////////////////////////////////////////////////////////////// #define TAU_EVENT_DATATYPE double class TauContextUserEvent; class TauUserEvent { public: TAU_STORAGE(TAU_EVENT_DATATYPE, MinValue); TAU_STORAGE(TAU_EVENT_DATATYPE, MaxValue); TAU_STORAGE(TAU_EVENT_DATATYPE, SumValue); TAU_STORAGE(TAU_EVENT_DATATYPE, SumSqrValue); TAU_STORAGE(TAU_EVENT_DATATYPE, LastValueRecorded); TAU_STORAGE(TAU_EVENT_DATATYPE, UserFunctionValue); TAU_STORAGE(long, NumEvents); bool DisableMin, DisableMax, DisableMean, DisableStdDev, MonotonicallyIncreasing; string EventName; long EventId; TauContextUserEvent *ctxevt; void AddEventToDB(); TauUserEvent(); TauUserEvent(const char * EName, bool MonotonicallyIncreasing=false); TauUserEvent(TauUserEvent& ); TauUserEvent& operator= (const TauUserEvent& ); void TriggerEvent(TAU_EVENT_DATATYPE data, int tid = RtsLayer::myThread()); ~TauUserEvent(); TAU_EVENT_DATATYPE GetMin(int tid = RtsLayer::myThread()); TAU_EVENT_DATATYPE GetMax(int tid = RtsLayer::myThread()); TAU_EVENT_DATATYPE GetSumValue(int tid = RtsLayer::myThread()); TAU_EVENT_DATATYPE GetMean(int tid = RtsLayer::myThread()); double GetSumSqr(int tid = RtsLayer::myThread()); long GetNumEvents(int tid = RtsLayer::myThread()); const char * GetEventName (void) const; long GetEventId(void); void SetEventName(const char * newname); void SetEventName(string newname); bool GetDisableMin(void); bool GetDisableMax(void); bool GetDisableMean(void); bool GetDisableStdDev(void); void SetDisableMin(bool value); void SetDisableMax(bool value); void SetDisableMean(bool value); void SetDisableStdDev(bool value); void SetMonotonicallyIncreasing(bool value); bool GetMonotonicallyIncreasing(void); static void ReportStatistics(bool ForEachThread = false); }; class TauContextUserEvent { public: TauContextUserEvent(const char * EName, bool MonoIncr=false); ~TauContextUserEvent(); void SetDisableContext(bool value); void TriggerEvent( TAU_EVENT_DATATYPE data, int tid = RtsLayer::myThread()); const char *GetEventName(void); TauUserEvent *contextevent; private: bool DisableContext; TauUserEvent *uevent; bool MonotonicallyIncreasing; }; TAU_STD_NAMESPACE vector& TheEventDB(void); /* #ifdef PROFILING_ON #define TAU_REGISTER_EVENT(event, name) TauUserEvent event(name); #define TAU_EVENT(event, data) (event).TriggerEvent(data); #define TAU_EVENT_DISABLE_MIN(event) (event).SetDisableMin(true); #define TAU_EVENT_DISABLE_MAX(event) (event).SetDisableMax(true); #define TAU_EVENT_DISABLE_MEAN(event) (event).SetDisableMean(true); #define TAU_EVENT_DISABLE_STDDEV(event) (event).SetDisableStdDev(true); #define TAU_REPORT_STATISTICS() TauUserEvent::ReportStatistics() #define TAU_REPORT_THREAD_STATISTICS() TauUserEvent::ReportStatistics(true) #else // PROFILING is disabled #define TAU_REGISTER_EVENT(event, name) #define TAU_EVENT(event, data) #define TAU_EVENT_DISABLE_MIN(event) #define TAU_EVENT_DISABLE_MAX(event) #define TAU_EVENT_DISABLE_MEAN(event) #define TAU_EVENT_DISABLE_STDDEV(event) #define TAU_STORE_ALL_EVENTS #define TAU_REPORT_STATISTICS() #define TAU_REPORT_THREAD_STATISTICS() #endif // PROFILING_ON */ /*************************************************************************** * $RCSfile: UserEvent.h,v $ $Author: sameer $ * $Revision: 1.14 $ $Date: 2006/06/27 19:24:44 $ * POOMA_VERSION_ID: $Id: UserEvent.h,v 1.14 2006/06/27 19:24:44 sameer Exp $ ***************************************************************************/ tau-2.16.4/include/Profile/WindowsThreadLayer.h000066400000000000000000000062671062343042700213640ustar00rootroot00000000000000/**************************************************************************** ** TAU Portable Profiling Package ** ** http://www.cs.uoregon.edu/research/tau ** ***************************************************************************** ** Copyright 1997 ** ** Department of Computer and Information Science, University of Oregon ** ** Advanced Computing Laboratory, Los Alamos National Laboratory ** ****************************************************************************/ /*************************************************************************** ** File : WindowsThreadLayer.h ** ** Description : TAU Profiling Package Microsoft Windows Thread Support Layer ** ** Author : Robert Ansell-Bell ** ** Contact : bertie@cs.uoregon.edu ** ** Flags : Compile with ** ** -DPROFILING_ON to enable profiling (ESSENTIAL) ** ** -DPROFILE_STATS for Std. Deviation of Excl Time ** ** -DSGI_HW_COUNTERS for using SGI counters ** ** -DPROFILE_CALLS for trace of each invocation ** ** -DSGI_TIMERS for SGI fast nanosecs timer ** ** -DTULIP_TIMERS for non-sgi Platform ** ** -DPOOMA_STDSTL for using STD STL in POOMA src ** ** -DPOOMA_TFLOP for Intel Teraflop at SNL/NM ** ** -DPOOMA_KAI for KCC compiler ** ** -DDEBUG_PROF for internal debugging messages ** ** -DPROFILE_CALLSTACK to enable callstack traces ** ** Documentation : See http://www.cs.uoregon.edu/research/tau ** ***************************************************************************/ #ifndef _WINDOWSTHREADLAYER_H_ #define _WINDOWSTHREADLAYER_H_ ////////////////////////////////////////////////////////////////////// // // class WindowsThreadLayer // // This class is used for supporting Microsoft Windows' threads in RtsLayer class. ////////////////////////////////////////////////////////////////////// #ifdef TAU_WINDOWS ////////////////////////////////////////////////////////////////////// // Include Files ////////////////////////////////////////////////////////////////////// #include class WindowsThreadLayer { // Layer for RtsLayer to interact with Microsoft Windows' threads. public: WindowsThreadLayer () { } // defaults ~WindowsThreadLayer () { } static int RegisterThread(void); // called before any profiling code static int InitializeThreadData(void); // init thread mutexes static int InitializeDBMutexData(void); // init tauDB mutex static int InitializeEnvMutexData(void); // init tauDB mutex static int GetThreadId(void); // gets 0..N-1 thread id static int LockDB(void); // locks the tauDBMutex static int UnLockDB(void); // unlocks the tauDBMutex static int LockEnv(void); // locks the tauEnvMutex static int UnLockEnv(void); // unlocks the tauEnvMutex private: static DWORD tauWindowsthreadId; // tid static HANDLE tauThreadcountMutex; // to protect counter static int tauThreadCount; // counter static HANDLE tauDBMutex; // to protect TheFunctionDB static HANDLE tauEnvMutex; // to protect TheFunctionDB }; #endif //TAU_WINDOWS #endif // _WINDOWSTHREADLAYER_H_ tau-2.16.4/include/Profile/aix.h000066400000000000000000000015071062343042700163560ustar00rootroot00000000000000#ifndef _AIX_H_ #define _AIX_H_ #ifndef _XOPEN_SOURCE #define _XOPEN_SOURCE //#define _XOPEN _SOURCE //#define _XOPEN_SOURCE_EXTENDED 1 #ifndef _TIME_T #define _TIME_T typedef long time_t; #endif #ifndef _SIZE_T #define _SIZE_T typedef unsigned long size_t; #endif #ifndef KAI struct timeval { time_t tv_sec; /* seconds */ long tv_usec; /* microseconds */ }; #endif // KAI extern "C" { int getdtablesize(void); #ifndef KAI int gettimeofday(struct timeval *, void *); #endif // KAI int strncasecmp(const char *, const char *, size_t); int strcasecmp(const char *, const char *); } /* extern "C" { //#include //#include //extern int getopt(int, char* const*, const char*); } */ #endif /* XOPEN_SOURCE */ #endif /* _AIX_H_ */ tau-2.16.4/include/Profile/bstring.h000066400000000000000000001672221062343042700172540ustar00rootroot00000000000000/** ** Copyright (c) 1994-1995 Modena Software Inc., ** ** Permission to use, copy, modify, distribute and sell this software ** and its documentation for any purpose is hereby granted without fee, ** provided that the above copyright notice appear in all copies and ** that both that copyright notice and this permission notice appear ** in supporting documentation. Modena Software, Inc. makes no ** representations about the suitability of this software for any ** purpose. It is provided "as is" without express or implied warranty. ** **/ #ifndef __cplusplus #error Must use C++ for BSTRING.H #endif #ifndef __MBSTRING_H #define __MBSTRING_H extern "C" { #include #include #include #include } #include // bool.h // a typedef is less sweeping than a #define for "bool" #ifndef __BOOL_DEFINED #define true 1 #define false 0 typedef int bool; #endif // bc4const #ifdef __BC4_STL #define __BC401_STL #endif #ifdef __BC401_STL #define __BC401_const #else #define __BC401_const const #endif // bndchk.h #ifdef BOUNDS_CHECK void check_bounds ( int index, int container_size, int lineno, char *filename ); #endif // mexcept.h #define _THROW_NONE #define _THROW_DOMAIN #define _THROW_INVALIDARG #define _THROW_LENGTH #define _THROW_OUTRANGE #define _THROW_RANGE #define _THROW_OVERFLOW #define _THROW_ALLOC #define _THROW_CAST #define _THROW_TYPEID #define _THROW_ALLOC_LENGTH #define _THROW_ALLOC_OUTRANGE #define _THROW_LENGTH_OUTRANGE #define _THROW_ALLOC_LENGTH_OUTRANGE #ifdef TAU_STDCXXLIB #include using std::vector; #else /* TAU_STDCXXLIB */ #include #endif /* TAU_STDCXXLIB */ #ifdef __MMULTITHREAD #include "mutex.h" #endif const size_t NPOS = (size_t)(-1); enum capacity { default_size, reserve }; template struct string_char_baggage { typedef charT char_type; // // for users to acquire the basic character type // // constraints functions // static void assign (char_type& c1, const char_type& c2) _THROW_NONE { c1 = c2; } static bool eq (const char_type& c1, const char_type& c2) _THROW_NONE { return (c1 == c2); } static bool ne (const char_type& c1, const char_type& c2) _THROW_NONE { return !(c1 == c2); } static bool lt (const char_type& c1, const char_type& c2) _THROW_NONE { return (c1 < c2); } static char_type eos () _THROW_NONE { return char_type(); // the null character } static istream& char_in (istream& is, char_type& c) _THROW_NONE { return is >> c; // extractor for a char_type object } static ostream& char_out (ostream& os, char_type c) _THROW_NONE { return os << c; // inserter for a char_type object } static bool is_del (char_type c) _THROW_NONE { // characteristic function for delimiters of char_type return isspace(c); } // // speed-up functions // static int compare (const char_type* s1, const char_type* s2, size_t n) _THROW_NONE { for (size_t i = 0; i < n; ++i, ++s1, ++s2) if (ne(*s1, *s2)) { return lt(*s1, *s2) ? -1 : 1; } return 0; } static size_t length (const char_type* s) _THROW_NONE { size_t l = 0; while (ne(*s++, eos())) ++l; return l; } static char_type* copy (char_type* s1, const char_type* s2, size_t n) _THROW_NONE { char_type* s = s1; for (size_t i = 0; i < n; ++i) assign(*++s1, *++s2); return s; } }; struct string_char_baggage { typedef char char_type; // // constraint member functions // static void assign (char_type& c1, const char_type& c2) _THROW_NONE { c1 = c2; } static bool eq (const char_type& c1, const char_type& c2) _THROW_NONE { return (c1 == c2); } static bool ne (const char_type& c1, const char_type& c2) _THROW_NONE { return (c1 != c2); } static bool lt (const char_type& c1, const char_type& c2) _THROW_NONE { return (c1 < c2); } static char_type eos () _THROW_NONE { return 0; // the null character } static istream& char_in (istream& is, char_type& c) _THROW_NONE { // extractor for a char_type object // return is >> c; // this does not work is.get(c); return is; } static ostream& char_out (ostream& os, char_type c) _THROW_NONE { return os << c; // inserter for a char_type object } static bool is_del (char_type c) _THROW_NONE { // characteristic function for delimiters of char_type return isspace(c); } // // speed-up functions // static int compare (const char_type* s1, const char_type* s2, size_t n) _THROW_NONE { return memcmp(s1, s2, n); } static size_t length (const char_type* s) _THROW_NONE { if (s == 0) return 0 ; else return strlen(s); } static char_type* copy (char_type* s1, const char_type* s2, size_t n) _THROW_NONE { // type cast required as memcpy returns void* return (char_type*)memcpy(s1, s2, n); } }; /* struct string_char_baggage { typedef wchar_t char_type; static void assign (char_type& c1, const char_type& c2) _THROW_NONE { c1 = c2; } static bool eq (const char_type& c1, const char_type& c2) _THROW_NONE { return (c1 == c2); } static bool ne (const char_type& c1, const char_type& c2) _THROW_NONE { return (c1 != c2); } static bool lt (const char_type& c1, const char_type& c2) _THROW_NONE { return (c1 < c2); } static char_type eos () _THROW_NONE { return 0; // the null character } static istream& char_in (istream& is, char_type& c) _THROW_NONE { return is >> c; // extractor for a char_type object } static ostream& char_out (ostream& os, char_type c) _THROW_NONE { return os << c; // inserter for a char_type object } static bool is_del (char_type c) _THROW_NONE { // characteristic function for delimiters of char_type // using templatized locale::isspace function return isspace(c); } // // speed-up functions // static int compare (const char_type* s1, const char_type* s2, size_t n) _THROW_NONE { return wmemcmp(s1, s2, n); } static size_t length (const char_type* s) _THROW_NONE { return wcslen(s); // May use Koshida's overloaded MSE function strlen(s) } static char_type* copy (char_type* s1, const char_type* s2, size_t n) _THROW_NONE { return (char_type*)wmemcpy(s1, s2, n); } }; */ template class basic_string; template class basic_string_ref { // // friend class declaration // friend class basic_string; // // typedef declarations // typedef string_char_baggage baggage_type; // // private data members // charT* ptr; size_t len; size_t res; #ifdef __MMULTITHREAD mutex_arith count; // reference count #else size_t count; // reference count #endif // // private constructors and destructors // basic_string_ref () _THROW_NONE ; basic_string_ref (size_t size, capacity cap) _THROW_ALLOC_LENGTH ; basic_string_ref (const basic_string& str, size_t pos , size_t rlen) _THROW_ALLOC ; basic_string_ref (const charT* s, size_t rlen, size_t rres) _THROW_ALLOC ; basic_string_ref (const charT* s, size_t n) _THROW_ALLOC_LENGTH ; basic_string_ref (const charT* s) _THROW_ALLOC ; basic_string_ref (charT c, size_t rep) _THROW_ALLOC_LENGTH ; basic_string_ref (const vector& vec) _THROW_ALLOC_LENGTH ; ~basic_string_ref () _THROW_NONE ; inline void delete_ptr () _THROW_NONE ; inline static charT eos () _THROW_NONE ; inline static void throwlength () _THROW_LENGTH; inline static void throwrange () _THROW_OUTRANGE; }; template class basic_string { private: // // typedef declaration // typedef basic_string_ref reference_class; typedef basic_string_ref* reference_pointer; // // data member // charT* c_str_ptr; reference_pointer reference; // // private member functions // inline charT* point () _THROW_NONE ; inline size_t& len () _THROW_NONE ; inline size_t ref_count () const _THROW_NONE ; inline static charT eos () _THROW_NONE ; void assign_str (const charT* s, size_t slen) _THROW_ALLOC_LENGTH ; void append_str (const charT* s, size_t slen) _THROW_ALLOC_LENGTH ; void insert_str (size_t pos, const charT* s, size_t slen) _THROW_ALLOC_LENGTH_OUTRANGE ; void replace_str (size_t xlen, size_t pos, const charT* s, size_t slen) _THROW_ALLOC_LENGTH_OUTRANGE ; int compare_str (size_t pos, const charT* str, size_t slen, size_t strlen) const _THROW_OUTRANGE ; size_t find_str (const charT* s, size_t pos, size_t len) const _THROW_NONE ; size_t rfind_str (const charT* s, size_t pos, size_t len) const _THROW_NONE ; size_t find_first_of_str (const charT* s, size_t pos, size_t len) const _THROW_NONE ; size_t find_last_of_str (const charT* s, size_t pos, size_t len) const _THROW_NONE ; size_t find_first_not_of_str (const charT* s, size_t pos, size_t len) const _THROW_NONE ; size_t find_last_not_of_str (const charT* s, size_t pos, size_t len) const _THROW_NONE ; protected: basic_string (const charT* s, size_t rlen, size_t xlen) _THROW_ALLOC_LENGTH; inline void delete_ref () _THROW_NONE ; public: typedef charT char_type; typedef string_char_baggage baggage_type; basic_string () _THROW_ALLOC ; basic_string (size_t size, capacity cap) _THROW_ALLOC_LENGTH ; basic_string (const basic_string& str, size_t pos = 0, size_t n = NPOS) _THROW_ALLOC_OUTRANGE ; basic_string (const charT* s, size_t n) _THROW_ALLOC_LENGTH ; basic_string (const charT* s) _THROW_ALLOC ; basic_string (charT c, size_t rep = 1) _THROW_ALLOC_LENGTH ; basic_string (const vector& vec) _THROW_ALLOC_LENGTH ; ~basic_string () _THROW_NONE ; basic_string& operator= (const basic_string& str) _THROW_ALLOC ; basic_string& operator= (const charT* s) _THROW_ALLOC ; basic_string& operator= (charT c) _THROW_ALLOC ; basic_string& operator+= (const basic_string& rhs) _THROW_ALLOC_LENGTH ; basic_string& operator+= (const charT* s) _THROW_ALLOC_LENGTH ; basic_string& operator+= (charT c) _THROW_ALLOC_LENGTH ; operator vector () const _THROW_ALLOC { return vector (data(), data()+length()); } basic_string& append (const basic_string& str, size_t pos = 0, size_t n = NPOS) _THROW_ALLOC_LENGTH_OUTRANGE ; basic_string& append (const charT* s, size_t n) _THROW_ALLOC_LENGTH ; basic_string& append (const charT* s) _THROW_ALLOC_LENGTH ; basic_string& append (charT c, size_t rep = 1) _THROW_ALLOC_LENGTH ; basic_string& assign (const basic_string& str, size_t pos = 0, size_t n = NPOS) _THROW_ALLOC_LENGTH_OUTRANGE ; basic_string& assign (const charT* s, size_t n) _THROW_ALLOC_LENGTH ; basic_string& assign (const charT* s) _THROW_ALLOC_LENGTH ; basic_string& assign (charT c, size_t rep = 1) _THROW_ALLOC_LENGTH ; basic_string& insert (size_t pos1, const basic_string& str, size_t pos2 = 0, size_t n = NPOS) _THROW_ALLOC_LENGTH_OUTRANGE ; basic_string& insert (size_t pos, const charT* s, size_t n) _THROW_ALLOC_LENGTH_OUTRANGE ; basic_string& insert (size_t pos, const charT* s) _THROW_ALLOC_LENGTH_OUTRANGE ; basic_string& insert (size_t pos, charT c, size_t rep = 1) _THROW_ALLOC_LENGTH_OUTRANGE ; basic_string& remove (size_t pos = 0, size_t n = NPOS) _THROW_ALLOC_OUTRANGE ; basic_string& replace (size_t pos1, size_t n1, const basic_string& str, size_t pos2 = 0, size_t n2 = NPOS) _THROW_ALLOC_LENGTH_OUTRANGE ; basic_string& replace (size_t pos, size_t n1, const charT* s, size_t n2) _THROW_ALLOC_LENGTH_OUTRANGE ; basic_string& replace (size_t pos, size_t n1, const charT* s) _THROW_ALLOC_LENGTH_OUTRANGE ; basic_string& replace (size_t pos, size_t n, charT c, size_t rep = 1) _THROW_ALLOC_LENGTH_OUTRANGE ; inline charT get_at (size_t pos) const _THROW_OUTRANGE ; void put_at (size_t pos, charT c) _THROW_ALLOC_OUTRANGE ; inline charT operator[] (size_t pos) const _THROW_NONE ; charT& operator[] (size_t pos) _THROW_ALLOC_OUTRANGE ; const charT* c_str () const _THROW_ALLOC ; inline const charT* data () const _THROW_NONE ; inline size_t length () const _THROW_NONE ; void resize (size_t n, charT c) _THROW_ALLOC_LENGTH ; void resize (size_t n) _THROW_ALLOC_LENGTH ; inline size_t reserve () const _THROW_NONE ; void reserve (size_t res_arg) _THROW_ALLOC_LENGTH ; size_t copy (charT* s, size_t n, size_t pos = 0) const _THROW_OUTRANGE ; size_t find (const basic_string& str, size_t pos = 0) const _THROW_NONE ; size_t find (const charT* s, size_t pos, size_t n) const _THROW_NONE ; size_t find (const charT* s, size_t pos = 0) const _THROW_NONE ; size_t find (charT c, size_t pos = 0) const _THROW_NONE ; size_t rfind (const basic_string& str, size_t pos = NPOS) const _THROW_NONE ; size_t rfind (const charT* s, size_t pos, size_t n) const _THROW_NONE ; size_t rfind (const charT* s, size_t pos = NPOS) const _THROW_NONE ; size_t rfind (charT c, size_t pos = NPOS) const _THROW_NONE ; size_t find_first_of (const basic_string& str, size_t pos = 0) const _THROW_NONE ; size_t find_first_of (const charT* s, size_t pos, size_t n) const _THROW_NONE ; size_t find_first_of (const charT* s, size_t pos = 0) const _THROW_NONE ; size_t find_first_of (charT c, size_t pos = 0) const _THROW_NONE ; size_t find_last_of (const basic_string& str, size_t pos = NPOS) const _THROW_NONE ; size_t find_last_of (const charT* s, size_t pos, size_t n) const _THROW_NONE ; size_t find_last_of (const charT* s, size_t pos = NPOS) const _THROW_NONE ; size_t find_last_of (charT c, size_t pos = NPOS) const _THROW_NONE ; size_t find_first_not_of (const basic_string& str, size_t pos = 0) const _THROW_NONE ; size_t find_first_not_of (const charT* s, size_t pos, size_t n) const _THROW_NONE ; size_t find_first_not_of (const charT* s, size_t pos = 0) const _THROW_NONE ; size_t find_first_not_of (charT c, size_t pos = 0) const _THROW_NONE ; size_t find_last_not_of (const basic_string& str, size_t pos = NPOS) const _THROW_NONE ; size_t find_last_not_of (const charT* s, size_t pos, size_t n) const _THROW_NONE ; size_t find_last_not_of (const charT* s, size_t pos = NPOS) const _THROW_NONE ; size_t find_last_not_of (charT c, size_t pos = NPOS) const _THROW_NONE ; basic_string substr (size_t pos = 0, size_t n = NPOS) const _THROW_ALLOC_OUTRANGE ; int compare (const basic_string& str, size_t pos = 0, size_t n = NPOS) const _THROW_OUTRANGE ; int compare (const charT* s, size_t pos, size_t n) const _THROW_LENGTH_OUTRANGE ; int compare (const charT* s, size_t pos = 0) const _THROW_OUTRANGE ; int compare (charT c, size_t pos = 0, size_t rep = 1) const _THROW_LENGTH_OUTRANGE ; friend ostream& operator<< (ostream& o, const basic_string& s) _THROW_NONE ; friend istream& operator>> (istream& i, basic_string& s) _THROW_ALLOC_LENGTH ; friend basic_string operator+ (const basic_string& lhs, const basic_string& rhs) _THROW_ALLOC_LENGTH ; friend basic_string operator+ (const charT* lhs, const basic_string& rhs) _THROW_ALLOC_LENGTH ; friend basic_string operator+ (charT lhs, const basic_string& rhs) _THROW_ALLOC_LENGTH ; friend basic_string operator+ (const basic_string& lhs, const charT* rhs) _THROW_ALLOC_LENGTH ; friend basic_string operator+ (const basic_string& lhs, charT rhs) _THROW_ALLOC_LENGTH ; }; template inline void basic_string_ref::delete_ptr () _THROW_NONE { if (res) { delete[] ptr; res = 0; ptr = 0; } } template inline void basic_string_ref::throwlength () _THROW_LENGTH { #ifdef __MEXCEPT throw length_error("Length exception occurred"); #else cout << "Length exception occurred" << endl; exit(1); #endif } template inline void basic_string_ref::throwrange () _THROW_OUTRANGE { #ifdef __MEXCEPT throw out_of_range("Out of range exception occurred"); #else cout << "Out of range exception occurred" << endl; exit(1); #endif } template inline void basic_string::delete_ref () _THROW_NONE { --(reference->count); if (!(reference->count)) delete reference; } template inline size_t basic_string::ref_count () const _THROW_NONE { return reference->count; } template inline const charT* basic_string::data () const _THROW_NONE { if (length()) { return reference->ptr; } else return 0; } template inline charT* basic_string::point () _THROW_NONE { return reference->ptr; } template inline size_t& basic_string::len () _THROW_NONE { return reference->len; } template inline size_t basic_string::length () const _THROW_NONE { return reference->len; } template inline size_t basic_string::reserve () const _THROW_NONE { return reference->res; } template inline charT basic_string::get_at (size_t pos) const _THROW_OUTRANGE { if (pos >= length()) { reference_class::throwrange(); } return *(data()+pos); } template inline charT basic_string::operator[] (size_t pos) const _THROW_NONE { if (pos < length()) return *(data()+pos); else return 0; } template inline bool operator== (const basic_string& lhs, const basic_string& rhs) _THROW_NONE { return !(lhs.compare(rhs)); } template inline bool operator== (const charT* lhs, const basic_string& rhs) _THROW_NONE { return !(rhs.compare(lhs)); } template inline bool operator== (charT lhs, const basic_string& rhs) _THROW_NONE { return !(rhs.compare(lhs)); } template inline bool operator== (const basic_string& lhs, const charT* rhs) _THROW_NONE { return !(lhs.compare(rhs)); } template inline bool operator== (const basic_string& lhs, charT rhs) _THROW_NONE { return !(lhs.compare(rhs)); } #ifdef __MNONDEF template inline bool operator!= (const basic_string& lhs, const basic_string& rhs) _THROW_NONE { return lhs.compare(rhs); } #endif template inline bool operator!= (const charT* lhs, const basic_string& rhs) _THROW_NONE { return rhs.compare(lhs); } template inline bool operator!= (charT lhs, const basic_string& rhs) _THROW_NONE { return rhs.compare(lhs); } template inline bool operator!= (const basic_string& lhs, const charT* rhs) _THROW_NONE { return lhs.compare(rhs); } template inline bool operator!= (const basic_string& lhs, charT rhs) _THROW_NONE { return lhs.compare(rhs); } template inline bool operator< (const basic_string& lhs, const basic_string& rhs) _THROW_NONE { if (lhs.compare(rhs) < 0) return true; else return false; } template inline bool operator< (const charT* lhs, const basic_string& rhs) _THROW_NONE { if (rhs.compare(lhs) > 0) return true; else return false; } template inline bool operator< (charT lhs, const basic_string& rhs) _THROW_NONE { if (rhs.compare(lhs) > 0) return true; else return false; } template inline bool operator< (const basic_string& lhs, const charT* rhs) _THROW_NONE { if (lhs.compare(rhs) < 0) return true; else return false; } template inline bool operator< (const basic_string& lhs, charT rhs) _THROW_NONE { if (lhs.compare(rhs) < 0) return true; else return false; } #ifdef __MNONDEF template inline bool operator> (const basic_string& lhs, const basic_string& rhs) _THROW_NONE { return (rhs < lhs); } #endif template inline bool operator> (const charT* lhs, const basic_string& rhs) _THROW_NONE { return (rhs < lhs); } template inline bool operator> (charT lhs, const basic_string& rhs) _THROW_NONE { return (rhs < lhs); } template inline bool operator> (const basic_string& lhs, const charT* rhs) _THROW_NONE { return (rhs < lhs); } template inline bool operator> (const basic_string& lhs, charT rhs) _THROW_NONE { return (rhs < lhs); } #ifdef __MNONDEF template inline bool operator>= (const basic_string& lhs, const basic_string& rhs) _THROW_NONE { return !(lhs < rhs); } #endif template inline bool operator>= (const charT* lhs, const basic_string& rhs) _THROW_NONE { return !(lhs < rhs); } template inline bool operator>= (charT lhs, const basic_string& rhs) _THROW_NONE { return !(lhs < rhs); } template inline bool operator>= (const basic_string& lhs, const charT* rhs) _THROW_NONE { return !(lhs < rhs); } template inline bool operator>= (const basic_string& lhs, charT rhs) _THROW_NONE { return !(lhs < rhs); } #ifdef __MNONDEF template inline bool operator<= (const basic_string& lhs, const basic_string& rhs) _THROW_NONE { return !(rhs < lhs); } #endif template inline bool operator<= (const charT* lhs, const basic_string& rhs) _THROW_NONE { return !(rhs < lhs); } template inline bool operator<= (charT lhs, const basic_string& rhs) _THROW_NONE { return !(rhs < lhs); } template inline bool operator<= (const basic_string& lhs, const charT* rhs) _THROW_NONE { return !(rhs < lhs); } template inline bool operator<= (const basic_string& lhs, charT rhs) _THROW_NONE { return !(rhs < lhs); } // definitions : can be in a .c file // template charT basic_string_ref::eos () _THROW_NONE { return baggage_type::eos(); } template basic_string_ref::basic_string_ref () _THROW_NONE { res = len = 0; ptr = 0; count = 1; } template basic_string_ref::basic_string_ref (size_t size, capacity cap) _THROW_ALLOC_LENGTH { if (cap == ::reserve) { len = 0; res = size; ptr = new charT [res]; } else if ((cap == ::default_size) && (size != NPOS)) { res = len = size; if (res) { ptr = new charT [res]; for (size_t position = 0; position < len; ++position) baggage_type::assign (*(ptr+position), eos()); } else ptr = 0; } else { throwlength(); } count = 1; } template basic_string_ref::basic_string_ref (const basic_string& str, size_t pos, size_t rlen) _THROW_ALLOC { res = len = rlen; if (res) { ptr = new charT [res]; baggage_type::copy (ptr, str.data()+pos, len); } else ptr = 0; count = 1; } template basic_string_ref::basic_string_ref (const charT* s, size_t rlen, size_t rres) _THROW_ALLOC { res = rres; len = rlen; if (res) { ptr = new charT [res]; if (len) baggage_type::copy (ptr, s, len); } else ptr = 0; count = 1; } template basic_string_ref::basic_string_ref (const charT* s, size_t n) _THROW_ALLOC_LENGTH { if (n == NPOS) { throwlength(); } res = len = n; if (res) { ptr = new charT [res]; baggage_type::copy (ptr, s, len); } else ptr = 0; count = 1; } template basic_string_ref::basic_string_ref (const charT* s) _THROW_ALLOC { res = len = baggage_type::length(s); if (res) { ptr = new charT [res]; baggage_type::copy (ptr, s, len); } else ptr = 0; count = 1; } template basic_string_ref::basic_string_ref (charT c, size_t rep) _THROW_ALLOC_LENGTH { if (rep == NPOS) { throwlength(); } res = len = rep; if (res) { ptr = new charT [res]; for (size_t position = 0; position < len; ++position) baggage_type::assign (*(ptr+position), c); } else ptr = 0; count = 1; } template basic_string_ref::basic_string_ref (const vector& vec) _THROW_ALLOC_LENGTH { size_t n = vec.size(); if (n == NPOS) { throwlength(); } res = len = n; if (res) { ptr = new charT [res]; baggage_type::copy (ptr, vec.begin(), len); } else ptr = 0; count = 1; } template basic_string_ref::~basic_string_ref () _THROW_NONE { delete_ptr(); } template charT basic_string::eos () _THROW_NONE { return baggage_type::eos(); } template void basic_string::assign_str (const charT* s, size_t slen) _THROW_ALLOC_LENGTH { if (slen == NPOS) { reference_class::throwlength(); } if ((ref_count() > 1) || (slen && (reserve() < slen))) { reference_pointer tmp; tmp = new basic_string_ref (s, slen); delete_ref(); reference = tmp; } else if (slen) { baggage_type::copy (point(), s, slen); } reference->len = slen; } template void basic_string::append_str (const charT* s, size_t slen) _THROW_ALLOC_LENGTH { if (length() >= (NPOS-slen)) { reference_class::throwlength(); } if ((ref_count() > 1) || (slen > (reserve()-length()))) { reference_pointer tmp; tmp = new basic_string_ref (data(), length(), length()+slen); delete_ref(); reference = tmp; } if (slen) baggage_type::copy (point()+length(), s, slen); reference->len += slen; } template void basic_string::insert_str (size_t pos, const charT* s, size_t slen) _THROW_ALLOC_LENGTH_OUTRANGE { if (pos > length()) { reference_class::throwrange(); } if (length() >= (NPOS-slen)) { reference_class::throwlength(); } if ((ref_count() > 1) || (slen > (reserve()-length()))) { reference_pointer tmp; tmp = new basic_string_ref (data(), pos, length()+slen); baggage_type::copy (tmp->ptr+pos+slen, data()+pos, length()-pos); tmp->len = length(); delete_ref(); reference = tmp; } else { for (size_t count = length()-pos; count > 0; --count) baggage_type::assign (*(point()+pos+slen+count-1), *(data()+pos+count-1)); } if (slen) baggage_type::copy (point()+pos, s, slen); reference->len += slen; } template void basic_string::replace_str (size_t xlen, size_t pos, const charT* s, size_t slen) _THROW_ALLOC_LENGTH_OUTRANGE { if (pos > length()) { reference_class::throwrange(); } if ((length()-xlen) >= (NPOS-slen)) { reference_class::throwlength(); } if ((ref_count() > 1) || (reserve() < (length()+slen-xlen))) { reference_pointer tmp; tmp = new basic_string_ref (data(), pos, length()+slen-xlen); baggage_type::copy (tmp->ptr+pos+slen, data()+pos+xlen, length()-pos-xlen); tmp->len = length(); delete_ref(); reference = tmp; } else { if (slen < xlen) baggage_type::copy (point()+pos+slen, data()+pos+xlen, length()-pos-xlen); else { for (size_t count = length()-pos-xlen; count > 0; --count) baggage_type::assign (*(point()+pos+slen+count-1), *(data()+pos+xlen+count-1)); } } if (slen) baggage_type::copy (point()+pos, s, slen); reference->len += (slen-xlen); } template int basic_string::compare_str (size_t pos, const charT* str, size_t slen, size_t strlen) const _THROW_OUTRANGE { if (pos > length()) { reference_class::throwrange(); } size_t rlen = (slen > strlen ) ? strlen : slen; int result; if (!length()) return str ? (eos()- *str) : eos(); result = baggage_type::compare (data()+pos, str, rlen); return result ? result : (length()-pos-strlen); } template size_t basic_string::find_str (const charT* s, size_t pos, size_t len) const _THROW_NONE { size_t count = pos; size_t shift; size_t place; if ((length() == 0) || (len == 0)) return NPOS; while (len <= (length()-count)) { for (place = 0; place < len; ++place) { if (baggage_type::ne(*(s+len-1-place), *(data()+count+(len-1-place)))) break; } if (place == len) return count; shift = find(*(s+len-1-place), count+(len-place)); if (shift == NPOS) return NPOS; count = shift-(len-place-1); } return NPOS; } template size_t basic_string::rfind_str (const charT* s, size_t pos, size_t len) const _THROW_NONE { size_t count = (pos < (length()-len)) ? (pos+1) : (length()-len); size_t shift; size_t place; if ((length() < len) || (len == 0)) return NPOS; while (count > 0) { for (place = 0; place < len; ++place) { if (baggage_type::ne(*(s+len-1-place), *(data()+count+(len-place)-2))) break; } if (place == len) return count-1; shift = rfind(*(s+len-1-place), count+(len-place)-3); if (shift == NPOS) return NPOS; count = shift+place-len+2; } return NPOS; } template size_t basic_string::find_first_of_str (const charT* s, size_t pos, size_t len) const _THROW_NONE { size_t temp; size_t count = pos; size_t result = NPOS; while (count < length()) { temp = 0; while ((temp < len) && baggage_type::ne(*(data()+count), *(s+temp))) ++temp; if (temp != len) break; ++count; } temp = (count >= length()) ? NPOS : count; return ((result > temp) ? temp : result); } template size_t basic_string::find_last_of_str (const charT* s, size_t pos, size_t len) const _THROW_NONE { size_t temp = 0; size_t count = (pos < length()) ? (pos+1) : length(); if (length()) { while (count > 0) { temp = 0; --count; while ((temp != len) && baggage_type::ne(*(data()+count), *(s+temp))) ++temp; if (temp != len) break; } } return ((temp != len) && length()) ? count : NPOS; } template size_t basic_string::find_first_not_of_str (const charT* s, size_t pos, size_t len) const _THROW_NONE { size_t count = pos; while (count < length()) { size_t temp = 0; while (temp < len) { if (baggage_type::eq(*(data()+count), *(s+temp))) break; ++temp; } if (temp == len) break; ++count; } return ((count >= length()) ? NPOS : count); } template size_t basic_string::find_last_not_of_str (const charT* s, size_t pos, size_t len) const _THROW_NONE { size_t temp = 0; size_t count = (pos < length()) ? (pos+1) : length(); if (length()) { while (count > 0) { temp = 0; while (temp != len) { if (baggage_type::eq(*(data()+count-1), *(s+temp))) break; ++temp; } if (temp == len) break; --count; } } return ((temp == len) && length()) ? count-1 : NPOS; } template basic_string::basic_string () _THROW_ALLOC { reference = new basic_string_ref (); c_str_ptr = 0; } template basic_string::basic_string (size_t size, capacity cap) _THROW_ALLOC_LENGTH { reference = new basic_string_ref (size, cap); c_str_ptr = 0; } template basic_string::basic_string (const basic_string& str, size_t pos, size_t n) _THROW_ALLOC_OUTRANGE { if (pos > str.length()) { reference_class::throwrange(); } size_t rlen = (n > (str.length() - pos)) ? str.length() - pos : n; if ((rlen == str.length()) && (str.ref_count() != NPOS)) (reference = str.reference)->count++; else reference = new basic_string_ref (str, pos, rlen); c_str_ptr = 0; } template basic_string::basic_string (const charT* s, size_t rlen, size_t xlen) _THROW_ALLOC_LENGTH { if (rlen >= (NPOS - xlen)) { reference_class::throwlength(); } reference = new basic_string_ref (s, rlen, rlen+xlen); c_str_ptr = 0; } template basic_string::basic_string (const charT* s, size_t n) _THROW_ALLOC_LENGTH { reference = new basic_string_ref (s, n); c_str_ptr = 0; } template basic_string::basic_string (const charT* s) _THROW_ALLOC { reference = new basic_string_ref (s); c_str_ptr = 0; } template basic_string::basic_string (charT c, size_t rep) _THROW_ALLOC_LENGTH { reference = new basic_string_ref (c, rep); c_str_ptr = 0; } template basic_string::basic_string (const vector& vec) _THROW_ALLOC_LENGTH { reference = new basic_string_ref (vec); c_str_ptr = 0; } template basic_string::~basic_string () _THROW_NONE { delete_ref(); if (c_str_ptr) delete[] c_str_ptr; } template basic_string& basic_string::operator= (const basic_string& str) _THROW_ALLOC { if (this != &str) { delete_ref(); if (str.ref_count() != NPOS) (reference = str.reference)->count++; else reference = new basic_string_ref (str, 0, str.length()); } return *this; } template basic_string& basic_string::operator= (const charT* s) _THROW_ALLOC { assign_str (s, baggage_type::length(s)); return *this; } template basic_string& basic_string::operator= (charT c) _THROW_ALLOC { if ((ref_count() == 1) && (reserve() >= 1)) { baggage_type::assign (*(point()), c); reference->len = 1; } else { delete_ref(); reference = new basic_string_ref (c, 1); } return *this; } template basic_string& basic_string::operator+= (const basic_string& rhs) _THROW_ALLOC_LENGTH { append_str (rhs.data(), rhs.length()); return *this; } template basic_string& basic_string::operator+= (const charT* s) _THROW_ALLOC_LENGTH { append_str (s, baggage_type::length(s)); return *this; } template basic_string& basic_string::operator+= (charT c) _THROW_ALLOC_LENGTH { if (length() >= (NPOS-1)) { reference_class::throwlength(); } if (!((ref_count() == 1) && (reserve() > length()))) { reference_pointer tmp; tmp = new basic_string_ref (data(), length(), length()+1); delete_ref(); reference = tmp; } baggage_type::assign (*(point()+length()), c); reference->len++; return *this; } template basic_string& basic_string::append (const basic_string& str, size_t pos, size_t n) _THROW_ALLOC_LENGTH_OUTRANGE { if (pos > str.length()) { reference_class::throwrange(); } append_str (str.data() + pos, (n>(str.length()-pos))?(str.length()-pos):n); return *this; } template basic_string& basic_string::append (const charT* s, size_t n) _THROW_ALLOC_LENGTH { append_str (s, n); return *this; } template basic_string& basic_string::append (const charT* s) _THROW_ALLOC_LENGTH { append_str (s, baggage_type::length(s)); return *this; } template basic_string& basic_string::append (charT c, size_t rep) _THROW_ALLOC_LENGTH { if (length() >= (NPOS-rep)) { reference_class::throwlength(); } if (rep) { if ((ref_count() > 1) || (reserve() < (length() + rep))) { reference_pointer tmp; tmp = new basic_string_ref (data(), length(), length()+rep); delete_ref(); reference = tmp; } for (size_t count = 0; count < rep; ++count) baggage_type::assign (*(point()+length()+count), c); reference->len += rep; } return *this; } template basic_string& basic_string::assign (const basic_string& str, size_t pos, size_t n) _THROW_ALLOC_LENGTH_OUTRANGE { if (pos > str.length()) { reference_class::throwrange(); } size_t rlen = (n > (str.length() - pos)) ? str.length() - pos : n; if ((rlen == str.length()) && (str.ref_count() != NPOS)) { delete_ref(); (reference = str.reference)->count++; } else assign_str (str.data()+pos, rlen); return *this; } template basic_string& basic_string::assign (const charT* s, size_t n) _THROW_ALLOC_LENGTH { assign_str (s, n); return *this; } template basic_string& basic_string::assign (const charT* s) _THROW_ALLOC_LENGTH { assign_str (s, baggage_type::length(s)); return *this; } template basic_string& basic_string::assign (charT c, size_t rep) _THROW_ALLOC_LENGTH { if (rep == NPOS) { reference_class::throwlength(); } if ((ref_count() > 1) || (rep && (reserve() < rep))) { reference_pointer tmp; tmp = new basic_string_ref (c, rep); delete_ref(); reference = tmp; } else { for (size_t count = 0; count < rep; ++count) baggage_type::assign (*(point()+count), c); reference->len = rep; } return *this; } template basic_string& basic_string::insert (size_t pos1, const basic_string& str, size_t pos2, size_t n) _THROW_ALLOC_LENGTH_OUTRANGE { if (pos2 > str.length()) { reference_class::throwrange(); } size_t rlen = (n > (str.length() - pos2)) ? str.length() - pos2 : n; insert_str (pos1, str.data()+pos2, rlen); return *this; } template basic_string& basic_string::insert (size_t pos, const charT* s, size_t n) _THROW_ALLOC_LENGTH_OUTRANGE { insert_str(pos, s, n); return *this; } template basic_string& basic_string::insert (size_t pos, const charT* s) _THROW_ALLOC_LENGTH_OUTRANGE { insert_str(pos, s, baggage_type::length(s)); return *this; } template basic_string& basic_string::insert (size_t pos, charT c, size_t rep) _THROW_ALLOC_LENGTH_OUTRANGE { if (pos > length()) { reference_class::throwrange(); } if ((rep == NPOS) || (length() >= (NPOS - rep))) { reference_class::throwlength(); } if (rep) { size_t count; if ((ref_count() > 1) || (reserve() < (length()+rep))) { reference_pointer tmp; tmp = new basic_string_ref (data(), pos, length()+rep); if (length()) for (count = length()-pos; count > 0; --count) baggage_type::assign (*(tmp->ptr+pos+rep+count-1), *(data()+pos+count-1)); tmp->len = length(); delete_ref(); reference = tmp; } else { for (count = length()-pos; count > 0; --count) baggage_type::assign (*(point()+pos+rep+count-1), *(data()+pos+count-1)); } for (count = 0; count < rep; ++count) baggage_type::assign (*(point()+pos+count), c); reference->len += rep; } return *this; } template basic_string& basic_string::remove (size_t pos, size_t n) _THROW_ALLOC_OUTRANGE { if (pos > length()) { reference_class::throwrange(); } size_t xlen = (n > (length()-pos)) ? (length()-pos) : n; if (ref_count() > 1) { reference_pointer tmp; tmp = new basic_string_ref (data(), pos, length()); baggage_type::copy (tmp->ptr+pos, data()+pos+xlen, length()-xlen-pos); tmp->len = length()-xlen; delete_ref(); reference = tmp; } else if (xlen == length()) reference->len = 0; else if (xlen) { baggage_type::copy (point()+pos, data()+pos+xlen, length()-xlen-pos); reference->len -= xlen; } return *this; } template basic_string& basic_string::replace (size_t pos1, size_t n1, const basic_string& str, size_t pos2, size_t n2) _THROW_ALLOC_LENGTH_OUTRANGE { if (pos2 > str.length()) { reference_class::throwrange(); } size_t xlen = (n1 > (length()-pos1)) ? (length()-pos1) : n1; size_t rlen = (n2 > (str.length()-pos2)) ? (str.length()-pos2) : n2; replace_str (xlen, pos1, str.data()+pos2, rlen); return *this; } template basic_string& basic_string::replace (size_t pos, size_t n1, const charT* s, size_t n2) _THROW_ALLOC_LENGTH_OUTRANGE { size_t xlen = (n1 > (length()-pos)) ? (length()-pos) : n1; replace_str (xlen, pos, s, n2); return *this; } template basic_string& basic_string::replace (size_t pos, size_t n1, const charT* s) _THROW_ALLOC_LENGTH_OUTRANGE { size_t xlen = (n1 > (length()-pos)) ? (length()-pos) : n1; replace_str (xlen, pos, s, baggage_type::length(s)); return *this; } template basic_string& basic_string::replace (size_t pos, size_t n, charT c, size_t rep) _THROW_ALLOC_LENGTH_OUTRANGE { if (pos > length()) { reference_class::throwrange(); } size_t xlen = (n > (length()-pos)) ? (length()-pos) : n; if ((length()-xlen) >= (NPOS-rep)) { reference_class::throwlength(); } if (!rep) return remove (pos, n); else { size_t count; if ((ref_count() > 1) || (reserve() < (length()-xlen+rep))) { reference_pointer tmp; tmp = new basic_string_ref (data(), pos, length()+((xlen > rep) ? (xlen-rep) : 0)); if (rep < xlen) baggage_type::copy (tmp->ptr+pos+rep, data()+pos+xlen, length()-pos-xlen); else { for (count = length()-xlen-pos; count > 0; --count) baggage_type::assign (*(tmp->ptr+pos+rep+count-1), *(data()+pos+xlen+count-1)); } tmp->len = length(); delete_ref(); reference = tmp; } else { if (rep < xlen) baggage_type::copy (point()+pos+rep, data()+pos+xlen, length()-pos-xlen); else { for (count = length()-xlen-pos; count > 0; --count) baggage_type::assign (*(point()+pos+rep+count-1), *(data()+pos+xlen+count-1)); } } for (count = 0; count < rep; ++count) baggage_type::assign (*(point()+pos+count), c); reference->len += (rep-xlen); } return *this; } template void basic_string::put_at (size_t pos, charT c) _THROW_ALLOC_OUTRANGE { if (pos > length()) { reference_class::throwrange(); } if ((ref_count() > 1) || (pos == reserve())) { reference_pointer tmp; tmp = new basic_string_ref (data(), length(), length()+((pos==length())?1:0)); delete_ref(); reference = tmp; } if (pos == length()) ++reference->len; baggage_type::assign (*(point()+pos), c); } template charT& basic_string::operator[] (size_t pos) _THROW_ALLOC_OUTRANGE { if (pos >= length()) { reference_class::throwrange(); } if (ref_count() > 1) { reference_pointer tmp; tmp = new basic_string_ref (data(), length(), length()); delete_ref(); reference = tmp; } return *(point()+pos); } template const charT* basic_string::c_str () const _THROW_ALLOC { if (c_str_ptr) delete[] ((basic_string*)this)->c_str_ptr; ((basic_string*)this)->c_str_ptr = new charT [length()+1]; if (length()) baggage_type::copy (((basic_string*)this)->c_str_ptr, data(), length()); baggage_type::assign (*(((basic_string*)this)->c_str_ptr+length()), eos()); return c_str_ptr; } template void basic_string::resize (size_t n, charT c) _THROW_ALLOC_LENGTH { if (n == NPOS) { reference_class::throwlength(); } if ((ref_count() > 1) || (n > reserve())) { reference_pointer tmp; tmp = new basic_string_ref (data(), ((n > length()) ? length() : n), n); delete_ref(); reference = tmp; } while (reference->len < n) { baggage_type::assign (*(reference->ptr+length()), c); ++reference->len; } reference->len = n; } template void basic_string::resize (size_t n) _THROW_ALLOC_LENGTH { resize (n, eos()); } template void basic_string::reserve (size_t res_arg) _THROW_ALLOC_LENGTH { if (res_arg == NPOS) { reference_class::throwlength(); } if (res_arg > reserve()) { reference_pointer tmp; tmp = new basic_string_ref (data(), length(), res_arg); delete_ref(); reference = tmp; } } template size_t basic_string::copy (charT* s, size_t n, size_t pos) const _THROW_OUTRANGE { if (pos > length()) { reference_class::throwrange(); } size_t rlen = (n > (length()-pos)) ? (length()-pos) : n; if (length()) baggage_type::copy (s, data()+pos, rlen); return rlen; } template size_t basic_string::find (const basic_string& str, size_t pos) const _THROW_NONE { return find_str (str.data(), pos, str.length()); } template size_t basic_string::find (const charT* s, size_t pos, size_t n) const _THROW_NONE { return find_str (s, pos, n); } template size_t basic_string::find (const charT* s, size_t pos) const _THROW_NONE { return find_str (s, pos, baggage_type::length(s)); } template size_t basic_string::find (charT c, size_t pos) const _THROW_NONE { while ((pos < length()) && (baggage_type::ne(*(data()+pos), c))) ++pos; return ((pos < length()) ? pos : NPOS); } template size_t basic_string::rfind (const basic_string& str, size_t pos) const _THROW_NONE { return rfind_str (str.data(), pos, str.length()); } template size_t basic_string::rfind (const charT* s, size_t pos, size_t n) const _THROW_NONE { return rfind_str (s, pos, n); } template size_t basic_string::rfind (const charT* s, size_t pos) const _THROW_NONE { return rfind_str (s, pos, baggage_type::length(s)); } template size_t basic_string::rfind (charT c, size_t pos) const _THROW_NONE { size_t count = ((pos < length()) ? pos+1 : length()); if (length() == 0) return NPOS; while ((baggage_type::ne(*(data()+count-1), c)) && (count > 1)) --count; if ((count == 1) && (baggage_type::ne(*(data()), c))) return NPOS; else return count-1; } template size_t basic_string::find_first_of (const basic_string& str, size_t pos) const _THROW_NONE { return find_first_of_str (str.data(), pos, str.length()); } template size_t basic_string::find_first_of (const charT* s, size_t pos, size_t n) const _THROW_NONE { return find_first_of_str (s, pos, n); } template size_t basic_string::find_first_of (const charT* s, size_t pos) const _THROW_NONE { return find_first_of_str (s, pos, baggage_type::length(s)); } template size_t basic_string::find_first_of (charT c, size_t pos) const _THROW_NONE { return find (c, pos); } template size_t basic_string::find_last_of (const basic_string& str, size_t pos) const _THROW_NONE { return find_last_of_str (str.data(), pos, str.length()); } template size_t basic_string::find_last_of (const charT* s, size_t pos, size_t n) const _THROW_NONE { return find_last_of_str (s, pos, n); } template size_t basic_string::find_last_of (const charT* s, size_t pos) const _THROW_NONE { return find_last_of_str (s, pos, baggage_type::length(s)); } template size_t basic_string::find_last_of (charT c, size_t pos) const _THROW_NONE { return rfind (c, pos); } template size_t basic_string::find_first_not_of (const basic_string& str, size_t pos) const _THROW_NONE { return find_first_not_of_str (str.data(), pos, str.length()); } template size_t basic_string::find_first_not_of (const charT* s, size_t pos, size_t n) const _THROW_NONE { return find_first_not_of_str (s, pos, n); } template size_t basic_string::find_first_not_of (const charT* s, size_t pos) const _THROW_NONE { return find_first_not_of_str (s, pos, baggage_type::length(s)); } template size_t basic_string::find_first_not_of (charT c, size_t pos) const _THROW_NONE { while ((pos < length()) && (baggage_type::eq(*(data()+pos), c))) ++pos; return ((pos < length()) ? pos : NPOS); } template size_t basic_string::find_last_not_of (const basic_string& str, size_t pos) const _THROW_NONE { return find_last_not_of_str (str.data(), pos, str.length()); } template size_t basic_string::find_last_not_of (const charT* s, size_t pos, size_t n) const _THROW_NONE { return find_last_not_of_str (s, pos, n); } template size_t basic_string::find_last_not_of (const charT* s, size_t pos) const _THROW_NONE { return find_last_not_of_str (s, pos, baggage_type::length(s)); } template size_t basic_string::find_last_not_of (charT c, size_t pos) const _THROW_NONE { size_t count = ((pos < length()) ? pos+1 : length()); if (length() == 0) return NPOS; while ((baggage_type::eq(*(data()+count-1), c)) && (count > 1)) --count; if ((count == 1) && (baggage_type::eq(*(data()), c))) return NPOS; else return count-1; } template basic_string basic_string::substr (size_t pos, size_t n) const _THROW_ALLOC_OUTRANGE { if (pos > length()) { reference_class::throwrange(); } if (length()) return basic_string (data()+pos, (n > (length()-pos)) ? (length()-pos) : n); else return basic_string(); } template int basic_string::compare (const basic_string& str, size_t pos, size_t n) const _THROW_OUTRANGE { size_t slen = (n > (length()-pos)) ? (length()-pos) : n; return compare_str (pos, str.data(), slen, str.length()); } template int basic_string::compare (const charT* s, size_t pos, size_t n) const _THROW_LENGTH_OUTRANGE { if (n == NPOS) { reference_class::throwlength(); } return compare_str (pos, s, length()-pos, n); } template int basic_string::compare (const charT* s, size_t pos) const _THROW_OUTRANGE { return compare_str (pos, s, length()-pos, baggage_type::length(s)); } template int basic_string::compare (charT c, size_t pos, size_t rep) const _THROW_LENGTH_OUTRANGE { if (pos > length()) { reference_class::throwrange(); } if (rep == NPOS) { reference_class::throwlength(); } if (rep) { size_t count = 0; while ((count < rep) && (count < (length()-pos)) && baggage_type::eq (*(data()+pos+count), c)) ++count; if ((count == rep) || (count == (length()-pos))) return (length()-pos-count); else return (*(data()+pos+count)-c); } else { return (length()-pos); } } template basic_string operator+ (const basic_string& lhs, const basic_string& rhs) _THROW_ALLOC_LENGTH { typedef basic_string::baggage_type baggage_type; basic_string tmp(lhs.data(), lhs.length(), rhs.length()); if (rhs.length()) baggage_type::copy (tmp.point()+lhs.length(), rhs.data(), rhs.length()); tmp.len() += rhs.length(); return tmp; } template basic_string operator+ (const charT* lhs, const basic_string& rhs) _THROW_ALLOC_LENGTH { typedef basic_string::baggage_type baggage_type; size_t slen = baggage_type::length(lhs); basic_string tmp(lhs, slen, rhs.length()); if (rhs.length()) baggage_type::copy (tmp.point()+slen, rhs.data(), rhs.length()); tmp.len() += rhs.length(); return tmp; } template basic_string operator+ (charT lhs, const basic_string& rhs) _THROW_ALLOC_LENGTH { typedef basic_string::baggage_type baggage_type; basic_string tmp(&lhs, 1, rhs.length()); if (rhs.length()) baggage_type::copy (tmp.point()+1, rhs.data(), rhs.length()); tmp.len() += rhs.length(); return tmp; } template basic_string operator+ (const basic_string& lhs, const charT* rhs) _THROW_ALLOC_LENGTH { typedef basic_string::baggage_type baggage_type; size_t slen = baggage_type::length(rhs); basic_string tmp(lhs.data(), lhs.length(), slen); if (slen) baggage_type::copy (tmp.point()+lhs.length(), rhs, slen); tmp.len() += slen; return tmp; } template basic_string operator+ (const basic_string& lhs, charT rhs) _THROW_ALLOC_LENGTH { typedef basic_string::baggage_type baggage_type; basic_string tmp(lhs.data(), lhs.length(), 1); baggage_type::assign (*(tmp.point()+lhs.length()), rhs); ++tmp.len(); return tmp; } template ostream& operator<< (ostream& o, const basic_string& s) _THROW_NONE { typedef basic_string::baggage_type baggage_type; for (size_t count = 0; count < s.length(); ++count) baggage_type::char_out (o, *(s.data()+count)); return o; } template istream& operator>> (istream& i, basic_string& s) _THROW_ALLOC_LENGTH { typedef basic_string::baggage_type baggage_type; s.remove(); while (true) { charT value; baggage_type::char_in (i, value); if (!i.operator void*()) break; if (!baggage_type::is_del (value)) { s.append(value); while (true) { baggage_type::char_in (i, value); if (!i.operator void*()) break; if (!baggage_type::is_del (value)) { s.append(value); } else break; } break; } } return i; } typedef basic_string cstring; typedef basic_string string; // typedef basic_string wstring; /* The following is a workaround for a compiler bug in some versions of the Apogee compiler. This looks pretty weird, and it shouldn't work, but more obvious constructs cause other error messages.---DRM */ inline void destroy(string* pointer) { pointer->~basic_string(); } #endif tau-2.16.4/include/Profile/fujitsu.h000066400000000000000000000005701062343042700172650ustar00rootroot00000000000000#ifndef _TAU_FUJITSU_H_ #define _TAU_FUJITSU_H_ #include extern "C" { extern int getdtablesize (void); extern int getopt(int, char *const *, const char *); extern char *optarg; extern int optind, opterr, optopt; extern int strcasecmp(const char *s1, const char *s2); int strncasecmp(const char *s1, const char *s2, size_t n); } #endif /* _TAU_FUJITSU_H_ */ tau-2.16.4/include/Profile/hitachi.h000066400000000000000000000000511062343042700171770ustar00rootroot00000000000000#include #include tau-2.16.4/include/Profile/ktau_atomic.h000077500000000000000000000060771062343042700201070ustar00rootroot00000000000000/**************************************************************************** ** TAU Portable Profiling Package ** ** http://www.acl.lanl.gov/tau ** ***************************************************************************** ** Copyright 1997 ** ** Department of Computer and Information Science, University of Oregon ** ** Advanced Computing Laboratory, Los Alamos National Laboratory ** ****************************************************************************/ /*************************************************************************** ** File : ktau_atomic.h ** ** Description : TAU Kernel Profiling Interface ** ** Author : Aroon Nataraj ** ** : Suravee Suthikulpanit ** ** Contact : {anataraj,suravee}@cs.uoregon.edu ** ** Flags : Compile with ** ** -DTAU_KTAU to enable KTAU ** ** Documentation : ** ***************************************************************************/ #ifndef _KTAU_ATOMIC_H #define _KTAU_ATOMIC_H #ifdef TAUKTAU_MERGE /* atomic from /usr/include */ #include #include "tauarch.h" #ifndef TAU_ppc static __inline__ int atomic_add_return(int i, atomic_t *v) { int __i; /* ONLY works for Modern 486+ processor */ __i = i; __asm__ __volatile__( LOCK "xaddl %0, %1;" :"=r"(i) :"m"(v->counter), "r"(i)); return i + __i; } static __inline__ int atomic_sub_return(int i, atomic_t *v) { return atomic_add_return(-i,v); } #endif /* TAU_ppc */ #include #define kernel_incltime_low(X) (((X)+0)->ktime) #define kernel_incltime_high(X) (((X)+1)->ktime) static inline unsigned long long read_ktime(volatile ktau_state* pstate) { unsigned long high1 = 0, high2 = 0, low = 0; unsigned long long time = 0; loop: high1 = atomic_read(&kernel_incltime_high(pstate)); low = atomic_read(&(kernel_incltime_low(pstate))); high2 = atomic_read(&kernel_incltime_high(pstate)); if(high1!=high2) goto loop; time = (high1 & 0xFFFFFFFF); time = (time << 32) + (low & 0xFFFFFFFF); return time; } /* To be immplemented */ static inline unsigned long read_kcalls(volatile ktau_state* pstate) { return 0; } #endif /* TAUKTAU_MERGE */ #endif /*_KTAU_ATOMIC_H */ /*************************************************************************** * $RCSfile: ktau_atomic.h,v $ $Author: anataraj $ * $Revision: 1.2 $ $Date: 2007/04/19 03:21:44 $ * POOMA_VERSION_ID: $Id: ktau_atomic.h,v 1.2 2007/04/19 03:21:44 anataraj Exp $ ***************************************************************************/ tau-2.16.4/include/Profile/ktau_proc_interface.h000077500000000000000000000234071062343042700216120ustar00rootroot00000000000000/**************************************************************************** ** TAU Portable Profiling Package ** ** http://www.acl.lanl.gov/tau ** ***************************************************************************** ** Copyright 1997 ** ** Department of Computer and Information Science, University of Oregon ** ** Advanced Computing Laboratory, Los Alamos National Laboratory ** ****************************************************************************/ /*************************************************************************** ** File : KtauFuncInfo.h ** ** Description : TAU Kernel Profiling Interface ** ** Author : Aroon Nataraj ** ** Contact : anataraj@cs.uoregon.edu ** ** Flags : ** ** Documentation : ** ***************************************************************************/ #ifndef _KTAU_PROC_INTERFACE_H #define _KTAU_PROC_INTERFACE_H #ifdef __cplusplus extern "C" { #endif /* User-Space Application Interface Functions */ /* ktau specific KERNEL headers */ #include /* ktau_output etc */ #include /* IOCTL Cmd Defs etc */ /* * HACK for ktaud * for getting sizeof(ktau_package_t) * This should not be used directly */ #include /* IOCTL Cmd Defs etc */ /* user clib headers */ #include extern long ktau_dump_toggle(); #define KTAU_PROFILE 0 #define KTAU_TRACE 1 /* Function(s) to access /proc to read size,data,purge & set_state . */ /* Read & Purge PIDs * * If nopids > 1, then used for multiple pids * * if nopids = 0 & pid=null, then used for ALL Pids * */ /* read_size: Used to query /proc/ktau for SIZE of profile(s). * *************************************************************** * Arguments: * type: KTAU_PROFILE or KTAU_TRACE * * self: if reading self -> set to 1, otherwise set to zero * * pid: pointer to a single pid , or address of array of pids * Can be NULL (if nopids is ZERO) --> size of FULL sys. prof * * nopids: no of pids being pointed to above * Can be ZERO --> request size of entire system prof * * tol: tolerance paramter. to ignore, set to ZERO * * flags: . ignore, set to NULL. * * compratio: This is a fraction between 0 & 1 (can be zero or 1 also) * -1 --> means USE DEFAULT VALUE * Compensation-Ratio Used to scale-up the size returned * from /proc, so that when a call is made to read_data, * the size is larger to accomodate any changes to profile. * NOTE: To Ignore SET to -1. * * Returns: * On Success: total size of profile(s) of pid(s) * On Error: -1; Other negative error codes reserved. * * Constraints: * None. */ extern long read_size(int type, int self, pid_t *pid, unsigned int nopids, unsigned long tol, unsigned int* flags, float compratio); /* read_data: Used to query /proc/ktau for DATA of profile(s). * *************************************************************** * Arguments: * type: KTAU_PROFILE or KTAU_TRACE * * self: if reading self -> set to 1, otherwise set to zero * * pid: pointer to a single pid , or address of array of pids * Can be NULL --> request data of entire system prof * * nopids: no of pids being pointed to above * Can be ZERO --> request data of entire system prof * * buffer: pointer to allocated memory * * size: size of buffer (allocate memory above) * * tol: tolerance paramter. to ignore, set to ZERO * * flags: . ignore, set to NULL. * * Returns: * On Success: total size of profile(s) data read into buffer. * On Error: -1; Other negative error codes reserved. * * Constraints: * Must have called read_size before to ascertain size of buffer. * * NOTE: Even if SIZE allocated is that returned by read_size, * read_data can return error for lack of size -> as size of prof * can change after read_size. This is unlikely. */ extern long read_data(int type, int self, pid_t *pid, unsigned int nopids, char* buffer, unsigned long size, unsigned long tol, unsigned int* flags); /* purge_data: Used to reset state of profiles /proc/ktau for pid(s). * ********************************************************************** * Arguments: * pid: pointer to a single pid , or address of array of pids * Can be NULL --> request reset of entire system prof * * nopids: no of pids being pointed to above * Can be ZERO --> request reset of entire system prof * * tol: tolerance paramter. to ignore, set to ZERO * * flags: . ignore, set to NULL. * * Returns: * On Success: 0 * On Error: -1; Other negative error codes reserved. * * Constraints: * None. */ extern long purge_data(pid_t *pid, unsigned int nopids, unsigned long tol, unsigned int* flags); /* write_data: Used to write into state of profiles /proc/ktau for pid(s). ********************************************************************** * NOTE: CURRENTLY UNIMPLEMENTED. DO NOT USE. * Arguments: * Returns: * Constraints: */ extern long write_data(pid_t *pid, unsigned int nopids, char* buffer, unsigned long size, unsigned long tol, unsigned int* flags); /* ktau_set_state : Used to query /proc/ktau for SIZE of profile(s). * *************************************************************** * Arguments: * pid: pointer to a single pid (MUST BE SELF) * Can be NULL (if pid is unknown, e.g. for threads) * * flags: . ignore, set to NULL. * * Returns: * On Success: Zero. * On Error: -1; Other negative error codes reserved. * * Constraints: * set_state only works on 'SELF' , cannot perform it (yet) on * other processes. */ extern long ktau_set_state(pid_t *pid, ktau_state* state, unsigned int* flags); /* Function(s) to convert data read from kernel. */ /* unpack_bindata: Once Read (into Buffer) by calling read_data, * that Data needs to be expanded into Profile Data. Expansion is * required as its read from kernel-space /proc as contiguous * binary data. ***************************************************************** * Arguments: * type: KTAU_PROFILE or KTAU_TRACE * * buffer: buffer containing the binary (packed) data read using * read_data. * * size: size of above buffer. * * output: pointer to an UN-Allocated ktau_output* . [this function * will allocate *output.] * * Returns: * On Success: no of profiles unpacked & pointed to by output. * On Error: -1; Other negative error codes reserved. * * Constraints: * Caller MUST De-Allocate (*output) using 'free'. */ extern long unpack_bindata(int type, char* buffer, unsigned long size, ktau_output** output); /* Formatting Functions: Data Dumping & On-Screen Formatted Output */ /* print_many_profiles: Prints array of Profiles to file-stream (can be stdout) ***************************************************************** * Arguments: * type: KTAU_PROFILE or KTAU_TRACE * * fp: FILE pointer to an open, writable file-stream. This can be any * output file-stream, including stdout/sdterr. * * profiles: ktau_output ptr to the Unpacked profile data. * * no_profiles: the number of profiles pointed to by profiles* (above) * * Returns: void * * Constraints: * Can print from only ktau_output (i.e unpacked profiles). Cannot * print packed-binary profile data --> therefore unpack_bindata * must be called on those before calling this. */ extern void print_many_profiles(int type, FILE* fp, const ktau_output* profiles, unsigned int no_profiles); /* print_ktau_output: Prints A SINGLE Profile to file-stream (can be stdout) ***************************************************************** * Arguments: * type: KTAU_PROFILE or KTAU_TRACE * * fp: FILE pointer to an open, writable file-stream. This can be any * output file-stream, including stdout/sdterr. * * profile: ktau_output ptr to the Unpacked profile data. * * Returns: void * * Constraints: * Can print from only ktau_output (i.e unpacked profile). Cannot * print packed-binary profile data --> therefore unpack_bindata * must be called on those before calling this. */ extern void print_ktau_output(int type, FILE* fp, const ktau_output* profile); /* aggr_many_profiles: Aggregates array of Profiles to provide single kernel-as-a-whole profile ***************************************************************** * Arguments: * inprofiles: ktau_output ptr to the Unpacked profile data. * * no_profiles: the number of profiles pointed to by profiles* (above) * * max_prof_entries: the maximum no of entries a single profile may have * * outprofile: ptr to allocated memory for one profile with max_prof_size entries * * Returns: 0 on success, negative on error * * Constraints: * Can aggregate from only ktau_output (i.e unpacked profiles). Cannot * aggregate packed-binary profile data --> therefore unpack_bindata * must be called on those before calling this. */ int aggr_many_profiles(const ktau_output* inprofiles, unsigned int no_profiles, unsigned int max_prof_entries, ktau_output* outprofile); #ifdef __cplusplus } /* extern "C" */ #endif #endif /*_KTAU_PROC_INTERFACE_H */ /*************************************************************************** * $RCSfile: ktau_proc_interface.h,v $ $Author: anataraj $ * $Revision: 1.2 $ $Date: 2006/11/09 05:34:47 $ * POOMA_VERSION_ID: $Id: ktau_proc_interface.h,v 1.2 2006/11/09 05:34:47 anataraj Exp $ ***************************************************************************/ tau-2.16.4/include/Profile/ktau_timer.h000077500000000000000000000160271062343042700177470ustar00rootroot00000000000000/**************************************************************************** ** TAU Portable Profiling Package ** ** http://www.acl.lanl.gov/tau ** ***************************************************************************** ** Copyright 1997 ** ** Department of Computer and Information Science, University of Oregon ** ** Advanced Computing Laboratory, Los Alamos National Laboratory ** ****************************************************************************/ /*************************************************************************** ** File : ktau_timer.h ** ** Description : TAU Kernel Profiling Interface ** ** Author : Aroon Nataraj ** ** : Suravee Suthikulpanit ** ** Contact : {anataraj,suravee}@cs.uoregon.edu ** ** Flags : Compile with ** ** -DTAU_KTAU to enable KTAU ** ** Documentation : ** ***************************************************************************/ #ifndef _KTAU_TIMER_H_ #define _KTAU_TIMER_H_ #ifdef TAUKTAU #include #include "Profile/../tauarch.h" //time to perform the timing (in secs) #define CHECK_TIME 1 //#define PPC32 /*#define AIX */ #ifdef TAU_bgl /******************************************** * This function is calling the special call * for running on BG/L ********************************************/ __inline__ unsigned long long int rdtsc(void) { return BGLTimebase(); } #else #ifdef TAU_ppc #ifdef TAU_aix #include #include unsigned long long int rdtsc(void) { timebasestruct_t t; unsigned long long int retval; int type; type = read_real_time(&t, TIMEBASE_SZ); retval = t.tb_high; retval = retval<<32; retval = retval|t.tb_low; /*printf("type = %20d\nflag = %20d\nu = %20x\nl = %20x\nretval= %20llx\n" ,type,t.flag,t.tb_high,t.tb_low,retval); */ return (retval); } #else /*AIX*/ /***************************************** * Modified by : Suravee Suthikulpanit * ARCH : PowerPC * Description : * The low-level PPC-class timer * Reference: * Programing Environment Manual for 32-Bit Microprocessors * (Motorola), MPCFPE32B.pdf P.2-16 * Description: * This code accesses the 64-bit VEA-Time Base (TB) register set * of PowerPC processor. The register set is devided into upper (TBU) * and lower (TBL) 32-bit register. * loop: * mftbu rx #load from TBU * mftb ry #load from TBL * mftbu rz #load from TBU * cmpw rz,rx #see if old = new * bne loop #loop if carry occurred *****************************************/ __inline__ unsigned long long int rdtsc(void) { unsigned long long int result=0; unsigned long int upper, lower,tmp; __asm__ __volatile__( "loop: \n" "\tmftbu %0 \n" "\tmftb %1 \n" "\tmftbu %2 \n" "\tcmpw %2,%0 \n" "\tbne loop \n" /*outputs*/: "=r"(upper),"=r"(lower),"=r"(tmp) ); result = upper; result = result<<32; result = result|lower; /*printf("u = %20x\nl = %20x\nresult = %20llx\n",upper,lower,result);*/ return(result); } #endif /*AIX*/ #else /*PPC32*/ #ifdef TAU_x86_64 /*****************************************/ /* The low-level x86_64-class timer */ /*****************************************/ static __inline__ unsigned long long int rdtsc() { unsigned int x = 0, y = 0; __asm__ volatile ("rdtsc" : "=a" (x), "=d" (y)); return ( ((unsigned long)x) | (((unsigned long)y)<<32) ); } #else /*x86_64*/ /*****************************************/ /* The low-level Pentium-class timer */ /*****************************************/ __inline__ unsigned long long int rdtsc() { unsigned long long int x; __asm__ volatile (".byte 0x0f, 0x31" : "=A" (x)); return x; } #endif /*x86_64*/ #endif /*PPC32*/ #endif /*BGL*/ /*****************************************/ /* Simple clock to return seconds */ /*****************************************/ double quicksecond() { struct timeval tp; struct timezone tzp; int i; i = gettimeofday(&tp,&tzp); return ( (double) tp.tv_sec + (double) tp.tv_usec * 1.e-6 ); } /*****************************************/ /* Simple clock to return microseconds */ /*****************************************/ double quickmicrosecond() { struct timeval tp; struct timezone tzp; int i; i = gettimeofday(&tp,&tzp); return ( (double) tp.tv_sec * 1.e6 + (double) tp.tv_usec ); } /*****************************************/ /* Calc quick (effective) cycles/sec appx for runtimes */ /* Since each CPU can be a different speed, it is convenient to run the benchmark based on some total wallclock, rather than the number of ticks. This function simply does a quick ballpark calibration to find the number of ticks per second, so the benchmarks can be run some fixed number of ticks, and the completion time can be conveniently estimated */ /*****************************************/ static inline double cycles_per_sec() { double start, elapsed, accum=0.0, y; int i, flipper=1; unsigned long long int x; /*if (verbose) printf("Calibrating benchmark loop size... \n"); */ /*print_run_info();*/ /* Print information about this benchmark */ x = rdtsc(); start=quicksecond(); /* repeat until at least CHECK_TIME secs have elapsed */ while ( (elapsed=quicksecond()-start) < CHECK_TIME) { if (flipper == 1) flipper=-1; else flipper=1; for (i=0; i<1000000; i++) { /* this is a complicated computation to avoid being removed by removed by the optimizer, and floating point overflow */ accum = accum + (i * (double) flipper); } } x = rdtsc() - x; /* cycles elapsed */ elapsed = quicksecond() - start; /* time elapsed */ y = (double) x / elapsed; /* cycles per second (approx.) */ /* prevent optimization, rely on run-time parameter */ /*if (verbose) printf("accum: %F \n",accum); */ return y; } /* * Testing code */ /* int main(int argc, char **argv){ printf("This is cycles_per_sec: %lf\n",cycles_per_sec()); exit(0); } */ #endif /* TAUKTAU */ #endif /* KTAU_TIMER_H */ /*************************************************************************** * $RCSfile: ktau_timer.h,v $ $Author: anataraj $ * $Revision: 1.2 $ $Date: 2007/04/19 03:21:44 $ * POOMA_VERSION_ID: $Id: ktau_timer.h,v 1.2 2007/04/19 03:21:44 anataraj Exp $ ***************************************************************************/ tau-2.16.4/include/Profile/pcxx_ansi.h000066400000000000000000000013431062343042700175670ustar00rootroot00000000000000/*********************************************************************/ /* pC++/Sage++ Copyright (C) 1994 */ /* Indiana University University of Oregon University of Rennes */ /*********************************************************************/ /* * pcxx_ansi.h: ANSI C compatibility macros * * (c) 1994 Jerry Manic Saftware * * Version 3.0 */ #ifndef __PCXX_ANSI_H__ #define __PCXX_ANSI_H__ #if defined (__cplusplus) || defined (__STDC__) || defined (_AIX) || (defined (__mips) && defined (_SYSTYPE_SVR4)) #define SIGNAL_TYPE void #define SIGNAL_ARG_TYPE int #else /* Not ANSI C. */ #define SIGNAL_TYPE int #define SIGNAL_ARG_TYPE #endif /* ANSI C */ #endif /* __PCXX_ANSI_H__ */ tau-2.16.4/include/Profile/pcxx_events.h000066400000000000000000000130301062343042700201350ustar00rootroot00000000000000/*********************************************************************/ /* pC++/Sage++ Copyright (C) 1994 */ /* Indiana University University of Oregon University of Rennes */ /*********************************************************************/ /* * * pcxx_events.h: simple SW monitor routines * * (c) 1994 Jerry Manic Saftware * * Version 3.0 */ # ifndef __PCXX_EVENTS__H__ # define __PCXX_EVENTS__H__ #include "tau_types.h" # include "pcxx_ansi.h" # if !defined(__ksr__) || defined(UNIPROC) || defined(__PCXX__) || defined(_MASTER_SLAVE_) # define __private # endif /* -- event classes ---------------------- */ extern __private unsigned long int pcxx_ev_class; /* Ariadne debugger is currently supported on sgimp and mpi architectures. Extend this list as other architectures are added */ #if defined(__MPI__) || defined(__SGIMP__) #define ARIADNE_SUPPORT #endif #ifdef ARIADNE_SUPPORT extern int aa_poll_count; /* For Ariadne - defined in tulip/mpi/src/KernelCom.c */ #endif /* ARIADNE_SUPPORT */ # ifdef TRACING_ON # ifdef PCXX_EVENT_SRC # include "pcxx_machines.h" /* -- pcxx tracer events ------------------- */ # define PCXX_EV_INIT 60000 # define PCXX_EV_FLUSH_ENTER 60001 # define PCXX_EV_FLUSH_EXIT 60002 # define PCXX_EV_CLOSE 60003 # define PCXX_EV_INITM 60004 # define PCXX_EV_WALL_CLOCK 60005 # define PCXX_EV_CONT_EVENT 60006 # define TAU_MESSAGE_SEND 60007 # define TAU_MESSAGE_RECV 60008 /* -- the following two events are only the ----- */ /* -- base numbers, actually both represent ----- */ /* -- 64 events (60[1234]00 to 60[1234]64) ----- */ # define PCXX_WTIMER_CLEAR 60199 # define PCXX_WTIMER_START 60100 # define PCXX_WTIMER_STOP 60200 # define PCXX_UTIMER_CLEAR 60399 # define PCXX_UTIMER_START 60300 # define PCXX_UTIMER_STOP 60400 # ifndef PCXX_BUFSIZE # define PCXX_BUFSIZE 65536 /* -- 64 K -- */ # endif /* -- event classes ----------------------------- */ # ifndef PCXX_EC_NULL # define PCXX_EC_NULL 0x00000000 # define PCXX_EC_TRACER 0x00000001 # define PCXX_EC_TIMER 0x00000002 # define PCXX_EC_ALL 0xFFFFFFFF # endif # endif /* PCXX_EVENT_SRC */ # ifdef __cplusplus extern "C" { # endif /* __cplusplus */ # ifdef PCXX_EVENT_SRC /* -- event record buffer descriptor ------------------------- */ typedef struct { x_int32 ev; /* -- event id -- */ x_uint16 nid; /* -- node id -- */ x_uint16 tid; /* -- thread id -- */ x_int64 par; /* -- event parameter -- */ /**** CHANGED long int to long long for 8 bytes. *******/ x_uint64 ti; /* -- time [us]? -- */ /**** CHANGED unsigned long int to unsigned long long for 8 bytes. *******/ } PCXX_EV; /* -- pointer to next free element of event record buffer ---- */ extern __private PCXX_EV *pcxx_ev_ptr; /* -- pointer to last available element of event record buffer */ extern __private PCXX_EV *pcxx_ev_max; # endif /* PCXX_EVENT_SRC */ /* -- pcxx monitor routines ------------------------------------ */ # define PCXX_EVENT(c,e,p) \ if (pcxx_ev_class&(c)) pcxx_Event(e,p) # define PCXX_LONG_EVENT(c,e,l,p) \ if (pcxx_ev_class&(c)) pcxx_LongEvent(e,l,p) # ifdef __cplusplus void pcxx_EvInit (char *n); void pcxx_Event (long int e, x_int64 p); void pcxx_LongEvent (long int e, int l, char *p); void pcxx_EvClose (); void pcxx_EvFlush (); /* New tracing interface */ int TraceEvInit(int tid); void TraceUnInitialize(int tid); void TraceReinitialize(int oldid, int newid, int tid); void TraceEventOnly(long int ev, x_int64 par, int tid); void TraceEvFlush(int tid); void TraceEvent(long int ev, x_int64 par, int tid, x_uint64 ts = 0L, int use_ts = 0); void TraceEvClose(int tid); void SetFlushEvents(int tid); int GetFlushEvents(int tid); } # else extern void pcxx_EvInit(char *n); extern void pcxx_Event(long int e, long long p); extern void pcxx_LongEvent(long int e, int l, char *p); extern void pcxx_EvClose (); extern void pcxx_EvFlush (); # endif /* __cplusplus */ # else # define PCXX_EVENT(c, e, p) # define PCXX_LONG_EVENT(c, e, l, p) # define pcxx_EvInit(n) # define pcxx_Event(e, p) # define pcxx_LongEvent(e, l, p) # define pcxx_EvClose() # define pcxx_EvFlush() # define pcxx_AriadneTrace(ec, ev, pid, oid, rwtype, mtag, par) # endif /* TRACING_ON */ # ifdef TRACING_ON /* for Ariadne */ # ifdef ARIADNE_SUPPORT # ifdef __cplusplus extern "C" void pcxx_AriadneTrace (long int event_class, long int event, int pid, int oid, int rwtype, int mtag, int parameter); # else /* __cplusplus */ extern void pcxx_AriadneTrace (long int event_class, long int event, int pid, int oid, int rwtype, int mtag, int parameter); # endif /* __cplusplus */ # else /* Ariadne is not supported */ # define pcxx_AriadneTrace(ec, ev, pid, oid, rwtype, mtag, par) /* define it as blank - like its done above when tracing is not on */ # endif /* ARIADNE_SUPPORT */ # endif /* TRACING_ON */ # endif /* !__PCXX_EVENTS_H__ */ tau-2.16.4/include/Profile/pcxx_machines.h000066400000000000000000000055241062343042700204310ustar00rootroot00000000000000/*********************************************************************/ /* pC++/Sage++ Copyright (C) 1994 */ /* Indiana University University of Oregon University of Rennes */ /*********************************************************************/ /* * pcxx_machines.h: machine specific definitions * * Bernd Mohr * */ /* Support for _SMRTS_ added (Pete Beckman) for shared memory */ /* machines. _SMRTS_ is undefined at the end if UNIPROC or __PVM__, */ /* or __MPI__ is defined */ # ifndef __PCXX_MACHINES_H__ # define __PCXX_MACHINES_H__ # if defined (butterfly) # define PCXX_MAXPROCS 256 # define PCXX_MALLOC malloc # define PCXX_SUGGESTED_MSG_SIZE -1 # define _SMRTS_ # else # if defined (__ksr__) # define PCXX_MAXPROCS 1088 # define PCXX_MALLOC malloc # define PCXX_SUGGESTED_MSG_SIZE -1 # define _SMRTS_ # else # if defined(__SGIMP__) # define PCXX_MAXPROCS 4096 # define PCXX_MALLOC malloc # define PCXX_SUGGESTED_MSG_SIZE -1 # define _SMRTS_ # else # if defined(_SEQUENT_) || defined(sequent) # define PCXX_MAXPROCS 30 # define PCXX_MALLOC shmalloc # define PCXX_SUGGESTED_MSG_SIZE -1 # define _SMRTS_ # undef SIGSEGV # ifdef __cplusplus extern "C" char *shmalloc(); # else extern char *shmalloc(); # endif # else # if defined(__PARAGON__) # define PCXX_MAXPROCS 1024 # define PCXX_MALLOC malloc # define PCXX_SUGGESTED_MSG_SIZE 16384 # else # if defined(__SP1__) # define PCXX_MAXPROCS 256 # define PCXX_MALLOC malloc # define PCXX_SUGGESTED_MSG_SIZE -1 # else # if defined(CM5) # define PCXX_MAXPROCS 1024 # define PCXX_MALLOC malloc # define PCXX_SUGGESTED_MSG_SIZE 16384 # else # if defined(__MEIKO__) # define PCXX_MAXPROCS 64 # define PCXX_MALLOC malloc # define PCXX_SUGGESTED_MSG_SIZE 16384 # else # if defined(__PVM__) # define PCXX_MAXPROCS 256 # define PCXX_MALLOC malloc # define PCXX_SUGGESTED_MSG_SIZE 8192 # else # if defined(__T3D__) # define PCXX_MAXPROCS 256 # define PCXX_MALLOC malloc # define PCXX_SUGGESTED_MSG_SIZE -1 # else # if defined(_CRAYT3E) # define PCXX_MAXPROCS 512 # define PCXX_MALLOC malloc # define PCXX_SUGGESTED_MSG_SIZE -1 # else # define PCXX_MAXPROCS 4096 # define PCXX_MALLOC malloc # define PCXX_SUGGESTED_MSG_SIZE -1 # endif # endif # endif # endif # endif # endif # endif # endif # endif # endif # endif # ifndef PCXX_MYNODE # ifdef UNIPROC # define PCXX_MYNODE 0 # else # ifndef __ksr__ # define __private # endif # define PCXX_MYNODE RtsLayer::myNode() __private extern int MyNodeNumber; # endif # define PCXX_MYTHREAD 0 # endif # ifdef UNIPROC # ifdef _SMRTS_ # undef _SMRTS_ # endif # endif # ifdef __PVM__ # ifdef _SMRTS_ # undef _SMRTS_ # endif # endif # ifdef __MPI__ # ifdef _SMRTS_ # undef _SMRTS_ # endif # endif # endif tau-2.16.4/include/Profile/tau_types.h000066400000000000000000000030721062343042700176110ustar00rootroot00000000000000/**************************************************************************** ** TAU Portable Profiling Package ** ** http://www.cs.uoregon.edu/research/paracomp/tau ** ***************************************************************************** ** Copyright 2005 ** ** Department of Computer and Information Science, University of Oregon ** ** Advanced Computing Laboratory, Los Alamos National Laboratory ** ** Research Center Juelich, Germany ** ****************************************************************************/ /**************************************************************************** ** File : tau_types.h ** ** Description : An attempt to consolidate type size (primarily ** ** for traces) ** ** Author : Alan Morris ** ** Contact : amorris@cs.uoregon.edu ** ****************************************************************************/ #ifndef _TAU_TYPES_H_ #define _TAU_TYPES_H_ #ifdef TAU_WINDOWS typedef char x_int8; typedef short x_int16; typedef int x_int32; typedef __int64 x_int64; typedef unsigned char x_uint8; typedef unsigned short x_uint16; typedef unsigned int x_uint32; typedef unsigned __int64 x_uint64; #else typedef char x_int8; typedef short x_int16; typedef int x_int32; typedef long long x_int64; typedef unsigned char x_uint8; typedef unsigned short x_uint16; typedef unsigned int x_uint32; typedef unsigned long long x_uint64; #endif #endif /* _TAU_TYPES_H_ */ tau-2.16.4/include/Profile/vt_inttypes.h000066400000000000000000000025011062343042700201600ustar00rootroot00000000000000/** * VampirTrace * http://www.tu-dresden.de/zih/vampirtrace * * Copyright (c) 2005-2006, ZIH, TU Dresden, Federal Republic of Germany * * Copyright (c) 1998-2005, Forschungszentrum Juelich GmbH, Federal * Republic of Germany * * See the file COPYRIGHT in the package base directory for details **/ #ifndef _VT_INTTYPES_H #define _VT_INTTYPES_H /* define convenient integer types in case neither 'inttypes.h' nor 'stdint.h' is available on a platform, e.g. for NEC SX6 */ #if HAVE_CONFIG_H # include #endif #if defined HAVE_STDINT_H # include #elif defined HAVE_INTTYPES_H # include #else /* HAVE_INTTYPES_H || HAVE_STDINT_H */ /* Signed. */ typedef signed char int8_t; typedef signed short int int16_t; typedef signed int int32_t; #if SIZEOF_LONG == 8 typedef signed long int int64_t; #else /* SIZEOF_LONG */ typedef signed long long int int64_t; #endif /* SIZEOF_LONG */ /* Unsigned. */ typedef unsigned char uint8_t; typedef unsigned short int uint16_t; typedef unsigned int uint32_t; #if SIZEOF_LONG == 8 typedef unsigned long int uint64_t; #else /* SIZEOF_LONG */ typedef unsigned long long int uint64_t; #endif /* SIZEOF_LONG */ #endif /* HAVE_INTTYPES_H || HAVE_STDINT_H */ #endif /* _VT_INTTYPES_H */ tau-2.16.4/include/TAU.h000066400000000000000000000124171062343042700146300ustar00rootroot00000000000000/**************************************************************************** ** TAU Portable Profiling Package ** ** http://www.cs.uoregon.edu/research/tau ** ***************************************************************************** ** Copyright 1997 ** ** Department of Computer and Information Science, University of Oregon ** ** Advanced Computing Laboratory, Los Alamos National Laboratory ** ****************************************************************************/ /*************************************************************************** ** File : TAU.h ** ** Description : TAU Profiling Package ** ** Author : Sameer Shende ** ** Contact : sameer@cs.uoregon.edu ** ** Documentation : See http://www.cs.uoregon.edu/research/tau ** ***************************************************************************/ #ifndef _TAU_H_ #define _TAU_H_ #ifndef TAU_DISABLE_API #ifdef __cplusplus extern "C" { #endif extern void Tau_start(char *name); extern void Tau_stop(char *name); #ifdef __cplusplus } #endif /* define the easy to use API */ #define TAU_START(name) Tau_start(name) #define TAU_STOP(name) Tau_stop(name) #else /* TAU_DISABLE_API is defined! Define these two to nulls */ #define TAU_START(name) #define TAU_STOP(name) #endif /* TAU_DISABLE_API */ #if (defined(PROFILING_ON) || defined(TRACING_ON)) #include #else /* Otherwise, declare the macros as null. TAU API follows: */ #define TYPE_STRING(profileString, str) #define PROFILED_BLOCK(name, type) #define TAU_TYPE_STRING(profileString, str) #define TAU_PROFILE(name, type, group) #define TAU_PROFILE_TIMER(var, name, type, group) #define TAU_PROFILE_START(var) #define TAU_PROFILE_STOP(var) #define TAU_PROFILE_STMT(stmt) #define TAU_PROFILE_EXIT(msg) #define TAU_PROFILE_INIT(argc, argv) #define TAU_PROFILE_SET_NODE(node) #define TAU_PROFILE_SET_CONTEXT(context) #define TAU_PROFILE_SET_GROUP_NAME(newname) #define TAU_PROFILE_TIMER_SET_GROUP_NAME(t, newname) #define TAU_PROFILE_CALLSTACK() #define TAU_DB_DUMP() #define TAU_DB_PURGE() #define TAU_REGISTER_CONTEXT_EVENT(event, name) #define TAU_CONTEXT_EVENT(event, data) #define TAU_DISABLE_CONTEXT_EVENT(event) #define TAU_ENABLE_CONTEXT_EVENT(event) #define TAU_REGISTER_EVENT(event, name) #define TAU_EVENT(event, data) #define TAU_EVENT_DISABLE_MIN(event) #define TAU_EVENT_DISABLE_MAX(event) #define TAU_EVENT_DISABLE_MEAN(event) #define TAU_EVENT_DISABLE_STDDEV(event) #define TAU_REPORT_STATISTICS() #define TAU_REPORT_THREAD_STATISTICS() #define TAU_REGISTER_THREAD() #define TAU_REGISTER_FORK(id, op) #define TAU_ENABLE_INSTRUMENTATION() #define TAU_DISABLE_INSTRUMENTATION() #define TAU_ENABLE_GROUP(group) #define TAU_DISABLE_GROUP(group) #define TAU_ENABLE_GROUP_NAME(group) #define TAU_DISABLE_GROUP_NAME(group) #define TAU_ENABLE_ALL_GROUPS() #define TAU_DISABLE_ALL_GROUPS() #define TAU_TRACK_MEMORY() #define TAU_TRACK_MEMORY_HERE() #define TAU_ENABLE_TRACKING_MEMORY() #define TAU_DISABLE_TRACKING_MEMORY() #define TAU_TRACK_MEMORY() #define TAU_TRACK_MEMORY_HERE() #define TAU_ENABLE_TRACKING_MUSE_EVENTS() #define TAU_DISABLE_TRACKING_MUSE_EVENTS() #define TAU_TRACK_MUSE_EVENTS() #define TAU_SET_INTERRUPT_INTERVAL(value) #define CT(obj) #define TAU_TRACE_SENDMSG(type, destination, length) #define TAU_TRACE_RECVMSG(type, source, length) #define TAU_MAPPING(stmt, group) stmt #define TAU_MAPPING_OBJECT(FuncInfoVar) #define TAU_MAPPING_LINK(FuncInfoVar, Group) #define TAU_MAPPING_PROFILE(FuncInfoVar) #define TAU_MAPPING_CREATE(name, type, key, groupname, tid) #define TAU_MAPPING_PROFILE_TIMER(Timer, FuncInfoVar, tid) #define TAU_MAPPING_TIMER_CREATE(t, name, type, gr, group_name) #define TAU_MAPPING_PROFILE_START(Timer, tid) #define TAU_MAPPING_PROFILE_STOP(tid) #define TAU_MAPPING_PROFILE_EXIT(msg, tid) #define TAU_MAPPING_DB_DUMP(tid) #define TAU_MAPPING_DB_PURGE(tid) #define TAU_MAPPING_PROFILE_SET_NODE(node, tid) #define TAU_MAPPING_PROFILE_SET_GROUP_NAME(timer, name) #define TAU_PROFILE_TIMER_SET_NAME(t, newname) #define TAU_PROFILE_TIMER_SET_TYPE(t, newname) #define TAU_PROFILE_TIMER_SET_GROUP(t, id) #define TAU_MAPPING_PROFILE_SET_NAME(timer, name) #define TAU_MAPPING_PROFILE_SET_TYPE(timer, name) #define TAU_MAPPING_PROFILE_SET_GROUP(timer, id) #define TAU_MAPPING_PROFILE_GET_GROUP_NAME(timer) #define TAU_MAPPING_PROFILE_GET_GROUP(timer) #define TAU_MAPPING_PROFILE_GET_NAME(timer) #define TAU_MAPPING_PROFILE_GET_TYPE(timer) #define TAU_PHASE(name, type, group) #define TAU_PHASE_CREATE_STATIC(var, name, type, group) #define TAU_PHASE_CREATE_DYNAMIC(var, name, type, group) #define TAU_PHASE_START(var) #define TAU_PHASE_STOP(var) #define TAU_GLOBAL_PHASE(timer, name, type, group) #define TAU_GLOBAL_PHASE_START(timer) #define TAU_GLOBAL_PHASE_STOP(timer) #define TAU_GLOBAL_PHASE_EXTERNAL(timer) #define TAU_GLOBAL_TIMER(timer, name, type, group) #define TAU_GLOBAL_TIMER_EXTERNAL(timer) #define TAU_GLOBAL_TIMER_START(timer) #define TAU_GLOBAL_TIMER_STOP() #define TAU_PROFILE_PARAM1L(a,b) #define TAU_NEW(expr, size) expr #define TAU_DELETE(expr, variable) expr #define TAU_PROFILE_SNAPSHOT(name) #define TAU_PROFILE_SNAPSHOT_1L(name, expr) #define TAU_METADATA(name, value) #endif /* PROFILING_ON || TRACING_ON */ #endif /* _TAU_H_ */ tau-2.16.4/include/TAU_tf.h000066400000000000000000000131661062343042700153230ustar00rootroot00000000000000/**************************************************************************** ** TAU Portable Profiling Package ** ** http://www.cs.uoregon.edu/research/paracomp/tau ** ***************************************************************************** ** Copyright 2003 ** ** Department of Computer and Information Science, University of Oregon ** ** Advanced Computing Laboratory, Los Alamos National Laboratory ** ** Research Center Juelich, Germany ** ****************************************************************************/ /*************************************************************************** ** File : TAU_tf.h ** ** Description : TAU trace format reader library C, C++ API ** ** Author : Sameer Shende, Holger Brunst ** ** Contact : sameer@cs.uoregon.edu ** ***************************************************************************/ #ifndef _TAU_TF_H_ #define _TAU_TF_H_ #include "TAU_tf_writer.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /* callbacks */ typedef int (*Ttf_DefClkPeriodT)( void* userData, double clkPeriod ); typedef int (*Ttf_DefThreadT)( void *userData, unsigned int nodeToken, unsigned int threadToken, const char *threadName ); typedef int (*Ttf_EndTraceT)( void *userData, unsigned int nodeToken, unsigned int threadToken); typedef int (*Ttf_DefStateGroupT)( void *userData, unsigned int stateGroupToken, const char *stateGroupName ); typedef int (*Ttf_DefStateT)( void *userData, unsigned int stateToken, const char *stateName, unsigned int stateGroupToken ); typedef int (*Ttf_EnterStateT)( void* userData, double time, unsigned int nodeToken, unsigned int threadToken, unsigned int stateToken ); typedef int (*Ttf_LeaveStateT)( void* userData, double time, unsigned int nodeToken, unsigned int threadToken, unsigned int stateToken ); typedef int (*Ttf_SendMessageT)( void* userData, double time, unsigned int sourceNodeToken, unsigned int sourceThreadToken, unsigned int destinationNodeToken, unsigned int destinationThreadToken, unsigned int messageSize, unsigned int messageTag, unsigned int messageComm ); typedef int (*Ttf_RecvMessageT)( void* userData, double time, unsigned int sourceNodeToken, unsigned int sourceThreadToken, unsigned int destinationNodeToken, unsigned int destinationThreadToken, unsigned int messageSize, unsigned int messageTag, unsigned int messageComm ); typedef int (*Ttf_DefUserEventT)( void *userData, unsigned int userEventToken, const char *userEventName, int monotonicallyIncreasing ); typedef int (*Ttf_EventTriggerT)( void *userData, double time, unsigned int nodeToken, unsigned int threadToken, unsigned int userEventToken, /* double userEventValue*/ long long userEventValue ); /* callback table */ typedef struct Ttf_Callbacks { void* UserData; Ttf_DefClkPeriodT DefClkPeriod; Ttf_DefThreadT DefThread; Ttf_DefStateGroupT DefStateGroup; Ttf_DefStateT DefState; Ttf_EndTraceT EndTrace; Ttf_EnterStateT EnterState; Ttf_LeaveStateT LeaveState; Ttf_SendMessageT SendMessage; Ttf_RecvMessageT RecvMessage; Ttf_DefUserEventT DefUserEvent; Ttf_EventTriggerT EventTrigger; } Ttf_CallbacksT; /* open a trace file for reading */ Ttf_FileHandleT Ttf_OpenFileForInput( const char *name , const char *edf); void Ttf_SetSubtractFirstTimestamp( Ttf_FileHandleT handle, int value ); void Ttf_SetNonBlocking( Ttf_FileHandleT handle, int value ); /* Seek to an absolute event position. * A negative position indicates to start from the tail of the event stream. * Returns the position if successful or 0 if an error occured */ int Ttf_AbsSeek( Ttf_FileHandleT handle, int eventPosition ); /* seek to a event position relative to the current position (just for completeness!) * Returns the position if successful or 0 if an error occured */ int Ttf_RelSeek( Ttf_FileHandleT handle, int plusMinusNumEvents ); /* read n events and call appropriate handlers. * Returns the number of records read (can be 0). * Returns a -1 value when an error takes place. Check errno */ int Ttf_ReadNumEvents( Ttf_FileHandleT fileHandle, Ttf_CallbacksT callbacks, int numberOfEvents ); /* close a trace file */ Ttf_FileHandleT Ttf_CloseFile( Ttf_FileHandleT fileHandle ); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* _TAU_TF_H_ */ /*************************************************************************** * $RCSfile: TAU_tf.h,v $ $Author: wspear $ * $Revision: 1.7 $ $Date: 2005/11/21 22:45:36 $ * TAU_VERSION_ID: $Id: TAU_tf.h,v 1.7 2005/11/21 22:45:36 wspear Exp $ ***************************************************************************/ tau-2.16.4/include/TAU_tf_writer.h000066400000000000000000000067111062343042700167150ustar00rootroot00000000000000/***************************************************************************** ** TAU Portable Profiling Package ** ** http://www.cs.uoregon.edu/research/paracomp/tau ** ***************************************************************************** ** Copyright 2005 ** ** Department of Computer and Information Science, University of Oregon ** ** Advanced Computing Laboratory, Los Alamos National Laboratory ** ** Research Center Juelich, Germany ** ****************************************************************************/ /***************************************************************************** ** File : TAU_tf_writer.cpp ** ** Description : TAU trace format writer library C, C++ API ** ** Author : Alan Morris ** ** Contact : amorris@cs.uoregon.edu ** ****************************************************************************/ #ifndef _TAU_TF_WRITER_H_ #define _TAU_TF_WRITER_H_ #include #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /* TAU file handler */ typedef void* Ttf_FileHandleT; /* open a trace file for reading */ Ttf_FileHandleT Ttf_OpenFileForOutput( const char *name, const char *edf); int Ttf_DefClkPeriod(Ttf_FileHandleT file, double clkPeriod); int Ttf_DefThread(Ttf_FileHandleT file, unsigned int nodeToken, unsigned int threadToken, const char *threadName); int Ttf_EnterState(Ttf_FileHandleT file, x_uint64 time, unsigned int nodeToken, unsigned int threadToken, unsigned int stateToken); int Ttf_LeaveState(Ttf_FileHandleT file, x_uint64 time, unsigned int nodeToken, unsigned int threadToken, unsigned int stateToken); int Ttf_DefStateGroup(Ttf_FileHandleT file, const char *stateGroupName, unsigned int stateGroupToken); int Ttf_DefState(Ttf_FileHandleT file, unsigned int stateToken, const char *stateName, unsigned int stateGroupToken); int Ttf_SendMessage(Ttf_FileHandleT file, double time, unsigned int sourceNodeToken, unsigned int sourceThreadToken, unsigned int destinationNodeToken, unsigned int destinationThreadToken, unsigned int messageSize, unsigned int messageTag, unsigned int messageComm); int Ttf_RecvMessage(Ttf_FileHandleT file, double time, unsigned int sourceNodeToken, unsigned int sourceThreadToken, unsigned int destinationNodeToken, unsigned int destinationThreadToken, unsigned int messageSize, unsigned int messageTag, unsigned int messageComm); int Ttf_DefUserEvent(Ttf_FileHandleT file, unsigned int userEventToken, const char *userEventName, int monotonicallyIncreasing); int Ttf_EventTrigger(Ttf_FileHandleT file, double time, unsigned int nodeToken, unsigned int threadToken, unsigned int userEventToken, double userEventValue ); int Ttf_FlushTrace(Ttf_FileHandleT file); int Ttf_CloseOutputFile(Ttf_FileHandleT file); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* _TAU_TF_WRITERH_ */ /*************************************************************************** * $RCSfile: TAU_tf_writer.h,v $ $Author: amorris $ * $Revision: 1.3 $ $Date: 2005/10/11 16:18:07 $ * TAU_VERSION_ID: $Id: TAU_tf_writer.h,v 1.3 2005/10/11 16:18:07 amorris Exp $ ***************************************************************************/ tau-2.16.4/include/makefiles/000077500000000000000000000000001062343042700157615ustar00rootroot00000000000000tau-2.16.4/include/makefiles/GNUmakefile-alpha000066400000000000000000000005061062343042700211170ustar00rootroot00000000000000LSMARTS = -L$(TULIPDIR)/lib -lsmarts -L/usr/lib -lpthread INCLUDE = -I. -I../../include -I../../Smartslib CXX = cxx CXXFLAGS = -O -I/srl/ATOM/include $(INCLUDE) -using_std -I../../machine-specific/sun4/CUT/lib CFLAGS = -g3 -O -I/srl/ATOM/include $(INCLUDE) LIBS = -L/usr/lib -lpthread LIB = ../../Smartslib/libsmarts.a tau-2.16.4/include/makefiles/GNUmakefile-i386-linux000066400000000000000000000004421062343042700216570ustar00rootroot00000000000000LSMARTS = -L$(TULIPDIR)/lib -lsmarts INCLUDE = -I. -I../../include -I../../Smartslib CXX = g++ CXXFLAGS = -g3 -D_REENTRANT -static $(INCLUDE) -DUSE_PTHREADS -DLINUX CFLAGS = -g3 -D_RENTRANT -static -O $(INCLUDE) -DUSE_PTHREADS -DLINUX LIBS = LIB = ../../Smartslib/libsmarts.a tau-2.16.4/include/makefiles/GNUmakefile-iris4d000066400000000000000000000000571062343042700212310ustar00rootroot00000000000000LSMARTS = -L$(TULIPDIR)/lib -lsmarts -lfetchop tau-2.16.4/include/makefiles/GNUmakefile-sun4000066400000000000000000000005251062343042700207240ustar00rootroot00000000000000LSMARTS = -L$(TULIPDIR)/lib -lsmarts -lthread INCLUDE = -I. -I../../include -I../../Smartslib -I../../machine-specific/sun4/STL -I../../machine-specific/sun4/CUT/lib CXX = CC CXXFLAGS = $(INCLUDE) -g -DUSE_PTHREADS -DUSECUT -pta -xar #-pta -ptv -Bstatic CFLAGS = -O $(INCLUDE) -g LIBS = -lthread LIB = ../../Smartslib/libsmarts.a tau-2.16.4/include/makefiles/PCLMakefile.stub000066400000000000000000000035611062343042700207410ustar00rootroot00000000000000#=============================================================================== # # Makefile for the Performance Counter Library # You need GNU make!! # # make : make library and compile test program # make clean : clean up directories # make install : installs header file and library # #=============================================================================== # # get system name (uname) SYSTEM = $(shell uname) MACHINE = $(shell $(TAUROOT)/utils/archfind) # special case: adopt the system name for your CRAY T3E here!!! ifeq ($(MACHINE),t3e) SYSTEM = CRAY endif PCL_INCLUDE_DIR = -I$(PCLDIR)/machines/$(TARGET_SYSTEM) #=============================================================================== # System settings # DEC Alpha, Digital Unix 4.0x ifeq ($(SYSTEM),OSF1) TARGET_SYSTEM = ALPHA_DEC CPU_NAME = alpha LOADLIBS = -L$(PCLDIR)/bin/$(CPU_NAME) -lpcl -lmach endif # Cray T3E ifeq ($(SYSTEM),CRAY) TARGET_SYSTEM = ALPHA_CRAY CPU_NAME = t3e ADD_FILE_DIR = $(PCLDIR)/machines/ALPHA_CRAY/perftest ADD_FILES = $(ADD_FILE_DIR)/perfctrl.o $(ADD_FILE_DIR)/perfonoff.o LOADLIBS = -L$(PCLDIR)/bin/$(CPU_NAME) -lpcl endif # SGI IRIX 6.x ifeq ($(SYSTEM),IRIX64) TARGET_SYSTEM = MIPS CPU_NAME = mips-sgi-irix6.5 LOADLIBS = -L$(PCLDIR)/bin/$(CPU_NAME) -lpcl -lperfex endif # Sun Solaris 2.x ifeq ($(SYSTEM),SunOS) TARGET_SYSTEM = SPARC CPU_NAME = sparc LOADLIBS = -L$(PCLDIR)/bin/$(CPU_NAME) -lpcl -lperfmon endif # IBM AIX 4.x ifeq ($(SYSTEM),AIX) TARGET_SYSTEM = POWERPC CPU_NAME = power LOADLIBS = -L$(PCLDIR)/bin/$(CPU_NAME) -lpcl /usr/lib/PMshrsub.a endif # Linux 2.0.x/2.1.x ifeq ($(SYSTEM),Linux) TARGET_SYSTEM = PENTIUM_LINUX CPU_NAME = i386 LOADLIBS = -L$(PCLDIR)/bin/$(CPU_NAME) -lpcl endif # NT # not yet done ifeq ($(SYSTEM),NT) TARGET_SYSTEM = PENTIUM_NT CPU_NAME = i386_nt endif #=============================================================================== tau-2.16.4/include/makefiles/README000066400000000000000000000000241062343042700166350ustar00rootroot00000000000000This is a test file tau-2.16.4/installtau000077500000000000000000000351241062343042700145110ustar00rootroot00000000000000#!/bin/sh #Variables pdt=no pdtcomp=no dyninst=no arch=no archdir=none cc=no cxx=no fortran=no mpiopts= mpi=no perf=no perfincdir= perflibdir= perflibrary= mpiinc=no mpilib=no tag=no tagopt= pdtcxxopt= pdtcxxarg= vtf=no otf=no vampirtrace=no vptopt= vtfopt= slogopt= useropt=no papi=no opari=no epilog=no epilogopt= mpilibrary=no tauprefix=unknown tauexecprefix=unknown # PARSE COMMAND LINE SWITCHES ############################################################### for arg in "$@"; do case $arg in -arch=*) arch=yes archdir=`echo $arg | sed -e 's/-arch=//'` shift ;; -fortran=*) fortran=yes fortranspec=`echo $arg | sed -e 's/-fortran=//'` shift ;; -cc=*) cc=yes ccspec=`echo $arg | sed -e 's/-cc=//'` shift ;; -c++=*) cxx=yes cxxspec=`echo $arg | sed -e 's/-c++=//'` shift ;; -useropt=*) useropt=yes useroptspec=`echo $arg | sed -e 's/-useropt=//' -e 's/ /#/g'` shift ;; -papi=*) papi=yes papidir=`echo $arg | sed -e 's/-papi=//'` shift ;; -perfinc=*) perf=yes perfincdir=`echo $arg | sed -e 's/-perfinc=//'` if [ ! -d $perfincdir ] then echo "Error: Cannot access PERF include directory $perfincdir" exit 1 fi perfopts="$perfopts $arg" shift ;; -perflib=*) perf=yes perflibdir=`echo $arg | sed -e 's/-perflib=//'` if [ ! -d $perflibdir ] then echo "Error: Cannot access PERF lib directory $perflibdir" exit 1 fi perfopts="$perfopts $arg" shift ;; -perflibrary=*) perf=yes perflibrary=`echo $arg | sed -e 's/-perflibrary=//' -e 's/ /#/g'` perfopts="$perfopts -perflibrary=$perflibrary" shift ;; -dyninst=*) dyninst=yes dyninstdir=`echo $arg | sed -e 's/-dyninst=//'` shift ;; -opari=*) opari=yes oparidir=`echo $arg | sed -e 's/-opari=//'` openmp=yes shift ;; -epilog*) epilog=yes epilogopt="$epilogopt $arg" shift ;; -mpiinc=*) mpiinc=yes mpiincdir=`echo $arg | sed -e 's/-mpiinc=//' -e 's/ /#/g'` shift ;; -mpilib=*) mpilib=yes mpilibdir=`echo $arg | sed -e 's/-mpilib=//'` shift ;; -mpilibrary=*) mpilibrary=yes mpilibraryspec=`echo $arg | sed -e 's/-mpilibrary=//' -e 's/ /#/g'` mpiopt=-mpilibrary="$mpilibraryspec" shift ;; -mpi) mpi=yes shift ;; -nocomm) commopt=-nocomm shift ;; -slog2) slogopt=-slog2 shift ;; -slog2=*) slogdir=`echo $arg | sed -e 's/-slog2=//'` slogopt=-slog2=$slogdir shift ;; -pdt=*) pdt=yes pdtdir=`echo $arg | sed -e 's/-pdt=//'` shift ;; -pdt_c++=*) pdtcxx=yes pdtcxxarg=`echo $arg | sed -e 's/-pdt_c++=//'` pdtcxxopt=-pdt_c++=$pdtcxxarg shift ;; -tag=*) tag=yes tautag=`echo $arg | sed -e 's/-tag=//'` tagopt=-tag=$tautag shift ;; -pdtcompdir=*) pdtcomp=yes pdtcompdir=`echo $arg | sed -e 's/-pdtcompdir=//'` shift ;; -prefix=*) tauprefix=`echo $arg | sed -e 's/-prefix=//' -e 's/ /_/g'` shift ;; -exec-prefix=*) tauexecprefix=`echo $arg | sed -e 's/-exec-prefix=//' -e 's/ /_/g'` shift ;; -vtf=*) vtf=yes vtfdir=`echo $arg | sed -e 's/-vtf=//'` vtfopt=-vtf=$vtfdir shift ;; -vampirtrace*) vampirtrace=yes vptopt="$vptopt $arg" shift ;; -otf=*) otf=yes otfdir=`echo $arg | sed -e 's/-otf=//'` otfopt=-otf=$otfdir shift ;; -help) echo "TAU Configuration Utility " echo "***********************************************************************" echo "Usage: installtau [OPTIONS]" echo " where [OPTIONS] are:" echo "-arch= " echo "-fortran= " echo "-cc= " echo "-c++= " echo "-useropt= " echo "-pdt= " echo "-pdtcompdir= " echo "-pdt_c++= " echo "-papi= " echo "-vtf= " echo "-otf= " echo "-slog2= (for external slog2 dir)" echo "-slog2 (for using slog2 bundled with TAU)" echo "-dyninst= " echo "-mpiinc= " echo "-mpilib= " echo "-mpilibrary= " echo "-perfinc= " echo "-perflib= " echo "-perflibrary= " echo "-mpi" echo "-tag= " echo "-nocomm" echo "-opari= " echo "-epilog= " echo "-epiloginc= (/include default) " echo "-epilogbin= (/bin default) " echo "-epiloglib= (/lib default) " echo "-prefix= " echo "-exec-prefix= " shift exit ;; *) echo "ERROR: Command line switch \`$arg' not recognized" 1>&2 exit 1 ;; esac done # Take care of MPI options if [ $mpi = yes ] then mpiopts="$mpiopts -mpi" fi if [ $mpiinc = yes ] then mpiopts="$mpiopts -mpiinc=$mpiincdir" fi if [ $mpilib = yes ] then mpiopts="$mpiopts -mpilib=$mpilibdir" fi if [ $mpilibrary = yes ] then mpiopts="$mpiopts -mpilibrary=$mpilibraryspec" fi # Add tauprefix to tagopt if [ $tauprefix != unknown ] then tagopt="$tagopt -prefix=$tauprefix" fi # Add exec-prefix to tagopt if [ $tauexecprefix != unknown ] then tagopt="$tagopt -exec-prefix=$tauexecprefix" fi # Take care of wish version prompt echo " " > wishver # Now we compose the arguments if [ $pdt = yes ] then pdtopt="-pdt=$pdtdir $pdtcxxopt" if [ $pdtcomp = yes ] then pdtopt="-pdt=$pdtdir $pdtcxxopt -pdtcompdir=$pdtcompdir" fi fi if [ $arch = yes ] then archopt="-arch=$archdir" fi if [ $fortran = yes ] then fortrancompiler="-fortran=$fortranspec" fi if [ $cc = yes ] then ccompiler="-cc=$ccspec" fi if [ $cxx = yes ] then ccompiler="$ccompiler -c++=$cxxspec" fi if [ $useropt = yes ] then useropts="-useropt=$useroptspec" fi # Configure TAU if [ "x$mpiopts" != "x" ] then # Configure all versions with MPI echo "Configuring with ./configure $fortrancompiler $useropts $tagopt $ccompiler $archopt $pdtopt $mpiopts $commopt" ./configure $fortrancompiler $ccompiler $useropts $tagopt $archopt $pdtopt $mpiopts $commopt tau-2.16.4/lang_support/hpc++/cppcgm000077500000000000000000000033051062343042700172130ustar00rootroot00000000000000#!/bin/sh # # A simple filter for hpcxx2dep that outputs the information requested # by the dump flag. # # Kurt Windisch 12/12/96 # Removed the command to get rid of blank lines (Kurt 4/1/97): -e '/^ *$/d' if [ $# -ne 2 ] then echo "usage: $0 [ -dumpcg | -dumpall | -dumptxt | -dumpch | -dumpbdb] depfile" exit 1 fi case $2 in *.dep) case $1 in -dumpcg) sed -e '/^#/d' -e '/^fpos/d' \ -e '/^ctag/d' -e '/^cfile/d' -e '/^csub/d' -e '/^cmem/d' \ -e '/^cpos/d' -e '/^cmpos/d' -e '/^cbase/d' \ -e 's/ @.*$//' $2 ;; -dumpall) sed -e 's/^#//' -e '/^fpos/d' -e '/^fline/d' \ -e '/^ctag/d' -e '/^cfile/d' -e '/^csub/d' -e '/^cmem/d' \ -e '/^cpos/d' -e '/^cmpos/d' -e '/^cbase/d' \ -e 's/ @.*$//' $2 ;; -dumpbdb) sed -e '/^#/d' -e '/^fcalls/d' -e '/^fpos/d' -e '/^fline/d' \ -e '/^fclass/d' -e '/^csub/d' -e '/^cmem/d' \ -e '/^cbase/d' -e '/^cpos/d' -e '/^cmpos/d' \ -e '/^ftype: [a-zA-z0-9]\+ Mem/d' \ -e '/^ftype: [a-zA-z0-9]\+ Ord/d' \ -e 's/ @.*$//' $2 ;; -dumptxt) sed -e '/^#/d' -e '/^fline/d' -e '/^csub/d' -e '/^cmem/d' \ $2 ;; -dumpch) sed -e '/^#/d' -e '/^ftag/d' -e '/^ffile/d' -e '/^fpos/d' \ -e '/^fline/d' -e '/^fcalls/d' -e '/^fclass/d' \ -e '/^ftype/d' -e '/^cfile/d' -e '/^cbase/d' \ -e '/^cpos/d' -e '/^cmpos/d' \ -e '/^[0-9]\+/d' -e 's/ @.*$//' $2 ;; *) echo "$0: unknown option $1" exit 1 ;; esac ;; *) echo "$2: not a valid HPC++ depfile" exit 1 ;; esac exit 0 tau-2.16.4/lang_support/pc++/000077500000000000000000000000001062343042700156435ustar00rootroot00000000000000tau-2.16.4/lang_support/pc++/Makefile000066400000000000000000000025171062343042700173100ustar00rootroot00000000000000####################################################################### ## TAU (C) 1996 ## ## based on TAU/pC++/Sage++ Copyright (C) 1993,1995 ## ## Indiana University University of Oregon University of Rennes ## ####################################################################### ########### Automatically modified by the configure script ############ CONFIG_ARCH=default CONFIG_CC=gcc CONFIG_CXX=g++ PCXX_OPT=-g USER_OPT=-g ####################################################################### ############# Standard Defines ############## CC = $(CONFIG_CC) CXX = $(CONFIG_CXX) INSTALL = /bin/cp SHELL = /bin/sh LSX = .a ############################################# INSTALLDEST = ../../bin/$(CONFIG_ARCH) SUBDIR1 = breezy cgm SUBDIR = ${SUBDIR1} all: @for i in ${SUBDIR1}; do (echo "*** COMPILING $$i DIRECTORY"; cd $$i;\ $(MAKE) "MAKE=$(MAKE)" "CC=$(CC)" "CXX=$(CXX)" "LINKER=$(LINKER)" $@); done clean: @for i in ${SUBDIR1}; do (cd $$i;\ $(MAKE) "MAKE=$(MAKE)" $@); done cleaninstall: clean install: @for i in ${SUBDIR1}; do (echo "*** COMPILING $$i DIRECTORY"; cd $$i;\ $(MAKE) "MAKE=$(MAKE)" "CC=$(CC)" "CXX=$(CXX)" "LINKER=$(LINKER)" $@); done ${SUBDIR}: FRC cd $@; $(MAKE) "MAKE=$(MAKE)" "CC=$(CC)" "CXX=$(CXX)" "LINKER=$(LINKER)" all FRC: tau-2.16.4/lang_support/pc++/PROJ-TEMPLATE000066400000000000000000000027121062343042700175530ustar00rootroot00000000000000/*********************************************************************/ /* pC++/Sage++ Copyright (C) 1993,1995 */ /* Indiana University University of Oregon University of Rennes */ /*********************************************************************/ #include "pcxx.h" #include "pcxx_events.h" // Include event tracing definitions #define SIZE 64 // This is the basic class that represents the distributed function and data class MyElement{ public: void hello() { printf(" hello world\n"); }; }; // kernel.h must be included AFTER the element classes are defined #include "kernel.h" // Define the collection: Collection MyCollection: SuperKernel { public: MyCollection(Distribution *T, Align *A); // Constructor declaration MethodOfElement: // Data and functions added to each basic element virtual void hello(); }; // Collection Constructor definition: MyCollection::MyCollection(Distribution *T, Align *A):SuperKernel(T, A) { /* a constructor for user defined collection has to be defined to ensure that base collection is initialized. */ }; // The thread of control run on each processor void Processor_Main(int argc, char **argv) { Processors P; Distribution T(SIZE,&P,BLOCK); Align A(SIZE,"[ALIGN(V[i],T[i])]"); MyCollection X(&T,&A); // Construct the Collection X PCXX_EVENT(PCXX_EC_BASIC, PCXX_USERCODE_ENTER, 0); // Some Tracing functions } tau-2.16.4/man/000077500000000000000000000000001062343042700131515ustar00rootroot00000000000000tau-2.16.4/man/man1/000077500000000000000000000000001062343042700140055ustar00rootroot00000000000000tau-2.16.4/man/man1/tau2elg.1000066400000000000000000000030011062343042700154240ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU2ELG" "1" "12/22/2005" "" "Tools" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" tau2elg \- convert TAU tracefiles to Epilog tracefiles .SH "SYNOPSIS" .HP 8 \fBtau2elg\fR [\fB\-nomessage\fR] [\fB\-v\fR] {\fItau_tracefile\fR} {\fItau_eventfile\fR} {\fIelg_tracefile\fR} .SH "DESCRIPTION" .PP This program is generated when TAU is configured with the \-epilog= option. .PP The tau2elg trace converter takes a tau trace file (*.trc) and event definition file (*.edf) and produces a corresponding epilog binary trace file (*.elg). Multi\-file TAU traces must be merged before conversion. .SH "OPTIONS" .PP \fB\-nomessage\fR Suppresses printing of message information in the trace. .PP \fB\-v\fR Verbose mode sends trace event descriptions to the standard output as they are converted. .SH "EXAMPLES" .PP The program must be run with the tau trace, tau event and elg output files specified in the command line in that order. Any additional arguments follow. The following would convert merged.trc and tau.edf to the Epilog tracefile app.elg, with message events omitted: .sp .nf ./tau2vtf merged.trc tau.edf app.elg \-nomessage .fi .sp .SH "SEE ALSO" .PP tau_merge(1) tau-2.16.4/man/man1/tau2otf.1000066400000000000000000000034241062343042700154560ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU2OTF" "1" "12/22/2005" "" "Tools" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" tau2otf \- convert TAU tracefiles to OTF tracefiles for Vampir/VNG .SH "SYNOPSIS" .HP 8 \fBtau2otf\fR [\fB\-n\fR\ \fIstreams\fR] [\fB\-nomessage\fR] [\fB\-v\fR] .SH "DESCRIPTION" .PP This program is generated when TAU is configured with the \-otf= option. The tau2otf trace converter takes a TAU formatted tracefile (*.trc) and a TAU event description file (*.edf) and produces an output trace file in the Open Trace Format (OTF). The user may specify the number of output streams for OTF. The input files and output file must be specified in that order. TAU traces should be merged using tau_merge prior to conversion. .SH "OPTIONS" .PP \fB\-n\fR streams Specifies the number of output streams (default is 1). \fB\-nomessage\fR Suppresses printing of message information in the trace. \fB\-v\fR Verbose mode sends trace event descriptions to the standard output as they are converted. .SH "EXAMPLES" .PP The program must be run with the tau trace, tau event and otf output files specified in the command line in that order. Any additional arguments follow. The following will produced an OTF file, a pp.otf and other related event and definition files, from the TAU trace and event files merged.trc and tau.edf trace file: .sp .nf tau2otf merged.trc tau.edf app.otf .fi .sp .SH "SEE ALSO" .PP tau2vtf(1), tau2profile(1), vtf2profile(1), tau_merge(1), tau_convert(1) tau-2.16.4/man/man1/tau2profile.1000066400000000000000000000041031062343042700163210ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU2PROFILE" "1" "12/22/2005" "" "Tools" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" tau2profile \- convert TAU tracefiles to TAU profile files .SH "SYNOPSIS" .HP 13 \fBtau2vprofile\fR [\fB\-d\fR\ \fIdirectory\fR] [\fB\-s\fR\ \fIsnapshot_interval\fR] {\fItau_tracefile\fR} {\fItau_eventfile\fR} .SH "DESCRIPTION" .PP This program is generated when TAU is configured with the \-TRACE option. .PP The tau2profile converter takes a single tau_tracefile (*.trc) and tau_eventfile (*.edf) and produces a corresponding series of profile files. The input files must be specified in that order, with optinal parameters coming afterward. Multi\-file TAU traces must be merged before conversion. .SH "OPTIONS" .PP \fB\-d\fR Output profile files to the specified 'directory' rather than the current directory. .PP \fB\-s\fR Output a profile snapshot showing the state of the profile data accumulated from the trace every 'snapshot_interval' time units. The snapshot profiles are placed sequentially in directories labled 'snapshot_n' where 'n' is an integer ranging from 0 to to the total number of snapshots \-1. .SH "EXAMPLES" .PP The program must be run with the tau trace and tau event files specified in the command line in that order. Any additional arguments follow. The following will produce a profile file array, from the TAU trace and event files merged.trc and tau.edf trace file: .sp .nf tau2profile merged.trc tau.edf .fi .sp The following will convert merged.trc and tau.edf to a series of profiles one directory higher. It will also produce a profile snapshot every 250,000 time units: .sp .nf tau2profile merged.trc tau.edf \-d ./.. \-s 250000 .fi .sp .SH "SEE ALSO" .PP vtf2profile(1), tau2vtf(1), tau2otf(1), tau_merge(1), tau_convert(1) tau-2.16.4/man/man1/tau2slog2.1000066400000000000000000000025101062343042700157070ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU2SLOG2" "1" "12/22/2005" "" "Tools" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" tau2slog2 \- convert TAU tracefiles to SLOG2 tracefiles .SH "SYNOPSIS" .HP 10 \fBtau2slog2\fR {\fItau_tracefile\fR} {\fItau_eventfile\fR} {\fB\-o\fR\ \fIslog2_tracefile\fR} .SH "DESCRIPTION" .PP This program is generated when TAU is configured with the \-slog2 or \-slog2= option. .PP The tau2slog2 trace converter takes a single tau trace file (*.trc) and event definition file (*.edf) and produces a corresponding slog2 binary trace file (*.slog2). .PP The tau2slog2 converter is called from the command line with the locations of the tau trace and event files. These arguments must be followed by the \-o flag and the name of the slog2 file to be written. tau2slog 2 accepts no other arguments. .SH "EXAMPLES" .PP A typical invocation of the converter, to create app.slog2, is as follows: .sp .nf tau2slog2 app.trc tau.edf \-o app.slog2 .fi .sp .SH "SEE ALSO" .PP tau_merge(1), tau_convert(1) tau-2.16.4/man/man1/tau2vtf.1000066400000000000000000000046271062343042700154730ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU2VTF" "1" "12/22/2005" "" "Tools" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" tau2vtf \- convert TAU tracefiles to vampir tracefiles .SH "SYNOPSIS" .HP 8 \fBtau2vtf\fR [\fB\-nomessage\fR] [\fB\-v\fR] [[\fB\-a\fR] [\fB\-fa\fR]] {\fItau_tracefile\fR} {\fItau_eventfile\fR} {\fIvtf_tracefile\fR} .SH "DESCRIPTION" .PP This program is generated when TAU is configured with the \-vtf= option. .PP The tau2vtf trace converter takes a single tau_tracefile (*.trc) and tau_eventfile (*.edf) and produces a corresponding vtf_tracefile (*.vtf). The input files and output file must be specified in that order. Multi\-file TAU traces must be merged before conversion. .PP The default output file format is VTF3 binary. If the output filename is given as the .vpt.gz type, rather than .vpt, the output file will be gzipped. There are two additional output format options. The command line argument '\-a' produces the vtf file output in ASCII VTF3 format. The command line argument '\-fa' produces the vtf file output in the FAST ASCII VTF3 format. Note that these arguments are mutually exclusive. .SH "OPTIONS" .PP \fB\-nomessage\fR Suppresses printing of message information in the trace. .PP \fB\-v\fR Verbose mode sends trace event descriptions to the standard output as they are converted. .PP \fB\-a\fR Print the vtf file output in the human\-readable VTF3 ASCII format .PP \fB\-fa\fR Print the vtf file in the simplified human\-readable FAST ASCII VTF3 format .SH "EXAMPLES" .PP The program must be run with the tau trace, tau event and vtf output files specified in the command line in that order. Any additional arguments follow. The following will produce a VTF, app.vpt, from the TAU trace and event files merged.trc and tau.edf trace file: .sp .nf tau2vtf merged.trc tau.edf app.vpt .fi .sp The following will convert merged.trc and tau.edf to a gzipped FAST ASCII vampir tracefile app.vpt.gz, with message events omitted: .sp .nf tau2vtf merged.trc tau.edf app.vpt.gz \-nomessage \-fa .fi .sp .SH "SEE ALSO" .PP vtf2profile(1), tau2profile(1), tau_merge(1), tau_convert(1) tau-2.16.4/man/man1/tau_compiler.sh.1000066400000000000000000000133321062343042700171650ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU_COMPILER.SH" "1" "04/27/2007" "" "Tools" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" tau_compiler.sh \- Instrumenting source files. .SH "SYNOPSIS" .HP 16 \fBtau_compiler.sh\fR [\fB\-p\fR\ \fIprofile\fR] [\fB\-optVerbose\fR] [\fB\-optQuiet\fR] [\fB\-optPdtDir=\fR\fIdir\fR] [\fB\-optPdtF95Opts=\fR\fIopts\fR] [\fB\-optPdtF95Reset=\fR\fIopts\fR] [\fB\-optPdtCOpts=\fR\fIopts\fR] [\fB\-optPdtCReset=\fR\fIopts\fR] [\fB\-optPdtCxxOpts=\fR\fIopts\fR] [\fB\-optPdtCReset=\fR\fIopts\fR] [\fB\-optPdtF90Parser=\fR\fIparser\fR] [\fB\-optGnuFortranParser=\fR\fIparser\fR] [\fB\-optPdtUser=\fR\fIopts\fR] [\fB\-optTauInstr=\fR\fIpath\fR] [\fB\-optDetectMemoryLeaks\fR] [\fB\-optIncludeMemory\fR] [\fB\-optPreProcess\fR] [\fB\-optCPP=\fR\fIpath\fR] [\fB\-optCPPOpts=\fR\fIoptions\fR] [\fB\-optCPPReset=\fR\fIoptions\fR] [\fB\-optTauSelectFile=\fR\fIfile\fR] [\fB\-optPDBFile=\fR\fIfile\fR] [\fB\-optTau=\fR\fIopts\fR] [\fB\-optCompile=\fR\fIopts\fR] [\fB\-optTauDefs=\fR\fIopts\fR] [\fB\-optTauIncludes=\fR\fIopts\fR] [\fB\-optReset=\fR\fIopts\fR] [\fB\-optLinking=\fR\fIopts\fR] [\fB\-optLinkReset=\fR\fIopts\fR] [\fB\-optTauCC=\fR\fIcc\fR] [\fB\-optOpariTool=\fR\fIpath/opari\fR] [\fB\-optOpariDir=\fR\fIpath\fR] [\fB\-optOpariOpts=\fR\fIopts\fR] [\fB\-optOpariReset=\fR\fIopts\fR] [\fB\-optNoMpi\fR] [\fB\-optMpi\fR] [\fB\-optNoRevert\fR] [\fB\-optRevert\fR] [\fB\-optKeepFiles\fR] [\fB\-optAppC\fR] [\fB\-optAppCXX\fR] [\fB\-optAppF90\fR] {\fIcompiler\fR} [\fIcompiler_options\fR] .SH "DESCRIPTION" .PP The TAU Compiler provides a simple way to automatically instrument an entire project. The TAU Compiler can be used on C, C++, fixed form Fortran, and free form Fortran. .SH "OPTIONS" .PP \fB\-f tracefile\fR \-Specify the Vampir tracefile to be converted. .PP \fB\-optVerbose\fR Turn on verbose debugging messages. .PP \fB\-optQuiet\fR Suppresses excessive output. .PP \fB\-optPdtDir=\fR The PDT architecture directory. Typically \fB$(PDTDIR)/$(PDTARCHDIR)\fR. .PP \fB\-optPdtF95Opts=\fR Options for Fortran parser in PDT (f95parse). .PP \fB\-optPdtF95Reset=\fR Reset options to the Fortran parser to the given list. .PP \fB\-optPdtCOpts=\fR Options for C parser in PDT (cparse). Typically \fB$(TAU_MPI_INCLUDE) $(TAU_INCLUDE) $(TAU_DEFS)\fR. .PP \fB\-optPdtCReset=\fR Reset options to the C parser to the given list .PP \fB\-optPdtCxxOpts=\fR Options for C++ parser in PDT (cxxparse). Typically \fB$(TAU_MPI_INCLUDE) $(TAU_INCLUDE) $(TAU_DEFS)\fR. .PP \fB\-optPdtCReset=\fR Reset options to the C++ parser to the given list .PP \fB\-optPdtF90Parser=\fR Specify a different Fortran parser. For e.g., \fBf90parse\fR instead of \fBf95parse\fR. .PP \fB\-optGnuFortranParser=\fR Specify the GNU \fBgfortran\fR Fortran parser \fBgfparse\fRinstead of \fBf95parse\fR .PP \fB\-optPdtUser=\fR Optional arguments for parsing source code. .PP \fB\-optTauInstr=\fR Specify location of tau_instrumentor. Typically \fB$(TAUROOT)/$(CONFIG_ARCH)/bin/tau_instrumentor\fR. .PP \fB\-optDetectMemoryLeaks\fR Instructs TAU to detect any memory leaks in C/C++ programs.TAU then tracks the source location of the memory leak as wellas the place in the callstack where the memory allocation wasmade. .PP \fB\-optIncludeMemory\fR Forinteral use only .PP \fB\-optPreProcess\fR Preprocess the source code before parsing. Uses /usr/bin/cpp\-P by default. .PP \fB\-optCPP=\fR Specify an alternative preprocessor and pre\-process the sources. .PP \fB\-optCPPOpts=\fR Specify additional options to the C pre\-processor. .PP \fB\-optCPPReset=\fR ResetC preprocessor options to the specified list. .PP \fB\-optTauSelectFile=\fR Specify selective instrumentation file for tau_instrumentor .PP \fB\-optPDBFile=\fR Specify PDB file for tau_instrumentor. Skips parsing stage. .PP \fB\-optTau=\fR Specify options for tau_instrumentor. .PP \fB\-optCompile=\fR Options passed to the compiler. Typically \fB $(TAU_MPI_INCLUDE) $(TAU_INCLUDE) $(TAU_DEFS) \fR. .PP \fB\-optTauDefs=\fR Options passed to the compiler by TAU. Typically \fB $(TAU_DEFS) \fR. .PP \fB\-optTauIncludes=\fR Options passed to the compiler by TAU. Typically \fB $(TAU_MPI_INCLUDE) $(TAU_INCLUDE) \fR. .PP \fB\-optReset=\fR Reset options to the compiler to the given list .PP \fB\-optLinking=\fR Options passed to the linker. Typically \fB$(TAU_MPI_FLIBS) $(TAU_LIBS) $(TAU_CXXLIBS) \fR. .PP \fB\-optLinkReset=\fR Reset options to the linker to the given list. .PP \fB\-optTauCC=\fR Specifies the C compiler used by TAU. .PP \fB\-optOpariTool=\fR Specifies the location of the Opari tool. .PP \fB\-optOpariDir=\fR Specifies the location of the Opari directory. .PP \fB\-optOpariOpts=\fR Specifies optional arguments to the Opari tool. .PP \fB\-optOpariReset=\fR Resets options passed to the Opari tool. .PP \fB\-optNoMpi\fR Removes \fB\-l*mpi*\fR libraries during linking (default). .PP \fB\-optMpi\fR Does not remove \fB\-l*mpi*\fR libraries during linking. .PP \fB\-optNoRevert\fR Exit on error. Does not revert to the original compilation rule on error. .PP \fB\-optRevert\fR Revert to the original compilation rule on error (default). .PP \fB\-optKeepFiles\fR Does not remove intermediate \fB.pdb\fR and \fB.inst.*\fR files. .PP \fB\-optAppC\fR Sets the failsafe C compiler. .PP \fB\-optAppCXX\fR Sets the failsafe C++ compiler. .PP \fB\-optAppF90\fR Sets the failsafe F90 compiler tau-2.16.4/man/man1/tau_convert.1000066400000000000000000000054341062343042700164260ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU_CONVERT" "1" "12/22/2005" "" "Tools" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" tau_convert \- convert TAU tracefiles into various alternative trace formats .SH "SYNOPSIS" .HP 12 \fBtau_convert\fR [[\fB\-alog\fR] [\fB\-SSDF\fR] [\fB\-dump\fR] [\fB\-paraver\fR\ [\-t]] [\fB\-pv\fR] [\fB\-vampir\fR\ [\ \fB\-longsymbolbugfix\fR\ ]\ [\ \fB\-compact\fR\ ]\ [[\ \fB\-user\fR\ ]\ [\ \fB\-class\fR\ ]\ [\ \fB\-all\fR\ ]]\ [\ \fB\-nocomm\fR\ ]]] [\fIoutputtrc\fR] {\fIinputtrc\fR} {\fIedffile\fR} .SH "DESCRIPTION" .PP tau_convert is generated when TAU is configured with the \-TRACE option. .PP This program requires specification of a TAU tracefile and eventfile. It will convert the given TAU traces to the ASCII\-based trace format specified in the first argument. The conversion type specification may be followed by additional options specific to the conversion type. It defaults to the single threaded vampir format if no other format is specified. tau_convert also accepts specification of an output file as the last argument. If none is given it prints the converted data to the standard out. .SH "OPTIONS" .PP \fB\-alog\fR convert TAU tracefile into the alog format (This format is deprecated. The SLOG2 format is recommended.) .PP \fB\-SDDF\fR convert TAU tracefile into the SDDF format .PP \fB\-dump\fR convert TAU tracefile into multi\-column human readable text .PP \fB\-paraver\fR convert TAU tracefile into paraver format .PP \fB\-t\fR indicate conversion of multi threaded TAU trace into paraver format .PP \fB\-pv\fR convert single threaded TAU tracefile into vampir format (all \-vampir options apply) (default) .PP \fB\-vampir\fR convert multi threaded TAU tracefile into vampir format .PP \fB\-longsymbolbugfix\fR make the first characters of long, similar identifier strings unique to avoid a bug in vampir .PP \fB\-compact\fR abbreviate individual event entries .PP \fB\-all\fR compact all entries (default) .PP \fB\-user\fR compact user entries only .PP \fB\-class\fR compact class entries only .PP \fB\-nocomm\fR disregard communication events .PP \fB[outputtrc]\fR specify the name of the output tracefile to be produced .SH "EXAMPLES" .PP To print the contents of a TAU tracefile to the screen: .sp .nf tau_convert \-dump app.trc tau.edf .fi .sp To convert a merged, threaded TAU tracefile to paraver format: .sp .nf tau_convert \-paraver \-t app.trc tau.edf app.pv .fi .sp .SH "SEE ALSO" .PP tau_merge(1), tau2vtf(1), tau2profile(1), tau2slog2(1) tau-2.16.4/man/man1/tau_merge.1000066400000000000000000000076621062343042700160520ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU_MERGE" "1" "12/22/2005" "" "Tools" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" tau_merge \- combine multiple node and or thread TAU tracefiles into a merged tracefile .SH "SYNOPSIS" .HP 10 \fBtau_merge\fR [\fB\-a\fR] [\fB\-r\fR] [\fB\-n\fR] [\fB\-e\fR\ \fIeventfile_list\fR] [\fB\-m\fR\ \fIoutput_eventfile\fR] {\fItracefile_list\fR} [{\fIoutput_tracefile\fR} {\fI\ \-\ \fR}] .SH "DESCRIPTION" .PP tau_merge is generated when TAU is configured with the \-TRACE option. .PP This tool assembles a set of tau trace and event files from multiple multiple nodes or threads across a program's execution into a single unified trace file. Many TAU trace file tools operate on merged trace files. .PP Minimally, tau_merge must be invoked with a list of unmerged trace files followed by the desired name of the merged trace file or the \- flag to send the output to the standard out. Typically the list can be designated by giving the shared name of the trace files to be merged followed by desired range of thread or node designators in brackets or the wild card character '*' to encompass variable thread and node designations in the filename (trace.A.B.C.trc where A, B and C are the node, context and thread numbers respectively). For example tautrace.*.trc would represent all tracefiles in a given directory while tautrace.[0\-5].0.0.trc would represent the tracefiles of nodes 0 through 5 with context 0 and thread 0. .PP tau_merge will generate the specified merged trace file and an event definition file, tau.edf by default. .PP The event definition file can be given an alternative name by using the '\-m' flag followed by the desired filename. A list of event definition files to be merged can be designated explicitly by using the '\-e' flag followed by a list of unmerged .edf files, specified in the same manner as the trace file list. .PP If computational resources are insufficient to merge all trace and event files simultaneously the process may be undertaken hierarchically. Corresponding subsets of the tracefiles and eventfiles may be merged in sequence to produce a smaller set of files that can then be to merged into a singular fully merged tracefile and eventfile. E.g. for a 100 node trace, trace sets 1\-10, 11\-20, ..., 91\-100 could be merged into traces 1a, 2a, ..., 10a. Then 1a\-10a could be merged to create a fully merged tracefile. .SH "OPTIONS" .PP \fB\-e\fR eventfile_list explicitly define the eventfiles to be merged .PP \fB\-m\fR output_eventfile explicitly name the merged eventfile to be created .PP \fB\-\fR send the merged tracefile to the standard out .PP \fB\-a\fR adjust earliest timestamp time to zero .PP \fB\-r\fR do not reassemble long events .PP \fB\-n\fR do not block waiting for new events. By default tau_merge will block and wait for new events to be appended if a tracefile is incomplete. This command allows offline merging of (potentially) incomplete tracefiles. .SH "EXAMPLES" .PP To merge all TAU tracefiles into app.trc and produce a merged tau.edf eventfile: .sp .nf tau_merge *.trc app.trc .fi .sp To merge all eventfiles 0\-255 into ev0_255merged.edf and TAU tracefiles for nodes 0\-255 into the standard out: .sp .nf tau_merge \-e events.[0\-255].edf \-m ev0_255merged.edf \\ tautrace.[0\-255].*.trc \- .fi .sp To merge eventfiles 0, 5 and seven info ev057.edf and tau tracefiles for nodes 0, 5 and 7 with context and thread 0 into app.trc: .sp .nf tau_merge \-e events.0.edf events.5.edf events.7.edf \-m ev057.edf \\ tautrace.0.0.0.trc tautrace.5.0.0.trc tautrace.7.0.0.trc app.trc .fi .sp .SH "SEE ALSO" .PP tau_convert .PP tau2profile .PP tau2vtf .PP tau2elg .PP tau2slog2 tau-2.16.4/man/man1/tau_ompcheck.1000066400000000000000000000032761062343042700165410ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU_OMPCHECK" "1" "04/27/2006" "" "Tools" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" tau_ompcheck \- Completes uncompleted do/for/parallel omp directives .SH "SYNOPSIS" .HP 13 \fBtau_ompcheck\fR {\fIpdbfile\fR} {\fIsourcefile\fR} [\fB\-o\fR\ \fIoutfile\fR] [\fB\-v\fR] [\fB\-d\fR] .SH "DESCRIPTION" .PP Finds uncompleted do/for omp directives and inserts closing directives for each one uncompleted. do/for directives are expected immediately before a do/for loop. Closing directives are then placed immediately following the same do/for loop. .SH "OPTIONS" .PP \fBpdbfile\fR A pdbfile generated from the source file you wish to check. This pdbfile must contain comments from which the omp directives are gathered. See pdbcomment for information on how to obtain comment from a pdbfile. .PP \fBsourcefile\fR A fortran, C or C++ source file to analyzed. .PP \fB\-o\fR write the output to the specified outfile. .PP \fB\-v\fRverbose output, will say which directive where added. .PP \fB\-d\fR debuging information, we suggest you pipe this unrestrained output to a file. .SH "EXAMPLES" .PP To check file: source.f90 do: (you will need pdtoolkit//bin and tau/utils/ in your path). .sp .nf %>f95parse source.f90 %>pdbcomment source.pdb > source.comment.pdb %>tau_omp source.comment.pdb source.f90 \-o source.chk.f90 .fi .sp .SH "SEE ALSO" .PP f95parse pdbcomment tau-2.16.4/man/man1/tau_poe.1000066400000000000000000000031101062343042700155160ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU_POE" "1" "06/01/2006" "" "Tools" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" tau_poe \- Instruments a MPI application while it is being executed with poe. .SH "SYNOPSIS" .HP 8 \fBtau_poe\fR [\fB\-XrunTAUsh\-\fR\ \fItauOptions\fR] {\fIapplcation\fR} [\fIpoe\ options\fR] .SH "DESCRIPTION" .PP This tool dynamically instruments a mpi application by loading a specific mpi library file. .SH "OPTIONS" .PP \fBtauOptions\fR To instrument a mpi application a specific TAU library file is loaded when the application is executed. To select which library is loaded use this option. The library files are build according to the options set when TAU is configured. The library file that have been build and thus available for use are in the [TAU_HOME]/[arch]/lib directory. The file are listed as libTAUsh\-*.so where * is the instrumentation options. For example to use the libTAUsh\-pdt\-openmp\-opari.so file let the comman line option be \-XrunTAUsh\-pdt\-openmp\-opari. .SH "EXAMPLES" .PP Instrument a.out wit the currently configured options and then run it on four nodes: .sp .nf %>tau_poe ./a.out \-procs 4 .fi .sp .PP Select the libTAUsh\-mpi.so library to instrument a.out with: .sp .nf %>tau_poe \-XrunTAUsh\-mpi ./a.out \-procs 4 .fi .sp tau-2.16.4/man/man1/tau_reduce.1000066400000000000000000000117661062343042700162220ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU_REDUCE" "1" "12/22/2005" "" "Tools" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" tau_reduce \- generates selective instrumentation rules based on profile data .SH "SYNOPSIS" .HP 11 \fBtau_reduce\fR {\fB\-f\fR\ \fIfilename\fR} [\fB\-n\fR] [\fB\-r\fR\ \fIfilename\fR] [\fB\-o\fR\ \fIfilename\fR] [\fB\-v\fR] [\fB\-p\fR] .SH "DESCRIPTION" .PP tau_reduce is an application that will apply a set of user\-defined rules to a pprof dump file (\fBpprof \-d\fR) in order to create a select file that will include an exclude list for selective implementation for TAU. The user must specify the name of the pprof dump file that this application will use. This is done with the \-f filename flag. If no rule file is specified, then a single default rule will be applied to the file. This rule is: numcalls > 1000000 & usecs/call < 2, which will exclude all routines that are called at least 1,000,000 times and average less then two microseconds per call. If a rule file is specified, then this rule is not applied. If no output file is specified, then the results will be printed out to the screen. .SH "RULES" .PP Users can specify a set of rules for tau_reduce to apply. The rules should be specified in a separate file, one rule per line, and the file name should be specifed with the appropriate option on the command line. The grammar for a rule is: [GROUPNAME:]FIELD OPERATOR NUMBER. The GROUPNAME followed by the colon (:) is optional. If included, the rule will only be applied to routines that are a member of the group specified. Only one group name can be applied to each rule, and a rule must follow a groupname. If only a groupname is given, then an unrecognized field error will be returned. If the desired effect is to exclude all routines that belong to a certain group, then a trivial rule, such as GROUP:numcalls > \-1 may be applied. If a groupnameis given, but the data does not contain any groupname data, then then an error message will be given, but the rule will still be applied to the date ignoring the groupname specification. A FIELD is any of the routine attributes listed in the following table: .sp .nf ATTRIBUTE NAME MEANING numcalls Number of times the routine is called numsubrs Number of subroutines that the routine contains percent Percent of total implementation time usec Exclusive routine running time, in microseconds cumusec Inclusive routine running time, in microseconds count Exclusive hardware count totalcount Inclusive hardware count stddev Standard deviation usecs/call Microseconds per call counts/call Hardware counts per call .fi .PP Some FIELDS are only available for certain files. If hardware counters are used, then usec, cumusec, usecs/per call are not applicable and a error is reported. The opposite is true if timing data is used rather than hardware counters. Also, stddev is only available for certain files that contain that data. .PP An OPERATOR is any of the following: < (less than), > (greater than), or = (equals). .PP A NUMBER is any number. .PP A compound rule may be formed by using the & (and) symbol in between two simple rules. There is no "OR" because there is an implied or between two separate simple rules, each on a separate line. (ie the compound rule usec < 1000 OR numcalls = 1 is the same as the two simple rules "usec < 1000" and "numcalls = 1"). .SH "RULE EXAMPLES" .sp .nf #exclude all routines that are members of TAU_USER and have less than #1000 microseconds TAU_USER:usec < 1000 #exclude all routines that have less than 1000 microseconds and are #called only once. usec < 1000 & numcalls = 1 #exclude all routines that have less than 1000 usecs per call OR have a percent #less than 5 usecs/call < 1000 percent < 5 .fi .PP NOTE: Any line in the rule file that begins with a # is a comment line. For clarity, blank lines may be inserted in between rules and will also be ignored. .SH "OPTIONS" .PP \fB\-f\fR filename specify filename of pprof dump file .PP \fB\-p\fR print out all functions with their attributes .PP \fB\-o\fR filename specify filename for select file output (default: print to screen .PP \fB\-r\fR filename specify filename for rule file .PP \fB\-v\fR verbose mode (for each rule, print out rule and all functions that it excludes) .SH "EXAMPLES" .PP To print to the screen the selective instrumentation list for the paraprof dump file app.prf with default selection rules use: .sp .nf tau_reduce \-f app.prf .fi .sp To create a selection file, app.sel, from the paraprof dump file app.prf using rules specified in foo.rlf use: .sp .nf tau_reduce \-f app.prf \-r foo.rlf \-o app.sel .fi .sp .SH "SEE ALSO" .PP tau-2.16.4/man/man1/tau_timecorrect.1000066400000000000000000000021721062343042700172620ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU_TIMECORRECT" "1" "08/14/2006" "" "Tools" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" tau_timecorrect \- Corrects and reorders the records of tau trace files. .SH "SYNOPSIS" .HP 16 \fBtau_timecorrect\fR {\fItrace\ input\ file\fR} {\fIEDF\ input\ file\fR} {\fItrace\ output\ file\fR} {\fIEDF\ input\ file\fR} .SH "DESCRIPTION" .PP This program takes in tau trace files, reorders and corrects the times of these records and then outputs the records to new trace files. The time correction algorithm uses a logical clock algorithm with amortization. This is done by adjusting the times of events such that the product of an effect happens after the cause of that effect. .SH "OPTIONS" .PP \fBtrace input file\fR .PP \fBEDF input file\fR .PP \fBtrace output file\fR .PP \fBEDF output file\fR tau-2.16.4/man/man1/tau_treemerge.pl.1000066400000000000000000000027231062343042700173350ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU_TREEMERGE.PL" "1" "01/31/2007" "" "Tools" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" tau_treemerge.pl \- combine multiple node and or thread TAU tracefiles into a merged tracefile .SH "SYNOPSIS" .HP 17 \fBtau_treemerge.pl\fR [\fB\-n\fR\ \fIbreak_amount\fR] .SH "DESCRIPTION" .PP tau_treemerge.pl is generated when TAU is configured with the \-TRACE option. .PP This tool assembles a set of tau trace and event files from multiple multiple nodes or threads across a program's execution into a single unified trace file. Many TAU trace file tools operate on merged trace files. .PP tau_treemerge.pl will generate the specified merged trace file and an event definition file, tau.edf by default. .SH "OPTIONS" .PP \fB\-n\fR break_amount set the maximum number of trace files to merge in each invocation of tau_merge. If we need to merge 2000 trace files and if the maximum number of open files specified by unix is 250, tau_treemerge.pl will incrementally merge the trace files so as not to exceed the number of open file descriptors. .SH "SEE ALSO" .PP tau_merge .PP tau_convert .PP tau2profile .PP tau2vtf .PP tau2elg .PP tau2slog2 tau-2.16.4/man/man1/tau_validate.1000066400000000000000000000022701062343042700165320ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU_VALIDATE" "1" "08/14/2006" "" "Tools" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" tau_validate \- Validates a TAU installation by performing various tests on each TAU stub Makefile .SH "SYNOPSIS" .HP 13 \fBtau_validate\fR [\fB\-v\fR] [\fB\-\-html\fR] [\fB\-\-build\fR] [\fB\-\-run\fR] {\fIarch\ directory\fR} .SH "DESCRIPTION" .PP tau_validate will attempt to validate a TAU installation by performing various tests on each TAU stub Makefile. Some degree of logic exists to know where a given test applies to a given makefile, but it's not perfect. .SH "OPTIONS" .PP \fBv\fR Verbose output .PP \fBhtml\fR Output results in HTML .PP \fBbuild\fR Only build .PP \fBrun\fR Only run .PP \fBarch directory\fR Specify an arch directory (e.g. rs6000), or the lib directory (rs6000/lib), or a specific makefile. Relative or absolute paths are ok. tau-2.16.4/man/man1/tauex.1000066400000000000000000000021461062343042700152200ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAUEX" "1" "03/23/2007" "" "Tools" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" tauex \- Allows you to choose a tau/papi configuration at runtime. .SH "SYNOPSIS" .HP 6 \fBtauex\fR [\-u] [\fIUser\ mode\ counts\fR] [\-k] [\fIKernel\ mode\ counts\fR] [\-S] [\fISupervisor\ mode\ counts\fR] [\-I] [\fIInterrupt\ mode\ counts\fR] [\-e] [\fIPAPI\ event\fR] [\-T] [\fITAU\ option\fR] [\-XrunTAU\-] [\fITAU\ options\fR] .SH "DESCRIPTION" .PP This program takes in tau trace files, reorders and corrects the times of these records and then outputs the records to new trace files. The time correction algorithm uses a logical clock algorithm with amortization. This is done by adjusting the times of events such that the product of an effect happens after the cause of that effect. tau-2.16.4/man/man1/vtf2profile.1000066400000000000000000000045151062343042700163360ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "VTF2PROFILE" "1" "12/22/2005" "" "Tools" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" vtf2profile \- Generate a TAU profile set from a vampir trace file .SH "SYNOPSIS" .HP 12 \fBvtf2profile\fR [\fB\-p\fR\ \fIprofile\fR] [\fB\-i\fR\ \fIinterval_start\fR\ \fIinterval_end\fR] [\fB\-c\fR] [\fB\-h\fR] {\fB\-f\fR\ \fItracefile\fR} .SH "DESCRIPTION" .PP vtf2profile is created when TAU is configured with the \-vtf= option. This tool converts a VTF trace file (*.vpt) to a tau profile set (profile.A.B.C where A, B and C are the node, context and thread numbers respectively). .PP The vtf file to be read is specified in the command line by the \-f flag followed by the file's location. The VTF tracefile specified may be in gzipped form, eg app.vpt.gz. \-p is similarly used to specify the relative path to the directory where the profile files should be stored. If no output directory is specified the current directory will be used. A contiguous interval within the vtf file may be selected for conversion by using the \-i flag followed by two integers, representing the timestamp of the start and end of the desired interval respectively. The entire vtf file is converted if no interval is given. .SH "OPTIONS" .PP \fB\-f tracefile\fR \-Specify the Vampir tracefile to be converted. .PP \fB\-p profile\fR \-Specify the location where the profile file(s) should be written. .PP \fB\-i interval_start interval_end\fR \-Limit the profile produced to the specified interval within the vampir trace file. .PP \fB\-c\fR \-Opens a command line interface for the program. .PP \fB\-h\fR \-Displays a help message. .SH "EXAMPLES" .PP To convert a vampir tracefile, trace.vpt, to an equivalent TAU profile, use the following: .sp .nf vtf2profile \-f trace.vpt .fi .sp To produce a TAU profile in the ./profiles directory representing only the events from the start of the tracefile to timestamp 6000, use: .sp .nf vtf2profile \-f trace.vpt \-p ./profiles \-i 0 6000 .fi .sp .SH "SEE ALSO" .PP tau2vtf(1), tau2profile(1) tau-2.16.4/man/man3/000077500000000000000000000000001062343042700140075ustar00rootroot00000000000000tau-2.16.4/man/man3/CT.3000066400000000000000000000022051062343042700144000ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "CT" "3" "08/31/2005" "" "TAU Instrumentation API" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" CT \- Returns the type information for a variable .SH "SYNOPSIS" .PP \fBC/C++:\fR .HP 3 \fB\fBCT\fR\fR\fB(\fR\fB\ \fR\fB\fIvariable\fR\fR\fB);\fR .SH "DESCRIPTION" .PP The CT macro returns the runtime type information string of a variable. This is useful in constructing the type parameter of the TAU_PROFILE macro. For templates, the type information can be constructed using the type of the return and the type of each of the arguments (parameters) of the template. The example in the following macro will clarify this. .SH "EXAMPLE" .PP \fBC/C++ :\fR .sp .nf TAU_PROFILE("foo::memberfunc()", CT(*this), TAU_DEFAULT); .fi .SH "SEE ALSO" .PP TAU_PROFILE, TAU_PROFILE_TIMER(3), TAU_TYPE_STRING(3) tau-2.16.4/man/man3/TAU_CONTEXT_EVENT.3000066400000000000000000000042201062343042700166670ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU_CONTEXT_EVENT" "3" "08/31/2005" "" "TAU Instrumentation API" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" TAU_CONTEXT_EVENT \- Triggers a context event .SH "SYNOPSIS" .PP \fBC/C++:\fR .HP 18 \fB\fBTAU_CONTEXT_EVENT\fR\fR\fB(\fR\fBTauUserEvent\ \fR\fB\fIvariable\fR\fR\fB, \fR\fBdouble\ \fR\fB\fIvalue\fR\fR\fB);\fR .PP \fBFortran:\fR .HP 18 \fB\fBTAU_CONTEXT_EVENT\fR\fR\fB(\fR\fBinteger\ \fR\fB\fIvariable\fR\fR\fB(2)\fR\fB, \fR\fBreal\ \fR\fB\fIvalue\fR\fR\fB);\fR .SH "DESCRIPTION" .PP Triggers a context event. A context event associates the name with the list of routines along the callstack. A context event tracks information like a user defined event and TAU records the maxima, minima, mean, std. deviation and the number of samples for each context event. A context event helps distinguish the data supplied by the user based on the location where an event occurs and the sequence of actions (routine/timer invocations) that preceeded the event. The depth of the the callstack embedded in the context event's name is specified by the user in the environment variable TAU_CALLPATH_DEPTH. If this variable is not specified, TAU uses a default depth of 2. .SH "EXAMPLE" .PP \fBC/C++ :\fR .sp .nf int f2(void) { static int count = 0; count ++; TAU_PROFILE("f2()", "(sleeps 2 sec, calls f3)", TAU_USER); TAU_REGISTER_CONTEXT_EVENT(event, "Iteration count"); /* if (count == 2) TAU_DISABLE_CONTEXT_EVENT(event); */ printf("Inside f2: sleeps 2 sec, calls f3\\n"); TAU_CONTEXT_EVENT(event, 232+count); sleep(2); f3(); return 0; } .fi .PP \fBFortran :\fR .sp .nf integer memevent(2) / 0, 0 / save memevent call TAU_REGISTER_CONTEXT_EVENT(memevent, "STORAGEARY mem allocated') call TAU_CONTEXT_EVENT(memevent, SIZEOF(STORAGEARY)*sizeof(INTEGER)) .fi .SH "SEE ALSO" .PP TAU_REGISTER_CONTEXT_EVENT(3) tau-2.16.4/man/man3/TAU_DB_DUMP.3000066400000000000000000000021501062343042700157140ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU_DB_DUMP" "3" "08/31/2005" "" "TAU Instrumentation API" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" TAU_DB_DUMP \- Dumps the profile database to disk .SH "SYNOPSIS" .PP \fBC/C++:\fR .HP 12 \fB\fBTAU_DB_DUMP\fR\fR\fB(\fR\fBvoid);\fR .PP \fBFortran:\fR .HP 12 \fB\fBTAU_DB_DUMP\fR\fR\fB(\fR\fBvoid);\fR .SH "DESCRIPTION" .PP Dumps the profile database to disk. The format of the files is the same as regular profiles, they are simply prefixed with "dump" instead of "profile". .SH "EXAMPLE" .PP \fBC/C++ :\fR .sp .nf TAU_DB_DUMP(); .fi .PP \fBFortran :\fR .sp .nf call TAU_DB_DUMP() .fi .SH "SEE ALSO" .PP TAU_DB_DUMP_PREFIX(3), TAU_DB_DUMP_INCR(3), TAU_DUMP_FUNC_NAMES(3), TAU_DUMP_FUNC_VALS(3), TAU_DUMP_FUNC_VALS_INCR(3), TAU_DB_PURGE(3), TAU_PROFILE_EXIT(3) tau-2.16.4/man/man3/TAU_DB_DUMP_INCR.3000066400000000000000000000020741062343042700165340ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU_DB_DUMP_INCR" "3" "08/31/2005" "" "TAU Instrumentation API" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" TAU_DB_DUMP_INCR \- Dumps profile database into timestamped profiles on disk .SH "SYNOPSIS" .PP \fBC/C++:\fR .HP 17 \fB\fBTAU_DB_DUMP_INCR\fR\fR\fB(\fR\fBvoid);\fR .SH "DESCRIPTION" .PP This is similar to the TAU_DB_DUMP macro but it produces dump files that have a timestamp in their names. This allows the user to record timestamped incremental dumps as the application executes. .SH "EXAMPLE" .PP \fBC/C++ :\fR .sp .nf TAU_DB_DUMP_INCR(); .fi .SH "SEE ALSO" .PP TAU_DB_DUMP(3), TAU_DB_DUMP_PREFIX(3), TAU_DUMP_FUNC_NAMES(3), TAU_DUMP_FUNC_VALS(3), TAU_DUMP_FUNC_VALS_INCR(3), TAU_DB_PURGE(3), TAU_PROFILE_EXIT(3) tau-2.16.4/man/man3/TAU_DB_DUMP_PREFIX.3000066400000000000000000000024701062343042700167760ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU_DB_DUMP_PREFIX" "3" "08/31/2005" "" "TAU Instrumentation API" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" TAU_DB_DUMP_PREFIX \- Dumps the profile database into profile files with a given prefix .SH "SYNOPSIS" .PP \fBC/C++:\fR .HP 19 \fB\fBTAU_DB_DUMP_PREFIX\fR\fR\fB(\fR\fBchar\ *\fR\fB\fIprefix\fR\fR\fB);\fR .PP \fBFortran:\fR .HP 19 \fB\fBTAU_DB_DUMP_PREFIX\fR\fR\fB(\fR\fBcharacter\ \fR\fB\fIprefix\fR\fR\fB(size)\fR\fB);\fR .SH "DESCRIPTION" .PP The TAU_DB_DUMP_PREFIX macro dumps all profile data to disk and records a checkpoint or a snapshot of the profile statistics at that instant. The dump files are named .... If prefix is "profile", the files are named profile.0.0.0, etc. and may be read by paraprof/pprof tools as the application executes. .SH "EXAMPLE" .PP \fBC/C++ :\fR .sp .nf TAU_DB_DUMP_PREFIX("prefix"); .fi .PP \fBFortran :\fR .sp .nf call TAU_DB_DUMP_PREFIX("prefix") .fi .SH "SEE ALSO" .PP TAU_DB_DUMP(3) tau-2.16.4/man/man3/TAU_DB_PURGE.3000066400000000000000000000013621062343042700160350ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU_DB_PURGE" "3" "08/31/2005" "" "TAU Instrumentation API" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" TAU_DB_PURGE \- Purges the performance data. .SH "SYNOPSIS" .PP \fBC/C++:\fR .HP 13 \fB\fBTAU_DB_PURGE\fR\fR\fB(\fR\fBvoid);\fR .SH "DESCRIPTION" .PP Purges the performance data collected so far. .SH "EXAMPLE" .PP \fBC/C++ :\fR .sp .nf TAU_DB_PURGE(); .fi .SH "SEE ALSO" .PP TAU_DB_DUMP(3) tau-2.16.4/man/man3/TAU_DISABLE_ALL_GROUPS.3000066400000000000000000000021141062343042700174340ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU_DISABLE_ALL_GROU" "3" "08/31/2005" "" "TAU Instrumentation API" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" TAU_DISABLE_ALL_GROUPS \- Disables instrumentation in all groups .SH "SYNOPSIS" .PP \fBC/C++:\fR .HP 23 \fB\fBTAU_DISABLE_ALL_GROUPS\fR\fR\fB(\fR\fBvoid);\fR .PP \fBFortran:\fR .HP 23 \fB\fBTAU_DISABLE_ALL_GROUPS\fR\fR\fB(\fR\fBvoid);\fR .SH "DESCRIPTION" .PP This macro turns off instrumentation in all groups. .SH "EXAMPLE" .PP \fBC/C++ :\fR .sp .nf void foo() { TAU_DISABLE_ALL_GROUPS(); TAU_ENABLE_GROUP_NAME("PARTICLES"); } .fi .PP \fBFortran :\fR .sp .nf call TAU_DISABLE_ALL_GROUPS(); .fi .SH "SEE ALSO" .PP TAU_GET_PROFILE_GROUP(3), TAU_ENABLE_GROUP_NAME(3), TAU_DISABLE_GROUP_NAME(3), TAU_ENABLE_ALL_GROUPS(3) tau-2.16.4/man/man3/TAU_DISABLE_CONTEXT_EVENT.3000066400000000000000000000023021062343042700200110ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU_DISABLE_CONTEXT_" "3" "08/31/2005" "" "TAU Instrumentation API" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" TAU_DISABLE_CONTEXT_EVENT \- Disable a context event .SH "SYNOPSIS" .PP \fBC/C++:\fR .HP 26 \fB\fBTAU_DISABLE_CONTEXT_EVENT\fR\fR\fB(\fR\fBTauUserEvent\ \fR\fB\fIevent\fR\fR\fB);\fR .SH "DESCRIPTION" .PP Disables a context event. .SH "EXAMPLE" .PP \fBC/C++ :\fR .sp .nf int f2(void) { static int count = 0; count ++; TAU_PROFILE("f2()", "(sleeps 2 sec, calls f3)", TAU_USER); TAU_REGISTER_CONTEXT_EVENT(event, "Iteration count"); if (count == 2) TAU_DISABLE_CONTEXT_EVENT(event); else TAU_ENABLE_CONTEXT_EVENT(event); printf("Inside f2: sleeps 2 sec, calls f3\\n"); TAU_CONTEXT_EVENT(event, 232+count); sleep(2); f3(); return 0; } .fi .SH "SEE ALSO" .PP TAU_REGISTER_CONTEXT_EVENT(3), TAU_ENABLE_CONTEXT_EVENT(3) tau-2.16.4/man/man3/TAU_DISABLE_GROUP.3000066400000000000000000000022741062343042700166300ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU_DISABLE_GROUP" "3" "08/31/2005" "" "TAU Instrumentation API" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" TAU_DISABLE_GROUP \- Disables tracking of a given group .SH "SYNOPSIS" .PP \fBC/C++:\fR .HP 18 \fB\fBTAU_DISABLE_GROUP\fR\fR\fB(\fR\fBTauGroup_t\ \fR\fB\fIgroup\fR\fR\fB);\fR .PP \fBFortran:\fR .HP 18 \fB\fBTAU_DISABLE_GROUP\fR\fR\fB(\fR\fBinteger\ \fR\fB\fIgroup\fR\fR\fB);\fR .SH "DESCRIPTION" .PP Disables the instrumentation for a given group. By default, it is on. .SH "EXAMPLE" .PP \fBC/C++ :\fR .sp .nf void foo() { TAU_PROFILE("foo()", " ", TAU_USER); ... TAU_DISABLE_GROUP(TAU_USER); } .fi .PP \fBFortran :\fR .sp .nf include 'Profile/TauFAPI.h' call TAU_DISABLE_GROUP(TAU_USER) .fi .SH "SEE ALSO" .PP TAU_ENABLE_INSTRUMENTATION(3), TAU_DISABLE_INSTRUMENTATION(3), TAU_ENABLE_GROUP(3), TAU_INIT(3), TAU_PROFILE_INIT(3) tau-2.16.4/man/man3/TAU_DISABLE_GROUP_NAME.3000066400000000000000000000031311062343042700174210ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU_DISABLE_GROUP_NA" "3" "08/31/2005" "" "TAU Instrumentation API" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" TAU_DISABLE_GROUP_NAME \- Disables a group based on name .SH "SYNOPSIS" .PP \fBC/C++:\fR .HP 23 \fB\fBTAU_DISABLE_GROUP_NAME\fR\fR\fB(\fR\fBchar\ *\fR\fB\fIgroupname\fR\fR\fB);\fR .PP \fBFortran:\fR .HP 23 \fB\fBTAU_DISABLE_GROUP_NAME\fR\fR\fB(\fR\fBcharacter\ \fR\fB\fIgroupname\fR\fR\fB(size)\fR\fB);\fR .SH "DESCRIPTION" .PP Similar to TAU_ENABLE_GROUP_NAME , this macro turns off the instrumentation in all routines associated with the dynamic group created using the tau_instrumentor \-g argument. .SH "EXAMPLE" .PP \fBC/C++ :\fR .sp .nf /* tau_instrumentor was invoked with \-g DTM for a set of files */ TAU_DISABLE_GROUP_NAME("DTM"); dtm_routines(); /* disable and then re\-enable the group with the name DTM */ TAU_ENABLE_GROUP_NAME("DTM"); .fi .PP \fBFortran :\fR .sp .nf ! tau_instrumentor was invoked with \-g DTM for this file call TAU_PROFILE_TIMER(profiler, "ITERATE>DTM") call TAU_DISABLE_GROUP_NAME("DTM") ! Disable, then re\-enable DTM group call TAU_ENABLE_GROUP_NAME("DTM") .fi .SH "SEE ALSO" .PP TAU_GET_PROFILE_GROUP(3), TAU_ENABLE_GROUP_NAME(3), TAU_ENABLE_ALL_GROUPS(3), TAU_DISABLE_ALL_GROUPS(3) tau-2.16.4/man/man3/TAU_DISABLE_INSTRUMENTATION.3000066400000000000000000000027411062343042700202360ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU_DISABLE_INSTRUME" "3" "08/31/2005" "" "TAU Instrumentation API" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" TAU_DISABLE_INSTRUMENTATION \- Disables instrumentation .SH "SYNOPSIS" .PP \fBC/C++:\fR .HP 28 \fB\fBTAU_DISABLE_INSTRUMENTATION\fR\fR\fB(\fR\fBvoid);\fR .PP \fBFortran:\fR .HP 28 \fB\fBTAU_DISABLE_INSTRUMENTATION\fR\fR\fB(\fR\fBvoid);\fR .SH "DESCRIPTION" .PP TAU_DISABLE_INSTRUMENTATION macro disables all entry/exit instrumentation within all threads of a context. This allows the user to selectively enable and disable instrumentation in parts of his/her code. It is important to re\-enable the instrumentation within the same basic block and scope. .SH "EXAMPLE" .PP \fBC/C++ :\fR .sp .nf int main(int argc, char **argv) { foo(); TAU_DISABLE_INSTRUMENTATION(); for (int i =0; i < N; i++) { bar(); // not recorded } TAU_DISABLE_INSTRUMENTATION(); bar(); // recorded } .fi .PP \fBFortran :\fR .sp .nf call TAU_DISABLE_INSTRUMENTATION() ... call TAU_DISABLE_INSTRUMENTATION() .fi .SH "SEE ALSO" .PP TAU_ENABLE_INSTRUMENTATION(3), TAU_ENABLE_GROUP(3), TAU_DISABLE_GROUP(3), TAU_INIT(3), TAU_PROFILE_INIT(3) tau-2.16.4/man/man3/TAU_DISABLE_TRACKING_MEMORY.3000066400000000000000000000022551062343042700202250ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU_DISABLE_TRACKING" "3" "08/31/2005" "" "TAU Instrumentation API" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" TAU_DISABLE_TRACKING_MEMORY \- Disables memory tracking .SH "SYNOPSIS" .PP \fBC/C++:\fR .HP 28 \fB\fBTAU_DISABLE_TRACKING_MEMORY\fR\fR\fB(\fR\fBvoid);\fR .PP \fBFortran:\fR .HP 28 \fB\fBTAU_DISABLE_TRACKING_MEMORY\fR\fR\fB(\fR\fBvoid);\fR .SH "DESCRIPTION" .PP Disables tracking of heap memory utilization. This call may be used in sections of code where TAU should not interrupt the execution to periodically track the heap memory utilization. .SH "EXAMPLE" .PP \fBC/C++ :\fR .sp .nf TAU_DISABLE_TRACKING_MEMORY(); .fi .PP \fBFortran :\fR .sp .nf call TAU_DISABLE_TRACKING_MEMORY() .fi .SH "SEE ALSO" .PP TAU_ENABLE_TRACKING_MEMORY(3), TAU_SET_INTERRUPT_INTERVAL(3), TAU_TRACK_MEMORY(3), TAU_TRACK_MEMORY_HERE(3) tau-2.16.4/man/man3/TAU_DISABLE_TRACKING_MEMORY_HEADROOM.3000066400000000000000000000022121062343042700214740ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU_DISABLE_TRACKING" "3" "08/31/2005" "" "TAU Instrumentation API" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" TAU_DISABLE_TRACKING_MEMORY_HEADROOM \- Disables memory headroom tracking .SH "SYNOPSIS" .PP \fBC/C++:\fR .HP 37 \fB\fBTAU_DISABLE_TRACKING_MEMORY_HEADROOM\fR\fR\fB(\fR\fBvoid);\fR .PP \fBFortran:\fR .HP 37 \fB\fBTAU_DISABLE_TRACKING_MEMORY_HEADROOM\fR\fR\fB(\fR\fBvoid);\fR .SH "DESCRIPTION" .PP TAU_DISABLE_TRACKING_MEMORY_HEADROOM() disables memory headroom tracking. .SH "EXAMPLE" .PP \fBC/C++ :\fR .sp .nf TAU_DISABLE_TRACKING_MEMORY_HEADROOM(); .fi .PP \fBFortran :\fR .sp .nf call TAU_DISABLE_TRACKING_MEMORY_HEADROOM() .fi .SH "SEE ALSO" .PP TAU_TRACK_MEMORY_HEADROOM(3), TAU_ENABLE_TRACKING_MEMORY_HEADROOM(3), TAU_TRACK_MEMORY_HEADROOM_HERE(3), TAU_SET_INTERRUPT_INTERVAL(3) tau-2.16.4/man/man3/TAU_DUMP_FUNC_NAMES.3000066400000000000000000000015701062343042700171120ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU_DUMP_FUNC_NAMES" "3" "08/31/2005" "" "TAU Instrumentation API" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" TAU_DUMP_FUNC_NAMES \- Dumps function names to disk .SH "SYNOPSIS" .PP \fBC/C++:\fR .HP 20 \fB\fBTAU_DUMP_FUNC_NAMES\fR\fR\fB(\fR\fBvoid);\fR .SH "DESCRIPTION" .PP This macro writes the names of active functions to a file named dump_functionnames_.. .SH "EXAMPLE" .PP \fBC/C++ :\fR .sp .nf TAU_DUMP_FUNC_NAMES(); .fi .SH "SEE ALSO" .PP TAU_DB_DUMP(3), TAU_DUMP_FUNC_VALS(3), TAU_DUMP_FUNC_VALS_INCR(3) tau-2.16.4/man/man3/TAU_DUMP_FUNC_VALS.3000066400000000000000000000017561062343042700170220ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU_DUMP_FUNC_VALS" "3" "08/31/2005" "" "TAU Instrumentation API" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" TAU_DUMP_FUNC_VALS \- Dumps performance data for given functions to disk. .SH "SYNOPSIS" .PP \fBC/C++:\fR .HP 19 \fB\fBTAU_DUMP_FUNC_VALS\fR\fR\fB(\fR\fBchar\ **\fR\fB\fIinFuncs\fR\fR\fB, \fR\fBint\ \fR\fB\fInumFuncs\fR\fR\fB);\fR .SH "DESCRIPTION" .PP TAU_DUMP_FUNC_VALS writes the data associated with the routines listed in inFuncs to disk. The number of routines is specified by the user in numFuncs. .SH "EXAMPLE" .PP \fBC/C++ :\fR .sp .nf .fi .SH "SEE ALSO" .PP TAU_DB_DUMP(3), TAU_DUMP_FUNC_NAMES(3), TAU_DUMP_FUNC_VALS_INCR(3) tau-2.16.4/man/man3/TAU_DUMP_FUNC_VALS_INCR.3000066400000000000000000000030561062343042700176300ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU_DUMP_FUNC_VALS_I" "3" "08/31/2005" "" "TAU Instrumentation API" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" TAU_DUMP_FUNC_VALS_INCR \- Dumps function values with a timestamp .SH "SYNOPSIS" .PP \fBC/C++:\fR .HP 24 \fB\fBTAU_DUMP_FUNC_VALS_INCR\fR\fR\fB(\fR\fBchar\ **\fR\fB\fIinFuncs\fR\fR\fB, \fR\fBint\ \fR\fB\fInumFuncs\fR\fR\fB);\fR .SH "DESCRIPTION" .PP Similar to TAU_DUMP_FUNC_VALS. This macro creates an incremental selective dump and dumps the results with a date stamp to the filename such as sel_dump__Thu\-Mar\-28\-16:30:48\-2002__.0.0.0. In this manner the previous TAU_DUMP_FUNC_VALS_INCR(...) are not overwritten (unless they occur within a second). .SH "EXAMPLE" .PP \fBC/C++ :\fR .sp .nf const char **inFuncs; /* The first dimension is functions, and the second dimension is counters */ double **counterExclusiveValues; double **counterInclusiveValues; int *numOfCalls; int *numOfSubRoutines; const char **counterNames; int numOfCouns; TAU_GET_FUNC_VALS(inFuncs, 2, counterExclusiveValues, counterInclusiveValues, numOfCalls, numOfSubRoutines, counterNames, numOfCouns); TAU_DUMP_FUNC_VALS(inFuncs, 2); .fi .SH "SEE ALSO" .PP TAU_DB_DUMP(3), TAU_DUMP_FUNC_NAMES(3), TAU_DUMP_FUNC_VALS(3) tau-2.16.4/man/man3/TAU_ENABLE_ALL_GROUPS.3000066400000000000000000000020241062343042700173170ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU_ENABLE_ALL_GROUP" "3" "08/31/2005" "" "TAU Instrumentation API" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" TAU_ENABLE_ALL_GROUPS \- Enables instrumentation in all groups .SH "SYNOPSIS" .PP \fBC/C++:\fR .HP 22 \fB\fBTAU_ENABLE_ALL_GROUPS\fR\fR\fB(\fR\fBvoid);\fR .PP \fBFortran:\fR .HP 22 \fB\fBTAU_ENABLE_ALL_GROUPS\fR\fR\fB(\fR\fBvoid);\fR .SH "DESCRIPTION" .PP This macro turns on instrumentation in all groups .SH "EXAMPLE" .PP \fBC/C++ :\fR .sp .nf TAU_ENABLE_ALL_GROUPS(); .fi .PP \fBFortran :\fR .sp .nf call TAU_ENABLE_ALL_GROUPS(); .fi .SH "SEE ALSO" .PP TAU_GET_PROFILE_GROUP(3), TAU_ENABLE_GROUP_NAME(3), TAU_DISABLE_GROUP_NAME(3), TAU_DISABLE_ALL_GROUPS(3) tau-2.16.4/man/man3/TAU_ENABLE_CONTEXT_EVENT.3000066400000000000000000000022771062343042700177070ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU_ENABLE_CONTEXT_E" "3" "08/31/2005" "" "TAU Instrumentation API" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" TAU_ENABLE_CONTEXT_EVENT \- Enable a context event .SH "SYNOPSIS" .PP \fBC/C++:\fR .HP 25 \fB\fBTAU_ENABLE_CONTEXT_EVENT\fR\fR\fB(\fR\fBTauUserEvent\ \fR\fB\fIevent\fR\fR\fB);\fR .SH "DESCRIPTION" .PP Enables a context event. .SH "EXAMPLE" .PP \fBC/C++ :\fR .sp .nf int f2(void) { static int count = 0; count ++; TAU_PROFILE("f2()", "(sleeps 2 sec, calls f3)", TAU_USER); TAU_REGISTER_CONTEXT_EVENT(event, "Iteration count"); if (count == 2) TAU_DISABLE_CONTEXT_EVENT(event); else TAU_ENABLE_CONTEXT_EVENT(event); printf("Inside f2: sleeps 2 sec, calls f3\\n"); TAU_CONTEXT_EVENT(event, 232+count); sleep(2); f3(); return 0; } .fi .SH "SEE ALSO" .PP TAU_REGISTER_CONTEXT_EVENT(3), TAU_DISABLE_CONTEXT_EVENT(3) tau-2.16.4/man/man3/TAU_ENABLE_GROUP.3000066400000000000000000000022751062343042700165140ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU_ENABLE_GROUP" "3" "08/31/2005" "" "TAU Instrumentation API" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" TAU_ENABLE_GROUP \- Enables tracking of a given group .SH "SYNOPSIS" .PP \fBC/C++:\fR .HP 17 \fB\fBTAU_ENABLE_GROUP\fR\fR\fB(\fR\fBTauGroup_t\ \fR\fB\fIgroup\fR\fR\fB);\fR .PP \fBFortran:\fR .HP 17 \fB\fBTAU_ENABLE_GROUP\fR\fR\fB(\fR\fBinteger\ \fR\fB\fIgroup\fR\fR\fB);\fR .SH "DESCRIPTION" .PP Enables the instrumentation for a given group. By default, it is already on. .SH "EXAMPLE" .PP \fBC/C++ :\fR .sp .nf void foo() { TAU_PROFILE("foo()", " ", TAU_USER); ... TAU_ENABLE_GROUP(TAU_USER); } .fi .PP \fBFortran :\fR .sp .nf include 'Profile/TauFAPI.h' call TAU_ENABLE_GROUP(TAU_USER) .fi .SH "SEE ALSO" .PP TAU_ENABLE_INSTRUMENTATION(3), TAU_DISABLE_INSTRUMENTATION(3), TAU_DISABLE_GROUP(3), TAU_INIT(3), TAU_PROFILE_INIT(3) tau-2.16.4/man/man3/TAU_ENABLE_GROUP_NAME.3000066400000000000000000000032431062343042700173100ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU_ENABLE_GROUP_NAM" "3" "08/31/2005" "" "TAU Instrumentation API" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" TAU_ENABLE_GROUP_NAME \- Enables a group based on name .SH "SYNOPSIS" .PP \fBC/C++:\fR .HP 22 \fB\fBTAU_ENABLE_GROUP_NAME\fR\fR\fB(\fR\fBchar\ *\fR\fB\fIgroupname\fR\fR\fB);\fR .PP \fBFortran:\fR .HP 22 \fB\fBTAU_ENABLE_GROUP_NAME\fR\fR\fB(\fR\fBcharacter\ \fR\fB\fIgroupname\fR\fR\fB(size)\fR\fB);\fR .SH "DESCRIPTION" .PP TAU_ENABLE_GROUP_NAME macro can turn on the instrumentation associated with routines based on a dynamic group assigned to them. It is important to note that this and the TAU_DISABLE_GROUP_NAME macros apply to groups created dynamically using TAU_GET_PROFILE_GROUP. .SH "EXAMPLE" .PP \fBC/C++ :\fR .sp .nf /* tau_instrumentor was invoked with \-g DTM for a set of files */ TAU_DISABLE_GROUP_NAME("DTM"); dtm_routines(); /* disable and then re\-enable the group with the name DTM */ TAU_ENABLE_GROUP_NAME("DTM"); .fi .PP \fBFortran :\fR .sp .nf ! tau_instrumentor was invoked with \-g DTM for this file call TAU_PROFILE_TIMER(profiler, "ITERATE>DTM") call TAU_DISABLE_GROUP_NAME("DTM") ! Disable, then re\-enable DTM group call TAU_ENABLE_GROUP_NAME("DTM") .fi .SH "SEE ALSO" .PP TAU_GET_PROFILE_GROUP(3), TAU_DISABLE_GROUP_NAME(3), TAU_ENABLE_ALL_GROUPS(3), TAU_DISABLE_ALL_GROUPS(3) tau-2.16.4/man/man3/TAU_ENABLE_INSTRUMENTATION.3000066400000000000000000000030511062343042700201140ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU_ENABLE_INSTRUMEN" "3" "08/31/2005" "" "TAU Instrumentation API" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" TAU_ENABLE_INSTRUMENTATION \- Enables instrumentation .SH "SYNOPSIS" .PP \fBC/C++:\fR .HP 27 \fB\fBTAU_ENABLE_INSTRUMENTATION\fR\fR\fB(\fR\fBvoid);\fR .PP \fBFortran:\fR .HP 27 \fB\fBTAU_ENABLE_INSTRUMENTATION\fR\fR\fB(\fR\fBvoid);\fR .SH "DESCRIPTION" .PP TAU_ENABLE_INSTRUMENTATION macro re\-enables all TAU instrumentation. All instances of functions and statements that occur between the disable/enable section are ignored by TAU. This allows a user to limit the trace size, if the macros are used to disable recording of a set of iterations that have the same characteristics as, for example, the first recorded instance. .SH "EXAMPLE" .PP \fBC/C++ :\fR .sp .nf int main(int argc, char **argv) { foo(); TAU_DISABLE_INSTRUMENTATION(); for (int i =0; i < N; i++) { bar(); // not recorded } TAU_ENABLE_INSTRUMENTATION(); bar(); // recorded } .fi .PP \fBFortran :\fR .sp .nf call TAU_DISABLE_INSTRUMENTATION() ... call TAU_ENABLE_INSTRUMENTATION() .fi .SH "SEE ALSO" .PP TAU_DISABLE_INSTRUMENTATION(3), TAU_ENABLE_GROUP(3), TAU_DISABLE_GROUP(3), TAU_INIT(3), TAU_PROFILE_INIT(3) tau-2.16.4/man/man3/TAU_ENABLE_TRACKING_MEMORY.3000066400000000000000000000026641062343042700201140ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU_ENABLE_TRACKING_" "3" "08/31/2005" "" "TAU Instrumentation API" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" TAU_ENABLE_TRACKING_MEMORY \- Enables memory tracking .SH "SYNOPSIS" .PP \fBC/C++:\fR .HP 27 \fB\fBTAU_ENABLE_TRACKING_MEMORY\fR\fR\fB(\fR\fBvoid);\fR .PP \fBFortran:\fR .HP 27 \fB\fBTAU_ENABLE_TRACKING_MEMORY\fR\fR\fB(\fR\fBvoid);\fR .SH "DESCRIPTION" .PP Enables tracking of the heap memory utilization in the program. TAU takes a sample of the heap memory utilized (as reported by the mallinfo system call) and associates it with a single global user defined event. An interrupt is generated every 10 seconds and the value of the heap memory used is recorded in the user defined event. The inter\-interrupt interval (default of 10 seconds) may be set by the user using the call TAU_SET_INTERRUPT_INTERVAL. .SH "EXAMPLE" .PP \fBC/C++ :\fR .sp .nf TAU_ENABLE_TRACKING_MEMORY(); .fi .PP \fBFortran :\fR .sp .nf call TAU_ENABLE_TRACKING_MEMORY() .fi .SH "SEE ALSO" .PP TAU_DISABLE_TRACKING_MEMORY(3), TAU_SET_INTERRUPT_INTERVAL(3), TAU_TRACK_MEMORY(3), TAU_TRACK_MEMORY_HERE(3) tau-2.16.4/man/man3/TAU_ENABLE_TRACKING_MEMORY_HEADROOM.3000066400000000000000000000024341062343042700213650ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU_ENABLE_TRACKING_" "3" "08/31/2005" "" "TAU Instrumentation API" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" TAU_ENABLE_TRACKING_MEMORY_HEADROOM \- Enables memory headroom tracking .SH "SYNOPSIS" .PP \fBC/C++:\fR .HP 36 \fB\fBTAU_ENABLE_TRACKING_MEMORY_HEADROOM\fR\fR\fB(\fR\fBvoid);\fR .PP \fBFortran:\fR .HP 36 \fB\fBTAU_ENABLE_TRACKING_MEMORY_HEADROOM\fR\fR\fB(\fR\fBvoid);\fR .SH "DESCRIPTION" .PP TAU_ENABLE_TRACKING_MEMORY_HEADROOM() enables memory headroom tracking after a TAU_DISABLE_TRACKING_MEMORY_HEADROOM(). .SH "EXAMPLE" .PP \fBC/C++ :\fR .sp .nf TAU_DISABLE_TRACKING_MEMORY_HEADROOM(); /* do some work */ ... /* re\-enable tracking memory headroom */ TAU_ENABLE_TRACKING_MEMORY_HEADROOM(); .fi .PP \fBFortran :\fR .sp .nf call TAU_ENABLE_TRACKING_MEMORY_HEADROOM(); .fi .SH "SEE ALSO" .PP TAU_TRACK_MEMORY_HEADROOM(3), TAU_DISABLE_TRACKING_MEMORY_HEADROOM(3), TAU_TRACK_MEMORY_HEADROOM_HERE(3), TAU_SET_INTERRUPT_INTERVAL(3) tau-2.16.4/man/man3/TAU_EVENT.3000066400000000000000000000023331062343042700154660ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU_EVENT" "3" "08/31/2005" "" "TAU Instrumentation API" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" TAU_EVENT \- Triggers a user event .SH "SYNOPSIS" .PP \fBC/C++:\fR .HP 10 \fB\fBTAU_EVENT\fR\fR\fB(\fR\fBTauUserEvent\ \fR\fB\fIvariable\fR\fR\fB, \fR\fBdouble\ \fR\fB\fIvalue\fR\fR\fB);\fR .PP \fBFortran:\fR .HP 10 \fB\fBTAU_EVENT\fR\fR\fB(\fR\fBinteger\ \fR\fB\fIvariable\fR\fR\fB(2)\fR\fB, \fR\fBreal\ \fR\fB\fIvalue\fR\fR\fB);\fR .SH "DESCRIPTION" .PP Triggers an event that was registered with TAU_REGISTER_EVENT. .SH "EXAMPLE" .PP \fBC/C++ :\fR .sp .nf int user_square(int count) { TAU_REGISTER_EVENT(ue1, "UserSquare Event"); TAU_EVENT(ue1, count * count); return 0; } .fi .PP \fBFortran :\fR .sp .nf integer eventid(2) save eventid call TAU_REGISTER_EVENT(eventid, 'Error in Iteration') call TAU_EVENT(eventid, count) .fi .SH "SEE ALSO" .PP TAU_REGISTER_EVENT(3) tau-2.16.4/man/man3/TAU_EVENT_DISABLE_MAX.3000066400000000000000000000015511062343042700173170ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU_EVENT_DISABLE_MA" "3" "08/31/2005" "" "TAU Instrumentation API" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" TAU_EVENT_DISABLE_MAX \- Disables tracking of maximum statistic for a given event .SH "SYNOPSIS" .PP \fBC/C++:\fR .HP 22 \fB\fBTAU_EVENT_DISABLE_MAX\fR\fR\fB(\fR\fBTauUserEvent\ \fR\fB\fIevent\fR\fR\fB);\fR .SH "DESCRIPTION" .PP Disables tracking of maximum statistic for a given event .SH "EXAMPLE" .PP \fBC/C++ :\fR .sp .nf TAU_EVENT_DISABLE_MAX(event); .fi .SH "SEE ALSO" .PP TAU_REGISTER_EVENT(3) tau-2.16.4/man/man3/TAU_EVENT_DISABLE_MEAN.3000066400000000000000000000015461062343042700174160ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU_EVENT_DISABLE_ME" "3" "08/31/2005" "" "TAU Instrumentation API" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" TAU_EVENT_DISABLE_MEAN \- Disables tracking of mean statistic for a given event .SH "SYNOPSIS" .PP \fBC/C++:\fR .HP 23 \fB\fBTAU_EVENT_DISABLE_MEAN\fR\fR\fB(\fR\fBTauUserEvent\ \fR\fB\fIevent\fR\fR\fB);\fR .SH "DESCRIPTION" .PP Disables tracking of mean statistic for a given event .SH "EXAMPLE" .PP \fBC/C++ :\fR .sp .nf TAU_EVENT_DISABLE_MEAN(event); .fi .SH "SEE ALSO" .PP TAU_REGISTER_EVENT(3) tau-2.16.4/man/man3/TAU_EVENT_DISABLE_MIN.3000066400000000000000000000015511062343042700173150ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU_EVENT_DISABLE_MI" "3" "08/31/2005" "" "TAU Instrumentation API" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" TAU_EVENT_DISABLE_MIN \- Disables tracking of minimum statistic for a given event .SH "SYNOPSIS" .PP \fBC/C++:\fR .HP 22 \fB\fBTAU_EVENT_DISABLE_MIN\fR\fR\fB(\fR\fBTauUserEvent\ \fR\fB\fIevent\fR\fR\fB);\fR .SH "DESCRIPTION" .PP Disables tracking of minimum statistic for a given event .SH "EXAMPLE" .PP \fBC/C++ :\fR .sp .nf TAU_EVENT_DISABLE_MIN(event); .fi .SH "SEE ALSO" .PP TAU_REGISTER_EVENT(3) tau-2.16.4/man/man3/TAU_EVENT_DISABLE_STDDEV.3000066400000000000000000000016101062343042700176570ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU_EVENT_DISABLE_ST" "3" "08/31/2005" "" "TAU Instrumentation API" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" TAU_EVENT_DISABLE_STDDEV \- Disables tracking of standard deviation statistic for a given event .SH "SYNOPSIS" .PP \fBC/C++:\fR .HP 25 \fB\fBTAU_EVENT_DISABLE_STDDEV\fR\fR\fB(\fR\fBTauUserEvent\ \fR\fB\fIevent\fR\fR\fB);\fR .SH "DESCRIPTION" .PP Disables tracking of standard deviation statistic for a given event .SH "EXAMPLE" .PP \fBC/C++ :\fR .sp .nf TAU_EVENT_DISABLE_STDDEV(event); .fi .SH "SEE ALSO" .PP TAU_REGISTER_EVENT(3) tau-2.16.4/man/man3/TAU_EVENT_SET_NAME.3000066400000000000000000000015341062343042700170030ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU_EVENT_SET_NAME" "3" "08/31/2005" "" "TAU Instrumentation API" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" TAU_EVENT_SET_NAME \- Sets the name of an event .SH "SYNOPSIS" .PP \fBC/C++:\fR .HP 19 \fB\fBTAU_EVENT_SET_NAME\fR\fR\fB(\fR\fBTauUserEvent\ \fR\fB\fIevent\fR\fR\fB, \fR\fBconst\ char\ *\fR\fB\fIname\fR\fR\fB);\fR .SH "DESCRIPTION" .PP Changes the name of an event. .SH "EXAMPLE" .PP \fBC/C++ :\fR .sp .nf TAU_EVENT_SET_NAME(event, "new name"); .fi .SH "SEE ALSO" .PP TAU_REGISTER_EVENT(3) tau-2.16.4/man/man3/TAU_GET_COUNTER_NAMES.3000066400000000000000000000022571062343042700173530ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU_GET_COUNTER_NAME" "3" "08/31/2005" "" "TAU Instrumentation API" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" TAU_GET_COUNTER_NAMES \- Gets the counter names .SH "SYNOPSIS" .PP \fBC/C++:\fR .HP 22 \fB\fBTAU_GET_COUNTER_NAMES\fR\fR\fB(\fR\fBchar\ **\fR\fB\fIcounterList\fR\fR\fB, \fR\fBint\ \fR\fB\fInumCounters\fR\fR\fB);\fR .SH "DESCRIPTION" .PP TAU_GET_COUNTER_NAMES returns the list of counter names and the number of counters used for measurement. When wallclock time is used, the counter name of "default" is returned. .SH "EXAMPLE" .PP \fBC/C++ :\fR .sp .nf int numOfCounters; const char ** counterList; TAU_GET_COUNTER_NAMES(counterList, numOfCounters); for(int j=0;j 0) { int *numSamples; double *max; double *min; double *mean; double *sumSqr; TAU_GET_EVENT_VALS(eventList, numEvents, numSamples, max, min, mean, sumSqr); for (int i=0; i=2 ) { inFuncs = (const char **) malloc(sizeof(const char *) * 2); inFuncs[0] = functionList[0]; inFuncs[1] = functionList[1]; //Just to show consistency. TAU_DB_DUMP(); TAU_GET_FUNC_VALS(inFuncs, 2, counterExclusiveValues, counterInclusiveValues, numOfCalls, numOfSubRoutines, counterNames, numOfCouns); TAU_DUMP_FUNC_VALS_INCR(inFuncs, 2); cout << "@@@@@@@@@@@@@@@" << endl; cout << "The number of counters is: " << numOfCouns << endl; cout << "The first counter is: " << counterNames[0] << endl; cout << "The Exclusive value of: " << inFuncs[0] << " is: " << counterExclusiveValues[0][0] << endl; cout << "The numOfSubRoutines of: " << inFuncs[0] << " is: " << numOfSubRoutines[0] << endl; cout << "The Inclusive value of: " << inFuncs[1] << " is: " << counterInclusiveValues[1][0] << endl; cout << "The numOfCalls of: " << inFuncs[1] << " is: " << numOfCalls[1] << endl; cout << "@@@@@@@@@@@@@@@" << endl; } TAU_DB_DUMP_INCR(); .fi .SH "SEE ALSO" .PP TAU_GET_COUNTER_NAMES(3), TAU_GET_FUNC_NAMES(3), TAU_DUMP_FUNC_NAMES(3), TAU_DUMP_FUNC_VALS(3) tau-2.16.4/man/man3/TAU_GET_PROFILE_GROUP.3000066400000000000000000000024431062343042700173620ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU_GET_PROFILE_GROU" "3" "08/31/2005" "" "TAU Instrumentation API" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" TAU_GET_PROFILE_GROUP \- Creates groups based on names .SH "SYNOPSIS" .PP \fBC/C++:\fR .HP 22 \fB\fBTAU_GET_PROFILE_GROUP\fR\fR\fB(\fR\fBchar\ *\fR\fB\fIgroupname\fR\fR\fB);\fR .SH "DESCRIPTION" .PP TAU_GET_PROFILE_GROUP allows the user to dynamically create groups based on strings, rather than use predefined, statically assigned groups such as TAU_USER1, TAU_USER2 etc. This allows names to be associated in creating unique groups that are more meaningful, using names of files or directories for instance. .SH "EXAMPLE" .PP \fBC/C++ :\fR .sp .nf #define PARTICLES TAU_GET_PROFILE_GROUP("PARTICLES") void foo() { TAU_PROFILE("foo()", " ", PARTICLES); } void bar() { TAU_PROFILE("bar()", " ", PARTICLES); } .fi .SH "SEE ALSO" .PP TAU_ENABLE_GROUP_NAME(3), TAU_DISABLE_GROUP_NAME(3), TAU_ENABLE_ALL_GROUPS(3), TAU_DISABLE_ALL_GROUPS(3) tau-2.16.4/man/man3/TAU_GLOBAL_PHASE.3000066400000000000000000000022631062343042700164670ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU_GLOBAL_PHASE" "3" "08/31/2005" "" "TAU Instrumentation API" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" TAU_GLOBAL_PHASE \- Declares a global phase .SH "SYNOPSIS" .PP \fBC/C++:\fR .HP 17 \fB\fBTAU_GLOBAL_PHASE\fR\fR\fB(\fR\fBPhase\ \fR\fB\fIphase\fR\fR\fB, \fR\fBchar*\ or\ string&\ \fR\fB\fIfunction_name\fR\fR\fB, \fR\fBchar*\ or\ string&\ \fR\fB\fItype\fR\fR\fB, \fR\fBTauGroup_t\ \fR\fB\fIgroup\fR\fR\fB);\fR .SH "DESCRIPTION" .PP Declares a global phase to be used in multiple compilation units. .SH "EXAMPLE" .PP \fBC/C++ :\fR .sp .nf /* f1.c */ TAU_GLOBAL_PHASE(globalPhase, "global phase", "", TAU_USER); /* f2.c */ int bar(void) { TAU_GLOBAL_PHASE_START(globalPhase); /* ... */ TAU_GLOBAL_PHASE_STOP(globalPhase); } .fi .SH "SEE ALSO" .PP TAU_GLOBAL_PHASE_EXTERNAL(3), TAU_GLOBAL_PHASE_START(3), TAU_GLOBAL_PHASE_STOP(3) tau-2.16.4/man/man3/TAU_GLOBAL_PHASE_EXTERNAL.3000066400000000000000000000021471062343042700177720ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU_GLOBAL_PHASE_EXT" "3" "08/31/2005" "" "TAU Instrumentation API" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" TAU_GLOBAL_PHASE_EXTERNAL \- Declares a global phase from an external compilation unit .SH "SYNOPSIS" .PP \fBC/C++:\fR .HP 26 \fB\fBTAU_GLOBAL_PHASE_EXTERNAL\fR\fR\fB(\fR\fBProfiler\ \fR\fB\fItimer\fR\fR\fB);\fR .SH "DESCRIPTION" .PP TAU_GLOBAL_PHASE_EXTERNAL allows you to access a phase defined in another compilation unit. .SH "EXAMPLE" .PP \fBC/C++ :\fR .sp .nf /* f1.c */ TAU_GLOBAL_PHASE(globalPhase, "global phase", "", TAU_USER); /* f2.c */ int bar(void) { TAU_GLOBAL_PHASE_START(globalPhase); /* ... */ TAU_GLOBAL_PHASE_STOP(globalPhase); } .fi .SH "SEE ALSO" .PP TAU_GLOBAL_PHASE(3), TAU_GLOBAL_PHASE_START(3), TAU_GLOBAL_PHASE_STOP(3) tau-2.16.4/man/man3/TAU_GLOBAL_PHASE_START.3000066400000000000000000000020171062343042700174410ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU_GLOBAL_PHASE_STA" "3" "08/31/2005" "" "TAU Instrumentation API" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" TAU_GLOBAL_PHASE_START \- Starts a global phase .SH "SYNOPSIS" .PP \fBC/C++:\fR .HP 23 \fB\fBTAU_GLOBAL_PHASE_START\fR\fR\fB(\fR\fBPhase\ \fR\fB\fIphase\fR\fR\fB);\fR .SH "DESCRIPTION" .PP TAU_GLOBAL_PHASE_START starts a global phase. .SH "EXAMPLE" .PP \fBC/C++ :\fR .sp .nf /* f1.c */ TAU_GLOBAL_PHASE(globalPhase, "global phase", "", TAU_USER); /* f2.c */ int bar(void) { TAU_GLOBAL_PHASE_START(globalPhase); /* ... */ TAU_GLOBAL_PHASE_STOP(globalPhase); } .fi .SH "SEE ALSO" .PP TAU_GLOBAL_PHASE(3), TAU_GLOBAL_PHASE_EXTERNAL(3), TAU_GLOBAL_PHASE_STOP(3) tau-2.16.4/man/man3/TAU_GLOBAL_PHASE_STOP.3000066400000000000000000000020121062343042700173240ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU_GLOBAL_PHASE_STO" "3" "08/31/2005" "" "TAU Instrumentation API" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" TAU_GLOBAL_PHASE_STOP \- Stops a global phase .SH "SYNOPSIS" .PP \fBC/C++:\fR .HP 22 \fB\fBTAU_GLOBAL_PHASE_STOP\fR\fR\fB(\fR\fBPhase\ \fR\fB\fIphase\fR\fR\fB);\fR .SH "DESCRIPTION" .PP TAU_GLOBAL_PHASE_STOP stops a global phase. .SH "EXAMPLE" .PP \fBC/C++ :\fR .sp .nf /* f1.c */ TAU_GLOBAL_PHASE(globalPhase, "global phase", "", TAU_USER); /* f2.c */ int bar(void) { TAU_GLOBAL_PHASE_STOP(globalPhase); /* ... */ TAU_GLOBAL_PHASE_STOP(globalPhase); } .fi .SH "SEE ALSO" .PP TAU_GLOBAL_PHASE(3), TAU_GLOBAL_PHASE_EXTERNAL(3), TAU_GLOBAL_PHASE_START(3) tau-2.16.4/man/man3/TAU_GLOBAL_TIMER.3000066400000000000000000000024261062343042700165100ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU_GLOBAL_TIMER" "3" "08/31/2005" "" "TAU Instrumentation API" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" TAU_GLOBAL_TIMER \- Declares a global timer .SH "SYNOPSIS" .PP \fBC/C++:\fR .HP 17 \fB\fBTAU_GLOBAL_TIMER\fR\fR\fB(\fR\fBProfiler\ \fR\fB\fItimer\fR\fR\fB, \fR\fBchar*\ or\ string&\ \fR\fB\fIfunction_name\fR\fR\fB, \fR\fBchar*\ or\ string&\ \fR\fB\fItype\fR\fR\fB, \fR\fBTauGroup_t\ \fR\fB\fIgroup\fR\fR\fB);\fR .SH "DESCRIPTION" .PP As TAU_PROFILE_TIMER is used within the scope of a block (typically a routine), TAU_GLOBAL_TIMER can be used across different routines. .SH "EXAMPLE" .PP \fBC/C++ :\fR .sp .nf /* f1.c */ TAU_GLOBAL_TIMER(globalTimer, "global timer", "", TAU_USER); /* f2.c */ TAU_GLOBAL_TIMER_EXTERNAL(globalTimer); int foo(void) { TAU_GLOBAL_TIMER_START(globalTimer); /* ... */ TAU_GLOBAL_TIMER_STOP(); } .fi .SH "SEE ALSO" .PP TAU_GLOBAL_TIMER_EXTERNAL, TAU_GLOBAL_TIMER_START(3), TAU_GLOBAL_TIMER_STOP(3) tau-2.16.4/man/man3/TAU_GLOBAL_TIMER_EXTERNAL.3000066400000000000000000000022041062343042700200040ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU_GLOBAL_TIMER_EXT" "3" "08/31/2005" "" "TAU Instrumentation API" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" TAU_GLOBAL_TIMER_EXTERNAL \- Declares a global timer from an external compilation unit .SH "SYNOPSIS" .PP \fBC/C++:\fR .HP 26 \fB\fBTAU_GLOBAL_TIMER_EXTERNAL\fR\fR\fB(\fR\fBProfiler\ \fR\fB\fItimer\fR\fR\fB);\fR .SH "DESCRIPTION" .PP TAU_GLOBAL_TIMER_EXTERNAL allows you to access a timer defined in another compilation unit. .SH "EXAMPLE" .PP \fBC/C++ :\fR .sp .nf /* f1.c */ TAU_GLOBAL_TIMER(globalTimer, "global timer", "", TAU_USER); /* f2.c */ TAU_GLOBAL_TIMER_EXTERNAL(globalTimer); int foo(void) { TAU_GLOBAL_TIMER_START(globalTimer); /* ... */ TAU_GLOBAL_TIMER_STOP(); } .fi .SH "SEE ALSO" .PP TAU_GLOBAL_TIMER(3), TAU_GLOBAL_TIMER_START(3), TAU_GLOBAL_TIMER_STOP(3) tau-2.16.4/man/man3/TAU_GLOBAL_TIMER_START.3000066400000000000000000000020541062343042700174620ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU_GLOBAL_TIMER_STA" "3" "08/31/2005" "" "TAU Instrumentation API" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" TAU_GLOBAL_TIMER_START \- Starts a global timer .SH "SYNOPSIS" .PP \fBC/C++:\fR .HP 23 \fB\fBTAU_GLOBAL_TIMER_START\fR\fR\fB(\fR\fBProfiler\ \fR\fB\fItimer\fR\fR\fB);\fR .SH "DESCRIPTION" .PP TAU_GLOBAL_TIMER_START starts a global timer. .SH "EXAMPLE" .PP \fBC/C++ :\fR .sp .nf /* f1.c */ TAU_GLOBAL_TIMER(globalTimer, "global timer", "", TAU_USER); /* f2.c */ TAU_GLOBAL_TIMER_EXTERNAL(globalTimer); int foo(void) { TAU_GLOBAL_TIMER_START(globalTimer); /* ... */ TAU_GLOBAL_TIMER_STOP(); } .fi .SH "SEE ALSO" .PP TAU_GLOBAL_TIMER(3), TAU_GLOBAL_TIMER_EXTERNAL, TAU_GLOBAL_TIMER_STOP(3) tau-2.16.4/man/man3/TAU_GLOBAL_TIMER_STOP.3000066400000000000000000000020131062343042700173450ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU_GLOBAL_TIMER_STO" "3" "08/31/2005" "" "TAU Instrumentation API" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" TAU_GLOBAL_TIMER_STOP \- Stops a global timer .SH "SYNOPSIS" .PP \fBC/C++:\fR .HP 22 \fB\fBTAU_GLOBAL_TIMER_STOP\fR\fR\fB(\fR\fBvoid);\fR .SH "DESCRIPTION" .PP TAU_GLOBAL_TIMER_STOP stops a global timer. .SH "EXAMPLE" .PP \fBC/C++ :\fR .sp .nf /* f1.c */ TAU_GLOBAL_TIMER(globalTimer, "global timer", "", TAU_USER); /* f2.c */ TAU_GLOBAL_TIMER_EXTERNAL(globalTimer); int foo(void) { TAU_GLOBAL_TIMER_START(globalTimer); /* ... */ TAU_GLOBAL_TIMER_STOP(); } .fi .SH "SEE ALSO" .PP TAU_GLOBAL_TIMER(3), TAU_GLOBAL_TIMER_EXTERNAL, TAU_GLOBAL_TIMER_START(3) tau-2.16.4/man/man3/TAU_INIT.3000066400000000000000000000023351062343042700153520ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU_INIT" "3" "08/31/2005" "" "TAU Instrumentation API" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" TAU_INIT \- Processes command\-line arguments for selective instrumentation .SH "SYNOPSIS" .PP \fBC/C++:\fR .HP 9 \fB\fBTAU_INIT\fR\fR\fB(\fR\fBint\ *\fR\fB\fIargc\fR\fR\fB, \fR\fBchar\ ***\fR\fB\fIargv\fR\fR\fB);\fR .SH "DESCRIPTION" .PP TAU_INIT parses and removes the command\-line arguments for the names of profile groups that are to be selectively enabled for instrumentation. By default, if this macro is not used, functions belonging to all profile groups are enabled. TAU_INIT differs from TAU_PROFILE_INIT only in the argument types. .SH "EXAMPLE" .PP \fBC/C++ :\fR .sp .nf int main(int argc, char **argv) { TAU_PROFILE("main()", "int (int, char **)", TAU_GROUP_12); TAU_INIT(&argc, &argv); ... } % ./a.out \-\-profile 12+14 .fi .SH "SEE ALSO" .PP TAU_PROFILE_INIT(3) tau-2.16.4/man/man3/TAU_MAPPING.3000066400000000000000000000023011062343042700156730ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU_MAPPING" "3" "08/31/2005" "" "TAU Mapping API" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" TAU_MAPPING \- Encapsulates a C++ statement for profiling .SH "SYNOPSIS" .PP \fBC/C++:\fR .HP 12 \fB\fBTAU_MAPPING\fR\fR\fB(\fR\fBstatement\ \fR\fB\fIstatement\fR\fR\fB, \fR\fBTauGroup_t\ \fR\fB\fIkey\fR\fR\fB);\fR .SH "DESCRIPTION" .PP TAU_MAPPING is used to encapsulate a C++ statement as a timer. A timer will be made, named by the statment, and will profile the statement. The key given can be used with TAU_MAPPING_LINK(3) to retrieve the timer. .SH "EXAMPLE" .PP \fBC/C++ :\fR .sp .nf int main(int argc, char **argv) { Array <2> A(N, N), B(N, N), C(N,N), D(N, N); // Original statement: // A = B + C + D; //Instrumented statement: TAU_MAPPING(A = B + C + D; , TAU_USER); ... } .fi .SH "SEE ALSO" .PP TAU_MAPPING_CREATE(3), TAU_MAPPING_LINK(3) tau-2.16.4/man/man3/TAU_MAPPING_CREATE.3000066400000000000000000000036141062343042700167260ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU_MAPPING_CREATE" "3" "08/31/2005" "" "TAU Mapping API" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" TAU_MAPPING_CREATE \- Creates a mapping .SH "SYNOPSIS" .PP \fBC/C++:\fR .HP 19 \fB\fBTAU_MAPPING_CREATE\fR\fR\fB(\fR\fBchar\ *\fR\fB\fIname\fR\fR\fB, \fR\fBchar\ *\fR\fB\fItype\fR\fR\fB, \fR\fBchar\ *\fR\fB\fIgroupname\fR\fR\fB, \fR\fBunsigned\ long\ \fR\fB\fIkey\fR\fR\fB, \fR\fBint\ \fR\fB\fItid\fR\fR\fB);\fR .SH "DESCRIPTION" .PP TAU_MAPPING_CREATE creates a mapping and associates it with the key that is specified. Later, this key may be used to retrieve the FunctionInfo object associated with this key for timing purposes. The thread identifier is specified in the tid parameter. .SH "EXAMPLE" .PP \fBC/C++ :\fR .sp .nf class MyClass { public: MyClass() { TAU_MAPPING_LINK(runtimer, TAU_USER); } ~MyClass() {} void Run(void) { TAU_MAPPING_PROFILE(runtimer); // For one object TAU_PROFILE("MyClass::Run()", " void (void)", TAU_USER1); cout <<"Sleeping for 2 secs..."< class ExpressionKernel : public Pooma::Iterate_t { public: typedef ExpressionKernel This_t; // // Construct from an Expr. // Build the kernel that will evaluate the expression on the // given domain. // Acquire locks on the data referred to by the expression. // ExpressionKernel(const LHS&,const Op&,const RHS&, Pooma::Scheduler_t&); virtual ~ExpressionKernel(); // Do the loop. virtual void run(); private: // The expression we will evaluate. LHS lhs_m; Op op_m; RHS rhs_m; TAU_MAPPING_OBJECT(TauMapFI) }; .fi .SH "SEE ALSO" .PP TAU_MAPPING_CREATE(3), TAU_MAPPING_LINK(3), TAU_MAPPING_PROFILE(3) tau-2.16.4/man/man3/TAU_MAPPING_PROFILE.3000066400000000000000000000032471062343042700170650ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU_MAPPING_PROFILE" "3" "08/31/2005" "" "TAU Mapping API" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" TAU_MAPPING_PROFILE \- Profiles a block based on a mapping .SH "SYNOPSIS" .PP \fBC/C++:\fR .HP 20 \fB\fBTAU_MAPPING_PROFILE\fR\fR\fB(\fR\fBFunctionInfo\ *\fR\fB\fIFuncIdVar\fR\fR\fB);\fR .SH "DESCRIPTION" .PP The TAU_MAPPING_PROFILE macro measures the time and attributes it to the statement mapped in TAU_MAPPING macro. It takes as its argument the identifier of the higher level statement that is stored using TAU_MAPPING_OBJECT and linked to the statement using TAU_MAPPING_LINK macros. TAU_MAPPING_PROFILE measures the time spent in the entire block in which it is invoked. For example, if the time spent in the run method of the class does work that must be associated with the higher\-level array expression, then, we can instrument it as follows: .SH "EXAMPLE" .PP \fBC/C++ :\fR .sp .nf // Evaluate the kernel // Just tell an InlineEvaluator to do it. template void ExpressionKernel::run() { TAU_MAPPING_PROFILE(TauMapFI) // Just evaluate the expression. KernelEvaluator().evalate(lhs_m,op_m,rhs_m); // we could release the locks here or in dtor } .fi .SH "SEE ALSO" .PP TAU_MAPPING_CREATE(3), TAU_MAPPING_LINK(3), TAU_MAPPING_OBJECT(3) tau-2.16.4/man/man3/TAU_MAPPING_PROFILE_START.3000066400000000000000000000030241062343042700200330ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU_MAPPING_PROFILE_" "3" "08/31/2005" "" "TAU Mapping API" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" TAU_MAPPING_PROFILE_START \- Starts a mapping timer .SH "SYNOPSIS" .PP \fBC/C++:\fR .HP 26 \fB\fBTAU_MAPPING_PROFILE_START\fR\fR\fB(\fR\fBProfiler\ \fR\fB\fItimer\fR\fR\fB, \fR\fBint\ \fR\fB\fItid\fR\fR\fB);\fR .SH "DESCRIPTION" .PP TAU_MAPPING_PROFILE_START starts the timer that is created using TAU_MAPPING_PROFILE_TIMER. This will measure the elapsed time in groups of statements, instead of the entire block. A corresponding stop statement stops the timer as described next. The thread identifier is specified in the tid parameter. .SH "EXAMPLE" .PP \fBC/C++ :\fR .sp .nf template void ExpressionKernel::run() { TAU_MAPPING_PROFILE_TIMER(timer, TauMapFI); printf("ExpressionKernel::run() this = 4854\\n", this); // Just evaluate the expression. TAU_MAPPING_PROFILE_START(timer); KernelEvaluator().evaluate(lhs_m, op_m, rhs_m); TAU_MAPPING_PROFILE_STOP(); // we could release the locks here instead of in the dtor. } .fi .SH "SEE ALSO" .PP TAU_MAPPING_PROFILE_TIMER(3), TAU_MAPPING_PROFILE_STOP(3) tau-2.16.4/man/man3/TAU_MAPPING_PROFILE_STOP.3000066400000000000000000000030201062343042700177170ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU_MAPPING_PROFILE_" "3" "08/31/2005" "" "TAU Mapping API" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" TAU_MAPPING_PROFILE_STOP \- Stops a mapping timer .SH "SYNOPSIS" .PP \fBC/C++:\fR .HP 25 \fB\fBTAU_MAPPING_PROFILE_STOP\fR\fR\fB(\fR\fBProfiler\ \fR\fB\fItimer\fR\fR\fB, \fR\fBint\ \fR\fB\fItid\fR\fR\fB);\fR .SH "DESCRIPTION" .PP TAU_MAPPING_PROFILE_STOP stops the timer that is created using TAU_MAPPING_PROFILE_TIMER. This will measure the elapsed time in groups of statements, instead of the entire block. A corresponding stop statement stops the timer as described next. The thread identifier is specified in the tid parameter. .SH "EXAMPLE" .PP \fBC/C++ :\fR .sp .nf template void ExpressionKernel::run() { TAU_MAPPING_PROFILE_TIMER(timer, TauMapFI); printf("ExpressionKernel::run() this = 4854\\n", this); // Just evaluate the expression. TAU_MAPPING_PROFILE_START(timer); KernelEvaluator().evaluate(lhs_m, op_m, rhs_m); TAU_MAPPING_PROFILE_STOP(); // we could release the locks here instead of in the dtor. } .fi .SH "SEE ALSO" .PP TAU_MAPPING_PROFILE_TIMER(3), TAU_MAPPING_PROFILE_START(3) tau-2.16.4/man/man3/TAU_MAPPING_PROFILE_TIMER.3000066400000000000000000000032471062343042700200250ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU_MAPPING_PROFILE_" "3" "08/31/2005" "" "TAU Mapping API" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" TAU_MAPPING_PROFILE_TIMER \- Declares a mapping timer .SH "SYNOPSIS" .PP \fBC/C++:\fR .HP 26 \fB\fBTAU_MAPPING_PROFILE_TIMER\fR\fR\fB(\fR\fBProfiler\ \fR\fB\fItimer\fR\fR\fB, \fR\fBFunctionInfo\ *\fR\fB\fIFuncIdVar\fR\fR\fB);\fR .SH "DESCRIPTION" .PP TAU_MAPPING_PROFILE_TIMER enables timing of individual statements, instead of complete blocks. It will attribute the time to a higher\-level statement. The second argument is the identifier of the statement that is obtained after TAU_MAPPING_OBJECT and TAU_MAPPING_LINK have executed. The timer argument in this macro is any variable that is used subsequently to start and stop the timer. .SH "EXAMPLE" .PP \fBC/C++ :\fR .sp .nf template void ExpressionKernel::run() { TAU_MAPPING_PROFILE_TIMER(timer, TauMapFI); printf("ExpressionKernel::run() this = 4854\\n", this); // Just evaluate the expression. TAU_MAPPING_PROFILE_START(timer); KernelEvaluator().evaluate(lhs_m, op_m, rhs_m); TAU_MAPPING_PROFILE_STOP(); // we could release the locks here instead of in the dtor. } .fi .SH "SEE ALSO" .PP TAU_MAPPING_LINK(3), TAU_MAPPING_OBJECT(3), TAU_MAPPING_PROFILE_START(3), TAU_MAPPING_PROFILE_STOP(3) tau-2.16.4/man/man3/TAU_PHASE.3000066400000000000000000000021371062343042700154470ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU_PHASE" "3" "08/31/2005" "" "TAU Instrumentation API" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" TAU_PHASE \- Profile a C++ function as a phase .SH "SYNOPSIS" .HP 10 \fB\fBTAU_PHASE\fR\fR\fB(\fR\fBchar*\ or\ string&\ \fR\fB\fIfunction_name\fR\fR\fB, \fR\fBchar*\ or\ string&\ \fR\fB\fItype\fR\fR\fB, \fR\fBTauGroup_t\ \fR\fB\fIgroup\fR\fR\fB);\fR .SH "DESCRIPTION" .PP \fBTAU_PHASE\fR profiles a function as a phase. This macro defines the function and takes care of the timer start and stop as well. The timer will stop when the macro goes out of scope (as in C++ destruction). .SH "EXAMPLE" .sp .nf int foo(char *str) { TAU_PHASE(foo","int (char *)",TAU_DEFAULT); ... } .fi .SH "SEE ALSO" .PP TAU_PHASE_CREATE_DYNAMIC(3), TAU_PHASE_CREATE_STATIC(3) tau-2.16.4/man/man3/TAU_PHASE_CREATE_DYNAMIC.3000066400000000000000000000037001062343042700176330ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU_PHASE_CREATE_DYN" "3" "08/31/2005" "" "TAU Instrumentation API" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" TAU_PHASE_CREATE_DYNAMIC \- Defines a dynamic phase. .SH "SYNOPSIS" .PP \fBC/C++:\fR .HP 25 \fB\fBTAU_PHASE_CREATE_DYNAMIC\fR\fR\fB(\fR\fBPhase\ \fR\fB\fIphase\fR\fR\fB, \fR\fBchar*\ or\ string&\ \fR\fB\fIfunction_name\fR\fR\fB, \fR\fBchar*\ or\ string&\ \fR\fB\fItype\fR\fR\fB, \fR\fBTauGroup_t\ \fR\fB\fIgroup\fR\fR\fB);\fR .PP \fBFortran:\fR .HP 25 \fB\fBTAU_PHASE_CREATE_DYNAMIC\fR\fR\fB(\fR\fBinteger\ \fR\fB\fIphase\fR\fR\fB(2)\fR\fB, \fR\fBcharacter\ \fR\fB\fIname\fR\fR\fB(size)\fR\fB);\fR .SH "DESCRIPTION" .PP TAU_PHASE_CREATE_DYNAMIC creates a dynamic phase. The name of the timer can be different for each execution. .SH "EXAMPLE" .PP \fBC/C++ :\fR .sp .nf int main(int argc, char **argv) { int i; TAU_PROFILE_TIMER(t,"main()", "", TAU_DEFAULT); TAU_PROFILE_SET_NODE(0); TAU_PROFILE_START(t); for (i=0; i&5; i++) { char buf[32]; sprintf(buf, "Iteration %d", i); TAU_PHASE_CREATE_DYNAMIC(timer, buf, "", TAU_USER); TAU_PHASE_START(timer); printf("Iteration %d\\n", i); f1(); TAU_PHASE_STOP(timer); } return 0; } .fi .PP \fBFortran :\fR .sp .nf subroutine ITERATION(val) integer val character(13) cvar integer profiler(2) / 0, 0 / save profiler print *, "Iteration ", val write (cvar,'(a9,i2)') 'Iteration', val call TAU_PHASE_CREATE_DYNAMIC(profiler, cvar) call TAU_PHASE_START(profiler) call F1() call TAU_PHASE_STOP(profiler) return end .fi .SH "SEE ALSO" .PP TAU_PHASE_CREATE_STATIC(3), TAU_PHASE_START(3), TAU_PHASE_STOP(3) tau-2.16.4/man/man3/TAU_PHASE_CREATE_STATIC.3000066400000000000000000000032121062343042700175340ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU_PHASE_CREATE_STA" "3" "08/31/2005" "" "TAU Instrumentation API" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" TAU_PHASE_CREATE_STATIC \- Defines a static phase. .SH "SYNOPSIS" .PP \fBC/C++:\fR .HP 24 \fB\fBTAU_PHASE_CREATE_STATIC\fR\fR\fB(\fR\fBPhase\ \fR\fB\fIphase\fR\fR\fB, \fR\fBchar*\ or\ string&\ \fR\fB\fIfunction_name\fR\fR\fB, \fR\fBchar*\ or\ string&\ \fR\fB\fItype\fR\fR\fB, \fR\fBTauGroup_t\ \fR\fB\fIgroup\fR\fR\fB);\fR .PP \fBFortran:\fR .HP 24 \fB\fBTAU_PHASE_CREATE_STATIC\fR\fR\fB(\fR\fBinteger\ \fR\fB\fIphase\fR\fR\fB(2)\fR\fB, \fR\fBcharacter\ \fR\fB\fIname\fR\fR\fB(size)\fR\fB);\fR .SH "DESCRIPTION" .PP TAU_PHASE_CREATE_STATIC creates a static phase. Static phases (and timers) are more efficient than dynamic ones because the function registration only takes place once. .SH "EXAMPLE" .PP \fBC/C++ :\fR .sp .nf int f2(void) { TAU_PHASE_CREATE_STATIC(t2,"IO Phase", "", TAU_USER); TAU_PHASE_START(t2); input(); output(); TAU_PHASE_STOP(t2); return 0; } .fi .PP \fBFortran :\fR .sp .nf subroutine F2() integer phase(2) / 0, 0 / save phase call TAU_PHASE_CREATE_STATIC(phase,'IO Phase') call TAU_PHASE_START(phase) call INPUT() call OUTPUT() call TAU_PHASE_STOP(phase) end .fi .SH "SEE ALSO" .PP TAU_PHASE_CREATE_DYNAMIC(3), TAU_PHASE_START(3), TAU_PHASE_STOP(3) tau-2.16.4/man/man3/TAU_PHASE_START.3000066400000000000000000000025011062343042700164170ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU_PHASE_START" "3" "08/31/2005" "" "TAU Instrumentation API" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" TAU_PHASE_START \- Enters a phase. .SH "SYNOPSIS" .PP \fBC/C++:\fR .HP 16 \fB\fBTAU_PHASE_START\fR\fR\fB(\fR\fBPhase\ \fR\fB\fIphase\fR\fR\fB);\fR .PP \fBFortran:\fR .HP 16 \fB\fBTAU_PHASE_START\fR\fR\fB(\fR\fBinteger\ \fR\fB\fIphase\fR\fR\fB(2)\fR\fB);\fR .SH "DESCRIPTION" .PP TAU_PHASE_START enters a phase. Phases can be nested, but not overlapped. .SH "EXAMPLE" .PP \fBC/C++ :\fR .sp .nf int f2(void) { TAU_PHASE_CREATE_STATIC(t2,"IO Phase", "", TAU_USER); TAU_PHASE_START(t2); input(); output(); TAU_PHASE_STOP(t2); return 0; } .fi .PP \fBFortran :\fR .sp .nf subroutine F2() integer phase(2) / 0, 0 / save phase call TAU_PHASE_CREATE_STATIC(phase,'IO Phase') call TAU_PHASE_START(phase) call INPUT() call OUTPUT() call TAU_PHASE_STOP(phase) end .fi .SH "SEE ALSO" .PP TAU_PHASE_CREATE_STATIC(3), TAU_PHASE_CREATE_DYNAMIC(3), TAU_PHASE_STOP(3) tau-2.16.4/man/man3/TAU_PHASE_STOP.3000066400000000000000000000024731062343042700163170ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU_PHASE_STOP" "3" "08/31/2005" "" "TAU Instrumentation API" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" TAU_PHASE_STOP \- Exits a phase. .SH "SYNOPSIS" .PP \fBC/C++:\fR .HP 15 \fB\fBTAU_PHASE_STOP\fR\fR\fB(\fR\fBPhase\ \fR\fB\fIphase\fR\fR\fB);\fR .PP \fBFortran:\fR .HP 15 \fB\fBTAU_PHASE_STOP\fR\fR\fB(\fR\fBinteger\ \fR\fB\fIphase\fR\fR\fB(2)\fR\fB);\fR .SH "DESCRIPTION" .PP TAU_PHASE_STOP exits a phase. Phases can be nested, but not overlapped. .SH "EXAMPLE" .PP \fBC/C++ :\fR .sp .nf int f2(void) { TAU_PHASE_CREATE_STATIC(t2,"IO Phase", "", TAU_USER); TAU_PHASE_START(t2); input(); output(); TAU_PHASE_STOP(t2); return 0; } .fi .PP \fBFortran :\fR .sp .nf subroutine F2() integer phase(2) / 0, 0 / save phase call TAU_PHASE_CREATE_STATIC(phase,'IO Phase') call TAU_PHASE_START(phase) call INPUT() call OUTPUT() call TAU_PHASE_STOP(phase) end .fi .SH "SEE ALSO" .PP TAU_PHASE_CREATE_STATIC(3), TAU_PHASE_CREATE_DYNAMIC(3), TAU_PHASE_START(3) tau-2.16.4/man/man3/TAU_PROFILE.3000066400000000000000000000020601062343042700157020ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU_PROFILE" "3" "08/31/2005" "" "TAU Instrumentation API" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" TAU_PROFILE \- Profile a C++ function .SH "SYNOPSIS" .HP 12 \fB\fBTAU_PROFILE\fR\fR\fB(\fR\fBchar*\ or\ string&\ \fR\fB\fIfunction_name\fR\fR\fB, \fR\fBchar*\ or\ string&\ \fR\fB\fItype\fR\fR\fB, \fR\fBTauGroup_t\ \fR\fB\fIgroup\fR\fR\fB);\fR .SH "DESCRIPTION" .PP \fBTAU_PROFILE\fR profiles a function. This macro defines the function and takes care of the timer start and stop as well. The timer will stop when the macro goes out of scope (as in C++ destruction). .SH "EXAMPLE" .sp .nf int foo(char *str) { TAU_PROFILE(foo","int (char *)",TAU_DEFAULT); ... } .fi .SH "SEE ALSO" .PP TAU_PROFILE_TIMER(3) tau-2.16.4/man/man3/TAU_PROFILE_CALLSTACK.3000066400000000000000000000016721062343042700172730ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU_PROFILE_CALLSTAC" "3" "08/31/2005" "" "TAU Instrumentation API" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" TAU_PROFILE_CALLSTACK \- Generates a callstack trace at a given location. .SH "SYNOPSIS" .PP \fBC/C++:\fR .HP 22 \fB\fBTAU_PROFILE_CALLSTACK\fR\fR\fB(\fR\fBvoid);\fR .SH "DESCRIPTION" .PP When TAU is configured with \-PROFILECALLSTACK configuration option, and this call is invoked, a callpath trace is generated. A GUI for viewing this trace is included in TAU's utils/csUI directory. This option is deprecated. .SH "EXAMPLE" .PP \fBC/C++ :\fR .sp .nf TAU_PROFILE_CALLSTACK(); .fi tau-2.16.4/man/man3/TAU_PROFILE_CREATE_TIMER.3000066400000000000000000000024471062343042700176760ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU_PROFILE_CREATE_T" "3" "08/31/2005" "" "TAU Instrumentation API" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" TAU_PROFILE_CREATE_TIMER \- Creates a timer for C .SH "SYNOPSIS" .PP \fBC:\fR .HP 25 \fB\fBTAU_PROFILE_CREATE_TIMER\fR\fR\fB(\fR\fBProfiler\ \fR\fB\fItimer\fR\fR\fB);\fR .SH "DESCRIPTION" .PP Because C89 does not allow mixed code and declarations, TAU_PROFILE_TIMER can only be used once in a function. To declare two timers in a C function, use TAU_PROFILE_DECLARE_TIMER and TAU_PROFILE_CREATE_TIMER. .SH "EXAMPLE" .PP \fBC :\fR .sp .nf int f1(void) { TAU_PROFILE_DECLARE_TIMER(t1); TAU_PROFILE_DECLARE_TIMER(t2); TAU_PROFILE_CREATE_TIMER(t1, "timer1", "", TAU_USER); TAU_PROFILE_CREATE_TIMER(t2, "timer2", "", TAU_USER); TAU_PROFILE_START(t1); ... TAU_PROFILE_START(t2); ... TAU_PROFILE_STOP(t2); TAU_PROFILE_STOP(t1); return 0; } .fi .SH "SEE ALSO" .PP TAU_PROFILE_DECLARE_TIMER(3), TAU_PROFILE_START(3), TAU_PROFILE_STOP(3) tau-2.16.4/man/man3/TAU_PROFILE_DECLARE_TIMER.3000066400000000000000000000024001062343042700177570ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU_PROFILE_DECLARE_" "3" "08/31/2005" "" "TAU Instrumentation API" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" TAU_PROFILE_DECLARE_TIMER \- Declares a timer for C .SH "SYNOPSIS" .PP \fBC:\fR .HP 26 \fB\fBTAU_PROFILE_DECLARE_TIMER\fR\fR\fB(\fR\fBProfiler\ \fR\fB\fItimer\fR\fR\fB);\fR .SH "DESCRIPTION" .PP Because C89 does not allow mixed code and declarations, TAU_PROFILE_TIMER can only be used once in a function. To declare two timers in a C function, use TAU_PROFILE_DECLARE_TIMER and TAU_PROFILE_CREATE_TIMER. .SH "EXAMPLE" .PP \fBC :\fR .sp .nf int f1(void) { TAU_PROFILE_DECLARE_TIMER(t1); TAU_PROFILE_DECLARE_TIMER(t2); TAU_PROFILE_CREATE_TIMER(t1, "timer1", "", TAU_USER); TAU_PROFILE_CREATE_TIMER(t2, "timer2", "", TAU_USER); TAU_PROFILE_START(t1); ... TAU_PROFILE_START(t2); ... TAU_PROFILE_STOP(t2); TAU_PROFILE_STOP(t1); return 0; } .fi .SH "SEE ALSO" .PP TAU_PROFILE_CREATE_TIMER tau-2.16.4/man/man3/TAU_PROFILE_EXIT.3000066400000000000000000000022771062343042700165450ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU_PROFILE_EXIT" "3" "08/31/2005" "" "TAU Instrumentation API" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" TAU_PROFILE_EXIT \- Alerts the profiling system to an exit call .SH "SYNOPSIS" .PP \fBC/C++:\fR .HP 17 \fB\fBTAU_PROFILE_EXIT\fR\fR\fB(\fR\fBconst\ char\ *\ \fR\fB\fImessage\fR\fR\fB);\fR .PP \fBFortran:\fR .HP 17 \fB\fBTAU_PROFILE_EXIT\fR\fR\fB(\fR\fBcharacter\ \fR\fB\fImessage\fR\fR\fB(size)\fR\fB);\fR .SH "DESCRIPTION" .PP TAU_PROFILE_EXIT should be called prior to an error exit from the program so that any profiles or event traces can be dumped to disk before quitting. .SH "EXAMPLE" .PP \fBC/C++ :\fR .sp .nf if ((ret = open(...)) < 0) { TAU_PROFILE_EXIT("ERROR in opening a file"); perror("open() failed"); exit(1); } .fi .PP \fBFortran :\fR .sp .nf call TAU_PROFILE_EXIT('abort called') .fi .SH "SEE ALSO" .PP TAU_DB_DUMP(3) tau-2.16.4/man/man3/TAU_PROFILE_INIT.3000066400000000000000000000026761062343042700165420ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU_PROFILE_INIT" "3" "08/31/2005" "" "TAU Instrumentation API" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" TAU_PROFILE_INIT \- Processes command\-line arguments for selective instrumentation .SH "SYNOPSIS" .PP \fBC/C++:\fR .HP 17 \fB\fBTAU_PROFILE_INIT\fR\fR\fB(\fR\fBint\ \fR\fB\fIargc\fR\fR\fB, \fR\fBchar\ **\fR\fB\fIargv\fR\fR\fB);\fR .PP \fBFortran:\fR .HP 17 \fB\fBTAU_PROFILE_INIT\fR\fR\fB(\fR\fBvoid);\fR .SH "DESCRIPTION" .PP TAU_PROFILE_INIT parses the command\-line arguments for the names of profile groups that are to be selectively enabled for instrumentation. By default, if this macro is not used, functions belonging to all profile groups are enabled. TAU_INIT differs from TAU_PROFILE_INIT only in the argument types. .SH "EXAMPLE" .PP \fBC/C++ :\fR .sp .nf int main(int argc, char **argv) { TAU_PROFILE("main()", "int (int, char **)", TAU_DEFAULT); TAU_PROFILE_INIT(argc, argv); ... } % ./a.out \-\-profile 12+14 .fi .PP \fBFortran :\fR .sp .nf PROGRAM SUM_OF_CUBES integer profiler(2) save profiler call TAU_PROFILE_INIT() ... .fi .SH "SEE ALSO" .PP TAU_INIT(3) tau-2.16.4/man/man3/TAU_PROFILE_SET_CONTEXT.3000066400000000000000000000045111062343042700176240ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU_PROFILE_SET_CONT" "3" "08/31/2005" "" "TAU Instrumentation API" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" TAU_PROFILE_SET_CONTEXT \- Informs the measurement system of the context id .SH "SYNOPSIS" .PP \fBC/C++:\fR .HP 24 \fB\fBTAU_PROFILE_SET_CONTEXT\fR\fR\fB(\fR\fBint\ \fR\fB\fIcontext\fR\fR\fB);\fR .PP \fBFortran:\fR .HP 24 \fB\fBTAU_PROFILE_SET_CONTEXT\fR\fR\fB(\fR\fBinteger\ \fR\fB\fIcontext\fR\fR\fB);\fR .SH "DESCRIPTION" .PP The TAU_PROFILE_SET_CONTEXT macro sets the context identifier of the executing task for profiling and tracing. Tasks are identified using context, context and thread ids. The profile data files generated will accordingly be named profile.... Note that it is not necessary to call TAU_PROFILE_SET_CONTEXT when using the TAU MPI wrapper library. .SH "EXAMPLE" .PP \fBC/C++ :\fR .sp .nf int main (int argc, char **argv) { int ret, i; pthread_attr_t attr; pthread_t tid; TAU_PROFILE_TIMER(tautimer,"main()", "int (int, char **)", TAU_DEFAULT); TAU_PROFILE_START(tautimer); TAU_PROFILE_INIT(argc, argv); TAU_PROFILE_SET_NODE(0); TAU_PROFILE_SET_CONTEXT(1); /* ... */ TAU_PROFILE_STOP(tautimer); return 0; } .fi .PP \fBFortran :\fR .sp .nf PROGRAM SUM_OF_CUBES integer profiler(2) / 0, 0 / save profiler INTEGER :: H, T, U call TAU_PROFILE_INIT() call TAU_PROFILE_TIMER(profiler, 'PROGRAM SUM_OF_CUBES') call TAU_PROFILE_START(profiler) call TAU_PROFILE_SET_NODE(0) call TAU_PROFILE_SET_CONTEXT(1) ! This program prints all 3\-digit numbers that ! equal the sum of the cubes of their digits. DO H = 1, 9 DO T = 0, 9 DO U = 0, 9 IF (100*H + 10*T + U == H**3 + T**3 + U**3) THEN PRINT "(3I1)", H, T, U ENDIF END DO END DO END DO call TAU_PROFILE_STOP(profiler) END PROGRAM SUM_OF_CUBES .fi .SH "SEE ALSO" .PP TAU_PROFILE_SET_NODE(3) tau-2.16.4/man/man3/TAU_PROFILE_SET_GROUP_NAME.3000066400000000000000000000021041062343042700201700ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU_PROFILE_SET_GROU" "3" "08/31/2005" "" "TAU Instrumentation API" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" TAU_PROFILE_SET_GROUP_NAME \- Changes the group name of a profiled section .SH "SYNOPSIS" .PP \fBC/C++:\fR .HP 27 \fB\fBTAU_PROFILE_SET_GROUP_NAME\fR\fR\fB(\fR\fBchar\ *\fR\fB\fIgroupname\fR\fR\fB);\fR .SH "DESCRIPTION" .PP TAU_PROFILE_SET_GROUP_NAME macro allows the user to change the group name associated with the instrumented routine. This macro must be called within the instrumented routine. .SH "EXAMPLE" .PP \fBC/C++ :\fR .sp .nf void foo() { TAU_PROFILE("foo()", "void ()", TAU_USER); TAU_PROFILE_SET_GROUP_NAME("Particle"); /* gives a more meaningful group name */ } .fi .SH "SEE ALSO" .PP TAU_PROFILE tau-2.16.4/man/man3/TAU_PROFILE_SET_NODE.3000066400000000000000000000043461062343042700172330ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU_PROFILE_SET_NODE" "3" "08/31/2005" "" "TAU Instrumentation API" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" TAU_PROFILE_SET_NODE \- Informs the measurement system of the node id .SH "SYNOPSIS" .PP \fBC/C++:\fR .HP 21 \fB\fBTAU_PROFILE_SET_NODE\fR\fR\fB(\fR\fBint\ \fR\fB\fInode\fR\fR\fB);\fR .PP \fBFortran:\fR .HP 21 \fB\fBTAU_PROFILE_SET_NODE\fR\fR\fB(\fR\fBinteger\ \fR\fB\fInode\fR\fR\fB);\fR .SH "DESCRIPTION" .PP The TAU_PROFILE_SET_NODE macro sets the node identifier of the executing task for profiling and tracing. Tasks are identified using node, context and thread ids. The profile data files generated will accordingly be named profile.... Note that it is not necessary to call TAU_PROFILE_SET_NODE when using the TAU MPI wrapper library. .SH "EXAMPLE" .PP \fBC/C++ :\fR .sp .nf int main (int argc, char **argv) { int ret, i; pthread_attr_t attr; pthread_t tid; TAU_PROFILE_TIMER(tautimer,"main()", "int (int, char **)", TAU_DEFAULT); TAU_PROFILE_START(tautimer); TAU_PROFILE_INIT(argc, argv); TAU_PROFILE_SET_NODE(0); /* ... */ TAU_PROFILE_STOP(tautimer); return 0; } .fi .PP \fBFortran :\fR .sp .nf PROGRAM SUM_OF_CUBES integer profiler(2) / 0, 0 / save profiler INTEGER :: H, T, U call TAU_PROFILE_INIT() call TAU_PROFILE_TIMER(profiler, 'PROGRAM SUM_OF_CUBES') call TAU_PROFILE_START(profiler) call TAU_PROFILE_SET_NODE(0) ! This program prints all 3\-digit numbers that ! equal the sum of the cubes of their digits. DO H = 1, 9 DO T = 0, 9 DO U = 0, 9 IF (100*H + 10*T + U == H**3 + T**3 + U**3) THEN PRINT "(3I1)", H, T, U ENDIF END DO END DO END DO call TAU_PROFILE_STOP(profiler) END PROGRAM SUM_OF_CUBES .fi .SH "SEE ALSO" .PP TAU_PROFILE_SET_CONTEXT(3) tau-2.16.4/man/man3/TAU_PROFILE_START.3000066400000000000000000000023741062343042700166670ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU_PROFILE_START" "3" "08/31/2005" "" "TAU Instrumentation API" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" TAU_PROFILE_START \- Starts a timer. .SH "SYNOPSIS" .PP \fBC/C++:\fR .HP 18 \fB\fBTAU_PROFILE_START\fR\fR\fB(\fR\fBProfiler\ \fR\fB\fItimer\fR\fR\fB);\fR .PP \fBFortran:\fR .HP 18 \fB\fBTAU_PROFILE_START\fR\fR\fB(\fR\fBinteger\ \fR\fB\fIprofiler\fR\fR\fB(2)\fR\fB);\fR .SH "DESCRIPTION" .PP Starts the timer given by \fItimer\fR .SH "EXAMPLE" .PP \fBC/C++ :\fR .sp .nf int foo(int a) { TAU_PROFILE_TIMER(timer, "foo", "int (int)", TAU_USER); TAU_PROFILE_START(timer); ... TAU_PROFILE_STOP(timer); return a; } .fi .PP \fBFortran :\fR .sp .nf subroutine F1() integer profiler(2) / 0, 0 / save profiler call TAU_PROFILE_TIMER(profiler,'f1()') call TAU_PROFILE_START(profiler) ... call TAU_PROFILE_STOP(profiler) end .fi .SH "SEE ALSO" .PP TAU_PROFILE_TIMER(3), TAU_PROFILE_STOP(3) tau-2.16.4/man/man3/TAU_PROFILE_STMT.3000066400000000000000000000021751062343042700165600ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU_PROFILE_STMT" "3" "08/31/2005" "" "TAU Instrumentation API" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" TAU_PROFILE_STMT \- Executes a statement only when TAU is used. .SH "SYNOPSIS" .PP \fBC/C++:\fR .HP 17 \fB\fBTAU_PROFILE_STMT\fR\fR\fB(\fR\fBstatement\ \fR\fB\fIstatement\fR\fR\fB);\fR .SH "DESCRIPTION" .PP TAU_PROFILE_STMT executes a statement, or declares a variable that is used only during profiling or for execution of a statement that takes place only when the instrumentation is active. When instrumentation is inactive (i.e., when profiling and tracing are turned off as described in Chapter 2), all macros are defined as null. .SH "EXAMPLE" .PP \fBC/C++ :\fR .sp .nf TAU_PROFILE_STMT(T obj;); // T is a template parameter) TAU_TYPE_STRING(str, "void () " + CT(obj) ); .fi tau-2.16.4/man/man3/TAU_PROFILE_STOP.3000066400000000000000000000026441062343042700165570ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU_PROFILE_STOP" "3" "08/31/2005" "" "TAU Instrumentation API" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" TAU_PROFILE_STOP \- Stops a timer. .SH "SYNOPSIS" .PP \fBC/C++:\fR .HP 17 \fB\fBTAU_PROFILE_STOP\fR\fR\fB(\fR\fBProfiler\ \fR\fB\fItimer\fR\fR\fB);\fR .PP \fBFortran:\fR .HP 17 \fB\fBTAU_PROFILE_STOP\fR\fR\fB(\fR\fBinteger\ \fR\fB\fIprofiler\fR\fR\fB(2)\fR\fB);\fR .SH "DESCRIPTION" .PP Stops the timer given by \fItimer\fR. It is important to note that timers can be nested, but not overlapping. TAU detects programming errors that lead to such overlaps at runtime, and prints a warning message. .SH "EXAMPLE" .PP \fBC/C++ :\fR .sp .nf int foo(int a) { TAU_PROFILE_TIMER(timer, "foo", "int (int)", TAU_USER); TAU_PROFILE_START(timer); ... TAU_PROFILE_STOP(timer); return a; } .fi .PP \fBFortran :\fR .sp .nf subroutine F1() integer profiler(2) / 0, 0 / save profiler call TAU_PROFILE_TIMER(profiler,'f1()') call TAU_PROFILE_START(profiler) ... call TAU_PROFILE_STOP(profiler) end .fi .SH "SEE ALSO" .PP TAU_PROFILE_TIMER(3), TAU_PROFILE_START(3) tau-2.16.4/man/man3/TAU_PROFILE_TIMER.3000066400000000000000000000051071062343042700166470ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU_PROFILE_TIMER" "3" "08/31/2005" "" "TAU Instrumentation API" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" TAU_PROFILE_TIMER \- Defines a static timer. .SH "SYNOPSIS" .PP \fBC/C++:\fR .HP 18 \fB\fBTAU_PROFILE_TIMER\fR\fR\fB(\fR\fBProfiler\ \fR\fB\fItimer\fR\fR\fB, \fR\fBchar*\ or\ string&\ \fR\fB\fIfunction_name\fR\fR\fB, \fR\fBchar*\ or\ string&\ \fR\fB\fItype\fR\fR\fB, \fR\fBTauGroup_t\ \fR\fB\fIgroup\fR\fR\fB);\fR .PP \fBFortran:\fR .HP 18 \fB\fBTAU_PROFILE_TIMER\fR\fR\fB(\fR\fBinteger\ \fR\fB\fIprofiler\fR\fR\fB(2)\fR\fB, \fR\fBcharacter\ \fR\fB\fIname\fR\fR\fB(size)\fR\fB);\fR .SH "DESCRIPTION" .PP \fBC/C++ :\fR .PP With TAU_PROFILE_TIMER, a group of one or more statements is profiled. This macro has a timer variable as its first argument, and then strings for name and type, as described earlier. It associates the timer to the profile group specified in the last parameter. .PP \fBFortran :\fR .PP To profile a block of Fortran code, such as a function, subroutine, loop etc., the user must first declare a profiler, which is an integer array of two elements (pointer) with the save attribute, and pass it as the first parameter to the TAU_PROFILE_TIMER subroutine. The second parameter must contain the name of the routine, which is enclosed in a single quote. TAU_PROFILE_TIMER declares the profiler that must be used to profile a block of code. The profiler is used to profile the statements using TAU_PROFILE_START and TAU_PROFILE_STOP as explained later. .SH "EXAMPLE" .PP \fBC/C++ :\fR .sp .nf template< class T, unsigned Dim > void BareField::fillGuardCells(bool reallyFill) { // profiling macros TAU_TYPE_STRING(taustr, CT(*this) + " void (bool)" ); TAU_PROFILE("BareField::fillGuardCells()", taustr, TAU_FIELD); TAU_PROFILE_TIMER(sendtimer, "fillGuardCells\-send", taustr, TAU_FIELD); TAU_PROFILE_TIMER(localstimer, "fillGuardCells\-locals", taustr, TAU_FIELD); ... } .fi .PP \fBFortran :\fR .sp .nf subroutine bcast_inputs implicit none integer profiler(2) save profiler include 'mpinpb.h' include 'applu.incl' interger IERR call TAU_PROFILE_TIMER(profiler, 'bcast_inputs') .fi .SH "SEE ALSO" .PP TAU_PROFILE_TIMER_DYNAMIC(3), TAU_PROFILE_START(3), TAU_PROFILE_STOP(3) tau-2.16.4/man/man3/TAU_PROFILE_TIMER_DYNAMIC.3000066400000000000000000000040561062343042700200150ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU_PROFILE_TIMER_DY" "3" "08/31/2005" "" "TAU Instrumentation API" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" TAU_PROFILE_TIMER_DYNAMIC \- Defines a dynamic timer. .SH "SYNOPSIS" .PP \fBC/C++:\fR .HP 26 \fB\fBTAU_PROFILE_TIMER_DYNAMIC\fR\fR\fB(\fR\fBProfiler\ \fR\fB\fItimer\fR\fR\fB, \fR\fBchar*\ or\ string&\ \fR\fB\fIfunction_name\fR\fR\fB, \fR\fBchar*\ or\ string&\ \fR\fB\fItype\fR\fR\fB, \fR\fBTauGroup_t\ \fR\fB\fIgroup\fR\fR\fB);\fR .PP \fBFortran:\fR .HP 26 \fB\fBTAU_PROFILE_TIMER_DYNAMIC\fR\fR\fB(\fR\fBinteger\ \fR\fB\fIprofiler\fR\fR\fB(2)\fR\fB, \fR\fBcharacter\ \fR\fB\fIname\fR\fR\fB(size)\fR\fB);\fR .SH "DESCRIPTION" .PP TAU_PROFILE_TIMER_DYNAMIC operates similar to TAU_PROFILE_TIMER except that the timer is created each time the statement is invoked. This way, the name of the timer can be different for each execution. .SH "EXAMPLE" .PP \fBC/C++ :\fR .sp .nf int main(int argc, char **argv) { int i; TAU_PROFILE_TIMER(t,"main()", "", TAU_DEFAULT); TAU_PROFILE_SET_NODE(0); TAU_PROFILE_START(t); for (i=0; i&5; i++) { char buf[32]; sprintf(buf, "Iteration %d", i); TAU_PROFILE_TIMER_DYNAMIC(timer, buf, "", TAU_USER); TAU_PROFILE_START(timer); printf("Iteration %d\\n", i); f1(); TAU_PROFILE_STOP(timer); } return 0; } .fi .PP \fBFortran :\fR .sp .nf subroutine ITERATION(val) integer val character(13) cvar integer profiler(2) / 0, 0 / save profiler print *, "Iteration ", val write (cvar,'(a9,i2)') 'Iteration', val call TAU_PROFILE_TIMER_DYNAMIC(profiler, cvar) call TAU_PROFILE_START(profiler) call F1() call TAU_PROFILE_STOP(profiler) return end .fi .SH "SEE ALSO" .PP TAU_PROFILE_TIMER(3), TAU_PROFILE_START(3), TAU_PROFILE_STOP(3) tau-2.16.4/man/man3/TAU_PROFILE_TIMER_SET_GROUP.3000066400000000000000000000020171062343042700203330ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU_PROFILE_TIMER_SE" "3" "08/31/2005" "" "TAU Instrumentation API" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" TAU_PROFILE_TIMER_SET_GROUP \- Change the group of a timer .SH "SYNOPSIS" .PP \fBC/C++:\fR .HP 28 \fB\fBTAU_PROFILE_TIMER_SET_GROUP\fR\fR\fB(\fR\fBProfiler\ \fR\fB\fItimer\fR\fR\fB, \fR\fBTauGroup_t\ \fR\fB\fIgroup\fR\fR\fB);\fR .SH "DESCRIPTION" .PP TAU_PROFILE_TIMER_SET_GROUP changes the group associated with a timer. .SH "EXAMPLE" .PP \fBC/C++ :\fR .sp .nf void foo() { TAU_PROFILE_TIMER(t, "foo loop timer", " ", TAU_USER1); ... TAU_PROFILE_TIMER_SET_GROUP(t, TAU_USER3); } .fi .SH "SEE ALSO" .PP TAU_PROFILE_TIMER(3), TAU_PROFILE_TIMER_SET_GROUP_NAME(3) tau-2.16.4/man/man3/TAU_PROFILE_TIMER_SET_GROUP_NAME.3000066400000000000000000000022331062343042700211330ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU_PROFILE_TIMER_SE" "3" "08/31/2005" "" "TAU Instrumentation API" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" TAU_PROFILE_TIMER_SET_GROUP_NAME \- Changes the group name for a timer .SH "SYNOPSIS" .PP \fBC/C++:\fR .HP 33 \fB\fBTAU_PROFILE_TIMER_SET_GROUP_NAME\fR\fR\fB(\fR\fBProfiler\ \fR\fB\fItimer\fR\fR\fB, \fR\fBchar\ *\fR\fB\fIgroupname\fR\fR\fB);\fR .SH "DESCRIPTION" .PP TAU_PROFILE_TIMER_SET_GROUP_NAME changes the group name associated with a given timer. .SH "EXAMPLE" .PP \fBC/C++ :\fR .sp .nf void foo() { TAU_PROFILE_TIMER(looptimer, "foo: loop1", " ", TAU_USER); TAU_PROFILE_START(looptimer); for (int i = 0; i < N; i++) { /* do something */ } TAU_PROFILE_STOP(looptimer); TAU_PROFILE_TIMER_SET_GROUP_NAME("Field"); } .fi .SH "SEE ALSO" .PP TAU_PROFILE_TIMER(3), TAU_PROFILE_TIMER_SET_GROUP(3) tau-2.16.4/man/man3/TAU_PROFILE_TIMER_SET_NAME.3000066400000000000000000000020161062343042700201560ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU_PROFILE_TIMER_SE" "3" "08/31/2005" "" "TAU Instrumentation API" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" TAU_PROFILE_TIMER_SET_NAME \- Changes the name of a timer .SH "SYNOPSIS" .PP \fBC/C++:\fR .HP 27 \fB\fBTAU_PROFILE_TIMER_SET_NAME\fR\fR\fB(\fR\fBProfiler\ \fR\fB\fItimer\fR\fR\fB, \fR\fBstring\ \fR\fB\fInewname\fR\fR\fB);\fR .SH "DESCRIPTION" .PP TAU_PROFILE_TIMER_SET_NAME macro changes the name associated with a timer to the newname argument. .SH "EXAMPLE" .PP \fBC/C++ :\fR .sp .nf void foo() { TAU_PROFILE_TIMER(timer1, "foo:loop1", " ", TAU_USER); ... TAU_PROFILE_TIMER_SET_NAME(timer1, "foo:lines 21\-34"); } .fi .SH "SEE ALSO" .PP TAU_PROFILE_TIMER(3) tau-2.16.4/man/man3/TAU_PROFILE_TIMER_SET_TYPE.3000066400000000000000000000017761062343042700202330ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU_PROFILE_TIMER_SE" "3" "08/31/2005" "" "TAU Instrumentation API" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" TAU_PROFILE_TIMER_SET_TYPE \- Changes the type of a timer .SH "SYNOPSIS" .PP \fBC/C++:\fR .HP 27 \fB\fBTAU_PROFILE_TIMER_SET_TYPE\fR\fR\fB(\fR\fBProfiler\ \fR\fB\fItimer\fR\fR\fB, \fR\fBstring\ \fR\fB\fInewname\fR\fR\fB);\fR .SH "DESCRIPTION" .PP TAU_PROFILE_TIMER_SET_TYPE macro changes the type associated with a timer to the newname argument. .SH "EXAMPLE" .PP \fBC/C++ :\fR .sp .nf void foo() { TAU_PROFILE_TIMER(timer1, "foo", "int", TAU_USER); ... TAU_PROFILE_TIMER_SET_TYPE(timer1, "long"); } .fi .SH "SEE ALSO" .PP TAU_PROFILE_TIMER(3) tau-2.16.4/man/man3/TAU_REGISTER_CONTEXT_EVENT.3000066400000000000000000000063371062343042700202060ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU_REGISTER_CONTEXT" "3" "08/31/2005" "" "TAU Instrumentation API" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" TAU_REGISTER_CONTEXT_EVENT \- Registers a context event .SH "SYNOPSIS" .PP \fBC/C++:\fR .HP 27 \fB\fBTAU_REGISTER_CONTEXT_EVENT\fR\fR\fB(\fR\fBTauUserEvent\ \fR\fB\fIvariable\fR\fR\fB, \fR\fBchar\ *\fR\fB\fIevent_name\fR\fR\fB);\fR .PP \fBFortran:\fR .HP 27 \fB\fBTAU_REGISTER_CONTEXT_EVENT\fR\fR\fB(\fR\fBint\ \fR\fB\fIvariable\fR\fR\fB(2)\fR\fB, \fR\fBcharacter\ \fR\fB\fIevent_name\fR\fR\fB(size)\fR\fB);\fR .SH "DESCRIPTION" .PP Creates a context event with name. A context event appends the names of routines executing on the callstack to the name specified by the user. Whenver a context event is triggered, the callstack is examined to determine the context of execution. Starting from the parent function where the event is triggered, TAU walks up the callstack to a depth specified by the user in the environment variable TAU_CALLPATH_DEPTH. If this environment variable is not specified, TAU uses 2 as the default depth. For e.g., if the user registers a context event with the name "memory used" and specifies 3 as the callpath depth, and if the event is triggered in two locations (in routine a, when it was called by b, when it was called by c, and in routine h, when it was called by g, when it was called by i), then, we'd see the user defined event information for "memory used: c() => b() => a()" and "memory used: i() => g() => h()". .SH "EXAMPLE" .PP \fBC/C++ :\fR .sp .nf int f2(void) { static int count = 0; count ++; TAU_PROFILE("f2()", "(sleeps 2 sec, calls f3)", TAU_USER); TAU_REGISTER_CONTEXT_EVENT(event, "Iteration count"); /* if (count == 2) TAU_DISABLE_CONTEXT_EVENT(event); */ printf("Inside f2: sleeps 2 sec, calls f3\\n"); TAU_CONTEXT_EVENT(event, 232+count); sleep(2); f3(); return 0; } .fi .PP \fBFortran :\fR .sp .nf subroutine foo(id) integer id integer profiler(2) / 0, 0 / integer maev(2) / 0, 0 / integer mdev(2) / 0, 0 / save profiler, maev, mdev integer :: ierr integer :: h, t, u INTEGER, ALLOCATABLE :: STORAGEARY(:) DOUBLEPRECISION edata call TAU_PROFILE_TIMER(profiler, 'FOO') call TAU_PROFILE_START(profiler) call TAU_PROFILE_SET_NODE(0) call TAU_REGISTER_CONTEXT_EVENT(maev, "STORAGEARY Alloc [cubes.f:20]") call TAU_REGISTER_CONTEXT_EVENT(mdev, "STORAGEARY Dealloc [cubes.f:37]") allocate(STORAGEARY(1:999), STAT=IERR) edata = SIZE(STORAGEARY)*sizeof(INTEGER) call TAU_CONTEXT_EVENT(maev, edata) ... deallocate(STORAGEARY) edata = SIZE(STORAGEARY)*sizeof(INTEGER) call TAU_CONTEXT_EVENT(mdev, edata) call TAU_PROFILE_STOP(profiler) end subroutine foo .fi .SH "SEE ALSO" .PP TAU_CONTEXT_EVENT(3), TAU_ENABLE_CONTEXT_EVENT(3), TAU_DISABLE_CONTEXT_EVENT(3), TAU_REGISTER_EVENT(3), TAU_REPORT_STATISTICS(3), TAU_REPORT_THREAD_STATISTICS(3), TAU_GET_EVENT_NAMES(3), TAU_GET_EVENT_VALS(3) tau-2.16.4/man/man3/TAU_REGISTER_EVENT.3000066400000000000000000000031241062343042700167710ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU_REGISTER_EVENT" "3" "08/31/2005" "" "TAU Instrumentation API" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" TAU_REGISTER_EVENT \- Registers a user event .SH "SYNOPSIS" .PP \fBC/C++:\fR .HP 19 \fB\fBTAU_REGISTER_EVENT\fR\fR\fB(\fR\fBTauUserEvent\ \fR\fB\fIvariable\fR\fR\fB, \fR\fBchar\ *\fR\fB\fIevent_name\fR\fR\fB);\fR .PP \fBFortran:\fR .HP 19 \fB\fBTAU_REGISTER_EVENT\fR\fR\fB(\fR\fBint\ \fR\fB\fIvariable\fR\fR\fB(2)\fR\fB, \fR\fBcharacter\ \fR\fB\fIevent_name\fR\fR\fB(size)\fR\fB);\fR .SH "DESCRIPTION" .PP TAU can profile user\-defined events using TAU_REGISTER_EVENT. The meaning of the event is determined by the user. The first argument to TAU_REGISTER_EVENT is the pointer to an integer array. This array is declared with a save attribute as shown below. .SH "EXAMPLE" .PP \fBC/C++ :\fR .sp .nf int user_square(int count) { TAU_REGISTER_EVENT(ue1, "UserSquare Event"); TAU_EVENT(ue1, count * count); return 0; } .fi .PP \fBFortran :\fR .sp .nf integer eventid(2) save eventid call TAU_REGISTER_EVENT(eventid, 'Error in Iteration') call TAU_EVENT(eventid, count) .fi .SH "SEE ALSO" .PP TAU_EVENT(3), TAU_REGISTER_CONTEXT_EVENT(3), TAU_REPORT_STATISTICS(3), TAU_REPORT_THREAD_STATISTICS(3), TAU_GET_EVENT_NAMES(3), TAU_GET_EVENT_VALS(3) tau-2.16.4/man/man3/TAU_REGISTER_FORK.3000066400000000000000000000034571062343042700166620ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU_REGISTER_FORK" "3" "08/31/2005" "" "TAU Instrumentation API" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" TAU_REGISTER_FORK \- Informs the measurement system that a fork has taken place .SH "SYNOPSIS" .PP \fBC/C++:\fR .HP 18 \fB\fBTAU_REGISTER_FORK\fR\fR\fB(\fR\fBint\ \fR\fB\fIpid\fR\fR\fB, \fR\fBenum\ TauFork_t\ \fR\fB\fIoption\fR\fR\fB);\fR .SH "DESCRIPTION" .PP To register a child process obtained from the fork() syscall, invoke the TAU_REGISTER_FORK macro. It takes two parameters, the first is the node id of the child process (typically the process id returned by the fork call or any 0..N\-1 range integer). The second parameter specifies whether the performance data for the child process should be derived from the parent at the time of fork ( TAU_INCLUDE_PARENT_DATA ) or should be independent of its parent at the time of fork ( TAU_EXCLUDE_PARENT_DATA ). If the process id is used as the node id, before any analysis is done, all profile files should be converted to contiguous node numbers (from 0..N\-1). It is highly recommended to use flat contiguous node numbers in this call for profiling and tracing. .SH "EXAMPLE" .PP \fBC/C++ :\fR .sp .nf pID = fork(); if (pID == 0) { printf("Parent : pid returned %d\\n", pID) } else { // If we'd used the TAU_INCLUDE_PARENT_DATA, we get // the performance data from the parent in this process // as well. TAU_REGISTER_FORK(pID, TAU_EXCLUDE_PARENT_DATA); printf("Child : pid = %d", pID); } .fi tau-2.16.4/man/man3/TAU_REGISTER_THREAD.3000066400000000000000000000027731062343042700170700ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU_REGISTER_THREAD" "3" "08/31/2005" "" "TAU Instrumentation API" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" TAU_REGISTER_THREAD \- Register a thread with the profiling system .SH "SYNOPSIS" .PP \fBC/C++:\fR .HP 20 \fB\fBTAU_REGISTER_THREAD\fR\fR\fB(\fR\fBvoid);\fR .PP \fBFortran:\fR .HP 20 \fB\fBTAU_REGISTER_THREAD\fR\fR\fB(\fR\fBvoid);\fR .SH "DESCRIPTION" .PP To register a thread with the profiling system, invoke the TAU_REGISTER_THREAD macro in the run method of the thread prior to executing any other TAU macro. This sets up thread identifiers that are later used by the instrumentation system. .SH "EXAMPLE" .PP \fBC/C++ :\fR .sp .nf void * threaded_func(void *data) { TAU_REGISTER_THREAD(); { /**** NOTE WE START ANOTHER BLOCK IN THREAD */ TAU_PROFILE_TIMER(tautimer, "threaded_func()", "int ()", TAU_DEFAULT); TAU_PROFILE_START(tautimer); work(); /* work done by this thread */ TAU_PROFILE_STOP(tautimer); } return NULL; } .fi .PP \fBFortran :\fR .sp .nf call TAU_REGISTER_THREAD() .fi .SH "CAVEAT" .PP PDT based tau_instrumentor does not insert TAU_REGISTER_THREAD calls, they must be inserted manually tau-2.16.4/man/man3/TAU_REPORT_STATISTICS.3000066400000000000000000000021371062343042700173740ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU_REPORT_STATISTIC" "3" "08/31/2005" "" "TAU Instrumentation API" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" TAU_REPORT_STATISTICS \- Outputs statistics .SH "SYNOPSIS" .PP \fBC/C++:\fR .HP 22 \fB\fBTAU_REPORT_STATISTICS\fR\fR\fB(\fR\fBvoid);\fR .PP \fBFortran:\fR .HP 22 \fB\fBTAU_REPORT_STATISTICS\fR\fR\fB(\fR\fBvoid);\fR .SH "DESCRIPTION" .PP TAU_REPORT_STATISTICS prints the aggregate statistics of user events across all threads in each node. Typically, this should be called just before the main thread exits. .SH "EXAMPLE" .PP \fBC/C++ :\fR .sp .nf TAU_REPORT_STATISTICS(); .fi .PP \fBFortran :\fR .sp .nf call TAU_REPORT_STATISTICS() .fi .SH "SEE ALSO" .PP TAU_REGISTER_EVENT(3), TAU_REGISTER_CONTEXT_EVENT(3), TAU_REPORT_THREAD_STATISTICS(3) tau-2.16.4/man/man3/TAU_REPORT_THREAD_STATISTICS.3000066400000000000000000000022151062343042700204200ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU_REPORT_THREAD_ST" "3" "08/31/2005" "" "TAU Instrumentation API" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" TAU_REPORT_THREAD_STATISTICS \- Outputs statistics, plus thread statistics .SH "SYNOPSIS" .PP \fBC/C++:\fR .HP 29 \fB\fBTAU_REPORT_THREAD_STATISTICS\fR\fR\fB(\fR\fBvoid);\fR .PP \fBFortran:\fR .HP 29 \fB\fBTAU_REPORT_THREAD_STATISTICS\fR\fR\fB(\fR\fBvoid);\fR .SH "DESCRIPTION" .PP TAU_REPORT_THREAD_STATISTICS prints the aggregate, as well as per thread user event statistics. Typically, this should be called just before the main thread exits. .SH "EXAMPLE" .PP \fBC/C++ :\fR .sp .nf TAU_REPORT_THREAD_STATISTICS(); .fi .PP \fBFortran :\fR .sp .nf call TAU_REPORT_THREAD_STATISTICS() .fi .SH "SEE ALSO" .PP TAU_REGISTER_EVENT(3), TAU_REGISTER_CONTEXT_EVENT(3), TAU_REPORT_STATISTICS(3) tau-2.16.4/man/man3/TAU_SET_INTERRUPT_INTERVAL.3000066400000000000000000000025421062343042700202220ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU_SET_INTERRUPT_IN" "3" "08/31/2005" "" "TAU Instrumentation API" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" TAU_SET_INTERRUPT_INTERVAL \- Change the inter\-interrupt interval for tracking memory and headroom .SH "SYNOPSIS" .PP \fBC/C++:\fR .HP 27 \fB\fBTAU_SET_INTERRUPT_INTERVAL\fR\fR\fB(\fR\fBint\ \fR\fB\fIvalue\fR\fR\fB);\fR .PP \fBFortran:\fR .HP 27 \fB\fBTAU_SET_INTERRUPT_INTERVAL\fR\fR\fB(\fR\fBinteger\ \fR\fB\fIvalue\fR\fR\fB);\fR .SH "DESCRIPTION" .PP Set the interrupt interval for tracking memory and headroom (See TAU_TRACK_MEMORY(3) and TAU_TRACK_MEMORY_HEADROOM(3)). By default an inter\-interrupt interval of 10 seconds is used in TAU. This call allows the user to set it to a different value specified by the argument value. .SH "EXAMPLE" .PP \fBC/C++ :\fR .sp .nf TAU_SET_INTERRUPT_INTERVAL(2) /* invokes the interrupt handler for memory every 2s */ .fi .PP \fBFortran :\fR .sp .nf call TAU_SET_INTERRUPT_INTERVAL(2) .fi .SH "SEE ALSO" .PP TAU_TRACK_MEMORY(3), TAU_TRACK_MEMORY_HEADROOM(3) tau-2.16.4/man/man3/TAU_TRACE_RECVMSG.3000066400000000000000000000035601062343042700166340ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU_TRACE_RECVMSG" "3" "08/31/2005" "" "TAU Instrumentation API" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" TAU_TRACE_RECVMSG \- Traces a receive operation .SH "SYNOPSIS" .PP \fBC/C++:\fR .HP 18 \fB\fBTAU_TRACE_RECVMSG\fR\fR\fB(\fR\fBint\ \fR\fB\fItag\fR\fR\fB, \fR\fBint\ \fR\fB\fIsource\fR\fR\fB, \fR\fBint\ \fR\fB\fIlength\fR\fR\fB);\fR .PP \fBFortran:\fR .HP 18 \fB\fBTAU_TRACE_RECVMSG\fR\fR\fB(\fR\fBinteger\ \fR\fB\fItag\fR\fR\fB, \fR\fBinteger\ \fR\fB\fIsource\fR\fR\fB, \fR\fBinteger\ \fR\fB\fIlength\fR\fR\fB);\fR .SH "DESCRIPTION" .PP TAU_TRACE_RECVMSG traces a receive operation where tag represents the type of the message received from the source process. .PP \fINOTE:\fR When TAU is configured to use MPI (\-mpiinc= \-mpilib=), the TAU_TRACE_RECVMSG and TAU_TRACE_SENDMSG macros are not required. The wrapper interposition library in .sp .nf $(TAU_MPI_LIBS) .fi .sp uses these macros internally for logging messages. .SH "EXAMPLE" .PP \fBC/C++ :\fR .sp .nf if (pid == 0) { TAU_TRACE_SENDMSG(currCol, sender, ncols * sizeof(T)); MPI_Send(vctr2, ncols * sizeof(T), MPI_BYTE, sender, currCol, MPI_COMM_WORLD); } else { MPI_Recv(&ans, sizeof(T), MPI_BYTE, MPI_ANY_SOURCE, MPI_ANY_TAG,MPI_COMM_WORLD, &stat); MPI_Get_count(&stat, MPI_BYTE, &recvcount); TAU_TRACE_RECVMSG(stat.MPI_TAG, stat.MPI_SOURCE, recvcount); } .fi .PP \fBFortran :\fR .sp .nf call TAU_TRACE_RECVMSG(tag, source, length) call TAU_TRACE_SENDMSG(tag, destination, length) .fi .SH "SEE ALSO" .PP TAU_TRACE_SENDMSG(3) tau-2.16.4/man/man3/TAU_TRACE_SENDMSG.3000066400000000000000000000035551062343042700166320ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU_TRACE_SENDMSG" "3" "08/31/2005" "" "TAU Instrumentation API" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" TAU_TRACE_SENDMSG \- Traces a receive operation .SH "SYNOPSIS" .PP \fBC/C++:\fR .HP 18 \fB\fBTAU_TRACE_SENDMSG\fR\fR\fB(\fR\fBint\ \fR\fB\fItag\fR\fR\fB, \fR\fBint\ \fR\fB\fIsource\fR\fR\fB, \fR\fBint\ \fR\fB\fIlength\fR\fR\fB);\fR .PP \fBFortran:\fR .HP 18 \fB\fBTAU_TRACE_SENDMSG\fR\fR\fB(\fR\fBinteger\ \fR\fB\fItag\fR\fR\fB, \fR\fBinteger\ \fR\fB\fIsource\fR\fR\fB, \fR\fBinteger\ \fR\fB\fIlength\fR\fR\fB);\fR .SH "DESCRIPTION" .PP TAU_TRACE_SENDMSG traces an inter\-process message communication when a tagged message is sent to a destination process. .PP \fINOTE:\fR When TAU is configured to use MPI (\-mpiinc= \-mpilib=), the TAU_TRACE_SENDMSG and TAU_TRACE_SENDMSG macros are not required. The wrapper interposition library in .sp .nf $(TAU_MPI_LIBS) .fi .sp uses these macros internally for logging messages. .SH "EXAMPLE" .PP \fBC/C++ :\fR .sp .nf if (pid == 0) { TAU_TRACE_SENDMSG(currCol, sender, ncols * sizeof(T)); MPI_Send(vctr2, ncols * sizeof(T), MPI_BYTE, sender, currCol, MPI_COMM_WORLD); } else { MPI_Recv(&ans, sizeof(T), MPI_BYTE, MPI_ANY_SOURCE, MPI_ANY_TAG,MPI_COMM_WORLD, &stat); MPI_Get_count(&stat, MPI_BYTE, &recvcount); TAU_TRACE_RECVMSG(stat.MPI_TAG, stat.MPI_SOURCE, recvcount); } .fi .PP \fBFortran :\fR .sp .nf call TAU_TRACE_RECVMSG(tag, source, length) call TAU_TRACE_SENDMSG(tag, destination, length) .fi .SH "SEE ALSO" .PP TAU_TRACE_RECVMSG(3) tau-2.16.4/man/man3/TAU_TRACK_MEMORY.3000066400000000000000000000031501062343042700165370ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU_TRACK_MEMORY" "3" "08/31/2005" "" "TAU Instrumentation API" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" TAU_TRACK_MEMORY \- Initializes memory tracking system .SH "SYNOPSIS" .PP \fBC/C++:\fR .HP 17 \fB\fBTAU_TRACK_MEMORY\fR\fR\fB(\fR\fBvoid);\fR .PP \fBFortran:\fR .HP 17 \fB\fBTAU_TRACK_MEMORY\fR\fR\fB(\fR\fBvoid);\fR .SH "DESCRIPTION" .PP For memory profiling, there are two modes of operation: 1) the user explicitly inserts TAU_TRACK_MEMORY_HERE() calls in the source code and the memory event is triggered at those locations, and 2) the user enables tracking memory by calling TAU_TRACK_MEMORY() and an interrupt is generated every 10 seconds and the memory event is triggered with the current value. Also, this interrupt interval can be changed by calling TAU_SET_INTERRUPT_INTERVAL(value). The tracking of memory events in both cases can be explictly enabled or disabled by calling the macros TAU_ENABLE_TRACKING_MEMORY() or TAU_DISABLE_TRACKING_MEMORY() respectively. .SH "EXAMPLE" .PP \fBC/C++ :\fR .sp .nf TAU_TRACK_MEMORY(); .fi .PP \fBFortran :\fR .sp .nf call TAU_TRACK_MEMORY() .fi .SH "SEE ALSO" .PP TAU_ENABLE_TRACKING_MEMORY(3), TAU_DISABLE_TRACKING_MEMORY(3), TAU_SET_INTERRUPT_INTERVAL(3), TAU_TRACK_MEMORY_HERE(3), TAU_TRACK_MEMORY_HEADROOM(3) tau-2.16.4/man/man3/TAU_TRACK_MEMORY_HEADROOM.3000066400000000000000000000037741062343042700200310ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU_TRACK_MEMORY_HEA" "3" "08/31/2005" "" "TAU Instrumentation API" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" TAU_TRACK_MEMORY_HEADROOM \- Track the headroom (amount of memory for a process to grow) by periodically interrupting the program .SH "SYNOPSIS" .PP \fBC/C++:\fR .HP 26 \fB\fBTAU_TRACK_MEMORY_HEADROOM\fR\fR\fB(\fR\fBvoid);\fR .PP \fBFortran:\fR .HP 26 \fB\fBTAU_TRACK_MEMORY_HEADROOM\fR\fR\fB(\fR\fBvoid);\fR .SH "DESCRIPTION" .PP Tracks the amount of memory available for the process before it runs out of free memory on the heap. This call sets up a signal handler that is invoked every 10 seconds by an interrupt (this interval may be altered by using the TAU_SET_INTERRUPT_INTERVAL call). Inside the interrupt handler, TAU evaluates how much memory it can allocate and associates it with the callstack using the TAU context events (See TAU_REGISTER_CONTEXT_EVENT(3)). The user can vary the size of the callstack by setting the environment variable TAU_CALLPATH_DEPTH (default is 2). This call is useful on machines like IBM BG/L where no virtual memory (or paging using the swap space) is present. The amount of heap memory available to the program is limited by the amount of available physical memory. TAU executes a series of malloc calls with a granularity of 1MB and determines the amount of memory available for the program to grow. .SH "EXAMPLE" .PP \fBC/C++ :\fR .sp .nf TAU_TRACK_MEMORY_HEADROOM(); .fi .PP \fBFortran :\fR .sp .nf call TAU_TRACK_MEMORY_HEADROOM() .fi .SH "SEE ALSO" .PP TAU_TRACK_MEMORY(3), TAU_SET_INTERRUPT_INTERVAL(3), TAU_ENABLE_TRACKING_MEMORY_HEADROOM(3), TAU_DISABLE_TRACKING_MEMORY_HEADROOM(3), TAU_TRACK_MEMORY_HEADROOM_HERE(3) tau-2.16.4/man/man3/TAU_TRACK_MEMORY_HEADROOM_HERE.3000066400000000000000000000024561062343042700206300ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU_TRACK_MEMORY_HEA" "3" "08/31/2005" "" "TAU Instrumentation API" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" TAU_TRACK_MEMORY_HEADROOM_HERE \- Takes a sample of the amount of memory available at a given point. .SH "SYNOPSIS" .PP \fBC/C++:\fR .HP 31 \fB\fBTAU_TRACK_MEMORY_HEADROOM_HERE\fR\fR\fB(\fR\fBvoid);\fR .PP \fBFortran:\fR .HP 31 \fB\fBTAU_TRACK_MEMORY_HEADROOM_HERE\fR\fR\fB(\fR\fBvoid);\fR .SH "DESCRIPTION" .PP Instead of relying on a periodic interrupt to track the amount of memory available to grow, this call may be used to take a sample at a given location in the source code. Context events are used to track the amount of memory headroom. .SH "EXAMPLE" .PP \fBC/C++ :\fR .sp .nf ary = new double [1024*1024*50]; TAU_TRACK_MEMORY_HEADROOM_HERE(); .fi .PP \fBFortran :\fR .sp .nf INTEGER, ALLOCATABLE :: STORAGEARY(:) allocate(STORAGEARY(1:999), STAT=IERR) TAU_TRACK_MEMORY_HEADROOM_HERE(); .fi .SH "SEE ALSO" .PP TAU_TRACK_MEMORY_HEADROOM(3) tau-2.16.4/man/man3/TAU_TRACK_MEMORY_HERE.3000066400000000000000000000024711062343042700173470ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU_TRACK_MEMORY_HER" "3" "08/31/2005" "" "TAU Instrumentation API" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" TAU_TRACK_MEMORY_HERE \- Triggers memory tracking at a given execution point .SH "SYNOPSIS" .PP \fBC/C++:\fR .HP 22 \fB\fBTAU_TRACK_MEMORY_HERE\fR\fR\fB(\fR\fBvoid);\fR .PP \fBFortran:\fR .HP 22 \fB\fBTAU_TRACK_MEMORY_HERE\fR\fR\fB(\fR\fBvoid);\fR .SH "DESCRIPTION" .PP Triggers memory tracking at a given execution point .SH "EXAMPLE" .PP \fBC/C++ :\fR .sp .nf int main(int argc, char **argv) { TAU_PROFILE("main()", " ", TAU_DEFAULT); TAU_PROFILE_SET_NODE(0); TAU_TRACK_MEMORY_HERE(); int *x = new int[5*1024*1024]; TAU_TRACK_MEMORY_HERE(); return 0; } .fi .PP \fBFortran :\fR .sp .nf INTEGER, ALLOCATABLE :: STORAGEARY(:) allocate(STORAGEARY(1:999), STAT=IERR) ! if we wish to record a sample of the heap memory ! utilization at this point, invoke the following call: call TAU_TRACK_MEMORY_HERE() .fi .SH "SEE ALSO" .PP TAU_TRACK_MEMORY(3) tau-2.16.4/man/man3/TAU_TYPE_STRING.3000066400000000000000000000040301062343042700164500ustar00rootroot00000000000000.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "TAU_TYPE_STRING" "3" "08/31/2005" "" "TAU Instrumentation API" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" TAU_TYPE_STRING \- Creates a type string .SH "SYNOPSIS" .PP \fBC++:\fR .HP 16 \fB\fBTAU_TYPE_STRING\fR\fR\fB(\fR\fBstring\ &\fR\fB\fIvariable\fR\fR\fB, \fR\fBstring\ &\fR\fB\fItype_string\fR\fR\fB);\fR .SH "DESCRIPTION" .PP This macro assigns the string constructed in type_string to the variable. The + operator and the CT macro can be used to construct the type string of an object. This is useful in identifying templates uniquely, as shown below. .SH "EXAMPLE" .PP \fBC++ :\fR .sp .nf template ostream& operator<<(ostream& out, const ParticleBase& P) { TAU_TYPE_STRING(taustr, "ostream (ostream, " + CT(P) + " )"); TAU_PROFILE("operator<<()"taustr, TAU_PARTICLE | TAU_IO); ... } .fi .PP When PLayout is instantiated with " UniformCartesian<3U, double> ",this generates the unique template name: .sp .nf operator<<() ostream const ParticleBase > ) .fi .PP The following example illustrates the usage of the CT macro to extract the name of the class associated with the given object using CT(*this); .sp .nf template unsigned ParticleBase::GetMessage(Message& msg, int node) { TAU_TYPE_STRING(taustr, CT(*this) + "unsigned (Message, int)"); TAU_PROFILE("ParticleBase::GetMessage()", taustr, TAU_PARTICLE); ... } .fi .PP When PLayout is instantiated with " UniformCartesian<3U, double> ",this generates the unique template name: .sp .nf ParticleBase::GetMessage() ParticleBase > unsigned (Message, int) .fi .SH "SEE ALSO" .PP CT(3), TAU_PROFILE, TAU_PROFILE_TIMER(3) tau-2.16.4/src/000077500000000000000000000000001062343042700131655ustar00rootroot00000000000000tau-2.16.4/src/Profile/000077500000000000000000000000001062343042700145655ustar00rootroot00000000000000tau-2.16.4/src/Profile/ClockSync.cpp000066400000000000000000000164121062343042700171650ustar00rootroot00000000000000/**************************************************************************** ** TAU Portable Profiling Package ** ** http://www.cs.uoregon.edu/research/tau ** ***************************************************************************** ** Copyright 2007 ** ** Department of Computer and Information Science, University of Oregon ** ** Advanced Computing Laboratory, Los Alamos National Laboratory ** ** Forschungszentrum Juelich ** ****************************************************************************/ /**************************************************************************** ** File : ClockSync.cpp ** ** Description : TAU Profiling Package ** ** Author : Alan Morris ** ** Contact : tau-bugs@cs.uoregon.edu ** ** Documentation : See http://www.cs.uoregon.edu/research/tau ** ** ** ** Description : Synchronize Clocks using MPI for tracing and ** ** ** ** This code is adapted from Kojak, See: ** ** ** ** http://www.fz-juelich.de/zam/kojak/ ** ** http://icl.cs.utk.edu/kojak/ ** ** ** ** ** ****************************************************************************/ #include // this is generally needed for mpich2 #define MPICH_IGNORE_CXX_SEEK #include #include #include #ifdef TRACING_ON #ifdef TAU_EPILOG #include "elg_trc.h" #else /* TAU_EPILOG */ #define PCXX_EVENT_SRC #include "Profile/pcxx_events.h" #endif /* TAU_EPILOG */ #endif // TRACING_ON #define SYNC_LOOP_COUNT 10 double& TheTauTraceBeginningOffset() { static double offset = 0.0; return offset; } double& TheTauTraceSyncOffset() { static double offset = -1.0; return offset; } bool& TheTauTraceSyncOffsetSet() { static bool value = false; return value; } // We're probably going to have to change this for some platforms #include static long getUniqueMachineIdentifier() { return gethostid(); } double TauSyncAdjustTimeStamp(double timestamp) { if (TheTauTraceSyncOffsetSet() == false) { // return 0 until sync'd return 0.0; } timestamp = timestamp - TheTauTraceBeginningOffset() + TheTauTraceSyncOffset(); return timestamp; } static double getPreSyncTime(int tid = 0) { #ifdef TAU_MULTIPLE_COUNTERS // counter 0 is the one we use double value = MultipleCounterLayer::getSingleCounter(tid, 0); #else double value = RtsLayer::getUSecD(tid); #endif return value - TheTauTraceBeginningOffset(); } static double masterServeOffset(int slave, MPI_Comm comm) { int lcount; int i, min; double tsend[SYNC_LOOP_COUNT], trecv[SYNC_LOOP_COUNT]; double pingpong_time, sync_time; MPI_Status stat; lcount = SYNC_LOOP_COUNT; if (lcount > SYNC_LOOP_COUNT) lcount = SYNC_LOOP_COUNT; /* exchange lcount ping pong messages with slave */ for (i = 0; i < lcount; i++) { tsend[i] = getPreSyncTime(); PMPI_Send(NULL, 0, MPI_INT, slave, 1, comm); PMPI_Recv(NULL, 0, MPI_INT, slave, 2, comm, &stat); trecv[i] = getPreSyncTime(); } // find minimum ping-pong time pingpong_time = trecv[0] - tsend[0]; min = 0; for (i = 1; i < lcount; i++) { if ((trecv[i] - tsend[i]) < pingpong_time) { pingpong_time = (trecv[i] - tsend[i]); min = i; } } sync_time = tsend[min] + (pingpong_time / 2); // send index of minimum ping-pong PMPI_Send(&min, 1, MPI_INT, slave, 3, comm); // send sync_time PMPI_Send(&sync_time, 1, MPI_DOUBLE, slave, 4, comm); // master has no offset return 0.0; } static double slaveDetermineOffset(int master, int rank, MPI_Comm comm) { int i, min; double tsendrecv[SYNC_LOOP_COUNT]; double sync_time; MPI_Status stat; // perform ping-pong loop for (i = 0; i < SYNC_LOOP_COUNT; i++) { PMPI_Recv(NULL, 0, MPI_INT, master, 1, comm, &stat); tsendrecv[i] = getPreSyncTime(); PMPI_Send(NULL, 0, MPI_INT, master, 2, comm); } // recieve the index of the ping-pong with the lowest time PMPI_Recv(&min, 1, MPI_INT, master, 3, comm, &stat); // recieve the sync_time from the master PMPI_Recv(&sync_time, 1, MPI_DOUBLE, master, 4, comm, &stat); double ltime = tsendrecv[min]; return sync_time - ltime; } static double getTimeOffset(int rank, int size) { MPI_Comm machineComm; PMPI_Comm_split(MPI_COMM_WORLD, getUniqueMachineIdentifier(), 0, &machineComm); int machineRank; int numProcsThisMachine; PMPI_Comm_rank(machineComm, &machineRank); PMPI_Comm_size(machineComm, &numProcsThisMachine); // inter-machine communicator MPI_Comm interMachineComm; int numMachines; // sync rank is the rank within the inter-machine communicator int syncRank; // create a communicator with one process from each machine PMPI_Comm_split(MPI_COMM_WORLD, machineRank, 0, &interMachineComm); PMPI_Comm_rank(interMachineComm, &syncRank); PMPI_Comm_size(interMachineComm, &numMachines); // broadcast the associated starting offset double startOffset = TheTauTraceBeginningOffset(); PMPI_Bcast(&startOffset, 1, MPI_DOUBLE, 0, machineComm); TheTauTraceBeginningOffset() = startOffset; double offset = 0.0; PMPI_Barrier(MPI_COMM_WORLD); if (machineRank == 0) { for (int i = 1; i < numMachines; i++) { PMPI_Barrier(interMachineComm); if (syncRank == i ){ offset = slaveDetermineOffset(0, i, interMachineComm); } else if (syncRank == 0) { offset = masterServeOffset(i, interMachineComm); } } } // broadcast the result to other processes on this machine PMPI_Bcast(&offset, 1, MPI_DOUBLE, 0, machineComm); return offset; } // The MPI_Finalize wrapper calls this routine extern "C" void TauSyncFinalClocks(int rank, int size) { // only do this when tracing #ifdef TRACING_ON double offset = getTimeOffset(rank, size); double diff = TheTauTraceSyncOffset() - offset; TAU_REGISTER_EVENT(endOffset, "TauTraceClockOffsetEnd"); offset = getTimeOffset(rank, size); TraceEvent((endOffset).GetEventId(), (x_int64) offset, 0, 0, 0); #endif } // The MPI_Init wrapper calls this routine extern "C" void TauSyncClocks(int rank, int size) { PMPI_Barrier(MPI_COMM_WORLD); printf ("TAU: Clock Synchonization active on node : %d\n", rank); // clear counter to zero, since the times might be wildly different (LINUX_TIMERS) // we reset to zero so that the offsets won't be so large as to give us negative numbers // on some nodes. This also allows us to easily use 0 before MPI_Init. TheTauTraceBeginningOffset() = getPreSyncTime(); double offset = 0; // only do this when tracing #ifdef TRACING_ON TAU_REGISTER_EVENT(beginOffset, "TauTraceClockOffsetStart"); offset = getTimeOffset(rank, size); #endif TheTauTraceSyncOffset() = offset; TheTauTraceSyncOffsetSet() = true; #ifdef TRACING_ON TraceEvent((beginOffset).GetEventId(), (x_int64) offset, 0, 0, 0); #endif PMPI_Barrier(MPI_COMM_WORLD); } tau-2.16.4/src/Profile/FunctionInfo.cpp000066400000000000000000000366241062343042700177050ustar00rootroot00000000000000/**************************************************************************** ** TAU Portable Profiling Package ** ** http://www.cs.uoregon.edu/research/tau ** ***************************************************************************** ** Copyright 1997 ** ** Department of Computer and Information Science, University of Oregon ** ** Advanced Computing Laboratory, Los Alamos National Laboratory ** ****************************************************************************/ /*************************************************************************** ** File : FunctionInfo.cpp ** ** Description : TAU Profiling Package ** ** Author : Sameer Shende ** ** Contact : sameer@cs.uoregon.edu sameer@acl.lanl.gov ** ** Flags : Compile with ** ** -DPROFILING_ON to enable profiling (ESSENTIAL) ** ** -DPROFILE_STATS for Std. Deviation of Excl Time ** ** -DSGI_HW_COUNTERS for using SGI counters ** ** -DPROFILE_CALLS for trace of each invocation ** ** -DSGI_TIMERS for SGI fast nanosecs timer ** ** -DTULIP_TIMERS for non-sgi Platform ** ** -DPOOMA_STDSTL for using STD STL in POOMA src ** ** -DPOOMA_TFLOP for Intel Teraflop at SNL/NM ** ** -DPOOMA_KAI for KCC compiler ** ** -DDEBUG_PROF for internal debugging messages ** ** -DPROFILE_CALLSTACK to enable callstack traces ** ** Documentation : See http://www.cs.uoregon.edu/research/tau ** ***************************************************************************/ ////////////////////////////////////////////////////////////////////// // Include Files ////////////////////////////////////////////////////////////////////// #include "Profile/Profiler.h" #ifdef TAU_DOT_H_LESS_HEADERS #include using namespace std; #else /* TAU_DOT_H_LESS_HEADERS */ #include #endif /* TAU_DOT_H_LESS_HEADERS */ #include #include #include #include #if (!defined(TAU_WINDOWS)) #include #if (defined(POOMA_TFLOP) || !defined(TULIP_TIMERS)) #include #else #ifdef TULIP_TIMERS #include "Profile/TulipTimers.h" #endif //TULIP_TIMERS #endif //POOMA_TFLOP #else #include #endif //TAU_WINDOWS #ifdef TRACING_ON #ifdef TAU_VAMPIRTRACE #include #else /* TAU_VAMPIRTRACE */ #ifdef TAU_EPILOG #include "elg_trc.h" #else /* TAU_EPILOG */ #define PCXX_EVENT_SRC #include "Profile/pcxx_events.h" #endif /* TAU_EPILOG */ #endif /* TAU_VAMPIRTRACE */ #endif // TRACING_ON bool Tau_snapshot_initialization(); ////////////////////////////////////////////////////////////////////// // The purpose of this subclass of vector is to give us a chance to execute // some code when TheFunctionDB is destroyed. For Dyninst, this is necessary // when running with fortran programs ////////////////////////////////////////////////////////////////////// class FIvector : public vector { public: ~FIvector() { //printf ("FIvector destructor!\n"); if (TheUsingDyninst() && TheSafeToDumpData()) { TAU_PROFILE_EXIT("FunctionDB destructor"); TheSafeToDumpData() = 0; } } }; ////////////////////////////////////////////////////////////////////// // Instead of using a global var., use static inside a function to // ensure that non-local static variables are initialised before being // used (Ref: Scott Meyers, Item 47 Eff. C++). ////////////////////////////////////////////////////////////////////// vector& TheFunctionDB(void) { // FunctionDB contains pointers to each FunctionInfo static object // we need the timestamp of the "start" static bool flag = Tau_snapshot_initialization(); // we now use the above FIvector, which subclasses vector //static vector FunctionDB; static FIvector FunctionDB; return FunctionDB; } ////////////////////////////////////////////////////////////////////// // It is not safe to call Profiler::StoreData() after // FunctionInfo::~FunctionInfo has been called as names are null ////////////////////////////////////////////////////////////////////// int& TheSafeToDumpData() { static int SafeToDumpData=1; return SafeToDumpData; } ////////////////////////////////////////////////////////////////////// // Set when uning Dyninst ////////////////////////////////////////////////////////////////////// int& TheUsingDyninst() { static int UsingDyninst=0; return UsingDyninst; } #ifdef TAU_VAMPIRTRACE ////////////////////////////////////////////////////////////////////// // Initialize VampirTrace Tracing package ////////////////////////////////////////////////////////////////////// int TauInitVampirTrace(void) { DEBUGPROFMSG("Calling vt_open"< >(); #endif //PROFILE_CALLS // Make this a ptr to a list so that ~FunctionInfo doesn't destroy it. for (int i=0; i using namespace std; #else /* TAU_DOT_H_LESS_HEADERS */ #include #endif /* TAU_DOT_H_LESS_HEADERS */ #include #include ///////////////////////////////////////////////////////////////////////// // Member Function Definitions For class JavaThreadLayer // This allows us to get thread ids from 0..N-1 ///////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////// // Define the static private members of JavaThreadLayer ///////////////////////////////////////////////////////////////////////// JavaVM * JavaThreadLayer::tauVM; int JavaThreadLayer::tauThreadCount = 0; JVMPI_RawMonitor JavaThreadLayer::tauNumThreadsLock ; JVMPI_RawMonitor JavaThreadLayer::tauDBMutex ; JVMPI_RawMonitor JavaThreadLayer::tauEnvMutex ; JVMPI_Interface * JavaThreadLayer::tau_jvmpi_interface; //////////////////////////////////////////////////////////////////////// // RegisterThread() should be called before any profiling routines are // invoked. This routine sets the thread id that is used by the code in // FunctionInfo and Profiler classes. //////////////////////////////////////////////////////////////////////// int * JavaThreadLayer::RegisterThread(JNIEnv *env_id) { static int initflag = JavaThreadLayer::InitializeThreadData(); // if its in here the first time, setup mutexes etc. int *threadId = new int; // Lock the mutex guarding the thread count before incrementing it. tau_jvmpi_interface->RawMonitorEnter(tauNumThreadsLock); if (tauThreadCount == TAU_MAX_THREADS) { fprintf(stderr, "TAU>ERROR number of threads exceeds TAU_MAX_THREADS\n"); fprintf(stderr, "Change TAU_MAX_THREADS parameter in /include/Profile/Profiler.h\n"); fprintf(stderr, "And make install. Current value is %d\n", tauThreadCount); fprintf(stderr, "******************************************************************\n"); tau_jvmpi_interface->ProfilerExit(1); } // Increment the number of threads present (*threadId) = tauThreadCount ++; DEBUGPROFMSG("Thread id "<< tauThreadCount<< " Created! "<RawMonitorExit(tauNumThreadsLock); // A thread should call this routine exactly once. // Make this a thread specific data structure wrt the thread environment tau_jvmpi_interface->SetThreadLocalStorage(env_id, threadId); return threadId; } //////////////////////////////////////////////////////////////////////// // GetThreadId wrapper to be used when we don't have the environment // pointer (JNIEnv *) that we get from JVMPI. Typically called by entry/exit // of a non-Java layer. //////////////////////////////////////////////////////////////////////// int JavaThreadLayer::GetThreadId(void) { // First get the environment id of the thread using the JVM JNIEnv *env_id; int res = tauVM->GetEnv( (void **) &env_id, JNI_VERSION_1_2 ); if (res < 0) { printf("JavaThreadLayer::GetThreadId() gets -ve GetEnv result \n"); return -1; } if (env_id == (JNIEnv *) NULL) { printf("JavaThreadLayer::GetThreadId(): env_id is null! res = %d\n", res); return -1; } // We now have a valid env_id, call the other overloaded version of the // the GetThreadId member return GetThreadId(env_id); } //////////////////////////////////////////////////////////////////////// // GetThreadId returns an id in the range 0..N-1 by looking at the // thread specific data. //////////////////////////////////////////////////////////////////////// int JavaThreadLayer::GetThreadId(JNIEnv *env_id) { int *tid ; tid = (int *) tau_jvmpi_interface->GetThreadLocalStorage(env_id); // The thread id is stored in a thread specific storage if (tid == (int *) NULL) { // This thread needs to be registered tid = RegisterThread(env_id); if ((*tid) == 0) { // Main JVM thread has tid 0, others have tid > 0 TauJavaLayer::CreateTopLevelRoutine( "THREAD=JVM-MainThread; THREAD GROUP=system", " ", "THREAD", (*tid)); } else { // Internal thread that was just registered. TauJavaLayer::CreateTopLevelRoutine( "THREAD=JVM-InternalThread; THREAD GROUP=system"," ", "THREAD", (*tid)); } } return (*tid); } //////////////////////////////////////////////////////////////////////// // InitializeThreadData is called before any thread operations are performed. // It sets the default values for static private data members of the // JavaThreadLayer class. //////////////////////////////////////////////////////////////////////// int JavaThreadLayer::InitializeThreadData(void) { // Initialize the mutex tauNumThreadsLock = tau_jvmpi_interface->RawMonitorCreate("num threads lock"); //cout <<" Initialized the thread Mutex data " <RawMonitorCreate("FuncDB lock"); //cout <<" Initialized the functionDB Mutex data " <RawMonitorEnter(tauDBMutex); return 1; } //////////////////////////////////////////////////////////////////////// // UnLockDB() unlocks the mutex tauDBMutex used by the above lock operation //////////////////////////////////////////////////////////////////////// int JavaThreadLayer::UnLockDB(void) { // Unlock the functionDB mutex tau_jvmpi_interface->RawMonitorExit(tauDBMutex); return 1; } //////////////////////////////////////////////////////////////////////// int JavaThreadLayer::InitializeEnvMutexData(void) { // For locking functionDB tauEnvMutex = tau_jvmpi_interface->RawMonitorCreate("Env lock"); //cout <<" Initialized the Env Mutex data " <RawMonitorEnter(tauEnvMutex); return 1; } //////////////////////////////////////////////////////////////////////// // UnLockDB() unlocks the mutex tauDBMutex used by the above lock operation //////////////////////////////////////////////////////////////////////// int JavaThreadLayer::UnLockEnv(void) { // Unlock the Env mutex tau_jvmpi_interface->RawMonitorExit(tauEnvMutex); return 1; } //////////////////////////////////////////////////////////////////////// // TotalThreads returns the number of active threads //////////////////////////////////////////////////////////////////////// int JavaThreadLayer::TotalThreads(void) { int count; // For synchronization, we lock the thread count mutex. If we had a // set and increment operation, we wouldn't need this. Optimization for // the future. tau_jvmpi_interface->RawMonitorEnter(tauNumThreadsLock); count = tauThreadCount; tau_jvmpi_interface->RawMonitorExit(tauNumThreadsLock); return count; } // Use JVMPI to get per thread cpu time (microseconds) jlong JavaThreadLayer::getCurrentThreadCpuTime(void) { return tau_jvmpi_interface->GetCurrentThreadCpuTime() / 1000; } // EOF JavaThreadLayer.cpp /*************************************************************************** * $RCSfile: JavaThreadLayer.cpp,v $ $Author: amorris $ * $Revision: 1.5 $ $Date: 2005/11/11 03:46:48 $ * TAU_VERSION_ID: $Id: JavaThreadLayer.cpp,v 1.5 2005/11/11 03:46:48 amorris Exp $ ***************************************************************************/ tau-2.16.4/src/Profile/KtauCounters.cpp000066400000000000000000000274421062343042700177310ustar00rootroot00000000000000/**************************************************************************** ** TAU Portable Profiling Package ** ** http://www.cs.uoregon.edu/research/tau ** ***************************************************************************** ** Copyright 1997-2006 ** ** Department of Computer and Information Science, University of Oregon ** ** Advanced Computing Laboratory, Los Alamos National Laboratory ** ****************************************************************************/ /**************************************************************************** ** File : KtauCounters.cpp ** ** Description : TAU Profiling Package ** ** Contact : anataraj@cs.uoregon.edu ** ** Documentation : See http://www.cs.uoregon.edu/research/tau ** ****************************************************************************/ #ifdef TAUKTAU_SHCTR //This code is based off the overall structure of the PapiLayer.cpp multiple-counter support, //instead of PAPI uses the KTAU facilities. #include "Profile/Profiler.h" #ifdef TAU_DOT_H_LESS_HEADERS #include using namespace std; #else /* TAU_DOT_H_LESS_HEADERS */ #include #endif /* TAU_DOT_H_LESS_HEADERS */ #include #include #include "Profile/KtauCounters.h" #include "Profile/KtauSymbols.h" #include "Profile/KtauProfiler.h" //#define TAU_KTAUCTR_DEBUG #define TAU_KTAUCTR_DEBUG_LEVEL 0 // level 0 will perform backward running counter checking and output critical errors // level 1 will perform output diagnostic information // level 10 will output all counter values, for each retrieval #define KTAU_SHCONT_SIZE 2000 //this is the size of the shared-container that is created to share mem between user/OS. #ifdef TAU_MULTIPLE_COUNTERS #define MAX_KTAU_COUNTERS MAX_TAU_COUNTERS #else #define MAX_KTAU_COUNTERS 1 #endif bool KtauCounters::ktauInitialized = false; KtauCtrThread KtauCounters::ThreadList[TAU_MAX_THREADS]; int KtauCounters::numCounters = 0; unsigned long KtauCounters::counterList[MAX_KTAU_COUNTERS]; char KtauCounters::counterSyms[MAX_TAU_COUNTERS][KTAU_CTRSYM_MAXSZ]; #ifdef TAU_KTAUCTR_DEBUG #include static void dmesg(int level, char* format, ...) { #ifndef TAU_KTAUCTR_DEBUG /* Empty body, so a good compiler will optimise calls to dmesg away */ #else va_list args; if (level > TAU_KTAUCTR_DEBUG_LEVEL) { return; } fprintf (stderr, "[%d] ", getpid()); va_start(args, format); vfprintf(stderr, format, args); va_end(args); #endif /* TAU_KTAUCTR_DEBUG */ } #endif ///////////////////////////////////////////////// KtauCtrThread::~KtauCtrThread() { //do nothing - let the kernel handle cleanup for now: //we need to be able to trap death of a thread in TAU to //be able to do this cleanup correctly in user-space - //but the kernel knows when the death occurs and hence //already implements this cleanup /* printf("~KtauCtrThread(): ThreadID:%d\n", ThreadID); if(ThreadID != -1) { printf("~KtauCtrThread(): CounterValues:%p\n", CounterValues); free(CounterValues); CounterValues = NULL; //ktau_put_counter_user(ThreadList[i].shctr); printf("~KtauCtrThread(): shctr:%p\n", shctr); ktau_put_counter(shctr); shctr = NULL; //ktau_del_container_user(KTAU_TYPE_PROFILE, 1, NULL, 0, NULL, ThreadList[i].shcont); printf("~KtauCtrThread(): shcont:%p\n", shcont); ktau_del_container(KTAU_TYPE_PROFILE, 1, NULL, 0, NULL, shcont); shcont = NULL; ThreadID = -1; } */ } ///////////////////////////////////////////////// int KtauCounters::addCounter(char *name) { #ifdef TAU_KTAUCTR_DEBUG dmesg(1, "KTAU: Adding counter %s\n", name); #endif strncpy(counterSyms[numCounters], name, KTAU_CTRSYM_MAXSZ); counterSyms[numCounters][KTAU_CTRSYM_MAXSZ-1] = '\0'; //get the address of this name unsigned long addr = KtauProfiler::getKtauSym().MapRevSym(string(counterSyms[numCounters])); //for now assume we are able to get the address //but assumptions are #$%@# so change it to check for failures. if(!addr) { //if it fails - maybe they gave the address directly instead of symbol name? fprintf(stderr, "KTAU CTR: getKtauSym FAILED for:%s. Assume they provided address instead of symbol-name in ENV variable.", counterSyms[numCounters]); counterList[numCounters] = strtoul(counterSyms[numCounters], NULL, 16); } else { counterList[numCounters] = addr; } int counterID = numCounters++; return counterID; } //////////////////////////////////////////////////// int KtauCounters::initializeThread(int tid) { int ret; ktau_ushcont* ushcont = NULL; ktau_ush_ctr* ushctr = NULL; #ifdef TAU_KTAUCTR_DEBUG dmesg(1, "KTAU CTR: Initializing Thread Data for TID = %d\n", tid); #endif if (tid >= TAU_MAX_THREADS) { fprintf (stderr, "KTAU CTR: Exceeded max thread count of TAU_MAX_THREADS\n"); return -1; } if((ThreadList[tid].shcont != NULL) || (ThreadList[tid].shctr != NULL)) { fprintf (stderr, "KTAU CTR: ThreadList[%d] being used? shcont:%p shctr:%p.\n", tid, ThreadList[tid].shcont, ThreadList[tid].shctr); return -1; } ThreadList[tid].CounterValues = (unsigned long long*) calloc(sizeof(unsigned long long)*numCounters, 1); if(!(ThreadList[tid].CounterValues)) { fprintf (stderr, "KTAU CTR: ThreadList[%d] calloc of CounterValues, size[%d] failed.\n", tid, sizeof(unsigned long long)*numCounters); return -1; } ushcont = ktau_add_container(KTAU_TYPE_PROFILE, 1, NULL, 0, NULL, KTAU_SHCONT_SIZE); if(!ushcont) { fprintf(stderr, "KTAU CTR: ktau_add_container FAILED. size:%ld\n", KTAU_SHCONT_SIZE); goto out_free_mem; } ret = ktau_get_counter(ushcont, "KTAU_MULTICTR", numCounters, counterList, &ushctr); if((ret) || (!ushctr)) { fprintf(stderr, "KTAU CTR: ktau_get_counter FAILED. ret:%d\n", ret); goto out_free_cont; } //alls well...save it ThreadList[tid].ThreadID = tid; ThreadList[tid].shcont = ushcont; ThreadList[tid].shctr = ushctr; return 0; //Success out_free_cont: ret = ktau_del_container(KTAU_TYPE_PROFILE, 1, NULL, 0, NULL, ushcont); if(ret) { fprintf(stderr, "KTAU CTR: ktau_del_container also FAILED. size:%ld ret:%d\n", KTAU_SHCONT_SIZE, ret); } out_free_mem: free(ThreadList[tid].CounterValues); ThreadList[tid].CounterValues = NULL; ThreadList[tid].ThreadID = -1; ThreadList[tid].shcont = NULL; ThreadList[tid].shctr = NULL; return -1; //failure } //////////////////////////////////////////////////// long long KtauCounters::getSingleCounter(int tid) { int rc; if (!ktauInitialized) { rc = initializeKtauCtr(); if (rc != 0) { return rc; } } if (numCounters == 0) { // adding must have failed, just return return 0; } if (ThreadList[tid].ThreadID == -1) { rc = initializeThread(tid); if (rc != 0) { return rc; } } #ifdef TAU_KTAUCTR_DEBUG /* long long oldValue = ThreadList[tid]->CounterValues[0]; */ #endif //for now KTAU counters in TAU look at excl time. Must have a way to choose incl/excl/ev-count rc = ktau_copy_counter_excl(ThreadList[tid].shctr, ThreadList[tid].CounterValues, 1 /*Single Counter*/); if(rc) { //failed for some reason... fprintf (stderr, "KTAU CTR: Error reading KTAU counters.\n"); return -1; } #ifdef TAU_KTAUCTR_DEBUG /* dmesg(10, "PAPI: getSingleCounter<%d> = %lld\n", tid, ThreadList[tid]->CounterValues[0]); long long difference = ThreadList[tid]->CounterValues[0] - oldValue; dmesg(10, "PAPI: Difference = %lld\n", difference); if (difference < 0) dmesg (0, "PAPI: Counter running backwards?\n"); dmesg(difference < 0 ? 0 : 10, "PAPI: Previous value = %lld\n", oldValue); dmesg(difference < 0 ? 0 : 10, "PAPI: Current value = %lld\n", ThreadList[tid]->CounterValues[0]); dmesg(difference < 0 ? 0 : 10, "PAPI: Difference = %lld\n", difference); */ #endif return ThreadList[tid].CounterValues[0]; } ///////////////////////////////////////////////// long long* KtauCounters::getAllCounters(int tid, int *numValues) { int rc; if (!ktauInitialized) { int rc = initializeKtauCtr(); if (rc != 0) { return NULL; } } if (numCounters == 0) { // adding must have failed, just return return NULL; } if (ThreadList[tid].ThreadID == -1) { rc = initializeThread(tid); if (rc != 0) { return NULL; } } *numValues = numCounters; #ifdef TAU_KTAUCTR_DEBUG /* long long previousCounters[MAX_KTAU_COUNTERS]; for (int i=0; iCounterValues[i]; } */ #endif //for now KTAU counters in TAU look at excl time. Must have a way to choose incl/excl/ev-count rc = ktau_copy_counter_excl(ThreadList[tid].shctr, ThreadList[tid].CounterValues, numCounters); if(rc) { //failed for some reason... fprintf (stderr, "KTAU CTR: Error reading KTAU counters.\n"); return NULL; } #ifdef TAU_KTAUCTR_DEBUG /* for (int i=0; iCounterValues[i] - previousCounters[i]; dmesg(10, "PAPI: Difference[%d] = %lld\n", i, difference); if (difference < 0) { dmesg(0, "PAPI: Counter running backwards?\n"); dmesg(0, "PAPI: Previous value[%d] = %lld\n", i, previousCounters[i]); dmesg(0, "PAPI: Current value[%d] = %lld\n", i, ThreadList[tid]->CounterValues[i]); dmesg(0, "PAPI: Difference [%d] = %lld\n", i, difference); } } */ #endif return (long long*) ThreadList[tid].CounterValues; } ///////////////////////////////////////////////// int KtauCounters::reinitializeKtauCtr() { #ifdef TAU_KTAUCTR_DEBUG dmesg(1, "KtauCounters::reinitializeKtauCtr\n"); #endif // This function is called from the fork() handler // We need to clean up the ThreadList and then reinitialize KtauCtr if (ktauInitialized) { for(int i=0; i #include _syscall0(pid_t,gettid) pid_t gettid(void); unsigned long ktau_thread_gettid(void) { #ifdef SYS_gettid return(syscall(SYS_gettid)); #elif defined(__NR_gettid) return(syscall(__NR_gettid)); #else return(gettid()); #endif } ///////////////////////////////////////////////// int KtauCounters::initializeKtauCtr() { #ifdef TAU_KTAUCTR_DEBUG dmesg(1, "KtauCounters::initializeKtauCounters\n"); #endif ktauInitialized = true; //do nothing for now return 0; } ///////////////////////////////////////////////// int KtauCounters::initializeKtauCounters(bool lock) { static bool initialized = false; if (initialized) { return 0; } if (lock) RtsLayer::LockDB(); int rc = initializeKtauCtr(); if (lock) RtsLayer::UnLockDB(); initialized = true; return rc; } ///////////////////////////////////////////////// int KtauCounters::RegisterFork(int type) { //ignore type for now //just call reinitialize? return reinitializeKtauCtr(); } #endif //TAUKTAU_SHCTR tau-2.16.4/src/Profile/KtauFuncInfo.cpp000077500000000000000000000044361062343042700176370ustar00rootroot00000000000000/**************************************************************************** ** TAU Portable Profiling Package ** ** http://www.acl.lanl.gov/tau ** ***************************************************************************** ** Copyright 1999 ** ** Department of Computer and Information Science, University of Oregon ** ** Advanced Computing Laboratory, Los Alamos National Laboratory ** ****************************************************************************/ /*************************************************************************** ** File : KtauFuncInfo.cpp ** ** Description : Kernel-space FunctionInfo ** ** Author : Surave Suthikulpanit ** ** : Aroon Nataraj ** ** Contact : suravee@cs.uoregon.edu ** ** : anataraj@cs.uoregon.edu ** ** Flags : Compile with ** ** -DTAUKTAU or -DTAUKTAU_MERGE ** ** Documentation : ** ***************************************************************************/ #include "Profile/KtauFuncInfo.h" /* definition of statics need to be done outside the class */ unsigned long long KtauFuncInfo::kernelGrpCalls[TAU_MAX_THREADS][merge_max_grp] = {{0}}; unsigned long long KtauFuncInfo::kernelGrpIncl[TAU_MAX_THREADS][merge_max_grp] = {{0}}; unsigned long long KtauFuncInfo::kernelGrpExcl[TAU_MAX_THREADS][merge_max_grp] = {{0}}; /*-------------------------- CON/DESTRUCTOR ---------------------------*/ /* * Function : KtauFuncInfo::KtauFuncInfo * Description : Constructor */ KtauFuncInfo::KtauFuncInfo() { for(int i =0; i #endif /* TAUKTAU_MERGE */ #endif /* TAUKTAU */ tau-2.16.4/src/Profile/KtauProfiler.cpp000077500000000000000000000500701062343042700177050ustar00rootroot00000000000000/**************************************************************************** ** TAU Portable Profiling Package ** ** http://www.acl.lanl.gov/tau ** ***************************************************************************** ** Copyright 1999 ** ** Department of Computer and Information Science, University of Oregon ** ** Advanced Computing Laboratory, Los Alamos National Laboratory ** ****************************************************************************/ /*************************************************************************** ** File : KtauProfiler.cpp ** ** Description : Kernel-space FunctionInfo ** ** Author : Aroon Nataraj ** ** : Surave Suthikulpanit ** ** Contact : anataraj@cs.uoregon.edu ** ** : suravee@cs.uoregon.edu ** ** Flags : Compile with ** ** -DTAUKTAU or -DTAUKTAU_MERGE ** ** Documentation : ** ***************************************************************************/ #if defined(TAUKTAU) #include #include #include #include #include #include #include #include #include #include #include #if defined(TAUKTAU_MERGE) #include #include // DONT #include #include //decl int read_kstate_1buf(ktau_state* pstate, volatile int cur_active, unsigned long long* ptime, unsigned long long* pcalls, unsigned long long *pexcl); int read_kstate_2buf(ktau_state* pstate, volatile int cur_active, unsigned long long* ptime, unsigned long long* pcalls, unsigned long long *pexcl); #define read_kstate(pstate, cur_active, ptime, pcalls, pexcl) read_kstate_1buf(pstate, cur_active, ptime, pcalls, pexcl) #ifdef TAUKTAU_MERGE char* merge_grp_name[NO_MERGE_GRPS+1] = { "KERNEL", "SYSCALL", "IRQ", "BH", "SCHED", "EXCEPT", "SIGNAL", "SOCKET", "TCP", "ICMP", "NONE" }; #endif #endif /* defined(TAUKTAU_MERGE) */ #define OUTPUT_NAME_SIZE 1024 using namespace std; //statics KtauProfiler * KtauProfiler::CurrentKtauProfiler[TAU_MAX_THREADS] = {0}; long long KtauProfiler::refCount[TAU_MAX_THREADS] = {0}; KtauSymbols KtauProfiler::KtauSym(KTAU_KALLSYMS_PATH); KtauProfiler* KtauProfiler::GetKtauProfiler(int tid) { DEBUGPROFMSG(" Entering: tid:"<< tid << endl; ); if((tid >= TAU_MAX_THREADS) || (tid < 0)) { DEBUGPROFMSG(" Bad tid:"<< tid << endl; ); return NULL; } if(CurrentKtauProfiler[tid] == NULL) { CurrentKtauProfiler[tid] = new KtauProfiler(tid); DEBUGPROFMSG(" Creating New KtauProfiler:"<< CurrentKtauProfiler[tid] << endl; ); refCount[tid] = 0; } refCount[tid]++; DEBUGPROFMSG(" RefCount:"<< refCount[tid] << endl; ); DEBUGPROFMSG(" Leaving: tid:"<< tid << endl; ); return CurrentKtauProfiler[tid]; } void KtauProfiler::PutKtauProfiler(int tid) { DEBUGPROFMSG(" Entering: tid:"<< tid << endl; ); if((tid >= TAU_MAX_THREADS) || (tid < 0)) { DEBUGPROFMSG(" Bad tid:"<< tid << endl; ); return; } refCount[tid]--; if(refCount[tid] == 0) { DEBUGPROFMSG(" Deleting KtauProfiler:"<< CurrentKtauProfiler[tid] << "refCount is:" << refCount[tid] << endl; ); delete CurrentKtauProfiler[tid]; CurrentKtauProfiler[tid] = NULL; } DEBUGPROFMSG(" Leaving: tid:"<< tid << endl; ); } //Instrumentation Methods void KtauProfiler::Start(Profiler *profiler, int tid) { DEBUGPROFMSG(" Entering: tid:"<< tid << "Profiler is: " << profiler << endl; ); if(refCount[tid] == 1) { DEBUGPROFMSG(" 1st Start Call for tid: "<< tid << endl << "Calling StartKProfile. " << endl; ); //1. Start call for this thread KernProf.StartKProfile(); #if defined TAUKTAU_MERGE //2. if merge, then setup merge-data struct current_ktau_state = (ktau_state*) calloc(4096,1); if(!current_ktau_state) { perror("calloc of current_ktau_state:"); exit(-1); } DEBUGPROFMSG(" Allocated current_ktau_state: "<< current_ktau_state << endl; ); /* Setting ktau_state pointer in kernel-space to point * to the global current_state */ //AN REMOVED TEMPORSRILY TO CHECK EFFECT - TURN BACK ON ASAP! ktau_set_state(NULL,current_ktau_state,NULL); DEBUGPROFMSG(" Called ktau_set_state." << endl; ); #endif /* TAUKTAU_MERGE */ } //any start #if defined TAUKTAU_MERGE DEBUGPROFMSG(" Calling SetStartState." << endl; ); //1. if merge, then read the start-merge-info SetStartState(current_ktau_state, profiler, tid, (refCount[tid] == 1)); #endif /* TAUKTAU_MERGE */ DEBUGPROFMSG(" Leaving: tid:"<< tid << "Profiler is: " << profiler << endl; ); } void KtauProfiler::Stop(Profiler *profiler, bool AddInclFlag, int tid) { DEBUGPROFMSG(" Entering: tid:"<< tid << "Profiler is: " << profiler << "AddInclFlag is: " << AddInclFlag << endl; ); //Any Stop #if defined TAUKTAU_MERGE DEBUGPROFMSG(" Calling SetStopState. " << endl; ); //1. if merge, then read the stop-merge-info and put into KtauFuncInfo SetStopState(current_ktau_state, AddInclFlag, profiler, tid, (refCount[tid] == 1)); //2. Also help calc parent's excl-kernel-time etc #endif /* TAUKTAU_MERGE */ //Last Stop if(refCount[tid] == 1) { DEBUGPROFMSG(" Last Stop. tid: " << tid << " profiler: " << profiler << " . Calling StopKProfile." << endl; ); //1. Stop call for this thread KernProf.StopKProfile(); #if defined TAUKTAU_MERGE //2. if merge, then tear-down merge-data struct /* Un-Setting ktau_state pointer in kernel-space. */ ktau_set_state(NULL,NULL,NULL); DEBUGPROFMSG(" After Unsetting ktau_set_state. "<< current_ktau_state << endl; ); free(current_ktau_state); DEBUGPROFMSG(" After free of current_ktau_state. " << endl; ); current_ktau_state = NULL; #endif /* TAUKTAU_MERGE */ } DEBUGPROFMSG(" Leaving: tid:"<< tid << "Profiler is: " << profiler << "AddInclFlag is: " << AddInclFlag << endl; ); } //cons KtauProfiler::KtauProfiler(int threadid):KernProf(KtauSym) { DEBUGPROFMSG(" Entering Constructor: thred: "<< threadid << endl; ); tid = threadid; #ifdef TAUKTAU_MERGE current_ktau_state = NULL; active_merge_index = 0; #endif /* TAUKTAU_MERGE */ //KernProf(KtauSym); DEBUGPROFMSG(" Leaving Constructor: thread: "<< threadid << endl; ); } //des KtauProfiler::~KtauProfiler() { DEBUGPROFMSG(" Entering Destructor: thred: "<< tid << endl; ); #ifdef TAUKTAU_MERGE current_ktau_state = NULL; active_merge_index = 0; #endif /* TAUKTAU_MERGE */ DEBUGPROFMSG(" Leaving Destructor: thred: "<< tid << endl; ); } /* * Function : KtauProfiler::SetStartState * Description : */ int KtauProfiler::SetStartState(ktau_state* pstate, Profiler* pProfiler, int tid, bool stackTop) { DEBUGPROFMSG(" Entering: Profiler: "<< pProfiler << "current_ktau_state: " << pstate << endl;) #if defined TAUKTAU_MERGE if(pProfiler) { unsigned long long s_ticks[merge_max_grp] = {0}; unsigned long long s_excl[merge_max_grp] = {0}; unsigned long long s_calls[merge_max_grp] = {0}; active_merge_index = read_kstate(pstate, active_merge_index, &(s_ticks[0]), &(s_calls[0]), &(s_excl[0])); //If stackTop then update for keeping KERNEL GRP totals if(stackTop) { for(int i=0; iThisKtauMergeInfo); DEBUGPROFMSG(" Previous MergeInfo State: StartTicks: "<< ThisMergeInfo->GetStartTicks() <<" StartCalls: " << ThisMergeInfo->GetStartCalls(); << endl;) for(int i =0; iSetStartTicks(s_ticks[i], i); ThisMergeInfo->SetStartCalls(s_calls[i], i); ThisMergeInfo->SetStartKExcl(s_excl[i], i); } DEBUGPROFMSG(" Latest MergeInfo State: StartTicks: "<< ThisMergeInfo->GetStartTicks() << " StartCalls: " << ThisMergeInfo->GetStartCalls(); << endl;) } #endif /* TAUKTAU_MERGE */ DEBUGPROFMSG(" Leaving: Profiler: "<< pProfiler << "current_ktau_state: " << pstate << endl;) return(0); } /* * Function : KtauProfiler::SetStopState * Description : */ int KtauProfiler::SetStopState(ktau_state* pstate, bool AddInclFlag, Profiler* pProfiler, int tid, bool stackTop) { DEBUGPROFMSG(" Entering: Profiler: "<< pProfiler << "current_ktau_state: " << pstate << "AddInclFlag: " << AddInclFlag << endl;) #if defined TAUKTAU_MERGE KtauMergeInfo* ThisMergeInfo = &(pProfiler->ThisKtauMergeInfo); DEBUGPROFMSG(" ThisMergeInfo: "<< ThisMergeInfo << endl;) //inclusive kernel-mode ticks unsigned long long inclticks[merge_max_grp] = {0}; unsigned long long inclcalls[merge_max_grp] = {0}; unsigned long long inclExcl[merge_max_grp] = {0}; active_merge_index = read_kstate(pstate, active_merge_index, &(inclticks[0]), &(inclcalls[0]), &(inclExcl[0])); //If stackTop then update for keeping KERNEL GRP totals if(stackTop) { for(int i=0; iGetStartTicks(i); } DEBUGPROFMSG(" Start-Ticks: "<< ThisMergeInfo->GetStartTicks() << endl;) DEBUGPROFMSG(" Incl-Ticks: "<< inclticks << endl;) DEBUGPROFMSG(" Child-Ticks: "<< ThisMergeInfo->GetChildTicks() << endl;) //exclusive kernel-mode ticks (without children's kernel-mode ticks) unsigned long long exclticks[merge_max_grp] = {0}; for(int i=0; iGetChildTicks(i); } for(int i=0; iGetChildTicks(i) > inclticks[i]) cout << "KtauProfiler::SetStopState: Kernel: ChildTicks > InclTicks: Child: " << ThisMergeInfo->GetChildTicks(i) << " Incl: " << inclticks[i] << endl; if(exclticks[i] > inclticks[i]) cout << "KtauProfiler::SetStopState: Kernel: ExclTicks > InclTicks: Excl: " << exclticks[i] << " Incl: " << inclticks[i] << endl; } for(int i=0; iGetStartCalls(i); } //exclusive kernel-mode ticks (without children's kernel-mode ticks) unsigned long long exclcalls[merge_max_grp] = {0}; for(int i=0; iGetChildCalls(i); } //ExclTime reported directly from kernel for(int i=0; iGetStartKExcl(i); } unsigned long long exclExcl[merge_max_grp] = {0}; for(int i=0; iGetChildKExcl(i); } DEBUGPROFMSG(" ParentProfiler: "<< pProfiler->ParentProfiler << endl;) if(pProfiler->ParentProfiler) { DEBUGPROFMSG(" Adding to Parent's Child-ticks." << endl;) for(int i=0; iParentProfiler->ThisKtauMergeInfo.AddChildTicks(inclticks[i], i); pProfiler->ParentProfiler->ThisKtauMergeInfo.AddChildCalls(inclcalls[i], i); pProfiler->ParentProfiler->ThisKtauMergeInfo.AddChildKExcl(inclExcl[i], i); } } //Save the state to the KtauFunctionInfo KtauFuncInfo * pKFInfo = pProfiler->ThisFunction->GetKtauFuncInfo(tid); DEBUGPROFMSG(" KtauFuncInfo Ptr: " << pKFInfo << endl;) if(pKFInfo) { if(AddInclFlag) { for(int i=0; iAddInclTicks(inclticks[i], i); pKFInfo->AddInclCalls(inclcalls[i], i); pKFInfo->AddInclKExcl(inclExcl[i], i); } } for(int i=0; iAddExclTicks(exclticks[i], i); pKFInfo->AddExclCalls(exclcalls[i], i); pKFInfo->AddExclKExcl(exclExcl[i], i); } } else { cout << "KtauProfiler::SetStopState: Null KtauFuncInfo Found!" << endl; } /* cout << "KtauProfiler::SetStopState" << endl << " start_ticks:" << start_ticks<< " inclticks:" << inclticks<< " , exclticks:" << exclticks<< " , child_ticks :" << child_ticks << endl; */ //reset the counters for(int i=0; i>merge_max_grp; i++) { ThisMergeInfo->ResetCounters(i); } #endif /* TAUKTAU_MERGE */ DEBUGPROFMSG(" Leaving: Profiler: "<< pProfiler << "current_ktau_state: " << pstate << "AddInclFlag: " << AddInclFlag << endl;) return(0); } FILE* KtauProfiler::OpenOutStream(char* tau_dirname, int node, int context, int tid) { char output_path[OUTPUT_NAME_SIZE]; FILE* ktau_fp = NULL; char* errormsg = NULL; /* * Create output directory /Kprofile */ sprintf(output_path,"%s/Kprofile", tau_dirname); if(mkdir(output_path,755) == -1){ if(errno != EEXIST) { perror("KtauProfiler::OpenOutStream: mkdir"); return(NULL); } } if(chmod(output_path, S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IWGRP | S_IXGRP | S_IROTH | S_IWOTH | S_IXOTH) != 0) { perror("KtauProfiler::OpenOutStream: chmod"); return NULL; } char filename[OUTPUT_NAME_SIZE]; sprintf(filename,"%s/profile.%d.%d.%d",output_path, node, context, tid); if ((ktau_fp = fopen (filename, "w+")) == NULL) { errormsg = new char[1024]; sprintf(errormsg,"Error: Could not create %s",filename); perror(errormsg); delete errormsg; return NULL; } return ktau_fp; } void KtauProfiler::CloseOutStream(FILE* ktau_fp) { if(ktau_fp) fclose(ktau_fp); } /* returns the updated last active_index value */ /* Single buf implementation */ int read_kstate_1buf(ktau_state* pstate, volatile int cur_active, unsigned long long* ptime, unsigned long long* pcalls, unsigned long long *pexcl) { //now read in the values from the 'old' cur_active index for(int i =0; istate[0].ktime[i]; pexcl[i] = pstate->state[0].kexcl[i]; pcalls[i] = pstate->state[0].knumcalls[i]; } return 0; } /* Dbl-Buffer Implementation */ int read_kstate_2buf(ktau_state* pstate, volatile int cur_active, unsigned long long* ptime, unsigned long long* pcalls, unsigned long long *pexcl) { //1st change the active_index value atomically pstate->active_index = 1 - cur_active; //AN-dblbuf //now read in the values from the 'old' cur_active index for(int i =0; istate[cur_active].ktime[i]; pexcl[i] = pstate->state[cur_active].kexcl[i]; pcalls[i] = pstate->state[cur_active].knumcalls[i]; } //make cur_active into new cur_actice cur_active = 1 - cur_active; //AN-dbl-buf //now add in the values from the other buffer after changing the active_index pstate->active_index = 1 - cur_active; //now read in the values from the 'old' cur_active index for(int i =0; istate[cur_active].ktime[i]; pexcl[i] += pstate->state[cur_active].kexcl[i]; pcalls[i] += pstate->state[cur_active].knumcalls[i]; } //return the chaged cur_state return (1 - cur_active); } /* Older Double buffer approach - current;ly its not so */ /* returns the updated last active_index value */ /* int read_kstate(ktau_state* pstate, volatile int cur_active, unsigned long long* ptime, unsigned long long* pcalls, unsigned long long *pexcl) { //1st change the active_index value atomically pstate->active_index = 1 - cur_active; //now read in the values from the 'old' cur_active index for(int i =0; istate[cur_active].ktime[i]; pexcl[i] = pstate->state[cur_active].kexcl[i]; pcalls[i] = pstate->state[cur_active].knumcalls[i]; } //make cur_active into new cur_actice cur_active = 1 - cur_active; //now add in the values from the other buffer after changing the active_index pstate->active_index = 1 - cur_active; //now read in the values from the 'old' cur_active index for(int i =0; istate[cur_active].ktime[i]; pexcl[i] += pstate->state[cur_active].kexcl[i]; pcalls[i] += pstate->state[cur_active].knumcalls[i]; } //return the chaged cur_state return (1 - cur_active); } */ void KtauProfiler::RegisterFork(Profiler* profiler, int nodeid, int tid, enum TauFork_t opcode) { //printf("KtauProfiler::RegisterFork: Enter\n"); //1. Handle like 1st call to start #if defined TAUKTAU_MERGE //1.a. if merge - then set_ktau_state //printf("KtauProfiler::RegisterFork: Freeing Previous current_ktau_state\n"); if(current_ktau_state != NULL) { free(current_ktau_state); } //printf("KtauProfiler::RegisterFork: Allocating current_ktau_state\n"); current_ktau_state = (ktau_state*) calloc(4096,1); if(!current_ktau_state) { printf("KtauProfiler::RegisterFork: Allocating current_ktau_state FAILED.\n"); perror("calloc of current_ktau_state:"); exit(-1); } DEBUGPROFMSG(" Allocated current_ktau_state: "<< current_ktau_state << endl; ); //printf("KtauProfiler::RegisterFork: Setting Kernel State...\n"); /* Setting ktau_state pointer in kernel-space to point * to the global current_state */ ktau_set_state(NULL,current_ktau_state,NULL); //printf("KtauProfiler::RegisterFork: Setting Kernel State DONE.\n"); DEBUGPROFMSG(" Called ktau_set_state." << endl; ); //1.b. re-init KtauProfiler state - such as active index etc active_merge_index = 0; #endif /* TAUKTAU_MERGE */ //printf("KtauProfiler::RegisterFork: TauKtau Dest Call.\n"); //1.c. TauKtau state needs to be re-init - clean-it THEN do a start on it. TauKtau::RegisterFork(&KernProf, opcode); #ifdef TAUKTAU_MERGE if(opcode == TAU_EXCLUDE_PARENT_DATA) { //printf("KtauProfiler::RegisterFork: KtauMergeInfo Reseting.\n"); //2. Run-up Profiler Stack - Re-initing KtauMergeInfo //2.a. set all counters in MergeInfo to Zero (for now) Profiler* curP = profiler; do { KtauMergeInfo* ThisMergeInfo = &(curP->ThisKtauMergeInfo); for(int i =0; iResetCounters(i); } curP = curP->ParentProfiler; } while(curP != NULL); }//EXCLUDE_PARENT_DATA #endif /* TAUKTAU_MERGE */ //printf("KtauProfiler::RegisterFork: Exit\n"); } int KtauProfiler::VerifyMerge(FunctionInfo* thatFunction) { #ifdef TAUKTAU_MERGE double org_time = thatFunction->GetExclTime(tid); double kern_time = (double)(thatFunction->GetKtauFuncInfo(tid)->GetExclTicks(0))/KTauGetMHz(); if(org_time > kern_time){ cout <<"GOOD!!! Kernel space time is less than ExclTime: org_time:"<< org_time << " kern_time:"<< kern_time << endl; }else{ cout <<"ERROR!! Kernel space time is greater than ExclTime: org_time:"<< org_time << " kern_time:"<< kern_time << endl; cout << "KTauGetMHz:" << KTauGetMHz() << " , Kernel Inc-ticks:" << thatFunction->GetKtauFuncInfo(tid)->GetInclTicks(0) << " , Kernel IncTime:" << (double)(thatFunction->GetKtauFuncInfo(tid)->GetInclTicks(0))/KTauGetMHz()<< " , Kernel ExclTicks:" << thatFunction->GetKtauFuncInfo(tid)->GetExclTicks(0)<< " , Kernel ExclTime:" << (double)(thatFunction->GetKtauFuncInfo(tid)->GetExclTicks(0))/KTauGetMHz()<< " , User-ExclTime:" << thatFunction->GetExclTime(tid)<< " , User-InclTime:" << thatFunction->GetInclTime(tid)<< " , FuncName: " << thatFunction->GetName() << endl; return 0; } #endif /*TAUKTAU_MERGE*/ return 1; } #endif /* TAUKTAU */ /*************************************************************************** * $RCSfile: KtauProfiler.cpp,v $ $Author: anataraj $ * $Revision: 1.5 $ $Date: 2006/11/10 07:25:42 $ ***************************************************************************/ tau-2.16.4/src/Profile/KtauSymbols.cpp000077500000000000000000000106561062343042700175610ustar00rootroot00000000000000/**************************************************************************** ** TAU Portable Profiling Package ** ** http://www.acl.lanl.gov/tau ** ***************************************************************************** ** Copyright 1997 ** ** Department of Computer and Information Science, University of Oregon ** ** Advanced Computing Laboratory, Los Alamos National Laboratory ** ****************************************************************************/ /*************************************************************************** ** File : KtauSymbols.h ** ** Description : TAU Kernel Profiling Interface ** ** Author : Aroon Nataraj ** ** : Suravee Suthikulpanit ** ** Contact : {suravee,anataraj}@cs.uoregon.edu ** ** Flags : Compile with ** ** -DTAU_KTAU to enable KTAU ** ** Documentation : ** ***************************************************************************/ #ifdef TAUKTAU #include #include #include #include #include #define LINE_SIZE 1024 using namespace std; #define DEBUG 0 #define ktau_str2ll (unsigned int)strtoul KtauSymbols::KtauSymbols(const string& path):filepath(path) { //dummy call to KTauGetMHz() - so that this time is not included in any function's time! if(DEBUG) printf("KtauSymbols::cons Calling KTauGetMHz() to store the TSC tick-rate.\n"); KTauGetMHz(); ReadKallsyms(); } KtauSymbols::~KtauSymbols(){}; string& KtauSymbols::MapSym(unsigned int addr) { return table[addr]; } unsigned long KtauSymbols::MapRevSym(string func_name) { return rev_table[func_name]; } int KtauSymbols::ReadKallsyms() { char line[LINE_SIZE]; char *ptr = line; char *addr; char *flag; char *func_name; unsigned int stext = 0; int found_stext = 0; /* Open and read file */ ifstream fs_kallsyms (filepath.c_str(),ios::in); if(!fs_kallsyms.is_open()){ cout << "Error opening file: " << filepath << "\n"; return(-1); } /* Tokenize each line*/ while(!fs_kallsyms.eof()){ fs_kallsyms.getline(line,LINE_SIZE); ptr = line; addr = strtok(ptr," "); flag = strtok(NULL," "); func_name = strtok(NULL," "); if(!strcmp("T",flag) || !strcmp("t",flag)){ if(!found_stext && !strcmp("stext",func_name)){ table[ktau_str2ll(addr,NULL,16)] = string(func_name); rev_table[string(func_name)] = ktau_str2ll(addr,NULL,16); //kallsyms_map[kallsyms_size].addr = ktau_str2ll(addr,NULL,16); //strcpy(kallsyms_map[kallsyms_size++].name, func_name); found_stext = 1; if(DEBUG)printf("ReadKallsyms: address %llx , name %s \n", ktau_str2ll(addr,NULL,16), table[ktau_str2ll(addr,NULL,16)].c_str()); } else{ table[ktau_str2ll(addr,NULL,16)] = string(func_name); rev_table[string(func_name)] = ktau_str2ll(addr,NULL,16); //kallsyms_map[kallsyms_size].addr = ktau_str2ll(addr,NULL,16); //strcpy(kallsyms_map[kallsyms_size++].name, func_name); if(DEBUG)printf("ReadKallsyms: address %llx , name %s \n", ktau_str2ll(addr,NULL,16), table[ktau_str2ll(addr,NULL,16)].c_str()); } }else if(!strcmp("_etext",func_name)){ table[ktau_str2ll(addr,NULL,16)] = string(func_name); rev_table[string(func_name)] = ktau_str2ll(addr,NULL,16); //kallsyms_map[kallsyms_size].addr = ktau_str2ll(addr,NULL,16); //strcpy(kallsyms_map[kallsyms_size++].name, func_name); if(DEBUG)printf("ReadKallsyms: address %llx , name %s \n", ktau_str2ll(addr,NULL,16), table[ktau_str2ll(addr,NULL,16)].c_str()); break; } } /* Close /proc/kallsyms */ fs_kallsyms.close(); return table.size(); } #endif /* TAUKTAU */ tau-2.16.4/src/Profile/Makefile000066400000000000000000000411211062343042700162240ustar00rootroot00000000000000#**************************************************************************** #* TAU Portable Profiling Package ** #* http://www.cs.uoregon.edu/research/tau ** #**************************************************************************** #* Copyright 1997-99 ** #* Department of Computer and Information Science, University of Oregon ** #* Advanced Computing Laboratory, Los Alamos National Laboratory ** #* Research Center Juelich, ZAM Germany ** #**************************************************************************** #**************************************************************************** #** File : Makefile ** #** Description : TAU Profiling Package ** #** Author : Sameer Shende ** #** Contact : sameer@cs.uoregon.edu ** #** Flags : Compile with ** #** -DPROFILING_ON to enable profiling (ESSENTIAL) ** #** -DPROFILE_STATS for Std. Deviation of Excl Time ** #** -DSGI_HW_COUNTERS for using SGI counters ** #** -DPROFILE_CALLS for trace of each invocation ** #** -DSGI_TIMERS for SGI fast nanosecs timer ** #** -DPOOMA_TFLOP for Intel Teraflop at SNL/NM ** #** -DUSE_STDCXXLIB for KCC compiler ** #** -DDEBUG_PROF for internal debugging messages ** #** These flags are set by configure script ** #** Documentation : See http://www.cs.uoregon.edu/research/tau ** #**************************************************************************** TAUROOT= include $(TAUROOT)/include/Makefile CXX = $(TAU_CXX) CC = $(TAU_CC) #This includes all profile options in $(PROFILEOPTS). CEXTRA = ############# For KAI KCC compiler, use --one_instantiation_per_object ## #KAI#CEXTRA = --one_per #ENDIF# ############################################## ############################################## #PGICC#PRELINK_PHASE = $(CXX) --prelink_objects $(OBJS) #ENDIF# #PGINOPRELINK#PRELINK_PHASE = #ENDIF# ############################################# DEFINES = -DTAU_LIBRARY_SOURCE LINKER = $(TAU_CC) INSTALLDEST = $(TAU_PREFIX_INSTALL_DIR)/$(CONFIG_ARCH)/lib TAUINC = -I$(TAUROOT)/include CXXFLAGS = $(DEFINES) $(CEXTRA) $(USER_OPT) $(PROFILEOPTS) $(TAUINC) INCDIR = $(TAUROOT)/include/Profile HDRS = $(INCDIR)/Profiler.h $(INCDIR)/ProfileGroups.h \ $(INCDIR)/TauAPI.h $(INCDIR)/ProfileHeaders.h \ $(INCDIR)/PthreadLayer.h $(INCDIR)/RtsLayer.h \ $(INCDIR)/FunctionInfo.h $(INCDIR)/UserEvent.h \ $(INCDIR)/TauCAPI.h $(INCDIR)/TulipTimers.h \ $(INCDIR)/bstring.h $(INCDIR)/TulipThreadLayer.h \ $(INCDIR)/TauFAPI.h $(INCDIR)/PclLayer.h \ $(INCDIR)/PapiLayer.h $(INCDIR)/JavaThreadLayer.h \ $(INCDIR)/OpenMPLayer.h $(INCDIR)/TauJAPI.h \ $(INCDIR)/SprocLayer.h $(INCDIR)/PyGroups.h \ $(INCDIR)/PyExceptions.h $(INCDIR)/PyDatabase.h \ $(INCDIR)/PyBindings.h $(INCDIR)/PyTimer.h \ $(INCDIR)/RenciSTFF.h $(INCDIR)/PapiThreadLayer.h LDFLAGS = $(PCXX_OPT) MAKEFILE = Makefile OBJS = Profiler.o TulipTimers.o UserEvent.o FunctionInfo.o \ RtsLayer.o RtsThread.o TauCAPI.o TauFAPI.o TauMapping.o \ TauHooks.o TauHandler.o TauMemory.o MetaData.o \ $(PARAM_O) $(EVENTS_O) $(THR_O) \ $(PCL_O) $(PAPI_O) $(TAU_JAVA_O) $(OPENMP_O) $(OPARI_O) \ $(MULT_O) $(PLATFORM_O) $(CALLPATH_O) $(PYTHON_O) $(MUSE_O) \ $(COMPENSATE_O) $(KTAU_O) $(KTAU_MERGE_O) $(KTAU_SHCTR_O) \ $(RENCI_STFF_O) PRINT = pr SRCS = Profiler.cpp TulipTimers.cpp UserEvent.cpp FunctionInfo.cpp \ TauCAPI.cpp TauFAPI.cpp TauMapping.cpp TauHooks.cpp AR = $(TAU_AR) ARFLAGS = rcv ############# For KAI KCC compiler, replace AR accordingly ####### #KAI#AR = $(CXX) #ENDIF# #KAI#ARFLAGS = --one_per -o #ENDIF# ################################################################## ############# For SGI CC compiler, replace AR accordingly ####### #SGICC#AR = $(CXX) -ar #ENDIF# #SGICC#ARFLAGS = -o #ENDIF# ################################################################## ############# For FUJITSU FCC compiler, replace AR accordingly ####### #FUJITSU#AR = $(CXX) --ar #ENDIF# #FUJITSU#ARFLAGS = -o #ENDIF# ################################################################## ############# For SUN CC compiler, replace AR accordingly ####### #SOL2CC#AR = $(CXX) -xar #ENDIF# #SOL2CC#ARFLAGS = -o #ENDIF# ################################################################## RM = /bin/rm -rf TAU_TARGET = libtau$(TAU_CONFIG)$(LSX) TAU_DISABLE = libTauDisable$(LSX) TAU_DISABLE_SHARED = libTauDisable$(TAU_SHLIBX) ############################################## #MPI#MPI_WRAPPER = libTauMpi$(TAU_CONFIG)$(LSX) #ENDIF# #MPI#TAU_MPI_OBJS = TauMpi.o ClockSync.o $(FWRAPPER) $(MPI2EXTENSIONS) #ENDIF# #MPI#MPI_INSTALL = $(INSTALLDEST)/libTauMpi$(TAU_CONFIG)$(LSX) #ENDIF# ############################################## ############################################## #SHMEM#SHMEM_WRAPPER = libTauShmem$(TAU_CONFIG)$(LSX) #ENDIF# #SHMEM#SHMEM_INSTALL = $(INSTALLDEST)/libTauShmem$(TAU_CONFIG)$(LSX) #ENDIF# ############################################## ############################################## # For making libTAU.so Dynamic Shared Object ############################################## TAU_SHLIBX = .so #HP#TAU_SHLIBX = .sl #ENDIF# #APPLECXX#TAU_APPLE_SHLIBX = .dylib #ENDIF# #PYTHON#TAU_APPLE_SHLIBX = .so #ENDIF# #APPLECXX#TAU_SHLIBX = $(TAU_APPLE_SHLIBX) #ENDIF# #GNU#AR_SHFLAGS = -shared #ENDIF# #USE_PATHCC#AR_SHFLAGS = -shared -fPIC #ENDIF# #PGI#AR_SHFLAGS = -shared -fPIC #ENDIF# #SGICC#AR_SHFLAGS = -shared #ENDIF# #OPEN64ORC#AR_SHFLAGS = -shared -fpic #ENDIF# #APPLECXX#TAU_APPLE_SHFLAGS = -dynamiclib -flat_namespace -undefined suppress #ENDIF# #PYTHON#TAU_APPLE_SHFLAGS = -bundle -flat_namespace -undefined suppress #ENDIF# #APPLECXX#AR_SHFLAGS = $(TAU_APPLE_SHFLAGS) #ENDIF# #SOL2#AR_SHFLAGS = -G #ENDIF# #SUNCC#AR_SHFLAGS = -G #ENDIF# #USE_IBMXLC#AR_SHFLAGS = -G #ENDIF# #USE_DECCXX#AR_SHFLAGS = -shared #ENDIF# #USE_INTELCXX#AR_SHFLAGS = -shared #ENDIF# #ACC#AR_SHFLAGS = -b #ENDIF# TAU_ARFLAGS = $(AR_SHFLAGS) -o TAU_SHLIB = libTAUsh$(TAU_CONFIG)$(TAU_SHLIBX) #APPLECXX#TAU_SHLIB = $(INSTALLDEST)/libTAUsh$(TAU_CONFIG)$(TAU_SHLIBX) #ENDIF# #HITACHI#TAU_SHLIB = #ENDIF# #CRAYX1CC#TAU_SHLIB = #ENDIF# #CRAYCC#TAU_SHLIB = #ENDIF# #SUNCC#TAU_SHLIB = #ENDIF# #CRAYCC#TAU_NULL=X#ENDIF# #CRAYX1CC#TAU_NULL=X#ENDIF# #USE_NECCXX#TAU_SHLIB = #ENDIF# #OPEN64ORC#TAU_SHLIB = #ENDIF# #BGL#TAU_SHLIB = #ENDIF# #BGL#TAU_DISABLE_SHARED = #ENDIF# #SOL2CC#EXTRA_LIBS = -lCstd -liostream -lCrun #ENDIF# #SUNCC#EXTRA_LIBS = -lCstd -liostream -lCrun #ENDIF# #CATAMOUNT#TAU_SHLIB = #ENDIF# #CATAMOUNT#TAU_DISABLE_SHARED = #ENDIF# ############################################## # If JAVA or DYNINST is defined, TAU_DSO is defined ############################################## #JAVA#TAU_DSO = $(TAU_SHLIB) #ENDIF# #DYNINST#TAU_DSO = $(TAU_SHLIB) #ENDIF# #JAVA#TAU_SHLIB_INSTALL = $(INSTALLDEST)/$(TAU_SHLIB) #ENDIF# #JAVA#TAU_JAVA_INSTALLDIR = $(INSTALLDEST)/TAU #ENDIF# #JAVA#TAU_JAVA_CLASS1 = $(TAU_JAVA_INSTALLDIR)/Profile.class #ENDIF# #DYNINST# TAU_SHLIB_INSTALL = $(INSTALLDEST)/$(TAU_SHLIB) #ENDIF# #USE_DECCXX# EXTRAOBJS=cxx_repository/*.o #ENDIF# #PYTHON#TAUPYTHON = pytau$(TAU_SHLIBX) #ENDIF# #PYTHON#TAUPYTHON_INSTALL = $(TAU_BINDINGSDIR)/pytau$(TAU_SHLIBX) #ENDIF# ############################################## TAU_DSO = $(TAU_SHLIB) TAU_SHLIB_INSTALL = $(INSTALLDEST)/$(TAU_SHLIB) #APPLECXX#TAU_SHLIB_INSTALL= $(TAU_DSO) #ENDIF# BITS = 32 #IBM64#BITS = 64#ENDIF# #IBMMPI#POELIB = libmpi_r.a #ENDIF# #IBMMPI#POELIB_INSTALL = $(INSTALLDEST)/libmpi_r.a #ENDIF# TAU_BINDINGSDIR = $(INSTALLDEST)/bindings$(TAU_CONFIG) TAU_SHAREDDIR = $(INSTALLDEST)/shared$(TAU_CONFIG) TAU_DISABLE_SHAREDDIR = $(INSTALLDEST)/shared-disable all: $(TAU_TARGET) $(TAU_DISABLE) $(MPI_WRAPPER) $(TAU_DSO) $(TAUJAPI) $(TAUPYTHON) $(SHMEM_WRAPPER) $(POELIB) $(TAU_TARGET): $(OBJS) $(PRELINK_PHASE) $(AR) $(ARFLAGS) $(TAU_TARGET) $(OBJS) $(EXTRAOBJS) $(TAU_RANLIB) $(TAU_TARGET) $(TAU_NULL)$(TAU_SHLIB): $(TAU_TARGET) $(OBJS) $(MPI_WRAPPER) $(PRELINK_PHASE) $(TAU_CXX) $(TAU_ARFLAGS) $(TAU_SHLIB) $(OBJS) $(EXTRAOBJS) $(TAU_MPI_OBJS) $(EXTRA_LIBS) $(LEXTRA) $(LEXTRA1) $(TAU_PAPI_EXTRA_FLAGS) $(TAU_EXTRA_LIBRARY_FLAGS) $(TAU_DISABLE): TauDisable.o $(TAU_DISABLE_SHARED) $(AR) $(ARFLAGS) $(TAU_DISABLE) TauDisable.o $(TAU_RANLIB) $(TAU_DISABLE) $(TAU_DISABLE_SHARED) : TauDisable.o $(TAU_CXX) $(TAU_ARFLAGS) $(TAU_DISABLE_SHARED) TauDisable.o libTauMpi$(TAU_CONFIG)$(LSX): TauMpi.c TauFMpi.c ClockSync.cpp $(MAKE) -f Makefile.wrapper libTauShmem$(TAU_CONFIG)$(LSX): $(MAKE) -f Makefile.shmem $(INSTALLDEST)/$(TAU_TARGET): $(TAU_TARGET) @echo Installing $? in $(INSTALLDEST) @if [ -d $(INSTALLDEST) ] ; then true; \ else mkdir $(INSTALLDEST) ;fi $(TAU_INSTALL) $? $(INSTALLDEST) $(TAU_INSTALL) $(TAUROOT)/include/Makefile $(INSTALLDEST)/Makefile.tau$(TAU_CONFIG) $(INSTALLDEST)/$(TAU_DISABLE): $(TAU_DISABLE) $(TAU_DISABLE_SHARED) @echo Installing $? in $(INSTALLDEST) @if [ -d $(INSTALLDEST) ] ; then true; \ else mkdir $(INSTALLDEST) ;fi $(TAU_INSTALL) $? $(INSTALLDEST) cd $(INSTALLDEST) @if [ -d $(TAU_DISABLE_SHAREDDIR) ] ; then true; \ else mkdir $(TAU_DISABLE_SHAREDDIR); fi cd $(TAU_DISABLE_SHAREDDIR) ; rm -f libTAU$(TAU_SHLIBX) cd $(TAU_DISABLE_SHAREDDIR) ; ln -s ../$(TAU_DISABLE_SHARED) libTAU$(TAU_SHLIBX) $(INSTALLDEST)/$(TAU_SHLIB): $(TAU_SHLIB) @echo Installing $? in $(INSTALLDEST) @if [ -d $(INSTALLDEST) ] ; then true; \ else mkdir $(INSTALLDEST) ;fi $(TAU_INSTALL) $? $(INSTALLDEST) $(RM) $(INSTALLDEST)/libTAU$(TAU_SHLIBX) cd $(INSTALLDEST) && ln -s $(TAU_SHLIB) libTAU$(TAU_SHLIBX) @if [ -d $(TAU_SHAREDDIR) ] ; then true; \ else mkdir $(TAU_SHAREDDIR); fi cd $(TAU_SHAREDDIR) ; rm -f libTAU$(TAU_SHLIBX) cd $(TAU_SHAREDDIR) ; ln -s ../$(TAU_SHLIB) libTAU$(TAU_SHLIBX) $(INSTALLDEST)/libTauMpi$(TAU_CONFIG)$(LSX): libTauMpi$(TAU_CONFIG)$(LSX) $(MAKE) -f Makefile.wrapper install $(INSTALLDEST)/libTauShmem$(TAU_CONFIG)$(LSX): libTauShmem$(TAU_CONFIG)$(LSX) $(MAKE) -f Makefile.shmem install $(TAU_JAVA_INSTALLDIR)/Profile.class: Profile.class @echo Installing $? in $(TAU_JAVA_INSTALLDIR) @if [ -d $(TAU_JAVA_INSTALLDIR) ] ; then true; \ else mkdir -p $(TAU_JAVA_INSTALLDIR) ;fi $(TAU_INSTALL) $? $(TAU_JAVA_INSTALLDIR) $(TAU_BINDINGSDIR)/pytau$(TAU_SHLIBX): $(TAU_SHLIB) @echo Installing $(TAUPYTHON) and tau.py in $(INSTALLDEST) @if [ -d $(INSTALLDEST) ] ; then true; \ else mkdir $(INSTALLDEST) ;fi $(RM) $(INSTALLDEST)/$(TAUPYTHON) cd $(INSTALLDEST) && ln -s $(TAU_SHLIB) $(TAUPYTHON) $(TAU_INSTALL) tau.py $(INSTALLDEST) @echo Installing $(TAUPYTHON) and tau.py in $(TAU_BINDINGSDIR) @if [ -d $(TAU_BINDINGSDIR) ] ; then true; \ else mkdir $(TAU_BINDINGSDIR); fi $(RM) $(TAU_BINDINGSDIR)/tau.py $(TAU_BINDINGSDIR)/$(TAUPYTHON) cd $(TAU_BINDINGSDIR) && cp ../tau.py . && cp ../$(TAUPYTHON) $(TAUPYTHON) # break apart libelg.mpi.a to build into libmpi_r.a for tau_poe (AIX) epilog_breakup: @echo Breaking up libelg.mpi.a $(RM) $(BITS) mkdir -p $(BITS)/tau cd $(BITS)/tau ; ar -X $(BITS) xv $(EPILOGLIBDIR)/libelg.mpi.a # place TAU objects into libmpi_r.a for tau_poe (AIX) tau_breakup: $(TAU_SHLIB) $(MPI_WRAPPER) $(RM) $(BITS) mkdir -p $(BITS)/tau cp $(TAU_TARGET) libTauMpi$(TAU_CONFIG)$(LSX) $(BITS)/tau # break apart vampirtrace to build into libmpi_r.a for tau_poe (AIX) vampirtrace_breakup: @echo Breaking up VampirTrace $(RM) $(BITS) mkdir -p $(BITS)/tau cd $(BITS)/tau ; for i in $(VAMPIRTRACEDIR)/lib/*.a ; do ar -X $(BITS) xv $$i ; done MPI_BREAKUP_PREREQ = tau_breakup #EPILOG#MPI_BREAKUP_PREREQ = epilog_breakup #ENDIF# #VAMPIRTRACE#MPI_BREAKUP_PREREQ = vampirtrace_breakup #ENDIF# libmpi_r.a: $(MPI_BREAKUP_PREREQ) echo Creating libmpi_r.a ./rebuild_libmpi $(BITS) $(TAU_LINKER_OPTS) cp $(BITS)/libmpi_r.a . $(RM) $(BITS) $(INSTALLDEST)/libmpi_r.a: libmpi_r.a echo Installing libmpi_r.a in $(TAU_BINDINGSDIR) if [ -d $(INSTALLDEST) ] ; then true; \ else mkdir $(INSTALLDEST) ;fi if [ -d $(TAU_BINDINGSDIR) ] ; then true; \ else mkdir $(TAU_BINDINGSDIR); fi $(RM) $(TAU_BINDINGSDIR)/libmpi_r.a $(RM) -f $(TAU_BINDINGSDIR)/libmpi_r.a $(RM) -f $(INSTALLDEST)/libmpi_r.a cp libmpi_r.a $(TAU_BINDINGSDIR) $(RM) -f $(INSTALLDEST)/bindings-default ln -s $(TAU_BINDINGSDIR) $(INSTALLDEST)/bindings-default install: $(INSTALLDEST)/$(TAU_TARGET) $(INSTALLDEST)/$(TAU_DISABLE) $(MPI_INSTALL) $(TAU_SHLIB_INSTALL) $(TAU_JAVA_CLASS1) $(TAUPYTHON_INSTALL) $(SHMEM_INSTALL) $(POELIB_INSTALL) # Rules Profile.class : Profile.java $(JDKDIR)/bin/javac Profile.java Profiler.o : Profiler.cpp $(HDRS) $(CXX) $(CXXFLAGS) -c $(@:.o=.cpp) MetaData.o : MetaData.cpp $(HDRS) $(CXX) $(CXXFLAGS) -c $(@:.o=.cpp) TulipTimers.o : TulipTimers.cpp $(HDRS) $(CXX) $(CXXFLAGS) -c $(@:.o=.cpp) UserEvent.o : UserEvent.cpp $(HDRS) $(CXX) $(CXXFLAGS) -c $(@:.o=.cpp) FunctionInfo.o : FunctionInfo.cpp $(HDRS) $(CXX) $(CXXFLAGS) -c $(@:.o=.cpp) RtsLayer.o : RtsLayer.cpp $(HDRS) $(CXX) $(CXXFLAGS) -c $(@:.o=.cpp) RtsThread.o : RtsThread.cpp $(HDRS) $(CXX) $(CXXFLAGS) -c $(@:.o=.cpp) ProfileParam.o : ProfileParam.cpp $(HDRS) $(CXX) $(CXXFLAGS) -c $(@:.o=.cpp) pcxx_events.o : pcxx_events.cpp $(HDRS) $(CXX) $(CXXFLAGS) -c $(@:.o=.cpp) Tracer.o : Tracer.cpp $(HDRS) $(CXX) $(CXXFLAGS) -c $(@:.o=.cpp) PthreadLayer.o : PthreadLayer.cpp $(HDRS) $(CXX) $(CXXFLAGS) -c $(@:.o=.cpp) SprocLayer.o : SprocLayer.cpp $(HDRS) $(CXX) $(CXXFLAGS) -c $(@:.o=.cpp) PapiThreadLayer.o : PapiThreadLayer.cpp $(HDRS) $(CXX) $(CXXFLAGS) -c $(@:.o=.cpp) JavaThreadLayer.o : JavaThreadLayer.cpp $(HDRS) $(CXX) $(CXXFLAGS) -c $(@:.o=.cpp) TulipThreadLayer.o : TulipThreadLayer.cpp $(HDRS) $(CXX) $(CXXFLAGS) -c $(@:.o=.cpp) TauCAPI.o : TauCAPI.cpp $(HDRS) $(CXX) $(CXXFLAGS) -c $(@:.o=.cpp) TauFAPI.o : TauFAPI.cpp $(HDRS) $(CXX) $(CXXFLAGS) -c $(@:.o=.cpp) TauJAPI.o : TauJAPI.cpp $(HDRS) $(CXX) $(CXXFLAGS) -c $(@:.o=.cpp) TauMapping.o : TauMapping.cpp $(HDRS) $(CXX) $(CXXFLAGS) -c $(@:.o=.cpp) TauHooks.o : TauHooks.cpp $(HDRS) $(CXX) $(CXXFLAGS) -c $(@:.o=.cpp) TauJava.o : TauJava.cpp $(CXX) $(CXXFLAGS) -c TauJava.cpp PclLayer.o : PclLayer.cpp $(HDRS) $(CXX) $(CXXFLAGS) -c $(@:.o=.cpp) PapiLayer.o : PapiLayer.cpp $(HDRS) $(CXX) $(CXXFLAGS) -c $(@:.o=.cpp) MultipleCounters.o : MultipleCounters.cpp $(HDRS) $(CXX) $(CXXFLAGS) -c $(@:.o=.cpp) TauDisable.o : TauDisable.cpp $(HDRS) $(CXX) $(CXXFLAGS) -c $(@:.o=.cpp) OpenMPLayer.o : OpenMPLayer.cpp $(HDRS) $(CXX) $(CXXFLAGS) -c $(@:.o=.cpp) TauOpari.o : TauOpari.cpp $(HDRS) $(CXX) $(CXXFLAGS) -c $(@:.o=.cpp) TauKojakOpari.o : TauKojakOpari.cpp $(HDRS) $(CXX) $(CXXFLAGS) -c $(@:.o=.cpp) TauLinuxTimers.o : TauLinuxTimers.c $(HDRS) gcc -c $(USER_OPT) $(@:.o=.c) TauCallPath.o : TauCallPath.cpp $(HDRS) $(CXX) $(CXXFLAGS) -c $(@:.o=.cpp) PyGroups.o : PyGroups.cpp $(HDRS) $(CXX) $(CXXFLAGS) -c $(@:.o=.cpp) PyExceptions.o : PyExceptions.cpp $(HDRS) $(CXX) $(CXXFLAGS) -c $(@:.o=.cpp) PyDatabase.o : PyDatabase.cpp $(HDRS) $(CXX) $(CXXFLAGS) -c $(@:.o=.cpp) PyBindings.o : PyBindings.cpp $(HDRS) $(CXX) $(CXXFLAGS) -c $(@:.o=.cpp) PyTimer.o : PyTimer.cpp $(HDRS) $(CXX) $(CXXFLAGS) -c $(@:.o=.cpp) PyTau.o : PyTau.cpp $(HDRS) $(CXX) $(CXXFLAGS) -c $(@:.o=.cpp) TauMuse.o : TauMuse.cpp $(HDRS) $(CXX) $(CXXFLAGS) -c $(@:.o=.cpp) TauMuseFilters.o : TauMuseFilters.cpp $(HDRS) $(CXX) $(CXXFLAGS) -c $(@:.o=.cpp) TauMuseHandlers.o : TauMuseHandlers.cpp $(HDRS) $(CXX) $(CXXFLAGS) -c $(@:.o=.cpp) TauMusePackages.o : TauMusePackages.cpp $(HDRS) $(CXX) $(CXXFLAGS) -c $(@:.o=.cpp) TauCompensate.o : TauCompensate.cpp $(HDRS) $(CXX) $(CXXFLAGS) -c $(@:.o=.cpp) TauHandler.o : TauHandler.cpp $(HDRS) $(CXX) $(CXXFLAGS) -c $(@:.o=.cpp) TauMemory.o : TauMemory.cpp $(HDRS) $(CXX) $(CXXFLAGS) -c $(@:.o=.cpp) ktau_syscall.o : ktau_syscall.c $(HDRS) $(CC) $(CXXFLAGS) -c $(@:.o=.c) $(TAUROOT)/src/Profile/TauPGIHelper.o : TauPGIHelper.cpp $(HDRS) $(CXX) $(CXXFLAGS) -c $(@:.o=.cpp) -o $@ clean : $(RM) *.ii *.ti ti_files cxx_repository ii_files rii_files *.a *.o *$(TAU_SHLIBX) tau-2.16.4/src/Profile/Makefile.disable000066400000000000000000000031451062343042700176320ustar00rootroot00000000000000#**************************************************************************** #* TAU Portable Profiling Package ** #* http://www.cs.uoregon.edu/research/tau ** #**************************************************************************** #* Copyright 1997 ** #* Department of Computer and Information Science, University of Oregon ** #* Advanced Computing Laboratory, Los Alamos National Laboratory ** #**************************************************************************** ####################################################################### ## pC++/Sage++ Copyright (C) 1993,1995 ## ## Indiana University University of Oregon University of Rennes ## ####################################################################### ############################################################################ # This produces a library that contains null versions of all TAU instrumentation # routines. Link with this library when you wish to disable TAU instrumentation ############################################################################ TAUROOTDIR = ../.. include $(TAUROOTDIR)/include/Makefile CXX = $(TAU_CXX) CC = $(TAU_CC) CFLAGS = $(TAU_INCLUDE) $(TAU_DEFS) RM = /bin/rm -f AR = $(CXX) ARFLAGS = -o ############################################## all : libTauDisable.a libTauDisable.a : TauDisable.o $(AR) $(ARFLAGS) libTauDisable.a TauDisable.o TauDisable.o : TauDisable.c $(CXX) $(CFLAGS) -c TauDisable.c clean: $(RM) core TauDisable.o libTauDisable.a ############################################## tau-2.16.4/src/Profile/Makefile.java000066400000000000000000000026631062343042700171540ustar00rootroot00000000000000#**************************************************************************** #* TAU Portable Profiling Package ** #* http://www.cs.uoregon.edu/research/tau ** #**************************************************************************** #* Copyright 1997-99 ** #* Department of Computer and Information Science, University of Oregon ** #* Advanced Computing Laboratory, Los Alamos National Laboratory ** #* Research Center Juelich, ZAM Germany ** #**************************************************************************** TAUROOTDIR = ../.. include $(TAUROOTDIR)/include/Makefile CXX = $(TAU_CXX) CC = $(TAU_CC) CEXTRA = CFLAGS = $(TAU_INCLUDE) -I$(JDKDIR)/include -I$(JDKDIR)/include/$(JDKARCH) $(TAU_DEFS) $(CEXTRA) RM = /bin/rm -f AR = $(TAU_CXX) INSTALLDEST = $(TAU_PREFIX_INSTALL_DIR)/$(CONFIG_ARCH)/lib TARGET = libTAU.so ############################################## all : $(TARGET) install: $(INSTALLDEST)/$(TARGET) $(TARGET) : TauJava.o $(PRELINK_PHASE) $(AR) $(ARFLAGS) $(TARGET) TauJava.o $(TAU_LIBS) TauJava.o : TauJava.cpp $(CXX) $(CFLAGS) -c TauJava.cpp $(INSTALLDEST)/$(TARGET): $(TARGET) @echo Installing $? in $(INSTALLDEST) if [ -d $(INSTALLDEST) ] ; then true; \ else mkdir $(INSTALLDEST) ;fi $(TAU_INSTALL) $? $(INSTALLDEST) clean: $(RM) core TauJava.o $(TARGET) ############################################## tau-2.16.4/src/Profile/Makefile.shmem000066400000000000000000000034361062343042700173430ustar00rootroot00000000000000#**************************************************************************** #* TAU Portable Profiling Package ** #* http://www.cs.uoregon.edu/research/tau ** #**************************************************************************** #* Copyright 1997 ** #* Department of Computer and Information Science, University of Oregon ** #* Advanced Computing Laboratory, Los Alamos National Laboratory ** #**************************************************************************** ####################################################################### ## pC++/Sage++ Copyright (C) 1993,1995 ## ## Indiana University University of Oregon University of Rennes ## ####################################################################### TAUROOTDIR = ../.. include $(TAUROOTDIR)/include/Makefile CXX = $(TAU_CXX) CC = $(TAU_CC) CFLAGS = $(TAU_INCLUDE) $(TAU_DEFS) $(TAU_SHMEM_INC) $(USER_OPT) RM = /bin/rm -f AR = $(TAU_AR) ARFLAGS = rcv INSTALLDEST = $(TAU_PREFIX_INSTALL_DIR)/$(CONFIG_ARCH)/lib TAU_TARGET = libTauShmem$(TAU_CONFIG)$(LSX) ############################################## all : $(TAU_TARGET) install: $(INSTALLDEST)/$(TAU_TARGET) $(TAU_TARGET) : $(TAU_SHMEM_OBJS) $(AR) $(ARFLAGS) $(TAU_TARGET) $(TAU_SHMEM_OBJS) $(TAU_RANLIB) $(TAU_TARGET) TauShmemCray.o : TauShmemCray.c $(CC) $(CFLAGS) -c TauShmemCray.c TauShmemTurbo.o: TauShmemTurbo.c $(CC) $(CFLAGS) -c TauShmemTurbo.c $(INSTALLDEST)/$(TAU_TARGET): $(TAU_TARGET) @echo Installing $? in $(INSTALLDEST) if [ -d $(INSTALLDEST) ] ; then true; \ else mkdir $(INSTALLDEST) ;fi $(TAU_INSTALL) $? $(INSTALLDEST) clean: $(RM) core $(TAU_SHMEM_OBJS) $(TAU_TARGET) ############################################## tau-2.16.4/src/Profile/Makefile.wrapper000066400000000000000000000037021062343042700177060ustar00rootroot00000000000000#**************************************************************************** #* TAU Portable Profiling Package ** #* http://www.cs.uoregon.edu/research/tau ** #**************************************************************************** #* Copyright 1997 ** #* Department of Computer and Information Science, University of Oregon ** #* Advanced Computing Laboratory, Los Alamos National Laboratory ** #**************************************************************************** ####################################################################### ## pC++/Sage++ Copyright (C) 1993,1995 ## ## Indiana University University of Oregon University of Rennes ## ####################################################################### TAUROOTDIR = ../.. include $(TAUROOTDIR)/include/Makefile CXX = $(TAU_CXX) CC = $(TAU_CC) CFLAGS = $(TAU_INCLUDE) $(TAU_DEFS) $(TAU_MPI_INCLUDE) $(USER_OPT) RM = /bin/rm -f AR = $(TAU_AR) ARFLAGS = rcv INSTALLDEST = $(TAU_PREFIX_INSTALL_DIR)/$(CONFIG_ARCH)/lib TAU_TARGET = libTauMpi$(TAU_CONFIG)$(LSX) ############################################## all : $(TAU_TARGET) install: $(INSTALLDEST)/$(TAU_TARGET) $(TAU_TARGET) : TauMpi.o ClockSync.o $(FWRAPPER) $(MPI2EXTENSIONS) $(AR) $(ARFLAGS) $(TAU_TARGET) TauMpi.o ClockSync.o $(FWRAPPER) $(MPI2EXTENSIONS) $(TAU_RANLIB) $(TAU_TARGET) TauMpi.o : TauMpi.c $(CC) $(CFLAGS) -c TauMpi.c TauFMpi.o: TauFMpi.c $(CC) $(CFLAGS) -c TauFMpi.c TauMpiExtensions.o: TauMpiExtensions.c $(CC) $(CFLAGS) -c TauMpiExtensions.c ClockSync.o : ClockSync.cpp $(CXX) $(CFLAGS) -c ClockSync.cpp $(INSTALLDEST)/$(TAU_TARGET): $(TAU_TARGET) @echo Installing $? in $(INSTALLDEST) if [ -d $(INSTALLDEST) ] ; then true; \ else mkdir $(INSTALLDEST) ;fi $(TAU_INSTALL) $? $(INSTALLDEST) clean: $(RM) core TauMpi.o $(TAU_TARGET) ############################################## tau-2.16.4/src/Profile/MetaData.cpp000066400000000000000000000443421062343042700167600ustar00rootroot00000000000000/**************************************************************************** ** TAU Portable Profiling Package ** ** http://www.cs.uoregon.edu/research/tau ** ***************************************************************************** ** Copyright 2007 ** ** Department of Computer and Information Science, University of Oregon ** ** Advanced Computing Laboratory, Los Alamos National Laboratory ** ****************************************************************************/ /**************************************************************************** ** File : MetaData.cpp ** ** Description : TAU Profiling Package ** ** Author : Alan Morris ** ** Contact : tau-bugs@cs.uoregon.edu ** ** Documentation : See http://www.cs.uoregon.edu/research/tau ** ** ** ** Description : This file contains all the Metadata, XML and ** ** Snapshot related routines ** ** ** ****************************************************************************/ #ifndef TAU_DISABLE_METADATA #include "tau_config.h" #if (!defined(TAU_WINDOWS)) #include // for host identification (uname) #include #endif #endif #include #include #include #include #include #include "Profile/Profiler.h" #include "tauarch.h" #include "Profile/tau_types.h" char * TauGetCounterString(void); static x_uint64 getTimeStamp() { x_uint64 timestamp; #ifdef TAU_WINDOWS timeStamp = TauWindowsUsecD(); #else struct timeval tp; gettimeofday (&tp, 0); timestamp = (x_uint64)tp.tv_sec * (x_uint64)1e6 + (x_uint64)tp.tv_usec; #endif return timestamp; } // We keep track of the timestamp at the initialization of TheFunctionDB() // see FunctionInfo.cpp // I do this because otherwise it is impossible to determine the duration // of the first snapshot. The user may not be using a time based metric // so I can't just look at the top-level timer. Instead, I just grab this // at the earliest point. static x_uint64 firstTimeStamp; bool Tau_snapshot_initialization() { firstTimeStamp = getTimeStamp(); return true; } // Static holder for snapshot file handles static FILE **TauGetSnapshotFiles() { static FILE **snapshotFiles = NULL; if (!snapshotFiles) { snapshotFiles = new FILE*[TAU_MAX_THREADS]; for (int i=0; i >& TheMetaData() { static vector > metadata; return metadata; } // doesn't work on ia64 for some reason // #ifdef __linux__ // #include // #include // _syscall0(pid_t,gettid) // pid_t gettid(void); // #endif /* __linux__ */ static int ReadFullLine(char *line, FILE *fp) { int ch; int i = 0; while ( (ch = fgetc(fp)) && ch != EOF && ch != (int) '\n') { line[i++] = (unsigned char) ch; } line[i] = '\0'; return i; } static void writeXMLString(FILE *f, const char *s) { if (!s) return; bool useCdata = false; if (strchr(s, '<') || strchr(s, '&')) { useCdata = true; } if (strstr(s, "]]>") || strchr(s, '\n')) { useCdata = false; } if (useCdata) { fprintf (f,"",s); return; } // could grow up to 5 times in length char *str = (char *) malloc (6*strlen(s)+10); char *d = str; while (*s) { if ((*s == '<') || (*s == '>') || (*s == '&') || (*s == '\n')) { // escape these characters if (*s == '<') { strcpy (d,"<"); d+=4; } if (*s == '>') { strcpy (d,">"); d+=4; } if (*s == '\n') { strcpy (d," "); d+=5; } if (*s == '&') { strcpy (d,"&"); d+=5; } } else { *d = *s; d++; } s++; } *d = 0; fprintf (f,"%s",str); free (str); } static void writeTagXML(FILE *f, const char *tag, const char *s, bool newline) { fprintf (f, "<%s>", tag); writeXMLString(f, s); fprintf (f, "",tag); if (newline) { fprintf (f, "\n"); } } static void writeXMLAttribute(FILE *f, const char *name, const char *value, bool newline) { char *endl = ""; if (newline) { endl = "\n"; } fprintf (f, "%s", endl); writeXMLString(f, name); fprintf (f, "%s", endl); writeXMLString(f, value); fprintf (f, "%s%s", endl, endl); } static void writeXMLAttribute(FILE *f, const char *name, const int value, bool newline) { char str[4096]; sprintf (str, "%d", value); writeXMLAttribute(f, name, str, newline); } static int writeXMLTime(FILE *fp, bool newline) { time_t theTime = time(NULL); // char *stringTime = ctime(&theTime); // fprintf (fp, "\n", stringTime); // char *day = strtok(stringTime," "); // char *month = strtok(NULL," "); // char *dayInt = strtok(NULL," "); // char *time = strtok(NULL," "); // char *year = strtok(NULL," "); // //Get rid of the mewline. // year[4] = '\0'; // char *newStringTime = new char[1024]; // sprintf(newStringTime,"%s-%s-%s-%s-%s",day,month,dayInt,time,year); // fprintf (fp, "%s\n", newStringTime); char *endl = ""; if (newline) { endl = "\n"; } char buf[4096]; struct tm *thisTime = gmtime(&theTime); strftime (buf,4096,"%Y-%m-%dT%H:%M:%SZ", thisTime); fprintf (fp, "UTC Time%s%s", buf, endl); thisTime = localtime(&theTime); strftime (buf,4096,"%Y-%m-%dT%H:%M:%S", thisTime); char tzone[7]; strftime (tzone, 7, "%z", thisTime); if (strlen(tzone) == 5) { tzone[6] = 0; tzone[5] = tzone[4]; tzone[4] = tzone[3]; tzone[3] = ':'; } fprintf (fp, "Local Time%s%s%s", buf, tzone, endl); // write out the timestamp (number of microseconds since epoch (unsigned long long) fprintf (fp, "Timestamp%lld%s", getTimeStamp(), endl); return 0; } static char *removeRuns(char *str) { // replaces runs of spaces with a single space // also removes leading whitespace while (*str && *str == ' ') str++; int len = strlen(str); for (int i=0; iThisFunction || fi == profiler->CallPathFunction) { #else if (fi == profiler->ThisFunction) { #endif return true; } return false; } static void writeEventXML(FILE *f, int id, FunctionInfo *fi) { fprintf (f, "", id); writeXMLString(f, fi->GetName()); fprintf (f, ""); writeXMLString(f, fi->GetAllGroups()); fprintf (f, "\n"); return; } static int writeMetaData(FILE *fp, bool newline) { char *endl = ""; if (newline) { endl = "\n"; } fprintf (fp, "%s", endl); char tmpstr[1024]; sprintf (tmpstr, "%lld", firstTimeStamp); writeXMLAttribute(fp, "Starting Timestamp", tmpstr, newline); writeXMLTime(fp, newline); #ifndef TAU_WINDOWS // try to grab meta-data char hostname[4096]; gethostname(hostname,4096); writeXMLAttribute(fp, "Hostname", hostname, newline); struct utsname archinfo; uname (&archinfo); writeXMLAttribute(fp, "OS Name", archinfo.sysname, newline); writeXMLAttribute(fp, "OS Version", archinfo.version, newline); writeXMLAttribute(fp, "OS Release", archinfo.release, newline); writeXMLAttribute(fp, "OS Machine", archinfo.machine, newline); writeXMLAttribute(fp, "Node Name", archinfo.nodename, newline); writeXMLAttribute(fp, "TAU Architecture", TAU_ARCH, newline); writeXMLAttribute(fp, "TAU Config", TAU_CONFIG, newline); writeXMLAttribute(fp, "pid", getpid(), newline); #endif #ifdef __linux__ // doesn't work on ia64 for some reason //fprintf (fp, "\t%d\n", gettid()); // try to grab CPU info FILE *f = fopen("/proc/cpuinfo", "r"); if (f) { char line[4096]; while (ReadFullLine(line, f)) { char buf[4096]; char *value = strstr(line,":")+2; value = removeRuns(value); if (strncmp(line, "vendor_id", 9) == 0) { writeXMLAttribute(fp, "CPU Vendor", value, newline); } if (strncmp(line, "cpu MHz", 7) == 0) { writeXMLAttribute(fp, "CPU MHz", value, newline); } if (strncmp(line, "clock", 5) == 0) { writeXMLAttribute(fp, "CPU MHz", value, newline); } if (strncmp(line, "model name", 10) == 0) { writeXMLAttribute(fp, "CPU Type", value, newline); } if (strncmp(line, "family", 6) == 0) { writeXMLAttribute(fp, "CPU Type", value, newline); } if (strncmp(line, "cpu\t", 4) == 0) { writeXMLAttribute(fp, "CPU Type", value, newline); } if (strncmp(line, "cache size", 10) == 0) { writeXMLAttribute(fp, "Cache Size", value, newline); } if (strncmp(line, "cpu cores", 9) == 0) { writeXMLAttribute(fp, "CPU Cores", value, newline); } } fclose(f); } f = fopen("/proc/meminfo", "r"); if (f) { char line[4096]; while (ReadFullLine(line, f)) { char buf[4096]; char *value = strstr(line,":")+2; value = removeRuns(value); if (strncmp(line, "MemTotal", 8) == 0) { writeXMLAttribute(fp, "Memory Size", value, newline); } } fclose(f); } char buffer[4096]; bzero(buffer, 4096); int rc = readlink("/proc/self/exe", buffer, 4096); if (rc != -1) { writeXMLAttribute(fp, "Executable", buffer, newline); } bzero(buffer, 4096); rc = readlink("/proc/self/cwd", buffer, 4096); if (rc != -1) { writeXMLAttribute(fp, "CWD", buffer, newline); } #endif /* __linux__ */ char *user = getenv("USER"); if (user != NULL) { writeXMLAttribute(fp, "username", user, newline); } // write out the user-specified (some from TAU) attributes for (int i=0; i < TheMetaData().size(); i++) { char *name = TheMetaData()[i].first; char *value = TheMetaData()[i].second; writeXMLAttribute(fp, name, value, newline); } fprintf (fp, "%s", endl); return 0; } int Profiler::Snapshot(char *name, bool finalize, int tid) { FILE *fp = TauGetSnapshotFiles()[tid]; if (finalize && !fp) { // finalize is true at the end of execution (regular profile output), if we haven't written a snapshot, don't bother return 0; } TAU_PROFILE_TIMER(timer, "TAU_PROFILE_SNAPSHOT()", " ", TAU_IO); if (!finalize) { // don't start the timer here, otherwise we'll go into an infinite loop // since our timer will always be on the stack TAU_PROFILE_START(timer); } int numFunc, numEvents; // printf ("Writing Snapshot [node %d:%d]\n", RtsLayer::myNode(), tid); #ifndef TAU_MULTIPLE_COUNTERS double currentTime = RtsLayer::getUSecD(tid); #else double currentTime[MAX_TAU_COUNTERS]; for (int c=0; c\n"); fprintf (fp, "\n\n", threadid, RtsLayer::myNode(), RtsLayer::myContext(), tid); writeMetaData(fp, true); fprintf (fp, "\n"); fprintf (fp, "\n\n", threadid); #ifndef TAU_MULTIPLE_COUNTERS fprintf (fp, "\n"); writeTagXML(fp, "name", TauGetCounterString(), true); writeTagXML(fp, "units", "unknown", true); fprintf (fp, "\n"); #else for(int i=0;i", i); writeTagXML(fp, "name", tmpChar, true); writeTagXML(fp, "units", "unknown", true); fprintf (fp, "\n"); } } #endif // write out events seen (so far) for (int i=0; i < numFunc; i++) { FunctionInfo *fi = TheFunctionDB()[i]; writeEventXML(fp, i, fi); } // remember the number of events we've written to the snapshot file TauGetSnapshotEventCounts()[tid] = numFunc; fprintf (fp, "\n"); } else { fprintf (fp, "\n"); } // write out new events since the last snapshot if (TauGetSnapshotEventCounts()[tid] != numFunc) { fprintf (fp, "\n\n", threadid); for (int i=TauGetSnapshotEventCounts()[tid]; i < numFunc; i++) { FunctionInfo *fi = TheFunctionDB()[i]; writeEventXML(fp, i, fi); } fprintf (fp, "\n"); TauGetSnapshotEventCounts()[tid] = numFunc; } // now write the actual profile data for this snapshot fprintf (fp, "\n\n", threadid); fprintf (fp, ""); writeXMLString(fp, name); fprintf (fp, "\n"); //writeXMLTime(fp, true); fprintf (fp, "%lld\n", getTimeStamp()); #ifndef TAU_MULTIPLE_COUNTERS fprintf (fp, "\n"); #else char metricList[4096]; char *loc = metricList; for (int c=0; c\n", metricList); #endif for (int i=0; i < numFunc; i++) { FunctionInfo *fi = TheFunctionDB()[i]; #ifndef TAU_MULTIPLE_COUNTERS double excltime, incltime; #else double *excltime = NULL, *incltime = NULL; #endif if (!fi->GetAlreadyOnStack(tid)) { // not on the callstack, the data is complete excltime = fi->GetExclTime(tid); incltime = fi->GetInclTime(tid); } else { // this routine is currently on the callstack // we will have to compute the exclusive and inclusive time it has accumulated // Start with the data already accumulated // Then walk the entire stack, when this function the function in question is found we do two things // 1) Compute the current amount that should be added to the inclusive time. // This is simply the current time minus the start time of our function. // If a routine is in the callstack twice, only the highest (top-most) value // will be retained, this is correct. // 2) Add to the exclusive value by subtracting the start time of the current // child (if there is one) from the duration of this function so far. incltime = fi->GetInclTime(tid); excltime = fi->GetExclTime(tid); #ifndef TAU_MULTIPLE_COUNTERS double inclusiveToAdd = 0; double prevStartTime = 0; for (Profiler *current = CurrentProfiler[tid]; current != 0; current = current->ParentProfiler) { if (helperIsFunction(fi, current)) { inclusiveToAdd = currentTime - current->StartTime; excltime += inclusiveToAdd - prevStartTime; } prevStartTime = currentTime - current->StartTime; } incltime += inclusiveToAdd; #else double inclusiveToAdd[MAX_TAU_COUNTERS]; double prevStartTime[MAX_TAU_COUNTERS]; for (int c=0; cParentProfiler) { if (helperIsFunction(fi, current)) { for (int c=0; cStartTime[c]; excltime[c] += inclusiveToAdd[c] - prevStartTime[c]; } } for (int c=0; cStartTime[c]; } } for (int c=0; cGetCalls(tid), fi->GetSubrs(tid), excltime, incltime); #else fprintf (fp, "%d %ld %ld ", i, fi->GetCalls(tid), fi->GetSubrs(tid)); for (int c=0; c\n"); fprintf (fp, "\n"); fprintf (fp, "\n\n"); // if (finalize) { // fprintf (fp, "\n\n"); // // fclose(fp); // } RtsLayer::UnLockDB(); if (!finalize) { TAU_PROFILE_STOP(timer); } return 0; } extern "C" void Tau_metadata(char *name, char *value) { // make copies char *myName = strdup(name); char *myValue = strdup(value); TheMetaData().push_back(pair(myName,myValue)); } int Tau_writeProfileMetaData(FILE *fp) { #ifdef TAU_DISABLE_METADATA return 0; #endif return writeMetaData(fp, false); } tau-2.16.4/src/Profile/MultipleCounters.cpp000066400000000000000000001005301062343042700206060ustar00rootroot00000000000000///////////////////////////////////////////////// //Definintions for MultipleCounters. // //Author: Robert Bell //Created: March 2002 // ///////////////////////////////////////////////// #include "Profile/Profiler.h" #ifdef TAU_DOT_H_LESS_HEADERS #include using namespace std; #else /* TAU_DOT_H_LESS_HEADERS */ #include #endif /* TAU_DOT_H_LESS_HEADERS */ #include #include #ifdef TAUKTAU_SHCTR #include "Profile/KtauCounters.h" #endif //TAUKTAU_SHCTR #ifdef CPU_TIME #include #include #include #endif // CPU_TIME #ifdef JAVA_CPU_TIME #include "Profile/JavaThreadLayer.h" #endif // JAVA_CPU_TIME #ifdef CRAY_TIMERS #ifndef TAU_CATAMOUNT /* These header files are for Cray X1 */ #include #include #endif /* TAU_CATAMOUNT */ #endif // CRAY_TIMERS #ifdef TRACING_ON #ifdef TAU_EPILOG #include "elg_trc.h" #else /* TAU_EPILOG */ #define PCXX_EVENT_SRC #include "Profile/pcxx_events.h" #endif /* TAU_EPILOG */ #endif // TRACING_ON #if (defined(__QK_USER__) || defined(__LIBCATAMOUNT__ )) #ifndef TAU_CATAMOUNT #define TAU_CATAMOUNT #endif /* TAU_CATAMOUNT */ #include #endif /* __QK_USER__ || __LIBCATAMOUNT__ */ #ifdef TAU_MPI extern TauUserEvent& TheSendEvent(void); extern TauUserEvent& TheRecvEvent(void); extern TauUserEvent& TheBcastEvent(void); extern TauUserEvent& TheReduceEvent(void); extern TauUserEvent& TheReduceScatterEvent(void); extern TauUserEvent& TheScanEvent(void); extern TauUserEvent& TheAllReduceEvent(void); extern TauUserEvent& TheAlltoallEvent(void); extern TauUserEvent& TheScatterEvent(void); extern TauUserEvent& TheGatherEvent(void); extern TauUserEvent& TheAllgatherEvent(void); #endif /* TAU_MPI */ //Initialize static members. char MultipleCounterLayer::environment[25][10] = { {"COUNTER1"},{"COUNTER2"},{"COUNTER3"},{"COUNTER4"},{"COUNTER5"}, {"COUNTER6"},{"COUNTER7"},{"COUNTER8"},{"COUNTER9"},{"COUNTER10"}, {"COUNTER11"},{"COUNTER12"},{"COUNTER13"},{"COUNTER14"},{"COUNTER15"}, {"COUNTER16"},{"COUNTER17"},{"COUNTER18"},{"COUNTER19"},{"COUNTER20"}, {"COUNTER21"},{"COUNTER22"},{"COUNTER23"},{"COUNTER24"},{"COUNTER25"}}; int MultipleCounterLayer::gettimeofdayMCL_CP[1]; int MultipleCounterLayer::gettimeofdayMCL_FP; #ifdef TAU_LINUX_TIMERS int MultipleCounterLayer::linuxTimerMCL_CP[1]; int MultipleCounterLayer::linuxTimerMCL_FP; #endif //TAU_LINUX_TIMERS #ifdef CRAY_TIMERS int MultipleCounterLayer::crayTimersMCL_CP[1]; int MultipleCounterLayer::crayTimersMCL_FP; #endif // CRAY_TIMERS #ifdef BGL_TIMERS int MultipleCounterLayer::bglTimersMCL_CP[1]; int MultipleCounterLayer::bglTimersMCL_FP; #endif // BGL_TIMERS #ifdef SGI_TIMERS int MultipleCounterLayer::sgiTimersMCL_CP[1]; int MultipleCounterLayer::sgiTimersMCL_FP; #endif // SGI_TIMERS #ifdef CPU_TIME int MultipleCounterLayer::cpuTimeMCL_CP[1]; int MultipleCounterLayer::cpuTimeMCL_FP; #endif // CPU_TIME #ifdef JAVA_CPU_TIME int MultipleCounterLayer::javaCpuTimeMCL_CP[1]; int MultipleCounterLayer::javaCpuTimeMCL_FP; #endif // JAVA_CPU_TIME #ifdef TAU_MUSE int MultipleCounterLayer::tauMUSEMCL_CP[1]; int MultipleCounterLayer::tauMUSEMCL_FP; #endif /* TAU_MUSE */ #ifdef TAU_MPI int MultipleCounterLayer::tauMPIMessageSizeMCL_CP[1]; int MultipleCounterLayer::tauMPIMessageSizeMCL_FP; #endif /* TAU_MPI */ #ifdef TAU_PAPI int MultipleCounterLayer::papiMCL_CP[MAX_TAU_COUNTERS]; int MultipleCounterLayer::papiWallClockMCL_CP[1]; int MultipleCounterLayer::papiVirtualMCL_CP[1]; int MultipleCounterLayer::papiMCL_FP; int MultipleCounterLayer::papiWallClockMCL_FP; int MultipleCounterLayer::papiVirtualMCL_FP; #endif//TAU_PAPI #ifdef TAU_PCL int MultipleCounterLayer::pclMCL_CP[MAX_TAU_COUNTERS]; int MultipleCounterLayer::pclMCL_FP; int MultipleCounterLayer::numberOfPCLHWCounters; int MultipleCounterLayer::PCL_CounterCodeList[MAX_TAU_COUNTERS]; unsigned int MultipleCounterLayer::PCL_Mode = PCL_MODE_USER; PCL_DESCR_TYPE MultipleCounterLayer::descr; bool MultipleCounterLayer::threadInit[TAU_MAX_THREADS]; PCL_CNT_TYPE MultipleCounterLayer::CounterList[MAX_TAU_COUNTERS]; PCL_FP_CNT_TYPE MultipleCounterLayer::FpCounterList[MAX_TAU_COUNTERS]; #endif//TAU_PCL #ifdef TAUKTAU_SHCTR int MultipleCounterLayer::ktauMCL_CP[MAX_TAU_COUNTERS]; int MultipleCounterLayer::ktauMCL_FP; #endif//TAUKTAU_SHCTR #ifdef TRACING_ON TauUserEvent **MultipleCounterLayer::counterEvents; #endif /* TRACING_ON */ firstListType MultipleCounterLayer::initArray[] = {gettimeofdayMCLInit, linuxTimerMCLInit, bglTimersMCLInit, sgiTimersMCLInit, cpuTimeMCLInit, javaCpuTimeMCLInit, crayTimersMCLInit, tauMUSEMCLInit, tauMPIMessageSizeMCLInit, papiMCLInit, papiWallClockMCLInit, papiVirtualMCLInit, pclMCLInit, ktauMCLInit}; int MultipleCounterLayer::numberOfActiveFunctions = 0; secondListType MultipleCounterLayer::functionArray[] = { }; char * MultipleCounterLayer::names[] = { }; int MultipleCounterLayer::numberOfCounters[] = { }; bool MultipleCounterLayer::counterUsed[] = { }; bool MultipleCounterLayer::initializeMultiCounterLayer(void) { static bool flag = true; bool returnValue = true; int functionPosition = 0; RtsLayer::LockDB(); if (flag) { flag = false; //Initializing data. for(int a=0; a set?" << endl; #ifdef TRACING_ON int countersUsed = getNumberOfCountersUsed(); counterEvents = new TauUserEvent * [countersUsed] ; /* We obtain the timestamp from COUNTER1, so we only need to trigger COUNTER2-N or i=1 through no. of active functions not through 0 */ RtsLayer::UnLockDB(); // mutual exclusion primitive AddEventToDB locks it for (int i = 1; i < countersUsed; i++) { counterEvents[i] = new TauUserEvent(names[i], true); /* the second arg is MonotonicallyIncreasing which is true (HW counters)*/ } RtsLayer::LockDB(); // We do this to prevent a deadlock. Lock it again! #endif /* TRACING_ON */ } RtsLayer::UnLockDB(); // mutual exclusion primitive return returnValue; } bool * MultipleCounterLayer::getCounterUsedList() { bool *tmpPtr = (bool *) malloc(sizeof(bool *) * MAX_TAU_COUNTERS); RtsLayer::LockDB(); for(int i=0;i< MAX_TAU_COUNTERS;i++){ tmpPtr[i] = MultipleCounterLayer::counterUsed[i]; } RtsLayer::UnLockDB(); return tmpPtr; } bool MultipleCounterLayer::getCounterUsed(int inPosition) { bool tmpBool = false; //RtsLayer::LockDB(); if(inPosition < MAX_TAU_COUNTERS) tmpBool = MultipleCounterLayer::counterUsed[inPosition]; //RtsLayer::UnLockDB(); return tmpBool; } void MultipleCounterLayer::setCounterUsed(bool inValue, int inPosition) { RtsLayer::LockDB(); if(inPosition < MAX_TAU_COUNTERS) MultipleCounterLayer::counterUsed[inPosition] = inValue; RtsLayer::UnLockDB(); } void MultipleCounterLayer::getCounters(int tid, double values[]) { static bool initFlag = initializeMultiCounterLayer(); //Just cycle through the list of function in the active function array. for(int i=0; i= 0) { papiMCL_CP[counterID] = i; MultipleCounterLayer::counterUsed[i] = true; MultipleCounterLayer::numberOfCounters[i] = 1; returnValue = true; } } } } if (returnValue) { // at least one PAPI counter was available MultipleCounterLayer::functionArray[functionPosition] = papiMCL; papiMCL_FP = functionPosition; return true; } return false; #else //TAU_PAPI return false; #endif//TAU_PAPI } bool MultipleCounterLayer::papiWallClockMCLInit(int functionPosition){ #ifdef TAU_PAPI for(int i=0; i= 0) { ktauMCL_CP[counterID] = i; MultipleCounterLayer::counterUsed[i] = true; MultipleCounterLayer::numberOfCounters[i] = 1; returnValue = true; } } } if (returnValue) { // at least one KTAU counter was available MultipleCounterLayer::functionArray[functionPosition] = ktauMCL; ktauMCL_FP = functionPosition; return true; } return false; #else //TAUKTAU_SHCTR return false; #endif//TAUKTAU_SHCTR } bool MultipleCounterLayer::linuxTimerMCLInit(int functionPosition){ #ifdef TAU_LINUX_TIMERS for(int i=0; i= TAU_MAX_THREADS){ cout << "Exceeded max thread count of TAU_MAX_THREADS" << endl; } threadInit[tid] = 1; //Starting the counter. if((PCLstart(descr, PCL_CounterCodeList, numberOfPCLHWCounters, PCL_Mode)) != PCL_SUCCESS){ cout << "Error starting PCL counters!" << endl; } //Initialize the array the Pcl portion of the passed in values //array to zero. for(int i=0;iGetEventId(), (long long) values[i], tid, timestamp, 1); // 1 in the last parameter is for use timestamp } #endif /* TAU_EPILOG */ } #endif /* TAU_MULTIPLE_COUNTERS && TRACING_ON */ ///////////////////////////////////////////////// // //End - Definintions for MultipleCounters. // ///////////////////////////////////////////////// tau-2.16.4/src/Profile/OpenMPLayer.cpp000066400000000000000000000172571062343042700174400ustar00rootroot00000000000000/**************************************************************************** ** TAU Portable Profiling Package ** ** http://www.cs.uoregon.edu/research/tau ** ***************************************************************************** ** Copyright 1997 ** ** Department of Computer and Information Science, University of Oregon ** ** Advanced Computing Laboratory, Los Alamos National Laboratory ** ****************************************************************************/ /*************************************************************************** ** File : OpenMPLayer.cpp ** ** Description : TAU Profiling Package RTS Layer definitions ** ** for supporting OpenMP Threads ** ** Author : Sameer Shende ** ** Contact : sameer@cs.uoregon.edu sameer@acl.lanl.gov ** ** Flags : Compile with ** ** -DPROFILING_ON to enable profiling (ESSENTIAL) ** ** -DPROFILE_STATS for Std. Deviation of Excl Time ** ** -DSGI_HW_COUNTERS for using SGI counters ** ** -DPROFILE_CALLS for trace of each invocation ** ** -DSGI_TIMERS for SGI fast nanosecs timer ** ** -DTULIP_TIMERS for non-sgi Platform ** ** -DPOOMA_STDSTL for using STD STL in POOMA src ** ** -DPOOMA_TFLOP for Intel Teraflop at SNL/NM ** ** -DPOOMA_KAI for KCC compiler ** ** -DDEBUG_PROF for internal debugging messages ** ** -DPROFILE_CALLSTACK to enable callstack traces ** ** Documentation : See http://www.cs.uoregon.edu/research/tau ** ***************************************************************************/ ////////////////////////////////////////////////////////////////////// // Include Files ////////////////////////////////////////////////////////////////////// //#define DEBUG_PROF #ifdef TAU_DOT_H_LESS_HEADERS #include using namespace std; #else /* TAU_DOT_H_LESS_HEADERS */ #include #endif /* TAU_DOT_H_LESS_HEADERS */ #include "Profile/OpenMPLayer.h" ///////////////////////////////////////////////////////////////////////// // Member Function Definitions For class OpenMPLayer // This allows us to get thread ids from 0..N-1 and lock and unlock DB ///////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////// // Define the static private members of OpenMPLayer ///////////////////////////////////////////////////////////////////////// omp_lock_t OpenMPLayer::tauDBmutex; omp_lock_t OpenMPLayer::tauEnvmutex; #ifdef TAU_OPENMP_NESTED static int threadId = -1; #pragma omp threadprivate(threadId) static int threadCount = 0; #endif /* TAU_OPENMP_NESTED */ //////////////////////////////////////////////////////////////////////// // RegisterThread() should be called before any profiling routines are // invoked. This routine sets the thread id that is used by the code in // FunctionInfo and Profiler classes. This should be the first routine a // thread should invoke from its wrapper. Note: main() thread shouldn't // call this routine. //////////////////////////////////////////////////////////////////////// int OpenMPLayer::RegisterThread(void) { // Not needed for OpenMP programs! return 0; } //////////////////////////////////////////////////////////////////////// // GetThreadId returns an id in the range 0..N-1 by looking at the // thread specific data. Since a getspecific has to be preceeded by a // setspecific (that all threads besides main do), we get a null for the // main thread that lets us identify it as thread 0. It is the only // thread that doesn't do a OpenMPLayer::RegisterThread(). //////////////////////////////////////////////////////////////////////// int OpenMPLayer::GetThreadId(void) { #ifdef TAU_OPENMP #ifdef TAU_OPENMP_NESTED if (threadId == -1) { #pragma omp critical(threadLock) { threadId = threadCount++; } } return threadId; #else return omp_get_thread_num(); #endif /* TAU_OPENMP_NESTED */ #endif /* TAU_OPENMP */ } //////////////////////////////////////////////////////////////////////// // TotalThreads returns the total number of threads running // The user typically sets this by setting the environment variable // OMP_NUM_THREADS or by using the routine omp_set_num_threads(int); //////////////////////////////////////////////////////////////////////// int OpenMPLayer::TotalThreads(void) { #ifdef TAU_OPENMP // Note: this doesn't work for nested parallelism return omp_get_num_threads(); #endif /* TAU_OPENMP */ } //////////////////////////////////////////////////////////////////////// // InitializeThreadData is called before any thread operations are performed. // It sets the default values for static private data members of the // OpenMPLayer class. //////////////////////////////////////////////////////////////////////// int OpenMPLayer::InitializeThreadData(void) { return 1; } //////////////////////////////////////////////////////////////////////// int OpenMPLayer::InitializeDBMutexData(void) { // For locking functionDB // Initialize the mutex omp_init_lock(&OpenMPLayer::tauDBmutex); //cout <<" Initialized the functionDB Mutex data " < using namespace std; #else /* TAU_DOT_H_LESS_HEADERS */ #include #endif /* TAU_DOT_H_LESS_HEADERS */ //#define TAU_PAPI_DEBUG #define TAU_PAPI_DEBUG_LEVEL 0 // level 0 will perform backward running counter checking and output critical errors // level 1 will perform output diagnostic information // level 10 will output all counter values, for each retrieval #ifdef TAU_MULTIPLE_COUNTERS #define MAX_PAPI_COUNTERS MAX_TAU_COUNTERS #else #define MAX_PAPI_COUNTERS 1 #endif bool PapiLayer::papiInitialized = false; ThreadValue *PapiLayer::ThreadList[TAU_MAX_THREADS]; int PapiLayer::numCounters = 0; int PapiLayer::counterList[MAX_PAPI_COUNTERS]; // Some versions of PAPI don't have these defined // so we'll define them to 0 and if the user tries to use them // we'll print out a warning #ifndef PAPI_DOM_USER #define PAPI_DOM_USER 0 #endif #ifndef PAPI_DOM_KERNEL #define PAPI_DOM_KERNEL 0 #endif #ifndef PAPI_DOM_SUPERVISOR #define PAPI_DOM_SUPERVISOR 0 #endif #ifndef PAPI_DOM_OTHER #define PAPI_DOM_OTHER 0 #endif #ifndef PAPI_DOM_ALL #define PAPI_DOM_ALL 0 #endif #ifdef TAU_PAPI_DEBUG #include static void dmesg(int level, char* format, ...) { #ifndef TAU_PAPI_DEBUG /* Empty body, so a good compiler will optimise calls to dmesg away */ #else va_list args; if (level > TAU_PAPI_DEBUG_LEVEL) { return; } fprintf (stderr, "[%d] ", getpid()); va_start(args, format); vfprintf(stderr, format, args); va_end(args); #endif /* TAU_PAPI_DEBUG */ } #endif ///////////////////////////////////////////////// int PapiLayer::addCounter(char *name) { int code, rc; #ifdef TAU_PAPI_DEBUG dmesg(1, "PAPI: Adding counter %s\n", name); #endif rc = PAPI_event_name_to_code(name, &code); if (rc != PAPI_OK) { fprintf (stderr, "Error: Couldn't Identify Counter '%s': %s\n", name, PAPI_strerror(rc)); return -1; } if ((PAPI_query_event(code) != PAPI_OK)) { fprintf (stderr, "Error: Counter %s is not available!\n", name); return -1; } int counterID = numCounters++; counterList[counterID] = code; return counterID; } //////////////////////////////////////////////////// int PapiLayer::initializeThread(int tid) { int rc; #ifdef TAU_PAPI_DEBUG dmesg(1, "PAPI: Initializing Thread Data for TID = %d\n", tid); #endif if (tid >= TAU_MAX_THREADS) { fprintf (stderr, "Exceeded max thread count of TAU_MAX_THREADS\n"); return -1; } ThreadList[tid] = new ThreadValue; ThreadList[tid]->ThreadID = tid; ThreadList[tid]->EventSet = PAPI_NULL; ThreadList[tid]->CounterValues = new long long[MAX_PAPI_COUNTERS]; for (int i=0; iCounterValues[i] = 0L; } rc = PAPI_create_eventset(&(ThreadList[tid]->EventSet)); if (rc != PAPI_OK) { fprintf (stderr, "Error creating PAPI event set: %s\n", PAPI_strerror(rc)); return -1; } #ifndef PAPI_VERSION /* PAPI 2 support goes here */ rc = PAPI_add_events(&(ThreadList[tid]->EventSet), counterList, numCounters); #elif (PAPI_VERSION_MAJOR(PAPI_VERSION) == 3) /* PAPI 3 support goes here */ rc = PAPI_add_events(ThreadList[tid]->EventSet, counterList, numCounters); #else /* PAPI future support goes here */ #error "TAU does not support this version of PAPI, please contact tau-bugs@cs.uoregon.edu" #endif if (rc != PAPI_OK) { fprintf (stderr, "Error adding PAPI events: %s\n", PAPI_strerror(rc)); return -1; } rc = PAPI_start(ThreadList[tid]->EventSet); if (rc != PAPI_OK) { fprintf (stderr, "Error calling PAPI_start: %s\n", PAPI_strerror(rc)); return -1; } return 0; } //////////////////////////////////////////////////// long long PapiLayer::getSingleCounter(int tid) { int rc; if (!papiInitialized) { rc = initializePAPI(); if (rc != 0) { return rc; } rc = initializeSingleCounter(); if (rc != PAPI_OK) { return rc; } } if (numCounters == 0) { // adding must have failed, just return return 0; } if (ThreadList[tid] == NULL) { rc = initializeThread(tid); if (rc != 0) { return rc; } } #ifdef TAU_PAPI_DEBUG long long oldValue = ThreadList[tid]->CounterValues[0]; #endif rc = PAPI_read(ThreadList[tid]->EventSet, ThreadList[tid]->CounterValues); #ifdef TAU_PAPI_DEBUG dmesg(10, "PAPI: getSingleCounter<%d> = %lld\n", tid, ThreadList[tid]->CounterValues[0]); long long difference = ThreadList[tid]->CounterValues[0] - oldValue; dmesg(10, "PAPI: Difference = %lld\n", difference); if (difference < 0) dmesg (0, "PAPI: Counter running backwards?\n"); dmesg(difference < 0 ? 0 : 10, "PAPI: Previous value = %lld\n", oldValue); dmesg(difference < 0 ? 0 : 10, "PAPI: Current value = %lld\n", ThreadList[tid]->CounterValues[0]); dmesg(difference < 0 ? 0 : 10, "PAPI: Difference = %lld\n", difference); #endif if (rc != PAPI_OK) { fprintf (stderr, "Error reading PAPI counters: %s\n", PAPI_strerror(rc)); return -1; } return ThreadList[tid]->CounterValues[0]; } ///////////////////////////////////////////////// long long *PapiLayer::getAllCounters(int tid, int *numValues) { int rc; if (!papiInitialized) { int rc = initializePAPI(); if (rc != 0) { return NULL; } } if (numCounters == 0) { // adding must have failed, just return return NULL; } if (ThreadList[tid] == NULL) { rc = initializeThread(tid); if (rc != 0) { return NULL; } } *numValues = numCounters; #ifdef TAU_PAPI_DEBUG long long previousCounters[MAX_PAPI_COUNTERS]; for (int i=0; iCounterValues[i]; } #endif rc = PAPI_read(ThreadList[tid]->EventSet, ThreadList[tid]->CounterValues); #ifdef TAU_PAPI_DEBUG for (int i=0; iCounterValues[i] - previousCounters[i]; dmesg(10, "PAPI: Difference[%d] = %lld\n", i, difference); if (difference < 0) { dmesg(0, "PAPI: Counter running backwards?\n"); dmesg(0, "PAPI: Previous value[%d] = %lld\n", i, previousCounters[i]); dmesg(0, "PAPI: Current value[%d] = %lld\n", i, ThreadList[tid]->CounterValues[i]); dmesg(0, "PAPI: Difference [%d] = %lld\n", i, difference); } } #endif if (rc != PAPI_OK) { fprintf (stderr, "Error reading PAPI counters: %s\n", PAPI_strerror(rc)); return NULL; } return ThreadList[tid]->CounterValues; } ///////////////////////////////////////////////// int PapiLayer::reinitializePAPI() { #ifdef TAU_PAPI_DEBUG dmesg(1, "PapiLayer::reinitializePAPI\n"); #endif // This function is called from the fork() handler // We need to clean up the ThreadList and then reinitialize PAPI if (papiInitialized) { for(int i=0; iCounterValues; delete ThreadList[i]; } ThreadList[i] = NULL; } } return initializePAPI(); } ///////////////////////////////////////////////// int PapiLayer::initializeSingleCounter() { // This function may get called more than once if there is a fork if (numCounters != 0) { return 0; } // Add the counter named by PAPI_EVENT char *papi_event = getenv("PAPI_EVENT"); if (papi_event == NULL) { fprintf (stderr, "Error - You must define the PAPI_EVENT environment variable.\n"); return -1; } int counterID = addCounter(papi_event); if (counterID < 0) { return -1; } return 0; } #ifdef TAU_PAPI_THREADS // note, this only works on linux #include #include _syscall0(pid_t,gettid) pid_t gettid(void); unsigned long papi_thread_gettid(void) { #ifdef SYS_gettid return(syscall(SYS_gettid)); #elif defined(__NR_gettid) return(syscall(__NR_gettid)); #else return(gettid()); #endif } #endif /* TAU_PAPI_THREADS */ ///////////////////////////////////////////////// void PapiLayer::checkDomain(int domain, char *domainstr) { if (domain == 0) { fprintf (stderr, "Warning: PAPI domain \"%s\" is not available with this version of PAPI\n", domainstr); } } ///////////////////////////////////////////////// int PapiLayer::initializePAPI() { #ifdef TAU_PAPI_DEBUG dmesg(1, "PapiLayer::initializePAPI\n"); #endif papiInitialized = true; for (int i=0; i 0) { fprintf(stderr, "Error initializing PAPI: version mismatch: %d\n", papi_ver); } else { fprintf(stderr, "Error initializing PAPI: %s\n", PAPI_strerror(papi_ver)); } return -1; } int rc; #ifdef TAU_PAPI_THREADS rc = PAPI_thread_init((unsigned long (*)(void))papi_thread_gettid); #else /* TAU_PAPI_THREADS */ #ifndef __alpha // There must be some problem with PAPI_thread_init on alpha #ifndef PAPI_VERSION /* PAPI 2 support goes here */ rc = PAPI_thread_init((unsigned long (*)(void))(RtsLayer::myThread),0); #elif (PAPI_VERSION_MAJOR(PAPI_VERSION) == 3) /* PAPI 3 support goes here */ rc = PAPI_thread_init((unsigned long (*)(void))(RtsLayer::myThread)); #else /* PAPI future support goes here */ #error "Unsupported PAPI Version, probably too new" #endif #endif if (rc != PAPI_OK) { fprintf(stderr, "Error Initializing PAPI: %s\n", PAPI_strerror(rc)); return -1; } #endif /* __alpha */ // set the PAPI domain if desired static char *papi_domain = getenv("TAU_PAPI_DOMAIN"); if (papi_domain != NULL) { TAU_METADATA("PAPI Domain", papi_domain); int domain = 0; char *token = strtok(papi_domain,":"); while (token != NULL) { int thisDomain = 0; if (!strcmp(token,"PAPI_DOM_USER")) { thisDomain |= PAPI_DOM_USER; } else if (!strcmp(token,"PAPI_DOM_KERNEL")) { thisDomain |= PAPI_DOM_KERNEL; } else if (!strcmp(token,"PAPI_DOM_OTHER")) { thisDomain |= PAPI_DOM_OTHER; } else if (!strcmp(token,"PAPI_DOM_SUPERVISOR")) { thisDomain |= PAPI_DOM_SUPERVISOR; } else if (!strcmp(token,"PAPI_DOM_ALL")) { thisDomain |= PAPI_DOM_ALL; } else { fprintf (stderr, "Warning: Unknown PAPI domain, \"%s\"\n", token); } checkDomain(thisDomain, token); domain |= thisDomain; token = strtok(NULL,":"); } if (domain == 0) { fprintf (stderr, "Warning, No valid PAPI domains specified\n"); } rc = PAPI_set_domain(domain); if (rc != PAPI_OK) { fprintf(stderr, "Error setting PAPI domain: %s\n", PAPI_strerror(rc)); return -1; } } return 0; } ///////////////////////////////////////////////// int PapiLayer::initializePapiLayer(bool lock) { static bool initialized = false; if (initialized) { return 0; } if (lock) RtsLayer::LockDB(); int rc = initializePAPI(); if (lock) RtsLayer::UnLockDB(); return rc; } ///////////////////////////////////////////////// long long PapiLayer::getWallClockTime(void) { // Returns the wall clock time from PAPI interface static int initflag = initializePapiLayer(); static long long oldvalue = 0L; static long long offset = 0; long long newvalue = 0L; #ifdef TAU_PAPI newvalue = PAPI_get_real_usec(); if (newvalue < oldvalue) { offset += UINT_MAX; DEBUGPROFMSG("WARNING: papi counter overflow. Fixed in TAU! new = " < #else /* TAU_DOT_H_LESS_HEADERS */ #include #include #endif /* TAU_DOT_H_LESS_HEADERS */ #include "Profile/Profiler.h" //////////////////////////////////////////////////////////////////////// // RegisterThread() should be called before any profiling routines are // invoked. This routine sets the thread id that is used by the code in // FunctionInfo and Profiler classes. This should be the first routine a // thread should invoke from its wrapper. Note: main() thread shouldn't // call this routine. //////////////////////////////////////////////////////////////////////// int PapiThreadLayer::RegisterThread(void) { // do nothing return 0; } //////////////////////////////////////////////////////////////////////// // GetThreadId returns an id in the range 0..N-1 by looking at the // thread specific data. Since a getspecific has to be preceeded by a // setspecific (that all threads besides main do), we get a null for the // main thread that lets us identify it as thread 0. It is the only // thread that doesn't do a PapiThreadLayer::RegisterThread(). //////////////////////////////////////////////////////////////////////// int PapiThreadLayer::GetThreadId(void) { int retval; int data; retval = PAPI_get_thr_specific(PAPI_USR1_TLS, (void**)&data); // we're making the (perhaps incorrect) assumption that the value will be zero // if uninitialzed if (data == 0) { LockDB(); static int tauThreadCount = 0; tauThreadCount++; data = tauThreadCount; UnLockDB(); retval = PAPI_set_thr_specific(PAPI_USR1_TLS, (void*)data); } return data-1; } //////////////////////////////////////////////////////////////////////// // InitializeThreadData is called before any thread operations are performed. // It sets the default values for static private data members of the // PapiThreadLayer class. //////////////////////////////////////////////////////////////////////// int PapiThreadLayer::InitializeThreadData(void) { } //////////////////////////////////////////////////////////////////////// int PapiThreadLayer::InitializeDBMutexData(void) { } //////////////////////////////////////////////////////////////////////// // LockDB locks the mutex protecting TheFunctionDB() global database of // functions. This is required to ensure that push_back() operation // performed on this is atomic (and in the case of tracing this is // followed by a GetFunctionID() ). This is used in // FunctionInfo::FunctionInfoInit(). //////////////////////////////////////////////////////////////////////// int PapiThreadLayer::LockDB(void) { PAPI_lock(PAPI_USR1_LOCK); return 1; } //////////////////////////////////////////////////////////////////////// // UnLockDB() unlocks the mutex tauDBMutex used by the above lock operation //////////////////////////////////////////////////////////////////////// int PapiThreadLayer::UnLockDB(void) { PAPI_unlock(PAPI_USR1_LOCK); return 1; } //////////////////////////////////////////////////////////////////////// int PapiThreadLayer::InitializeEnvMutexData(void) { // false - can't lock since we're using PAPI for locking static int flag = PapiLayer::initializePapiLayer(false); return 1; } //////////////////////////////////////////////////////////////////////// // LockEnv locks the mutex protecting TheFunctionEnv() global database of // functions. This is required to ensure that push_back() operation // performed on this is atomic (and in the case of tracing this is // followed by a GetFunctionID() ). This is used in // FunctionInfo::FunctionInfoInit(). //////////////////////////////////////////////////////////////////////// int PapiThreadLayer::LockEnv(void) { static int initflag=InitializeEnvMutexData(); PAPI_lock(PAPI_USR2_LOCK); return 1; } //////////////////////////////////////////////////////////////////////// // UnLockEnv() unlocks the mutex tauEnvMutex used by the above lock operation //////////////////////////////////////////////////////////////////////// int PapiThreadLayer::UnLockEnv(void) { PAPI_unlock(PAPI_USR2_LOCK); return 1; } /*************************************************************************** * $RCSfile: PapiThreadLayer.cpp,v $ $Author: amorris $ * $Revision: 1.1 $ $Date: 2007/03/16 23:49:41 $ * POOMA_VERSION_ID: $Id: PapiThreadLayer.cpp,v 1.1 2007/03/16 23:49:41 amorris Exp $ ***************************************************************************/ tau-2.16.4/src/Profile/PclLayer.cpp000066400000000000000000000236711062343042700170150ustar00rootroot00000000000000///////////////////////////////////////////////// //Function definintion file for the PCL_Layer class. // //Author: Robert Bell //Created: July 1999 // ///////////////////////////////////////////////// #include "Profile/Profiler.h" #include //Helper function used to determine the counter value //from the event name. int PCL_Layer::map_eventnames(char *name) { int i; /* search all names */ for (i = 0; i < PCL_MAX_EVENT; ++i) if (!strcmp(name, PCLeventname(i))) return i; /* not found */ return -1; } int PCL_Layer::PCLLayerInit(PCL_DESCR_TYPE *descr) { //Call PCLinit. if(PCLinit(descr) != PCL_SUCCESS){ cout << "unable to allocate PCL handle" << endl; return -1; } return 0; } void PCL_Layer::multiCounterPCLInit(PCL_DESCR_TYPE *descr) { //This function has the possibility if being called //one or more times by MultipleCounter routines. //Only want to do the init. once however. static int initFlag = PCLLayerInit(descr); } ///////////////////////// //If mutex locking of resourses is desired //define PCL_MUTEX_LOCK and the following version //of getCounters will be used. ///////////////////////// #ifdef PCL_MUTEX_LOCK #include PCL_FP_CNT_TYPE PCL_Layer::getCounters(int tid) { static ThreadValue * ThreadList[TAU_MAX_THREADS]; //Defining some thread locking stuff. static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER; //Defining a static test boolean. static bool RunBefore = false; //PCl init stuff. static int PCL_CounterList[1] = {0}; static unsigned int PCL_Mode = PCL_MODE_USER; static PCL_DESCR_TYPE descr; PCL_CNT_TYPE ResultsList[1]; PCL_FP_CNT_TYPE FpResultsList[1]; int Result; //****************************************** //This section is only run once. //****************************************** if((pthread_mutex_lock(&lock) != 0)) { cout << "There was a problem locking or unlocking a resource" << endl; return -1; } if(!RunBefore) { //Call PCLinit. if(PCLinit(&descr) != PCL_SUCCESS) { cout << "unable to allocate PCL handle" << endl; return -1; } //Initializing the static thread list. for(int i=0;i= TAU_MAX_THREADS) { cout << "Exceeded max thread count of TAU_MAX_THREADS" << endl; return -1; } ThreadList[tid] = new ThreadValue; ThreadList[tid]->ThreadID = tid; ThreadList[tid]->CounterValue = 0; //cout << "New thread added to the thread list." << endl; //Starting the counter. if((pthread_mutex_lock(&lock) != 0)) { cout << "There was a problem locking or unlocking a resource" << endl; return -1; } Result = PCLstart(descr, PCL_CounterList, 1, PCL_Mode); if((pthread_mutex_unlock(&lock) != 0)) { cout << "There was a problem locking or unlocking a resource" << endl; return -1; } if(Result != PCL_SUCCESS) { cout << "Something went wrong" << endl; return -1; } //Now return zero as this thread has only just begun //counting(as mentioned before). return 0; } //If here, it means that the thread has already been registered //and we need to just read and update the counters. //***************************************** //Reading the performance counters and //outputting the counter values. //***************************************** if((pthread_mutex_lock(&lock) != 0)) { cout << "There was a problem locking or unlocking a resource" << endl; return -1; } if( PCLread(descr, &ResultsList[0], &FpResultsList[0], 1) != PCL_SUCCESS) { cout << "There were problems reading the counters" << endl; if((pthread_mutex_unlock(&lock) != 0)) { cout << "There was a problem locking or unlocking a resource" << endl; return -1; } return -1; } if((pthread_mutex_unlock(&lock) != 0)) { cout << "There was a problem locking or unlocking a resource" << endl; return -1; } if ( PCL_CounterList[0] < PCL_MFLOPS ) { //Update the ThreadList and return the counter value. ThreadList[tid]->CounterValue = ResultsList[0]; } else { // FP result //Update the ThreadList and return the counter value. ThreadList[tid]->CounterValue = FpResultsList[0]; } //cout << "The thread ID is: " << tid << endl; //cout << "The value being returned is: " << (ThreadList[tid]->CounterValue) << endl; return ThreadList[tid]->CounterValue; } ///////////////////////// //The following is the default if no sychronization //is required. ///////////////////////// #else PCL_FP_CNT_TYPE PCL_Layer::getCounters(int tid) { static ThreadValue * ThreadList[TAU_MAX_THREADS]; //Defining a static test boolean. static bool RunBefore = false; //PCl init stuff. static int PCL_CounterList[1] = {0}; static unsigned int PCL_Mode = PCL_MODE_USER; static PCL_DESCR_TYPE descr; PCL_CNT_TYPE ResultsList[1]; PCL_FP_CNT_TYPE FpResultsList[1]; int Result; //****************************************** //This section is only run once. //****************************************** if(!RunBefore) { //Call PCLinit. if(PCLinit(&descr) != PCL_SUCCESS) { cout << "unable to allocate PCL handle" << endl; return -1; } //Initializing the static thread list. for(int i=0;i= TAU_MAX_THREADS) { cout << "Exceeded max thread count of TAU_MAX_THREADS" << endl; return -1; } ThreadList[tid] = new ThreadValue; ThreadList[tid]->ThreadID = tid; ThreadList[tid]->CounterValue = 0; //cout << "New thread added to the thread list." << endl; //Starting the counter. Result = PCLstart(descr, PCL_CounterList, 1, PCL_Mode); if(Result != PCL_SUCCESS) { cout << "Something went wrong" << endl; return -1; } //Now return zero as this thread has only just begun //counting(as mentioned before). return 0; } //If here, it means that the thread has already been registered //and we need to just read and update the counters. //***************************************** //Reading the performance counters and //outputting the counter values. //***************************************** if( PCLread(descr, &ResultsList[0], &FpResultsList[0], 1) != PCL_SUCCESS) { cout << "There were problems reading the counters" << endl; return -1; } if ( PCL_CounterList[0] < PCL_MFLOPS ) { //Update the ThreadList and return the counter value. //ThreadList[tid]->CounterValue = //ThreadList[tid]->CounterValue + ResultsList[0]; ThreadList[tid]->CounterValue = ResultsList[0]; } else { // FP result //Update the ThreadList and return the counter value. ThreadList[tid]->CounterValue = FpResultsList[0]; } //cout << "The thread ID is: " << tid << endl; //cout << "The value being returned is: " << (ThreadList[tid]->CounterValue) << endl; return ThreadList[tid]->CounterValue; } #endif ///////////////////////////////////////////////// // //End PCL_Layer class functions definition file. // ///////////////////////////////////////////////// tau-2.16.4/src/Profile/Profile.java000066400000000000000000000044241062343042700170340ustar00rootroot00000000000000/**************************************************************************** ** TAU Portable Profiling Package ** ** http://www.cs.uoregon.edu/research/tau ** ***************************************************************************** ** Copyright 1997 ** ** Department of Computer and Information Science, University of Oregon ** ** Advanced Computing Laboratory, Los Alamos National Laboratory ** ****************************************************************************/ /*************************************************************************** ** File : TauJAPI.java ** ** Description : TAU Profiling Package API wrapper for C ** ** Author : Sameer Shende ** ** Contact : sameer@cs.uoregon.edu sameer@acl.lanl.gov ** ** Flags : Compile with ** ** -DPROFILING_ON to enable profiling (ESSENTIAL) ** ** -DPROFILE_STATS for Std. Deviation of Excl Time ** ** -DSGI_HW_COUNTERS for using SGI counters ** ** -DPROFILE_CALLS for trace of each invocation ** ** -DSGI_TIMERS for SGI fast nanosecs timer ** ** -DTULIP_TIMERS for non-sgi Platform ** ** -DPOOMA_STDSTL for using STD STL in POOMA src ** ** -DPOOMA_TFLOP for Intel Teraflop at SNL/NM ** ** -DPOOMA_KAI for KCC compiler ** ** -DDEBUG_PROF for internal debugging messages ** ** -DPROFILE_CALLSTACK to enable callstack traces ** ** Documentation : See http://www.cs.uoregon.edu/research/tau ** ***************************************************************************/ package TAU; public class Profile { public static final long TAU_DEFAULT = 0xffffffffL; public Profile(String name, String type, String groupname, long profileGroup) { //System.out.println("Inside Profile name = "+name+ " type = "+ type ); NativeProfile(name, type, groupname, profileGroup); } public native void NativeProfile(String name, String type, String groupname, long profileGroup); public void Start() { NativeStart(); } public native void NativeStart(); public void Stop() { NativeStop(); } public native void NativeStop(); public long FuncInfoPtr; /* Pointer to FunctionInfo Object */ static { System.loadLibrary("TAU"); } } tau-2.16.4/src/Profile/ProfileParam.cpp000066400000000000000000000175561062343042700176700ustar00rootroot00000000000000/**************************************************************************** ** TAU Portable Profiling Package ** ** http://www.cs.uoregon.edu/research/tau ** ***************************************************************************** ** Copyright 1997 ** ** Department of Computer and Information Science, University of Oregon ** ** Advanced Computing Laboratory, Los Alamos National Laboratory ** ****************************************************************************/ /*************************************************************************** ** File : ProfileParam.cpp ** ** Description : TAU Profiling Package ** ** Author : Sameer Shende ** ** Contact : sameer@cs.uoregon.edu sameer@acl.lanl.gov ** ** Flags : Compile with ** ** -DPROFILING_ON to enable profiling (ESSENTIAL) ** ** -DPROFILE_STATS for Std. Deviation of Excl Time ** ** -DSGI_HW_COUNTERS for using SGI counters ** ** -DPROFILE_CALLS for trace of each invocation ** ** -DSGI_TIMERS for SGI fast nanosecs timer ** ** -DTULIP_TIMERS for non-sgi Platform ** ** -DPOOMA_STDSTL for using STD STL in POOMA src ** ** -DPOOMA_TFLOP for Intel Teraflop at SNL/NM ** ** -DPOOMA_KAI for KCC compiler ** ** -DDEBUG_PROF for internal debugging messages ** ** -DPROFILE_CALLSTACK to enable callstack traces ** ** Documentation : See http://www.cs.uoregon.edu/research/tau ** ***************************************************************************/ ////////////////////////////////////////////////////////////////////// // Note: The default behavior of this library is to calculate all the // statistics (min, max, mean, stddev, etc.) If the user wishes to // override these settings, SetDisableXXX routines can be used to do so ////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////// // Include Files ////////////////////////////////////////////////////////////////////// //#define DEBUG_PROF #include "Profile/Profiler.h" #ifdef TAU_WINDOWS typedef __int64 x_int64; typedef unsigned __int64 x_uint64; #else typedef long long x_int64; typedef unsigned long long x_uint64; #endif #include #include //#include #ifdef TAU_DOT_H_LESS_HEADERS #include using namespace std; #else /* TAU_DOT_H_LESS_HEADERS */ #include #endif /* TAU_DOT_H_LESS_HEADERS */ //////////////////////////////////////////////////////////////////////////// // The datatypes and routines for maintaining a context map //////////////////////////////////////////////////////////////////////////// #define TAU_PROFILE_PARAM_TYPE long *, FunctionInfo *, TaultProfileParamLong ///////////////////////////////////////////////////////////////////////// /* The comparison function for callpath requires the TaultUserEventLong struct * to be defined. The operator() method in this struct compares two callpaths. * Since it only compares two arrays of longs (containing addresses), we can * look at the callpath depth as the first index in the two arrays and see if * they're equal. If they two arrays have the same depth, then we iterate * through the array and compare each array element till the end */ ///////////////////////////////////////////////////////////////////////// struct TaultProfileParamLong { bool operator() (const long *l1, const long *l2) const { int i; /* first check 0th index (size) */ if (l1[0] != l2[0]) return (l1[0] < l2[0]); /* they're equal, see the size and iterate */ for (i = 0; i < l1[0] ; i++) { if (l1[i] != l2[i]) return l1[i] < l2[i]; } return (l1[i] < l2[i]); } }; ///////////////////////////////////////////////////////////////////////// // We use one global map to store the callpath information ///////////////////////////////////////////////////////////////////////// map& TheTimerProfileParamMap(void) { // to avoid initialization problems of non-local static variables static map timerappdatamap; return timerappdatamap; } long * TauCreateProfileParamArray(long FuncId, long key) { int depth = 3; long *retary = new long[depth+1]; retary[0] = depth; /* encode the depth first */ retary[1] = FuncId; /* the id of the current timer */ retary[2] = key; /* data */ return retary; } FunctionInfo * TauGetProfileParamFI(int tid, long key, string& keyname) { /* Get the FunctionInfo Object of the current Profiler */ Profiler *current = Profiler::CurrentProfiler[tid]; if (!current) return NULL; /* not in a valid profiler */ FunctionInfo *f = current->ThisFunction; if (!f) return NULL; /* proceed if we are in a valid function */ /* we have a timer definition. We need to examine the key and see if * it has appeared before. If not, we need to create a new functionInfo * and a mapping between the key and the newly created functionInfo */ long *ary = TauCreateProfileParamArray((long) f, key); /* We've set the key */ map::iterator it = TheTimerProfileParamMap().find(ary); if (it == TheTimerProfileParamMap().end()) { /* Couldn't find it */ char keystr[256]; sprintf(keystr, "%ld", key); string name ( f->GetName() + string(" ") + f->GetType()+ string(" [ <") +keyname+ string("> = <")+ keystr + string("> ]")); DEBUGPROFMSG("Name created = "<GetAllGroups()); FunctionInfo *fnew = new FunctionInfo(name, " ", f->GetProfileGroup(), (const char *)grname.c_str(), true, tid); TheTimerProfileParamMap().insert(map::value_type(ary, fnew)); /* Add it to the map */ return fnew; } else { /* found it. (*it).second refers to the functionInfo object corresponding to our particular instance */ DEBUGPROFMSG("Found name = "<<(*it).second->GetName()<ProfileParamFunction = f; /* set add incl flag for this function info object */ if (f->GetAlreadyOnStack(tid) == false) { /* is it on the callstack? */ current->AddInclProfileParamFlag = true; f->SetAlreadyOnStack(true, tid); // it is on callstack now } else { current->AddInclProfileParamFlag = false; // no need to add incl time } return; } #ifdef TAU_MULTIPLE_COUNTERS void Profiler::ProfileParamStop(double* TotalTime, int tid) #else // single counter void Profiler::ProfileParamStop(double TotalTime, int tid) #endif // TAU_MULTIPLE_COUNTERS { if (ProfileParamFunction) { DEBUGPROFMSG("Inside ProfileParamStop "<GetName()<SetAlreadyOnStack(false, tid); // while exiting DEBUGPROFMSG("nct "<< RtsLayer::myNode() << "," << RtsLayer::myContext() << "," << tid << " " << "ProfileParamStop: After SetAlreadyOnStack Going for AddInclTime" <IncrNumCalls(tid); ProfileParamFunction->AddInclTime(TotalTime, tid); } ProfileParamFunction->AddExclTime(TotalTime, tid); } } /*************************************************************************** * $RCSfile: ProfileParam.cpp,v $ $Author: sameer $ * $Revision: 1.2 $ $Date: 2006/04/14 04:42:00 $ * TAU_VERSION_ID: $Id: ProfileParam.cpp,v 1.2 2006/04/14 04:42:00 sameer Exp $ ***************************************************************************/ tau-2.16.4/src/Profile/Profiler.cpp000066400000000000000000003252021062343042700170570ustar00rootroot00000000000000/**************************************************************************** ** TAU Portable Profiling Package ** ** http://www.cs.uoregon.edu/research/tau ** ***************************************************************************** ** Copyright 1999 ** ** Department of Computer and Information Science, University of Oregon ** ** Advanced Computing Laboratory, Los Alamos National Laboratory ** ****************************************************************************/ /*************************************************************************** ** File : Profiler.cpp ** ** Description : TAU Profiling Package ** ** Author : Sameer Shende ** ** Contact : sameer@cs.uoregon.edu sameer@acl.lanl.gov ** ** Flags : Compile with ** ** -DPROFILING_ON to enable profiling (ESSENTIAL) ** ** -DPROFILE_STATS for Std. Deviation of Excl Time ** ** -DSGI_HW_COUNTERS for using SGI counters ** ** -DPROFILE_CALLS for trace of each invocation ** ** -DSGI_TIMERS for SGI fast nanosecs timer ** ** -DTULIP_TIMERS for non-sgi Platform ** ** -DPOOMA_STDSTL for using STD STL in POOMA src ** ** -DPOOMA_TFLOP for Intel Teraflop at SNL/NM ** ** -DPOOMA_KAI for KCC compiler ** ** -DDEBUG_PROF for internal debugging messages ** ** -DPROFILE_CALLSTACK to enable callstack traces ** ** Documentation : See http://www.cs.uoregon.edu/research/tau ** ***************************************************************************/ ////////////////////////////////////////////////////////////////////// // Include Files ////////////////////////////////////////////////////////////////////// //#define DEBUG_PROF // For Debugging Messages from Profiler.cpp #include "Profile/Profiler.h" #include "tauarch.h" #ifdef TAU_WINDOWS typedef __int64 x_int64; typedef unsigned __int64 x_uint64; double TauWindowsUsecD(void); #else typedef long long x_int64; typedef unsigned long long x_uint64; #endif //#ifndef TAU_WINDOWS extern "C" void Tau_shutdown(void); //#endif //TAU_WINDOWS #ifdef TAU_DOT_H_LESS_HEADERS #include using namespace std; #else /* TAU_DOT_H_LESS_HEADERS */ #include #endif /* TAU_DOT_H_LESS_HEADERS */ #include #include #include #include #if (!defined(TAU_WINDOWS)) #include #include #ifndef TAU_DISABLE_METADATA #include // for host identification (uname) #endif #include #if (defined(POOMA_TFLOP) || !defined(TULIP_TIMERS)) #include #else #ifdef TULIP_TIMERS #include "Profile/TulipTimers.h" #endif //TULIP_TIMERS #endif //POOMA_TFLOP #endif //TAU_WINDOWS #ifdef TRACING_ON #ifdef TAU_VAMPIRTRACE #include "Profile/TauVampirTrace.h" #else /* TAU_VAMPIRTRACE */ #ifdef TAU_EPILOG #include "elg_trc.h" #else /* TAU_EPILOG */ #define PCXX_EVENT_SRC #include "Profile/pcxx_events.h" #endif /* TAU_EPILOG */ #endif /* TAU_VAMPIRTRACE */ #endif // TRACING_ON #ifdef RENCI_STFF #include "Profile/RenciSTFF.h" #endif // RENCI_STFF int Tau_writeProfileMetaData(FILE *fp); //#define PROFILE_CALLS // Generate Excl Incl data for each call ////////////////////////////////////////////////////////////////////// //Initialize static data ////////////////////////////////////////////////////////////////////// // No need to initialize FunctionDB. using TheFunctionDB() instead. // vector FunctionInfo::FunctionDB[TAU_MAX_THREADS] ; Profiler * Profiler::CurrentProfiler[] = {0}; // null to start with #if defined(TAUKTAU) #include #endif /* TAUKTAU */ // The rest of CurrentProfiler entries are initialized to null automatically //TauGroup_t RtsLayer::ProfileMask = TAU_DEFAULT; // Default value of Node. //int RtsLayer::Node = -1; ////////////////////////////////////////////////////////////////////// // For OpenMP ////////////////////////////////////////////////////////////////////// #ifdef TAU_OPENMP #ifndef TAU_MULTIPLE_COUNTERS double TheLastTimeStamp[TAU_MAX_THREADS]; #else /* FOR MULTIPLE COUNTERS */ double TheLastTimeStamp[TAU_MAX_THREADS][MAX_TAU_COUNTERS]; #endif /* MULTIPLE_COUNTERS */ #endif /* TAU_OPENMP */ ////////////////////////////////////////////////////////////////////// // Explicit Instantiations for templated entities needed for ASCI Red ////////////////////////////////////////////////////////////////////// #ifdef PGI template void vector::insert_aux(vector::pointer, FunctionInfo *const &); // need a few other function templates instantiated template FunctionInfo** copy_backward(FunctionInfo**,FunctionInfo**,FunctionInfo**); template FunctionInfo** uninitialized_copy(FunctionInfo**,FunctionInfo**,FunctionInfo**); //template <> //std::basic_ostream > & std::operator<< (std::basic_ostream > &, const char * ); #endif /* PGI */ ////////////////////////////////////////////////////////////////////// // TAU_DEPTH_LIMIT ////////////////////////////////////////////////////////////////////// int& TauGetDepthLimit(void) { static int depth = 0; char *depthvar; if (depth == 0) { depthvar = getenv("TAU_DEPTH_LIMIT"); if (depthvar == (char *) NULL) { depth = INT_MAX; } else { depth = atoi(depthvar); } } return depth; } ////////////////////////////////////////////////////////////////////// // Shutdown routine which calls TAU's shutdown ////////////////////////////////////////////////////////////////////// void TauAppShutdown(void) { Tau_shutdown(); } ////////////////////////////////////////////////////////////////////// // Get the string containing the counter name ////////////////////////////////////////////////////////////////////// char * TauGetCounterString(void) { char *header = new char[64]; #ifdef SGI_HW_COUNTERS return "templated_functions_hw_counters"; #elif (defined (TAU_PAPI) || defined (TAU_PCL) \ || defined(TAU_PAPI_WALLCLOCKTIME) \ || defined(TAU_PAPI_VIRTUAL)) char *tau_env = NULL; #ifdef TAU_PAPI tau_env = getenv("PAPI_EVENT"); #else /* TAU_PAPI */ #ifdef TAU_PCL tau_env = getenv("PCL_EVENT"); #endif /* TAU_PCL */ #endif /* TAU_PAPI */ if (tau_env) { sprintf(header, "templated_functions_MULTI_%s", tau_env); return header; } else { #ifdef TAU_PAPI_WALLCLOCKTIME return "templated_functions_MULTI_P_WALL_CLOCK_TIME"; #endif /* TAU_PAPI_WALLCLOCKTIME */ #ifdef TAU_PAPI_VIRTUAL return "templated_functions_MULTI_P_VIRTUAL_TIME"; #endif /* TAU_PAPI_VIRTUAL */ return "templated_functions_hw_counters"; } #else // ! (TAU_PAPI/PCL) => SGI_TIMERS, TULIP_TIMERS #ifdef TAU_MUSE return "templated_functions_hw_counters"; #endif /* TAU_MUSE */ return "templated_functions"; #endif // ALL options } ////////////////////////////////////////////////////////////////////// // Member Function Definitions For class Profiler ////////////////////////////////////////////////////////////////////// #ifdef TAU_MPITRACE ////////////////////////////////////////////////////////////////////// void Profiler::EnableAllEventsOnCallStack(int tid, Profiler *current) { /* Go up the callstack and enable all events on it */ if (current != (Profiler *) NULL) { DEBUGPROFMSG(RtsLayer::myNode()<<" This func = "<ThisFunction->GetName()<<" RecordEvent = "<RecordEvent<RecordEvent) { DEBUGPROFMSG(RtsLayer::myNode()<< " Enabling event "<ThisFunction->GetName()<RecordEvent = true; EnableAllEventsOnCallStack(tid, current->ParentProfiler); /* process the current event */ DEBUGPROFMSG(RtsLayer::myNode()<<" Processing EVENT "<ThisFunction->GetName()<ThisFunction->GetFunctionId(), 1, tid, (x_uint64) current->StartTime, 1); #ifdef TAU_MULTIPLE_COUNTERS MultipleCounterLayer::triggerCounterEvents((x_uint64) current->StartTime[0], current->StartTime, tid); #endif /* TAU_MULTIPLE_COUNTERS */ } } } #endif /* TAU_MPITRACE */ ////////////////////////////////////////////////////////////////////// void Profiler::Start(int tid) { // fprintf (stderr, "[%d:%d-%d] Profiler::Start for %s\n", getpid(), gettid(), tid, ThisFunction->GetName()); ParentProfiler = CurrentProfiler[tid]; // Timers #ifdef TAU_DEPTH_LIMIT int userspecifieddepth = TauGetDepthLimit(); if (ParentProfiler) { SetDepthLimit(ParentProfiler->GetDepthLimit()+1); } else { SetDepthLimit(1); } int mydepth = GetDepthLimit(); DEBUGPROFMSG("Start: Name: "<< ThisFunction->GetName()<<" mydepth = "<AllGroups.append(" | TAU_PHASE"); } } #endif /* TAU_PROFILEPHASE */ x_uint64 TimeStamp = 0L; DEBUGPROFMSG("Profiler::Start: MyProfileGroup_ = " << MyProfileGroup_ << " Mask = " << RtsLayer::TheProfileMask() <GetName()<GetMemoryEvent()->TriggerEvent(TauGetMaxRSS()); #endif /* TAU_PROFILEMEMORY */ #ifdef TAU_PROFILEHEADROOM ThisFunction->GetHeadroomEvent()->TriggerEvent((double)TauGetFreeMemory()); #endif /* TAU_PROFILEHEADROOM */ #ifdef TAU_COMPENSATE SetNumChildren(0); /* for instrumentation perturbation compensation */ #endif /* TAU_COMPENSATE */ // Initialization is over, now record the time it started #ifndef TAU_MULTIPLE_COUNTERS StartTime = RtsLayer::getUSecD(tid) ; TimeStamp += (x_uint64) StartTime; #else //TAU_MULTIPLE_COUNTERS //Initialize the array to zero, as some of the elements will //not be set by counting functions. for(int i=0;iProfileParamFunction ) { ParentProfiler->ProfileParamFunction->IncrNumSubrs(tid); } #endif /* TAU_PROFILEPARAM */ #ifdef TRACING_ON #ifdef TAU_MPITRACE if (MyProfileGroup_ & TAU_MESSAGE) { /* if we're in the group, we must first enable all the other events * on the callstack */ DEBUGPROFMSG(RtsLayer::myNode()<< " Function is enabled: "<GetName()<GetFunctionId()<<"] " << ThisFunction->GetName()<<" Time" <GetFunctionId()); #else /* TAU_VAMPITRACE */ #ifdef TAU_EPILOG DEBUGPROFMSG("Calling elg_enter: ["<GetFunctionId()<<"] " << ThisFunction->GetName()<GetFunctionId()); #else /* TAU_EPILOG */ TraceEvent(ThisFunction->GetFunctionId(), 1, tid, TimeStamp, 1); // 1 is for entry in second parameter and for use TimeStamp in last DEBUGPROFMSG("Start TimeStamp for Tracing = "<GetAlreadyOnStack(tid)== false)) { /* Set the callstack flag */ AddInclFlag = true; ThisFunction->SetAlreadyOnStack(true, tid); // it is on callstack now // Next, increment the number of calls ThisFunction->IncrNumCalls(tid); } #endif /* TAU_DISABLE_THROTTLE is off */ #endif /* TRACING is on */ #endif /* PROFILING is off */ #ifdef PROFILING_ON // First, increment the number of calls ThisFunction->IncrNumCalls(tid); // now increment parent's NumSubrs() if (ParentProfiler != 0) ParentProfiler->ThisFunction->IncrNumSubrs(tid); // Next, if this function is not already on the call stack, put it if (ThisFunction->GetAlreadyOnStack(tid) == false) { AddInclFlag = true; // We need to add Inclusive time when it gets over as // it is not already on callstack. ThisFunction->SetAlreadyOnStack(true, tid); // it is on callstack now } else { // the function is already on callstack, no need to add // inclusive time AddInclFlag = false; } DEBUGPROFMSG("Start Time = "<< StartTime<GetName() <<" Type : " << ThisFunction->GetType() << endl; ); CurrentProfiler[tid] = this; if (ParentProfiler != 0) { DEBUGPROFMSG("nct "<< RtsLayer::myNode() << "," << RtsLayer::myContext() << "," << tid << " Inside "<< ThisFunction->GetName()<< " Setting ParentProfiler " << ParentProfiler->ThisFunction->GetName()<GetName()); x_uint64 TimeStamp = 0L; if (CurrentProfiler[tid] == NULL) return; #ifdef TAU_DEPTH_LIMIT int userspecifieddepth = TauGetDepthLimit(); int mydepth = GetDepthLimit(); if (mydepth > userspecifieddepth) { CurrentProfiler[tid] = ParentProfiler; DEBUGPROFMSG("Stop: mydepth = "<GetName()<<" NumChildren = " <ThisFunction->GetName()); #endif /*KTAU_DEBUGPROF*/ ThisKtauProfiler->Stop(this, AddInclFlag); #endif /* TAUKTAU */ double TotalTime = CurrentTime - StartTime; TimeStamp += (x_uint64) CurrentTime; #ifdef TAU_OPENMP TheLastTimeStamp[tid] = CurrentTime; #endif /* TAU_OPENMP */ #if (defined(TAU_COMPENSATE ) && defined(PROFILING_ON)) /* To compensate for timing overhead, shrink the totaltime! */ TotalTime = TotalTime - tnull - GetNumChildren() * tover; if (TotalTime < 0 ) { TotalTime = 0; DEBUGPROFMSG("TotalTime negative in "<GetName()<ThisFunction->GetName()); #endif /*KTAU_DEBUGPROF*/ ThisKtauProfiler->Stop(this, AddInclFlag); #endif /* TAUKTAU */ #ifdef PROFILING_ON #ifdef TAU_COMPENSATE double *tover = TauGetTimerOverhead(TauFullTimerOverhead); double *tnull = TauGetTimerOverhead(TauNullTimerOverhead); #endif /* TAU_COMPENSATE */ for(int k=0;kGetName()<GetName()<< "With Timestamp = "<GetName()<GetFunctionId(), -1, tid, TimeStamp, 1); // -1 is for exit, 1 is for use TimeStamp in the last argument DEBUGPROFMSG("Stop TimeStamp for Tracing = "<SetAlreadyOnStack(false, tid); // while exiting // Next, compute inclusive time for counter 0 #ifdef TAU_MULTIPLE_COUNTERS double TimeTaken = CurrentTime[0] - StartTime[0]; ThisFunction->AddInclTimeForCounter(TimeTaken, tid, 0); #else /* single counter */ double TimeTaken = CurrentTime - StartTime; ThisFunction->AddInclTime(TimeTaken, tid); #endif /* TAU_MULTIPLE_COUNTERS */ /* we only maintain inclusive time for counter 0 */ } #endif /* TAU_DISABLE_THROTTLE is off */ #endif /* TRACING is on */ #endif /* PROFILING is off */ #ifdef PROFILING_ON // Calculations relevent to profiling only #ifdef TAU_CALLPATH CallPathStop(TotalTime, tid); #endif // TAU_CALLPATH #ifdef RENCI_STFF #ifdef TAU_CALLPATH RenciSTFF::recordValues(CallPathFunction, TimeStamp, TotalTime, tid); #endif //TAU_CALLPATH RenciSTFF::recordValues(ThisFunction, TimeStamp, TotalTime, tid); #endif //RENCI_STFF #ifdef TAU_PROFILEPARAM ProfileParamStop(TotalTime, tid); if (ParentProfiler && ParentProfiler->ProfileParamFunction) { /* Increment the parent's NumSubrs and decrease its exclude time */ ParentProfiler->ProfileParamFunction->ExcludeTime(TotalTime, tid); } #endif /* TAU_PROFILEPARAM */ DEBUGPROFMSG("nct "<< RtsLayer::myNode() << "," << RtsLayer::myContext() << "," << tid << " Profiler::Stop() : Name : "<< ThisFunction->GetName() << " Start : " <SetAlreadyOnStack(false, tid); // while exiting DEBUGPROFMSG("nct "<< RtsLayer::myNode() << "," << RtsLayer::myContext() << "," << tid << " " << "STOP: After SetAlreadyOnStack Going for AddInclTime" <AddInclTime(TotalTime, tid); DEBUGPROFMSG("nct "<< RtsLayer::myNode() << "," << RtsLayer::myContext() << "," << tid << " AddInclFlag true in Stop Name: "<< ThisFunction->GetName() << " Type: " << ThisFunction->GetType() << endl; ); } // If its already on call stack, don't change AlreadyOnStack ThisFunction->AddExclTime(TotalTime, tid); // In either case we need to add time to the exclusive time. #if defined(TAUKTAU) && defined(TAUKTAU_MERGE) #ifdef KTAU_DEBUGPROF /* Checking to see if kern_time < tot-time (user+kern time) */ ThisKtauProfiler->VerifyMerge(ThisFunction); #endif /*KTAU_DEBUGPROF*/ #endif /*TAUKTAU && TAUKTAU_MERGE*/ #ifdef TAU_COMPENSATE ThisFunction->ResetExclTimeIfNegative(tid); #ifdef TAU_CALLPATH if (ParentProfiler != NULL) { CallPathFunction->ResetExclTimeIfNegative(tid); } #endif /* TAU_CALLPATH */ #ifdef TAU_PROFILEPARAM if (ParentProfiler != NULL) { ProfileParamFunction->ResetExclTimeIfNegative(tid); } #endif /* TAU_PROFILEPARAM */ #endif /* TAU_COMPENSATE */ #if ( defined(PROFILE_CALLS) || defined(PROFILE_STATS)|| defined(PROFILE_CALLSTACK) ) ExclTimeThisCall += TotalTime; DEBUGPROFMSG("nct "<< RtsLayer::myNode() << "," << RtsLayer::myContext() << "," << tid << " " << "Profiler::Stop() : Name " << ThisFunction->GetName() << " ExclTimeThisCall = " << ExclTimeThisCall << " InclTimeThisCall " << TotalTime << endl;); #endif //PROFILE_CALLS || PROFILE_STATS || PROFILE_CALLSTACK #ifdef PROFILE_CALLS ThisFunction->AppendExclInclTimeThisCall(ExclTimeThisCall, TotalTime); #ifdef TAU_CALLPATH if (CallPathFunction) CallPathFunction->AppendExclInclTimeThisCall(ExclTimeThisCall, TotalTime); #endif /* TAU_CALLPATH */ #ifdef TAU_PROFILEPARAM if (ProfileParamFunction) ProfileParamFunction->AppendExclInclTimeThisCall(ExclTimeThisCall, TotalTime); #endif /* TAU_PROFILEPARAM */ #endif // PROFILE_CALLS #ifdef PROFILE_STATS ThisFunction->AddSumExclSqr(ExclTimeThisCall*ExclTimeThisCall, tid); #ifdef TAU_CALLPATH if (CallPathFunction) CallPathFunction->AddSumExclSqr(ExclTimeThisCall*ExclTimeThisCall, tid); #endif /* TAU_CALLPATH */ #ifdef TAU_PROFILEPARAM if (ProfileParamFunction) ProfileParamFunction->AddSumExclSqr(ExclTimeThisCall*ExclTimeThisCall, tid); #endif /* TAU_PROFILEPARAM */ #endif // PROFILE_STATS if (ParentProfiler != (Profiler *) NULL) { DEBUGPROFMSG("nct "<< RtsLayer::myNode() << "," << RtsLayer::myContext() << "," << tid << " Profiler::Stop(): ParentProfiler Function Name : " << ParentProfiler->ThisFunction->GetName() << endl;); DEBUGPROFMSG("nct "<< RtsLayer::myNode() << "," << RtsLayer::myContext() << "," << tid << " Exiting from "<GetName() << " Returning to " << ParentProfiler->ThisFunction->GetName() << endl;); if (ParentProfiler->ThisFunction != (FunctionInfo *) NULL) ParentProfiler->ThisFunction->ExcludeTime(TotalTime, tid); else { cout <<"ParentProfiler's Function info is NULL" <ExcludeTimeThisCall(TotalTime); #endif //PROFILE_CALLS || PROFILE_STATS || PROFILE_CALLSTACK #ifdef TAU_COMPENSATE ParentProfiler->AddNumChildren(GetNumChildren()+1); /* Add 1 and my children to my parents total number of children */ #endif /* TAU_COMPENSATE */ } #endif //PROFILING_ON /* if the frequency of events is high, disable them */ #ifndef TAU_DISABLE_THROTTLE /* unless we are overriding the throttle */ double inclusiveTime; #ifdef TAU_MULTIPLE_COUNTERS inclusiveTime = ThisFunction->GetInclTimeForCounter(tid, 0); /* here we get the array of double values representing the double metrics. We choose the first counter */ #else /* TAU_MULTIPLE_COUNTERS */ inclusiveTime = ThisFunction->GetInclTime(tid); /* when multiple counters are not used, it is a single metric or double */ #endif /* MULTIPLE_COUNTERS */ DEBUGPROFMSG("Calls = "<GetCalls(tid) <<" inclusiveTime = "<: Throttle: Disabling "<GetName()<GetName() << " " << ThisFunction->GetType() <ThisFunction != (FunctionInfo *)NULL) { #ifdef TAU_OPENMP #pragma omp critical #endif /* TAU_OPENMP */ cout << "Overlapping function = " << CurrentProfiler[tid]->ThisFunction->GetName () << " " << CurrentProfiler[tid]->ThisFunction->GetType() << " Other function " << this->ThisFunction->GetName() << this->ThisFunction->GetType()<< " Tid = "<GetName() << " TheSafeToDumpData() = " << TheSafeToDumpData() << " CurrProf = "<GetName())) { // Not a destructor of a static object - its a function like main DEBUGPROFMSG("nct " << RtsLayer::myNode() << "," << RtsLayer::myContext() << "," << tid << " " << "Profiler::Stop() : Reached top level function: dumping data" << ThisFunction->GetName() <KernProf.DumpKProfile(); ThisKtauProfiler->KernProf.DumpKProfileOut(); #endif /*TAUKTAU */ #ifdef TAU_OPENMP /* Check if we need to shut off .TAU applications on other tids */ if (tid == 0) { int i; for (i = 1; i < TAU_MAX_THREADS; i++) { /* for all other threads */ Profiler *cp = CurrentProfiler[i]; if (cp && strncmp(cp->ThisFunction->GetName(),".TAU", 4) == 0) { bool uselasttimestamp = true; cp->Stop(i,uselasttimestamp); /* force it to write the data*/ } } } #endif /* TAU_OPENMP */ } // dump data here. Dump it only at the exit of top level profiler. } } } // if TheProfileMask() else { /* set current profiler properly */ CurrentProfiler[tid] = ParentProfiler; } } ////////////////////////////////////////////////////////////////////// Profiler::~Profiler() { if (!StartStopUsed_) { Stop(); } // If ctor dtor interface is used then call Stop. // If the Profiler object is going out of scope without Stop being // called, call it now! #if defined(TAUKTAU) KtauProfiler::PutKtauProfiler(); #endif /* TAUKTAU */ } ////////////////////////////////////////////////////////////////////// void Profiler::ProfileExit(const char *message, int tid) { Profiler *current; current = CurrentProfiler[tid]; DEBUGPROFMSG("nct "<< RtsLayer::myNode() << " RtsLayer::ProfileExit called :" << message << endl;); if (current == 0) { DEBUGPROFMSG("Current is NULL, No need to store data TID = " << tid << endl;); //StoreData(tid); } else { while (current != 0) { DEBUGPROFMSG("Thr "<< RtsLayer::myNode() << " ProfileExit() calling Stop:" << current->ThisFunction->GetName() << " " << current->ThisFunction->GetType() << endl;); current->Stop(tid); // clean up if (current->ParentProfiler == 0) { if (!RtsLayer::isCtorDtor(current->ThisFunction->GetName())) { // Not a destructor of a static object - its a function like main DEBUGPROFMSG("Thr " << RtsLayer::myNode() << " ProfileExit() : Reached top level function - dumping data" << endl;); // StoreData(tid); // static now. Don't need current. // The above Stop should call StoreData. We needn't do it again. } } #if defined(TAUKTAU) KtauProfiler::PutKtauProfiler(); #endif /* TAUKTAU */ current = CurrentProfiler[tid]; // Stop should set it } } #ifdef RENCI_STFF RenciSTFF::cleanup(); #endif // RENCI_STFF } ////////////////////////////////////////////////////////////////////// void Profiler::theFunctionList(const char ***inPtr, int *numOfFunctions, bool addName, const char * inString) { //static const char *const functionList[START_SIZE]; static int numberOfFunctions = 0; if(addName){ numberOfFunctions++; } else{ //We do not want to pass back internal pointers. *inPtr = ( char const **) malloc( sizeof(char *) * numberOfFunctions); for(int i=0;iGetName(); //Need the () in (*inPtr)[i] or the dereferrencing is } *numOfFunctions = numberOfFunctions; } } void Profiler::dumpFunctionNames() { char *filename, *dumpfile, *errormsg; char *dirname; FILE* fp; int numOfFunctions; const char ** functionList; Profiler::theFunctionList(&functionList, &numOfFunctions); if ((dirname = getenv("PROFILEDIR")) == NULL) { // Use default directory name . dirname = new char[8]; strcpy (dirname,"."); } //Create temp write to file. filename = new char[1024]; sprintf(filename,"%s/temp.%d.%d.%d",dirname, RtsLayer::myNode(), RtsLayer::myContext(), RtsLayer::myThread()); if ((fp = fopen (filename, "w+")) == NULL) { errormsg = new char[1024]; sprintf(errormsg,"Error: Could not create %s",filename); perror(errormsg); return; } //Write data, and close. fprintf(fp, "number of functions %d\n", numOfFunctions); for(int i =0;i::iterator eit; for (eit = TheEventDB().begin(); eit != TheEventDB().end(); eit++) { (*numUserEvents)++; } *inPtr = (char const **) malloc(sizeof(char*) * *numUserEvents); for(int i=0;i<*numUserEvents;i++) { (*inPtr)[i] = TheEventDB()[i]->GetEventName(); } } void Profiler::getUserEventValues(const char **inUserEvents, int numUserEvents, int **numEvents, double **max, double **min, double **mean, double **sumSqr, int tid) { TAU_PROFILE("TAU_GET_EVENT_VALUES()", " ", TAU_IO); #ifdef PROFILING_ON *numEvents = (int*) malloc (sizeof(int) * numUserEvents); *max = (double *) malloc (sizeof(double) * numUserEvents); *min = (double *) malloc (sizeof(double) * numUserEvents); *mean = (double *) malloc (sizeof(double) * numUserEvents); *sumSqr = (double *) malloc (sizeof(double) * numUserEvents); RtsLayer::LockDB(); int idx = 0; vector::iterator eit; for (eit = TheEventDB().begin(); eit != TheEventDB().end(); eit++) { for (int i=0;iGetEventName()) == 0)){ (*numEvents)[idx] = (*eit)->GetNumEvents(tid); (*max)[idx] = (*eit)->GetMax(tid); (*min)[idx] = (*eit)->GetMin(tid); (*mean)[idx] = (*eit)->GetMean(tid); (*sumSqr)[idx] = (*eit)->GetSumSqr(tid); idx++; break; } } } RtsLayer::UnLockDB(); #endif //PROFILING_ON } #ifndef TAU_MULTIPLE_COUNTERS void Profiler::theCounterList(const char ***inPtr, int *numOfCounters) { *inPtr = ( char const **) malloc( sizeof(char *) * 1); char *tmpChar = "default counter"; (*inPtr)[0] = tmpChar; //Need the () in (*inPtr)[j] or the dereferrencing is //screwed up! *numOfCounters = 1; } void Profiler::getFunctionValues(const char **inFuncs, int numOfFuncs, double ***counterExclusiveValues, double ***counterInclusiveValues, int **numOfCalls, int **numOfSubRoutines, const char ***counterNames, int *numOfCounters, int tid) { TAU_PROFILE("TAU_GET_FUNCTION_VALUES()", " ", TAU_IO); #ifdef PROFILING_ON vector::iterator it; bool functionCheck = false; int currentFuncPos = -1; const char *tmpFunctionName = NULL; int tmpNumberOfCounters; const char ** tmpCounterList; Profiler::theCounterList(&tmpCounterList, &tmpNumberOfCounters); *numOfCounters = tmpNumberOfCounters; *counterNames = tmpCounterList; //Allocate memory for the lists. *counterExclusiveValues = ( double **) malloc( sizeof(double *) * numOfFuncs); *counterInclusiveValues = ( double **) malloc( sizeof(double *) * numOfFuncs); for(int memAlloc=0;memAllocGetName(); for(int fc=0;fcGetAlreadyOnStack(tid)){ /* it is on the callstack. We need to do some processing. */ /* Calculate excltime, incltime */ Profiler *current; /* Traverse the Callstack */ current = CurrentProfiler[tid]; if (current == 0){ /* current is null */ DEBUGPROFMSG("Current is NULL when it should be on the stack! TID = " << tid << endl;); } else{ /* current is not null */ tmpDoubleExcl = (*it)->GetExclTime(tid); tmpDoubleIncl = (*it)->GetInclTime(tid); //Initialize what gets added for //reducing from the parent profile prevtime = 0; total = 0; while (current != 0){ /* Traverse the stack */ #ifdef TAU_CALLPATH if ((*it) == current->ThisFunction || (*it) == current->CallPathFunction) { #else if ((*it) == current->ThisFunction) { #endif /* Match! */ DEBUGPROFMSG("MATCH! Name :"<ThisFunction->GetName() <StartTime; tmpDoubleExcl += total - prevtime; /* prevtime is the inclusive time of the subroutine that should be subtracted from the current exclusive time */ /* If there is no instance of this function higher on the callstack, we should add the total to the inclusive time */ } prevtime = currenttime - current->StartTime; /* to calculate exclusive time */ current = current->ParentProfiler; } /* We've reached the top! */ tmpDoubleIncl += total;//add this to the inclusive time //prevtime and incltime are calculated } /* Current is not null */ } /* On call stack */ else{ /* it is not on the callstack. */ tmpDoubleExcl = (*it)->GetExclTime(tid); tmpDoubleIncl = (*it)->GetInclTime(tid); }// Not on the Callstack //Copy the data. (*numOfCalls)[currentFuncPos] = (*it)->GetCalls(tid); (*numOfSubRoutines)[currentFuncPos] = (*it)->GetSubrs(tid); (*counterInclusiveValues)[currentFuncPos][0] = tmpDoubleIncl; (*counterExclusiveValues)[currentFuncPos][0] = tmpDoubleExcl; } } RtsLayer::UnLockDB(); #endif //PROFILING_ON } int Profiler::dumpFunctionValues(const char **inFuncs, int numOfFuncs, bool increment, int tid, char *prefix){ TAU_PROFILE("GET_FUNC_VALS()", " ", TAU_IO); #ifdef PROFILING_ON vector::iterator it; vector::iterator eit; char *filename, *dumpfile, *errormsg, *header; char *dirname; FILE* fp; int numFunc = numOfFuncs; int numEvents; bool functionCheck = false; const char *tmpFunctionName = NULL; #endif //PROFILING_ON #ifdef PROFILE_CALLS list >::iterator iter; #endif // PROFILE_CALLS double excltime, incltime; double currenttime, prevtime, total; DEBUGPROFMSG("Profiler::DumpData( tid = "< // Recalculate number of funcs using ProfileGroup. Static objects // constructed before setting Profile Groups have entries in FuncDB // (TAU_DEFAULT) even if they are not supposed to be there. /* numFunc = 0; for (it = TheFunctionDB().begin(); it != TheFunctionDB().end(); it++) { if ((*it)->GetProfileGroup() & RtsLayer::TheProfileMask()) { numFunc++; } } */ //numFunc = TheFunctionDB().size(); header = new char[256]; sprintf(header,"%d %s\n", numFunc, TauGetCounterString()); // Send out the format string strcat(header,"# Name Calls Subrs Excl Incl "); #ifdef PROFILE_STATS strcat(header,"SumExclSqr "); #endif //PROFILE_STATS strcat(header,"ProfileCalls"); int sz = strlen(header); int ret = fprintf(fp, "%s",header); fprintf(fp, " # "); Tau_writeProfileMetaData(fp); fprintf(fp, "\n"); ret = fflush(fp); /* if (ret != sz) { cout <<"ret not equal to strlen "<GetProfileGroup() & RtsLayer::TheProfileMask()) { */ //Check to see that it is one of the requested functions. functionCheck = false; tmpFunctionName = (*it)->GetName(); for(int fc=0;fcGetAlreadyOnStack(tid)) { /* it is on the callstack. We need to do some processing. */ /* Calculate excltime, incltime */ Profiler *current; /* Traverse the Callstack */ current = CurrentProfiler[tid]; if (current == 0){ /* current is null */ DEBUGPROFMSG("Current is NULL when it should be on the stack! TID = " << tid << endl;); } else{ /* current is not null */ incltime = (*it)->GetInclTime(tid); excltime = (*it)->GetExclTime(tid); total = 0; /* Initialize what gets added */ prevtime = 0; /* for reducing from the parent profiler */ while (current != 0){ /* Traverse the stack */ #ifdef TAU_CALLPATH if ((*it) == current->ThisFunction || (*it) == current->CallPathFunction) { #else if ((*it) == current->ThisFunction) { #endif /* Match! */ DEBUGPROFMSG("MATCH! Name :"<ThisFunction->GetName() <StartTime; excltime += total - prevtime; /* prevtime is the inclusive time of the subroutine that should be subtracted from the current exclusive time */ /* If there is no instance of this function higher on the callstack, we should add the total to the inclusive time */ } prevtime = currenttime - current->StartTime; /* to calculate exclusive time */ current = current->ParentProfiler; } /* We've reached the top! */ incltime += total; /* add this to the inclusive time */ /* prevtime and incltime are calculated */ } /* Current is not null */ } /* On call stack */ else{ /* it is not on the callstack. */ excltime = (*it)->GetExclTime(tid); incltime = (*it)->GetInclTime(tid); } // Not on the Callstack DEBUGPROFMSG("Node: "<< RtsLayer::myNode() << " Dumping " << (*it)->GetName()<< " " << (*it)->GetType() << " Calls : " << (*it)->GetCalls(tid) << " Subrs : "<< (*it)->GetSubrs(tid) << " Excl : " << excltime << " Incl : " << incltime << endl;); fprintf(fp,"\"%s %s\" %ld %ld %.16G %.16G ", (*it)->GetName(), (*it)->GetType(), (*it)->GetCalls(tid), (*it)->GetSubrs(tid), excltime, incltime); fprintf(fp,"0 "); // Indicating - profile calls is turned off fprintf(fp,"GROUP=\"%s\" \n", (*it)->GetAllGroups()); /* } // ProfileGroup test */ } } // for loop. End of FunctionInfo data fprintf(fp,"0 aggregates\n"); // For now there are no aggregates // Change this when aggregate profiling in introduced in Pooma // Print UserEvent Data if any numEvents = 0; for (eit = TheEventDB().begin(); eit != TheEventDB().end(); eit++) { if ((*eit)->GetNumEvents(tid)) { numEvents++; } } if (numEvents > 0) { // Data format // # % userevents // # name numsamples max min mean sumsqr fprintf(fp, "%d userevents\n", numEvents); fprintf(fp, "# eventname numevents max min mean sumsqr\n"); vector::iterator it; for(it = TheEventDB().begin(); it != TheEventDB().end(); it++) { if ((*it)->GetNumEvents(tid)) { DEBUGPROFMSG("Thr "<< tid << " TauUserEvent "<< (*it)->GetEventName() << "\n Min " << (*it)->GetMin(tid) << "\n Max " << (*it)->GetMax(tid) << "\n Mean " << (*it)->GetMean(tid) << "\n SumSqr " << (*it)->GetSumSqr(tid) << "\n NumEvents " << (*it)->GetNumEvents(tid)<< endl;); fprintf(fp, "\"%s\" %ld %.16G %.16G %.16G %.16G\n", (*it)->GetEventName(), (*it)->GetNumEvents(tid), (*it)->GetMax(tid), (*it)->GetMin(tid), (*it)->GetMean(tid), (*it)->GetSumSqr(tid)); } } } // End of userevents data RtsLayer::UnLockDB(); fclose(fp); dumpfile = new char[1024]; if(increment){ //Place the date and time to the dumpfile name: time_t theTime = time(NULL); char *stringTime = ctime(&theTime); tm *structTime = localtime(&theTime); char *day = strtok(stringTime," "); char *month = strtok(NULL," "); char *dayInt = strtok(NULL," "); char *time = strtok(NULL," "); char *year = strtok(NULL," "); //Get rid of the mewline. year[4] = '\0'; char *newStringTime = new char[1024]; sprintf(newStringTime,"%s-%s-%s-%s-%s",day,month,dayInt,time,year); sprintf(dumpfile,"%s/sel_%s__%s__.%d.%d.%d",dirname, prefix, newStringTime, RtsLayer::myNode(), RtsLayer::myContext(), tid); rename(filename, dumpfile); } else{ sprintf(dumpfile,"%s/%s.%d.%d.%d",dirname, prefix, RtsLayer::myNode(), RtsLayer::myContext(), tid); rename(filename, dumpfile); } #endif //PROFILING_ON return 1; } // This is ::StoreData for only a single metric int Profiler::StoreData(int tid) { #ifdef PROFILING_ON vector::iterator it; vector::iterator eit; char *filename, *errormsg, *header; char *dirname; FILE* fp; int numFunc, numEvents; #endif //PROFILING_ON #ifdef PROFILE_CALLS long listSize, numCalls; list >::iterator iter; #endif // PROFILE_CALLS #ifdef TAUKTAU KtauProfiler* CurrentKtauProfiler = KtauProfiler::GetKtauProfiler(tid); #endif /* TAUKTAU */ DEBUGPROFMSG("Profiler::StoreData( tid = "< // Recalculate number of funcs using ProfileGroup. Static objects // constructed before setting Profile Groups have entries in FuncDB // (TAU_DEFAULT) even if they are not supposed to be there. /* numFunc = 0; for (it = TheFunctionDB().begin(); it != TheFunctionDB().end(); it++) { if ((*it)->GetProfileGroup() & RtsLayer::TheProfileMask()) { numFunc++; } } */ numFunc = TheFunctionDB().size(); header = new char[256]; #if defined(TAUKTAU_MERGE) char* ktau_header = NULL; ktau_header = new char[256]; sprintf(ktau_header,"%d %s\n", (numFunc * 11)+(CurrentKtauProfiler->KernProf.GetNumKProfileFunc()+10), TauGetCounterString()); #endif /*TAUKTAU_MERGE*/ sprintf(header,"%d %s\n", numFunc, TauGetCounterString()); // Send out the format string strcat(header,"# Name Calls Subrs Excl Incl "); #if defined(TAUKTAU_MERGE) // Send out the format string strcat(ktau_header,"# Name Calls Subrs Excl Incl "); #endif /* TAUKTAU_MERGE */ #ifdef PROFILE_STATS strcat(header,"SumExclSqr "); #endif //PROFILE_STATS strcat(header,"ProfileCalls"); int sz = strlen(header); int ret = fprintf(fp, "%s",header); fprintf(fp, " # "); Tau_writeProfileMetaData(fp); fprintf(fp, "\n"); ret = fflush(fp); #if defined(TAUKTAU_MERGE) strcat(ktau_header,"ProfileCalls"); int ktau_sz = strlen(ktau_header); int ktau_ret = fprintf(ktau_fp, "%s",ktau_header); fprintf(ktau_fp, " # "); Tau_writeProfileMetaData(ktau_fp); fprintf(ktau_fp, "\n"); ktau_ret = fflush(ktau_fp); bool top = 1; #endif /* TAUKTAU_MERGE */ /* if (ret != sz) { cout <<"ret not equal to strlen "<GetProfileGroup() & RtsLayer::TheProfileMask()) { */ DEBUGPROFMSG("Node: "<< RtsLayer::myNode() << " Dumping " << (*it)->GetName()<< " " << (*it)->GetType() << " Calls : " << (*it)->GetCalls(tid) << " Subrs : "<< (*it)->GetSubrs(tid) << " Excl : " << (*it)->GetExclTime(tid) << " Incl : " << (*it)->GetInclTime(tid) << endl;); fprintf(fp,"\"%s %s\" %ld %ld %.16G %.16G ", (*it)->GetName(), (*it)->GetType(), (*it)->GetCalls(tid), (*it)->GetSubrs(tid), (*it)->GetExclTime(tid), (*it)->GetInclTime(tid)); #ifdef PROFILE_STATS fprintf(fp,"%.16G ", (*it)->GetSumExclSqr(tid)); #endif //PROFILE_STATS #ifdef PROFILE_CALLS listSize = (long) (*it)->ExclInclCallList->size(); numCalls = (*it)->GetCalls(tid); // Sanity check if (listSize != numCalls) { fprintf(fp,"0 \n"); // don't write any invocation data DEBUGPROFMSG("Error *** list (profileCalls) size mismatch size " << listSize << " numCalls " << numCalls << endl;); } else { // List is maintained correctly fprintf(fp,"%ld \n", listSize); // no of records to follow for (iter = (*it)->ExclInclCallList->begin(); iter != (*it)->ExclInclCallList->end(); iter++) { DEBUGPROFMSG("Node: " << RtsLayer::myNode() <<" Name " << (*it)->GetName() << " " << (*it)->GetType() << " ExclThisCall : "<< (*iter).first <<" InclThisCall : " << (*iter).second << endl; ); fprintf(fp,"%G %G\n", (*iter).first , (*iter).second); } } // sanity check #else // PROFILE_CALLS fprintf(fp,"0 "); // Indicating - profile calls is turned off fprintf(fp,"GROUP=\"%s\" \n", (*it)->GetAllGroups()); #endif // PROFILE_CALLS #ifdef TAUKTAU_MERGE KtauFuncInfo* pKFunc = (*it)->GetKtauFuncInfo(tid); if(pKFunc) { if(top) { top = 0; double dZERO = 0; long lZERO = 0; for(int i=0; iGetName(), (*it)->GetType(), (*it)->GetCalls(tid), (*it)->GetSubrs(tid), (*it)->GetExclTime(tid) - (pKFunc->GetExclTicks(0)/KTauGetMHz()), (*it)->GetInclTime(tid)); fprintf(ktau_fp,"0 "); // Indicating - profile calls is turned off fprintf(ktau_fp,"GROUP=\"%s\" ", (*it)->GetAllGroups()); fprintf(ktau_fp,"%.16G \n", pKFunc->GetExclTicks(0)/KTauGetMHz()); double dZERO = 0; long lZERO = 0; for(int i=0; iGetAllGroups()); grp_string += " | KERNEL_GROUPS | TAU_KERNEL_MERGE | "; grp_string += (*it)->GetName(); fprintf(ktau_fp,"\"%s %s => %s\" %ld %ld %.16G %.16G ", (*it)->GetName(), (*it)->GetType() ,merge_grp_name[i], (long)pKFunc->GetExclCalls(i), lZERO, pKFunc->GetExclKExcl(i)/KTauGetMHz(), pKFunc->GetExclTicks(i)/KTauGetMHz()); fprintf(ktau_fp,"0 "); // Indicating - profile calls is turned off fprintf(ktau_fp,"GROUP=\"%s\" \n", grp_string.c_str());//(*it)->GetAllGroups()); } } #endif /* TAUKTAU_MERGE */ /* } // ProfileGroup test */ } // for loop. End of FunctionInfo data #if defined(TAUKTAU_MERGE) /*Merging templated_function*/ CurrentKtauProfiler->KernProf.MergingKProfileFunc(ktau_fp); #endif /*TAUKTAU_MERGE*/ fprintf(fp,"0 aggregates\n"); // For now there are no aggregates #if defined(TAUKTAU_MERGE) /*Merging aggregates*/ fprintf(ktau_fp,"0 aggregates\n"); // For now there are no aggregates #endif /*TAUKTAU_MERGE*/ RtsLayer::UnLockDB(); // Change this when aggregate profiling in introduced in Pooma // Print UserEvent Data if any numEvents = 0; for (eit = TheEventDB().begin(); eit != TheEventDB().end(); eit++) { if ((*eit)->GetNumEvents(tid)) { numEvents++; } } if (numEvents > 0) { // Data format // # % userevents // # name numsamples max min mean sumsqr #if defined(TAUKTAU_MERGE) fprintf(ktau_fp, "%d userevents\n", numEvents+(CurrentKtauProfiler->KernProf.GetNumKProfileEvent())); fprintf(ktau_fp, "# eventname numevents max min mean sumsqr\n"); #endif /*TAUKTAU_MERGE*/ fprintf(fp, "%d userevents\n", numEvents); fprintf(fp, "# eventname numevents max min mean sumsqr\n"); vector::iterator it; for(it = TheEventDB().begin(); it != TheEventDB().end(); it++) { if ((*it)->GetNumEvents(tid)) { DEBUGPROFMSG("Thr "<< tid << " TauUserEvent "<< (*it)->GetEventName() << "\n Min " << (*it)->GetMin(tid) << "\n Max " << (*it)->GetMax(tid) << "\n Mean " << (*it)->GetMean(tid) << "\n SumSqr " << (*it)->GetSumSqr(tid) << "\n NumEvents " << (*it)->GetNumEvents(tid)<< endl;); fprintf(fp, "\"%s\" %ld %.16G %.16G %.16G %.16G\n", (*it)->GetEventName(), (*it)->GetNumEvents(tid), (*it)->GetMax(tid), (*it)->GetMin(tid), (*it)->GetMean(tid), (*it)->GetSumSqr(tid)); #if defined(TAUKTAU_MERGE) fprintf(ktau_fp, "\"%s\" %ld %.16G %.16G %.16G %.16G\n", (*it)->GetEventName(), (*it)->GetNumEvents(tid), (*it)->GetMax(tid), (*it)->GetMin(tid), (*it)->GetMean(tid), (*it)->GetSumSqr(tid)); #endif /*TAUKTAU_MERGE*/ } } #if defined(TAUKTAU_MERGE) /*Merging events*/ CurrentKtauProfiler->KernProf.MergingKProfileEvent(ktau_fp); #endif /*TAUKTAU_MERGE*/ } // End of userevents data fclose(fp); #if defined(TAUKTAU_MERGE) KtauProfiler::CloseOutStream(ktau_fp); #endif /*TAUKTAU_MERGE*/ #ifdef TAUKTAU KtauProfiler::PutKtauProfiler(tid); CurrentKtauProfiler = NULL; #endif /* TAUKTAU */ #endif //PROFILING_ON return 1; } // This is ::DumpData for only a single metric int Profiler::DumpData(bool increment, int tid, char *prefix) { TAU_PROFILE("TAU_DUMP_DB()", " ", TAU_IO); #ifdef PROFILING_ON vector::iterator it; vector::iterator eit; char *filename, *dumpfile, *errormsg, *header; char *dirname; FILE* fp; int numFunc, numEvents; #endif //PROFILING_ON #ifdef PROFILE_CALLS list >::iterator iter; #endif // PROFILE_CALLS double excltime, incltime; double currenttime, prevtime, total; DEBUGPROFMSG("Profiler::DumpData( tid = "< // Recalculate number of funcs using ProfileGroup. Static objects // constructed before setting Profile Groups have entries in FuncDB // (TAU_DEFAULT) even if they are not supposed to be there. /* numFunc = 0; for (it = TheFunctionDB().begin(); it != TheFunctionDB().end(); it++) { if ((*it)->GetProfileGroup() & RtsLayer::TheProfileMask()) { numFunc++; } } */ numFunc = TheFunctionDB().size(); header = new char[256]; sprintf(header,"%d %s\n", numFunc, TauGetCounterString()); // Send out the format string strcat(header,"# Name Calls Subrs Excl Incl "); #ifdef PROFILE_STATS strcat(header,"SumExclSqr "); #endif //PROFILE_STATS strcat(header,"ProfileCalls"); int sz = strlen(header); int ret = fprintf(fp, "%s",header); fprintf(fp, " # "); Tau_writeProfileMetaData(fp); fprintf(fp, "\n"); ret = fflush(fp); /* if (ret != sz) { cout <<"ret not equal to strlen "<GetProfileGroup() & RtsLayer::TheProfileMask()) { */ if ((*it)->GetAlreadyOnStack(tid)) { /* it is on the callstack. We need to do some processing. */ /* Calculate excltime, incltime */ Profiler *current; /* Traverse the Callstack */ current = CurrentProfiler[tid]; if (current == 0) { /* current is null */ DEBUGPROFMSG("Current is NULL when it should be on the stack! TID = " << tid << endl;); } else { /* current is not null */ incltime = (*it)->GetInclTime(tid); excltime = (*it)->GetExclTime(tid); total = 0; /* Initialize what gets added */ prevtime = 0; /* for reducing from the parent profiler */ while (current != 0) { /* Traverse the stack */ #ifdef TAU_CALLPATH if ((*it) == current->ThisFunction || (*it) == current->CallPathFunction) { #else if ((*it) == current->ThisFunction) { #endif /* Match! */ DEBUGPROFMSG("MATCH! Name :"<ThisFunction->GetName() << endl;); total = currenttime - current->StartTime; excltime += total - prevtime; /* prevtime is the inclusive time of the subroutine that should be subtracted from the current exclusive time */ /* If there is no instance of this function higher on the callstack, we should add the total to the inclusive time */ } prevtime = currenttime - current->StartTime; /* to calculate exclusive time */ current = current->ParentProfiler; } /* We've reached the top! */ incltime += total; /* add this to the inclusive time */ /* prevtime and incltime are calculated */ } /* Current is not null */ } /* On call stack */ else { /* it is not on the callstack. */ excltime = (*it)->GetExclTime(tid); incltime = (*it)->GetInclTime(tid); } // Not on the Callstack DEBUGPROFMSG("Node: "<< RtsLayer::myNode() << " Dumping " << (*it)->GetName()<< " " << (*it)->GetType() << " Calls : " << (*it)->GetCalls(tid) << " Subrs : "<< (*it)->GetSubrs(tid) << " Excl : " << excltime << " Incl : " << incltime << endl;); fprintf(fp,"\"%s %s\" %ld %ld %.16G %.16G ", (*it)->GetName(), (*it)->GetType(), (*it)->GetCalls(tid), (*it)->GetSubrs(tid), excltime, incltime); fprintf(fp,"0 "); // Indicating - profile calls is turned off fprintf(fp,"GROUP=\"%s\" \n", (*it)->GetAllGroups()); /* } // ProfileGroup test */ } // for loop. End of FunctionInfo data fprintf(fp,"0 aggregates\n"); // For now there are no aggregates // Change this when aggregate profiling in introduced in Pooma // Print UserEvent Data if any numEvents = 0; for (eit = TheEventDB().begin(); eit != TheEventDB().end(); eit++) { if ((*eit)->GetNumEvents(tid)) { numEvents++; } } if (numEvents > 0) { // Data format // # % userevents // # name numsamples max min mean sumsqr fprintf(fp, "%d userevents\n", numEvents); fprintf(fp, "# eventname numevents max min mean sumsqr\n"); vector::iterator it; for(it = TheEventDB().begin(); it != TheEventDB().end(); it++) { if ((*it)->GetNumEvents(tid)) { DEBUGPROFMSG("Thr "<< tid << " TauUserEvent "<< (*it)->GetEventName() << "\n Min " << (*it)->GetMin(tid) << "\n Max " << (*it)->GetMax(tid) << "\n Mean " << (*it)->GetMean(tid) << "\n SumSqr " << (*it)->GetSumSqr(tid) << "\n NumEvents " << (*it)->GetNumEvents(tid)<< endl;); fprintf(fp, "\"%s\" %ld %.16G %.16G %.16G %.16G\n", (*it)->GetEventName(), (*it)->GetNumEvents(tid), (*it)->GetMax(tid), (*it)->GetMin(tid), (*it)->GetMean(tid), (*it)->GetSumSqr(tid)); } } } // End of userevents data RtsLayer::UnLockDB(); fclose(fp); dumpfile = new char[1024]; if(increment){ //Place the date and time to the dumpfile name: time_t theTime = time(NULL); char *stringTime = ctime(&theTime); tm *structTime = localtime(&theTime); char *day = strtok(stringTime," "); char *month = strtok(NULL," "); char *dayInt = strtok(NULL," "); char *time = strtok(NULL," "); char *year = strtok(NULL," "); //Get rid of the mewline. year[4] = '\0'; char *newStringTime = new char[1024]; sprintf(newStringTime,"%s-%s-%s-%s-%s",day,month,dayInt,time,year); sprintf(dumpfile,"%s/%s__%s__.%d.%d.%d",dirname, prefix, newStringTime, RtsLayer::myNode(), RtsLayer::myContext(), tid); rename(filename, dumpfile); } else{ sprintf(dumpfile,"%s/%s.%d.%d.%d",dirname, prefix, RtsLayer::myNode(), RtsLayer::myContext(), tid); rename(filename, dumpfile); } #endif //PROFILING_ON return 1; } void Profiler::PurgeData(int tid) { vector::iterator it; vector::iterator eit; Profiler *curr; DEBUGPROFMSG("Profiler::PurgeData( tid = "<SetCalls(tid,0); (*it)->SetSubrs(tid,0); (*it)->SetExclTime(tid,0); (*it)->SetInclTime(tid,0); #ifdef PROFILE_STATS (*it)->SetSumExclSqr(tid,0); #endif //PROFILE_STATS #ifdef PROFILE_CALLS (*it)->ExclInclCallList->clear(); #endif // PROFILE_CALLS /* } */ } // Now Re-register callstack entries curr = CurrentProfiler[tid]; curr->ThisFunction->IncrNumCalls(tid); curr = curr->ParentProfiler; while(curr != 0) { curr->ThisFunction->IncrNumCalls(tid); curr->ThisFunction->IncrNumSubrs(tid); curr = curr->ParentProfiler; } // Reset the Event Database for (eit = TheEventDB().begin(); eit != TheEventDB().end(); eit++) { (*eit)->LastValueRecorded[tid] = 0; (*eit)->NumEvents[tid] = 0L; (*eit)->MinValue[tid] = 9999999; (*eit)->MaxValue[tid] = -9999999; (*eit)->SumSqrValue[tid] = 0; (*eit)->SumValue[tid] = 0; } RtsLayer::UnLockDB(); } ////////////////////////////////////////////////////////////////////// #else //TAU_MULTIPLE_COUNTERS bool Profiler::createDirectories(){ char *dirname; static bool flag = true; RtsLayer::LockDB(); if (flag) { for(int i=0;i::iterator it; bool functionCheck = false; int currentFuncPos = -1; const char *tmpFunctionName = NULL; bool memAllocated = false; //Used to help with memory cleanup. int tmpNumberOfCounters; bool * tmpCounterUsedList; const char ** tmpCounterList; MultipleCounterLayer::theCounterListInternal(&tmpCounterList, &tmpNumberOfCounters, &tmpCounterUsedList); *numOfCounters = tmpNumberOfCounters; *counterNames = tmpCounterList; //Allocate memory for the lists. *counterExclusiveValues = ( double **) malloc( sizeof(double *) * numOfFuncs); *counterInclusiveValues = ( double **) malloc( sizeof(double *) * numOfFuncs); for(int memAlloc=0;memAllocGetName(); for(int fc=0;fcGetAlreadyOnStack(tid)){ /* it is on the callstack. We need to do some processing. */ /* Calculate excltime, incltime */ Profiler *current; /* Traverse the Callstack */ current = CurrentProfiler[tid]; if (current == 0){ /* current is null */ DEBUGPROFMSG("Current is NULL when it should be on the stack! TID = " << tid << endl;); } else{ /* current is not null */ //These calls return pointers to new memory. //Remember to free this memory after use!!! tmpDoubleExcl = (*it)->GetExclTime(tid); tmpDoubleIncl = (*it)->GetInclTime(tid); memAllocated = true; //Initialize what gets added for //reducing from the parent profile for(int j=0;jThisFunction || (*it) == current->CallPathFunction) { #else if ((*it) == current->ThisFunction) { #endif /* Match! */ DEBUGPROFMSG("MATCH! Name :"<ThisFunction->GetName() <StartTime[k]; tmpDoubleExcl[k] += total[k] - prevtime[k]; } /* prevtime is the inclusive time of the subroutine that should be subtracted from the current exclusive time */ /* If there is no instance of this function higher on the callstack, we should add the total to the inclusive time */ } for(int l=0;lStartTime[l]; } /* to calculate exclusive time */ current = current->ParentProfiler; } /* We've reached the top! */ for(int m=0;mGetExclTime(tid); tmpDoubleIncl = (*it)->GetInclTime(tid); memAllocated = true; }// Not on the Callstack //Copy the data. (*numOfCalls)[currentFuncPos] = (*it)->GetCalls(tid); (*numOfSubRoutines)[currentFuncPos] = (*it)->GetSubrs(tid); int posCounter = 0; if(memAllocated){ for(int copyData=0;copyData::iterator it; vector::iterator eit; bool functionCheck = false; const char *tmpFunctionName = NULL; FILE* fp; char *dirname, *dumpfile; int numFunc = numOfFuncs; int numEvents; bool memAllocated = false; //Used to help with memory cleanup. double * tmpDoubleExcl; double * tmpDoubleIncl; double currenttime[MAX_TAU_COUNTERS]; double prevtime[MAX_TAU_COUNTERS]; double total[MAX_TAU_COUNTERS]; for(int a=0;a // Recalculate number of funcs using ProfileGroup. Static objects // constructed before setting Profile Groups have entries in FuncDB // (TAU_DEFAULT) even if they are not supposed to be there. /* numFunc = 0; for (it = TheFunctionDB().begin(); it != TheFunctionDB().end(); it++) { if ((*it)->GetProfileGroup() & RtsLayer::TheProfileMask()) { numFunc++; } } */ //numFunc = TheFunctionDB().size(); //Setting the header to the correct name. sprintf(header,"%d templated_functions_MULTI_%s\n", numFunc, tmpChar); strcat(header,"# Name Calls Subrs Excl Incl "); strcat(header,"ProfileCalls"); int sz = strlen(header); int ret = fprintf(fp, "%s",header); fprintf(fp, " # "); Tau_writeProfileMetaData(fp); fprintf(fp, "\n"); ret = fflush(fp); for (it = TheFunctionDB().begin(); it != TheFunctionDB().end(); it++){ //Check to see that it is one of the requested functions. functionCheck = false; tmpFunctionName = (*it)->GetName(); for(int fc=0;fcGetAlreadyOnStack(tid)){ /* it is on the callstack. We need to do some processing. */ /* Calculate excltime, incltime */ Profiler *current; /* Traverse the Callstack */ current = CurrentProfiler[tid]; if (current == 0){ /* current is null */ DEBUGPROFMSG("Current is NULL when it should be on the stack! TID = " << tid << endl;); } else{ /* current is not null */ //These calls return pointers to new memory. //Remember to free this memory after use!!! tmpDoubleExcl = (*it)->GetExclTime(tid); tmpDoubleIncl = (*it)->GetInclTime(tid); memAllocated = true; //Initialize what gets added for //reducing from the parent profile for(int j=0;jThisFunction || (*it) == current->CallPathFunction) { #else if ((*it) == current->ThisFunction) { #endif /* Match! */ DEBUGPROFMSG("MATCH! Name :"<ThisFunction->GetName() <StartTime[k]; tmpDoubleExcl[k] += total[k] - prevtime[k]; } /* prevtime is the inclusive time of the subroutine that should be subtracted from the current exclusive time */ /* If there is no instance of this function higher on the callstack, we should add the total to the inclusive time */ } for(int l=0;lStartTime[l]; } /* to calculate exclusive time */ current = current->ParentProfiler; } /* We've reached the top! */ for(int m=0;mGetExclTime(tid); tmpDoubleIncl = (*it)->GetInclTime(tid); memAllocated = true; } // Not on the Callstack if(memAllocated){ DEBUGPROFMSG("Node: "<< RtsLayer::myNode() << " Dumping " << (*it)->GetName()<< " " << (*it)->GetType() << " Calls : " << (*it)->GetCalls(tid) << " Subrs : "<< (*it)->GetSubrs(tid) << " Excl : " << tmpDoubleExcl[i] << " Incl : " << tmpDoubleIncl[i] << endl;); fprintf(fp,"\"%s %s\" %ld %ld %.16G %.16G ", (*it)->GetName(), (*it)->GetType(), (*it)->GetCalls(tid), (*it)->GetSubrs(tid), tmpDoubleExcl[i], tmpDoubleIncl[i]); } else{ DEBUGPROFMSG("Node: "<< RtsLayer::myNode() << " Dumping " << (*it)->GetName()<< " " << (*it)->GetType() << " Calls : " << (*it)->GetCalls(tid) << " Subrs : "<< (*it)->GetSubrs(tid) << " Excl : " << 0 << " Incl : " << 0 << endl;); fprintf(fp,"\"%s %s\" %ld %ld 0 0 ", (*it)->GetName(), (*it)->GetType(), (*it)->GetCalls(tid), (*it)->GetSubrs(tid)); } fprintf(fp,"0 "); // Indicating - profile calls is turned off fprintf(fp,"GROUP=\"%s\" \n", (*it)->GetAllGroups()); //Free up the memory if it was allocated. if(memAllocated){ free(tmpDoubleIncl); free(tmpDoubleExcl); } } } fprintf(fp,"0 aggregates\n"); // For now there are no aggregates numEvents = 0; for (eit = TheEventDB().begin(); eit != TheEventDB().end(); eit++) { if ((*eit)->GetNumEvents(tid)) { numEvents++; } } if (numEvents > 0) { // Data format // # % userevents // # name numsamples max min mean sumsqr fprintf(fp, "%d userevents\n", numEvents); fprintf(fp, "# eventname numevents max min mean sumsqr\n"); vector::iterator it; for(it = TheEventDB().begin(); it != TheEventDB().end(); it++){ if ((*it)->GetNumEvents(tid)) { DEBUGPROFMSG("Thr "<< tid << " TauUserEvent "<< (*it)->GetEventName() << "\n Min " << (*it)->GetMin(tid) << "\n Max " << (*it)->GetMax(tid) << "\n Mean " << (*it)->GetMean(tid) << "\n SumSqr " << (*it)->GetSumSqr(tid) << "\n NumEvents " << (*it)->GetNumEvents(tid)<< endl;); fprintf(fp, "\"%s\" %ld %.16G %.16G %.16G %.16G\n", (*it)->GetEventName(), (*it)->GetNumEvents(tid), (*it)->GetMax(tid), (*it)->GetMin(tid), (*it)->GetMean(tid), (*it)->GetSumSqr(tid)); } } } // End of userevents data RtsLayer::UnLockDB(); fclose(fp); dumpfile = new char[1024]; if(increment){ //Place the date and time to the dumpfile name: time_t theTime = time(NULL); char *stringTime = ctime(&theTime); tm *structTime = localtime(&theTime); char *day = strtok(stringTime," "); char *month = strtok(NULL," "); char *dayInt = strtok(NULL," "); char *time = strtok(NULL," "); char *year = strtok(NULL," "); //Get rid of the mewline. year[4] = '\0'; char *newStringTime = new char[1024]; sprintf(newStringTime,"%s-%s-%s-%s-%s",day,month,dayInt,time,year); sprintf(dumpfile,"%s/sel_%s__%s__.%d.%d.%d",newdirname, prefix, newStringTime, RtsLayer::myNode(), RtsLayer::myContext(), tid); rename(filename, dumpfile); } else{ sprintf(dumpfile,"%s/sel_%s.%d.%d.%d",newdirname, prefix, RtsLayer::myNode(), RtsLayer::myContext(), tid); rename(filename, dumpfile); } } } #endif //PROFILING_ON return 1; } // This is ::StoreData for multiple metrics int Profiler::StoreData(int tid){ #ifdef PROFILING_ON vector::iterator it; vector::iterator eit; FILE* fp; char *dirname; int numFunc, numEvents; double * tmpDoubleExcl; double * tmpDoubleIncl; #endif //PROFILING_ON DEBUGPROFMSG("Profiler::StoreData( tid = "< numFunc = TheFunctionDB().size(); //Setting the header to the correct name. sprintf(header,"%d templated_functions_MULTI_%s\n", numFunc, tmpChar); strcat(header,"# Name Calls Subrs Excl Incl "); strcat(header,"ProfileCalls"); int sz = strlen(header); int ret = fprintf(fp, "%s",header); fprintf(fp, " # "); Tau_writeProfileMetaData(fp); fprintf(fp, "\n"); ret = fflush(fp); for (it = TheFunctionDB().begin(); it != TheFunctionDB().end(); it++) { //These calls return pointers to new memory. //Remember to free this memory after use!!! tmpDoubleExcl = (*it)->GetExclTime(tid); tmpDoubleIncl = (*it)->GetInclTime(tid); DEBUGPROFMSG("Node: "<< RtsLayer::myNode() << " Dumping " << (*it)->GetName()<< " " << (*it)->GetType() << " Calls : " << (*it)->GetCalls(tid) << " Subrs : "<< (*it)->GetSubrs(tid) << " Excl : " << tmpDoubleExcl[i] << " Incl : " << tmpDoubleIncl[i] << endl;); fprintf(fp,"\"%s %s\" %ld %ld %.16G %.16G ", (*it)->GetName(), (*it)->GetType(), (*it)->GetCalls(tid), (*it)->GetSubrs(tid), tmpDoubleExcl[i], tmpDoubleIncl[i]); fprintf(fp,"0 "); // Indicating - profile calls is turned off fprintf(fp,"GROUP=\"%s\" \n", (*it)->GetAllGroups()); //Free up the memory. free(tmpDoubleIncl); free(tmpDoubleExcl); } fprintf(fp,"0 aggregates\n"); // For now there are no aggregates RtsLayer::UnLockDB(); numEvents = 0; for (eit = TheEventDB().begin(); eit != TheEventDB().end(); eit++) { if ((*eit)->GetNumEvents(tid)) { numEvents++; } } if (numEvents > 0) { // Data format // # % userevents // # name numsamples max min mean sumsqr fprintf(fp, "%d userevents\n", numEvents); fprintf(fp, "# eventname numevents max min mean sumsqr\n"); vector::iterator it; for(it = TheEventDB().begin(); it != TheEventDB().end(); it++){ if ((*it)->GetNumEvents(tid)) { DEBUGPROFMSG("Thr "<< tid << " TauUserEvent "<< (*it)->GetEventName() << "\n Min " << (*it)->GetMin(tid) << "\n Max " << (*it)->GetMax(tid) << "\n Mean " << (*it)->GetMean(tid) << "\n SumSqr " << (*it)->GetSumSqr(tid) << "\n NumEvents " << (*it)->GetNumEvents(tid)<< endl;); fprintf(fp, "\"%s\" %ld %.16G %.16G %.16G %.16G\n", (*it)->GetEventName(), (*it)->GetNumEvents(tid), (*it)->GetMax(tid), (*it)->GetMin(tid), (*it)->GetMean(tid), (*it)->GetSumSqr(tid)); } } } // End of userevents data fclose(fp); } } #endif //PROFILING_ON return 1; } // This is ::DumpData for multiple metrics int Profiler::DumpData(bool increment, int tid, char *prefix){ TAU_PROFILE("TAU_DB_DUMP()", " ", TAU_IO); #ifdef PROFILING_ON vector::iterator it; vector::iterator eit; FILE* fp; char *dirname, *dumpfile; int numFunc, numEvents; bool memAllocated = false; //Used to help with memory cleanup. double * tmpDoubleExcl; double * tmpDoubleIncl; double currenttime[MAX_TAU_COUNTERS]; double prevtime[MAX_TAU_COUNTERS]; double total[MAX_TAU_COUNTERS]; for(int a=0;a // Recalculate number of funcs using ProfileGroup. Static objects // constructed before setting Profile Groups have entries in FuncDB // (TAU_DEFAULT) even if they are not supposed to be there. /* numFunc = 0; for (it = TheFunctionDB().begin(); it != TheFunctionDB().end(); it++) { if ((*it)->GetProfileGroup() & RtsLayer::TheProfileMask()) { numFunc++; } } */ numFunc = TheFunctionDB().size(); //Setting the header to the correct name. sprintf(header,"%d templated_functions_MULTI_%s\n", numFunc, tmpChar); strcat(header,"# Name Calls Subrs Excl Incl "); strcat(header,"ProfileCalls"); int sz = strlen(header); int ret = fprintf(fp, "%s",header); fprintf(fp, " # "); Tau_writeProfileMetaData(fp); fprintf(fp, "\n"); ret = fflush(fp); for (it = TheFunctionDB().begin(); it != TheFunctionDB().end(); it++){ if ((*it)->GetAlreadyOnStack(tid)){ /* it is on the callstack. We need to do some processing. */ /* Calculate excltime, incltime */ Profiler *current; /* Traverse the Callstack */ current = CurrentProfiler[tid]; if (current == 0){ /* current is null */ DEBUGPROFMSG("Current is NULL when it should be on the stack! TID = " << tid << endl;); } else{ /* current is not null */ //These calls return pointers to new memory. //Remember to free this memory after use!!! tmpDoubleExcl = (*it)->GetExclTime(tid); tmpDoubleIncl = (*it)->GetInclTime(tid); memAllocated = true; //Initialize what gets added for //reducing from the parent profile for(int j=0;jThisFunction || (*it) == current->CallPathFunction) { #else if ((*it) == current->ThisFunction) { #endif /* Match! */ DEBUGPROFMSG("MATCH! Name :"<ThisFunction->GetName() <StartTime[k]; tmpDoubleExcl[k] += total[k] - prevtime[k]; } /* prevtime is the inclusive time of the subroutine that should be subtracted from the current exclusive time */ /* If there is no instance of this function higher on the callstack, we should add the total to the inclusive time */ } for(int l=0;lStartTime[l]; } /* to calculate exclusive time */ current = current->ParentProfiler; } /* We've reached the top! */ for(int m=0;mGetExclTime(tid); tmpDoubleIncl = (*it)->GetInclTime(tid); memAllocated = true; } // Not on the Callstack if(memAllocated){ DEBUGPROFMSG("Node: "<< RtsLayer::myNode() << " Dumping " << (*it)->GetName()<< " " << (*it)->GetType() << " Calls : " << (*it)->GetCalls(tid) << " Subrs : "<< (*it)->GetSubrs(tid) << " Excl : " << tmpDoubleExcl[i] << " Incl : " << tmpDoubleIncl[i] << endl;); fprintf(fp,"\"%s %s\" %ld %ld %.16G %.16G ", (*it)->GetName(), (*it)->GetType(), (*it)->GetCalls(tid), (*it)->GetSubrs(tid), tmpDoubleExcl[i], tmpDoubleIncl[i]); } else { DEBUGPROFMSG("Node: "<< RtsLayer::myNode() << " Dumping " << (*it)->GetName()<< " " << (*it)->GetType() << " Calls : " << (*it)->GetCalls(tid) << " Subrs : "<< (*it)->GetSubrs(tid) << " Excl : " << 0 << " Incl : " << 0 << endl;); fprintf(fp,"\"%s %s\" %ld %ld 0 0 ", (*it)->GetName(), (*it)->GetType(), (*it)->GetCalls(tid), (*it)->GetSubrs(tid)); } fprintf(fp,"0 "); // Indicating - profile calls is turned off fprintf(fp,"GROUP=\"%s\" \n", (*it)->GetAllGroups()); //Free up the memory if it was allocated. if(memAllocated){ free(tmpDoubleIncl); free(tmpDoubleExcl); } } fprintf(fp,"0 aggregates\n"); // For now there are no aggregates numEvents = 0; for (eit = TheEventDB().begin(); eit != TheEventDB().end(); eit++) { if ((*eit)->GetNumEvents(tid)) { numEvents++; } } if (numEvents > 0) { // Data format // # % userevents // # name numsamples max min mean sumsqr fprintf(fp, "%d userevents\n", numEvents); fprintf(fp, "# eventname numevents max min mean sumsqr\n"); vector::iterator it; for(it = TheEventDB().begin(); it != TheEventDB().end(); it++){ if ((*it)->GetNumEvents(tid)) { DEBUGPROFMSG("Thr "<< tid << " TauUserEvent "<< (*it)->GetEventName() << "\n Min " << (*it)->GetMin(tid) << "\n Max " << (*it)->GetMax(tid) << "\n Mean " << (*it)->GetMean(tid) << "\n SumSqr " << (*it)->GetSumSqr(tid) << "\n NumEvents " << (*it)->GetNumEvents(tid)<< endl;); fprintf(fp, "\"%s\" %ld %.16G %.16G %.16G %.16G\n", (*it)->GetEventName(), (*it)->GetNumEvents(tid), (*it)->GetMax(tid), (*it)->GetMin(tid), (*it)->GetMean(tid), (*it)->GetSumSqr(tid)); } } } // End of userevents data RtsLayer::UnLockDB(); fclose(fp); dumpfile = new char[1024]; if(increment){ //Place the date and time to the dumpfile name: time_t theTime = time(NULL); char *stringTime = ctime(&theTime); tm *structTime = localtime(&theTime); char *day = strtok(stringTime," "); char *month = strtok(NULL," "); char *dayInt = strtok(NULL," "); char *time = strtok(NULL," "); char *year = strtok(NULL," "); //Get rid of the mewline. year[4] = '\0'; char *newStringTime = new char[1024]; sprintf(newStringTime,"%s-%s-%s-%s-%s",day,month,dayInt,time,year); sprintf(dumpfile,"%s/dump__%s__.%d.%d.%d",newdirname, newStringTime, RtsLayer::myNode(), RtsLayer::myContext(), tid); rename(filename, dumpfile); } else{ sprintf(dumpfile,"%s/%s.%d.%d.%d",newdirname, prefix, RtsLayer::myNode(), RtsLayer::myContext(), tid); rename(filename, dumpfile); } } } #elif TRACING_ON #ifndef TAU_EPILOG #ifndef TAU_VAMPIRTRACE TraceEvFlush(tid); #endif /* TAU_VAMPIRTRACE */ #endif /* TAU_EPILOG */ #endif //PROFILING_ON return 1; } void Profiler::PurgeData(int tid){ vector::iterator it; vector::iterator eit; Profiler *curr; DEBUGPROFMSG("Profiler::PurgeData( tid = "<SetCalls(tid,0); (*it)->SetSubrs(tid,0); (*it)->SetExclTimeZero(tid); (*it)->SetInclTimeZero(tid); } // Now Re-register callstack entries curr = CurrentProfiler[tid]; curr->ThisFunction->IncrNumCalls(tid); curr = curr->ParentProfiler; while(curr != 0) { curr->ThisFunction->IncrNumCalls(tid); curr->ThisFunction->IncrNumSubrs(tid); curr = curr->ParentProfiler; } // Reset the Event Database for (eit = TheEventDB().begin(); eit != TheEventDB().end(); eit++) { (*eit)->LastValueRecorded[tid] = 0; (*eit)->NumEvents[tid] = 0L; (*eit)->MinValue[tid] = 9999999; (*eit)->MaxValue[tid] = -9999999; (*eit)->SumSqrValue[tid] = 0; (*eit)->SumValue[tid] = 0; } RtsLayer::UnLockDB(); } #endif//TAU_MULTIPLE_COUNTERS #if ( defined(PROFILE_CALLS) || defined(PROFILE_STATS) || defined(PROFILE_CALLSTACK) ) int Profiler::ExcludeTimeThisCall(double t) { ExclTimeThisCall -= t; return 1; } #endif //PROFILE_CALLS || PROFILE_STATS || PROFILE_CALLSTACK ///////////////////////////////////////////////////////////////////////// #ifdef PROFILE_CALLSTACK ////////////////////////////////////////////////////////////////////// // Profiler::CallStackTrace() // // Author: Mike Kaufman // mikek@cs.uoregon.edu // output stack of active Profiler objects ////////////////////////////////////////////////////////////////////// void Profiler::CallStackTrace(int tid) { char *dirname; // directory name of output file char fname[1024]; // output file name char errormsg[1024]; // error message buffer FILE *fp; Profiler *curr; // current Profiler object in stack traversal double now; // current wallclock time double totalTime; // now - profiler's start time double prevTotalTime; // inclusive time of last Profiler object // stack static int ncalls = 0; // number of times CallStackTrace() // has been called // get wallclock time now = RtsLayer::getUSecD(tid); DEBUGPROFMSG("CallStackTrace started at " << now << endl;); // increment num of calls to trace ncalls++; // set up output file if ((dirname = getenv("PROFILEDIR")) == NULL) { dirname = new char[8]; strcpy (dirname, "."); } // create file name string sprintf(fname, "%s/callstack.%d.%d.%d", dirname, RtsLayer::myNode(), RtsLayer::myContext(), tid); // traverse stack and set all FunctionInfo's *_cs fields to zero curr = CurrentProfiler[tid]; while (curr != 0) { curr->ThisFunction->ExclTime_cs = curr->ThisFunction->GetExclTime(tid); curr = curr->ParentProfiler; } prevTotalTime = 0; // calculate time info curr = CurrentProfiler[tid]; while (curr != 0 ) { totalTime = now - curr->StartTime; // set profiler's inclusive time curr->InclTime_cs = totalTime; // calc Profiler's exclusive time curr->ExclTime_cs = totalTime + curr->ExclTimeThisCall - prevTotalTime; if (curr->AddInclFlag == true) { // calculate inclusive time for profiler's FunctionInfo curr->ThisFunction->InclTime_cs = curr->ThisFunction->GetInclTime(tid) + totalTime; } // calculate exclusive time for each profiler's FunctionInfo curr->ThisFunction->ExclTime_cs += totalTime - prevTotalTime; // keep total of inclusive time prevTotalTime = totalTime; // next profiler curr = curr->ParentProfiler; } // open file if (ncalls == 1) fp = fopen(fname, "w+"); else fp = fopen(fname, "a"); if (fp == NULL) // error opening file { sprintf(errormsg, "Error: Could not create %s", fname); perror(errormsg); return; } if (ncalls == 1) { fprintf(fp,"%s%s","# Name Type Calls Subrs Prof-Incl ", "Prof-Excl Func-Incl Func-Excl\n"); fprintf(fp, "# -------------------------------------------------------------\n"); } else fprintf(fp, "\n"); // output time of callstack dump fprintf(fp, "%.16G\n", now); // output call stack info curr = CurrentProfiler[tid]; while (curr != 0 ) { fprintf(fp, "\"%s %s\" %ld %ld %.16G %.16G %.16G %.16G\n", curr->ThisFunction->GetName(), curr->ThisFunction->GetType(), curr->ThisFunction->GetCalls(tid),curr->ThisFunction->GetSubrs(tid), curr->InclTime_cs, curr->ExclTime_cs, curr->ThisFunction->InclTime_cs, curr->ThisFunction->ExclTime_cs); curr = curr->ParentProfiler; } // close file fclose(fp); } /*-----------------------------------------------------------------*/ #endif //PROFILE_CALLSTACK #ifdef TAU_COMPENSATE ////////////////////////////////////////////////////////////////////// // Profiler::GetNumChildren() // Description: Returns the total number of child timers (including // children of children) executed under the given profiler. ////////////////////////////////////////////////////////////////////// long Profiler::GetNumChildren(void) { return NumChildren; } ////////////////////////////////////////////////////////////////////// // Profiler::SetNumChildren(value) // Description: Sets the total number of child timers. ////////////////////////////////////////////////////////////////////// void Profiler::SetNumChildren(long value) { NumChildren = value; } ////////////////////////////////////////////////////////////////////// // Profiler::AddNumChildren(value) // Description: increments by value the number of child timers. ////////////////////////////////////////////////////////////////////// void Profiler::AddNumChildren(long value) { NumChildren += value; } #endif /* TAU_COMPENSATE */ ////////////////////////////////////////////////////////////////////// // Profiler::GetPhase(void) // Description: Returns if a profiler is a phase or not ////////////////////////////////////////////////////////////////////// #ifdef TAU_PROFILEPHASE bool Profiler::GetPhase(void) { return PhaseFlag; } ////////////////////////////////////////////////////////////////////// // Profiler::GetPhase(bool flag) // Description: SetPhase sets a phase to be true or false based on the // parameter flag ////////////////////////////////////////////////////////////////////// void Profiler::SetPhase(bool flag) { PhaseFlag = flag; } #endif /* TAU_PROFILEPHASE */ #ifdef TAU_DEPTH_LIMIT ////////////////////////////////////////////////////////////////////// // Profiler::GetDepthLimit(void) // Description: GetDepthLimit returns the callstack depth beyond which // all instrumentation is disabled ////////////////////////////////////////////////////////////////////// int Profiler::GetDepthLimit(void) { return profiledepth; } ////////////////////////////////////////////////////////////////////// // Profiler::SetDepthLimit(int value) // Description: SetDepthLimit sets the callstack instrumentation depth ////////////////////////////////////////////////////////////////////// void Profiler::SetDepthLimit(int value) { profiledepth = value; } #endif /* TAU_DEPTH_LIMIT */ ////////////////////////////////////////////////////////////////////// // TauGetThrottle(void) // Description: Returns whether throttling is enabled or disabled ////////////////////////////////////////////////////////////////////// bool TauGetThrottle(void) { if (getenv("TAU_THROTTLE") == (char *) NULL) return false; else return true; } ////////////////////////////////////////////////////////////////////// // TauGetThrottleNumCalls(void) // Description: Returns (as a double) the number of calls for throttle // based control of instrumentation. ////////////////////////////////////////////////////////////////////// double TauGetThrottleNumCalls(void) { char *numcalls = getenv("TAU_THROTTLE_NUMCALLS"); double d = TAU_THROTTLE_NUMCALLS_DEFAULT; /* default numcalls */ if (numcalls) { d = strtod(numcalls,0); } DEBUGPROFMSG("TauGetThrottleNumCalls: Returning "< using namespace std; #else /* TAU_DOT_H_LESS_HEADERS */ #include #endif /* TAU_DOT_H_LESS_HEADERS */ #include "Profile/Profiler.h" #ifdef TAU_CHARM extern "C" { #include } #else #include #endif ///////////////////////////////////////////////////////////////////////// // Member Function Definitions For class PthreadLayer // This allows us to get thread ids from 0..N-1 instead of long nos // as generated by pthread_self() ///////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////// // Define the static private members of PthreadLayer ///////////////////////////////////////////////////////////////////////// pthread_key_t PthreadLayer::tauPthreadId; pthread_mutex_t PthreadLayer::tauThreadcountMutex; pthread_mutexattr_t PthreadLayer::tauThreadcountAttr; pthread_mutex_t PthreadLayer::tauDBMutex; pthread_mutex_t PthreadLayer::tauEnvMutex; pthread_mutexattr_t PthreadLayer::tauDBAttr; int PthreadLayer::tauThreadCount = 0; //////////////////////////////////////////////////////////////////////// // RegisterThread() should be called before any profiling routines are // invoked. This routine sets the thread id that is used by the code in // FunctionInfo and Profiler classes. This should be the first routine a // thread should invoke from its wrapper. Note: main() thread shouldn't // call this routine. //////////////////////////////////////////////////////////////////////// int PthreadLayer::RegisterThread(void) { int *id = (int *) pthread_getspecific(tauPthreadId); if (id != NULL) { return 0; } int *threadId = new int; pthread_mutex_lock(&tauThreadcountMutex); tauThreadCount ++; // A thread should call this routine exactly once. *threadId = tauThreadCount; DEBUGPROFMSG("Thread id "<< tauThreadCount<< " Created! "<start_routine(pack->arg); } extern "C" int tau_pthread_create (pthread_t * threadp, const pthread_attr_t *attr, void *(*start_routine) (void *), void *arg) { tau_pthread_pack *pack = (tau_pthread_pack*) malloc (sizeof(tau_pthread_pack)); pack->start_routine = start_routine; pack->arg = arg; return pthread_create(threadp, attr, tau_pthread_function, (void*)pack); } /*************************************************************************** * $RCSfile: PthreadLayer.cpp,v $ $Author: amorris $ * $Revision: 1.14 $ $Date: 2006/05/05 19:27:25 $ * POOMA_VERSION_ID: $Id: PthreadLayer.cpp,v 1.14 2006/05/05 19:27:25 amorris Exp $ ***************************************************************************/ tau-2.16.4/src/Profile/PyBindings.cpp000066400000000000000000000101721062343042700173400ustar00rootroot00000000000000// -*- C++ -*- // //----------------------------------------------------------------------------- // // VTF Development Team // California Institute of Technology // (C) 2002 All Rights Reserved // // // //----------------------------------------------------------------------------- // // $Log: PyBindings.cpp,v $ // Revision 1.3 2007/03/02 02:36:51 amorris // Added snapshot API for python. // // Revision 1.2 2007/03/01 22:17:28 amorris // Added phase API for python // // Revision 1.1 2003/02/28 23:26:50 sameer // Added Python Bindings to TAU [Julian Cummings, Brian Miller]. // // Revision 1.3 2002/11/14 02:28:50 cummings // Added bindings for some new Tau functions that let you access the // profiling statistics database at run time. // // Revision 1.2 2002/01/23 02:47:38 cummings // Added Python wrappers for new Tau functions enableAllGroups() and // disableAllGroups(), which will enable or disable profiling for all // existing profile groups with one function call. The only exception // is the group TAU_DEFAULT, which includes main() and cannot be disabled. // // Revision 1.1 2002/01/16 02:05:07 cummings // Original source and build procedure files for Python bindings of // TAU runtime API. These bindings allow you to do some rudimentary // things from the Python script, such as enable/disable all Tau // instrumentation, enable/disable a particular Tau profile group, // and dump or purge the current Tau statistics. Still to come are // bindings for creating and using Tau global timers and user events. // // #include #include "Profile/PyBindings.h" #include "Profile/PyDatabase.h" #include "Profile/PyGroups.h" #include "Profile/PyTimer.h" // method table struct PyMethodDef pytau_methods[] = { // database {pytau_snapshot__name__, pytau_snapshot, METH_VARARGS, pytau_snapshot__doc__}, {pytau_dbDump__name__, pytau_dbDump, METH_VARARGS, pytau_dbDump__doc__}, {pytau_dbDumpIncr__name__, pytau_dbDumpIncr, METH_VARARGS, pytau_dbDumpIncr__doc__}, {pytau_dbPurge__name__, pytau_dbPurge, METH_VARARGS, pytau_dbPurge__doc__}, {pytau_getFuncNames__name__, pytau_getFuncNames, METH_VARARGS, pytau_getFuncNames__doc__}, {pytau_dumpFuncNames__name__, pytau_dumpFuncNames, METH_VARARGS, pytau_dumpFuncNames__doc__}, {pytau_getCounterNames__name__, pytau_getCounterNames, METH_VARARGS, pytau_getCounterNames__doc__}, {pytau_getFuncVals__name__, pytau_getFuncVals, METH_VARARGS, pytau_getFuncVals__doc__}, {pytau_dumpFuncVals__name__, pytau_dumpFuncVals, METH_VARARGS, pytau_dumpFuncVals__doc__}, {pytau_dumpFuncValsIncr__name__, pytau_dumpFuncValsIncr, METH_VARARGS, pytau_dumpFuncValsIncr__doc__}, // groups {pytau_getProfileGroup__name__, pytau_getProfileGroup, METH_VARARGS, pytau_getProfileGroup__doc__}, {pytau_enableGroup__name__, pytau_enableGroup, METH_VARARGS, pytau_enableGroup__doc__}, {pytau_disableGroup__name__, pytau_disableGroup, METH_VARARGS, pytau_disableGroup__doc__}, {pytau_enableGroupName__name__, pytau_enableGroupName, METH_VARARGS, pytau_enableGroupName__doc__}, {pytau_disableGroupName__name__, pytau_disableGroupName, METH_VARARGS, pytau_disableGroupName__doc__}, {pytau_enableAllGroups__name__, pytau_enableAllGroups, METH_VARARGS, pytau_enableAllGroups__doc__}, {pytau_disableAllGroups__name__, pytau_disableAllGroups, METH_VARARGS, pytau_disableAllGroups__doc__}, {pytau_enableInstrumentation__name__, pytau_enableInstrumentation, METH_VARARGS, pytau_enableInstrumentation__doc__}, {pytau_disableInstrumentation__name__, pytau_disableInstrumentation, METH_VARARGS, pytau_disableInstrumentation__doc__}, // timers {pytau_phase__name__, pytau_phase, METH_VARARGS | METH_KEYWORDS, pytau_phase__doc__}, {pytau_profileTimer__name__, pytau_profileTimer, METH_VARARGS | METH_KEYWORDS, pytau_profileTimer__doc__}, {pytau_start__name__, pytau_start, METH_VARARGS, pytau_start__doc__}, {pytau_stop__name__, pytau_stop, METH_VARARGS, pytau_stop__doc__}, // Sentinel {0, 0} }; // version // $Id: PyBindings.cpp,v 1.3 2007/03/02 02:36:51 amorris Exp $ // End of file tau-2.16.4/src/Profile/PyDatabase.cpp000066400000000000000000000244271062343042700173170ustar00rootroot00000000000000// -*- C++ -*- // //----------------------------------------------------------------------------- // // VTF Development Team // California Institute of Technology // (C) 2002 All Rights Reserved // // // //----------------------------------------------------------------------------- // // $Log: PyDatabase.cpp,v $ // Revision 1.6 2007/03/02 02:36:51 amorris // Added snapshot API for python. // // Revision 1.5 2006/02/03 03:03:08 amorris // Fixed error with PyArg_ParseTuple: // // Exception exceptions.TypeError: 'function takes exactly 1 argument (0 given)' in 'garbage collection' ignored // Fatal Python error: unexpected exception during garbage collection // Aborted (core dumped) // // Revision 1.4 2003/07/18 18:48:19 sameer // Added support for TAU_DB_DUMP(prefix). In python you can optionally specify // an argument: // tau.dbDump() --> Calls TAU_DB_DUMP(); // or // tau.dbDump("prefix") --> Calls TAU_DB_DUMP_PREFIX("prefix") (Kathleen wanted // prefix to be profile so it'd dump performance data for an application that // didn't terminate right and she'd use jracy directly). [LLNL] // // Revision 1.3 2003/03/20 18:41:05 sameer // Added TAU_HPUX guards for header. // // Revision 1.2 2003/03/15 01:39:10 sameer // Added [HP-UX] and moved funcDB in PyTimer.cpp to inside the profileTimer routine. // // Revision 1.1 2003/02/28 23:26:51 sameer // Added Python Bindings to TAU [Julian Cummings, Brian Miller]. // // Revision 1.2 2002/11/14 02:28:50 cummings // Added bindings for some new Tau functions that let you access the // profiling statistics database at run time. // // Revision 1.1 2002/01/16 02:05:07 cummings // Original source and build procedure files for Python bindings of // TAU runtime API. These bindings allow you to do some rudimentary // things from the Python script, such as enable/disable all Tau // instrumentation, enable/disable a particular Tau profile group, // and dump or purge the current Tau statistics. Still to come are // bindings for creating and using Tau global timers and user events. // // #ifdef TAU_HPUX #include #endif /* TAU_HPUX */ #include #include "Profile/PyDatabase.h" // Tau includes #include "Profile/Profiler.h" char pytau_snapshot__name__[] = "snapshot"; char pytau_snapshot__doc__[] = "take a snapshot of the current profile"; PyObject * pytau_snapshot(PyObject *self, PyObject *args) { char *name = NULL; int number = -1; if (PyArg_ParseTuple(args, "s|i", &name, &number)) { if (number == -1) { TAU_PROFILE_SNAPSHOT(name); } else { TAU_PROFILE_SNAPSHOT_1L(name,number); } } // return Py_INCREF(Py_None); return Py_None; } char pytau_dbDump__name__[] = "dbDump"; char pytau_dbDump__doc__[] = "dump the Tau Profiler statistics"; PyObject * pytau_dbDump(PyObject *self, PyObject *args) { char *prefix = "dump"; int len = 4; // Check to see if a prefix is specified if (PyArg_ParseTuple(args, "|s", &prefix, &len)) { // extracted the prefix, call dump routine #ifdef DEBUG printf("dbDump: extracted prefix = %s, len = %d\n", prefix, len); #endif /* DEBUG */ TAU_DB_DUMP_PREFIX(prefix); } // return Py_INCREF(Py_None); return Py_None; } char pytau_dbDumpIncr__name__[] = "dbDumpIncr"; char pytau_dbDumpIncr__doc__[] = "incremental dump of the Tau Profiler statistics"; PyObject * pytau_dbDumpIncr(PyObject *, PyObject *) { // call Tau function to dump statistics incrementally TAU_DB_DUMP_INCR(); // return Py_INCREF(Py_None); return Py_None; } char pytau_dbPurge__name__[] = "dbPurge"; char pytau_dbPurge__doc__[] = "purge the Tau Profiler statistics"; PyObject * pytau_dbPurge(PyObject *, PyObject *) { // call Tau function to purge statistics TAU_DB_PURGE(); // return Py_INCREF(Py_None); return Py_None; } char pytau_getFuncNames__name__[] = "getFuncNames"; char pytau_getFuncNames__doc__[] = "get list of profiled functions"; PyObject * pytau_getFuncNames(PyObject *, PyObject *) { PyObject * pyFuncList; const char** functionList; int numOfFunctions; // call Tau function to get function names TAU_GET_FUNC_NAMES(functionList, numOfFunctions); // build Python sequence of function names pyFuncList = PyTuple_New(numOfFunctions); for (int i=0; i // //----------------------------------------------------------------------------- // // $Log: PyExceptions.cpp,v $ // Revision 1.1 2003/02/28 23:26:51 sameer // Added Python Bindings to TAU [Julian Cummings, Brian Miller]. // // Revision 1.1 2002/01/16 02:05:07 cummings // Original source and build procedure files for Python bindings of // TAU runtime API. These bindings allow you to do some rudimentary // things from the Python script, such as enable/disable all Tau // instrumentation, enable/disable a particular Tau profile group, // and dump or purge the current Tau statistics. Still to come are // bindings for creating and using Tau global timers and user events. // // #include // Local #include "Profile/PyExceptions.h" PyObject *pytau_badArgument = 0; // $Id: PyExceptions.cpp,v 1.1 2003/02/28 23:26:51 sameer Exp $ // End of file tau-2.16.4/src/Profile/PyGroups.cpp000066400000000000000000000131401062343042700170600ustar00rootroot00000000000000// -*- C++ -*- // //----------------------------------------------------------------------------- // // VTF Development Team // California Institute of Technology // (C) 2002 All Rights Reserved // // // //----------------------------------------------------------------------------- // // $Log: PyGroups.cpp,v $ // Revision 1.3 2003/03/20 18:41:05 sameer // Added TAU_HPUX guards for header. // // Revision 1.2 2003/03/15 01:39:10 sameer // Added [HP-UX] and moved funcDB in PyTimer.cpp to inside the profileTimer routine. // // Revision 1.1 2003/02/28 23:26:51 sameer // Added Python Bindings to TAU [Julian Cummings, Brian Miller]. // // Revision 1.2 2002/01/23 02:47:38 cummings // Added Python wrappers for new Tau functions enableAllGroups() and // disableAllGroups(), which will enable or disable profiling for all // existing profile groups with one function call. The only exception // is the group TAU_DEFAULT, which includes main() and cannot be disabled. // // Revision 1.1 2002/01/16 02:05:07 cummings // Original source and build procedure files for Python bindings of // TAU runtime API. These bindings allow you to do some rudimentary // things from the Python script, such as enable/disable all Tau // instrumentation, enable/disable a particular Tau profile group, // and dump or purge the current Tau statistics. Still to come are // bindings for creating and using Tau global timers and user events. // // #ifdef TAU_HPUX #include #endif /* TAU_HPUX */ #include #include "Profile/PyGroups.h" // Tau includes #include "Profile/Profiler.h" char pytau_getProfileGroup__name__[] = "getProfileGroup"; char pytau_getProfileGroup__doc__[] = "retrieve a Tau Profiler group"; PyObject * pytau_getProfileGroup(PyObject *, PyObject * args) { char * name; TauGroup_t group; // extract group name from Python args int ok = PyArg_ParseTuple(args, "s:getProfileGroup", &name); if (!ok) { return 0; } // call Tau function to retrieve group group = TAU_GET_PROFILE_GROUP(name); // return Tau profiler group return Py_BuildValue("l", group); } char pytau_enableGroup__name__[] = "enableGroup"; char pytau_enableGroup__doc__[] = "enable a Tau Profiler group"; PyObject * pytau_enableGroup(PyObject *, PyObject * args) { TauGroup_t group; // extract group from Python args int ok = PyArg_ParseTuple(args, "l:enableGroup", &group); if (!ok) { return 0; } // call Tau function to enable group TAU_ENABLE_GROUP(group); // return Py_INCREF(Py_None); return Py_None; } char pytau_disableGroup__name__[] = "disableGroup"; char pytau_disableGroup__doc__[] = "disable a Tau Profiler group"; PyObject * pytau_disableGroup(PyObject *, PyObject * args) { TauGroup_t group; // extract group from Python args int ok = PyArg_ParseTuple(args, "l:disableGroup", &group); if (!ok) { return 0; } // call Tau function to disable group TAU_DISABLE_GROUP(group); // return Py_INCREF(Py_None); return Py_None; } char pytau_enableGroupName__name__[] = "enableGroupName"; char pytau_enableGroupName__doc__[] = "enable a Tau Profiler group by name"; PyObject * pytau_enableGroupName(PyObject *, PyObject * args) { char * name; // extract group name from Python args int ok = PyArg_ParseTuple(args, "s:enableGroupName", &name); if (!ok) { return 0; } // call Tau function to enable group by name TAU_ENABLE_GROUP_NAME(name); // return Py_INCREF(Py_None); return Py_None; } char pytau_disableGroupName__name__[] = "disableGroupName"; char pytau_disableGroupName__doc__[] = "disable a Tau Profiler group by name"; PyObject * pytau_disableGroupName(PyObject *, PyObject * args) { char * name; // extract group name from Python args int ok = PyArg_ParseTuple(args, "s:disableGroupName", &name); if (!ok) { return 0; } // call Tau function to disable group by name TAU_DISABLE_GROUP_NAME(name); // return Py_INCREF(Py_None); return Py_None; } char pytau_enableAllGroups__name__[] = "enableAllGroups"; char pytau_enableAllGroups__doc__[] = "enable all Tau Profiler groups"; PyObject * pytau_enableAllGroups(PyObject *, PyObject *) { // call Tau function to enable all groups TAU_ENABLE_ALL_GROUPS(); // return Py_INCREF(Py_None); return Py_None; } char pytau_disableAllGroups__name__[] = "disableAllGroups"; char pytau_disableAllGroups__doc__[] = "disable all Tau Profiler groups"; PyObject * pytau_disableAllGroups(PyObject *, PyObject *) { // call Tau function to disable all groups TAU_DISABLE_ALL_GROUPS(); // return Py_INCREF(Py_None); return Py_None; } char pytau_enableInstrumentation__name__[] = "enableInstrumentation"; char pytau_enableInstrumentation__doc__[] = "enable all Tau Profiler instrumentation"; PyObject * pytau_enableInstrumentation(PyObject *, PyObject *) { // call Tau function to enable instrumentation TAU_ENABLE_INSTRUMENTATION(); // return Py_INCREF(Py_None); return Py_None; } char pytau_disableInstrumentation__name__[] = "disableInstrumentation"; char pytau_disableInstrumentation__doc__[] = "disable all Tau Profiler instrumentation"; PyObject * pytau_disableInstrumentation(PyObject *, PyObject *) { // call Tau function to disable instrumentation TAU_DISABLE_INSTRUMENTATION(); // return Py_INCREF(Py_None); return Py_None; } // version // $Id: PyGroups.cpp,v 1.3 2003/03/20 18:41:05 sameer Exp $ // End of file tau-2.16.4/src/Profile/PyTau.cpp000066400000000000000000000035171062343042700163410ustar00rootroot00000000000000// -*- C++ -*- // //----------------------------------------------------------------------------- // // VTF Development Team // California Institute of Technology // (C) 1998-2002 All Rights Reserved // // // //----------------------------------------------------------------------------- // // $Log: PyTau.cpp,v $ // Revision 1.1 2003/02/28 23:26:52 sameer // Added Python Bindings to TAU [Julian Cummings, Brian Miller]. // // Revision 1.1 2002/01/16 02:05:07 cummings // Original source and build procedure files for Python bindings of // TAU runtime API. These bindings allow you to do some rudimentary // things from the Python script, such as enable/disable all Tau // instrumentation, enable/disable a particular Tau profile group, // and dump or purge the current Tau statistics. Still to come are // bindings for creating and using Tau global timers and user events. // // #include #include "Profile/PyBindings.h" #include "Profile/PyExceptions.h" // Module documentation string char pytau_module__doc__[] = "Tau extensions module"; // Initialization function for the module (*must* be called initpytau) extern "C" void initpytau() { // create the module and add the functions PyObject * m = Py_InitModule4("pytau", pytau_methods, pytau_module__doc__, 0, PYTHON_API_VERSION); // get its dictionary PyObject * d = PyModule_GetDict(m); // check for errors if (PyErr_Occurred()) { Py_FatalError("can't initialize module pytau"); } // Register the exceptions of the module pytau_badArgument = PyErr_NewException("pytau.BadArgument", 0, 0); PyDict_SetItemString(d, "BadArgument", pytau_badArgument); // Finished return; } // version // $Id: PyTau.cpp,v 1.1 2003/02/28 23:26:52 sameer Exp $ // End of file tau-2.16.4/src/Profile/PyTimer.cpp000066400000000000000000000137321062343042700166700ustar00rootroot00000000000000// -*- C++ -*- // //----------------------------------------------------------------------------- // // TAU Development Team // University of Oregon, Los Alamos National Laboratory, // FZJ Germany // (C) 2003 All Rights Reserved // // // //----------------------------------------------------------------------------- // // $Log: PyTimer.cpp,v $ // Revision 1.7 2007/03/02 02:36:24 amorris // Made explicit the phase calls, true and false. // // Revision 1.6 2007/03/01 22:17:28 amorris // Added phase API for python // // Revision 1.5 2007/03/01 02:45:39 amorris // The map for reusing timers was not taking the 'type' into account, so when // different routines with the same name occurred, they were both assigned to the // same timer with the file/line information of whichever occurred first. We now // hash on the combined name+type. // // Revision 1.4 2003/03/20 18:41:05 sameer // Added TAU_HPUX guards for header. // // Revision 1.3 2003/03/15 01:49:13 sameer // Python bindings and wish fix. // // Revision 1.2 2003/03/15 01:39:11 sameer // Added [HP-UX] and moved funcDB in PyTimer.cpp to inside the profileTimer routine. // // Revision 1.1 2003/02/28 23:26:52 sameer // Added Python Bindings to TAU [Julian Cummings, Brian Miller]. // // // #ifdef TAU_HPUX #include #endif /* TAU_HPUX */ #include // Tau includes #include "Profile/Profiler.h" #include #include using namespace std; // Utility routines struct ltstr{ bool operator()(const char* s1, const char* s2) const{ return strcmp(s1, s2) < 0; }//operator() }; // tells whether a FunctionInfo object is a phase or not static map phaseMap; static PyObject *createTimer(PyObject *self, PyObject *args, PyObject *kwargs, bool phase) { // Extract name, type and group strings and return the id of the routine int tauid = 0; char *name = "None"; char *type = ""; char *group = "TAU_PYTHON"; static char *argnames[] = { "name", "type", "group", NULL}; /* GLOBAL database of function names */ static map funcDB; map::iterator it; // Get Python arguments if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|sss", argnames, &name, &type, &group)) { return NULL; } #ifdef DEBUG printf("Got Name = %s, Type = %s, Group = %s, tauid = %d\n", name, type, group, tauid); #endif /* DEBUG */ char * functionName = new char[strlen(name) + strlen(type) +5]; // create a new storage - STL req. sprintf (functionName,"%s %s",name,type); if (( it = funcDB.find((const char *)functionName)) != funcDB.end()) { #ifdef DEBUG printf("Found the name %s\n", functionName); #endif /* DEBUG */ tauid = (*it).second; delete functionName; // don't need this if its already there. } else { if (phase) { // Add TAU_PHASE to the group group = Tau_phase_enable(group); } TauGroup_t groupid = RtsLayer::getProfileGroup(group); FunctionInfo *f = new FunctionInfo(functionName, "", groupid, group, true); tauid = TheFunctionDB().size() - 1; // These two need to be an atomic operation if threads are involved. LockDB happens // inside FunctionInfoInit() // Store the id in our map funcDB[(const char *)functionName] = tauid; // Do not delete functionName, STL requirement! if (phase) { phaseMap[tauid] = true; } else { phaseMap[tauid] = false; } } return Py_BuildValue("i", tauid); } char pytau_profileTimer__name__[] = "profileTimer"; char pytau_profileTimer__doc__[] = "access or create a TAU timer"; extern "C" PyObject * pytau_profileTimer(PyObject *self, PyObject *args, PyObject *kwargs) { // create non-phase timer return createTimer(self, args, kwargs, false); } char pytau_phase__name__[] = "phase"; char pytau_phase__doc__[] = "access or create a TAU phase"; extern "C" PyObject * pytau_phase(PyObject *self, PyObject *args, PyObject *kwargs) { // create phase timer return createTimer(self, args, kwargs, true); } char pytau_start__name__[] = "start"; char pytau_start__doc__[] = "start a TAU timer"; extern "C" PyObject * pytau_start(PyObject *self, PyObject *args) { int id; if (!PyArg_ParseTuple(args, "i", &id)) { printf("Couldn't Parse the tuple!\n"); return NULL; } FunctionInfo *f = TheFunctionDB()[id]; #ifdef DEBUG printf("Received timer Named %s, id = %d\n", f->GetName(), id); #endif /* DEBUG */ int tid = RtsLayer::myThread(); /* Get the FunctionInfo object */ Profiler *p = new Profiler(f, f != (FunctionInfo *) 0 ? f->GetProfileGroup() : TAU_DEFAULT, true, tid); if (p == (Profiler *) NULL) { printf("ERROR: Out of Memory in pytau_start! new returns NULL!\n"); return NULL; } #ifdef TAU_PROFILEPHASE bool isPhase = phaseMap[id]; if (isPhase) { p->SetPhase(true); } else { p->SetPhase(false); } #endif p->Start(tid); Py_INCREF(Py_None); return Py_None; } int tau_check_and_set_nodeid(void) { if (RtsLayer::myNode() == -1) { #ifndef TAU_MPI TAU_PROFILE_SET_NODE(0); #endif /* TAU_MPI */ } return 0; } char pytau_stop__name__[] = "stop"; char pytau_stop__doc__[] = "stop a TAU timer"; extern "C" PyObject * pytau_stop(PyObject *self, PyObject *args) { int tid = RtsLayer::myThread(); static int taunode = tau_check_and_set_nodeid(); Profiler *p = Profiler::CurrentProfiler[tid]; if (p != (Profiler *) NULL) { #ifdef DEBUG printf("Looking at function %s\n", p->ThisFunction->GetName()); #endif /* DEBUG */ p->Stop(); // It was stopped properly Py_INCREF(Py_None); return Py_None; } else { printf("pytau_stop: Stack error. Profiler is NULL!"); return NULL; } Py_INCREF(Py_None); return Py_None; } // version // $Id: PyTimer.cpp,v 1.7 2007/03/02 02:36:24 amorris Exp $ // End of file tau-2.16.4/src/Profile/RenciSTFF.cpp000066400000000000000000000126331062343042700170210ustar00rootroot00000000000000////////////////////////////////////////////////////////////////////// // // RENCI STFF Layer // // This layer is used for capturing signtaures using the RENCI // Scalable Time-series Filter Framework. Data collected by the // TAU profiler can be passed to this layer, and signatures are // made per function/callsite/counter. // // Scalable Traces compress runtime trace data using least // squares and other fitting methods. // // For more information about STFF contact: // // Todd Gamblin tgamblin@cs.unc.edu // Rob Fowler rjf@renci.org // // Or, visit http://www.renci.org // ////////////////////////////////////////////////////////////////////// #include "Profile/RenciSTFF.h" #include "stff-config.h" using namespace renci_stff; #include #define CHECK_INIT if (!inited && !init()) return; #ifdef DEBUG_PROF #include #include #define DEBUGPRINTF(msg, val) { printf(msg, val); } #else //DEBUG_PROF #define DEBUGPRINTF(msg, val) #endif //DEBUG_PROF #include using namespace std; // ------------------------------------------------------------------ // Static Storage // ------------------------------------------------------------------ bool RenciSTFF::inited = false; const char **RenciSTFF::counterList; int RenciSTFF::numCounters; std::vector RenciSTFF::signatures; extern "C" int PMPI_Initialized(int *inited); // function object class to delete elements in a container struct AppSigDelete { void operator() (ApplicationSignature*& appSig) const { if(appSig) { delete appSig; appSig = 0; } } }; // funtion object class to stop signature application struct AppSigStop { void operator() ( ApplicationSignature* appSig) const { if(appSig) { appSig->stopBuildingSignature(true); } } }; /** * Use this to lock and unlock the rts db during initialization. */ struct Lock { Lock() { RtsLayer::LockDB(); } ~Lock() { RtsLayer::UnLockDB(); } }; string RenciSTFF::handle_to_string(int handle) { return counterList[handle]; } /** CounterList for when we don't have multiple counters. */ static const char *INCL_TIME = "InclusiveTime"; // Initializes the signature layer bool RenciSTFF::init() { #ifdef STFF_USE_MPI //wait until mpi is inited to do anything, if STFF expects MPI. int mpiInited; PMPI_Initialized(&mpiInited); if (!mpiInited) return false; #endif //STFF_USE_MPI Lock rtsLock; if (inited) return true; // make sure we weren't inited while waiting for lock DEBUGPROFMSG("Initializing RENCI STFF" << endl); //Set up signatures for all the counters in use #ifdef TAU_MULTIPLE_COUNTERS MultipleCounterLayer::theCounterList(&counterList, &numCounters); #else //TAU_MULTIPLE_COUNTERS numCounters = 1; counterList = new const char*[1]; counterList[0] = INCL_TIME; #endif //TAU_MULTIPLE_COUNTERS SigId::set_handle_to_string(handle_to_string); DEBUGPROFMSG("Done with RenciSTFF::init()" << endl); inited = true; return true; } ApplicationSignature *RenciSTFF::createSignature( const Point &point, const FunctionInfo *info, int tid, int metricId ) { DEBUGPROFMSG("(info)); ApplicationSignature *signature = new ApplicationSignature(point, id); //Associate metric metadata with the signature MetaData* theMetaData = signature->getMetaData(); const char * metricName = counterList[id.getHandle()]; if (metricName) theMetaData->put(MetaData::PERFMETRIC, metricName); //Associate some extra metadata with the signature ostringstream tidStream; tidStream << tid; theMetaData->put(MetaData::THREAD_ID, tidStream.str()); theMetaData->put(MetaData::CALL_PATH, info->GetName()); DEBUGPROFMSG(signature << ">"); signatures.push_back(signature); return signature; } #ifdef TAU_MULTIPLE_COUNTERS void RenciSTFF::recordValues( FunctionInfo *function, double timestamp, const double *metricValue, int tid ) { CHECK_INIT; if (!function) return; DEBUGPRINTF(" t%d", tid); DEBUGPRINTF("\t%20.0lf", timestamp); ApplicationSignature **signatures = function->GetSignature(tid); for (int i=0; i < numCounters; i++) { Point sample(timestamp, metricValue[i]); if (!signatures[i]) { signatures[i] = createSignature(sample, function, tid, i); } else { signatures[i]->addObservation(sample); } DEBUGPRINTF(", %20.0lf", metricValue[i]); } DEBUGPROFMSG(endl); } #else //TAU_MULTIPLE_COUNTERS void RenciSTFF::recordValues( FunctionInfo *function, double timestamp, double metricValue, int tid ) { CHECK_INIT; if (!function) return; DEBUGPRINTF("\t%20.0lf", timestamp); DEBUGPRINTF(", %20lf\n", metricValue); ApplicationSignature *signature = function->GetSignature(tid); Point sample(timestamp, metricValue); if (!signature) { function->SetSignature(createSignature(sample, function, tid), tid); } else { signature->addObservation(sample); } } #endif //TAU_MULTIPLE_COUNTERS void RenciSTFF::cleanup() { DEBUGPROFMSG("Cleaning up after signature layer." << endl); for_each(signatures.begin(), signatures.end(), AppSigStop()); for_each(signatures.begin(), signatures.end(), AppSigDelete()); signatures.clear(); delete [] counterList; inited = false; } tau-2.16.4/src/Profile/RtsLayer.cpp000066400000000000000000001166651062343042700170550ustar00rootroot00000000000000/**************************************************************************** ** TAU Portable Profiling Package ** ** http://www.cs.uoregon.edu/research/tau ** ***************************************************************************** ** Copyright 1997 ** ** Department of Computer and Information Science, University of Oregon ** ** Advanced Computing Laboratory, Los Alamos National Laboratory ** ****************************************************************************/ /*************************************************************************** ** File : RtsLayer.cpp ** ** Description : TAU Profiling Package RTS Layer definitions ** ** Author : Sameer Shende ** ** Contact : sameer@cs.uoregon.edu sameer@acl.lanl.gov ** ** Flags : Compile with ** ** -DPROFILING_ON to enable profiling (ESSENTIAL) ** ** -DPROFILE_STATS for Std. Deviation of Excl Time ** ** -DSGI_HW_COUNTERS for using SGI counters ** ** -DPROFILE_CALLS for trace of each invocation ** ** -DSGI_TIMERS for SGI fast nanosecs timer ** ** -DTULIP_TIMERS for non-sgi Platform ** ** -DPOOMA_STDSTL for using STD STL in POOMA src ** ** -DPOOMA_TFLOP for Intel Teraflop at SNL/NM ** ** -DPOOMA_KAI for KCC compiler ** ** -DDEBUG_PROF for internal debugging messages ** ** -DPROFILE_CALLSTACK to enable callstack traces ** ** Documentation : See http://www.cs.uoregon.edu/research/tau ** ***************************************************************************/ ////////////////////////////////////////////////////////////////////// // Include Files ////////////////////////////////////////////////////////////////////// //#define DEBUG_PROF #ifdef TAU_AIX #include "Profile/aix.h" #endif /* TAU_AIX */ #ifdef FUJITSU #include "Profile/fujitsu.h" #endif /* FUJITSU */ #ifdef TAU_HITACHI #include "Profile/hitachi.h" #endif /* HITACHI */ #include "Profile/Profiler.h" #ifdef TAU_WINDOWS #define TAUROOT "root" #define TAU_ARCH "win32" #else #include "tauroot.h" #include "tauarch.h" #endif #if (defined(__QK_USER__) || defined(__LIBCATAMOUNT__ )) #ifndef TAU_CATAMOUNT #define TAU_CATAMOUNT #endif /* TAU_CATAMOUNT */ #include #endif /* __QK_USER__ || __LIBCATAMOUNT__ */ #ifdef CRAY_TIMERS #ifndef TAU_CATAMOUNT /* These header files are for Cray X1 */ #include #include #endif /* TAU_CATAMOUNT */ #endif // CRAY_TIMERS #ifdef BGL_TIMERS /* header files for BlueGene/L */ #include #include #endif // BGL_TIMERS #ifdef TAU_XLC #define strcasecmp strcmp #define strncasecmp strncmp #endif /* TAU_XLC */ #ifdef TAU_DOT_H_LESS_HEADERS #include using namespace std; #else /* TAU_DOT_H_LESS_HEADERS */ #include #endif /* TAU_DOT_H_LESS_HEADERS */ #include #include #include #include #ifdef CPU_TIME #include #include #include #endif // CPU_TIME #ifdef JAVA_CPU_TIME #include "Profile/JavaThreadLayer.h" #endif // JAVA_CPU_TIME #ifdef TAU_WINDOWS //include the header for windows time functions. #include //Various defines needed in Winbase.h. #include //For QueryPerformanceCounter/Frequency function (down to microsecond //resolution depending on the platform. #include //For _ftime function (millisecond resolution). //Map strncasecmp and strcasecmp to strnicmp and stricmp. #define strcasecmp stricmp #define strncasecmp strnicmp #endif //TAU_WINDOWS #if (!defined(TAU_WINDOWS)) #include #if (defined(POOMA_TFLOP) || !defined(TULIP_TIMERS)) #include #else #ifdef TULIP_TIMERS #include "Profile/TulipTimers.h" #endif //TULIP_TIMERS #endif //POOMA_TFLOP #endif //TAU_WINDOWS #ifdef TRACING_ON #define PCXX_EVENT_SRC #include "Profile/pcxx_events.h" #endif // TRACING_ON #ifdef TAUKTAU #include #include #include #include #include #endif /* TAUKTAU */ ///////////////////////////////////////////////////////////////////////// // Member Function Definitions For class RtsLayer // Important for Porting to other platforms and frameworks. ///////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////// TauGroup_t& RtsLayer::TheProfileMask(void) { // to avoid initialization problems of non-local static variables static TauGroup_t ProfileMask = TAU_DEFAULT; return ProfileMask; } ///////////////////////////////////////////////////////////////////////// bool& RtsLayer::TheEnableInstrumentation(void) { // to avoid initialization problems of non-local static variables static bool EnableInstrumentation = true; return EnableInstrumentation; } ///////////////////////////////////////////////////////////////////////// long RtsLayer::GenerateUniqueId(void) { /* This routine is called in a locked region (RtsLayer::LockDB/UnLockDB)*/ static long UniqueId = 0; return ++UniqueId; } ///////////////////////////////////////////////////////////////////////// int& RtsLayer::TheNode(void) { #ifdef TAU_SETNODE0 static int Node = 0; #else /* TAU_SETNODE0 */ static int Node =-1; #endif /* TAU_SETNODE0 */ return Node; } ///////////////////////////////////////////////////////////////////////// int& RtsLayer::TheContext(void) { static int Context = 0; return Context; } ///////////////////////////////////////////////////////////////////////// bool& RtsLayer::TheShutdown(void) { static bool shutdown = false; return shutdown; } ///////////////////////////////////////////////////////////////////////// ProfileMap_t& RtsLayer::TheProfileMap(void) { static ProfileMap_t *profilemap = new ProfileMap_t; return *profilemap; } ///////////////////////////////////////////////////////////////////////// TauGroup_t RtsLayer::getProfileGroup(char * ProfileGroup) { ProfileMap_t::iterator it = TheProfileMap().find(string(ProfileGroup)); TauGroup_t gr; if (it == TheProfileMap().end()) { #ifdef DEBUG_PROF cout < n)) stop = n; primary = groups.substr(start, stop - start) ; return primary; } ////////////////////////////////////////////////////////////////////// // TraceSendMsg traces the message send ////////////////////////////////////////////////////////////////////// void RtsLayer::TraceSendMsg(int type, int destination, int length) { #ifdef TRACING_ON x_int64 parameter; x_uint64 xother, xtype, xlength, xcomm; if (RtsLayer::isEnabled(TAU_MESSAGE)) { parameter = 0; /* for send, othernode is receiver or destination */ xtype = type; xlength = length; xother = destination; xcomm = 0; /* Format for parameter is 63 ..... 56 55 ..... 48 47............. 32 other type length These are the high order bits, below are the low order bits 31 ..... 24 23 ..... 16 15..............0 other type length e.g. xtype = 0xAABB; xother = 0xCCDD; xlength = 0xDEADBEEF; result = 0xccaaDEADdddbbBEEF parameter = ((xlength >> 16) << 32) | ((xtype >> 8 & 0xFF) << 48) | ((xother >> 8 & 0xFF) << 56) | (xlength & 0xFFFF) | ((xtype & 0xFF) << 16) | ((xother & 0xFF) << 24); */ parameter = (xlength >> 16 << 54 >> 22) | ((xtype >> 8 & 0xFF) << 48) | ((xother >> 8 & 0xFF) << 56) | (xlength & 0xFFFF) | ((xtype & 0xFF) << 16) | ((xother & 0xFF) << 24) | (xcomm << 58 >> 16); pcxx_Event(TAU_MESSAGE_SEND, parameter); #ifdef DEBUG_PROF printf("Node %d TraceSendMsg, type %x dest %x len %x par %lx \n", RtsLayer::myNode(), type, destination, length, parameter); #endif //DEBUG_PROF } #endif //TRACING_ON } ////////////////////////////////////////////////////////////////////// // TraceRecvMsg traces the message recv ////////////////////////////////////////////////////////////////////// void RtsLayer::TraceRecvMsg(int type, int source, int length) { #ifdef TRACING_ON x_int64 parameter; x_uint64 xother, xtype, xlength, xcomm; if (RtsLayer::isEnabled(TAU_MESSAGE)) { parameter = 0; /* for recv, othernode is sender or source*/ xtype = type; xlength = length; xother = source; xcomm = 0; // see TraceSendMsg for documentation parameter = (xlength >> 16 << 54 >> 22) | ((xtype >> 8 & 0xFF) << 48) | ((xother >> 8 & 0xFF) << 56) | (xlength & 0xFFFF) | ((xtype & 0xFF) << 16) | ((xother & 0xFF) << 24) | (xcomm << 58 >> 16); pcxx_Event(TAU_MESSAGE_RECV, parameter); #ifdef DEBUG_PROF printf("Node %d TraceRecvMsg, type %x src %x len %x par %lx \n", RtsLayer::myNode(), type, source, length, parameter); #endif //DEBUG_PROF } #endif //TRACING_ON } ////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////// // DumpEDF() writes the function information in the edf. file // The function info consists of functionId, group, name, type, parameters ////////////////////////////////////////////////////////////////////// int RtsLayer::DumpEDF(int tid) { #ifdef TRACING_ON vector::iterator it; vector::iterator uit; char filename[1024], errormsg[1024]; char *dirname; FILE* fp; int numEvents, numExtra; if (tid != 0) { #ifdef DEBUG_PROF printf("DumpEDF: FlushEvents = %d\n",GetFlushEvents(tid)); #endif /* DEBUG_PROF */ if (GetFlushEvents(tid) == 0) return 1; } RtsLayer::LockDB(); // Only thread 0 on a node should write the edf files. if ((dirname = getenv("TRACEDIR")) == NULL) { // Use default directory name . dirname = new char[8]; strcpy (dirname,"."); } sprintf(filename,"%s/events.%d.edf",dirname, RtsLayer::myNode()); DEBUGPROFMSG("Creating " << filename << endl;); if ((fp = fopen (filename, "w+")) == NULL) { sprintf(errormsg,"Error: Could not create %s",filename); perror(errormsg); return 0; } // Data Format // events // # or \n ignored // %s %s %d "%s %s" %s // id group tag "name type" parameters numExtra = 9; // Number of extra events /* OLD numEvents = TheFunctionDB().size(); */ numEvents = TheFunctionDB().size() + TheEventDB().size(); numEvents += numExtra; fprintf(fp,"%d dynamic_trace_events\n", numEvents); fprintf(fp,"# FunctionId Group Tag \"Name Type\" Parameters\n"); for (it = TheFunctionDB().begin(); it != TheFunctionDB().end(); it++) { DEBUGPROFMSG("Node: "<< RtsLayer::myNode() << " Dumping EDF Id : " << (*it)->GetFunctionId() << " " << (*it)->GetPrimaryGroup() << " 0 " << (*it)->GetName() << " " << (*it)->GetType() << " EntryExit" << endl;); fprintf(fp, "%ld %s 0 \"%s %s\" EntryExit\n", (*it)->GetFunctionId(), (*it)->GetPrimaryGroup(), (*it)->GetName(), (*it)->GetType() ); } /* Now write the user defined event */ for (uit = TheEventDB().begin(); uit != TheEventDB().end(); uit++) { int monoinc = 0; if ((*uit)->GetMonotonicallyIncreasing()) { /* if it is true */ monoinc = 1; } DEBUGPROFMSG("Node: "<< RtsLayer::myNode() << " Dumping EDF Id : " << (*uit)->GetEventId() << " " << monoinc<<" " << (*uit)->GetEventName() << " " << " TriggerValue" << endl;); fprintf(fp, "%ld TAUEVENT %d \"%s\" TriggerValue\n", (*uit)->GetEventId(), monoinc, (*uit)->GetEventName()); } // Now add the nine extra events fprintf(fp,"%ld TRACER 0 \"EV_INIT\" none\n", (long) PCXX_EV_INIT); fprintf(fp,"%ld TRACER 0 \"FLUSH_ENTER\" none\n", (long) PCXX_EV_FLUSH_ENTER); fprintf(fp,"%ld TRACER 0 \"FLUSH_EXIT\" none\n", (long) PCXX_EV_FLUSH_EXIT); fprintf(fp,"%ld TRACER 0 \"FLUSH_CLOSE\" none\n", (long) PCXX_EV_CLOSE); fprintf(fp,"%ld TRACER 0 \"FLUSH_INITM\" none\n", (long) PCXX_EV_INITM); fprintf(fp,"%ld TRACER 0 \"WALL_CLOCK\" none\n", (long) PCXX_EV_WALL_CLOCK); fprintf(fp,"%ld TRACER 0 \"CONT_EVENT\" none\n", (long) PCXX_EV_CONT_EVENT); fprintf(fp,"%ld TAU_MESSAGE -7 \"MESSAGE_SEND\" par\n", (long) TAU_MESSAGE_SEND); fprintf(fp,"%ld TAU_MESSAGE -8 \"MESSAGE_RECV\" par\n", (long) TAU_MESSAGE_RECV); fclose(fp); RtsLayer::UnLockDB(); #endif //TRACING_ON return 1; } ////////////////////////////////////////////////////////////////////// // MergeAndConvertTracesIfNecessary does just that! ////////////////////////////////////////////////////////////////////// int RtsLayer::MergeAndConvertTracesIfNecessary(void) { char *outfile; /* Get environment variables */ if ((outfile = getenv("TAU_TRACEFILE")) != NULL) { /* output file is defined. We need to merge the traces */ /* Now, who does the merge and conversion? */ if ((myNode() == 0) && (myThread() == 0)) { char *outdir; char *keepfiles; char cmd[1024]; char rmcmd[256]; char cdcmd[1024]; char *tauroot=TAUROOT; char *tauarch=TAU_ARCH; char *conv="tau2vtf"; char converter[1024] = {0}; FILE *in; /* If we can't find tau2vtf, use tau_convert! */ sprintf(converter, "%s/%s/bin/%s",tauroot, tauarch, conv); if ((in = fopen(converter, "r")) == NULL) { #ifdef DEBUG_PROF printf("Couldn't open %s\n", converter); #endif /* DEBUG_PROF */ sprintf(converter, "%s/%s/bin/tau_convert", tauroot, tauarch); } else { /* close it */ fclose(in); } /* Should we get rid of intermediate trace files? */ if((keepfiles = getenv("TAU_KEEP_TRACEFILES")) == NULL) { strcpy(rmcmd, "/bin/rm -f app12345678.trc tautrace.*.trc tau.edf events.*.edf"); } else { strcpy(rmcmd," "); /* NOOP */ } /* Next, look for trace directory */ if ((outdir = getenv("TRACEDIR")) != NULL) { /* change directory to outdir */ sprintf(cdcmd, "cd %s;", outdir); } else { strcpy(cdcmd, " "); } /* create the command */ sprintf(cmd, "%s /bin/rm -f app12345678.trc; %s/%s/bin/tau_merge tautrace.*.trc app12345678.trc; %s app12345678.trc tau.edf %s; %s", cdcmd,tauroot, tauarch, converter, outfile, rmcmd); #ifdef DEBUG_PROF printf("The merge/convert cmd is: %s\n", cmd); #endif /* DEBUG_PROF */ /* and execute it */ #ifndef TAU_CATAMOUNT /* NOTE: BGL will not execute this code as well because the compute node kernels cannot fork tasks. So, on BGL, nothing will happen when the following system command executes */ system(cmd); #endif /* TAU_CATAMOUNT */ } /* on node 0, thread 0 */ } /* if output file is defined */ else { /* output file not defined, just exit normally */ return 0; } return 1; } #ifdef __GNUC__ #ifndef NO_RTTI #include #endif /* NO_RTTI */ #endif /* __GNUC__ */ ///////////////////////////////////////////////////////////////////////// std::string RtsLayer::GetRTTI(const char *name) { #ifdef __GNUC__ #ifndef NO_RTTI std::size_t len; int stat; char *ptr = NULL; const std::string mangled = name; return abi::__cxa_demangle(mangled.c_str(), ptr, &len, &stat); #else /* NO_RTTI */ return string(name); #endif /* NO_RTTI */ #else return string(CheckNotNull(name)); #endif /* GNUC */ } /*************************************************************************** * $RCSfile: RtsLayer.cpp,v $ $Author: anataraj $ * $Revision: 1.85 $ $Date: 2007/04/19 03:21:45 $ * POOMA_VERSION_ID: $Id: RtsLayer.cpp,v 1.85 2007/04/19 03:21:45 anataraj Exp $ ***************************************************************************/ tau-2.16.4/src/Profile/RtsThread.cpp000066400000000000000000000300341062343042700171710ustar00rootroot00000000000000/**************************************************************************** ** TAU Portable Profiling Package ** ** http://www.cs.uoregon.edu/research/tau ** ***************************************************************************** ** Copyright 1997 ** ** Department of Computer and Information Science, University of Oregon ** ** Advanced Computing Laboratory, Los Alamos National Laboratory ** ****************************************************************************/ /*************************************************************************** ** File : RtsThread.cpp ** ** Description : TAU Profiling Package RTS Layer definitions ** ** for supporting threads ** ** Author : Sameer Shende ** ** Contact : sameer@cs.uoregon.edu sameer@acl.lanl.gov ** ** Flags : Compile with ** ** -DPROFILING_ON to enable profiling (ESSENTIAL) ** ** -DPROFILE_STATS for Std. Deviation of Excl Time ** ** -DSGI_HW_COUNTERS for using SGI counters ** ** -DPROFILE_CALLS for trace of each invocation ** ** -DSGI_TIMERS for SGI fast nanosecs timer ** ** -DTULIP_TIMERS for non-sgi Platform ** ** -DPOOMA_STDSTL for using STD STL in POOMA src ** ** -DPOOMA_TFLOP for Intel Teraflop at SNL/NM ** ** -DPOOMA_KAI for KCC compiler ** ** -DDEBUG_PROF for internal debugging messages ** ** -DPROFILE_CALLSTACK to enable callstack traces ** ** Documentation : See http://www.cs.uoregon.edu/research/tau ** ***************************************************************************/ ////////////////////////////////////////////////////////////////////// // Include Files ////////////////////////////////////////////////////////////////////// #ifdef TAU_DOT_H_LESS_HEADERS #include using namespace std; #else /* TAU_DOT_H_LESS_HEADERS */ #include #endif /* TAU_DOT_H_LESS_HEADERS */ #include "Profile/Profiler.h" #include "Profile/OpenMPLayer.h" #ifdef TRACING_ON #define PCXX_EVENT_SRC #include "Profile/pcxx_events.h" void TraceCallStack(int tid, Profiler *current); #endif // TRACING_ON #include #ifdef TAUKTAU #include #ifdef TAUKTAU_MERGE #include #endif //TAUKTAU_MERGE #ifdef TAUKTAU_SHCTR #include #endif //TAUKTAU_SHCTR #endif //TAUKTAU ////////////////////////////////////////////////////////////////////// // myNode() returns the current node id (0..N-1) ////////////////////////////////////////////////////////////////////// int RtsLayer::myNode(void) { #ifdef TAU_PID_AS_NODE return getpid(); #endif return TheNode(); } ////////////////////////////////////////////////////////////////////// // myContext() returns the current context id (0..N-1) ////////////////////////////////////////////////////////////////////// int RtsLayer::myContext(void) { return TheContext(); } ////////////////////////////////////////////////////////////////////// // myNode() returns the current node id (0..N-1) ////////////////////////////////////////////////////////////////////// int RtsLayer::myThread(void) { #ifdef PTHREADS return PthreadLayer::GetThreadId(); #elif TAU_SPROC return SprocLayer::GetThreadId(); #elif TAU_WINDOWS return WindowsThreadLayer::GetThreadId(); #elif TULIPTHREADS return TulipThreadLayer::GetThreadId(); #elif JAVA return JavaThreadLayer::GetThreadId(); // C++ app shouldn't use this unless there's a VM #elif TAU_OPENMP return OpenMPLayer::GetThreadId(); #elif TAU_PAPI_THREADS return PapiThreadLayer::GetThreadId(); #else // if no other thread package is available return 0; #endif // PTHREADS } ////////////////////////////////////////////////////////////////////// // RegisterThread is called before any other profiling function in a // thread that is spawned off ////////////////////////////////////////////////////////////////////// void RtsLayer::RegisterThread() { /* Check the size of threads */ LockEnv(); static int numthreads = 1; numthreads ++; if (numthreads >= TAU_MAX_THREADS) { fprintf(stderr, "TAU: RtsLayer: Max thread limit (%d) exceeded. Please re-configure TAU with -useropt=-DTAU_MAX_THREADS=\n", numthreads); } UnLockEnv(); #ifdef PTHREADS PthreadLayer::RegisterThread(); #elif TAU_SPROC SprocLayer::RegisterThread(); #elif TAU_WINDOWS WindowsThreadLayer::RegisterThread(); #elif TULIPTHREADS TulipThreadLayer::RegisterThread(); #elif TAU_OPENMP OpenMPLayer::RegisterThread(); #elif TAU_PAPI_THREADS PapiThreadLayer::RegisterThread(); #endif // PTHREADS // Note: Java thread registration is done at the VM layer in TauJava.cpp return; } ////////////////////////////////////////////////////////////////////// // RegisterFork is called before any other profiling function in a // process that is forked off (child process) ////////////////////////////////////////////////////////////////////// void RtsLayer::RegisterFork(int nodeid, enum TauFork_t opcode) { #ifdef PROFILING_ON vector::iterator it; Profiler *current; #endif // PROFILING_ON #ifdef TAUKTAU //If KTAU profiling (esp. merged, but even non-merged) is on //then we ALWAYS do EXCLUDE_PARENT - i.e. KTAU doesnt currently //support INCLUDE_PARENT. Unlike in the case of TAU, there is a // LOT of extra work that needs to be done in KTAU for INCLUDE. // - TODO. : AN opcode = TAU_EXCLUDE_PARENT_DATA; DEBUGPROFMSG("KTAU Profiling On. Currently only supports EXCLUDE-PARENT on RegisterFork." << endl;); #endif //TAUKTAU #ifdef TAU_PAPI // PAPI must be reinitialized in the child PapiLayer::reinitializePAPI(); #endif #ifdef TAUKTAU_SHCTR KtauCounters::RegisterFork(opcode);//forking needs to be tested further #endif // TAUKTAU_SHCTR TAU_PROFILE_SET_NODE(nodeid); // First, set the new id if (opcode == TAU_EXCLUDE_PARENT_DATA) { // If opcode is TAU_EXCLUDE_PARENT_DATA then we clear out the // previous values in the TheFunctionDB() // Get the current time #ifndef TAU_MULTIPLE_COUNTERS double CurrentTimeOrCounts = getUSecD(myThread()); #else //TAU_MULTIPLE_COUNTERS double CurrentTimeOrCounts[MAX_TAU_COUNTERS]; for(int i=0;iSetCalls(tid, 0); (*it)->SetSubrs(tid, 0); #ifndef TAU_MULTIPLE_COUNTERS (*it)->SetExclTime(tid, 0); (*it)->SetInclTime(tid, 0); #else //TAU_MULTIPLE_COUNTERS (*it)->SetExclTimeZero(tid); (*it)->SetInclTimeZero(tid); #endif//TAU_MULTIPLE_COUNTERS #ifdef PROFILE_STATS (*it)->SetSumExclSqr(tid, 0); #endif // PROFILE_STATS /* Do we need to change AlreadyOnStack? No*/ DEBUGPROFMSG("FI Zap: Inside "<< (*it)->GetName() <ResetAllCounters(tid): Func:"<< (*it)->GetName() <GetKtauFuncInfo(tid)->ResetAllCounters(tid); #endif //TAUKTAU_MERGE } #ifdef TAUKTAU_MERGE DEBUGPROFMSG("RtsLayer::RegisterFork: KtauFuncInfo::ResetAllGrpTotals(tid)"<ThisFunction->GetName() <ThisFunction->IncrNumCalls(tid); if (current->ParentProfiler != 0) { // Increment the number of called functions in its parent current->ParentProfiler->ThisFunction->IncrNumSubrs(tid); } #ifndef TAU_MULTIPLE_COUNTERS current->StartTime = CurrentTimeOrCounts; #else //TAU_MULTIPLE_COUNTERS for(int j=0;jStartTime[j] = CurrentTimeOrCounts[j]; } #endif//TAU_MULTIPLE_COUNTERS #if ( defined(PROFILE_CALLS) || defined(PROFILE_STATS) || defined(PROFILE_CALLSTACK) ) current->ExclTimeThisCall = 0; #endif // PROFILE_CALLS || PROFILE_STATS || PROFILE_CALLSTACK current = current->ParentProfiler; } // Until the top of the stack #endif // PROFILING_ON #ifdef TRACING_ON DEBUGPROFMSG("Tracing Correct: "<ThisKtauProfiler->RegisterFork(Profiler::CurrentProfiler[tid], tid, nodeid, opcode); } #endif //TAUKTAU } // for tid loop // DONE! } // If it is TAU_INCLUDE_PARENT_DATA then there's no need to do anything. // fork would copy over all the parent data as it is. } ////////////////////////////////////////////////////////////////////// // This ensure that the FunctionDB (global) is locked while updating ////////////////////////////////////////////////////////////////////// void RtsLayer::LockDB(void) { #ifdef PTHREADS PthreadLayer::LockDB(); #elif TAU_SPROC SprocLayer::LockDB(); #elif TAU_WINDOWS WindowsThreadLayer::LockDB(); #elif TULIPTHREADS TulipThreadLayer::LockDB(); #elif JAVA JavaThreadLayer::LockDB(); #elif TAU_OPENMP OpenMPLayer::LockDB(); #elif TAU_PAPI_THREADS PapiThreadLayer::LockDB(); #endif // PTHREADS return ; // do nothing if threads are not used } ////////////////////////////////////////////////////////////////////// // This ensure that the FunctionDB (global) is locked while updating ////////////////////////////////////////////////////////////////////// void RtsLayer::UnLockDB(void) { #ifdef PTHREADS PthreadLayer::UnLockDB(); #elif TAU_SPROC SprocLayer::UnLockDB(); #elif TAU_WINDOWS WindowsThreadLayer::UnLockDB(); #elif TULIPTHREADS TulipThreadLayer::UnLockDB(); #elif JAVA JavaThreadLayer::UnLockDB(); #elif TAU_OPENMP OpenMPLayer::UnLockDB(); #elif TAU_PAPI_THREADS PapiThreadLayer::UnLockDB(); #endif // PTHREADS return; } ////////////////////////////////////////////////////////////////////// // This ensure that the FunctionEnv (global) is locked while updating ////////////////////////////////////////////////////////////////////// void RtsLayer::LockEnv(void) { #ifdef PTHREADS PthreadLayer::LockEnv(); #elif TAU_SPROC SprocLayer::LockEnv(); #elif TAU_WINDOWS WindowsThreadLayer::LockEnv(); #elif TULIPTHREADS TulipThreadLayer::LockEnv(); #elif JAVA JavaThreadLayer::LockEnv(); #elif TAU_OPENMP OpenMPLayer::LockEnv(); #elif TAU_PAPI_THREADS PapiThreadLayer::LockEnv(); #endif // PTHREADS return ; // do nothing if threads are not used } ////////////////////////////////////////////////////////////////////// // This ensure that the FunctionEnv (global) is locked while updating ////////////////////////////////////////////////////////////////////// void RtsLayer::UnLockEnv(void) { #ifdef PTHREADS PthreadLayer::UnLockEnv(); #elif TAU_SPROC SprocLayer::UnLockEnv(); #elif TAU_WINDOWS WindowsThreadLayer::UnLockEnv(); #elif TULIPTHREADS TulipThreadLayer::UnLockEnv(); #elif JAVA JavaThreadLayer::UnLockEnv(); #elif TAU_OPENMP OpenMPLayer::UnLockEnv(); #elif TAU_PAPI_THREADS PapiThreadLayer::UnLockEnv(); #endif // PTHREADS return; } /*************************************************************************** * $RCSfile: RtsThread.cpp,v $ $Author: anataraj $ * $Revision: 1.25 $ $Date: 2007/04/19 03:21:45 $ * VERSION: $Id: RtsThread.cpp,v 1.25 2007/04/19 03:21:45 anataraj Exp $ ***************************************************************************/ tau-2.16.4/src/Profile/SprocLayer.cpp000066400000000000000000000223121062343042700173540ustar00rootroot00000000000000/**************************************************************************** ** TAU Portable Profiling Package ** ** http://www.cs.uoregon.edu/research/tau ** ***************************************************************************** ** Copyright 1997 ** ** Department of Computer and Information Science, University of Oregon ** ** Advanced Computing Laboratory, Los Alamos National Laboratory ** ****************************************************************************/ /*************************************************************************** ** File : SprocLayer.cpp ** ** Description : TAU Profiling Package RTS Layer definitions ** ** for supporting pthreads ** ** Author : Sameer Shende ** ** Contact : sameer@cs.uoregon.edu sameer@acl.lanl.gov ** ** Flags : Compile with ** ** -DPROFILING_ON to enable profiling (ESSENTIAL) ** ** -DPROFILE_STATS for Std. Deviation of Excl Time ** ** -DSGI_HW_COUNTERS for using SGI counters ** ** -DPROFILE_CALLS for trace of each invocation ** ** -DSGI_TIMERS for SGI fast nanosecs timer ** ** -DTULIP_TIMERS for non-sgi Platform ** ** -DPOOMA_STDSTL for using STD STL in POOMA src ** ** -DPOOMA_TFLOP for Intel Teraflop at SNL/NM ** ** -DPOOMA_KAI for KCC compiler ** ** -DDEBUG_PROF for internal debugging messages ** ** -DPROFILE_CALLSTACK to enable callstack traces ** ** Documentation : See http://www.cs.uoregon.edu/research/tau ** ***************************************************************************/ ////////////////////////////////////////////////////////////////////// // Include Files ////////////////////////////////////////////////////////////////////// //#define DEBUG_PROF #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #ifdef TAU_DOT_H_LESS_HEADERS #include #include using namespace std; #else /* TAU_DOT_H_LESS_HEADERS */ #include #include #endif /* TAU_DOT_H_LESS_HEADERS */ #include "Profile/Profiler.h" #define TAU_SYNC_SPROC ///////////////////////////////////////////////////////////////////////// // Member Function Definitions For class SprocLayer // This allows us to get thread ids from 0..N-1 instead of long nos // as generated by getpid() ///////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////// // Define the static private members of SprocLayer ///////////////////////////////////////////////////////////////////////// usptr_t * SprocLayer::tauArena = NULL; int SprocLayer::tauThreadCount = 0; usema_t * SprocLayer::tauDBMutex = NULL; usema_t * SprocLayer::tauEnvMutex = NULL; usema_t * SprocLayer::tauThreadCountMutex = NULL; map >& TheTauPidSprocMap(void) { static map > TauPidMap; return TauPidMap; } //////////////////////////////////////////////////////////////////////// // RegisterThread() should be called before any profiling routines are // invoked. This routine sets the thread id that is used by the code in // FunctionInfo and Profiler classes. This should be the first routine a // thread should invoke from its wrapper. Note: main() thread shouldn't // call this routine. //////////////////////////////////////////////////////////////////////// int SprocLayer::RegisterThread(void) { if (uspsema(tauThreadCountMutex) == -1) perror("TAU ERROR: SprocLayer.cpp: SprocLayer::RegisterThread uspsema"); TheTauPidSprocMap()[getpid()] = ++SprocLayer::tauThreadCount; if (usvsema(tauThreadCountMutex) == -1) perror("TAU ERROR: SprocLayer.cpp: SprocLayer::RegisterThread usvsema"); DEBUGPROFMSG("Thread id "<< tauThreadCount<< " Created! "< >::iterator it; int pid = getpid(); int tid; // Each sproc thread has a unique pid (not in 0..N-1 range) // This method converts it to that range as follows: #ifdef TAU_SYNC_SPROC if (uspsema(tauThreadCountMutex) == -1) perror("TAU ERROR: SprocLayer.cpp: SprocLayer::GetThreadId uspsema"); #endif /* TAU_SYNC_SPROC */ if ((it = TheTauPidSprocMap().find(pid))== TheTauPidSprocMap().end()) tid = 0; // Main thread doesn't do RegsiterThread else tid = TheTauPidSprocMap()[pid]; // Threads 1..N-1 #ifdef TAU_SYNC_SPROC if (usvsema(tauThreadCountMutex) == -1) perror("TAU ERROR: SprocLayer.cpp: SprocLayer::GetThreadId usvsema"); #endif /* TAU_SYNC_SPROC */ return tid; } //////////////////////////////////////////////////////////////////////// // InitializeThreadData is called before any thread operations are performed. // It sets the default values for static private data members of the // SprocLayer class. //////////////////////////////////////////////////////////////////////// int SprocLayer::InitializeThreadData(void) { static int flag = 0; if (flag == 0) { flag = 1; // Initialize the mutex tauArena = usinit("/dev/zero"); if (!tauArena) perror("TAU ERROR: SprocLayer.cpp InitializeThreadData(): Arena /dev/zero not initialized!"); tauDBMutex = usnewsema(tauArena, 1); tauEnvMutex = usnewsema(tauArena, 1); tauThreadCountMutex = usnewsema(tauArena, 1); DEBUGPROFMSG("SprocLayer::Initialize() done! " < using namespace std; #else /* TAU_DOT_H_LESS_HEADERS */ #include #endif /* TAU_DOT_H_LESS_HEADERS */ #include "Profile/Profiler.h" #include #include #if (!defined(TAU_WINDOWS)) /* Needed for fork */ #include #include #endif /* TAU_WINDOWS */ /////////////////////////////////////////////////////////////////////////// // Wrappers for corresponding C++ functions follow /* Note: Our old scheme relied on getting a profiler object. This doesn't work well with threads, all threads start/stop the same profiler & profiler is supposed to be for each invocation (thread) as it has a single scalar for storing StartTime. So, we changed this so that each Tau_get_profiler returns a functionInfo object which can then have independent profilers associated with it. Each start/stop timer call creates and destroys a profiler object now. Since the Fortran layer is built atop the C layer, it remains unchanged. However, we should probably change the name of this method to Tau_get_functioninfo or something. */ /////////////////////////////////////////////////////////////////////////// extern "C" void * Tau_get_profiler(char *fname, char *type, TauGroup_t group, char *gr_name) { FunctionInfo *f; //Profiler *p; DEBUGPROFMSG("Inside get_profiler group = " << group<GetProfileGroup(); if (gr & RtsLayer::TheProfileMask()) { Profiler *p = new Profiler(f, gr, true); /* #pragma omp critical printf("START tid = %d, profiler= %x\n", RtsLayer::myThread(), p); */ #ifdef TAU_PROFILEPHASE if (phase) p->SetPhase(true); else p->SetPhase(false); #endif /* TAU_PROFILEPHASE */ p->Start(); } } /////////////////////////////////////////////////////////////////////////// extern "C" void Tau_stop_timer(void * function_info) { FunctionInfo *f = (FunctionInfo *) function_info; if (f->GetProfileGroup() & RtsLayer::TheProfileMask()) { Profiler *p = Profiler::CurrentProfiler[RtsLayer::myThread()]; /* #pragma omp critical printf("STOP tid = %d, profiler= %x\n", RtsLayer::myThread(), p); */ if (p->ThisFunction != f) { printf("TAU: Runtime overlap in timers: %s and %s\n", p->ThisFunction->GetName(), f->GetName()); } p->Stop(); delete p; } } /////////////////////////////////////////////////////////////////////////// extern "C" void Tau_exit(char * msg) { TAU_PROFILE_EXIT(msg); } /////////////////////////////////////////////////////////////////////////// extern "C" void Tau_init_ref(int* argc, char ***argv) { TAU_INIT(argc, argv); } /////////////////////////////////////////////////////////////////////////// extern "C" void Tau_init(int argc, char **argv) { TAU_PROFILE_INIT(argc, argv); } /////////////////////////////////////////////////////////////////////////// extern "C" void Tau_set_node(int node) { TAU_PROFILE_SET_NODE(node); } /////////////////////////////////////////////////////////////////////////// extern "C" void Tau_set_context(int context) { TAU_PROFILE_SET_CONTEXT(context); } /////////////////////////////////////////////////////////////////////////// extern "C" void Tau_profile_callstack(void) { TAU_PROFILE_CALLSTACK(); } /////////////////////////////////////////////////////////////////////////// extern "C" int Tau_dump(void) { return TAU_DB_DUMP(); } /////////////////////////////////////////////////////////////////////////// extern "C" int Tau_dump_prefix(char *prefix) { return TAU_DB_DUMP_PREFIX(prefix); } /////////////////////////////////////////////////////////////////////////// extern "C" int Tau_dump_incr(void) { return TAU_DB_DUMP_INCR(); } /////////////////////////////////////////////////////////////////////////// extern "C" void Tau_purge(void) { TAU_DB_PURGE(); } extern "C" void Tau_the_function_list(const char ***functionList, int *num) { TAU_GET_FUNC_NAMES(*functionList, *num); } /////////////////////////////////////////////////////////////////////////// extern "C" void Tau_dump_function_names() { TAU_DUMP_FUNC_NAMES(); } /////////////////////////////////////////////////////////////////////////// extern "C" void Tau_the_counter_names(const char **counterList, int num) { TAU_GET_COUNTER_NAMES(counterList, num); } /////////////////////////////////////////////////////////////////////////// extern "C" void Tau_get_function_values(const char **inFuncs, int numOfFuncs, double ***counterExclusiveValues, double ***counterInclusiveValues, int **numOfCalls, int **numOfSubRoutines, const char ***counterNames, int *numOfCounters) { TAU_GET_FUNC_VALS(inFuncs,numOfFuncs,*counterExclusiveValues,*counterInclusiveValues, *numOfCalls,*numOfSubRoutines,*counterNames,*numOfCounters); } /////////////////////////////////////////////////////////////////////////// extern "C" void Tau_get_event_names(const char ***eventList, int *num) { TAU_GET_EVENT_NAMES(*eventList, *num); } /////////////////////////////////////////////////////////////////////////// extern "C" void Tau_get_event_vals(const char **inUserEvents, int numUserEvents, int **numEvents, double **max, double **min, double **mean, double **sumSqr) { TAU_GET_EVENT_VALS(inUserEvents, numUserEvents, *numEvents, *max, *min, *mean, *sumSqr); } /////////////////////////////////////////////////////////////////////////// extern "C" void Tau_dump_function_values(const char **functionList, int num) { TAU_DUMP_FUNC_VALS(functionList,num); } /////////////////////////////////////////////////////////////////////////// extern "C" void Tau_dump_function_values_incr(const char **functionList, int num) { TAU_DUMP_FUNC_VALS_INCR(functionList,num); } /////////////////////////////////////////////////////////////////////////// extern "C" void Tau_register_thread(void) { TAU_REGISTER_THREAD(); } /////////////////////////////////////////////////////////////////////////// extern "C" void Tau_register_fork(int nodeid, enum TauFork_t opcode) { TAU_REGISTER_FORK(nodeid, opcode); } /////////////////////////////////////////////////////////////////////////// extern "C" void Tau_enable_instrumentation(void) { TAU_ENABLE_INSTRUMENTATION(); } /////////////////////////////////////////////////////////////////////////// extern "C" void Tau_disable_instrumentation(void) { TAU_DISABLE_INSTRUMENTATION(); } /////////////////////////////////////////////////////////////////////////// extern "C" void Tau_shutdown(void) { RtsLayer::TheShutdown() = true; TAU_DISABLE_INSTRUMENTATION(); } /////////////////////////////////////////////////////////////////////////// extern "C" TauGroup_t Tau_enable_group_name(char * group) { return TAU_ENABLE_GROUP_NAME(group); } /////////////////////////////////////////////////////////////////////////// extern "C" TauGroup_t Tau_disable_group_name(char * group) { return TAU_DISABLE_GROUP_NAME(group); } /////////////////////////////////////////////////////////////////////////// extern "C" TauGroup_t Tau_get_profile_group(char * group) { return TAU_GET_PROFILE_GROUP(group); } /////////////////////////////////////////////////////////////////////////// extern "C" void Tau_enable_group(TauGroup_t group) { TAU_ENABLE_GROUP(group); } /////////////////////////////////////////////////////////////////////////// extern "C" void Tau_disable_group(TauGroup_t group) { TAU_DISABLE_GROUP(group); } /////////////////////////////////////////////////////////////////////////// extern "C" TauGroup_t Tau_enable_all_groups(void) { return TAU_ENABLE_ALL_GROUPS(); } /////////////////////////////////////////////////////////////////////////// extern "C" TauGroup_t Tau_disable_all_groups(void) { return TAU_DISABLE_ALL_GROUPS(); } /* TAU's totalnodes implementation follows */ /////////////////////////////////////////////////////////////////////////// extern "C" int& tau_totalnodes(int set_or_get, int value) { static int nodes = 1; if (set_or_get == 1) /* SET (in is 1) , GET (out is 0) */ { nodes = value; } return nodes; } #ifdef TAU_MPI #define TAU_GEN_EVENT(e, msg) TauUserEvent& e () { \ static TauUserEvent u(msg); return u; } TAU_GEN_EVENT(TheSendEvent,"Message size sent to all nodes") TAU_GEN_EVENT(TheRecvEvent,"Message size received from all nodes") TAU_GEN_EVENT(TheBcastEvent,"Message size for broadcast") TAU_GEN_EVENT(TheReduceEvent,"Message size for reduce") TAU_GEN_EVENT(TheReduceScatterEvent,"Message size for reduce-scatter") TAU_GEN_EVENT(TheScanEvent,"Message size for scan") TAU_GEN_EVENT(TheAllReduceEvent,"Message size for all-reduce") TAU_GEN_EVENT(TheAlltoallEvent,"Message size for all-to-all") TAU_GEN_EVENT(TheScatterEvent,"Message size for scatter") TAU_GEN_EVENT(TheGatherEvent,"Message size for gather") TAU_GEN_EVENT(TheAllgatherEvent,"Message size for all-gather") TauUserEvent**& TheMsgVolEvent() { static TauUserEvent **u = 0; return u; } int register_events(void) { #ifdef TAU_EACH_SEND char str[256]; int i; TheMsgVolEvent() = (TauUserEvent **) malloc(sizeof(TauUserEvent *)*tau_totalnodes(0,0)); for (i =0; i < tau_totalnodes(0,0); i++) { sprintf(str, "Message size sent to node %d", i); TheMsgVolEvent()[i] = (TauUserEvent *) new TauUserEvent((const char *)str); } #endif /* TAU_EACH_SEND */ return 0; } /////////////////////////////////////////////////////////////////////////// extern "C" void Tau_trace_sendmsg(int type, int destination, int length) { static int initialize = register_events(); #ifdef TAU_PROFILEPARAM #ifndef TAU_DISABLE_PROFILEPARAM_IN_MPI static string s("message size"); TAU_PROFILE_PARAM1L(length, s); #endif /* TAU_DISABLE_PROFILEPARAM_IN_MPI */ #endif /* TAU_PROFILEPARAM */ #ifdef DEBUG_PROF printf("Node %d: Tau_trace_sendmsg: type %d dest %d len %d\n", RtsLayer::myNode(), type, destination, length); #endif /* DEBUG_PROF */ TAU_EVENT(TheSendEvent(), length); #ifdef TAU_EACH_SEND TheMsgVolEvent()[destination]->TriggerEvent(length, RtsLayer::myThread()); #endif /* TAU_EACH_SEND */ if (destination >= 0) TAU_TRACE_SENDMSG(type, destination, length); } /////////////////////////////////////////////////////////////////////////// extern "C" void Tau_trace_recvmsg(int type, int source, int length) { TAU_EVENT(TheRecvEvent(), length); #ifdef TAU_PROFILEPARAM #ifndef TAU_DISABLE_PROFILEPARAM_IN_MPI static string s("message size"); TAU_PROFILE_PARAM1L(length, s); #endif /* TAU_DISABLE_PROFILEPARAM_IN_MPI */ #endif /* TAU_PROFILEPARAM */ if (source >= 0) TAU_TRACE_RECVMSG(type, source, length); } extern "C" void Tau_bcast_data(int data) { TAU_EVENT(TheBcastEvent(), data); } extern "C" void Tau_reduce_data(int data) { TAU_EVENT(TheReduceEvent(), data); } extern "C" void Tau_alltoall_data(int data) { TAU_EVENT(TheAlltoallEvent(), data); } extern "C" void Tau_scatter_data(int data) { TAU_EVENT(TheScatterEvent(), data); } extern "C" void Tau_gather_data(int data) { TAU_EVENT(TheGatherEvent(), data); } extern "C" void Tau_allgather_data(int data) { TAU_EVENT(TheAllgatherEvent(), data); } extern "C" void Tau_allreduce_data(int data) { TAU_EVENT(TheGatherEvent(), data); } extern "C" void Tau_scan_data(int data) { TAU_EVENT(TheScanEvent(), data); } extern "C" void Tau_reducescatter_data(int data) { TAU_EVENT(TheReduceScatterEvent(), data); } #else /* !TAU_MPI */ /////////////////////////////////////////////////////////////////////////// extern "C" void Tau_trace_sendmsg(int type, int destination, int length) { TAU_TRACE_SENDMSG(type, destination, length); } /////////////////////////////////////////////////////////////////////////// extern "C" void Tau_trace_recvmsg(int type, int source, int length) { TAU_TRACE_RECVMSG(type, source, length); } #endif /* TAU_MPI */ /////////////////////////////////////////////////////////////////////////// // User Defined Events /////////////////////////////////////////////////////////////////////////// extern "C" void * Tau_get_userevent(char *name) { TauUserEvent *ue; ue = new TauUserEvent(name); return (void *) ue; } /////////////////////////////////////////////////////////////////////////// extern "C" void Tau_userevent(void *ue, double data) { TauUserEvent *t = (TauUserEvent *) ue; t->TriggerEvent(data); } /////////////////////////////////////////////////////////////////////////// extern "C" void * Tau_get_context_userevent(char *name) { TauContextUserEvent *ue; ue = new TauContextUserEvent(name); return (void *) ue; } /////////////////////////////////////////////////////////////////////////// extern "C" void Tau_context_userevent(void *ue, double data) { TauContextUserEvent *t = (TauContextUserEvent *) ue; t->TriggerEvent(data); } /////////////////////////////////////////////////////////////////////////// extern "C" void Tau_set_event_name(void *ue, char *name) { TauUserEvent *t = (TauUserEvent *) ue; t->SetEventName(name); } /////////////////////////////////////////////////////////////////////////// extern "C" void Tau_report_statistics(void) { TAU_REPORT_STATISTICS(); } /////////////////////////////////////////////////////////////////////////// extern "C" void Tau_report_thread_statistics(void) { TAU_REPORT_THREAD_STATISTICS(); } /////////////////////////////////////////////////////////////////////////// extern "C" void Tau_event_disable_min(void *ue) { TauUserEvent *t = (TauUserEvent *) ue; t->SetDisableMin(true); } /////////////////////////////////////////////////////////////////////////// extern "C" void Tau_event_disable_max(void *ue) { TauUserEvent *t = (TauUserEvent *) ue; t->SetDisableMax(true); } /////////////////////////////////////////////////////////////////////////// extern "C" void Tau_event_disable_mean(void *ue) { TauUserEvent *t = (TauUserEvent *) ue; t->SetDisableMean(true); } /////////////////////////////////////////////////////////////////////////// extern "C" void Tau_event_disable_stddev(void *ue) { TauUserEvent *t = (TauUserEvent *) ue; t->SetDisableStdDev(true); } /////////////////////////////////////////////////////////////////////////// extern "C" void Tau_profile_c_timer(void **ptr, char *fname, char *type, TauGroup_t group, char *group_name) { #ifdef DEBUG_PROF printf("Inside Tau_profile_timer_ fname=%s *ptr = %x\n", fname, *ptr); #endif /* DEBUG_PROF */ if (*ptr == 0) { RtsLayer::LockEnv(); if (*ptr == 0) { // remove garbage characters from the end of name for(int i=0; iParentProfiler == NULL && strcmp(Profiler::CurrentProfiler[tid]->ThisFunction->GetName(), ".TAU application") == 0) { DEBUGPROFMSG("Found top level .TAU application timer"<GetAllGroups()); fptr->SetPrimaryGroupName(newgroup); } /////////////////////////////////////////////////////////////////////////// extern "C" void Tau_profile_param1l(long data, const char * dataname) { string dname(dataname); TAU_PROFILE_PARAM1L(data, dname); } /* The following is for supporting pure and elemental fortran subroutines */ static map pureMap; extern "C" void Tau_pure_start(char *name) { FunctionInfo *fi = 0; string n = string(name); map::iterator it = pureMap.find(n); if (it == pureMap.end()) { tauCreateFI(&fi,n,"",TAU_USER,"TAU_USER"); pureMap[n] = fi; } else { fi = (*it).second; } Tau_start_timer(fi,0); } extern "C" void Tau_pure_stop(char *name) { FunctionInfo *fi; string n = string(name); map::iterator it = pureMap.find(n); if (it == pureMap.end()) { fprintf (stderr, "\nTAU Error: Routine \"%s\" does not exist, did you misspell it with TAU_STOP()?\nTAU Error: You will likely get an overlapping timer message next\n\n", name); } else { fi = (*it).second; Tau_stop_timer(fi); } } #if (!defined(TAU_WINDOWS)) extern "C" pid_t tau_fork() { pid_t pid; pid = fork(); #ifdef TAU_WRAP_FORK if (pid == 0) { TAU_REGISTER_FORK(getpid(), TAU_EXCLUDE_PARENT_DATA); // fprintf (stderr, "[%d] Registered Fork!\n", getpid()); } else { /* nothing */ } #endif return pid; } #endif /* TAU_WINDOWS */ ////////////////////////////////////////////////////////////////////// // Snapshot related routines ////////////////////////////////////////////////////////////////////// extern "C" void Tau_profile_snapshot_1l(char *name, int number) { char buffer[4096]; sprintf (buffer, "%s %d", name, number); Profiler::Snapshot(buffer); } extern "C" void Tau_profile_snapshot(char *name) { Profiler::Snapshot(name); } /*************************************************************************** * $RCSfile: TauCAPI.cpp,v $ $Author: amorris $ * $Revision: 1.62 $ $Date: 2007/03/28 02:55:22 $ * VERSION: $Id: TauCAPI.cpp,v 1.62 2007/03/28 02:55:22 amorris Exp $ ***************************************************************************/ tau-2.16.4/src/Profile/TauCallPath.cpp000066400000000000000000000263011062343042700174350ustar00rootroot00000000000000/**************************************************************************** ** TAU Portable Profiling Package ** ** http://www.cs.uoregon.edu/research/tau ** ***************************************************************************** ** Copyright 1999 ** ** Department of Computer and Information Science, University of Oregon ** ** Advanced Computing Laboratory, Los Alamos National Laboratory ** ****************************************************************************/ /*************************************************************************** ** File : TauCallPath.cpp ** ** Description : TAU Profiling Package ** ** Author : Sameer Shende ** ** Contact : sameer@cs.uoregon.edu sameer@acl.lanl.gov ** ** Flags : Compile with ** ** -DPROFILING_ON to enable profiling (ESSENTIAL) ** ** -DPROFILE_STATS for Std. Deviation of Excl Time ** ** -DSGI_HW_COUNTERS for using SGI counters ** ** -DPROFILE_CALLS for trace of each invocation ** ** -DSGI_TIMERS for SGI fast nanosecs timer ** ** -DTULIP_TIMERS for non-sgi Platform ** ** -DPOOMA_STDSTL for using STD STL in POOMA src ** ** -DPOOMA_TFLOP for Intel Teraflop at SNL/NM ** ** -DPOOMA_KAI for KCC compiler ** ** -DDEBUG_PROF for internal debugging messages ** ** -DPROFILE_CALLSTACK to enable callstack traces ** ** Documentation : See http://www.cs.uoregon.edu/research/tau ** ***************************************************************************/ ////////////////////////////////////////////////////////////////////// // Include Files ////////////////////////////////////////////////////////////////////// //#define DEBUG_PROF // For Debugging Messages from Profiler.cpp #include "Profile/Profiler.h" #include #include #include #include #include #ifdef TAU_DOT_H_LESS_HEADERS #include using namespace std; #else /* TAU_DOT_H_LESS_HEADERS */ #include #endif /* TAU_DOT_H_LESS_HEADERS */ #define TAU_DEFAULT_CALLPATH_DEPTH 2 ////////////////////////////////////////////////////////////////////// // How deep should the callpath be? The default value is 2 ////////////////////////////////////////////////////////////////////// int& TauGetCallPathDepth(void) { char *depth; static int value = 0; #ifdef TAU_PROFILEPHASE value = 2; return value; #endif /* TAU_PROFILEPHASE */ if (value == 0) { if ((depth = getenv("TAU_CALLPATH_DEPTH")) != NULL) { value = atoi(depth); if (value > 1) { return value; } else { value = TAU_DEFAULT_CALLPATH_DEPTH; return value; /* default value */ } } else { value = TAU_DEFAULT_CALLPATH_DEPTH; return value; } } else return value; } ////////////////////////////////////////////////////////////////////// // Global variables (wrapped in routines for static initialization) ///////////////////////////////////////////////////////////////////////// #define TAU_CALLPATH_MAP_TYPE long *, FunctionInfo *, TaultLong ///////////////////////////////////////////////////////////////////////// /* The comparison function for callpath requires the TaultLong struct * to be defined. The operator() method in this struct compares two callpaths. * Since it only compares two arrays of longs (containing addresses), we can * look at the callpath depth as the first index in the two arrays and see if * they're equal. If they two arrays have the same depth, then we iterate * through the array and compare each array element till the end */ ///////////////////////////////////////////////////////////////////////// struct TaultLong { bool operator() (const long *l1, const long *l2) const { int i; /* first check 0th index (size) */ if (l1[0] != l2[0]) return (l1[0] < l2[0]); /* they're equal, see the size and iterate */ for (i = 0; i < l1[0] ; i++) { if (l1[i] != l2[i]) return l1[i] < l2[i]; } return (l1[i] < l2[i]); } }; ///////////////////////////////////////////////////////////////////////// // We use one global map to store the callpath information ///////////////////////////////////////////////////////////////////////// map& TheCallPathMap(void) { // to avoid initialization problems of non-local static variables static map callpathmap; return callpathmap; } ////////////////////////////////////////////////////////////////////// long* TauFormulateComparisonArray(Profiler *p) { int depth = TauGetCallPathDepth(); /* Create a long array with size depth+1. We need to put the depth * in it as the 0th index */ long *ary = new long [depth+1]; int i = 0; int j; Profiler *current = p; /* argument */ /* initialize the array */ for (j = 0; j < depth+1; j++) { ary[j] = 0L; } /* use the clean array now */ if (ary) { ary[0] = depth; /* this tells us how deep it is */ #ifdef TAU_PROFILEPHASE /* if I'm in phase, go upto the profiler that has a phase. if you don't find one then it is the top level profiler */ ary[1] = (long) current->ThisFunction; current = current->ParentProfiler; while (current != NULL) { ary[2] = (long) current->ThisFunction; #ifdef DEBUG_PROF cout <<"Name = "<< current->ThisFunction->GetName()<<" "<< current->ThisFunction->GetType() <<" "; #endif /* DEBUG_PROF */ if (current->GetPhase()) /* Found the parent phase! */ { break; } else current = current->ParentProfiler; } #else /* TAU_PROFILEPHASE */ while (current != NULL && depth != 0) { i++; /* increment i */ ary[i] = (long) current->ThisFunction; depth --; current = current->ParentProfiler; } #endif /* TAU_PROFILEPHASE */ } return ary; } ////////////////////////////////////////////////////////////////////// string * TauFormulateNameString(Profiler *p) { DEBUGPROFMSG("Inside TauFormulateNameString()"< "); string *name = new string(""); #ifdef TAU_PROFILEPHASE while (current != NULL) { if (current != p && (current->GetPhase() || (current->ParentProfiler == (Profiler *) NULL))) { *name = current->ThisFunction->GetName() + string(" ") + current->ThisFunction->GetType() + delimiter + *name; break; /* come out of the loop, got phase name in */ } else { /* keep going */ if (current == p) /* initial name */ { *name = current->ThisFunction->GetName() + string (" ") + current->ThisFunction->GetType(); } current = current->ParentProfiler; } } #else /* TAU_PROFILEPHASE */ while (current != NULL && depth != 0) { if (current != p) *name = current->ThisFunction->GetName() + string(" ") + current->ThisFunction->GetType() + delimiter + *name; else *name = current->ThisFunction->GetName() + string (" ") + current->ThisFunction->GetType(); current = current->ParentProfiler; depth --; } #endif /* TAU_PROFILEPHASE */ DEBUGPROFMSG("TauFormulateNameString:Name: "<<*name <CallPathFunction != 0) { ParentProfiler->CallPathFunction->IncrNumSubrs(tid); } DEBUGPROFMSG("Inside CallPath Start "<GetName()<GetAllGroups()); CallPathFunction = new FunctionInfo(*callpathname, " ", ThisFunction->GetProfileGroup(), (const char*) grname.c_str(), true ); TheCallPathMap().insert(map::value_type(comparison, CallPathFunction)); } else { CallPathFunction = (*it).second; DEBUGPROFMSG("ROUTINE "<<(*it).second->GetName()<<" first = "<<(*it).first<GetName()<SetAlreadyOnStack(false, tid); // while exiting DEBUGPROFMSG("nct "<< RtsLayer::myNode() << "," << RtsLayer::myContext() << "," << tid << " " << "CallPathStop: After SetAlreadyOnStack Going for AddInclTime" <AddInclTime(TotalTime, tid); } CallPathFunction->AddExclTime(TotalTime, tid); DEBUGPROFMSG("Before IncrNumSubr"<CallPathFunction != 0) { /* Increment the parent's NumSubrs and decrease its exclude time */ ParentProfiler->CallPathFunction->ExcludeTime(TotalTime, tid); } DEBUGPROFMSG("After IncrNumSubr"< using namespace std; #endif /* DEBUG_PROF */ #ifndef TAU_MULTIPLE_COUNTERS double& TheTauNullTimerOverhead() { static double over = 0.0; return over; } double& TheTauFullTimerOverhead() { static double full = 0.0; return full; } #else /* TAU_MULTIPLE_COUNTERS */ double*& TheTauNullTimerOverhead() { static double *over = new double[MAX_TAU_COUNTERS]; static int flag = 0; if (flag == 0) { flag = 1; for (int i = 0; i < MAX_TAU_COUNTERS; i++) { over[i] = 0.0; } } return over; } double*& TheTauFullTimerOverhead() { static double *full = new double[MAX_TAU_COUNTERS]; static int flag = 0; if (flag == 0) { flag = 1; for (int i = 0; i < MAX_TAU_COUNTERS; i++) { full[i] = 0.0; } } return full; } #endif /* TAU_MULTIPLE_COUNTERS */ #ifdef TAU_DEPTH_LIMIT int& TauGetDepthLimit(void); #endif /* TAU_DEPTH_LIMIT */ int TauCalibrateNullTimer(void) { TAU_PROFILE_TIMER(tnull, ".TAU null timer overhead", " ", TAU_DEFAULT); TAU_PROFILE_TIMER(tone, ".TAU 1000 null timers overhead", " ", TAU_DEFAULT); int i, tid; double tnull, toverhead; char *iter; int iterations; if ((iter = getenv("TAU_COMPENSATE_ITERATIONS")) == 0) { iterations = 1000; } else { iterations = atoi(iter); } #ifdef TAU_DEPTH_LIMIT int original = TauGetDepthLimit(); TauGetDepthLimit() = INT_MAX; #endif /* TAU_DEPTH_LIMIT */ Tau_create_top_level_timer_if_necessary(); TAU_PROFILE_START(tone); /* nested */ for(i=0; i< iterations; i++) { TAU_PROFILE_START(tnull); TAU_PROFILE_STOP(tnull); } TAU_PROFILE_STOP(tone); Tau_stop_top_level_timer_if_necessary(); #ifdef TAU_DEPTH_LIMIT TauGetDepthLimit() = original; /* reset! */ #endif /* TAU_DEPTH_LIMIT */ /* Get thread id */ tid = RtsLayer::myThread(); int n = tnullfi->GetCalls(tid); #ifndef TAU_MULTIPLE_COUNTERS TheTauNullTimerOverhead() = tnullfi->GetInclTime(tid)/n; /* n*(a+b+c+d) + b+c = tone */ /* a+b+c+d = Toverhead = (tone - tnull) / n */ TheTauFullTimerOverhead() = (tonefi->GetInclTime(tid) - TheTauNullTimerOverhead() ) / n; #else /* TAU_MULTIPLE_COUNTERS */ double *nullincltime = tnullfi->GetInclTime(tid); double *oneincltime = tonefi->GetInclTime(tid); for (i=0; i < MAX_TAU_COUNTERS; i++) { /* n*(a+b+c+d) + b+c = tone */ TheTauNullTimerOverhead()[i] = nullincltime[i]/n; /* a+b+c+d = Toverhead = (tone - tnull) / n */ TheTauFullTimerOverhead()[i] = (oneincltime[i] - TheTauNullTimerOverhead()[i]) / n; } #endif /* TAU_MULTIPLE_COUNTERS */ #ifdef DEBUG_PROF cout <<"Calibrate: Tnull time "<< TheTauNullTimerOverhead() < #include #include #include #include "Profile/ProfileGroups.h" #include "Profile/TauMemory.h" extern "C" void Tau_pure_start(char *name); extern "C" void Tau_pure_stop(char *name); /* #define DEBUG_PROF */ #define VALID_NAME_CHAR(x) (isprint(x)) extern "C" { void * Tau_get_profiler(char *, char *, TauGroup_t, char *gr_name); void Tau_start_timer(void * timer, int phase); void Tau_stop_timer(void *); void Tau_exit(char *); void Tau_init(int, char **); void Tau_enable_group(TauGroup_t group); void Tau_disable_group(TauGroup_t group); void Tau_set_node(int); void Tau_set_context(int); void Tau_register_thread(void); void Tau_enable_instrumentation(void); void Tau_disable_instrumentation(void); void Tau_trace_sendmsg(int type, int destination, int length); void Tau_trace_recvmsg(int type, int source, int length); void * Tau_get_userevent(char *name); void * Tau_get_context_userevent(char *name); void Tau_userevent(void *ue, double data); void Tau_context_userevent(void *ue, double data); void Tau_report_statistics(void); void Tau_report_thread_statistics(void); void Tau_dump(void); void Tau_dump_prefix(char *prefix); void tau_extract_groupinfo(char *& fname, TauGroup_t & gr, char *& gr_name); TauGroup_t Tau_get_profile_group(char * group) ; TauGroup_t Tau_enable_all_groups(void); TauGroup_t Tau_disable_all_groups(void); TauGroup_t Tau_enable_group_name(char *group_name); TauGroup_t Tau_disable_group_name(char *group_name); void Tau_track_memory(void); void Tau_track_memory_here(void); void Tau_track_muse_events(void); void Tau_enable_tracking_memory(void); void Tau_disable_tracking_memory(void); void Tau_enable_tracking_muse_events(void); void Tau_disable_tracking_muse_events(void); void Tau_set_interrupt_interval(int value); void Tau_track_memory_headroom(void); void Tau_track_memory_headroom_here(void); void Tau_enable_tracking_memory_headroom(void); void Tau_disable_tracking_memory_headroom(void); void Tau_mark_group_as_phase(void **ptr); void Tau_profile_callstack(void ); void Tau_profile_snapshot(char *name); void Tau_profile_snapshot_1l(char *name, int number); void Tau_metadata(char *name, char *value); #define EXTRACT_GROUP(n, l, gr, gr_name) TauGroup_t gr; char *gr_name = NULL; tau_extract_groupinfo(n, gr, gr_name); /***************************************************************************** * The following routines are called by the Fortran program and they in turn * invoke the corresponding C routines. *****************************************************************************/ void tau_profile_timer_group_(void **ptr, char *infname, int *group, int slen) { if (*ptr == 0) { char * fname = (char *) malloc((size_t) slen+1); strncpy(fname, infname, slen); fname[slen] = '\0'; #ifdef DEBUG_PROF printf("Inside tau_profile_timer_group_ fname=%s\n", fname); #endif /* DEBUG_PROF */ *ptr = Tau_get_profiler(fname, (char *)" ", *group, fname); } #ifdef DEBUG_PROF printf("get_profiler returns %lx\n", *ptr); #endif /* DEBUG_PROF */ return; } void tau_enable_group_name_local(char *& group_name, int len) { char *name = (char *) malloc(len+1); strncpy(name, group_name, len); name[len]='\0'; Tau_enable_group_name(name); } void tau_disable_group_name_local(char *& group_name, int len) { char *name = (char *) malloc(len+1); strncpy(name, group_name, len); name[len]='\0'; Tau_disable_group_name(name); } void tau_extract_groupinfo(char *& fname, TauGroup_t & gr, char *& gr_name) { /* See if a > appears in the function name. If it does, it separates the group name from the function name. Separate these two */ char *first, *second; first = strtok(fname, ">"); if (first != 0) { second = strtok(NULL, ">"); if (second == NULL) { fname = first; gr = TAU_USER; gr_name = fname; } else { gr = Tau_get_profile_group(first); gr_name = first; fname = second; } } } void tau_pure_start(char *fname, int flen) { // make a copy so that we can null terminate it char *localname = (char *) malloc((size_t)flen+1); strncpy(localname, fname, flen); localname[flen] = '\0'; // check for unprintable characters for(int i=0; i #include #ifdef TAU_LAMPI MPI_Fint TAU_MPI_Request_c2f(MPI_Request c_request) { MPI_Fint f_request; f_request = MPI_Request_c2f(c_request); /* LA-MPI doesn't seem to translate MPI_REQUEST_NULL properly so we'll check for it and set it to the proper value for fortran */ if (c_request == MPI_REQUEST_NULL) { f_request = -1; } return f_request; } #else /* For all other implementations, just #define it to avoid a wrapper function call */ #define TAU_MPI_Request_c2f MPI_Request_c2f #endif /* TAU_LAMPI */ /******************************************************/ /******************************************************/ void mpi_allgather_( sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm , ierr) void * sendbuf; MPI_Fint *sendcount; MPI_Fint *sendtype; void * recvbuf; MPI_Fint *recvcount; MPI_Fint *recvtype; MPI_Fint *comm; MPI_Fint *ierr; { *ierr = MPI_Allgather( sendbuf, *sendcount, MPI_Type_f2c(*sendtype), recvbuf, *recvcount, MPI_Type_f2c(*recvtype), MPI_Comm_f2c(*comm) ); } void mpi_allgather__( sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm , ierr) void * sendbuf; MPI_Fint *sendcount; MPI_Fint *sendtype; void * recvbuf; MPI_Fint *recvcount; MPI_Fint *recvtype; MPI_Fint *comm; MPI_Fint *ierr; { mpi_allgather_( sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm , ierr); } void MPI_ALLGATHER( sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm , ierr) void * sendbuf; MPI_Fint *sendcount; MPI_Fint *sendtype; void * recvbuf; MPI_Fint *recvcount; MPI_Fint *recvtype; MPI_Fint *comm; MPI_Fint *ierr; { mpi_allgather_( sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm , ierr); } void mpi_allgather( sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm , ierr) void * sendbuf; MPI_Fint *sendcount; MPI_Fint *sendtype; void * recvbuf; MPI_Fint *recvcount; MPI_Fint *recvtype; MPI_Fint *comm; MPI_Fint *ierr; { mpi_allgather_( sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm , ierr); } /******************************************************/ /******************************************************/ void mpi_allgatherv_( sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm , ierr) void * sendbuf; MPI_Fint *sendcount; MPI_Fint *sendtype; void * recvbuf; MPI_Fint * recvcounts; MPI_Fint * displs; MPI_Fint *recvtype; MPI_Fint *comm; MPI_Fint *ierr; { *ierr = MPI_Allgatherv( sendbuf, *sendcount, MPI_Type_f2c(*sendtype), recvbuf, recvcounts, displs, MPI_Type_f2c(*recvtype), MPI_Comm_f2c(*comm) ); } void mpi_allgatherv__( sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm , ierr) void * sendbuf; MPI_Fint *sendcount; MPI_Fint *sendtype; void * recvbuf; MPI_Fint * recvcounts; MPI_Fint * displs; MPI_Fint *recvtype; MPI_Fint *comm; MPI_Fint *ierr; { mpi_allgatherv_( sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm , ierr); } void MPI_ALLGATHERV( sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm , ierr) void * sendbuf; MPI_Fint *sendcount; MPI_Fint *sendtype; void * recvbuf; MPI_Fint * recvcounts; MPI_Fint * displs; MPI_Fint *recvtype; MPI_Fint *comm; MPI_Fint *ierr; { mpi_allgatherv_( sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm , ierr); } void mpi_allgatherv( sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm , ierr) void * sendbuf; MPI_Fint *sendcount; MPI_Fint *sendtype; void * recvbuf; MPI_Fint * recvcounts; MPI_Fint * displs; MPI_Fint *recvtype; MPI_Fint *comm; MPI_Fint *ierr; { mpi_allgatherv_( sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm , ierr); } /******************************************************/ /******************************************************/ void mpi_allreduce_( sendbuf, recvbuf, count, datatype, op, comm , ierr) void * sendbuf; void * recvbuf; MPI_Fint *count; MPI_Fint *datatype; MPI_Fint *op; MPI_Fint *comm; MPI_Fint *ierr; { *ierr = MPI_Allreduce( sendbuf, recvbuf, *count, MPI_Type_f2c(*datatype), MPI_Op_f2c(*op), MPI_Comm_f2c(*comm) ); } void mpi_allreduce__( sendbuf, recvbuf, count, datatype, op, comm , ierr) void * sendbuf; void * recvbuf; MPI_Fint *count; MPI_Fint *datatype; MPI_Fint *op; MPI_Fint *comm; MPI_Fint *ierr; { mpi_allreduce_( sendbuf, recvbuf, count, datatype, op, comm , ierr); } void MPI_ALLREDUCE( sendbuf, recvbuf, count, datatype, op, comm , ierr) void * sendbuf; void * recvbuf; MPI_Fint *count; MPI_Fint *datatype; MPI_Fint *op; MPI_Fint *comm; MPI_Fint *ierr; { mpi_allreduce_( sendbuf, recvbuf, count, datatype, op, comm , ierr); } #ifdef TAU_IBM_MPI extern int mpi_in_place_; #endif /* TAU_IBM_MPI */ void mpi_allreduce( sendbuf, recvbuf, count, datatype, op, comm , ierr) void * sendbuf; void * recvbuf; MPI_Fint *count; MPI_Fint *datatype; MPI_Fint *op; MPI_Fint *comm; MPI_Fint *ierr; { #ifdef TAU_IBM_MPI if ((int *)sendbuf == &mpi_in_place_) { /* FOR IBM ! */ #ifdef DEBUG_PROF printf("mpi_in_place_ = %d, s = %llx, &m = %llx \n", mpi_in_place_, sendbuf, &mpi_in_place_); #endif /* DEBUG_PROF */ mpi_allreduce_( MPI_IN_PLACE, recvbuf, count, datatype, op, comm , ierr); } else #endif /* TAU_IBM_MPI */ mpi_allreduce_( sendbuf, recvbuf, count, datatype, op, comm , ierr); } /******************************************************/ /******************************************************/ void mpi_alltoall_( sendbuf, sendcount, sendtype, recvbuf, recvcnt, recvtype, comm , ierr) void * sendbuf; MPI_Fint *sendcount; MPI_Fint *sendtype; void * recvbuf; MPI_Fint *recvcnt; MPI_Fint *recvtype; MPI_Fint *comm; MPI_Fint *ierr; { *ierr = MPI_Alltoall(sendbuf, *sendcount, MPI_Type_f2c(*sendtype), recvbuf, *recvcnt, MPI_Type_f2c(*recvtype), MPI_Comm_f2c(*comm) ); } void mpi_alltoall__( sendbuf, sendcount, sendtype, recvbuf, recvcnt, recvtype, comm , ierr) void * sendbuf; MPI_Fint *sendcount; MPI_Fint *sendtype; void * recvbuf; MPI_Fint *recvcnt; MPI_Fint *recvtype; MPI_Fint *comm; MPI_Fint *ierr; { mpi_alltoall_( sendbuf, sendcount, sendtype, recvbuf, recvcnt, recvtype, comm , ierr); } void MPI_ALLTOALL( sendbuf, sendcount, sendtype, recvbuf, recvcnt, recvtype, comm , ierr) void * sendbuf; MPI_Fint *sendcount; MPI_Fint *sendtype; void * recvbuf; MPI_Fint *recvcnt; MPI_Fint *recvtype; MPI_Fint *comm; MPI_Fint *ierr; { mpi_alltoall_( sendbuf, sendcount, sendtype, recvbuf, recvcnt, recvtype, comm , ierr); } void mpi_alltoall( sendbuf, sendcount, sendtype, recvbuf, recvcnt, recvtype, comm , ierr) void * sendbuf; MPI_Fint *sendcount; MPI_Fint *sendtype; void * recvbuf; MPI_Fint *recvcnt; MPI_Fint *recvtype; MPI_Fint *comm; MPI_Fint *ierr; { mpi_alltoall_( sendbuf, sendcount, sendtype, recvbuf, recvcnt, recvtype, comm , ierr); } /******************************************************/ /******************************************************/ void mpi_alltoallv_( sendbuf, sendcnts, sdispls, sendtype, recvbuf, recvcnts, rdispls, recvtype, comm , ierr) void * sendbuf; MPI_Fint * sendcnts; MPI_Fint * sdispls; MPI_Fint *sendtype; void * recvbuf; MPI_Fint * recvcnts; MPI_Fint * rdispls; MPI_Fint *recvtype; MPI_Fint *comm; MPI_Fint *ierr; { *ierr = MPI_Alltoallv( sendbuf, sendcnts, sdispls, MPI_Type_f2c(*sendtype), recvbuf, recvcnts, rdispls, MPI_Type_f2c(*recvtype), MPI_Comm_f2c(*comm) ); } void mpi_alltoallv__( sendbuf, sendcnts, sdispls, sendtype, recvbuf, recvcnts, rdispls, recvtype, comm , ierr) void * sendbuf; MPI_Fint * sendcnts; MPI_Fint * sdispls; MPI_Fint *sendtype; void * recvbuf; MPI_Fint * recvcnts; MPI_Fint * rdispls; MPI_Fint *recvtype; MPI_Fint *comm; MPI_Fint *ierr; { mpi_alltoallv_( sendbuf, sendcnts, sdispls, sendtype, recvbuf, recvcnts, rdispls, recvtype, comm , ierr); } void MPI_ALLTOALLV( sendbuf, sendcnts, sdispls, sendtype, recvbuf, recvcnts, rdispls, recvtype, comm , ierr) void * sendbuf; MPI_Fint * sendcnts; MPI_Fint * sdispls; MPI_Fint *sendtype; void * recvbuf; MPI_Fint * recvcnts; MPI_Fint * rdispls; MPI_Fint *recvtype; MPI_Fint *comm; MPI_Fint *ierr; { mpi_alltoallv_( sendbuf, sendcnts, sdispls, sendtype, recvbuf, recvcnts, rdispls, recvtype, comm , ierr); } void mpi_alltoallv( sendbuf, sendcnts, sdispls, sendtype, recvbuf, recvcnts, rdispls, recvtype, comm , ierr) void * sendbuf; MPI_Fint * sendcnts; MPI_Fint * sdispls; MPI_Fint *sendtype; void * recvbuf; MPI_Fint * recvcnts; MPI_Fint * rdispls; MPI_Fint *recvtype; MPI_Fint *comm; MPI_Fint *ierr; { mpi_alltoallv_( sendbuf, sendcnts, sdispls, sendtype, recvbuf, recvcnts, rdispls, recvtype, comm , ierr); } /******************************************************/ /******************************************************/ void mpi_barrier_( comm , ierr) MPI_Fint *comm; MPI_Fint *ierr; { *ierr = MPI_Barrier( MPI_Comm_f2c(*comm) ); } void mpi_barrier__( comm , ierr) MPI_Fint *comm; MPI_Fint *ierr; { mpi_barrier_( comm , ierr); } void MPI_BARRIER( comm , ierr) MPI_Fint *comm; MPI_Fint *ierr; { mpi_barrier_( comm , ierr); } void mpi_barrier( comm , ierr) MPI_Fint *comm; MPI_Fint *ierr; { mpi_barrier_( comm , ierr); } /******************************************************/ /******************************************************/ void mpi_bcast_( buffer, count, datatype, root, comm , ierr) void * buffer; MPI_Fint *count; MPI_Fint *datatype; MPI_Fint *root; MPI_Fint *comm; MPI_Fint *ierr; { *ierr = MPI_Bcast( buffer, *count, MPI_Type_f2c(*datatype), *root, MPI_Comm_f2c(*comm) ); } void mpi_bcast__( buffer, count, datatype, root, comm , ierr) void * buffer; MPI_Fint *count; MPI_Fint *datatype; MPI_Fint *root; MPI_Fint *comm; MPI_Fint *ierr; { mpi_bcast_( buffer, count, datatype, root, comm , ierr); } void MPI_BCAST( buffer, count, datatype, root, comm , ierr) void * buffer; MPI_Fint *count; MPI_Fint *datatype; MPI_Fint *root; MPI_Fint *comm; MPI_Fint *ierr; { mpi_bcast_( buffer, count, datatype, root, comm , ierr); } void mpi_bcast( buffer, count, datatype, root, comm , ierr) void * buffer; MPI_Fint *count; MPI_Fint *datatype; MPI_Fint *root; MPI_Fint *comm; MPI_Fint *ierr; { mpi_bcast_( buffer, count, datatype, root, comm , ierr); } /******************************************************/ /******************************************************/ void mpi_gather_( sendbuf, sendcnt, sendtype, recvbuf, recvcount, recvtype, root, comm , ierr) void * sendbuf; MPI_Fint *sendcnt; MPI_Fint *sendtype; void * recvbuf; MPI_Fint *recvcount; MPI_Fint *recvtype; MPI_Fint *root; MPI_Fint *comm; MPI_Fint *ierr; { *ierr = MPI_Gather( sendbuf, *sendcnt, MPI_Type_f2c(*sendtype), recvbuf, *recvcount, MPI_Type_f2c(*recvtype), *root, MPI_Comm_f2c(*comm) ); } void mpi_gather__( sendbuf, sendcnt, sendtype, recvbuf, recvcount, recvtype, root, comm , ierr) void * sendbuf; MPI_Fint *sendcnt; MPI_Fint *sendtype; void * recvbuf; MPI_Fint *recvcount; MPI_Fint *recvtype; MPI_Fint *root; MPI_Fint *comm; MPI_Fint *ierr; { mpi_gather_( sendbuf, sendcnt, sendtype, recvbuf, recvcount, recvtype, root, comm , ierr); } void MPI_GATHER( sendbuf, sendcnt, sendtype, recvbuf, recvcount, recvtype, root, comm , ierr) void * sendbuf; MPI_Fint *sendcnt; MPI_Fint *sendtype; void * recvbuf; MPI_Fint *recvcount; MPI_Fint *recvtype; MPI_Fint *root; MPI_Fint *comm; MPI_Fint *ierr; { mpi_gather_( sendbuf, sendcnt, sendtype, recvbuf, recvcount, recvtype, root, comm , ierr); } void mpi_gather( sendbuf, sendcnt, sendtype, recvbuf, recvcount, recvtype, root, comm , ierr) void * sendbuf; MPI_Fint *sendcnt; MPI_Fint *sendtype; void * recvbuf; MPI_Fint *recvcount; MPI_Fint *recvtype; MPI_Fint *root; MPI_Fint *comm; MPI_Fint *ierr; { mpi_gather_( sendbuf, sendcnt, sendtype, recvbuf, recvcount, recvtype, root, comm , ierr); } /******************************************************/ /******************************************************/ void mpi_gatherv_( sendbuf, sendcnt, sendtype, recvbuf, recvcnts, displs, recvtype, root, comm , ierr) void * sendbuf; MPI_Fint *sendcnt; MPI_Fint *sendtype; void * recvbuf; MPI_Fint * recvcnts; MPI_Fint * displs; MPI_Fint *recvtype; MPI_Fint *root; MPI_Fint *comm; MPI_Fint *ierr; { *ierr = MPI_Gatherv( sendbuf, *sendcnt, MPI_Type_f2c(*sendtype), recvbuf, recvcnts, displs, MPI_Type_f2c(*recvtype), *root, MPI_Comm_f2c(*comm) ); } void mpi_gatherv__( sendbuf, sendcnt, sendtype, recvbuf, recvcnts, displs, recvtype, root, comm , ierr) void * sendbuf; MPI_Fint *sendcnt; MPI_Fint *sendtype; void * recvbuf; MPI_Fint * recvcnts; MPI_Fint * displs; MPI_Fint *recvtype; MPI_Fint *root; MPI_Fint *comm; MPI_Fint *ierr; { mpi_gatherv_( sendbuf, sendcnt, sendtype, recvbuf, recvcnts, displs, recvtype, root, comm , ierr); } void MPI_GATHERV( sendbuf, sendcnt, sendtype, recvbuf, recvcnts, displs, recvtype, root, comm , ierr) void * sendbuf; MPI_Fint *sendcnt; MPI_Fint *sendtype; void * recvbuf; MPI_Fint * recvcnts; MPI_Fint * displs; MPI_Fint *recvtype; MPI_Fint *root; MPI_Fint *comm; MPI_Fint *ierr; { mpi_gatherv_( sendbuf, sendcnt, sendtype, recvbuf, recvcnts, displs, recvtype, root, comm , ierr); } void mpi_gatherv( sendbuf, sendcnt, sendtype, recvbuf, recvcnts, displs, recvtype, root, comm , ierr) void * sendbuf; MPI_Fint *sendcnt; MPI_Fint *sendtype; void * recvbuf; MPI_Fint * recvcnts; MPI_Fint * displs; MPI_Fint *recvtype; MPI_Fint *root; MPI_Fint *comm; MPI_Fint *ierr; { mpi_gatherv_( sendbuf, sendcnt, sendtype, recvbuf, recvcnts, displs, recvtype, root, comm , ierr); } /******************************************************/ /******************************************************/ void mpi_op_create_( function, commute, op , ierr) MPI_User_function * function; MPI_Fint *commute; MPI_Fint * op; MPI_Fint *ierr; { MPI_Op local_op; *ierr = MPI_Op_create( function, *commute, &local_op ); *op = MPI_Op_c2f(local_op); } void mpi_op_create__( function, commute, op , ierr) MPI_User_function * function; MPI_Fint *commute; MPI_Fint * op; MPI_Fint *ierr; { mpi_op_create_( function, commute, op , ierr); } void MPI_OP_CREATE( function, commute, op , ierr) MPI_User_function * function; MPI_Fint *commute; MPI_Fint * op; MPI_Fint *ierr; { mpi_op_create_( function, commute, op , ierr); } void mpi_op_create( function, commute, op , ierr) MPI_User_function * function; MPI_Fint *commute; MPI_Fint * op; MPI_Fint *ierr; { mpi_op_create_( function, commute, op , ierr); } /******************************************************/ /******************************************************/ void mpi_op_free_( op , ierr) MPI_Fint * op; MPI_Fint *ierr; { MPI_Op local_op = MPI_Op_f2c(*op); *ierr = MPI_Op_free( &local_op ); *op = MPI_Op_c2f(local_op); } void mpi_op_free__( op , ierr) MPI_Fint * op; MPI_Fint *ierr; { mpi_op_free_( op , ierr); } void MPI_OP_FREE( op , ierr) MPI_Fint * op; MPI_Fint *ierr; { mpi_op_free_( op , ierr); } void mpi_op_free( op , ierr) MPI_Fint * op; MPI_Fint *ierr; { mpi_op_free_( op , ierr); } /******************************************************/ /******************************************************/ void mpi_reduce_scatter_( sendbuf, recvbuf, recvcnts, datatype, op, comm , ierr) void * sendbuf; void * recvbuf; MPI_Fint * recvcnts; MPI_Fint *datatype; MPI_Fint *op; MPI_Fint *comm; MPI_Fint *ierr; { *ierr = MPI_Reduce_scatter( sendbuf, recvbuf, recvcnts, MPI_Type_f2c(*datatype), MPI_Op_f2c(*op), MPI_Comm_f2c(*comm) ); } void mpi_reduce_scatter__( sendbuf, recvbuf, recvcnts, datatype, op, comm , ierr) void * sendbuf; void * recvbuf; MPI_Fint * recvcnts; MPI_Fint *datatype; MPI_Fint *op; MPI_Fint *comm; MPI_Fint *ierr; { mpi_reduce_scatter_( sendbuf, recvbuf, recvcnts, datatype, op, comm , ierr); } void MPI_REDUCE_SCATTER( sendbuf, recvbuf, recvcnts, datatype, op, comm , ierr) void * sendbuf; void * recvbuf; MPI_Fint * recvcnts; MPI_Fint *datatype; MPI_Fint *op; MPI_Fint *comm; MPI_Fint *ierr; { mpi_reduce_scatter_( sendbuf, recvbuf, recvcnts, datatype, op, comm , ierr); } void mpi_reduce_scatter( sendbuf, recvbuf, recvcnts, datatype, op, comm , ierr) void * sendbuf; void * recvbuf; MPI_Fint * recvcnts; MPI_Fint *datatype; MPI_Fint *op; MPI_Fint *comm; MPI_Fint *ierr; { mpi_reduce_scatter_( sendbuf, recvbuf, recvcnts, datatype, op, comm , ierr); } /******************************************************/ /******************************************************/ void mpi_reduce_( sendbuf, recvbuf, count, datatype, op, root, comm , ierr) void * sendbuf; void * recvbuf; MPI_Fint *count; MPI_Fint *datatype; MPI_Fint *op; MPI_Fint *root; MPI_Fint *comm; MPI_Fint *ierr; { *ierr = MPI_Reduce( sendbuf, recvbuf, *count, MPI_Type_f2c(*datatype), MPI_Op_f2c(*op), *root, MPI_Comm_f2c(*comm) ); } void mpi_reduce__( sendbuf, recvbuf, count, datatype, op, root, comm , ierr) void * sendbuf; void * recvbuf; MPI_Fint *count; MPI_Fint *datatype; MPI_Fint *op; MPI_Fint *root; MPI_Fint *comm; MPI_Fint *ierr; { mpi_reduce_( sendbuf, recvbuf, count, datatype, op, root, comm , ierr); } void MPI_REDUCE( sendbuf, recvbuf, count, datatype, op, root, comm , ierr) void * sendbuf; void * recvbuf; MPI_Fint *count; MPI_Fint *datatype; MPI_Fint *op; MPI_Fint *root; MPI_Fint *comm; MPI_Fint *ierr; { mpi_reduce_( sendbuf, recvbuf, count, datatype, op, root, comm , ierr); } void mpi_reduce( sendbuf, recvbuf, count, datatype, op, root, comm , ierr) void * sendbuf; void * recvbuf; MPI_Fint *count; MPI_Fint *datatype; MPI_Fint *op; MPI_Fint *root; MPI_Fint *comm; MPI_Fint *ierr; { mpi_reduce_( sendbuf, recvbuf, count, datatype, op, root, comm , ierr); } /******************************************************/ /******************************************************/ void mpi_scan_( sendbuf, recvbuf, count, datatype, op, comm, ierr) void * sendbuf; void * recvbuf; MPI_Fint *count; MPI_Fint *datatype; MPI_Fint *op; MPI_Fint *comm; MPI_Fint *ierr; { *ierr = MPI_Scan( sendbuf, recvbuf, *count, MPI_Type_f2c(*datatype), MPI_Op_f2c(*op), MPI_Comm_f2c(*comm) ); } void mpi_scan__( sendbuf, recvbuf, count, datatype, op, comm, ierr) void * sendbuf; void * recvbuf; MPI_Fint *count; MPI_Fint *datatype; MPI_Fint *op; MPI_Fint *comm; MPI_Fint *ierr; { mpi_scan_( sendbuf, recvbuf, count, datatype, op, comm, ierr); } void MPI_SCAN( sendbuf, recvbuf, count, datatype, op, comm, ierr) void * sendbuf; void * recvbuf; MPI_Fint *count; MPI_Fint *datatype; MPI_Fint *op; MPI_Fint *comm; MPI_Fint *ierr; { mpi_scan_( sendbuf, recvbuf, count, datatype, op, comm, ierr); } void mpi_scan( sendbuf, recvbuf, count, datatype, op, comm, ierr) void * sendbuf; void * recvbuf; MPI_Fint *count; MPI_Fint *datatype; MPI_Fint *op; MPI_Fint *comm; MPI_Fint *ierr; { mpi_scan_( sendbuf, recvbuf, count, datatype, op, comm, ierr); } /******************************************************/ /******************************************************/ void mpi_scatter_( sendbuf, sendcnt, sendtype, recvbuf, recvcnt, recvtype, root, comm, ierr ) void * sendbuf; MPI_Fint *sendcnt; MPI_Fint *sendtype; void * recvbuf; MPI_Fint *recvcnt; MPI_Fint *recvtype; MPI_Fint *root; MPI_Fint *comm; MPI_Fint *ierr; { *ierr = MPI_Scatter( sendbuf, *sendcnt, MPI_Type_f2c(*sendtype), recvbuf, *recvcnt, MPI_Type_f2c(*recvtype), *root, MPI_Comm_f2c(*comm) ); } void mpi_scatter__( sendbuf, sendcnt, sendtype, recvbuf, recvcnt, recvtype, root, comm, ierr ) void * sendbuf; MPI_Fint *sendcnt; MPI_Fint *sendtype; void * recvbuf; MPI_Fint *recvcnt; MPI_Fint *recvtype; MPI_Fint *root; MPI_Fint *comm; MPI_Fint *ierr; { mpi_scatter_( sendbuf, sendcnt, sendtype, recvbuf, recvcnt, recvtype, root, comm, ierr ); } void MPI_SCATTER( sendbuf, sendcnt, sendtype, recvbuf, recvcnt, recvtype, root, comm, ierr ) void * sendbuf; MPI_Fint *sendcnt; MPI_Fint *sendtype; void * recvbuf; MPI_Fint *recvcnt; MPI_Fint *recvtype; MPI_Fint *root; MPI_Fint *comm; MPI_Fint *ierr; { mpi_scatter_( sendbuf, sendcnt, sendtype, recvbuf, recvcnt, recvtype, root, comm, ierr ); } void mpi_scatter( sendbuf, sendcnt, sendtype, recvbuf, recvcnt, recvtype, root, comm, ierr ) void * sendbuf; MPI_Fint *sendcnt; MPI_Fint *sendtype; void * recvbuf; MPI_Fint *recvcnt; MPI_Fint *recvtype; MPI_Fint *root; MPI_Fint *comm; MPI_Fint *ierr; { mpi_scatter_( sendbuf, sendcnt, sendtype, recvbuf, recvcnt, recvtype, root, comm, ierr ); } /******************************************************/ /******************************************************/ void mpi_scatterv_( sendbuf, sendcnts, displs, sendtype, recvbuf, recvcnt, recvtype, root, comm , ierr) void * sendbuf; MPI_Fint * sendcnts; MPI_Fint * displs; MPI_Fint *sendtype; void * recvbuf; MPI_Fint *recvcnt; MPI_Fint *recvtype; MPI_Fint *root; MPI_Fint *comm; MPI_Fint *ierr; { *ierr = MPI_Scatterv( sendbuf, sendcnts, displs, MPI_Type_f2c(*sendtype), recvbuf, *recvcnt, MPI_Type_f2c(*recvtype), *root, MPI_Comm_f2c(*comm) ); } void mpi_scatterv__( sendbuf, sendcnts, displs, sendtype, recvbuf, recvcnt, recvtype, root, comm , ierr) void * sendbuf; MPI_Fint * sendcnts; MPI_Fint * displs; MPI_Fint *sendtype; void * recvbuf; MPI_Fint *recvcnt; MPI_Fint *recvtype; MPI_Fint *root; MPI_Fint *comm; MPI_Fint *ierr; { mpi_scatterv_( sendbuf, sendcnts, displs, sendtype, recvbuf, recvcnt, recvtype, root, comm , ierr); } void MPI_SCATTERV( sendbuf, sendcnts, displs, sendtype, recvbuf, recvcnt, recvtype, root, comm , ierr) void * sendbuf; MPI_Fint * sendcnts; MPI_Fint * displs; MPI_Fint *sendtype; void * recvbuf; MPI_Fint *recvcnt; MPI_Fint *recvtype; MPI_Fint *root; MPI_Fint *comm; MPI_Fint *ierr; { mpi_scatterv_( sendbuf, sendcnts, displs, sendtype, recvbuf, recvcnt, recvtype, root, comm , ierr); } void mpi_scatterv( sendbuf, sendcnts, displs, sendtype, recvbuf, recvcnt, recvtype, root, comm , ierr) void * sendbuf; MPI_Fint * sendcnts; MPI_Fint * displs; MPI_Fint *sendtype; void * recvbuf; MPI_Fint *recvcnt; MPI_Fint *recvtype; MPI_Fint *root; MPI_Fint *comm; MPI_Fint *ierr; { mpi_scatterv_( sendbuf, sendcnts, displs, sendtype, recvbuf, recvcnt, recvtype, root, comm , ierr); } /******************************************************/ /******************************************************/ void mpi_attr_delete_( comm, keyval, ierr) MPI_Fint *comm; MPI_Fint *keyval; MPI_Fint *ierr; { *ierr = MPI_Attr_delete( MPI_Comm_f2c(*comm), *keyval ); } void mpi_attr_delete__( comm, keyval, ierr) MPI_Fint *comm; MPI_Fint *keyval; MPI_Fint *ierr; { mpi_attr_delete_( comm, keyval, ierr); } void MPI_ATTR_DELETE( comm, keyval, ierr) MPI_Fint *comm; MPI_Fint *keyval; MPI_Fint *ierr; { mpi_attr_delete_( comm, keyval, ierr); } void mpi_attr_delete( comm, keyval, ierr) MPI_Fint *comm; MPI_Fint *keyval; MPI_Fint *ierr; { mpi_attr_delete_( comm, keyval, ierr); } /******************************************************/ /******************************************************/ void mpi_attr_get_( comm, keyval, attr_value, flag , ierr) MPI_Fint *comm; MPI_Fint *keyval; void * attr_value; MPI_Fint * flag; MPI_Fint *ierr; { *ierr = MPI_Attr_get( MPI_Comm_f2c(*comm), *keyval, attr_value, flag ); } void mpi_attr_get__( comm, keyval, attr_value, flag , ierr) MPI_Fint *comm; MPI_Fint *keyval; void * attr_value; MPI_Fint * flag; MPI_Fint *ierr; { mpi_attr_get_( comm, keyval, attr_value, flag , ierr); } void MPI_ATTR_GET( comm, keyval, attr_value, flag , ierr) MPI_Fint *comm; MPI_Fint *keyval; void * attr_value; MPI_Fint * flag; MPI_Fint *ierr; { mpi_attr_get_( comm, keyval, attr_value, flag , ierr); } void mpi_attr_get( comm, keyval, attr_value, flag , ierr) MPI_Fint *comm; MPI_Fint *keyval; void * attr_value; MPI_Fint * flag; MPI_Fint *ierr; { mpi_attr_get_( comm, keyval, attr_value, flag , ierr); } /******************************************************/ /******************************************************/ void mpi_attr_put_( comm, keyval, attr_value, ierr) MPI_Fint *comm; MPI_Fint *keyval; void * attr_value; MPI_Fint *ierr; { *ierr = MPI_Attr_put( MPI_Comm_f2c(*comm), *keyval, attr_value ); } void mpi_attr_put__( comm, keyval, attr_value, ierr) MPI_Fint *comm; MPI_Fint *keyval; void * attr_value; MPI_Fint *ierr; { mpi_attr_put_( comm, keyval, attr_value, ierr); } void MPI_ATTR_PUT( comm, keyval, attr_value, ierr) MPI_Fint *comm; MPI_Fint *keyval; void * attr_value; MPI_Fint *ierr; { mpi_attr_put_( comm, keyval, attr_value, ierr); } void mpi_attr_put( comm, keyval, attr_value, ierr) MPI_Fint *comm; MPI_Fint *keyval; void * attr_value; MPI_Fint *ierr; { mpi_attr_put_( comm, keyval, attr_value, ierr); } /******************************************************/ /******************************************************/ void mpi_comm_compare_( comm1, comm2, result, ierr ) MPI_Fint *comm1; MPI_Fint *comm2; MPI_Fint * result; MPI_Fint *ierr; { *ierr = MPI_Comm_compare( MPI_Comm_f2c(*comm1), MPI_Comm_f2c(*comm2), result ); } void mpi_comm_compare__( comm1, comm2, result, ierr ) MPI_Fint *comm1; MPI_Fint *comm2; MPI_Fint * result; MPI_Fint *ierr; { mpi_comm_compare_( comm1, comm2, result, ierr ); } void MPI_COMM_COMPARE( comm1, comm2, result, ierr ) MPI_Fint *comm1; MPI_Fint *comm2; MPI_Fint * result; MPI_Fint *ierr; { mpi_comm_compare_( comm1, comm2, result, ierr ); } void mpi_comm_compare( comm1, comm2, result, ierr ) MPI_Fint *comm1; MPI_Fint *comm2; MPI_Fint * result; MPI_Fint *ierr; { mpi_comm_compare_( comm1, comm2, result, ierr ); } /******************************************************/ /******************************************************/ void mpi_comm_create_( comm, group, comm_out, ierr ) MPI_Fint *comm; MPI_Fint *group; MPI_Fint * comm_out; MPI_Fint *ierr; { MPI_Comm local_comm_out; *ierr = MPI_Comm_create( MPI_Comm_f2c(*comm), MPI_Group_f2c(*group), &local_comm_out); *comm_out = MPI_Comm_c2f(local_comm_out); } void mpi_comm_create__( comm, group, comm_out, ierr ) MPI_Fint *comm; MPI_Fint *group; MPI_Fint * comm_out; MPI_Fint *ierr; { mpi_comm_create_( comm, group, comm_out, ierr ); } void MPI_COMM_CREATE( comm, group, comm_out, ierr ) MPI_Fint *comm; MPI_Fint *group; MPI_Fint * comm_out; MPI_Fint *ierr; { mpi_comm_create_( comm, group, comm_out, ierr ); } void mpi_comm_create( comm, group, comm_out, ierr ) MPI_Fint *comm; MPI_Fint *group; MPI_Fint * comm_out; MPI_Fint *ierr; { mpi_comm_create_( comm, group, comm_out, ierr ); } /******************************************************/ /******************************************************/ void mpi_comm_dup_( comm, comm_out, ierr ) MPI_Fint *comm; MPI_Fint * comm_out; MPI_Fint *ierr; { MPI_Comm local_comm_out; *ierr = MPI_Comm_dup( MPI_Comm_f2c(*comm), &local_comm_out); *comm_out = MPI_Comm_c2f(local_comm_out); } void mpi_comm_dup__( comm, comm_out, ierr ) MPI_Fint *comm; MPI_Fint * comm_out; MPI_Fint *ierr; { mpi_comm_dup_( comm, comm_out, ierr ); } void MPI_COMM_DUP( comm, comm_out, ierr ) MPI_Fint *comm; MPI_Fint * comm_out; MPI_Fint *ierr; { mpi_comm_dup_( comm, comm_out, ierr ); } void mpi_comm_dup( comm, comm_out, ierr ) MPI_Fint *comm; MPI_Fint * comm_out; MPI_Fint *ierr; { mpi_comm_dup_( comm, comm_out, ierr ); } /******************************************************/ /******************************************************/ void mpi_comm_free_( comm, ierr) MPI_Fint * comm; MPI_Fint *ierr; { MPI_Comm local_comm = MPI_Comm_f2c(*comm); *ierr = MPI_Comm_free( &local_comm ); *comm = MPI_Comm_c2f(local_comm); } void mpi_comm_free__( comm, ierr) MPI_Fint * comm; MPI_Fint *ierr; { mpi_comm_free_( comm, ierr); } void MPI_COMM_FREE( comm, ierr) MPI_Fint * comm; MPI_Fint *ierr; { mpi_comm_free_( comm, ierr); } void mpi_comm_free( comm, ierr) MPI_Fint * comm; MPI_Fint *ierr; { mpi_comm_free_( comm, ierr); } /******************************************************/ /******************************************************/ void mpi_comm_group_( comm, group, ierr ) MPI_Fint *comm; MPI_Fint * group; MPI_Fint *ierr; { MPI_Group local_group; *ierr = MPI_Comm_group( MPI_Comm_f2c(*comm), &local_group ); *group = MPI_Group_c2f(local_group); } void mpi_comm_group__( comm, group, ierr ) MPI_Fint *comm; MPI_Fint * group; MPI_Fint *ierr; { mpi_comm_group_( comm, group, ierr ); } void MPI_COMM_GROUP( comm, group, ierr ) MPI_Fint *comm; MPI_Fint * group; MPI_Fint *ierr; { mpi_comm_group_( comm, group, ierr ); } void mpi_comm_group( comm, group, ierr ) MPI_Fint *comm; MPI_Fint * group; MPI_Fint *ierr; { mpi_comm_group_( comm, group, ierr ); } /******************************************************/ /******************************************************/ void mpi_comm_rank_( comm, rank, ierr ) MPI_Fint *comm; MPI_Fint * rank; MPI_Fint *ierr; { *ierr = MPI_Comm_rank( MPI_Comm_f2c(*comm), rank ); } void mpi_comm_rank__( comm, rank, ierr ) MPI_Fint *comm; MPI_Fint * rank; MPI_Fint *ierr; { mpi_comm_rank_( comm, rank, ierr ); } void MPI_COMM_RANK( comm, rank, ierr ) MPI_Fint *comm; MPI_Fint * rank; MPI_Fint *ierr; { mpi_comm_rank_( comm, rank, ierr ); } void mpi_comm_rank( comm, rank, ierr ) MPI_Fint *comm; MPI_Fint * rank; MPI_Fint *ierr; { mpi_comm_rank_( comm, rank, ierr ); } /******************************************************/ /******************************************************/ void mpi_comm_remote_group_( comm, group, ierr ) MPI_Fint *comm; MPI_Fint * group; MPI_Fint *ierr; { MPI_Group local_group; *ierr = MPI_Comm_remote_group( MPI_Comm_f2c(*comm), &local_group ); *group = MPI_Group_c2f(local_group); } void mpi_comm_remote_group__( comm, group, ierr ) MPI_Fint *comm; MPI_Fint * group; MPI_Fint *ierr; { mpi_comm_remote_group_( comm, group, ierr ); } void MPI_COMM_REMOTE_GROUP( comm, group, ierr ) MPI_Fint *comm; MPI_Fint * group; MPI_Fint *ierr; { mpi_comm_remote_group_( comm, group, ierr ); } void mpi_comm_remote_group( comm, group, ierr ) MPI_Fint *comm; MPI_Fint * group; MPI_Fint *ierr; { mpi_comm_remote_group_( comm, group, ierr ); } /******************************************************/ /******************************************************/ void mpi_comm_remote_size_( comm, size, ierr ) MPI_Fint *comm; MPI_Fint * size; MPI_Fint *ierr; { *ierr = MPI_Comm_remote_size( MPI_Comm_f2c(*comm), size ); } void mpi_comm_remote_size__( comm, size, ierr ) MPI_Fint *comm; MPI_Fint * size; MPI_Fint *ierr; { mpi_comm_remote_size_( comm, size, ierr ); } void MPI_COMM_REMOTE_SIZE( comm, size, ierr ) MPI_Fint *comm; MPI_Fint * size; MPI_Fint *ierr; { mpi_comm_remote_size_( comm, size, ierr ); } void mpi_comm_remote_size( comm, size, ierr ) MPI_Fint *comm; MPI_Fint * size; MPI_Fint *ierr; { mpi_comm_remote_size_( comm, size, ierr ); } /******************************************************/ /******************************************************/ void mpi_comm_size_( comm, size , ierr) MPI_Fint *comm; MPI_Fint * size; MPI_Fint *ierr; { *ierr = MPI_Comm_size( MPI_Comm_f2c(*comm), size ); } void mpi_comm_size__( comm, size , ierr) MPI_Fint *comm; MPI_Fint * size; MPI_Fint *ierr; { mpi_comm_size_( comm, size , ierr); } void MPI_COMM_SIZE( comm, size , ierr) MPI_Fint *comm; MPI_Fint * size; MPI_Fint *ierr; { mpi_comm_size_( comm, size , ierr); } void mpi_comm_size( comm, size , ierr) MPI_Fint *comm; MPI_Fint * size; MPI_Fint *ierr; { mpi_comm_size_( comm, size , ierr); } /******************************************************/ /******************************************************/ void mpi_comm_split_( comm, color, key, comm_out, ierr ) MPI_Fint *comm; MPI_Fint *color; MPI_Fint *key; MPI_Fint * comm_out; MPI_Fint *ierr; { MPI_Comm local_comm_out; *ierr = MPI_Comm_split( MPI_Comm_f2c(*comm), *color, *key, &local_comm_out ); *comm_out = MPI_Comm_c2f(local_comm_out); } void mpi_comm_split__( comm, color, key, comm_out, ierr ) MPI_Fint *comm; MPI_Fint *color; MPI_Fint *key; MPI_Fint * comm_out; MPI_Fint *ierr; { mpi_comm_split_( comm, color, key, comm_out, ierr ); } void MPI_COMM_SPLIT( comm, color, key, comm_out, ierr ) MPI_Fint *comm; MPI_Fint *color; MPI_Fint *key; MPI_Fint * comm_out; MPI_Fint *ierr; { mpi_comm_split_( comm, color, key, comm_out, ierr ); } void mpi_comm_split( comm, color, key, comm_out, ierr ) MPI_Fint *comm; MPI_Fint *color; MPI_Fint *key; MPI_Fint * comm_out; MPI_Fint *ierr; { mpi_comm_split_( comm, color, key, comm_out, ierr ); } /******************************************************/ /******************************************************/ void mpi_comm_test_inter_( comm, flag, ierr ) MPI_Fint *comm; MPI_Fint * flag; MPI_Fint *ierr; { *ierr = MPI_Comm_test_inter( MPI_Comm_f2c(*comm), flag ); } void mpi_comm_test_inter__( comm, flag, ierr ) MPI_Fint *comm; MPI_Fint * flag; MPI_Fint *ierr; { mpi_comm_test_inter_( comm, flag, ierr ); } void MPI_COMM_TEST_INTER( comm, flag, ierr ) MPI_Fint *comm; MPI_Fint * flag; MPI_Fint *ierr; { mpi_comm_test_inter_( comm, flag, ierr ); } void mpi_comm_test_inter( comm, flag, ierr ) MPI_Fint *comm; MPI_Fint * flag; MPI_Fint *ierr; { mpi_comm_test_inter_( comm, flag, ierr ); } /******************************************************/ /******************************************************/ void mpi_group_compare_( group1, group2, result, ierr ) MPI_Fint *group1; MPI_Fint *group2; MPI_Fint * result; MPI_Fint *ierr; { *ierr = MPI_Group_compare( MPI_Group_f2c(*group1), MPI_Group_f2c(*group2), result ); } void mpi_group_compare__( group1, group2, result, ierr ) MPI_Fint *group1; MPI_Fint *group2; MPI_Fint * result; MPI_Fint *ierr; { mpi_group_compare_( group1, group2, result, ierr ); } void MPI_GROUP_COMPARE( group1, group2, result, ierr ) MPI_Fint *group1; MPI_Fint *group2; MPI_Fint * result; MPI_Fint *ierr; { mpi_group_compare_( group1, group2, result, ierr ); } void mpi_group_compare( group1, group2, result, ierr ) MPI_Fint *group1; MPI_Fint *group2; MPI_Fint * result; MPI_Fint *ierr; { mpi_group_compare_( group1, group2, result, ierr ); } /******************************************************/ /******************************************************/ void mpi_group_difference_( group1, group2, group_out, ierr ) MPI_Fint *group1; MPI_Fint *group2; MPI_Fint * group_out; MPI_Fint *ierr; { MPI_Group local_group; *ierr = MPI_Group_difference( MPI_Group_f2c(*group1), MPI_Group_f2c(*group2), &local_group); *group_out = MPI_Group_c2f(local_group); } void mpi_group_difference__( group1, group2, group_out, ierr ) MPI_Fint *group1; MPI_Fint *group2; MPI_Fint * group_out; MPI_Fint *ierr; { mpi_group_difference_( group1, group2, group_out, ierr ); } void MPI_GROUP_DIFFERENCE( group1, group2, group_out, ierr ) MPI_Fint *group1; MPI_Fint *group2; MPI_Fint * group_out; MPI_Fint *ierr; { mpi_group_difference_( group1, group2, group_out, ierr ); } void mpi_group_difference( group1, group2, group_out, ierr ) MPI_Fint *group1; MPI_Fint *group2; MPI_Fint * group_out; MPI_Fint *ierr; { mpi_group_difference_( group1, group2, group_out, ierr ); } /******************************************************/ /******************************************************/ void mpi_group_excl_( group, n, ranks, newgroup, ierr ) MPI_Fint *group; MPI_Fint *n; MPI_Fint * ranks; MPI_Fint * newgroup; MPI_Fint *ierr; { MPI_Group local_group; *ierr = MPI_Group_excl( MPI_Group_f2c(*group), *n, ranks, &local_group ); *newgroup = MPI_Group_c2f(local_group); } void mpi_group_excl__( group, n, ranks, newgroup, ierr ) MPI_Fint *group; MPI_Fint *n; MPI_Fint * ranks; MPI_Fint * newgroup; MPI_Fint *ierr; { mpi_group_excl_( group, n, ranks, newgroup, ierr ); } void MPI_GROUP_EXCL( group, n, ranks, newgroup, ierr ) MPI_Fint *group; MPI_Fint *n; MPI_Fint * ranks; MPI_Fint * newgroup; MPI_Fint *ierr; { mpi_group_excl_( group, n, ranks, newgroup, ierr ); } void mpi_group_excl( group, n, ranks, newgroup, ierr ) MPI_Fint *group; MPI_Fint *n; MPI_Fint * ranks; MPI_Fint * newgroup; MPI_Fint *ierr; { mpi_group_excl_( group, n, ranks, newgroup, ierr ); } /******************************************************/ /******************************************************/ void mpi_group_free_( group, ierr) MPI_Fint * group; MPI_Fint *ierr; { MPI_Group local_group = MPI_Group_f2c(*group); *ierr = MPI_Group_free( &local_group ); *group = MPI_Group_c2f(local_group); } void mpi_group_free__( group, ierr) MPI_Fint * group; MPI_Fint *ierr; { mpi_group_free_( group, ierr); } void MPI_GROUP_FREE( group, ierr) MPI_Fint * group; MPI_Fint *ierr; { mpi_group_free_( group, ierr); } void mpi_group_free( group, ierr) MPI_Fint * group; MPI_Fint *ierr; { mpi_group_free_( group, ierr); } /******************************************************/ /******************************************************/ void mpi_group_incl_( group, n, ranks, group_out, ierr ) MPI_Fint *group; MPI_Fint *n; MPI_Fint * ranks; MPI_Fint * group_out; MPI_Fint *ierr; { MPI_Group local_group; *ierr = MPI_Group_incl( MPI_Group_f2c(*group), *n, ranks, &local_group ); *group_out = MPI_Group_c2f(local_group); } void mpi_group_incl__( group, n, ranks, group_out, ierr ) MPI_Fint *group; MPI_Fint *n; MPI_Fint * ranks; MPI_Fint * group_out; MPI_Fint *ierr; { mpi_group_incl_( group, n, ranks, group_out, ierr ); } void MPI_GROUP_INCL( group, n, ranks, group_out, ierr ) MPI_Fint *group; MPI_Fint *n; MPI_Fint * ranks; MPI_Fint * group_out; MPI_Fint *ierr; { mpi_group_incl_( group, n, ranks, group_out, ierr ); } void mpi_group_incl( group, n, ranks, group_out, ierr ) MPI_Fint *group; MPI_Fint *n; MPI_Fint * ranks; MPI_Fint * group_out; MPI_Fint *ierr; { mpi_group_incl_( group, n, ranks, group_out, ierr ); } /******************************************************/ /******************************************************/ void mpi_group_intersection_( group1, group2, group_out, ierr ) MPI_Fint *group1; MPI_Fint *group2; MPI_Fint * group_out; MPI_Fint *ierr; { MPI_Group local_group; *ierr = MPI_Group_intersection( MPI_Group_f2c(*group1), MPI_Group_f2c(*group2), &local_group ); *group_out = MPI_Group_c2f(local_group); } void mpi_group_intersection__( group1, group2, group_out, ierr ) MPI_Fint *group1; MPI_Fint *group2; MPI_Fint * group_out; MPI_Fint *ierr; { mpi_group_intersection_( group1, group2, group_out, ierr ); } void MPI_GROUP_INTERSECTION( group1, group2, group_out, ierr ) MPI_Fint *group1; MPI_Fint *group2; MPI_Fint * group_out; MPI_Fint *ierr; { mpi_group_intersection_( group1, group2, group_out, ierr ); } void mpi_group_intersection( group1, group2, group_out, ierr ) MPI_Fint *group1; MPI_Fint *group2; MPI_Fint * group_out; MPI_Fint *ierr; { mpi_group_intersection_( group1, group2, group_out, ierr ); } /******************************************************/ /******************************************************/ void mpi_group_rank_( group, rank, ierr) MPI_Fint *group; MPI_Fint * rank; MPI_Fint *ierr; { *ierr = MPI_Group_rank( MPI_Group_f2c(*group), rank ); } void mpi_group_rank__( group, rank, ierr) MPI_Fint *group; MPI_Fint * rank; MPI_Fint *ierr; { mpi_group_rank_( group, rank, ierr); } void MPI_GROUP_RANK( group, rank, ierr) MPI_Fint *group; MPI_Fint * rank; MPI_Fint *ierr; { mpi_group_rank_( group, rank, ierr); } void mpi_group_rank( group, rank, ierr) MPI_Fint *group; MPI_Fint * rank; MPI_Fint *ierr; { mpi_group_rank_( group, rank, ierr); } /******************************************************/ /******************************************************/ void mpi_group_range_excl_( group, n, ranges, newgroup, ierr ) MPI_Fint *group; MPI_Fint *n; int ranges[][3]; MPI_Fint * newgroup; MPI_Fint *ierr; { MPI_Group local_group; *ierr = MPI_Group_range_excl( MPI_Group_f2c(*group), *n, ranges, &local_group ); *newgroup = MPI_Group_c2f(local_group); } void mpi_group_range_excl__( group, n, ranges, newgroup, ierr ) MPI_Fint *group; MPI_Fint *n; int ranges[][3]; MPI_Fint * newgroup; MPI_Fint *ierr; { mpi_group_range_excl_( group, n, ranges, newgroup, ierr ); } void MPI_GROUP_RANGE_EXCL( group, n, ranges, newgroup, ierr ) MPI_Fint *group; MPI_Fint *n; int ranges[][3]; MPI_Fint * newgroup; MPI_Fint *ierr; { mpi_group_range_excl_( group, n, ranges, newgroup, ierr ); } void mpi_group_range_excl( group, n, ranges, newgroup, ierr ) MPI_Fint *group; MPI_Fint *n; int ranges[][3]; MPI_Fint * newgroup; MPI_Fint *ierr; { mpi_group_range_excl_( group, n, ranges, newgroup, ierr ); } /******************************************************/ /******************************************************/ void mpi_group_range_incl_( group, n, ranges, newgroup, ierr ) MPI_Fint *group; MPI_Fint *n; int ranges[][3]; MPI_Fint * newgroup; MPI_Fint *ierr; { MPI_Group local_group; *ierr = MPI_Group_range_incl( MPI_Group_f2c(*group), *n, ranges, &local_group ); *newgroup = MPI_Group_c2f(local_group); } void mpi_group_range_incl__( group, n, ranges, newgroup, ierr ) MPI_Fint *group; MPI_Fint *n; int ranges[][3]; MPI_Fint * newgroup; MPI_Fint *ierr; { mpi_group_range_incl_( group, n, ranges, newgroup, ierr ); } void MPI_GROUP_RANGE_INCL( group, n, ranges, newgroup, ierr ) MPI_Fint *group; MPI_Fint *n; int ranges[][3]; MPI_Fint * newgroup; MPI_Fint *ierr; { mpi_group_range_incl_( group, n, ranges, newgroup, ierr ); } void mpi_group_range_incl( group, n, ranges, newgroup, ierr ) MPI_Fint *group; MPI_Fint *n; int ranges[][3]; MPI_Fint * newgroup; MPI_Fint *ierr; { mpi_group_range_incl_( group, n, ranges, newgroup, ierr ); } /******************************************************/ /******************************************************/ void mpi_group_size_( group, size, ierr ) MPI_Fint *group; MPI_Fint * size; MPI_Fint *ierr; { *ierr = MPI_Group_size( MPI_Group_f2c(*group), size ); } void mpi_group_size__( group, size, ierr ) MPI_Fint *group; MPI_Fint * size; MPI_Fint *ierr; { mpi_group_size_( group, size, ierr ); } void MPI_GROUP_SIZE( group, size, ierr ) MPI_Fint *group; MPI_Fint * size; MPI_Fint *ierr; { mpi_group_size_( group, size, ierr ); } void mpi_group_size( group, size, ierr ) MPI_Fint *group; MPI_Fint * size; MPI_Fint *ierr; { mpi_group_size_( group, size, ierr ); } /******************************************************/ /******************************************************/ void mpi_group_translate_ranks_( group_a, n, ranks_a, group_b, ranks_b, ierr) MPI_Fint *group_a; MPI_Fint *n; MPI_Fint * ranks_a; MPI_Fint *group_b; MPI_Fint * ranks_b; MPI_Fint *ierr; { *ierr = MPI_Group_translate_ranks( MPI_Group_f2c(*group_a), *n, ranks_a, MPI_Group_f2c(*group_b), ranks_b ); } void mpi_group_translate_ranks__( group_a, n, ranks_a, group_b, ranks_b, ierr) MPI_Fint *group_a; MPI_Fint *n; MPI_Fint * ranks_a; MPI_Fint *group_b; MPI_Fint * ranks_b; MPI_Fint *ierr; { mpi_group_translate_ranks_( group_a, n, ranks_a, group_b, ranks_b, ierr); } void MPI_GROUP_TRANSLATE_RANKS( group_a, n, ranks_a, group_b, ranks_b, ierr) MPI_Fint *group_a; MPI_Fint *n; MPI_Fint * ranks_a; MPI_Fint *group_b; MPI_Fint * ranks_b; MPI_Fint *ierr; { mpi_group_translate_ranks_( group_a, n, ranks_a, group_b, ranks_b, ierr); } void mpi_group_translate_ranks( group_a, n, ranks_a, group_b, ranks_b, ierr) MPI_Fint *group_a; MPI_Fint *n; MPI_Fint * ranks_a; MPI_Fint *group_b; MPI_Fint * ranks_b; MPI_Fint *ierr; { mpi_group_translate_ranks_( group_a, n, ranks_a, group_b, ranks_b, ierr); } /******************************************************/ /******************************************************/ void mpi_group_union_( group1, group2, group_out, ierr ) MPI_Fint *group1; MPI_Fint *group2; MPI_Fint * group_out; MPI_Fint *ierr; { MPI_Group local_group; *ierr = MPI_Group_union( MPI_Group_f2c(*group1), MPI_Group_f2c(*group2), &local_group ); *group_out = MPI_Group_c2f(local_group); } void mpi_group_union__( group1, group2, group_out, ierr ) MPI_Fint *group1; MPI_Fint *group2; MPI_Fint * group_out; MPI_Fint *ierr; { mpi_group_union_( group1, group2, group_out, ierr ); } void MPI_GROUP_UNION( group1, group2, group_out, ierr ) MPI_Fint *group1; MPI_Fint *group2; MPI_Fint * group_out; MPI_Fint *ierr; { mpi_group_union_( group1, group2, group_out, ierr ); } void mpi_group_union( group1, group2, group_out, ierr ) MPI_Fint *group1; MPI_Fint *group2; MPI_Fint * group_out; MPI_Fint *ierr; { mpi_group_union_( group1, group2, group_out, ierr ); } /******************************************************/ /******************************************************/ void mpi_intercomm_create_( local_comm, local_leader, peer_comm, remote_leader, tag, comm_out, ierr ) MPI_Fint *local_comm; MPI_Fint *local_leader; MPI_Fint *peer_comm; MPI_Fint *remote_leader; MPI_Fint *tag; MPI_Fint * comm_out; MPI_Fint *ierr; { MPI_Comm local_comm_out; *ierr = MPI_Intercomm_create( MPI_Comm_f2c(*local_comm), *local_leader, MPI_Comm_f2c(*peer_comm), *remote_leader, *tag, &local_comm_out ); *comm_out = MPI_Comm_c2f(local_comm_out); } void mpi_intercomm_create__( local_comm, local_leader, peer_comm, remote_leader, tag, comm_out, ierr ) MPI_Fint *local_comm; MPI_Fint *local_leader; MPI_Fint *peer_comm; MPI_Fint *remote_leader; MPI_Fint *tag; MPI_Fint * comm_out; MPI_Fint *ierr; { mpi_intercomm_create_( local_comm, local_leader, peer_comm, remote_leader, tag, comm_out, ierr ); } void MPI_INTERCOMM_CREATE( local_comm, local_leader, peer_comm, remote_leader, tag, comm_out, ierr ) MPI_Fint *local_comm; MPI_Fint *local_leader; MPI_Fint *peer_comm; MPI_Fint *remote_leader; MPI_Fint *tag; MPI_Fint * comm_out; MPI_Fint *ierr; { mpi_intercomm_create_( local_comm, local_leader, peer_comm, remote_leader, tag, comm_out, ierr ); } void mpi_intercomm_create( local_comm, local_leader, peer_comm, remote_leader, tag, comm_out, ierr ) MPI_Fint *local_comm; MPI_Fint *local_leader; MPI_Fint *peer_comm; MPI_Fint *remote_leader; MPI_Fint *tag; MPI_Fint * comm_out; MPI_Fint *ierr; { mpi_intercomm_create_( local_comm, local_leader, peer_comm, remote_leader, tag, comm_out, ierr ); } /******************************************************/ /******************************************************/ void mpi_intercomm_merge_( comm, high, comm_out, ierr ) MPI_Fint *comm; MPI_Fint *high; MPI_Fint * comm_out; MPI_Fint *ierr; { MPI_Comm local_comm_out; *ierr = MPI_Intercomm_merge( MPI_Comm_f2c(*comm), *high, &local_comm_out ); *comm_out = MPI_Comm_c2f(local_comm_out); } void mpi_intercomm_merge__( comm, high, comm_out, ierr ) MPI_Fint *comm; MPI_Fint *high; MPI_Fint * comm_out; MPI_Fint *ierr; { mpi_intercomm_merge_( comm, high, comm_out, ierr ); } void MPI_INTERCOMM_MERGE( comm, high, comm_out, ierr ) MPI_Fint *comm; MPI_Fint *high; MPI_Fint * comm_out; MPI_Fint *ierr; { mpi_intercomm_merge_( comm, high, comm_out, ierr ); } void mpi_intercomm_merge( comm, high, comm_out, ierr ) MPI_Fint *comm; MPI_Fint *high; MPI_Fint * comm_out; MPI_Fint *ierr; { mpi_intercomm_merge_( comm, high, comm_out, ierr ); } /******************************************************/ /******************************************************/ void mpi_keyval_create_( copy_fn, delete_fn, keyval, extra_state, ierr ) MPI_Copy_function * copy_fn; MPI_Delete_function * delete_fn; MPI_Fint * keyval; void * extra_state; MPI_Fint *ierr; { *ierr = MPI_Keyval_create( copy_fn, delete_fn, keyval, extra_state ); } void mpi_keyval_create__( copy_fn, delete_fn, keyval, extra_state, ierr ) MPI_Copy_function * copy_fn; MPI_Delete_function * delete_fn; MPI_Fint * keyval; void * extra_state; MPI_Fint *ierr; { mpi_keyval_create_( copy_fn, delete_fn, keyval, extra_state, ierr ); } void MPI_KEYVAL_CREATE( copy_fn, delete_fn, keyval, extra_state, ierr ) MPI_Copy_function * copy_fn; MPI_Delete_function * delete_fn; MPI_Fint * keyval; void * extra_state; MPI_Fint *ierr; { mpi_keyval_create_( copy_fn, delete_fn, keyval, extra_state, ierr ); } void mpi_keyval_create( copy_fn, delete_fn, keyval, extra_state, ierr ) MPI_Copy_function * copy_fn; MPI_Delete_function * delete_fn; MPI_Fint * keyval; void * extra_state; MPI_Fint *ierr; { mpi_keyval_create_( copy_fn, delete_fn, keyval, extra_state, ierr ); } /******************************************************/ /******************************************************/ void mpi_keyval_free_( keyval, ierr ) MPI_Fint * keyval; MPI_Fint *ierr; { *ierr = MPI_Keyval_free( keyval ); } void mpi_keyval_free__( keyval, ierr ) MPI_Fint * keyval; MPI_Fint *ierr; { mpi_keyval_free_( keyval, ierr ); } void MPI_KEYVAL_FREE( keyval, ierr ) MPI_Fint * keyval; MPI_Fint *ierr; { mpi_keyval_free_( keyval, ierr ); } void mpi_keyval_free( keyval, ierr ) MPI_Fint * keyval; MPI_Fint *ierr; { mpi_keyval_free_( keyval, ierr ); } /******************************************************/ /******************************************************/ void mpi_abort_( comm, errorcode , ierr) MPI_Fint *comm; MPI_Fint *errorcode; MPI_Fint *ierr; { *ierr = MPI_Abort( MPI_Comm_f2c(*comm), *errorcode ); } void mpi_abort__( comm, errorcode , ierr) MPI_Fint *comm; MPI_Fint *errorcode; MPI_Fint *ierr; { mpi_abort_( comm, errorcode , ierr); } void MPI_ABORT( comm, errorcode , ierr) MPI_Fint *comm; MPI_Fint *errorcode; MPI_Fint *ierr; { mpi_abort_( comm, errorcode , ierr); } void mpi_abort( comm, errorcode , ierr) MPI_Fint *comm; MPI_Fint *errorcode; MPI_Fint *ierr; { mpi_abort_( comm, errorcode , ierr); } /******************************************************/ /******************************************************/ void mpi_error_class_( errorcode, errorclass, ierr ) MPI_Fint *errorcode; MPI_Fint * errorclass; MPI_Fint *ierr; { *ierr = MPI_Error_class( *errorcode, errorclass ); } void mpi_error_class__( errorcode, errorclass, ierr ) MPI_Fint *errorcode; MPI_Fint * errorclass; MPI_Fint *ierr; { mpi_error_class_( errorcode, errorclass, ierr ); } void MPI_ERROR_CLASS( errorcode, errorclass, ierr ) MPI_Fint *errorcode; MPI_Fint * errorclass; MPI_Fint *ierr; { mpi_error_class_( errorcode, errorclass, ierr ); } void mpi_error_class( errorcode, errorclass, ierr ) MPI_Fint *errorcode; MPI_Fint * errorclass; MPI_Fint *ierr; { mpi_error_class_( errorcode, errorclass, ierr ); } /******************************************************/ /******************************************************/ void mpi_errhandler_create_( function, errhandler , ierr) MPI_Handler_function * function; MPI_Errhandler * errhandler; MPI_Fint *ierr; { *ierr = MPI_Errhandler_create( function, errhandler ); } void mpi_errhandler_create__( function, errhandler , ierr) MPI_Handler_function * function; MPI_Errhandler * errhandler; MPI_Fint *ierr; { mpi_errhandler_create_( function, errhandler , ierr); } void MPI_ERRHANDLER_CREATE( function, errhandler , ierr) MPI_Handler_function * function; MPI_Errhandler * errhandler; MPI_Fint *ierr; { mpi_errhandler_create_( function, errhandler , ierr); } void mpi_errhandler_create( function, errhandler , ierr) MPI_Handler_function * function; MPI_Errhandler * errhandler; MPI_Fint *ierr; { mpi_errhandler_create_( function, errhandler , ierr); } /******************************************************/ /******************************************************/ void mpi_errhandler_free_( errhandler, ierr ) MPI_Errhandler * errhandler; MPI_Fint *ierr; { *ierr = MPI_Errhandler_free( errhandler ); } void mpi_errhandler_free__( errhandler, ierr ) MPI_Errhandler * errhandler; MPI_Fint *ierr; { mpi_errhandler_free_( errhandler, ierr ); } void MPI_ERRHANDLER_FREE( errhandler, ierr ) MPI_Errhandler * errhandler; MPI_Fint *ierr; { mpi_errhandler_free_( errhandler, ierr ); } void mpi_errhandler_free( errhandler, ierr ) MPI_Errhandler * errhandler; MPI_Fint *ierr; { mpi_errhandler_free_( errhandler, ierr ); } /******************************************************/ /******************************************************/ void mpi_errhandler_get_( comm, errhandler, ierr ) MPI_Fint *comm; MPI_Errhandler * errhandler; MPI_Fint *ierr; { *ierr = MPI_Errhandler_get( MPI_Comm_f2c(*comm), errhandler ); } void mpi_errhandler_get__( comm, errhandler, ierr ) MPI_Fint *comm; MPI_Errhandler * errhandler; MPI_Fint *ierr; { mpi_errhandler_get_( comm, errhandler, ierr ); } void MPI_ERRHANDLER_GET( comm, errhandler, ierr ) MPI_Fint *comm; MPI_Errhandler * errhandler; MPI_Fint *ierr; { mpi_errhandler_get_( comm, errhandler, ierr ); } void mpi_errhandler_get( comm, errhandler, ierr ) MPI_Fint *comm; MPI_Errhandler * errhandler; MPI_Fint *ierr; { mpi_errhandler_get_( comm, errhandler, ierr ); } /******************************************************/ /******************************************************/ void mpi_error_string_( errorcode, string, resultlen, ierr ) MPI_Fint *errorcode; char * string; MPI_Fint * resultlen; MPI_Fint *ierr; { *ierr = MPI_Error_string( *errorcode, string, resultlen ); } void mpi_error_string__( errorcode, string, resultlen, ierr ) MPI_Fint *errorcode; char * string; MPI_Fint * resultlen; MPI_Fint *ierr; { mpi_error_string_( errorcode, string, resultlen, ierr ); } void MPI_ERROR_STRING( errorcode, string, resultlen, ierr ) MPI_Fint *errorcode; char * string; MPI_Fint * resultlen; MPI_Fint *ierr; { mpi_error_string_( errorcode, string, resultlen, ierr ); } void mpi_error_string( errorcode, string, resultlen, ierr ) MPI_Fint *errorcode; char * string; MPI_Fint * resultlen; MPI_Fint *ierr; { mpi_error_string_( errorcode, string, resultlen, ierr ); } /******************************************************/ /******************************************************/ void mpi_errhandler_set_( comm, errhandler, ierr ) MPI_Fint *comm; MPI_Errhandler *errhandler; MPI_Fint *ierr; { *ierr = MPI_Errhandler_set( MPI_Comm_f2c(*comm), *errhandler ); } void mpi_errhandler_set__( comm, errhandler, ierr ) MPI_Fint *comm; MPI_Errhandler *errhandler; MPI_Fint *ierr; { mpi_errhandler_set_( comm, errhandler, ierr ); } void MPI_ERRHANDLER_SET( comm, errhandler, ierr ) MPI_Fint *comm; MPI_Errhandler *errhandler; MPI_Fint *ierr; { mpi_errhandler_set_( comm, errhandler, ierr ); } void mpi_errhandler_set( comm, errhandler, ierr ) MPI_Fint *comm; MPI_Errhandler *errhandler; MPI_Fint *ierr; { mpi_errhandler_set_( comm, errhandler, ierr ); } /******************************************************/ /******************************************************/ void mpi_finalize_( ierr ) MPI_Fint *ierr; { *ierr = MPI_Finalize( ); } void mpi_finalize__( ierr ) MPI_Fint *ierr; { mpi_finalize_( ierr ); } void MPI_FINALIZE( ierr ) MPI_Fint *ierr; { mpi_finalize_( ierr ); } void mpi_finalize( ierr ) MPI_Fint *ierr; { mpi_finalize_( ierr ); } /******************************************************/ /******************************************************/ void mpi_get_processor_name_( name, resultlen, ierr ) char * name; MPI_Fint * resultlen; MPI_Fint *ierr; { *ierr = MPI_Get_processor_name( name, resultlen ); } void mpi_get_processor_name__( name, resultlen, ierr ) char * name; MPI_Fint * resultlen; MPI_Fint *ierr; { mpi_get_processor_name_( name, resultlen, ierr ); } void MPI_GET_PROCESSOR_NAME( name, resultlen, ierr ) char * name; MPI_Fint * resultlen; MPI_Fint *ierr; { mpi_get_processor_name_( name, resultlen, ierr ); } void mpi_get_processor_name( name, resultlen, ierr ) char * name; MPI_Fint * resultlen; MPI_Fint *ierr; { mpi_get_processor_name_( name, resultlen, ierr ); } /******************************************************/ /******************************************************/ #ifndef TAU_WEAK_MPI_INIT void mpi_init_( ierr) MPI_Fint *ierr; { *ierr = MPI_Init( 0, (char ***)0); } void mpi_init__( ierr) MPI_Fint *ierr; { mpi_init_( ierr); } void MPI_INIT( ierr) MPI_Fint *ierr; { mpi_init_( ierr); } void mpi_init( ierr) MPI_Fint *ierr; { mpi_init_( ierr); } /******************************************************/ /******************************************************/ #ifdef TAU_MPI_THREADED void mpi_init_thread_ (required, provided, ierr ) MPI_Fint *required; MPI_Fint *provided; MPI_Fint *ierr; { *ierr = MPI_Init_thread( 0, (char ***)0, *required, provided ); } void mpi_init_thread__ (required, provided, ierr ) MPI_Fint *required; MPI_Fint *provided; MPI_Fint *ierr; { mpi_init_thread_(required, provided, ierr ); } void MPI_INIT_THREAD(required, provided, ierr ) MPI_Fint *required; MPI_Fint *provided; MPI_Fint *ierr; { mpi_init_thread_(required, provided, ierr ); } void mpi_init_thread(required, provided, ierr ) MPI_Fint *required; MPI_Fint *provided; MPI_Fint *ierr; { mpi_init_thread_(required, provided, ierr ); } #endif /* TAU_MPI_THREADED */ #endif /* TAU_WEAK_MPI_INIT */ /******************************************************/ /******************************************************/ double mpi_wtick_( ) { return MPI_Wtick( ); } double mpi_wtick__( ) { return MPI_Wtick( ); } double MPI_WTICK( ) { return MPI_Wtick( ); } double mpi_wtick( ) { return MPI_Wtick( ); } /******************************************************/ /******************************************************/ double mpi_wtime_( ) { return MPI_Wtime( ); } double mpi_wtime__( ) { return MPI_Wtime( ); } double MPI_WTIME( ) { return MPI_Wtime( ); } double mpi_wtime( ) { return MPI_Wtime( ); } /******************************************************/ /******************************************************/ void mpi_address_( location, address , ierr) void * location; MPI_Fint * address; MPI_Fint *ierr; { MPI_Aint c_address; *ierr = MPI_Address( location, &c_address ); *address = c_address; } void mpi_address__( location, address , ierr) void * location; MPI_Fint * address; MPI_Fint *ierr; { mpi_address_( location, address , ierr); } void MPI_ADDRESS( location, address , ierr) void * location; MPI_Fint * address; MPI_Fint *ierr; { mpi_address_( location, address , ierr); } void mpi_address( location, address , ierr) void * location; MPI_Fint * address; MPI_Fint *ierr; { mpi_address_( location, address , ierr); } /******************************************************/ /******************************************************/ void mpi_bsend_( buf, count, datatype, dest, tag, comm, ierr ) void * buf; MPI_Fint *count; MPI_Fint *datatype; MPI_Fint *dest; MPI_Fint *tag; MPI_Fint *comm; MPI_Fint *ierr; { *ierr = MPI_Bsend( buf, *count, MPI_Type_f2c(*datatype), *dest, *tag, MPI_Comm_f2c(*comm) ); } void mpi_bsend__( buf, count, datatype, dest, tag, comm, ierr ) void * buf; MPI_Fint *count; MPI_Fint *datatype; MPI_Fint *dest; MPI_Fint *tag; MPI_Fint *comm; MPI_Fint *ierr; { mpi_bsend_( buf, count, datatype, dest, tag, comm, ierr ); } void MPI_BSEND( buf, count, datatype, dest, tag, comm, ierr ) void * buf; MPI_Fint *count; MPI_Fint *datatype; MPI_Fint *dest; MPI_Fint *tag; MPI_Fint *comm; MPI_Fint *ierr; { mpi_bsend_( buf, count, datatype, dest, tag, comm, ierr ); } void mpi_bsend( buf, count, datatype, dest, tag, comm, ierr ) void * buf; MPI_Fint *count; MPI_Fint *datatype; MPI_Fint *dest; MPI_Fint *tag; MPI_Fint *comm; MPI_Fint *ierr; { mpi_bsend_( buf, count, datatype, dest, tag, comm, ierr ); } /******************************************************/ /******************************************************/ void mpi_bsend_init_( buf, count, datatype, dest, tag, comm, request, ierr ) void * buf; MPI_Fint *count; MPI_Fint *datatype; MPI_Fint *dest; MPI_Fint *tag; MPI_Fint *comm; MPI_Fint * request; MPI_Fint *ierr; { MPI_Request local_request; *ierr = MPI_Bsend_init( buf, *count, MPI_Type_f2c(*datatype), *dest, *tag, MPI_Comm_f2c(*comm), &local_request ); *request = TAU_MPI_Request_c2f(local_request); } void mpi_bsend_init__( buf, count, datatype, dest, tag, comm, request, ierr ) void * buf; MPI_Fint *count; MPI_Fint *datatype; MPI_Fint *dest; MPI_Fint *tag; MPI_Fint *comm; MPI_Fint * request; MPI_Fint *ierr; { mpi_bsend_init_( buf, count, datatype, dest, tag, comm, request, ierr ); } void MPI_BSEND_INIT( buf, count, datatype, dest, tag, comm, request, ierr ) void * buf; MPI_Fint *count; MPI_Fint *datatype; MPI_Fint *dest; MPI_Fint *tag; MPI_Fint *comm; MPI_Fint * request; MPI_Fint *ierr; { mpi_bsend_init_( buf, count, datatype, dest, tag, comm, request, ierr ); } void mpi_bsend_init( buf, count, datatype, dest, tag, comm, request, ierr ) void * buf; MPI_Fint *count; MPI_Fint *datatype; MPI_Fint *dest; MPI_Fint *tag; MPI_Fint *comm; MPI_Fint * request; MPI_Fint *ierr; { mpi_bsend_init_( buf, count, datatype, dest, tag, comm, request, ierr ); } /******************************************************/ /******************************************************/ void mpi_buffer_attach_( buffer, size, ierr ) void * buffer; MPI_Fint *size; MPI_Fint *ierr; { *ierr = MPI_Buffer_attach( buffer, *size ); } void mpi_buffer_attach__( buffer, size, ierr ) void * buffer; MPI_Fint *size; MPI_Fint *ierr; { mpi_buffer_attach_( buffer, size, ierr ); } void MPI_BUFFER_ATTACH( buffer, size, ierr ) void * buffer; MPI_Fint *size; MPI_Fint *ierr; { mpi_buffer_attach_( buffer, size, ierr ); } void mpi_buffer_attach( buffer, size, ierr ) void * buffer; MPI_Fint *size; MPI_Fint *ierr; { mpi_buffer_attach_( buffer, size, ierr ); } /******************************************************/ /******************************************************/ void mpi_buffer_detach_( buffer, size, ierr ) void * buffer; MPI_Fint * size; MPI_Fint *ierr; { *ierr = MPI_Buffer_detach( buffer, size ); } void mpi_buffer_detach__( buffer, size, ierr ) void * buffer; MPI_Fint * size; MPI_Fint *ierr; { mpi_buffer_detach_( buffer, size, ierr ); } void MPI_BUFFER_DETACH( buffer, size, ierr ) void * buffer; MPI_Fint * size; MPI_Fint *ierr; { mpi_buffer_detach_( buffer, size, ierr ); } void mpi_buffer_detach( buffer, size, ierr ) void * buffer; MPI_Fint * size; MPI_Fint *ierr; { mpi_buffer_detach_( buffer, size, ierr ); } /******************************************************/ /******************************************************/ void mpi_cancel_( request, ierr ) MPI_Fint * request; MPI_Fint *ierr; { MPI_Request local_request = MPI_Request_f2c(*request); *ierr = MPI_Cancel( &local_request ); } void mpi_cancel__( request, ierr ) MPI_Fint * request; MPI_Fint *ierr; { mpi_cancel_( request, ierr ); } void MPI_CANCEL( request, ierr ) MPI_Fint * request; MPI_Fint *ierr; { mpi_cancel_( request, ierr ); } void mpi_cancel( request, ierr ) MPI_Fint * request; MPI_Fint *ierr; { mpi_cancel_( request, ierr ); } /******************************************************/ /******************************************************/ void mpi_request_free_( request, ierr ) MPI_Fint * request; MPI_Fint *ierr; { MPI_Request local_request = MPI_Request_f2c(*request); *ierr = MPI_Request_free( &local_request ); *request = TAU_MPI_Request_c2f(local_request); } void mpi_request_free__( request, ierr ) MPI_Fint * request; MPI_Fint *ierr; { mpi_request_free_( request, ierr ); } void MPI_REQUEST_FREE( request, ierr ) MPI_Fint * request; MPI_Fint *ierr; { mpi_request_free_( request, ierr ); } void mpi_request_free( request, ierr ) MPI_Fint * request; MPI_Fint *ierr; { mpi_request_free_( request, ierr ); } /******************************************************/ /******************************************************/ void mpi_recv_init_( buf, count, datatype, source, tag, comm, request, ierr ) void * buf; MPI_Fint *count; MPI_Fint *datatype; MPI_Fint *source; MPI_Fint *tag; MPI_Fint *comm; MPI_Fint * request; MPI_Fint *ierr; { MPI_Request local_request; *ierr = MPI_Recv_init( buf, *count, MPI_Type_f2c(*datatype), *source, *tag, MPI_Comm_f2c(*comm), &local_request ); *request = TAU_MPI_Request_c2f(local_request); } void mpi_recv_init__( buf, count, datatype, source, tag, comm, request, ierr ) void * buf; MPI_Fint *count; MPI_Fint *datatype; MPI_Fint *source; MPI_Fint *tag; MPI_Fint *comm; MPI_Fint * request; MPI_Fint *ierr; { mpi_recv_init_( buf, count, datatype, source, tag, comm, request, ierr ); } void MPI_RECV_INIT( buf, count, datatype, source, tag, comm, request, ierr ) void * buf; MPI_Fint *count; MPI_Fint *datatype; MPI_Fint *source; MPI_Fint *tag; MPI_Fint *comm; MPI_Fint * request; MPI_Fint *ierr; { mpi_recv_init_( buf, count, datatype, source, tag, comm, request, ierr ); } void mpi_recv_init( buf, count, datatype, source, tag, comm, request, ierr ) void * buf; MPI_Fint *count; MPI_Fint *datatype; MPI_Fint *source; MPI_Fint *tag; MPI_Fint *comm; MPI_Fint * request; MPI_Fint *ierr; { mpi_recv_init_( buf, count, datatype, source, tag, comm, request, ierr ); } /******************************************************/ /******************************************************/ void mpi_send_init_( buf, count, datatype, dest, tag, comm, request, ierr ) void * buf; MPI_Fint *count; MPI_Fint *datatype; MPI_Fint *dest; MPI_Fint *tag; MPI_Fint *comm; MPI_Fint * request; MPI_Fint *ierr; { MPI_Request local_request; *ierr = MPI_Send_init( buf, *count, MPI_Type_f2c(*datatype), *dest, *tag, MPI_Comm_f2c(*comm), &local_request ); *request = TAU_MPI_Request_c2f(local_request); } void mpi_send_init__( buf, count, datatype, dest, tag, comm, request, ierr ) void * buf; MPI_Fint *count; MPI_Fint *datatype; MPI_Fint *dest; MPI_Fint *tag; MPI_Fint *comm; MPI_Fint * request; MPI_Fint *ierr; { mpi_send_init_( buf, count, datatype, dest, tag, comm, request, ierr ); } void MPI_SEND_INIT( buf, count, datatype, dest, tag, comm, request, ierr ) void * buf; MPI_Fint *count; MPI_Fint *datatype; MPI_Fint *dest; MPI_Fint *tag; MPI_Fint *comm; MPI_Fint * request; MPI_Fint *ierr; { mpi_send_init_( buf, count, datatype, dest, tag, comm, request, ierr ); } void mpi_send_init( buf, count, datatype, dest, tag, comm, request, ierr ) void * buf; MPI_Fint *count; MPI_Fint *datatype; MPI_Fint *dest; MPI_Fint *tag; MPI_Fint *comm; MPI_Fint * request; MPI_Fint *ierr; { mpi_send_init_( buf, count, datatype, dest, tag, comm, request, ierr ); } /******************************************************/ /******************************************************/ void mpi_get_elements_( status, datatype, elements, ierr ) MPI_Fint * status; MPI_Fint *datatype; MPI_Fint * elements; MPI_Fint *ierr; { MPI_Status local_status; MPI_Status_f2c(status, &local_status); *ierr = MPI_Get_elements( &local_status, MPI_Type_f2c(*datatype), elements ); } void mpi_get_elements__( status, datatype, elements, ierr ) MPI_Fint * status; MPI_Fint *datatype; MPI_Fint * elements; MPI_Fint *ierr; { mpi_get_elements_( status, datatype, elements, ierr ); } void MPI_GET_ELEMENTS( status, datatype, elements, ierr ) MPI_Fint * status; MPI_Fint *datatype; MPI_Fint * elements; MPI_Fint *ierr; { mpi_get_elements_( status, datatype, elements, ierr ); } void mpi_get_elements( status, datatype, elements, ierr ) MPI_Fint * status; MPI_Fint *datatype; MPI_Fint * elements; MPI_Fint *ierr; { mpi_get_elements_( status, datatype, elements, ierr ); } /******************************************************/ /******************************************************/ void mpi_get_count_( status, datatype, count, ierr ) MPI_Fint * status; MPI_Fint *datatype; MPI_Fint * count; MPI_Fint *ierr; { MPI_Status local_status; MPI_Status_f2c(status, &local_status); *ierr = MPI_Get_count( &local_status, MPI_Type_f2c(*datatype), count ); } void mpi_get_count__( status, datatype, count, ierr ) MPI_Fint * status; MPI_Fint *datatype; MPI_Fint * count; MPI_Fint *ierr; { mpi_get_count_( status, datatype, count, ierr ); } void MPI_GET_COUNT( status, datatype, count, ierr ) MPI_Fint * status; MPI_Fint *datatype; MPI_Fint * count; MPI_Fint *ierr; { mpi_get_count_( status, datatype, count, ierr ); } void mpi_get_count( status, datatype, count, ierr ) MPI_Fint * status; MPI_Fint *datatype; MPI_Fint * count; MPI_Fint *ierr; { mpi_get_count_( status, datatype, count, ierr ); } /******************************************************/ /******************************************************/ void mpi_ibsend_( buf, count, datatype, dest, tag, comm, request, ierr ) void * buf; MPI_Fint *count; MPI_Fint *datatype; MPI_Fint *dest; MPI_Fint *tag; MPI_Fint *comm; MPI_Fint * request; MPI_Fint *ierr; { MPI_Request local_request; *ierr = MPI_Ibsend( buf, *count, MPI_Type_f2c(*datatype), *dest, *tag, MPI_Comm_f2c(*comm), &local_request ); *request = TAU_MPI_Request_c2f(local_request); } void mpi_ibsend__( buf, count, datatype, dest, tag, comm, request, ierr ) void * buf; MPI_Fint *count; MPI_Fint *datatype; MPI_Fint *dest; MPI_Fint *tag; MPI_Fint *comm; MPI_Fint * request; MPI_Fint *ierr; { mpi_ibsend_( buf, count, datatype, dest, tag, comm, request, ierr ); } void MPI_IBSEND( buf, count, datatype, dest, tag, comm, request, ierr ) void * buf; MPI_Fint *count; MPI_Fint *datatype; MPI_Fint *dest; MPI_Fint *tag; MPI_Fint *comm; MPI_Fint * request; MPI_Fint *ierr; { mpi_ibsend_( buf, count, datatype, dest, tag, comm, request, ierr ); } void mpi_ibsend( buf, count, datatype, dest, tag, comm, request, ierr ) void * buf; MPI_Fint *count; MPI_Fint *datatype; MPI_Fint *dest; MPI_Fint *tag; MPI_Fint *comm; MPI_Fint * request; MPI_Fint *ierr; { mpi_ibsend_( buf, count, datatype, dest, tag, comm, request, ierr ); } /******************************************************/ /******************************************************/ void mpi_iprobe_( source, tag, comm, flag, status, ierr ) MPI_Fint *source; MPI_Fint *tag; MPI_Fint *comm; MPI_Fint * flag; MPI_Fint * status; MPI_Fint *ierr; { MPI_Status local_status; *ierr = MPI_Iprobe( *source, *tag, MPI_Comm_f2c(*comm), flag, &local_status ); MPI_Status_c2f(&local_status, status); } void mpi_iprobe__( source, tag, comm, flag, status, ierr ) MPI_Fint *source; MPI_Fint *tag; MPI_Fint *comm; MPI_Fint * flag; MPI_Fint * status; MPI_Fint *ierr; { mpi_iprobe_( source, tag, comm, flag, status, ierr ); } void MPI_IPROBE( source, tag, comm, flag, status, ierr ) MPI_Fint *source; MPI_Fint *tag; MPI_Fint *comm; MPI_Fint * flag; MPI_Fint * status; MPI_Fint *ierr; { mpi_iprobe_( source, tag, comm, flag, status, ierr ); } void mpi_iprobe( source, tag, comm, flag, status, ierr ) MPI_Fint *source; MPI_Fint *tag; MPI_Fint *comm; MPI_Fint * flag; MPI_Fint * status; MPI_Fint *ierr; { mpi_iprobe_( source, tag, comm, flag, status, ierr ); } /******************************************************/ /******************************************************/ void mpi_irecv_( buf, count, datatype, source, tag, comm, request, ierr ) void * buf; MPI_Fint *count; MPI_Fint *datatype; MPI_Fint *source; MPI_Fint *tag; MPI_Fint *comm; MPI_Fint * request; MPI_Fint *ierr; { MPI_Request local_request; *ierr = MPI_Irecv( buf, *count, MPI_Type_f2c(*datatype), *source, *tag, MPI_Comm_f2c(*comm), &local_request ); *request = TAU_MPI_Request_c2f(local_request); } void mpi_irecv__( buf, count, datatype, source, tag, comm, request, ierr ) void * buf; MPI_Fint *count; MPI_Fint *datatype; MPI_Fint *source; MPI_Fint *tag; MPI_Fint *comm; MPI_Fint * request; MPI_Fint *ierr; { mpi_irecv_( buf, count, datatype, source, tag, comm, request, ierr ); } void MPI_IRECV( buf, count, datatype, source, tag, comm, request, ierr ) void * buf; MPI_Fint *count; MPI_Fint *datatype; MPI_Fint *source; MPI_Fint *tag; MPI_Fint *comm; MPI_Fint * request; MPI_Fint *ierr; { mpi_irecv_( buf, count, datatype, source, tag, comm, request, ierr ); } void mpi_irecv( buf, count, datatype, source, tag, comm, request, ierr ) void * buf; MPI_Fint *count; MPI_Fint *datatype; MPI_Fint *source; MPI_Fint *tag; MPI_Fint *comm; MPI_Fint * request; MPI_Fint *ierr; { mpi_irecv_( buf, count, datatype, source, tag, comm, request, ierr ); } /******************************************************/ /******************************************************/ void mpi_irsend_( buf, count, datatype, dest, tag, comm, request, ierr ) void * buf; MPI_Fint *count; MPI_Fint *datatype; MPI_Fint *dest; MPI_Fint *tag; MPI_Fint *comm; MPI_Fint * request; MPI_Fint *ierr; { MPI_Request local_request; *ierr = MPI_Irsend( buf, *count, MPI_Type_f2c(*datatype), *dest, *tag, MPI_Comm_f2c(*comm), &local_request ); *request = TAU_MPI_Request_c2f(local_request); } void mpi_irsend__( buf, count, datatype, dest, tag, comm, request, ierr ) void * buf; MPI_Fint *count; MPI_Fint *datatype; MPI_Fint *dest; MPI_Fint *tag; MPI_Fint *comm; MPI_Fint * request; MPI_Fint *ierr; { mpi_irsend_( buf, count, datatype, dest, tag, comm, request, ierr ); } void MPI_IRSEND( buf, count, datatype, dest, tag, comm, request, ierr ) void * buf; MPI_Fint *count; MPI_Fint *datatype; MPI_Fint *dest; MPI_Fint *tag; MPI_Fint *comm; MPI_Fint * request; MPI_Fint *ierr; { mpi_irsend_( buf, count, datatype, dest, tag, comm, request, ierr ); } void mpi_irsend( buf, count, datatype, dest, tag, comm, request, ierr ) void * buf; MPI_Fint *count; MPI_Fint *datatype; MPI_Fint *dest; MPI_Fint *tag; MPI_Fint *comm; MPI_Fint * request; MPI_Fint *ierr; { mpi_irsend_( buf, count, datatype, dest, tag, comm, request, ierr ); } /******************************************************/ /******************************************************/ void mpi_isend_( buf, count, datatype, dest, tag, comm, request, ierr ) void * buf; MPI_Fint *count; MPI_Fint *datatype; MPI_Fint *dest; MPI_Fint *tag; MPI_Fint *comm; MPI_Fint * request; MPI_Fint *ierr; { MPI_Request local_request; *ierr = MPI_Isend( buf, *count, MPI_Type_f2c(*datatype), *dest, *tag, MPI_Comm_f2c(*comm), &local_request ); *request = TAU_MPI_Request_c2f(local_request); } void mpi_isend__( buf, count, datatype, dest, tag, comm, request, ierr ) void * buf; MPI_Fint *count; MPI_Fint *datatype; MPI_Fint *dest; MPI_Fint *tag; MPI_Fint *comm; MPI_Fint * request; MPI_Fint *ierr; { mpi_isend_( buf, count, datatype, dest, tag, comm, request, ierr ); } void MPI_ISEND( buf, count, datatype, dest, tag, comm, request, ierr ) void * buf; MPI_Fint *count; MPI_Fint *datatype; MPI_Fint *dest; MPI_Fint *tag; MPI_Fint *comm; MPI_Fint * request; MPI_Fint *ierr; { mpi_isend_( buf, count, datatype, dest, tag, comm, request, ierr ); } void mpi_isend( buf, count, datatype, dest, tag, comm, request, ierr ) void * buf; MPI_Fint *count; MPI_Fint *datatype; MPI_Fint *dest; MPI_Fint *tag; MPI_Fint *comm; MPI_Fint * request; MPI_Fint *ierr; { mpi_isend_( buf, count, datatype, dest, tag, comm, request, ierr ); } /******************************************************/ /******************************************************/ void mpi_issend_( buf, count, datatype, dest, tag, comm, request, ierr ) void * buf; MPI_Fint *count; MPI_Fint *datatype; MPI_Fint *dest; MPI_Fint *tag; MPI_Fint *comm; MPI_Fint * request; MPI_Fint *ierr; { MPI_Request local_request; *ierr = MPI_Issend( buf, *count, MPI_Type_f2c(*datatype), *dest, *tag, MPI_Comm_f2c(*comm), &local_request ); *request = TAU_MPI_Request_c2f(local_request); } void mpi_issend__( buf, count, datatype, dest, tag, comm, request, ierr ) void * buf; MPI_Fint *count; MPI_Fint *datatype; MPI_Fint *dest; MPI_Fint *tag; MPI_Fint *comm; MPI_Fint * request; MPI_Fint *ierr; { mpi_issend_( buf, count, datatype, dest, tag, comm, request, ierr ); } void MPI_ISSEND( buf, count, datatype, dest, tag, comm, request, ierr ) void * buf; MPI_Fint *count; MPI_Fint *datatype; MPI_Fint *dest; MPI_Fint *tag; MPI_Fint *comm; MPI_Fint * request; MPI_Fint *ierr; { mpi_issend_( buf, count, datatype, dest, tag, comm, request, ierr ); } void mpi_issend( buf, count, datatype, dest, tag, comm, request, ierr ) void * buf; MPI_Fint *count; MPI_Fint *datatype; MPI_Fint *dest; MPI_Fint *tag; MPI_Fint *comm; MPI_Fint * request; MPI_Fint *ierr; { mpi_issend_( buf, count, datatype, dest, tag, comm, request, ierr ); } /******************************************************/ /******************************************************/ void mpi_pack_( inbuf, incount, type, outbuf, outcount, position, comm, ierr ) void * inbuf; MPI_Fint *incount; MPI_Fint *type; void * outbuf; MPI_Fint *outcount; MPI_Fint * position; MPI_Fint *comm; MPI_Fint *ierr; { *ierr = MPI_Pack( inbuf, *incount, MPI_Type_f2c(*type), outbuf, *outcount, position, MPI_Comm_f2c(*comm) ); } void mpi_pack__( inbuf, incount, type, outbuf, outcount, position, comm, ierr ) void * inbuf; MPI_Fint *incount; MPI_Fint *type; void * outbuf; MPI_Fint *outcount; MPI_Fint * position; MPI_Fint *comm; MPI_Fint *ierr; { mpi_pack_( inbuf, incount, type, outbuf, outcount, position, comm, ierr ); } void MPI_PACK( inbuf, incount, type, outbuf, outcount, position, comm, ierr ) void * inbuf; MPI_Fint *incount; MPI_Fint *type; void * outbuf; MPI_Fint *outcount; MPI_Fint * position; MPI_Fint *comm; MPI_Fint *ierr; { mpi_pack_( inbuf, incount, type, outbuf, outcount, position, comm, ierr ); } void mpi_pack( inbuf, incount, type, outbuf, outcount, position, comm, ierr ) void * inbuf; MPI_Fint *incount; MPI_Fint *type; void * outbuf; MPI_Fint *outcount; MPI_Fint * position; MPI_Fint *comm; MPI_Fint *ierr; { mpi_pack_( inbuf, incount, type, outbuf, outcount, position, comm, ierr ); } /******************************************************/ /******************************************************/ void mpi_pack_size_( incount, datatype, comm, size, ierr ) MPI_Fint *incount; MPI_Fint *datatype; MPI_Fint *comm; MPI_Fint * size; MPI_Fint *ierr; { *ierr = MPI_Pack_size( *incount, MPI_Type_f2c(*datatype), MPI_Comm_f2c(*comm), size ); } void mpi_pack_size__( incount, datatype, comm, size, ierr ) MPI_Fint *incount; MPI_Fint *datatype; MPI_Fint *comm; MPI_Fint * size; MPI_Fint *ierr; { mpi_pack_size_( incount, datatype, comm, size, ierr ); } void MPI_PACK_SIZE( incount, datatype, comm, size, ierr ) MPI_Fint *incount; MPI_Fint *datatype; MPI_Fint *comm; MPI_Fint * size; MPI_Fint *ierr; { mpi_pack_size_( incount, datatype, comm, size, ierr ); } void mpi_pack_size( incount, datatype, comm, size, ierr ) MPI_Fint *incount; MPI_Fint *datatype; MPI_Fint *comm; MPI_Fint * size; MPI_Fint *ierr; { mpi_pack_size_( incount, datatype, comm, size, ierr ); } /******************************************************/ /******************************************************/ void mpi_probe_( source, tag, comm, status, ierr ) MPI_Fint *source; MPI_Fint *tag; MPI_Fint *comm; MPI_Fint * status; MPI_Fint *ierr; { MPI_Status local_status; *ierr = MPI_Probe( *source, *tag, MPI_Comm_f2c(*comm), &local_status ); MPI_Status_c2f(&local_status, status); } void mpi_probe__( source, tag, comm, status, ierr ) MPI_Fint *source; MPI_Fint *tag; MPI_Fint *comm; MPI_Fint * status; MPI_Fint *ierr; { mpi_probe_( source, tag, comm, status, ierr ); } void MPI_PROBE( source, tag, comm, status, ierr ) MPI_Fint *source; MPI_Fint *tag; MPI_Fint *comm; MPI_Fint * status; MPI_Fint *ierr; { mpi_probe_( source, tag, comm, status, ierr ); } void mpi_probe( source, tag, comm, status, ierr ) MPI_Fint *source; MPI_Fint *tag; MPI_Fint *comm; MPI_Fint * status; MPI_Fint *ierr; { mpi_probe_( source, tag, comm, status, ierr ); } /******************************************************/ /******************************************************/ void mpi_recv_( buf, count, datatype, source, tag, comm, status, ierr ) void * buf; MPI_Fint *count; MPI_Fint *datatype; MPI_Fint *source; MPI_Fint *tag; MPI_Fint *comm; MPI_Fint * status; MPI_Fint *ierr; { MPI_Status s; *ierr = MPI_Recv( buf, *count, MPI_Type_f2c(*datatype), *source, *tag, MPI_Comm_f2c(*comm), &s ); MPI_Status_c2f(&s, status); } void mpi_recv__( buf, count, datatype, source, tag, comm, status, ierr ) void * buf; MPI_Fint *count; MPI_Fint *datatype; MPI_Fint *source; MPI_Fint *tag; MPI_Fint *comm; MPI_Fint * status; MPI_Fint *ierr; { mpi_recv_( buf, count, datatype, source, tag, comm, status, ierr ); } void MPI_RECV( buf, count, datatype, source, tag, comm, status, ierr ) void * buf; MPI_Fint *count; MPI_Fint *datatype; MPI_Fint *source; MPI_Fint *tag; MPI_Fint *comm; MPI_Fint * status; MPI_Fint *ierr; { mpi_recv_( buf, count, datatype, source, tag, comm, status, ierr ); } void mpi_recv( buf, count, datatype, source, tag, comm, status, ierr ) void * buf; MPI_Fint *count; MPI_Fint *datatype; MPI_Fint *source; MPI_Fint *tag; MPI_Fint *comm; MPI_Fint * status; MPI_Fint *ierr; { mpi_recv_( buf, count, datatype, source, tag, comm, status, ierr ); } /******************************************************/ /******************************************************/ void mpi_rsend_( buf, count, datatype, dest, tag, comm, ierr ) void * buf; MPI_Fint *count; MPI_Fint *datatype; MPI_Fint *dest; MPI_Fint *tag; MPI_Fint *comm; MPI_Fint *ierr; { *ierr = MPI_Rsend( buf, *count, MPI_Type_f2c(*datatype), *dest, *tag, MPI_Comm_f2c(*comm) ); } void mpi_rsend__( buf, count, datatype, dest, tag, comm, ierr ) void * buf; MPI_Fint *count; MPI_Fint *datatype; MPI_Fint *dest; MPI_Fint *tag; MPI_Fint *comm; MPI_Fint *ierr; { mpi_rsend_( buf, count, datatype, dest, tag, comm, ierr ); } void MPI_RSEND( buf, count, datatype, dest, tag, comm, ierr ) void * buf; MPI_Fint *count; MPI_Fint *datatype; MPI_Fint *dest; MPI_Fint *tag; MPI_Fint *comm; MPI_Fint *ierr; { mpi_rsend_( buf, count, datatype, dest, tag, comm, ierr ); } void mpi_rsend( buf, count, datatype, dest, tag, comm, ierr ) void * buf; MPI_Fint *count; MPI_Fint *datatype; MPI_Fint *dest; MPI_Fint *tag; MPI_Fint *comm; MPI_Fint *ierr; { mpi_rsend_( buf, count, datatype, dest, tag, comm, ierr ); } /******************************************************/ /******************************************************/ void mpi_rsend_init_( buf, count, datatype, dest, tag, comm, request, ierr ) void * buf; MPI_Fint *count; MPI_Fint *datatype; MPI_Fint *dest; MPI_Fint *tag; MPI_Fint *comm; MPI_Fint * request; MPI_Fint *ierr; { MPI_Request local_request; *ierr = MPI_Rsend_init( buf, *count, MPI_Type_f2c(*datatype), *dest, *tag, MPI_Comm_f2c(*comm), &local_request ); *request = TAU_MPI_Request_c2f(local_request); } void mpi_rsend_init__( buf, count, datatype, dest, tag, comm, request, ierr ) void * buf; MPI_Fint *count; MPI_Fint *datatype; MPI_Fint *dest; MPI_Fint *tag; MPI_Fint *comm; MPI_Fint * request; MPI_Fint *ierr; { mpi_rsend_init_( buf, count, datatype, dest, tag, comm, request, ierr ); } void MPI_RSEND_INIT( buf, count, datatype, dest, tag, comm, request, ierr ) void * buf; MPI_Fint *count; MPI_Fint *datatype; MPI_Fint *dest; MPI_Fint *tag; MPI_Fint *comm; MPI_Fint * request; MPI_Fint *ierr; { mpi_rsend_init_( buf, count, datatype, dest, tag, comm, request, ierr ); } void mpi_rsend_init( buf, count, datatype, dest, tag, comm, request, ierr ) void * buf; MPI_Fint *count; MPI_Fint *datatype; MPI_Fint *dest; MPI_Fint *tag; MPI_Fint *comm; MPI_Fint * request; MPI_Fint *ierr; { mpi_rsend_init_( buf, count, datatype, dest, tag, comm, request, ierr ); } /******************************************************/ /******************************************************/ void mpi_send_( buf, count, datatype, dest, tag, comm, ierr ) void * buf; MPI_Fint *count; MPI_Fint *datatype; MPI_Fint *dest; MPI_Fint *tag; MPI_Fint *comm; MPI_Fint *ierr; { *ierr = MPI_Send( buf, *count, MPI_Type_f2c(*datatype), *dest, *tag, MPI_Comm_f2c(*comm )); } void mpi_send__( buf, count, datatype, dest, tag, comm, ierr ) void * buf; MPI_Fint *count; MPI_Fint *datatype; MPI_Fint *dest; MPI_Fint *tag; MPI_Fint *comm; MPI_Fint *ierr; { mpi_send_( buf, count, datatype, dest, tag, comm, ierr ); } void MPI_SEND( buf, count, datatype, dest, tag, comm, ierr ) void * buf; MPI_Fint *count; MPI_Fint *datatype; MPI_Fint *dest; MPI_Fint *tag; MPI_Fint *comm; MPI_Fint *ierr; { mpi_send_( buf, count, datatype, dest, tag, comm, ierr ); } void mpi_send( buf, count, datatype, dest, tag, comm, ierr ) void * buf; MPI_Fint *count; MPI_Fint *datatype; MPI_Fint *dest; MPI_Fint *tag; MPI_Fint *comm; MPI_Fint *ierr; { mpi_send_( buf, count, datatype, dest, tag, comm, ierr ); } /******************************************************/ /******************************************************/ void mpi_sendrecv_( sendbuf, sendcount, sendtype, dest, sendtag, recvbuf, recvcount, recvtype, source, recvtag, comm, status, ierr ) void * sendbuf; MPI_Fint *sendcount; MPI_Fint *sendtype; MPI_Fint *dest; MPI_Fint *sendtag; void * recvbuf; MPI_Fint *recvcount; MPI_Fint *recvtype; MPI_Fint *source; MPI_Fint *recvtag; MPI_Fint *comm; MPI_Fint * status; MPI_Fint *ierr; { MPI_Status local_status; *ierr = MPI_Sendrecv( sendbuf, *sendcount, MPI_Type_f2c(*sendtype), *dest, *sendtag, recvbuf, *recvcount, MPI_Type_f2c(*recvtype), *source, *recvtag, MPI_Comm_f2c(*comm), &local_status ); MPI_Status_c2f(&local_status, status); } void mpi_sendrecv__( sendbuf, sendcount, sendtype, dest, sendtag, recvbuf, recvcount, recvtype, source, recvtag, comm, status, ierr ) void * sendbuf; MPI_Fint *sendcount; MPI_Fint *sendtype; MPI_Fint *dest; MPI_Fint *sendtag; void * recvbuf; MPI_Fint *recvcount; MPI_Fint *recvtype; MPI_Fint *source; MPI_Fint *recvtag; MPI_Fint *comm; MPI_Fint * status; MPI_Fint *ierr; { mpi_sendrecv_( sendbuf, sendcount, sendtype, dest, sendtag, recvbuf, recvcount, recvtype, source, recvtag, comm, status, ierr ); } void MPI_SENDRECV( sendbuf, sendcount, sendtype, dest, sendtag, recvbuf, recvcount, recvtype, source, recvtag, comm, status, ierr ) void * sendbuf; MPI_Fint *sendcount; MPI_Fint *sendtype; MPI_Fint *dest; MPI_Fint *sendtag; void * recvbuf; MPI_Fint *recvcount; MPI_Fint *recvtype; MPI_Fint *source; MPI_Fint *recvtag; MPI_Fint *comm; MPI_Fint * status; MPI_Fint *ierr; { mpi_sendrecv_( sendbuf, sendcount, sendtype, dest, sendtag, recvbuf, recvcount, recvtype, source, recvtag, comm, status, ierr ); } void mpi_sendrecv( sendbuf, sendcount, sendtype, dest, sendtag, recvbuf, recvcount, recvtype, source, recvtag, comm, status, ierr ) void * sendbuf; MPI_Fint *sendcount; MPI_Fint *sendtype; MPI_Fint *dest; MPI_Fint *sendtag; void * recvbuf; MPI_Fint *recvcount; MPI_Fint *recvtype; MPI_Fint *source; MPI_Fint *recvtag; MPI_Fint *comm; MPI_Fint * status; MPI_Fint *ierr; { mpi_sendrecv_( sendbuf, sendcount, sendtype, dest, sendtag, recvbuf, recvcount, recvtype, source, recvtag, comm, status, ierr ); } /******************************************************/ /******************************************************/ void mpi_sendrecv_replace_( buf, count, datatype, dest, sendtag, source, recvtag, comm, status, ierr ) void * buf; MPI_Fint *count; MPI_Fint *datatype; MPI_Fint *dest; MPI_Fint *sendtag; MPI_Fint *source; MPI_Fint *recvtag; MPI_Fint *comm; MPI_Fint * status; MPI_Fint *ierr; { MPI_Status local_status; *ierr = MPI_Sendrecv_replace( buf, *count, MPI_Type_f2c(*datatype), *dest, *sendtag, *source, *recvtag, MPI_Comm_f2c(*comm), &local_status ); MPI_Status_c2f(&local_status, status); } void mpi_sendrecv_replace__( buf, count, datatype, dest, sendtag, source, recvtag, comm, status, ierr ) void * buf; MPI_Fint *count; MPI_Fint *datatype; MPI_Fint *dest; MPI_Fint *sendtag; MPI_Fint *source; MPI_Fint *recvtag; MPI_Fint *comm; MPI_Fint * status; MPI_Fint *ierr; { mpi_sendrecv_replace_( buf, count, datatype, dest, sendtag, source, recvtag, comm, status, ierr ); } void MPI_SENDRECV_REPLACE( buf, count, datatype, dest, sendtag, source, recvtag, comm, status, ierr ) void * buf; MPI_Fint *count; MPI_Fint *datatype; MPI_Fint *dest; MPI_Fint *sendtag; MPI_Fint *source; MPI_Fint *recvtag; MPI_Fint *comm; MPI_Fint * status; MPI_Fint *ierr; { mpi_sendrecv_replace_( buf, count, datatype, dest, sendtag, source, recvtag, comm, status, ierr ); } void mpi_sendrecv_replace( buf, count, datatype, dest, sendtag, source, recvtag, comm, status, ierr ) void * buf; MPI_Fint *count; MPI_Fint *datatype; MPI_Fint *dest; MPI_Fint *sendtag; MPI_Fint *source; MPI_Fint *recvtag; MPI_Fint *comm; MPI_Fint * status; MPI_Fint *ierr; { mpi_sendrecv_replace_( buf, count, datatype, dest, sendtag, source, recvtag, comm, status, ierr ); } /******************************************************/ /******************************************************/ void mpi_ssend_( buf, count, datatype, dest, tag, comm, ierr ) void * buf; MPI_Fint *count; MPI_Fint *datatype; MPI_Fint *dest; MPI_Fint *tag; MPI_Fint *comm; MPI_Fint *ierr; { *ierr = MPI_Ssend( buf, *count, MPI_Type_f2c(*datatype), *dest, *tag, MPI_Comm_f2c(*comm) ); } void mpi_ssend__( buf, count, datatype, dest, tag, comm, ierr ) void * buf; MPI_Fint *count; MPI_Fint *datatype; MPI_Fint *dest; MPI_Fint *tag; MPI_Fint *comm; MPI_Fint *ierr; { mpi_ssend_( buf, count, datatype, dest, tag, comm, ierr ); } void MPI_SSEND( buf, count, datatype, dest, tag, comm, ierr ) void * buf; MPI_Fint *count; MPI_Fint *datatype; MPI_Fint *dest; MPI_Fint *tag; MPI_Fint *comm; MPI_Fint *ierr; { mpi_ssend_( buf, count, datatype, dest, tag, comm, ierr ); } void mpi_ssend( buf, count, datatype, dest, tag, comm, ierr ) void * buf; MPI_Fint *count; MPI_Fint *datatype; MPI_Fint *dest; MPI_Fint *tag; MPI_Fint *comm; MPI_Fint *ierr; { mpi_ssend_( buf, count, datatype, dest, tag, comm, ierr ); } /******************************************************/ /******************************************************/ void mpi_ssend_init_( buf, count, datatype, dest, tag, comm, request, ierr ) void * buf; MPI_Fint *count; MPI_Fint *datatype; MPI_Fint *dest; MPI_Fint *tag; MPI_Fint *comm; MPI_Fint * request; MPI_Fint *ierr; { MPI_Request local_request; *ierr = MPI_Ssend_init( buf, *count, MPI_Type_f2c(*datatype), *dest, *tag, MPI_Comm_f2c(*comm), &local_request ); *request = TAU_MPI_Request_c2f(local_request); } void mpi_ssend_init__( buf, count, datatype, dest, tag, comm, request, ierr ) void * buf; MPI_Fint *count; MPI_Fint *datatype; MPI_Fint *dest; MPI_Fint *tag; MPI_Fint *comm; MPI_Fint * request; MPI_Fint *ierr; { mpi_ssend_init_( buf, count, datatype, dest, tag, comm, request, ierr ); } void MPI_SSEND_INIT( buf, count, datatype, dest, tag, comm, request, ierr ) void * buf; MPI_Fint *count; MPI_Fint *datatype; MPI_Fint *dest; MPI_Fint *tag; MPI_Fint *comm; MPI_Fint * request; MPI_Fint *ierr; { mpi_ssend_init_( buf, count, datatype, dest, tag, comm, request, ierr ); } void mpi_ssend_init( buf, count, datatype, dest, tag, comm, request, ierr ) void * buf; MPI_Fint *count; MPI_Fint *datatype; MPI_Fint *dest; MPI_Fint *tag; MPI_Fint *comm; MPI_Fint * request; MPI_Fint *ierr; { mpi_ssend_init_( buf, count, datatype, dest, tag, comm, request, ierr ); } /******************************************************/ /******************************************************/ void mpi_start_( request, ierr ) MPI_Fint * request; MPI_Fint *ierr; { MPI_Request local_request = MPI_Request_f2c(*request); *ierr = MPI_Start( &local_request ); *request = TAU_MPI_Request_c2f(local_request); } void mpi_start__( request, ierr ) MPI_Fint * request; MPI_Fint *ierr; { mpi_start_( request, ierr ); } void MPI_START( request, ierr ) MPI_Fint * request; MPI_Fint *ierr; { mpi_start_( request, ierr ); } void mpi_start( request, ierr ) MPI_Fint * request; MPI_Fint *ierr; { mpi_start_( request, ierr ); } /******************************************************/ /******************************************************/ void mpi_startall_( count, array_of_requests, ierr ) MPI_Fint *count; MPI_Fint * array_of_requests; MPI_Fint *ierr; { TAU_DECL_ALLOC_LOCAL(MPI_Request, local_requests, *count); TAU_ASSIGN_VALUES(local_requests, array_of_requests, *count, MPI_Request_f2c); *ierr = MPI_Startall( *count, local_requests ); TAU_ASSIGN_VALUES(array_of_requests, local_requests, *count, TAU_MPI_Request_c2f); TAU_FREE_LOCAL(local_requests); } void mpi_startall__( count, array_of_requests, ierr ) MPI_Fint *count; MPI_Fint * array_of_requests; MPI_Fint *ierr; { mpi_startall_( count, array_of_requests, ierr ); } void MPI_STARTALL( count, array_of_requests, ierr ) MPI_Fint *count; MPI_Fint * array_of_requests; MPI_Fint *ierr; { mpi_startall_( count, array_of_requests, ierr ); } void mpi_startall( count, array_of_requests, ierr ) MPI_Fint *count; MPI_Fint * array_of_requests; MPI_Fint *ierr; { mpi_startall_( count, array_of_requests, ierr ); } /******************************************************/ /******************************************************/ void mpi_test_( request, flag, status, ierr ) MPI_Fint * request; MPI_Fint * flag; MPI_Fint * status; MPI_Fint *ierr; { MPI_Status local_status; MPI_Request local_request = MPI_Request_f2c(*request); *ierr = MPI_Test( &local_request, flag, &local_status ); *request = TAU_MPI_Request_c2f(local_request); MPI_Status_c2f(&local_status, status); } void mpi_test__( request, flag, status, ierr ) MPI_Fint * request; MPI_Fint * flag; MPI_Fint * status; MPI_Fint *ierr; { mpi_test_( request, flag, status, ierr ); } void MPI_TEST( request, flag, status, ierr ) MPI_Fint * request; MPI_Fint * flag; MPI_Fint * status; MPI_Fint *ierr; { mpi_test_( request, flag, status, ierr ); } void mpi_test( request, flag, status, ierr ) MPI_Fint * request; MPI_Fint * flag; MPI_Fint * status; MPI_Fint *ierr; { mpi_test_( request, flag, status, ierr ); } /******************************************************/ /******************************************************/ void mpi_testall_( count, array_of_requests, flag, array_of_statuses, ierr ) MPI_Fint *count; MPI_Fint * array_of_requests; MPI_Fint * flag; MPI_Fint * array_of_statuses; MPI_Fint *ierr; { TAU_DECL_LOCAL(MPI_Status, local_statuses); TAU_DECL_ALLOC_LOCAL(MPI_Request, local_requests, *count); TAU_ALLOC_LOCAL(MPI_Status, local_statuses, *count); TAU_ASSIGN_VALUES(local_requests, array_of_requests, *count, MPI_Request_f2c); TAU_ASSIGN_STATUS_F2C(local_statuses, array_of_statuses, *count, MPI_Status_f2c); *ierr = MPI_Testall( *count, local_requests, flag, local_statuses ); TAU_ASSIGN_VALUES(array_of_requests, local_requests, *count, TAU_MPI_Request_c2f); TAU_ASSIGN_STATUS_C2F(array_of_statuses, local_statuses, *count, MPI_Status_c2f); TAU_FREE_LOCAL(local_requests); TAU_FREE_LOCAL(local_statuses); } void mpi_testall__( count, array_of_requests, flag, array_of_statuses, ierr ) MPI_Fint *count; MPI_Fint * array_of_requests; MPI_Fint * flag; MPI_Fint * array_of_statuses; MPI_Fint *ierr; { mpi_testall_( count, array_of_requests, flag, array_of_statuses, ierr ); } void MPI_TESTALL( count, array_of_requests, flag, array_of_statuses, ierr ) MPI_Fint *count; MPI_Fint * array_of_requests; MPI_Fint * flag; MPI_Fint * array_of_statuses; MPI_Fint *ierr; { mpi_testall_( count, array_of_requests, flag, array_of_statuses, ierr ); } void mpi_testall( count, array_of_requests, flag, array_of_statuses, ierr ) MPI_Fint *count; MPI_Fint * array_of_requests; MPI_Fint * flag; MPI_Fint * array_of_statuses; MPI_Fint *ierr; { mpi_testall_( count, array_of_requests, flag, array_of_statuses, ierr ); } /******************************************************/ /******************************************************/ void mpi_testany_( count, array_of_requests, index, flag, status, ierr ) MPI_Fint *count; MPI_Fint * array_of_requests; MPI_Fint * index; MPI_Fint * flag; MPI_Fint * status; MPI_Fint *ierr; { MPI_Status local_status; TAU_DECL_ALLOC_LOCAL(MPI_Request, local_requests, *count); TAU_ASSIGN_VALUES(local_requests, array_of_requests, *count, MPI_Request_f2c); *ierr = MPI_Testany( *count, local_requests, index, flag, &local_status ); TAU_ASSIGN_VALUES(array_of_requests, local_requests, *count, TAU_MPI_Request_c2f); MPI_Status_c2f(&local_status, status); TAU_FREE_LOCAL(local_requests); /* Increment the C index before returning it as a Fortran index as [0..N-1] => [1..N] array indexing differs in C and Fortran */ (*index)++; } void mpi_testany__( count, array_of_requests, index, flag, status, ierr ) MPI_Fint *count; MPI_Fint * array_of_requests; MPI_Fint * index; MPI_Fint * flag; MPI_Fint * status; MPI_Fint *ierr; { mpi_testany_( count, array_of_requests, index, flag, status, ierr ); } void MPI_TESTANY( count, array_of_requests, index, flag, status, ierr ) MPI_Fint *count; MPI_Fint * array_of_requests; MPI_Fint * index; MPI_Fint * flag; MPI_Fint * status; MPI_Fint *ierr; { mpi_testany_( count, array_of_requests, index, flag, status, ierr ); } void mpi_testany( count, array_of_requests, index, flag, status, ierr ) MPI_Fint *count; MPI_Fint * array_of_requests; MPI_Fint * index; MPI_Fint * flag; MPI_Fint * status; MPI_Fint *ierr; { mpi_testany_( count, array_of_requests, index, flag, status, ierr ); } /******************************************************/ /******************************************************/ void mpi_test_cancelled_( status, flag, ierr ) MPI_Fint * status; MPI_Fint * flag; MPI_Fint *ierr; { MPI_Status local_status; MPI_Status_f2c(status, &local_status); *ierr = MPI_Test_cancelled( &local_status, flag ); } void mpi_test_cancelled__( status, flag, ierr ) MPI_Fint * status; MPI_Fint * flag; MPI_Fint *ierr; { mpi_test_cancelled_( status, flag, ierr ); } void MPI_TEST_CANCELLED( status, flag, ierr ) MPI_Fint * status; MPI_Fint * flag; MPI_Fint *ierr; { mpi_test_cancelled_( status, flag, ierr ); } void mpi_test_cancelled( status, flag, ierr ) MPI_Fint * status; MPI_Fint * flag; MPI_Fint *ierr; { mpi_test_cancelled_( status, flag, ierr ); } /******************************************************/ /******************************************************/ void mpi_testsome_( incount, array_of_requests, outcount, array_of_indices, array_of_statuses, ierr ) MPI_Fint *incount; MPI_Fint * array_of_requests; MPI_Fint * outcount; MPI_Fint * array_of_indices; MPI_Fint * array_of_statuses; MPI_Fint *ierr; { int i; TAU_DECL_LOCAL(MPI_Status, local_statuses); TAU_DECL_ALLOC_LOCAL(MPI_Request, local_requests, *incount); TAU_ALLOC_LOCAL(MPI_Status, local_statuses, *incount); TAU_ASSIGN_VALUES(local_requests, array_of_requests, *incount, MPI_Request_f2c); TAU_ASSIGN_STATUS_F2C(local_statuses, array_of_statuses, *incount, MPI_Status_f2c); *ierr = MPI_Testsome( *incount, local_requests, outcount, array_of_indices, local_statuses ); TAU_ASSIGN_VALUES(array_of_requests, local_requests, *outcount, TAU_MPI_Request_c2f); TAU_ASSIGN_STATUS_C2F(array_of_statuses, local_statuses, *outcount, MPI_Status_c2f); TAU_FREE_LOCAL(local_requests); TAU_FREE_LOCAL(local_statuses); /* Increment the C index before returning it as a Fortran index as [0..N-1] => [1..N] array indexing differs in C and Fortran */ for (i=0; i < *outcount; i++) array_of_indices[i]++; } void mpi_testsome__( incount, array_of_requests, outcount, array_of_indices, array_of_statuses, ierr ) MPI_Fint *incount; MPI_Fint * array_of_requests; MPI_Fint * outcount; MPI_Fint * array_of_indices; MPI_Fint * array_of_statuses; MPI_Fint *ierr; { mpi_testsome_( incount, array_of_requests, outcount, array_of_indices, array_of_statuses, ierr ); } void MPI_TESTSOME( incount, array_of_requests, outcount, array_of_indices, array_of_statuses, ierr ) MPI_Fint *incount; MPI_Fint * array_of_requests; MPI_Fint * outcount; MPI_Fint * array_of_indices; MPI_Fint * array_of_statuses; MPI_Fint *ierr; { mpi_testsome_( incount, array_of_requests, outcount, array_of_indices, array_of_statuses, ierr ); } void mpi_testsome( incount, array_of_requests, outcount, array_of_indices, array_of_statuses, ierr ) MPI_Fint *incount; MPI_Fint * array_of_requests; MPI_Fint * outcount; MPI_Fint * array_of_indices; MPI_Fint * array_of_statuses; MPI_Fint *ierr; { mpi_testsome_( incount, array_of_requests, outcount, array_of_indices, array_of_statuses, ierr ); } /******************************************************/ /******************************************************/ void mpi_type_commit_( datatype, ierr ) MPI_Fint * datatype; MPI_Fint *ierr; { MPI_Datatype local_data_type = MPI_Type_f2c(*datatype); *ierr = MPI_Type_commit( &local_data_type); *datatype = MPI_Type_c2f(local_data_type); } void mpi_type_commit__( datatype, ierr ) MPI_Fint * datatype; MPI_Fint *ierr; { mpi_type_commit_( datatype, ierr ); } void MPI_TYPE_COMMIT( datatype, ierr ) MPI_Fint * datatype; MPI_Fint *ierr; { mpi_type_commit_( datatype, ierr ); } void mpi_type_commit( datatype, ierr ) MPI_Fint * datatype; MPI_Fint *ierr; { mpi_type_commit_( datatype, ierr ); } /******************************************************/ /******************************************************/ void mpi_type_contiguous_( count, old_type, newtype, ierr ) MPI_Fint *count; MPI_Fint *old_type; MPI_Fint * newtype; MPI_Fint *ierr; { MPI_Datatype local_new_type; *ierr = MPI_Type_contiguous( *count, MPI_Type_f2c(*old_type), &local_new_type ); *newtype = MPI_Type_c2f(local_new_type); } void mpi_type_contiguous__( count, old_type, newtype, ierr ) MPI_Fint *count; MPI_Fint *old_type; MPI_Fint * newtype; MPI_Fint *ierr; { mpi_type_contiguous_( count, old_type, newtype, ierr ); } void MPI_TYPE_CONTIGUOUS( count, old_type, newtype, ierr ) MPI_Fint *count; MPI_Fint *old_type; MPI_Fint * newtype; MPI_Fint *ierr; { mpi_type_contiguous_( count, old_type, newtype, ierr ); } void mpi_type_contiguous( count, old_type, newtype, ierr ) MPI_Fint *count; MPI_Fint *old_type; MPI_Fint * newtype; MPI_Fint *ierr; { mpi_type_contiguous_( count, old_type, newtype, ierr ); } /******************************************************/ /******************************************************/ void mpi_type_extent_( datatype, extent, ierr ) MPI_Fint *datatype; MPI_Fint * extent; MPI_Fint *ierr; { MPI_Aint c_extent; *ierr = MPI_Type_extent( MPI_Type_f2c(*datatype), &c_extent ); *extent = c_extent; } void mpi_type_extent__( datatype, extent, ierr ) MPI_Fint *datatype; MPI_Fint * extent; MPI_Fint *ierr; { mpi_type_extent_( datatype, extent, ierr ); } void MPI_TYPE_EXTENT( datatype, extent, ierr ) MPI_Fint *datatype; MPI_Fint * extent; MPI_Fint *ierr; { mpi_type_extent_( datatype, extent, ierr ); } void mpi_type_extent( datatype, extent, ierr ) MPI_Fint *datatype; MPI_Fint * extent; MPI_Fint *ierr; { mpi_type_extent_( datatype, extent, ierr ); } /******************************************************/ /******************************************************/ void mpi_type_free_( datatype, ierr ) MPI_Fint * datatype; MPI_Fint *ierr; { MPI_Datatype local_data_type = MPI_Type_f2c(*datatype); *ierr = MPI_Type_free( &local_data_type ); *datatype = MPI_Type_c2f(local_data_type); } void mpi_type_free__( datatype, ierr ) MPI_Fint * datatype; MPI_Fint *ierr; { mpi_type_free_( datatype, ierr ); } void MPI_TYPE_FREE( datatype, ierr ) MPI_Fint * datatype; MPI_Fint *ierr; { mpi_type_free_( datatype, ierr ); } void mpi_type_free( datatype, ierr ) MPI_Fint * datatype; MPI_Fint *ierr; { mpi_type_free_( datatype, ierr ); } /******************************************************/ /******************************************************/ void mpi_type_hindexed_( count, blocklens, indices, old_type, newtype, ierr ) MPI_Fint *count; MPI_Fint * blocklens; MPI_Fint * indices; MPI_Fint *old_type; MPI_Fint * newtype; MPI_Fint *ierr; { MPI_Aint *c_indices; int i; MPI_Datatype local_new_type; /* We allocate an array of MPI_Aint and copy the MPIFint's into it We must do this because the C binding of MPI-1 uses MPI_Aint's which are the size of pointers, whereas the Fortran binding always uses 32-bit integers */ c_indices = (MPI_Aint *) malloc (*count * sizeof(MPI_Aint)); for (i=0; i < *count; i++) { c_indices[i] = indices[i]; } *ierr = MPI_Type_hindexed( *count, blocklens, c_indices, MPI_Type_f2c(*old_type), &local_new_type ); *newtype = MPI_Type_c2f(local_new_type); free (c_indices); } void mpi_type_hindexed__( count, blocklens, indices, old_type, newtype, ierr ) MPI_Fint *count; MPI_Fint * blocklens; MPI_Fint * indices; MPI_Fint *old_type; MPI_Fint * newtype; MPI_Fint *ierr; { mpi_type_hindexed_( count, blocklens, indices, old_type, newtype, ierr ); } void MPI_TYPE_HINDEXED( count, blocklens, indices, old_type, newtype, ierr ) MPI_Fint *count; MPI_Fint * blocklens; MPI_Fint * indices; MPI_Fint *old_type; MPI_Fint * newtype; MPI_Fint *ierr; { mpi_type_hindexed_( count, blocklens, indices, old_type, newtype, ierr ); } void mpi_type_hindexed( count, blocklens, indices, old_type, newtype, ierr ) MPI_Fint *count; MPI_Fint * blocklens; MPI_Fint * indices; MPI_Fint *old_type; MPI_Fint * newtype; MPI_Fint *ierr; { mpi_type_hindexed_( count, blocklens, indices, old_type, newtype, ierr ); } /******************************************************/ /******************************************************/ void mpi_type_hvector_( count, blocklen, stride, old_type, newtype, ierr ) MPI_Fint *count; MPI_Fint *blocklen; MPI_Fint *stride; MPI_Fint *old_type; MPI_Fint * newtype; MPI_Fint *ierr; { MPI_Datatype local_new_type; *ierr = MPI_Type_hvector( *count, *blocklen, *stride, MPI_Type_f2c(*old_type), &local_new_type ); *newtype = MPI_Type_c2f(local_new_type); } void mpi_type_hvector__( count, blocklen, stride, old_type, newtype, ierr ) MPI_Fint *count; MPI_Fint *blocklen; MPI_Fint *stride; MPI_Fint *old_type; MPI_Fint * newtype; MPI_Fint *ierr; { mpi_type_hvector_( count, blocklen, stride, old_type, newtype, ierr ); } void MPI_TYPE_HVECTOR( count, blocklen, stride, old_type, newtype, ierr ) MPI_Fint *count; MPI_Fint *blocklen; MPI_Fint *stride; MPI_Fint *old_type; MPI_Fint * newtype; MPI_Fint *ierr; { mpi_type_hvector_( count, blocklen, stride, old_type, newtype, ierr ); } void mpi_type_hvector( count, blocklen, stride, old_type, newtype, ierr ) MPI_Fint *count; MPI_Fint *blocklen; MPI_Fint *stride; MPI_Fint *old_type; MPI_Fint * newtype; MPI_Fint *ierr; { mpi_type_hvector_( count, blocklen, stride, old_type, newtype, ierr ); } /******************************************************/ /******************************************************/ void mpi_type_indexed_( count, blocklens, indices, old_type, newtype, ierr ) MPI_Fint *count; MPI_Fint * blocklens; MPI_Fint * indices; MPI_Fint *old_type; MPI_Fint * newtype; MPI_Fint *ierr; { MPI_Datatype local_new_type; *ierr = MPI_Type_indexed( *count, blocklens, indices, MPI_Type_f2c(*old_type), &local_new_type ); *newtype = MPI_Type_c2f(local_new_type); } void mpi_type_indexed__( count, blocklens, indices, old_type, newtype, ierr ) MPI_Fint *count; MPI_Fint * blocklens; MPI_Fint * indices; MPI_Fint *old_type; MPI_Fint * newtype; MPI_Fint *ierr; { mpi_type_indexed_( count, blocklens, indices, old_type, newtype, ierr ); } void MPI_TYPE_INDEXED( count, blocklens, indices, old_type, newtype, ierr ) MPI_Fint *count; MPI_Fint * blocklens; MPI_Fint * indices; MPI_Fint *old_type; MPI_Fint * newtype; MPI_Fint *ierr; { mpi_type_indexed_( count, blocklens, indices, old_type, newtype, ierr ); } void mpi_type_indexed( count, blocklens, indices, old_type, newtype, ierr ) MPI_Fint *count; MPI_Fint * blocklens; MPI_Fint * indices; MPI_Fint *old_type; MPI_Fint * newtype; MPI_Fint *ierr; { mpi_type_indexed_( count, blocklens, indices, old_type, newtype, ierr ); } /******************************************************/ /******************************************************/ void mpi_type_lb_( datatype, displacement, ierr ) MPI_Fint *datatype; MPI_Fint *displacement; MPI_Fint *ierr; { MPI_Aint c_displacement; *ierr = MPI_Type_lb( MPI_Type_f2c(*datatype), &c_displacement ); *displacement = c_displacement; } void mpi_type_lb__( datatype, displacement, ierr ) MPI_Fint *datatype; MPI_Fint * displacement; MPI_Fint *ierr; { mpi_type_lb_( datatype, displacement, ierr ); } void MPI_TYPE_LB( datatype, displacement, ierr ) MPI_Fint *datatype; MPI_Fint * displacement; MPI_Fint *ierr; { mpi_type_lb_( datatype, displacement, ierr ); } void mpi_type_lb( datatype, displacement, ierr ) MPI_Fint *datatype; MPI_Fint * displacement; MPI_Fint *ierr; { mpi_type_lb_( datatype, displacement, ierr ); } /******************************************************/ /******************************************************/ void mpi_type_size_( datatype, size, ierr ) MPI_Fint *datatype; MPI_Fint * size; MPI_Fint *ierr; { *ierr = MPI_Type_size( MPI_Type_f2c(*datatype), size ); } void mpi_type_size__( datatype, size, ierr ) MPI_Fint *datatype; MPI_Fint * size; MPI_Fint *ierr; { mpi_type_size_( datatype, size, ierr ); } void MPI_TYPE_SIZE( datatype, size, ierr ) MPI_Fint *datatype; MPI_Fint * size; MPI_Fint *ierr; { mpi_type_size_( datatype, size, ierr ); } void mpi_type_size( datatype, size, ierr ) MPI_Fint *datatype; MPI_Fint * size; MPI_Fint *ierr; { mpi_type_size_( datatype, size, ierr ); } /******************************************************/ /******************************************************/ void mpi_type_struct_( count, blocklens, indices, old_types, newtype, ierr ) MPI_Fint *count; MPI_Fint * blocklens; MPI_Fint * indices; MPI_Fint * old_types; MPI_Fint * newtype; MPI_Fint *ierr; { MPI_Aint *c_indices; int i; MPI_Datatype local_new_type; TAU_DECL_ALLOC_LOCAL(MPI_Datatype, local_types, *count); TAU_ASSIGN_VALUES(local_types, old_types, *count, MPI_Type_f2c); /* We allocate an array of MPI_Aint and copy the MPIFint's into it We must do this because the C binding of MPI-1 uses MPI_Aint's which are the size of pointers, whereas the Fortran binding always uses 32-bit integers */ c_indices = (MPI_Aint *) malloc (*count * sizeof(MPI_Aint)); for (i=0; i < *count; i++) { c_indices[i] = indices[i]; } *ierr = MPI_Type_struct( *count, blocklens, c_indices, local_types, &local_new_type ); TAU_FREE_LOCAL(local_types); *newtype = MPI_Type_c2f(local_new_type); free (c_indices); } void mpi_type_struct__( count, blocklens, indices, old_types, newtype, ierr ) MPI_Fint *count; MPI_Fint * blocklens; MPI_Fint * indices; MPI_Fint * old_types; MPI_Fint * newtype; MPI_Fint *ierr; { mpi_type_struct_( count, blocklens, indices, old_types, newtype, ierr ); } void MPI_TYPE_STRUCT( count, blocklens, indices, old_types, newtype, ierr ) MPI_Fint *count; MPI_Fint * blocklens; MPI_Fint * indices; MPI_Fint * old_types; MPI_Fint * newtype; MPI_Fint *ierr; { mpi_type_struct_( count, blocklens, indices, old_types, newtype, ierr ); } void mpi_type_struct( count, blocklens, indices, old_types, newtype, ierr ) MPI_Fint *count; MPI_Fint * blocklens; MPI_Fint * indices; MPI_Fint * old_types; MPI_Fint * newtype; MPI_Fint *ierr; { mpi_type_struct_( count, blocklens, indices, old_types, newtype, ierr ); } /******************************************************/ /******************************************************/ void mpi_type_ub_( datatype, displacement, ierr ) MPI_Fint *datatype; MPI_Fint *displacement; MPI_Fint *ierr; { MPI_Aint c_displacement; *ierr = MPI_Type_ub( MPI_Type_f2c(*datatype), &c_displacement ); *displacement = c_displacement; } void mpi_type_ub__( datatype, displacement, ierr ) MPI_Fint *datatype; MPI_Fint * displacement; MPI_Fint *ierr; { mpi_type_ub_( datatype, displacement, ierr ); } void MPI_TYPE_UB( datatype, displacement, ierr ) MPI_Fint *datatype; MPI_Fint * displacement; MPI_Fint *ierr; { mpi_type_ub_( datatype, displacement, ierr ); } void mpi_type_ub( datatype, displacement, ierr ) MPI_Fint *datatype; MPI_Fint * displacement; MPI_Fint *ierr; { mpi_type_ub_( datatype, displacement, ierr ); } /******************************************************/ /******************************************************/ void mpi_type_vector_( count, blocklen, stride, old_type, newtype, ierr ) MPI_Fint *count; MPI_Fint *blocklen; MPI_Fint *stride; MPI_Fint *old_type; MPI_Fint * newtype; MPI_Fint *ierr; { MPI_Datatype local_new_type; *ierr = MPI_Type_vector( *count, *blocklen, *stride, MPI_Type_f2c(*old_type), &local_new_type ); *newtype = MPI_Type_c2f(local_new_type); } void MPI_TYPE_VECTOR( count, blocklen, stride, old_type, newtype, ierr ) MPI_Fint *count; MPI_Fint *blocklen; MPI_Fint *stride; MPI_Fint *old_type; MPI_Fint * newtype; MPI_Fint *ierr; { mpi_type_vector_( count, blocklen, stride, old_type, newtype, ierr ); } void mpi_type_vector( count, blocklen, stride, old_type, newtype, ierr ) MPI_Fint *count; MPI_Fint *blocklen; MPI_Fint *stride; MPI_Fint *old_type; MPI_Fint * newtype; MPI_Fint *ierr; { mpi_type_vector_( count, blocklen, stride, old_type, newtype, ierr ); } /******************************************************/ /******************************************************/ void mpi_unpack_( inbuf, insize, position, outbuf, outcount, type, comm, ierr ) void * inbuf; MPI_Fint *insize; MPI_Fint * position; void * outbuf; MPI_Fint *outcount; MPI_Fint *type; MPI_Fint *comm; MPI_Fint *ierr; { *ierr = MPI_Unpack( inbuf, *insize, position, outbuf, *outcount, MPI_Type_f2c(*type), MPI_Comm_f2c(*comm) ); } void mpi_unpack__( inbuf, insize, position, outbuf, outcount, type, comm, ierr ) void * inbuf; MPI_Fint *insize; MPI_Fint * position; void * outbuf; MPI_Fint *outcount; MPI_Fint *type; MPI_Fint *comm; MPI_Fint *ierr; { mpi_unpack_( inbuf, insize, position, outbuf, outcount, type, comm, ierr ); } void MPI_UNPACK( inbuf, insize, position, outbuf, outcount, type, comm, ierr ) void * inbuf; MPI_Fint *insize; MPI_Fint * position; void * outbuf; MPI_Fint *outcount; MPI_Fint *type; MPI_Fint *comm; MPI_Fint *ierr; { mpi_unpack_( inbuf, insize, position, outbuf, outcount, type, comm, ierr ); } void mpi_unpack( inbuf, insize, position, outbuf, outcount, type, comm, ierr ) void * inbuf; MPI_Fint *insize; MPI_Fint * position; void * outbuf; MPI_Fint *outcount; MPI_Fint *type; MPI_Fint *comm; MPI_Fint *ierr; { mpi_unpack_( inbuf, insize, position, outbuf, outcount, type, comm, ierr ); } /******************************************************/ /******************************************************/ void mpi_wait_( request, status, ierr ) MPI_Fint * request; MPI_Fint * status; MPI_Fint *ierr; { MPI_Request local_request = MPI_Request_f2c(*request); MPI_Status local_status; *ierr = MPI_Wait( &local_request, &local_status ); *request = TAU_MPI_Request_c2f(local_request); MPI_Status_c2f(&local_status, status); } void mpi_wait__( request, status, ierr ) MPI_Fint * request; MPI_Fint * status; MPI_Fint *ierr; { mpi_wait_( request, status, ierr ); } void MPI_WAIT( request, status, ierr ) MPI_Fint * request; MPI_Fint * status; MPI_Fint *ierr; { mpi_wait_( request, status, ierr ); } void mpi_wait( request, status, ierr ) MPI_Fint * request; MPI_Fint * status; MPI_Fint *ierr; { mpi_wait_( request, status, ierr ); } /******************************************************/ /******************************************************/ void mpi_waitall_( count, array_of_requests, array_of_statuses, ierr ) MPI_Fint *count; MPI_Fint * array_of_requests; MPI_Fint * array_of_statuses; MPI_Fint *ierr; { TAU_DECL_LOCAL(MPI_Status, local_statuses); TAU_DECL_ALLOC_LOCAL(MPI_Request, local_requests, *count); TAU_ALLOC_LOCAL(MPI_Status, local_statuses, *count); TAU_ASSIGN_VALUES(local_requests, array_of_requests, *count, MPI_Request_f2c); TAU_ASSIGN_STATUS_F2C(local_statuses, array_of_statuses, *count, MPI_Status_f2c); *ierr = MPI_Waitall( *count, local_requests, local_statuses ); TAU_ASSIGN_VALUES(array_of_requests, local_requests, *count, TAU_MPI_Request_c2f); TAU_ASSIGN_STATUS_C2F(array_of_statuses, local_statuses, *count, MPI_Status_c2f); TAU_FREE_LOCAL(local_requests); TAU_FREE_LOCAL(local_statuses); } void mpi_waitall__( count, array_of_requests, array_of_statuses, ierr ) MPI_Fint *count; MPI_Fint * array_of_requests; MPI_Fint * array_of_statuses; MPI_Fint *ierr; { mpi_waitall_( count, array_of_requests, array_of_statuses, ierr ); } void MPI_WAITALL( count, array_of_requests, array_of_statuses, ierr ) MPI_Fint *count; MPI_Fint * array_of_requests; MPI_Fint * array_of_statuses; MPI_Fint *ierr; { mpi_waitall_( count, array_of_requests, array_of_statuses, ierr ); } void mpi_waitall( count, array_of_requests, array_of_statuses, ierr ) MPI_Fint *count; MPI_Fint * array_of_requests; MPI_Fint * array_of_statuses; MPI_Fint *ierr; { mpi_waitall_( count, array_of_requests, array_of_statuses, ierr ); } /******************************************************/ /******************************************************/ void mpi_waitany_( count, array_of_requests, index, status, ierr ) MPI_Fint *count; MPI_Fint * array_of_requests; MPI_Fint * index; MPI_Fint * status; MPI_Fint *ierr; { MPI_Status local_status; TAU_DECL_ALLOC_LOCAL(MPI_Request, local_requests, *count); TAU_ASSIGN_VALUES(local_requests, array_of_requests, *count, MPI_Request_f2c); *ierr = MPI_Waitany( *count, local_requests, index, &local_status ); TAU_ASSIGN_VALUES(array_of_requests, local_requests, *count, TAU_MPI_Request_c2f); MPI_Status_c2f(&local_status, status); TAU_FREE_LOCAL(local_requests); /* Increment the C index before returning it as a Fortran index as [0..N-1] => [1..N] array indexing differs in C and Fortran */ (*index)++; } void mpi_waitany__( count, array_of_requests, index, status, ierr ) MPI_Fint *count; MPI_Fint * array_of_requests; MPI_Fint * index; MPI_Fint * status; MPI_Fint *ierr; { mpi_waitany_( count, array_of_requests, index, status, ierr ); } void MPI_WAITANY( count, array_of_requests, index, status, ierr ) MPI_Fint *count; MPI_Fint * array_of_requests; MPI_Fint * index; MPI_Fint * status; MPI_Fint *ierr; { mpi_waitany_( count, array_of_requests, index, status, ierr ); } void mpi_waitany( count, array_of_requests, index, status, ierr ) MPI_Fint *count; MPI_Fint * array_of_requests; MPI_Fint * index; MPI_Fint * status; MPI_Fint *ierr; { mpi_waitany_( count, array_of_requests, index, status, ierr ); } /******************************************************/ /******************************************************/ void mpi_waitsome_( incount, array_of_requests, outcount, array_of_indices, array_of_statuses, ierr ) MPI_Fint *incount; MPI_Fint * array_of_requests; MPI_Fint * outcount; MPI_Fint * array_of_indices; MPI_Fint * array_of_statuses; MPI_Fint *ierr; { int i; TAU_DECL_LOCAL(MPI_Status, local_statuses); TAU_DECL_ALLOC_LOCAL(MPI_Request, local_requests, *incount); TAU_ALLOC_LOCAL(MPI_Status, local_statuses, *incount); TAU_ASSIGN_VALUES(local_requests, array_of_requests, *incount, MPI_Request_f2c); TAU_ASSIGN_STATUS_F2C(local_statuses, array_of_statuses, *incount, MPI_Status_f2c); *ierr = MPI_Waitsome( *incount, local_requests, outcount, array_of_indices, local_statuses ); TAU_ASSIGN_VALUES(array_of_requests, local_requests, *outcount, TAU_MPI_Request_c2f); TAU_ASSIGN_STATUS_C2F(array_of_statuses, local_statuses, *outcount, MPI_Status_c2f); TAU_FREE_LOCAL(local_requests); TAU_FREE_LOCAL(local_statuses); /* Increment the C index before returning it as a Fortran index as [0..N-1] => [1..N] array indexing differs in C and Fortran */ for (i=0; i < *outcount; i++) array_of_indices[i]++; } void mpi_waitsome__( incount, array_of_requests, outcount, array_of_indices, array_of_statuses, ierr ) MPI_Fint *incount; MPI_Fint * array_of_requests; MPI_Fint * outcount; MPI_Fint * array_of_indices; MPI_Fint * array_of_statuses; MPI_Fint *ierr; { mpi_waitsome_( incount, array_of_requests, outcount, array_of_indices, array_of_statuses, ierr ); } void MPI_WAITSOME( incount, array_of_requests, outcount, array_of_indices, array_of_statuses, ierr ) MPI_Fint *incount; MPI_Fint * array_of_requests; MPI_Fint * outcount; MPI_Fint * array_of_indices; MPI_Fint * array_of_statuses; MPI_Fint *ierr; { mpi_waitsome_( incount, array_of_requests, outcount, array_of_indices, array_of_statuses, ierr ); } void mpi_waitsome( incount, array_of_requests, outcount, array_of_indices, array_of_statuses, ierr ) MPI_Fint *incount; MPI_Fint * array_of_requests; MPI_Fint * outcount; MPI_Fint * array_of_indices; MPI_Fint * array_of_statuses; MPI_Fint *ierr; { mpi_waitsome_( incount, array_of_requests, outcount, array_of_indices, array_of_statuses, ierr ); } /******************************************************/ /******************************************************/ void mpi_cart_coords_( comm, rank, maxdims, coords, ierr ) MPI_Fint *comm; MPI_Fint *rank; MPI_Fint *maxdims; MPI_Fint * coords; MPI_Fint *ierr; { *ierr = MPI_Cart_coords( MPI_Comm_f2c(*comm), *rank, *maxdims, coords ); } void mpi_cart_coords__( comm, rank, maxdims, coords, ierr ) MPI_Fint *comm; MPI_Fint *rank; MPI_Fint *maxdims; MPI_Fint * coords; MPI_Fint *ierr; { mpi_cart_coords_( comm, rank, maxdims, coords, ierr ); } void MPI_CART_COORDS( comm, rank, maxdims, coords, ierr ) MPI_Fint *comm; MPI_Fint *rank; MPI_Fint *maxdims; MPI_Fint * coords; MPI_Fint *ierr; { mpi_cart_coords_( comm, rank, maxdims, coords, ierr ); } void mpi_cart_coords( comm, rank, maxdims, coords, ierr ) MPI_Fint *comm; MPI_Fint *rank; MPI_Fint *maxdims; MPI_Fint * coords; MPI_Fint *ierr; { mpi_cart_coords_( comm, rank, maxdims, coords, ierr ); } /******************************************************/ /******************************************************/ void mpi_cart_create_( comm_old, ndims, dims, periods, reorder, comm_cart, ierr ) MPI_Fint *comm_old; MPI_Fint *ndims; MPI_Fint * dims; MPI_Fint * periods; MPI_Fint *reorder; MPI_Fint * comm_cart; MPI_Fint *ierr; { MPI_Comm local_comm_cart; *ierr = MPI_Cart_create( MPI_Comm_f2c(*comm_old), *ndims, dims, periods, *reorder, &local_comm_cart ); *comm_cart = MPI_Comm_c2f(local_comm_cart); } void mpi_cart_create__( comm_old, ndims, dims, periods, reorder, comm_cart, ierr ) MPI_Fint *comm_old; MPI_Fint *ndims; MPI_Fint * dims; MPI_Fint * periods; MPI_Fint *reorder; MPI_Fint * comm_cart; MPI_Fint *ierr; { mpi_cart_create_( comm_old, ndims, dims, periods, reorder, comm_cart, ierr ); } void MPI_CART_CREATE( comm_old, ndims, dims, periods, reorder, comm_cart, ierr ) MPI_Fint *comm_old; MPI_Fint *ndims; MPI_Fint * dims; MPI_Fint * periods; MPI_Fint *reorder; MPI_Fint * comm_cart; MPI_Fint *ierr; { mpi_cart_create_( comm_old, ndims, dims, periods, reorder, comm_cart, ierr ); } void mpi_cart_create( comm_old, ndims, dims, periods, reorder, comm_cart, ierr ) MPI_Fint *comm_old; MPI_Fint *ndims; MPI_Fint * dims; MPI_Fint * periods; MPI_Fint *reorder; MPI_Fint * comm_cart; MPI_Fint *ierr; { mpi_cart_create_( comm_old, ndims, dims, periods, reorder, comm_cart, ierr ); } /******************************************************/ /******************************************************/ void mpi_cart_get_( comm, maxdims, dims, periods, coords, ierr ) MPI_Fint *comm; MPI_Fint *maxdims; MPI_Fint * dims; MPI_Fint * periods; MPI_Fint * coords; MPI_Fint *ierr; { *ierr = MPI_Cart_get( MPI_Comm_f2c(*comm), *maxdims, dims, periods, coords ); } void mpi_cart_get__( comm, maxdims, dims, periods, coords, ierr ) MPI_Fint *comm; MPI_Fint *maxdims; MPI_Fint * dims; MPI_Fint * periods; MPI_Fint * coords; MPI_Fint *ierr; { mpi_cart_get_( comm, maxdims, dims, periods, coords, ierr ); } void MPI_CART_GET( comm, maxdims, dims, periods, coords, ierr ) MPI_Fint *comm; MPI_Fint *maxdims; MPI_Fint * dims; MPI_Fint * periods; MPI_Fint * coords; MPI_Fint *ierr; { mpi_cart_get_( comm, maxdims, dims, periods, coords, ierr ); } void mpi_cart_get( comm, maxdims, dims, periods, coords, ierr ) MPI_Fint *comm; MPI_Fint *maxdims; MPI_Fint * dims; MPI_Fint * periods; MPI_Fint * coords; MPI_Fint *ierr; { mpi_cart_get_( comm, maxdims, dims, periods, coords, ierr ); } /******************************************************/ /******************************************************/ void mpi_cart_map_( comm_old, ndims, dims, periods, newrank, ierr ) MPI_Fint *comm_old; MPI_Fint *ndims; MPI_Fint * dims; MPI_Fint * periods; MPI_Fint * newrank; MPI_Fint *ierr; { *ierr = MPI_Cart_map( MPI_Comm_f2c(*comm_old), *ndims, dims, periods, newrank ); } void mpi_cart_map__( comm_old, ndims, dims, periods, newrank, ierr ) MPI_Fint *comm_old; MPI_Fint *ndims; MPI_Fint * dims; MPI_Fint * periods; MPI_Fint * newrank; MPI_Fint *ierr; { mpi_cart_map_( comm_old, ndims, dims, periods, newrank, ierr ); } void MPI_CART_MAP( comm_old, ndims, dims, periods, newrank, ierr ) MPI_Fint *comm_old; MPI_Fint *ndims; MPI_Fint * dims; MPI_Fint * periods; MPI_Fint * newrank; MPI_Fint *ierr; { mpi_cart_map_( comm_old, ndims, dims, periods, newrank, ierr ); } void mpi_cart_map( comm_old, ndims, dims, periods, newrank, ierr ) MPI_Fint *comm_old; MPI_Fint *ndims; MPI_Fint * dims; MPI_Fint * periods; MPI_Fint * newrank; MPI_Fint *ierr; { mpi_cart_map_( comm_old, ndims, dims, periods, newrank, ierr ); } /******************************************************/ /******************************************************/ void mpi_cart_rank_( comm, coords, rank, ierr ) MPI_Fint *comm; MPI_Fint * coords; MPI_Fint * rank; MPI_Fint *ierr; { *ierr = MPI_Cart_rank( MPI_Comm_f2c(*comm), coords, rank ); } void mpi_cart_rank__( comm, coords, rank, ierr ) MPI_Fint *comm; MPI_Fint * coords; MPI_Fint * rank; MPI_Fint *ierr; { mpi_cart_rank_( comm, coords, rank, ierr ); } void MPI_CART_RANK( comm, coords, rank, ierr ) MPI_Fint *comm; MPI_Fint * coords; MPI_Fint * rank; MPI_Fint *ierr; { mpi_cart_rank_( comm, coords, rank, ierr ); } void mpi_cart_rank( comm, coords, rank, ierr ) MPI_Fint *comm; MPI_Fint * coords; MPI_Fint * rank; MPI_Fint *ierr; { mpi_cart_rank_( comm, coords, rank, ierr ); } /******************************************************/ /******************************************************/ void mpi_cart_shift_( comm, direction, displ, source, dest, ierr ) MPI_Fint *comm; MPI_Fint *direction; MPI_Fint *displ; MPI_Fint * source; MPI_Fint * dest; MPI_Fint *ierr; { *ierr = MPI_Cart_shift( MPI_Comm_f2c(*comm), *direction, *displ, source, dest ); } void mpi_cart_shift__( comm, direction, displ, source, dest, ierr ) MPI_Fint *comm; MPI_Fint *direction; MPI_Fint *displ; MPI_Fint * source; MPI_Fint * dest; MPI_Fint *ierr; { mpi_cart_shift_( comm, direction, displ, source, dest, ierr ); } void MPI_CART_SHIFT( comm, direction, displ, source, dest, ierr ) MPI_Fint *comm; MPI_Fint *direction; MPI_Fint *displ; MPI_Fint * source; MPI_Fint * dest; MPI_Fint *ierr; { mpi_cart_shift_( comm, direction, displ, source, dest, ierr ); } void mpi_cart_shift( comm, direction, displ, source, dest, ierr ) MPI_Fint *comm; MPI_Fint *direction; MPI_Fint *displ; MPI_Fint * source; MPI_Fint * dest; MPI_Fint *ierr; { mpi_cart_shift_( comm, direction, displ, source, dest, ierr ); } /******************************************************/ /******************************************************/ void mpi_cart_sub_( comm, remain_dims, comm_new, ierr ) MPI_Fint *comm; MPI_Fint * remain_dims; MPI_Fint * comm_new; MPI_Fint *ierr; { MPI_Comm local_comm_new; *ierr = MPI_Cart_sub( MPI_Comm_f2c(*comm), remain_dims, &local_comm_new ); *comm_new = MPI_Comm_c2f(local_comm_new); } void mpi_cart_sub__( comm, remain_dims, comm_new, ierr ) MPI_Fint *comm; MPI_Fint * remain_dims; MPI_Fint * comm_new; MPI_Fint *ierr; { mpi_cart_sub_( comm, remain_dims, comm_new, ierr ); } void MPI_CART_SUB( comm, remain_dims, comm_new, ierr ) MPI_Fint *comm; MPI_Fint * remain_dims; MPI_Fint * comm_new; MPI_Fint *ierr; { mpi_cart_sub_( comm, remain_dims, comm_new, ierr ); } void mpi_cart_sub( comm, remain_dims, comm_new, ierr ) MPI_Fint *comm; MPI_Fint * remain_dims; MPI_Fint * comm_new; MPI_Fint *ierr; { mpi_cart_sub_( comm, remain_dims, comm_new, ierr ); } /******************************************************/ /******************************************************/ void mpi_cartdim_get_( comm, ndims, ierr ) MPI_Fint *comm; MPI_Fint * ndims; MPI_Fint *ierr; { *ierr = MPI_Cartdim_get( MPI_Comm_f2c(*comm), ndims ); } void mpi_cartdim_get__( comm, ndims, ierr ) MPI_Fint *comm; MPI_Fint * ndims; MPI_Fint *ierr; { mpi_cartdim_get_( comm, ndims, ierr ); } void MPI_CARTDIM_GET( comm, ndims, ierr ) MPI_Fint *comm; MPI_Fint * ndims; MPI_Fint *ierr; { mpi_cartdim_get_( comm, ndims, ierr ); } void mpi_cartdim_get( comm, ndims, ierr ) MPI_Fint *comm; MPI_Fint * ndims; MPI_Fint *ierr; { mpi_cartdim_get_( comm, ndims, ierr ); } /******************************************************/ /******************************************************/ void mpi_dims_create_( nnodes, ndims, dims, ierr ) MPI_Fint *nnodes; MPI_Fint *ndims; MPI_Fint * dims; MPI_Fint *ierr; { *ierr = MPI_Dims_create( *nnodes, *ndims, dims ); } void mpi_dims_create__( nnodes, ndims, dims, ierr ) MPI_Fint *nnodes; MPI_Fint *ndims; MPI_Fint * dims; MPI_Fint *ierr; { mpi_dims_create_( nnodes, ndims, dims, ierr ); } void MPI_DIMS_CREATE( nnodes, ndims, dims, ierr ) MPI_Fint *nnodes; MPI_Fint *ndims; MPI_Fint * dims; MPI_Fint *ierr; { mpi_dims_create_( nnodes, ndims, dims, ierr ); } void mpi_dims_create( nnodes, ndims, dims, ierr ) MPI_Fint *nnodes; MPI_Fint *ndims; MPI_Fint * dims; MPI_Fint *ierr; { mpi_dims_create_( nnodes, ndims, dims, ierr ); } /******************************************************/ /******************************************************/ void mpi_graph_create_( comm_old, nnodes, index, edges, reorder, comm_graph, ierr ) MPI_Fint *comm_old; MPI_Fint *nnodes; MPI_Fint * index; MPI_Fint * edges; MPI_Fint *reorder; MPI_Fint * comm_graph; MPI_Fint *ierr; { MPI_Comm local_comm_graph; *ierr = MPI_Graph_create( MPI_Comm_f2c(*comm_old), *nnodes, index, edges, *reorder, &local_comm_graph ); *comm_graph = MPI_Comm_c2f(local_comm_graph); } void mpi_graph_create__( comm_old, nnodes, index, edges, reorder, comm_graph, ierr ) MPI_Fint *comm_old; MPI_Fint *nnodes; MPI_Fint * index; MPI_Fint * edges; MPI_Fint *reorder; MPI_Fint * comm_graph; MPI_Fint *ierr; { mpi_graph_create_( comm_old, nnodes, index, edges, reorder, comm_graph, ierr ); } void MPI_GRAPH_CREATE( comm_old, nnodes, index, edges, reorder, comm_graph, ierr ) MPI_Fint *comm_old; MPI_Fint *nnodes; MPI_Fint * index; MPI_Fint * edges; MPI_Fint *reorder; MPI_Fint * comm_graph; MPI_Fint *ierr; { mpi_graph_create_( comm_old, nnodes, index, edges, reorder, comm_graph, ierr ); } void mpi_graph_create( comm_old, nnodes, index, edges, reorder, comm_graph, ierr ) MPI_Fint *comm_old; MPI_Fint *nnodes; MPI_Fint * index; MPI_Fint * edges; MPI_Fint *reorder; MPI_Fint * comm_graph; MPI_Fint *ierr; { mpi_graph_create_( comm_old, nnodes, index, edges, reorder, comm_graph, ierr ); } /******************************************************/ /******************************************************/ void mpi_graph_get_( comm, maxindex, maxedges, index, edges, ierr ) MPI_Fint *comm; MPI_Fint *maxindex; MPI_Fint *maxedges; MPI_Fint * index; MPI_Fint * edges; MPI_Fint *ierr; { *ierr = MPI_Graph_get( MPI_Comm_f2c(*comm), *maxindex, *maxedges, index, edges ); } void mpi_graph_get__( comm, maxindex, maxedges, index, edges, ierr ) MPI_Fint *comm; MPI_Fint *maxindex; MPI_Fint *maxedges; MPI_Fint * index; MPI_Fint * edges; MPI_Fint *ierr; { mpi_graph_get_( comm, maxindex, maxedges, index, edges, ierr ); } void MPI_GRAPH_GET( comm, maxindex, maxedges, index, edges, ierr ) MPI_Fint *comm; MPI_Fint *maxindex; MPI_Fint *maxedges; MPI_Fint * index; MPI_Fint * edges; MPI_Fint *ierr; { mpi_graph_get_( comm, maxindex, maxedges, index, edges, ierr ); } void mpi_graph_get( comm, maxindex, maxedges, index, edges, ierr ) MPI_Fint *comm; MPI_Fint *maxindex; MPI_Fint *maxedges; MPI_Fint * index; MPI_Fint * edges; MPI_Fint *ierr; { mpi_graph_get_( comm, maxindex, maxedges, index, edges, ierr ); } /******************************************************/ /******************************************************/ void mpi_graph_map_( comm_old, nnodes, index, edges, newrank, ierr ) MPI_Fint *comm_old; MPI_Fint *nnodes; MPI_Fint * index; MPI_Fint * edges; MPI_Fint * newrank; MPI_Fint *ierr; { *ierr = MPI_Graph_map( MPI_Comm_f2c(*comm_old), *nnodes, index, edges, newrank ); } void mpi_graph_map__( comm_old, nnodes, index, edges, newrank, ierr ) MPI_Fint *comm_old; MPI_Fint *nnodes; MPI_Fint * index; MPI_Fint * edges; MPI_Fint * newrank; MPI_Fint *ierr; { mpi_graph_map_( comm_old, nnodes, index, edges, newrank, ierr ); } void MPI_GRAPH_MAP( comm_old, nnodes, index, edges, newrank, ierr ) MPI_Fint *comm_old; MPI_Fint *nnodes; MPI_Fint * index; MPI_Fint * edges; MPI_Fint * newrank; MPI_Fint *ierr; { mpi_graph_map_( comm_old, nnodes, index, edges, newrank, ierr ); } void mpi_graph_map( comm_old, nnodes, index, edges, newrank, ierr ) MPI_Fint *comm_old; MPI_Fint *nnodes; MPI_Fint * index; MPI_Fint * edges; MPI_Fint * newrank; MPI_Fint *ierr; { mpi_graph_map_( comm_old, nnodes, index, edges, newrank, ierr ); } /******************************************************/ /******************************************************/ void mpi_graph_neighbors_( comm, rank, maxneighbors, neighbors, ierr ) MPI_Fint *comm; MPI_Fint *rank; int *maxneighbors; MPI_Fint * neighbors; MPI_Fint *ierr; { *ierr = MPI_Graph_neighbors( MPI_Comm_f2c(*comm), *rank, *maxneighbors, neighbors ); } void mpi_graph_neighbors__( comm, rank, maxneighbors, neighbors, ierr ) MPI_Fint *comm; MPI_Fint *rank; int *maxneighbors; MPI_Fint * neighbors; MPI_Fint *ierr; { mpi_graph_neighbors_( comm, rank, maxneighbors, neighbors, ierr ); } void MPI_GRAPH_NEIGHBORS( comm, rank, maxneighbors, neighbors, ierr ) MPI_Fint *comm; MPI_Fint *rank; int *maxneighbors; MPI_Fint * neighbors; MPI_Fint *ierr; { mpi_graph_neighbors_( comm, rank, maxneighbors, neighbors, ierr ); } void mpi_graph_neighbors( comm, rank, maxneighbors, neighbors, ierr ) MPI_Fint *comm; MPI_Fint *rank; int *maxneighbors; MPI_Fint * neighbors; MPI_Fint *ierr; { mpi_graph_neighbors_( comm, rank, maxneighbors, neighbors, ierr ); } /******************************************************/ /******************************************************/ void mpi_graph_neighbors_count_( comm, rank, nneighbors, ierr ) MPI_Fint *comm; MPI_Fint *rank; MPI_Fint * nneighbors; MPI_Fint *ierr; { *ierr = MPI_Graph_neighbors_count( MPI_Comm_f2c(*comm), *rank, nneighbors ); } void mpi_graph_neighbors_count__( comm, rank, nneighbors, ierr ) MPI_Fint *comm; MPI_Fint *rank; MPI_Fint * nneighbors; MPI_Fint *ierr; { mpi_graph_neighbors_count_( comm, rank, nneighbors, ierr ); } void MPI_GRAPH_NEIGHBORS_COUNT( comm, rank, nneighbors, ierr ) MPI_Fint *comm; MPI_Fint *rank; MPI_Fint * nneighbors; MPI_Fint *ierr; { mpi_graph_neighbors_count_( comm, rank, nneighbors, ierr ); } void mpi_graph_neighbors_count( comm, rank, nneighbors, ierr ) MPI_Fint *comm; MPI_Fint *rank; MPI_Fint * nneighbors; MPI_Fint *ierr; { mpi_graph_neighbors_count_( comm, rank, nneighbors, ierr ); } /******************************************************/ /******************************************************/ void mpi_graphdims_get_( comm, nnodes, nedges, ierr ) MPI_Fint *comm; MPI_Fint * nnodes; MPI_Fint * nedges; MPI_Fint *ierr; { *ierr = MPI_Graphdims_get( MPI_Comm_f2c(*comm), nnodes, nedges ); } void mpi_graphdims_get__( comm, nnodes, nedges, ierr ) MPI_Fint *comm; MPI_Fint * nnodes; MPI_Fint * nedges; MPI_Fint *ierr; { mpi_graphdims_get_( comm, nnodes, nedges, ierr ); } void MPI_GRAPHDIMS_GET( comm, nnodes, nedges, ierr ) MPI_Fint *comm; MPI_Fint * nnodes; MPI_Fint * nedges; MPI_Fint *ierr; { mpi_graphdims_get_( comm, nnodes, nedges, ierr ); } void mpi_graphdims_get( comm, nnodes, nedges, ierr ) MPI_Fint *comm; MPI_Fint * nnodes; MPI_Fint * nedges; MPI_Fint *ierr; { mpi_graphdims_get_( comm, nnodes, nedges, ierr ); } /******************************************************/ /******************************************************/ void mpi_topo_test_( comm, top_type, ierr ) MPI_Fint *comm; MPI_Fint * top_type; MPI_Fint *ierr; { *ierr = MPI_Topo_test( MPI_Comm_f2c(*comm), top_type ); } void mpi_topo_test__( comm, top_type, ierr ) MPI_Fint *comm; MPI_Fint * top_type; MPI_Fint *ierr; { mpi_topo_test_( comm, top_type, ierr ); } void MPI_TOPO_TEST( comm, top_type, ierr ) MPI_Fint *comm; MPI_Fint * top_type; MPI_Fint *ierr; { mpi_topo_test_( comm, top_type, ierr ); } void mpi_topo_test( comm, top_type, ierr ) MPI_Fint *comm; MPI_Fint * top_type; MPI_Fint *ierr; { mpi_topo_test_( comm, top_type, ierr ); } /******************************************************/ /******************************************************/ tau-2.16.4/src/Profile/TauHandler.cpp000066400000000000000000000306421062343042700173250ustar00rootroot00000000000000/**************************************************************************** ** TAU Portable Profiling Package ** ** http://www.cs.uoregon.edu/research/paracomp/tau ** ***************************************************************************** ** Copyright 2004 ** ** Department of Computer and Information Science, University of Oregon ** ** Advanced Computing Laboratory, Los Alamos National Laboratory ** ****************************************************************************/ /*************************************************************************** ** File : TauHandler.cpp ** ** Description : TAU Profiling Package ** ** Author : Sameer Shende ** ** Contact : sameer@cs.uoregon.edu sameer@acl.lanl.gov ** ** Documentation : See http://www.cs.uoregon.edu/research/tau ** ***************************************************************************/ ////////////////////////////////////////////////////////////////////// // Include Files ////////////////////////////////////////////////////////////////////// #ifndef TAU_WINDOWS #include #include #include #endif #include #include #if (defined(__QK_USER__) || defined(__LIBCATAMOUNT__ )) #ifndef TAU_CATAMOUNT #define TAU_CATAMOUNT #endif /* TAU_CATAMOUNT */ #include #endif /* __QK_USER__ || __LIBCATAMOUNT__ */ /* Which platforms support mallinfo? */ #ifndef TAU_HASMALLINFO #if (defined (__linux__) || defined (_AIX) || defined(sgi) || \ defined (__alpha) || defined (CRAYCC) || defined(__blrts__)) #ifndef TAU_CATAMOUNT #define TAU_HASMALLINFO 1 #endif /* TAU_CATAMOUNT does not have mallinfo */ #endif /* platforms */ #endif /* TAU_HASMALLINFO: if your platform is not listed here and you know that it supports mallinfo system call, please configure with -useropt=-DTAU_HASMALLINFO */ #ifdef TAU_HASMALLINFO #include #endif /* TAU_HASMALLINFO */ #ifdef TAU_DOT_H_LESS_HEADERS #include using namespace std; #else /* TAU_DOT_H_LESS_HEADERS */ #include #endif /* TAU_DOT_H_LESS_HEADERS */ ////////////////////////////////////////////////////////////////////// // Routines ////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////// // Is TAU tracking memory events? Set to true/false. ////////////////////////////////////////////////////////////////////// bool& TheIsTauTrackingMemory(void) { static bool isit = false; /* TAU is not tracking memory */ return isit; } ////////////////////////////////////////////////////////////////////// // Is TAU tracking memory headroom events? Set to true/false. ////////////////////////////////////////////////////////////////////// bool& TheIsTauTrackingMemoryHeadroom(void) { static bool isit = false; /* TAU is not tracking memory headroom */ return isit; } ////////////////////////////////////////////////////////////////////// // Is TAU using MUSE's user defined events? Set to true/false. ////////////////////////////////////////////////////////////////////// bool& TheIsTauTrackingMuseEvents(void) { static bool isit = false; /* TAU is not tracking MUSE events */ return isit; } ////////////////////////////////////////////////////////////////////// // Start tracking memory ////////////////////////////////////////////////////////////////////// int TauEnableTrackingMemory(void) { // Set tracking to true TheIsTauTrackingMemory() = true; return 1; } ////////////////////////////////////////////////////////////////////// // Start tracking memory ////////////////////////////////////////////////////////////////////// int TauEnableTrackingMemoryHeadroom(void) { // Set tracking to true TheIsTauTrackingMemoryHeadroom() = true; return 1; } ////////////////////////////////////////////////////////////////////// // Start tracking MUSE events ////////////////////////////////////////////////////////////////////// void TauEnableTrackingMuseEvents(void) { // Set tracking to true #ifdef TAU_MUSE_EVENT TheIsTauTrackingMuseEvents() = true; #endif /* TAU_MUSE_EVENT */ } ////////////////////////////////////////////////////////////////////// // Stop tracking memory ////////////////////////////////////////////////////////////////////// int TauDisableTrackingMemory(void) { TheIsTauTrackingMemory() = false; return 0; } ////////////////////////////////////////////////////////////////////// // Stop tracking memory headroom ////////////////////////////////////////////////////////////////////// int TauDisableTrackingMemoryHeadroom(void) { TheIsTauTrackingMemoryHeadroom() = false; return 0; } ////////////////////////////////////////////////////////////////////// // Stop tracking MUSE events ////////////////////////////////////////////////////////////////////// void TauDisableTrackingMuseEvents(void) { TheIsTauTrackingMuseEvents() = false; } ////////////////////////////////////////////////////////////////////// // Get memory size (max resident set size) in KB ////////////////////////////////////////////////////////////////////// double TauGetMaxRSS(void) { #ifdef TAU_HASMALLINFO struct mallinfo minfo = mallinfo(); /* compute the memory used */ double used = (double) ((unsigned int) minfo.hblkhd + 0.0 + (unsigned int) minfo.usmblks + (unsigned int) minfo.uordblks); #ifdef DEBUG_PROF cout <<"minfo.hblkhd= "<<(unsigned int) minfo.hblkhd<TriggerEvent(musedata[i]); } } #endif /* TAU_MUSE_EVENT */ /* Set alarm for the next interrupt */ #ifndef TAU_WINDOWS alarm(TheTauInterruptInterval()); #endif } ////////////////////////////////////////////////////////////////////// // Track Memory ////////////////////////////////////////////////////////////////////// void TauTrackMemoryUtilization(bool allocated) ////////////////////////////////////////////////////////////////////// // Argument: allocated. TauTrackMemoryUtilization can keep track of memory // allocated or memory free (headroom to grow). Accordingly, it is true // for tracking memory allocated, and false to check the headroom ////////////////////////////////////////////////////////////////////// { #ifndef TAU_WINDOWS struct sigaction new_action, old_action; // Are we tracking memory or headroom. Check the allocated argument. if (allocated) TheIsTauTrackingMemory() = true; else TheIsTauTrackingMemoryHeadroom() = true; // set signal handler new_action.sa_handler = TauAlarmHandler; new_action.sa_flags = 0; sigaction(SIGALRM, NULL, &old_action); if (old_action.sa_handler != SIG_IGN) { /* by default it is set to ignore */ sigaction(SIGALRM, &new_action, NULL); } /* activate alarm */ alarm(TheTauInterruptInterval()); #endif } ////////////////////////////////////////////////////////////////////// // Track Memory events at this location in the source code ////////////////////////////////////////////////////////////////////// void TauTrackMemoryHere(void) { /* Enable tracking memory by default */ static int flag = TauEnableTrackingMemory(); /* Check and see if we're *still* tracking memory events */ if (TheIsTauTrackingMemory()) { /* trigger an event with the memory used */ TheTauMemoryEvent().TriggerEvent(TauGetMaxRSS()); } } ////////////////////////////////////////////////////////////////////// // Track Memory headroom events at this location in the source code ////////////////////////////////////////////////////////////////////// void TauTrackMemoryHeadroomHere(void) { /* Enable tracking memory by default */ static int flag = TauEnableTrackingMemoryHeadroom(); /* Check and see if we're *still* tracking memory events */ if (TheIsTauTrackingMemoryHeadroom()) { /* trigger an event with the memory headroom available */ TheTauMemoryHeadroomEvent().TriggerEvent((double)TauGetFreeMemory()); } } ////////////////////////////////////////////////////////////////////// // Track MUSE events ////////////////////////////////////////////////////////////////////// void TauTrackMuseEvents(void) { #ifndef TAU_WINDOWS struct sigaction new_action, old_action; // we're tracking memory TheIsTauTrackingMuseEvents() = true; // set signal handler new_action.sa_handler = TauAlarmHandler; new_action.sa_flags = 0; sigaction(SIGALRM, NULL, &old_action); if (old_action.sa_handler != SIG_IGN) { /* by default it is set to ignore */ sigaction(SIGALRM, &new_action, NULL); } /* activate alarm */ alarm(TheTauInterruptInterval()); #endif } /*************************************************************************** * $RCSfile: TauHandler.cpp,v $ $Author: sameer $ * $Revision: 1.16 $ $Date: 2007/01/10 18:24:23 $ * POOMA_VERSION_ID: $Id: TauHandler.cpp,v 1.16 2007/01/10 18:24:23 sameer Exp $ ***************************************************************************/ tau-2.16.4/src/Profile/TauHooks.cpp000066400000000000000000000217341062343042700170350ustar00rootroot00000000000000/**************************************************************************** ** TAU Portable Profiling Package ** ** http://www.cs.uoregon.edu/research/tau ** ***************************************************************************** ** Copyright 1999 ** ** Department of Computer and Information Science, University of Oregon ** ** Advanced Computing Laboratory, Los Alamos National Laboratory ** ****************************************************************************/ /*************************************************************************** ** File : TauHooks.cpp ** ** Description : TAU hooks for DynInst (Dynamic Instrumentation) ** ** Author : Sameer Shende ** ** Contact : sameer@cs.uoregon.edu sameer@acl.lanl.gov ** ** Flags : Compile with ** ** -DPROFILING_ON to enable profiling (ESSENTIAL) ** ** -DPROFILE_STATS for Std. Deviation of Excl Time ** ** -DSGI_HW_COUNTERS for using SGI counters ** ** -DPROFILE_CALLS for trace of each invocation ** ** -DSGI_TIMERS for SGI fast nanosecs timer ** ** -DTULIP_TIMERS for non-sgi Platform ** ** -DPOOMA_STDSTL for using STD STL in POOMA src ** ** -DPOOMA_TFLOP for Intel Teraflop at SNL/NM ** ** -DPOOMA_KAI for KCC compiler ** ** -DDEBUG_PROF for internal debugging messages ** ** -DPROFILE_CALLSTACK to enable callstack traces ** ** Documentation : See http://www.cs.uoregon.edu/research/tau ** ***************************************************************************/ ////////////////////////////////////////////////////////////////////// // Include Files ////////////////////////////////////////////////////////////////////// #include #include #include #ifdef TAU_WINDOWS //#include //#include using namespace std; #endif //#define DEBUG_PROF //int debugPrint = 0; // control debug printf statements //#define dprintf if (debugPrint) printf #ifdef DEBUG_PROF #define dprintf printf #else // DEBUG_PROF #define dprintf if (0) printf #endif //#define ORIGINAL_HEAVY_IMPLEMENTATION_USING_MAP 1 #define TAUDYNVEC 1 #ifndef __ia64 int TheFlag[TAU_MAX_THREADS] ; #define TAU_MONITOR_ENTER(tid) if (TheFlag[tid] == 0) {TheFlag[tid] = 1;} else {return; } #define TAU_MONITOR_EXIT(tid) TheFlag[tid] = 0 #else /* FOR IA64 */ vector TheFlag(TAU_MAX_THREADS); #define TAU_MONITOR_ENTER(tid) if (TheFlag[tid] == 0) {TheFlag[tid] = 1;} else {return; } #define TAU_MONITOR_EXIT(tid) TheFlag[tid] = 0 #endif /* IA64 */ vector TauFuncNameVec; /* holds just names */ vector& TheTauDynFI(void) { // FunctionDB contains pointers to each FunctionInfo static object static vector FuncTauDynFI; return FuncTauDynFI; } /* global FI vector */ // Initialization procedure. Should be called before invoking // other TAU routines. extern "C" { void TauInitCode(char *arg, int isMPI) { // Register that we are using dyninst so that the FIvector destructor will // perform cleanup for us TheUsingDyninst() = 1; char *name; int tid = 0; TAU_MONITOR_ENTER(0); int functionId = 0; /* iterate for each routine name */ name = strtok(arg, "|"); while (name != (char *)NULL) { functionId ++; #ifdef ORIGINAL_HEAVY_IMPLEMENTATION_USING_MAP dprintf("Extracted : %s :id = %d\n", name, functionId); TAU_MAPPING_CREATE(name, " ", functionId, "TAU_DEFAULT", tid); #else dprintf("Extracted : %s :id = %d\n", name, functionId-1); /* Create a new FunctionInfo object with the given name and add it to the global vector of FI pointers */ #ifdef TAUDYNVEC FunctionInfo *taufi = new FunctionInfo(name, " " , TAU_DEFAULT, "TAU_DEFAULT", true, tid); if (taufi == (FunctionInfo *) NULL) { printf("ERROR: new returns NULL in TauInitCode\n"); exit(1); } dprintf("TAU FI = %lx\n", taufi); TheTauDynFI().push_back(taufi); #else /* TAUDYNVEC */ int id; id = functionId - 1; /* start from 0 */ TauFuncNameVec.push_back(string(name)); /* Save the name with id */ dprintf("TauFuncNameVec[%d] = %s\n", id, TauFuncNameVec[id].c_str()); TheTauDynFI().push_back(NULL); /* create a null entry for this symbol */ #endif /* TAUDYNVEC */ #endif /* ORIGINAL_HEAVY_IMPLEMENTATION_USING_MAP */ name = strtok(NULL, "|"); } dprintf("Inside TauInitCode Initializations to be done here!\n"); if (!isMPI) TAU_MAPPING_PROFILE_SET_NODE(0, tid); dprintf("Node = %d\n", RtsLayer::myNode()); #if (defined (__linux__) && defined(TAU_DYNINST41BUGFIX)) Tau_create_top_level_timer_if_necessary(); #endif /* DyninstAPI 4.1 bug appears only under Linux */ TAU_MONITOR_EXIT(0); } // Hook for function entry. void TauRoutineEntry(int id ) { int tid = RtsLayer::myThread(); TAU_MONITOR_ENTER(tid); TAU_MAPPING_OBJECT(TauMethodName); #ifdef ORIGINAL_HEAVY_IMPLEMENTATION_USING_MAP TAU_MAPPING_LINK(TauMethodName, id); #elif TAUDYNVEC id--; /* to account for offset. Start from 0..n-1 instead of 1..n */ vector vfi = TheTauDynFI(); for (vector::iterator it = vfi.begin(); it != vfi.end(); it++) { TauMethodName = TheTauDynFI()[id]; TAU_MAPPING_PROFILE_TIMER(TauTimer, TauMethodName, tid); TAU_MAPPING_PROFILE_START(TauTimer, tid); break; } #else /* TAUDYNVEC */ id--; /* to account for offset. Start from 0..n-1 instead of 1..n */ if ((TauMethodName = TheTauDynFI()[id]) == NULL) { /* Function has not been called so far */ TauMethodName = new FunctionInfo(TauFuncNameVec[id].c_str(), " " , TAU_DEFAULT, "TAU_DEFAULT", true, tid); TheTauDynFI()[id] = TauMethodName; } #endif /* retrieve it from the vector */ #ifndef TAUDYNVEC dprintf(" Entry <<<<< name = %s\n", tid, id, TauMethodName->GetName()); TAU_MAPPING_PROFILE_TIMER(TauTimer, TauMethodName, tid); TAU_MAPPING_PROFILE_START(TauTimer, tid); dprintf("Entry into %s: id = %d\n", TauMethodName->GetName(), id); #endif /* TAUDYNVEC */ TAU_MONITOR_EXIT(tid); } // Hook for function exit. void TauRoutineExit(int id) { int tid = RtsLayer::myThread(); TAU_MONITOR_ENTER(tid); id --; /* FunctionInfo *fi = TheTauDynFI()[id]; dprintf(" Exit >>>>>> name = %s\n", tid, id, fi->GetName()); */ TAU_MAPPING_PROFILE_STOP(tid); TAU_MONITOR_EXIT(tid); } void TauRoutineEntryTest(int id ) { int tid = RtsLayer::myThread(); TAU_MONITOR_ENTER(tid); id --; dprintf(" TAU Entry \n", tid, id); // dprintf("At entry, Size = %d\n", TheTauDynFI().size()); vector vfi = TheTauDynFI(); FunctionInfo *fi = 0; for (vector::iterator it = vfi.begin(); it != vfi.end(); it++) { fi = TheTauDynFI()[id]; TAU_MAPPING_PROFILE_TIMER(TauTimer, fi, tid); TAU_MAPPING_PROFILE_START(TauTimer, tid); break; } /* FunctionInfo *fi = TheTauDynFI()[0]; dprintf(" Entry <<<<< name = %s\n", tid, id, fi->GetName()); */ TAU_MONITOR_EXIT(tid); } void TauRoutineExitTest(int id) { int tid = RtsLayer::myThread(); TAU_MONITOR_ENTER(tid); id --; dprintf(" TAU Exit \n", tid, id); int val = TheTauDynFI().size(); dprintf("Size = %d\n", val); TAU_MAPPING_PROFILE_STOP(tid); /* FunctionInfo *fi = TheTauDynFI()[id]; printf(" Exit >>>>>> name = %s\n", tid, id, fi->GetName()); */ TAU_MONITOR_EXIT(tid); } void TauProgramTermination(char *name) { dprintf("TauProgramTermination %s\n", name); if (TheSafeToDumpData()) { dprintf("Dumping data...\n"); TAU_PROFILE_EXIT(name); TheSafeToDumpData() = 0; } return; } void HookEntry(int id) { dprintf("Entry ->: %d\n",id); return; } void HookExit(int id) { dprintf("Exit <-: %d\n",id); return; } void TauMPIInitStub(int *rank) { dprintf("INSIDE TauMPIInitStub() rank = %d \n", *rank); TAU_PROFILE_SET_NODE(*rank); dprintf("Setting rank = %d\n", *rank); } int TauRenameTimer(char *oldName, char *newName) { vector::iterator it; string *newfuncname = new string(newName); dprintf("Inside TauRenameTimer: Old = %s, New = %s\n", oldName, newName); for (it = TheFunctionDB().begin(); it != TheFunctionDB().end(); it++){ //Check to see that it is one of the requested functions. dprintf("Comparing %s with %s\n", (*it)->GetName(), oldName); if (strcmp(oldName, (*it)->GetName()) == 0) { (*it)->SetName(*newfuncname); dprintf("Renaming %s to%s\n", oldName, newfuncname->c_str()); return 1; /* found it! */ } } dprintf("Didn't find the routine!\n"); return 0; /* didn't find it! */ } } // extern "C" // EOF TauHooks.cpp /*************************************************************************** * $RCSfile: TauHooks.cpp,v $ $Author: sameer $ * $Revision: 1.24 $ $Date: 2007/03/24 01:32:54 $ * TAU_VERSION_ID: $Id: TauHooks.cpp,v 1.24 2007/03/24 01:32:54 sameer Exp $ ***************************************************************************/ tau-2.16.4/src/Profile/TauJAPI.cpp000066400000000000000000000065501062343042700164740ustar00rootroot00000000000000#include #include "Profile/Profiler.h" #include "Profile/TauJAPI.h" #include "Profile/TauJava.h" #ifdef TAU_DOT_H_LESS_HEADERS #include using namespace std; #else /* TAU_DOT_H_LESS_HEADERS */ #include #endif /* TAU_DOT_H_LESS_HEADERS */ /* * Class: Profile * Method: NativeProfile * Signature: (Ljava/lang/String;Ljava/lang/String;J)V */ JNIEXPORT void JNICALL Java_TAU_Profile_NativeProfile (JNIEnv *env, jobject obj, jstring name, jstring type, jstring groupname, jlong group) { /* Get name and type strings from the JVM */ const char *blockName = env->GetStringUTFChars(name, 0); const char *blockType = env->GetStringUTFChars(type, 0); const char *blockGroup = env->GetStringUTFChars(groupname, 0); /* create a new FunctionInfo object by passing these to it */ FunctionInfo *f = new FunctionInfo(blockName, blockType, (TauGroup_t) group, blockGroup, true); /* true indicates InitData will ensure that all data is clean */ /* Now release the strings back to the JVM */ env->ReleaseStringUTFChars(name, blockName); env->ReleaseStringUTFChars(type, blockType); env->ReleaseStringUTFChars(groupname, blockGroup); /* Find the field FuncInfoPtr in the Profile class where we need to store the address of the FunctionInfo object just created */ jclass cls = env->GetObjectClass(obj); jfieldID fid = env->GetFieldID(cls, "FuncInfoPtr", "J"); /* Check if new was successful */ if (f == (FunctionInfo *) NULL) { cout << "ERROR: FunctionInfo new returns NULL: Memory problem"<SetLongField(obj, fid, (jlong) f); DEBUGPROFMSG("Java_Profile_NativeProfile: FunctionInfoPtr set to "<GetObjectClass(obj); jfieldID fid; FunctionInfo *f; fid = env->GetFieldID(cls, "FuncInfoPtr", "J"); f = (FunctionInfo *) env->GetLongField(obj, fid); Profiler *p = new Profiler(f, f != (FunctionInfo *) 0 ? f->GetProfileGroup() : TAU_DEFAULT, true); if (p == (Profiler *) NULL) { cout << "ERROR: Profiler new returns NULL: Memory problem"<Start(RtsLayer::myThread()); DEBUGPROFMSG("TAU STMT START: Profiler = "<< p<< " Name = "<< p->ThisFunction->GetName()<Stop(tid); DEBUGPROFMSG("TAU STMT STOP: Profiler = "<< p<< " Name = "<< p->ThisFunction->GetName()< #include #include #if (!defined(TAU_WINDOWS)) #include #endif //TAU_WINDOWS #define CALL(routine) (JavaThreadLayer::tau_jvmpi_interface->routine) // Should we exclude all methods using -XrunTAU:nomethods flag? bool& TheTauExcludeMethodsFlag() { static bool flag = false; return flag; } // profiler agent entry point extern "C" { JNIEXPORT jint JNICALL JVM_OnLoad(JavaVM *jvm, char *options, void *reserved) { #ifdef DEBUG_PROF fprintf(stdout, "TAU> initializing ..... \n"); #endif /* DEBUG_PROF */ // get jvmpi interface pointer if ((jvm->GetEnv((void **)&JavaThreadLayer::tau_jvmpi_interface, JVMPI_VERSION_1)) < 0) { fprintf(stdout, "TAU> error in obtaining jvmpi interface pointer\n" ); return JNI_ERR; } // Store the VM identity JavaThreadLayer::tauVM = jvm; // initialize jvmpi interface JavaThreadLayer::tau_jvmpi_interface->NotifyEvent = TauJavaLayer::NotifyEvent; TauJavaLayer::Init(options); // enabling class load event notification if (!TheTauExcludeMethodsFlag()) { CALL(EnableEvent)(JVMPI_EVENT_CLASS_LOAD, NULL); CALL(EnableEvent)(JVMPI_EVENT_METHOD_ENTRY, NULL); CALL(EnableEvent)(JVMPI_EVENT_METHOD_EXIT, NULL); } CALL(EnableEvent)(JVMPI_EVENT_THREAD_START, NULL); CALL(EnableEvent)(JVMPI_EVENT_THREAD_END, NULL); CALL(EnableEvent)(JVMPI_EVENT_JVM_SHUT_DOWN, NULL); CALL(EnableEvent)(JVMPI_EVENT_DATA_DUMP_REQUEST, NULL); CALL(EnableEvent)(JVMPI_EVENT_DATA_RESET_REQUEST, NULL); CALL(EnableEvent)(JVMPI_EVENT_GC_START, NULL); CALL(EnableEvent)(JVMPI_EVENT_GC_FINISH, NULL); // Give TAU some room for its data structures. #if (!defined(TAU_WINDOWS)) if (sizeof(void*) < 8) { if ((sbrk(1024*1024*4)) == (void *) -1) { fprintf(stdout, "TAU>ERROR: sbrk failed\n"); CALL(ProfilerExit)(1); } } #endif //TAU_WINDOWS TauJavaLayer::Init("exclude=TAU/Profile,TAU.Profile"); #ifdef DEBUG_PROF fprintf(stdout, "TAU> .... ok \n\n"); #endif /* DEBUG_PROF */ return JNI_OK; } } static char **TauExcludeList=NULL; static int TauExcludeListSize = 0; void TauJavaLayer::Init(char *options){ char *token; static int num_tokens = 0; /* This can be called more than once! TauJAPI */ int token_len; char *s1; char *s2; #ifdef DEBUG_PROF printf("Inside TauJavaLayer::Init options = %s\n",options); #endif // DEBUG_PROF if(options && strlen(options)) { #ifdef DEBUG_PROF fprintf(stdout,"Init: options = %s, len=%d\n", options, strlen(options)); #endif // DEBUG_PROF // There are problems with strtok. Since this is called twice, // we allocate new strings before using with strtok. Crashes otherwise if (num_tokens == 0) { s1 = new char [strlen (options) + 1]; strcpy(s1, options); token=strtok(s1, "=,"); } else { s2 = new char [strlen (options) + 1]; strcpy(s2, options); token=strtok(s2, "=,"); } if (strcmp(token,"nomethods")==0) { TheTauExcludeMethodsFlag() = true; } if (strcmp(token,"exclude")==0) { if (TauExcludeList == (char **) NULL) { TauExcludeList = (char **) malloc(256*sizeof(char*)); // 256 items max in exclude list // This ensures that if it is coming here again then the list is not blank } while(token=strtok(NULL,"=,")) { #ifdef DEBUG_PROF printf("token=%s\n",token); #endif // DEBUG_PROF token_len = strlen(token); TauExcludeList[num_tokens]=(char *)malloc(token_len+1); strcpy(TauExcludeList[num_tokens], token); num_tokens++; } TauExcludeListSize = num_tokens; } #ifdef DEBUG_PROF for(int i = 0; i < TauExcludeListSize; i++) { printf("ExcludeList[%d] = %s\n", i, TauExcludeList[i]); } #endif // DEBUG_PROF } } // function for handling event notification void TauJavaLayer::NotifyEvent(JVMPI_Event *event) { int tid = JavaThreadLayer::GetThreadId(event->env_id); #ifndef TAU_MPI static int j = TAU_MAPPING_PROFILE_SET_NODE(0, tid); #else /* TAU_MPI */ //static int j = TAU_MAPPING_PROFILE_SET_NODE(getpid(), tid); #endif /* TAU_MPI */ switch(event->event_type) { case JVMPI_EVENT_CLASS_LOAD: if (!TheTauExcludeMethodsFlag()) TauJavaLayer::ClassLoad(event); break; case JVMPI_EVENT_METHOD_ENTRY: if (!TheTauExcludeMethodsFlag()) TauJavaLayer::MethodEntry(event); break; case JVMPI_EVENT_METHOD_EXIT: if (!TheTauExcludeMethodsFlag()) TauJavaLayer::MethodExit(event); break; case JVMPI_EVENT_THREAD_START: TauJavaLayer::ThreadStart(event); break; case JVMPI_EVENT_THREAD_END: TauJavaLayer::ThreadEnd(event); break; case JVMPI_EVENT_JVM_SHUT_DOWN: TauJavaLayer::ShutDown(event); break; case JVMPI_EVENT_DATA_DUMP_REQUEST: TauJavaLayer::DataDump(event); break; case JVMPI_EVENT_DATA_RESET_REQUEST: TauJavaLayer::DataPurge(event); break; case JVMPI_EVENT_GC_START: #ifdef DEBUG_PROF printf("TAU>JVMPI_EVENT_GC_START\n"); #endif break; case JVMPI_EVENT_GC_FINISH: #ifdef DEBUG_PROF printf("TAU>JVMPI_EVENT_GC_FINISH\n"); #endif break; /* Use Monitor contended enter, entered and exit events as well */ default: fprintf(stdout, "TAU> Event not registered\n"); break; } } void TauJavaLayer::ClassLoad(JVMPI_Event *event) { char funcname[2048], classname[1024]; char *groupname; int i; #ifdef DEBUG_PROF fprintf(stdout, "TAU> Class Load : %s\n", event->u.class_load.class_name); #endif /* DEBUG_PROF */ int tid = JavaThreadLayer::GetThreadId(event->env_id); /* Do this for single threaded appls that don't have PROFILE_SET_NODE */ int origkey = 1; if (TauExcludeListSize) { for (i=0; i < TauExcludeListSize; i++) { if (strncmp(event->u.class_load.class_name, TauExcludeList[i], strlen(TauExcludeList[i])) == 0) { #ifdef DEBUG_PROF printf("Excluding %s\n", event->u.class_load.class_name); #endif // DEBUG_PROF origkey = 0; } } } for (i = 0; i < event->u.class_load.num_methods; i++) { /* Create FunctionInfo objects for each of these methods */ #ifdef TRACING_ON sprintf(funcname, "%s %s", event->u.class_load.class_name, event->u.class_load.methods[i].method_name); #else sprintf(funcname, "%s %s %s", event->u.class_load.class_name, event->u.class_load.methods[i].method_name, event->u.class_load.methods[i].method_signature); #endif /* signature is too much for tau_convert to handle */ sprintf(classname, "%s", event->u.class_load.class_name); groupname = strtok(classname, " /="); /* old TAU_MAPPING_CREATE(funcname, " ", (long) event->u.class_load.methods[i].method_id, groupname, tid); */ if (origkey == 1) { TAU_MAPPING_CREATE(funcname, " ", (long) event->u.class_load.methods[i].method_id, groupname, tid); } else { /* NO NEED TO CREATE THIS OBJECT! */ /* TAU_MAPPING_CREATE1(funcname, " ", (long) event->u.class_load.methods[i].method_id, origkey, groupname, tid); */ } #ifdef DEBUG_PROF printf("TAU> %s, id: %ld group: %s\n", funcname, event->u.class_load.methods[i].method_id, groupname); #endif /* DEBUG_PROF */ /* name, type, key, group name are the four arguments above */ } } void TauJavaLayer::MethodEntry(JVMPI_Event *event) { int tid = JavaThreadLayer::GetThreadId(event->env_id); TAU_MAPPING_OBJECT(TauMethodName=NULL); TAU_MAPPING_LINK(TauMethodName, (long) event->u.method.method_id); // If the method is not masked, (has non-zero group id), execute it if(TauMethodName && TauMethodName->GetProfileGroup()) { TAU_MAPPING_PROFILE_TIMER(TauTimer, TauMethodName, tid); TAU_MAPPING_PROFILE_START(TauTimer, tid); #ifdef DEBUG_PROF fprintf(stdout, "TAU> Method Entry %s %s:%ld TID = %d\n", TauMethodName->GetName(), TauMethodName->GetType(), (long) event->u.method.method_id, tid); #endif /* DEBUG_PROF */ } } void TauJavaLayer::MethodExit(JVMPI_Event *event) { int tid = JavaThreadLayer::GetThreadId(event->env_id); TAU_MAPPING_OBJECT(TauMethodName=NULL); TAU_MAPPING_LINK(TauMethodName, (long) event->u.method.method_id); if(TauMethodName && TauMethodName->GetProfileGroup()) { // stop only if it has a finite group TAU_MAPPING_PROFILE_STOP(tid); #ifdef DEBUG_PROF fprintf(stdout, "TAU> Method Exit : %ld, TID = %d\n", (long) event->u.method.method_id, tid); #endif /* DEBUG_PROF */ } } void TauJavaLayer::CreateTopLevelRoutine(char *name, char *type, char *groupname, int tid) { #ifdef DEBUG_PROF fprintf(stdout, "Inside CreateTopLevelRoutine: name = %s, type = %s, group = %s, tid = %d\n", name, type, groupname, tid); #endif /* Create a top-level routine that is always called. Use the thread name in it */ TAU_MAPPING_CREATE(name, type, 1, groupname, tid); TAU_MAPPING_OBJECT(TauMethodName); TAU_MAPPING_LINK(TauMethodName, (long) 1); TAU_MAPPING_PROFILE_TIMER(TauTimer, TauMethodName, tid); TAU_MAPPING_PROFILE_START(TauTimer, tid); } void TauJavaLayer::ThreadStart(JVMPI_Event *event) { int * ptid = JavaThreadLayer::RegisterThread(event->env_id); int tid = *ptid; #ifdef DEBUG_PROF fprintf(stdout, "TAU> Thread Start : id = %d, name = %s, group = %s\n", tid, event->u.thread_start.thread_name, event->u.thread_start.group_name); #endif /* DEBUG_PROF */ char thread_name[256]; sprintf(thread_name, "THREAD=%s; THREAD GROUP=%s", event->u.thread_start.thread_name, event->u.thread_start.group_name); CreateTopLevelRoutine(thread_name, " ", "THREAD", tid); } void TauJavaLayer::ThreadEnd(JVMPI_Event *event) { int tid = JavaThreadLayer::GetThreadId(event->env_id); #ifdef DEBUG_PROF fprintf(stdout, "TAU> Thread End : id = %d \n", tid); #endif /* DEBUG_PROF */ // TAU_MAPPING_PROFILE_STOP(tid); TAU_MAPPING_PROFILE_EXIT("END...", tid); } void TauJavaLayer::ShutDown(JVMPI_Event *event) { int tid = JavaThreadLayer::GetThreadId(event->env_id); JVMPI_RawMonitor shutdown_lock = CALL(RawMonitorCreate)("Shutdown lock"); #ifdef DEBUG_PROF fprintf(stdout, "TAU> JVM SHUT DOWN : id = %d \n", tid); #endif CALL(RawMonitorEnter)(shutdown_lock); for(int i = 0; i < JavaThreadLayer::TotalThreads(); i++) { TAU_MAPPING_PROFILE_EXIT("Forcing Shutdown of Performance Data",i); } CALL(RawMonitorExit)(shutdown_lock); } void TauJavaLayer::DataDump(JVMPI_Event *event) { int tid = JavaThreadLayer::GetThreadId(event->env_id); JVMPI_RawMonitor dump_lock = CALL(RawMonitorCreate)("Dump lock"); #ifdef DEBUG_PROF fprintf(stdout, "TAU> JVM DUMP : id = %d \n", tid); #endif CALL(RawMonitorEnter)(dump_lock); for(int i = 0; i < JavaThreadLayer::TotalThreads(); i++) { TAU_MAPPING_DB_DUMP(i); } CALL(RawMonitorExit)(dump_lock); } void TauJavaLayer::DataPurge(JVMPI_Event *event) { int tid = JavaThreadLayer::GetThreadId(event->env_id); JVMPI_RawMonitor purge_lock = CALL(RawMonitorCreate)("Purge lock"); #ifdef DEBUG_PROF fprintf(stdout, "TAU> JVM PURGE : id = %d \n", tid); #endif CALL(RawMonitorEnter)(purge_lock); for(int i = 0; i < JavaThreadLayer::TotalThreads(); i++) { /* Disabled to retain profile DB integrity on Ctrl-\ (DUMP/PURGE) TAU_MAPPING_DB_PURGE(i); */ } CALL(RawMonitorExit)(purge_lock); } /* EOF : TauJava.cpp */ /*************************************************************************** * $RCSfile: TauJava.cpp,v $ $Author: amorris $ * $Revision: 1.28 $ $Date: 2005/11/11 03:46:50 $ * TAU_VERSION_ID: $Id: TauJava.cpp,v 1.28 2005/11/11 03:46:50 amorris Exp $ ***************************************************************************/ tau-2.16.4/src/Profile/TauKojakOpari.cpp000066400000000000000000001054631062343042700200060ustar00rootroot00000000000000/*************************************************************************/ /* TAU OPARI Layer */ /* Copyright (C) 2001 */ /* University of Oregon, Los Alamos National Laboratory, and */ /* Forschungszentrum Juelich, Zentralinstitut fuer Angewandte Mathematik */ /*************************************************************************/ #include #include //#define DEBUG_PROF 1 #include #ifdef TAU_OPENMP #ifndef _OPENMP #define _OPENMP #endif /* _OPENMP */ #endif /* TAU_OPENMP */ #include "pomp_lib.h" /* These two defines specify if we want region based views or construct based views or both */ #ifdef TAU_OPARI_REGION #define TAU_OPENMP_REGION_VIEW #elif TAU_OPARI_CONSTRUCT #define TAU_AGGREGATE_OPENMP_TIMINGS #else #define TAU_AGGREGATE_OPENMP_TIMINGS #define TAU_OPENMP_REGION_VIEW #endif /* in the default mode, define both! */ #define OpenMP TAU_USER #define TAU_EMBEDDED_MAPPING 1 omp_lock_t tau_ompregdescr_lock; TAU_GLOBAL_TIMER(tatomic, "atomic enter/exit", "[OpenMP]", OpenMP); TAU_GLOBAL_TIMER(tbarrier, "barrier enter/exit", "[OpenMP]", OpenMP); TAU_GLOBAL_TIMER(tcriticalb, "critical begin/end", "[OpenMP]", OpenMP); TAU_GLOBAL_TIMER(tcriticale, "critical enter/exit", "[OpenMP]", OpenMP); TAU_GLOBAL_TIMER(tfor, "for enter/exit", "[OpenMP]", OpenMP); TAU_GLOBAL_TIMER(tmaster, "master begin/end", "[OpenMP]", OpenMP); TAU_GLOBAL_TIMER(tparallelb, "parallel begin/end", "[OpenMP]", OpenMP); TAU_GLOBAL_TIMER(tparallelf, "parallel fork/join", "[OpenMP]", OpenMP); TAU_GLOBAL_TIMER(tsectionb, "section begin/end", "[OpenMP]", OpenMP); TAU_GLOBAL_TIMER(tsectione, "sections enter/exit", "[OpenMP]", OpenMP); TAU_GLOBAL_TIMER(tsingleb, "single begin/end", "[OpenMP]", OpenMP); TAU_GLOBAL_TIMER(tsinglee, "single enter/exit", "[OpenMP]", OpenMP); TAU_GLOBAL_TIMER(tworkshare, "workshare enter/exit", "[OpenMP]", OpenMP); TAU_GLOBAL_TIMER(tregion, "inst region begin/end", "[OpenMP]", OpenMP); #define NUM_OMP_TYPES 15 static char* omp_names[15] = {"atomic enter/exit", "barrier enter/exit", "critical begin/end", "critical enter/exit", "for enter/exit", "master begin/end", "parallel begin/end", "parallel fork/join", "section begin/end", "sections enter/exit", "single begin/end", "single enter/exit", "workshare enter/exit", "inst region begin/end", "flush enter/exit" }; #define TAU_OMP_ATOMIC 0 #define TAU_OMP_BARRIER 1 #define TAU_OMP_CRITICAL_BE 2 #define TAU_OMP_CRITICAL_EE 3 #define TAU_OMP_FOR_EE 4 #define TAU_OMP_MASTER_BE 5 #define TAU_OMP_PAR_BE 6 #define TAU_OMP_PAR_FJ 7 #define TAU_OMP_SECTION_BE 8 #define TAU_OMP_SECTION_EE 9 #define TAU_OMP_SINGLE_BE 10 #define TAU_OMP_SINGLE_EE 11 #define TAU_OMP_WORK_EE 12 #define TAU_OMP_INST_BE 13 #define TAU_OMP_FLUSH_EE 14 static int omp_tracing = 1; static int omp_fin_called = 0; /* * Fortran wrappers calling the C versions */ extern "C" { /****************************/ void pomp_finalize() { POMP_Finalize(); } void pomp_finalize_() { POMP_Finalize(); } void pomp_finalize__() { POMP_Finalize(); } void POMP_FINALIZE() { POMP_Finalize(); } /****************************/ void pomp_init() { POMP_Init(); } void pomp_init_() { POMP_Init(); } void pomp_init__() { POMP_Init(); } void POMP_INIT() { POMP_Init(); } /****************************/ void pomp_off() { omp_tracing = 0; } void pomp_off_() { omp_tracing = 0; } void pomp_off__() { omp_tracing = 0; } void POMP_OFF() { omp_tracing = 0; } /****************************/ void pomp_on() { omp_tracing = 1; } void pomp_on_() { omp_tracing = 1; } void pomp_on__() { omp_tracing = 1; } void POMP_ON() { omp_tracing = 1; } /****************************/ void pomp_atomic_enter(int* id) { if ( omp_tracing ) POMP_Atomic_enter(pomp_rd_table[*id]); } void pomp_atomic_enter_(int* id) { if ( omp_tracing ) POMP_Atomic_enter(pomp_rd_table[*id]); } void pomp_atomic_enter__(int* id) { if ( omp_tracing ) POMP_Atomic_enter(pomp_rd_table[*id]); } void POMP_ATOMIC_ENTER(int* id) { if ( omp_tracing ) POMP_Atomic_enter(pomp_rd_table[*id]); } /****************************/ void pomp_atomic_exit(int* id) { if ( omp_tracing ) POMP_Atomic_exit(pomp_rd_table[*id]); } void pomp_atomic_exit_(int* id) { if ( omp_tracing ) POMP_Atomic_exit(pomp_rd_table[*id]); } void pomp_atomic_exit__(int* id) { if ( omp_tracing ) POMP_Atomic_exit(pomp_rd_table[*id]); } void POMP_ATOMIC_EXIT(int* id) { if ( omp_tracing ) POMP_Atomic_exit(pomp_rd_table[*id]); } /****************************/ void pomp_barrier_enter(int* id) { if ( omp_tracing ) POMP_Barrier_enter(pomp_rd_table[*id]); } void pomp_barrier_enter_(int* id) { if ( omp_tracing ) POMP_Barrier_enter(pomp_rd_table[*id]); } void pomp_barrier_enter__(int* id) { if ( omp_tracing ) POMP_Barrier_enter(pomp_rd_table[*id]); } void POMP_BARRIER_ENTER(int* id) { if ( omp_tracing ) POMP_Barrier_enter(pomp_rd_table[*id]); } /****************************/ void pomp_barrier_exit(int* id) { if ( omp_tracing ) POMP_Barrier_exit(pomp_rd_table[*id]); } void pomp_barrier_exit_(int* id) { if ( omp_tracing ) POMP_Barrier_exit(pomp_rd_table[*id]); } void pomp_barrier_exit__(int* id) { if ( omp_tracing ) POMP_Barrier_exit(pomp_rd_table[*id]); } void POMP_BARRIER_EXIT(int* id) { if ( omp_tracing ) POMP_Barrier_exit(pomp_rd_table[*id]); } /****************************/ void pomp_critical_begin(int* id) { if ( omp_tracing ) POMP_Critical_begin(pomp_rd_table[*id]); } void pomp_critical_begin_(int* id) { if ( omp_tracing ) POMP_Critical_begin(pomp_rd_table[*id]); } void pomp_critical_begin__(int* id) { if ( omp_tracing ) POMP_Critical_begin(pomp_rd_table[*id]); } void POMP_CRITICAL_BEGIN(int* id) { if ( omp_tracing ) POMP_Critical_begin(pomp_rd_table[*id]); } /****************************/ void pomp_critical_end(int* id) { if ( omp_tracing ) POMP_Critical_end(pomp_rd_table[*id]); } void pomp_critical_end_(int* id) { if ( omp_tracing ) POMP_Critical_end(pomp_rd_table[*id]); } void pomp_critical_end__(int* id) { if ( omp_tracing ) POMP_Critical_end(pomp_rd_table[*id]); } void POMP_CRITICAL_END(int* id) { if ( omp_tracing ) POMP_Critical_end(pomp_rd_table[*id]); } /****************************/ void pomp_critical_enter(int* id) { if ( omp_tracing ) POMP_Critical_enter(pomp_rd_table[*id]); } void pomp_critical_enter_(int* id) { if ( omp_tracing ) POMP_Critical_enter(pomp_rd_table[*id]); } void pomp_critical_enter__(int* id) { if ( omp_tracing ) POMP_Critical_enter(pomp_rd_table[*id]); } void POMP_CRITICAL_ENTER(int* id) { if ( omp_tracing ) POMP_Critical_enter(pomp_rd_table[*id]); } /****************************/ void pomp_critical_exit(int* id) { if ( omp_tracing ) POMP_Critical_exit(pomp_rd_table[*id]); } void pomp_critical_exit_(int* id) { if ( omp_tracing ) POMP_Critical_exit(pomp_rd_table[*id]); } void pomp_critical_exit__(int* id) { if ( omp_tracing ) POMP_Critical_exit(pomp_rd_table[*id]); } void POMP_CRITICAL_EXIT(int* id) { if ( omp_tracing ) POMP_Critical_exit(pomp_rd_table[*id]); } /****************************/ void pomp_do_enter(int* id) { if ( omp_tracing ) POMP_For_enter(pomp_rd_table[*id]); } void pomp_do_enter_(int* id) { if ( omp_tracing ) POMP_For_enter(pomp_rd_table[*id]); } void pomp_do_enter__(int* id) { if ( omp_tracing ) POMP_For_enter(pomp_rd_table[*id]); } void POMP_DO_ENTER(int* id) { if ( omp_tracing ) POMP_For_enter(pomp_rd_table[*id]); } /****************************/ void pomp_do_exit(int* id) { if ( omp_tracing ) POMP_For_exit(pomp_rd_table[*id]); } void pomp_do_exit_(int* id) { if ( omp_tracing ) POMP_For_exit(pomp_rd_table[*id]); } void pomp_do_exit__(int* id) { if ( omp_tracing ) POMP_For_exit(pomp_rd_table[*id]); } void POMP_DO_EXIT(int* id) { if ( omp_tracing ) POMP_For_exit(pomp_rd_table[*id]); } /****************************/ void pomp_master_begin(int* id) { if ( omp_tracing ) POMP_Master_begin(pomp_rd_table[*id]); } void pomp_master_begin_(int* id) { if ( omp_tracing ) POMP_Master_begin(pomp_rd_table[*id]); } void pomp_master_begin__(int* id) { if ( omp_tracing ) POMP_Master_begin(pomp_rd_table[*id]); } void POMP_MASTER_BEGIN(int* id) { if ( omp_tracing ) POMP_Master_begin(pomp_rd_table[*id]); } /****************************/ void pomp_master_end(int* id) { if ( omp_tracing ) POMP_Master_end(pomp_rd_table[*id]); } void pomp_master_end_(int* id) { if ( omp_tracing ) POMP_Master_end(pomp_rd_table[*id]); } void pomp_master_end__(int* id) { if ( omp_tracing ) POMP_Master_end(pomp_rd_table[*id]); } void POMP_MASTER_END(int* id) { if ( omp_tracing ) POMP_Master_end(pomp_rd_table[*id]); } /****************************/ void pomp_parallel_begin(int* id) { if ( omp_tracing ) POMP_Parallel_begin(pomp_rd_table[*id]); } void pomp_parallel_begin_(int* id) { if ( omp_tracing ) POMP_Parallel_begin(pomp_rd_table[*id]); } void pomp_parallel_begin__(int* id) { if ( omp_tracing ) POMP_Parallel_begin(pomp_rd_table[*id]); } void POMP_PARALLEL_BEGIN(int* id) { if ( omp_tracing ) POMP_Parallel_begin(pomp_rd_table[*id]); } /****************************/ void pomp_parallel_end(int* id) { if ( omp_tracing ) POMP_Parallel_end(pomp_rd_table[*id]); } void pomp_parallel_end_(int* id) { if ( omp_tracing ) POMP_Parallel_end(pomp_rd_table[*id]); } void pomp_parallel_end__(int* id) { if ( omp_tracing ) POMP_Parallel_end(pomp_rd_table[*id]); } void POMP_PARALLEL_END(int* id) { if ( omp_tracing ) POMP_Parallel_end(pomp_rd_table[*id]); } /****************************/ void pomp_parallel_fork(int* id) { if ( omp_tracing ) POMP_Parallel_fork(pomp_rd_table[*id]); } void pomp_parallel_fork_(int* id) { if ( omp_tracing ) POMP_Parallel_fork(pomp_rd_table[*id]); } void pomp_parallel_fork__(int* id) { if ( omp_tracing ) POMP_Parallel_fork(pomp_rd_table[*id]); } void POMP_PARALLEL_FORK(int* id) { if ( omp_tracing ) POMP_Parallel_fork(pomp_rd_table[*id]); } /****************************/ void pomp_parallel_join(int* id) { if ( omp_tracing ) POMP_Parallel_join(pomp_rd_table[*id]); } void pomp_parallel_join_(int* id) { if ( omp_tracing ) POMP_Parallel_join(pomp_rd_table[*id]); } void pomp_parallel_join__(int* id) { if ( omp_tracing ) POMP_Parallel_join(pomp_rd_table[*id]); } void POMP_PARALLEL_JOIN(int* id) { if ( omp_tracing ) POMP_Parallel_join(pomp_rd_table[*id]); } /****************************/ void pomp_section_begin(int* id) { if ( omp_tracing ) POMP_Section_begin(pomp_rd_table[*id]); } void pomp_section_begin_(int* id) { if ( omp_tracing ) POMP_Section_begin(pomp_rd_table[*id]); } void pomp_section_begin__(int* id) { if ( omp_tracing ) POMP_Section_begin(pomp_rd_table[*id]); } void POMP_SECTION_BEGIN(int* id) { if ( omp_tracing ) POMP_Section_begin(pomp_rd_table[*id]); } /****************************/ void pomp_section_end(int* id) { if ( omp_tracing ) POMP_Section_end(pomp_rd_table[*id]); } void pomp_section_end_(int* id) { if ( omp_tracing ) POMP_Section_end(pomp_rd_table[*id]); } void pomp_section_end__(int* id) { if ( omp_tracing ) POMP_Section_end(pomp_rd_table[*id]); } void POMP_SECTION_END(int* id) { if ( omp_tracing ) POMP_Section_end(pomp_rd_table[*id]); } /****************************/ void pomp_sections_enter(int* id) { if ( omp_tracing ) POMP_Sections_enter(pomp_rd_table[*id]); } void pomp_sections_enter_(int* id) { if ( omp_tracing ) POMP_Sections_enter(pomp_rd_table[*id]); } void pomp_sections_enter__(int* id) { if ( omp_tracing ) POMP_Sections_enter(pomp_rd_table[*id]); } void POMP_SECTIONS_ENTER(int* id) { if ( omp_tracing ) POMP_Sections_enter(pomp_rd_table[*id]); } /****************************/ void pomp_sections_exit(int* id) { if ( omp_tracing ) POMP_Sections_exit(pomp_rd_table[*id]); } void pomp_sections_exit_(int* id) { if ( omp_tracing ) POMP_Sections_exit(pomp_rd_table[*id]); } void pomp_sections_exit__(int* id) { if ( omp_tracing ) POMP_Sections_exit(pomp_rd_table[*id]); } void POMP_SECTIONS_EXIT(int* id) { if ( omp_tracing ) POMP_Sections_exit(pomp_rd_table[*id]); } /****************************/ void pomp_single_begin(int* id) { if ( omp_tracing ) POMP_Single_begin(pomp_rd_table[*id]); } void pomp_single_begin_(int* id) { if ( omp_tracing ) POMP_Single_begin(pomp_rd_table[*id]); } void pomp_single_begin__(int* id) { if ( omp_tracing ) POMP_Single_begin(pomp_rd_table[*id]); } void POMP_SINGLE_BEGIN(int* id) { if ( omp_tracing ) POMP_Single_begin(pomp_rd_table[*id]); } /****************************/ void pomp_single_end(int* id) { if ( omp_tracing ) POMP_Single_end(pomp_rd_table[*id]); } void pomp_single_end_(int* id) { if ( omp_tracing ) POMP_Single_end(pomp_rd_table[*id]); } void pomp_single_end__(int* id) { if ( omp_tracing ) POMP_Single_end(pomp_rd_table[*id]); } void POMP_SINGLE_END(int* id) { if ( omp_tracing ) POMP_Single_end(pomp_rd_table[*id]); } /****************************/ void pomp_single_enter(int* id) { if ( omp_tracing ) POMP_Single_enter(pomp_rd_table[*id]); } void pomp_single_enter_(int* id) { if ( omp_tracing ) POMP_Single_enter(pomp_rd_table[*id]); } void pomp_single_enter__(int* id) { if ( omp_tracing ) POMP_Single_enter(pomp_rd_table[*id]); } void POMP_SINGLE_ENTER(int* id) { if ( omp_tracing ) POMP_Single_enter(pomp_rd_table[*id]); } /****************************/ void pomp_single_exit(int* id) { if ( omp_tracing ) POMP_Single_exit(pomp_rd_table[*id]); } void pomp_single_exit_(int* id) { if ( omp_tracing ) POMP_Single_exit(pomp_rd_table[*id]); } void pomp_single_exit__(int* id) { if ( omp_tracing ) POMP_Single_exit(pomp_rd_table[*id]); } void POMP_SINGLE_EXIT(int* id) { if ( omp_tracing ) POMP_Single_exit(pomp_rd_table[*id]); } /****************************/ void pomp_workshare_enter(int* id) { if ( omp_tracing ) POMP_Workshare_enter(pomp_rd_table[*id]); } void pomp_workshare_enter_(int* id) { if ( omp_tracing ) POMP_Workshare_enter(pomp_rd_table[*id]); } void pomp_workshare_enter__(int* id) { if ( omp_tracing ) POMP_Workshare_enter(pomp_rd_table[*id]); } void POMP_WORKSHARE_ENTER(int* id) { if ( omp_tracing ) POMP_Workshare_enter(pomp_rd_table[*id]); } /****************************/ void pomp_workshare_exit(int* id) { if ( omp_tracing ) POMP_Workshare_exit(pomp_rd_table[*id]); } void pomp_workshare_exit_(int* id) { if ( omp_tracing ) POMP_Workshare_exit(pomp_rd_table[*id]); } void pomp_workshare_exit__(int* id) { if ( omp_tracing ) POMP_Workshare_exit(pomp_rd_table[*id]); } void POMP_WORKSHARE_EXIT(int* id) { if ( omp_tracing ) POMP_Workshare_exit(pomp_rd_table[*id]); } /****************************/ void pomp_begin(int* id) { if ( omp_tracing ) POMP_Begin(pomp_rd_table[*id]); } void pomp_begin_(int* id) { if ( omp_tracing ) POMP_Begin(pomp_rd_table[*id]); } void pomp_begin__(int* id) { if ( omp_tracing ) POMP_Begin(pomp_rd_table[*id]); } void POMP_BEGIN(int* id) { if ( omp_tracing ) POMP_Begin(pomp_rd_table[*id]); } /****************************/ void pomp_end(int* id) { if ( omp_tracing ) POMP_End(pomp_rd_table[*id]); } void pomp_end_(int* id) { if ( omp_tracing ) POMP_End(pomp_rd_table[*id]); } void pomp_end__(int* id) { if ( omp_tracing ) POMP_End(pomp_rd_table[*id]); } void POMP_END(int* id) { if ( omp_tracing ) POMP_End(pomp_rd_table[*id]); } /****************************/ void pomp_flush_enter(int* id) { if ( omp_tracing ) POMP_Flush_enter(pomp_rd_table[*id]); } void pomp_flush_enter_(int* id) { if ( omp_tracing ) POMP_Flush_enter(pomp_rd_table[*id]); } void pomp_flush_enter__(int* id) { if ( omp_tracing ) POMP_Flush_enter(pomp_rd_table[*id]); } void POMP_FLUSH_ENTER(int* id) { if ( omp_tracing ) POMP_Flush_enter(pomp_rd_table[*id]); } /****************************/ void pomp_flush_exit(int* id) { if ( omp_tracing ) POMP_Flush_exit(pomp_rd_table[*id]); } void pomp_flush_exit_(int* id) { if ( omp_tracing ) POMP_Flush_exit(pomp_rd_table[*id]); } void pomp_flush_exit__(int* id) { if ( omp_tracing ) POMP_Flush_exit(pomp_rd_table[*id]); } void POMP_FLUSH_EXIT(int* id) { if ( omp_tracing ) POMP_Flush_exit(pomp_rd_table[*id]); } /****************************/ } /* extern "C" */ /* * C pomp function library */ /* TAU specific calls */ int tau_openmp_init(void) { omp_init_lock(&tau_ompregdescr_lock); return 0; } void TauStartOpenMPRegionTimer(struct ompregdescr *r, int index) { static int tau_openmp_initialized = tau_openmp_init(); /* For any region, create a mapping between a region r and timer t and start the timer. */ omp_set_lock(&tau_ompregdescr_lock); if (!r->data) { #ifdef TAU_OPENMP_PARTITION_REGION FunctionInfo **flist = new FunctionInfo*[NUM_OMP_TYPES]; for (int i=0; i < NUM_OMP_TYPES; i++) { char rname[1024], rtype[1024]; sprintf(rname, "%s %s (%s)", r->name, r->sub_name, omp_names[i]); sprintf(rtype, "[OpenMP location: file:%s <%d, %d>]", r->file_name, r->begin_first_line, r->end_last_line); FunctionInfo *f = new FunctionInfo(rname, rtype, OpenMP, "OpenMP"); flist[i] = f; } r->data = (void*)flist; #else char rname[1024], rtype[1024]; sprintf(rname, "%s %s", r->name, r->sub_name); sprintf(rtype, "[OpenMP location: file:%s <%d, %d>]", r->file_name, r->begin_first_line, r->end_last_line); FunctionInfo *f = new FunctionInfo(rname, rtype, OpenMP, "OpenMP"); r->data = (void*)f; #endif } #ifdef TAU_OPENMP_PARTITION_REGION FunctionInfo *f = ((FunctionInfo **)r->data)[index]; #else FunctionInfo *f = (FunctionInfo *)r->data; #endif TauGroup_t gr = f->GetProfileGroup(); if (gr & RtsLayer::TheProfileMask()) { Profiler *p = new Profiler(f, OpenMP, true, RtsLayer::myThread()); p->Start(); } omp_unset_lock(&tau_ompregdescr_lock); } void TauStopOpenMPRegionTimer(struct ompregdescr *r, int index) { #ifdef TAU_OPENMP_PARTITION_REGION FunctionInfo *f = ((FunctionInfo **)r->data)[index]; #else FunctionInfo *f = (FunctionInfo *)r->data; #endif TauGroup_t gr = f->GetProfileGroup(); int tau_threadid = RtsLayer::myThread(); Profiler *p = Profiler::CurrentProfiler[tau_threadid]; if (p->ThisFunction == f) { p->Stop(tau_threadid); delete p; } else { // nothing, it must have been disabled/throttled } } /* pomp library calls */ void POMP_Finalize() { if ( ! omp_fin_called ) { omp_fin_called = 1; } #ifdef DEBUG_PROF fprintf(stderr, " 0: finalize\n"); #endif /* DEBUG_PROF */ } void POMP_Init() { int i; atexit(POMP_Finalize); #ifdef DEBUG_PROF fprintf(stderr, " 0: init\n"); #endif /* DEBUG_PROF */ for(i=0; idata = 0; /* allocate space for performance data here */ } } } void POMP_Off() { TAU_DISABLE_INSTRUMENTATION(); omp_tracing = 0; } void POMP_On() { TAU_ENABLE_INSTRUMENTATION(); omp_tracing = 1; } void POMP_Atomic_enter(struct ompregdescr* r) { #ifdef TAU_AGGREGATE_OPENMP_TIMINGS TAU_GLOBAL_TIMER_START(tatomic); #endif /* TAU_AGGREGATE_OPENMP_TIMINGS */ #ifdef TAU_OPENMP_REGION_VIEW TauStartOpenMPRegionTimer(r,TAU_OMP_ATOMIC); #endif /* TAU_OPENMP_REGION_VIEW */ #ifdef DEBUG_PROF if ( omp_tracing ) { fprintf(stderr, "%3d: enter atomic\n", omp_get_thread_num()); } #endif /* DEBUG_PROF */ } void POMP_Atomic_exit(struct ompregdescr* r) { #ifdef TAU_OPENMP_REGION_VIEW TauStopOpenMPRegionTimer(r, TAU_OMP_ATOMIC); #endif /* TAU_OPENMP_REGION_VIEW */ #ifdef TAU_AGGREGATE_OPENMP_TIMINGS TAU_GLOBAL_TIMER_STOP(); /* global timer stop */ #endif /* TAU_AGGREGATE_OPENMP_TIMINGS */ #ifdef DEBUG_PROF if ( omp_tracing ) { fprintf(stderr, "%3d: exit atomic\n", omp_get_thread_num()); } #endif /* DEBUG_PROF */ } void POMP_Barrier_enter(struct ompregdescr* r) { #ifdef TAU_AGGREGATE_OPENMP_TIMINGS TAU_GLOBAL_TIMER_START(tbarrier); #endif /* TAU_AGGREGATE_OPENMP_TIMINGS */ #ifdef TAU_OPENMP_REGION_VIEW TauStartOpenMPRegionTimer(r, TAU_OMP_BARRIER); #endif /* TAU_OPENMP_REGION_VIEW */ #ifdef DEBUG_PROF if ( omp_tracing ) { if ( r->name[0] == 'b' ) fprintf(stderr, "%3d: enter barrier\n", omp_get_thread_num()); else fprintf(stderr, "%3d: enter implicit barrier of %s\n", omp_get_thread_num(), r->name); } #endif /* DEBUG_PROF */ } void POMP_Barrier_exit(struct ompregdescr* r) { #ifdef TAU_OPENMP_REGION_VIEW TauStopOpenMPRegionTimer(r, TAU_OMP_BARRIER); #endif /* TAU_OPENMP_REGION_VIEW */ #ifdef TAU_AGGREGATE_OPENMP_TIMINGS TAU_GLOBAL_TIMER_STOP(); /* global timer stop */ #endif /* TAU_AGGREGATE_OPENMP_TIMINGS */ #ifdef DEBUG_PROF if ( omp_tracing ) { if ( r->name[0] == 'b' ) fprintf(stderr, "%3d: exit barrier\n", omp_get_thread_num()); else fprintf(stderr, "%3d: exit implicit barrier of %s\n", omp_get_thread_num(), r->name); } #endif /* DEBUG_PROF */ } void POMP_Critical_begin(struct ompregdescr* r) { #ifdef TAU_AGGREGATE_OPENMP_TIMINGS TAU_GLOBAL_TIMER_START(tcriticalb); #endif /* TAU_AGGREGATE_OPENMP_TIMINGS */ #ifdef TAU_OPENMP_REGION_VIEW TauStartOpenMPRegionTimer(r, TAU_OMP_CRITICAL_BE); #endif /* TAU_OPENMP_REGION_VIEW */ #ifdef DEBUG_PROF if ( omp_tracing ) { fprintf(stderr, "%3d: begin critical %s\n", omp_get_thread_num(), r->sub_name); } #endif /* DEBUG_PROF */ } void POMP_Critical_end(struct ompregdescr* r) { #ifdef TAU_OPENMP_REGION_VIEW TauStopOpenMPRegionTimer(r, TAU_OMP_CRITICAL_BE); #endif /* TAU_OPENMP_REGION_VIEW */ #ifdef TAU_AGGREGATE_OPENMP_TIMINGS TAU_GLOBAL_TIMER_STOP(); /* global timer stop */ #endif /* TAU_AGGREGATE_OPENMP_TIMINGS */ #ifdef DEBUG_PROF if ( omp_tracing ) { fprintf(stderr, "%3d: end critical %s\n", omp_get_thread_num(), r->sub_name); } #endif /* DEBUG_PROF */ } void POMP_Critical_enter(struct ompregdescr* r) { #ifdef TAU_AGGREGATE_OPENMP_TIMINGS TAU_GLOBAL_TIMER_START(tcriticale); #endif /* TAU_AGGREGATE_OPENMP_TIMINGS */ #ifdef TAU_OPENMP_REGION_VIEW TauStartOpenMPRegionTimer(r, TAU_OMP_CRITICAL_EE); #endif /* TAU_OPENMP_REGION_VIEW */ #ifdef DEBUG_PROF if ( omp_tracing ) { fprintf(stderr, "%3d: enter critical %s\n", omp_get_thread_num(), r->sub_name); } #endif /* DEBUG_PROF */ } void POMP_Critical_exit(struct ompregdescr* r) { #ifdef TAU_OPENMP_REGION_VIEW TauStopOpenMPRegionTimer(r, TAU_OMP_CRITICAL_EE); #endif /* TAU_OPENMP_REGION_VIEW */ #ifdef TAU_AGGREGATE_OPENMP_TIMINGS TAU_GLOBAL_TIMER_STOP(); /* global timer stop */ #endif /* TAU_AGGREGATE_OPENMP_TIMINGS */ #ifdef DEBUG_PROF if ( omp_tracing ) { fprintf(stderr, "%3d: exit critical %s\n", omp_get_thread_num(), r->sub_name); } #endif /* DEBUG_PROF */ } void POMP_For_enter(struct ompregdescr* r) { #ifdef TAU_AGGREGATE_OPENMP_TIMINGS TAU_GLOBAL_TIMER_START(tfor); #endif /* TAU_AGGREGATE_OPENMP_TIMINGS */ #ifdef TAU_OPENMP_REGION_VIEW TauStartOpenMPRegionTimer(r, TAU_OMP_FOR_EE); #endif /* TAU_OPENMP_REGION_VIEW */ #ifdef DEBUG_PROF if ( omp_tracing ) { fprintf(stderr, "%3d: enter for\n", omp_get_thread_num()); } #endif /* DEBUG_PROF */ } void POMP_For_exit(struct ompregdescr* r) { #ifdef TAU_OPENMP_REGION_VIEW TauStopOpenMPRegionTimer(r, TAU_OMP_FOR_EE); #endif /* TAU_OPENMP_REGION_VIEW */ #ifdef TAU_AGGREGATE_OPENMP_TIMINGS TAU_GLOBAL_TIMER_STOP(); /* global timer stop */ #endif /* TAU_AGGREGATE_OPENMP_TIMINGS */ // as in a stack. lifo #ifdef DEBUG_PROF if ( omp_tracing ) { fprintf(stderr, "%3d: exit for\n", omp_get_thread_num()); } #endif /* DEBUG_PROF */ } void POMP_Master_begin(struct ompregdescr* r) { #ifdef TAU_AGGREGATE_OPENMP_TIMINGS TAU_GLOBAL_TIMER_START(tmaster); #endif /* TAU_AGGREGATE_OPENMP_TIMINGS */ #ifdef TAU_OPENMP_REGION_VIEW TauStartOpenMPRegionTimer(r, TAU_OMP_MASTER_BE); #endif /* TAU_OPENMP_REGION_VIEW */ #ifdef DEBUG_PROF if ( omp_tracing ) { fprintf(stderr, "%3d: begin master\n", omp_get_thread_num()); } #endif /* DEBUG_PROF */ } void POMP_Master_end(struct ompregdescr* r) { #ifdef TAU_OPENMP_REGION_VIEW TauStopOpenMPRegionTimer(r, TAU_OMP_MASTER_BE); #endif /* TAU_OPENMP_REGION_VIEW */ #ifdef TAU_AGGREGATE_OPENMP_TIMINGS TAU_GLOBAL_TIMER_STOP(); /* global timer stop */ #endif /* TAU_AGGREGATE_OPENMP_TIMINGS */ #ifdef DEBUG_PROF if ( omp_tracing ) { fprintf(stderr, "%3d: end master\n", omp_get_thread_num()); } #endif /* DEBUG_PROF */ } void POMP_Parallel_begin(struct ompregdescr* r) { /* if there is no top level timer, create it */ Tau_create_top_level_timer_if_necessary(); #ifdef TAU_AGGREGATE_OPENMP_TIMINGS TAU_GLOBAL_TIMER_START(tparallelb); #endif /* TAU_AGGREGATE_OPENMP_TIMINGS */ #ifdef TAU_OPENMP_REGION_VIEW TauStartOpenMPRegionTimer(r, TAU_OMP_PAR_BE); #endif /* TAU_OPENMP_REGION_VIEW */ #ifdef DEBUG_PROF if ( omp_tracing ) { fprintf(stderr, "%3d: begin parallel\n", omp_get_thread_num()); } #endif /* DEBUG_PROF */ } void POMP_Parallel_end(struct ompregdescr* r) { #ifdef TAU_OPENMP_REGION_VIEW TauStopOpenMPRegionTimer(r, TAU_OMP_PAR_BE); #endif /* TAU_OPENMP_REGION_VIEW */ #ifdef TAU_AGGREGATE_OPENMP_TIMINGS TAU_GLOBAL_TIMER_STOP(); /* global timer stop */ #endif /* TAU_AGGREGATE_OPENMP_TIMINGS */ #ifdef DEBUG_PROF if ( omp_tracing ) { fprintf(stderr, "%3d: end parallel\n", omp_get_thread_num()); } #endif /* DEBUG_PROF */ } void POMP_Parallel_fork(struct ompregdescr* r) { #ifdef TAU_AGGREGATE_OPENMP_TIMINGS TAU_GLOBAL_TIMER_START(tparallelf); #endif /* TAU_AGGREGATE_OPENMP_TIMINGS */ #ifdef TAU_OPENMP_REGION_VIEW TauStartOpenMPRegionTimer(r, TAU_OMP_PAR_FJ); #endif /* TAU_OPENMP_REGION_VIEW */ #ifdef DEBUG_PROF if ( omp_tracing ) { fprintf(stderr, "%3d: fork parallel\n", omp_get_thread_num()); } #endif /* DEBUG_PROF */ } void POMP_Parallel_join(struct ompregdescr* r) { #ifdef TAU_OPENMP_REGION_VIEW TauStopOpenMPRegionTimer(r, TAU_OMP_PAR_FJ); #endif /* TAU_OPENMP_REGION_VIEW */ #ifdef TAU_AGGREGATE_OPENMP_TIMINGS TAU_GLOBAL_TIMER_STOP(); /* global timer stop */ #endif /* TAU_AGGREGATE_OPENMP_TIMINGS */ #ifdef DEBUG_PROF if ( omp_tracing ) { fprintf(stderr, "%3d: join parallel\n", omp_get_thread_num()); } #endif /* DEBUG_PROF */ } void POMP_Section_begin(struct ompregdescr* r) { #ifdef TAU_AGGREGATE_OPENMP_TIMINGS TAU_GLOBAL_TIMER_START(tsectionb); #endif /* TAU_AGGREGATE_OPENMP_TIMINGS */ #ifdef TAU_OPENMP_REGION_VIEW TauStartOpenMPRegionTimer(r, TAU_OMP_SECTION_BE); #endif /* TAU_OPENMP_REGION_VIEW */ #ifdef DEBUG_PROF if ( omp_tracing ) { fprintf(stderr, "%3d: begin section\n", omp_get_thread_num()); } #endif /* DEBUG_PROF */ } void POMP_Section_end(struct ompregdescr* r) { #ifdef TAU_OPENMP_REGION_VIEW TauStopOpenMPRegionTimer(r, TAU_OMP_SECTION_BE); #endif /* TAU_OPENMP_REGION_VIEW */ #ifdef TAU_AGGREGATE_OPENMP_TIMINGS TAU_GLOBAL_TIMER_STOP(); /* global timer stop */ #endif /* TAU_AGGREGATE_OPENMP_TIMINGS */ #ifdef DEBUG_PROF if ( omp_tracing ) { fprintf(stderr, "%3d: end section\n", omp_get_thread_num()); } #endif /* DEBUG_PROF */ } void POMP_Sections_enter(struct ompregdescr* r) { #ifdef TAU_AGGREGATE_OPENMP_TIMINGS TAU_GLOBAL_TIMER_START(tsectione); #endif /* TAU_AGGREGATE_OPENMP_TIMINGS */ #ifdef TAU_OPENMP_REGION_VIEW TauStartOpenMPRegionTimer(r, TAU_OMP_SECTION_EE); #endif /* TAU_OPENMP_REGION_VIEW */ #ifdef DEBUG_PROF if ( omp_tracing ) { fprintf(stderr, "%3d: enter sections\n", omp_get_thread_num()); } #endif /* DEBUG_PROF */ } void POMP_Sections_exit(struct ompregdescr* r) { #ifdef TAU_OPENMP_REGION_VIEW TauStopOpenMPRegionTimer(r, TAU_OMP_SECTION_EE); #endif /* TAU_OPENMP_REGION_VIEW */ #ifdef TAU_AGGREGATE_OPENMP_TIMINGS TAU_GLOBAL_TIMER_STOP(); /* global timer stop */ #endif /* TAU_AGGREGATE_OPENMP_TIMINGS */ #ifdef DEBUG_PROF if ( omp_tracing ) { fprintf(stderr, "%3d: exit sections\n", omp_get_thread_num()); } #endif /* DEBUG_PROF */ } void POMP_Single_begin(struct ompregdescr* r) { #ifdef TAU_AGGREGATE_OPENMP_TIMINGS TAU_GLOBAL_TIMER_START(tsingleb); #endif /* TAU_AGGREGATE_OPENMP_TIMINGS */ #ifdef TAU_OPENMP_REGION_VIEW TauStartOpenMPRegionTimer(r, TAU_OMP_SINGLE_BE); #endif /* TAU_OPENMP_REGION_VIEW */ #ifdef DEBUG_PROF if ( omp_tracing ) { fprintf(stderr, "%3d: begin single\n", omp_get_thread_num()); } #endif /* DEBUG_PROF */ } void POMP_Single_end(struct ompregdescr* r) { #ifdef TAU_OPENMP_REGION_VIEW TauStopOpenMPRegionTimer(r, TAU_OMP_SINGLE_BE); #endif /* TAU_OPENMP_REGION_VIEW */ #ifdef TAU_AGGREGATE_OPENMP_TIMINGS TAU_GLOBAL_TIMER_STOP(); /* global timer stop */ #endif /* TAU_AGGREGATE_OPENMP_TIMINGS */ #ifdef DEBUG_PROF if ( omp_tracing ) { fprintf(stderr, "%3d: end single\n", omp_get_thread_num()); } #endif /* DEBUG_PROF */ } void POMP_Single_enter(struct ompregdescr* r) { #ifdef TAU_AGGREGATE_OPENMP_TIMINGS TAU_GLOBAL_TIMER_START(tsinglee); #endif /* TAU_AGGREGATE_OPENMP_TIMINGS */ #ifdef TAU_OPENMP_REGION_VIEW TauStartOpenMPRegionTimer(r, TAU_OMP_SINGLE_EE); #endif /* TAU_OPENMP_REGION_VIEW */ #ifdef DEBUG_PROF if ( omp_tracing ) { fprintf(stderr, "%3d: enter single\n", omp_get_thread_num()); } #endif /* DEBUG_PROF */ } void POMP_Single_exit(struct ompregdescr* r) { #ifdef TAU_OPENMP_REGION_VIEW TauStopOpenMPRegionTimer(r, TAU_OMP_SINGLE_EE); #endif /* TAU_OPENMP_REGION_VIEW */ #ifdef TAU_AGGREGATE_OPENMP_TIMINGS TAU_GLOBAL_TIMER_STOP(); /* global timer stop */ #endif /* TAU_AGGREGATE_OPENMP_TIMINGS */ #ifdef DEBUG_PROF if ( omp_tracing ) { fprintf(stderr, "%3d: exit single\n", omp_get_thread_num()); } #endif /* DEBUG_PROF */ } void POMP_Workshare_enter(struct ompregdescr* r) { #ifdef TAU_AGGREGATE_OPENMP_TIMINGS TAU_GLOBAL_TIMER_START(tworkshare); #endif /* TAU_AGGREGATE_OPENMP_TIMINGS */ #ifdef TAU_OPENMP_REGION_VIEW TauStartOpenMPRegionTimer(r, TAU_OMP_WORK_EE); #endif /* TAU_OPENMP_REGION_VIEW */ #ifdef DEBUG_PROF if ( omp_tracing ) { fprintf(stderr, "%3d: enter workshare\n", omp_get_thread_num()); } #endif /* DEBUG_PROF */ } void POMP_Workshare_exit(struct ompregdescr* r) { #ifdef TAU_OPENMP_REGION_VIEW TauStopOpenMPRegionTimer(r, TAU_OMP_WORK_EE); #endif /* TAU_OPENMP_REGION_VIEW */ #ifdef TAU_AGGREGATE_OPENMP_TIMINGS TAU_GLOBAL_TIMER_STOP(); /* global timer stop */ #endif /* TAU_AGGREGATE_OPENMP_TIMINGS */ #ifdef DEBUG_PROF if ( omp_tracing ) { fprintf(stderr, "%3d: exit workshare\n", omp_get_thread_num()); } #endif /* DEBUG_PROF */ } void POMP_Begin(struct ompregdescr* r) { #ifdef TAU_AGGREGATE_OPENMP_TIMINGS TAU_GLOBAL_TIMER_START(tregion); #endif /* TAU_AGGREGATE_OPENMP_TIMINGS */ #ifdef TAU_OPENMP_REGION_VIEW TauStartOpenMPRegionTimer(r, TAU_OMP_INST_BE); #endif /* TAU_OPENMP_REGION_VIEW */ #ifdef DEBUG_PROF if ( omp_tracing ) { fprintf(stderr, "%3d: begin region %s\n", omp_get_thread_num(), r->sub_name); } #endif /* DEBUG_PROF */ } void POMP_End(struct ompregdescr* r) { #ifdef TAU_OPENMP_REGION_VIEW TauStopOpenMPRegionTimer(r, TAU_OMP_INST_BE); #endif /* TAU_OPENMP_REGION_VIEW */ #ifdef TAU_AGGREGATE_OPENMP_TIMINGS TAU_GLOBAL_TIMER_STOP(); /* global timer stop */ #endif /* TAU_AGGREGATE_OPENMP_TIMINGS */ #ifdef DEBUG_PROF if ( omp_tracing ) { fprintf(stderr, "%3d: end region %s\n", omp_get_thread_num(), r->sub_name); } #endif /* DEBUG_PROF */ } void POMP_Flush_enter(struct ompregdescr* r) { #ifdef TAU_AGGREGATE_OPENMP_TIMINGS TAU_GLOBAL_TIMER_START(tregion); #endif /* TAU_AGGREGATE_OPENMP_TIMINGS */ #ifdef TAU_OPENMP_REGION_VIEW TauStartOpenMPRegionTimer(r, TAU_OMP_FLUSH_EE); #endif /* TAU_OPENMP_REGION_VIEW */ #ifdef DEBUG_PROF if ( omp_tracing ) { fprintf(stderr, "%3d: flush enter region %s\n", omp_get_thread_num(), r->sub_name); } #endif /* DEBUG_PROF */ } void POMP_Flush_exit(struct ompregdescr* r) { #ifdef TAU_OPENMP_REGION_VIEW TauStopOpenMPRegionTimer(r, TAU_OMP_FLUSH_EE); #endif /* TAU_OPENMP_REGION_VIEW */ #ifdef TAU_AGGREGATE_OPENMP_TIMINGS TAU_GLOBAL_TIMER_STOP(); /* global timer stop */ #endif /* TAU_AGGREGATE_OPENMP_TIMINGS */ #ifdef DEBUG_PROF if ( omp_tracing ) { fprintf(stderr, "%3d: flush exit region %s\n", omp_get_thread_num(), r->sub_name); } #endif /* DEBUG_PROF */ } void POMP_Init_lock(omp_lock_t *s) { TAU_PROFILE("omp_init_lock", "[OpenMP]", OpenMP); #ifdef DEBUG_PROF if ( omp_tracing ) { fprintf(stderr, "%3d: init lock\n", omp_get_thread_num()); } #endif /* DEBUG_PROF */ omp_init_lock(s); } void POMP_Destroy_lock(omp_lock_t *s) { TAU_PROFILE("omp_destroy_lock", "[OpenMP]", OpenMP); #ifdef DEBUG_PROF if ( omp_tracing ) { fprintf(stderr, "%3d: destroy lock\n", omp_get_thread_num()); } #endif /* DEBUG_PROF */ omp_destroy_lock(s); } void POMP_Set_lock(omp_lock_t *s) { TAU_PROFILE("omp_set_lock", "[OpenMP]", OpenMP); #ifdef DEBUG_PROF if ( omp_tracing ) { fprintf(stderr, "%3d: set lock\n", omp_get_thread_num()); } #endif /* DEBUG_PROF */ omp_set_lock(s); } void POMP_Unset_lock(omp_lock_t *s) { TAU_PROFILE("omp_unset_lock", "[OpenMP]", OpenMP); #ifdef DEBUG_PROF if ( omp_tracing ) { fprintf(stderr, "%3d: unset lock\n", omp_get_thread_num()); } #endif /* DEBUG_PROF */ omp_unset_lock(s); } int POMP_Test_lock(omp_lock_t *s) { TAU_PROFILE("omp_test_lock", "[OpenMP]", OpenMP); #ifdef DEBUG_PROF if ( omp_tracing ) { fprintf(stderr, "%3d: test lock\n", omp_get_thread_num()); } #endif /* DEBUG_PROF */ return omp_test_lock(s); } void POMP_Init_nest_lock(omp_nest_lock_t *s) { TAU_PROFILE("omp_init_nest_lock", "[OpenMP]", OpenMP); #ifdef DEBUG_PROF if ( omp_tracing ) { fprintf(stderr, "%3d: init nestlock\n", omp_get_thread_num()); } #endif /* DEBUG_PROF */ omp_init_nest_lock(s); } void POMP_Destroy_nest_lock(omp_nest_lock_t *s) { TAU_PROFILE("omp_destroy_nest_lock", "[OpenMP]", OpenMP); #ifdef DEBUG_PROF if ( omp_tracing ) { fprintf(stderr, "%3d: destroy nestlock\n", omp_get_thread_num()); } #endif /* DEBUG_PROF */ omp_destroy_nest_lock(s); } void POMP_Set_nest_lock(omp_nest_lock_t *s) { TAU_PROFILE("omp_set_nest_lock", "[OpenMP]", OpenMP); #ifdef DEBUG_PROF if ( omp_tracing ) { fprintf(stderr, "%3d: set nestlock\n", omp_get_thread_num()); } #endif /* DEBUG_PROF */ omp_set_nest_lock(s); } void POMP_Unset_nest_lock(omp_nest_lock_t *s) { TAU_PROFILE("omp_unset_nest_lock", "[OpenMP]", OpenMP); #ifdef DEBUG_PROF if ( omp_tracing ) { fprintf(stderr, "%3d: unset nestlock\n", omp_get_thread_num()); } #endif /* DEBUG_PROF */ omp_unset_nest_lock(s); } int POMP_Test_nest_lock(omp_nest_lock_t *s) { TAU_PROFILE("omp_test_nest_lock", "[OpenMP]", OpenMP); #ifdef DEBUG_PROF if ( omp_tracing ) { fprintf(stderr, "%3d: test nestlock\n", omp_get_thread_num()); } #endif /* DEBUG_PROF */ return omp_test_nest_lock(s); } /*************************************************************************** * $RCSfile: TauKojakOpari.cpp,v $ $Author: amorris $ * $Revision: 1.6 $ $Date: 2005/11/08 01:35:12 $ * POOMA_VERSION_ID: $Id: TauKojakOpari.cpp,v 1.6 2005/11/08 01:35:12 amorris Exp $ ***************************************************************************/ tau-2.16.4/src/Profile/TauKtau.cpp000077500000000000000000000740561062343042700166660ustar00rootroot00000000000000/**************************************************************************** ** TAU Portable Profiling Package ** ** http://www.acl.lanl.gov/tau ** ***************************************************************************** ** Copyright 1999 ** ** Department of Computer and Information Science, University of Oregon ** ** Advanced Computing Laboratory, Los Alamos National Laboratory ** ****************************************************************************/ /*************************************************************************** ** File : TauKtau.cpp ** ** Description : TAU Kernel Profiling ** ** Author : Surave Suthikulpanit ** ** : Aroon Nataraj ** ** Contact : suravee@cs.uoregon.edu ** ** : anataraj@cs.uoregon.edu ** ** Flags : Compile with ** ** -DTAUKTAU -DTAUKTAU_MERGE ** ** Documentation : ** ***************************************************************************/ #include #include #include #include #include #include #include #include #include "Profile/Profiler.h" #include "Profile/TauKtau.h" #include #include "Profile/KtauProfiler.h" using namespace std; #define LINE_SIZE 1024 #define OUTPUT_NAME_SIZE 100 #define DEBUG 0 #define maxof(x,y) ((x>=y)?x:y) /* For sys_gettid syscall */ //_syscall0(pid_t,gettid); #include extern "C" int ktau_diff_profiles(ktau_output* plist1, int size1, ktau_output* plist2, int size2, ktau_output** outlist); /*-------------------------- CON/DESTRUCTOR ---------------------------*/ /* * Function : TauKtau::TauKtau * Description : Constructor */ TauKtau::TauKtau(KtauSymbols& sym):KtauSym(sym) { startBuf = NULL; stopBuf = NULL; diffOutput = NULL; startSize= 0; stopSize = 0; outSize = 0; //ThisKtauOutputInfo.pid = gettid(); ThisKtauOutputInfo.pid = syscall(__NR_gettid); //ThisKtauOutputInfo.pid = getpid(); ThisKtauOutputInfo.templ_fun_counter = 0; ThisKtauOutputInfo.user_ev_counter = 0; startBufTWO = NULL; stopBufTWO = NULL; diffOutputTWO = NULL; startSizeTWO = 0; stopSizeTWO = 0; outSizeTWO = 0; } /* * Function : TauKtau::~TauKtau * Description : Destructor */ TauKtau::~TauKtau() { free(startBuf); free(stopBuf); if(diffOutput) { for(int i=0 ; ient_lst); free(diffOutput); } startSize= 0; stopSize = 0; outSize = 0; startBuf = NULL; stopBuf = NULL; diffOutput = NULL; startSizeTWO = 0; stopSizeTWO = 0; outSizeTWO = 0; startBufTWO = NULL; stopBufTWO = NULL; diffOutputTWO = NULL; } /*----------------------------- PUBLIC --------------------------------*/ int TauKtau::RegisterFork(TauKtau* pKernProf, enum TauFork_t opcode) { int i = 0; if(DEBUG)printf("TauKtau::RegisterFork: Enter\n"); if(DEBUG)printf("TauKtau::RegisterFork: Calling Dest ~TauKtau\n"); //Call the destructor to cleanup pKernProf->~TauKtau(); if(DEBUG)printf("TauKtau::RegisterFork: Redoing Cons Steps TauKtau\n"); //Redo stuff done in the constructor pKernProf->startBuf = NULL; pKernProf->stopBuf = NULL; pKernProf->diffOutput = NULL; pKernProf->startSize= 0; pKernProf->stopSize = 0; pKernProf->outSize = 0; pKernProf->ThisKtauOutputInfo.pid = syscall(__NR_gettid); //pKernProf->ThisKtauOutputInfo.pid = gettid(); //pKernProf->ThisKtauOutputInfo.pid = getpid(); pKernProf->ThisKtauOutputInfo.templ_fun_counter = 0; pKernProf->ThisKtauOutputInfo.user_ev_counter = 0; if(DEBUG)printf("TauKtau::RegisterFork: Calling StartKProfile\n"); //Do a StartKProfile i = pKernProf->StartKProfile(); if(DEBUG)printf("TauKtau::RegisterFork: Exit\n"); return i; } /* * Function : TauKtau::StartKprofile * Description : Read the start profile */ int TauKtau::StartKProfile() { //int selfpid = -1; int selfpid = 0; //ALL //startSize = read_size(KTAU_PROFILE, 1, &selfpid, 1, 0, NULL, -1); //startSize = read_size(KTAU_PROFILE, 1, &selfpid, 1, 0, NULL, 2); startSize = read_size(KTAU_TYPE_PROFILE, 0 /*ALL*/, &selfpid, 0/*ALL*/, 0, NULL, -1); if(startSize <= 0) { return -1; } startBuf = (char*)malloc(startSize*sizeof(ktau_output)); if(!startBuf) { perror("TauKtau::StartKProfile: malloc"); return -1; } startSizeTWO = startSize*sizeof(ktau_output); startBufTWO = (char*) malloc(startSizeTWO); //startSize = read_data(KTAU_PROFILE, 1, &selfpid, 1, startBuf, startSize, 0, NULL); startSize = read_data(KTAU_TYPE_PROFILE, 0 /*ALL*/, &selfpid, 0/*ALL*/, startBuf, startSize, 0, NULL); if(startSize <= 0) { free(startBuf); startBuf = NULL; return -1; } memcpy(startBufTWO, startBuf, startSizeTWO); return startSize; } /* * Function : TauKtau::StartKprofile * Description : Read the stop, diff, and dump profile */ int TauKtau::StopKProfile() { int i=0; int ret = 0; //int selfpid = -1; int selfpid = 0; //ALL //stopSize = read_size(KTAU_PROFILE, 1, &selfpid, 1, 0, NULL, 2); stopSize = read_size(KTAU_TYPE_PROFILE, 0/*ALL*/, &selfpid, 0/*ALL*/, 0, NULL, -1); if(stopSize <= 0) { return -1; } stopBuf = (char*)malloc(stopSize*sizeof(ktau_output)); if(!stopBuf) { perror("TauKtau::StopKProfile: malloc"); return -1; } int stopSizeTWO = stopSize*sizeof(ktau_output); stopBufTWO = (char*) malloc(stopSizeTWO); //stopSize = read_data(KTAU_PROFILE, 1, &selfpid, 1, stopBuf, stopSize, 0, NULL); stopSize = read_data(KTAU_TYPE_PROFILE, 0/*ALL*/, &selfpid, 0/*ALL*/, stopBuf, stopSize, 0, NULL); if(stopSize <= 0) { free(stopBuf); stopBuf = NULL; return -1; } memcpy(stopBufTWO, stopBuf, stopSizeTWO); if((outSize = DiffKProfile()) < 0){ return(-1); } if((outSizeTWO = DiffKProfileTWO(startBufTWO, stopBufTWO, startSizeTWO, stopSizeTWO, &diffOutputTWO)) < 0){ return(-1); } return(ret); } int TauKtau::DumpKProfileOut() { int ret = 0; if((ret = DumpKProfileTWO(outSizeTWO, diffOutputTWO, "perprocess")) < 0){ return(-1); }; /* AN: TODO: Disabling till a leader election method is settled on ktau_output* aggr_profs = NULL; AggrKProfiles(startBufTWO, startSizeTWO, stopBufTWO, stopSizeTWO, &aggr_profs); if(DumpKProfileTWO(1, aggr_profs, "kernelwide") < 0){ return(-1); } */ return 0; } int TauKtau::AggrKProfiles(char* start, int startSz, char* stop, int stopSz, ktau_output** aggrprofs) { int i,j,k,diff_count; ktau_output *startOutput; ktau_output *stopOutput; long startProcNum = 0; long stopProcNum = 0; startProcNum = unpack_bindata(KTAU_TYPE_PROFILE, start, startSz, &startOutput); if(startProcNum < 0) { return -1; } ktau_output* paggr_start_prof = (ktau_output*)calloc(sizeof(ktau_output),1); if(!paggr_start_prof) { printf("calloc ret null.\n"); goto free_out; } paggr_start_prof->ent_lst = (o_ent*)calloc(sizeof(o_ent)*2048,1); if(!paggr_start_prof->ent_lst) { printf("calloc ret null.\n"); free(paggr_start_prof); goto free_out; } aggr_many_profiles(startOutput, startProcNum, 2048, paggr_start_prof); paggr_start_prof->pid = 0; stopProcNum = unpack_bindata(KTAU_TYPE_PROFILE, stop, stopSz, &stopOutput); if(stopProcNum < 0) { return -1; } { //extra brace to make gcc 4.1 happy ktau_output* paggr_prof = (ktau_output*)calloc(sizeof(ktau_output),1); if(!paggr_prof) { printf("calloc ret null.\n"); goto free_out; } paggr_prof->ent_lst = (o_ent*)calloc(sizeof(o_ent)*2048,1); if(!paggr_prof->ent_lst) { printf("calloc ret null.\n"); free(paggr_prof); goto free_out; } aggr_many_profiles(stopOutput, stopProcNum, 2048, paggr_prof); paggr_prof->pid = 0; *aggrprofs = (ktau_output*)calloc(sizeof(ktau_output),1); (*aggrprofs)->ent_lst = (o_ent*)calloc(sizeof(o_ent)*2048,1); return ktau_diff_profiles(paggr_start_prof, 1, paggr_prof, 1, aggrprofs); }//to make gcc 4.1 happy! free_out: return -1; } int TauKtau::DumpKProfileTWO(int outSize, ktau_output* diffOutput, char* tag) { int i=0,j=0; char output_path[OUTPUT_NAME_SIZE]; o_ent *ptr; unsigned int cur_index = 0; unsigned int user_ev_counter = 0; unsigned int templ_fun_counter = 0; if((outSizeTWO <= 0)) { // || (stopSizeTWO <= 0) || (startSizeTWO <= 0)) { return -1; } /* ktau_output* tmp_diffOutput = diffOutput; diffOutput = diffOutputTWO; */ /* int tmp_outSize = outSize; outSize = outSizeTWO; int tmp_startSize = startSize; startSize = startSizeTWO; int tmp_stopSize = stopSize; stopSize = stopSizeTWO; */ /* * Create output directory ./Kprofile */ sprintf(output_path,"./Kprofile.%d.%d.%s", RtsLayer::myNode(), RtsLayer::myThread(), tag); if(mkdir(output_path,777) == -1){ perror("TauKtau::DumpKProfile: mkdir"); if(errno != EEXIST) { //ignore already-exists errors return(-1); } } if(chmod(output_path, S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IWGRP | S_IXGRP | S_IROTH | S_IWOTH | S_IXOTH ) != 0) { perror("TauKtau::DumpKProfile: chmod"); return(-1); } /* * Dumping output to the output file "./Kprofile./profile..0.0" */ // Data format : // %d templated_functions // "%s %s" %ld %G %G // funcname type numcalls Excl Incl // %d aggregates // /* For Each Process */ for(i=0;isize; j++){ ptr = (((diffOutput)+i)->ent_lst)+j; if(ptr->index < 300 || ptr->index > 399){ templ_fun_counter++; }else{ user_ev_counter++; } } int context = 0; if((diffOutput+i)->pid == ThisKtauOutputInfo.pid) { context = 1; } sprintf(output_path,"./Kprofile.%d.%d.%s/profile.%u.0.%d",RtsLayer::myNode(),RtsLayer::myThread(), tag, (diffOutput+i)->pid, context); ofstream fs_output (output_path , ios::out); if(!fs_output.is_open()){ cout << "Error opening file: " << output_path << "\n"; return(-1); } /* OUTPUT: Templated function */ fs_output << templ_fun_counter << " templated_functions" << endl; fs_output << "# Name Calls Subrs Excl Incl ProfileCalls" << endl; for(j=0;j < (diffOutput+i)->size; j++){ ptr = (((diffOutput)+i)->ent_lst)+j; string& func_name = KtauSym.MapSym(ptr->entry.addr); if(ptr->index < 300 || ptr->index > 399){ fs_output << "\"" << func_name << "()\" " //Name << ptr->entry.data.timer.count << " " //Calls << 0 << " " //Subrs << (double)ptr->entry.data.timer.excl/KTauGetMHz() //Excl //<< (double)ptr->entry.data.timer.excl //Excl << " " << (double)ptr->entry.data.timer.incl/KTauGetMHz() //Incl //<< (double)ptr->entry.data.timer.incl //Incl << " " << 0 << " "; //ProfileCalls if(strstr(func_name.c_str(), "schedule")){ fs_output << "GROUP=\"TAU_KERNEL_MERGE | KTAU_SCHEDULE\"" << endl; //}else if(!strcmp("__run_timers",func_name.c_str())){ // fs_output << "GROUP=\"TAU_KERNEL_MERGE | KTAU_RUN_TIMERS\"" << endl; }else if(strstr(func_name.c_str(), "page_fault")){ fs_output << "GROUP=\"TAU_KERNEL_MERGE | KTAU_EXCEPTION\"" << endl; }else if(strstr(func_name.c_str(), "IRQ")){ fs_output << "GROUP=\"TAU_KERNEL_MERGE | KTAU_IRQ\"" << endl; }else if(strstr(func_name.c_str(), "run_timers")){ fs_output << "GROUP=\"TAU_KERNEL_MERGE | KTAU_BH\"" << endl; }else if(strstr(func_name.c_str(), "workqueue")){ fs_output << "GROUP=\"TAU_KERNEL_MERGE | KTAU_BH\"" << endl; }else if(strstr(func_name.c_str(), "tasklet")){ fs_output << "GROUP=\"TAU_KERNEL_MERGE | KTAU_BH\"" << endl; //}else if(!strcmp("__do_softirq",func_name.c_str())){ // fs_output << "GROUP=\"TAU_KERNEL_MERGE | KTAU_DO_SOFTIRQ\"" << endl; }else if(strstr(func_name.c_str(), "softirq")){ fs_output << "GROUP=\"TAU_KERNEL_MERGE | KTAU_BH\"" << endl; }else if(strstr(func_name.c_str(), "sys_")){ if(strstr(func_name.c_str(), "sock")){ fs_output << "GROUP=\"TAU_KERNEL_MERGE | KTAU_SYSCALL | KTAU_SOCK\"" << endl; } else if(strstr(func_name.c_str(), "read")){ fs_output << "GROUP=\"TAU_KERNEL_MERGE | KTAU_SYSCALL | KTAU_IO\"" << endl; } else if(strstr(func_name.c_str(), "write")){ fs_output << "GROUP=\"TAU_KERNEL_MERGE | KTAU_SYSCALL | KTAU_IO\"" << endl; } else if(strstr(func_name.c_str(), "send")){ fs_output << "GROUP=\"TAU_KERNEL_MERGE | KTAU_SYSCALL | KTAU_IO\"" << endl; } else if(strstr(func_name.c_str(), "recv")){ fs_output << "GROUP=\"TAU_KERNEL_MERGE | KTAU_SYSCALL | KTAU_IO\"" << endl; } else { fs_output << "GROUP=\"TAU_KERNEL_MERGE | KTAU_SYSCALL\"" << endl; } }else if(strstr(func_name.c_str(), "tcp")){ fs_output << "GROUP=\"TAU_KERNEL_MERGE | KTAU_TCP\"" << endl; }else if(strstr(func_name.c_str(), "icmp")){ fs_output << "GROUP=\"TAU_KERNEL_MERGE | KTAU_ICMP\"" << endl; }else if(strstr(func_name.c_str(), "sock")){ fs_output << "GROUP=\"TAU_KERNEL_MERGE | KTAU_SOCK\"" << endl; }else{ fs_output << "GROUP=\"TAU_KERNEL_MERGE | KTAU_DEFAULT\"" << endl; } } } /* OUTPUT: Aggregates*/ fs_output << 0 << " aggregates" << endl; /* OUTPUT: User-events*/ fs_output << user_ev_counter << " userevents" << endl; fs_output << "# eventname numevents max min mean sumsqr"<< endl; for(j=0;j < (diffOutput+i)->size; j++){ ptr = (((diffOutput)+i)->ent_lst)+j; string& ev_name = KtauSym.MapSym(ptr->entry.addr); if(ptr->index >= 300 && ptr->index <= 399 ){ if(ptr->entry.data.timer.count != 0){ fs_output << "\"Event_" << ev_name << "()\" " //eventname << ptr->entry.data.timer.count << " " //numevents << 1 << " " //max << 1 << " " //min << 1 << " " //mean << 1 << " " //sumsqr << endl; }else{ fs_output << "\"Event_" << ev_name << "()\" " //eventname << ptr->entry.data.timer.count << " " //numevents << 0 << " " //max << 0 << " " //min << 0 << " " //mean << 0 << " " //sumsqr << endl; } } } fs_output.close(); } /* diffOutput = tmp_diffOutput; startSize = tmp_startSize; stopSize = tmp_stopSize; outSize = tmp_outSize; */ return 0; } /*----------------------------- PRIVATE -------------------------------*/ /* * Function : TauKtau::DumpKprofile * Description : Dump the profile to Kprofile./ */ int TauKtau::DumpKProfile(void) { int i=0,j=0; char output_path[OUTPUT_NAME_SIZE]; o_ent *ptr; unsigned int cur_index = 0; unsigned int user_ev_counter = 0; unsigned int templ_fun_counter = 0; if((outSize <= 0) || (stopSize <= 0) || (startSize <= 0)) { return -1; } /* * Create output directory ./Kprofile */ sprintf(output_path,"./Kprofile.%d.%d", RtsLayer::myNode(), RtsLayer::myThread()); if(mkdir(output_path,777) == -1){ perror("TauKtau::DumpKProfile: mkdir"); if(errno != EEXIST) { //ignore already-exists errors return(-1); } } if(chmod(output_path, S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IWGRP | S_IXGRP | S_IROTH | S_IWOTH | S_IXOTH ) != 0) { perror("TauKtau::DumpKProfile: chmod"); return(-1); } /* * Dumping output to the output file "./Kprofile./profile..0.0" */ // Data format : // %d templated_functions // "%s %s" %ld %G %G // funcname type numcalls Excl Incl // %d aggregates // /* For Each Process */ for(i=0;isize; j++){ ptr = (((diffOutput)+i)->ent_lst)+j; if(ptr->index < 300 || ptr->index > 399){ templ_fun_counter++; }else{ user_ev_counter++; } } int context = 0; if((diffOutput+i)->pid == ThisKtauOutputInfo.pid) { context = 1; } sprintf(output_path,"./Kprofile.%d.%d/profile.%u.0.%d",RtsLayer::myNode(),RtsLayer::myThread(),(diffOutput+i)->pid, context); ofstream fs_output (output_path , ios::out); if(!fs_output.is_open()){ cout << "Error opening file: " << output_path << "\n"; return(-1); } /* OUTPUT: Templated function */ fs_output << templ_fun_counter << " templated_functions" << endl; fs_output << "# Name Calls Subrs Excl Incl ProfileCalls" << endl; for(j=0;j < (diffOutput+i)->size; j++){ ptr = (((diffOutput)+i)->ent_lst)+j; string& func_name = KtauSym.MapSym(ptr->entry.addr); if(ptr->index < 300 || ptr->index > 399){ fs_output << "\"" << func_name << "()\" " //Name << ptr->entry.data.timer.count << " " //Calls << 0 << " " //Subrs << (double)ptr->entry.data.timer.excl/KTauGetMHz() //Excl //<< (double)ptr->entry.data.timer.excl //Excl << " " << (double)ptr->entry.data.timer.incl/KTauGetMHz() //Incl //<< (double)ptr->entry.data.timer.incl //Incl << " " << 0 << " "; //ProfileCalls if(strstr(func_name.c_str(), "schedule")){ fs_output << "GROUP=\"TAU_KERNEL_MERGE | KTAU_SCHEDULE\"" << endl; //}else if(!strcmp("__run_timers",func_name.c_str())){ // fs_output << "GROUP=\"TAU_KERNEL_MERGE | KTAU_RUN_TIMERS\"" << endl; }else if(strstr(func_name.c_str(), "page_fault")){ fs_output << "GROUP=\"TAU_KERNEL_MERGE | KTAU_EXCEPTION\"" << endl; }else if(strstr(func_name.c_str(), "IRQ")){ fs_output << "GROUP=\"TAU_KERNEL_MERGE | KTAU_IRQ\"" << endl; }else if(strstr(func_name.c_str(), "run_timers")){ fs_output << "GROUP=\"TAU_KERNEL_MERGE | KTAU_BH\"" << endl; }else if(strstr(func_name.c_str(), "workqueue")){ fs_output << "GROUP=\"TAU_KERNEL_MERGE | KTAU_BH\"" << endl; }else if(strstr(func_name.c_str(), "tasklet")){ fs_output << "GROUP=\"TAU_KERNEL_MERGE | KTAU_BH\"" << endl; //}else if(!strcmp("__do_softirq",func_name.c_str())){ // fs_output << "GROUP=\"TAU_KERNEL_MERGE | KTAU_DO_SOFTIRQ\"" << endl; }else if(strstr(func_name.c_str(), "softirq")){ fs_output << "GROUP=\"TAU_KERNEL_MERGE | KTAU_BH\"" << endl; }else if(strstr(func_name.c_str(), "sys_")){ if(strstr(func_name.c_str(), "sock")){ fs_output << "GROUP=\"TAU_KERNEL_MERGE | KTAU_SYSCALL | KTAU_SOCK\"" << endl; } else if(strstr(func_name.c_str(), "read")){ fs_output << "GROUP=\"TAU_KERNEL_MERGE | KTAU_SYSCALL | KTAU_IO\"" << endl; } else if(strstr(func_name.c_str(), "write")){ fs_output << "GROUP=\"TAU_KERNEL_MERGE | KTAU_SYSCALL | KTAU_IO\"" << endl; } else if(strstr(func_name.c_str(), "send")){ fs_output << "GROUP=\"TAU_KERNEL_MERGE | KTAU_SYSCALL | KTAU_IO\"" << endl; } else if(strstr(func_name.c_str(), "recv")){ fs_output << "GROUP=\"TAU_KERNEL_MERGE | KTAU_SYSCALL | KTAU_IO\"" << endl; } else { fs_output << "GROUP=\"TAU_KERNEL_MERGE | KTAU_SYSCALL\"" << endl; } }else if(strstr(func_name.c_str(), "tcp")){ fs_output << "GROUP=\"TAU_KERNEL_MERGE | KTAU_TCP\"" << endl; }else if(strstr(func_name.c_str(), "icmp")){ fs_output << "GROUP=\"TAU_KERNEL_MERGE | KTAU_ICMP\"" << endl; }else if(strstr(func_name.c_str(), "sock")){ fs_output << "GROUP=\"TAU_KERNEL_MERGE | KTAU_SOCK\"" << endl; }else{ fs_output << "GROUP=\"TAU_KERNEL_MERGE | KTAU_DEFAULT\"" << endl; } } } /* OUTPUT: Aggregates*/ fs_output << 0 << " aggregates" << endl; /* OUTPUT: User-events*/ fs_output << user_ev_counter << " userevents" << endl; fs_output << "# eventname numevents max min mean sumsqr"<< endl; for(j=0;j < (diffOutput+i)->size; j++){ ptr = (((diffOutput)+i)->ent_lst)+j; string& ev_name = KtauSym.MapSym(ptr->entry.addr); if(ptr->index >= 300 && ptr->index <= 399 ){ if(ptr->entry.data.timer.count != 0){ fs_output << "\"Event_" << ev_name << "()\" " //eventname << ptr->entry.data.timer.count << " " //numevents << 1 << " " //max << 1 << " " //min << 1 << " " //mean << 1 << " " //sumsqr << endl; }else{ fs_output << "\"Event_" << ev_name << "()\" " //eventname << ptr->entry.data.timer.count << " " //numevents << 0 << " " //max << 0 << " " //min << 0 << " " //mean << 0 << " " //sumsqr << endl; } } } fs_output.close(); } return 0; } /*----------------------------- PRIVATE -------------------------------*/ /* * Function : diff_h_ent * Description : Diffing h_ent for each o_ent */ int diff_h_ent(o_ent *o1, o_ent *o2){ /* * Comparing h_ent of KTAU_TIMER type. */ if(o1->entry.type == o2->entry.type && o1->entry.type == KTAU_TIMER){ if(o1->entry.addr == o2->entry.addr){ o2->entry.data.timer.count -= o1->entry.data.timer.count; o2->entry.data.timer.incl -= o1->entry.data.timer.incl; o2->entry.data.timer.excl -= o1->entry.data.timer.excl; return(0); } } return(-1); } /* * Function : diff_ktau_output * Description : Diffing stop and start of each ktau_output and * store the result in out. */ int diff_ktau_output(ktau_output *start, ktau_output *stop, ktau_output *out){ int i,j,k; o_ent *st; o_ent *sp; out->ent_lst = (o_ent*)malloc(sizeof(o_ent)*stop->size); /* * For each o_ent, we have to check the hash-index. If the index * doesn't exist in out, then just diff with 0. * */ for(i=0,j=0,k=0; isize || jsize;){ st=(start->ent_lst+i); sp=(stop->ent_lst+j); if(st->index == sp->index){ if(diff_h_ent(st,sp)){ return(-1); } memcpy(((out->ent_lst)+k), ((stop->ent_lst)+j), sizeof(o_ent)); i++;j++;k++; }else{ memcpy(((out->ent_lst)+k), ((stop->ent_lst)+j), sizeof(o_ent)); j++;k++; } } return(k); } int TauKtau::DiffKProfileTWO(char* startB, char* stopB, int startSz, int stopSz, ktau_output** pdiffOut) { int i,j,k,diff_count; ktau_output *startOut; ktau_output *stopOut; long startProcNum = 0; long stopProcNum = 0; if((startB==NULL) || (stopB==NULL) || (startSz<=0) || (stopSz<=0)) { return -1; } startProcNum = unpack_bindata(KTAU_TYPE_PROFILE, startB, startSz, &startOut); if(startProcNum < 0) { return -1; } stopProcNum = unpack_bindata(KTAU_TYPE_PROFILE, stopB, stopSz, &stopOut); if(stopProcNum < 0) { return -1; } return ktau_diff_profiles(startOut, startProcNum, stopOut, stopProcNum, pdiffOut); } /* * Function : TauKtau::DiffKProfile * Description : Diffing profile for each matched pid in startOutput and * stopOutput. If no match is found, discard the pid. * Note : Might want a different scheme */ int TauKtau::DiffKProfile(void) { int i,j,k,diff_count; ktau_output *startOutput; ktau_output *stopOutput; long startProcNum = 0; long stopProcNum = 0; if((startBuf==NULL) || (stopBuf==NULL) || (startSize<=0) || (stopSize<=0)) { return -1; } startProcNum = unpack_bindata(KTAU_TYPE_PROFILE, startBuf, startSize, &startOutput); if(startProcNum < 0) { return -1; } stopProcNum = unpack_bindata(KTAU_TYPE_PROFILE, stopBuf, stopSize, &stopOutput); if(stopProcNum < 0) { return -1; } if(DEBUG)printf("DiffKProfile: startProcNum = %u\n",startProcNum); if(DEBUG)printf("DiffKProfile: stopProcNum = %u\n",stopProcNum); diffOutput = (ktau_output*)malloc(sizeof(ktau_output)*maxof(startProcNum,stopProcNum)); /* * For each ktau_output, we have to check pid if it is the same. * Otherwise, we just ignore that one. */ for(i=0,j=0,k=0; ipid == (stopOutput+j)->pid){ if(DEBUG)printf("DiffKProfile: Diffing pid %d\n",(startOutput+i)->pid); if(DEBUG)printf("DiffKProfile: start size = %d\n",(startOutput+i)->size); if(DEBUG)printf("DiffKProfile: stop size = %d\n",(stopOutput+i)->size); diff_count = diff_ktau_output((startOutput+i),(stopOutput+j),((diffOutput)+k)); (diffOutput+k)->size = diff_count; (diffOutput+k)->pid = (startOutput+i)->pid; if((diffOutput+k)->pid == ThisKtauOutputInfo.pid){ /* Keep track of information of ktau_output * for this pid */ for(int x=0;x < (diffOutput+k)->size; x++){ o_ent *ptr = (((diffOutput)+k)->ent_lst)+x; if(ptr->index < 300 || ptr->index > 399){ ThisKtauOutputInfo.templ_fun_counter++; }else{ ThisKtauOutputInfo.user_ev_counter++; } } } i++;j++;k++; }else if((startOutput+i)->pid < (stopOutput+j)->pid){ if(DEBUG)printf("DiffKProfile: pid unmatch. Increment start.\n"); diffOutput[k] = startOutput[i]; i++;k++; }else{ if(DEBUG)printf("DiffKProfile: pid unmatch. Increment stop.\n"); diffOutput[k] = stopOutput[j]; j++;k++; } } return(k); } int TauKtau::GetNumKProfileFunc(){ return ThisKtauOutputInfo.templ_fun_counter; } int TauKtau::GetNumKProfileEvent(){ return ThisKtauOutputInfo.user_ev_counter; } int TauKtau::MergingKProfileFunc(FILE* fp){ int i=0,j=0,k=0; unsigned int cur_index = 0; if(outSize <= 0) { return -1; } for(i=0;ipid){ for(j=0;j < (diffOutput+i)->size; j++){ o_ent* ptr = (((diffOutput)+i)->ent_lst)+j; string& func_name = KtauSym.MapSym(ptr->entry.addr); if(ptr->index < 300 || ptr->index > 399){ fprintf(fp,"\"%s() \" %u %u %g %g %u ", func_name.c_str(), //Name ptr->entry.data.timer.count, //Calls 0, //Subrs (double)(ptr->entry.data.timer.excl)/KTauGetMHz(), //Excl (double)(ptr->entry.data.timer.incl)/KTauGetMHz(), //Incl 0); //ProfileCalls if(strstr(func_name.c_str(),"schedule")){ fprintf(fp, "GROUP=\"TAU_KERNEL_MERGE | KTAU_SCHEDULE\"\n"); //}else if(!strcmp("__run_timers",func_name.c_str())){ // fprintf(fp, "GROUP=\"TAU_KERNEL_MERGE | KTAU_RUN_TIMERS\"\n"); }else if(strstr(func_name.c_str(), "page_fault")){ fprintf(fp, "GROUP=\"TAU_KERNEL_MERGE | KTAU_EXCEPTION\"\n"); }else if(strstr(func_name.c_str(), "IRQ")){ fprintf(fp, "GROUP=\"TAU_KERNEL_MERGE | KTAU_IRQ\"\n"); }else if(strstr(func_name.c_str(), "run_timers")){ fprintf(fp, "GROUP=\"TAU_KERNEL_MERGE | KTAU_BH\"\n"); }else if(strstr(func_name.c_str(), "workqueue")){ fprintf(fp, "GROUP=\"TAU_KERNEL_MERGE | KTAU_BH\"\n"); }else if(strstr(func_name.c_str(), "tasklet")){ fprintf(fp, "GROUP=\"TAU_KERNEL_MERGE | KTAU_BH\"\n"); //}else if(!strcmp("__do_softirq",func_name.c_str())){ // fprintf(fp, "GROUP=\"TAU_KERNEL_MERGE | KTAU_DO_SOFTIRQ\"\n"); }else if(strstr(func_name.c_str(), "softirq")){ fprintf(fp, "GROUP=\"TAU_KERNEL_MERGE | KTAU_BH\"\n"); }else if(strstr(func_name.c_str(), "sys_")){ if(strstr(func_name.c_str(), "sock")){ fprintf(fp, "GROUP=\"TAU_KERNEL_MERGE | KTAU_SYSCALL | KTAU_SOCK\"\n"); } else if(strstr(func_name.c_str(), "read")){ fprintf(fp, "GROUP=\"TAU_KERNEL_MERGE | KTAU_SYSCALL | KTAU_IO\"\n"); } else if(strstr(func_name.c_str(), "write")){ fprintf(fp, "GROUP=\"TAU_KERNEL_MERGE | KTAU_SYSCALL | KTAU_IO\"\n"); } else if(strstr(func_name.c_str(), "send")){ fprintf(fp, "GROUP=\"TAU_KERNEL_MERGE | KTAU_SYSCALL | KTAU_IO\"\n"); } else if(strstr(func_name.c_str(), "recv")){ fprintf(fp, "GROUP=\"TAU_KERNEL_MERGE | KTAU_SYSCALL | KTAU_IO\"\n"); } else { fprintf(fp, "GROUP=\"TAU_KERNEL_MERGE | KTAU_SYSCALL\"\n"); } }else if(strstr(func_name.c_str(), "tcp")){ fprintf(fp, "GROUP=\"TAU_KERNEL_MERGE | KTAU_TCP\"\n"); }else if(strstr(func_name.c_str(), "icmp")){ fprintf(fp, "GROUP=\"TAU_KERNEL_MERGE | KTAU_ICMP\"\n"); }else if(strstr(func_name.c_str(), "sock")){ fprintf(fp, "GROUP=\"TAU_KERNEL_MERGE | KTAU_SOCK\"\n"); }else{ fprintf(fp, "GROUP=\"TAU_KERNEL_MERGE | KTAU_DEFAULT\"\n"); } /*if(!strcmp("schedule",func_name.c_str())){ fprintf(fp,"GROUP=\"KTAU_SCHEDULE\"\n"); }else if(!strcmp("__run_timers",func_name.c_str())){ fprintf(fp,"GROUP=\"KTAU_RUN_TIMERS\"\n"); }else if(!strcmp("__do_softirq",func_name.c_str())){ fprintf(fp,"GROUP=\"KTAU_DO_SOFTIRQ\"\n"); }else{ fprintf(fp,"GROUP=\"KTAU_DEFAULT\"\n"); }*/ } } } } return(0); } int TauKtau::MergingKProfileEvent(FILE* fp){ int i=0,j=0,k=0; unsigned int cur_index = 0; if(outSize <= 0) { return -1; } for(i=0;ipid){ for(j=0;j < (diffOutput+i)->size; j++){ o_ent* ptr = (((diffOutput)+i)->ent_lst)+j; string& ev_name = KtauSym.MapSym(ptr->entry.addr); if(ptr->index >= 300 && ptr->index <= 399) fprintf(fp,"\"Event_%s()\" %u %u %u %u %u\n", ev_name.c_str(), //eventname ptr->entry.data.timer.count, //numevents 1, //max 1, //min 1, //mean 1); //sumsqr } } } return(0); } /*************************************************************************** * $RCSfile: TauKtau.cpp,v $ $Author: anataraj $ * $Revision: 1.6 $ $Date: 2007/04/19 03:21:45 $ ***************************************************************************/ tau-2.16.4/src/Profile/TauLinuxTimers.c000066400000000000000000000020561062343042700176710ustar00rootroot00000000000000 /////////////////////////////////////////////////////////////////////////// // High resolution timers. Compile with gcc under Linux on IA-32/IA-64 systems. /////////////////////////////////////////////////////////////////////////// #ifdef __ia64__ inline unsigned long long getLinuxHighResolutionTscCounter(void) { unsigned long long tmp; __asm__ __volatile__("mov %0=ar.itc" : "=r"(tmp) :: "memory"); return tmp; } #elif __powerpc__ inline unsigned long long getLinuxHighResolutionTscCounter(void) { unsigned long long tmp; unsigned int Low, HighB, HighA; do { asm volatile ("mftbu %0" : "=r"(HighB)); asm volatile ("mftb %0" : "=r"(Low)); asm volatile ("mftbu %0" : "=r"(HighA)); } while (HighB != HighA); tmp = ((unsigned long long)HighA<<32) | ((unsigned long long)Low); return tmp; } #else inline unsigned long long getLinuxHighResolutionTscCounter(void) { unsigned long high, low; __asm__ __volatile__(".byte 0x0f,0x31" : "=a" (low), "=d" (high)); return ((unsigned long long) high << 32) + low; } #endif /* IA64 */ tau-2.16.4/src/Profile/TauMapping.cpp000066400000000000000000000050451062343042700173420ustar00rootroot00000000000000/**************************************************************************** ** TAU Portable Profiling Package ** ** http://www.cs.uoregon.edu/research/tau ** ***************************************************************************** ** Copyright 1997 ** ** Department of Computer and Information Science, University of Oregon ** ** Advanced Computing Laboratory, Los Alamos National Laboratory ** ****************************************************************************/ /*************************************************************************** ** File : TauMapping.cpp ** ** Description : TAU Profiling Package ** ** Author : Sameer Shende ** ** Contact : sameer@cs.uoregon.edu sameer@acl.lanl.gov ** ** Flags : Compile with ** ** -DPROFILING_ON to enable profiling (ESSENTIAL) ** ** -DPROFILE_STATS for Std. Deviation of Excl Time ** ** -DSGI_HW_COUNTERS for using SGI counters ** ** -DPROFILE_CALLS for trace of each invocation ** ** -DSGI_TIMERS for SGI fast nanosecs timer ** ** -DTULIP_TIMERS for non-sgi Platform ** ** -DPOOMA_STDSTL for using STD STL in POOMA src ** ** -DPOOMA_TFLOP for Intel Teraflop at SNL/NM ** ** -DPOOMA_KAI for KCC compiler ** ** -DDEBUG_PROF for internal debugging messages ** ** -DPROFILE_CALLSTACK to enable callstack traces ** ** Documentation : See http://www.cs.uoregon.edu/research/tau ** ***************************************************************************/ ////////////////////////////////////////////////////////////////////// // Include Files ////////////////////////////////////////////////////////////////////// #include "Profile/Profiler.h" #ifdef TAU_WINDOWS using namespace std; #endif struct lTauGroup { bool operator()(const TauGroup_t s1, const TauGroup_t s2) const { return s1 < s2; } }; ////////////////////////////////////////////////////////////////////// // This global variable is used to keep the function information for // mapping. It is passed to the Profiler. It takes the key and returns // the FunctionInfo * pointer that contains the id of the function // being mapped. The key is currently in the form of a profile group. ////////////////////////////////////////////////////////////////////// FunctionInfo *& TheTauMapFI(TauGroup_t Pgroup ) { //static FunctionInfo *TauMapFI = (FunctionInfo *) NULL; static map TauMapGroups; return TauMapGroups[Pgroup]; } // EOF tau-2.16.4/src/Profile/TauMemory.cpp000066400000000000000000000407701062343042700172230ustar00rootroot00000000000000/**************************************************************************** ** TAU Portable Profiling Package ** ** http://www.cs.uoregon.edu/research/paracomp/tau ** ***************************************************************************** ** Copyright 2004 ** ** Department of Computer and Information Science, University of Oregon ** ** Advanced Computing Laboratory, Los Alamos National Laboratory ** ****************************************************************************/ /*************************************************************************** ** File : TauMemory.cpp ** ** Description : TAU Profiling Package ** ** Author : Sameer Shende ** ** Contact : sameer@cs.uoregon.edu sameer@acl.lanl.gov ** ** Documentation : See http://www.cs.uoregon.edu/research/tau ** ***************************************************************************/ //#define DEBUGPROF 1 ////////////////////////////////////////////////////////////////////// // Include Files ////////////////////////////////////////////////////////////////////// #include #include #if (defined(__APPLE_CC__) || defined(TAU_APPLE_XLC)) #include #else #ifdef TAU_FREEBSD #include #else /* TAU_FREEBSD */ #include #endif /* TAU_FREEBSD */ #endif /* apple */ #ifdef TAU_DOT_H_LESS_HEADERS #include using namespace std; #else /* TAU_DOT_H_LESS_HEADERS */ #include #endif /* TAU_DOT_H_LESS_HEADERS */ #if (defined(__QK_USER__) || defined(__LIBCATAMOUNT__ )) #ifndef TAU_CATAMOUNT #define TAU_CATAMOUNT #endif /* TAU_CATAMOUNT */ #include #endif /* __QK_USER__ || __LIBCATAMOUNT__ */ ////////////////////////////////////////////////////////////////////// // Class for building the map ////////////////////////////////////////////////////////////////////// struct Tault2Longs { bool operator() (const long *l1, const long *l2) const { /* each element has two longs, char * and line no. */ if (l1[0] != l2[0]) return (l1[0] < l2[0]); return l1[1] < l2[1]; } }; struct TaultLong { bool operator() (const long l1, const long l2) const { return l1 < l2; } }; #define TAU_USER_EVENT_TYPE TauContextUserEvent //#define TAU_USER_EVENT_TYPE TauUserEvent //#define TAU_MALLOC_MAP_TYPE long*, TAU_USER_EVENT_TYPE *, Tault2Longs #define TAU_MALLOC_MAP_TYPE pair, TauUserEvent *, less > #define TAU_MEMORY_LEAK_MAP_TYPE long, TauUserEvent *, TaultLong ////////////////////////////////////////////////////////////////////// map& TheTauMallocMap(void) { static map mallocmap; return mallocmap; } ////////////////////////////////////////////////////////////////////// // We store the leak detected events here ////////////////////////////////////////////////////////////////////// map& TheTauMemoryLeakMap(void) { static map leakmap; return leakmap; } ////////////////////////////////////////////////////////////////////// // This routine ////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////// unsigned long Tau_hash(unsigned char *str) { unsigned long hash = 5381; int c; while (c = *str++) hash = ((hash << 5) + hash) + c; /* hash * 33 + c */ return hash; } ////////////////////////////////////////////////////////////////////// // ////////////////////////////////////////////////////////////////////// #define TAU_POINTER_SIZE_MAP_TYPE long, pair, TaultLong ////////////////////////////////////////////////////////////////////// // This map stores the memory allocated and its associations ////////////////////////////////////////////////////////////////////// multimap& TheTauPointerSizeMap(void) { static multimap pointermap; return pointermap; } ////////////////////////////////////////////////////////////////////// // Tau_malloc_before creates/access the event associated with tracking // memory allocation for the specified line and file. ////////////////////////////////////////////////////////////////////// TAU_USER_EVENT_TYPE* Tau_malloc_before(const char *file, int line, size_t size) { /* we use pair (line, file) as the key to index the mallocmap */ unsigned long file_hash = Tau_hash((unsigned char *)file); #ifdef DEBUGPROF printf("C++: Tau_malloc_before: file = %s, ptr=%lx, long file = %uld\n", file, file, file_hash); #endif /* DEBUGPROF */ map::iterator it = TheTauMallocMap().find(pair(line,file_hash)); TAU_USER_EVENT_TYPE *e ; if (it == TheTauMallocMap().end()) { /* Couldn't find it */ char *s = new char [strlen(file)+32]; sprintf(s, "malloc size ",file, line); #ifdef DEBUGPROF printf("C++: Tau_malloc: creating new user event %s\n", s); #endif /* DEBUGPROF */ e = new TAU_USER_EVENT_TYPE(s); e->TriggerEvent(size); TheTauMallocMap()[pair(line, file_hash)] = e->contextevent; /* do not store the TauContextUserEvent, but the UserEvent that represents the full name at the point of execution of trigger. The former is just a vessel for storing the last stored value of the context event. The latter is the actual context event (A=>B=>foo) that it triggered */ delete[] (s); } else { /* found it */ TauUserEvent *foundevt; #ifdef DEBUGPROF printf("Found it! Name = %s\n", (*it).second->GetEventName()); #endif /* DEBUGPROF */ foundevt = (*it).second; foundevt->ctxevt->TriggerEvent(size); e = foundevt->ctxevt; } #ifdef DEBUGPROF printf("C++: Tau_malloc: %s:%d:%d\n", file, line, size); #endif /* DEBUGPROF */ return e; /* the event that is created in this routine */ } ////////////////////////////////////////////////////////////////////// // Tau_malloc_after associates the event and size with the address allocated ////////////////////////////////////////////////////////////////////// void Tau_malloc_after(TauVoidPointer ptr, size_t size, TAU_USER_EVENT_TYPE *e) { #ifdef TAU_WINDOWS char *p1 = (char*) (void*)ptr; #else char *p1 = ptr; #endif /* store the size of memory allocated with the address of the pointer */ //TheTauPointerSizeMap()[(long)p1] = pair(size, (long) e); TheTauPointerSizeMap().insert(pair >((long)p1, pair(size, (long) e->contextevent))); return; } ////////////////////////////////////////////////////////////////////// // Tau_malloc calls the before and after routines and allocates memory ////////////////////////////////////////////////////////////////////// TauVoidPointer Tau_malloc(const char *file, int line, size_t size) { TAU_USER_EVENT_TYPE *e; /* We get the event that is created */ e = Tau_malloc_before(file, line, size); TauVoidPointer ptr = malloc(size); #ifdef DEBUGPROF printf("TAU_MALLOC<%d>: %s:%d ptr = %p size = %d\n", RtsLayer::myNode(), file, line, ptr, size); #endif /* DEBUGPROF */ /* associate the event generated and its size with the address of memory * allocated by malloc. This is used later for memory leak detection and * to evaluate the size of the memory freed in the Tau_free(ptr) routine. */ Tau_malloc_after(ptr, size, e); return ptr; /* what was allocated */ } ////////////////////////////////////////////////////////////////////// // Tau_track_memory_allocation does everything that Tau_malloc does except // allocate memory ////////////////////////////////////////////////////////////////////// void Tau_track_memory_allocation(const char *file, int line, size_t size, TauVoidPointer ptr) { //printf("allocation: %s:%d, ptr = %lx\n", file, line, ptr); #ifdef DEBUGPROF printf("allocation: %d, ptr = %lx\n", line, ptr); #endif /* DEBUGPROF */ Tau_malloc_after(ptr, size, Tau_malloc_before(file, line, size)); } ////////////////////////////////////////////////////////////////////// // Tau_new returns the expression (new[] foo) and does everything that // Tau_track_memory_allocation does ////////////////////////////////////////////////////////////////////// TauVoidPointer Tau_new(const char *file, int line, size_t size, TauVoidPointer ptr) { /* the memory is already allocated by the time we see this ptr */ Tau_track_memory_allocation(file, line, size, ptr); return ptr; } ////////////////////////////////////////////////////////////////////// // TauGetMemoryAllocatedSize returns the size of the pointer p ////////////////////////////////////////////////////////////////////// size_t TauGetMemoryAllocatedSize(TauVoidPointer p) { pair result; #ifdef TAU_WINDOWS char *p1 = (char*) (void*)p; #else char *p1 = p; #endif multimap::iterator it = TheTauPointerSizeMap().find((long)p1); if (it == TheTauPointerSizeMap().end()) return 0; // don't know the size else { result = (*it).second; /* We need to delete this entry in the free map */ TheTauPointerSizeMap().erase(it); return result.first; /* or size_t, the first entry of the pair */ } } ////////////////////////////////////////////////////////////////////// // Tau_free_before does everything prior to free'ing the memory ////////////////////////////////////////////////////////////////////// void Tau_free_before(const char *file, int line, TauVoidPointer p) { /* We've set the key */ unsigned long file_hash = Tau_hash((unsigned char *)file); #ifdef DEBUGPROF printf("C++: Tau_free_before: file = %s, ptr=%lx, long file = %uld\n", file, file, file_hash); #endif /* DEBUGPROF */ map::iterator it = TheTauMallocMap().find(pair(line,file_hash)); TAU_USER_EVENT_TYPE *e; size_t sz = TauGetMemoryAllocatedSize(p); if (it == TheTauMallocMap().end()) { /* Couldn't find it */ char *s = new char [strlen(file)+32]; sprintf(s, "free size ",file, line); #ifdef DEBUGPROF printf("C++: Tau_free: creating new user event %s\n", s); #endif /* DEBUGPROF */ e = new TAU_USER_EVENT_TYPE(s); e->TriggerEvent(sz); //mallocmap.insert(map::value_type(pair(line,file_hash), e)); TheTauMallocMap()[pair(line, file_hash)] = e->contextevent; delete[] (s); } else { /* found it */ TauUserEvent *foundevt; #ifdef DEBUGPROF printf("Found it! Name = %s\n", (*it).second->GetEventName()); #endif /* DEBUGPROF */ foundevt = (*it).second; foundevt->ctxevt->TriggerEvent(sz); e = foundevt->ctxevt; } #ifdef DEBUGPROF printf("C++: Tau_free: %s:%d\n", file, line); #endif /* DEBUGPROF */ } ////////////////////////////////////////////////////////////////////// // Tau_free calls Tau_free_before and free's the memory allocated ////////////////////////////////////////////////////////////////////// void Tau_free(const char *file, int line, TauVoidPointer p) { Tau_free_before(file, line, p); #ifdef DEBUGPROF printf("TAU_FREE <%d>: %s:%d ptr = %p\n", RtsLayer::myNode(), file, line, p); #endif /* DEBUGPROF */ /* and actually free the memory */ free(p); } ////////////////////////////////////////////////////////////////////// // Tau_realloc calls free_before, realloc and memory allocation tracking routine ////////////////////////////////////////////////////////////////////// void* Tau_realloc(const char *file, int line, TauVoidPointer p, size_t size) { Tau_free_before(file, line, p); void *retval = realloc(p, size); Tau_track_memory_allocation(file, line, size, retval); return retval; } ////////////////////////////////////////////////////////////////////// // Tau_track_memory_deallocation does everything that Tau_free does except // de-allocate memory ////////////////////////////////////////////////////////////////////// void Tau_track_memory_deallocation(const char *file, int line, TauVoidPointer ptr) { //printf("DEallocation: %s:%d, ptr = %lx\n", file, line, ptr); #ifdef DEBUGPROF printf("DEallocation: %d, ptr = %lx\n", line, ptr); #endif /* DEBUGPROF */ Tau_free_before(file, line, ptr); } ////////////////////////////////////////////////////////////////////// // TauDetectMemoryLeaks iterates over the list of pointers and checks // which blocks have not been freed. This is called at the very end of // the program from Profiler::StoreData ////////////////////////////////////////////////////////////////////// int TauDetectMemoryLeaks(void) { if (TheTauPointerSizeMap().empty()) return 0; /* do nothing */ multimap::iterator it; for( it = TheTauPointerSizeMap().begin(); it != TheTauPointerSizeMap().end(); it++) { pair leak = (*it).second; size_t sz = leak.first; TauUserEvent *e = (TauUserEvent *) leak.second; #ifdef DEBUGPROF printf("Found leak for block of memory of size %d from memory allocated at:%s\n", sz, e->GetEventName()); #endif /* DEBUGPROF */ /* Have we seen e before? */ map::iterator it = TheTauMemoryLeakMap().find((long) e); if (it == TheTauMemoryLeakMap().end()) { /* didn't find it! */ string s (string("MEMORY LEAK! ")+e->GetEventName()); TauUserEvent *leakevent = new TauUserEvent(s.c_str()); TheTauMemoryLeakMap()[(long)e] = leakevent; leakevent->TriggerEvent(sz); } else { (*it).second->TriggerEvent(sz); } /* Instead of making a new leakevent each time, we should use another * map that maps the event e with the newevent and triggers it multiple times */ } return 1; } ////////////////////////////////////////////////////////////////////// // Tau_malloc for C++ has file and line information ////////////////////////////////////////////////////////////////////// extern "C" void *Tau_malloc_C( const char *file, int line, size_t size) { #ifdef DEBUGPROF printf("C: Tau_malloc: %s:%d:%d\n", file, line, size); #endif /* DEBUGPROF */ return (void *) Tau_malloc(file, line, size); } ////////////////////////////////////////////////////////////////////// // Tau_free for C++ has file and line information ////////////////////////////////////////////////////////////////////// extern "C" void Tau_free_C(const char *file, int line, void *p) { #ifdef DEBUGPROF printf("C: Tau_free: %s:%d\n", file, line); #endif /* DEBUGPROF */ Tau_free(file, line, p); } ////////////////////////////////////////////////////////////////////// // Tau_realloc for C++ has file and line information ////////////////////////////////////////////////////////////////////// extern "C" void * Tau_realloc_C(const char *file, int line, void *p, size_t size) { #ifdef DEBUGPROF printf("C: Tau_realloc: %s:%d\n", file, line); #endif /* DEBUGPROF */ /* realloc acts like a free and malloc */ return (void *) Tau_realloc(file, line, p, size); } ////////////////////////////////////////////////////////////////////// // The amount of memory available for use (in MB) ////////////////////////////////////////////////////////////////////// #define TAU_BLOCK_COUNT 1024 /* Catamount has a heap_info call that returns the available memory headroom */ #ifdef TAU_CATAMOUNT int TauGetFreeMemory(void) { size_t fragments; unsigned long total_free, largest_free, total_used; if (heap_info(&fragments, &total_free, &largest_free, &total_used) == 0) { /* return free memory in MB */ return (int) (total_free/(1024*1024)); } return 0; /* if it didn't work */ } #else /* TAU_CATAMOUNT */ int TauGetFreeMemory(void) { char* blocks[TAU_BLOCK_COUNT]; char* ptr; int i,j; int freemem = 0; int factor = 1; i = 0; /* initialize it */ while (1) { ptr = (char *) malloc(factor*1024*1024); /* 1MB chunk */ if (ptr && i < TAU_BLOCK_COUNT) { /* so we don't go over the size of the blocks */ blocks[i] = ptr; i++; /* increment the no. of elements in the blocks array */ freemem += factor; /* assign the MB allocated */ factor *= 2; /* try with twice as much the next time */ } else { if (factor == 1) break; /* out of the loop */ factor = 1; /* try with a smaller chunk size */ } } for (j=0; j < i; j++) free(blocks[j]); return freemem; } #endif /* TAU_CATAMOUNT */ /*************************************************************************** * $RCSfile: TauMemory.cpp,v $ $Author: sameer $ * $Revision: 1.25 $ $Date: 2007/04/01 01:25:43 $ * TAU_VERSION_ID: $Id: TauMemory.cpp,v 1.25 2007/04/01 01:25:43 sameer Exp $ ***************************************************************************/ tau-2.16.4/src/Profile/TauMpi.c000066400000000000000000002136571062343042700161460ustar00rootroot00000000000000#include #include #include #include #define TAU_MAX_REQUESTS 4096 #ifdef TAU_SYNCHRONIZE_CLOCKS extern void TauSyncClocks(int rank, int size); extern void TauSyncFinalClocks(int rank, int size); #endif /* This file uses the MPI Profiling Interface with TAU instrumentation. It has been adopted from the MPE Profiling interface wrapper generator wrappergen that is part of the MPICH distribution. It differs from MPE in where the calls are placed. For e.g., in TAU a send is traced before the MPI_Send and a receive after MPI_Recv. This avoids -ve time problems that can happen on a uniprocessor if a receive is traced before the send is traced. This file was once generated using: % /mpe/profiling/wrappergen/wrappergen -w TauMpi.w -o TauMpi.c */ /* Requests */ #ifndef TAU_NOCOMM #define TAU_TRACK_MSG 1 #endif /* TAU_NOCOMM */ #ifdef TAU_TRACK_MSG typedef struct request_list_ { MPI_Request request; /* SSS request should be a pointer */ int status, size, tag, otherParty; int is_persistent; MPI_Comm comm; struct request_list_ *next; } request_list; #define RQ_SEND 0x1 #define RQ_RECV 0x2 #define RQ_CANCEL 0x4 /* if MPI_Cancel is called on a request, 'or' RQ_CANCEL into status. ** After a Wait* or Test* is called on that request, check for RQ_CANCEL. ** If the bit is set, check with MPI_Test_cancelled before registering ** the send/receive as 'happening'. ** */ #define rq_alloc( head_alloc, newrq ) {\ if (head_alloc) {\ newrq=head_alloc;head_alloc=newrq->next;\ }else{\ newrq = (request_list*) malloc(sizeof( request_list ));\ }} #define rq_remove_at( head, tail, head_alloc, ptr, last ) { \ if (ptr) { \ if (!last) { \ head = ptr->next; \ } else { \ last->next = ptr->next; \ if (tail == ptr) tail = last; \ } \ ptr->next = head_alloc; head_alloc = ptr;}} #define rq_remove( head, tail, head_alloc, rq ) { \ request_list *ptr, *last; \ ptr = head; \ last = 0; \ while (ptr && (ptr->request != rq)) { \ last = ptr; \ ptr = ptr->next; \ } \ rq_remove_at( head, tail, head_alloc, ptr, last );} #define rq_add( head, tail, rq ) { \ if (!head) { \ head = tail = rq; \ } else { \ tail->next = rq; tail = rq; \ }} #define rq_find( head, req, rq ) { \ rq = head; \ while (rq && (rq->request != req)) rq = rq->next; } #define rq_init( head_alloc ) {\ int i; request_list *newrq; head_alloc = 0;\ for (i=0;i<20;i++) {\ newrq = (request_list*) malloc(sizeof( request_list ));\ newrq->next = head_alloc;\ head_alloc = newrq;\ }} #define rq_end( head_alloc ) {\ request_list *rq; while (head_alloc) {\ rq = head_alloc->next;free(head_alloc);head_alloc=rq;}} static request_list *requests_head_0, *requests_tail_0; #endif /* TAU_TRACK_MSG */ static int procid_0; /* This function translates a given rank in a given communicator to the proper rank in MPI_COMM_WORLD */ static int translateRankToWorld(MPI_Comm comm, int rank) { MPI_Group commGroup, worldGroup; int ranks[1], worldranks[1]; if (comm != MPI_COMM_WORLD) { int result; MPI_Comm_compare(comm, MPI_COMM_WORLD, &result); if (result == MPI_IDENT || result == MPI_CONGRUENT) { return rank; } else { ranks[0] = rank; PMPI_Comm_group(MPI_COMM_WORLD, &worldGroup); PMPI_Comm_group(comm, &commGroup); PMPI_Group_translate_ranks(commGroup, 1, ranks, worldGroup, worldranks); return worldranks[0]; } } return rank; } /* MPI PROFILING INTERFACE WRAPPERS BEGIN HERE */ /* Message_prof keeps track of when sends and receives 'happen'. The ** time that each send or receive happens is different for each type of ** send or receive. ** ** Check for MPI_PROC_NULL ** ** definitely a send: ** Before a call to MPI_Send. ** Before a call to MPI_Bsend. ** Before a call to MPI_Ssend. ** Before a call to MPI_Rsend. ** ** ** definitely a receive: ** After a call to MPI_Recv. ** ** definitely a send before and a receive after : ** a call to MPI_Sendrecv ** a call to MPI_Sendrecv_replace ** ** maybe a send, maybe a receive: ** Before a call to MPI_Wait. ** Before a call to MPI_Waitany. ** Before a call to MPI_Waitsome. ** Before a call to MPI_Waitall. ** After a call to MPI_Probe ** maybe neither: ** Before a call to MPI_Test. ** Before a call to MPI_Testany. ** Before a call to MPI_Testsome. ** Before a call to MPI_Testall. ** After a call to MPI_Iprobe ** ** start request for a send: ** After a call to MPI_Isend. ** After a call to MPI_Ibsend. ** After a call to MPI_Issend. ** After a call to MPI_Irsend. ** After a call to MPI_Send_init. ** After a call to MPI_Bsend_init. ** After a call to MPI_Ssend_init. ** After a call to MPI_Rsend_init. ** ** start request for a recv: ** After a call to MPI_Irecv. ** After a call to MPI_Recv_init. ** ** stop watching a request: ** Before a call to MPI_Request_free ** ** mark a request as possible cancelled: ** After a call to MPI_Cancel ** */ extern int tau_totalnodes(int set_or_get, int value); #ifdef TAU_TRACK_MSG void TauProcessRecv ( request, status, note ) MPI_Request request; MPI_Status *status; char *note; { request_list *rq, *last; int otherid, othertag; #ifdef DEBUG int myrank; PMPI_Comm_rank(MPI_COMM_WORLD, &myrank); #endif /* DEBUG */ /* look for request */ rq = requests_head_0; last = 0; /* first request */ while ((rq != NULL) && (rq->request != request)) { #ifdef DEBUG printf("Node %d: Comparing %lx %lx\n", myrank, rq->request, request); #endif /* DEBUG */ last = rq; rq = rq->next; } if (!rq) { #ifdef DEBUG fprintf( stderr, "Node %d: Request not found in '%s'.\n",myrank, note ); #endif /* DEBUG */ return ; /* request not found */ } #ifdef DEBUG else { printf("Node %d: Request found %lx\n", myrank, request); } #endif /* DEBUG */ /* We post a receive here */ if ((rq) && rq->status == RQ_RECV) { /* See if we need to see the status to get values of tag & id */ /* for wildcard receives from any task */ /* if (rq->otherParty == MPI_ANY_SOURCE) */ otherid = status->MPI_SOURCE; /* if (rq->tag == MPI_ANY_TAG) */ othertag = status->MPI_TAG; /* post the receive message */ TAU_TRACE_RECVMSG(othertag, translateRankToWorld(rq->comm, otherid), rq->size); } if (rq->is_persistent == 0) { /* Remove the record from the request list */ if (last) { if (rq == requests_tail_0) { requests_tail_0 = last; } last->next = rq->next; } else { requests_head_0 = rq->next; } free( rq ); } return ; } /* This routine traverses the list of requests and checks for RQ_SEND. The message is logged if this request matches */ void TauProcessSend ( request, note ) MPI_Request request; char *note; { request_list *rq, *last; int otherid, othertag; #ifdef DEBUG int myrank; PMPI_Comm_rank(MPI_COMM_WORLD, &myrank); #endif /* DEBUG */ /* look for request */ rq = requests_head_0; last = 0; /* first request */ while ((rq != NULL) && (rq->request != request)) { #ifdef DEBUG printf("Node %d: Comparing %lx %lx\n", myrank, rq->request, request); #endif /* DEBUG */ last = rq; rq = rq->next; } if (!rq) { #ifdef DEBUG fprintf( stderr, "Node %d: Request not found in '%s'.\n",myrank, note ); #endif /* DEBUG */ return ; /* request not found */ } #ifdef DEBUG else { printf("Node %d: Request found %lx\n", myrank, request); } #endif /* DEBUG */ if ((rq) && rq->status == RQ_SEND) { otherid = translateRankToWorld(rq->comm, rq->otherParty); othertag = rq->tag; /* post the send message */ TAU_TRACE_SENDMSG(othertag, otherid, rq->size); } return ; } request_list *TauGetRequest( MPI_Request request) { request_list *rq; rq = requests_head_0; while ((rq != NULL) && (rq->request != request)) { rq = rq->next; } return rq; } void TauAddRequest (int status, int count, MPI_Datatype datatype, int other, int tag, MPI_Comm comm, MPI_Request *request, int returnVal, int persistent) { int typesize; request_list *newrq1; if (other != MPI_PROC_NULL && returnVal == MPI_SUCCESS) { if (newrq1 = (request_list*) malloc(sizeof( request_list ))) { PMPI_Type_size( datatype, &typesize ); newrq1->request = *request; newrq1->status = status; newrq1->size = typesize * count; newrq1->otherParty = other; newrq1->comm = comm; newrq1->tag = tag; newrq1->is_persistent = persistent; newrq1->next = 0; rq_add( requests_head_0, requests_tail_0, newrq1 ); } } } /* This routine traverses the list of requests and deletes the given request */ void TauRemoveRequest ( request, note ) MPI_Request request; char *note; { request_list *rq, *last; #ifdef DEBUG int myrank; PMPI_Comm_rank(MPI_COMM_WORLD, &myrank); #endif /* DEBUG */ /* look for request */ rq = requests_head_0; last = 0; /* first request */ while ((rq != NULL) && (rq->request != request)) { #ifdef DEBUG printf("Node %d: Comparing %lx %lx\n", myrank, rq->request, request); #endif /* DEBUG */ last = rq; rq = rq->next; } if (!rq) { #ifdef DEBUG fprintf( stderr, "Node %d: Request not found in '%s'.\n",myrank, note ); #endif /* DEBUG */ return ; /* request not found */ } /* remove the request */ if (last) { if (rq == requests_tail_0) { requests_tail_0 = last; } last->next = rq->next; } else { requests_head_0 = rq->next; } free( rq ); return ; } #endif /* TAU_TRACK_MSG */ /* NOTE: MPI_Type_count was not implemented in mpich-1.2.0. Remove it from this list when it is implemented in libpmpich.a */ int MPI_Allgather( sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm ) void * sendbuf; int sendcount; MPI_Datatype sendtype; void * recvbuf; int recvcount; MPI_Datatype recvtype; MPI_Comm comm; { int returnVal; int typesize; TAU_PROFILE_TIMER(tautimer, "MPI_Allgather()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Allgather( sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm ); PMPI_Type_size( recvtype, &typesize ); TAU_ALLGATHER_DATA(typesize*recvcount); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Allgatherv( sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm ) void * sendbuf; int sendcount; MPI_Datatype sendtype; void * recvbuf; int * recvcounts; int * displs; MPI_Datatype recvtype; MPI_Comm comm; { int returnVal; int typesize; TAU_PROFILE_TIMER(tautimer, "MPI_Allgatherv()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Allgatherv( sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm ); PMPI_Type_size( recvtype, &typesize ); TAU_ALLGATHER_DATA(typesize*(*recvcounts)); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Allreduce( sendbuf, recvbuf, count, datatype, op, comm ) void * sendbuf; void * recvbuf; int count; MPI_Datatype datatype; MPI_Op op; MPI_Comm comm; { int returnVal; int typesize; TAU_PROFILE_TIMER(tautimer, "MPI_Allreduce()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Allreduce( sendbuf, recvbuf, count, datatype, op, comm ); PMPI_Type_size( datatype, &typesize ); TAU_ALLREDUCE_DATA(typesize*count); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Alltoall( sendbuf, sendcount, sendtype, recvbuf, recvcnt, recvtype, comm ) void * sendbuf; int sendcount; MPI_Datatype sendtype; void * recvbuf; int recvcnt; MPI_Datatype recvtype; MPI_Comm comm; { int returnVal; int typesize; TAU_PROFILE_TIMER(tautimer, "MPI_Alltoall()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Alltoall( sendbuf, sendcount, sendtype, recvbuf, recvcnt, recvtype, comm ); PMPI_Type_size( sendtype, &typesize ); TAU_ALLTOALL_DATA(typesize*sendcount); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Alltoallv( sendbuf, sendcnts, sdispls, sendtype, recvbuf, recvcnts, rdispls, recvtype, comm ) void * sendbuf; int * sendcnts; int * sdispls; MPI_Datatype sendtype; void * recvbuf; int * recvcnts; int * rdispls; MPI_Datatype recvtype; MPI_Comm comm; { int returnVal; int typesize; TAU_PROFILE_TIMER(tautimer, "MPI_Alltoallv()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Alltoallv( sendbuf, sendcnts, sdispls, sendtype, recvbuf, recvcnts, rdispls, recvtype, comm ); PMPI_Type_size( sendtype, &typesize ); TAU_ALLTOALL_DATA(typesize*(*sendcnts)); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Barrier( comm ) MPI_Comm comm; { int returnVal; TAU_PROFILE_TIMER(tautimer, "MPI_Barrier()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Barrier( comm ); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Bcast( buffer, count, datatype, root, comm ) void * buffer; int count; MPI_Datatype datatype; int root; MPI_Comm comm; { int returnVal; int typesize; TAU_PROFILE_TIMER(tautimer, "MPI_Bcast()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Bcast( buffer, count, datatype, root, comm ); PMPI_Type_size( datatype, &typesize ); TAU_BCAST_DATA(typesize*count); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Gather( sendbuf, sendcnt, sendtype, recvbuf, recvcount, recvtype, root, comm ) void * sendbuf; int sendcnt; MPI_Datatype sendtype; void * recvbuf; int recvcount; MPI_Datatype recvtype; int root; MPI_Comm comm; { int returnVal; int typesize; int rank; TAU_PROFILE_TIMER(tautimer, "MPI_Gather()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Gather( sendbuf, sendcnt, sendtype, recvbuf, recvcount, recvtype, root, comm ); PMPI_Comm_rank ( comm, &rank ); if (rank == root) { PMPI_Type_size( recvtype, &typesize ); TAU_GATHER_DATA(typesize*recvcount); } TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Gatherv( sendbuf, sendcnt, sendtype, recvbuf, recvcnts, displs, recvtype, root, comm ) void * sendbuf; int sendcnt; MPI_Datatype sendtype; void * recvbuf; int * recvcnts; int * displs; MPI_Datatype recvtype; int root; MPI_Comm comm; { int returnVal; int typesize; int rank; TAU_PROFILE_TIMER(tautimer, "MPI_Gatherv()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Gatherv( sendbuf, sendcnt, sendtype, recvbuf, recvcnts, displs, recvtype, root, comm ); PMPI_Comm_rank ( comm, &rank ); if (rank == root) { PMPI_Type_size( recvtype, &typesize ); TAU_GATHER_DATA(typesize*(*recvcnts)); } TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Op_create( function, commute, op ) MPI_User_function * function; int commute; MPI_Op * op; { int returnVal; TAU_PROFILE_TIMER(tautimer, "MPI_Op_create()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Op_create( function, commute, op ); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Op_free( op ) MPI_Op * op; { int returnVal; TAU_PROFILE_TIMER(tautimer, "MPI_Op_free()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Op_free( op ); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Reduce_scatter( sendbuf, recvbuf, recvcnts, datatype, op, comm ) void * sendbuf; void * recvbuf; int * recvcnts; MPI_Datatype datatype; MPI_Op op; MPI_Comm comm; { int returnVal; int typesize; TAU_PROFILE_TIMER(tautimer, "MPI_Reduce_scatter()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Reduce_scatter( sendbuf, recvbuf, recvcnts, datatype, op, comm ); PMPI_Type_size( datatype, &typesize ); TAU_REDUCESCATTER_DATA(typesize*(*recvcnts)); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Reduce( sendbuf, recvbuf, count, datatype, op, root, comm ) void * sendbuf; void * recvbuf; int count; MPI_Datatype datatype; MPI_Op op; int root; MPI_Comm comm; { int returnVal; int typesize; TAU_PROFILE_TIMER(tautimer, "MPI_Reduce()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Reduce( sendbuf, recvbuf, count, datatype, op, root, comm ); PMPI_Type_size( datatype, &typesize ); TAU_REDUCE_DATA(typesize*count); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Scan( sendbuf, recvbuf, count, datatype, op, comm ) void * sendbuf; void * recvbuf; int count; MPI_Datatype datatype; MPI_Op op; MPI_Comm comm; { int returnVal; int typesize; TAU_PROFILE_TIMER(tautimer, "MPI_Scan()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Scan( sendbuf, recvbuf, count, datatype, op, comm ); PMPI_Type_size( datatype, &typesize ); TAU_SCAN_DATA(typesize*count); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Scatter( sendbuf, sendcnt, sendtype, recvbuf, recvcnt, recvtype, root, comm ) void * sendbuf; int sendcnt; MPI_Datatype sendtype; void * recvbuf; int recvcnt; MPI_Datatype recvtype; int root; MPI_Comm comm; { int returnVal; int typesize; TAU_PROFILE_TIMER(tautimer, "MPI_Scatter()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Scatter( sendbuf, sendcnt, sendtype, recvbuf, recvcnt, recvtype, root, comm ); PMPI_Type_size( sendtype, &typesize ); TAU_SCATTER_DATA(typesize*sendcnt); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Scatterv( sendbuf, sendcnts, displs, sendtype, recvbuf, recvcnt, recvtype, root, comm ) void * sendbuf; int * sendcnts; int * displs; MPI_Datatype sendtype; void * recvbuf; int recvcnt; MPI_Datatype recvtype; int root; MPI_Comm comm; { int returnVal; int typesize; TAU_PROFILE_TIMER(tautimer, "MPI_Scatterv()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Scatterv( sendbuf, sendcnts, displs, sendtype, recvbuf, recvcnt, recvtype, root, comm ); PMPI_Type_size( sendtype, &typesize ); TAU_SCATTER_DATA(typesize*(*sendcnts)); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Attr_delete( comm, keyval ) MPI_Comm comm; int keyval; { int returnVal; TAU_PROFILE_TIMER(tautimer, "MPI_Attr_delete()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Attr_delete( comm, keyval ); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Attr_get( comm, keyval, attr_value, flag ) MPI_Comm comm; int keyval; void * attr_value; int * flag; { int returnVal; TAU_PROFILE_TIMER(tautimer, "MPI_Attr_get()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Attr_get( comm, keyval, attr_value, flag ); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Attr_put( comm, keyval, attr_value ) MPI_Comm comm; int keyval; void * attr_value; { int returnVal; TAU_PROFILE_TIMER(tautimer, "MPI_Attr_put()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Attr_put( comm, keyval, attr_value ); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Comm_compare( comm1, comm2, result ) MPI_Comm comm1; MPI_Comm comm2; int * result; { int returnVal; TAU_PROFILE_TIMER(tautimer, "MPI_Comm_compare()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Comm_compare( comm1, comm2, result ); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Comm_create( comm, group, comm_out ) MPI_Comm comm; MPI_Group group; MPI_Comm * comm_out; { int returnVal; TAU_PROFILE_TIMER(tautimer, "MPI_Comm_create()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Comm_create( comm, group, comm_out ); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Comm_dup( comm, comm_out ) MPI_Comm comm; MPI_Comm * comm_out; { int returnVal; TAU_PROFILE_TIMER(tautimer, "MPI_Comm_dup()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Comm_dup( comm, comm_out ); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Comm_free( comm ) MPI_Comm * comm; { int returnVal; TAU_PROFILE_TIMER(tautimer, "MPI_Comm_free()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Comm_free( comm ); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Comm_group( comm, group ) MPI_Comm comm; MPI_Group * group; { int returnVal; TAU_PROFILE_TIMER(tautimer, "MPI_Comm_group()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Comm_group( comm, group ); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Comm_rank( comm, rank ) MPI_Comm comm; int * rank; { int returnVal; TAU_PROFILE_TIMER(tautimer, "MPI_Comm_rank()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Comm_rank( comm, rank ); TAU_PROFILE_STOP(tautimer); /* Set the node as we did in MPI_Init */ if (comm == MPI_COMM_WORLD) TAU_PROFILE_SET_NODE(*rank); return returnVal; } int MPI_Comm_remote_group( comm, group ) MPI_Comm comm; MPI_Group * group; { int returnVal; TAU_PROFILE_TIMER(tautimer, "MPI_Comm_remote_group()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Comm_remote_group( comm, group ); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Comm_remote_size( comm, size ) MPI_Comm comm; int * size; { int returnVal; TAU_PROFILE_TIMER(tautimer, "MPI_Comm_remote_size()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Comm_remote_size( comm, size ); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Comm_size( comm, size ) MPI_Comm comm; int * size; { int returnVal; TAU_PROFILE_TIMER(tautimer, "MPI_Comm_size()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Comm_size( comm, size ); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Comm_split( comm, color, key, comm_out ) MPI_Comm comm; int color; int key; MPI_Comm * comm_out; { int returnVal; TAU_PROFILE_TIMER(tautimer, "MPI_Comm_split()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Comm_split( comm, color, key, comm_out ); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Comm_test_inter( comm, flag ) MPI_Comm comm; int * flag; { int returnVal; TAU_PROFILE_TIMER(tautimer, "MPI_Comm_test_inter()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Comm_test_inter( comm, flag ); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Group_compare( group1, group2, result ) MPI_Group group1; MPI_Group group2; int * result; { int returnVal; TAU_PROFILE_TIMER(tautimer, "MPI_Group_compare()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Group_compare( group1, group2, result ); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Group_difference( group1, group2, group_out ) MPI_Group group1; MPI_Group group2; MPI_Group * group_out; { int returnVal; TAU_PROFILE_TIMER(tautimer, "MPI_Group_difference()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Group_difference( group1, group2, group_out ); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Group_excl( group, n, ranks, newgroup ) MPI_Group group; int n; int * ranks; MPI_Group * newgroup; { int returnVal; TAU_PROFILE_TIMER(tautimer, "MPI_Group_excl()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Group_excl( group, n, ranks, newgroup ); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Group_free( group ) MPI_Group * group; { int returnVal; TAU_PROFILE_TIMER(tautimer, "MPI_Group_free()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Group_free( group ); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Group_incl( group, n, ranks, group_out ) MPI_Group group; int n; int * ranks; MPI_Group * group_out; { int returnVal; TAU_PROFILE_TIMER(tautimer, "MPI_Group_incl()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Group_incl( group, n, ranks, group_out ); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Group_intersection( group1, group2, group_out ) MPI_Group group1; MPI_Group group2; MPI_Group * group_out; { int returnVal; TAU_PROFILE_TIMER(tautimer, "MPI_Group_intersection()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Group_intersection( group1, group2, group_out ); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Group_rank( group, rank ) MPI_Group group; int * rank; { int returnVal; TAU_PROFILE_TIMER(tautimer, "MPI_Group_rank()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Group_rank( group, rank ); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Group_range_excl( group, n, ranges, newgroup ) MPI_Group group; int n; int ranges[][3]; MPI_Group * newgroup; { int returnVal; TAU_PROFILE_TIMER(tautimer, "MPI_Group_range_excl()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Group_range_excl( group, n, ranges, newgroup ); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Group_range_incl( group, n, ranges, newgroup ) MPI_Group group; int n; int ranges[][3]; MPI_Group * newgroup; { int returnVal; TAU_PROFILE_TIMER(tautimer, "MPI_Group_range_incl()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Group_range_incl( group, n, ranges, newgroup ); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Group_size( group, size ) MPI_Group group; int * size; { int returnVal; TAU_PROFILE_TIMER(tautimer, "MPI_Group_size()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Group_size( group, size ); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Group_translate_ranks( group_a, n, ranks_a, group_b, ranks_b ) MPI_Group group_a; int n; int * ranks_a; MPI_Group group_b; int * ranks_b; { int returnVal; TAU_PROFILE_TIMER(tautimer, "MPI_Group_translate_ranks()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Group_translate_ranks( group_a, n, ranks_a, group_b, ranks_b ); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Group_union( group1, group2, group_out ) MPI_Group group1; MPI_Group group2; MPI_Group * group_out; { int returnVal; TAU_PROFILE_TIMER(tautimer, "MPI_Group_union()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Group_union( group1, group2, group_out ); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Intercomm_create( local_comm, local_leader, peer_comm, remote_leader, tag, comm_out ) MPI_Comm local_comm; int local_leader; MPI_Comm peer_comm; int remote_leader; int tag; MPI_Comm * comm_out; { int returnVal; TAU_PROFILE_TIMER(tautimer, "MPI_Intercomm_create()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Intercomm_create( local_comm, local_leader, peer_comm, remote_leader, tag, comm_out ); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Intercomm_merge( comm, high, comm_out ) MPI_Comm comm; int high; MPI_Comm * comm_out; { int returnVal; TAU_PROFILE_TIMER(tautimer, "MPI_Intercomm_merge()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Intercomm_merge( comm, high, comm_out ); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Keyval_create( copy_fn, delete_fn, keyval, extra_state ) MPI_Copy_function * copy_fn; MPI_Delete_function * delete_fn; int * keyval; void * extra_state; { int returnVal; TAU_PROFILE_TIMER(tautimer, "MPI_Keyval_create()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Keyval_create( copy_fn, delete_fn, keyval, extra_state ); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Keyval_free( keyval ) int * keyval; { int returnVal; TAU_PROFILE_TIMER(tautimer, "MPI_Keyval_free()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Keyval_free( keyval ); TAU_PROFILE_STOP(tautimer); return returnVal; } /* LAM MPI defines MPI_Abort as a macro! We check for this and if it is defined that way, we change the MPI_Abort wrapper */ #if (defined(MPI_Abort) && defined(_ULM_MPI_H_)) int _MPI_Abort( MPI_Comm comm, int errorcode, char * file, int line) #else int MPI_Abort( comm, errorcode ) MPI_Comm comm; int errorcode; #endif /* MPI_Abort & LAM MPI [LAM MPI] */ { int returnVal; TAU_PROFILE_TIMER(tautimer, "MPI_Abort()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Abort( comm, errorcode ); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Error_class( errorcode, errorclass ) int errorcode; int * errorclass; { int returnVal; TAU_PROFILE_TIMER(tautimer, "MPI_Error_class()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Error_class( errorcode, errorclass ); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Errhandler_create( function, errhandler ) MPI_Handler_function * function; MPI_Errhandler * errhandler; { int returnVal; TAU_PROFILE_TIMER(tautimer, "MPI_Errhandler_create()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Errhandler_create( function, errhandler ); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Errhandler_free( errhandler ) MPI_Errhandler * errhandler; { int returnVal; TAU_PROFILE_TIMER(tautimer, "MPI_Errhandler_free()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Errhandler_free( errhandler ); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Errhandler_get( comm, errhandler ) MPI_Comm comm; MPI_Errhandler * errhandler; { int returnVal; TAU_PROFILE_TIMER(tautimer, "MPI_Errhandler_get()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Errhandler_get( comm, errhandler ); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Error_string( errorcode, string, resultlen ) int errorcode; char * string; int * resultlen; { int returnVal; TAU_PROFILE_TIMER(tautimer, "MPI_Error_string()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Error_string( errorcode, string, resultlen ); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Errhandler_set( comm, errhandler ) MPI_Comm comm; MPI_Errhandler errhandler; { int returnVal; TAU_PROFILE_TIMER(tautimer, "MPI_Errhandler_set()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Errhandler_set( comm, errhandler ); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Finalize( ) { int returnVal; int size; TAU_PROFILE_TIMER(tautimer, "MPI_Finalize()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); #ifdef TAU_SYNCHRONIZE_CLOCKS PMPI_Comm_size( MPI_COMM_WORLD, &size ); TauSyncFinalClocks(procid_0, size); #endif returnVal = PMPI_Finalize( ); TAU_PROFILE_STOP(tautimer); Tau_stop_top_level_timer_if_necessary(); return returnVal; } int MPI_Get_processor_name( name, resultlen ) char * name; int * resultlen; { int returnVal; TAU_PROFILE_TIMER(tautimer, "MPI_Get_processor_name()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Get_processor_name( name, resultlen ); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Init( argc, argv ) int * argc; char *** argv; { int returnVal; int size; TAU_PROFILE_TIMER(tautimer, "MPI_Init()", " ", TAU_MESSAGE); Tau_create_top_level_timer_if_necessary(); TAU_PROFILE_START(tautimer); returnVal = PMPI_Init( argc, argv ); TAU_PROFILE_STOP(tautimer); PMPI_Comm_rank( MPI_COMM_WORLD, &procid_0 ); TAU_PROFILE_SET_NODE(procid_0 ); PMPI_Comm_size( MPI_COMM_WORLD, &size ); tau_totalnodes(1, size); /* Set the totalnodes */ #ifdef TAU_SYNCHRONIZE_CLOCKS TauSyncClocks(procid_0, size); #endif #ifdef TAU_TRACK_MSG requests_head_0 = requests_tail_0 = 0; #endif /* TAU_TRACK_MSG */ return returnVal; } #ifdef TAU_MPI_THREADED int MPI_Init_thread (argc, argv, required, provided ) int * argc; char *** argv; int required; int *provided; { int returnVal; int size; TAU_PROFILE_TIMER(tautimer, "MPI_Init_thread()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Init_thread( argc, argv, required, provided ); TAU_PROFILE_STOP(tautimer); PMPI_Comm_rank( MPI_COMM_WORLD, &procid_0 ); TAU_PROFILE_SET_NODE(procid_0 ); PMPI_Comm_size( MPI_COMM_WORLD, &size ); tau_totalnodes(1, size); /* Set the totalnodes */ #ifdef TAU_SYNCHRONIZE_CLOCKS TauSyncClocks(procid_0, size); #endif #ifdef TAU_TRACK_MSG requests_head_0 = requests_tail_0 = 0; #endif /* TAU_TRACK_MSG */ return returnVal; } #endif /* TAU_MPI_THREADED */ /* int MPI_Initialized( flag ) int * flag; { int returnVal; TAU_PROFILE_TIMER(tautimer, "MPI_Initialized()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Initialized( flag ); TAU_PROFILE_STOP(tautimer); return returnVal; } */ #ifdef TAU_ENABLE_MPI_WTIME double MPI_Wtick( ) { double returnVal; TAU_PROFILE_TIMER(tautimer, "MPI_Wtick()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Wtick( ); TAU_PROFILE_STOP(tautimer); return returnVal; } double MPI_Wtime( ) { double returnVal; /* To enable the instrumentation change group to TAU_MESSAGE */ TAU_PROFILE_TIMER(tautimer, "MPI_Wtime()", " ", TAU_DISABLE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Wtime( ); TAU_PROFILE_STOP(tautimer); return returnVal; } #endif int MPI_Address( location, address ) void * location; MPI_Aint * address; { int returnVal; TAU_PROFILE_TIMER(tautimer, "MPI_Address()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Address( location, address ); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Bsend( buf, count, datatype, dest, tag, comm ) void * buf; int count; MPI_Datatype datatype; int dest; int tag; MPI_Comm comm; { int returnVal; int typesize; TAU_PROFILE_TIMER(tautimer, "MPI_Bsend()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); #ifdef TAU_TRACK_MSG if (dest != MPI_PROC_NULL) { PMPI_Type_size( datatype, &typesize ); TAU_TRACE_SENDMSG(tag, translateRankToWorld(comm, dest), typesize*count); /* prof_send( procid_0, dest, tag, typesize*count, "MPI_Bsend" ); */ } #endif /* TAU_TRACK_MSG */ returnVal = PMPI_Bsend( buf, count, datatype, dest, tag, comm ); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Bsend_init( buf, count, datatype, dest, tag, comm, request ) void * buf; int count; MPI_Datatype datatype; int dest; int tag; MPI_Comm comm; MPI_Request * request; { int returnVal; /* fprintf( stderr, "MPI_Bsend_init call on %d\n", procid_0 ); */ TAU_PROFILE_TIMER(tautimer, "MPI_Bsend_init()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Bsend_init( buf, count, datatype, dest, tag, comm, request ); #ifdef TAU_TRACK_MSG TauAddRequest(RQ_SEND, count, datatype, dest, tag, comm, request, returnVal, 1); #endif /* TAU_TRACK_MSG */ TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Buffer_attach( buffer, size ) void * buffer; int size; { int returnVal; TAU_PROFILE_TIMER(tautimer, "MPI_Buffer_attach()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Buffer_attach( buffer, size ); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Buffer_detach( buffer, size ) void * buffer; int * size; { int returnVal; TAU_PROFILE_TIMER(tautimer, "MPI_Buffer_detach()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Buffer_detach( buffer, size ); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Cancel( request ) MPI_Request * request; { int returnVal; TAU_PROFILE_TIMER(tautimer, "MPI_Cancel()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); #ifdef TAU_TRACK_MSG TauRemoveRequest(*request, "MPI_Cancel"); #endif /* TAU_TRACK_MSG */ returnVal = PMPI_Cancel( request ); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Request_free( request ) MPI_Request * request; { int returnVal; /* The request may have completed, may have not. */ /* We'll assume it didn't. */ TAU_PROFILE_TIMER(tautimer, "MPI_Request_free()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); #ifdef TAU_TRACK_MSG TauRemoveRequest(*request, "MPI_Request_free"); #endif /* TAU_TRACK_MSG */ returnVal = PMPI_Request_free( request ); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Recv_init( buf, count, datatype, source, tag, comm, request ) void * buf; int count; MPI_Datatype datatype; int source; int tag; MPI_Comm comm; MPI_Request * request; { int returnVal; TAU_PROFILE_TIMER(tautimer, "MPI_Recv_init()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Recv_init( buf, count, datatype, source, tag, comm, request ); TAU_PROFILE_STOP(tautimer); #ifdef TAU_TRACK_MSG TauAddRequest(RQ_RECV, count, datatype, source, tag, comm, request, returnVal, 1); #endif /* TAU_TRACK_MSG */ return returnVal; } int MPI_Send_init( buf, count, datatype, dest, tag, comm, request ) void * buf; int count; MPI_Datatype datatype; int dest; int tag; MPI_Comm comm; MPI_Request * request; { int returnVal; #ifdef DEBUG fprintf( stderr, "MPI_Send_init call on %d\n", procid_0 ); #endif /* DEBUG */ TAU_PROFILE_TIMER(tautimer, "MPI_Send_init()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Send_init( buf, count, datatype, dest, tag, comm, request ); /* we need to store the request and associate it with the size/tag so MPI_Start can retrieve it and log the TAU_TRACE_SENDMSG */ #ifdef TAU_TRACK_MSG TauAddRequest(RQ_SEND, count, datatype, dest, tag, comm, request, returnVal, 1); #endif /* TAU_TRACK_MSG */ TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Get_elements( status, datatype, elements ) MPI_Status * status; MPI_Datatype datatype; int * elements; { int returnVal; TAU_PROFILE_TIMER(tautimer, "MPI_Get_elements()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Get_elements( status, datatype, elements ); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Get_count( status, datatype, count ) MPI_Status * status; MPI_Datatype datatype; int * count; { int returnVal; TAU_PROFILE_TIMER(tautimer, "MPI_Get_count()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Get_count( status, datatype, count ); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Ibsend( buf, count, datatype, dest, tag, comm, request ) void * buf; int count; MPI_Datatype datatype; int dest; int tag; MPI_Comm comm; MPI_Request * request; { int returnVal; #ifdef TAU_TRACK_MSG int typesize; #endif /* TAU_TRACK_MSG */ /* fprintf( stderr, "MPI_Ibsend call on %d\n", procid_0 ); */ TAU_PROFILE_TIMER(tautimer, "MPI_Ibsend()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); #ifdef TAU_TRACK_MSG if (dest != MPI_PROC_NULL) { PMPI_Type_size( datatype, &typesize ); TAU_TRACE_SENDMSG(tag, translateRankToWorld(comm, dest), count * typesize); } #endif /* TAU_TRACK_MSG */ returnVal = PMPI_Ibsend( buf, count, datatype, dest, tag, comm, request ); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Iprobe( source, tag, comm, flag, status ) int source; int tag; MPI_Comm comm; int * flag; MPI_Status * status; { int returnVal; TAU_PROFILE_TIMER(tautimer, "MPI_Iprobe()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Iprobe( source, tag, comm, flag, status ); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Irecv( buf, count, datatype, source, tag, comm, request ) void * buf; int count; MPI_Datatype datatype; int source; int tag; MPI_Comm comm; MPI_Request * request; { int returnVal; #ifdef TAU_TRACK_MSG request_list *newrq1; int typesize; #ifdef DEBUG int myrank; #endif /* DEBUG */ #endif /* TAU_TRACK_MSG */ TAU_PROFILE_TIMER(tautimer, "MPI_Irecv()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); #ifdef DEBUG PMPI_Comm_rank(MPI_COMM_WORLD, &myrank); #endif /* DEBUG */ returnVal = PMPI_Irecv( buf, count, datatype, source, tag, comm, request ); #ifdef DEBUG printf("Node: %d: Irecv: request = %lx\n", myrank, *request); #endif /* DEBUG */ TAU_PROFILE_STOP(tautimer); #ifdef TAU_TRACK_MSG if (source != MPI_PROC_NULL && returnVal == MPI_SUCCESS) { if (newrq1 = (request_list*) malloc(sizeof( request_list ))) { PMPI_Type_size( datatype, &typesize ); newrq1->request = *request; newrq1->status = RQ_RECV; newrq1->size = typesize * count; newrq1->otherParty = source; newrq1->comm = comm; newrq1->tag = tag; newrq1->is_persistent = 0; newrq1->next = 0; rq_add( requests_head_0, requests_tail_0, newrq1 ); } } #endif /* TAU_TRACK_MSG */ return returnVal; } int MPI_Irsend( buf, count, datatype, dest, tag, comm, request ) void * buf; int count; MPI_Datatype datatype; int dest; int tag; MPI_Comm comm; MPI_Request * request; { int returnVal; #ifdef TAU_TRACK_MSG int typesize3; #endif /* TAU_TRACK_MSG */ /* fprintf( stderr, "MPI_Irsend call on %d\n", procid_0 ); */ TAU_PROFILE_TIMER(tautimer, "MPI_Irsend()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); #ifdef TAU_TRACK_MSG if (dest != MPI_PROC_NULL) { PMPI_Type_size( datatype, &typesize3 ); TAU_TRACE_SENDMSG(tag, translateRankToWorld(comm, dest), count * typesize3); } #endif /* TAU_TRACK_MSG */ returnVal = PMPI_Irsend( buf, count, datatype, dest, tag, comm, request ); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Isend( buf, count, datatype, dest, tag, comm, request ) void * buf; int count; MPI_Datatype datatype; int dest; int tag; MPI_Comm comm; MPI_Request * request; { int returnVal; #ifdef TAU_TRACK_MSG int typesize3; #endif /* TAU_TRACK_MSG */ /* fprintf( stderr, "MPI_Isend call on %d\n", procid_0 ); */ TAU_PROFILE_TIMER(tautimer, "MPI_Isend()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); #ifdef TAU_TRACK_MSG if (dest != MPI_PROC_NULL) { PMPI_Type_size( datatype, &typesize3 ); TAU_TRACE_SENDMSG(tag, translateRankToWorld(comm, dest), count * typesize3); } #endif /* TAU_TRACK_MSG */ returnVal = PMPI_Isend( buf, count, datatype, dest, tag, comm, request ); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Issend( buf, count, datatype, dest, tag, comm, request ) void * buf; int count; MPI_Datatype datatype; int dest; int tag; MPI_Comm comm; MPI_Request * request; { int returnVal; #ifdef TAU_TRACK_MSG int typesize3; #endif /* TAU_TRACK_MSG */ /* fprintf( stderr, "MPI_Issend call on %d\n", procid_0 ); */ TAU_PROFILE_TIMER(tautimer, "MPI_Issend()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); #ifdef TAU_TRACK_MSG if (dest != MPI_PROC_NULL) { PMPI_Type_size( datatype, &typesize3 ); TAU_TRACE_SENDMSG(tag, translateRankToWorld(comm, dest), count * typesize3); } #endif /* TAU_TRACK_MSG */ returnVal = PMPI_Issend( buf, count, datatype, dest, tag, comm, request ); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Pack( inbuf, incount, type, outbuf, outcount, position, comm ) void * inbuf; int incount; MPI_Datatype type; void * outbuf; int outcount; int * position; MPI_Comm comm; { int returnVal; TAU_PROFILE_TIMER(tautimer, "MPI_Pack()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Pack( inbuf, incount, type, outbuf, outcount, position, comm ); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Pack_size( incount, datatype, comm, size ) int incount; MPI_Datatype datatype; MPI_Comm comm; int * size; { int returnVal; TAU_PROFILE_TIMER(tautimer, "MPI_Pack_size()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Pack_size( incount, datatype, comm, size ); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Probe( source, tag, comm, status ) int source; int tag; MPI_Comm comm; MPI_Status * status; { int returnVal; TAU_PROFILE_TIMER(tautimer, "MPI_Probe()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Probe( source, tag, comm, status ); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Recv( buf, count, datatype, source, tag, comm, status ) void * buf; int count; MPI_Datatype datatype; int source; int tag; MPI_Comm comm; MPI_Status * status; { MPI_Status local_status; int returnVal; int size; TAU_PROFILE_TIMER(tautimer, "MPI_Recv()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); #ifdef TAU_TRACK_MSG if (status == MPI_STATUS_IGNORE) { status = &local_status; } #endif /* TAU_TRACK_MSG */ returnVal = PMPI_Recv( buf, count, datatype, source, tag, comm, status ); #ifdef TAU_TRACK_MSG if (source != MPI_PROC_NULL && returnVal == MPI_SUCCESS) { PMPI_Get_count( status, MPI_BYTE, &size ); /* note that status->MPI_COMM must == comm */ TAU_TRACE_RECVMSG(status->MPI_TAG, translateRankToWorld(comm, status->MPI_SOURCE), size); /* prof_recv( procid_0, status->MPI_SOURCE, status->MPI_TAG, size, "MPI_Recv" ); */ } #endif /* TAU_TRACK_MSG */ TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Rsend( buf, count, datatype, dest, tag, comm ) void * buf; int count; MPI_Datatype datatype; int dest; int tag; MPI_Comm comm; { int returnVal; #ifdef TAU_TRACK_MSG int typesize; #endif /* TAU_TRACK_MSG */ TAU_PROFILE_TIMER(tautimer, "MPI_Rsend()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); #ifdef TAU_TRACK_MSG if (dest != MPI_PROC_NULL) { PMPI_Type_size( datatype, &typesize ); TAU_TRACE_SENDMSG(tag, translateRankToWorld(comm, dest), typesize*count); /* prof_send( procid_0, dest, tag, typesize*count, "MPI_Rsend" ); */ } #endif /* TAU_TRACK_MSG */ returnVal = PMPI_Rsend( buf, count, datatype, dest, tag, comm ); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Rsend_init( buf, count, datatype, dest, tag, comm, request ) void * buf; int count; MPI_Datatype datatype; int dest; int tag; MPI_Comm comm; MPI_Request * request; { int returnVal; /* fprintf( stderr, "MPI_Rsend_init call on %d\n", procid_0 ); */ TAU_PROFILE_TIMER(tautimer, "MPI_Rsend_init()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Rsend_init( buf, count, datatype, dest, tag, comm, request ); #ifdef TAU_TRACK_MSG TauAddRequest(RQ_SEND, count, datatype, dest, tag, comm, request, returnVal, 1); #endif /* TAU_TRACK_MSG */ TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Send( buf, count, datatype, dest, tag, comm ) void * buf; int count; MPI_Datatype datatype; int dest; int tag; MPI_Comm comm; { int returnVal; #ifdef TAU_TRACK_MSG int typesize; #endif /* TAU_TRACK_MSG */ TAU_PROFILE_TIMER(tautimer, "MPI_Send()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); #ifdef TAU_TRACK_MSG if (dest != MPI_PROC_NULL) { PMPI_Type_size( datatype, &typesize ); TAU_TRACE_SENDMSG(tag, translateRankToWorld(comm, dest), typesize*count); /* prof_send( procid_0, dest, tag, typesize*count, "MPI_Send" ); */ } #endif /* TAU_TRACK_MSG */ returnVal = PMPI_Send( buf, count, datatype, dest, tag, comm ); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Sendrecv( sendbuf, sendcount, sendtype, dest, sendtag, recvbuf, recvcount, recvtype, source, recvtag, comm, status ) void * sendbuf; int sendcount; MPI_Datatype sendtype; int dest; int sendtag; void * recvbuf; int recvcount; MPI_Datatype recvtype; int source; int recvtag; MPI_Comm comm; MPI_Status * status; { int returnVal; #ifdef TAU_TRACK_MSG MPI_Status local_status; int typesize1; int count; #endif /* TAU_TRACK_MSG */ TAU_PROFILE_TIMER(tautimer, "MPI_Sendrecv()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); #ifdef TAU_TRACK_MSG if (dest != MPI_PROC_NULL) { PMPI_Type_size( sendtype, &typesize1 ); TAU_TRACE_SENDMSG(sendtag, translateRankToWorld(comm, dest), typesize1*sendcount); /* prof_send( procid_0, dest, sendtag, typesize1*sendcount, "MPI_Sendrecv" ); */ } if (status == MPI_STATUS_IGNORE) { status = &local_status; } #endif /* TAU_TRACK_MSG */ returnVal = PMPI_Sendrecv( sendbuf, sendcount, sendtype, dest, sendtag, recvbuf, recvcount, recvtype, source, recvtag, comm, status ); #ifdef TAU_TRACK_MSG if (source != MPI_PROC_NULL && returnVal == MPI_SUCCESS) { PMPI_Get_count( status, MPI_BYTE, &count ); TAU_TRACE_RECVMSG(status->MPI_TAG, translateRankToWorld(comm, status->MPI_SOURCE), count); } #endif /* TAU_TRACK_MSG */ TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Sendrecv_replace( buf, count, datatype, dest, sendtag, source, recvtag, comm, status ) void * buf; int count; MPI_Datatype datatype; int dest; int sendtag; int source; int recvtag; MPI_Comm comm; MPI_Status * status; { int returnVal; #ifdef TAU_TRACK_MSG MPI_Status local_status; int size1; int typesize2; #endif /* TAU_TRACK_MSG */ TAU_PROFILE_TIMER(tautimer, "MPI_Sendrecv_replace()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); #ifdef TAU_TRACK_MSG if (dest != MPI_PROC_NULL) { PMPI_Type_size( datatype, &typesize2 ); TAU_TRACE_SENDMSG(sendtag, translateRankToWorld(comm, dest), typesize2*count); /* prof_send( procid_0, dest, sendtag, typesize2*count, "MPI_Sendrecv_replace" ); */ } if (status == MPI_STATUS_IGNORE) { status = &local_status; } #endif /* TAU_TRACK_MSG */ returnVal = PMPI_Sendrecv_replace( buf, count, datatype, dest, sendtag, source, recvtag, comm, status ); #ifdef TAU_TRACK_MSG if (dest != MPI_PROC_NULL && returnVal == MPI_SUCCESS) { PMPI_Get_count( status, MPI_BYTE, &size1 ); TAU_TRACE_RECVMSG(status->MPI_TAG, translateRankToWorld(comm, status->MPI_SOURCE), size1); /* prof_recv( dest, procid_0, recvtag, size1, "MPI_Sendrecv_replace" ); */ } #endif /* TAU_TRACK_MSG */ TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Ssend( buf, count, datatype, dest, tag, comm ) void * buf; int count; MPI_Datatype datatype; int dest; int tag; MPI_Comm comm; { int returnVal; #ifdef TAU_TRACK_MSG int typesize; #endif /* TAU_TRACK_MSG */ TAU_PROFILE_TIMER(tautimer, "MPI_Ssend()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); #ifdef TAU_TRACK_MSG if (dest != MPI_PROC_NULL) { PMPI_Type_size( datatype, &typesize ); TAU_TRACE_SENDMSG(tag, translateRankToWorld(comm, dest), typesize*count); /* prof_send( procid_0, dest, tag, typesize*count, "MPI_Ssend" ); */ } #endif /* TAU_TRACK_MSG */ returnVal = PMPI_Ssend( buf, count, datatype, dest, tag, comm ); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Ssend_init( buf, count, datatype, dest, tag, comm, request ) void * buf; int count; MPI_Datatype datatype; int dest; int tag; MPI_Comm comm; MPI_Request * request; { int returnVal; /* fprintf( stderr, "MPI_Ssend_init call on %d\n", procid_0 ); */ TAU_PROFILE_TIMER(tautimer, "MPI_Ssend_init()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Ssend_init( buf, count, datatype, dest, tag, comm, request ); #ifdef TAU_TRACK_MSG TauAddRequest(RQ_SEND, count, datatype, dest, tag, comm, request, returnVal, 1); #endif /* TAU_TRACK_MSG */ TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Start( request ) MPI_Request * request; { request_list *rq; int returnVal; TAU_PROFILE_TIMER(tautimer, "MPI_Start()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); #ifdef TAU_TRACK_MSG rq = TauGetRequest(*request); TauProcessSend(*request, "MPI_Start"); #endif /* TAU_TRACK_MSG */ returnVal = PMPI_Start( request ); #ifdef TAU_TRACK_MSG // fix up the request since MPI_Start may (will) change it rq->request = *request; #endif /* TAU_TRACK_MSG */ TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Startall( count, array_of_requests ) int count; MPI_Request * array_of_requests; { int returnVal; TAU_PROFILE_TIMER(tautimer, "MPI_Startall()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Startall( count, array_of_requests ); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Test( request, flag, status ) MPI_Request * request; int * flag; MPI_Status * status; { int returnVal; #ifdef TAU_TRACK_MSG MPI_Request saverequest; MPI_Status local_status; #endif /* TAU_TRACK_MSG */ TAU_PROFILE_TIMER(tautimer, "MPI_Test()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); #ifdef TAU_TRACK_MSG saverequest = *request; if (status == MPI_STATUS_IGNORE) { status = &local_status; } #endif /* TAU_TRACK_MSG */ returnVal = PMPI_Test( request, flag, status ); #ifdef TAU_TRACK_MSG if (*flag) TauProcessRecv(saverequest, status, "MPI_Test"); #endif /* TAU_TRACK_MSG */ TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Testall( count, array_of_requests, flag, array_of_statuses ) int count; MPI_Request * array_of_requests; int * flag; MPI_Status * array_of_statuses; { int returnVal; #ifdef TAU_TRACK_MSG int need_to_free = 0; int i; MPI_Request saverequest[TAU_MAX_REQUESTS]; #endif /* TAU_TRACK_MSG */ TAU_PROFILE_TIMER(tautimer, "MPI_Testall()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); #ifdef TAU_TRACK_MSG for (i = 0; i < count; i++) { saverequest[i] = array_of_requests[i]; } if (array_of_statuses == MPI_STATUSES_IGNORE) { array_of_statuses = (MPI_Status*) malloc (sizeof(MPI_Status)*count); need_to_free = 1; } #endif /* TAU_TRACK_MSG */ returnVal = PMPI_Testall( count, array_of_requests, flag, array_of_statuses ); #ifdef TAU_TRACK_MSG if (*flag) { /* at least one completed */ for(i=0; i < count; i++) TauProcessRecv(saverequest[i], &array_of_statuses[i], "MPI_Testall"); } if (need_to_free) { free(array_of_statuses); } #endif /* TAU_TRACK_MSG */ TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Testany( count, array_of_requests, index, flag, status ) int count; MPI_Request * array_of_requests; int * index; int * flag; MPI_Status * status; { int returnVal; #ifdef TAU_TRACK_MSG MPI_Status local_status; int i; MPI_Request saverequest[TAU_MAX_REQUESTS]; #endif /* TAU_TRACK_MSG */ TAU_PROFILE_TIMER(tautimer, "MPI_Testany()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); #ifdef TAU_TRACK_MSG for (i = 0; i < count; i++) { saverequest[i] = array_of_requests[i]; } if (status == MPI_STATUS_IGNORE) { status = &local_status; } #endif /* TAU_TRACK_MSG */ returnVal = PMPI_Testany( count, array_of_requests, index, flag, status ); #ifdef TAU_TRACK_MSG if (*flag) TauProcessRecv( (saverequest[*index]), status, "MPI_Testany" ); #endif /* TAU_TRACK_MSG */ TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Test_cancelled( status, flag ) MPI_Status * status; int * flag; { int returnVal; TAU_PROFILE_TIMER(tautimer, "MPI_Test_cancelled()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Test_cancelled( status, flag ); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Testsome( incount, array_of_requests, outcount, array_of_indices, array_of_statuses ) int incount; MPI_Request * array_of_requests; int * outcount; int * array_of_indices; MPI_Status * array_of_statuses; { int returnVal; #ifdef TAU_TRACK_MSG int need_to_free = 0; int i; MPI_Request saverequest[TAU_MAX_REQUESTS]; #endif /* TAU_TRACK_MSG */ TAU_PROFILE_TIMER(tautimer, "MPI_Testsome()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); #ifdef TAU_TRACK_MSG for (i = 0; i < incount; i++){ saverequest[i] = array_of_requests[i]; } if (array_of_statuses == MPI_STATUSES_IGNORE) { array_of_statuses = (MPI_Status*) malloc (sizeof(MPI_Status)*incount); need_to_free = 1; } #endif /* TAU_TRACK_MSG */ returnVal = PMPI_Testsome( incount, array_of_requests, outcount, array_of_indices, array_of_statuses ); #ifdef TAU_TRACK_MSG for (i=0; i < *outcount; i++) { TauProcessRecv( (saverequest [array_of_indices[i]]), &(array_of_statuses[i]), "MPI_Testsome" ); } if (need_to_free) { free(array_of_statuses); } #endif /* TAU_TRACK_MSG */ TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Type_commit( datatype ) MPI_Datatype * datatype; { int returnVal; TAU_PROFILE_TIMER(tautimer, "MPI_Type_commit()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Type_commit( datatype ); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Type_contiguous( count, old_type, newtype ) int count; MPI_Datatype old_type; MPI_Datatype * newtype; { int returnVal; TAU_PROFILE_TIMER(tautimer, "MPI_Type_contiguous()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Type_contiguous( count, old_type, newtype ); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Type_extent( datatype, extent ) MPI_Datatype datatype; MPI_Aint * extent; { int returnVal; TAU_PROFILE_TIMER(tautimer, "MPI_Type_extent()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Type_extent( datatype, extent ); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Type_free( datatype ) MPI_Datatype * datatype; { int returnVal; TAU_PROFILE_TIMER(tautimer, "MPI_Type_free()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Type_free( datatype ); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Type_hindexed( count, blocklens, indices, old_type, newtype ) int count; int * blocklens; MPI_Aint * indices; MPI_Datatype old_type; MPI_Datatype * newtype; { int returnVal; TAU_PROFILE_TIMER(tautimer, "MPI_Type_hindexed()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Type_hindexed( count, blocklens, indices, old_type, newtype ); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Type_hvector( count, blocklen, stride, old_type, newtype ) int count; int blocklen; MPI_Aint stride; MPI_Datatype old_type; MPI_Datatype * newtype; { int returnVal; TAU_PROFILE_TIMER(tautimer, "MPI_Type_hvector()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Type_hvector( count, blocklen, stride, old_type, newtype ); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Type_indexed( count, blocklens, indices, old_type, newtype ) int count; int * blocklens; int * indices; MPI_Datatype old_type; MPI_Datatype * newtype; { int returnVal; TAU_PROFILE_TIMER(tautimer, "MPI_Type_indexed()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Type_indexed( count, blocklens, indices, old_type, newtype ); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Type_lb( datatype, displacement ) MPI_Datatype datatype; MPI_Aint * displacement; { int returnVal; TAU_PROFILE_TIMER(tautimer, "MPI_Type_lb()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Type_lb( datatype, displacement ); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Type_size( datatype, size ) MPI_Datatype datatype; int * size; { int returnVal; TAU_PROFILE_TIMER(tautimer, "MPI_Type_size()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Type_size( datatype, size ); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Type_struct( count, blocklens, indices, old_types, newtype ) int count; int * blocklens; MPI_Aint * indices; MPI_Datatype * old_types; MPI_Datatype * newtype; { int returnVal; TAU_PROFILE_TIMER(tautimer, "MPI_Type_struct()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Type_struct( count, blocklens, indices, old_types, newtype ); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Type_ub( datatype, displacement ) MPI_Datatype datatype; MPI_Aint * displacement; { int returnVal; TAU_PROFILE_TIMER(tautimer, "MPI_Type_ub()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Type_ub( datatype, displacement ); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Type_vector( count, blocklen, stride, old_type, newtype ) int count; int blocklen; int stride; MPI_Datatype old_type; MPI_Datatype * newtype; { int returnVal; TAU_PROFILE_TIMER(tautimer, "MPI_Type_vector()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Type_vector( count, blocklen, stride, old_type, newtype ); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Unpack( inbuf, insize, position, outbuf, outcount, type, comm ) void * inbuf; int insize; int * position; void * outbuf; int outcount; MPI_Datatype type; MPI_Comm comm; { int returnVal; TAU_PROFILE_TIMER(tautimer, "MPI_Unpack()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Unpack( inbuf, insize, position, outbuf, outcount, type, comm ); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Wait( request, status ) MPI_Request * request; MPI_Status * status; { int returnVal; #ifdef TAU_TRACK_MSG MPI_Status local_status; MPI_Request saverequest; #endif /* TAU_TRACK_MSG */ TAU_PROFILE_TIMER(tautimer, "MPI_Wait()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); #ifdef TAU_TRACK_MSG if (status == MPI_STATUS_IGNORE) { status = &local_status; } #endif /* TAU_TRACK_MSG */ #ifdef TAU_TRACK_MSG saverequest = *request; #endif /* TAU_TRACK_MSG */ returnVal = PMPI_Wait( request, status ); #ifdef TAU_TRACK_MSG TauProcessRecv(saverequest, status, "MPI_Wait"); #endif /* TAU_TRACK_MSG */ TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Waitall( count, array_of_requests, array_of_statuses ) int count; MPI_Request * array_of_requests; MPI_Status * array_of_statuses; { int returnVal; #ifdef TAU_TRACK_MSG int need_to_free = 0; int i; MPI_Request saverequest[TAU_MAX_REQUESTS]; #endif /* TAU_TRACK_MSG */ TAU_PROFILE_TIMER(tautimer, "MPI_Waitall()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); #ifdef TAU_TRACK_MSG for (i = 0; i < count; i++) { saverequest[i] = array_of_requests[i]; } if (array_of_statuses == MPI_STATUSES_IGNORE) { array_of_statuses = (MPI_Status*) malloc (sizeof(MPI_Status)*count); need_to_free = 1; } #endif /* TAU_TRACK_MSG */ returnVal = PMPI_Waitall( count, array_of_requests, array_of_statuses ); #ifdef TAU_TRACK_MSG for(i=0; i < count; i++) TauProcessRecv(saverequest[i], &array_of_statuses[i], "MPI_Waitall"); if (need_to_free) { free(array_of_statuses); } #endif /* TAU_TRACK_MSG */ TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Waitany( count, array_of_requests, index, status ) int count; MPI_Request * array_of_requests; int * index; MPI_Status * status; { int returnVal; #ifdef TAU_TRACK_MSG MPI_Status local_status; int i; MPI_Request saverequest[TAU_MAX_REQUESTS]; #endif /* TAU_TRACK_MSG */ TAU_PROFILE_TIMER(tautimer, "MPI_Waitany()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); #ifdef TAU_TRACK_MSG for (i = 0; i < count; i++){ saverequest[i] = array_of_requests[i]; } if (status == MPI_STATUS_IGNORE) { status = &local_status; } #endif /* TAU_TRACK_MSG */ returnVal = PMPI_Waitany( count, array_of_requests, index, status ); #ifdef TAU_TRACK_MSG TauProcessRecv( (saverequest[*index]), status, "MPI_Waitany" ); #endif /* TAU_TRACK_MSG */ TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Waitsome( incount, array_of_requests, outcount, array_of_indices, array_of_statuses ) int incount; MPI_Request * array_of_requests; int * outcount; int * array_of_indices; MPI_Status * array_of_statuses; { int returnVal; #ifdef TAU_TRACK_MSG int need_to_free = 0; int i; MPI_Request saverequest[TAU_MAX_REQUESTS]; #endif /* TAU_TRACK_MSG */ TAU_PROFILE_TIMER(tautimer, "MPI_Waitsome()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); #ifdef TAU_TRACK_MSG for (i = 0; i < incount; i++) { saverequest[i] = array_of_requests[i]; } if (array_of_statuses == MPI_STATUSES_IGNORE) { array_of_statuses = (MPI_Status*) malloc (sizeof(MPI_Status)*incount); need_to_free = 1; } #endif /* TAU_TRACK_MSG */ returnVal = PMPI_Waitsome( incount, array_of_requests, outcount, array_of_indices, array_of_statuses ); #ifdef TAU_TRACK_MSG for (i=0; i < *outcount; i++) { TauProcessRecv( (saverequest [array_of_indices[i]]), &(array_of_statuses[i]), "MPI_Waitsome" ); } if (need_to_free) { free(array_of_statuses); } #endif /* TAU_TRACK_MSG */ TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Cart_coords( comm, rank, maxdims, coords ) MPI_Comm comm; int rank; int maxdims; int * coords; { int returnVal; TAU_PROFILE_TIMER(tautimer, "MPI_Cart_coords()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Cart_coords( comm, rank, maxdims, coords ); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Cart_create( comm_old, ndims, dims, periods, reorder, comm_cart ) MPI_Comm comm_old; int ndims; int * dims; int * periods; int reorder; MPI_Comm * comm_cart; { int returnVal; TAU_PROFILE_TIMER(tautimer, "MPI_Cart_create()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Cart_create( comm_old, ndims, dims, periods, reorder, comm_cart ); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Cart_get( comm, maxdims, dims, periods, coords ) MPI_Comm comm; int maxdims; int * dims; int * periods; int * coords; { int returnVal; TAU_PROFILE_TIMER(tautimer, "MPI_Cart_get()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Cart_get( comm, maxdims, dims, periods, coords ); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Cart_map( comm_old, ndims, dims, periods, newrank ) MPI_Comm comm_old; int ndims; int * dims; int * periods; int * newrank; { int returnVal; TAU_PROFILE_TIMER(tautimer, "MPI_Cart_map()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Cart_map( comm_old, ndims, dims, periods, newrank ); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Cart_rank( comm, coords, rank ) MPI_Comm comm; int * coords; int * rank; { int returnVal; TAU_PROFILE_TIMER(tautimer, "MPI_Cart_rank()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Cart_rank( comm, coords, rank ); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Cart_shift( comm, direction, displ, source, dest ) MPI_Comm comm; int direction; int displ; int * source; int * dest; { int returnVal; TAU_PROFILE_TIMER(tautimer, "MPI_Cart_shift()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Cart_shift( comm, direction, displ, source, dest ); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Cart_sub( comm, remain_dims, comm_new ) MPI_Comm comm; int * remain_dims; MPI_Comm * comm_new; { int returnVal; TAU_PROFILE_TIMER(tautimer, "MPI_Cart_sub()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Cart_sub( comm, remain_dims, comm_new ); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Cartdim_get( comm, ndims ) MPI_Comm comm; int * ndims; { int returnVal; TAU_PROFILE_TIMER(tautimer, "MPI_Cartdim_get()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Cartdim_get( comm, ndims ); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Dims_create( nnodes, ndims, dims ) int nnodes; int ndims; int * dims; { int returnVal; TAU_PROFILE_TIMER(tautimer, "MPI_Dims_create()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Dims_create( nnodes, ndims, dims ); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Graph_create( comm_old, nnodes, index, edges, reorder, comm_graph ) MPI_Comm comm_old; int nnodes; int * index; int * edges; int reorder; MPI_Comm * comm_graph; { int returnVal; TAU_PROFILE_TIMER(tautimer, "MPI_Graph_create()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Graph_create( comm_old, nnodes, index, edges, reorder, comm_graph ); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Graph_get( comm, maxindex, maxedges, index, edges ) MPI_Comm comm; int maxindex; int maxedges; int * index; int * edges; { int returnVal; TAU_PROFILE_TIMER(tautimer, "MPI_Graph_get()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Graph_get( comm, maxindex, maxedges, index, edges ); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Graph_map( comm_old, nnodes, index, edges, newrank ) MPI_Comm comm_old; int nnodes; int * index; int * edges; int * newrank; { int returnVal; TAU_PROFILE_TIMER(tautimer, "MPI_Graph_map()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Graph_map( comm_old, nnodes, index, edges, newrank ); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Graph_neighbors( comm, rank, maxneighbors, neighbors ) MPI_Comm comm; int rank; int maxneighbors; int * neighbors; { int returnVal; TAU_PROFILE_TIMER(tautimer, "MPI_Graph_neighbors()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Graph_neighbors( comm, rank, maxneighbors, neighbors ); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Graph_neighbors_count( comm, rank, nneighbors ) MPI_Comm comm; int rank; int * nneighbors; { int returnVal; TAU_PROFILE_TIMER(tautimer, "MPI_Graph_neighbors_count()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Graph_neighbors_count( comm, rank, nneighbors ); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Graphdims_get( comm, nnodes, nedges ) MPI_Comm comm; int * nnodes; int * nedges; { int returnVal; TAU_PROFILE_TIMER(tautimer, "MPI_Graphdims_get()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Graphdims_get( comm, nnodes, nedges ); TAU_PROFILE_STOP(tautimer); return returnVal; } int MPI_Topo_test( comm, top_type ) MPI_Comm comm; int * top_type; { int returnVal; TAU_PROFILE_TIMER(tautimer, "MPI_Topo_test()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Topo_test( comm, top_type ); TAU_PROFILE_STOP(tautimer); return returnVal; } /* EOF TauMpi.c */ tau-2.16.4/src/Profile/TauMpiExtensions.c000066400000000000000000011520051062343042700202140ustar00rootroot00000000000000#include #include #include /******************************************************/ /******************************************************/ #ifdef TAU_MPICONSTCHAR #define TAU_CONST const #else #define TAU_CONST #endif /******************************************************/ /******************************************************/ /* We need to do different things on BGL! */ #ifdef __blrts__ #define TAU_BGL #undef TAU_MPIOREQUEST #endif /****************************************************** *** MPI_Type_get_envelope wrapper function ******************************************************/ int MPI_Type_get_envelope( MPI_Datatype datatype, int * num_integers, int * num_addresses, int * num_datatypes, int * combiner) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_Type_get_envelope()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_Type_get_envelope( datatype, num_integers, num_addresses, num_datatypes, combiner) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_Type_get_envelope wrapper function ******************************************************/ void MPI_TYPE_GET_ENVELOPE( MPI_Fint * datatype, MPI_Fint * num_integers, MPI_Fint * num_addresses, MPI_Fint * num_datatypes, MPI_Fint * combiner, MPI_Fint * ierr) { *ierr = MPI_Type_get_envelope( MPI_Type_f2c(*datatype), num_integers, num_addresses, num_datatypes, combiner) ; return ; } /****************************************************** *** MPI_Type_get_envelope wrapper function ******************************************************/ void mpi_type_get_envelope( MPI_Fint * datatype, MPI_Fint * num_integers, MPI_Fint * num_addresses, MPI_Fint * num_datatypes, MPI_Fint * combiner, MPI_Fint * ierr) { MPI_TYPE_GET_ENVELOPE( datatype, num_integers, num_addresses, num_datatypes, combiner, ierr) ; return ; } /****************************************************** *** MPI_Type_get_envelope wrapper function ******************************************************/ void mpi_type_get_envelope_( MPI_Fint * datatype, MPI_Fint * num_integers, MPI_Fint * num_addresses, MPI_Fint * num_datatypes, MPI_Fint * combiner, MPI_Fint * ierr) { MPI_TYPE_GET_ENVELOPE( datatype, num_integers, num_addresses, num_datatypes, combiner, ierr) ; return ; } /****************************************************** *** MPI_Type_get_envelope wrapper function ******************************************************/ void mpi_type_get_envelope__( MPI_Fint * datatype, MPI_Fint * num_integers, MPI_Fint * num_addresses, MPI_Fint * num_datatypes, MPI_Fint * combiner, MPI_Fint * ierr) { MPI_TYPE_GET_ENVELOPE( datatype, num_integers, num_addresses, num_datatypes, combiner, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_Type_get_contents wrapper function ******************************************************/ int MPI_Type_get_contents( MPI_Datatype datatype, int max_integers, int max_addresses, int max_datatypes, int * array_of_integers, MPI_Aint * array_of_addresses, MPI_Datatype * array_of_datatypes) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_Type_get_contents()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_Type_get_contents( datatype, max_integers, max_addresses, max_datatypes, array_of_integers, array_of_addresses, array_of_datatypes) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_Type_get_contents wrapper function ******************************************************/ void MPI_TYPE_GET_CONTENTS( MPI_Fint * datatype, MPI_Fint * max_integers, MPI_Fint * max_addresses, MPI_Fint * max_datatypes, MPI_Fint * array_of_integers, MPI_Aint * array_of_addresses, MPI_Aint * array_of_datatypes, MPI_Fint * ierr) { TAU_DECL_ALLOC_LOCAL(MPI_Datatype, local_types, *max_datatypes); *ierr = MPI_Type_get_contents( MPI_Type_f2c(*datatype), *max_integers, *max_addresses, *max_datatypes, array_of_integers, array_of_addresses, local_types) ; TAU_ASSIGN_VALUES(array_of_datatypes, local_types, *max_datatypes, MPI_Type_c2f); return ; } /****************************************************** *** MPI_Type_get_contents wrapper function ******************************************************/ void mpi_type_get_contents( MPI_Fint * datatype, MPI_Fint * max_integers, MPI_Fint * max_addresses, MPI_Fint * max_datatypes, MPI_Fint * array_of_integers, MPI_Aint * array_of_addresses, MPI_Aint * array_of_datatypes, MPI_Fint * ierr) { MPI_TYPE_GET_CONTENTS( datatype, max_integers, max_addresses, max_datatypes, array_of_integers, array_of_addresses, array_of_datatypes, ierr) ; return ; } /****************************************************** *** MPI_Type_get_contents wrapper function ******************************************************/ void mpi_type_get_contents_( MPI_Fint * datatype, MPI_Fint * max_integers, MPI_Fint * max_addresses, MPI_Fint * max_datatypes, MPI_Fint * array_of_integers, MPI_Aint * array_of_addresses, MPI_Aint * array_of_datatypes, MPI_Fint * ierr) { MPI_TYPE_GET_CONTENTS( datatype, max_integers, max_addresses, max_datatypes, array_of_integers, array_of_addresses, array_of_datatypes, ierr) ; return ; } /****************************************************** *** MPI_Type_get_contents wrapper function ******************************************************/ void mpi_type_get_contents__( MPI_Fint * datatype, MPI_Fint * max_integers, MPI_Fint * max_addresses, MPI_Fint * max_datatypes, MPI_Fint * array_of_integers, MPI_Aint * array_of_addresses, MPI_Aint * array_of_datatypes, MPI_Fint * ierr) { MPI_TYPE_GET_CONTENTS( datatype, max_integers, max_addresses, max_datatypes, array_of_integers, array_of_addresses, array_of_datatypes, ierr) ; return ; } /******************************************************/ /******************************************************/ #ifdef TAU_MPIATTRFUNCTION /****************************************************** *** MPI_Type_create_keyval wrapper function ******************************************************/ int MPI_Type_create_keyval( MPI_Type_copy_attr_function * type_copy_attr_fn, MPI_Type_delete_attr_function * type_delete_attr_fn, int * type_keyval, void * extra_state) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_Type_create_keyval()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_Type_create_keyval( type_copy_attr_fn, type_delete_attr_fn, type_keyval, extra_state) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_Type_create_keyval wrapper function ******************************************************/ void MPI_TYPE_CREATE_KEYVAL( MPI_Type_copy_attr_function * type_copy_attr_fn, MPI_Type_delete_attr_function * type_delete_attr_fn, MPI_Fint * type_keyval, MPI_Aint * extra_state, MPI_Fint * ierr) { *ierr = MPI_Type_create_keyval( type_copy_attr_fn, type_delete_attr_fn, type_keyval, extra_state) ; return ; } /****************************************************** *** MPI_Type_create_keyval wrapper function ******************************************************/ void mpi_type_create_keyval( MPI_Type_copy_attr_function * type_copy_attr_fn, MPI_Type_delete_attr_function * type_delete_attr_fn, MPI_Fint * type_keyval, MPI_Aint * extra_state, MPI_Fint * ierr) { MPI_TYPE_CREATE_KEYVAL( type_copy_attr_fn, type_delete_attr_fn, type_keyval, extra_state, ierr) ; return ; } /****************************************************** *** MPI_Type_create_keyval wrapper function ******************************************************/ void mpi_type_create_keyval_( MPI_Type_copy_attr_function * type_copy_attr_fn, MPI_Type_delete_attr_function * type_delete_attr_fn, MPI_Fint * type_keyval, MPI_Aint * extra_state, MPI_Fint * ierr) { MPI_TYPE_CREATE_KEYVAL( type_copy_attr_fn, type_delete_attr_fn, type_keyval, extra_state, ierr) ; return ; } /****************************************************** *** MPI_Type_create_keyval wrapper function ******************************************************/ void mpi_type_create_keyval__( MPI_Type_copy_attr_function * type_copy_attr_fn, MPI_Type_delete_attr_function * type_delete_attr_fn, MPI_Fint * type_keyval, MPI_Aint * extra_state, MPI_Fint * ierr) { MPI_TYPE_CREATE_KEYVAL( type_copy_attr_fn, type_delete_attr_fn, type_keyval, extra_state, ierr) ; return ; } #endif /* TAU_MPIATTRFUNCTION */ /******************************************************/ /******************************************************/ /****************************************************** *** MPI_Type_delete_attr wrapper function ******************************************************/ int MPI_Type_delete_attr( MPI_Datatype type, int type_keyval) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_Type_delete_attr()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_Type_delete_attr( type, type_keyval) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_Type_delete_attr wrapper function ******************************************************/ void MPI_TYPE_DELETE_ATTR( MPI_Fint * type, MPI_Fint * type_keyval, MPI_Fint * ierr) { *ierr = MPI_Type_delete_attr( MPI_Type_f2c(*type), *type_keyval) ; return ; } /****************************************************** *** MPI_Type_delete_attr wrapper function ******************************************************/ void mpi_type_delete_attr( MPI_Fint * type, MPI_Fint * type_keyval, MPI_Fint * ierr) { MPI_TYPE_DELETE_ATTR( type, type_keyval, ierr) ; return ; } /****************************************************** *** MPI_Type_delete_attr wrapper function ******************************************************/ void mpi_type_delete_attr_( MPI_Fint * type, MPI_Fint * type_keyval, MPI_Fint * ierr) { MPI_TYPE_DELETE_ATTR( type, type_keyval, ierr) ; return ; } /****************************************************** *** MPI_Type_delete_attr wrapper function ******************************************************/ void mpi_type_delete_attr__( MPI_Fint * type, MPI_Fint * type_keyval, MPI_Fint * ierr) { MPI_TYPE_DELETE_ATTR( type, type_keyval, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_Type_free_keyval wrapper function ******************************************************/ int MPI_Type_free_keyval( int * type_keyval) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_Type_free_keyval()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_Type_free_keyval( type_keyval) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_Type_free_keyval wrapper function ******************************************************/ void MPI_TYPE_FREE_KEYVAL( MPI_Fint * type_keyval, MPI_Fint * ierr) { *ierr = MPI_Type_free_keyval( type_keyval) ; return ; } /****************************************************** *** MPI_Type_free_keyval wrapper function ******************************************************/ void mpi_type_free_keyval( MPI_Fint * type_keyval, MPI_Fint * ierr) { MPI_TYPE_FREE_KEYVAL( type_keyval, ierr) ; return ; } /****************************************************** *** MPI_Type_free_keyval wrapper function ******************************************************/ void mpi_type_free_keyval_( MPI_Fint * type_keyval, MPI_Fint * ierr) { MPI_TYPE_FREE_KEYVAL( type_keyval, ierr) ; return ; } /****************************************************** *** MPI_Type_free_keyval wrapper function ******************************************************/ void mpi_type_free_keyval__( MPI_Fint * type_keyval, MPI_Fint * ierr) { MPI_TYPE_FREE_KEYVAL( type_keyval, ierr) ; return ; } /******************************************************/ /******************************************************/ #ifdef TAU_MPIATTRFUNCTION /****************************************************** *** MPI_Type_get_attr wrapper function ******************************************************/ int MPI_Type_get_attr( MPI_Datatype type, int type_keyval, void * attribute_val, int * flag) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_Type_get_attr()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_Type_get_attr( type, type_keyval, attribute_val, flag) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_Type_get_attr wrapper function ******************************************************/ void MPI_TYPE_GET_ATTR( MPI_Fint * type, MPI_Fint * type_keyval, MPI_Aint * attribute_val, MPI_Fint * flag, MPI_Fint * ierr) { *ierr = MPI_Type_get_attr( MPI_Type_f2c(*type), *type_keyval, attribute_val, flag) ; return ; } /****************************************************** *** MPI_Type_get_attr wrapper function ******************************************************/ void mpi_type_get_attr( MPI_Fint * type, MPI_Fint * type_keyval, MPI_Aint * attribute_val, MPI_Fint * flag, MPI_Fint * ierr) { MPI_TYPE_GET_ATTR( type, type_keyval, attribute_val, flag, ierr) ; return ; } /****************************************************** *** MPI_Type_get_attr wrapper function ******************************************************/ void mpi_type_get_attr_( MPI_Fint * type, MPI_Fint * type_keyval, MPI_Aint * attribute_val, MPI_Fint * flag, MPI_Fint * ierr) { MPI_TYPE_GET_ATTR( type, type_keyval, attribute_val, flag, ierr) ; return ; } /****************************************************** *** MPI_Type_get_attr wrapper function ******************************************************/ void mpi_type_get_attr__( MPI_Fint * type, MPI_Fint * type_keyval, MPI_Aint * attribute_val, MPI_Fint * flag, MPI_Fint * ierr) { MPI_TYPE_GET_ATTR( type, type_keyval, attribute_val, flag, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_Type_set_attr wrapper function ******************************************************/ int MPI_Type_set_attr( MPI_Datatype type, int type_keyval, void * attribute_val) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_Type_set_attr()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_Type_set_attr( type, type_keyval, attribute_val) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_Type_set_attr wrapper function ******************************************************/ void MPI_TYPE_SET_ATTR( MPI_Fint * type, MPI_Fint * type_keyval, MPI_Aint * attribute_val, MPI_Fint * ierr) { *ierr = MPI_Type_set_attr( MPI_Type_f2c(*type), *type_keyval, attribute_val) ; return ; } /****************************************************** *** MPI_Type_set_attr wrapper function ******************************************************/ void mpi_type_set_attr( MPI_Fint * type, MPI_Fint * type_keyval, MPI_Aint * attribute_val, MPI_Fint * ierr) { MPI_TYPE_SET_ATTR( type, type_keyval, attribute_val, ierr) ; return ; } /****************************************************** *** MPI_Type_set_attr wrapper function ******************************************************/ void mpi_type_set_attr_( MPI_Fint * type, MPI_Fint * type_keyval, MPI_Aint * attribute_val, MPI_Fint * ierr) { MPI_TYPE_SET_ATTR( type, type_keyval, attribute_val, ierr) ; return ; } /****************************************************** *** MPI_Type_set_attr wrapper function ******************************************************/ void mpi_type_set_attr__( MPI_Fint * type, MPI_Fint * type_keyval, MPI_Aint * attribute_val, MPI_Fint * ierr) { MPI_TYPE_SET_ATTR( type, type_keyval, attribute_val, ierr) ; return ; } /******************************************************/ /******************************************************/ #endif /* TAU_MPIATTRFUNCTION */ #ifdef TAU_MPITYPEEX /****************************************************** *** MPI_Type_dup wrapper function ******************************************************/ int MPI_Type_dup( MPI_Datatype type, MPI_Datatype * newtype) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_Type_dup()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_Type_dup( type, newtype) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_Type_dup wrapper function ******************************************************/ void MPI_TYPE_DUP( MPI_Fint * type, MPI_Fint * newtype, MPI_Fint * ierr) { MPI_Datatype local_type; *ierr = MPI_Type_dup( MPI_Type_f2c(*type), &local_type) ; *newtype = MPI_Type_c2f(local_type); return ; } /****************************************************** *** MPI_Type_dup wrapper function ******************************************************/ void mpi_type_dup( MPI_Fint * type, MPI_Fint * newtype, MPI_Fint * ierr) { MPI_TYPE_DUP( type, newtype, ierr) ; return ; } /****************************************************** *** MPI_Type_dup wrapper function ******************************************************/ void mpi_type_dup_( MPI_Fint * type, MPI_Fint * newtype, MPI_Fint * ierr) { MPI_TYPE_DUP( type, newtype, ierr) ; return ; } /****************************************************** *** MPI_Type_dup wrapper function ******************************************************/ void mpi_type_dup__( MPI_Fint * type, MPI_Fint * newtype, MPI_Fint * ierr) { MPI_TYPE_DUP( type, newtype, ierr) ; return ; } #endif /* TAU_MPI_TYPEEX */ /******************************************************/ /******************************************************/ /****************************************************** *** MPI_Type_create_hindexed wrapper function ******************************************************/ int MPI_Type_create_hindexed( int count, int * array_of_blocklengths, MPI_Aint * array_of_displacements, MPI_Datatype oldtype, MPI_Datatype * newtype) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_Type_create_hindexed()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_Type_create_hindexed( count, array_of_blocklengths, array_of_displacements, oldtype, newtype) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_Type_create_hindexed wrapper function ******************************************************/ void MPI_TYPE_CREATE_HINDEXED( MPI_Fint * count, MPI_Fint * array_of_blocklengths, MPI_Aint * array_of_displacements, MPI_Fint * oldtype, MPI_Fint * newtype, MPI_Fint * ierr) { MPI_Datatype local_type; *ierr = MPI_Type_create_hindexed( *count, array_of_blocklengths, array_of_displacements, MPI_Type_f2c(*oldtype), &local_type) ; *newtype = MPI_Type_c2f(local_type); return ; } /****************************************************** *** MPI_Type_create_hindexed wrapper function ******************************************************/ void mpi_type_create_hindexed( MPI_Fint * count, MPI_Fint * array_of_blocklengths, MPI_Aint * array_of_displacements, MPI_Fint * oldtype, MPI_Fint * newtype, MPI_Fint * ierr) { MPI_TYPE_CREATE_HINDEXED( count, array_of_blocklengths, array_of_displacements, oldtype, newtype, ierr) ; return ; } /****************************************************** *** MPI_Type_create_hindexed wrapper function ******************************************************/ void mpi_type_create_hindexed_( MPI_Fint * count, MPI_Fint * array_of_blocklengths, MPI_Aint * array_of_displacements, MPI_Fint * oldtype, MPI_Fint * newtype, MPI_Fint * ierr) { MPI_TYPE_CREATE_HINDEXED( count, array_of_blocklengths, array_of_displacements, oldtype, newtype, ierr) ; return ; } /****************************************************** *** MPI_Type_create_hindexed wrapper function ******************************************************/ void mpi_type_create_hindexed__( MPI_Fint * count, MPI_Fint * array_of_blocklengths, MPI_Aint * array_of_displacements, MPI_Fint * oldtype, MPI_Fint * newtype, MPI_Fint * ierr) { MPI_TYPE_CREATE_HINDEXED( count, array_of_blocklengths, array_of_displacements, oldtype, newtype, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_Type_create_hvector wrapper function ******************************************************/ int MPI_Type_create_hvector( int count, int blocklength, MPI_Aint stride, MPI_Datatype oldtype, MPI_Datatype * newtype) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_Type_create_hvector()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_Type_create_hvector( count, blocklength, stride, oldtype, newtype) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_Type_create_hvector wrapper function ******************************************************/ void MPI_TYPE_CREATE_HVECTOR( MPI_Fint * count, MPI_Fint * blocklength, MPI_Aint * stride, MPI_Fint * oldtype, MPI_Fint * newtype, MPI_Fint * ierr) { MPI_Datatype local_type; *ierr = MPI_Type_create_hvector( *count, *blocklength, *stride, MPI_Type_f2c(*oldtype), &local_type) ; *newtype = MPI_Type_c2f(local_type); return ; } /****************************************************** *** MPI_Type_create_hvector wrapper function ******************************************************/ void mpi_type_create_hvector( MPI_Fint * count, MPI_Fint * blocklength, MPI_Aint * stride, MPI_Fint * oldtype, MPI_Fint * newtype, MPI_Fint * ierr) { MPI_TYPE_CREATE_HVECTOR( count, blocklength, stride, oldtype, newtype, ierr) ; return ; } /****************************************************** *** MPI_Type_create_hvector wrapper function ******************************************************/ void mpi_type_create_hvector_( MPI_Fint * count, MPI_Fint * blocklength, MPI_Aint * stride, MPI_Fint * oldtype, MPI_Fint * newtype, MPI_Fint * ierr) { MPI_TYPE_CREATE_HVECTOR( count, blocklength, stride, oldtype, newtype, ierr) ; return ; } /****************************************************** *** MPI_Type_create_hvector wrapper function ******************************************************/ void mpi_type_create_hvector__( MPI_Fint * count, MPI_Fint * blocklength, MPI_Aint * stride, MPI_Fint * oldtype, MPI_Fint * newtype, MPI_Fint * ierr) { MPI_TYPE_CREATE_HVECTOR( count, blocklength, stride, oldtype, newtype, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_Type_create_struct wrapper function ******************************************************/ int MPI_Type_create_struct( int count, int * array_of_blocklengths, MPI_Aint * array_of_displacements, MPI_Datatype * array_of_types, MPI_Datatype * newtype) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_Type_create_struct()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_Type_create_struct( count, array_of_blocklengths, array_of_displacements, array_of_types, newtype) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_Type_create_struct wrapper function ******************************************************/ void MPI_TYPE_CREATE_STRUCT( MPI_Fint * count, MPI_Fint * array_of_blocklengths, MPI_Aint * array_of_displacements, MPI_Aint * array_of_types, MPI_Fint * newtype, MPI_Fint * ierr) { MPI_Datatype local_type; TAU_DECL_ALLOC_LOCAL(MPI_Datatype, ary_local_types, *count); TAU_ASSIGN_VALUES(ary_local_types, array_of_types, *count, MPI_Type_f2c); *ierr = MPI_Type_create_struct( *count, array_of_blocklengths, array_of_displacements, ary_local_types, &local_type) ; *newtype = MPI_Type_c2f(local_type); return ; } /****************************************************** *** MPI_Type_create_struct wrapper function ******************************************************/ void mpi_type_create_struct( MPI_Fint * count, MPI_Fint * array_of_blocklengths, MPI_Aint * array_of_displacements, MPI_Aint * array_of_types, MPI_Fint * newtype, MPI_Fint * ierr) { MPI_TYPE_CREATE_STRUCT( count, array_of_blocklengths, array_of_displacements, array_of_types, newtype, ierr) ; return ; } /****************************************************** *** MPI_Type_create_struct wrapper function ******************************************************/ void mpi_type_create_struct_( MPI_Fint * count, MPI_Fint * array_of_blocklengths, MPI_Aint * array_of_displacements, MPI_Aint * array_of_types, MPI_Fint * newtype, MPI_Fint * ierr) { MPI_TYPE_CREATE_STRUCT( count, array_of_blocklengths, array_of_displacements, array_of_types, newtype, ierr) ; return ; } /****************************************************** *** MPI_Type_create_struct wrapper function ******************************************************/ void mpi_type_create_struct__( MPI_Fint * count, MPI_Fint * array_of_blocklengths, MPI_Aint * array_of_displacements, MPI_Aint * array_of_types, MPI_Fint * newtype, MPI_Fint * ierr) { MPI_TYPE_CREATE_STRUCT( count, array_of_blocklengths, array_of_displacements, array_of_types, newtype, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_Type_get_extent wrapper function ******************************************************/ int MPI_Type_get_extent( MPI_Datatype datatype, MPI_Aint * lb, MPI_Aint * extent) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_Type_get_extent()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_Type_get_extent( datatype, lb, extent) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_Type_get_extent wrapper function ******************************************************/ void MPI_TYPE_GET_EXTENT( MPI_Fint * datatype, MPI_Aint * lb, MPI_Aint * extent, MPI_Fint * ierr) { *ierr = MPI_Type_get_extent( MPI_Type_f2c(*datatype), lb, extent) ; return ; } /****************************************************** *** MPI_Type_get_extent wrapper function ******************************************************/ void mpi_type_get_extent( MPI_Fint * datatype, MPI_Aint * lb, MPI_Aint * extent, MPI_Fint * ierr) { MPI_TYPE_GET_EXTENT( datatype, lb, extent, ierr) ; return ; } /****************************************************** *** MPI_Type_get_extent wrapper function ******************************************************/ void mpi_type_get_extent_( MPI_Fint * datatype, MPI_Aint * lb, MPI_Aint * extent, MPI_Fint * ierr) { MPI_TYPE_GET_EXTENT( datatype, lb, extent, ierr) ; return ; } /****************************************************** *** MPI_Type_get_extent wrapper function ******************************************************/ void mpi_type_get_extent__( MPI_Fint * datatype, MPI_Aint * lb, MPI_Aint * extent, MPI_Fint * ierr) { MPI_TYPE_GET_EXTENT( datatype, lb, extent, ierr) ; return ; } /******************************************************/ /******************************************************/ #ifdef TAU_MPITYPEEX #ifndef TAU_BGL #ifdef TAU_MPITYPEEX_F90 /****************************************************** *** MPI_Type_create_f90_real wrapper function ******************************************************/ int MPI_Type_create_f90_real( int p, int r, MPI_Datatype * newtype) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_Type_create_f90_real()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_Type_create_f90_real( p, r, newtype) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_Type_create_f90_real wrapper function ******************************************************/ void MPI_TYPE_CREATE_F90_REAL( MPI_Fint * p, MPI_Fint * r, MPI_Fint * newtype, MPI_Fint * ierr) { MPI_Datatype local_type; *ierr = MPI_Type_create_f90_real( *p, *r, &local_type) ; *newtype = MPI_Type_c2f(local_type); return ; } /****************************************************** *** MPI_Type_create_f90_real wrapper function ******************************************************/ void mpi_type_create_f90_real( MPI_Fint * p, MPI_Fint * r, MPI_Fint * newtype, MPI_Fint * ierr) { MPI_TYPE_CREATE_F90_REAL( p, r, newtype, ierr) ; return ; } /****************************************************** *** MPI_Type_create_f90_real wrapper function ******************************************************/ void mpi_type_create_f90_real_( MPI_Fint * p, MPI_Fint * r, MPI_Fint * newtype, MPI_Fint * ierr) { MPI_TYPE_CREATE_F90_REAL( p, r, newtype, ierr) ; return ; } /****************************************************** *** MPI_Type_create_f90_real wrapper function ******************************************************/ void mpi_type_create_f90_real__( MPI_Fint * p, MPI_Fint * r, MPI_Fint * newtype, MPI_Fint * ierr) { MPI_TYPE_CREATE_F90_REAL( p, r, newtype, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_Type_create_f90_complex wrapper function ******************************************************/ int MPI_Type_create_f90_complex( int p, int r, MPI_Datatype * newtype) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_Type_create_f90_complex()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_Type_create_f90_complex( p, r, newtype) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_Type_create_f90_complex wrapper function ******************************************************/ void MPI_TYPE_CREATE_F90_COMPLEX( MPI_Fint * p, MPI_Fint * r, MPI_Fint * newtype, MPI_Fint * ierr) { MPI_Datatype local_type; *ierr = MPI_Type_create_f90_complex( *p, *r, &local_type) ; *newtype = MPI_Type_c2f(local_type); return ; } /****************************************************** *** MPI_Type_create_f90_complex wrapper function ******************************************************/ void mpi_type_create_f90_complex( MPI_Fint * p, MPI_Fint * r, MPI_Fint * newtype, MPI_Fint * ierr) { MPI_TYPE_CREATE_F90_COMPLEX( p, r, newtype, ierr) ; return ; } /****************************************************** *** MPI_Type_create_f90_complex wrapper function ******************************************************/ void mpi_type_create_f90_complex_( MPI_Fint * p, MPI_Fint * r, MPI_Fint * newtype, MPI_Fint * ierr) { MPI_TYPE_CREATE_F90_COMPLEX( p, r, newtype, ierr) ; return ; } /****************************************************** *** MPI_Type_create_f90_complex wrapper function ******************************************************/ void mpi_type_create_f90_complex__( MPI_Fint * p, MPI_Fint * r, MPI_Fint * newtype, MPI_Fint * ierr) { MPI_TYPE_CREATE_F90_COMPLEX( p, r, newtype, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_Type_create_f90_integer wrapper function ******************************************************/ int MPI_Type_create_f90_integer( int r, MPI_Datatype * newtype) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_Type_create_f90_integer()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_Type_create_f90_integer( r, newtype) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_Type_create_f90_integer wrapper function ******************************************************/ void MPI_TYPE_CREATE_F90_INTEGER( MPI_Fint * r, MPI_Fint * newtype, MPI_Fint * ierr) { MPI_Datatype local_type; *ierr = MPI_Type_create_f90_integer( *r, &local_type) ; *newtype = MPI_Type_c2f(local_type); return ; } /****************************************************** *** MPI_Type_create_f90_integer wrapper function ******************************************************/ void mpi_type_create_f90_integer( MPI_Fint * r, MPI_Fint * newtype, MPI_Fint * ierr) { MPI_TYPE_CREATE_F90_INTEGER( r, newtype, ierr) ; return ; } /****************************************************** *** MPI_Type_create_f90_integer wrapper function ******************************************************/ void mpi_type_create_f90_integer_( MPI_Fint * r, MPI_Fint * newtype, MPI_Fint * ierr) { MPI_TYPE_CREATE_F90_INTEGER( r, newtype, ierr) ; return ; } /****************************************************** *** MPI_Type_create_f90_integer wrapper function ******************************************************/ void mpi_type_create_f90_integer__( MPI_Fint * r, MPI_Fint * newtype, MPI_Fint * ierr) { MPI_TYPE_CREATE_F90_INTEGER( r, newtype, ierr) ; return ; } /******************************************************/ /******************************************************/ #endif /* TAU_MPITYPEEX_F90 */ #endif /* TAU_BGL */ /****************************************************** *** MPI_Type_match_size wrapper function ******************************************************/ int MPI_Type_match_size( int typeclass, int size, MPI_Datatype * type) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_Type_match_size()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_Type_match_size( typeclass, size, type) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_Type_match_size wrapper function ******************************************************/ void MPI_TYPE_MATCH_SIZE( MPI_Fint * typeclass, MPI_Fint * size, MPI_Fint * type, MPI_Fint * ierr) { MPI_Datatype local_type; *ierr = MPI_Type_match_size( *typeclass, *size, &local_type) ; *type = MPI_Type_c2f(local_type); return ; } /****************************************************** *** MPI_Type_match_size wrapper function ******************************************************/ void mpi_type_match_size( MPI_Fint * typeclass, MPI_Fint * size, MPI_Fint * type, MPI_Fint * ierr) { MPI_TYPE_MATCH_SIZE( typeclass, size, type, ierr) ; return ; } /****************************************************** *** MPI_Type_match_size wrapper function ******************************************************/ void mpi_type_match_size_( MPI_Fint * typeclass, MPI_Fint * size, MPI_Fint * type, MPI_Fint * ierr) { MPI_TYPE_MATCH_SIZE( typeclass, size, type, ierr) ; return ; } /****************************************************** *** MPI_Type_match_size wrapper function ******************************************************/ void mpi_type_match_size__( MPI_Fint * typeclass, MPI_Fint * size, MPI_Fint * type, MPI_Fint * ierr) { MPI_TYPE_MATCH_SIZE( typeclass, size, type, ierr) ; return ; } #endif /* TAU_MPI_TYPEEX */ /******************************************************/ /******************************************************/ /****************************************************** *** MPI_Alltoallw wrapper function ******************************************************/ int MPI_Alltoallw( void * sendbuf, int * sendcounts, int * sdispls, MPI_Datatype * sendtypes, void * recvbuf, int * recvcounts, int * rdispls, MPI_Datatype * recvtypes, MPI_Comm comm) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_Alltoallw()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_Alltoallw( sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_Alltoallw wrapper function ******************************************************/ void MPI_ALLTOALLW( MPI_Aint * sendbuf, MPI_Fint * sendcounts, MPI_Fint * sdispls, MPI_Fint * sendtypes, MPI_Aint * recvbuf, MPI_Fint * recvcounts, MPI_Fint * rdispls, MPI_Fint * recvtypes, MPI_Fint * comm, MPI_Fint * ierr) { TAU_DECL_LOCAL(MPI_Datatype, local_send_types); TAU_DECL_ALLOC_LOCAL(MPI_Datatype, local_recv_types, *recvcounts); TAU_ALLOC_LOCAL(MPI_Datatype, local_send_types, *sendcounts); TAU_ASSIGN_VALUES(local_send_types, sendtypes, *sendcounts, MPI_Type_f2c); TAU_ASSIGN_VALUES(local_recv_types, recvtypes, *recvcounts, MPI_Type_f2c); *ierr = MPI_Alltoallw( sendbuf, sendcounts, sdispls, local_send_types, recvbuf, recvcounts, rdispls, local_recv_types, MPI_Comm_f2c(*comm)) ; return ; } /****************************************************** *** MPI_Alltoallw wrapper function ******************************************************/ void mpi_alltoallw( MPI_Aint * sendbuf, MPI_Fint * sendcounts, MPI_Fint * sdispls, MPI_Fint * sendtypes, MPI_Aint * recvbuf, MPI_Fint * recvcounts, MPI_Fint * rdispls, MPI_Fint * recvtypes, MPI_Fint * comm, MPI_Fint * ierr) { MPI_ALLTOALLW( sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm, ierr) ; return ; } /****************************************************** *** MPI_Alltoallw wrapper function ******************************************************/ void mpi_alltoallw_( MPI_Aint * sendbuf, MPI_Fint * sendcounts, MPI_Fint * sdispls, MPI_Fint * sendtypes, MPI_Aint * recvbuf, MPI_Fint * recvcounts, MPI_Fint * rdispls, MPI_Fint * recvtypes, MPI_Fint * comm, MPI_Fint * ierr) { MPI_ALLTOALLW( sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm, ierr) ; return ; } /****************************************************** *** MPI_Alltoallw wrapper function ******************************************************/ void mpi_alltoallw__( MPI_Aint * sendbuf, MPI_Fint * sendcounts, MPI_Fint * sdispls, MPI_Fint * sendtypes, MPI_Aint * recvbuf, MPI_Fint * recvcounts, MPI_Fint * rdispls, MPI_Fint * recvtypes, MPI_Fint * comm, MPI_Fint * ierr) { MPI_ALLTOALLW( sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm, ierr) ; return ; } /******************************************************/ /******************************************************/ #ifdef TAU_MPITYPEEX /****************************************************** *** MPI_Exscan wrapper function ******************************************************/ int MPI_Exscan( void * sendbuf, void * recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_Exscan()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_Exscan( sendbuf, recvbuf, count, datatype, op, comm) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_Exscan wrapper function ******************************************************/ void MPI_EXSCAN( MPI_Aint * sendbuf, MPI_Aint * recvbuf, MPI_Fint * count, MPI_Fint * datatype, MPI_Fint * op, MPI_Fint * comm, MPI_Fint * ierr) { *ierr = MPI_Exscan( sendbuf, recvbuf, *count, MPI_Type_f2c(*datatype), MPI_Op_f2c(*op), MPI_Comm_f2c(*comm)) ; return ; } /****************************************************** *** MPI_Exscan wrapper function ******************************************************/ void mpi_exscan( MPI_Aint * sendbuf, MPI_Aint * recvbuf, MPI_Fint * count, MPI_Fint * datatype, MPI_Fint * op, MPI_Fint * comm, MPI_Fint * ierr) { MPI_EXSCAN( sendbuf, recvbuf, count, datatype, op, comm, ierr) ; return ; } /****************************************************** *** MPI_Exscan wrapper function ******************************************************/ void mpi_exscan_( MPI_Aint * sendbuf, MPI_Aint * recvbuf, MPI_Fint * count, MPI_Fint * datatype, MPI_Fint * op, MPI_Fint * comm, MPI_Fint * ierr) { MPI_EXSCAN( sendbuf, recvbuf, count, datatype, op, comm, ierr) ; return ; } /****************************************************** *** MPI_Exscan wrapper function ******************************************************/ void mpi_exscan__( MPI_Aint * sendbuf, MPI_Aint * recvbuf, MPI_Fint * count, MPI_Fint * datatype, MPI_Fint * op, MPI_Fint * comm, MPI_Fint * ierr) { MPI_EXSCAN( sendbuf, recvbuf, count, datatype, op, comm, ierr) ; return ; } #endif /* TAU_MPI_TYPEEX */ /******************************************************/ /******************************************************/ #ifdef TAU_MPIERRHANDLER /****************************************************** *** MPI_Comm_create_errhandler wrapper function ******************************************************/ int MPI_Comm_create_errhandler( MPI_Comm_errhandler_fn * function, MPI_Errhandler * errhandler) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_Comm_create_errhandler()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_Comm_create_errhandler( function, errhandler) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_Comm_create_errhandler wrapper function ******************************************************/ void MPI_COMM_CREATE_ERRHANDLER( MPI_Comm_errhandler_fn * function, MPI_Errhandler * errhandler, MPI_Fint * ierr) { MPI_Errhandler local_errhandler; *ierr = MPI_Comm_create_errhandler( function, &local_errhandler) ; *errhandler = MPI_Errhandler_c2f(local_errhandler); return ; } /****************************************************** *** MPI_Comm_create_errhandler wrapper function ******************************************************/ void mpi_comm_create_errhandler( MPI_Comm_errhandler_fn * function, MPI_Errhandler * errhandler, MPI_Fint * ierr) { MPI_COMM_CREATE_ERRHANDLER( function, errhandler, ierr) ; return ; } /****************************************************** *** MPI_Comm_create_errhandler wrapper function ******************************************************/ void mpi_comm_create_errhandler_( MPI_Comm_errhandler_fn * function, MPI_Errhandler * errhandler, MPI_Fint * ierr) { MPI_COMM_CREATE_ERRHANDLER( function, errhandler, ierr) ; return ; } /****************************************************** *** MPI_Comm_create_errhandler wrapper function ******************************************************/ void mpi_comm_create_errhandler__( MPI_Comm_errhandler_fn * function, MPI_Errhandler * errhandler, MPI_Fint * ierr) { MPI_COMM_CREATE_ERRHANDLER( function, errhandler, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_Comm_get_errhandler wrapper function ******************************************************/ int MPI_Comm_get_errhandler( MPI_Comm comm, MPI_Errhandler * errhandler) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_Comm_get_errhandler()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_Comm_get_errhandler( comm, errhandler) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_Comm_get_errhandler wrapper function ******************************************************/ void MPI_COMM_GET_ERRHANDLER( MPI_Fint * comm, MPI_Fint * errhandler, MPI_Fint * ierr) { MPI_Comm local_comm; MPI_Errhandler local_errhandler; local_comm = MPI_Comm_f2c(*comm); *ierr = MPI_Comm_get_errhandler(local_comm, &local_errhandler) ; *errhandler = MPI_Errhandler_c2f(local_errhandler); return ; } /****************************************************** *** MPI_Comm_get_errhandler wrapper function ******************************************************/ void mpi_comm_get_errhandler( MPI_Fint * comm, MPI_Fint * errhandler, MPI_Fint * ierr) { MPI_COMM_GET_ERRHANDLER( comm, errhandler, ierr) ; return ; } /****************************************************** *** MPI_Comm_get_errhandler wrapper function ******************************************************/ void mpi_comm_get_errhandler_( MPI_Fint * comm, MPI_Fint * errhandler, MPI_Fint * ierr) { MPI_COMM_GET_ERRHANDLER( comm, errhandler, ierr) ; return ; } /****************************************************** *** MPI_Comm_get_errhandler wrapper function ******************************************************/ void mpi_comm_get_errhandler__( MPI_Fint * comm, MPI_Fint * errhandler, MPI_Fint * ierr) { MPI_COMM_GET_ERRHANDLER( comm, errhandler, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_Comm_set_errhandler wrapper function ******************************************************/ int MPI_Comm_set_errhandler( MPI_Comm comm, MPI_Errhandler errhandler) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_Comm_set_errhandler()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_Comm_set_errhandler( comm, errhandler) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_Comm_set_errhandler wrapper function ******************************************************/ void MPI_COMM_SET_ERRHANDLER( MPI_Fint * comm, MPI_Fint * errhandler, MPI_Fint * ierr) { *ierr = MPI_Comm_set_errhandler( MPI_Comm_f2c(*comm), MPI_Errhandler_f2c(*errhandler)) ; return ; } /****************************************************** *** MPI_Comm_set_errhandler wrapper function ******************************************************/ void mpi_comm_set_errhandler( MPI_Fint * comm, MPI_Fint * errhandler, MPI_Fint * ierr) { MPI_COMM_SET_ERRHANDLER( comm, errhandler, ierr) ; return ; } /****************************************************** *** MPI_Comm_set_errhandler wrapper function ******************************************************/ void mpi_comm_set_errhandler_( MPI_Fint * comm, MPI_Fint * errhandler, MPI_Fint * ierr) { MPI_COMM_SET_ERRHANDLER( comm, errhandler, ierr) ; return ; } /****************************************************** *** MPI_Comm_set_errhandler wrapper function ******************************************************/ void mpi_comm_set_errhandler__( MPI_Fint * comm, MPI_Fint * errhandler, MPI_Fint * ierr) { MPI_COMM_SET_ERRHANDLER( comm, errhandler, ierr) ; return ; } #endif /* TAU_MPIERRHANDLER */ /******************************************************/ /******************************************************/ #ifdef TAU_MPIATTRFUNCTION /****************************************************** *** MPI_Comm_create_keyval wrapper function ******************************************************/ int MPI_Comm_create_keyval( MPI_Comm_copy_attr_function * comm_copy_attr_fn, MPI_Comm_delete_attr_function * comm_delete_attr_fn, int * comm_keyval, void * extra_state) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_Comm_create_keyval()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_Comm_create_keyval( comm_copy_attr_fn, comm_delete_attr_fn, comm_keyval, extra_state) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_Comm_create_keyval wrapper function ******************************************************/ void MPI_COMM_CREATE_KEYVAL( MPI_Comm_copy_attr_function * comm_copy_attr_fn, MPI_Comm_delete_attr_function * comm_delete_attr_fn, MPI_Fint * comm_keyval, MPI_Aint * extra_state, MPI_Fint * ierr) { *ierr = MPI_Comm_create_keyval( comm_copy_attr_fn, comm_delete_attr_fn, comm_keyval, extra_state) ; return ; } /****************************************************** *** MPI_Comm_create_keyval wrapper function ******************************************************/ void mpi_comm_create_keyval( MPI_Comm_copy_attr_function * comm_copy_attr_fn, MPI_Comm_delete_attr_function * comm_delete_attr_fn, MPI_Fint * comm_keyval, MPI_Aint * extra_state, MPI_Fint * ierr) { MPI_COMM_CREATE_KEYVAL( comm_copy_attr_fn, comm_delete_attr_fn, comm_keyval, extra_state, ierr) ; return ; } /****************************************************** *** MPI_Comm_create_keyval wrapper function ******************************************************/ void mpi_comm_create_keyval_( MPI_Comm_copy_attr_function * comm_copy_attr_fn, MPI_Comm_delete_attr_function * comm_delete_attr_fn, MPI_Fint * comm_keyval, MPI_Aint * extra_state, MPI_Fint * ierr) { MPI_COMM_CREATE_KEYVAL( comm_copy_attr_fn, comm_delete_attr_fn, comm_keyval, extra_state, ierr) ; return ; } /****************************************************** *** MPI_Comm_create_keyval wrapper function ******************************************************/ void mpi_comm_create_keyval__( MPI_Comm_copy_attr_function * comm_copy_attr_fn, MPI_Comm_delete_attr_function * comm_delete_attr_fn, MPI_Fint * comm_keyval, MPI_Aint * extra_state, MPI_Fint * ierr) { MPI_COMM_CREATE_KEYVAL( comm_copy_attr_fn, comm_delete_attr_fn, comm_keyval, extra_state, ierr) ; return ; } #endif /* TAU_MPIATTRFUNCTION */ /******************************************************/ /******************************************************/ /****************************************************** *** MPI_Comm_delete_attr wrapper function ******************************************************/ int MPI_Comm_delete_attr( MPI_Comm comm, int comm_keyval) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_Comm_delete_attr()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_Comm_delete_attr( comm, comm_keyval) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_Comm_delete_attr wrapper function ******************************************************/ void MPI_COMM_DELETE_ATTR( MPI_Fint * comm, MPI_Fint * comm_keyval, MPI_Fint * ierr) { *ierr = MPI_Comm_delete_attr( MPI_Comm_f2c(*comm), *comm_keyval) ; return ; } /****************************************************** *** MPI_Comm_delete_attr wrapper function ******************************************************/ void mpi_comm_delete_attr( MPI_Fint * comm, MPI_Fint * comm_keyval, MPI_Fint * ierr) { MPI_COMM_DELETE_ATTR( comm, comm_keyval, ierr) ; return ; } /****************************************************** *** MPI_Comm_delete_attr wrapper function ******************************************************/ void mpi_comm_delete_attr_( MPI_Fint * comm, MPI_Fint * comm_keyval, MPI_Fint * ierr) { MPI_COMM_DELETE_ATTR( comm, comm_keyval, ierr) ; return ; } /****************************************************** *** MPI_Comm_delete_attr wrapper function ******************************************************/ void mpi_comm_delete_attr__( MPI_Fint * comm, MPI_Fint * comm_keyval, MPI_Fint * ierr) { MPI_COMM_DELETE_ATTR( comm, comm_keyval, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_Comm_free_keyval wrapper function ******************************************************/ int MPI_Comm_free_keyval( int * comm_keyval) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_Comm_free_keyval()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_Comm_free_keyval( comm_keyval) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_Comm_free_keyval wrapper function ******************************************************/ void MPI_COMM_FREE_KEYVAL( MPI_Fint * comm_keyval, MPI_Fint * ierr) { *ierr = MPI_Comm_free_keyval( comm_keyval) ; return ; } /****************************************************** *** MPI_Comm_free_keyval wrapper function ******************************************************/ void mpi_comm_free_keyval( MPI_Fint * comm_keyval, MPI_Fint * ierr) { MPI_COMM_FREE_KEYVAL( comm_keyval, ierr) ; return ; } /****************************************************** *** MPI_Comm_free_keyval wrapper function ******************************************************/ void mpi_comm_free_keyval_( MPI_Fint * comm_keyval, MPI_Fint * ierr) { MPI_COMM_FREE_KEYVAL( comm_keyval, ierr) ; return ; } /****************************************************** *** MPI_Comm_free_keyval wrapper function ******************************************************/ void mpi_comm_free_keyval__( MPI_Fint * comm_keyval, MPI_Fint * ierr) { MPI_COMM_FREE_KEYVAL( comm_keyval, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_Comm_get_attr wrapper function ******************************************************/ int MPI_Comm_get_attr( MPI_Comm comm, int comm_keyval, void * attribute_val, int * flag) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_Comm_get_attr()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_Comm_get_attr( comm, comm_keyval, attribute_val, flag) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_Comm_get_attr wrapper function ******************************************************/ void MPI_COMM_GET_ATTR( MPI_Fint * comm, MPI_Fint * comm_keyval, MPI_Aint * attribute_val, MPI_Fint * flag, MPI_Fint * ierr) { *ierr = MPI_Comm_get_attr( MPI_Comm_f2c(*comm), *comm_keyval, attribute_val, flag) ; return ; } /****************************************************** *** MPI_Comm_get_attr wrapper function ******************************************************/ void mpi_comm_get_attr( MPI_Fint * comm, MPI_Fint * comm_keyval, MPI_Aint * attribute_val, MPI_Fint * flag, MPI_Fint * ierr) { MPI_COMM_GET_ATTR( comm, comm_keyval, attribute_val, flag, ierr) ; return ; } /****************************************************** *** MPI_Comm_get_attr wrapper function ******************************************************/ void mpi_comm_get_attr_( MPI_Fint * comm, MPI_Fint * comm_keyval, MPI_Aint * attribute_val, MPI_Fint * flag, MPI_Fint * ierr) { MPI_COMM_GET_ATTR( comm, comm_keyval, attribute_val, flag, ierr) ; return ; } /****************************************************** *** MPI_Comm_get_attr wrapper function ******************************************************/ void mpi_comm_get_attr__( MPI_Fint * comm, MPI_Fint * comm_keyval, MPI_Aint * attribute_val, MPI_Fint * flag, MPI_Fint * ierr) { MPI_COMM_GET_ATTR( comm, comm_keyval, attribute_val, flag, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_Comm_set_attr wrapper function ******************************************************/ int MPI_Comm_set_attr( MPI_Comm comm, int comm_keyval, void * attribute_val) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_Comm_set_attr()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_Comm_set_attr( comm, comm_keyval, attribute_val) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_Comm_set_attr wrapper function ******************************************************/ void MPI_COMM_SET_ATTR( MPI_Fint * comm, MPI_Fint * comm_keyval, MPI_Aint * attribute_val, MPI_Fint * ierr) { *ierr = MPI_Comm_set_attr( MPI_Comm_f2c(*comm), *comm_keyval, attribute_val) ; return ; } /****************************************************** *** MPI_Comm_set_attr wrapper function ******************************************************/ void mpi_comm_set_attr( MPI_Fint * comm, MPI_Fint * comm_keyval, MPI_Aint * attribute_val, MPI_Fint * ierr) { MPI_COMM_SET_ATTR( comm, comm_keyval, attribute_val, ierr) ; return ; } /****************************************************** *** MPI_Comm_set_attr wrapper function ******************************************************/ void mpi_comm_set_attr_( MPI_Fint * comm, MPI_Fint * comm_keyval, MPI_Aint * attribute_val, MPI_Fint * ierr) { MPI_COMM_SET_ATTR( comm, comm_keyval, attribute_val, ierr) ; return ; } /****************************************************** *** MPI_Comm_set_attr wrapper function ******************************************************/ void mpi_comm_set_attr__( MPI_Fint * comm, MPI_Fint * comm_keyval, MPI_Aint * attribute_val, MPI_Fint * ierr) { MPI_COMM_SET_ATTR( comm, comm_keyval, attribute_val, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_Get_version wrapper function ******************************************************/ int MPI_Get_version( int * version, int * subversion) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_Get_version()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_Get_version( version, subversion) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_Get_version wrapper function ******************************************************/ void MPI_GET_VERSION( MPI_Fint * version, MPI_Fint * subversion, MPI_Fint * ierr) { *ierr = MPI_Get_version( version, subversion) ; return ; } /****************************************************** *** MPI_Get_version wrapper function ******************************************************/ void mpi_get_version( MPI_Fint * version, MPI_Fint * subversion, MPI_Fint * ierr) { MPI_GET_VERSION( version, subversion, ierr) ; return ; } /****************************************************** *** MPI_Get_version wrapper function ******************************************************/ void mpi_get_version_( MPI_Fint * version, MPI_Fint * subversion, MPI_Fint * ierr) { MPI_GET_VERSION( version, subversion, ierr) ; return ; } /****************************************************** *** MPI_Get_version wrapper function ******************************************************/ void mpi_get_version__( MPI_Fint * version, MPI_Fint * subversion, MPI_Fint * ierr) { MPI_GET_VERSION( version, subversion, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_Win_create wrapper function ******************************************************/ int MPI_Win_create( void * base, MPI_Aint size, int disp_unit, MPI_Info info, MPI_Comm comm, MPI_Win * win) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_Win_create()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_Win_create( base, size, disp_unit, info, comm, win) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_Win_create wrapper function ******************************************************/ void MPI_WIN_CREATE( MPI_Aint * base, MPI_Aint * size, MPI_Fint * disp_unit, MPI_Fint * info, MPI_Fint * comm, MPI_Fint * win, MPI_Fint * ierr) { MPI_Comm local_comm; MPI_Win local_win; local_comm = MPI_Comm_f2c(*comm); *ierr = MPI_Win_create( base, *size, *disp_unit, MPI_Info_f2c(*info), local_comm, &local_win) ; *win = MPI_Win_c2f(local_win); return ; } /****************************************************** *** MPI_Win_create wrapper function ******************************************************/ void mpi_win_create( MPI_Aint * base, MPI_Aint * size, MPI_Fint * disp_unit, MPI_Fint * info, MPI_Fint * comm, MPI_Fint * win, MPI_Fint * ierr) { MPI_WIN_CREATE( base, size, disp_unit, info, comm, win, ierr) ; return ; } /****************************************************** *** MPI_Win_create wrapper function ******************************************************/ void mpi_win_create_( MPI_Aint * base, MPI_Aint * size, MPI_Fint * disp_unit, MPI_Fint * info, MPI_Fint * comm, MPI_Fint * win, MPI_Fint * ierr) { MPI_WIN_CREATE( base, size, disp_unit, info, comm, win, ierr) ; return ; } /****************************************************** *** MPI_Win_create wrapper function ******************************************************/ void mpi_win_create__( MPI_Aint * base, MPI_Aint * size, MPI_Fint * disp_unit, MPI_Fint * info, MPI_Fint * comm, MPI_Fint * win, MPI_Fint * ierr) { MPI_WIN_CREATE( base, size, disp_unit, info, comm, win, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_Win_free wrapper function ******************************************************/ int MPI_Win_free( MPI_Win * win) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_Win_free()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_Win_free( win) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_Win_free wrapper function ******************************************************/ void MPI_WIN_FREE( MPI_Win * win, MPI_Fint * ierr) { MPI_Win local_win = MPI_Win_f2c(*win); *ierr = MPI_Win_free( &local_win) ; *win = MPI_Win_c2f(local_win); return ; } /****************************************************** *** MPI_Win_free wrapper function ******************************************************/ void mpi_win_free( MPI_Win * win, MPI_Fint * ierr) { MPI_WIN_FREE( win, ierr) ; return ; } /****************************************************** *** MPI_Win_free wrapper function ******************************************************/ void mpi_win_free_( MPI_Win * win, MPI_Fint * ierr) { MPI_WIN_FREE( win, ierr) ; return ; } /****************************************************** *** MPI_Win_free wrapper function ******************************************************/ void mpi_win_free__( MPI_Win * win, MPI_Fint * ierr) { MPI_WIN_FREE( win, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_Win_get_group wrapper function ******************************************************/ int MPI_Win_get_group( MPI_Win win, MPI_Group * group) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_Win_get_group()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_Win_get_group( win, group) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_Win_get_group wrapper function ******************************************************/ void MPI_WIN_GET_GROUP( MPI_Fint * win, MPI_Fint * group, MPI_Fint * ierr) { MPI_Win local_win; MPI_Group local_group; local_win = MPI_Win_f2c(*win); *ierr = MPI_Win_get_group( local_win, &local_group) ; *group = MPI_Group_c2f(local_group); return ; } /****************************************************** *** MPI_Win_get_group wrapper function ******************************************************/ void mpi_win_get_group( MPI_Fint * win, MPI_Fint * group, MPI_Fint * ierr) { MPI_WIN_GET_GROUP( win, group, ierr) ; return ; } /****************************************************** *** MPI_Win_get_group wrapper function ******************************************************/ void mpi_win_get_group_( MPI_Fint * win, MPI_Fint * group, MPI_Fint * ierr) { MPI_WIN_GET_GROUP( win, group, ierr) ; return ; } /****************************************************** *** MPI_Win_get_group wrapper function ******************************************************/ void mpi_win_get_group__( MPI_Fint * win, MPI_Fint * group, MPI_Fint * ierr) { MPI_WIN_GET_GROUP( win, group, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_Put wrapper function ******************************************************/ int MPI_Put( void * origin_addr, int origin_count, MPI_Datatype origin_datatype, int target_rank, MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Win win) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_Put()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_Put( origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype, win) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_Put wrapper function ******************************************************/ void MPI_PUT( MPI_Aint * origin_addr, MPI_Fint * origin_count, MPI_Fint * origin_datatype, MPI_Fint * target_rank, MPI_Aint * target_disp, MPI_Fint * target_count, MPI_Fint * target_datatype, MPI_Fint * win, MPI_Fint * ierr) { *ierr = MPI_Put( origin_addr, *origin_count, MPI_Type_f2c(*origin_datatype), *target_rank, *target_disp, *target_count, MPI_Type_f2c(*target_datatype), MPI_Win_f2c(*win)) ; return ; } /****************************************************** *** MPI_Put wrapper function ******************************************************/ void mpi_put( MPI_Aint * origin_addr, MPI_Fint * origin_count, MPI_Fint * origin_datatype, MPI_Fint * target_rank, MPI_Aint * target_disp, MPI_Fint * target_count, MPI_Fint * target_datatype, MPI_Fint * win, MPI_Fint * ierr) { MPI_PUT( origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype, win, ierr) ; return ; } /****************************************************** *** MPI_Put wrapper function ******************************************************/ void mpi_put_( MPI_Aint * origin_addr, MPI_Fint * origin_count, MPI_Fint * origin_datatype, MPI_Fint * target_rank, MPI_Aint * target_disp, MPI_Fint * target_count, MPI_Fint * target_datatype, MPI_Fint * win, MPI_Fint * ierr) { MPI_PUT( origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype, win, ierr) ; return ; } /****************************************************** *** MPI_Put wrapper function ******************************************************/ void mpi_put__( MPI_Aint * origin_addr, MPI_Fint * origin_count, MPI_Fint * origin_datatype, MPI_Fint * target_rank, MPI_Aint * target_disp, MPI_Fint * target_count, MPI_Fint * target_datatype, MPI_Fint * win, MPI_Fint * ierr) { MPI_PUT( origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype, win, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_Get wrapper function ******************************************************/ int MPI_Get( void * origin_addr, int origin_count, MPI_Datatype origin_datatype, int target_rank, MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Win win) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_Get()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_Get( origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype, win) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_Get wrapper function ******************************************************/ void MPI_GET( MPI_Aint * origin_addr, MPI_Fint * origin_count, MPI_Fint * origin_datatype, MPI_Fint * target_rank, MPI_Aint * target_disp, MPI_Fint * target_count, MPI_Fint * target_datatype, MPI_Fint * win, MPI_Fint * ierr) { *ierr = MPI_Get( origin_addr, *origin_count, MPI_Type_f2c(*origin_datatype), *target_rank, *target_disp, *target_count, MPI_Type_f2c(*target_datatype), MPI_Win_f2c(*win)) ; return ; } /****************************************************** *** MPI_Get wrapper function ******************************************************/ void mpi_get( MPI_Aint * origin_addr, MPI_Fint * origin_count, MPI_Fint * origin_datatype, MPI_Fint * target_rank, MPI_Aint * target_disp, MPI_Fint * target_count, MPI_Fint * target_datatype, MPI_Fint * win, MPI_Fint * ierr) { MPI_GET( origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype, win, ierr) ; return ; } /****************************************************** *** MPI_Get wrapper function ******************************************************/ void mpi_get_( MPI_Aint * origin_addr, MPI_Fint * origin_count, MPI_Fint * origin_datatype, MPI_Fint * target_rank, MPI_Aint * target_disp, MPI_Fint * target_count, MPI_Fint * target_datatype, MPI_Fint * win, MPI_Fint * ierr) { MPI_GET( origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype, win, ierr) ; return ; } /****************************************************** *** MPI_Get wrapper function ******************************************************/ void mpi_get__( MPI_Aint * origin_addr, MPI_Fint * origin_count, MPI_Fint * origin_datatype, MPI_Fint * target_rank, MPI_Aint * target_disp, MPI_Fint * target_count, MPI_Fint * target_datatype, MPI_Fint * win, MPI_Fint * ierr) { MPI_GET( origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype, win, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_Accumulate wrapper function ******************************************************/ int MPI_Accumulate( void * origin_addr, int origin_count, MPI_Datatype origin_datatype, int target_rank, MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Op op, MPI_Win win) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_Accumulate()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_Accumulate( origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype, op, win) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_Accumulate wrapper function ******************************************************/ void MPI_ACCUMULATE( MPI_Aint * origin_addr, MPI_Fint * origin_count, MPI_Fint * origin_datatype, MPI_Fint * target_rank, MPI_Aint * target_disp, MPI_Fint * target_count, MPI_Fint * target_datatype, MPI_Fint * op, MPI_Fint * win, MPI_Fint * ierr) { *ierr = MPI_Accumulate( origin_addr, *origin_count, MPI_Type_f2c(*origin_datatype), *target_rank, *target_disp, *target_count, MPI_Type_f2c(*target_datatype), MPI_Op_f2c(*op), MPI_Win_f2c(*win)) ; return ; } /****************************************************** *** MPI_Accumulate wrapper function ******************************************************/ void mpi_accumulate( MPI_Aint * origin_addr, MPI_Fint * origin_count, MPI_Fint * origin_datatype, MPI_Fint * target_rank, MPI_Aint * target_disp, MPI_Fint * target_count, MPI_Fint * target_datatype, MPI_Fint * op, MPI_Fint * win, MPI_Fint * ierr) { MPI_ACCUMULATE( origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype, op, win, ierr) ; return ; } /****************************************************** *** MPI_Accumulate wrapper function ******************************************************/ void mpi_accumulate_( MPI_Aint * origin_addr, MPI_Fint * origin_count, MPI_Fint * origin_datatype, MPI_Fint * target_rank, MPI_Aint * target_disp, MPI_Fint * target_count, MPI_Fint * target_datatype, MPI_Fint * op, MPI_Fint * win, MPI_Fint * ierr) { MPI_ACCUMULATE( origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype, op, win, ierr) ; return ; } /****************************************************** *** MPI_Accumulate wrapper function ******************************************************/ void mpi_accumulate__( MPI_Aint * origin_addr, MPI_Fint * origin_count, MPI_Fint * origin_datatype, MPI_Fint * target_rank, MPI_Aint * target_disp, MPI_Fint * target_count, MPI_Fint * target_datatype, MPI_Fint * op, MPI_Fint * win, MPI_Fint * ierr) { MPI_ACCUMULATE( origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype, op, win, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_Win_fence wrapper function ******************************************************/ int MPI_Win_fence( int assert, MPI_Win win) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_Win_fence()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_Win_fence( assert, win) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_Win_fence wrapper function ******************************************************/ void MPI_WIN_FENCE( MPI_Fint * assert, MPI_Fint * win, MPI_Fint * ierr) { *ierr = MPI_Win_fence( *assert, MPI_Win_f2c(*win)) ; return ; } /****************************************************** *** MPI_Win_fence wrapper function ******************************************************/ void mpi_win_fence( MPI_Fint * assert, MPI_Fint * win, MPI_Fint * ierr) { MPI_WIN_FENCE( assert, win, ierr) ; return ; } /****************************************************** *** MPI_Win_fence wrapper function ******************************************************/ void mpi_win_fence_( MPI_Fint * assert, MPI_Fint * win, MPI_Fint * ierr) { MPI_WIN_FENCE( assert, win, ierr) ; return ; } /****************************************************** *** MPI_Win_fence wrapper function ******************************************************/ void mpi_win_fence__( MPI_Fint * assert, MPI_Fint * win, MPI_Fint * ierr) { MPI_WIN_FENCE( assert, win, ierr) ; return ; } /******************************************************/ /******************************************************/ #ifndef TAU_BGL /****************************************************** *** MPI_Win_start wrapper function ******************************************************/ int MPI_Win_start( MPI_Group group, int assert, MPI_Win win) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_Win_start()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_Win_start( group, assert, win) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_Win_start wrapper function ******************************************************/ void MPI_WIN_START( MPI_Fint * group, MPI_Fint * assert, MPI_Fint * win, MPI_Fint * ierr) { *ierr = MPI_Win_start( MPI_Group_f2c(*group), *assert, MPI_Win_f2c(*win)) ; return ; } /****************************************************** *** MPI_Win_start wrapper function ******************************************************/ void mpi_win_start( MPI_Fint * group, MPI_Fint * assert, MPI_Fint * win, MPI_Fint * ierr) { MPI_WIN_START( group, assert, win, ierr) ; return ; } /****************************************************** *** MPI_Win_start wrapper function ******************************************************/ void mpi_win_start_( MPI_Fint * group, MPI_Fint * assert, MPI_Fint * win, MPI_Fint * ierr) { MPI_WIN_START( group, assert, win, ierr) ; return ; } /****************************************************** *** MPI_Win_start wrapper function ******************************************************/ void mpi_win_start__( MPI_Fint * group, MPI_Fint * assert, MPI_Fint * win, MPI_Fint * ierr) { MPI_WIN_START( group, assert, win, ierr) ; return ; } /******************************************************/ /******************************************************/ #endif /* TAU_BGL */ /****************************************************** *** MPI_Win_complete wrapper function ******************************************************/ int MPI_Win_complete( MPI_Win win) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_Win_complete()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_Win_complete( win) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_Win_complete wrapper function ******************************************************/ void MPI_WIN_COMPLETE( MPI_Fint * win, MPI_Fint * ierr) { *ierr = MPI_Win_complete( MPI_Win_f2c(*win)) ; return ; } /****************************************************** *** MPI_Win_complete wrapper function ******************************************************/ void mpi_win_complete( MPI_Fint * win, MPI_Fint * ierr) { MPI_WIN_COMPLETE( win, ierr) ; return ; } /****************************************************** *** MPI_Win_complete wrapper function ******************************************************/ void mpi_win_complete_( MPI_Fint * win, MPI_Fint * ierr) { MPI_WIN_COMPLETE( win, ierr) ; return ; } /****************************************************** *** MPI_Win_complete wrapper function ******************************************************/ void mpi_win_complete__( MPI_Fint * win, MPI_Fint * ierr) { MPI_WIN_COMPLETE( win, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_Win_post wrapper function ******************************************************/ int MPI_Win_post( MPI_Group group, int assert, MPI_Win win) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_Win_post()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_Win_post( group, assert, win) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_Win_post wrapper function ******************************************************/ void MPI_WIN_POST( MPI_Fint * group, MPI_Fint * assert, MPI_Fint * win, MPI_Fint * ierr) { *ierr = MPI_Win_post( MPI_Group_f2c(*group), *assert, MPI_Win_f2c(*win)) ; return ; } /****************************************************** *** MPI_Win_post wrapper function ******************************************************/ void mpi_win_post( MPI_Fint * group, MPI_Fint * assert, MPI_Fint * win, MPI_Fint * ierr) { MPI_WIN_POST( group, assert, win, ierr) ; return ; } /****************************************************** *** MPI_Win_post wrapper function ******************************************************/ void mpi_win_post_( MPI_Fint * group, MPI_Fint * assert, MPI_Fint * win, MPI_Fint * ierr) { MPI_WIN_POST( group, assert, win, ierr) ; return ; } /****************************************************** *** MPI_Win_post wrapper function ******************************************************/ void mpi_win_post__( MPI_Fint * group, MPI_Fint * assert, MPI_Fint * win, MPI_Fint * ierr) { MPI_WIN_POST( group, assert, win, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_Win_wait wrapper function ******************************************************/ int MPI_Win_wait( MPI_Win win) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_Win_wait()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_Win_wait( win) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_Win_wait wrapper function ******************************************************/ void MPI_WIN_WAIT( MPI_Fint * win, MPI_Fint * ierr) { *ierr = MPI_Win_wait( MPI_Win_f2c(*win)) ; return ; } /****************************************************** *** MPI_Win_wait wrapper function ******************************************************/ void mpi_win_wait( MPI_Fint * win, MPI_Fint * ierr) { MPI_WIN_WAIT( win, ierr) ; return ; } /****************************************************** *** MPI_Win_wait wrapper function ******************************************************/ void mpi_win_wait_( MPI_Fint * win, MPI_Fint * ierr) { MPI_WIN_WAIT( win, ierr) ; return ; } /****************************************************** *** MPI_Win_wait wrapper function ******************************************************/ void mpi_win_wait__( MPI_Fint * win, MPI_Fint * ierr) { MPI_WIN_WAIT( win, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_Win_test wrapper function ******************************************************/ int MPI_Win_test( MPI_Win win, int * flag) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_Win_test()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_Win_test( win, flag) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_Win_test wrapper function ******************************************************/ void MPI_WIN_TEST( MPI_Fint * win, MPI_Fint * flag, MPI_Fint * ierr) { *ierr = MPI_Win_test( MPI_Win_f2c(*win), flag) ; return ; } /****************************************************** *** MPI_Win_test wrapper function ******************************************************/ void mpi_win_test( MPI_Fint * win, MPI_Fint * flag, MPI_Fint * ierr) { MPI_WIN_TEST( win, flag, ierr) ; return ; } /****************************************************** *** MPI_Win_test wrapper function ******************************************************/ void mpi_win_test_( MPI_Fint * win, MPI_Fint * flag, MPI_Fint * ierr) { MPI_WIN_TEST( win, flag, ierr) ; return ; } /****************************************************** *** MPI_Win_test wrapper function ******************************************************/ void mpi_win_test__( MPI_Fint * win, MPI_Fint * flag, MPI_Fint * ierr) { MPI_WIN_TEST( win, flag, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_Win_lock wrapper function ******************************************************/ int MPI_Win_lock( int lock_type, int rank, int assert, MPI_Win win) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_Win_lock()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_Win_lock( lock_type, rank, assert, win) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_Win_lock wrapper function ******************************************************/ void MPI_WIN_LOCK( MPI_Fint * lock_type, MPI_Fint * rank, MPI_Fint * assert, MPI_Fint * win, MPI_Fint * ierr) { *ierr = MPI_Win_lock( *lock_type, *rank, *assert, MPI_Win_f2c(*win)) ; return ; } /****************************************************** *** MPI_Win_lock wrapper function ******************************************************/ void mpi_win_lock( MPI_Fint * lock_type, MPI_Fint * rank, MPI_Fint * assert, MPI_Fint * win, MPI_Fint * ierr) { MPI_WIN_LOCK( lock_type, rank, assert, win, ierr) ; return ; } /****************************************************** *** MPI_Win_lock wrapper function ******************************************************/ void mpi_win_lock_( MPI_Fint * lock_type, MPI_Fint * rank, MPI_Fint * assert, MPI_Fint * win, MPI_Fint * ierr) { MPI_WIN_LOCK( lock_type, rank, assert, win, ierr) ; return ; } /****************************************************** *** MPI_Win_lock wrapper function ******************************************************/ void mpi_win_lock__( MPI_Fint * lock_type, MPI_Fint * rank, MPI_Fint * assert, MPI_Fint * win, MPI_Fint * ierr) { MPI_WIN_LOCK( lock_type, rank, assert, win, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_Win_unlock wrapper function ******************************************************/ int MPI_Win_unlock( int rank, MPI_Win win) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_Win_unlock()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_Win_unlock( rank, win) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_Win_unlock wrapper function ******************************************************/ void MPI_WIN_UNLOCK( MPI_Fint * rank, MPI_Fint * win, MPI_Fint * ierr) { *ierr = MPI_Win_unlock( *rank, MPI_Win_f2c(*win)) ; return ; } /****************************************************** *** MPI_Win_unlock wrapper function ******************************************************/ void mpi_win_unlock( MPI_Fint * rank, MPI_Fint * win, MPI_Fint * ierr) { MPI_WIN_UNLOCK( rank, win, ierr) ; return ; } /****************************************************** *** MPI_Win_unlock wrapper function ******************************************************/ void mpi_win_unlock_( MPI_Fint * rank, MPI_Fint * win, MPI_Fint * ierr) { MPI_WIN_UNLOCK( rank, win, ierr) ; return ; } /****************************************************** *** MPI_Win_unlock wrapper function ******************************************************/ void mpi_win_unlock__( MPI_Fint * rank, MPI_Fint * win, MPI_Fint * ierr) { MPI_WIN_UNLOCK( rank, win, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_Win_get_attr wrapper function ******************************************************/ int MPI_Win_get_attr( MPI_Win win, int win_keyval, void * attribute_val, int * flag) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_Win_get_attr()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_Win_get_attr( win, win_keyval, attribute_val, flag) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_Win_get_attr wrapper function ******************************************************/ void MPI_WIN_GET_ATTR( MPI_Fint * win, MPI_Fint * win_keyval, MPI_Aint * attribute_val, MPI_Fint * flag, MPI_Fint * ierr) { *ierr = MPI_Win_get_attr( MPI_Win_f2c(*win), *win_keyval, attribute_val, flag) ; return ; } /****************************************************** *** MPI_Win_get_attr wrapper function ******************************************************/ void mpi_win_get_attr( MPI_Fint * win, MPI_Fint * win_keyval, MPI_Aint * attribute_val, MPI_Fint * flag, MPI_Fint * ierr) { MPI_WIN_GET_ATTR( win, win_keyval, attribute_val, flag, ierr) ; return ; } /****************************************************** *** MPI_Win_get_attr wrapper function ******************************************************/ void mpi_win_get_attr_( MPI_Fint * win, MPI_Fint * win_keyval, MPI_Aint * attribute_val, MPI_Fint * flag, MPI_Fint * ierr) { MPI_WIN_GET_ATTR( win, win_keyval, attribute_val, flag, ierr) ; return ; } /****************************************************** *** MPI_Win_get_attr wrapper function ******************************************************/ void mpi_win_get_attr__( MPI_Fint * win, MPI_Fint * win_keyval, MPI_Aint * attribute_val, MPI_Fint * flag, MPI_Fint * ierr) { MPI_WIN_GET_ATTR( win, win_keyval, attribute_val, flag, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_Win_set_attr wrapper function ******************************************************/ int MPI_Win_set_attr( MPI_Win win, int win_keyval, void * attribute_val) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_Win_set_attr()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_Win_set_attr( win, win_keyval, attribute_val) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_Win_set_attr wrapper function ******************************************************/ void MPI_WIN_SET_ATTR( MPI_Fint * win, MPI_Fint * win_keyval, MPI_Aint * attribute_val, MPI_Fint * ierr) { *ierr = MPI_Win_set_attr( MPI_Win_f2c(*win), *win_keyval, attribute_val) ; return ; } /****************************************************** *** MPI_Win_set_attr wrapper function ******************************************************/ void mpi_win_set_attr( MPI_Fint * win, MPI_Fint * win_keyval, MPI_Aint * attribute_val, MPI_Fint * ierr) { MPI_WIN_SET_ATTR( win, win_keyval, attribute_val, ierr) ; return ; } /****************************************************** *** MPI_Win_set_attr wrapper function ******************************************************/ void mpi_win_set_attr_( MPI_Fint * win, MPI_Fint * win_keyval, MPI_Aint * attribute_val, MPI_Fint * ierr) { MPI_WIN_SET_ATTR( win, win_keyval, attribute_val, ierr) ; return ; } /****************************************************** *** MPI_Win_set_attr wrapper function ******************************************************/ void mpi_win_set_attr__( MPI_Fint * win, MPI_Fint * win_keyval, MPI_Aint * attribute_val, MPI_Fint * ierr) { MPI_WIN_SET_ATTR( win, win_keyval, attribute_val, ierr) ; return ; } /******************************************************/ /******************************************************/ #ifdef TAU_MPIATTRFUNCTION /****************************************************** *** MPI_Win_create_keyval wrapper function ******************************************************/ int MPI_Win_create_keyval( MPI_Win_copy_attr_function * win_copy_attr_fn, MPI_Win_delete_attr_function * win_delete_attr_fn, int * win_keyval, void * extra_state) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_Win_create_keyval()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_Win_create_keyval( win_copy_attr_fn, win_delete_attr_fn, win_keyval, extra_state) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_Win_create_keyval wrapper function ******************************************************/ void MPI_WIN_CREATE_KEYVAL( MPI_Win_copy_attr_function * win_copy_attr_fn, MPI_Win_delete_attr_function * win_delete_attr_fn, MPI_Fint * win_keyval, MPI_Aint * extra_state, MPI_Fint * ierr) { *ierr = MPI_Win_create_keyval( win_copy_attr_fn, win_delete_attr_fn, win_keyval, extra_state) ; return ; } /****************************************************** *** MPI_Win_create_keyval wrapper function ******************************************************/ void mpi_win_create_keyval( MPI_Win_copy_attr_function * win_copy_attr_fn, MPI_Win_delete_attr_function * win_delete_attr_fn, MPI_Fint * win_keyval, MPI_Aint * extra_state, MPI_Fint * ierr) { MPI_WIN_CREATE_KEYVAL( win_copy_attr_fn, win_delete_attr_fn, win_keyval, extra_state, ierr) ; return ; } /****************************************************** *** MPI_Win_create_keyval wrapper function ******************************************************/ void mpi_win_create_keyval_( MPI_Win_copy_attr_function * win_copy_attr_fn, MPI_Win_delete_attr_function * win_delete_attr_fn, MPI_Fint * win_keyval, MPI_Aint * extra_state, MPI_Fint * ierr) { MPI_WIN_CREATE_KEYVAL( win_copy_attr_fn, win_delete_attr_fn, win_keyval, extra_state, ierr) ; return ; } /****************************************************** *** MPI_Win_create_keyval wrapper function ******************************************************/ void mpi_win_create_keyval__( MPI_Win_copy_attr_function * win_copy_attr_fn, MPI_Win_delete_attr_function * win_delete_attr_fn, MPI_Fint * win_keyval, MPI_Aint * extra_state, MPI_Fint * ierr) { MPI_WIN_CREATE_KEYVAL( win_copy_attr_fn, win_delete_attr_fn, win_keyval, extra_state, ierr) ; return ; } #endif /* TAU_MPIATTRFUNCTION */ /******************************************************/ /******************************************************/ /****************************************************** *** MPI_Win_delete_attr wrapper function ******************************************************/ int MPI_Win_delete_attr( MPI_Win win, int win_keyval) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_Win_delete_attr()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_Win_delete_attr( win, win_keyval) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_Win_delete_attr wrapper function ******************************************************/ void MPI_WIN_DELETE_ATTR( MPI_Fint * win, MPI_Fint * win_keyval, MPI_Fint * ierr) { MPI_Win local_win = MPI_Win_f2c(*win); *ierr = MPI_Win_delete_attr( local_win, *win_keyval) ; *win = MPI_Win_c2f(local_win); return ; } /****************************************************** *** MPI_Win_delete_attr wrapper function ******************************************************/ void mpi_win_delete_attr( MPI_Fint * win, MPI_Fint * win_keyval, MPI_Fint * ierr) { MPI_WIN_DELETE_ATTR( win, win_keyval, ierr) ; return ; } /****************************************************** *** MPI_Win_delete_attr wrapper function ******************************************************/ void mpi_win_delete_attr_( MPI_Fint * win, MPI_Fint * win_keyval, MPI_Fint * ierr) { MPI_WIN_DELETE_ATTR( win, win_keyval, ierr) ; return ; } /****************************************************** *** MPI_Win_delete_attr wrapper function ******************************************************/ void mpi_win_delete_attr__( MPI_Fint * win, MPI_Fint * win_keyval, MPI_Fint * ierr) { MPI_WIN_DELETE_ATTR( win, win_keyval, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_Win_free_keyval wrapper function ******************************************************/ int MPI_Win_free_keyval( int * win_keyval) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_Win_free_keyval()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_Win_free_keyval( win_keyval) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_Win_free_keyval wrapper function ******************************************************/ void MPI_WIN_FREE_KEYVAL( MPI_Fint * win_keyval, MPI_Fint * ierr) { *ierr = MPI_Win_free_keyval( win_keyval) ; return ; } /****************************************************** *** MPI_Win_free_keyval wrapper function ******************************************************/ void mpi_win_free_keyval( MPI_Fint * win_keyval, MPI_Fint * ierr) { MPI_WIN_FREE_KEYVAL( win_keyval, ierr) ; return ; } /****************************************************** *** MPI_Win_free_keyval wrapper function ******************************************************/ void mpi_win_free_keyval_( MPI_Fint * win_keyval, MPI_Fint * ierr) { MPI_WIN_FREE_KEYVAL( win_keyval, ierr) ; return ; } /****************************************************** *** MPI_Win_free_keyval wrapper function ******************************************************/ void mpi_win_free_keyval__( MPI_Fint * win_keyval, MPI_Fint * ierr) { MPI_WIN_FREE_KEYVAL( win_keyval, ierr) ; return ; } /******************************************************/ /******************************************************/ #ifdef TAU_MPIERRHANDLER /****************************************************** *** MPI_Win_create_errhandler wrapper function ******************************************************/ int MPI_Win_create_errhandler( MPI_Win_errhandler_fn * function, MPI_Errhandler * errhandler) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_Win_create_errhandler()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_Win_create_errhandler( function, errhandler) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_Win_create_errhandler wrapper function ******************************************************/ void MPI_WIN_CREATE_ERRHANDLER( MPI_Win_errhandler_fn * function, MPI_Errhandler * errhandler, MPI_Fint * ierr) { MPI_Errhandler local_errhandler; *ierr = MPI_Win_create_errhandler( function, &local_errhandler) ; *errhandler = MPI_Errhandler_c2f(local_errhandler); return ; } /****************************************************** *** MPI_Win_create_errhandler wrapper function ******************************************************/ void mpi_win_create_errhandler( MPI_Win_errhandler_fn * function, MPI_Errhandler * errhandler, MPI_Fint * ierr) { MPI_WIN_CREATE_ERRHANDLER( function, errhandler, ierr) ; return ; } /****************************************************** *** MPI_Win_create_errhandler wrapper function ******************************************************/ void mpi_win_create_errhandler_( MPI_Win_errhandler_fn * function, MPI_Errhandler * errhandler, MPI_Fint * ierr) { MPI_WIN_CREATE_ERRHANDLER( function, errhandler, ierr) ; return ; } /****************************************************** *** MPI_Win_create_errhandler wrapper function ******************************************************/ void mpi_win_create_errhandler__( MPI_Win_errhandler_fn * function, MPI_Errhandler * errhandler, MPI_Fint * ierr) { MPI_WIN_CREATE_ERRHANDLER( function, errhandler, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_Win_set_errhandler wrapper function ******************************************************/ int MPI_Win_set_errhandler( MPI_Win win, MPI_Errhandler err) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_Win_set_errhandler()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_Win_set_errhandler( win, err) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_Win_set_errhandler wrapper function ******************************************************/ void MPI_WIN_SET_ERRHANDLER( MPI_Fint * win, MPI_Fint * err, MPI_Fint * ierr) { *ierr = MPI_Win_set_errhandler( MPI_Win_f2c(*win), MPI_Errhandler_f2c(*err)) ; return ; } /****************************************************** *** MPI_Win_set_errhandler wrapper function ******************************************************/ void mpi_win_set_errhandler( MPI_Fint * win, MPI_Fint * err, MPI_Fint * ierr) { MPI_WIN_SET_ERRHANDLER( win, err, ierr) ; return ; } /****************************************************** *** MPI_Win_set_errhandler wrapper function ******************************************************/ void mpi_win_set_errhandler_( MPI_Fint * win, MPI_Fint * err, MPI_Fint * ierr) { MPI_WIN_SET_ERRHANDLER( win, err, ierr) ; return ; } /****************************************************** *** MPI_Win_set_errhandler wrapper function ******************************************************/ void mpi_win_set_errhandler__( MPI_Fint * win, MPI_Fint * err, MPI_Fint * ierr) { MPI_WIN_SET_ERRHANDLER( win, err, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_Win_get_errhandler wrapper function ******************************************************/ int MPI_Win_get_errhandler( MPI_Win win, MPI_Errhandler * errhandler) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_Win_get_errhandler()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_Win_get_errhandler( win, errhandler) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_Win_get_errhandler wrapper function ******************************************************/ void MPI_WIN_GET_ERRHANDLER( MPI_Fint * win, MPI_Errhandler * errhandler, MPI_Fint * ierr) { MPI_Win local_win; MPI_Errhandler local_errhandler; local_win = MPI_Win_f2c(*win); *ierr = MPI_Win_get_errhandler( local_win, &local_errhandler) ; *errhandler = MPI_Errhandler_c2f(local_errhandler); return ; } /****************************************************** *** MPI_Win_get_errhandler wrapper function ******************************************************/ void mpi_win_get_errhandler( MPI_Fint * win, MPI_Errhandler * errhandler, MPI_Fint * ierr) { MPI_WIN_GET_ERRHANDLER( win, errhandler, ierr) ; return ; } /****************************************************** *** MPI_Win_get_errhandler wrapper function ******************************************************/ void mpi_win_get_errhandler_( MPI_Fint * win, MPI_Errhandler * errhandler, MPI_Fint * ierr) { MPI_WIN_GET_ERRHANDLER( win, errhandler, ierr) ; return ; } /****************************************************** *** MPI_Win_get_errhandler wrapper function ******************************************************/ void mpi_win_get_errhandler__( MPI_Fint * win, MPI_Errhandler * errhandler, MPI_Fint * ierr) { MPI_WIN_GET_ERRHANDLER( win, errhandler, ierr) ; return ; } #endif /* TAU_MPIERRHANDLER */ /******************************************************/ /******************************************************/ /****************************************************** *** MPI_Alloc_mem wrapper function ******************************************************/ int MPI_Alloc_mem( MPI_Aint size, MPI_Info info, void * baseptr) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_Alloc_mem()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_Alloc_mem( size, info, baseptr) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_Alloc_mem wrapper function ******************************************************/ void MPI_ALLOC_MEM( MPI_Fint * size, MPI_Fint * info, MPI_Aint * baseptr, MPI_Fint * ierr) { *ierr = MPI_Alloc_mem( *size, MPI_Info_f2c(*info), baseptr) ; return ; } /****************************************************** *** MPI_Alloc_mem wrapper function ******************************************************/ void mpi_alloc_mem( MPI_Fint * size, MPI_Fint * info, MPI_Aint * baseptr, MPI_Fint * ierr) { MPI_ALLOC_MEM( size, info, baseptr, ierr) ; return ; } /****************************************************** *** MPI_Alloc_mem wrapper function ******************************************************/ void mpi_alloc_mem_( MPI_Fint * size, MPI_Fint * info, MPI_Aint * baseptr, MPI_Fint * ierr) { MPI_ALLOC_MEM( size, info, baseptr, ierr) ; return ; } /****************************************************** *** MPI_Alloc_mem wrapper function ******************************************************/ void mpi_alloc_mem__( MPI_Fint * size, MPI_Fint * info, MPI_Aint * baseptr, MPI_Fint * ierr) { MPI_ALLOC_MEM( size, info, baseptr, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_Free_mem wrapper function ******************************************************/ int MPI_Free_mem( void * base) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_Free_mem()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_Free_mem( base) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_Free_mem wrapper function ******************************************************/ void MPI_FREE_MEM( MPI_Aint * base, MPI_Fint * ierr) { *ierr = MPI_Free_mem( base) ; return ; } /****************************************************** *** MPI_Free_mem wrapper function ******************************************************/ void mpi_free_mem( MPI_Aint * base, MPI_Fint * ierr) { MPI_FREE_MEM( base, ierr) ; return ; } /****************************************************** *** MPI_Free_mem wrapper function ******************************************************/ void mpi_free_mem_( MPI_Aint * base, MPI_Fint * ierr) { MPI_FREE_MEM( base, ierr) ; return ; } /****************************************************** *** MPI_Free_mem wrapper function ******************************************************/ void mpi_free_mem__( MPI_Aint * base, MPI_Fint * ierr) { MPI_FREE_MEM( base, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_File_open wrapper function ******************************************************/ int MPI_File_open( MPI_Comm comm, char * filename, int amode, MPI_Info info, MPI_File * fh) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_File_open()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_File_open( comm, filename, amode, info, fh) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_File_open wrapper function ******************************************************/ void MPI_FILE_OPEN( MPI_Fint * comm, char * filename, MPI_Fint * amode, MPI_Fint * info, MPI_Aint * fh, MPI_Fint * ierr) { MPI_Comm local_comm; MPI_Info local_info; MPI_File local_fh; local_comm = MPI_Comm_f2c(*comm); local_info = MPI_Info_f2c(*info); *ierr = MPI_File_open( local_comm, filename, *amode, local_info, &local_fh) ; *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_Aint * fh, MPI_Fint * ierr) { MPI_FILE_OPEN( comm, filename, amode, info, fh, ierr) ; return ; } /****************************************************** *** MPI_File_open wrapper function ******************************************************/ void mpi_file_open_( MPI_Fint * comm, char * filename, MPI_Fint * amode, MPI_Fint * info, MPI_Aint * fh, MPI_Fint * ierr) { MPI_FILE_OPEN( comm, filename, amode, info, fh, ierr) ; return ; } /****************************************************** *** MPI_File_open wrapper function ******************************************************/ void mpi_file_open__( MPI_Fint * comm, char * filename, MPI_Fint * amode, MPI_Fint * info, MPI_Aint * fh, MPI_Fint * ierr) { MPI_FILE_OPEN( comm, filename, amode, info, fh, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_File_close wrapper function ******************************************************/ int MPI_File_close( MPI_File * fh) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_File_close()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_File_close( fh) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_File_close wrapper function ******************************************************/ void MPI_FILE_CLOSE( MPI_Aint * fh, MPI_Fint * ierr) { MPI_File local_fh = MPI_File_f2c(*fh); *ierr = MPI_File_close( &local_fh) ; *fh = MPI_File_c2f(local_fh); return ; } /****************************************************** *** MPI_File_close wrapper function ******************************************************/ void mpi_file_close( MPI_Aint * fh, MPI_Fint * ierr) { MPI_FILE_CLOSE( fh, ierr) ; return ; } /****************************************************** *** MPI_File_close wrapper function ******************************************************/ void mpi_file_close_( MPI_Aint * fh, MPI_Fint * ierr) { MPI_FILE_CLOSE( fh, ierr) ; return ; } /****************************************************** *** MPI_File_close wrapper function ******************************************************/ void mpi_file_close__( MPI_Aint * fh, MPI_Fint * ierr) { MPI_FILE_CLOSE( fh, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_File_delete wrapper function ******************************************************/ int MPI_File_delete( char * filename, MPI_Info info) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_File_delete()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_File_delete( filename, info) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_File_delete wrapper function ******************************************************/ void MPI_FILE_DELETE( char * filename, MPI_Fint * info, MPI_Fint * ierr) { MPI_Info local_info = MPI_Info_f2c(*info); *ierr = MPI_File_delete( filename, local_info) ; return ; } /****************************************************** *** MPI_File_delete wrapper function ******************************************************/ void mpi_file_delete( char * filename, MPI_Fint * info, MPI_Fint * ierr) { MPI_FILE_DELETE( filename, info, ierr) ; return ; } /****************************************************** *** MPI_File_delete wrapper function ******************************************************/ void mpi_file_delete_( char * filename, MPI_Fint * info, MPI_Fint * ierr) { MPI_FILE_DELETE( filename, info, ierr) ; return ; } /****************************************************** *** MPI_File_delete wrapper function ******************************************************/ void mpi_file_delete__( char * filename, MPI_Fint * info, MPI_Fint * ierr) { MPI_FILE_DELETE( filename, info, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_File_set_size wrapper function ******************************************************/ int MPI_File_set_size( MPI_File fh, MPI_Offset size) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_File_set_size()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_File_set_size( fh, size) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_File_set_size wrapper function ******************************************************/ void MPI_FILE_SET_SIZE( MPI_Fint * fh, MPI_Offset * size, MPI_Fint * ierr) { *ierr = MPI_File_set_size( MPI_File_f2c(*fh), *size) ; return ; } /****************************************************** *** MPI_File_set_size wrapper function ******************************************************/ void mpi_file_set_size( MPI_Fint * fh, MPI_Offset * size, MPI_Fint * ierr) { MPI_FILE_SET_SIZE( fh, size, ierr) ; return ; } /****************************************************** *** MPI_File_set_size wrapper function ******************************************************/ void mpi_file_set_size_( MPI_Fint * fh, MPI_Offset * size, MPI_Fint * ierr) { MPI_FILE_SET_SIZE( fh, size, ierr) ; return ; } /****************************************************** *** MPI_File_set_size wrapper function ******************************************************/ void mpi_file_set_size__( MPI_Fint * fh, MPI_Offset * size, MPI_Fint * ierr) { MPI_FILE_SET_SIZE( fh, size, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_File_get_size wrapper function ******************************************************/ int MPI_File_get_size( MPI_File fh, MPI_Offset * size) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_File_get_size()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_File_get_size( fh, size) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_File_get_size wrapper function ******************************************************/ void MPI_FILE_GET_SIZE( MPI_Fint * fh, MPI_Offset * size, MPI_Fint * ierr) { *ierr = MPI_File_get_size( MPI_File_f2c(*fh), size) ; return ; } /****************************************************** *** MPI_File_get_size wrapper function ******************************************************/ void mpi_file_get_size( MPI_Fint * fh, MPI_Offset * size, MPI_Fint * ierr) { MPI_FILE_GET_SIZE( fh, size, ierr) ; return ; } /****************************************************** *** MPI_File_get_size wrapper function ******************************************************/ void mpi_file_get_size_( MPI_Fint * fh, MPI_Offset * size, MPI_Fint * ierr) { MPI_FILE_GET_SIZE( fh, size, ierr) ; return ; } /****************************************************** *** MPI_File_get_size wrapper function ******************************************************/ void mpi_file_get_size__( MPI_Fint * fh, MPI_Offset * size, MPI_Fint * ierr) { MPI_FILE_GET_SIZE( fh, size, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_File_get_group wrapper function ******************************************************/ int MPI_File_get_group( MPI_File fh, MPI_Group * group) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_File_get_group()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_File_get_group( fh, group) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_File_get_group wrapper function ******************************************************/ void MPI_FILE_GET_GROUP( MPI_Fint * fh, MPI_Aint * group, MPI_Fint * ierr) { MPI_File local_file; MPI_Group local_group; local_file = MPI_File_f2c(*fh); *ierr = MPI_File_get_group( local_file, &local_group) ; *group = MPI_Group_c2f(local_group); return ; } /****************************************************** *** MPI_File_get_group wrapper function ******************************************************/ void mpi_file_get_group( MPI_Fint * fh, MPI_Aint * group, MPI_Fint * ierr) { MPI_FILE_GET_GROUP( fh, group, ierr) ; return ; } /****************************************************** *** MPI_File_get_group wrapper function ******************************************************/ void mpi_file_get_group_( MPI_Fint * fh, MPI_Aint * group, MPI_Fint * ierr) { MPI_FILE_GET_GROUP( fh, group, ierr) ; return ; } /****************************************************** *** MPI_File_get_group wrapper function ******************************************************/ void mpi_file_get_group__( MPI_Fint * fh, MPI_Aint * group, MPI_Fint * ierr) { MPI_FILE_GET_GROUP( fh, group, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_File_get_amode wrapper function ******************************************************/ int MPI_File_get_amode( MPI_File fh, int * amode) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_File_get_amode()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_File_get_amode( fh, amode) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_File_get_amode wrapper function ******************************************************/ void MPI_FILE_GET_AMODE( MPI_Fint * fh, MPI_Fint * amode, MPI_Fint * ierr) { *ierr = MPI_File_get_amode( MPI_File_f2c(*fh), amode) ; return ; } /****************************************************** *** MPI_File_get_amode wrapper function ******************************************************/ void mpi_file_get_amode( MPI_Fint * fh, MPI_Fint * amode, MPI_Fint * ierr) { MPI_FILE_GET_AMODE( fh, amode, ierr) ; return ; } /****************************************************** *** MPI_File_get_amode wrapper function ******************************************************/ void mpi_file_get_amode_( MPI_Fint * fh, MPI_Fint * amode, MPI_Fint * ierr) { MPI_FILE_GET_AMODE( fh, amode, ierr) ; return ; } /****************************************************** *** MPI_File_get_amode wrapper function ******************************************************/ void mpi_file_get_amode__( MPI_Fint * fh, MPI_Fint * amode, MPI_Fint * ierr) { MPI_FILE_GET_AMODE( fh, amode, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_File_set_info wrapper function ******************************************************/ int MPI_File_set_info( MPI_File fh, MPI_Info info) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_File_set_info()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_File_set_info( fh, info) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_File_set_info wrapper function ******************************************************/ void MPI_FILE_SET_INFO( MPI_Fint * fh, MPI_Fint * info, MPI_Fint * ierr) { *ierr = MPI_File_set_info( MPI_File_f2c(*fh), MPI_Info_f2c(*info)) ; return ; } /****************************************************** *** MPI_File_set_info wrapper function ******************************************************/ void mpi_file_set_info( MPI_Fint * fh, MPI_Fint * info, MPI_Fint * ierr) { MPI_FILE_SET_INFO( fh, info, ierr) ; return ; } /****************************************************** *** MPI_File_set_info wrapper function ******************************************************/ void mpi_file_set_info_( MPI_Fint * fh, MPI_Fint * info, MPI_Fint * ierr) { MPI_FILE_SET_INFO( fh, info, ierr) ; return ; } /****************************************************** *** MPI_File_set_info wrapper function ******************************************************/ void mpi_file_set_info__( MPI_Fint * fh, MPI_Fint * info, MPI_Fint * ierr) { MPI_FILE_SET_INFO( fh, info, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_File_get_info wrapper function ******************************************************/ int MPI_File_get_info( MPI_File fh, MPI_Info * info_used) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_File_get_info()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_File_get_info( fh, info_used) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_File_get_info wrapper function ******************************************************/ void MPI_FILE_GET_INFO( MPI_Fint * fh, MPI_Aint * info_used, MPI_Fint * ierr) { MPI_File local_fh; MPI_Info local_info; local_fh = MPI_File_f2c(*fh); *ierr = MPI_File_get_info( local_fh, &local_info) ; *info_used = MPI_Info_c2f(local_info); return ; } /****************************************************** *** MPI_File_get_info wrapper function ******************************************************/ void mpi_file_get_info( MPI_Fint * fh, MPI_Aint * info_used, MPI_Fint * ierr) { MPI_FILE_GET_INFO( fh, info_used, ierr) ; return ; } /****************************************************** *** MPI_File_get_info wrapper function ******************************************************/ void mpi_file_get_info_( MPI_Fint * fh, MPI_Aint * info_used, MPI_Fint * ierr) { MPI_FILE_GET_INFO( fh, info_used, ierr) ; return ; } /****************************************************** *** MPI_File_get_info wrapper function ******************************************************/ void mpi_file_get_info__( MPI_Fint * fh, MPI_Aint * info_used, MPI_Fint * ierr) { MPI_FILE_GET_INFO( fh, info_used, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_File_set_view wrapper function ******************************************************/ int MPI_File_set_view( MPI_File fh, MPI_Offset disp, MPI_Datatype etype, MPI_Datatype filetype, char * datarep, MPI_Info info) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_File_set_view()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_File_set_view( fh, disp, etype, filetype, datarep, info) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_File_set_view wrapper function ******************************************************/ void MPI_FILE_SET_VIEW( MPI_Fint * fh, MPI_Offset * disp, MPI_Fint * etype, MPI_Fint * filetype, char * datarep, MPI_Fint * info, MPI_Fint * ierr) { MPI_File local_fh; MPI_Datatype local_etype; MPI_Datatype local_filetype; MPI_Info local_info; local_fh = MPI_File_f2c(*fh); local_etype = MPI_Type_f2c(*etype); local_filetype = MPI_Type_f2c(*filetype); local_info = MPI_Info_f2c(*info); *ierr = MPI_File_set_view( local_fh, *disp, local_etype, local_filetype, datarep, local_info) ; return ; } /****************************************************** *** MPI_File_set_view wrapper function ******************************************************/ void mpi_file_set_view( MPI_Fint * fh, MPI_Offset * disp, MPI_Fint * etype, MPI_Fint * filetype, char * datarep, MPI_Fint * info, MPI_Fint * ierr) { MPI_FILE_SET_VIEW( fh, disp, etype, filetype, datarep, info, ierr) ; return ; } /****************************************************** *** MPI_File_set_view wrapper function ******************************************************/ void mpi_file_set_view_( MPI_Fint * fh, MPI_Offset * disp, MPI_Fint * etype, MPI_Fint * filetype, char * datarep, MPI_Fint * info, MPI_Fint * ierr) { MPI_FILE_SET_VIEW( fh, disp, etype, filetype, datarep, info, ierr) ; return ; } /****************************************************** *** MPI_File_set_view wrapper function ******************************************************/ void mpi_file_set_view__( MPI_Fint * fh, MPI_Offset * disp, MPI_Fint * etype, MPI_Fint * filetype, char * datarep, MPI_Fint * info, MPI_Fint * ierr) { MPI_FILE_SET_VIEW( fh, disp, etype, filetype, datarep, info, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_File_get_view wrapper function ******************************************************/ int MPI_File_get_view( MPI_File fh, MPI_Offset * disp, MPI_Datatype * etype, MPI_Datatype * filetype, char * datarep) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_File_get_view()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_File_get_view( fh, disp, etype, filetype, datarep) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_File_get_view wrapper function ******************************************************/ void MPI_FILE_GET_VIEW( MPI_Fint * fh, MPI_Offset * disp, MPI_Aint * etype, MPI_Aint * filetype, char * datarep, MPI_Fint * ierr) { MPI_File local_fh; MPI_Datatype local_etype; MPI_Datatype local_filetype; local_fh = MPI_File_f2c(*fh); *ierr = MPI_File_get_view( local_fh, disp, &local_etype, &local_filetype, datarep) ; *etype = MPI_Type_c2f(local_etype); *filetype = MPI_Type_c2f(local_filetype); return ; } /****************************************************** *** MPI_File_get_view wrapper function ******************************************************/ void mpi_file_get_view( MPI_Fint * fh, MPI_Offset * disp, MPI_Aint * etype, MPI_Aint * filetype, char * datarep, MPI_Fint * ierr) { MPI_FILE_GET_VIEW( fh, disp, etype, filetype, datarep, ierr) ; return ; } /****************************************************** *** MPI_File_get_view wrapper function ******************************************************/ void mpi_file_get_view_( MPI_Fint * fh, MPI_Offset * disp, MPI_Aint * etype, MPI_Aint * filetype, char * datarep, MPI_Fint * ierr) { MPI_FILE_GET_VIEW( fh, disp, etype, filetype, datarep, ierr) ; return ; } /****************************************************** *** MPI_File_get_view wrapper function ******************************************************/ void mpi_file_get_view__( MPI_Fint * fh, MPI_Offset * disp, MPI_Aint * etype, MPI_Aint * filetype, char * datarep, MPI_Fint * ierr) { MPI_FILE_GET_VIEW( fh, disp, etype, filetype, datarep, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_File_read_at wrapper function ******************************************************/ int MPI_File_read_at( MPI_File fh, MPI_Offset offset, void * buf, int count, MPI_Datatype datatype, MPI_Status * status) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_File_read_at()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_File_read_at( fh, offset, buf, count, datatype, status) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_File_read_at wrapper function ******************************************************/ void MPI_FILE_READ_AT( MPI_Fint * fh, MPI_Offset * offset, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Fint * status, MPI_Fint * ierr) { MPI_File local_fh; MPI_Datatype local_type; MPI_Status local_status; local_fh = MPI_File_f2c(*fh); local_type = MPI_Type_f2c(*datatype); *ierr = MPI_File_read_at( local_fh, *offset, buf, *count, local_type, &local_status) ; MPI_Status_c2f(&local_status, status); return ; } /****************************************************** *** MPI_File_read_at wrapper function ******************************************************/ void mpi_file_read_at( MPI_Fint * fh, MPI_Offset * offset, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Fint * status, MPI_Fint * ierr) { MPI_FILE_READ_AT( fh, offset, buf, count, datatype, status, ierr) ; return ; } /****************************************************** *** MPI_File_read_at wrapper function ******************************************************/ void mpi_file_read_at_( MPI_Fint * fh, MPI_Offset * offset, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Fint * status, MPI_Fint * ierr) { MPI_FILE_READ_AT( fh, offset, buf, count, datatype, status, ierr) ; return ; } /****************************************************** *** MPI_File_read_at wrapper function ******************************************************/ void mpi_file_read_at__( MPI_Fint * fh, MPI_Offset * offset, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Fint * status, MPI_Fint * ierr) { MPI_FILE_READ_AT( fh, offset, buf, count, datatype, status, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_File_read_at_all wrapper function ******************************************************/ int MPI_File_read_at_all( MPI_File fh, MPI_Offset offset, void * buf, int count, MPI_Datatype datatype, MPI_Status * status) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_File_read_at_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_File_read_at_all( fh, offset, buf, count, datatype, status) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_File_read_at_all wrapper function ******************************************************/ void MPI_FILE_READ_AT_ALL( MPI_Fint * fh, MPI_Offset * offset, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Fint * status, MPI_Fint * ierr) { MPI_File local_fh; MPI_Datatype local_type; MPI_Status local_status; local_fh = MPI_File_f2c(*fh); local_type = MPI_Type_f2c(*datatype); *ierr = MPI_File_read_at_all( local_fh, *offset, buf, *count, local_type, &local_status) ; MPI_Status_c2f(&local_status, status); return ; } /****************************************************** *** MPI_File_read_at_all wrapper function ******************************************************/ void mpi_file_read_at_all( MPI_Fint * fh, MPI_Offset * offset, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Fint * status, MPI_Fint * ierr) { MPI_FILE_READ_AT_ALL( fh, offset, buf, count, datatype, status, ierr) ; return ; } /****************************************************** *** MPI_File_read_at_all wrapper function ******************************************************/ void mpi_file_read_at_all_( MPI_Fint * fh, MPI_Offset * offset, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Fint * status, MPI_Fint * ierr) { MPI_FILE_READ_AT_ALL( fh, offset, buf, count, datatype, status, ierr) ; return ; } /****************************************************** *** MPI_File_read_at_all wrapper function ******************************************************/ void mpi_file_read_at_all__( MPI_Fint * fh, MPI_Offset * offset, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Fint * status, MPI_Fint * ierr) { MPI_FILE_READ_AT_ALL( fh, offset, buf, count, datatype, status, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_File_write_at wrapper function ******************************************************/ int MPI_File_write_at( MPI_File fh, MPI_Offset offset, void * buf, int count, MPI_Datatype datatype, MPI_Status * status) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_File_write_at()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_File_write_at( fh, offset, buf, count, datatype, status) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_File_write_at wrapper function ******************************************************/ void MPI_FILE_WRITE_AT( MPI_Fint * fh, MPI_Offset * offset, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Fint * status, MPI_Fint * ierr) { MPI_File local_fh; MPI_Datatype local_type; MPI_Status local_status; local_fh = MPI_File_f2c(*fh); local_type = MPI_Type_f2c(*datatype); *ierr = MPI_File_write_at( local_fh, *offset, buf, *count, local_type, &local_status) ; MPI_Status_c2f(&local_status, status); return ; } /****************************************************** *** MPI_File_write_at wrapper function ******************************************************/ void mpi_file_write_at( MPI_Fint * fh, MPI_Offset * offset, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Fint * status, MPI_Fint * ierr) { MPI_FILE_WRITE_AT( fh, offset, buf, count, datatype, status, ierr) ; return ; } /****************************************************** *** MPI_File_write_at wrapper function ******************************************************/ void mpi_file_write_at_( MPI_Fint * fh, MPI_Offset * offset, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Fint * status, MPI_Fint * ierr) { MPI_FILE_WRITE_AT( fh, offset, buf, count, datatype, status, ierr) ; return ; } /****************************************************** *** MPI_File_write_at wrapper function ******************************************************/ void mpi_file_write_at__( MPI_Fint * fh, MPI_Offset * offset, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Fint * status, MPI_Fint * ierr) { MPI_FILE_WRITE_AT( fh, offset, buf, count, datatype, status, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_File_write_at_all wrapper function ******************************************************/ int MPI_File_write_at_all( MPI_File fh, MPI_Offset offset, void * buf, int count, MPI_Datatype datatype, MPI_Status * status) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_File_write_at_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_File_write_at_all( fh, offset, buf, count, datatype, status) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_File_write_at_all wrapper function ******************************************************/ void MPI_FILE_WRITE_AT_ALL( MPI_Fint * fh, MPI_Offset * offset, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Fint * status, MPI_Fint * ierr) { MPI_File local_fh; MPI_Datatype local_type; MPI_Status local_status; local_fh = MPI_File_f2c(*fh); local_type = MPI_Type_f2c(*datatype); *ierr = MPI_File_write_at_all( local_fh, *offset, buf, *count, local_type, &local_status) ; MPI_Status_c2f(&local_status, status); return ; } /****************************************************** *** MPI_File_write_at_all wrapper function ******************************************************/ void mpi_file_write_at_all( MPI_Fint * fh, MPI_Offset * offset, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Fint * status, MPI_Fint * ierr) { MPI_FILE_WRITE_AT_ALL( fh, offset, buf, count, datatype, status, ierr) ; return ; } /****************************************************** *** MPI_File_write_at_all wrapper function ******************************************************/ void mpi_file_write_at_all_( MPI_Fint * fh, MPI_Offset * offset, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Fint * status, MPI_Fint * ierr) { MPI_FILE_WRITE_AT_ALL( fh, offset, buf, count, datatype, status, ierr) ; return ; } /****************************************************** *** MPI_File_write_at_all wrapper function ******************************************************/ void mpi_file_write_at_all__( MPI_Fint * fh, MPI_Offset * offset, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Fint * status, MPI_Fint * ierr) { MPI_FILE_WRITE_AT_ALL( fh, offset, buf, count, datatype, status, ierr) ; return ; } /******************************************************/ /******************************************************/ #ifdef TAU_MPIOREQUEST /****************************************************** *** MPI_File_iread_at wrapper function ******************************************************/ int MPI_File_iread_at( MPI_File fh, MPI_Offset offset, void * buf, int count, MPI_Datatype datatype, MPIO_Request * request) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_File_iread_at()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_File_iread_at( fh, offset, buf, count, datatype, request) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_File_iread_at wrapper function ******************************************************/ void MPI_FILE_IREAD_AT( MPI_Fint * fh, MPI_Offset * offset, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Aint * request, MPI_Fint * ierr) { MPI_File local_fh; MPI_Datatype local_type; MPIO_Request local_request; local_fh = MPI_File_f2c(*fh); local_type = MPI_Type_f2c(*datatype); *ierr = MPI_File_iread_at( local_fh, *offset, buf, *count, local_type, &local_request) ; *request = MPIO_Request_c2f(local_request); return ; } /****************************************************** *** MPI_File_iread_at wrapper function ******************************************************/ void mpi_file_iread_at( MPI_Fint * fh, MPI_Offset * offset, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Aint * request, MPI_Fint * ierr) { MPI_FILE_IREAD_AT( fh, offset, buf, count, datatype, request, ierr) ; return ; } /****************************************************** *** MPI_File_iread_at wrapper function ******************************************************/ void mpi_file_iread_at_( MPI_Fint * fh, MPI_Offset * offset, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Aint * request, MPI_Fint * ierr) { MPI_FILE_IREAD_AT( fh, offset, buf, count, datatype, request, ierr) ; return ; } /****************************************************** *** MPI_File_iread_at wrapper function ******************************************************/ void mpi_file_iread_at__( MPI_Fint * fh, MPI_Offset * offset, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Aint * request, MPI_Fint * ierr) { MPI_FILE_IREAD_AT( fh, offset, buf, count, datatype, request, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_File_iwrite_at wrapper function ******************************************************/ int MPI_File_iwrite_at( MPI_File fh, MPI_Offset offset, void * buf, int count, MPI_Datatype datatype, MPIO_Request * request) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_File_iwrite_at()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_File_iwrite_at( fh, offset, buf, count, datatype, request) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_File_iwrite_at wrapper function ******************************************************/ void MPI_FILE_IWRITE_AT( MPI_Fint * fh, MPI_Offset * offset, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Aint * request, MPI_Fint * ierr) { MPI_File local_fh; MPI_Datatype local_type; MPIO_Request local_request; local_fh = MPI_File_f2c(*fh); local_type = MPI_Type_f2c(*datatype); *ierr = MPI_File_iwrite_at( local_fh, *offset, buf, *count, local_type, &local_request) ; *request = MPIO_Request_c2f(local_request); return ; } /****************************************************** *** MPI_File_iwrite_at wrapper function ******************************************************/ void mpi_file_iwrite_at( MPI_Fint * fh, MPI_Offset * offset, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Aint * request, MPI_Fint * ierr) { MPI_FILE_IWRITE_AT( fh, offset, buf, count, datatype, request, ierr) ; return ; } /****************************************************** *** MPI_File_iwrite_at wrapper function ******************************************************/ void mpi_file_iwrite_at_( MPI_Fint * fh, MPI_Offset * offset, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Aint * request, MPI_Fint * ierr) { MPI_FILE_IWRITE_AT( fh, offset, buf, count, datatype, request, ierr) ; return ; } /****************************************************** *** MPI_File_iwrite_at wrapper function ******************************************************/ void mpi_file_iwrite_at__( MPI_Fint * fh, MPI_Offset * offset, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Aint * request, MPI_Fint * ierr) { MPI_FILE_IWRITE_AT( fh, offset, buf, count, datatype, request, ierr) ; return ; } /******************************************************/ /******************************************************/ #else /* ! defined TAU_MPIOREQUEST */ /****************************************************** *** MPI_File_iread_at wrapper function ******************************************************/ int MPI_File_iread_at( MPI_File fh, MPI_Offset offset, void * buf, int count, MPI_Datatype datatype, MPI_Request * request) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_File_iread_at()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_File_iread_at( fh, offset, buf, count, datatype, request) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_File_iread_at wrapper function ******************************************************/ void MPI_FILE_IREAD_AT( MPI_Fint * fh, MPI_Offset * offset, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Aint * request, MPI_Fint * ierr) { MPI_File local_fh; MPI_Datatype local_type; MPI_Request local_request; local_fh = MPI_File_f2c(*fh); local_type = MPI_Type_f2c(*datatype); *ierr = MPI_File_iread_at( local_fh, *offset, buf, *count, local_type, &local_request) ; *request = MPI_Request_c2f(local_request); return ; } /****************************************************** *** MPI_File_iread_at wrapper function ******************************************************/ void mpi_file_iread_at( MPI_Fint * fh, MPI_Offset * offset, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Aint * request, MPI_Fint * ierr) { MPI_FILE_IREAD_AT( fh, offset, buf, count, datatype, request, ierr) ; return ; } /****************************************************** *** MPI_File_iread_at wrapper function ******************************************************/ void mpi_file_iread_at_( MPI_Fint * fh, MPI_Offset * offset, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Aint * request, MPI_Fint * ierr) { MPI_FILE_IREAD_AT( fh, offset, buf, count, datatype, request, ierr) ; return ; } /****************************************************** *** MPI_File_iread_at wrapper function ******************************************************/ void mpi_file_iread_at__( MPI_Fint * fh, MPI_Offset * offset, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Aint * request, MPI_Fint * ierr) { MPI_FILE_IREAD_AT( fh, offset, buf, count, datatype, request, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_File_iwrite_at wrapper function ******************************************************/ int MPI_File_iwrite_at( MPI_File fh, MPI_Offset offset, void * buf, int count, MPI_Datatype datatype, MPI_Request * request) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_File_iwrite_at()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_File_iwrite_at( fh, offset, buf, count, datatype, request) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_File_iwrite_at wrapper function ******************************************************/ void MPI_FILE_IWRITE_AT( MPI_Fint * fh, MPI_Offset * offset, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Aint * request, MPI_Fint * ierr) { MPI_File local_fh; MPI_Datatype local_type; MPI_Request local_request; local_fh = MPI_File_f2c(*fh); local_type = MPI_Type_f2c(*datatype); *ierr = MPI_File_iwrite_at( local_fh, *offset, buf, *count, local_type, &local_request) ; *request = MPI_Request_c2f(local_request); return ; } /****************************************************** *** MPI_File_iwrite_at wrapper function ******************************************************/ void mpi_file_iwrite_at( MPI_Fint * fh, MPI_Offset * offset, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Aint * request, MPI_Fint * ierr) { MPI_FILE_IWRITE_AT( fh, offset, buf, count, datatype, request, ierr) ; return ; } /****************************************************** *** MPI_File_iwrite_at wrapper function ******************************************************/ void mpi_file_iwrite_at_( MPI_Fint * fh, MPI_Offset * offset, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Aint * request, MPI_Fint * ierr) { MPI_FILE_IWRITE_AT( fh, offset, buf, count, datatype, request, ierr) ; return ; } /****************************************************** *** MPI_File_iwrite_at wrapper function ******************************************************/ void mpi_file_iwrite_at__( MPI_Fint * fh, MPI_Offset * offset, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Aint * request, MPI_Fint * ierr) { MPI_FILE_IWRITE_AT( fh, offset, buf, count, datatype, request, ierr) ; return ; } /******************************************************/ /******************************************************/ #endif /* TAU_MPIOREQUEST */ /****************************************************** *** MPI_File_get_atomicity wrapper function ******************************************************/ int MPI_File_get_atomicity( MPI_File fh, int * flag) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_File_get_atomicity()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_File_get_atomicity( fh, flag) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_File_get_atomicity wrapper function ******************************************************/ void MPI_FILE_GET_ATOMICITY( MPI_Fint * fh, MPI_Fint * flag, MPI_Fint * ierr) { *ierr = MPI_File_get_atomicity( MPI_File_f2c(*fh), flag) ; return ; } /****************************************************** *** MPI_File_get_atomicity wrapper function ******************************************************/ void mpi_file_get_atomicity( MPI_Fint * fh, MPI_Fint * flag, MPI_Fint * ierr) { MPI_FILE_GET_ATOMICITY( fh, flag, ierr) ; return ; } /****************************************************** *** MPI_File_get_atomicity wrapper function ******************************************************/ void mpi_file_get_atomicity_( MPI_Fint * fh, MPI_Fint * flag, MPI_Fint * ierr) { MPI_FILE_GET_ATOMICITY( fh, flag, ierr) ; return ; } /****************************************************** *** MPI_File_get_atomicity wrapper function ******************************************************/ void mpi_file_get_atomicity__( MPI_Fint * fh, MPI_Fint * flag, MPI_Fint * ierr) { MPI_FILE_GET_ATOMICITY( fh, flag, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_File_sync wrapper function ******************************************************/ int MPI_File_sync( MPI_File fh) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_File_sync()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_File_sync( fh) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_File_sync wrapper function ******************************************************/ void MPI_FILE_SYNC( MPI_Fint * fh, MPI_Fint * ierr) { *ierr = MPI_File_sync( MPI_File_f2c(*fh)) ; return ; } /****************************************************** *** MPI_File_sync wrapper function ******************************************************/ void mpi_file_sync( MPI_Fint * fh, MPI_Fint * ierr) { MPI_FILE_SYNC( fh, ierr) ; return ; } /****************************************************** *** MPI_File_sync wrapper function ******************************************************/ void mpi_file_sync_( MPI_Fint * fh, MPI_Fint * ierr) { MPI_FILE_SYNC( fh, ierr) ; return ; } /****************************************************** *** MPI_File_sync wrapper function ******************************************************/ void mpi_file_sync__( MPI_Fint * fh, MPI_Fint * ierr) { MPI_FILE_SYNC( fh, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_Type_create_subarray wrapper function ******************************************************/ int MPI_Type_create_subarray( int ndims, int * array_of_sizes, int * array_of_subsizes, int * array_of_starts, int order, MPI_Datatype oldtype, MPI_Datatype * newtype) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_Type_create_subarray()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_Type_create_subarray( ndims, array_of_sizes, array_of_subsizes, array_of_starts, order, oldtype, newtype) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_Type_create_subarray wrapper function ******************************************************/ void MPI_TYPE_CREATE_SUBARRAY( MPI_Fint * ndims, MPI_Fint * array_of_sizes, MPI_Fint * array_of_subsizes, MPI_Fint * array_of_starts, MPI_Fint * order, MPI_Fint * oldtype, MPI_Aint * newtype, MPI_Fint * ierr) { MPI_Datatype local_oldtype; MPI_Datatype local_newtype; local_oldtype = MPI_Type_f2c(*oldtype); *ierr = MPI_Type_create_subarray( *ndims, array_of_sizes, array_of_subsizes, array_of_starts, *order, local_oldtype, &local_newtype) ; *newtype = MPI_Type_c2f(local_newtype); return ; } /****************************************************** *** MPI_Type_create_subarray wrapper function ******************************************************/ void mpi_type_create_subarray( MPI_Fint * ndims, MPI_Fint * array_of_sizes, MPI_Fint * array_of_subsizes, MPI_Fint * array_of_starts, MPI_Fint * order, MPI_Fint * oldtype, MPI_Aint * newtype, MPI_Fint * ierr) { MPI_TYPE_CREATE_SUBARRAY( ndims, array_of_sizes, array_of_subsizes, array_of_starts, order, oldtype, newtype, ierr) ; return ; } /****************************************************** *** MPI_Type_create_subarray wrapper function ******************************************************/ void mpi_type_create_subarray_( MPI_Fint * ndims, MPI_Fint * array_of_sizes, MPI_Fint * array_of_subsizes, MPI_Fint * array_of_starts, MPI_Fint * order, MPI_Fint * oldtype, MPI_Aint * newtype, MPI_Fint * ierr) { MPI_TYPE_CREATE_SUBARRAY( ndims, array_of_sizes, array_of_subsizes, array_of_starts, order, oldtype, newtype, ierr) ; return ; } /****************************************************** *** MPI_Type_create_subarray wrapper function ******************************************************/ void mpi_type_create_subarray__( MPI_Fint * ndims, MPI_Fint * array_of_sizes, MPI_Fint * array_of_subsizes, MPI_Fint * array_of_starts, MPI_Fint * order, MPI_Fint * oldtype, MPI_Aint * newtype, MPI_Fint * ierr) { MPI_TYPE_CREATE_SUBARRAY( ndims, array_of_sizes, array_of_subsizes, array_of_starts, order, oldtype, newtype, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_Type_create_darray wrapper function ******************************************************/ int MPI_Type_create_darray( int size, int rank, int ndims, int * array_of_gsizes, int * array_of_distribs, int * array_of_dargs, int * array_of_psizes, int order, MPI_Datatype oldtype, MPI_Datatype * newtype) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_Type_create_darray()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_Type_create_darray( size, rank, ndims, array_of_gsizes, array_of_distribs, array_of_dargs, array_of_psizes, order, oldtype, newtype) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_Type_create_darray wrapper function ******************************************************/ void MPI_TYPE_CREATE_DARRAY( MPI_Fint * size, MPI_Fint * rank, MPI_Fint * ndims, MPI_Fint * array_of_gsizes, MPI_Fint * array_of_distribs, MPI_Fint * array_of_dargs, MPI_Fint * array_of_psizes, MPI_Fint * order, MPI_Fint * oldtype, MPI_Aint * newtype, MPI_Fint * ierr) { MPI_Datatype local_newtype; *ierr = MPI_Type_create_darray( *size, *rank, *ndims, array_of_gsizes, array_of_distribs, array_of_dargs, array_of_psizes, *order, MPI_Type_f2c(*oldtype), &local_newtype) ; *newtype = MPI_Type_c2f(local_newtype); return ; } /****************************************************** *** MPI_Type_create_darray wrapper function ******************************************************/ void mpi_type_create_darray( MPI_Fint * size, MPI_Fint * rank, MPI_Fint * ndims, MPI_Fint * array_of_gsizes, MPI_Fint * array_of_distribs, MPI_Fint * array_of_dargs, MPI_Fint * array_of_psizes, MPI_Fint * order, MPI_Fint * oldtype, MPI_Aint * newtype, MPI_Fint * ierr) { MPI_TYPE_CREATE_DARRAY( size, rank, ndims, array_of_gsizes, array_of_distribs, array_of_dargs, array_of_psizes, order, oldtype, newtype, ierr) ; return ; } /****************************************************** *** MPI_Type_create_darray wrapper function ******************************************************/ void mpi_type_create_darray_( MPI_Fint * size, MPI_Fint * rank, MPI_Fint * ndims, MPI_Fint * array_of_gsizes, MPI_Fint * array_of_distribs, MPI_Fint * array_of_dargs, MPI_Fint * array_of_psizes, MPI_Fint * order, MPI_Fint * oldtype, MPI_Aint * newtype, MPI_Fint * ierr) { MPI_TYPE_CREATE_DARRAY( size, rank, ndims, array_of_gsizes, array_of_distribs, array_of_dargs, array_of_psizes, order, oldtype, newtype, ierr) ; return ; } /****************************************************** *** MPI_Type_create_darray wrapper function ******************************************************/ void mpi_type_create_darray__( MPI_Fint * size, MPI_Fint * rank, MPI_Fint * ndims, MPI_Fint * array_of_gsizes, MPI_Fint * array_of_distribs, MPI_Fint * array_of_dargs, MPI_Fint * array_of_psizes, MPI_Fint * order, MPI_Fint * oldtype, MPI_Aint * newtype, MPI_Fint * ierr) { MPI_TYPE_CREATE_DARRAY( size, rank, ndims, array_of_gsizes, array_of_distribs, array_of_dargs, array_of_psizes, order, oldtype, newtype, ierr) ; return ; } /******************************************************/ /******************************************************/ #ifdef TAU_MPIERRHANDLER /****************************************************** *** MPI_File_create_errhandler wrapper function ******************************************************/ int MPI_File_create_errhandler( MPI_File_errhandler_fn * function, MPI_Errhandler * errhandler) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_File_create_errhandler()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_File_create_errhandler( function, errhandler) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_File_create_errhandler wrapper function ******************************************************/ void MPI_FILE_CREATE_ERRHANDLER( MPI_File_errhandler_fn * function, MPI_Fint * errhandler, MPI_Fint * ierr) { MPI_Errhandler local_errhandler; *ierr = MPI_File_create_errhandler( function, &local_errhandler) ; *errhandler = MPI_Errhandler_c2f(local_errhandler); return ; } /****************************************************** *** MPI_File_create_errhandler wrapper function ******************************************************/ void mpi_file_create_errhandler( MPI_File_errhandler_fn * function, MPI_Fint * errhandler, MPI_Fint * ierr) { MPI_FILE_CREATE_ERRHANDLER( function, errhandler, ierr) ; return ; } /****************************************************** *** MPI_File_create_errhandler wrapper function ******************************************************/ void mpi_file_create_errhandler_( MPI_File_errhandler_fn * function, MPI_Fint * errhandler, MPI_Fint * ierr) { MPI_FILE_CREATE_ERRHANDLER( function, errhandler, ierr) ; return ; } /****************************************************** *** MPI_File_create_errhandler wrapper function ******************************************************/ void mpi_file_create_errhandler__( MPI_File_errhandler_fn * function, MPI_Fint * errhandler, MPI_Fint * ierr) { MPI_FILE_CREATE_ERRHANDLER( function, errhandler, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_File_set_errhandler wrapper function ******************************************************/ int MPI_File_set_errhandler( MPI_File fh, MPI_Errhandler errhandler) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_File_set_errhandler()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_File_set_errhandler( fh, errhandler) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_File_set_errhandler wrapper function ******************************************************/ void MPI_FILE_SET_ERRHANDLER( MPI_Fint * fh, MPI_Fint * errhandler, MPI_Fint * ierr) { *ierr = MPI_File_set_errhandler( MPI_File_f2c(*fh), MPI_Errhandler_f2c(*errhandler)) ; return ; } /****************************************************** *** MPI_File_set_errhandler wrapper function ******************************************************/ void mpi_file_set_errhandler( MPI_Fint * fh, MPI_Fint * errhandler, MPI_Fint * ierr) { MPI_FILE_SET_ERRHANDLER( fh, errhandler, ierr) ; return ; } /****************************************************** *** MPI_File_set_errhandler wrapper function ******************************************************/ void mpi_file_set_errhandler_( MPI_Fint * fh, MPI_Fint * errhandler, MPI_Fint * ierr) { MPI_FILE_SET_ERRHANDLER( fh, errhandler, ierr) ; return ; } /****************************************************** *** MPI_File_set_errhandler wrapper function ******************************************************/ void mpi_file_set_errhandler__( MPI_Fint * fh, MPI_Fint * errhandler, MPI_Fint * ierr) { MPI_FILE_SET_ERRHANDLER( fh, errhandler, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_File_get_errhandler wrapper function ******************************************************/ int MPI_File_get_errhandler( MPI_File fh, MPI_Errhandler * errhandler) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_File_get_errhandler()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_File_get_errhandler( fh, errhandler) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_File_get_errhandler wrapper function ******************************************************/ void MPI_FILE_GET_ERRHANDLER( MPI_Fint * fh, MPI_Aint * errhandler, MPI_Fint * ierr) { MPI_File local_fh; MPI_Errhandler local_errhandler; local_fh = MPI_File_f2c(*fh); *ierr = MPI_File_get_errhandler( local_fh, &local_errhandler) ; *errhandler = MPI_Errhandler_c2f(local_errhandler); return ; } /****************************************************** *** MPI_File_get_errhandler wrapper function ******************************************************/ void mpi_file_get_errhandler( MPI_Fint * fh, MPI_Aint * errhandler, MPI_Fint * ierr) { MPI_FILE_GET_ERRHANDLER( fh, errhandler, ierr) ; return ; } /****************************************************** *** MPI_File_get_errhandler wrapper function ******************************************************/ void mpi_file_get_errhandler_( MPI_Fint * fh, MPI_Aint * errhandler, MPI_Fint * ierr) { MPI_FILE_GET_ERRHANDLER( fh, errhandler, ierr) ; return ; } /****************************************************** *** MPI_File_get_errhandler wrapper function ******************************************************/ void mpi_file_get_errhandler__( MPI_Fint * fh, MPI_Aint * errhandler, MPI_Fint * ierr) { MPI_FILE_GET_ERRHANDLER( fh, errhandler, ierr) ; return ; } #endif /* TAU_MPIERRHANDLER */ /******************************************************/ /******************************************************/ /****************************************************** *** MPI_File_get_byte_offset wrapper function ******************************************************/ int MPI_File_get_byte_offset( MPI_File fh, MPI_Offset offset, MPI_Offset * disp) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_File_get_byte_offset()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_File_get_byte_offset( fh, offset, disp) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_File_get_byte_offset wrapper function ******************************************************/ void MPI_FILE_GET_BYTE_OFFSET( MPI_Fint * fh, MPI_Offset * offset, MPI_Offset * disp, MPI_Fint * ierr) { MPI_File local_fh; MPI_Offset local_offset; local_fh = MPI_File_f2c(*fh); *ierr = MPI_File_get_byte_offset( local_fh, *offset, &local_offset) ; *disp = local_offset; return ; } /****************************************************** *** MPI_File_get_byte_offset wrapper function ******************************************************/ void mpi_file_get_byte_offset( MPI_Fint * fh, MPI_Offset * offset, MPI_Offset * disp, MPI_Fint * ierr) { MPI_FILE_GET_BYTE_OFFSET( fh, offset, disp, ierr) ; return ; } /****************************************************** *** MPI_File_get_byte_offset wrapper function ******************************************************/ void mpi_file_get_byte_offset_( MPI_Fint * fh, MPI_Offset * offset, MPI_Offset * disp, MPI_Fint * ierr) { MPI_FILE_GET_BYTE_OFFSET( fh, offset, disp, ierr) ; return ; } /****************************************************** *** MPI_File_get_byte_offset wrapper function ******************************************************/ void mpi_file_get_byte_offset__( MPI_Fint * fh, MPI_Offset * offset, MPI_Offset * disp, MPI_Fint * ierr) { MPI_FILE_GET_BYTE_OFFSET( fh, offset, disp, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_File_get_position wrapper function ******************************************************/ int MPI_File_get_position( MPI_File fh, MPI_Offset * offset) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_File_get_position()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_File_get_position( fh, offset) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_File_get_position wrapper function ******************************************************/ void MPI_FILE_GET_POSITION( MPI_Fint * fh, MPI_Offset * offset, MPI_Fint * ierr) { MPI_File local_fh; MPI_Offset local_offset; local_fh = MPI_File_f2c(*fh); *ierr = MPI_File_get_position( local_fh, &local_offset) ; *offset = local_offset; return ; } /****************************************************** *** MPI_File_get_position wrapper function ******************************************************/ void mpi_file_get_position( MPI_Fint * fh, MPI_Offset * offset, MPI_Fint * ierr) { MPI_FILE_GET_POSITION( fh, offset, ierr) ; return ; } /****************************************************** *** MPI_File_get_position wrapper function ******************************************************/ void mpi_file_get_position_( MPI_Fint * fh, MPI_Offset * offset, MPI_Fint * ierr) { MPI_FILE_GET_POSITION( fh, offset, ierr) ; return ; } /****************************************************** *** MPI_File_get_position wrapper function ******************************************************/ void mpi_file_get_position__( MPI_Fint * fh, MPI_Offset * offset, MPI_Fint * ierr) { MPI_FILE_GET_POSITION( fh, offset, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_File_get_position_shared wrapper function ******************************************************/ int MPI_File_get_position_shared( MPI_File fh, MPI_Offset * offset) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_File_get_position_shared()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_File_get_position_shared( fh, offset) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_File_get_position_shared wrapper function ******************************************************/ void MPI_FILE_GET_POSITION_SHARED( MPI_Fint * fh, MPI_Offset * offset, MPI_Fint * ierr) { MPI_File local_fh; local_fh = MPI_File_f2c(*fh); *ierr = MPI_File_get_position_shared( local_fh, offset) ; return ; } /****************************************************** *** MPI_File_get_position_shared wrapper function ******************************************************/ void mpi_file_get_position_shared( MPI_Fint * fh, MPI_Offset * offset, MPI_Fint * ierr) { MPI_FILE_GET_POSITION_SHARED( fh, offset, ierr) ; return ; } /****************************************************** *** MPI_File_get_position_shared wrapper function ******************************************************/ void mpi_file_get_position_shared_( MPI_Fint * fh, MPI_Offset * offset, MPI_Fint * ierr) { MPI_FILE_GET_POSITION_SHARED( fh, offset, ierr) ; return ; } /****************************************************** *** MPI_File_get_position_shared wrapper function ******************************************************/ void mpi_file_get_position_shared__( MPI_Fint * fh, MPI_Offset * offset, MPI_Fint * ierr) { MPI_FILE_GET_POSITION_SHARED( fh, offset, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_File_get_type_extent wrapper function ******************************************************/ int MPI_File_get_type_extent( MPI_File fh, MPI_Datatype datatype, MPI_Aint * extent) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_File_get_type_extent()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_File_get_type_extent( fh, datatype, extent) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_File_get_type_extent wrapper function ******************************************************/ void MPI_FILE_GET_TYPE_EXTENT( MPI_Fint * fh, MPI_Fint * datatype, MPI_Aint * extent, MPI_Fint * ierr) { *ierr = MPI_File_get_type_extent( MPI_File_f2c(*fh), MPI_Type_f2c(*datatype), extent) ; return ; } /****************************************************** *** MPI_File_get_type_extent wrapper function ******************************************************/ void mpi_file_get_type_extent( MPI_Fint * fh, MPI_Fint * datatype, MPI_Aint * extent, MPI_Fint * ierr) { MPI_FILE_GET_TYPE_EXTENT( fh, datatype, extent, ierr) ; return ; } /****************************************************** *** MPI_File_get_type_extent wrapper function ******************************************************/ void mpi_file_get_type_extent_( MPI_Fint * fh, MPI_Fint * datatype, MPI_Aint * extent, MPI_Fint * ierr) { MPI_FILE_GET_TYPE_EXTENT( fh, datatype, extent, ierr) ; return ; } /****************************************************** *** MPI_File_get_type_extent wrapper function ******************************************************/ void mpi_file_get_type_extent__( MPI_Fint * fh, MPI_Fint * datatype, MPI_Aint * extent, MPI_Fint * ierr) { MPI_FILE_GET_TYPE_EXTENT( fh, datatype, extent, ierr) ; return ; } /******************************************************/ /******************************************************/ #ifdef TAU_MPIOREQUEST /****************************************************** *** MPI_File_iread wrapper function ******************************************************/ int MPI_File_iread( MPI_File fh, void * buf, int count, MPI_Datatype datatype, MPIO_Request * request) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_File_iread()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_File_iread( fh, buf, count, datatype, request) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_File_iread wrapper function ******************************************************/ void MPI_FILE_IREAD( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Aint * request, MPI_Fint * ierr) { MPI_File local_fh; MPI_Datatype local_type; MPIO_Request local_request; local_fh = MPI_File_f2c(*fh); local_type = MPI_Type_f2c(*datatype); *ierr = MPI_File_iread( local_fh, buf, *count, local_type, &local_request) ; *fh = MPI_File_c2f(local_fh); *request = MPIO_Request_c2f(local_request); return ; } /****************************************************** *** MPI_File_iread wrapper function ******************************************************/ void mpi_file_iread( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Aint * request, MPI_Fint * ierr) { MPI_FILE_IREAD( fh, buf, count, datatype, request, ierr) ; return ; } /****************************************************** *** MPI_File_iread wrapper function ******************************************************/ void mpi_file_iread_( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Aint * request, MPI_Fint * ierr) { MPI_FILE_IREAD( fh, buf, count, datatype, request, ierr) ; return ; } /****************************************************** *** MPI_File_iread wrapper function ******************************************************/ void mpi_file_iread__( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Aint * request, MPI_Fint * ierr) { MPI_FILE_IREAD( fh, buf, count, datatype, request, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_File_iread_shared wrapper function ******************************************************/ int MPI_File_iread_shared( MPI_File fh, void * buf, int count, MPI_Datatype datatype, MPIO_Request * request) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_File_iread_shared()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_File_iread_shared( fh, buf, count, datatype, request) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_File_iread_shared wrapper function ******************************************************/ void MPI_FILE_IREAD_SHARED( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Aint * request, MPI_Fint * ierr) { MPI_File local_fh; MPI_Datatype local_type; MPIO_Request local_request; local_fh = MPI_File_f2c(*fh); local_type = MPI_Type_f2c(*datatype); *ierr = MPI_File_iread_shared( local_fh, buf, *count, local_type, &local_request) ; *request = MPIO_Request_c2f(local_request); return ; } /****************************************************** *** MPI_File_iread_shared wrapper function ******************************************************/ void mpi_file_iread_shared( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Aint * request, MPI_Fint * ierr) { MPI_FILE_IREAD_SHARED( fh, buf, count, datatype, request, ierr) ; return ; } /****************************************************** *** MPI_File_iread_shared wrapper function ******************************************************/ void mpi_file_iread_shared_( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Aint * request, MPI_Fint * ierr) { MPI_FILE_IREAD_SHARED( fh, buf, count, datatype, request, ierr) ; return ; } /****************************************************** *** MPI_File_iread_shared wrapper function ******************************************************/ void mpi_file_iread_shared__( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Aint * request, MPI_Fint * ierr) { MPI_FILE_IREAD_SHARED( fh, buf, count, datatype, request, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_File_iwrite wrapper function ******************************************************/ int MPI_File_iwrite( MPI_File fh, void * buf, int count, MPI_Datatype datatype, MPIO_Request * request) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_File_iwrite()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_File_iwrite( fh, buf, count, datatype, request) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_File_iwrite wrapper function ******************************************************/ void MPI_FILE_IWRITE( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Aint * request, MPI_Fint * ierr) { MPI_File local_fh; MPIO_Request local_request; local_fh = MPI_File_f2c(*fh); *ierr = MPI_File_iwrite( local_fh, buf, *count, MPI_Type_f2c(*datatype), &local_request) ; *fh = MPI_File_c2f(local_fh); *request = MPIO_Request_c2f(local_request); return ; } /****************************************************** *** MPI_File_iwrite wrapper function ******************************************************/ void mpi_file_iwrite( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Aint * request, MPI_Fint * ierr) { MPI_FILE_IWRITE( fh, buf, count, datatype, request, ierr) ; return ; } /****************************************************** *** MPI_File_iwrite wrapper function ******************************************************/ void mpi_file_iwrite_( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Aint * request, MPI_Fint * ierr) { MPI_FILE_IWRITE( fh, buf, count, datatype, request, ierr) ; return ; } /****************************************************** *** MPI_File_iwrite wrapper function ******************************************************/ void mpi_file_iwrite__( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Aint * request, MPI_Fint * ierr) { MPI_FILE_IWRITE( fh, buf, count, datatype, request, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_File_iwrite_shared wrapper function ******************************************************/ int MPI_File_iwrite_shared( MPI_File fh, void * buf, int count, MPI_Datatype datatype, MPIO_Request * request) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_File_iwrite_shared()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_File_iwrite_shared( fh, buf, count, datatype, request) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_File_iwrite_shared wrapper function ******************************************************/ void MPI_FILE_IWRITE_SHARED( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Aint * request, MPI_Fint * ierr) { MPI_File local_fh; MPIO_Request local_request; local_fh = MPI_File_f2c(*fh); *ierr = MPI_File_iwrite_shared( local_fh, buf, *count, MPI_Type_f2c(*datatype), &local_request) ; *fh = MPI_File_c2f(local_fh); *request = MPIO_Request_c2f(local_request); return ; } /****************************************************** *** MPI_File_iwrite_shared wrapper function ******************************************************/ void mpi_file_iwrite_shared( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Aint * request, MPI_Fint * ierr) { MPI_FILE_IWRITE_SHARED( fh, buf, count, datatype, request, ierr) ; return ; } /****************************************************** *** MPI_File_iwrite_shared wrapper function ******************************************************/ void mpi_file_iwrite_shared_( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Aint * request, MPI_Fint * ierr) { MPI_FILE_IWRITE_SHARED( fh, buf, count, datatype, request, ierr) ; return ; } /****************************************************** *** MPI_File_iwrite_shared wrapper function ******************************************************/ void mpi_file_iwrite_shared__( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Aint * request, MPI_Fint * ierr) { MPI_FILE_IWRITE_SHARED( fh, buf, count, datatype, request, ierr) ; return ; } /******************************************************/ /******************************************************/ #else /* ! defined TAU_MPIOREQUEST */ /****************************************************** *** MPI_File_iread wrapper function ******************************************************/ int MPI_File_iread( MPI_File fh, void * buf, int count, MPI_Datatype datatype, MPI_Request * request) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_File_iread()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_File_iread( fh, buf, count, datatype, request) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_File_iread wrapper function ******************************************************/ void MPI_FILE_IREAD( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Aint * request, MPI_Fint * ierr) { MPI_File local_fh; MPI_Datatype local_type; MPI_Request local_request; local_fh = MPI_File_f2c(*fh); local_type = MPI_Type_f2c(*datatype); *ierr = MPI_File_iread( local_fh, buf, *count, local_type, &local_request) ; *fh = MPI_File_c2f(local_fh); *request = MPI_Request_c2f(local_request); return ; } /****************************************************** *** MPI_File_iread wrapper function ******************************************************/ void mpi_file_iread( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Aint * request, MPI_Fint * ierr) { MPI_FILE_IREAD( fh, buf, count, datatype, request, ierr) ; return ; } /****************************************************** *** MPI_File_iread wrapper function ******************************************************/ void mpi_file_iread_( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Aint * request, MPI_Fint * ierr) { MPI_FILE_IREAD( fh, buf, count, datatype, request, ierr) ; return ; } /****************************************************** *** MPI_File_iread wrapper function ******************************************************/ void mpi_file_iread__( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Aint * request, MPI_Fint * ierr) { MPI_FILE_IREAD( fh, buf, count, datatype, request, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_File_iread_shared wrapper function ******************************************************/ int MPI_File_iread_shared( MPI_File fh, void * buf, int count, MPI_Datatype datatype, MPI_Request * request) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_File_iread_shared()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_File_iread_shared( fh, buf, count, datatype, request) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_File_iread_shared wrapper function ******************************************************/ void MPI_FILE_IREAD_SHARED( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Aint * request, MPI_Fint * ierr) { MPI_File local_fh; MPI_Datatype local_type; MPI_Request local_request; local_fh = MPI_File_f2c(*fh); local_type = MPI_Type_f2c(*datatype); *ierr = MPI_File_iread_shared( local_fh, buf, *count, local_type, &local_request) ; *request = MPI_Request_c2f(local_request); return ; } /****************************************************** *** MPI_File_iread_shared wrapper function ******************************************************/ void mpi_file_iread_shared( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Aint * request, MPI_Fint * ierr) { MPI_FILE_IREAD_SHARED( fh, buf, count, datatype, request, ierr) ; return ; } /****************************************************** *** MPI_File_iread_shared wrapper function ******************************************************/ void mpi_file_iread_shared_( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Aint * request, MPI_Fint * ierr) { MPI_FILE_IREAD_SHARED( fh, buf, count, datatype, request, ierr) ; return ; } /****************************************************** *** MPI_File_iread_shared wrapper function ******************************************************/ void mpi_file_iread_shared__( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Aint * request, MPI_Fint * ierr) { MPI_FILE_IREAD_SHARED( fh, buf, count, datatype, request, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_File_iwrite wrapper function ******************************************************/ int MPI_File_iwrite( MPI_File fh, void * buf, int count, MPI_Datatype datatype, MPI_Request * request) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_File_iwrite()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_File_iwrite( fh, buf, count, datatype, request) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_File_iwrite wrapper function ******************************************************/ void MPI_FILE_IWRITE( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Aint * request, MPI_Fint * ierr) { MPI_File local_fh; MPI_Request local_request; local_fh = MPI_File_f2c(*fh); *ierr = MPI_File_iwrite( local_fh, buf, *count, MPI_Type_f2c(*datatype), &local_request) ; *fh = MPI_File_c2f(local_fh); *request = MPI_Request_c2f(local_request); return ; } /****************************************************** *** MPI_File_iwrite wrapper function ******************************************************/ void mpi_file_iwrite( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Aint * request, MPI_Fint * ierr) { MPI_FILE_IWRITE( fh, buf, count, datatype, request, ierr) ; return ; } /****************************************************** *** MPI_File_iwrite wrapper function ******************************************************/ void mpi_file_iwrite_( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Aint * request, MPI_Fint * ierr) { MPI_FILE_IWRITE( fh, buf, count, datatype, request, ierr) ; return ; } /****************************************************** *** MPI_File_iwrite wrapper function ******************************************************/ void mpi_file_iwrite__( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Aint * request, MPI_Fint * ierr) { MPI_FILE_IWRITE( fh, buf, count, datatype, request, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_File_iwrite_shared wrapper function ******************************************************/ int MPI_File_iwrite_shared( MPI_File fh, void * buf, int count, MPI_Datatype datatype, MPI_Request * request) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_File_iwrite_shared()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_File_iwrite_shared( fh, buf, count, datatype, request) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_File_iwrite_shared wrapper function ******************************************************/ void MPI_FILE_IWRITE_SHARED( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Aint * request, MPI_Fint * ierr) { MPI_File local_fh; MPI_Request local_request; local_fh = MPI_File_f2c(*fh); *ierr = MPI_File_iwrite_shared( local_fh, buf, *count, MPI_Type_f2c(*datatype), &local_request) ; *fh = MPI_File_c2f(local_fh); *request = MPI_Request_c2f(local_request); return ; } /****************************************************** *** MPI_File_iwrite_shared wrapper function ******************************************************/ void mpi_file_iwrite_shared( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Aint * request, MPI_Fint * ierr) { MPI_FILE_IWRITE_SHARED( fh, buf, count, datatype, request, ierr) ; return ; } /****************************************************** *** MPI_File_iwrite_shared wrapper function ******************************************************/ void mpi_file_iwrite_shared_( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Aint * request, MPI_Fint * ierr) { MPI_FILE_IWRITE_SHARED( fh, buf, count, datatype, request, ierr) ; return ; } /****************************************************** *** MPI_File_iwrite_shared wrapper function ******************************************************/ void mpi_file_iwrite_shared__( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Aint * request, MPI_Fint * ierr) { MPI_FILE_IWRITE_SHARED( fh, buf, count, datatype, request, ierr) ; return ; } /******************************************************/ /******************************************************/ #endif /* TAU_MPIOREQUEST */ /****************************************************** *** MPI_File_preallocate wrapper function ******************************************************/ int MPI_File_preallocate( MPI_File fh, MPI_Offset size) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_File_preallocate()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_File_preallocate( fh, size) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_File_preallocate wrapper function ******************************************************/ void MPI_FILE_PREALLOCATE( MPI_Fint * fh, MPI_Fint * size, MPI_Fint * ierr) { *ierr = MPI_File_preallocate( MPI_File_f2c(*fh), *size) ; return ; } /****************************************************** *** MPI_File_preallocate wrapper function ******************************************************/ void mpi_file_preallocate( MPI_Fint * fh, MPI_Fint * size, MPI_Fint * ierr) { MPI_FILE_PREALLOCATE( fh, size, ierr) ; return ; } /****************************************************** *** MPI_File_preallocate wrapper function ******************************************************/ void mpi_file_preallocate_( MPI_Fint * fh, MPI_Fint * size, MPI_Fint * ierr) { MPI_FILE_PREALLOCATE( fh, size, ierr) ; return ; } /****************************************************** *** MPI_File_preallocate wrapper function ******************************************************/ void mpi_file_preallocate__( MPI_Fint * fh, MPI_Fint * size, MPI_Fint * ierr) { MPI_FILE_PREALLOCATE( fh, size, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_File_read wrapper function ******************************************************/ int MPI_File_read( MPI_File fh, void * buf, int count, MPI_Datatype datatype, MPI_Status * status) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_File_read()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_File_read( fh, buf, count, datatype, status) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_File_read wrapper function ******************************************************/ void MPI_FILE_READ( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Fint * status, MPI_Fint * ierr) { MPI_File local_fh; MPI_Status local_status; local_fh = MPI_File_f2c(*fh); *ierr = MPI_File_read( local_fh, buf, *count, MPI_Type_f2c(*datatype), &local_status) ; MPI_Status_c2f(&local_status, status); *fh = MPI_File_c2f(local_fh); return ; } /****************************************************** *** MPI_File_read wrapper function ******************************************************/ void mpi_file_read( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Fint * status, MPI_Fint * ierr) { MPI_FILE_READ( fh, buf, count, datatype, status, ierr) ; return ; } /****************************************************** *** MPI_File_read wrapper function ******************************************************/ void mpi_file_read_( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Fint * status, MPI_Fint * ierr) { MPI_FILE_READ( fh, buf, count, datatype, status, ierr) ; return ; } /****************************************************** *** MPI_File_read wrapper function ******************************************************/ void mpi_file_read__( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Fint * status, MPI_Fint * ierr) { MPI_FILE_READ( fh, buf, count, datatype, status, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_File_read_all wrapper function ******************************************************/ int MPI_File_read_all( MPI_File fh, void * buf, int count, MPI_Datatype datatype, MPI_Status * status) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_File_read_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_File_read_all( fh, buf, count, datatype, status) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_File_read_all wrapper function ******************************************************/ void MPI_FILE_READ_ALL( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Fint * status, MPI_Fint * ierr) { MPI_File local_fh; MPI_Status local_status; local_fh = MPI_File_f2c(*fh); *ierr = MPI_File_read_all( local_fh, buf, *count, MPI_Type_f2c(*datatype), &local_status) ; MPI_Status_c2f(&local_status, status); return ; } /****************************************************** *** MPI_File_read_all wrapper function ******************************************************/ void mpi_file_read_all( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Fint * status, MPI_Fint * ierr) { MPI_FILE_READ_ALL( fh, buf, count, datatype, status, ierr) ; return ; } /****************************************************** *** MPI_File_read_all wrapper function ******************************************************/ void mpi_file_read_all_( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Fint * status, MPI_Fint * ierr) { MPI_FILE_READ_ALL( fh, buf, count, datatype, status, ierr) ; return ; } /****************************************************** *** MPI_File_read_all wrapper function ******************************************************/ void mpi_file_read_all__( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Fint * status, MPI_Fint * ierr) { MPI_FILE_READ_ALL( fh, buf, count, datatype, status, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_File_read_all_begin wrapper function ******************************************************/ int MPI_File_read_all_begin( MPI_File fh, void * buf, int count, MPI_Datatype datatype) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_File_read_all_begin()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_File_read_all_begin( fh, buf, count, datatype) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_File_read_all_begin wrapper function ******************************************************/ void MPI_FILE_READ_ALL_BEGIN( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Fint * ierr) { *ierr = MPI_File_read_all_begin( MPI_File_f2c(*fh), buf, *count, MPI_Type_f2c(*datatype)) ; return ; } /****************************************************** *** MPI_File_read_all_begin wrapper function ******************************************************/ void mpi_file_read_all_begin( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Fint * ierr) { MPI_FILE_READ_ALL_BEGIN( fh, buf, count, datatype, ierr) ; return ; } /****************************************************** *** MPI_File_read_all_begin wrapper function ******************************************************/ void mpi_file_read_all_begin_( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Fint * ierr) { MPI_FILE_READ_ALL_BEGIN( fh, buf, count, datatype, ierr) ; return ; } /****************************************************** *** MPI_File_read_all_begin wrapper function ******************************************************/ void mpi_file_read_all_begin__( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Fint * ierr) { MPI_FILE_READ_ALL_BEGIN( fh, buf, count, datatype, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_File_read_all_end wrapper function ******************************************************/ int MPI_File_read_all_end( MPI_File fh, void * buf, MPI_Status * status) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_File_read_all_end()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_File_read_all_end( fh, buf, status) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_File_read_all_end wrapper function ******************************************************/ void MPI_FILE_READ_ALL_END( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * status, MPI_Fint * ierr) { MPI_File local_fh; MPI_Status local_status; local_fh = MPI_File_f2c(*fh); *ierr = MPI_File_read_all_end( local_fh, buf, &local_status) ; MPI_Status_c2f(&local_status, status); return ; } /****************************************************** *** MPI_File_read_all_end wrapper function ******************************************************/ void mpi_file_read_all_end( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * status, MPI_Fint * ierr) { MPI_FILE_READ_ALL_END( fh, buf, status, ierr) ; return ; } /****************************************************** *** MPI_File_read_all_end wrapper function ******************************************************/ void mpi_file_read_all_end_( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * status, MPI_Fint * ierr) { MPI_FILE_READ_ALL_END( fh, buf, status, ierr) ; return ; } /****************************************************** *** MPI_File_read_all_end wrapper function ******************************************************/ void mpi_file_read_all_end__( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * status, MPI_Fint * ierr) { MPI_FILE_READ_ALL_END( fh, buf, status, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_File_read_at_all_begin wrapper function ******************************************************/ int MPI_File_read_at_all_begin( MPI_File fh, MPI_Offset offset, void * buf, int count, MPI_Datatype datatype) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_File_read_at_all_begin()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_File_read_at_all_begin( fh, offset, buf, count, datatype) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_File_read_at_all_begin wrapper function ******************************************************/ void MPI_FILE_READ_AT_ALL_BEGIN( MPI_Fint * fh, MPI_Fint * offset, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Fint * ierr) { *ierr = MPI_File_read_at_all_begin( MPI_File_f2c(*fh), *offset, buf, *count, MPI_Type_f2c(*datatype)) ; return ; } /****************************************************** *** MPI_File_read_at_all_begin wrapper function ******************************************************/ void mpi_file_read_at_all_begin( MPI_Fint * fh, MPI_Fint * offset, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Fint * ierr) { MPI_FILE_READ_AT_ALL_BEGIN( fh, offset, buf, count, datatype, ierr) ; return ; } /****************************************************** *** MPI_File_read_at_all_begin wrapper function ******************************************************/ void mpi_file_read_at_all_begin_( MPI_Fint * fh, MPI_Fint * offset, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Fint * ierr) { MPI_FILE_READ_AT_ALL_BEGIN( fh, offset, buf, count, datatype, ierr) ; return ; } /****************************************************** *** MPI_File_read_at_all_begin wrapper function ******************************************************/ void mpi_file_read_at_all_begin__( MPI_Fint * fh, MPI_Fint * offset, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Fint * ierr) { MPI_FILE_READ_AT_ALL_BEGIN( fh, offset, buf, count, datatype, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_File_read_at_all_end wrapper function ******************************************************/ int MPI_File_read_at_all_end( MPI_File fh, void * buf, MPI_Status * status) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_File_read_at_all_end()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_File_read_at_all_end( fh, buf, status) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_File_read_at_all_end wrapper function ******************************************************/ void MPI_FILE_READ_AT_ALL_END( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * status, MPI_Fint * ierr) { MPI_File local_fh; MPI_Status local_status; local_fh = MPI_File_f2c(*fh); *ierr = MPI_File_read_at_all_end( local_fh, buf, &local_status) ; MPI_Status_c2f(&local_status, status); return ; } /****************************************************** *** MPI_File_read_at_all_end wrapper function ******************************************************/ void mpi_file_read_at_all_end( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * status, MPI_Fint * ierr) { MPI_FILE_READ_AT_ALL_END( fh, buf, status, ierr) ; return ; } /****************************************************** *** MPI_File_read_at_all_end wrapper function ******************************************************/ void mpi_file_read_at_all_end_( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * status, MPI_Fint * ierr) { MPI_FILE_READ_AT_ALL_END( fh, buf, status, ierr) ; return ; } /****************************************************** *** MPI_File_read_at_all_end wrapper function ******************************************************/ void mpi_file_read_at_all_end__( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * status, MPI_Fint * ierr) { MPI_FILE_READ_AT_ALL_END( fh, buf, status, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_File_read_ordered wrapper function ******************************************************/ int MPI_File_read_ordered( MPI_File fh, void * buf, int count, MPI_Datatype datatype, MPI_Status * status) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_File_read_ordered()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_File_read_ordered( fh, buf, count, datatype, status) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_File_read_ordered wrapper function ******************************************************/ void MPI_FILE_READ_ORDERED( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Fint * status, MPI_Fint * ierr) { MPI_File local_fh; MPI_Status local_status; local_fh = MPI_File_f2c(*fh); *ierr = MPI_File_read_ordered( local_fh, buf, *count, MPI_Type_f2c(*datatype), &local_status) ; MPI_Status_c2f(&local_status, status); return ; } /****************************************************** *** MPI_File_read_ordered wrapper function ******************************************************/ void mpi_file_read_ordered( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Fint * status, MPI_Fint * ierr) { MPI_FILE_READ_ORDERED( fh, buf, count, datatype, status, ierr) ; return ; } /****************************************************** *** MPI_File_read_ordered wrapper function ******************************************************/ void mpi_file_read_ordered_( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Fint * status, MPI_Fint * ierr) { MPI_FILE_READ_ORDERED( fh, buf, count, datatype, status, ierr) ; return ; } /****************************************************** *** MPI_File_read_ordered wrapper function ******************************************************/ void mpi_file_read_ordered__( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Fint * status, MPI_Fint * ierr) { MPI_FILE_READ_ORDERED( fh, buf, count, datatype, status, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_File_read_ordered_begin wrapper function ******************************************************/ int MPI_File_read_ordered_begin( MPI_File fh, void * buf, int count, MPI_Datatype datatype) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_File_read_ordered_begin()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_File_read_ordered_begin( fh, buf, count, datatype) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_File_read_ordered_begin wrapper function ******************************************************/ void MPI_FILE_READ_ORDERED_BEGIN( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Fint * ierr) { *ierr = MPI_File_read_ordered_begin( MPI_File_f2c(*fh), buf, *count, MPI_Type_f2c(*datatype)) ; return ; } /****************************************************** *** MPI_File_read_ordered_begin wrapper function ******************************************************/ void mpi_file_read_ordered_begin( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Fint * ierr) { MPI_FILE_READ_ORDERED_BEGIN( fh, buf, count, datatype, ierr) ; return ; } /****************************************************** *** MPI_File_read_ordered_begin wrapper function ******************************************************/ void mpi_file_read_ordered_begin_( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Fint * ierr) { MPI_FILE_READ_ORDERED_BEGIN( fh, buf, count, datatype, ierr) ; return ; } /****************************************************** *** MPI_File_read_ordered_begin wrapper function ******************************************************/ void mpi_file_read_ordered_begin__( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Fint * ierr) { MPI_FILE_READ_ORDERED_BEGIN( fh, buf, count, datatype, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_File_read_ordered_end wrapper function ******************************************************/ int MPI_File_read_ordered_end( MPI_File fh, void * buf, MPI_Status * status) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_File_read_ordered_end()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_File_read_ordered_end( fh, buf, status) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_File_read_ordered_end wrapper function ******************************************************/ void MPI_FILE_READ_ORDERED_END( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * status, MPI_Fint * ierr) { MPI_File local_fh; MPI_Status local_status; local_fh = MPI_File_f2c(*fh); *ierr = MPI_File_read_ordered_end( local_fh, buf, &local_status) ; MPI_Status_c2f(&local_status, status); return ; } /****************************************************** *** MPI_File_read_ordered_end wrapper function ******************************************************/ void mpi_file_read_ordered_end( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * status, MPI_Fint * ierr) { MPI_FILE_READ_ORDERED_END( fh, buf, status, ierr) ; return ; } /****************************************************** *** MPI_File_read_ordered_end wrapper function ******************************************************/ void mpi_file_read_ordered_end_( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * status, MPI_Fint * ierr) { MPI_FILE_READ_ORDERED_END( fh, buf, status, ierr) ; return ; } /****************************************************** *** MPI_File_read_ordered_end wrapper function ******************************************************/ void mpi_file_read_ordered_end__( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * status, MPI_Fint * ierr) { MPI_FILE_READ_ORDERED_END( fh, buf, status, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_File_read_shared wrapper function ******************************************************/ int MPI_File_read_shared( MPI_File fh, void * buf, int count, MPI_Datatype datatype, MPI_Status * status) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_File_read_shared()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_File_read_shared( fh, buf, count, datatype, status) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_File_read_shared wrapper function ******************************************************/ void MPI_FILE_READ_SHARED( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Fint * status, MPI_Fint * ierr) { MPI_File local_fh; MPI_Status local_status; local_fh = MPI_File_f2c(*fh); *ierr = MPI_File_read_shared( local_fh, buf, *count, MPI_Type_f2c(*datatype), &local_status) ; MPI_Status_c2f(&local_status, status); return ; } /****************************************************** *** MPI_File_read_shared wrapper function ******************************************************/ void mpi_file_read_shared( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Fint * status, MPI_Fint * ierr) { MPI_FILE_READ_SHARED( fh, buf, count, datatype, status, ierr) ; return ; } /****************************************************** *** MPI_File_read_shared wrapper function ******************************************************/ void mpi_file_read_shared_( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Fint * status, MPI_Fint * ierr) { MPI_FILE_READ_SHARED( fh, buf, count, datatype, status, ierr) ; return ; } /****************************************************** *** MPI_File_read_shared wrapper function ******************************************************/ void mpi_file_read_shared__( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Fint * status, MPI_Fint * ierr) { MPI_FILE_READ_SHARED( fh, buf, count, datatype, status, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_File_seek wrapper function ******************************************************/ int MPI_File_seek( MPI_File fh, MPI_Offset offset, int whence) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_File_seek()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_File_seek( fh, offset, whence) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_File_seek wrapper function ******************************************************/ void MPI_FILE_SEEK( MPI_Fint * fh, MPI_Fint * offset, MPI_Fint * whence, MPI_Fint * ierr) { *ierr = MPI_File_seek( MPI_File_f2c(*fh), *offset, *whence) ; return ; } /****************************************************** *** MPI_File_seek wrapper function ******************************************************/ void mpi_file_seek( MPI_Fint * fh, MPI_Fint * offset, MPI_Fint * whence, MPI_Fint * ierr) { MPI_FILE_SEEK( fh, offset, whence, ierr) ; return ; } /****************************************************** *** MPI_File_seek wrapper function ******************************************************/ void mpi_file_seek_( MPI_Fint * fh, MPI_Fint * offset, MPI_Fint * whence, MPI_Fint * ierr) { MPI_FILE_SEEK( fh, offset, whence, ierr) ; return ; } /****************************************************** *** MPI_File_seek wrapper function ******************************************************/ void mpi_file_seek__( MPI_Fint * fh, MPI_Fint * offset, MPI_Fint * whence, MPI_Fint * ierr) { MPI_FILE_SEEK( fh, offset, whence, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_File_seek_shared wrapper function ******************************************************/ int MPI_File_seek_shared( MPI_File fh, MPI_Offset offset, int whence) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_File_seek_shared()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_File_seek_shared( fh, offset, whence) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_File_seek_shared wrapper function ******************************************************/ void MPI_FILE_SEEK_SHARED( MPI_Fint * fh, MPI_Fint * offset, MPI_Fint * whence, MPI_Fint * ierr) { *ierr = MPI_File_seek_shared( MPI_File_f2c(*fh), *offset, *whence) ; return ; } /****************************************************** *** MPI_File_seek_shared wrapper function ******************************************************/ void mpi_file_seek_shared( MPI_Fint * fh, MPI_Fint * offset, MPI_Fint * whence, MPI_Fint * ierr) { MPI_FILE_SEEK_SHARED( fh, offset, whence, ierr) ; return ; } /****************************************************** *** MPI_File_seek_shared wrapper function ******************************************************/ void mpi_file_seek_shared_( MPI_Fint * fh, MPI_Fint * offset, MPI_Fint * whence, MPI_Fint * ierr) { MPI_FILE_SEEK_SHARED( fh, offset, whence, ierr) ; return ; } /****************************************************** *** MPI_File_seek_shared wrapper function ******************************************************/ void mpi_file_seek_shared__( MPI_Fint * fh, MPI_Fint * offset, MPI_Fint * whence, MPI_Fint * ierr) { MPI_FILE_SEEK_SHARED( fh, offset, whence, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_File_set_atomicity wrapper function ******************************************************/ int MPI_File_set_atomicity( MPI_File fh, int flag) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_File_set_atomicity()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_File_set_atomicity( fh, flag) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_File_set_atomicity wrapper function ******************************************************/ void MPI_FILE_SET_ATOMICITY( MPI_Fint * fh, MPI_Fint * flag, MPI_Fint * ierr) { *ierr = MPI_File_set_atomicity( MPI_File_f2c(*fh), *flag) ; return ; } /****************************************************** *** MPI_File_set_atomicity wrapper function ******************************************************/ void mpi_file_set_atomicity( MPI_Fint * fh, MPI_Fint * flag, MPI_Fint * ierr) { MPI_FILE_SET_ATOMICITY( fh, flag, ierr) ; return ; } /****************************************************** *** MPI_File_set_atomicity wrapper function ******************************************************/ void mpi_file_set_atomicity_( MPI_Fint * fh, MPI_Fint * flag, MPI_Fint * ierr) { MPI_FILE_SET_ATOMICITY( fh, flag, ierr) ; return ; } /****************************************************** *** MPI_File_set_atomicity wrapper function ******************************************************/ void mpi_file_set_atomicity__( MPI_Fint * fh, MPI_Fint * flag, MPI_Fint * ierr) { MPI_FILE_SET_ATOMICITY( fh, flag, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_File_write wrapper function ******************************************************/ int MPI_File_write( MPI_File fh, void * buf, int count, MPI_Datatype datatype, MPI_Status * status) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_File_write()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_File_write( fh, buf, count, datatype, status) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_File_write wrapper function ******************************************************/ void MPI_FILE_WRITE( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Fint * status, MPI_Fint * ierr) { MPI_File local_fh; MPI_Status local_status; local_fh = MPI_File_f2c(*fh); *ierr = MPI_File_write( local_fh, buf, *count, MPI_Type_f2c(*datatype), &local_status) ; MPI_Status_c2f(&local_status, status); return ; } /****************************************************** *** MPI_File_write wrapper function ******************************************************/ void mpi_file_write( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Fint * status, MPI_Fint * ierr) { MPI_FILE_WRITE( fh, buf, count, datatype, status, ierr) ; return ; } /****************************************************** *** MPI_File_write wrapper function ******************************************************/ void mpi_file_write_( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Fint * status, MPI_Fint * ierr) { MPI_FILE_WRITE( fh, buf, count, datatype, status, ierr) ; return ; } /****************************************************** *** MPI_File_write wrapper function ******************************************************/ void mpi_file_write__( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Fint * status, MPI_Fint * ierr) { MPI_FILE_WRITE( fh, buf, count, datatype, status, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_File_write_all wrapper function ******************************************************/ int MPI_File_write_all( MPI_File fh, void * buf, int count, MPI_Datatype datatype, MPI_Status * status) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_File_write_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_File_write_all( fh, buf, count, datatype, status) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_File_write_all wrapper function ******************************************************/ void MPI_FILE_WRITE_ALL( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Fint * status, MPI_Fint * ierr) { MPI_File local_fh; MPI_Status local_status; local_fh = MPI_File_f2c(*fh); *ierr = MPI_File_write_all( local_fh, buf, *count, MPI_Type_f2c(*datatype), &local_status) ; MPI_Status_c2f(&local_status, status); return ; } /****************************************************** *** MPI_File_write_all wrapper function ******************************************************/ void mpi_file_write_all( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Fint * status, MPI_Fint * ierr) { MPI_FILE_WRITE_ALL( fh, buf, count, datatype, status, ierr) ; return ; } /****************************************************** *** MPI_File_write_all wrapper function ******************************************************/ void mpi_file_write_all_( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Fint * status, MPI_Fint * ierr) { MPI_FILE_WRITE_ALL( fh, buf, count, datatype, status, ierr) ; return ; } /****************************************************** *** MPI_File_write_all wrapper function ******************************************************/ void mpi_file_write_all__( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Fint * status, MPI_Fint * ierr) { MPI_FILE_WRITE_ALL( fh, buf, count, datatype, status, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_File_write_all_begin wrapper function ******************************************************/ int MPI_File_write_all_begin( MPI_File fh, void * buf, int count, MPI_Datatype datatype) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_File_write_all_begin()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_File_write_all_begin( fh, buf, count, datatype) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_File_write_all_begin wrapper function ******************************************************/ void MPI_FILE_WRITE_ALL_BEGIN( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Fint * ierr) { *ierr = MPI_File_write_all_begin( MPI_File_f2c(*fh), buf, *count, MPI_Type_f2c(*datatype)) ; return ; } /****************************************************** *** MPI_File_write_all_begin wrapper function ******************************************************/ void mpi_file_write_all_begin( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Fint * ierr) { MPI_FILE_WRITE_ALL_BEGIN( fh, buf, count, datatype, ierr) ; return ; } /****************************************************** *** MPI_File_write_all_begin wrapper function ******************************************************/ void mpi_file_write_all_begin_( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Fint * ierr) { MPI_FILE_WRITE_ALL_BEGIN( fh, buf, count, datatype, ierr) ; return ; } /****************************************************** *** MPI_File_write_all_begin wrapper function ******************************************************/ void mpi_file_write_all_begin__( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Fint * ierr) { MPI_FILE_WRITE_ALL_BEGIN( fh, buf, count, datatype, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_File_write_all_end wrapper function ******************************************************/ int MPI_File_write_all_end( MPI_File fh, void * buf, MPI_Status * status) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_File_write_all_end()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_File_write_all_end( fh, buf, status) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_File_write_all_end wrapper function ******************************************************/ void MPI_FILE_WRITE_ALL_END( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * status, MPI_Fint * ierr) { MPI_File local_fh; MPI_Status local_status; local_fh = MPI_File_f2c(*fh); *ierr = MPI_File_write_all_end( local_fh, buf, &local_status) ; MPI_Status_c2f(&local_status, status); return ; } /****************************************************** *** MPI_File_write_all_end wrapper function ******************************************************/ void mpi_file_write_all_end( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * status, MPI_Fint * ierr) { MPI_FILE_WRITE_ALL_END( fh, buf, status, ierr) ; return ; } /****************************************************** *** MPI_File_write_all_end wrapper function ******************************************************/ void mpi_file_write_all_end_( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * status, MPI_Fint * ierr) { MPI_FILE_WRITE_ALL_END( fh, buf, status, ierr) ; return ; } /****************************************************** *** MPI_File_write_all_end wrapper function ******************************************************/ void mpi_file_write_all_end__( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * status, MPI_Fint * ierr) { MPI_FILE_WRITE_ALL_END( fh, buf, status, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_File_write_at_all_begin wrapper function ******************************************************/ int MPI_File_write_at_all_begin( MPI_File fh, MPI_Offset offset, void * buf, int count, MPI_Datatype datatype) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_File_write_at_all_begin()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_File_write_at_all_begin( fh, offset, buf, count, datatype) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_File_write_at_all_begin wrapper function ******************************************************/ void MPI_FILE_WRITE_AT_ALL_BEGIN( MPI_Fint * fh, MPI_Fint * offset, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Fint * ierr) { *ierr = MPI_File_write_at_all_begin( MPI_File_f2c(*fh), *offset, buf, *count, MPI_Type_f2c(*datatype)) ; return ; } /****************************************************** *** MPI_File_write_at_all_begin wrapper function ******************************************************/ void mpi_file_write_at_all_begin( MPI_Fint * fh, MPI_Fint * offset, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Fint * ierr) { MPI_FILE_WRITE_AT_ALL_BEGIN( fh, offset, buf, count, datatype, ierr) ; return ; } /****************************************************** *** MPI_File_write_at_all_begin wrapper function ******************************************************/ void mpi_file_write_at_all_begin_( MPI_Fint * fh, MPI_Fint * offset, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Fint * ierr) { MPI_FILE_WRITE_AT_ALL_BEGIN( fh, offset, buf, count, datatype, ierr) ; return ; } /****************************************************** *** MPI_File_write_at_all_begin wrapper function ******************************************************/ void mpi_file_write_at_all_begin__( MPI_Fint * fh, MPI_Fint * offset, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Fint * ierr) { MPI_FILE_WRITE_AT_ALL_BEGIN( fh, offset, buf, count, datatype, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_File_write_at_all_end wrapper function ******************************************************/ int MPI_File_write_at_all_end( MPI_File fh, void * buf, MPI_Status * status) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_File_write_at_all_end()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_File_write_at_all_end( fh, buf, status) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_File_write_at_all_end wrapper function ******************************************************/ void MPI_FILE_WRITE_AT_ALL_END( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * status, MPI_Fint * ierr) { MPI_File local_fh; MPI_Status local_status; local_fh = MPI_File_f2c(*fh); *ierr = MPI_File_write_at_all_end( local_fh, buf, &local_status) ; MPI_Status_c2f(&local_status, status); return ; } /****************************************************** *** MPI_File_write_at_all_end wrapper function ******************************************************/ void mpi_file_write_at_all_end( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * status, MPI_Fint * ierr) { MPI_FILE_WRITE_AT_ALL_END( fh, buf, status, ierr) ; return ; } /****************************************************** *** MPI_File_write_at_all_end wrapper function ******************************************************/ void mpi_file_write_at_all_end_( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * status, MPI_Fint * ierr) { MPI_FILE_WRITE_AT_ALL_END( fh, buf, status, ierr) ; return ; } /****************************************************** *** MPI_File_write_at_all_end wrapper function ******************************************************/ void mpi_file_write_at_all_end__( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * status, MPI_Fint * ierr) { MPI_FILE_WRITE_AT_ALL_END( fh, buf, status, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_File_write_ordered wrapper function ******************************************************/ int MPI_File_write_ordered( MPI_File fh, void * buf, int count, MPI_Datatype datatype, MPI_Status * status) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_File_write_ordered()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_File_write_ordered( fh, buf, count, datatype, status) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_File_write_ordered wrapper function ******************************************************/ void MPI_FILE_WRITE_ORDERED( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Fint * status, MPI_Fint * ierr) { MPI_File local_fh; MPI_Status local_status; local_fh = MPI_File_f2c(*fh); *ierr = MPI_File_write_ordered( local_fh, buf, *count, MPI_Type_f2c(*datatype), &local_status) ; MPI_Status_c2f(&local_status, status); return ; } /****************************************************** *** MPI_File_write_ordered wrapper function ******************************************************/ void mpi_file_write_ordered( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Fint * status, MPI_Fint * ierr) { MPI_FILE_WRITE_ORDERED( fh, buf, count, datatype, status, ierr) ; return ; } /****************************************************** *** MPI_File_write_ordered wrapper function ******************************************************/ void mpi_file_write_ordered_( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Fint * status, MPI_Fint * ierr) { MPI_FILE_WRITE_ORDERED( fh, buf, count, datatype, status, ierr) ; return ; } /****************************************************** *** MPI_File_write_ordered wrapper function ******************************************************/ void mpi_file_write_ordered__( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Fint * status, MPI_Fint * ierr) { MPI_FILE_WRITE_ORDERED( fh, buf, count, datatype, status, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_File_write_ordered_begin wrapper function ******************************************************/ int MPI_File_write_ordered_begin( MPI_File fh, void * buf, int count, MPI_Datatype datatype) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_File_write_ordered_begin()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_File_write_ordered_begin( fh, buf, count, datatype) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_File_write_ordered_begin wrapper function ******************************************************/ void MPI_FILE_WRITE_ORDERED_BEGIN( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Fint * ierr) { *ierr = MPI_File_write_ordered_begin( MPI_File_f2c(*fh), buf, *count, MPI_Type_f2c(*datatype)) ; return ; } /****************************************************** *** MPI_File_write_ordered_begin wrapper function ******************************************************/ void mpi_file_write_ordered_begin( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Fint * ierr) { MPI_FILE_WRITE_ORDERED_BEGIN( fh, buf, count, datatype, ierr) ; return ; } /****************************************************** *** MPI_File_write_ordered_begin wrapper function ******************************************************/ void mpi_file_write_ordered_begin_( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Fint * ierr) { MPI_FILE_WRITE_ORDERED_BEGIN( fh, buf, count, datatype, ierr) ; return ; } /****************************************************** *** MPI_File_write_ordered_begin wrapper function ******************************************************/ void mpi_file_write_ordered_begin__( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Fint * ierr) { MPI_FILE_WRITE_ORDERED_BEGIN( fh, buf, count, datatype, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_File_write_ordered_end wrapper function ******************************************************/ int MPI_File_write_ordered_end( MPI_File fh, void * buf, MPI_Status * status) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_File_write_ordered_end()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_File_write_ordered_end( fh, buf, status) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_File_write_ordered_end wrapper function ******************************************************/ void MPI_FILE_WRITE_ORDERED_END( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * status, MPI_Fint * ierr) { MPI_File local_fh; MPI_Status local_status; local_fh = MPI_File_f2c(*fh); *ierr = MPI_File_write_ordered_end( local_fh, buf, &local_status) ; MPI_Status_c2f(&local_status, status); return ; } /****************************************************** *** MPI_File_write_ordered_end wrapper function ******************************************************/ void mpi_file_write_ordered_end( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * status, MPI_Fint * ierr) { MPI_FILE_WRITE_ORDERED_END( fh, buf, status, ierr) ; return ; } /****************************************************** *** MPI_File_write_ordered_end wrapper function ******************************************************/ void mpi_file_write_ordered_end_( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * status, MPI_Fint * ierr) { MPI_FILE_WRITE_ORDERED_END( fh, buf, status, ierr) ; return ; } /****************************************************** *** MPI_File_write_ordered_end wrapper function ******************************************************/ void mpi_file_write_ordered_end__( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * status, MPI_Fint * ierr) { MPI_FILE_WRITE_ORDERED_END( fh, buf, status, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_File_write_shared wrapper function ******************************************************/ int MPI_File_write_shared( MPI_File fh, void * buf, int count, MPI_Datatype datatype, MPI_Status * status) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_File_write_shared()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_File_write_shared( fh, buf, count, datatype, status) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_File_write_shared wrapper function ******************************************************/ void MPI_FILE_WRITE_SHARED( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Fint * status, MPI_Fint * ierr) { MPI_File local_fh; MPI_Status local_status; local_fh = MPI_File_f2c(*fh); *ierr = MPI_File_write_shared( local_fh, buf, *count, MPI_Type_f2c(*datatype), &local_status) ; MPI_Status_c2f(&local_status, status); return ; } /****************************************************** *** MPI_File_write_shared wrapper function ******************************************************/ void mpi_file_write_shared( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Fint * status, MPI_Fint * ierr) { MPI_FILE_WRITE_SHARED( fh, buf, count, datatype, status, ierr) ; return ; } /****************************************************** *** MPI_File_write_shared wrapper function ******************************************************/ void mpi_file_write_shared_( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Fint * status, MPI_Fint * ierr) { MPI_FILE_WRITE_SHARED( fh, buf, count, datatype, status, ierr) ; return ; } /****************************************************** *** MPI_File_write_shared wrapper function ******************************************************/ void mpi_file_write_shared__( MPI_Fint * fh, MPI_Aint * buf, MPI_Fint * count, MPI_Fint * datatype, MPI_Fint * status, MPI_Fint * ierr) { MPI_FILE_WRITE_SHARED( fh, buf, count, datatype, status, ierr) ; return ; } /******************************************************/ /******************************************************/ #ifdef TAU_MPIDATAREP /****************************************************** *** MPI_Register_datarep wrapper function ******************************************************/ int MPI_Register_datarep( char * datarep, MPI_Datarep_conversion_function * read_conversion_fn, MPI_Datarep_conversion_function * write_conversion_fn, MPI_Datarep_extent_function * dtype_file_extent_fn, void * extra_state) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_Register_datarep()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_Register_datarep( datarep, read_conversion_fn, write_conversion_fn, dtype_file_extent_fn, extra_state) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_Register_datarep wrapper function ******************************************************/ void MPI_REGISTER_DATAREP( char * datarep, MPI_Datarep_conversion_function * read_conversion_fn, MPI_Datarep_conversion_function * write_conversion_fn, MPI_Datarep_extent_function * dtype_file_extent_fn, MPI_Aint * extra_state, MPI_Fint * ierr) { *ierr = MPI_Register_datarep( datarep, read_conversion_fn, write_conversion_fn, dtype_file_extent_fn, extra_state) ; return ; } /****************************************************** *** MPI_Register_datarep wrapper function ******************************************************/ void mpi_register_datarep( char * datarep, MPI_Datarep_conversion_function * read_conversion_fn, MPI_Datarep_conversion_function * write_conversion_fn, MPI_Datarep_extent_function * dtype_file_extent_fn, MPI_Aint * extra_state, MPI_Fint * ierr) { MPI_REGISTER_DATAREP( datarep, read_conversion_fn, write_conversion_fn, dtype_file_extent_fn, extra_state, ierr) ; return ; } /****************************************************** *** MPI_Register_datarep wrapper function ******************************************************/ void mpi_register_datarep_( char * datarep, MPI_Datarep_conversion_function * read_conversion_fn, MPI_Datarep_conversion_function * write_conversion_fn, MPI_Datarep_extent_function * dtype_file_extent_fn, MPI_Aint * extra_state, MPI_Fint * ierr) { MPI_REGISTER_DATAREP( datarep, read_conversion_fn, write_conversion_fn, dtype_file_extent_fn, extra_state, ierr) ; return ; } /****************************************************** *** MPI_Register_datarep wrapper function ******************************************************/ void mpi_register_datarep__( char * datarep, MPI_Datarep_conversion_function * read_conversion_fn, MPI_Datarep_conversion_function * write_conversion_fn, MPI_Datarep_extent_function * dtype_file_extent_fn, MPI_Aint * extra_state, MPI_Fint * ierr) { MPI_REGISTER_DATAREP( datarep, read_conversion_fn, write_conversion_fn, dtype_file_extent_fn, extra_state, ierr) ; return ; } #endif /* TAU_MPIDATAREP */ /******************************************************/ /******************************************************/ /****************************************************** *** MPI_Info_create wrapper function ******************************************************/ int MPI_Info_create( MPI_Info * info) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_Info_create()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_Info_create( info) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_Info_create wrapper function ******************************************************/ void MPI_INFO_CREATE( MPI_Aint * info, MPI_Fint * ierr) { MPI_Info local_info; *ierr = MPI_Info_create( &local_info) ; *info = MPI_Info_c2f(local_info); return ; } /****************************************************** *** MPI_Info_create wrapper function ******************************************************/ void mpi_info_create( MPI_Aint * info, MPI_Fint * ierr) { MPI_INFO_CREATE( info, ierr) ; return ; } /****************************************************** *** MPI_Info_create wrapper function ******************************************************/ void mpi_info_create_( MPI_Aint * info, MPI_Fint * ierr) { MPI_INFO_CREATE( info, ierr) ; return ; } /****************************************************** *** MPI_Info_create wrapper function ******************************************************/ void mpi_info_create__( MPI_Aint * info, MPI_Fint * ierr) { MPI_INFO_CREATE( info, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_Info_set wrapper function ******************************************************/ int MPI_Info_set( MPI_Info Info, TAU_CONST char * key, TAU_CONST char * value) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_Info_set()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_Info_set( Info, key, value) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_Info_set wrapper function ******************************************************/ void MPI_INFO_SET( MPI_Fint * Info, TAU_CONST char * key, TAU_CONST char * value, MPI_Fint * ierr) { MPI_Info local_info = MPI_Info_f2c(*Info); *ierr = MPI_Info_set( local_info, key, value) ; return ; } /****************************************************** *** MPI_Info_set wrapper function ******************************************************/ void mpi_info_set( MPI_Fint * Info, TAU_CONST char * key, TAU_CONST char * value, MPI_Fint * ierr) { MPI_INFO_SET( Info, key, value, ierr) ; return ; } /****************************************************** *** MPI_Info_set wrapper function ******************************************************/ void mpi_info_set_( MPI_Fint * Info, TAU_CONST char * key, TAU_CONST char * value, MPI_Fint * ierr) { MPI_INFO_SET( Info, key, value, ierr) ; return ; } /****************************************************** *** MPI_Info_set wrapper function ******************************************************/ void mpi_info_set__( MPI_Fint * Info, TAU_CONST char * key, TAU_CONST char * value, MPI_Fint * ierr) { MPI_INFO_SET( Info, key, value, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_Info_delete wrapper function ******************************************************/ int MPI_Info_delete( MPI_Info info, TAU_CONST char * key) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_Info_delete()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_Info_delete( info, key) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_Info_delete wrapper function ******************************************************/ void MPI_INFO_DELETE( MPI_Fint * info, TAU_CONST char * key, MPI_Fint * ierr) { MPI_Info local_info = MPI_Info_f2c(*info); *ierr = MPI_Info_delete( local_info, key) ; return ; } /****************************************************** *** MPI_Info_delete wrapper function ******************************************************/ void mpi_info_delete( MPI_Fint * info, TAU_CONST char * key, MPI_Fint * ierr) { MPI_INFO_DELETE( info, key, ierr) ; return ; } /****************************************************** *** MPI_Info_delete wrapper function ******************************************************/ void mpi_info_delete_( MPI_Fint * info, TAU_CONST char * key, MPI_Fint * ierr) { MPI_INFO_DELETE( info, key, ierr) ; return ; } /****************************************************** *** MPI_Info_delete wrapper function ******************************************************/ void mpi_info_delete__( MPI_Fint * info, TAU_CONST char * key, MPI_Fint * ierr) { MPI_INFO_DELETE( info, key, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_Info_get wrapper function ******************************************************/ int MPI_Info_get( MPI_Info info, TAU_CONST char * key, int valuelen, char * value, int * flag) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_Info_get()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_Info_get( info, key, valuelen, value, flag) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_Info_get wrapper function ******************************************************/ void MPI_INFO_GET( MPI_Fint * info, TAU_CONST char * key, MPI_Fint * valuelen, TAU_CONST char * value, MPI_Fint * flag, MPI_Fint * ierr) { MPI_Info local_info = MPI_Info_f2c(*info); *ierr = MPI_Info_get( local_info, key, *valuelen, value, flag) ; return ; } /****************************************************** *** MPI_Info_get wrapper function ******************************************************/ void mpi_info_get( MPI_Fint * info, TAU_CONST char * key, MPI_Fint * valuelen, TAU_CONST char * value, MPI_Fint * flag, MPI_Fint * ierr) { MPI_INFO_GET( info, key, valuelen, value, flag, ierr) ; return ; } /****************************************************** *** MPI_Info_get wrapper function ******************************************************/ void mpi_info_get_( MPI_Fint * info, TAU_CONST char * key, MPI_Fint * valuelen, TAU_CONST char * value, MPI_Fint * flag, MPI_Fint * ierr) { MPI_INFO_GET( info, key, valuelen, value, flag, ierr) ; return ; } /****************************************************** *** MPI_Info_get wrapper function ******************************************************/ void mpi_info_get__( MPI_Fint * info, TAU_CONST char * key, MPI_Fint * valuelen, TAU_CONST char * value, MPI_Fint * flag, MPI_Fint * ierr) { MPI_INFO_GET( info, key, valuelen, value, flag, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_Info_get_valuelen wrapper function ******************************************************/ int MPI_Info_get_valuelen( MPI_Info info, TAU_CONST char * key, int * valuelen, int * flag) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_Info_get_valuelen()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_Info_get_valuelen( info, key, valuelen, flag) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_Info_get_valuelen wrapper function ******************************************************/ void MPI_INFO_GET_VALUELEN( MPI_Fint * info, TAU_CONST char * key, MPI_Fint * valuelen, MPI_Fint * flag, MPI_Fint * ierr) { MPI_Info local_info = MPI_Info_f2c(*info); *ierr = MPI_Info_get_valuelen( local_info, key, valuelen, flag) ; return ; } /****************************************************** *** MPI_Info_get_valuelen wrapper function ******************************************************/ void mpi_info_get_valuelen( MPI_Fint * info, TAU_CONST char * key, MPI_Fint * valuelen, MPI_Fint * flag, MPI_Fint * ierr) { MPI_INFO_GET_VALUELEN( info, key, valuelen, flag, ierr) ; return ; } /****************************************************** *** MPI_Info_get_valuelen wrapper function ******************************************************/ void mpi_info_get_valuelen_( MPI_Fint * info, TAU_CONST char * key, MPI_Fint * valuelen, MPI_Fint * flag, MPI_Fint * ierr) { MPI_INFO_GET_VALUELEN( info, key, valuelen, flag, ierr) ; return ; } /****************************************************** *** MPI_Info_get_valuelen wrapper function ******************************************************/ void mpi_info_get_valuelen__( MPI_Fint * info, TAU_CONST char * key, MPI_Fint * valuelen, MPI_Fint * flag, MPI_Fint * ierr) { MPI_INFO_GET_VALUELEN( info, key, valuelen, flag, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_Info_get_nkeys wrapper function ******************************************************/ int MPI_Info_get_nkeys( MPI_Info info, int * nkeys) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_Info_get_nkeys()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_Info_get_nkeys( info, nkeys) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_Info_get_nkeys wrapper function ******************************************************/ void MPI_INFO_GET_NKEYS( MPI_Fint * info, MPI_Fint * nkeys, MPI_Fint * ierr) { MPI_Info local_info = MPI_Info_f2c(*info); *ierr = MPI_Info_get_nkeys( local_info, nkeys) ; return ; } /****************************************************** *** MPI_Info_get_nkeys wrapper function ******************************************************/ void mpi_info_get_nkeys( MPI_Fint * info, MPI_Fint * nkeys, MPI_Fint * ierr) { MPI_INFO_GET_NKEYS( info, nkeys, ierr) ; return ; } /****************************************************** *** MPI_Info_get_nkeys wrapper function ******************************************************/ void mpi_info_get_nkeys_( MPI_Fint * info, MPI_Fint * nkeys, MPI_Fint * ierr) { MPI_INFO_GET_NKEYS( info, nkeys, ierr) ; return ; } /****************************************************** *** MPI_Info_get_nkeys wrapper function ******************************************************/ void mpi_info_get_nkeys__( MPI_Fint * info, MPI_Fint * nkeys, MPI_Fint * ierr) { MPI_INFO_GET_NKEYS( info, nkeys, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_Info_get_nthkey wrapper function ******************************************************/ int MPI_Info_get_nthkey( MPI_Info info, int n, char * key) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_Info_get_nthkey()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_Info_get_nthkey( info, n, key) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_Info_get_nthkey wrapper function ******************************************************/ void MPI_INFO_GET_NTHKEY( MPI_Fint * info, MPI_Fint * n, char * key, MPI_Fint * ierr) { MPI_Info local_info = MPI_Info_f2c(*info); *ierr = MPI_Info_get_nthkey( local_info, *n, key) ; return ; } /****************************************************** *** MPI_Info_get_nthkey wrapper function ******************************************************/ void mpi_info_get_nthkey( MPI_Fint * info, MPI_Fint * n, char * key, MPI_Fint * ierr) { MPI_INFO_GET_NTHKEY( info, n, key, ierr) ; return ; } /****************************************************** *** MPI_Info_get_nthkey wrapper function ******************************************************/ void mpi_info_get_nthkey_( MPI_Fint * info, MPI_Fint * n, char * key, MPI_Fint * ierr) { MPI_INFO_GET_NTHKEY( info, n, key, ierr) ; return ; } /****************************************************** *** MPI_Info_get_nthkey wrapper function ******************************************************/ void mpi_info_get_nthkey__( MPI_Fint * info, MPI_Fint * n, char * key, MPI_Fint * ierr) { MPI_INFO_GET_NTHKEY( info, n, key, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_Info_dup wrapper function ******************************************************/ int MPI_Info_dup( MPI_Info info, MPI_Info * newinfo) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_Info_dup()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_Info_dup( info, newinfo) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_Info_dup wrapper function ******************************************************/ void MPI_INFO_DUP( MPI_Fint * info, MPI_Fint * newinfo, MPI_Fint * ierr) { MPI_Info local_newinfo; MPI_Info local_info; local_info = MPI_Info_f2c(*info); *ierr = MPI_Info_dup( local_info, &local_newinfo) ; *newinfo = MPI_Info_c2f(local_newinfo); return ; } /****************************************************** *** MPI_Info_dup wrapper function ******************************************************/ void mpi_info_dup( MPI_Fint * info, MPI_Fint * newinfo, MPI_Fint * ierr) { MPI_INFO_DUP( info, newinfo, ierr) ; return ; } /****************************************************** *** MPI_Info_dup wrapper function ******************************************************/ void mpi_info_dup_( MPI_Fint * info, MPI_Fint * newinfo, MPI_Fint * ierr) { MPI_INFO_DUP( info, newinfo, ierr) ; return ; } /****************************************************** *** MPI_Info_dup wrapper function ******************************************************/ void mpi_info_dup__( MPI_Fint * info, MPI_Fint * newinfo, MPI_Fint * ierr) { MPI_INFO_DUP( info, newinfo, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_Info_free wrapper function ******************************************************/ int MPI_Info_free( MPI_Info * info) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_Info_free()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_Info_free( info) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_Info_free wrapper function ******************************************************/ void MPI_INFO_FREE( MPI_Aint * info, MPI_Fint * ierr) { MPI_Info local_info = MPI_Info_f2c(*info); *ierr = MPI_Info_free( &local_info) ; *info = MPI_Info_c2f(local_info); return ; } /****************************************************** *** MPI_Info_free wrapper function ******************************************************/ void mpi_info_free( MPI_Aint * info, MPI_Fint * ierr) { MPI_INFO_FREE( info, ierr) ; return ; } /****************************************************** *** MPI_Info_free wrapper function ******************************************************/ void mpi_info_free_( MPI_Aint * info, MPI_Fint * ierr) { MPI_INFO_FREE( info, ierr) ; return ; } /****************************************************** *** MPI_Info_free wrapper function ******************************************************/ void mpi_info_free__( MPI_Aint * info, MPI_Fint * ierr) { MPI_INFO_FREE( info, ierr) ; return ; } /******************************************************/ /******************************************************/ #ifdef TAU_MPIADDERROR /****************************************************** *** MPI_Add_error_class wrapper function ******************************************************/ int MPI_Add_error_class( int * errorclass) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_Add_error_class()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_Add_error_class( errorclass) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_Add_error_class wrapper function ******************************************************/ void MPI_ADD_ERROR_CLASS( MPI_Fint * errorclass, MPI_Fint * ierr) { *ierr = MPI_Add_error_class( errorclass) ; return ; } /****************************************************** *** MPI_Add_error_class wrapper function ******************************************************/ void mpi_add_error_class( MPI_Fint * errorclass, MPI_Fint * ierr) { MPI_ADD_ERROR_CLASS( errorclass, ierr) ; return ; } /****************************************************** *** MPI_Add_error_class wrapper function ******************************************************/ void mpi_add_error_class_( MPI_Fint * errorclass, MPI_Fint * ierr) { MPI_ADD_ERROR_CLASS( errorclass, ierr) ; return ; } /****************************************************** *** MPI_Add_error_class wrapper function ******************************************************/ void mpi_add_error_class__( MPI_Fint * errorclass, MPI_Fint * ierr) { MPI_ADD_ERROR_CLASS( errorclass, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_Add_error_code wrapper function ******************************************************/ int MPI_Add_error_code( int errorclass, int * errorcode) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_Add_error_code()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_Add_error_code( errorclass, errorcode) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_Add_error_code wrapper function ******************************************************/ void MPI_ADD_ERROR_CODE( MPI_Fint * errorclass, MPI_Fint * errorcode, MPI_Fint * ierr) { *ierr = MPI_Add_error_code( *errorclass, errorcode) ; return ; } /****************************************************** *** MPI_Add_error_code wrapper function ******************************************************/ void mpi_add_error_code( MPI_Fint * errorclass, MPI_Fint * errorcode, MPI_Fint * ierr) { MPI_ADD_ERROR_CODE( errorclass, errorcode, ierr) ; return ; } /****************************************************** *** MPI_Add_error_code wrapper function ******************************************************/ void mpi_add_error_code_( MPI_Fint * errorclass, MPI_Fint * errorcode, MPI_Fint * ierr) { MPI_ADD_ERROR_CODE( errorclass, errorcode, ierr) ; return ; } /****************************************************** *** MPI_Add_error_code wrapper function ******************************************************/ void mpi_add_error_code__( MPI_Fint * errorclass, MPI_Fint * errorcode, MPI_Fint * ierr) { MPI_ADD_ERROR_CODE( errorclass, errorcode, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_Add_error_string wrapper function ******************************************************/ int MPI_Add_error_string( int errorcode, char * string) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_Add_error_string()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_Add_error_string( errorcode, string) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_Add_error_string wrapper function ******************************************************/ void MPI_ADD_ERROR_STRING( MPI_Fint * errorcode, char * string, MPI_Fint * ierr) { *ierr = MPI_Add_error_string( *errorcode, string) ; return ; } /****************************************************** *** MPI_Add_error_string wrapper function ******************************************************/ void mpi_add_error_string( MPI_Fint * errorcode, char * string, MPI_Fint * ierr) { MPI_ADD_ERROR_STRING( errorcode, string, ierr) ; return ; } /****************************************************** *** MPI_Add_error_string wrapper function ******************************************************/ void mpi_add_error_string_( MPI_Fint * errorcode, char * string, MPI_Fint * ierr) { MPI_ADD_ERROR_STRING( errorcode, string, ierr) ; return ; } /****************************************************** *** MPI_Add_error_string wrapper function ******************************************************/ void mpi_add_error_string__( MPI_Fint * errorcode, char * string, MPI_Fint * ierr) { MPI_ADD_ERROR_STRING( errorcode, string, ierr) ; return ; } #endif /* TAU_MPIADDERROR */ /******************************************************/ /******************************************************/ #ifdef TAU_MPIERRHANDLER /****************************************************** *** MPI_Comm_call_errhandler wrapper function ******************************************************/ int MPI_Comm_call_errhandler( MPI_Comm comm, int errorcode) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_Comm_call_errhandler()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_Comm_call_errhandler( comm, errorcode) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_Comm_call_errhandler wrapper function ******************************************************/ void MPI_COMM_CALL_ERRHANDLER( MPI_Fint * comm, MPI_Fint * errorcode, MPI_Fint * ierr) { *ierr = MPI_Comm_call_errhandler( MPI_Comm_f2c(*comm), *errorcode) ; return ; } /****************************************************** *** MPI_Comm_call_errhandler wrapper function ******************************************************/ void mpi_comm_call_errhandler( MPI_Fint * comm, MPI_Fint * errorcode, MPI_Fint * ierr) { MPI_COMM_CALL_ERRHANDLER( comm, errorcode, ierr) ; return ; } /****************************************************** *** MPI_Comm_call_errhandler wrapper function ******************************************************/ void mpi_comm_call_errhandler_( MPI_Fint * comm, MPI_Fint * errorcode, MPI_Fint * ierr) { MPI_COMM_CALL_ERRHANDLER( comm, errorcode, ierr) ; return ; } /****************************************************** *** MPI_Comm_call_errhandler wrapper function ******************************************************/ void mpi_comm_call_errhandler__( MPI_Fint * comm, MPI_Fint * errorcode, MPI_Fint * ierr) { MPI_COMM_CALL_ERRHANDLER( comm, errorcode, ierr) ; return ; } #endif /* TAU_MPIERRHANDLER */ /******************************************************/ /******************************************************/ /****************************************************** *** MPI_Comm_set_name wrapper function ******************************************************/ int MPI_Comm_set_name( MPI_Comm comm, char * comm_name) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_Comm_set_name()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_Comm_set_name( comm, comm_name) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_Comm_set_name wrapper function ******************************************************/ void MPI_COMM_SET_NAME( MPI_Fint * comm, char * comm_name, MPI_Fint * ierr) { *ierr = MPI_Comm_set_name( MPI_Comm_f2c(*comm), comm_name) ; return ; } /****************************************************** *** MPI_Comm_set_name wrapper function ******************************************************/ void mpi_comm_set_name( MPI_Fint * comm, char * comm_name, MPI_Fint * ierr) { MPI_COMM_SET_NAME( comm, comm_name, ierr) ; return ; } /****************************************************** *** MPI_Comm_set_name wrapper function ******************************************************/ void mpi_comm_set_name_( MPI_Fint * comm, char * comm_name, MPI_Fint * ierr) { MPI_COMM_SET_NAME( comm, comm_name, ierr) ; return ; } /****************************************************** *** MPI_Comm_set_name wrapper function ******************************************************/ void mpi_comm_set_name__( MPI_Fint * comm, char * comm_name, MPI_Fint * ierr) { MPI_COMM_SET_NAME( comm, comm_name, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_Comm_get_name wrapper function ******************************************************/ int MPI_Comm_get_name( MPI_Comm comm, char * comm_name, int * resultlen) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_Comm_get_name()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_Comm_get_name( comm, comm_name, resultlen) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_Comm_get_name wrapper function ******************************************************/ void MPI_COMM_GET_NAME( MPI_Fint * comm, char * comm_name, MPI_Fint * resultlen, MPI_Fint * ierr) { *ierr = MPI_Comm_get_name( MPI_Comm_f2c(*comm), comm_name, resultlen) ; return ; } /****************************************************** *** MPI_Comm_get_name wrapper function ******************************************************/ void mpi_comm_get_name( MPI_Fint * comm, char * comm_name, MPI_Fint * resultlen, MPI_Fint * ierr) { MPI_COMM_GET_NAME( comm, comm_name, resultlen, ierr) ; return ; } /****************************************************** *** MPI_Comm_get_name wrapper function ******************************************************/ void mpi_comm_get_name_( MPI_Fint * comm, char * comm_name, MPI_Fint * resultlen, MPI_Fint * ierr) { MPI_COMM_GET_NAME( comm, comm_name, resultlen, ierr) ; return ; } /****************************************************** *** MPI_Comm_get_name wrapper function ******************************************************/ void mpi_comm_get_name__( MPI_Fint * comm, char * comm_name, MPI_Fint * resultlen, MPI_Fint * ierr) { MPI_COMM_GET_NAME( comm, comm_name, resultlen, ierr) ; return ; } /******************************************************/ /******************************************************/ #ifdef TAU_MPIERRHANDLER /****************************************************** *** MPI_File_call_errhandler wrapper function ******************************************************/ int MPI_File_call_errhandler( MPI_File fh, int errorcode) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_File_call_errhandler()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_File_call_errhandler( fh, errorcode) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_File_call_errhandler wrapper function ******************************************************/ void MPI_FILE_CALL_ERRHANDLER( MPI_Fint * fh, MPI_Fint * errorcode, MPI_Fint * ierr) { MPI_File local_fh = MPI_File_f2c(*fh); *ierr = MPI_File_call_errhandler( local_fh, *errorcode) ; return ; } /****************************************************** *** MPI_File_call_errhandler wrapper function ******************************************************/ void mpi_file_call_errhandler( MPI_Fint * fh, MPI_Fint * errorcode, MPI_Fint * ierr) { MPI_FILE_CALL_ERRHANDLER( fh, errorcode, ierr) ; return ; } /****************************************************** *** MPI_File_call_errhandler wrapper function ******************************************************/ void mpi_file_call_errhandler_( MPI_Fint * fh, MPI_Fint * errorcode, MPI_Fint * ierr) { MPI_FILE_CALL_ERRHANDLER( fh, errorcode, ierr) ; return ; } /****************************************************** *** MPI_File_call_errhandler wrapper function ******************************************************/ void mpi_file_call_errhandler__( MPI_Fint * fh, MPI_Fint * errorcode, MPI_Fint * ierr) { MPI_FILE_CALL_ERRHANDLER( fh, errorcode, ierr) ; return ; } #endif /* TAU_MPIERRHANDLER */ /******************************************************/ /******************************************************/ /****************************************************** *** MPI_Type_set_name wrapper function ******************************************************/ int MPI_Type_set_name( MPI_Datatype type, char * type_name) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_Type_set_name()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_Type_set_name( type, type_name) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_Type_set_name wrapper function ******************************************************/ void MPI_TYPE_SET_NAME( MPI_Fint * type, char * type_name, MPI_Fint * ierr) { MPI_Datatype local_type = MPI_Type_f2c(*type); *ierr = MPI_Type_set_name( local_type, type_name) ; return ; } /****************************************************** *** MPI_Type_set_name wrapper function ******************************************************/ void mpi_type_set_name( MPI_Fint * type, char * type_name, MPI_Fint * ierr) { MPI_TYPE_SET_NAME( type, type_name, ierr) ; return ; } /****************************************************** *** MPI_Type_set_name wrapper function ******************************************************/ void mpi_type_set_name_( MPI_Fint * type, char * type_name, MPI_Fint * ierr) { MPI_TYPE_SET_NAME( type, type_name, ierr) ; return ; } /****************************************************** *** MPI_Type_set_name wrapper function ******************************************************/ void mpi_type_set_name__( MPI_Fint * type, char * type_name, MPI_Fint * ierr) { MPI_TYPE_SET_NAME( type, type_name, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_Type_get_name wrapper function ******************************************************/ int MPI_Type_get_name( MPI_Datatype type, char * type_name, int * resultlen) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_Type_get_name()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_Type_get_name( type, type_name, resultlen) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_Type_get_name wrapper function ******************************************************/ void MPI_TYPE_GET_NAME( MPI_Fint * type, char * type_name, MPI_Fint * resultlen, MPI_Fint * ierr) { MPI_Datatype local_type = MPI_Type_f2c(*type); *ierr = MPI_Type_get_name( local_type, type_name, resultlen) ; return ; } /****************************************************** *** MPI_Type_get_name wrapper function ******************************************************/ void mpi_type_get_name( MPI_Fint * type, char * type_name, MPI_Fint * resultlen, MPI_Fint * ierr) { MPI_TYPE_GET_NAME( type, type_name, resultlen, ierr) ; return ; } /****************************************************** *** MPI_Type_get_name wrapper function ******************************************************/ void mpi_type_get_name_( MPI_Fint * type, char * type_name, MPI_Fint * resultlen, MPI_Fint * ierr) { MPI_TYPE_GET_NAME( type, type_name, resultlen, ierr) ; return ; } /****************************************************** *** MPI_Type_get_name wrapper function ******************************************************/ void mpi_type_get_name__( MPI_Fint * type, char * type_name, MPI_Fint * resultlen, MPI_Fint * ierr) { MPI_TYPE_GET_NAME( type, type_name, resultlen, ierr) ; return ; } /******************************************************/ /******************************************************/ #ifdef TAU_MPIERRHANDLER /****************************************************** *** MPI_Win_call_errhandler wrapper function ******************************************************/ int MPI_Win_call_errhandler( MPI_Win win, int errorcode) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_Win_call_errhandler()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_Win_call_errhandler( win, errorcode) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_Win_call_errhandler wrapper function ******************************************************/ void MPI_WIN_CALL_ERRHANDLER( MPI_Fint * win, MPI_Fint * errorcode, MPI_Fint * ierr) { MPI_Win local_win = MPI_Win_f2c(*win); *ierr = MPI_Win_call_errhandler( local_win, *errorcode) ; return ; } /****************************************************** *** MPI_Win_call_errhandler wrapper function ******************************************************/ void mpi_win_call_errhandler( MPI_Fint * win, MPI_Fint * errorcode, MPI_Fint * ierr) { MPI_WIN_CALL_ERRHANDLER( win, errorcode, ierr) ; return ; } /****************************************************** *** MPI_Win_call_errhandler wrapper function ******************************************************/ void mpi_win_call_errhandler_( MPI_Fint * win, MPI_Fint * errorcode, MPI_Fint * ierr) { MPI_WIN_CALL_ERRHANDLER( win, errorcode, ierr) ; return ; } /****************************************************** *** MPI_Win_call_errhandler wrapper function ******************************************************/ void mpi_win_call_errhandler__( MPI_Fint * win, MPI_Fint * errorcode, MPI_Fint * ierr) { MPI_WIN_CALL_ERRHANDLER( win, errorcode, ierr) ; return ; } #endif /* TAU_MPIERRHANDLER */ /******************************************************/ /******************************************************/ /****************************************************** *** MPI_Win_set_name wrapper function ******************************************************/ int MPI_Win_set_name( MPI_Win win, char * win_name) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_Win_set_name()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_Win_set_name( win, win_name) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_Win_set_name wrapper function ******************************************************/ void MPI_WIN_SET_NAME( MPI_Fint * win, char * win_name, MPI_Fint * ierr) { MPI_Win local_win = MPI_Win_f2c(*win); *ierr = MPI_Win_set_name( local_win, win_name) ; return ; } /****************************************************** *** MPI_Win_set_name wrapper function ******************************************************/ void mpi_win_set_name( MPI_Fint * win, char * win_name, MPI_Fint * ierr) { MPI_WIN_SET_NAME( win, win_name, ierr) ; return ; } /****************************************************** *** MPI_Win_set_name wrapper function ******************************************************/ void mpi_win_set_name_( MPI_Fint * win, char * win_name, MPI_Fint * ierr) { MPI_WIN_SET_NAME( win, win_name, ierr) ; return ; } /****************************************************** *** MPI_Win_set_name wrapper function ******************************************************/ void mpi_win_set_name__( MPI_Fint * win, char * win_name, MPI_Fint * ierr) { MPI_WIN_SET_NAME( win, win_name, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_Win_get_name wrapper function ******************************************************/ int MPI_Win_get_name( MPI_Win win, char * win_name, int * resultlen) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_Win_get_name()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_Win_get_name( win, win_name, resultlen) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_Win_get_name wrapper function ******************************************************/ void MPI_WIN_GET_NAME( MPI_Fint * win, char * win_name, MPI_Fint * resultlen, MPI_Fint * ierr) { MPI_Win local_win = MPI_Win_f2c(*win); *ierr = MPI_Win_get_name( local_win, win_name, resultlen) ; return ; } /****************************************************** *** MPI_Win_get_name wrapper function ******************************************************/ void mpi_win_get_name( MPI_Fint * win, char * win_name, MPI_Fint * resultlen, MPI_Fint * ierr) { MPI_WIN_GET_NAME( win, win_name, resultlen, ierr) ; return ; } /****************************************************** *** MPI_Win_get_name wrapper function ******************************************************/ void mpi_win_get_name_( MPI_Fint * win, char * win_name, MPI_Fint * resultlen, MPI_Fint * ierr) { MPI_WIN_GET_NAME( win, win_name, resultlen, ierr) ; return ; } /****************************************************** *** MPI_Win_get_name wrapper function ******************************************************/ void mpi_win_get_name__( MPI_Fint * win, char * win_name, MPI_Fint * resultlen, MPI_Fint * ierr) { MPI_WIN_GET_NAME( win, win_name, resultlen, ierr) ; return ; } /******************************************************/ /******************************************************/ #ifdef TAU_MPI_INIT_THREAD_WRAPPER /****************************************************** *** MPI_Init_thread wrapper function ******************************************************/ int MPI_Init_thread( int * argc, char *** argv, int required, int * provided) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_Init_thread()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_Init_thread( argc, argv, required, provided) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_Init_thread wrapper function ******************************************************/ void MPI_INIT_THREAD( MPI_Fint * argc, char *** argv, MPI_Fint * required, MPI_Fint * provided, MPI_Fint * ierr) { *ierr = MPI_Init_thread( argc, argv, *required, provided) ; return ; } /****************************************************** *** MPI_Init_thread wrapper function ******************************************************/ void mpi_init_thread( MPI_Fint * argc, char *** argv, MPI_Fint * required, MPI_Fint * provided, MPI_Fint * ierr) { MPI_INIT_THREAD( argc, argv, required, provided, ierr) ; return ; } /****************************************************** *** MPI_Init_thread wrapper function ******************************************************/ void mpi_init_thread_( MPI_Fint * argc, char *** argv, MPI_Fint * required, MPI_Fint * provided, MPI_Fint * ierr) { MPI_INIT_THREAD( argc, argv, required, provided, ierr) ; return ; } /****************************************************** *** MPI_Init_thread wrapper function ******************************************************/ void mpi_init_thread__( MPI_Fint * argc, char *** argv, MPI_Fint * required, MPI_Fint * provided, MPI_Fint * ierr) { MPI_INIT_THREAD( argc, argv, required, provided, ierr) ; return ; } #endif /* TAU_MPI_INIT_THREAD_WRAPPER */ /******************************************************/ /******************************************************/ /****************************************************** *** MPI_Query_thread wrapper function ******************************************************/ int MPI_Query_thread( int * provided) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_Query_thread()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_Query_thread( provided) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_Query_thread wrapper function ******************************************************/ void MPI_QUERY_THREAD( MPI_Fint * provided, MPI_Fint * ierr) { *ierr = MPI_Query_thread( provided) ; return ; } /****************************************************** *** MPI_Query_thread wrapper function ******************************************************/ void mpi_query_thread( MPI_Fint * provided, MPI_Fint * ierr) { MPI_QUERY_THREAD( provided, ierr) ; return ; } /****************************************************** *** MPI_Query_thread wrapper function ******************************************************/ void mpi_query_thread_( MPI_Fint * provided, MPI_Fint * ierr) { MPI_QUERY_THREAD( provided, ierr) ; return ; } /****************************************************** *** MPI_Query_thread wrapper function ******************************************************/ void mpi_query_thread__( MPI_Fint * provided, MPI_Fint * ierr) { MPI_QUERY_THREAD( provided, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_Is_thread_main wrapper function ******************************************************/ int MPI_Is_thread_main( int * flag) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_Is_thread_main()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_Is_thread_main( flag) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_Is_thread_main wrapper function ******************************************************/ void MPI_IS_THREAD_MAIN( MPI_Fint * flag, MPI_Fint * ierr) { *ierr = MPI_Is_thread_main( flag) ; return ; } /****************************************************** *** MPI_Is_thread_main wrapper function ******************************************************/ void mpi_is_thread_main( MPI_Fint * flag, MPI_Fint * ierr) { MPI_IS_THREAD_MAIN( flag, ierr) ; return ; } /****************************************************** *** MPI_Is_thread_main wrapper function ******************************************************/ void mpi_is_thread_main_( MPI_Fint * flag, MPI_Fint * ierr) { MPI_IS_THREAD_MAIN( flag, ierr) ; return ; } /****************************************************** *** MPI_Is_thread_main wrapper function ******************************************************/ void mpi_is_thread_main__( MPI_Fint * flag, MPI_Fint * ierr) { MPI_IS_THREAD_MAIN( flag, ierr) ; return ; } /******************************************************/ /******************************************************/ #ifdef TAU_MPIGREQUEST /****************************************************** *** MPI_Grequest_start wrapper function ******************************************************/ int MPI_Grequest_start( MPI_Grequest_query_function * grequest_query_fn, MPI_Grequest_free_function * grequest_free_fn, MPI_Grequest_cancel_function * grequest_cancel_fn, void * extra_state, MPI_Request * request) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_Grequest_start()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_Grequest_start( grequest_query_fn, grequest_free_fn, grequest_cancel_fn, extra_state, request) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_Grequest_start wrapper function ******************************************************/ void MPI_GREQUEST_START( MPI_Grequest_query_function * grequest_query_fn, MPI_Grequest_free_function * grequest_free_fn, MPI_Grequest_cancel_function * grequest_cancel_fn, MPI_Aint * extra_state, MPI_Aint * request, MPI_Fint * ierr) { MPI_Request local_request; *ierr = MPI_Grequest_start( grequest_query_fn, grequest_free_fn, grequest_cancel_fn, extra_state, &local_request) ; *request = MPI_Request_c2f(local_request); return ; } /****************************************************** *** MPI_Grequest_start wrapper function ******************************************************/ void mpi_grequest_start( MPI_Grequest_query_function * grequest_query_fn, MPI_Grequest_free_function * grequest_free_fn, MPI_Grequest_cancel_function * grequest_cancel_fn, MPI_Aint * extra_state, MPI_Aint * request, MPI_Fint * ierr) { MPI_GREQUEST_START( grequest_query_fn, grequest_free_fn, grequest_cancel_fn, extra_state, request, ierr) ; return ; } /****************************************************** *** MPI_Grequest_start wrapper function ******************************************************/ void mpi_grequest_start_( MPI_Grequest_query_function * grequest_query_fn, MPI_Grequest_free_function * grequest_free_fn, MPI_Grequest_cancel_function * grequest_cancel_fn, MPI_Aint * extra_state, MPI_Aint * request, MPI_Fint * ierr) { MPI_GREQUEST_START( grequest_query_fn, grequest_free_fn, grequest_cancel_fn, extra_state, request, ierr) ; return ; } /****************************************************** *** MPI_Grequest_start wrapper function ******************************************************/ void mpi_grequest_start__( MPI_Grequest_query_function * grequest_query_fn, MPI_Grequest_free_function * grequest_free_fn, MPI_Grequest_cancel_function * grequest_cancel_fn, MPI_Aint * extra_state, MPI_Aint * request, MPI_Fint * ierr) { MPI_GREQUEST_START( grequest_query_fn, grequest_free_fn, grequest_cancel_fn, extra_state, request, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_Grequest_complete wrapper function ******************************************************/ int MPI_Grequest_complete( MPI_Request request) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_Grequest_complete()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_Grequest_complete( request) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_Grequest_complete wrapper function ******************************************************/ void MPI_GREQUEST_COMPLETE( MPI_Fint * request, MPI_Fint * ierr) { *ierr = MPI_Grequest_complete( MPI_Request_f2c(*request)) ; return ; } /****************************************************** *** MPI_Grequest_complete wrapper function ******************************************************/ void mpi_grequest_complete( MPI_Fint * request, MPI_Fint * ierr) { MPI_GREQUEST_COMPLETE( request, ierr) ; return ; } /****************************************************** *** MPI_Grequest_complete wrapper function ******************************************************/ void mpi_grequest_complete_( MPI_Fint * request, MPI_Fint * ierr) { MPI_GREQUEST_COMPLETE( request, ierr) ; return ; } /****************************************************** *** MPI_Grequest_complete wrapper function ******************************************************/ void mpi_grequest_complete__( MPI_Fint * request, MPI_Fint * ierr) { MPI_GREQUEST_COMPLETE( request, ierr) ; return ; } #endif /* TAU_MPIGREQUEST */ /******************************************************/ /******************************************************/ /****************************************************** *** MPI_Status_set_elements wrapper function ******************************************************/ int MPI_Status_set_elements( MPI_Status * status, MPI_Datatype datatype, int count) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_Status_set_elements()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_Status_set_elements( status, datatype, count) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_Status_set_elements wrapper function ******************************************************/ void MPI_STATUS_SET_ELEMENTS( MPI_Fint * status, MPI_Fint * datatype, MPI_Fint * count, MPI_Fint * ierr) { MPI_Status local_status; MPI_Status_f2c(status, &local_status); *ierr = MPI_Status_set_elements( &local_status, MPI_Type_f2c(*datatype), *count) ; MPI_Status_c2f(&local_status, status); return ; } /****************************************************** *** MPI_Status_set_elements wrapper function ******************************************************/ void mpi_status_set_elements( MPI_Fint * status, MPI_Fint * datatype, MPI_Fint * count, MPI_Fint * ierr) { MPI_STATUS_SET_ELEMENTS( status, datatype, count, ierr) ; return ; } /****************************************************** *** MPI_Status_set_elements wrapper function ******************************************************/ void mpi_status_set_elements_( MPI_Fint * status, MPI_Fint * datatype, MPI_Fint * count, MPI_Fint * ierr) { MPI_STATUS_SET_ELEMENTS( status, datatype, count, ierr) ; return ; } /****************************************************** *** MPI_Status_set_elements wrapper function ******************************************************/ void mpi_status_set_elements__( MPI_Fint * status, MPI_Fint * datatype, MPI_Fint * count, MPI_Fint * ierr) { MPI_STATUS_SET_ELEMENTS( status, datatype, count, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_Status_set_cancelled wrapper function ******************************************************/ int MPI_Status_set_cancelled( MPI_Status * status, int flag) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_Status_set_cancelled()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_Status_set_cancelled( status, flag) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_Status_set_cancelled wrapper function ******************************************************/ void MPI_STATUS_SET_CANCELLED( MPI_Fint * status, MPI_Fint * flag, MPI_Fint * ierr) { MPI_Status local_status; MPI_Status_f2c(status, &local_status); *ierr = MPI_Status_set_cancelled( &local_status, *flag) ; MPI_Status_c2f(&local_status, status); return ; } /****************************************************** *** MPI_Status_set_cancelled wrapper function ******************************************************/ void mpi_status_set_cancelled( MPI_Fint * status, MPI_Fint * flag, MPI_Fint * ierr) { MPI_STATUS_SET_CANCELLED( status, flag, ierr) ; return ; } /****************************************************** *** MPI_Status_set_cancelled wrapper function ******************************************************/ void mpi_status_set_cancelled_( MPI_Fint * status, MPI_Fint * flag, MPI_Fint * ierr) { MPI_STATUS_SET_CANCELLED( status, flag, ierr) ; return ; } /****************************************************** *** MPI_Status_set_cancelled wrapper function ******************************************************/ void mpi_status_set_cancelled__( MPI_Fint * status, MPI_Fint * flag, MPI_Fint * ierr) { MPI_STATUS_SET_CANCELLED( status, flag, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_Finalized wrapper function ******************************************************/ int MPI_Finalized( int * flag) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_Finalized()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_Finalized( flag) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_Finalized wrapper function ******************************************************/ void MPI_FINALIZED( MPI_Fint * flag, MPI_Fint * ierr) { *ierr = MPI_Finalized( flag) ; return ; } /****************************************************** *** MPI_Finalized wrapper function ******************************************************/ void mpi_finalized( MPI_Fint * flag, MPI_Fint * ierr) { MPI_FINALIZED( flag, ierr) ; return ; } /****************************************************** *** MPI_Finalized wrapper function ******************************************************/ void mpi_finalized_( MPI_Fint * flag, MPI_Fint * ierr) { MPI_FINALIZED( flag, ierr) ; return ; } /****************************************************** *** MPI_Finalized wrapper function ******************************************************/ void mpi_finalized__( MPI_Fint * flag, MPI_Fint * ierr) { MPI_FINALIZED( flag, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_Type_create_indexed_block wrapper function ******************************************************/ int MPI_Type_create_indexed_block( int count, int blocklength, int * array_of_displacements, MPI_Datatype oldtype, MPI_Datatype * newtype) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_Type_create_indexed_block()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_Type_create_indexed_block( count, blocklength, array_of_displacements, oldtype, newtype) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_Type_create_indexed_block wrapper function ******************************************************/ void MPI_TYPE_CREATE_INDEXED_BLOCK( MPI_Fint * count, MPI_Fint * blocklength, MPI_Fint * array_of_displacements, MPI_Fint * oldtype, MPI_Aint * newtype, MPI_Fint * ierr) { MPI_Datatype local_type; *ierr = MPI_Type_create_indexed_block( *count, *blocklength, array_of_displacements, MPI_Type_f2c(*oldtype), &local_type) ; *newtype = MPI_Type_c2f(local_type); return ; } /****************************************************** *** MPI_Type_create_indexed_block wrapper function ******************************************************/ void mpi_type_create_indexed_block( MPI_Fint * count, MPI_Fint * blocklength, MPI_Fint * array_of_displacements, MPI_Fint * oldtype, MPI_Aint * newtype, MPI_Fint * ierr) { MPI_TYPE_CREATE_INDEXED_BLOCK( count, blocklength, array_of_displacements, oldtype, newtype, ierr) ; return ; } /****************************************************** *** MPI_Type_create_indexed_block wrapper function ******************************************************/ void mpi_type_create_indexed_block_( MPI_Fint * count, MPI_Fint * blocklength, MPI_Fint * array_of_displacements, MPI_Fint * oldtype, MPI_Aint * newtype, MPI_Fint * ierr) { MPI_TYPE_CREATE_INDEXED_BLOCK( count, blocklength, array_of_displacements, oldtype, newtype, ierr) ; return ; } /****************************************************** *** MPI_Type_create_indexed_block wrapper function ******************************************************/ void mpi_type_create_indexed_block__( MPI_Fint * count, MPI_Fint * blocklength, MPI_Fint * array_of_displacements, MPI_Fint * oldtype, MPI_Aint * newtype, MPI_Fint * ierr) { MPI_TYPE_CREATE_INDEXED_BLOCK( count, blocklength, array_of_displacements, oldtype, newtype, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_Request_get_status wrapper function ******************************************************/ int MPI_Request_get_status( MPI_Request request, int * flag, MPI_Status * status) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_Request_get_status()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_Request_get_status( request, flag, status) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_Request_get_status wrapper function ******************************************************/ void MPI_REQUEST_GET_STATUS( MPI_Fint * request, MPI_Fint * flag, MPI_Fint * status, MPI_Fint * ierr) { MPI_Status local_status; *ierr = MPI_Request_get_status( MPI_Request_f2c(*request), flag, &local_status) ; MPI_Status_c2f(&local_status, status); return ; } /****************************************************** *** MPI_Request_get_status wrapper function ******************************************************/ void mpi_request_get_status( MPI_Fint * request, MPI_Fint * flag, MPI_Fint * status, MPI_Fint * ierr) { MPI_REQUEST_GET_STATUS( request, flag, status, ierr) ; return ; } /****************************************************** *** MPI_Request_get_status wrapper function ******************************************************/ void mpi_request_get_status_( MPI_Fint * request, MPI_Fint * flag, MPI_Fint * status, MPI_Fint * ierr) { MPI_REQUEST_GET_STATUS( request, flag, status, ierr) ; return ; } /****************************************************** *** MPI_Request_get_status wrapper function ******************************************************/ void mpi_request_get_status__( MPI_Fint * request, MPI_Fint * flag, MPI_Fint * status, MPI_Fint * ierr) { MPI_REQUEST_GET_STATUS( request, flag, status, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_Get_address wrapper function ******************************************************/ int MPI_Get_address( void * location, MPI_Aint * address) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_Get_address()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_Get_address( location, address) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_Get_address wrapper function ******************************************************/ void MPI_GET_ADDRESS( MPI_Aint * location, MPI_Aint * address, MPI_Fint * ierr) { *ierr = MPI_Get_address( location, address) ; return ; } /****************************************************** *** MPI_Get_address wrapper function ******************************************************/ void mpi_get_address( MPI_Aint * location, MPI_Aint * address, MPI_Fint * ierr) { MPI_GET_ADDRESS( location, address, ierr) ; return ; } /****************************************************** *** MPI_Get_address wrapper function ******************************************************/ void mpi_get_address_( MPI_Aint * location, MPI_Aint * address, MPI_Fint * ierr) { MPI_GET_ADDRESS( location, address, ierr) ; return ; } /****************************************************** *** MPI_Get_address wrapper function ******************************************************/ void mpi_get_address__( MPI_Aint * location, MPI_Aint * address, MPI_Fint * ierr) { MPI_GET_ADDRESS( location, address, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_Type_create_resized wrapper function ******************************************************/ int MPI_Type_create_resized( MPI_Datatype oldtype, MPI_Aint lb, MPI_Aint extent, MPI_Datatype * newtype) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_Type_create_resized()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_Type_create_resized( oldtype, lb, extent, newtype) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_Type_create_resized wrapper function ******************************************************/ void MPI_TYPE_CREATE_RESIZED( MPI_Fint * oldtype, MPI_Aint * lb, MPI_Aint * extent, MPI_Aint * newtype, MPI_Fint * ierr) { MPI_Datatype local_type; *ierr = MPI_Type_create_resized( MPI_Type_f2c(*oldtype), *lb, *extent, &local_type) ; *newtype = MPI_Type_c2f(local_type); return ; } /****************************************************** *** MPI_Type_create_resized wrapper function ******************************************************/ void mpi_type_create_resized( MPI_Fint * oldtype, MPI_Aint * lb, MPI_Aint * extent, MPI_Aint * newtype, MPI_Fint * ierr) { MPI_TYPE_CREATE_RESIZED( oldtype, lb, extent, newtype, ierr) ; return ; } /****************************************************** *** MPI_Type_create_resized wrapper function ******************************************************/ void mpi_type_create_resized_( MPI_Fint * oldtype, MPI_Aint * lb, MPI_Aint * extent, MPI_Aint * newtype, MPI_Fint * ierr) { MPI_TYPE_CREATE_RESIZED( oldtype, lb, extent, newtype, ierr) ; return ; } /****************************************************** *** MPI_Type_create_resized wrapper function ******************************************************/ void mpi_type_create_resized__( MPI_Fint * oldtype, MPI_Aint * lb, MPI_Aint * extent, MPI_Aint * newtype, MPI_Fint * ierr) { MPI_TYPE_CREATE_RESIZED( oldtype, lb, extent, newtype, ierr) ; return ; } /******************************************************/ /******************************************************/ #ifdef TAU_MPITYPEEX /****************************************************** *** MPI_Type_get_true_extent wrapper function ******************************************************/ int MPI_Type_get_true_extent( MPI_Datatype datatype, MPI_Aint * true_lb, MPI_Aint * true_extent) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_Type_get_true_extent()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_Type_get_true_extent( datatype, true_lb, true_extent) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_Type_get_true_extent wrapper function ******************************************************/ void MPI_TYPE_GET_TRUE_EXTENT( MPI_Fint * datatype, MPI_Aint * true_lb, MPI_Aint * true_extent, MPI_Fint * ierr) { *ierr = MPI_Type_get_true_extent( MPI_Type_f2c(*datatype), true_lb, true_extent) ; return ; } /****************************************************** *** MPI_Type_get_true_extent wrapper function ******************************************************/ void mpi_type_get_true_extent( MPI_Fint * datatype, MPI_Aint * true_lb, MPI_Aint * true_extent, MPI_Fint * ierr) { MPI_TYPE_GET_TRUE_EXTENT( datatype, true_lb, true_extent, ierr) ; return ; } /****************************************************** *** MPI_Type_get_true_extent wrapper function ******************************************************/ void mpi_type_get_true_extent_( MPI_Fint * datatype, MPI_Aint * true_lb, MPI_Aint * true_extent, MPI_Fint * ierr) { MPI_TYPE_GET_TRUE_EXTENT( datatype, true_lb, true_extent, ierr) ; return ; } /****************************************************** *** MPI_Type_get_true_extent wrapper function ******************************************************/ void mpi_type_get_true_extent__( MPI_Fint * datatype, MPI_Aint * true_lb, MPI_Aint * true_extent, MPI_Fint * ierr) { MPI_TYPE_GET_TRUE_EXTENT( datatype, true_lb, true_extent, ierr) ; return ; } #endif /* TAU_MPI_TYPEEX */ /******************************************************/ /******************************************************/ /****************************************************** *** MPI_Pack_external wrapper function ******************************************************/ int MPI_Pack_external( char * datarep, void * inbuf, int incount, MPI_Datatype datatype, void * outbuf, MPI_Aint outsize, MPI_Aint * position) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_Pack_external()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_Pack_external( datarep, inbuf, incount, datatype, outbuf, outsize, position) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_Pack_external wrapper function ******************************************************/ void MPI_PACK_EXTERNAL( char * datarep, MPI_Aint * inbuf, MPI_Fint * incount, MPI_Fint * datatype, MPI_Aint * outbuf, MPI_Fint * outsize, MPI_Aint * position, MPI_Fint * ierr) { *ierr = MPI_Pack_external( datarep, inbuf, *incount, MPI_Type_f2c(*datatype), outbuf, *outsize, position) ; return ; } /****************************************************** *** MPI_Pack_external wrapper function ******************************************************/ void mpi_pack_external( char * datarep, MPI_Aint * inbuf, MPI_Fint * incount, MPI_Fint * datatype, MPI_Aint * outbuf, MPI_Fint * outsize, MPI_Aint * position, MPI_Fint * ierr) { MPI_PACK_EXTERNAL( datarep, inbuf, incount, datatype, outbuf, outsize, position, ierr) ; return ; } /****************************************************** *** MPI_Pack_external wrapper function ******************************************************/ void mpi_pack_external_( char * datarep, MPI_Aint * inbuf, MPI_Fint * incount, MPI_Fint * datatype, MPI_Aint * outbuf, MPI_Fint * outsize, MPI_Aint * position, MPI_Fint * ierr) { MPI_PACK_EXTERNAL( datarep, inbuf, incount, datatype, outbuf, outsize, position, ierr) ; return ; } /****************************************************** *** MPI_Pack_external wrapper function ******************************************************/ void mpi_pack_external__( char * datarep, MPI_Aint * inbuf, MPI_Fint * incount, MPI_Fint * datatype, MPI_Aint * outbuf, MPI_Fint * outsize, MPI_Aint * position, MPI_Fint * ierr) { MPI_PACK_EXTERNAL( datarep, inbuf, incount, datatype, outbuf, outsize, position, ierr) ; return ; } /******************************************************/ /******************************************************/ /****************************************************** *** MPI_Unpack_external wrapper function ******************************************************/ int MPI_Unpack_external( char * datarep, void * inbuf, MPI_Aint insize, MPI_Aint * position, void * outbuf, int outcount, MPI_Datatype datatype) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_Unpack_external()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_Unpack_external( datarep, inbuf, insize, position, outbuf, outcount, datatype) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_Unpack_external wrapper function ******************************************************/ void MPI_UNPACK_EXTERNAL( char * datarep, MPI_Aint * inbuf, MPI_Fint * insize, MPI_Aint * position, MPI_Aint * outbuf, MPI_Fint * outcount, MPI_Fint * datatype, MPI_Fint * ierr) { *ierr = MPI_Unpack_external( datarep, inbuf, *insize, position, outbuf, *outcount, MPI_Type_f2c(*datatype)) ; return ; } /****************************************************** *** MPI_Unpack_external wrapper function ******************************************************/ void mpi_unpack_external( char * datarep, MPI_Aint * inbuf, MPI_Fint * insize, MPI_Aint * position, MPI_Aint * outbuf, MPI_Fint * outcount, MPI_Fint * datatype, MPI_Fint * ierr) { MPI_UNPACK_EXTERNAL( datarep, inbuf, insize, position, outbuf, outcount, datatype, ierr) ; return ; } /****************************************************** *** MPI_Unpack_external wrapper function ******************************************************/ void mpi_unpack_external_( char * datarep, MPI_Aint * inbuf, MPI_Fint * insize, MPI_Aint * position, MPI_Aint * outbuf, MPI_Fint * outcount, MPI_Fint * datatype, MPI_Fint * ierr) { MPI_UNPACK_EXTERNAL( datarep, inbuf, insize, position, outbuf, outcount, datatype, ierr) ; return ; } /****************************************************** *** MPI_Unpack_external wrapper function ******************************************************/ void mpi_unpack_external__( char * datarep, MPI_Aint * inbuf, MPI_Fint * insize, MPI_Aint * position, MPI_Aint * outbuf, MPI_Fint * outcount, MPI_Fint * datatype, MPI_Fint * ierr) { MPI_UNPACK_EXTERNAL( datarep, inbuf, insize, position, outbuf, outcount, datatype, ierr) ; return ; } /******************************************************/ /******************************************************/ #ifdef TAU_MPIADDERROR /****************************************************** *** MPI_Pack_external_size wrapper function ******************************************************/ int MPI_Pack_external_size( char * datarep, int incount, MPI_Datatype datatype, MPI_Aint * size) { int retvalue; TAU_PROFILE_TIMER(t, "MPI_Pack_external_size()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retvalue = PMPI_Pack_external_size( datarep, incount, datatype, size) ; TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** MPI_Pack_external_size wrapper function ******************************************************/ void MPI_PACK_EXTERNAL_SIZE( char * datarep, MPI_Fint * incount, MPI_Fint * datatype, MPI_Aint * size, MPI_Fint * ierr) { *ierr = MPI_Pack_external_size( datarep, *incount, MPI_Type_f2c(*datatype), size) ; return ; } /****************************************************** *** MPI_Pack_external_size wrapper function ******************************************************/ void mpi_pack_external_size( char * datarep, MPI_Fint * incount, MPI_Fint * datatype, MPI_Aint * size, MPI_Fint * ierr) { MPI_PACK_EXTERNAL_SIZE( datarep, incount, datatype, size, ierr) ; return ; } /****************************************************** *** MPI_Pack_external_size wrapper function ******************************************************/ void mpi_pack_external_size_( char * datarep, MPI_Fint * incount, MPI_Fint * datatype, MPI_Aint * size, MPI_Fint * ierr) { MPI_PACK_EXTERNAL_SIZE( datarep, incount, datatype, size, ierr) ; return ; } /****************************************************** *** MPI_Pack_external_size wrapper function ******************************************************/ void mpi_pack_external_size__( char * datarep, MPI_Fint * incount, MPI_Fint * datatype, MPI_Aint * size, MPI_Fint * ierr) { MPI_PACK_EXTERNAL_SIZE( datarep, incount, datatype, size, ierr) ; return ; } #endif /* TAU_MPIADDERROR */ /******************************************************/ /******************************************************/ tau-2.16.4/src/Profile/TauMuse.cpp000066400000000000000000000714511062343042700166640ustar00rootroot00000000000000/**************************************************************************** * ** TAU Portable Profiling Package ** * ** http://www.cs.uoregon.edu/research/tau ** * ***************************************************************************** * ** Copyright 2003 ** * ** Department of Computer and Information Science, University of Oregon ** * ** Advanced Computing Laboratory, Los Alamos National Laboratory ** * ****************************************************************************/ /*************************************************************************** * ** File : TauMuse.cpp ** * ** Description : TAU MUSE/MAGNET Interface ** * ** Author : Suravee Suthikulpanit ** * ** Contact : Suravee@cs.uoregon.edu ** * ** Flags : Compile with ** * ** -DTAU_MUSE ** * ****************************************************************************/ // NOTE: This is implented for using with "count" handler at this point. // Encoder and Decoder are needed for different handler. // /* This file has routines for connecting to the MAGNETD server and sending * commands. */ #include #include #include #include #include #include #include #include #include #include #include #include #include #define HOST_PORT 9997 // MUSE server port #define HOST_IP "127.0.0.1" #define BUFFERSIZE 8192 #define MAX_ARGLEN 255 #define MAX_REPLY_LENGTH 1024 #define DIRNAMELENGTH 2048 //#define DEBUG_PROF /************************************** * Description : PACKET PROTOCOL for communicating with * the MUSE server. * From : translator.c ************************************** The sizes for all parameters are: = 1 byte = 1 bytes = 4 bytes = = 1 byte, <= 254 bytes, = 1 byte = # of bytes specified by The commands are defined as follows: HELP: CREATE: QUERY_MAPPER: QUERY_HANDLER: DESTROY: START: STOP: RESETFILTERS: ADDFILTER: GET: QUIT: *****************************************/ /* TheMuseSockId() is a global variable now */ int& TheMuseSockId(void) { static int sockid = 0; return sockid; } /* Mono_PkgList() is a global variable now */ struct package_list_info &Mono_PkgList(void){ static struct package_list_info list; return list; } /* NonMono_PkgList() is a global variable now */ struct package_list_info &NonMono_PkgList(void){ static struct package_list_info list; return list; } /* Get the name of TAU_MUSE predefine package */ char * get_muse_package(void) { char *package = getenv("TAU_MUSE_PACKAGE"); //if (package == (char *) NULL) //{ /* the user has not specified any handler name */ // return "TAU_count"; //} else return package; } /* Get the name of TAU_MUSE predefine package */ char * get_muse_packages(int index) { char str[30]; char *package; sprintf(str,"TAU_MUSE_PACKAGE%d",index); package=getenv(str); return package; } /* Get the name of TAU_MUSE predefine package */ char * get_muse_event_packages(int index) { char str[30]; char *package; sprintf(str,"TAU_MUSE_EVENT_PACKAGE%d",index); package=getenv(str); return package; } /************************************************************ * Description : Send binary command to MUSE server and verify * From : mdsh/mdsh.c ***********************************************************/ int send_and_check(int sockfd,int command_length,char *send_buffer,char *recv_buffer){ struct pollfd poll_fd; int b; int network_command_length; network_command_length = htonl(command_length); // send command_length if(send(sockfd, &network_command_length,sizeof(network_command_length),0) == -1){ perror("send"); printf("TauMuse.cpp: Unable to send command_length\n"); close(sockfd); return(1); } // send command if(send(sockfd, send_buffer,command_length,0) == -1){ perror("send"); printf("TauMuse.cpp: Unable to send command to MUSE\n"); close(sockfd); return(1); } // receive confirmation memset(recv_buffer,0,BUFFERSIZE); poll_fd.fd = sockfd; poll_fd.events = POLLIN; if (poll(&poll_fd, 1, -1) < 0) { printf("TauMuse.cpp: poll() failed in server thread: %s", strerror(errno)); } // Figure out what happened if (poll_fd.revents & POLLERR) { printf("TauMuse.cpp: Error: poll() returned POLLERR\n"); kill(0,SIGTERM); } else if (poll_fd.revents & POLLHUP) { printf("\nTauMuse.cpp: Hang up signal received from server. Terminating...\n"); kill(0,SIGTERM); } else if (poll_fd.revents & POLLNVAL) { printf("\nTauMuse.cpp: Error: poll() returned POLLNVAL\n"); kill(0,SIGTERM); } else if (poll_fd.revents & POLLIN) { if ((b = recv(sockfd, recv_buffer, BUFFERSIZE, 0)) == -1) { printf("TauMuse.cpp: recv() failed: %s", strerror(errno)); kill(0,SIGTERM); } if (b == 0) { printf("\nTauMuse.cpp: Hang up signal received from server. Terminating...\n"); kill(0,SIGTERM); } while (b < sizeof(int)) { if ((b += recv(sockfd, &recv_buffer[b], BUFFERSIZE-b, 0)) == -1) { printf("TauMuse.cpp: recv() failed: %s", strerror(errno)); kill(0,SIGTERM); } } b -= sizeof(int); while (b < ntohl(((int *)recv_buffer)[0])) { if ((b += recv(sockfd, &recv_buffer[b+sizeof(int)], BUFFERSIZE-b-sizeof(int), 0)) == -1) { printf("TauMuse.cpp: recv() failed: %s", strerror(errno)); kill(0,SIGTERM); } } } return(0); } ///////////////////////////////////////////////////////////////////////////////////////// //================================================================================= // TAU-MUSE API IMPLEMENTATION // -TauMuseInit :Connect to magnetd // -TauMuseCreate :Send command "create","addfilter","start" to magnetd // -TauMuseQuery :Send command "query" // -TauMuseDestroy :Send command "stop","destroy","quit" //================================================================================ /************************************************************* * Description : Initialize socket connecting to MUSE sever * - connect * - send command create * - send command start * NOTE : This function is called by TauMuseQuery *************************************************************/ int TauMuseInit(void){ #ifdef AF_UNIX_MODE struct sockaddr unix_addr; char current_directory[DIRNAMELENGTH]; #else struct sockaddr_in host_addr; #endif //AF_UNIX_MODE int sockfd ; char recv_buffer[BUFFERSIZE]; // =================================== // Establish socket and connection // =================================== #ifdef AF_UNIX_MODE // USING AF_UNIX /* fill in the socket structure with host information */ unix_addr.sa_family = AF_UNIX; strcpy(unix_addr.sa_data,"magnetd"); // GO find the lock file, which is also the socket descriptor getcwd(current_directory,DIRNAMELENGTH); if (chdir(VAR_LOCK_DIRECTORY) < 0) { //if (chdir("/var/lock") < 0) { printf("unable to change to lockfile directory: %s", strerror(errno)); return(1); } /* grab an Internet domain socket */ if ((sockfd = socket(AF_UNIX, SOCK_STREAM, 0)) == -1) { printf("unable to create socket: %s", strerror(errno)); return(1); } /* Assign sockfd to the global variable TheMuseSockId() */ TheMuseSockId() = sockfd; #ifdef DEBUG_PROF /* connect to PORT on HOST */ printf("%s: %d\n", unix_addr.sa_data, unix_addr.sa_family); printf("Connecting to magnetd using AF_UNIX...\n"); #endif //DEBUG_PROF if (connect(sockfd, &unix_addr, /* Choose right socket type */ sizeof(unix_addr)) == -1) { printf("unable to connect with AF_UNIX socket: %s", strerror(errno)); return(1); } chdir(current_directory); #else // USING AF_INET // host information memset(&host_addr,0,sizeof(host_addr)); host_addr.sin_family = AF_INET; host_addr.sin_addr.s_addr = inet_addr(HOST_IP); host_addr.sin_port = htons(HOST_PORT); // create socket if((sockfd = socket(AF_INET, SOCK_STREAM, 0)) == -1){ perror("socket"); printf("TauMuse.cpp: Unable to create socket: %s\n", strerror(errno)); return(1); } /* Assign sockfd to the global variable TheMuseSockId() */ TheMuseSockId() = sockfd; #ifdef DEBUG_PROF printf("TauMuse.cpp: Connecting to magnetd using AF_INET.\n"); #endif /* DEBUG_PROF */ // connect to magnetd if(connect(sockfd,(struct sockaddr *) &host_addr, sizeof(host_addr)) == -1){ perror("connect"); printf("TauMuse.cpp: Unable to connect to server: %s\n", strerror(errno)); return(1); } #endif //AF_UNIX_MODE // verify connection if(recv(sockfd, recv_buffer, BUFFERSIZE,0) == -1){ perror("recv"); printf("TauMuse.cpp: Unable to establish connection: %s\n", strerror(errno)); return(1); } if(recv_buffer[0] == 1){ printf("TauMuse.cpp: Connection Refused from server.\n"); close(sockfd); return(1); }else if(recv_buffer[0] == 0){ #ifdef DEBUG_PROF printf("------------Connection Established-----------\n"); #endif /* DEBUG_PROF */ }else{ printf("TauMuse.cpp: Unknown handshake reply.\n"); close(sockfd); return(1); } return(0); } /************************************************************* * Description : Create handler according to the handler_name * - send command create * - send command addfilter * - send command start * NOTE : This function is called by TauMuseQuery *************************************************************/ int TauMuseCreate(struct package_info *pkg){ char cmdstr[MAX_ARGLEN]; char send_buffer[BUFFERSIZE]; char recv_buffer[BUFFERSIZE]; int command_length; int sockfd = TheMuseSockId(); unsigned char *byteptr; int handlerID; int i,j,b,k; // Loop to create multiple handlers. for(j=0;jnumofhandlers;j++){ // ==================================== // command "create " // ==================================== sprintf(cmdstr,"create %s",pkg->handlers[j].handler_name); #ifdef DEBUG_PROF printf("cmdstr = %s\n",cmdstr); #endif /* DEBUG_PROF */ memset(send_buffer,0,BUFFERSIZE); command_length = create_encode_selector(pkg->handlers[j].handler_name, cmdstr,BUFFERSIZE,send_buffer); #ifdef DEBUG_PROF //DEBUG JEREMY printf("cl: %u\n", command_length); for (b=0;b " // ===================================== // Loop to add multiple filters. for(k=0;khandlers[j].numoffilters;k++) { // Loop to add multiple arguements for each filter. for(i=0;ihandlers[j].filters[k].filter_argc;i++) { sprintf(cmdstr,"addfilter %d %s", handlerID,pkg->handlers[j].filters[k].args[i]); #ifdef DEBUG_PROF printf("cmdstr = %s\n",cmdstr); #endif /* DEBUG_PROF */ command_length = addfilter_encode_selector( strtok(pkg->handlers[j].filters[k].args[i]," ") ,cmdstr,BUFFERSIZE,send_buffer); #ifdef DEBUG_PROF //DEBUG JEREMY printf("cl: %u\n", command_length); for (b=0;b" // ===================================== // create command in binary memset(send_buffer,0,BUFFERSIZE); // Command for start send_buffer[0] = 5; byteptr = (unsigned char *)&send_buffer[sizeof(unsigned char)]; *byteptr = (unsigned char)handlerID; send_and_check(sockfd,2+sizeof(int),send_buffer,recv_buffer); #ifdef DEBUG_PROF printf("!!!!!!!!!handlerID %d is started\n",handlerID); #endif /* DEBUG_PROF */ pkg->handlers[j].handlerID = handlerID; } // End for loop for each handler return 0; } /************************************************************ * Description : Destroy socket connecting to MUSE sever * - connect * - send command stop * - send command destroy * - send command quit ***********************************************************/ void TauMuseDestroy(void){ /* char send_buffer[BUFFERSIZE]; char recv_buffer[BUFFERSIZE]; unsigned char *byteptr; int handlerID = TheMuseHandlerId(); // read global int sockfd = TheMuseSockId(); // read // ==================================== // command "stop " // ==================================== // create command in binary memset(send_buffer,0,BUFFERSIZE); send_buffer[0] = 6; byteptr = (unsigned char *)&handlerID; send_buffer[1] = (char)*byteptr; send_and_check(sockfd,2+sizeof(int),send_buffer,recv_buffer); #ifdef DEBUG_PROF printf("!!!!!!!!!handlerID %d is stopped\n",handlerID); #endif // DEBUG_PROF // ==================================== // command "destroy " // ==================================== // create command in binary memset(send_buffer,0,BUFFERSIZE); send_buffer[0] = 4; send_buffer[1] = (char)*byteptr; send_and_check(sockfd,2+sizeof(int),send_buffer,recv_buffer); #ifdef DEBUG_PROF printf("!!!!!!!!!handlerID %d is destroyed\n",handlerID); #endif // DEBUG_PROF // ==================================== // command "quit" // ==================================== // create command in binary memset(send_buffer,0,BUFFERSIZE); send_buffer[0] = 10; send_and_check(sockfd,1+sizeof(int),send_buffer,recv_buffer); */ } #ifdef TAU_MUSE /************************************************************ * Description : Query_handler from MUSE sever for * monotonically incresing value. * - send command query_handler ***********************************************************/ double TauMuseQuery(void){ char send_buffer[BUFFERSIZE]; char recv_buffer[BUFFERSIZE]; char result_buffer[MAX_REPLY_LENGTH]; unsigned char *byteptr; double result=0.0; double data_tmp[1]; int sockfd, handlerID,i,j; //=================================================== // PACKAGE INITIALIZATION // // This will get the value from environment variable // to initilize the appropriate handler and filter arguments. // It should be done once at the begining. if(TheMuseSockId()==0){ TauMuseInit(); } if(Mono_PkgList().initialized == 0){ Mono_PkgList().initialized=1; Mono_PkgList().numofpackages=1; sprintf(Mono_PkgList().packages[0].package_name,"%s",get_muse_package()); if(monotonic_package_selector(&(Mono_PkgList().packages[0])) == -1){ printf("TauMuseQuery:ERROR: Can't initialized package %s\n", get_muse_package()); return(-1); } } //=================================================== sockfd = TheMuseSockId(); /* read from the global */ handlerID = Mono_PkgList().packages[0].handlers[0].handlerID; #ifdef DEBUG_PROF printf("TauMuseQuery--- : pid=%d\n",getpid()); #endif //DEBUG_PROF // ==================================== // command "query_handler " // ==================================== // create command in binary memset(send_buffer,0,BUFFERSIZE); send_buffer[0] = 3; byteptr = (unsigned char *)&handlerID; send_buffer[1] = (char)*byteptr; send_and_check(sockfd,2+sizeof(int),send_buffer,recv_buffer); #ifdef DEBUG_PROF printf("TauMuseQuery---: handlerID %d is queried\n",handlerID); #endif /* DEBUG_PROF */ result = (double)query_decode_selector(Mono_PkgList().packages[0].handlers[0].handler_name, send_buffer,recv_buffer, MAX_REPLY_LENGTH,result_buffer,data_tmp); #ifdef DEBUG_PROF printf("TauMuseQuery---: Mono_PkgList().packages[0].handlers[0].handler_name=%s\n", Mono_PkgList().packages[0].handlers[0].handler_name); printf("TauMuseQuery---: result value passing to TAU: %f\n",result); printf("TauMuseQuery---: result buffer:\n%s\n",result_buffer); #endif /* DEBUG_PROF */ return result; } #endif //TAU_MUSE int PkgListInit(struct package_list_info *list,int size,char *envName){ int i,j,k; int resultSize=0; list->numofpackages=0; if(!strcmp("TAU_MUSE_PACKAGE",envName)){ for(i=0,j=0;inumofpackages++; sprintf(list->packages[i].package_name,"%s",get_muse_packages(i)); // Initialize package if(monotonic_package_selector(&(list->packages[i])) == -1){ printf("PkgListInit:ERROR: Can't initialized package %s\n", get_muse_packages(i)); return(-1); } // Checking size of data array and the // number of counters. resultSize+=list->packages[i].totalcounters; if(resultSize > size){ printf("PkgListInit:ERROR: Size of data array is too small.\n"); return(-1); } }else break; }// endloop for each package } else if(!strcmp("TAU_MUSE_EVENT_PACKAGE",envName)){ for(i=0,j=0;inumofpackages++; sprintf(list->packages[i].package_name,"%s",get_muse_event_packages(i)); // Initialize package if(nonmonotonic_package_selector(&(list->packages[i])) == -1){ printf("PkgListInit:ERROR: Can't initialized package %s\n", get_muse_event_packages(i)); return(-1); } // Checking size of data array and the // number of counters. resultSize+=list->packages[i].totalcounters; if(resultSize > size){ printf("PkgListInit:ERROR: Size of data array is too small.\n"); return(-1); } }else break; }// endloop for each package } return resultSize; } #ifdef TAU_MUSE_EVENT /* int TauMuseGetSizeNonMono(void){ int result=0,i; for(i=0;isize){ printf("TauMuseGetMetrics:ERROR: Array size is too small.\n"); return(-1); } sprintf(data[resultSize-1],"%s",NonMono_PkgList().packages[i].handlers[j].metrics[k].info); }//endloop for each counter }//endloop for each handler }//endloop for each package return(resultSize); } #endif // TAU_MUSE_EVENT #if defined(TAU_MUSE) || defined(TAU_MUSE_MULTIPLE) /* int TauMuseGetSizeMono(void){ int result=0,i; for(i=0;isize){ printf("TauMuseGetMetrics:ERROR: Array size is too small.\n"); return(-1); } sprintf(data[resultSize-1],"%s",Mono_PkgList().packages[i].handlers[j].metrics[k].info); }//endloop for each counter }//endloop for each handler }//endloop for each package return(resultSize); } #endif //defined(TAU_MUSE) || defined(TAU_MUSE_MULTIPLE) #ifdef TAU_MUSE_EVENT /************************************************************ * Description : Query_handler from MUSE sever for * non-monotonically increasing value. * - send command query_handler ***********************************************************/ int TauMuseEventQuery(double data[], int size){ char send_buffer[BUFFERSIZE]; char recv_buffer[BUFFERSIZE]; char result_buffer[MAX_REPLY_LENGTH]; unsigned char *byteptr; int i,j,k; int sockfd , handlerID; int resultSize=0; double tmp_data[MAXNUMOF_COUNTERS]; //=================================================== // PACKAGE INITIALIZATION // ****** MUST BE DONE ONCE FIRST THING ************* if(TheMuseSockId()==0){ #ifdef DEBUG_PROF printf("TauMuseEventQuery: Calling TauMuseInit()\n"); #endif //DEBUG_PROF TauMuseInit(); } if(NonMono_PkgList().initialized == 0){ #ifdef DEBUG_PROF printf("TauMuseEventQuery: Initializing Package\n"); #endif //DEBUG_PROF NonMono_PkgList().initialized=1; PkgListInit(&NonMono_PkgList(),size,"TAU_MUSE_EVENT_PACKAGE"); } //=================================================== sockfd = TheMuseSockId(); /* read from the global */ #ifdef DEBUG_PROF printf("TauMuseEventQuery: Start Query\n"); printf("DEBUG:TauMuseEventQuery : pid=%d\n",getpid()); #endif //DEBUG_PROF // ==================================== // command "query_handler " // ==================================== resultSize=0; for(i=0;i" // ==================================== resultSize=0; for(i=0;i #include #include #include #include #include #include /*************************************************************************************** * Description : Encode binary code for command addfilter * which wil be sent to Muse server * From : translator.c * Return Value : the number of bytes in binary_command * NOTE : To be used with process_filter filter. * * Protocol for binary command: * <1B CMD> <1B handlerID> <1B length of filter_name> * <4B total size of arguments+flags> <4B flags> <4B for each arg> * **************************************************************************************/ int AddFilterProcessFilterEncode(char *ascii_command, int size, char *binary_command) { char *arg, *val, temp[MAX_ARGLEN]; unsigned int event, id, pid; int *intptr, *options_size; unsigned char *byteptr; char *option_flags; strncpy(temp, ascii_command, MAX_ARGLEN); arg = strtok(temp, " "); if (arg) { if (strcasecmp(arg, "addfilter")==0) { binary_command[0] = 8; arg = strtok(NULL, " "); if (arg) { // handler_ID byteptr = (unsigned char *)&binary_command[sizeof(unsigned char)]; *byteptr = (unsigned char)atoi(arg); arg = strtok(NULL, " "); if ((!arg)||(strcasecmp(arg, "process_filter")!=0)) { printf("Internal error"); return 0; } else { binary_command[2*sizeof(unsigned char)] = strlen(arg); strncpy(&binary_command[3*sizeof(unsigned char)], arg, binary_command[2*sizeof(unsigned char)]+1); arg = strtok(NULL, "="); val = strtok(NULL, " "); if (arg) { intptr=(int *) &binary_command[binary_command[2*sizeof(unsigned char)] + 4*sizeof(unsigned char)]; options_size = intptr++; *options_size = sizeof(int); option_flags = (char *)intptr; intptr++; *option_flags = 0; while (arg && val) { if(strcasecmp(arg, "event")==0) { *option_flags = *option_flags|0x80; event = strtoul(val, NULL, 10); } else { if (strcasecmp(arg, "id")==0) { *option_flags = *option_flags|0x40; id = strtoul(val, NULL, 10); } else { if (strcasecmp(arg, "pid")==0) { *option_flags = *option_flags|0x20; pid = strtoul(val, NULL, 10); } else { printf("Unknown option: \"%s\"\n", arg); return 0; } } } *options_size += sizeof(int); arg = strtok(NULL, "="); val = strtok(NULL, " "); } if (arg) { printf("Could not parse option. Ignoring option %s", arg); if (*option_flags == 0) { printf("No options specified"); return 0; } } *options_size = htonl(*options_size); if (*option_flags&0x80) *intptr++ = htonl(event); if (*option_flags&0x40) *intptr++ = htonl(id); if (*option_flags&0x20) *intptr++ = htonl(pid); /* What this translates too is: 1 byte for magnetd command 1 byte for handler id (this will be changed to 4 bytes in the next overhaul of MUSE because handler id should be an int) 1 byte for the length of binary_command[2] binary_command[2] is the length of the filter_name string (minus the null character) 1 byte for the null character 4 bytes for the int which is the length of the arguments struct *options_size is the actual number of bytes for the argument struct */ return (1+1+1+binary_command[2*sizeof(unsigned char)]+1+sizeof(int)+ntohl(*options_size)); //return (htonl(*options_size) + binary_command[1+sizeof(int)]+3+2*sizeof(int)); } else { printf("No options specified"); } } } else { printf("No handler specified"); } } else { printf("Invalid command for process_filter: %s\n" "process_filter is a filter, and should be used only with the ADDFILTER command\n" "\tUsage: ADDFILTER process_filter [pid= ]" " [id=] [event=]", arg); } } else { printf("Internal error. No command received in encode_command"); } return 0; } /*************************************************************************************** * Description : Encode binary code for command addfilter * which wil be sent to Muse server * From : translator.c * Return Value : the number of bytes in binary_command * NOTE : To be used with socket_filter filter. * * Protocol for binary command: * <1B CMD> <1B handlerID> <1B length of filter_name> * <4B total size of arguments+flags> <4B flags> <4B for each arg> * **************************************************************************************/ int AddFilterSocketFilterEncode(char *ascii_command, int size, char *binary_command) { char *arg, *val, temp[MAX_ARGLEN]; unsigned int event, id, pid, sid; int *intptr, *options_size; unsigned char *byteptr; char *option_flags; strncpy(temp, ascii_command, MAX_ARGLEN); arg = strtok(temp, " "); if (arg) { if (strcasecmp(arg, "addfilter")==0) { binary_command[0] = 8; arg = strtok(NULL, " "); if (arg) { byteptr = (unsigned char *)&binary_command[sizeof(unsigned char)]; *byteptr = (unsigned char)atoi(arg); arg = strtok(NULL, " "); if ((!arg)||(strcasecmp(arg, "socket_filter")!=0)) { printf("Internal error"); return 0; } else { binary_command[2*sizeof(unsigned char)] = strlen(arg); strncpy(&binary_command[3*sizeof(unsigned char)], arg, binary_command[2*sizeof(unsigned char)]+1); arg = strtok(NULL, "="); val = strtok(NULL, " "); if (arg) { intptr=(int *) &binary_command[binary_command[2*sizeof(unsigned char)] + 4*sizeof(unsigned char)]; options_size = intptr++; *options_size = sizeof(int); option_flags = (char *)intptr; intptr++; *option_flags = 0; while (arg && val) { if(strcasecmp(arg, "event")==0) { *option_flags = *option_flags|0x80; event = strtoul(val, NULL, 10); } else { if (strcasecmp(arg, "id")==0) { *option_flags = *option_flags|0x40; id = strtoul(val, NULL, 10); } else { if (strcasecmp(arg, "pid")==0) { *option_flags = *option_flags|0x20; pid = strtoul(val, NULL, 10); } else { if (strcasecmp(arg, "sid")==0) { *option_flags = *option_flags|0x10; sid = strtoul(val, NULL, 10); } else { printf("Unknown option: \"%s\"\n", arg); return 0; } } } } *options_size += sizeof(int); arg = strtok(NULL, "="); val = strtok(NULL, " "); } if (arg) { printf("Could not parse option. Ignoring option %s", arg); if (*option_flags == 0) { printf("No options specified"); return 0; } } *options_size = htonl(*options_size); if (*option_flags&0x80) *intptr++ = htonl(event); if (*option_flags&0x40) *intptr++ = htonl(id); if (*option_flags&0x20) *intptr++ = htonl(pid); if (*option_flags&0x10) *intptr++ = htonl(sid); return (4+binary_command[2]+sizeof(int) + ntohl(*options_size)); } else { printf("No options specified"); } } } else { printf("No handler specified"); } } else { printf("Invalid command for socket_filter: %s\n" "socket_filter is a filter, and should be used only with the ADDFILTER command\n" "\tUsage: ADDFILTER socket_filter [pid= sid=]" " [id=] [event=]", arg); } } else { printf("Internal error. No command received in encode_command"); } return 0; } /* EOF */ tau-2.16.4/src/Profile/TauMuseHandlers.cpp000066400000000000000000001041721062343042700203420ustar00rootroot00000000000000/**************************************************************************** * ** TAU Portable Profiling Package ** * ** http://www.cs.uoregon.edu/research/tau ** * ***************************************************************************** * ** Copyright 2003 ** * ** Department of Computer and Information Science, University of Oregon ** * ** Advanced Computing Laboratory, Los Alamos National Laboratory ** * ****************************************************************************/ /*************************************************************************** * ** File : TauMuseHandlers.cpp ** * ** Description : TAU MUSE/MAGNET Interface ** * ** Author : Suravee Suthikulpanit ** * ** Contact : Suravee@cs.uoregon.edu ** * ** Flags : Compile with ** * ** -DTAU_MUSE ** * ****************************************************************************/ #include #include #include #include #include #include #include //#define DEBUG #include #include #if __BYTE_ORDER == __BIG_ENDIAN #define ntohll(x) (x) #define htonll(x) (x) #define ntohd(x) (x) #define htond(x) (x) #else // __BIG_ENDIAN #if __BYTE_ORDER == __LITTLE_ENDIAN #define ntohll(x) bswap_64 (x) #define htonll(x) bswap_64 (x) #define ntohd(x) ntohd_func (x) #define htond(x) htond_func (x) #endif //__BYTE_ORDER = __LITTLE_ENDIAN #endif //__BYTE_ORDER = __BIG_ENDIAN #ifndef bswap_64 #define swap_type(type,a,b) { type t=(a); (a)=(b); (b)=t; } int64_t bswap_64( int64_t n ) { int8_t* p = (int8_t*)&n; swap_type( int8_t, p[0], p[7] ); swap_type( int8_t, p[1], p[6] ); swap_type( int8_t, p[2], p[5] ); swap_type( int8_t, p[3], p[4] ); return n; } #endif /* bswap_64 */ double ntohd_func(double d) { unsigned long long l; l = ntohll(*((long long *)&d)); d = *((double *)&l); return d; } double htond_func(double d) { long long l; l = htonll(*((long long *)&d)); d = *((double *)&l); return d; } ////////////////////////////////////////////////////////////////////////////////////////////////////////// /********************* * Description : Encode binary code for command create * which wil be sent to Muse server * From : translator.c * NOTE : To be used with TAU_count handler *********************/ int CreateTauCountEncode(char *ascii_command, int size, char *binary_command) { char *arg, temp[MAX_ARGLEN]; struct count_handler_input_data *chid; int *args_size_ptr; strncpy(temp, ascii_command, MAX_ARGLEN); arg = strtok(temp, " "); if (arg) { if (strcasecmp(arg, "create")==0) { binary_command[0] = 1; arg = strtok(NULL, " "); if (strcasecmp(arg, "TAU_count")!=0) { printf("Internal error - string count is not in argument from TAU."); return 0; } else { binary_command[1] = strlen(arg); strncpy(&binary_command[2], arg, binary_command[1]+1); args_size_ptr = (int *) &binary_command[binary_command[1]+3]; arg = strtok(NULL, " "); if (arg) { chid = (struct count_handler_input_data *) &binary_command[binary_command[1] + 3 + sizeof(*args_size_ptr)]; chid->fname_size = htonl(strlen(arg)); strncpy(&binary_command[binary_command[1] +sizeof(*args_size_ptr)+ sizeof(*chid)+3], arg, ntohl(chid->fname_size)+1); arg = strtok(NULL, " "); if (arg) chid->fsize = htonl(atoi(arg)); else chid->fsize = 0; } else { chid = (struct count_handler_input_data *) &binary_command[binary_command[1] + 3 + sizeof(*args_size_ptr)]; chid->fname_size = 0; chid->fsize = 0; } *args_size_ptr = htonl(sizeof(*chid) + ntohl(chid->fname_size)); return (3 + binary_command[1] + sizeof(*args_size_ptr) + ntohl(*args_size_ptr)); } }//CREATE else { printf("Invalid command for count: %s\n" "count is a handler, and should be used only with the CREATE command\n" "\tUsage: CREATE count [ []]", arg); return 0; } } else { printf("Internal error: No command given??"); return 0; } } /********************* * Description : Decode binary code received from * MUSE server responding to command query_handler * From : translator.c * NOTE : To be used with TAU_count handler *********************/ double QueryTauCountDecode(const char *binary_command, const char *binary_reply, int size, char *ascii_reply,double data[]){ struct count_handler_return_data *chrd; int *sizeptr; unsigned char *errorptr; /* int i; for (i =0; i < 8; i++) printf("%d ", binary_reply[i]); printf("\n"); */ sizeptr = (int *)binary_reply; errorptr = (unsigned char *) (sizeptr+1); /* error code testing is done by translator.c, but it could be passed in here for specific error codes. */ if(binary_command[0]==3) { chrd = (struct count_handler_return_data *) (errorptr+1); snprintf(ascii_reply, size, "Count: %u\n", ntohl(chrd->count)); } else { printf("TauMuse.cpp: count translator doesn't understand that command yet\n"); return 0; } data[0]=(ntohl(chrd->count)); return(data[0]); } ////////////////////////////////////////////////////////////////////////////////////////////////////////// /********************* * Description : Encode binary code for command create * which wil be sent to Muse server * From : translator.c * NOTE : To be used with process_scheduling handler *********************/ #if 0 int CreateProcessSchedulingEncode(char *ascii_command, int size, char *binary_command) { char *arg, temp[MAX_ARGLEN]; struct process_scheduling_handler_input_data *cuhid; int *args_size_ptr; strncpy(temp, ascii_command, MAX_ARGLEN); arg = strtok(temp, " "); /* printf("ARG:%s\n",arg); */ if (arg) { if (strcasecmp(arg, "create")==0) { binary_command[0] = 1; arg = strtok(NULL, " "); if (strcasecmp(arg, "process_scheduling")!=0) { printf("Internal error"); return 0; } else { /* save length of handler string */ binary_command[1] = strlen(arg); /* copy handler string into buffer */ strncpy(&binary_command[2], arg, binary_command[1]+1); /* get position of where size of struct input_data goes */ args_size_ptr = (int *) &binary_command[binary_command[1]+3]; /* start input_data struct at position in buffer */ *args_size_ptr = htonl(0); return (3 + binary_command[1] + sizeof(*args_size_ptr)); } } else { printf("Invalid command for cpu_usage: %s\n" "cpu_usage is a handler, and should be used only with the CREATE command\n" "\tUsage: CREATE cpu_usage", arg); return 0; } } else { printf("Internal error: No command given??"); return 0; } } #endif // A new one from JEREMY int CreateProcessSchedulingEncode(char *ascii_command, int size, char *binary_command) { //********************************************************* //ENCODING: byte 0 <1> // byte 1 <18> // byte 3+ // byte 21 // byte 22 // byte 26 // byte 30 // byte 34 //********************************************************* char *arg, *val, temp[MAX_ARGLEN]; unsigned int event, id, pid, sid; int *intptr, *options_size; unsigned char *byteptr; char *option_flags; strncpy(temp, ascii_command, MAX_ARGLEN); arg = strtok(temp, " "); if (arg) { if (strcasecmp(arg, "create")==0) { binary_command[0] = 1; arg = strtok(NULL, " "); if (arg) { if ((!arg)||(strncasecmp(arg, "process_scheduling",18)!=0)) { printf("Internal error arg=%s",arg); return 0; } else { binary_command[1] = strlen(arg); strncpy(&binary_command[2], arg, binary_command[1]+1); arg = strtok(NULL, "="); val = strtok(NULL, " "); if (arg) { intptr=(int *) &binary_command[binary_command[1] + 3]; options_size = intptr++; *options_size = sizeof(int); option_flags = (char *)intptr; printf("DEBUG: addr of intptr = %x\n",intptr); intptr++; printf("DEBUG: addr of intptr = %x\n",intptr); *option_flags = 0; while (arg && val) { if (strcasecmp(arg, "pid")==0) { *option_flags = *option_flags|0x20; pid = strtoul(val, NULL, 10); } else { printf("Unknown option: \"%s\"\n", arg); return 0; } *options_size += sizeof(int); arg = strtok(NULL, "="); val = strtok(NULL, " "); } if (arg) { printf("Could not parse option. Ignoring option %s", arg); if (*option_flags == 0) { printf("No options specified"); return 0; } } *options_size = htonl(*options_size); if (*option_flags&0x20) *intptr++ = htonl(pid); return (4+binary_command[1]+sizeof(int) + ntohl(*options_size)); } else { intptr=(int *) &binary_command[binary_command[1] + 3]; options_size = intptr++; *options_size = htonl(0); //*options_size = 2*sizeof(int); //option_flags = (char *)intptr; //intptr++; //*option_flags = 0; //*options_size = htonl(*options_size); //*intptr++ = htonl(pid); return (4+binary_command[2]+sizeof(int) + ntohl(*options_size)); } } } else { printf("No handler specified"); } } else { printf("This is not create command.\n"); } } else { printf("Internal error. No command received in encode_command"); } return 0; } /********************* * Description : Decode binary code received from * MUSE server responding to command query_handler * From : translator.c * NOTE : To be used with process_scheduling handler *********************/ double QueryProcessSchedulingDecode(const char *binary_command, const char *binary_reply, int size, char *ascii_reply,double data[]){ struct process_scheduling_handler_return_data *cuhrd; int *sizeptr; unsigned char *errorptr; double idleper, busyper, schedper, errorper; double midle, mbusy[MAXNUMOFCPU], msched[MAXNUMOFCPU], merror, mtotal; double cpu_busy_time_sec[MAXNUMOFCPU]; double cpu_sched_time_sec[MAXNUMOFCPU]; double total_time_sec; double cpu_speed; unsigned int numofcpu; double numofcontextswitch[MAXNUMOFCPU]; int i; char *package; char ascii_reply_ext[1024]; sizeptr = (int *)binary_reply; errorptr = (unsigned char *) (sizeptr+1); /* error code testing is done by translator.c, but it could be passed in here for specific error codes. */ if(binary_command[0]==3) { cuhrd = (struct process_scheduling_handler_return_data *) (errorptr+1); cpu_speed = (double)ntohll(cuhrd->cpu_speed); mtotal = (double)ntohll(cuhrd->total_time); total_time_sec = (double)(mtotal/cpu_speed); numofcpu = ntohs(cuhrd->numofcpu); #ifdef DEBUG printf("DEBUG: cpu_speed=%10.10f\n",cpu_speed); printf("DEBUG: numofcpu = %u\n",numofcpu); printf("DEBUG: total_time = %15.f\n",mtotal); printf("DEBUG: total_time_sec = %10.10f\n",total_time_sec); #endif //DEBUG snprintf(ascii_reply, size, "total_time(sec): %10.10f\n", total_time_sec); for(i=0;istat[i].numofcontextswitch); mbusy[i] = (double)ntohll(cuhrd->stat[i].time_busy); busyper = mbusy[i] / mtotal; cpu_busy_time_sec[i] = (double)(mbusy[i]/cpu_speed); msched[i] = (double)ntohll(cuhrd->stat[i].time_sched); schedper = msched[i] / mtotal; cpu_sched_time_sec[i] = (double)(msched[i]/cpu_speed); #ifdef DEBUG printf("DEBUG: numofcontextswitch[%d] = %f\n",i,numofcontextswitch[i]); printf("DEBUG: mbusy[%d] = %15.f\n",i,mbusy[i]); printf("DEBUG: cpu_busy_time_sec = %10.10f\n",cpu_busy_time_sec[i]); printf("DEBUG: msched[%d] = %15.f\n",i,msched[i]); printf("DEBUG: cpu_sched_time_sec = %10.10f\n",cpu_sched_time_sec[i]); #endif //DEBUG /* //for FUTURE merror = (double)ntohll(cuhrd->stat[i].error_time); errorper = merror / mtotal; midle = (double)ntohll(cuhrd->stat[i].idle_time); idleper = midle / mtotal; */ sprintf(ascii_reply_ext,"numofcontextswitch[%d] : %10.10f\ntime_busy[%d](sec) : %10.10f\ntime_sched[%d](sec): %10.10f\n", i,numofcontextswitch[i], i,cpu_busy_time_sec[i], i,cpu_sched_time_sec[i]); strncat(ascii_reply,ascii_reply_ext,size); } strncat(ascii_reply,"\n",size); #ifdef DEBUG printf("DEBUG: ascii_reply\n%s",ascii_reply); #endif //DEBUG } else { printf("cpu_usage translator doesn't understand that command yet\n"); return 0 ; } #if (defined(TAU_MUSE)||defined(TAU_MUSE_EVENT)) data[0]=0.0; package=getenv("TAU_MUSE_PACKAGE"); // RETURN SINGLE DOUBLE VALUE // This result varies according to the TAU_MUSE_PACKAGE if(!strcmp(package,"busy_time")){ // Returning busy time msec for(i=0;i * NOTE : To be used with bandwidth handler *********************/ int CreateBandwidthEncode(char *ascii_command, int size, char *binary_command) { char *arg, temp[MAX_ARGLEN]; struct bandwidth_handler_input_data *bhid; int *args_size_ptr; strncpy(temp, ascii_command, MAX_ARGLEN); arg = strtok(temp, " "); if (arg) { if (strcasecmp(arg, "create")==0) { binary_command[0] = 1; arg = strtok(NULL, " "); if (strcasecmp(arg, "bandwidth")!=0) { printf("Internal error"); return 0; } else { binary_command[1] = strlen(arg); strncpy(&binary_command[2], arg, binary_command[1]+1); arg = strtok(NULL, " "); if (arg) { args_size_ptr = (int *) &binary_command[binary_command[1]+3]; bhid = (struct bandwidth_handler_input_data *) &binary_command[binary_command[1] + 3 + sizeof(*args_size_ptr)]; bhid->delta_time = htond(atof(arg)); arg = strtok(NULL, " "); if (arg) { bhid->fname_size = htonl(strlen(arg)); strncpy(&binary_command[binary_command[1] +3*sizeof(int)+sizeof(double)+3], arg, ntohl(bhid->fname_size)+1); arg = strtok(NULL, " "); if (arg) bhid->fsize = htonl(atoi(arg)); else bhid->fsize = 0; } else { bhid->fname_size = 0; bhid->fsize = 0; } *args_size_ptr = htonl(sizeof(struct bandwidth_handler_input_data) + ntohl(bhid->fname_size)); return (3 + binary_command[1] + sizeof(*args_size_ptr) + ntohl(*args_size_ptr)); } else { printf("You must specify delta_time (type \"help bandwidth\" for usage)"); return 0; } } }//CREATE else { printf("Invalid command for bandwidth: %s\n" "bandwidth is a handler, and should be used only with the CREATE command\n" "\tUsage: CREATE bandwidth [ []]", arg); return 0; } } else { printf("Internal error: No command given??"); return 0; } } /********************* * Description : Decode binary code received from * MUSE server responding to command query_handler * From : translator.c * NOTE : To be used with bandwidth handler *********************/ double QueryBandwidthDecode(const char *binary_command, const char *binary_reply, int size, char *ascii_reply,double data[]) { struct bandwidth_handler_return_data *bhrd; int *sizeptr; unsigned char *errorptr; sizeptr = (int *)binary_reply; errorptr = (unsigned char *)(sizeptr + 1); if(binary_command[0]==3) { bhrd = (struct bandwidth_handler_return_data *) (errorptr + 1); snprintf(ascii_reply, size, "Block #: %u\t\tStart time: %f\t\tLost: %u\n" "Send: Average: %f\t\tRecent: %f\n" "Recv: Average: %f\t\tRecent: %f\n", ntohl(bhrd->block_id), ntohd(bhrd->block_start_time), ntohl(bhrd->lost_events), ntohd(bhrd->send_average_bandwidth), ntohd(bhrd->send_recent_bandwidth), ntohd(bhrd->recv_average_bandwidth), ntohd(bhrd->recv_recent_bandwidth)); #ifdef DEBUG printf("DEBUG: ascii_reply\n%s",ascii_reply); #endif //DEBUG } else { printf("bandwidth translator doesn't understand that command yet\n"); return 0; } data[0]=ntohd(bhrd->recv_average_bandwidth); data[1]=ntohd(bhrd->send_average_bandwidth); return data[0]; } ////////////////////////////////////////////////////////////////////////////////////////////////////////// /********************* * Description : Encode binary code for command create * which wil be sent to Muse server * From : translator.c * NOTE : To be used with tcpbandwidth handler *********************/ int CreateTcpBandwidthEncode(char *ascii_command, int size, char *binary_command) { char *arg, temp[MAX_ARGLEN]; struct tcpbandwidth_handler_input_data *bhid; int *args_size_ptr; strncpy(temp, ascii_command, MAX_ARGLEN); arg = strtok(temp, " "); if (arg) { if (strcasecmp(arg, "create")==0) { binary_command[0] = 1; arg = strtok(NULL, " "); if (strcasecmp(arg, "tcpbandwidth")!=0) { printf("Internal error"); return 0; } else { binary_command[1] = strlen(arg); strncpy(&binary_command[2], arg, binary_command[1]+1); arg = strtok(NULL, " "); if (arg) { args_size_ptr = (int *) &binary_command[binary_command[1]+3]; bhid = (struct tcpbandwidth_handler_input_data *) &binary_command[binary_command[1] + 3 + sizeof(*args_size_ptr)]; bhid->delta_time = htond(atof(arg)); arg = strtok(NULL, " "); if (arg) { bhid->fname_size = htonl(strlen(arg)); strncpy(&binary_command[binary_command[1] +3*sizeof(int)+sizeof(double)+3], arg, ntohl(bhid->fname_size)+1); arg = strtok(NULL, " "); if (arg) bhid->fsize = htonl(atoi(arg)); else bhid->fsize = 0; } else { bhid->fname_size = 0; bhid->fsize = 0; } *args_size_ptr = htonl(sizeof(struct tcpbandwidth_handler_input_data) + ntohl(bhid->fname_size)); return (3 + binary_command[1] + sizeof(*args_size_ptr) + ntohl(*args_size_ptr)); } else { printf("You must specify delta_time (type \"help tcpbandwidth\" for usage)"); return 0; } } }//CREATE else { printf("Invalid command for tcpbandwidth: %s\n" "tcpbandwidth is a handler, and should be used only with the CREATE command\n" "\tUsage: CREATE tcpbandwidth [ []]", arg); return 0; } } else { printf("Internal error: No command given??"); return 0; } } /********************* * Description : Decode binary code received from * MUSE server responding to command query_handler * From : translator.c * NOTE : To be used with tcpbandwidth handler *********************/ double QueryTcpBandwidthDecode(const char *binary_command, const char *binary_reply, int size, char *ascii_reply,double data[]) { struct tcpbandwidth_handler_return_data *bhrd; int *sizeptr; unsigned char *errorptr; sizeptr = (int *)binary_reply; errorptr = (unsigned char *)(sizeptr + 1); if(binary_command[0]==3) { bhrd = (struct tcpbandwidth_handler_return_data *) (errorptr + 1); snprintf(ascii_reply, size, "Block #: %u\t\tStart time: %f\t\tLost: %u\n" "Send: Average: %f\t\tRecent: %f\n" "Recv: Average: %f\t\tRecent: %f\n", ntohl(bhrd->block_id), ntohd(bhrd->block_start_time), ntohl(bhrd->lost_events), ntohd(bhrd->send_average_bandwidth), ntohd(bhrd->send_recent_bandwidth), ntohd(bhrd->recv_average_bandwidth), ntohd(bhrd->recv_recent_bandwidth)); } else { printf("tcpbandwidth translator doesn't understand that command yet\n"); return 0; } data[0]=ntohd(bhrd->recv_average_bandwidth); data[1]=ntohd(bhrd->send_average_bandwidth); return data[0]; } ////////////////////////////////////////////////////////////////////////////////////////////////////////// /********************* * Description : Encode binary code for command create * which wil be sent to Muse server * From : translator.c * NOTE : To be used with accumulator handler *********************/ int CreateAccumulatorEncode(char *ascii_command, int size, char *binary_command) { char *arg, temp[MAX_ARGLEN]; struct accumulator_handler_input_data *ahid; int *args_size_ptr; strncpy(temp, ascii_command, MAX_ARGLEN); arg = strtok(temp, " "); if (arg) { if (strcasecmp(arg, "create")==0) { binary_command[0] = 1; arg = strtok(NULL, " "); if (strcasecmp(arg, "accumulator")!=0) { printf("Internal error"); return 0; } else { binary_command[1] = strlen(arg); strncpy(&binary_command[2], arg, binary_command[1]+1); args_size_ptr = (int *) &binary_command[binary_command[1]+3]; arg = strtok(NULL, " "); if (arg) { // there are no args to accumulator now } else { // there are no args to accumulator now } *args_size_ptr = htonl(sizeof(*ahid)); return (3 + binary_command[1] + sizeof(*args_size_ptr) + ntohl(*args_size_ptr)); } }//CREATE else { printf("Invalid command for accumulator: %s\n" "accumulator is a handler, and should be used only with the CREATE command\n" "\tUsage: CREATE accumulator", arg); return 0; } } else { printf("Internal error: No command given??"); return 0; } } /********************* * Description : Decode binary code received from * MUSE server responding to command query_handler * From : translator.c * NOTE : To be used with accumulator handler *********************/ double QueryAccumulatorDecode(const char *binary_command, const char *binary_reply, int size, char *ascii_reply,double data[]) { struct accumulator_handler_return_data *ahrd; int *sizeptr; unsigned char *errorptr; unsigned long long result; /* int i; for (i =0; i < 8; i++) printf("%d ", binary_reply[i]); printf("\n"); */ sizeptr = (int *)binary_reply; errorptr = (unsigned char *) (sizeptr+1); /* error code testing is done by translator.c, but it could be passed in here for specific error codes. */ if(binary_command[0]==3) { ahrd = (struct accumulator_handler_return_data *) (errorptr+1); snprintf(ascii_reply, size, "Accumulated: %llu\n",(unsigned long long) ntohll(ahrd->sum)); result=(unsigned long long)ntohll(ahrd->sum); data[0]=result; } else { printf("accumulator translator doesn't understand that command yet\n"); return 0; } return result; } /* EOF */ tau-2.16.4/src/Profile/TauMusePackages.cpp000066400000000000000000000462131062343042700203210ustar00rootroot00000000000000/**************************************************************************** * ** TAU Portable Profiling Package ** * ** http://www.cs.uoregon.edu/research/tau ** * ***************************************************************************** * ** Copyright 2003 ** * ** Department of Computer and Information Science, University of Oregon ** * ** Advanced Computing Laboratory, Los Alamos National Laboratory ** * ****************************************************************************/ /*************************************************************************** * ** File : TauMusePackage.cpp ** * ** Description : TAU MUSE/MAGNET Interface ** * ** Author : Suravee Suthikulpanit ** * ** Contact : Suravee@cs.uoregon.edu ** * ** Flags : Compile with ** * ** -DTAU_MUSE ** * ****************************************************************************/ #include #include #include #include #include #include #ifdef TAU_MUSE_EVENT /* // FOR TESTING TAU_REGISTER_EVENT(bandwidth_recv,"bandwidth_recv"); TAU_REGISTER_EVENT(bandwidth_send,"bandwidth_send"); TAU_REGISTER_EVENT(tcpbandwidth_recv,"tcpbandwidth_recv"); TAU_REGISTER_EVENT(tcpbandwidth_send,"tcpbandwidth_send"); TAU_REGISTER_EVENT(accumulator_sock_send,"accumulator_sock_send"); TAU_REGISTER_EVENT(accumulator_sock_recv,"accumulator_sock_recv"); */ #endif //TAU_MUSE_EVENT // This function choose the appropriate create_encoder for the handler. int create_encode_selector(char *handler_name,char *ascii_command,int size, char *binary_command){ if(!strncmp("TAU_count",handler_name,9)){ return CreateTauCountEncode(ascii_command,size,binary_command); }else if(!strncmp("process_scheduling",handler_name,18)){ return CreateProcessSchedulingEncode(ascii_command,size,binary_command); }else if(!strncmp("accumulator",handler_name,11)){ return CreateAccumulatorEncode(ascii_command,size,binary_command); }else if(!strncmp("bandwidth",handler_name,9)){ return CreateBandwidthEncode(ascii_command,size,binary_command); }else if(!strncmp("tcpbandwidth",handler_name,12)){ return CreateTcpBandwidthEncode(ascii_command,size,binary_command); }else{ return -1 ; } } // This function choose the appropriate query_decoder for the handler. double query_decode_selector(char *handler_name, const char *binary_command, const char *binary_reply, int size, char *ascii_reply, double data[]){ if(!strncmp("TAU_count",handler_name,9)){ return QueryTauCountDecode(binary_command,binary_reply,size,ascii_reply,data); }else if(!strncmp("process_scheduling",handler_name,18)){ return QueryProcessSchedulingDecode(binary_command,binary_reply,size,ascii_reply,data); }else if(!strncmp("accumulator",handler_name,11)){ return QueryAccumulatorDecode(binary_command,binary_reply,size,ascii_reply,data); }else if(!strncmp("bandwidth",handler_name,9)){ return QueryBandwidthDecode(binary_command,binary_reply,size,ascii_reply,data); }else if(!strncmp("tcpbandwidth",handler_name,12)){ return QueryTcpBandwidthDecode(binary_command,binary_reply,size,ascii_reply,data); }else{ return -1 ; } } // This function choose the appropriate addfilter_encoder. int addfilter_encode_selector(char *filter_name,char *ascii_command,int size, char *binary_command){ if(!strcmp("process_filter",filter_name)){ return AddFilterProcessFilterEncode(ascii_command,size,binary_command); }else if(!strcmp("socket_filter",filter_name)){ return AddFilterSocketFilterEncode(ascii_command,size,binary_command); }else{ return -1 ; } } // FOR TESTING #ifdef TAU_MUSE_EVENT /* int report_user_defined_events(double data[]){ char *metrics[10]; int sizeofMetrics,i; for(i=0;i<10;i++) metrics[i]=(char*)malloc(100); sizeofMetrics=TauMuseGetMetricsNonMono(metrics,10); printf("sizeofMetrics = %d\n",sizeofMetrics); for(i=0;ipackage_name)){ pkg->numofhandlers=1; pkg->totalcounters=1; pkg->handlers[0].numoffilters=1; pkg->handlers[0].numofcounters=1; pkg->handlers[0].filters[0].filter_argc=1; strcpy((char*)&pkg->handlers[0].metrics[0].info,"count"); sprintf(pkg->handlers[0].handler_name,"TAU_count"); memset(pkg->handlers[0].filters[0].args[0],0,100); sprintf(pkg->handlers[0].filters[0].args[0],"process_filter pid=%d",getpid()); #ifdef DEBUG_PROF printf("args: %s\n",pkg->handlers[0].filters[0].args[0]); #endif return TauMuseCreate(pkg); } //***************************************** // Package : busy_time //***************************************** else if(!strcmp("busy_time",pkg->package_name)){ pkg->numofhandlers=1; pkg->totalcounters=1; pkg->handlers[0].numoffilters=1; pkg->handlers[0].numofcounters=1; pkg->handlers[0].filters[0].filter_argc=2; strcpy((char*)&pkg->handlers[0].metrics[0].info,"busy_time"); sprintf(pkg->handlers[0].handler_name,"process_scheduling"); memset(pkg->handlers[0].filters[0].args[0],0,100); sprintf(pkg->handlers[0].filters[0].args[0],"process_filter pid=%d event=258",getpid()); memset(pkg->handlers[0].filters[0].args[1],0,100); sprintf(pkg->handlers[0].filters[0].args[1],"process_filter pid=%d event=259",getpid()); #ifdef DEBUG_PROF printf("args: %s\n",pkg->handlers[0].filters[0].args[0]); printf("args: %s\n",pkg->handlers[0].filters[0].args[1]); #endif return TauMuseCreate(pkg); } //***************************************** // Package : idle_time //***************************************** else if(!strcmp("idle_time",pkg->package_name)){ pkg->numofhandlers=1; pkg->totalcounters=1; pkg->handlers[0].numoffilters=1; pkg->handlers[0].numofcounters=1; pkg->handlers[0].filters[0].filter_argc=2; strcpy((char*)&pkg->handlers[0].metrics[0].info,"idle_time"); sprintf(pkg->handlers[0].handler_name,"process_scheduling"); memset(pkg->handlers[0].filters[0].args[0],0,100); // This is to instrument MAGNET_TASK_CTX_IN for pid=0 sprintf(pkg->handlers[0].filters[0].args[0],"process_filter pid=0 event=258"); memset(pkg->handlers[0].filters[0].args[1],0,100); // This is to instrument MAGNET_TASK_CTX_OUT for pid=0 sprintf(pkg->handlers[0].filters[0].args[1],"process_filter pid=0 event=259"); #ifdef DEBUG_PROF printf("args: %s\n",pkg->handlers[0].filters[0].args[0]); printf("args: %s\n",pkg->handlers[0].filters[0].args[1]); #endif return TauMuseCreate(pkg); } //***************************************** // Package : total_time //***************************************** else if(!strcmp("total_time",pkg->package_name)){ pkg->numofhandlers=1; pkg->totalcounters=1; pkg->handlers[0].numoffilters=1; pkg->handlers[0].numofcounters=1; pkg->handlers[0].filters[0].filter_argc=2; strcpy((char*)&pkg->handlers[0].metrics[0].info,"total_time"); sprintf(pkg->handlers[0].handler_name,"process_scheduling"); memset(pkg->handlers[0].filters[0].args[0],0,100); sprintf(pkg->handlers[0].filters[0].args[0],"process_filter pid=%d event=258",getpid()); memset(pkg->handlers[0].filters[0].args[1],0,100); sprintf(pkg->handlers[0].filters[0].args[1],"process_filter pid=%d event=259",getpid()); #ifdef DEBUG_PROF printf("args: %s\n",pkg->handlers[0].filters[0].args[0]); printf("args: %s\n",pkg->handlers[0].filters[0].args[1]); #endif return TauMuseCreate(pkg); } //***************************************** // Package : total_time_debug // NOTE: This is a hack version for Jeremy //***************************************** else if(!strcmp("total_time_debug",pkg->package_name)){ pkg->numofhandlers=1; pkg->totalcounters=1; pkg->handlers[0].numoffilters=1; pkg->handlers[0].numofcounters=1; pkg->handlers[0].filters[0].filter_argc=2; strcpy((char*)&pkg->handlers[0].metrics[0].info,"total_time_debug"); sprintf(pkg->handlers[0].handler_name,"process_scheduling pid=%d",getpid()); memset(pkg->handlers[0].filters[0].args[0],0,100); sprintf(pkg->handlers[0].filters[0].args[0],"process_filter event=258"); memset(pkg->handlers[0].filters[0].args[1],0,100); sprintf(pkg->handlers[0].filters[0].args[1],"process_filter event=259"); #ifdef DEBUG_PROF printf("args: %s\n",pkg->handlers[0].filters[0].args[0]); printf("args: %s\n",pkg->handlers[0].filters[0].args[1]); #endif return TauMuseCreate(pkg); } //***************************************** // Package : context_switch //***************************************** else if(!strcmp("context_switch",pkg->package_name)){ pkg->numofhandlers=1; pkg->totalcounters=1; pkg->handlers[0].numoffilters=1; pkg->handlers[0].numofcounters=1; pkg->handlers[0].filters[0].filter_argc=2; strcpy((char*)&pkg->handlers[0].metrics[0].info,"context_switch"); sprintf(pkg->handlers[0].handler_name,"process_scheduling"); memset(pkg->handlers[0].filters[0].args[0],0,100); sprintf(pkg->handlers[0].filters[0].args[0],"process_filter pid=%d event=258",getpid()); memset(pkg->handlers[0].filters[0].args[1],0,100); sprintf(pkg->handlers[0].filters[0].args[1],"process_filter pid=%d event=259",getpid()); #ifdef DEBUG_PROF printf("args: %s\n",pkg->handlers[0].filters[0].args[0]); printf("args: %s\n",pkg->handlers[0].filters[0].args[1]); #endif return TauMuseCreate(pkg); } //***************************************** // Package : accumulator_sock_send //***************************************** else if(!strcmp("accumulator_sock_send",pkg->package_name)){ pkg->numofhandlers=1; pkg->totalcounters=1; // handler[0] pkg->handlers[0].numoffilters=1; pkg->handlers[0].numofcounters=1; pkg->handlers[0].filters[0].filter_argc=1; strcpy((char*)&pkg->handlers[0].metrics[0].info,"accumulator_sock_send"); sprintf(pkg->handlers[0].handler_name,"accumulator"); memset(pkg->handlers[0].filters[0].args[0],0,100); sprintf(pkg->handlers[0].filters[0].args[0],"socket_filter pid=%d event=3",getpid()); #ifdef DEBUG_PROF printf("args: %s\n",pkg->handlers[0].filters[0].args[0]); #endif return TauMuseCreate(pkg); } //***************************************** // Package : accumulator_sock_recv //***************************************** else if(!strcmp("accumulator_sock_recv",pkg->package_name)){ pkg->numofhandlers=1; pkg->totalcounters=1; // handler[0] pkg->handlers[0].numoffilters=1; pkg->handlers[0].numofcounters=1; pkg->handlers[0].filters[0].filter_argc=1; strcpy((char*)&pkg->handlers[0].metrics[0].info,"accumulator_sock_recv"); sprintf(pkg->handlers[0].handler_name,"accumulator"); memset(pkg->handlers[0].filters[0].args[0],0,100); sprintf(pkg->handlers[0].filters[0].args[0],"socket_filter pid=%d event=4",getpid()); #ifdef DEBUG_PROF printf("args: %s\n",pkg->handlers[0].filters[0].args[0]); #endif return TauMuseCreate(pkg); } //***************************************** // Package : Default //***************************************** else{ pkg->numofhandlers=1; pkg->totalcounters=1; pkg->handlers[0].numoffilters=1; pkg->handlers[0].numofcounters=1; pkg->handlers[0].filters[0].filter_argc=1; strcpy((char*)&pkg->handlers[0].metrics[0].info,"count"); sprintf(pkg->handlers[0].handler_name,"TAU_count"); memset(pkg->handlers[0].filters[0].args[0],0,100); sprintf(pkg->handlers[0].filters[0].args[0],"process_filter pid=%d",getpid()); #ifdef DEBUG_PROF printf("args: %s\n",pkg->handlers[0].filters[0].args[0]); #endif return TauMuseCreate(pkg); } return 0; } //================================================= // THIS IS FOR NON-MONOTONICALLY INCREASING VALUE //================================================= int nonmonotonic_package_selector(struct package_info *pkg){ //***************************************** // Package : bandwidth //***************************************** if(!strcmp("bandwidth",pkg->package_name)){ pkg->numofhandlers=1; pkg->totalcounters=2; pkg->handlers[0].numoffilters=1; pkg->handlers[0].numofcounters=2; pkg->handlers[0].filters[0].filter_argc=1; strcpy((char*)&pkg->handlers[0].metrics[0].info,"bandwidth_recv"); strcpy((char*)&pkg->handlers[0].metrics[1].info,"bandwidth_send"); // NOTE: // "bandwidth 1" means creating bandwidth // handler with delta time = 1 sprintf(pkg->handlers[0].handler_name,"bandwidth 1"); memset(pkg->handlers[0].filters[0].args[0],0,100); sprintf(pkg->handlers[0].filters[0].args[0],"socket_filter pid=%d",getpid()); #ifdef DEBUG_PROF printf("args: %s\n",pkg->handlers[0].filters[0].args[0]); #endif return TauMuseCreate(pkg); } //***************************************** // Package : tcpbandwidth //***************************************** else if(!strcmp("tcpbandwidth",pkg->package_name)){ pkg->numofhandlers=1; pkg->totalcounters=2; pkg->handlers[0].numoffilters=1; pkg->handlers[0].numofcounters=2; pkg->handlers[0].filters[0].filter_argc=1; strcpy((char*)&pkg->handlers[0].metrics[0].info,"tcpbandwidth_recv"); strcpy((char*)&pkg->handlers[0].metrics[1].info,"tcpbandwidth_send"); // NOTE: // "bandwidth 1" means creating bandwidth // handler with delta time = 1 sprintf(pkg->handlers[0].handler_name,"tcpbandwidth 1"); memset(pkg->handlers[0].filters[0].args[0],0,100); sprintf(pkg->handlers[0].filters[0].args[0],"socket_filter pid=%d",getpid()); #ifdef DEBUG_PROF printf("args: %s\n",pkg->handlers[0].filters[0].args[0]); #endif return TauMuseCreate(pkg); } //***************************************** // Package : accumulator_sock_send_recv // Note This is a hack version for testing. //***************************************** else if(!strcmp("accumulator_sock_send_recv",pkg->package_name)){ pkg->numofhandlers=2; pkg->totalcounters=2; strcpy((char*)&pkg->handlers[0].metrics[0].info,"accumulator_sock_send"); strcpy((char*)&pkg->handlers[1].metrics[0].info,"accumulator_sock_recv"); // handler[0] pkg->handlers[0].numoffilters=1; pkg->handlers[0].numofcounters=1; pkg->handlers[0].filters[0].filter_argc=1; sprintf(pkg->handlers[0].handler_name,"accumulator"); memset(pkg->handlers[0].filters[0].args[0],0,100); sprintf(pkg->handlers[0].filters[0].args[0],"process_filter event=3"); // handler[1] pkg->handlers[1].numoffilters=1; pkg->handlers[1].numofcounters=1; pkg->handlers[1].filters[0].filter_argc=1; sprintf(pkg->handlers[1].handler_name,"accumulator"); memset(pkg->handlers[1].filters[0].args[0],0,100); sprintf(pkg->handlers[1].filters[0].args[0],"process_filter event=4"); #ifdef DEBUG_PROF printf("args: %s\n",pkg->handlers[0].filters[0].args[0]); printf("args: %s\n",pkg->handlers[1].filters[0].args[0]); #endif return TauMuseCreate(pkg); } //***************************************** // Package : Default //***************************************** else{ pkg->numofhandlers=1; pkg->totalcounters=2; pkg->handlers[0].numoffilters=1; pkg->handlers[0].numofcounters=2; pkg->handlers[0].filters[0].filter_argc=1; strcpy((char*)&pkg->handlers[0].metrics[0].info,"bandwidth_recv"); strcpy((char*)&pkg->handlers[0].metrics[1].info,"bandwidth_send"); // NOTE: // "bandwidth 1" means creating bandwidth // handler with delta time = 1 sprintf(pkg->handlers[0].handler_name,"bandwidth 1"); memset(pkg->handlers[0].filters[0].args[0],0,100); sprintf(pkg->handlers[0].filters[0].args[0],"socket_filter pid=%d",getpid()); #ifdef DEBUG_PROF printf("args: %s\n",pkg->handlers[0].filters[0].args[0]); #endif return TauMuseCreate(pkg); } } #if 0 //====================================================== // THIS IS FOR MULTIPLE MONOTONICALLY INCREASING VALUES //====================================================== #ifdef TAU_MUSE_MULTIPLE //***************************************** // Package : accumulator_sock_send_recv //***************************************** if(!strcmp("accumulator_sock_send_recv",pkg->package_name)){ pkg->numofhandlers=2; pkg->totalcounters=2; // handler[0] pkg->handlers[0].numoffilters=1; pkg->handlers[0].numofcounters=1; pkg->handlers[0].filters[0].filter_argc=1; sprintf(pkg->handlers[0].handler_name,"accumulator"); memset(pkg->handlers[0].filters[0].args[0],0,100); sprintf(pkg->handlers[0].filters[0].args[0],"process_filter event=3"); // handler[1] pkg->handlers[1].numoffilters=1; pkg->handlers[1].numofcounters=1; pkg->handlers[1].filters[0].filter_argc=1; sprintf(pkg->handlers[1].handler_name,"accumulator"); memset(pkg->handlers[1].filters[0].args[0],0,100); sprintf(pkg->handlers[1].filters[0].args[0],"process_filter event=4"); #ifdef DEBUG_PROF printf("args: %s\n",pkg->handlers[0].filters[0].args[0]); printf("args: %s\n",pkg->handlers[1].filters[0].args[0]); #endif return TauMuseCreate(); } //***************************************** // Package : Default //***************************************** else{ pkg->numofhandlers=2; pkg->totalcounters=2; // handler[0] pkg->handlers[0].numoffilters=1; pkg->handlers[0].numofcounters=1; pkg->handlers[0].filters[0].filter_argc=1; sprintf(pkg->handlers[0].handler_name,"accumulator"); memset(pkg->handlers[0].filters[0].args[0],0,100); sprintf(pkg->handlers[0].filters[0].args[0],"process_filter event=3"); // handler[1] pkg->handlers[1].numoffilters=1; pkg->handlers[1].numofcounters=1; pkg->handlers[1].filters[0].filter_argc=1; sprintf(pkg->handlers[1].handler_name,"accumulator"); memset(pkg->handlers[1].filters[0].args[0],0,100); sprintf(pkg->handlers[1].filters[0].args[0],"process_filter event=4"); #ifdef DEBUG_PROF printf("args: %s\n",pkg->handlers[0].filters[0].args[0]); printf("args: %s\n",pkg->handlers[1].filters[0].args[0]); #endif return TauMuseCreate(); } #endif //TAU_MUSE_MULTIPLE } #endif // 0 tau-2.16.4/src/Profile/TauOpari.cpp000066400000000000000000000731201062343042700170200ustar00rootroot00000000000000/*************************************************************************/ /* TAU OPARI Layer */ /* Copyright (C) 2001 */ /* University of Oregon, Los Alamos National Laboratory, and */ /* Forschungszentrum Juelich, Zentralinstitut fuer Angewandte Mathematik */ /*************************************************************************/ #include #include //#define DEBUG_PROF 1 #include #ifdef TAU_OPENMP #ifndef _OPENMP #define _OPENMP #endif /* _OPENMP */ #endif /* TAU_OPENMP */ #include "pomp_lib.h" /* These two defines specify if we want region based views or construct based views or both */ #ifdef TAU_OPARI_REGION #define TAU_OPENMP_REGION_VIEW #elif TAU_OPARI_CONSTRUCT #define TAU_AGGREGATE_OPENMP_TIMINGS #else #define TAU_AGGREGATE_OPENMP_TIMINGS #define TAU_OPENMP_REGION_VIEW #endif /* in the default mode, define both! */ #define OpenMP TAU_USER #define TAU_EMBEDDED_MAPPING 1 omp_lock_t tau_ompregdescr_lock; TAU_GLOBAL_TIMER(tatomic, "atomic enter/exit", "[OpenMP]", OpenMP); TAU_GLOBAL_TIMER(tbarrier, "barrier enter/exit", "[OpenMP]", OpenMP); TAU_GLOBAL_TIMER(tcriticalb, "critical begin/end", "[OpenMP]", OpenMP); TAU_GLOBAL_TIMER(tcriticale, "critical enter/exit", "[OpenMP]", OpenMP); TAU_GLOBAL_TIMER(tfor, "for enter/exit", "[OpenMP]", OpenMP); TAU_GLOBAL_TIMER(tmaster, "master begin/end", "[OpenMP]", OpenMP); TAU_GLOBAL_TIMER(tparallelb, "parallel begin/end", "[OpenMP]", OpenMP); TAU_GLOBAL_TIMER(tparallelf, "parallel fork/join", "[OpenMP]", OpenMP); TAU_GLOBAL_TIMER(tsectionb, "section begin/end", "[OpenMP]", OpenMP); TAU_GLOBAL_TIMER(tsectione, "sections enter/exit", "[OpenMP]", OpenMP); TAU_GLOBAL_TIMER(tsingleb, "single begin/end", "[OpenMP]", OpenMP); TAU_GLOBAL_TIMER(tsinglee, "single enter/exit", "[OpenMP]", OpenMP); TAU_GLOBAL_TIMER(tworkshare, "workshare enter/exit", "[OpenMP]", OpenMP); TAU_GLOBAL_TIMER(tregion, "inst region begin/end", "[OpenMP]", OpenMP); static int omp_tracing = 1; static int omp_fin_called = 0; /* * Fortran wrappers calling the C versions */ extern "C" { /****************************/ void pomp_finalize_() { pomp_finalize(); } void pomp_finalize__() { pomp_finalize(); } void POMP_FINALIZE() { pomp_finalize(); } /****************************/ void pomp_init_() { pomp_init(); } void pomp_init__() { pomp_init(); } void POMP_INIT() { pomp_init(); } /****************************/ void pomp_off_() { omp_tracing = 0; } void pomp_off__() { omp_tracing = 0; } void POMP_OFF() { omp_tracing = 0; } /****************************/ void pomp_on_() { omp_tracing = 1; } void pomp_on__() { omp_tracing = 1; } void POMP_ON() { omp_tracing = 1; } /****************************/ void pomp_atomic_enter_(int* id) { if ( omp_tracing ) pomp_atomic_enter(pomp_rd_table[*id]); } void pomp_atomic_enter__(int* id) { if ( omp_tracing ) pomp_atomic_enter(pomp_rd_table[*id]); } void POMP_ATOMIC_ENTER(int* id) { if ( omp_tracing ) pomp_atomic_enter(pomp_rd_table[*id]); } /****************************/ void pomp_atomic_exit_(int* id) { if ( omp_tracing ) pomp_atomic_exit(pomp_rd_table[*id]); } void pomp_atomic_exit__(int* id) { if ( omp_tracing ) pomp_atomic_exit(pomp_rd_table[*id]); } void POMP_ATOMIC_EXIT(int* id) { if ( omp_tracing ) pomp_atomic_exit(pomp_rd_table[*id]); } /****************************/ void pomp_barrier_enter_(int* id) { if ( omp_tracing ) pomp_barrier_enter(pomp_rd_table[*id]); } void pomp_barrier_enter__(int* id) { if ( omp_tracing ) pomp_barrier_enter(pomp_rd_table[*id]); } void POMP_BARRIER_ENTER(int* id) { if ( omp_tracing ) pomp_barrier_enter(pomp_rd_table[*id]); } /****************************/ void pomp_barrier_exit_(int* id) { if ( omp_tracing ) pomp_barrier_exit(pomp_rd_table[*id]); } void pomp_barrier_exit__(int* id) { if ( omp_tracing ) pomp_barrier_exit(pomp_rd_table[*id]); } void POMP_BARRIER_EXIT(int* id) { if ( omp_tracing ) pomp_barrier_exit(pomp_rd_table[*id]); } /****************************/ void pomp_critical_begin_(int* id) { if ( omp_tracing ) pomp_critical_begin(pomp_rd_table[*id]); } void pomp_critical_begin__(int* id) { if ( omp_tracing ) pomp_critical_begin(pomp_rd_table[*id]); } void POMP_CRITICAL_BEGIN(int* id) { if ( omp_tracing ) pomp_critical_begin(pomp_rd_table[*id]); } /****************************/ void pomp_critical_end_(int* id) { if ( omp_tracing ) pomp_critical_end(pomp_rd_table[*id]); } void pomp_critical_end__(int* id) { if ( omp_tracing ) pomp_critical_end(pomp_rd_table[*id]); } void POMP_CRITICAL_END(int* id) { if ( omp_tracing ) pomp_critical_end(pomp_rd_table[*id]); } /****************************/ void pomp_critical_enter_(int* id) { if ( omp_tracing ) pomp_critical_enter(pomp_rd_table[*id]); } void pomp_critical_enter__(int* id) { if ( omp_tracing ) pomp_critical_enter(pomp_rd_table[*id]); } void POMP_CRITICAL_ENTER(int* id) { if ( omp_tracing ) pomp_critical_enter(pomp_rd_table[*id]); } /****************************/ void pomp_critical_exit_(int* id) { if ( omp_tracing ) pomp_critical_exit(pomp_rd_table[*id]); } void pomp_critical_exit__(int* id) { if ( omp_tracing ) pomp_critical_exit(pomp_rd_table[*id]); } void POMP_CRITICAL_EXIT(int* id) { if ( omp_tracing ) pomp_critical_exit(pomp_rd_table[*id]); } /****************************/ void pomp_do_enter_(int* id) { if ( omp_tracing ) pomp_for_enter(pomp_rd_table[*id]); } void pomp_do_enter__(int* id) { if ( omp_tracing ) pomp_for_enter(pomp_rd_table[*id]); } void POMP_DO_ENTER(int* id) { if ( omp_tracing ) pomp_for_enter(pomp_rd_table[*id]); } /****************************/ void pomp_do_exit_(int* id) { if ( omp_tracing ) pomp_for_exit(pomp_rd_table[*id]); } void pomp_do_exit__(int* id) { if ( omp_tracing ) pomp_for_exit(pomp_rd_table[*id]); } void POMP_DO_EXIT(int* id) { if ( omp_tracing ) pomp_for_exit(pomp_rd_table[*id]); } /****************************/ void pomp_master_begin_(int* id) { if ( omp_tracing ) pomp_master_begin(pomp_rd_table[*id]); } void pomp_master_begin__(int* id) { if ( omp_tracing ) pomp_master_begin(pomp_rd_table[*id]); } void POMP_MASTER_BEGIN(int* id) { if ( omp_tracing ) pomp_master_begin(pomp_rd_table[*id]); } /****************************/ void pomp_master_end_(int* id) { if ( omp_tracing ) pomp_master_end(pomp_rd_table[*id]); } void pomp_master_end__(int* id) { if ( omp_tracing ) pomp_master_end(pomp_rd_table[*id]); } void POMP_MASTER_END(int* id) { if ( omp_tracing ) pomp_master_end(pomp_rd_table[*id]); } /****************************/ void pomp_parallel_begin_(int* id) { if ( omp_tracing ) pomp_parallel_begin(pomp_rd_table[*id]); } void pomp_parallel_begin__(int* id) { if ( omp_tracing ) pomp_parallel_begin(pomp_rd_table[*id]); } void POMP_PARALLEL_BEGIN(int* id) { if ( omp_tracing ) pomp_parallel_begin(pomp_rd_table[*id]); } /****************************/ void pomp_parallel_end_(int* id) { if ( omp_tracing ) pomp_parallel_end(pomp_rd_table[*id]); } void pomp_parallel_end__(int* id) { if ( omp_tracing ) pomp_parallel_end(pomp_rd_table[*id]); } void POMP_PARALLEL_END(int* id) { if ( omp_tracing ) pomp_parallel_end(pomp_rd_table[*id]); } /****************************/ void pomp_parallel_fork_(int* id) { if ( omp_tracing ) pomp_parallel_fork(pomp_rd_table[*id]); } void pomp_parallel_fork__(int* id) { if ( omp_tracing ) pomp_parallel_fork(pomp_rd_table[*id]); } void POMP_PARALLEL_FORK(int* id) { if ( omp_tracing ) pomp_parallel_fork(pomp_rd_table[*id]); } /****************************/ void pomp_parallel_join_(int* id) { if ( omp_tracing ) pomp_parallel_join(pomp_rd_table[*id]); } void pomp_parallel_join__(int* id) { if ( omp_tracing ) pomp_parallel_join(pomp_rd_table[*id]); } void POMP_PARALLEL_JOIN(int* id) { if ( omp_tracing ) pomp_parallel_join(pomp_rd_table[*id]); } /****************************/ void pomp_section_begin_(int* id) { if ( omp_tracing ) pomp_section_begin(pomp_rd_table[*id]); } void pomp_section_begin__(int* id) { if ( omp_tracing ) pomp_section_begin(pomp_rd_table[*id]); } void POMP_SECTION_BEGIN(int* id) { if ( omp_tracing ) pomp_section_begin(pomp_rd_table[*id]); } /****************************/ void pomp_section_end_(int* id) { if ( omp_tracing ) pomp_section_end(pomp_rd_table[*id]); } void pomp_section_end__(int* id) { if ( omp_tracing ) pomp_section_end(pomp_rd_table[*id]); } void POMP_SECTION_END(int* id) { if ( omp_tracing ) pomp_section_end(pomp_rd_table[*id]); } /****************************/ void pomp_sections_enter_(int* id) { if ( omp_tracing ) pomp_sections_enter(pomp_rd_table[*id]); } void pomp_sections_enter__(int* id) { if ( omp_tracing ) pomp_sections_enter(pomp_rd_table[*id]); } void POMP_SECTIONS_ENTER(int* id) { if ( omp_tracing ) pomp_sections_enter(pomp_rd_table[*id]); } /****************************/ void pomp_sections_exit_(int* id) { if ( omp_tracing ) pomp_sections_exit(pomp_rd_table[*id]); } void pomp_sections_exit__(int* id) { if ( omp_tracing ) pomp_sections_exit(pomp_rd_table[*id]); } void POMP_SECTIONS_EXIT(int* id) { if ( omp_tracing ) pomp_sections_exit(pomp_rd_table[*id]); } /****************************/ void pomp_single_begin_(int* id) { if ( omp_tracing ) pomp_single_begin(pomp_rd_table[*id]); } void pomp_single_begin__(int* id) { if ( omp_tracing ) pomp_single_begin(pomp_rd_table[*id]); } void POMP_SINGLE_BEGIN(int* id) { if ( omp_tracing ) pomp_single_begin(pomp_rd_table[*id]); } /****************************/ void pomp_single_end_(int* id) { if ( omp_tracing ) pomp_single_end(pomp_rd_table[*id]); } void pomp_single_end__(int* id) { if ( omp_tracing ) pomp_single_end(pomp_rd_table[*id]); } void POMP_SINGLE_END(int* id) { if ( omp_tracing ) pomp_single_end(pomp_rd_table[*id]); } /****************************/ void pomp_single_enter_(int* id) { if ( omp_tracing ) pomp_single_enter(pomp_rd_table[*id]); } void pomp_single_enter__(int* id) { if ( omp_tracing ) pomp_single_enter(pomp_rd_table[*id]); } void POMP_SINGLE_ENTER(int* id) { if ( omp_tracing ) pomp_single_enter(pomp_rd_table[*id]); } /****************************/ void pomp_single_exit_(int* id) { if ( omp_tracing ) pomp_single_exit(pomp_rd_table[*id]); } void pomp_single_exit__(int* id) { if ( omp_tracing ) pomp_single_exit(pomp_rd_table[*id]); } void POMP_SINGLE_EXIT(int* id) { if ( omp_tracing ) pomp_single_exit(pomp_rd_table[*id]); } /****************************/ void pomp_workshare_enter_(int* id) { if ( omp_tracing ) pomp_workshare_enter(pomp_rd_table[*id]); } void pomp_workshare_enter__(int* id) { if ( omp_tracing ) pomp_workshare_enter(pomp_rd_table[*id]); } void POMP_WORKSHARE_ENTER(int* id) { if ( omp_tracing ) pomp_workshare_enter(pomp_rd_table[*id]); } /****************************/ void pomp_workshare_exit_(int* id) { if ( omp_tracing ) pomp_workshare_exit(pomp_rd_table[*id]); } void pomp_workshare_exit__(int* id) { if ( omp_tracing ) pomp_workshare_exit(pomp_rd_table[*id]); } void POMP_WORKSHARE_EXIT(int* id) { if ( omp_tracing ) pomp_workshare_exit(pomp_rd_table[*id]); } /****************************/ void pomp_begin_(int* id) { if ( omp_tracing ) pomp_begin(pomp_rd_table[*id]); } void pomp_begin__(int* id) { if ( omp_tracing ) pomp_begin(pomp_rd_table[*id]); } void POMP_BEGIN(int* id) { if ( omp_tracing ) pomp_begin(pomp_rd_table[*id]); } /****************************/ void pomp_end_(int* id) { if ( omp_tracing ) pomp_end(pomp_rd_table[*id]); } void pomp_end__(int* id) { if ( omp_tracing ) pomp_end(pomp_rd_table[*id]); } void POMP_END(int* id) { if ( omp_tracing ) pomp_end(pomp_rd_table[*id]); } /****************************/ void pomp_flush_enter_(int* id) { if ( omp_tracing ) pomp_flush_enter(pomp_rd_table[*id]); } void pomp_flush_enter__(int* id) { if ( omp_tracing ) pomp_flush_enter(pomp_rd_table[*id]); } void POMP_FLUSH_ENTER(int* id) { if ( omp_tracing ) pomp_flush_enter(pomp_rd_table[*id]); } /****************************/ void pomp_flush_exit_(int* id) { if ( omp_tracing ) pomp_flush_exit(pomp_rd_table[*id]); } void pomp_flush_exit__(int* id) { if ( omp_tracing ) pomp_flush_exit(pomp_rd_table[*id]); } void POMP_FLUSH_EXIT(int* id) { if ( omp_tracing ) pomp_flush_exit(pomp_rd_table[*id]); } /****************************/ } /* extern "C" */ /* * C pomp function library */ /* TAU specific calls */ int tau_openmp_init(void) { omp_init_lock(&tau_ompregdescr_lock); return 0; } void TauStartOpenMPRegionTimer(struct ompregdescr *r) { static int tau_openmp_initialized = tau_openmp_init(); /* For any region, create a mapping between a region r and timer t and start the timer. */ omp_set_lock(&tau_ompregdescr_lock); if (r->data) { Profiler *p = new Profiler((FunctionInfo *) r->data, OpenMP, true, RtsLayer::myThread()); p->Start(); } else { char rname[256], rtype[1024]; sprintf(rname, "%s %s", r->name, r->sub_name); sprintf(rtype, "[OpenMP location: file:%s <%d, %d>]", r->file_name, r->begin_first_line, r->end_last_line); FunctionInfo *f = new FunctionInfo(rname, rtype, OpenMP, "OpenMP"); r->data = (void *) f; Profiler *p = new Profiler (f, OpenMP, true, RtsLayer::myThread()); p->Start(); } omp_unset_lock(&tau_ompregdescr_lock); } /* pomp library calls */ void pomp_finalize() { if ( ! omp_fin_called ) { omp_fin_called = 1; } #ifdef DEBUG_PROF fprintf(stderr, " 0: finalize\n"); #endif /* DEBUG_PROF */ } void pomp_init() { int i; atexit(pomp_finalize); #ifdef DEBUG_PROF fprintf(stderr, " 0: init\n"); #endif /* DEBUG_PROF */ for(i=0; idata = 0; /* allocate space for performance data here */ } } } void pomp_off() { TAU_DISABLE_INSTRUMENTATION(); omp_tracing = 0; } void pomp_on() { TAU_ENABLE_INSTRUMENTATION(); omp_tracing = 1; } void pomp_atomic_enter(struct ompregdescr* r) { #ifdef TAU_AGGREGATE_OPENMP_TIMINGS TAU_GLOBAL_TIMER_START(tatomic); #endif /* TAU_AGGREGATE_OPENMP_TIMINGS */ #ifdef TAU_OPENMP_REGION_VIEW TauStartOpenMPRegionTimer(r); #endif /* TAU_OPENMP_REGION_VIEW */ #ifdef DEBUG_PROF if ( omp_tracing ) { fprintf(stderr, "%3d: enter atomic\n", omp_get_thread_num()); } #endif /* DEBUG_PROF */ } void pomp_atomic_exit(struct ompregdescr* r) { #ifdef TAU_AGGREGATE_OPENMP_TIMINGS TAU_GLOBAL_TIMER_STOP(); /* global timer stop */ #endif /* TAU_AGGREGATE_OPENMP_TIMINGS */ #ifdef TAU_OPENMP_REGION_VIEW TAU_GLOBAL_TIMER_STOP(); /* region timer stop */ #endif /* TAU_OPENMP_REGION_VIEW */ #ifdef DEBUG_PROF if ( omp_tracing ) { fprintf(stderr, "%3d: exit atomic\n", omp_get_thread_num()); } #endif /* DEBUG_PROF */ } void pomp_barrier_enter(struct ompregdescr* r) { #ifdef TAU_AGGREGATE_OPENMP_TIMINGS TAU_GLOBAL_TIMER_START(tbarrier); #endif /* TAU_AGGREGATE_OPENMP_TIMINGS */ #ifdef TAU_OPENMP_REGION_VIEW TauStartOpenMPRegionTimer(r); #endif /* TAU_OPENMP_REGION_VIEW */ #ifdef DEBUG_PROF if ( omp_tracing ) { if ( r->name[0] == 'b' ) fprintf(stderr, "%3d: enter barrier\n", omp_get_thread_num()); else fprintf(stderr, "%3d: enter implicit barrier of %s\n", omp_get_thread_num(), r->name); } #endif /* DEBUG_PROF */ } void pomp_barrier_exit(struct ompregdescr* r) { #ifdef TAU_AGGREGATE_OPENMP_TIMINGS TAU_GLOBAL_TIMER_STOP(); /* global timer stop */ #endif /* TAU_AGGREGATE_OPENMP_TIMINGS */ #ifdef TAU_OPENMP_REGION_VIEW TAU_GLOBAL_TIMER_STOP(); /* region timer stop */ #endif /* TAU_OPENMP_REGION_VIEW */ #ifdef DEBUG_PROF if ( omp_tracing ) { if ( r->name[0] == 'b' ) fprintf(stderr, "%3d: exit barrier\n", omp_get_thread_num()); else fprintf(stderr, "%3d: exit implicit barrier of %s\n", omp_get_thread_num(), r->name); } #endif /* DEBUG_PROF */ } void pomp_critical_begin(struct ompregdescr* r) { #ifdef TAU_AGGREGATE_OPENMP_TIMINGS TAU_GLOBAL_TIMER_START(tcriticalb); #endif /* TAU_AGGREGATE_OPENMP_TIMINGS */ #ifdef TAU_OPENMP_REGION_VIEW TauStartOpenMPRegionTimer(r); #endif /* TAU_OPENMP_REGION_VIEW */ #ifdef DEBUG_PROF if ( omp_tracing ) { fprintf(stderr, "%3d: begin critical %s\n", omp_get_thread_num(), r->sub_name); } #endif /* DEBUG_PROF */ } void pomp_critical_end(struct ompregdescr* r) { #ifdef TAU_AGGREGATE_OPENMP_TIMINGS TAU_GLOBAL_TIMER_STOP(); /* global timer stop */ #endif /* TAU_AGGREGATE_OPENMP_TIMINGS */ #ifdef TAU_OPENMP_REGION_VIEW TAU_GLOBAL_TIMER_STOP(); /* region timer stop */ #endif /* TAU_OPENMP_REGION_VIEW */ #ifdef DEBUG_PROF if ( omp_tracing ) { fprintf(stderr, "%3d: end critical %s\n", omp_get_thread_num(), r->sub_name); } #endif /* DEBUG_PROF */ } void pomp_critical_enter(struct ompregdescr* r) { #ifdef TAU_AGGREGATE_OPENMP_TIMINGS TAU_GLOBAL_TIMER_START(tcriticale); #endif /* TAU_AGGREGATE_OPENMP_TIMINGS */ #ifdef TAU_OPENMP_REGION_VIEW TauStartOpenMPRegionTimer(r); #endif /* TAU_OPENMP_REGION_VIEW */ #ifdef DEBUG_PROF if ( omp_tracing ) { fprintf(stderr, "%3d: enter critical %s\n", omp_get_thread_num(), r->sub_name); } #endif /* DEBUG_PROF */ } void pomp_critical_exit(struct ompregdescr* r) { #ifdef TAU_AGGREGATE_OPENMP_TIMINGS TAU_GLOBAL_TIMER_STOP(); /* global timer stop */ #endif /* TAU_AGGREGATE_OPENMP_TIMINGS */ #ifdef TAU_OPENMP_REGION_VIEW TAU_GLOBAL_TIMER_STOP(); /* region timer stop */ #endif /* TAU_OPENMP_REGION_VIEW */ #ifdef DEBUG_PROF if ( omp_tracing ) { fprintf(stderr, "%3d: exit critical %s\n", omp_get_thread_num(), r->sub_name); } #endif /* DEBUG_PROF */ } void pomp_for_enter(struct ompregdescr* r) { #ifdef TAU_AGGREGATE_OPENMP_TIMINGS TAU_GLOBAL_TIMER_START(tfor); #endif /* TAU_AGGREGATE_OPENMP_TIMINGS */ #ifdef TAU_OPENMP_REGION_VIEW TauStartOpenMPRegionTimer(r); #endif /* TAU_OPENMP_REGION_VIEW */ #ifdef DEBUG_PROF if ( omp_tracing ) { fprintf(stderr, "%3d: enter for\n", omp_get_thread_num()); } #endif /* DEBUG_PROF */ } void pomp_for_exit(struct ompregdescr* r) { #ifdef TAU_AGGREGATE_OPENMP_TIMINGS TAU_GLOBAL_TIMER_STOP(); /* global timer stop */ #endif /* TAU_AGGREGATE_OPENMP_TIMINGS */ // as in a stack. lifo #ifdef TAU_OPENMP_REGION_VIEW TAU_GLOBAL_TIMER_STOP(); /* region timer stop */ #endif /* TAU_OPENMP_REGION_VIEW */ #ifdef DEBUG_PROF if ( omp_tracing ) { fprintf(stderr, "%3d: exit for\n", omp_get_thread_num()); } #endif /* DEBUG_PROF */ } void pomp_master_begin(struct ompregdescr* r) { #ifdef TAU_AGGREGATE_OPENMP_TIMINGS TAU_GLOBAL_TIMER_START(tmaster); #endif /* TAU_AGGREGATE_OPENMP_TIMINGS */ #ifdef TAU_OPENMP_REGION_VIEW TauStartOpenMPRegionTimer(r); #endif /* TAU_OPENMP_REGION_VIEW */ #ifdef DEBUG_PROF if ( omp_tracing ) { fprintf(stderr, "%3d: begin master\n", omp_get_thread_num()); } #endif /* DEBUG_PROF */ } void pomp_master_end(struct ompregdescr* r) { #ifdef TAU_AGGREGATE_OPENMP_TIMINGS TAU_GLOBAL_TIMER_STOP(); /* global timer stop */ #endif /* TAU_AGGREGATE_OPENMP_TIMINGS */ #ifdef TAU_OPENMP_REGION_VIEW TAU_GLOBAL_TIMER_STOP(); /* region timer stop */ #endif /* TAU_OPENMP_REGION_VIEW */ #ifdef DEBUG_PROF if ( omp_tracing ) { fprintf(stderr, "%3d: end master\n", omp_get_thread_num()); } #endif /* DEBUG_PROF */ } void pomp_parallel_begin(struct ompregdescr* r) { /* if there is no top level timer, create it */ Tau_create_top_level_timer_if_necessary(); #ifdef TAU_AGGREGATE_OPENMP_TIMINGS TAU_GLOBAL_TIMER_START(tparallelb); #endif /* TAU_AGGREGATE_OPENMP_TIMINGS */ #ifdef TAU_OPENMP_REGION_VIEW TauStartOpenMPRegionTimer(r); #endif /* TAU_OPENMP_REGION_VIEW */ #ifdef DEBUG_PROF if ( omp_tracing ) { fprintf(stderr, "%3d: begin parallel\n", omp_get_thread_num()); } #endif /* DEBUG_PROF */ } void pomp_parallel_end(struct ompregdescr* r) { #ifdef TAU_AGGREGATE_OPENMP_TIMINGS TAU_GLOBAL_TIMER_STOP(); /* global timer stop */ #endif /* TAU_AGGREGATE_OPENMP_TIMINGS */ #ifdef TAU_OPENMP_REGION_VIEW TAU_GLOBAL_TIMER_STOP(); /* region timer stop */ #endif /* TAU_OPENMP_REGION_VIEW */ #ifdef DEBUG_PROF if ( omp_tracing ) { fprintf(stderr, "%3d: end parallel\n", omp_get_thread_num()); } #endif /* DEBUG_PROF */ } void pomp_parallel_fork(struct ompregdescr* r) { #ifdef TAU_AGGREGATE_OPENMP_TIMINGS TAU_GLOBAL_TIMER_START(tparallelf); #endif /* TAU_AGGREGATE_OPENMP_TIMINGS */ #ifdef TAU_OPENMP_REGION_VIEW TauStartOpenMPRegionTimer(r); #endif /* TAU_OPENMP_REGION_VIEW */ #ifdef DEBUG_PROF if ( omp_tracing ) { fprintf(stderr, "%3d: fork parallel\n", omp_get_thread_num()); } #endif /* DEBUG_PROF */ } void pomp_parallel_join(struct ompregdescr* r) { #ifdef TAU_AGGREGATE_OPENMP_TIMINGS TAU_GLOBAL_TIMER_STOP(); /* global timer stop */ #endif /* TAU_AGGREGATE_OPENMP_TIMINGS */ #ifdef TAU_OPENMP_REGION_VIEW TAU_GLOBAL_TIMER_STOP(); /* region timer stop */ #endif /* TAU_OPENMP_REGION_VIEW */ #ifdef DEBUG_PROF if ( omp_tracing ) { fprintf(stderr, "%3d: join parallel\n", omp_get_thread_num()); } #endif /* DEBUG_PROF */ } void pomp_section_begin(struct ompregdescr* r) { #ifdef TAU_AGGREGATE_OPENMP_TIMINGS TAU_GLOBAL_TIMER_START(tsectionb); #endif /* TAU_AGGREGATE_OPENMP_TIMINGS */ #ifdef TAU_OPENMP_REGION_VIEW TauStartOpenMPRegionTimer(r); #endif /* TAU_OPENMP_REGION_VIEW */ #ifdef DEBUG_PROF if ( omp_tracing ) { fprintf(stderr, "%3d: begin section\n", omp_get_thread_num()); } #endif /* DEBUG_PROF */ } void pomp_section_end(struct ompregdescr* r) { #ifdef TAU_AGGREGATE_OPENMP_TIMINGS TAU_GLOBAL_TIMER_STOP(); /* global timer stop */ #endif /* TAU_AGGREGATE_OPENMP_TIMINGS */ #ifdef TAU_OPENMP_REGION_VIEW TAU_GLOBAL_TIMER_STOP(); /* region timer stop */ #endif /* TAU_OPENMP_REGION_VIEW */ #ifdef DEBUG_PROF if ( omp_tracing ) { fprintf(stderr, "%3d: end section\n", omp_get_thread_num()); } #endif /* DEBUG_PROF */ } void pomp_sections_enter(struct ompregdescr* r) { #ifdef TAU_AGGREGATE_OPENMP_TIMINGS TAU_GLOBAL_TIMER_START(tsectione); #endif /* TAU_AGGREGATE_OPENMP_TIMINGS */ #ifdef TAU_OPENMP_REGION_VIEW TauStartOpenMPRegionTimer(r); #endif /* TAU_OPENMP_REGION_VIEW */ #ifdef DEBUG_PROF if ( omp_tracing ) { fprintf(stderr, "%3d: enter sections\n", omp_get_thread_num()); } #endif /* DEBUG_PROF */ } void pomp_sections_exit(struct ompregdescr* r) { #ifdef TAU_AGGREGATE_OPENMP_TIMINGS TAU_GLOBAL_TIMER_STOP(); /* global timer stop */ #endif /* TAU_AGGREGATE_OPENMP_TIMINGS */ #ifdef TAU_OPENMP_REGION_VIEW TAU_GLOBAL_TIMER_STOP(); /* region timer stop */ #endif /* TAU_OPENMP_REGION_VIEW */ #ifdef DEBUG_PROF if ( omp_tracing ) { fprintf(stderr, "%3d: exit sections\n", omp_get_thread_num()); } #endif /* DEBUG_PROF */ } void pomp_single_begin(struct ompregdescr* r) { #ifdef TAU_AGGREGATE_OPENMP_TIMINGS TAU_GLOBAL_TIMER_START(tsingleb); #endif /* TAU_AGGREGATE_OPENMP_TIMINGS */ #ifdef TAU_OPENMP_REGION_VIEW TauStartOpenMPRegionTimer(r); #endif /* TAU_OPENMP_REGION_VIEW */ #ifdef DEBUG_PROF if ( omp_tracing ) { fprintf(stderr, "%3d: begin single\n", omp_get_thread_num()); } #endif /* DEBUG_PROF */ } void pomp_single_end(struct ompregdescr* r) { #ifdef TAU_AGGREGATE_OPENMP_TIMINGS TAU_GLOBAL_TIMER_STOP(); /* global timer stop */ #endif /* TAU_AGGREGATE_OPENMP_TIMINGS */ #ifdef TAU_OPENMP_REGION_VIEW TAU_GLOBAL_TIMER_STOP(); /* region timer stop */ #endif /* TAU_OPENMP_REGION_VIEW */ #ifdef DEBUG_PROF if ( omp_tracing ) { fprintf(stderr, "%3d: end single\n", omp_get_thread_num()); } #endif /* DEBUG_PROF */ } void pomp_single_enter(struct ompregdescr* r) { #ifdef TAU_AGGREGATE_OPENMP_TIMINGS TAU_GLOBAL_TIMER_START(tsinglee); #endif /* TAU_AGGREGATE_OPENMP_TIMINGS */ #ifdef TAU_OPENMP_REGION_VIEW TauStartOpenMPRegionTimer(r); #endif /* TAU_OPENMP_REGION_VIEW */ #ifdef DEBUG_PROF if ( omp_tracing ) { fprintf(stderr, "%3d: enter single\n", omp_get_thread_num()); } #endif /* DEBUG_PROF */ } void pomp_single_exit(struct ompregdescr* r) { #ifdef TAU_AGGREGATE_OPENMP_TIMINGS TAU_GLOBAL_TIMER_STOP(); /* global timer stop */ #endif /* TAU_AGGREGATE_OPENMP_TIMINGS */ #ifdef TAU_OPENMP_REGION_VIEW TAU_GLOBAL_TIMER_STOP(); /* region timer stop */ #endif /* TAU_OPENMP_REGION_VIEW */ #ifdef DEBUG_PROF if ( omp_tracing ) { fprintf(stderr, "%3d: exit single\n", omp_get_thread_num()); } #endif /* DEBUG_PROF */ } void pomp_workshare_enter(struct ompregdescr* r) { #ifdef TAU_AGGREGATE_OPENMP_TIMINGS TAU_GLOBAL_TIMER_START(tworkshare); #endif /* TAU_AGGREGATE_OPENMP_TIMINGS */ #ifdef TAU_OPENMP_REGION_VIEW TauStartOpenMPRegionTimer(r); #endif /* TAU_OPENMP_REGION_VIEW */ #ifdef DEBUG_PROF if ( omp_tracing ) { fprintf(stderr, "%3d: enter workshare\n", omp_get_thread_num()); } #endif /* DEBUG_PROF */ } void pomp_workshare_exit(struct ompregdescr* r) { #ifdef TAU_AGGREGATE_OPENMP_TIMINGS TAU_GLOBAL_TIMER_STOP(); /* global timer stop */ #endif /* TAU_AGGREGATE_OPENMP_TIMINGS */ #ifdef TAU_OPENMP_REGION_VIEW TAU_GLOBAL_TIMER_STOP(); /* region timer stop */ #endif /* TAU_OPENMP_REGION_VIEW */ #ifdef DEBUG_PROF if ( omp_tracing ) { fprintf(stderr, "%3d: exit workshare\n", omp_get_thread_num()); } #endif /* DEBUG_PROF */ } void pomp_begin(struct ompregdescr* r) { #ifdef TAU_AGGREGATE_OPENMP_TIMINGS TAU_GLOBAL_TIMER_START(tregion); #endif /* TAU_AGGREGATE_OPENMP_TIMINGS */ #ifdef TAU_OPENMP_REGION_VIEW TauStartOpenMPRegionTimer(r); #endif /* TAU_OPENMP_REGION_VIEW */ #ifdef DEBUG_PROF if ( omp_tracing ) { fprintf(stderr, "%3d: begin region %s\n", omp_get_thread_num(), r->sub_name); } #endif /* DEBUG_PROF */ } void pomp_end(struct ompregdescr* r) { #ifdef TAU_AGGREGATE_OPENMP_TIMINGS TAU_GLOBAL_TIMER_STOP(); /* global timer stop */ #endif /* TAU_AGGREGATE_OPENMP_TIMINGS */ #ifdef TAU_OPENMP_REGION_VIEW TAU_GLOBAL_TIMER_STOP(); /* region timer stop */ #endif /* TAU_OPENMP_REGION_VIEW */ #ifdef DEBUG_PROF if ( omp_tracing ) { fprintf(stderr, "%3d: end region %s\n", omp_get_thread_num(), r->sub_name); } #endif /* DEBUG_PROF */ } void pomp_flush_enter(struct ompregdescr* r) { #ifdef TAU_AGGREGATE_OPENMP_TIMINGS TAU_GLOBAL_TIMER_START(tregion); #endif /* TAU_AGGREGATE_OPENMP_TIMINGS */ #ifdef TAU_OPENMP_REGION_VIEW TauStartOpenMPRegionTimer(r); #endif /* TAU_OPENMP_REGION_VIEW */ #ifdef DEBUG_PROF if ( omp_tracing ) { fprintf(stderr, "%3d: flush enter region %s\n", omp_get_thread_num(), r->sub_name); } #endif /* DEBUG_PROF */ } void pomp_flush_exit(struct ompregdescr* r) { #ifdef TAU_AGGREGATE_OPENMP_TIMINGS TAU_GLOBAL_TIMER_STOP(); /* global timer stop */ #endif /* TAU_AGGREGATE_OPENMP_TIMINGS */ #ifdef TAU_OPENMP_REGION_VIEW TAU_GLOBAL_TIMER_STOP(); /* region timer stop */ #endif /* TAU_OPENMP_REGION_VIEW */ #ifdef DEBUG_PROF if ( omp_tracing ) { fprintf(stderr, "%3d: flush exit region %s\n", omp_get_thread_num(), r->sub_name); } #endif /* DEBUG_PROF */ } void pomp_init_lock(omp_lock_t *s) { TAU_PROFILE("omp_init_lock", "[OpenMP]", OpenMP); #ifdef DEBUG_PROF if ( omp_tracing ) { fprintf(stderr, "%3d: init lock\n", omp_get_thread_num()); } #endif /* DEBUG_PROF */ omp_init_lock(s); } void pomp_destroy_lock(omp_lock_t *s) { TAU_PROFILE("omp_destroy_lock", "[OpenMP]", OpenMP); #ifdef DEBUG_PROF if ( omp_tracing ) { fprintf(stderr, "%3d: destroy lock\n", omp_get_thread_num()); } #endif /* DEBUG_PROF */ omp_destroy_lock(s); } void pomp_set_lock(omp_lock_t *s) { TAU_PROFILE("omp_set_lock", "[OpenMP]", OpenMP); #ifdef DEBUG_PROF if ( omp_tracing ) { fprintf(stderr, "%3d: set lock\n", omp_get_thread_num()); } #endif /* DEBUG_PROF */ omp_set_lock(s); } void pomp_unset_lock(omp_lock_t *s) { TAU_PROFILE("omp_unset_lock", "[OpenMP]", OpenMP); #ifdef DEBUG_PROF if ( omp_tracing ) { fprintf(stderr, "%3d: unset lock\n", omp_get_thread_num()); } #endif /* DEBUG_PROF */ omp_unset_lock(s); } int pomp_test_lock(omp_lock_t *s) { TAU_PROFILE("omp_test_lock", "[OpenMP]", OpenMP); #ifdef DEBUG_PROF if ( omp_tracing ) { fprintf(stderr, "%3d: test lock\n", omp_get_thread_num()); } #endif /* DEBUG_PROF */ return omp_test_lock(s); } void pomp_init_nest_lock(omp_nest_lock_t *s) { TAU_PROFILE("omp_init_nest_lock", "[OpenMP]", OpenMP); #ifdef DEBUG_PROF if ( omp_tracing ) { fprintf(stderr, "%3d: init nestlock\n", omp_get_thread_num()); } #endif /* DEBUG_PROF */ omp_init_nest_lock(s); } void pomp_destroy_nest_lock(omp_nest_lock_t *s) { TAU_PROFILE("omp_destroy_nest_lock", "[OpenMP]", OpenMP); #ifdef DEBUG_PROF if ( omp_tracing ) { fprintf(stderr, "%3d: destroy nestlock\n", omp_get_thread_num()); } #endif /* DEBUG_PROF */ omp_destroy_nest_lock(s); } void pomp_set_nest_lock(omp_nest_lock_t *s) { TAU_PROFILE("omp_set_nest_lock", "[OpenMP]", OpenMP); #ifdef DEBUG_PROF if ( omp_tracing ) { fprintf(stderr, "%3d: set nestlock\n", omp_get_thread_num()); } #endif /* DEBUG_PROF */ omp_set_nest_lock(s); } void pomp_unset_nest_lock(omp_nest_lock_t *s) { TAU_PROFILE("omp_unset_nest_lock", "[OpenMP]", OpenMP); #ifdef DEBUG_PROF if ( omp_tracing ) { fprintf(stderr, "%3d: unset nestlock\n", omp_get_thread_num()); } #endif /* DEBUG_PROF */ omp_unset_nest_lock(s); } int pomp_test_nest_lock(omp_nest_lock_t *s) { TAU_PROFILE("omp_test_nest_lock", "[OpenMP]", OpenMP); #ifdef DEBUG_PROF if ( omp_tracing ) { fprintf(stderr, "%3d: test nestlock\n", omp_get_thread_num()); } #endif /* DEBUG_PROF */ return omp_test_nest_lock(s); } /*************************************************************************** * $RCSfile: TauOpari.cpp,v $ $Author: sameer $ * $Revision: 1.9 $ $Date: 2005/10/31 23:45:00 $ * POOMA_VERSION_ID: $Id: TauOpari.cpp,v 1.9 2005/10/31 23:45:00 sameer Exp $ ***************************************************************************/ tau-2.16.4/src/Profile/TauPGIHelper.cpp000066400000000000000000000005241062343042700175230ustar00rootroot00000000000000/* This file is required to compile TAU with PGI 1.7 pgCC. It doesn't provide the pgCC --prelink_objects prior to putting the objects in the archive using ar rcv lib<> *.o. So, this is included during compilation. Its a fix. */ #include using namespace std; void NoOneInvokesThis(void) { cout <<"TAU PGI 1.7 Helper" < #include /******************************************************/ /******************************************************/ /****************************************************** *** shmem_get16 wrapper function ******************************************************/ void shmem_get16( void * trg, const void * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_get16()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_get16( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_get16( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_get16 wrapper function ******************************************************/ void SHMEM_GET16( void * trg, const void * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_get16()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_get16( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_get16( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_get16 wrapper function ******************************************************/ void shmem_get16_( void * trg, const void * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_get16()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_get16( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_get16( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_get16 wrapper function ******************************************************/ void shmem_get16__( void * trg, const void * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_get16()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_get16( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_get16( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_get32 wrapper function ******************************************************/ void shmem_get32( void * trg, const void * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_get32()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_get32( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_get32( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_get32 wrapper function ******************************************************/ void SHMEM_GET32( void * trg, const void * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_get32()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_get32( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_get32( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_get32 wrapper function ******************************************************/ void shmem_get32_( void * trg, const void * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_get32()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_get32( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_get32( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_get32 wrapper function ******************************************************/ void shmem_get32__( void * trg, const void * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_get32()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_get32( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_get32( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_get64 wrapper function ******************************************************/ void shmem_get64( void * trg, const void * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_get64()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_get64( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_get64( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_get64 wrapper function ******************************************************/ void SHMEM_GET64( void * trg, const void * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_get64()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_get64( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_get64( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_get64 wrapper function ******************************************************/ void shmem_get64_( void * trg, const void * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_get64()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_get64( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_get64( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_get64 wrapper function ******************************************************/ void shmem_get64__( void * trg, const void * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_get64()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_get64( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_get64( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_get128 wrapper function ******************************************************/ void shmem_get128( void * trg, const void * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_get128()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_get128( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_get128( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_get128 wrapper function ******************************************************/ void SHMEM_GET128( void * trg, const void * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_get128()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_get128( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_get128( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_get128 wrapper function ******************************************************/ void shmem_get128_( void * trg, const void * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_get128()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_get128( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_get128( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_get128 wrapper function ******************************************************/ void shmem_get128__( void * trg, const void * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_get128()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_get128( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_get128( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_getmem wrapper function ******************************************************/ void shmem_getmem( void * trg, const void * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_getmem()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_getmem( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_getmem( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_getmem wrapper function ******************************************************/ void SHMEM_GETMEM( void * trg, const void * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_getmem()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_getmem( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_getmem( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_getmem wrapper function ******************************************************/ void shmem_getmem_( void * trg, const void * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_getmem()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_getmem( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_getmem( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_getmem wrapper function ******************************************************/ void shmem_getmem__( void * trg, const void * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_getmem()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_getmem( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_getmem( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_short_get wrapper function ******************************************************/ void shmem_short_get( short * trg, const short * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_short_get()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_get( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_short_get( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_get wrapper function ******************************************************/ void SHMEM_SHORT_GET( short * trg, const short * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_short_get()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_get( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_short_get( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_get wrapper function ******************************************************/ void shmem_short_get_( short * trg, const short * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_short_get()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_get( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_short_get( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_get wrapper function ******************************************************/ void shmem_short_get__( short * trg, const short * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_short_get()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_get( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_short_get( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_int_get wrapper function ******************************************************/ void shmem_int_get( int * trg, const int * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_int_get()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_get( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_int_get( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_get wrapper function ******************************************************/ void SHMEM_INT_GET( int * trg, const int * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_int_get()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_get( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_int_get( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_get wrapper function ******************************************************/ void shmem_int_get_( int * trg, const int * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_int_get()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_get( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_int_get( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_get wrapper function ******************************************************/ void shmem_int_get__( int * trg, const int * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_int_get()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_get( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_int_get( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_long_get wrapper function ******************************************************/ void shmem_long_get( long * trg, const long * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_long_get()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_get( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_long_get( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_get wrapper function ******************************************************/ void SHMEM_LONG_GET( long * trg, const long * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_long_get()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_get( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_long_get( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_get wrapper function ******************************************************/ void shmem_long_get_( long * trg, const long * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_long_get()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_get( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_long_get( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_get wrapper function ******************************************************/ void shmem_long_get__( long * trg, const long * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_long_get()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_get( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_long_get( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_longlong_get wrapper function ******************************************************/ void shmem_longlong_get( long long * trg, const long long * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_longlong_get()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_get( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_get( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_get wrapper function ******************************************************/ void SHMEM_LONGLONG_GET( long long * trg, const long long * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_longlong_get()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_get( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_get( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_get wrapper function ******************************************************/ void shmem_longlong_get_( long long * trg, const long long * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_longlong_get()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_get( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_get( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_get wrapper function ******************************************************/ void shmem_longlong_get__( long long * trg, const long long * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_longlong_get()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_get( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_get( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_float_get wrapper function ******************************************************/ void shmem_float_get( float * trg, const float * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_float_get()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_float_get( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_float_get( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_float_get wrapper function ******************************************************/ void SHMEM_FLOAT_GET( float * trg, const float * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_float_get()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_float_get( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_float_get( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_float_get wrapper function ******************************************************/ void shmem_float_get_( float * trg, const float * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_float_get()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_float_get( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_float_get( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_float_get wrapper function ******************************************************/ void shmem_float_get__( float * trg, const float * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_float_get()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_float_get( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_float_get( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_double_get wrapper function ******************************************************/ void shmem_double_get( double * trg, const double * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_double_get()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_double_get( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_double_get( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_double_get wrapper function ******************************************************/ void SHMEM_DOUBLE_GET( double * trg, const double * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_double_get()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_double_get( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_double_get( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_double_get wrapper function ******************************************************/ void shmem_double_get_( double * trg, const double * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_double_get()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_double_get( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_double_get( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_double_get wrapper function ******************************************************/ void shmem_double_get__( double * trg, const double * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_double_get()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_double_get( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_double_get( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_put16 wrapper function ******************************************************/ void shmem_put16( void * trg, const void * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_put16()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_put16( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_put16( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_put16 wrapper function ******************************************************/ void SHMEM_PUT16( void * trg, const void * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_put16()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_put16( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_put16( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_put16 wrapper function ******************************************************/ void shmem_put16_( void * trg, const void * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_put16()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_put16( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_put16( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_put16 wrapper function ******************************************************/ void shmem_put16__( void * trg, const void * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_put16()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_put16( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_put16( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_put32 wrapper function ******************************************************/ void shmem_put32( void * trg, const void * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_put32()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_put32( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_put32( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_put32 wrapper function ******************************************************/ void SHMEM_PUT32( void * trg, const void * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_put32()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_put32( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_put32( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_put32 wrapper function ******************************************************/ void shmem_put32_( void * trg, const void * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_put32()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_put32( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_put32( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_put32 wrapper function ******************************************************/ void shmem_put32__( void * trg, const void * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_put32()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_put32( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_put32( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_put64 wrapper function ******************************************************/ void shmem_put64( void * trg, const void * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_put64()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_put64( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_put64( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_put64 wrapper function ******************************************************/ void SHMEM_PUT64( void * trg, const void * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_put64()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_put64( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_put64( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_put64 wrapper function ******************************************************/ void shmem_put64_( void * trg, const void * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_put64()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_put64( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_put64( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_put64 wrapper function ******************************************************/ void shmem_put64__( void * trg, const void * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_put64()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_put64( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_put64( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_put128 wrapper function ******************************************************/ void shmem_put128( void * trg, const void * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_put128()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_put128( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_put128( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_put128 wrapper function ******************************************************/ void SHMEM_PUT128( void * trg, const void * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_put128()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_put128( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_put128( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_put128 wrapper function ******************************************************/ void shmem_put128_( void * trg, const void * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_put128()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_put128( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_put128( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_put128 wrapper function ******************************************************/ void shmem_put128__( void * trg, const void * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_put128()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_put128( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_put128( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_putmem wrapper function ******************************************************/ void shmem_putmem( void * trg, const void * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_putmem()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_putmem( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_putmem( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_putmem wrapper function ******************************************************/ void SHMEM_PUTMEM( void * trg, const void * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_putmem()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_putmem( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_putmem( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_putmem wrapper function ******************************************************/ void shmem_putmem_( void * trg, const void * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_putmem()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_putmem( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_putmem( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_putmem wrapper function ******************************************************/ void shmem_putmem__( void * trg, const void * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_putmem()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_putmem( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_putmem( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_short_put wrapper function ******************************************************/ void shmem_short_put( short * trg, const short * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_short_put()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_put( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_short_put( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_put wrapper function ******************************************************/ void SHMEM_SHORT_PUT( short * trg, const short * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_short_put()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_put( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_short_put( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_put wrapper function ******************************************************/ void shmem_short_put_( short * trg, const short * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_short_put()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_put( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_short_put( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_put wrapper function ******************************************************/ void shmem_short_put__( short * trg, const short * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_short_put()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_put( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_short_put( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_int_put wrapper function ******************************************************/ void shmem_int_put( int * trg, const int * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_int_put()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_put( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_int_put( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_put wrapper function ******************************************************/ void SHMEM_INT_PUT( int * trg, const int * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_int_put()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_put( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_int_put( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_put wrapper function ******************************************************/ void shmem_int_put_( int * trg, const int * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_int_put()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_put( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_int_put( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_put wrapper function ******************************************************/ void shmem_int_put__( int * trg, const int * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_int_put()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_put( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_int_put( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_long_put wrapper function ******************************************************/ void shmem_long_put( long * trg, const long * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_long_put()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_put( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_long_put( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_put wrapper function ******************************************************/ void SHMEM_LONG_PUT( long * trg, const long * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_long_put()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_put( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_long_put( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_put wrapper function ******************************************************/ void shmem_long_put_( long * trg, const long * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_long_put()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_put( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_long_put( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_put wrapper function ******************************************************/ void shmem_long_put__( long * trg, const long * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_long_put()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_put( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_long_put( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_longlong_put wrapper function ******************************************************/ void shmem_longlong_put( long long * trg, const long long * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_longlong_put()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_put( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_put( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_put wrapper function ******************************************************/ void SHMEM_LONGLONG_PUT( long long * trg, const long long * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_longlong_put()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_put( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_put( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_put wrapper function ******************************************************/ void shmem_longlong_put_( long long * trg, const long long * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_longlong_put()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_put( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_put( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_put wrapper function ******************************************************/ void shmem_longlong_put__( long long * trg, const long long * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_longlong_put()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_put( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_put( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_float_put wrapper function ******************************************************/ void shmem_float_put( float * trg, const float * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_float_put()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_float_put( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_float_put( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_float_put wrapper function ******************************************************/ void SHMEM_FLOAT_PUT( float * trg, const float * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_float_put()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_float_put( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_float_put( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_float_put wrapper function ******************************************************/ void shmem_float_put_( float * trg, const float * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_float_put()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_float_put( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_float_put( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_float_put wrapper function ******************************************************/ void shmem_float_put__( float * trg, const float * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_float_put()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_float_put( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_float_put( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_double_put wrapper function ******************************************************/ void shmem_double_put( double * trg, const double * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_double_put()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_double_put( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_double_put( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_double_put wrapper function ******************************************************/ void SHMEM_DOUBLE_PUT( double * trg, const double * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_double_put()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_double_put( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_double_put( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_double_put wrapper function ******************************************************/ void shmem_double_put_( double * trg, const double * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_double_put()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_double_put( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_double_put( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_double_put wrapper function ******************************************************/ void shmem_double_put__( double * trg, const double * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_double_put()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_double_put( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_double_put( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_put16_nb wrapper function ******************************************************/ void shmem_put16_nb( void * trg, const void * src, size_t len, int pe, void ** transfer_handle) { TAU_PROFILE_TIMER(t, "shmem_put16_nb()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_put16_nb( trg, src, len, pe, transfer_handle) ; #else /* !TAU_P_SHMEM */ pshmem_put16_nb( trg, src, len, pe, transfer_handle) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_put16_nb wrapper function ******************************************************/ void SHMEM_PUT16_NB( void * trg, const void * src, size_t len, int pe, void ** transfer_handle) { TAU_PROFILE_TIMER(t, "shmem_put16_nb()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_put16_nb( trg, src, len, pe, transfer_handle) ; #else /* !TAU_P_SHMEM */ pshmem_put16_nb( trg, src, len, pe, transfer_handle) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_put16_nb wrapper function ******************************************************/ void shmem_put16_nb_( void * trg, const void * src, size_t len, int pe, void ** transfer_handle) { TAU_PROFILE_TIMER(t, "shmem_put16_nb()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_put16_nb( trg, src, len, pe, transfer_handle) ; #else /* !TAU_P_SHMEM */ pshmem_put16_nb( trg, src, len, pe, transfer_handle) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_put16_nb wrapper function ******************************************************/ void shmem_put16_nb__( void * trg, const void * src, size_t len, int pe, void ** transfer_handle) { TAU_PROFILE_TIMER(t, "shmem_put16_nb()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_put16_nb( trg, src, len, pe, transfer_handle) ; #else /* !TAU_P_SHMEM */ pshmem_put16_nb( trg, src, len, pe, transfer_handle) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_put32_nb wrapper function ******************************************************/ void shmem_put32_nb( void * trg, const void * src, size_t len, int pe, void ** transfer_handle) { TAU_PROFILE_TIMER(t, "shmem_put32_nb()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_put32_nb( trg, src, len, pe, transfer_handle) ; #else /* !TAU_P_SHMEM */ pshmem_put32_nb( trg, src, len, pe, transfer_handle) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_put32_nb wrapper function ******************************************************/ void SHMEM_PUT32_NB( void * trg, const void * src, size_t len, int pe, void ** transfer_handle) { TAU_PROFILE_TIMER(t, "shmem_put32_nb()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_put32_nb( trg, src, len, pe, transfer_handle) ; #else /* !TAU_P_SHMEM */ pshmem_put32_nb( trg, src, len, pe, transfer_handle) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_put32_nb wrapper function ******************************************************/ void shmem_put32_nb_( void * trg, const void * src, size_t len, int pe, void ** transfer_handle) { TAU_PROFILE_TIMER(t, "shmem_put32_nb()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_put32_nb( trg, src, len, pe, transfer_handle) ; #else /* !TAU_P_SHMEM */ pshmem_put32_nb( trg, src, len, pe, transfer_handle) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_put32_nb wrapper function ******************************************************/ void shmem_put32_nb__( void * trg, const void * src, size_t len, int pe, void ** transfer_handle) { TAU_PROFILE_TIMER(t, "shmem_put32_nb()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_put32_nb( trg, src, len, pe, transfer_handle) ; #else /* !TAU_P_SHMEM */ pshmem_put32_nb( trg, src, len, pe, transfer_handle) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_put64_nb wrapper function ******************************************************/ void shmem_put64_nb( void * trg, const void * src, size_t len, int pe, void ** transfer_handle) { TAU_PROFILE_TIMER(t, "shmem_put64_nb()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_put64_nb( trg, src, len, pe, transfer_handle) ; #else /* !TAU_P_SHMEM */ pshmem_put64_nb( trg, src, len, pe, transfer_handle) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_put64_nb wrapper function ******************************************************/ void SHMEM_PUT64_NB( void * trg, const void * src, size_t len, int pe, void ** transfer_handle) { TAU_PROFILE_TIMER(t, "shmem_put64_nb()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_put64_nb( trg, src, len, pe, transfer_handle) ; #else /* !TAU_P_SHMEM */ pshmem_put64_nb( trg, src, len, pe, transfer_handle) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_put64_nb wrapper function ******************************************************/ void shmem_put64_nb_( void * trg, const void * src, size_t len, int pe, void ** transfer_handle) { TAU_PROFILE_TIMER(t, "shmem_put64_nb()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_put64_nb( trg, src, len, pe, transfer_handle) ; #else /* !TAU_P_SHMEM */ pshmem_put64_nb( trg, src, len, pe, transfer_handle) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_put64_nb wrapper function ******************************************************/ void shmem_put64_nb__( void * trg, const void * src, size_t len, int pe, void ** transfer_handle) { TAU_PROFILE_TIMER(t, "shmem_put64_nb()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_put64_nb( trg, src, len, pe, transfer_handle) ; #else /* !TAU_P_SHMEM */ pshmem_put64_nb( trg, src, len, pe, transfer_handle) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_put128_nb wrapper function ******************************************************/ void shmem_put128_nb( void * trg, const void * src, size_t len, int pe, void ** transfer_handle) { TAU_PROFILE_TIMER(t, "shmem_put128_nb()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_put128_nb( trg, src, len, pe, transfer_handle) ; #else /* !TAU_P_SHMEM */ pshmem_put128_nb( trg, src, len, pe, transfer_handle) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_put128_nb wrapper function ******************************************************/ void SHMEM_PUT128_NB( void * trg, const void * src, size_t len, int pe, void ** transfer_handle) { TAU_PROFILE_TIMER(t, "shmem_put128_nb()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_put128_nb( trg, src, len, pe, transfer_handle) ; #else /* !TAU_P_SHMEM */ pshmem_put128_nb( trg, src, len, pe, transfer_handle) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_put128_nb wrapper function ******************************************************/ void shmem_put128_nb_( void * trg, const void * src, size_t len, int pe, void ** transfer_handle) { TAU_PROFILE_TIMER(t, "shmem_put128_nb()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_put128_nb( trg, src, len, pe, transfer_handle) ; #else /* !TAU_P_SHMEM */ pshmem_put128_nb( trg, src, len, pe, transfer_handle) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_put128_nb wrapper function ******************************************************/ void shmem_put128_nb__( void * trg, const void * src, size_t len, int pe, void ** transfer_handle) { TAU_PROFILE_TIMER(t, "shmem_put128_nb()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_put128_nb( trg, src, len, pe, transfer_handle) ; #else /* !TAU_P_SHMEM */ pshmem_put128_nb( trg, src, len, pe, transfer_handle) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_putmem_nb wrapper function ******************************************************/ void shmem_putmem_nb( void * trg, const void * src, size_t len, int pe, void ** transfer_handle) { TAU_PROFILE_TIMER(t, "shmem_putmem_nb()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_putmem_nb( trg, src, len, pe, transfer_handle) ; #else /* !TAU_P_SHMEM */ pshmem_putmem_nb( trg, src, len, pe, transfer_handle) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_putmem_nb wrapper function ******************************************************/ void SHMEM_PUTMEM_NB( void * trg, const void * src, size_t len, int pe, void ** transfer_handle) { TAU_PROFILE_TIMER(t, "shmem_putmem_nb()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_putmem_nb( trg, src, len, pe, transfer_handle) ; #else /* !TAU_P_SHMEM */ pshmem_putmem_nb( trg, src, len, pe, transfer_handle) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_putmem_nb wrapper function ******************************************************/ void shmem_putmem_nb_( void * trg, const void * src, size_t len, int pe, void ** transfer_handle) { TAU_PROFILE_TIMER(t, "shmem_putmem_nb()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_putmem_nb( trg, src, len, pe, transfer_handle) ; #else /* !TAU_P_SHMEM */ pshmem_putmem_nb( trg, src, len, pe, transfer_handle) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_putmem_nb wrapper function ******************************************************/ void shmem_putmem_nb__( void * trg, const void * src, size_t len, int pe, void ** transfer_handle) { TAU_PROFILE_TIMER(t, "shmem_putmem_nb()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_putmem_nb( trg, src, len, pe, transfer_handle) ; #else /* !TAU_P_SHMEM */ pshmem_putmem_nb( trg, src, len, pe, transfer_handle) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_short_put_nb wrapper function ******************************************************/ void shmem_short_put_nb( short * trg, const short * src, size_t len, int pe, void ** transfer_handle) { TAU_PROFILE_TIMER(t, "shmem_short_put_nb()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_put_nb( trg, src, len, pe, transfer_handle) ; #else /* !TAU_P_SHMEM */ pshmem_short_put_nb( trg, src, len, pe, transfer_handle) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_put_nb wrapper function ******************************************************/ void SHMEM_SHORT_PUT_NB( short * trg, const short * src, size_t len, int pe, void ** transfer_handle) { TAU_PROFILE_TIMER(t, "shmem_short_put_nb()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_put_nb( trg, src, len, pe, transfer_handle) ; #else /* !TAU_P_SHMEM */ pshmem_short_put_nb( trg, src, len, pe, transfer_handle) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_put_nb wrapper function ******************************************************/ void shmem_short_put_nb_( short * trg, const short * src, size_t len, int pe, void ** transfer_handle) { TAU_PROFILE_TIMER(t, "shmem_short_put_nb()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_put_nb( trg, src, len, pe, transfer_handle) ; #else /* !TAU_P_SHMEM */ pshmem_short_put_nb( trg, src, len, pe, transfer_handle) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_put_nb wrapper function ******************************************************/ void shmem_short_put_nb__( short * trg, const short * src, size_t len, int pe, void ** transfer_handle) { TAU_PROFILE_TIMER(t, "shmem_short_put_nb()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_put_nb( trg, src, len, pe, transfer_handle) ; #else /* !TAU_P_SHMEM */ pshmem_short_put_nb( trg, src, len, pe, transfer_handle) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_int_put_nb wrapper function ******************************************************/ void shmem_int_put_nb( int * trg, const int * src, size_t len, int pe, void ** transfer_handle) { TAU_PROFILE_TIMER(t, "shmem_int_put_nb()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_put_nb( trg, src, len, pe, transfer_handle) ; #else /* !TAU_P_SHMEM */ pshmem_int_put_nb( trg, src, len, pe, transfer_handle) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_put_nb wrapper function ******************************************************/ void SHMEM_INT_PUT_NB( int * trg, const int * src, size_t len, int pe, void ** transfer_handle) { TAU_PROFILE_TIMER(t, "shmem_int_put_nb()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_put_nb( trg, src, len, pe, transfer_handle) ; #else /* !TAU_P_SHMEM */ pshmem_int_put_nb( trg, src, len, pe, transfer_handle) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_put_nb wrapper function ******************************************************/ void shmem_int_put_nb_( int * trg, const int * src, size_t len, int pe, void ** transfer_handle) { TAU_PROFILE_TIMER(t, "shmem_int_put_nb()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_put_nb( trg, src, len, pe, transfer_handle) ; #else /* !TAU_P_SHMEM */ pshmem_int_put_nb( trg, src, len, pe, transfer_handle) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_put_nb wrapper function ******************************************************/ void shmem_int_put_nb__( int * trg, const int * src, size_t len, int pe, void ** transfer_handle) { TAU_PROFILE_TIMER(t, "shmem_int_put_nb()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_put_nb( trg, src, len, pe, transfer_handle) ; #else /* !TAU_P_SHMEM */ pshmem_int_put_nb( trg, src, len, pe, transfer_handle) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_long_put_nb wrapper function ******************************************************/ void shmem_long_put_nb( long * trg, const long * src, size_t len, int pe, void ** transfer_handle) { TAU_PROFILE_TIMER(t, "shmem_long_put_nb()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_put_nb( trg, src, len, pe, transfer_handle) ; #else /* !TAU_P_SHMEM */ pshmem_long_put_nb( trg, src, len, pe, transfer_handle) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_put_nb wrapper function ******************************************************/ void SHMEM_LONG_PUT_NB( long * trg, const long * src, size_t len, int pe, void ** transfer_handle) { TAU_PROFILE_TIMER(t, "shmem_long_put_nb()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_put_nb( trg, src, len, pe, transfer_handle) ; #else /* !TAU_P_SHMEM */ pshmem_long_put_nb( trg, src, len, pe, transfer_handle) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_put_nb wrapper function ******************************************************/ void shmem_long_put_nb_( long * trg, const long * src, size_t len, int pe, void ** transfer_handle) { TAU_PROFILE_TIMER(t, "shmem_long_put_nb()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_put_nb( trg, src, len, pe, transfer_handle) ; #else /* !TAU_P_SHMEM */ pshmem_long_put_nb( trg, src, len, pe, transfer_handle) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_put_nb wrapper function ******************************************************/ void shmem_long_put_nb__( long * trg, const long * src, size_t len, int pe, void ** transfer_handle) { TAU_PROFILE_TIMER(t, "shmem_long_put_nb()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_put_nb( trg, src, len, pe, transfer_handle) ; #else /* !TAU_P_SHMEM */ pshmem_long_put_nb( trg, src, len, pe, transfer_handle) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_longlong_put_nb wrapper function ******************************************************/ void shmem_longlong_put_nb( long long * trg, const long long * src, size_t len, int pe, void ** transfer_handle) { TAU_PROFILE_TIMER(t, "shmem_longlong_put_nb()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_put_nb( trg, src, len, pe, transfer_handle) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_put_nb( trg, src, len, pe, transfer_handle) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_put_nb wrapper function ******************************************************/ void SHMEM_LONGLONG_PUT_NB( long long * trg, const long long * src, size_t len, int pe, void ** transfer_handle) { TAU_PROFILE_TIMER(t, "shmem_longlong_put_nb()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_put_nb( trg, src, len, pe, transfer_handle) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_put_nb( trg, src, len, pe, transfer_handle) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_put_nb wrapper function ******************************************************/ void shmem_longlong_put_nb_( long long * trg, const long long * src, size_t len, int pe, void ** transfer_handle) { TAU_PROFILE_TIMER(t, "shmem_longlong_put_nb()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_put_nb( trg, src, len, pe, transfer_handle) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_put_nb( trg, src, len, pe, transfer_handle) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_put_nb wrapper function ******************************************************/ void shmem_longlong_put_nb__( long long * trg, const long long * src, size_t len, int pe, void ** transfer_handle) { TAU_PROFILE_TIMER(t, "shmem_longlong_put_nb()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_put_nb( trg, src, len, pe, transfer_handle) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_put_nb( trg, src, len, pe, transfer_handle) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_float_put_nb wrapper function ******************************************************/ void shmem_float_put_nb( float * trg, const float * src, size_t len, int pe, void ** transfer_handle) { TAU_PROFILE_TIMER(t, "shmem_float_put_nb()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_float_put_nb( trg, src, len, pe, transfer_handle) ; #else /* !TAU_P_SHMEM */ pshmem_float_put_nb( trg, src, len, pe, transfer_handle) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_float_put_nb wrapper function ******************************************************/ void SHMEM_FLOAT_PUT_NB( float * trg, const float * src, size_t len, int pe, void ** transfer_handle) { TAU_PROFILE_TIMER(t, "shmem_float_put_nb()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_float_put_nb( trg, src, len, pe, transfer_handle) ; #else /* !TAU_P_SHMEM */ pshmem_float_put_nb( trg, src, len, pe, transfer_handle) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_float_put_nb wrapper function ******************************************************/ void shmem_float_put_nb_( float * trg, const float * src, size_t len, int pe, void ** transfer_handle) { TAU_PROFILE_TIMER(t, "shmem_float_put_nb()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_float_put_nb( trg, src, len, pe, transfer_handle) ; #else /* !TAU_P_SHMEM */ pshmem_float_put_nb( trg, src, len, pe, transfer_handle) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_float_put_nb wrapper function ******************************************************/ void shmem_float_put_nb__( float * trg, const float * src, size_t len, int pe, void ** transfer_handle) { TAU_PROFILE_TIMER(t, "shmem_float_put_nb()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_float_put_nb( trg, src, len, pe, transfer_handle) ; #else /* !TAU_P_SHMEM */ pshmem_float_put_nb( trg, src, len, pe, transfer_handle) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_double_put_nb wrapper function ******************************************************/ void shmem_double_put_nb( double * trg, const double * src, size_t len, int pe, void ** transfer_handle) { TAU_PROFILE_TIMER(t, "shmem_double_put_nb()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_double_put_nb( trg, src, len, pe, transfer_handle) ; #else /* !TAU_P_SHMEM */ pshmem_double_put_nb( trg, src, len, pe, transfer_handle) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_double_put_nb wrapper function ******************************************************/ void SHMEM_DOUBLE_PUT_NB( double * trg, const double * src, size_t len, int pe, void ** transfer_handle) { TAU_PROFILE_TIMER(t, "shmem_double_put_nb()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_double_put_nb( trg, src, len, pe, transfer_handle) ; #else /* !TAU_P_SHMEM */ pshmem_double_put_nb( trg, src, len, pe, transfer_handle) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_double_put_nb wrapper function ******************************************************/ void shmem_double_put_nb_( double * trg, const double * src, size_t len, int pe, void ** transfer_handle) { TAU_PROFILE_TIMER(t, "shmem_double_put_nb()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_double_put_nb( trg, src, len, pe, transfer_handle) ; #else /* !TAU_P_SHMEM */ pshmem_double_put_nb( trg, src, len, pe, transfer_handle) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_double_put_nb wrapper function ******************************************************/ void shmem_double_put_nb__( double * trg, const double * src, size_t len, int pe, void ** transfer_handle) { TAU_PROFILE_TIMER(t, "shmem_double_put_nb()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_double_put_nb( trg, src, len, pe, transfer_handle) ; #else /* !TAU_P_SHMEM */ pshmem_double_put_nb( trg, src, len, pe, transfer_handle) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_short_iget wrapper function ******************************************************/ void shmem_short_iget( short * trg, const short * src, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_short_iget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_iget( trg, src, tst, sst, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_short_iget( trg, src, tst, sst, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_iget wrapper function ******************************************************/ void SHMEM_SHORT_IGET( short * trg, const short * src, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_short_iget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_iget( trg, src, tst, sst, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_short_iget( trg, src, tst, sst, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_iget wrapper function ******************************************************/ void shmem_short_iget_( short * trg, const short * src, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_short_iget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_iget( trg, src, tst, sst, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_short_iget( trg, src, tst, sst, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_iget wrapper function ******************************************************/ void shmem_short_iget__( short * trg, const short * src, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_short_iget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_iget( trg, src, tst, sst, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_short_iget( trg, src, tst, sst, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_int_iget wrapper function ******************************************************/ void shmem_int_iget( int * trg, const int * src, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_int_iget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_iget( trg, src, tst, sst, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_int_iget( trg, src, tst, sst, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_iget wrapper function ******************************************************/ void SHMEM_INT_IGET( int * trg, const int * src, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_int_iget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_iget( trg, src, tst, sst, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_int_iget( trg, src, tst, sst, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_iget wrapper function ******************************************************/ void shmem_int_iget_( int * trg, const int * src, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_int_iget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_iget( trg, src, tst, sst, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_int_iget( trg, src, tst, sst, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_iget wrapper function ******************************************************/ void shmem_int_iget__( int * trg, const int * src, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_int_iget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_iget( trg, src, tst, sst, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_int_iget( trg, src, tst, sst, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_long_iget wrapper function ******************************************************/ void shmem_long_iget( long * trg, const long * src, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_long_iget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_iget( trg, src, tst, sst, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_long_iget( trg, src, tst, sst, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_iget wrapper function ******************************************************/ void SHMEM_LONG_IGET( long * trg, const long * src, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_long_iget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_iget( trg, src, tst, sst, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_long_iget( trg, src, tst, sst, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_iget wrapper function ******************************************************/ void shmem_long_iget_( long * trg, const long * src, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_long_iget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_iget( trg, src, tst, sst, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_long_iget( trg, src, tst, sst, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_iget wrapper function ******************************************************/ void shmem_long_iget__( long * trg, const long * src, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_long_iget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_iget( trg, src, tst, sst, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_long_iget( trg, src, tst, sst, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_longlong_iget wrapper function ******************************************************/ void shmem_longlong_iget( long long * trg, const long long * src, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_longlong_iget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_iget( trg, src, tst, sst, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_iget( trg, src, tst, sst, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_iget wrapper function ******************************************************/ void SHMEM_LONGLONG_IGET( long long * trg, const long long * src, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_longlong_iget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_iget( trg, src, tst, sst, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_iget( trg, src, tst, sst, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_iget wrapper function ******************************************************/ void shmem_longlong_iget_( long long * trg, const long long * src, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_longlong_iget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_iget( trg, src, tst, sst, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_iget( trg, src, tst, sst, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_iget wrapper function ******************************************************/ void shmem_longlong_iget__( long long * trg, const long long * src, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_longlong_iget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_iget( trg, src, tst, sst, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_iget( trg, src, tst, sst, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_float_iget wrapper function ******************************************************/ void shmem_float_iget( float * trg, const float * src, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_float_iget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_float_iget( trg, src, tst, sst, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_float_iget( trg, src, tst, sst, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_float_iget wrapper function ******************************************************/ void SHMEM_FLOAT_IGET( float * trg, const float * src, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_float_iget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_float_iget( trg, src, tst, sst, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_float_iget( trg, src, tst, sst, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_float_iget wrapper function ******************************************************/ void shmem_float_iget_( float * trg, const float * src, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_float_iget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_float_iget( trg, src, tst, sst, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_float_iget( trg, src, tst, sst, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_float_iget wrapper function ******************************************************/ void shmem_float_iget__( float * trg, const float * src, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_float_iget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_float_iget( trg, src, tst, sst, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_float_iget( trg, src, tst, sst, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_double_iget wrapper function ******************************************************/ void shmem_double_iget( double * trg, const double * src, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_double_iget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_double_iget( trg, src, tst, sst, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_double_iget( trg, src, tst, sst, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_double_iget wrapper function ******************************************************/ void SHMEM_DOUBLE_IGET( double * trg, const double * src, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_double_iget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_double_iget( trg, src, tst, sst, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_double_iget( trg, src, tst, sst, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_double_iget wrapper function ******************************************************/ void shmem_double_iget_( double * trg, const double * src, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_double_iget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_double_iget( trg, src, tst, sst, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_double_iget( trg, src, tst, sst, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_double_iget wrapper function ******************************************************/ void shmem_double_iget__( double * trg, const double * src, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_double_iget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_double_iget( trg, src, tst, sst, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_double_iget( trg, src, tst, sst, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_iget16 wrapper function ******************************************************/ void shmem_iget16( void * trg, const void * src, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_iget16()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_iget16( trg, src, tst, sst, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_iget16( trg, src, tst, sst, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_iget16 wrapper function ******************************************************/ void SHMEM_IGET16( void * trg, const void * src, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_iget16()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_iget16( trg, src, tst, sst, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_iget16( trg, src, tst, sst, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_iget16 wrapper function ******************************************************/ void shmem_iget16_( void * trg, const void * src, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_iget16()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_iget16( trg, src, tst, sst, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_iget16( trg, src, tst, sst, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_iget16 wrapper function ******************************************************/ void shmem_iget16__( void * trg, const void * src, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_iget16()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_iget16( trg, src, tst, sst, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_iget16( trg, src, tst, sst, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_iget32 wrapper function ******************************************************/ void shmem_iget32( void * trg, const void * src, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_iget32()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_iget32( trg, src, tst, sst, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_iget32( trg, src, tst, sst, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_iget32 wrapper function ******************************************************/ void SHMEM_IGET32( void * trg, const void * src, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_iget32()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_iget32( trg, src, tst, sst, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_iget32( trg, src, tst, sst, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_iget32 wrapper function ******************************************************/ void shmem_iget32_( void * trg, const void * src, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_iget32()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_iget32( trg, src, tst, sst, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_iget32( trg, src, tst, sst, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_iget32 wrapper function ******************************************************/ void shmem_iget32__( void * trg, const void * src, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_iget32()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_iget32( trg, src, tst, sst, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_iget32( trg, src, tst, sst, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_iget64 wrapper function ******************************************************/ void shmem_iget64( void * trg, const void * src, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_iget64()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_iget64( trg, src, tst, sst, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_iget64( trg, src, tst, sst, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_iget64 wrapper function ******************************************************/ void SHMEM_IGET64( void * trg, const void * src, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_iget64()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_iget64( trg, src, tst, sst, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_iget64( trg, src, tst, sst, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_iget64 wrapper function ******************************************************/ void shmem_iget64_( void * trg, const void * src, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_iget64()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_iget64( trg, src, tst, sst, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_iget64( trg, src, tst, sst, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_iget64 wrapper function ******************************************************/ void shmem_iget64__( void * trg, const void * src, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_iget64()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_iget64( trg, src, tst, sst, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_iget64( trg, src, tst, sst, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_iget128 wrapper function ******************************************************/ void shmem_iget128( void * trg, const void * src, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_iget128()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_iget128( trg, src, tst, sst, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_iget128( trg, src, tst, sst, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_iget128 wrapper function ******************************************************/ void SHMEM_IGET128( void * trg, const void * src, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_iget128()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_iget128( trg, src, tst, sst, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_iget128( trg, src, tst, sst, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_iget128 wrapper function ******************************************************/ void shmem_iget128_( void * trg, const void * src, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_iget128()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_iget128( trg, src, tst, sst, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_iget128( trg, src, tst, sst, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_iget128 wrapper function ******************************************************/ void shmem_iget128__( void * trg, const void * src, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_iget128()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_iget128( trg, src, tst, sst, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_iget128( trg, src, tst, sst, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_short_iput wrapper function ******************************************************/ void shmem_short_iput( short * trg, const short * src, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_short_iput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_iput( trg, src, tst, sst, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_short_iput( trg, src, tst, sst, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_iput wrapper function ******************************************************/ void SHMEM_SHORT_IPUT( short * trg, const short * src, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_short_iput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_iput( trg, src, tst, sst, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_short_iput( trg, src, tst, sst, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_iput wrapper function ******************************************************/ void shmem_short_iput_( short * trg, const short * src, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_short_iput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_iput( trg, src, tst, sst, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_short_iput( trg, src, tst, sst, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_iput wrapper function ******************************************************/ void shmem_short_iput__( short * trg, const short * src, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_short_iput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_iput( trg, src, tst, sst, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_short_iput( trg, src, tst, sst, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_int_iput wrapper function ******************************************************/ void shmem_int_iput( int * trg, const int * src, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_int_iput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_iput( trg, src, tst, sst, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_int_iput( trg, src, tst, sst, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_iput wrapper function ******************************************************/ void SHMEM_INT_IPUT( int * trg, const int * src, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_int_iput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_iput( trg, src, tst, sst, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_int_iput( trg, src, tst, sst, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_iput wrapper function ******************************************************/ void shmem_int_iput_( int * trg, const int * src, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_int_iput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_iput( trg, src, tst, sst, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_int_iput( trg, src, tst, sst, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_iput wrapper function ******************************************************/ void shmem_int_iput__( int * trg, const int * src, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_int_iput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_iput( trg, src, tst, sst, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_int_iput( trg, src, tst, sst, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_long_iput wrapper function ******************************************************/ void shmem_long_iput( long * trg, const long * src, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_long_iput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_iput( trg, src, tst, sst, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_long_iput( trg, src, tst, sst, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_iput wrapper function ******************************************************/ void SHMEM_LONG_IPUT( long * trg, const long * src, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_long_iput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_iput( trg, src, tst, sst, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_long_iput( trg, src, tst, sst, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_iput wrapper function ******************************************************/ void shmem_long_iput_( long * trg, const long * src, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_long_iput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_iput( trg, src, tst, sst, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_long_iput( trg, src, tst, sst, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_iput wrapper function ******************************************************/ void shmem_long_iput__( long * trg, const long * src, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_long_iput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_iput( trg, src, tst, sst, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_long_iput( trg, src, tst, sst, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_longlong_iput wrapper function ******************************************************/ void shmem_longlong_iput( long long * trg, const long long * src, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_longlong_iput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_iput( trg, src, tst, sst, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_iput( trg, src, tst, sst, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_iput wrapper function ******************************************************/ void SHMEM_LONGLONG_IPUT( long long * trg, const long long * src, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_longlong_iput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_iput( trg, src, tst, sst, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_iput( trg, src, tst, sst, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_iput wrapper function ******************************************************/ void shmem_longlong_iput_( long long * trg, const long long * src, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_longlong_iput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_iput( trg, src, tst, sst, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_iput( trg, src, tst, sst, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_iput wrapper function ******************************************************/ void shmem_longlong_iput__( long long * trg, const long long * src, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_longlong_iput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_iput( trg, src, tst, sst, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_iput( trg, src, tst, sst, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_float_iput wrapper function ******************************************************/ void shmem_float_iput( float * trg, const float * src, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_float_iput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_float_iput( trg, src, tst, sst, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_float_iput( trg, src, tst, sst, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_float_iput wrapper function ******************************************************/ void SHMEM_FLOAT_IPUT( float * trg, const float * src, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_float_iput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_float_iput( trg, src, tst, sst, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_float_iput( trg, src, tst, sst, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_float_iput wrapper function ******************************************************/ void shmem_float_iput_( float * trg, const float * src, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_float_iput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_float_iput( trg, src, tst, sst, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_float_iput( trg, src, tst, sst, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_float_iput wrapper function ******************************************************/ void shmem_float_iput__( float * trg, const float * src, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_float_iput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_float_iput( trg, src, tst, sst, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_float_iput( trg, src, tst, sst, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_double_iput wrapper function ******************************************************/ void shmem_double_iput( double * trg, const double * src, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_double_iput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_double_iput( trg, src, tst, sst, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_double_iput( trg, src, tst, sst, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_double_iput wrapper function ******************************************************/ void SHMEM_DOUBLE_IPUT( double * trg, const double * src, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_double_iput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_double_iput( trg, src, tst, sst, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_double_iput( trg, src, tst, sst, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_double_iput wrapper function ******************************************************/ void shmem_double_iput_( double * trg, const double * src, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_double_iput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_double_iput( trg, src, tst, sst, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_double_iput( trg, src, tst, sst, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_double_iput wrapper function ******************************************************/ void shmem_double_iput__( double * trg, const double * src, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_double_iput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_double_iput( trg, src, tst, sst, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_double_iput( trg, src, tst, sst, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_iput16 wrapper function ******************************************************/ void shmem_iput16( void * trg, const void * src, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_iput16()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_iput16( trg, src, tst, sst, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_iput16( trg, src, tst, sst, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_iput16 wrapper function ******************************************************/ void SHMEM_IPUT16( void * trg, const void * src, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_iput16()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_iput16( trg, src, tst, sst, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_iput16( trg, src, tst, sst, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_iput16 wrapper function ******************************************************/ void shmem_iput16_( void * trg, const void * src, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_iput16()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_iput16( trg, src, tst, sst, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_iput16( trg, src, tst, sst, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_iput16 wrapper function ******************************************************/ void shmem_iput16__( void * trg, const void * src, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_iput16()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_iput16( trg, src, tst, sst, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_iput16( trg, src, tst, sst, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_iput32 wrapper function ******************************************************/ void shmem_iput32( void * trg, const void * src, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_iput32()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_iput32( trg, src, tst, sst, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_iput32( trg, src, tst, sst, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_iput32 wrapper function ******************************************************/ void SHMEM_IPUT32( void * trg, const void * src, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_iput32()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_iput32( trg, src, tst, sst, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_iput32( trg, src, tst, sst, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_iput32 wrapper function ******************************************************/ void shmem_iput32_( void * trg, const void * src, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_iput32()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_iput32( trg, src, tst, sst, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_iput32( trg, src, tst, sst, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_iput32 wrapper function ******************************************************/ void shmem_iput32__( void * trg, const void * src, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_iput32()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_iput32( trg, src, tst, sst, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_iput32( trg, src, tst, sst, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_iput64 wrapper function ******************************************************/ void shmem_iput64( void * trg, const void * src, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_iput64()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_iput64( trg, src, tst, sst, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_iput64( trg, src, tst, sst, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_iput64 wrapper function ******************************************************/ void SHMEM_IPUT64( void * trg, const void * src, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_iput64()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_iput64( trg, src, tst, sst, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_iput64( trg, src, tst, sst, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_iput64 wrapper function ******************************************************/ void shmem_iput64_( void * trg, const void * src, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_iput64()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_iput64( trg, src, tst, sst, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_iput64( trg, src, tst, sst, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_iput64 wrapper function ******************************************************/ void shmem_iput64__( void * trg, const void * src, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_iput64()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_iput64( trg, src, tst, sst, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_iput64( trg, src, tst, sst, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_iput128 wrapper function ******************************************************/ void shmem_iput128( void * trg, const void * src, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_iput128()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_iput128( trg, src, tst, sst, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_iput128( trg, src, tst, sst, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_iput128 wrapper function ******************************************************/ void SHMEM_IPUT128( void * trg, const void * src, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_iput128()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_iput128( trg, src, tst, sst, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_iput128( trg, src, tst, sst, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_iput128 wrapper function ******************************************************/ void shmem_iput128_( void * trg, const void * src, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_iput128()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_iput128( trg, src, tst, sst, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_iput128( trg, src, tst, sst, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_iput128 wrapper function ******************************************************/ void shmem_iput128__( void * trg, const void * src, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_iput128()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_iput128( trg, src, tst, sst, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_iput128( trg, src, tst, sst, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_char_g wrapper function ******************************************************/ char shmem_char_g( const char * addr, int pe) { char retvalue; TAU_PROFILE_TIMER(t, "shmem_char_g()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_char_g( addr, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_char_g( addr, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_char_g wrapper function ******************************************************/ char SHMEM_CHAR_G( const char * addr, int pe) { char retvalue; TAU_PROFILE_TIMER(t, "shmem_char_g()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_char_g( addr, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_char_g( addr, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_char_g wrapper function ******************************************************/ char shmem_char_g_( const char * addr, int pe) { char retvalue; TAU_PROFILE_TIMER(t, "shmem_char_g()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_char_g( addr, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_char_g( addr, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_char_g wrapper function ******************************************************/ char shmem_char_g__( const char * addr, int pe) { char retvalue; TAU_PROFILE_TIMER(t, "shmem_char_g()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_char_g( addr, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_char_g( addr, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_short_g wrapper function ******************************************************/ short shmem_short_g( const short * addr, int pe) { short retvalue; TAU_PROFILE_TIMER(t, "shmem_short_g()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_short_g( addr, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_short_g( addr, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_short_g wrapper function ******************************************************/ short SHMEM_SHORT_G( const short * addr, int pe) { short retvalue; TAU_PROFILE_TIMER(t, "shmem_short_g()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_short_g( addr, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_short_g( addr, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_short_g wrapper function ******************************************************/ short shmem_short_g_( const short * addr, int pe) { short retvalue; TAU_PROFILE_TIMER(t, "shmem_short_g()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_short_g( addr, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_short_g( addr, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_short_g wrapper function ******************************************************/ short shmem_short_g__( const short * addr, int pe) { short retvalue; TAU_PROFILE_TIMER(t, "shmem_short_g()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_short_g( addr, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_short_g( addr, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_int_g wrapper function ******************************************************/ int shmem_int_g( const int * addr, int pe) { int retvalue; TAU_PROFILE_TIMER(t, "shmem_int_g()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_int_g( addr, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_int_g( addr, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_int_g wrapper function ******************************************************/ int SHMEM_INT_G( const int * addr, int pe) { int retvalue; TAU_PROFILE_TIMER(t, "shmem_int_g()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_int_g( addr, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_int_g( addr, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_int_g wrapper function ******************************************************/ int shmem_int_g_( const int * addr, int pe) { int retvalue; TAU_PROFILE_TIMER(t, "shmem_int_g()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_int_g( addr, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_int_g( addr, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_int_g wrapper function ******************************************************/ int shmem_int_g__( const int * addr, int pe) { int retvalue; TAU_PROFILE_TIMER(t, "shmem_int_g()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_int_g( addr, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_int_g( addr, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_long_g wrapper function ******************************************************/ long shmem_long_g( const long * addr, int pe) { long retvalue; TAU_PROFILE_TIMER(t, "shmem_long_g()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_long_g( addr, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_long_g( addr, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_long_g wrapper function ******************************************************/ long SHMEM_LONG_G( const long * addr, int pe) { long retvalue; TAU_PROFILE_TIMER(t, "shmem_long_g()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_long_g( addr, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_long_g( addr, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_long_g wrapper function ******************************************************/ long shmem_long_g_( const long * addr, int pe) { long retvalue; TAU_PROFILE_TIMER(t, "shmem_long_g()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_long_g( addr, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_long_g( addr, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_long_g wrapper function ******************************************************/ long shmem_long_g__( const long * addr, int pe) { long retvalue; TAU_PROFILE_TIMER(t, "shmem_long_g()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_long_g( addr, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_long_g( addr, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_longlong_g wrapper function ******************************************************/ long long shmem_longlong_g( const long long * addr, int pe) { long long retvalue; TAU_PROFILE_TIMER(t, "shmem_longlong_g()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_longlong_g( addr, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_longlong_g( addr, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_longlong_g wrapper function ******************************************************/ long long SHMEM_LONGLONG_G( const long long * addr, int pe) { long long retvalue; TAU_PROFILE_TIMER(t, "shmem_longlong_g()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_longlong_g( addr, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_longlong_g( addr, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_longlong_g wrapper function ******************************************************/ long long shmem_longlong_g_( const long long * addr, int pe) { long long retvalue; TAU_PROFILE_TIMER(t, "shmem_longlong_g()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_longlong_g( addr, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_longlong_g( addr, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_longlong_g wrapper function ******************************************************/ long long shmem_longlong_g__( const long long * addr, int pe) { long long retvalue; TAU_PROFILE_TIMER(t, "shmem_longlong_g()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_longlong_g( addr, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_longlong_g( addr, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_float_g wrapper function ******************************************************/ float shmem_float_g( const float * addr, int pe) { float retvalue; TAU_PROFILE_TIMER(t, "shmem_float_g()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_float_g( addr, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_float_g( addr, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_float_g wrapper function ******************************************************/ float SHMEM_FLOAT_G( const float * addr, int pe) { float retvalue; TAU_PROFILE_TIMER(t, "shmem_float_g()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_float_g( addr, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_float_g( addr, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_float_g wrapper function ******************************************************/ float shmem_float_g_( const float * addr, int pe) { float retvalue; TAU_PROFILE_TIMER(t, "shmem_float_g()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_float_g( addr, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_float_g( addr, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_float_g wrapper function ******************************************************/ float shmem_float_g__( const float * addr, int pe) { float retvalue; TAU_PROFILE_TIMER(t, "shmem_float_g()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_float_g( addr, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_float_g( addr, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_double_g wrapper function ******************************************************/ double shmem_double_g( const double * addr, int pe) { double retvalue; TAU_PROFILE_TIMER(t, "shmem_double_g()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_double_g( addr, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_double_g( addr, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_double_g wrapper function ******************************************************/ double SHMEM_DOUBLE_G( const double * addr, int pe) { double retvalue; TAU_PROFILE_TIMER(t, "shmem_double_g()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_double_g( addr, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_double_g( addr, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_double_g wrapper function ******************************************************/ double shmem_double_g_( const double * addr, int pe) { double retvalue; TAU_PROFILE_TIMER(t, "shmem_double_g()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_double_g( addr, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_double_g( addr, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_double_g wrapper function ******************************************************/ double shmem_double_g__( const double * addr, int pe) { double retvalue; TAU_PROFILE_TIMER(t, "shmem_double_g()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_double_g( addr, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_double_g( addr, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_char_p wrapper function ******************************************************/ void shmem_char_p( char * addr, char value, int pe) { TAU_PROFILE_TIMER(t, "shmem_char_p()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_char_p( addr, value, pe) ; #else /* !TAU_P_SHMEM */ pshmem_char_p( addr, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_char_p wrapper function ******************************************************/ void SHMEM_CHAR_P( char * addr, char value, int pe) { TAU_PROFILE_TIMER(t, "shmem_char_p()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_char_p( addr, value, pe) ; #else /* !TAU_P_SHMEM */ pshmem_char_p( addr, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_char_p wrapper function ******************************************************/ void shmem_char_p_( char * addr, char value, int pe) { TAU_PROFILE_TIMER(t, "shmem_char_p()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_char_p( addr, value, pe) ; #else /* !TAU_P_SHMEM */ pshmem_char_p( addr, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_char_p wrapper function ******************************************************/ void shmem_char_p__( char * addr, char value, int pe) { TAU_PROFILE_TIMER(t, "shmem_char_p()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_char_p( addr, value, pe) ; #else /* !TAU_P_SHMEM */ pshmem_char_p( addr, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_short_p wrapper function ******************************************************/ void shmem_short_p( short * addr, short value, int pe) { TAU_PROFILE_TIMER(t, "shmem_short_p()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_p( addr, value, pe) ; #else /* !TAU_P_SHMEM */ pshmem_short_p( addr, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_p wrapper function ******************************************************/ void SHMEM_SHORT_P( short * addr, short value, int pe) { TAU_PROFILE_TIMER(t, "shmem_short_p()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_p( addr, value, pe) ; #else /* !TAU_P_SHMEM */ pshmem_short_p( addr, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_p wrapper function ******************************************************/ void shmem_short_p_( short * addr, short value, int pe) { TAU_PROFILE_TIMER(t, "shmem_short_p()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_p( addr, value, pe) ; #else /* !TAU_P_SHMEM */ pshmem_short_p( addr, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_p wrapper function ******************************************************/ void shmem_short_p__( short * addr, short value, int pe) { TAU_PROFILE_TIMER(t, "shmem_short_p()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_p( addr, value, pe) ; #else /* !TAU_P_SHMEM */ pshmem_short_p( addr, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_int_p wrapper function ******************************************************/ void shmem_int_p( int * addr, int value, int pe) { TAU_PROFILE_TIMER(t, "shmem_int_p()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_p( addr, value, pe) ; #else /* !TAU_P_SHMEM */ pshmem_int_p( addr, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_p wrapper function ******************************************************/ void SHMEM_INT_P( int * addr, int value, int pe) { TAU_PROFILE_TIMER(t, "shmem_int_p()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_p( addr, value, pe) ; #else /* !TAU_P_SHMEM */ pshmem_int_p( addr, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_p wrapper function ******************************************************/ void shmem_int_p_( int * addr, int value, int pe) { TAU_PROFILE_TIMER(t, "shmem_int_p()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_p( addr, value, pe) ; #else /* !TAU_P_SHMEM */ pshmem_int_p( addr, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_p wrapper function ******************************************************/ void shmem_int_p__( int * addr, int value, int pe) { TAU_PROFILE_TIMER(t, "shmem_int_p()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_p( addr, value, pe) ; #else /* !TAU_P_SHMEM */ pshmem_int_p( addr, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_long_p wrapper function ******************************************************/ void shmem_long_p( long * addr, long value, int pe) { TAU_PROFILE_TIMER(t, "shmem_long_p()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_p( addr, value, pe) ; #else /* !TAU_P_SHMEM */ pshmem_long_p( addr, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_p wrapper function ******************************************************/ void SHMEM_LONG_P( long * addr, long value, int pe) { TAU_PROFILE_TIMER(t, "shmem_long_p()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_p( addr, value, pe) ; #else /* !TAU_P_SHMEM */ pshmem_long_p( addr, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_p wrapper function ******************************************************/ void shmem_long_p_( long * addr, long value, int pe) { TAU_PROFILE_TIMER(t, "shmem_long_p()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_p( addr, value, pe) ; #else /* !TAU_P_SHMEM */ pshmem_long_p( addr, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_p wrapper function ******************************************************/ void shmem_long_p__( long * addr, long value, int pe) { TAU_PROFILE_TIMER(t, "shmem_long_p()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_p( addr, value, pe) ; #else /* !TAU_P_SHMEM */ pshmem_long_p( addr, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_longlong_p wrapper function ******************************************************/ void shmem_longlong_p( long long * addr, long long value, int pe) { TAU_PROFILE_TIMER(t, "shmem_longlong_p()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_p( addr, value, pe) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_p( addr, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_p wrapper function ******************************************************/ void SHMEM_LONGLONG_P( long long * addr, long long value, int pe) { TAU_PROFILE_TIMER(t, "shmem_longlong_p()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_p( addr, value, pe) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_p( addr, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_p wrapper function ******************************************************/ void shmem_longlong_p_( long long * addr, long long value, int pe) { TAU_PROFILE_TIMER(t, "shmem_longlong_p()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_p( addr, value, pe) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_p( addr, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_p wrapper function ******************************************************/ void shmem_longlong_p__( long long * addr, long long value, int pe) { TAU_PROFILE_TIMER(t, "shmem_longlong_p()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_p( addr, value, pe) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_p( addr, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_float_p wrapper function ******************************************************/ void shmem_float_p( float * addr, float value, int pe) { TAU_PROFILE_TIMER(t, "shmem_float_p()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_float_p( addr, value, pe) ; #else /* !TAU_P_SHMEM */ pshmem_float_p( addr, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_float_p wrapper function ******************************************************/ void SHMEM_FLOAT_P( float * addr, float value, int pe) { TAU_PROFILE_TIMER(t, "shmem_float_p()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_float_p( addr, value, pe) ; #else /* !TAU_P_SHMEM */ pshmem_float_p( addr, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_float_p wrapper function ******************************************************/ void shmem_float_p_( float * addr, float value, int pe) { TAU_PROFILE_TIMER(t, "shmem_float_p()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_float_p( addr, value, pe) ; #else /* !TAU_P_SHMEM */ pshmem_float_p( addr, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_float_p wrapper function ******************************************************/ void shmem_float_p__( float * addr, float value, int pe) { TAU_PROFILE_TIMER(t, "shmem_float_p()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_float_p( addr, value, pe) ; #else /* !TAU_P_SHMEM */ pshmem_float_p( addr, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_double_p wrapper function ******************************************************/ void shmem_double_p( double * addr, double value, int pe) { TAU_PROFILE_TIMER(t, "shmem_double_p()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_double_p( addr, value, pe) ; #else /* !TAU_P_SHMEM */ pshmem_double_p( addr, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_double_p wrapper function ******************************************************/ void SHMEM_DOUBLE_P( double * addr, double value, int pe) { TAU_PROFILE_TIMER(t, "shmem_double_p()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_double_p( addr, value, pe) ; #else /* !TAU_P_SHMEM */ pshmem_double_p( addr, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_double_p wrapper function ******************************************************/ void shmem_double_p_( double * addr, double value, int pe) { TAU_PROFILE_TIMER(t, "shmem_double_p()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_double_p( addr, value, pe) ; #else /* !TAU_P_SHMEM */ pshmem_double_p( addr, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_double_p wrapper function ******************************************************/ void shmem_double_p__( double * addr, double value, int pe) { TAU_PROFILE_TIMER(t, "shmem_double_p()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_double_p( addr, value, pe) ; #else /* !TAU_P_SHMEM */ pshmem_double_p( addr, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_int_swap wrapper function ******************************************************/ int shmem_int_swap( int * addr, int value, int pe) { int retvalue; TAU_PROFILE_TIMER(t, "shmem_int_swap()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_int_swap( addr, value, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_int_swap( addr, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_int_swap wrapper function ******************************************************/ int SHMEM_INT_SWAP( int * addr, int value, int pe) { int retvalue; TAU_PROFILE_TIMER(t, "shmem_int_swap()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_int_swap( addr, value, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_int_swap( addr, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_int_swap wrapper function ******************************************************/ int shmem_int_swap_( int * addr, int value, int pe) { int retvalue; TAU_PROFILE_TIMER(t, "shmem_int_swap()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_int_swap( addr, value, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_int_swap( addr, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_int_swap wrapper function ******************************************************/ int shmem_int_swap__( int * addr, int value, int pe) { int retvalue; TAU_PROFILE_TIMER(t, "shmem_int_swap()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_int_swap( addr, value, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_int_swap( addr, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_long_swap wrapper function ******************************************************/ long shmem_long_swap( long * addr, long value, int pe) { long retvalue; TAU_PROFILE_TIMER(t, "shmem_long_swap()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_long_swap( addr, value, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_long_swap( addr, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_long_swap wrapper function ******************************************************/ long SHMEM_LONG_SWAP( long * addr, long value, int pe) { long retvalue; TAU_PROFILE_TIMER(t, "shmem_long_swap()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_long_swap( addr, value, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_long_swap( addr, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_long_swap wrapper function ******************************************************/ long shmem_long_swap_( long * addr, long value, int pe) { long retvalue; TAU_PROFILE_TIMER(t, "shmem_long_swap()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_long_swap( addr, value, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_long_swap( addr, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_long_swap wrapper function ******************************************************/ long shmem_long_swap__( long * addr, long value, int pe) { long retvalue; TAU_PROFILE_TIMER(t, "shmem_long_swap()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_long_swap( addr, value, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_long_swap( addr, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /******************************************************/ /******************************************************/ #ifndef TAU_CATAMOUNT /****************************************************** *** shmem_float_swap wrapper function ******************************************************/ float shmem_float_swap( float * addr, float value, int pe) { float retvalue; TAU_PROFILE_TIMER(t, "shmem_float_swap()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_float_swap( addr, value, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_float_swap( addr, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_float_swap wrapper function ******************************************************/ float SHMEM_FLOAT_SWAP( float * addr, float value, int pe) { float retvalue; TAU_PROFILE_TIMER(t, "shmem_float_swap()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_float_swap( addr, value, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_float_swap( addr, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_float_swap wrapper function ******************************************************/ float shmem_float_swap_( float * addr, float value, int pe) { float retvalue; TAU_PROFILE_TIMER(t, "shmem_float_swap()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_float_swap( addr, value, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_float_swap( addr, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_float_swap wrapper function ******************************************************/ float shmem_float_swap__( float * addr, float value, int pe) { float retvalue; TAU_PROFILE_TIMER(t, "shmem_float_swap()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_float_swap( addr, value, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_float_swap( addr, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_double_swap wrapper function ******************************************************/ double shmem_double_swap( double * addr, double value, int pe) { double retvalue; TAU_PROFILE_TIMER(t, "shmem_double_swap()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_double_swap( addr, value, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_double_swap( addr, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_double_swap wrapper function ******************************************************/ double SHMEM_DOUBLE_SWAP( double * addr, double value, int pe) { double retvalue; TAU_PROFILE_TIMER(t, "shmem_double_swap()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_double_swap( addr, value, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_double_swap( addr, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_double_swap wrapper function ******************************************************/ double shmem_double_swap_( double * addr, double value, int pe) { double retvalue; TAU_PROFILE_TIMER(t, "shmem_double_swap()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_double_swap( addr, value, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_double_swap( addr, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_double_swap wrapper function ******************************************************/ double shmem_double_swap__( double * addr, double value, int pe) { double retvalue; TAU_PROFILE_TIMER(t, "shmem_double_swap()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_double_swap( addr, value, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_double_swap( addr, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_int_cswap wrapper function ******************************************************/ int shmem_int_cswap( int * addr, int match, int value, int pe) { int retvalue; TAU_PROFILE_TIMER(t, "shmem_int_cswap()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_int_cswap( addr, match, value, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_int_cswap( addr, match, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_int_cswap wrapper function ******************************************************/ int SHMEM_INT_CSWAP( int * addr, int match, int value, int pe) { int retvalue; TAU_PROFILE_TIMER(t, "shmem_int_cswap()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_int_cswap( addr, match, value, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_int_cswap( addr, match, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_int_cswap wrapper function ******************************************************/ int shmem_int_cswap_( int * addr, int match, int value, int pe) { int retvalue; TAU_PROFILE_TIMER(t, "shmem_int_cswap()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_int_cswap( addr, match, value, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_int_cswap( addr, match, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_int_cswap wrapper function ******************************************************/ int shmem_int_cswap__( int * addr, int match, int value, int pe) { int retvalue; TAU_PROFILE_TIMER(t, "shmem_int_cswap()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_int_cswap( addr, match, value, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_int_cswap( addr, match, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_long_cswap wrapper function ******************************************************/ long shmem_long_cswap( long * addr, long match, long value, int pe) { long retvalue; TAU_PROFILE_TIMER(t, "shmem_long_cswap()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_long_cswap( addr, match, value, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_long_cswap( addr, match, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_long_cswap wrapper function ******************************************************/ long SHMEM_LONG_CSWAP( long * addr, long match, long value, int pe) { long retvalue; TAU_PROFILE_TIMER(t, "shmem_long_cswap()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_long_cswap( addr, match, value, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_long_cswap( addr, match, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_long_cswap wrapper function ******************************************************/ long shmem_long_cswap_( long * addr, long match, long value, int pe) { long retvalue; TAU_PROFILE_TIMER(t, "shmem_long_cswap()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_long_cswap( addr, match, value, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_long_cswap( addr, match, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_long_cswap wrapper function ******************************************************/ long shmem_long_cswap__( long * addr, long match, long value, int pe) { long retvalue; TAU_PROFILE_TIMER(t, "shmem_long_cswap()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_long_cswap( addr, match, value, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_long_cswap( addr, match, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /******************************************************/ /******************************************************/ #endif /* TAU_CATAMOUNT */ /****************************************************** *** shmem_int_finc wrapper function ******************************************************/ int shmem_int_finc( int * addr, int pe) { int retvalue; TAU_PROFILE_TIMER(t, "shmem_int_finc()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_int_finc( addr, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_int_finc( addr, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_int_finc wrapper function ******************************************************/ int SHMEM_INT_FINC( int * addr, int pe) { int retvalue; TAU_PROFILE_TIMER(t, "shmem_int_finc()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_int_finc( addr, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_int_finc( addr, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_int_finc wrapper function ******************************************************/ int shmem_int_finc_( int * addr, int pe) { int retvalue; TAU_PROFILE_TIMER(t, "shmem_int_finc()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_int_finc( addr, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_int_finc( addr, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_int_finc wrapper function ******************************************************/ int shmem_int_finc__( int * addr, int pe) { int retvalue; TAU_PROFILE_TIMER(t, "shmem_int_finc()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_int_finc( addr, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_int_finc( addr, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_long_finc wrapper function ******************************************************/ long shmem_long_finc( long * target, int pe) { long retvalue; TAU_PROFILE_TIMER(t, "shmem_long_finc()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_long_finc( target, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_long_finc( target, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_long_finc wrapper function ******************************************************/ long SHMEM_LONG_FINC( long * target, int pe) { long retvalue; TAU_PROFILE_TIMER(t, "shmem_long_finc()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_long_finc( target, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_long_finc( target, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_long_finc wrapper function ******************************************************/ long shmem_long_finc_( long * target, int pe) { long retvalue; TAU_PROFILE_TIMER(t, "shmem_long_finc()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_long_finc( target, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_long_finc( target, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_long_finc wrapper function ******************************************************/ long shmem_long_finc__( long * target, int pe) { long retvalue; TAU_PROFILE_TIMER(t, "shmem_long_finc()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_long_finc( target, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_long_finc( target, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_int_fadd wrapper function ******************************************************/ int shmem_int_fadd( int * addr, int value, int pe) { int retvalue; TAU_PROFILE_TIMER(t, "shmem_int_fadd()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_int_fadd( addr, value, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_int_fadd( addr, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_int_fadd wrapper function ******************************************************/ int SHMEM_INT_FADD( int * addr, int value, int pe) { int retvalue; TAU_PROFILE_TIMER(t, "shmem_int_fadd()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_int_fadd( addr, value, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_int_fadd( addr, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_int_fadd wrapper function ******************************************************/ int shmem_int_fadd_( int * addr, int value, int pe) { int retvalue; TAU_PROFILE_TIMER(t, "shmem_int_fadd()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_int_fadd( addr, value, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_int_fadd( addr, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_int_fadd wrapper function ******************************************************/ int shmem_int_fadd__( int * addr, int value, int pe) { int retvalue; TAU_PROFILE_TIMER(t, "shmem_int_fadd()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_int_fadd( addr, value, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_int_fadd( addr, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_long_fadd wrapper function ******************************************************/ long shmem_long_fadd( long * target, long value, int pe) { long retvalue; TAU_PROFILE_TIMER(t, "shmem_long_fadd()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_long_fadd( target, value, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_long_fadd( target, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_long_fadd wrapper function ******************************************************/ long SHMEM_LONG_FADD( long * target, long value, int pe) { long retvalue; TAU_PROFILE_TIMER(t, "shmem_long_fadd()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_long_fadd( target, value, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_long_fadd( target, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_long_fadd wrapper function ******************************************************/ long shmem_long_fadd_( long * target, long value, int pe) { long retvalue; TAU_PROFILE_TIMER(t, "shmem_long_fadd()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_long_fadd( target, value, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_long_fadd( target, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_long_fadd wrapper function ******************************************************/ long shmem_long_fadd__( long * target, long value, int pe) { long retvalue; TAU_PROFILE_TIMER(t, "shmem_long_fadd()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_long_fadd( target, value, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_long_fadd( target, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_barrier_all wrapper function ******************************************************/ void shmem_barrier_all( ) { TAU_PROFILE_TIMER(t, "shmem_barrier_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_barrier_all( ) ; #else /* !TAU_P_SHMEM */ pshmem_barrier_all( ) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_barrier_all wrapper function ******************************************************/ void SHMEM_BARRIER_ALL( ) { TAU_PROFILE_TIMER(t, "shmem_barrier_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_barrier_all( ) ; #else /* !TAU_P_SHMEM */ pshmem_barrier_all( ) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_barrier_all wrapper function ******************************************************/ void shmem_barrier_all_( ) { TAU_PROFILE_TIMER(t, "shmem_barrier_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_barrier_all( ) ; #else /* !TAU_P_SHMEM */ pshmem_barrier_all( ) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_barrier_all wrapper function ******************************************************/ void shmem_barrier_all__( ) { TAU_PROFILE_TIMER(t, "shmem_barrier_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_barrier_all( ) ; #else /* !TAU_P_SHMEM */ pshmem_barrier_all( ) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_barrier wrapper function ******************************************************/ void shmem_barrier( int pestart, int log_pestride, int pesize, long * bar) { TAU_PROFILE_TIMER(t, "shmem_barrier()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_barrier( pestart, log_pestride, pesize, bar) ; #else /* !TAU_P_SHMEM */ pshmem_barrier( pestart, log_pestride, pesize, bar) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_barrier wrapper function ******************************************************/ void SHMEM_BARRIER( int pestart, int log_pestride, int pesize, long * bar) { TAU_PROFILE_TIMER(t, "shmem_barrier()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_barrier( pestart, log_pestride, pesize, bar) ; #else /* !TAU_P_SHMEM */ pshmem_barrier( pestart, log_pestride, pesize, bar) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_barrier wrapper function ******************************************************/ void shmem_barrier_( int pestart, int log_pestride, int pesize, long * bar) { TAU_PROFILE_TIMER(t, "shmem_barrier()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_barrier( pestart, log_pestride, pesize, bar) ; #else /* !TAU_P_SHMEM */ pshmem_barrier( pestart, log_pestride, pesize, bar) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_barrier wrapper function ******************************************************/ void shmem_barrier__( int pestart, int log_pestride, int pesize, long * bar) { TAU_PROFILE_TIMER(t, "shmem_barrier()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_barrier( pestart, log_pestride, pesize, bar) ; #else /* !TAU_P_SHMEM */ pshmem_barrier( pestart, log_pestride, pesize, bar) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_quiet wrapper function ******************************************************/ void shmem_quiet( ) { TAU_PROFILE_TIMER(t, "shmem_quiet()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_quiet( ) ; #else /* !TAU_P_SHMEM */ pshmem_quiet( ) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_quiet wrapper function ******************************************************/ void SHMEM_QUIET( ) { TAU_PROFILE_TIMER(t, "shmem_quiet()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_quiet( ) ; #else /* !TAU_P_SHMEM */ pshmem_quiet( ) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_quiet wrapper function ******************************************************/ void shmem_quiet_( ) { TAU_PROFILE_TIMER(t, "shmem_quiet()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_quiet( ) ; #else /* !TAU_P_SHMEM */ pshmem_quiet( ) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_quiet wrapper function ******************************************************/ void shmem_quiet__( ) { TAU_PROFILE_TIMER(t, "shmem_quiet()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_quiet( ) ; #else /* !TAU_P_SHMEM */ pshmem_quiet( ) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ #ifndef TAU_CATAMOUNT /****************************************************** *** shmem_set_lock wrapper function ******************************************************/ void shmem_set_lock( long * lock) { TAU_PROFILE_TIMER(t, "shmem_set_lock()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_set_lock( lock) ; #else /* !TAU_P_SHMEM */ pshmem_set_lock( lock) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_set_lock wrapper function ******************************************************/ void SHMEM_SET_LOCK( long * lock) { TAU_PROFILE_TIMER(t, "shmem_set_lock()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_set_lock( lock) ; #else /* !TAU_P_SHMEM */ pshmem_set_lock( lock) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_set_lock wrapper function ******************************************************/ void shmem_set_lock_( long * lock) { TAU_PROFILE_TIMER(t, "shmem_set_lock()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_set_lock( lock) ; #else /* !TAU_P_SHMEM */ pshmem_set_lock( lock) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_set_lock wrapper function ******************************************************/ void shmem_set_lock__( long * lock) { TAU_PROFILE_TIMER(t, "shmem_set_lock()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_set_lock( lock) ; #else /* !TAU_P_SHMEM */ pshmem_set_lock( lock) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_clear_lock wrapper function ******************************************************/ void shmem_clear_lock( long * lock) { TAU_PROFILE_TIMER(t, "shmem_clear_lock()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_clear_lock( lock) ; #else /* !TAU_P_SHMEM */ pshmem_clear_lock( lock) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_clear_lock wrapper function ******************************************************/ void SHMEM_CLEAR_LOCK( long * lock) { TAU_PROFILE_TIMER(t, "shmem_clear_lock()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_clear_lock( lock) ; #else /* !TAU_P_SHMEM */ pshmem_clear_lock( lock) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_clear_lock wrapper function ******************************************************/ void shmem_clear_lock_( long * lock) { TAU_PROFILE_TIMER(t, "shmem_clear_lock()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_clear_lock( lock) ; #else /* !TAU_P_SHMEM */ pshmem_clear_lock( lock) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_clear_lock wrapper function ******************************************************/ void shmem_clear_lock__( long * lock) { TAU_PROFILE_TIMER(t, "shmem_clear_lock()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_clear_lock( lock) ; #else /* !TAU_P_SHMEM */ pshmem_clear_lock( lock) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_test_lock wrapper function ******************************************************/ int shmem_test_lock( long * lock) { int retvalue; TAU_PROFILE_TIMER(t, "shmem_test_lock()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_test_lock( lock) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_test_lock( lock) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_test_lock wrapper function ******************************************************/ int SHMEM_TEST_LOCK( long * lock) { int retvalue; TAU_PROFILE_TIMER(t, "shmem_test_lock()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_test_lock( lock) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_test_lock( lock) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_test_lock wrapper function ******************************************************/ int shmem_test_lock_( long * lock) { int retvalue; TAU_PROFILE_TIMER(t, "shmem_test_lock()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_test_lock( lock) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_test_lock( lock) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_test_lock wrapper function ******************************************************/ int shmem_test_lock__( long * lock) { int retvalue; TAU_PROFILE_TIMER(t, "shmem_test_lock()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_test_lock( lock) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_test_lock( lock) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /******************************************************/ /******************************************************/ #endif /* TAU_CATAMOUNT */ /****************************************************** *** shmem_clear_event wrapper function ******************************************************/ void shmem_clear_event( long * event) { TAU_PROFILE_TIMER(t, "shmem_clear_event()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_clear_event( event) ; #else /* !TAU_P_SHMEM */ pshmem_clear_event( event) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_clear_event wrapper function ******************************************************/ void SHMEM_CLEAR_EVENT( long * event) { TAU_PROFILE_TIMER(t, "shmem_clear_event()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_clear_event( event) ; #else /* !TAU_P_SHMEM */ pshmem_clear_event( event) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_clear_event wrapper function ******************************************************/ void shmem_clear_event_( long * event) { TAU_PROFILE_TIMER(t, "shmem_clear_event()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_clear_event( event) ; #else /* !TAU_P_SHMEM */ pshmem_clear_event( event) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_clear_event wrapper function ******************************************************/ void shmem_clear_event__( long * event) { TAU_PROFILE_TIMER(t, "shmem_clear_event()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_clear_event( event) ; #else /* !TAU_P_SHMEM */ pshmem_clear_event( event) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_set_event wrapper function ******************************************************/ void shmem_set_event( long * event) { TAU_PROFILE_TIMER(t, "shmem_set_event()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_set_event( event) ; #else /* !TAU_P_SHMEM */ pshmem_set_event( event) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_set_event wrapper function ******************************************************/ void SHMEM_SET_EVENT( long * event) { TAU_PROFILE_TIMER(t, "shmem_set_event()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_set_event( event) ; #else /* !TAU_P_SHMEM */ pshmem_set_event( event) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_set_event wrapper function ******************************************************/ void shmem_set_event_( long * event) { TAU_PROFILE_TIMER(t, "shmem_set_event()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_set_event( event) ; #else /* !TAU_P_SHMEM */ pshmem_set_event( event) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_set_event wrapper function ******************************************************/ void shmem_set_event__( long * event) { TAU_PROFILE_TIMER(t, "shmem_set_event()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_set_event( event) ; #else /* !TAU_P_SHMEM */ pshmem_set_event( event) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_test_event wrapper function ******************************************************/ int shmem_test_event( long * event) { int retvalue; TAU_PROFILE_TIMER(t, "shmem_test_event()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_test_event( event) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_test_event( event) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_test_event wrapper function ******************************************************/ int SHMEM_TEST_EVENT( long * event) { int retvalue; TAU_PROFILE_TIMER(t, "shmem_test_event()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_test_event( event) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_test_event( event) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_test_event wrapper function ******************************************************/ int shmem_test_event_( long * event) { int retvalue; TAU_PROFILE_TIMER(t, "shmem_test_event()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_test_event( event) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_test_event( event) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_test_event wrapper function ******************************************************/ int shmem_test_event__( long * event) { int retvalue; TAU_PROFILE_TIMER(t, "shmem_test_event()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_test_event( event) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_test_event( event) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_wait_event wrapper function ******************************************************/ void shmem_wait_event( long * event) { TAU_PROFILE_TIMER(t, "shmem_wait_event()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_wait_event( event) ; #else /* !TAU_P_SHMEM */ pshmem_wait_event( event) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_wait_event wrapper function ******************************************************/ void SHMEM_WAIT_EVENT( long * event) { TAU_PROFILE_TIMER(t, "shmem_wait_event()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_wait_event( event) ; #else /* !TAU_P_SHMEM */ pshmem_wait_event( event) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_wait_event wrapper function ******************************************************/ void shmem_wait_event_( long * event) { TAU_PROFILE_TIMER(t, "shmem_wait_event()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_wait_event( event) ; #else /* !TAU_P_SHMEM */ pshmem_wait_event( event) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_wait_event wrapper function ******************************************************/ void shmem_wait_event__( long * event) { TAU_PROFILE_TIMER(t, "shmem_wait_event()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_wait_event( event) ; #else /* !TAU_P_SHMEM */ pshmem_wait_event( event) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_short_wait wrapper function ******************************************************/ void shmem_short_wait( short * var, short value) { TAU_PROFILE_TIMER(t, "shmem_short_wait()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_wait( var, value) ; #else /* !TAU_P_SHMEM */ pshmem_short_wait( var, value) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_wait wrapper function ******************************************************/ void SHMEM_SHORT_WAIT( short * var, short value) { TAU_PROFILE_TIMER(t, "shmem_short_wait()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_wait( var, value) ; #else /* !TAU_P_SHMEM */ pshmem_short_wait( var, value) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_wait wrapper function ******************************************************/ void shmem_short_wait_( short * var, short value) { TAU_PROFILE_TIMER(t, "shmem_short_wait()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_wait( var, value) ; #else /* !TAU_P_SHMEM */ pshmem_short_wait( var, value) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_wait wrapper function ******************************************************/ void shmem_short_wait__( short * var, short value) { TAU_PROFILE_TIMER(t, "shmem_short_wait()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_wait( var, value) ; #else /* !TAU_P_SHMEM */ pshmem_short_wait( var, value) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_int_wait wrapper function ******************************************************/ void shmem_int_wait( int * var, int value) { TAU_PROFILE_TIMER(t, "shmem_int_wait()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_wait( var, value) ; #else /* !TAU_P_SHMEM */ pshmem_int_wait( var, value) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_wait wrapper function ******************************************************/ void SHMEM_INT_WAIT( int * var, int value) { TAU_PROFILE_TIMER(t, "shmem_int_wait()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_wait( var, value) ; #else /* !TAU_P_SHMEM */ pshmem_int_wait( var, value) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_wait wrapper function ******************************************************/ void shmem_int_wait_( int * var, int value) { TAU_PROFILE_TIMER(t, "shmem_int_wait()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_wait( var, value) ; #else /* !TAU_P_SHMEM */ pshmem_int_wait( var, value) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_wait wrapper function ******************************************************/ void shmem_int_wait__( int * var, int value) { TAU_PROFILE_TIMER(t, "shmem_int_wait()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_wait( var, value) ; #else /* !TAU_P_SHMEM */ pshmem_int_wait( var, value) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_long_wait wrapper function ******************************************************/ void shmem_long_wait( long * var, long value) { TAU_PROFILE_TIMER(t, "shmem_long_wait()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_wait( var, value) ; #else /* !TAU_P_SHMEM */ pshmem_long_wait( var, value) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_wait wrapper function ******************************************************/ void SHMEM_LONG_WAIT( long * var, long value) { TAU_PROFILE_TIMER(t, "shmem_long_wait()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_wait( var, value) ; #else /* !TAU_P_SHMEM */ pshmem_long_wait( var, value) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_wait wrapper function ******************************************************/ void shmem_long_wait_( long * var, long value) { TAU_PROFILE_TIMER(t, "shmem_long_wait()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_wait( var, value) ; #else /* !TAU_P_SHMEM */ pshmem_long_wait( var, value) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_wait wrapper function ******************************************************/ void shmem_long_wait__( long * var, long value) { TAU_PROFILE_TIMER(t, "shmem_long_wait()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_wait( var, value) ; #else /* !TAU_P_SHMEM */ pshmem_long_wait( var, value) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_longlong_wait wrapper function ******************************************************/ void shmem_longlong_wait( long long * var, long long value) { TAU_PROFILE_TIMER(t, "shmem_longlong_wait()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_wait( var, value) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_wait( var, value) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_wait wrapper function ******************************************************/ void SHMEM_LONGLONG_WAIT( long long * var, long long value) { TAU_PROFILE_TIMER(t, "shmem_longlong_wait()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_wait( var, value) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_wait( var, value) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_wait wrapper function ******************************************************/ void shmem_longlong_wait_( long long * var, long long value) { TAU_PROFILE_TIMER(t, "shmem_longlong_wait()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_wait( var, value) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_wait( var, value) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_wait wrapper function ******************************************************/ void shmem_longlong_wait__( long long * var, long long value) { TAU_PROFILE_TIMER(t, "shmem_longlong_wait()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_wait( var, value) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_wait( var, value) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_short_wait_until wrapper function ******************************************************/ void shmem_short_wait_until( short * var, int cond, short value) { TAU_PROFILE_TIMER(t, "shmem_short_wait_until()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_wait_until( var, cond, value) ; #else /* !TAU_P_SHMEM */ pshmem_short_wait_until( var, cond, value) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_wait_until wrapper function ******************************************************/ void SHMEM_SHORT_WAIT_UNTIL( short * var, int cond, short value) { TAU_PROFILE_TIMER(t, "shmem_short_wait_until()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_wait_until( var, cond, value) ; #else /* !TAU_P_SHMEM */ pshmem_short_wait_until( var, cond, value) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_wait_until wrapper function ******************************************************/ void shmem_short_wait_until_( short * var, int cond, short value) { TAU_PROFILE_TIMER(t, "shmem_short_wait_until()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_wait_until( var, cond, value) ; #else /* !TAU_P_SHMEM */ pshmem_short_wait_until( var, cond, value) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_wait_until wrapper function ******************************************************/ void shmem_short_wait_until__( short * var, int cond, short value) { TAU_PROFILE_TIMER(t, "shmem_short_wait_until()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_wait_until( var, cond, value) ; #else /* !TAU_P_SHMEM */ pshmem_short_wait_until( var, cond, value) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_int_wait_until wrapper function ******************************************************/ void shmem_int_wait_until( int * var, int cond, int value) { TAU_PROFILE_TIMER(t, "shmem_int_wait_until()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_wait_until( var, cond, value) ; #else /* !TAU_P_SHMEM */ pshmem_int_wait_until( var, cond, value) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_wait_until wrapper function ******************************************************/ void SHMEM_INT_WAIT_UNTIL( int * var, int cond, int value) { TAU_PROFILE_TIMER(t, "shmem_int_wait_until()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_wait_until( var, cond, value) ; #else /* !TAU_P_SHMEM */ pshmem_int_wait_until( var, cond, value) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_wait_until wrapper function ******************************************************/ void shmem_int_wait_until_( int * var, int cond, int value) { TAU_PROFILE_TIMER(t, "shmem_int_wait_until()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_wait_until( var, cond, value) ; #else /* !TAU_P_SHMEM */ pshmem_int_wait_until( var, cond, value) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_wait_until wrapper function ******************************************************/ void shmem_int_wait_until__( int * var, int cond, int value) { TAU_PROFILE_TIMER(t, "shmem_int_wait_until()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_wait_until( var, cond, value) ; #else /* !TAU_P_SHMEM */ pshmem_int_wait_until( var, cond, value) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_long_wait_until wrapper function ******************************************************/ void shmem_long_wait_until( long * var, int cond, long value) { TAU_PROFILE_TIMER(t, "shmem_long_wait_until()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_wait_until( var, cond, value) ; #else /* !TAU_P_SHMEM */ pshmem_long_wait_until( var, cond, value) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_wait_until wrapper function ******************************************************/ void SHMEM_LONG_WAIT_UNTIL( long * var, int cond, long value) { TAU_PROFILE_TIMER(t, "shmem_long_wait_until()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_wait_until( var, cond, value) ; #else /* !TAU_P_SHMEM */ pshmem_long_wait_until( var, cond, value) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_wait_until wrapper function ******************************************************/ void shmem_long_wait_until_( long * var, int cond, long value) { TAU_PROFILE_TIMER(t, "shmem_long_wait_until()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_wait_until( var, cond, value) ; #else /* !TAU_P_SHMEM */ pshmem_long_wait_until( var, cond, value) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_wait_until wrapper function ******************************************************/ void shmem_long_wait_until__( long * var, int cond, long value) { TAU_PROFILE_TIMER(t, "shmem_long_wait_until()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_wait_until( var, cond, value) ; #else /* !TAU_P_SHMEM */ pshmem_long_wait_until( var, cond, value) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_longlong_wait_until wrapper function ******************************************************/ void shmem_longlong_wait_until( long long * var, int cond, long long value) { TAU_PROFILE_TIMER(t, "shmem_longlong_wait_until()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_wait_until( var, cond, value) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_wait_until( var, cond, value) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_wait_until wrapper function ******************************************************/ void SHMEM_LONGLONG_WAIT_UNTIL( long long * var, int cond, long long value) { TAU_PROFILE_TIMER(t, "shmem_longlong_wait_until()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_wait_until( var, cond, value) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_wait_until( var, cond, value) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_wait_until wrapper function ******************************************************/ void shmem_longlong_wait_until_( long long * var, int cond, long long value) { TAU_PROFILE_TIMER(t, "shmem_longlong_wait_until()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_wait_until( var, cond, value) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_wait_until( var, cond, value) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_wait_until wrapper function ******************************************************/ void shmem_longlong_wait_until__( long long * var, int cond, long long value) { TAU_PROFILE_TIMER(t, "shmem_longlong_wait_until()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_wait_until( var, cond, value) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_wait_until( var, cond, value) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_short_sum_to_all wrapper function ******************************************************/ void shmem_short_sum_to_all( short * trg, const short * src, size_t nreduce, int pestart, int log_pestride, int pesize, short * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_short_sum_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_sum_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_short_sum_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_sum_to_all wrapper function ******************************************************/ void SHMEM_SHORT_SUM_TO_ALL( short * trg, const short * src, size_t nreduce, int pestart, int log_pestride, int pesize, short * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_short_sum_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_sum_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_short_sum_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_sum_to_all wrapper function ******************************************************/ void shmem_short_sum_to_all_( short * trg, const short * src, size_t nreduce, int pestart, int log_pestride, int pesize, short * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_short_sum_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_sum_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_short_sum_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_sum_to_all wrapper function ******************************************************/ void shmem_short_sum_to_all__( short * trg, const short * src, size_t nreduce, int pestart, int log_pestride, int pesize, short * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_short_sum_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_sum_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_short_sum_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_short_max_to_all wrapper function ******************************************************/ void shmem_short_max_to_all( short * trg, const short * src, size_t nreduce, int pestart, int log_pestride, int pesize, short * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_short_max_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_max_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_short_max_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_max_to_all wrapper function ******************************************************/ void SHMEM_SHORT_MAX_TO_ALL( short * trg, const short * src, size_t nreduce, int pestart, int log_pestride, int pesize, short * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_short_max_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_max_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_short_max_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_max_to_all wrapper function ******************************************************/ void shmem_short_max_to_all_( short * trg, const short * src, size_t nreduce, int pestart, int log_pestride, int pesize, short * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_short_max_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_max_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_short_max_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_max_to_all wrapper function ******************************************************/ void shmem_short_max_to_all__( short * trg, const short * src, size_t nreduce, int pestart, int log_pestride, int pesize, short * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_short_max_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_max_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_short_max_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_short_min_to_all wrapper function ******************************************************/ void shmem_short_min_to_all( short * trg, const short * src, size_t nreduce, int pestart, int log_pestride, int pesize, short * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_short_min_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_min_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_short_min_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_min_to_all wrapper function ******************************************************/ void SHMEM_SHORT_MIN_TO_ALL( short * trg, const short * src, size_t nreduce, int pestart, int log_pestride, int pesize, short * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_short_min_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_min_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_short_min_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_min_to_all wrapper function ******************************************************/ void shmem_short_min_to_all_( short * trg, const short * src, size_t nreduce, int pestart, int log_pestride, int pesize, short * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_short_min_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_min_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_short_min_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_min_to_all wrapper function ******************************************************/ void shmem_short_min_to_all__( short * trg, const short * src, size_t nreduce, int pestart, int log_pestride, int pesize, short * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_short_min_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_min_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_short_min_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_short_prod_to_all wrapper function ******************************************************/ void shmem_short_prod_to_all( short * trg, const short * src, size_t nreduce, int pestart, int log_pestride, int pesize, short * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_short_prod_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_prod_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_short_prod_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_prod_to_all wrapper function ******************************************************/ void SHMEM_SHORT_PROD_TO_ALL( short * trg, const short * src, size_t nreduce, int pestart, int log_pestride, int pesize, short * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_short_prod_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_prod_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_short_prod_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_prod_to_all wrapper function ******************************************************/ void shmem_short_prod_to_all_( short * trg, const short * src, size_t nreduce, int pestart, int log_pestride, int pesize, short * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_short_prod_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_prod_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_short_prod_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_prod_to_all wrapper function ******************************************************/ void shmem_short_prod_to_all__( short * trg, const short * src, size_t nreduce, int pestart, int log_pestride, int pesize, short * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_short_prod_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_prod_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_short_prod_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_short_and_to_all wrapper function ******************************************************/ void shmem_short_and_to_all( short * trg, const short * src, size_t nreduce, int pestart, int log_pestride, int pesize, short * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_short_and_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_and_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_short_and_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_and_to_all wrapper function ******************************************************/ void SHMEM_SHORT_AND_TO_ALL( short * trg, const short * src, size_t nreduce, int pestart, int log_pestride, int pesize, short * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_short_and_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_and_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_short_and_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_and_to_all wrapper function ******************************************************/ void shmem_short_and_to_all_( short * trg, const short * src, size_t nreduce, int pestart, int log_pestride, int pesize, short * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_short_and_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_and_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_short_and_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_and_to_all wrapper function ******************************************************/ void shmem_short_and_to_all__( short * trg, const short * src, size_t nreduce, int pestart, int log_pestride, int pesize, short * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_short_and_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_and_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_short_and_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_short_or_to_all wrapper function ******************************************************/ void shmem_short_or_to_all( short * trg, const short * src, size_t nreduce, int pestart, int log_pestride, int pesize, short * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_short_or_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_or_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_short_or_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_or_to_all wrapper function ******************************************************/ void SHMEM_SHORT_OR_TO_ALL( short * trg, const short * src, size_t nreduce, int pestart, int log_pestride, int pesize, short * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_short_or_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_or_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_short_or_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_or_to_all wrapper function ******************************************************/ void shmem_short_or_to_all_( short * trg, const short * src, size_t nreduce, int pestart, int log_pestride, int pesize, short * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_short_or_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_or_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_short_or_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_or_to_all wrapper function ******************************************************/ void shmem_short_or_to_all__( short * trg, const short * src, size_t nreduce, int pestart, int log_pestride, int pesize, short * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_short_or_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_or_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_short_or_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_short_xor_to_all wrapper function ******************************************************/ void shmem_short_xor_to_all( short * trg, const short * src, size_t nreduce, int pestart, int log_pestride, int pesize, short * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_short_xor_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_xor_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_short_xor_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_xor_to_all wrapper function ******************************************************/ void SHMEM_SHORT_XOR_TO_ALL( short * trg, const short * src, size_t nreduce, int pestart, int log_pestride, int pesize, short * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_short_xor_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_xor_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_short_xor_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_xor_to_all wrapper function ******************************************************/ void shmem_short_xor_to_all_( short * trg, const short * src, size_t nreduce, int pestart, int log_pestride, int pesize, short * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_short_xor_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_xor_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_short_xor_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_xor_to_all wrapper function ******************************************************/ void shmem_short_xor_to_all__( short * trg, const short * src, size_t nreduce, int pestart, int log_pestride, int pesize, short * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_short_xor_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_xor_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_short_xor_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_int_sum_to_all wrapper function ******************************************************/ void shmem_int_sum_to_all( int * trg, const int * src, size_t nreduce, int pestart, int log_pestride, int pesize, int * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_int_sum_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_sum_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_int_sum_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_sum_to_all wrapper function ******************************************************/ void SHMEM_INT_SUM_TO_ALL( int * trg, const int * src, size_t nreduce, int pestart, int log_pestride, int pesize, int * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_int_sum_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_sum_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_int_sum_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_sum_to_all wrapper function ******************************************************/ void shmem_int_sum_to_all_( int * trg, const int * src, size_t nreduce, int pestart, int log_pestride, int pesize, int * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_int_sum_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_sum_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_int_sum_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_sum_to_all wrapper function ******************************************************/ void shmem_int_sum_to_all__( int * trg, const int * src, size_t nreduce, int pestart, int log_pestride, int pesize, int * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_int_sum_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_sum_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_int_sum_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_int_max_to_all wrapper function ******************************************************/ void shmem_int_max_to_all( int * trg, const int * src, size_t nreduce, int pestart, int log_pestride, int pesize, int * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_int_max_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_max_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_int_max_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_max_to_all wrapper function ******************************************************/ void SHMEM_INT_MAX_TO_ALL( int * trg, const int * src, size_t nreduce, int pestart, int log_pestride, int pesize, int * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_int_max_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_max_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_int_max_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_max_to_all wrapper function ******************************************************/ void shmem_int_max_to_all_( int * trg, const int * src, size_t nreduce, int pestart, int log_pestride, int pesize, int * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_int_max_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_max_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_int_max_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_max_to_all wrapper function ******************************************************/ void shmem_int_max_to_all__( int * trg, const int * src, size_t nreduce, int pestart, int log_pestride, int pesize, int * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_int_max_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_max_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_int_max_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_int_min_to_all wrapper function ******************************************************/ void shmem_int_min_to_all( int * trg, const int * src, size_t nreduce, int pestart, int log_pestride, int pesize, int * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_int_min_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_min_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_int_min_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_min_to_all wrapper function ******************************************************/ void SHMEM_INT_MIN_TO_ALL( int * trg, const int * src, size_t nreduce, int pestart, int log_pestride, int pesize, int * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_int_min_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_min_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_int_min_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_min_to_all wrapper function ******************************************************/ void shmem_int_min_to_all_( int * trg, const int * src, size_t nreduce, int pestart, int log_pestride, int pesize, int * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_int_min_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_min_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_int_min_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_min_to_all wrapper function ******************************************************/ void shmem_int_min_to_all__( int * trg, const int * src, size_t nreduce, int pestart, int log_pestride, int pesize, int * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_int_min_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_min_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_int_min_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_int_prod_to_all wrapper function ******************************************************/ void shmem_int_prod_to_all( int * trg, const int * src, size_t nreduce, int pestart, int log_pestride, int pesize, int * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_int_prod_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_prod_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_int_prod_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_prod_to_all wrapper function ******************************************************/ void SHMEM_INT_PROD_TO_ALL( int * trg, const int * src, size_t nreduce, int pestart, int log_pestride, int pesize, int * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_int_prod_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_prod_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_int_prod_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_prod_to_all wrapper function ******************************************************/ void shmem_int_prod_to_all_( int * trg, const int * src, size_t nreduce, int pestart, int log_pestride, int pesize, int * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_int_prod_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_prod_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_int_prod_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_prod_to_all wrapper function ******************************************************/ void shmem_int_prod_to_all__( int * trg, const int * src, size_t nreduce, int pestart, int log_pestride, int pesize, int * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_int_prod_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_prod_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_int_prod_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_int_and_to_all wrapper function ******************************************************/ void shmem_int_and_to_all( int * trg, const int * src, size_t nreduce, int pestart, int log_pestride, int pesize, int * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_int_and_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_and_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_int_and_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_and_to_all wrapper function ******************************************************/ void SHMEM_INT_AND_TO_ALL( int * trg, const int * src, size_t nreduce, int pestart, int log_pestride, int pesize, int * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_int_and_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_and_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_int_and_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_and_to_all wrapper function ******************************************************/ void shmem_int_and_to_all_( int * trg, const int * src, size_t nreduce, int pestart, int log_pestride, int pesize, int * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_int_and_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_and_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_int_and_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_and_to_all wrapper function ******************************************************/ void shmem_int_and_to_all__( int * trg, const int * src, size_t nreduce, int pestart, int log_pestride, int pesize, int * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_int_and_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_and_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_int_and_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_int_or_to_all wrapper function ******************************************************/ void shmem_int_or_to_all( int * trg, const int * src, size_t nreduce, int pestart, int log_pestride, int pesize, int * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_int_or_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_or_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_int_or_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_or_to_all wrapper function ******************************************************/ void SHMEM_INT_OR_TO_ALL( int * trg, const int * src, size_t nreduce, int pestart, int log_pestride, int pesize, int * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_int_or_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_or_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_int_or_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_or_to_all wrapper function ******************************************************/ void shmem_int_or_to_all_( int * trg, const int * src, size_t nreduce, int pestart, int log_pestride, int pesize, int * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_int_or_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_or_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_int_or_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_or_to_all wrapper function ******************************************************/ void shmem_int_or_to_all__( int * trg, const int * src, size_t nreduce, int pestart, int log_pestride, int pesize, int * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_int_or_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_or_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_int_or_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_int_xor_to_all wrapper function ******************************************************/ void shmem_int_xor_to_all( int * trg, const int * src, size_t nreduce, int pestart, int log_pestride, int pesize, int * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_int_xor_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_xor_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_int_xor_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_xor_to_all wrapper function ******************************************************/ void SHMEM_INT_XOR_TO_ALL( int * trg, const int * src, size_t nreduce, int pestart, int log_pestride, int pesize, int * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_int_xor_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_xor_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_int_xor_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_xor_to_all wrapper function ******************************************************/ void shmem_int_xor_to_all_( int * trg, const int * src, size_t nreduce, int pestart, int log_pestride, int pesize, int * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_int_xor_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_xor_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_int_xor_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_xor_to_all wrapper function ******************************************************/ void shmem_int_xor_to_all__( int * trg, const int * src, size_t nreduce, int pestart, int log_pestride, int pesize, int * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_int_xor_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_xor_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_int_xor_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_long_sum_to_all wrapper function ******************************************************/ void shmem_long_sum_to_all( long * trg, const long * src, size_t nreduce, int pestart, int log_pestride, int pesize, long * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_long_sum_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_sum_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_long_sum_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_sum_to_all wrapper function ******************************************************/ void SHMEM_LONG_SUM_TO_ALL( long * trg, const long * src, size_t nreduce, int pestart, int log_pestride, int pesize, long * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_long_sum_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_sum_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_long_sum_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_sum_to_all wrapper function ******************************************************/ void shmem_long_sum_to_all_( long * trg, const long * src, size_t nreduce, int pestart, int log_pestride, int pesize, long * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_long_sum_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_sum_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_long_sum_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_sum_to_all wrapper function ******************************************************/ void shmem_long_sum_to_all__( long * trg, const long * src, size_t nreduce, int pestart, int log_pestride, int pesize, long * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_long_sum_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_sum_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_long_sum_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_long_max_to_all wrapper function ******************************************************/ void shmem_long_max_to_all( long * trg, const long * src, size_t nreduce, int pestart, int log_pestride, int pesize, long * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_long_max_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_max_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_long_max_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_max_to_all wrapper function ******************************************************/ void SHMEM_LONG_MAX_TO_ALL( long * trg, const long * src, size_t nreduce, int pestart, int log_pestride, int pesize, long * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_long_max_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_max_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_long_max_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_max_to_all wrapper function ******************************************************/ void shmem_long_max_to_all_( long * trg, const long * src, size_t nreduce, int pestart, int log_pestride, int pesize, long * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_long_max_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_max_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_long_max_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_max_to_all wrapper function ******************************************************/ void shmem_long_max_to_all__( long * trg, const long * src, size_t nreduce, int pestart, int log_pestride, int pesize, long * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_long_max_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_max_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_long_max_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_long_min_to_all wrapper function ******************************************************/ void shmem_long_min_to_all( long * trg, const long * src, size_t nreduce, int pestart, int log_pestride, int pesize, long * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_long_min_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_min_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_long_min_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_min_to_all wrapper function ******************************************************/ void SHMEM_LONG_MIN_TO_ALL( long * trg, const long * src, size_t nreduce, int pestart, int log_pestride, int pesize, long * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_long_min_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_min_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_long_min_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_min_to_all wrapper function ******************************************************/ void shmem_long_min_to_all_( long * trg, const long * src, size_t nreduce, int pestart, int log_pestride, int pesize, long * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_long_min_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_min_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_long_min_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_min_to_all wrapper function ******************************************************/ void shmem_long_min_to_all__( long * trg, const long * src, size_t nreduce, int pestart, int log_pestride, int pesize, long * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_long_min_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_min_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_long_min_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_long_prod_to_all wrapper function ******************************************************/ void shmem_long_prod_to_all( long * trg, const long * src, size_t nreduce, int pestart, int log_pestride, int pesize, long * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_long_prod_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_prod_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_long_prod_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_prod_to_all wrapper function ******************************************************/ void SHMEM_LONG_PROD_TO_ALL( long * trg, const long * src, size_t nreduce, int pestart, int log_pestride, int pesize, long * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_long_prod_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_prod_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_long_prod_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_prod_to_all wrapper function ******************************************************/ void shmem_long_prod_to_all_( long * trg, const long * src, size_t nreduce, int pestart, int log_pestride, int pesize, long * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_long_prod_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_prod_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_long_prod_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_prod_to_all wrapper function ******************************************************/ void shmem_long_prod_to_all__( long * trg, const long * src, size_t nreduce, int pestart, int log_pestride, int pesize, long * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_long_prod_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_prod_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_long_prod_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_long_and_to_all wrapper function ******************************************************/ void shmem_long_and_to_all( long * trg, const long * src, size_t nreduce, int pestart, int log_pestride, int pesize, long * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_long_and_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_and_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_long_and_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_and_to_all wrapper function ******************************************************/ void SHMEM_LONG_AND_TO_ALL( long * trg, const long * src, size_t nreduce, int pestart, int log_pestride, int pesize, long * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_long_and_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_and_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_long_and_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_and_to_all wrapper function ******************************************************/ void shmem_long_and_to_all_( long * trg, const long * src, size_t nreduce, int pestart, int log_pestride, int pesize, long * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_long_and_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_and_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_long_and_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_and_to_all wrapper function ******************************************************/ void shmem_long_and_to_all__( long * trg, const long * src, size_t nreduce, int pestart, int log_pestride, int pesize, long * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_long_and_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_and_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_long_and_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_long_or_to_all wrapper function ******************************************************/ void shmem_long_or_to_all( long * trg, const long * src, size_t nreduce, int pestart, int log_pestride, int pesize, long * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_long_or_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_or_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_long_or_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_or_to_all wrapper function ******************************************************/ void SHMEM_LONG_OR_TO_ALL( long * trg, const long * src, size_t nreduce, int pestart, int log_pestride, int pesize, long * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_long_or_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_or_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_long_or_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_or_to_all wrapper function ******************************************************/ void shmem_long_or_to_all_( long * trg, const long * src, size_t nreduce, int pestart, int log_pestride, int pesize, long * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_long_or_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_or_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_long_or_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_or_to_all wrapper function ******************************************************/ void shmem_long_or_to_all__( long * trg, const long * src, size_t nreduce, int pestart, int log_pestride, int pesize, long * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_long_or_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_or_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_long_or_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_long_xor_to_all wrapper function ******************************************************/ void shmem_long_xor_to_all( long * trg, const long * src, size_t nreduce, int pestart, int log_pestride, int pesize, long * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_long_xor_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_xor_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_long_xor_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_xor_to_all wrapper function ******************************************************/ void SHMEM_LONG_XOR_TO_ALL( long * trg, const long * src, size_t nreduce, int pestart, int log_pestride, int pesize, long * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_long_xor_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_xor_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_long_xor_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_xor_to_all wrapper function ******************************************************/ void shmem_long_xor_to_all_( long * trg, const long * src, size_t nreduce, int pestart, int log_pestride, int pesize, long * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_long_xor_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_xor_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_long_xor_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_xor_to_all wrapper function ******************************************************/ void shmem_long_xor_to_all__( long * trg, const long * src, size_t nreduce, int pestart, int log_pestride, int pesize, long * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_long_xor_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_xor_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_long_xor_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_longlong_sum_to_all wrapper function ******************************************************/ void shmem_longlong_sum_to_all( long long * trg, const long long * src, size_t nreduce, int pestart, int log_pestride, int pesize, long long * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_longlong_sum_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_sum_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_sum_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_sum_to_all wrapper function ******************************************************/ void SHMEM_LONGLONG_SUM_TO_ALL( long long * trg, const long long * src, size_t nreduce, int pestart, int log_pestride, int pesize, long long * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_longlong_sum_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_sum_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_sum_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_sum_to_all wrapper function ******************************************************/ void shmem_longlong_sum_to_all_( long long * trg, const long long * src, size_t nreduce, int pestart, int log_pestride, int pesize, long long * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_longlong_sum_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_sum_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_sum_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_sum_to_all wrapper function ******************************************************/ void shmem_longlong_sum_to_all__( long long * trg, const long long * src, size_t nreduce, int pestart, int log_pestride, int pesize, long long * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_longlong_sum_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_sum_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_sum_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_longlong_max_to_all wrapper function ******************************************************/ void shmem_longlong_max_to_all( long long * trg, const long long * src, size_t nreduce, int pestart, int log_pestride, int pesize, long long * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_longlong_max_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_max_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_max_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_max_to_all wrapper function ******************************************************/ void SHMEM_LONGLONG_MAX_TO_ALL( long long * trg, const long long * src, size_t nreduce, int pestart, int log_pestride, int pesize, long long * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_longlong_max_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_max_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_max_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_max_to_all wrapper function ******************************************************/ void shmem_longlong_max_to_all_( long long * trg, const long long * src, size_t nreduce, int pestart, int log_pestride, int pesize, long long * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_longlong_max_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_max_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_max_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_max_to_all wrapper function ******************************************************/ void shmem_longlong_max_to_all__( long long * trg, const long long * src, size_t nreduce, int pestart, int log_pestride, int pesize, long long * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_longlong_max_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_max_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_max_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_longlong_min_to_all wrapper function ******************************************************/ void shmem_longlong_min_to_all( long long * trg, const long long * src, size_t nreduce, int pestart, int log_pestride, int pesize, long long * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_longlong_min_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_min_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_min_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_min_to_all wrapper function ******************************************************/ void SHMEM_LONGLONG_MIN_TO_ALL( long long * trg, const long long * src, size_t nreduce, int pestart, int log_pestride, int pesize, long long * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_longlong_min_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_min_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_min_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_min_to_all wrapper function ******************************************************/ void shmem_longlong_min_to_all_( long long * trg, const long long * src, size_t nreduce, int pestart, int log_pestride, int pesize, long long * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_longlong_min_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_min_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_min_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_min_to_all wrapper function ******************************************************/ void shmem_longlong_min_to_all__( long long * trg, const long long * src, size_t nreduce, int pestart, int log_pestride, int pesize, long long * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_longlong_min_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_min_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_min_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_longlong_prod_to_all wrapper function ******************************************************/ void shmem_longlong_prod_to_all( long long * trg, const long long * src, size_t nreduce, int pestart, int log_pestride, int pesize, long long * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_longlong_prod_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_prod_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_prod_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_prod_to_all wrapper function ******************************************************/ void SHMEM_LONGLONG_PROD_TO_ALL( long long * trg, const long long * src, size_t nreduce, int pestart, int log_pestride, int pesize, long long * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_longlong_prod_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_prod_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_prod_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_prod_to_all wrapper function ******************************************************/ void shmem_longlong_prod_to_all_( long long * trg, const long long * src, size_t nreduce, int pestart, int log_pestride, int pesize, long long * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_longlong_prod_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_prod_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_prod_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_prod_to_all wrapper function ******************************************************/ void shmem_longlong_prod_to_all__( long long * trg, const long long * src, size_t nreduce, int pestart, int log_pestride, int pesize, long long * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_longlong_prod_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_prod_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_prod_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_longlong_and_to_all wrapper function ******************************************************/ void shmem_longlong_and_to_all( long long * trg, const long long * src, size_t nreduce, int pestart, int log_pestride, int pesize, long long * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_longlong_and_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_and_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_and_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_and_to_all wrapper function ******************************************************/ void SHMEM_LONGLONG_AND_TO_ALL( long long * trg, const long long * src, size_t nreduce, int pestart, int log_pestride, int pesize, long long * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_longlong_and_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_and_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_and_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_and_to_all wrapper function ******************************************************/ void shmem_longlong_and_to_all_( long long * trg, const long long * src, size_t nreduce, int pestart, int log_pestride, int pesize, long long * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_longlong_and_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_and_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_and_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_and_to_all wrapper function ******************************************************/ void shmem_longlong_and_to_all__( long long * trg, const long long * src, size_t nreduce, int pestart, int log_pestride, int pesize, long long * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_longlong_and_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_and_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_and_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_longlong_or_to_all wrapper function ******************************************************/ void shmem_longlong_or_to_all( long long * trg, const long long * src, size_t nreduce, int pestart, int log_pestride, int pesize, long long * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_longlong_or_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_or_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_or_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_or_to_all wrapper function ******************************************************/ void SHMEM_LONGLONG_OR_TO_ALL( long long * trg, const long long * src, size_t nreduce, int pestart, int log_pestride, int pesize, long long * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_longlong_or_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_or_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_or_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_or_to_all wrapper function ******************************************************/ void shmem_longlong_or_to_all_( long long * trg, const long long * src, size_t nreduce, int pestart, int log_pestride, int pesize, long long * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_longlong_or_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_or_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_or_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_or_to_all wrapper function ******************************************************/ void shmem_longlong_or_to_all__( long long * trg, const long long * src, size_t nreduce, int pestart, int log_pestride, int pesize, long long * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_longlong_or_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_or_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_or_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_longlong_xor_to_all wrapper function ******************************************************/ void shmem_longlong_xor_to_all( long long * trg, const long long * src, size_t nreduce, int pestart, int log_pestride, int pesize, long long * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_longlong_xor_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_xor_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_xor_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_xor_to_all wrapper function ******************************************************/ void SHMEM_LONGLONG_XOR_TO_ALL( long long * trg, const long long * src, size_t nreduce, int pestart, int log_pestride, int pesize, long long * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_longlong_xor_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_xor_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_xor_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_xor_to_all wrapper function ******************************************************/ void shmem_longlong_xor_to_all_( long long * trg, const long long * src, size_t nreduce, int pestart, int log_pestride, int pesize, long long * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_longlong_xor_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_xor_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_xor_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_xor_to_all wrapper function ******************************************************/ void shmem_longlong_xor_to_all__( long long * trg, const long long * src, size_t nreduce, int pestart, int log_pestride, int pesize, long long * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_longlong_xor_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_xor_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_xor_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_float_sum_to_all wrapper function ******************************************************/ void shmem_float_sum_to_all( float * trg, const float * src, size_t nreduce, int pestart, int log_pestride, int pesize, float * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_float_sum_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_float_sum_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_float_sum_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_float_sum_to_all wrapper function ******************************************************/ void SHMEM_FLOAT_SUM_TO_ALL( float * trg, const float * src, size_t nreduce, int pestart, int log_pestride, int pesize, float * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_float_sum_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_float_sum_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_float_sum_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_float_sum_to_all wrapper function ******************************************************/ void shmem_float_sum_to_all_( float * trg, const float * src, size_t nreduce, int pestart, int log_pestride, int pesize, float * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_float_sum_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_float_sum_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_float_sum_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_float_sum_to_all wrapper function ******************************************************/ void shmem_float_sum_to_all__( float * trg, const float * src, size_t nreduce, int pestart, int log_pestride, int pesize, float * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_float_sum_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_float_sum_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_float_sum_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_float_max_to_all wrapper function ******************************************************/ void shmem_float_max_to_all( float * trg, const float * src, size_t nreduce, int pestart, int log_pestride, int pesize, float * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_float_max_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_float_max_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_float_max_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_float_max_to_all wrapper function ******************************************************/ void SHMEM_FLOAT_MAX_TO_ALL( float * trg, const float * src, size_t nreduce, int pestart, int log_pestride, int pesize, float * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_float_max_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_float_max_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_float_max_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_float_max_to_all wrapper function ******************************************************/ void shmem_float_max_to_all_( float * trg, const float * src, size_t nreduce, int pestart, int log_pestride, int pesize, float * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_float_max_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_float_max_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_float_max_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_float_max_to_all wrapper function ******************************************************/ void shmem_float_max_to_all__( float * trg, const float * src, size_t nreduce, int pestart, int log_pestride, int pesize, float * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_float_max_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_float_max_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_float_max_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_float_min_to_all wrapper function ******************************************************/ void shmem_float_min_to_all( float * trg, const float * src, size_t nreduce, int pestart, int log_pestride, int pesize, float * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_float_min_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_float_min_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_float_min_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_float_min_to_all wrapper function ******************************************************/ void SHMEM_FLOAT_MIN_TO_ALL( float * trg, const float * src, size_t nreduce, int pestart, int log_pestride, int pesize, float * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_float_min_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_float_min_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_float_min_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_float_min_to_all wrapper function ******************************************************/ void shmem_float_min_to_all_( float * trg, const float * src, size_t nreduce, int pestart, int log_pestride, int pesize, float * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_float_min_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_float_min_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_float_min_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_float_min_to_all wrapper function ******************************************************/ void shmem_float_min_to_all__( float * trg, const float * src, size_t nreduce, int pestart, int log_pestride, int pesize, float * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_float_min_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_float_min_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_float_min_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_float_prod_to_all wrapper function ******************************************************/ void shmem_float_prod_to_all( float * trg, const float * src, size_t nreduce, int pestart, int log_pestride, int pesize, float * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_float_prod_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_float_prod_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_float_prod_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_float_prod_to_all wrapper function ******************************************************/ void SHMEM_FLOAT_PROD_TO_ALL( float * trg, const float * src, size_t nreduce, int pestart, int log_pestride, int pesize, float * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_float_prod_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_float_prod_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_float_prod_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_float_prod_to_all wrapper function ******************************************************/ void shmem_float_prod_to_all_( float * trg, const float * src, size_t nreduce, int pestart, int log_pestride, int pesize, float * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_float_prod_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_float_prod_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_float_prod_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_float_prod_to_all wrapper function ******************************************************/ void shmem_float_prod_to_all__( float * trg, const float * src, size_t nreduce, int pestart, int log_pestride, int pesize, float * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_float_prod_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_float_prod_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_float_prod_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_double_sum_to_all wrapper function ******************************************************/ void shmem_double_sum_to_all( double * trg, const double * src, size_t nreduce, int pestart, int log_pestride, int pesize, double * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_double_sum_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_double_sum_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_double_sum_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_double_sum_to_all wrapper function ******************************************************/ void SHMEM_DOUBLE_SUM_TO_ALL( double * trg, const double * src, size_t nreduce, int pestart, int log_pestride, int pesize, double * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_double_sum_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_double_sum_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_double_sum_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_double_sum_to_all wrapper function ******************************************************/ void shmem_double_sum_to_all_( double * trg, const double * src, size_t nreduce, int pestart, int log_pestride, int pesize, double * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_double_sum_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_double_sum_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_double_sum_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_double_sum_to_all wrapper function ******************************************************/ void shmem_double_sum_to_all__( double * trg, const double * src, size_t nreduce, int pestart, int log_pestride, int pesize, double * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_double_sum_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_double_sum_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_double_sum_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_double_max_to_all wrapper function ******************************************************/ void shmem_double_max_to_all( double * trg, const double * src, size_t nreduce, int pestart, int log_pestride, int pesize, double * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_double_max_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_double_max_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_double_max_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_double_max_to_all wrapper function ******************************************************/ void SHMEM_DOUBLE_MAX_TO_ALL( double * trg, const double * src, size_t nreduce, int pestart, int log_pestride, int pesize, double * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_double_max_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_double_max_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_double_max_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_double_max_to_all wrapper function ******************************************************/ void shmem_double_max_to_all_( double * trg, const double * src, size_t nreduce, int pestart, int log_pestride, int pesize, double * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_double_max_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_double_max_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_double_max_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_double_max_to_all wrapper function ******************************************************/ void shmem_double_max_to_all__( double * trg, const double * src, size_t nreduce, int pestart, int log_pestride, int pesize, double * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_double_max_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_double_max_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_double_max_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_double_min_to_all wrapper function ******************************************************/ void shmem_double_min_to_all( double * trg, const double * src, size_t nreduce, int pestart, int log_pestride, int pesize, double * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_double_min_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_double_min_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_double_min_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_double_min_to_all wrapper function ******************************************************/ void SHMEM_DOUBLE_MIN_TO_ALL( double * trg, const double * src, size_t nreduce, int pestart, int log_pestride, int pesize, double * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_double_min_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_double_min_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_double_min_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_double_min_to_all wrapper function ******************************************************/ void shmem_double_min_to_all_( double * trg, const double * src, size_t nreduce, int pestart, int log_pestride, int pesize, double * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_double_min_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_double_min_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_double_min_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_double_min_to_all wrapper function ******************************************************/ void shmem_double_min_to_all__( double * trg, const double * src, size_t nreduce, int pestart, int log_pestride, int pesize, double * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_double_min_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_double_min_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_double_min_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_double_prod_to_all wrapper function ******************************************************/ void shmem_double_prod_to_all( double * trg, const double * src, size_t nreduce, int pestart, int log_pestride, int pesize, double * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_double_prod_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_double_prod_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_double_prod_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_double_prod_to_all wrapper function ******************************************************/ void SHMEM_DOUBLE_PROD_TO_ALL( double * trg, const double * src, size_t nreduce, int pestart, int log_pestride, int pesize, double * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_double_prod_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_double_prod_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_double_prod_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_double_prod_to_all wrapper function ******************************************************/ void shmem_double_prod_to_all_( double * trg, const double * src, size_t nreduce, int pestart, int log_pestride, int pesize, double * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_double_prod_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_double_prod_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_double_prod_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_double_prod_to_all wrapper function ******************************************************/ void shmem_double_prod_to_all__( double * trg, const double * src, size_t nreduce, int pestart, int log_pestride, int pesize, double * pwrk, long * psync) { TAU_PROFILE_TIMER(t, "shmem_double_prod_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_double_prod_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #else /* !TAU_P_SHMEM */ pshmem_double_prod_to_all( trg, src, nreduce, pestart, log_pestride, pesize, pwrk, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_broadcast32 wrapper function ******************************************************/ void shmem_broadcast32( void * trg, const void * src, size_t len, int peroot, int pestart, int log_pestride, int pesize, long * psync) { TAU_PROFILE_TIMER(t, "shmem_broadcast32()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_broadcast32( trg, src, len, peroot, pestart, log_pestride, pesize, psync) ; #else /* !TAU_P_SHMEM */ pshmem_broadcast32( trg, src, len, peroot, pestart, log_pestride, pesize, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_broadcast32 wrapper function ******************************************************/ void SHMEM_BROADCAST32( void * trg, const void * src, size_t len, int peroot, int pestart, int log_pestride, int pesize, long * psync) { TAU_PROFILE_TIMER(t, "shmem_broadcast32()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_broadcast32( trg, src, len, peroot, pestart, log_pestride, pesize, psync) ; #else /* !TAU_P_SHMEM */ pshmem_broadcast32( trg, src, len, peroot, pestart, log_pestride, pesize, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_broadcast32 wrapper function ******************************************************/ void shmem_broadcast32_( void * trg, const void * src, size_t len, int peroot, int pestart, int log_pestride, int pesize, long * psync) { TAU_PROFILE_TIMER(t, "shmem_broadcast32()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_broadcast32( trg, src, len, peroot, pestart, log_pestride, pesize, psync) ; #else /* !TAU_P_SHMEM */ pshmem_broadcast32( trg, src, len, peroot, pestart, log_pestride, pesize, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_broadcast32 wrapper function ******************************************************/ void shmem_broadcast32__( void * trg, const void * src, size_t len, int peroot, int pestart, int log_pestride, int pesize, long * psync) { TAU_PROFILE_TIMER(t, "shmem_broadcast32()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_broadcast32( trg, src, len, peroot, pestart, log_pestride, pesize, psync) ; #else /* !TAU_P_SHMEM */ pshmem_broadcast32( trg, src, len, peroot, pestart, log_pestride, pesize, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_broadcast64 wrapper function ******************************************************/ void shmem_broadcast64( void * trg, const void * src, size_t len, int peroot, int pestart, int log_pestride, int pesize, long * psync) { TAU_PROFILE_TIMER(t, "shmem_broadcast64()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_broadcast64( trg, src, len, peroot, pestart, log_pestride, pesize, psync) ; #else /* !TAU_P_SHMEM */ pshmem_broadcast64( trg, src, len, peroot, pestart, log_pestride, pesize, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_broadcast64 wrapper function ******************************************************/ void SHMEM_BROADCAST64( void * trg, const void * src, size_t len, int peroot, int pestart, int log_pestride, int pesize, long * psync) { TAU_PROFILE_TIMER(t, "shmem_broadcast64()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_broadcast64( trg, src, len, peroot, pestart, log_pestride, pesize, psync) ; #else /* !TAU_P_SHMEM */ pshmem_broadcast64( trg, src, len, peroot, pestart, log_pestride, pesize, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_broadcast64 wrapper function ******************************************************/ void shmem_broadcast64_( void * trg, const void * src, size_t len, int peroot, int pestart, int log_pestride, int pesize, long * psync) { TAU_PROFILE_TIMER(t, "shmem_broadcast64()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_broadcast64( trg, src, len, peroot, pestart, log_pestride, pesize, psync) ; #else /* !TAU_P_SHMEM */ pshmem_broadcast64( trg, src, len, peroot, pestart, log_pestride, pesize, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_broadcast64 wrapper function ******************************************************/ void shmem_broadcast64__( void * trg, const void * src, size_t len, int peroot, int pestart, int log_pestride, int pesize, long * psync) { TAU_PROFILE_TIMER(t, "shmem_broadcast64()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_broadcast64( trg, src, len, peroot, pestart, log_pestride, pesize, psync) ; #else /* !TAU_P_SHMEM */ pshmem_broadcast64( trg, src, len, peroot, pestart, log_pestride, pesize, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_init wrapper function ******************************************************/ void shmem_init( ) { TAU_PROFILE_TIMER(t, "shmem_init()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_init( ) ; #else /* !TAU_P_SHMEM */ pshmem_init( ) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_init wrapper function ******************************************************/ void SHMEM_INIT( ) { TAU_PROFILE_TIMER(t, "shmem_init()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_init( ) ; #else /* !TAU_P_SHMEM */ pshmem_init( ) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_init wrapper function ******************************************************/ void shmem_init_( ) { TAU_PROFILE_TIMER(t, "shmem_init()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_init( ) ; #else /* !TAU_P_SHMEM */ pshmem_init( ) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_init wrapper function ******************************************************/ void shmem_init__( ) { TAU_PROFILE_TIMER(t, "shmem_init()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_init( ) ; #else /* !TAU_P_SHMEM */ pshmem_init( ) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_finalize wrapper function ******************************************************/ void shmem_finalize( ) { TAU_PROFILE_TIMER(t, "shmem_finalize()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_finalize( ) ; #else /* !TAU_P_SHMEM */ pshmem_finalize( ) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_finalize wrapper function ******************************************************/ void SHMEM_FINALIZE( ) { TAU_PROFILE_TIMER(t, "shmem_finalize()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_finalize( ) ; #else /* !TAU_P_SHMEM */ pshmem_finalize( ) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_finalize wrapper function ******************************************************/ void shmem_finalize_( ) { TAU_PROFILE_TIMER(t, "shmem_finalize()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_finalize( ) ; #else /* !TAU_P_SHMEM */ pshmem_finalize( ) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_finalize wrapper function ******************************************************/ void shmem_finalize__( ) { TAU_PROFILE_TIMER(t, "shmem_finalize()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_finalize( ) ; #else /* !TAU_P_SHMEM */ pshmem_finalize( ) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_n_pes wrapper function ******************************************************/ int shmem_n_pes( ) { int retvalue; TAU_PROFILE_TIMER(t, "shmem_n_pes()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_n_pes( ) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_n_pes( ) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_n_pes wrapper function ******************************************************/ int SHMEM_N_PES( ) { int retvalue; TAU_PROFILE_TIMER(t, "shmem_n_pes()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_n_pes( ) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_n_pes( ) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_n_pes wrapper function ******************************************************/ int shmem_n_pes_( ) { int retvalue; TAU_PROFILE_TIMER(t, "shmem_n_pes()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_n_pes( ) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_n_pes( ) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_n_pes wrapper function ******************************************************/ int shmem_n_pes__( ) { int retvalue; TAU_PROFILE_TIMER(t, "shmem_n_pes()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_n_pes( ) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_n_pes( ) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_my_pe wrapper function ******************************************************/ int shmem_my_pe( ) { int retvalue; TAU_PROFILE_TIMER(t, "shmem_my_pe()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_my_pe( ) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_my_pe( ) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_SET_NODE(retvalue); TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_my_pe wrapper function ******************************************************/ int SHMEM_MY_PE( ) { int retvalue; TAU_PROFILE_TIMER(t, "shmem_my_pe()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_my_pe( ) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_my_pe( ) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_SET_NODE(retvalue); TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_my_pe wrapper function ******************************************************/ int shmem_my_pe_( ) { int retvalue; TAU_PROFILE_TIMER(t, "shmem_my_pe()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_my_pe( ) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_my_pe( ) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_SET_NODE(retvalue); TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_my_pe wrapper function ******************************************************/ int shmem_my_pe__( ) { int retvalue; TAU_PROFILE_TIMER(t, "shmem_my_pe()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_my_pe( ) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_my_pe( ) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_SET_NODE(retvalue); TAU_PROFILE_STOP(t); return retvalue; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_fence wrapper function ******************************************************/ void shmem_fence( ) { TAU_PROFILE_TIMER(t, "shmem_fence()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_fence( ) ; #else /* !TAU_P_SHMEM */ pshmem_fence( ) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_fence wrapper function ******************************************************/ void SHMEM_FENCE( ) { TAU_PROFILE_TIMER(t, "shmem_fence()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_fence( ) ; #else /* !TAU_P_SHMEM */ pshmem_fence( ) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_fence wrapper function ******************************************************/ void shmem_fence_( ) { TAU_PROFILE_TIMER(t, "shmem_fence()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_fence( ) ; #else /* !TAU_P_SHMEM */ pshmem_fence( ) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_fence wrapper function ******************************************************/ void shmem_fence__( ) { TAU_PROFILE_TIMER(t, "shmem_fence()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_fence( ) ; #else /* !TAU_P_SHMEM */ pshmem_fence( ) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ #ifndef TAU_CATAMOUNT /****************************************************** *** shmem_swap wrapper function ******************************************************/ long shmem_swap( long * addr, long value, int pe) { long retvalue; TAU_PROFILE_TIMER(t, "shmem_swap()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_swap( addr, value, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_swap( addr, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_swap wrapper function ******************************************************/ long SHMEM_SWAP( long * addr, long value, int pe) { long retvalue; TAU_PROFILE_TIMER(t, "shmem_swap()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_swap( addr, value, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_swap( addr, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_swap wrapper function ******************************************************/ long shmem_swap_( long * addr, long value, int pe) { long retvalue; TAU_PROFILE_TIMER(t, "shmem_swap()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_swap( addr, value, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_swap( addr, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_swap wrapper function ******************************************************/ long shmem_swap__( long * addr, long value, int pe) { long retvalue; TAU_PROFILE_TIMER(t, "shmem_swap()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_swap( addr, value, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_swap( addr, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_cswap wrapper function ******************************************************/ long shmem_cswap( long * addr, long match, long value, int pe) { long retvalue; TAU_PROFILE_TIMER(t, "shmem_cswap()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_cswap( addr, match, value, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_cswap( addr, match, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_cswap wrapper function ******************************************************/ long SHMEM_CSWAP( long * addr, long match, long value, int pe) { long retvalue; TAU_PROFILE_TIMER(t, "shmem_cswap()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_cswap( addr, match, value, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_cswap( addr, match, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_cswap wrapper function ******************************************************/ long shmem_cswap_( long * addr, long match, long value, int pe) { long retvalue; TAU_PROFILE_TIMER(t, "shmem_cswap()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_cswap( addr, match, value, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_cswap( addr, match, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_cswap wrapper function ******************************************************/ long shmem_cswap__( long * addr, long match, long value, int pe) { long retvalue; TAU_PROFILE_TIMER(t, "shmem_cswap()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_cswap( addr, match, value, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_cswap( addr, match, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_finc wrapper function ******************************************************/ long shmem_finc( long * addr, int pe) { long retvalue; TAU_PROFILE_TIMER(t, "shmem_finc()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_finc( addr, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_finc( addr, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_finc wrapper function ******************************************************/ long SHMEM_FINC( long * addr, int pe) { long retvalue; TAU_PROFILE_TIMER(t, "shmem_finc()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_finc( addr, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_finc( addr, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_finc wrapper function ******************************************************/ long shmem_finc_( long * addr, int pe) { long retvalue; TAU_PROFILE_TIMER(t, "shmem_finc()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_finc( addr, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_finc( addr, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_finc wrapper function ******************************************************/ long shmem_finc__( long * addr, int pe) { long retvalue; TAU_PROFILE_TIMER(t, "shmem_finc()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_finc( addr, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_finc( addr, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_fadd wrapper function ******************************************************/ long shmem_fadd( long * addr, long value, int pe) { long retvalue; TAU_PROFILE_TIMER(t, "shmem_fadd()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_fadd( addr, value, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_fadd( addr, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_fadd wrapper function ******************************************************/ long SHMEM_FADD( long * addr, long value, int pe) { long retvalue; TAU_PROFILE_TIMER(t, "shmem_fadd()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_fadd( addr, value, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_fadd( addr, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_fadd wrapper function ******************************************************/ long shmem_fadd_( long * addr, long value, int pe) { long retvalue; TAU_PROFILE_TIMER(t, "shmem_fadd()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_fadd( addr, value, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_fadd( addr, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_fadd wrapper function ******************************************************/ long shmem_fadd__( long * addr, long value, int pe) { long retvalue; TAU_PROFILE_TIMER(t, "shmem_fadd()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_fadd( addr, value, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_fadd( addr, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_broadcast wrapper function ******************************************************/ void shmem_broadcast( void * trg, const void * src, size_t len, int peroot, int pestart, int log_pestride, int pesize, long * psync) { TAU_PROFILE_TIMER(t, "shmem_broadcast()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_broadcast( trg, src, len, peroot, pestart, log_pestride, pesize, psync) ; #else /* !TAU_P_SHMEM */ pshmem_broadcast( trg, src, len, peroot, pestart, log_pestride, pesize, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_broadcast wrapper function ******************************************************/ void SHMEM_BROADCAST( void * trg, const void * src, size_t len, int peroot, int pestart, int log_pestride, int pesize, long * psync) { TAU_PROFILE_TIMER(t, "shmem_broadcast()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_broadcast( trg, src, len, peroot, pestart, log_pestride, pesize, psync) ; #else /* !TAU_P_SHMEM */ pshmem_broadcast( trg, src, len, peroot, pestart, log_pestride, pesize, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_broadcast wrapper function ******************************************************/ void shmem_broadcast_( void * trg, const void * src, size_t len, int peroot, int pestart, int log_pestride, int pesize, long * psync) { TAU_PROFILE_TIMER(t, "shmem_broadcast()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_broadcast( trg, src, len, peroot, pestart, log_pestride, pesize, psync) ; #else /* !TAU_P_SHMEM */ pshmem_broadcast( trg, src, len, peroot, pestart, log_pestride, pesize, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_broadcast wrapper function ******************************************************/ void shmem_broadcast__( void * trg, const void * src, size_t len, int peroot, int pestart, int log_pestride, int pesize, long * psync) { TAU_PROFILE_TIMER(t, "shmem_broadcast()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_broadcast( trg, src, len, peroot, pestart, log_pestride, pesize, psync) ; #else /* !TAU_P_SHMEM */ pshmem_broadcast( trg, src, len, peroot, pestart, log_pestride, pesize, psync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_get wrapper function ******************************************************/ void shmem_get( void * trg, const void * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_get()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_get( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_get( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_get wrapper function ******************************************************/ void SHMEM_GET( void * trg, const void * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_get()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_get( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_get( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_get wrapper function ******************************************************/ void shmem_get_( void * trg, const void * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_get()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_get( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_get( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_get wrapper function ******************************************************/ void shmem_get__( void * trg, const void * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_get()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_get( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_get( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_put wrapper function ******************************************************/ void shmem_put( void * trg, const void * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_put()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_put( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_put( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_put wrapper function ******************************************************/ void SHMEM_PUT( void * trg, const void * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_put()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_put( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_put( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_put wrapper function ******************************************************/ void shmem_put_( void * trg, const void * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_put()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_put( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_put( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_put wrapper function ******************************************************/ void shmem_put__( void * trg, const void * src, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_put()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_put( trg, src, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_put( trg, src, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_put_nb wrapper function ******************************************************/ void shmem_put_nb( void * trg, const void * src, size_t len, int pe, void ** transfer_handle) { TAU_PROFILE_TIMER(t, "shmem_put_nb()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_put_nb( trg, src, len, pe, transfer_handle) ; #else /* !TAU_P_SHMEM */ pshmem_put_nb( trg, src, len, pe, transfer_handle) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_put_nb wrapper function ******************************************************/ void SHMEM_PUT_NB( void * trg, const void * src, size_t len, int pe, void ** transfer_handle) { TAU_PROFILE_TIMER(t, "shmem_put_nb()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_put_nb( trg, src, len, pe, transfer_handle) ; #else /* !TAU_P_SHMEM */ pshmem_put_nb( trg, src, len, pe, transfer_handle) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_put_nb wrapper function ******************************************************/ void shmem_put_nb_( void * trg, const void * src, size_t len, int pe, void ** transfer_handle) { TAU_PROFILE_TIMER(t, "shmem_put_nb()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_put_nb( trg, src, len, pe, transfer_handle) ; #else /* !TAU_P_SHMEM */ pshmem_put_nb( trg, src, len, pe, transfer_handle) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_put_nb wrapper function ******************************************************/ void shmem_put_nb__( void * trg, const void * src, size_t len, int pe, void ** transfer_handle) { TAU_PROFILE_TIMER(t, "shmem_put_nb()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_put_nb( trg, src, len, pe, transfer_handle) ; #else /* !TAU_P_SHMEM */ pshmem_put_nb( trg, src, len, pe, transfer_handle) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_iget wrapper function ******************************************************/ void shmem_iget( void * trg, const void * src, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_iget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_iget( trg, src, tst, sst, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_iget( trg, src, tst, sst, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_iget wrapper function ******************************************************/ void SHMEM_IGET( void * trg, const void * src, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_iget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_iget( trg, src, tst, sst, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_iget( trg, src, tst, sst, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_iget wrapper function ******************************************************/ void shmem_iget_( void * trg, const void * src, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_iget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_iget( trg, src, tst, sst, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_iget( trg, src, tst, sst, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_iget wrapper function ******************************************************/ void shmem_iget__( void * trg, const void * src, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_iget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_iget( trg, src, tst, sst, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_iget( trg, src, tst, sst, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_iput wrapper function ******************************************************/ void shmem_iput( void * trg, const void * src, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_iput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_iput( trg, src, tst, sst, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_iput( trg, src, tst, sst, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_iput wrapper function ******************************************************/ void SHMEM_IPUT( void * trg, const void * src, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_iput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_iput( trg, src, tst, sst, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_iput( trg, src, tst, sst, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_iput wrapper function ******************************************************/ void shmem_iput_( void * trg, const void * src, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_iput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_iput( trg, src, tst, sst, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_iput( trg, src, tst, sst, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_iput wrapper function ******************************************************/ void shmem_iput__( void * trg, const void * src, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe) { TAU_PROFILE_TIMER(t, "shmem_iput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_iput( trg, src, tst, sst, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_iput( trg, src, tst, sst, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_wait wrapper function ******************************************************/ void shmem_wait( long * var, long value) { TAU_PROFILE_TIMER(t, "shmem_wait()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_wait( var, value) ; #else /* !TAU_P_SHMEM */ pshmem_wait( var, value) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_wait wrapper function ******************************************************/ void SHMEM_WAIT( long * var, long value) { TAU_PROFILE_TIMER(t, "shmem_wait()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_wait( var, value) ; #else /* !TAU_P_SHMEM */ pshmem_wait( var, value) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_wait wrapper function ******************************************************/ void shmem_wait_( long * var, long value) { TAU_PROFILE_TIMER(t, "shmem_wait()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_wait( var, value) ; #else /* !TAU_P_SHMEM */ pshmem_wait( var, value) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_wait wrapper function ******************************************************/ void shmem_wait__( long * var, long value) { TAU_PROFILE_TIMER(t, "shmem_wait()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_wait( var, value) ; #else /* !TAU_P_SHMEM */ pshmem_wait( var, value) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_wait_until wrapper function ******************************************************/ void shmem_wait_until( long * var, int cond, long value) { TAU_PROFILE_TIMER(t, "shmem_wait_until()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_wait_until( var, cond, value) ; #else /* !TAU_P_SHMEM */ pshmem_wait_until( var, cond, value) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_wait_until wrapper function ******************************************************/ void SHMEM_WAIT_UNTIL( long * var, int cond, long value) { TAU_PROFILE_TIMER(t, "shmem_wait_until()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_wait_until( var, cond, value) ; #else /* !TAU_P_SHMEM */ pshmem_wait_until( var, cond, value) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_wait_until wrapper function ******************************************************/ void shmem_wait_until_( long * var, int cond, long value) { TAU_PROFILE_TIMER(t, "shmem_wait_until()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_wait_until( var, cond, value) ; #else /* !TAU_P_SHMEM */ pshmem_wait_until( var, cond, value) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_wait_until wrapper function ******************************************************/ void shmem_wait_until__( long * var, int cond, long value) { TAU_PROFILE_TIMER(t, "shmem_wait_until()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_wait_until( var, cond, value) ; #else /* !TAU_P_SHMEM */ pshmem_wait_until( var, cond, value) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } #endif /* TAU_CATAMOUNT: Cray has used #define for these symbols instead of defining them independently */ tau-2.16.4/src/Profile/TauShmemGpshmem.c000066400000000000000000003643111062343042700200050ustar00rootroot00000000000000#include "gpshmem.h" #include #include "gps_pshmem.h" #include "TAU.h" /******************************************************/ /** PGPSHMEM Wrapper Library V1.1, (C) 2005 Adam Leko HCS Lab, University of Florida This wrapper depends on the weak symbol support patch for GPSHMEM. To find out more about this, and to see the disclaimer for this code, please see the following website: http://www.hcs.ufl.edu/~leko/pgpshmem/ Version history: V1.1: Added top-level timer code to fix tracing problems, changed function names to lower case (UPPER CASE == UGLY!) V1.0: Initial release */ /******************************************************/ /****************************************************** *** GPSHMEM C init wrapper function (init/gp_init.c) ******************************************************/ int GPSHMEM_INIT_C (int* argc, char*** argv) { int retval; TAU_PROFILE_TIMER(t, "gpshmem_init_c()", "", TAU_MESSAGE); Tau_create_top_level_timer_if_necessary(); TAU_PROFILE_START(t); retval = PGPSHMEM_INIT_C(argc, argv); TAU_PROFILE_SET_NODE(GPMYPE_C()); TAU_PROFILE_STOP(t); return retval; } /****************************************************** *** GPSHMEM Fortran init wrapper function (init/gp_init.c) ******************************************************/ int GPSHMEM_INIT_CORE_F (int* ptr_num, ...) { va_list ap; int retval; /* Note that this function duplicates a wrapper function in gp_init.c, but is necessary due to the wierdness of trying to portably copy the ... above (from stdarg.h) */ TAU_PROFILE_TIMER(t, "gpshmem_init_core_f()", "", TAU_MESSAGE); Tau_create_top_level_timer_if_necessary(); TAU_PROFILE_START(t); gp_init(); va_start(ap, ptr_num); retval = gp_init_ma77(*ptr_num, ap); va_end(ap); TAU_PROFILE_SET_NODE(GPMYPE_C()); TAU_PROFILE_STOP(t); return retval; } /****************************************************** *** GPSHMEM_FINALIZE_C wrapper function *** (from init/gp_init.c) ******************************************************/ void GPSHMEM_FINALIZE_C() { TAU_PROFILE_TIMER(t, "gpshmem_finalize_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_FINALIZE_C(); TAU_PROFILE_STOP(t); Tau_stop_top_level_timer_if_necessary(); } /****************************************************** *** GPSHMEM_FINALIZE_CORE_F wrapper function *** (from init/gp_init.c) ******************************************************/ void GPSHMEM_FINALIZE_CORE_F() { TAU_PROFILE_TIMER(t, "gpshmem_finalize_core_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_FINALIZE_CORE_F(); TAU_PROFILE_STOP(t); Tau_stop_top_level_timer_if_necessary(); } /****************************************************** *** GPBARRIER_C wrapper function *** (from barrier/gps_barrier.c) ******************************************************/ void GPBARRIER_C() { TAU_PROFILE_TIMER(t, "gpbarrier_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPBARRIER_C(); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_BARRIER_ALL_C wrapper function *** (from barrier/gps_barrier.c) ******************************************************/ void GPSHMEM_BARRIER_ALL_C() { TAU_PROFILE_TIMER(t, "gpshmem_barrier_all_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_BARRIER_ALL_C(); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_BARRIER__ST_C wrapper function *** (from barrier/gps_barrier.c) ******************************************************/ void GPSHMEM_BARRIER__ST_C(int PE_start, int PE_stride, int PE_size, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_barrier__st_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_BARRIER__ST_C(PE_start, PE_stride, PE_size, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_BARRIER_C wrapper function *** (from barrier/gps_barrier.c) ******************************************************/ void GPSHMEM_BARRIER_C(int PE_start, int logPE_stride, int PE_size, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_barrier_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_BARRIER_C(PE_start, logPE_stride, PE_size, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPBARRIER_F wrapper function *** (from barrier/gps_barrier.c) ******************************************************/ void GPBARRIER_F() { TAU_PROFILE_TIMER(t, "gpbarrier_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPBARRIER_F(); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_BARRIER_ALL_F wrapper function *** (from barrier/gps_barrier.c) ******************************************************/ void GPSHMEM_BARRIER_ALL_F() { TAU_PROFILE_TIMER(t, "gpshmem_barrier_all_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_BARRIER_ALL_F(); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_BARRIER__ST_F wrapper function *** (from barrier/gps_barrier.c) ******************************************************/ void GPSHMEM_BARRIER__ST_F(int* PE_start, int* PE_stride, int* PE_size, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_barrier__st_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_BARRIER__ST_F(PE_start, PE_stride, PE_size, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_BARRIER_F wrapper function *** (from barrier/gps_barrier.c) ******************************************************/ void GPSHMEM_BARRIER_F(int* PE_start, int* logPE_stride, int* PE_size, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_barrier_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_BARRIER_F(PE_start, logPE_stride, PE_size, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_BROADCAST__ST_C wrapper function *** (from broadcast/gps_bcast.c) ******************************************************/ void GPSHMEM_BROADCAST__ST_C(long* target, long* source, int nlong, int PE_root, int PE_start, int PE_stride, int PE_size, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_broadcast__st_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_BROADCAST__ST_C(target, source, nlong, PE_root, PE_start, PE_stride, PE_size, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_BROADCAST32__ST_C wrapper function *** (from broadcast/gps_bcast.c) ******************************************************/ void GPSHMEM_BROADCAST32__ST_C(short* target, short* source, int nlong, int PE_root, int PE_start, int PE_stride, int PE_size, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_broadcast32__st_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_BROADCAST32__ST_C(target, source, nlong, PE_root, PE_start, PE_stride, PE_size, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_BROADCAST_C wrapper function *** (from broadcast/gps_bcast.c) ******************************************************/ void GPSHMEM_BROADCAST_C(long* target, long* source, int nlong, int PE_root, int PE_start, int logPE_stride, int PE_size, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_broadcast_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_BROADCAST_C(target, source, nlong, PE_root, PE_start, logPE_stride, PE_size, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_BROADCAST32_C wrapper function *** (from broadcast/gps_bcast.c) ******************************************************/ void GPSHMEM_BROADCAST32_C(short* target, short* source, int nlong, int PE_root, int PE_start, int logPE_stride, int PE_size, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_broadcast32_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_BROADCAST32_C(target, source, nlong, PE_root, PE_start, logPE_stride, PE_size, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_BROADCAST__ST_F wrapper function *** (from broadcast/gps_bcast.c) ******************************************************/ void GPSHMEM_BROADCAST__ST_F(long* target, long* source, int* nlong, int* PE_root, int* PE_start, int* PE_stride, int* PE_size, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_broadcast__st_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_BROADCAST__ST_F(target, source, nlong, PE_root, PE_start, PE_stride, PE_size, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_BROADCAST32__ST_F wrapper function *** (from broadcast/gps_bcast.c) ******************************************************/ void GPSHMEM_BROADCAST32__ST_F(short* target, short* source, int* nlong, int* PE_root, int* PE_start, int* PE_stride, int* PE_size, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_broadcast32__st_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_BROADCAST32__ST_F(target, source, nlong, PE_root, PE_start, PE_stride, PE_size, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_BROADCAST_F wrapper function *** (from broadcast/gps_bcast.c) ******************************************************/ void GPSHMEM_BROADCAST_F(long* target, long* source, int* nlong, int* PE_root, int* PE_start, int* logPE_stride, int* PE_size, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_broadcast_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_BROADCAST_F(target, source, nlong, PE_root, PE_start, logPE_stride, PE_size, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_BROADCAST32_F wrapper function *** (from broadcast/gps_bcast.c) ******************************************************/ void GPSHMEM_BROADCAST32_F(short* target, short* source, int* nlong, int* PE_root, int* PE_start, int* logPE_stride, int* PE_size, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_broadcast32_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_BROADCAST32_F(target, source, nlong, PE_root, PE_start, logPE_stride, PE_size, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_COLLECT__ST_C wrapper function *** (from collect/gps_collect.c) ******************************************************/ void GPSHMEM_COLLECT__ST_C(long* target, long* source, int nwords, int PE_start, int PE_stride, int PE_size, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_collect__st_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_COLLECT__ST_C(target, source, nwords, PE_start, PE_stride, PE_size, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_COLLECT32__ST_C wrapper function *** (from collect/gps_collect.c) ******************************************************/ void GPSHMEM_COLLECT32__ST_C(short* target, short* source, int nwords, int PE_start, int PE_stride, int PE_size, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_collect32__st_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_COLLECT32__ST_C(target, source, nwords, PE_start, PE_stride, PE_size, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_FCOLLECT__ST_C wrapper function *** (from collect/gps_collect.c) ******************************************************/ void GPSHMEM_FCOLLECT__ST_C(long* target, long* source, int nwords, int PE_start, int PE_stride, int PE_size, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_fcollect__st_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_FCOLLECT__ST_C(target, source, nwords, PE_start, PE_stride, PE_size, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_FCOLLECT32__ST_C wrapper function *** (from collect/gps_collect.c) ******************************************************/ void GPSHMEM_FCOLLECT32__ST_C(short* target, short* source, int nwords, int PE_start, int PE_stride, int PE_size, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_fcollect32__st_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_FCOLLECT32__ST_C(target, source, nwords, PE_start, PE_stride, PE_size, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_COLLECT_C wrapper function *** (from collect/gps_collect.c) ******************************************************/ void GPSHMEM_COLLECT_C(long* target, long* source, int nwords, int PE_start, int logPE_stride, int PE_size, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_collect_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_COLLECT_C(target, source, nwords, PE_start, logPE_stride, PE_size, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_COLLECT32_C wrapper function *** (from collect/gps_collect.c) ******************************************************/ void GPSHMEM_COLLECT32_C(short* target, short* source, int nwords, int PE_start, int logPE_stride, int PE_size, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_collect32_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_COLLECT32_C(target, source, nwords, PE_start, logPE_stride, PE_size, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_FCOLLECT_C wrapper function *** (from collect/gps_collect.c) ******************************************************/ void GPSHMEM_FCOLLECT_C(long* target, long* source, int nwords, int PE_start, int logPE_stride, int PE_size, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_fcollect_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_FCOLLECT_C(target, source, nwords, PE_start, logPE_stride, PE_size, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_FCOLLECT32_C wrapper function *** (from collect/gps_collect.c) ******************************************************/ void GPSHMEM_FCOLLECT32_C(short* target, short* source, int nwords, int PE_start, int logPE_stride, int PE_size, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_fcollect32_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_FCOLLECT32_C(target, source, nwords, PE_start, logPE_stride, PE_size, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_COLLECT__ST_F wrapper function *** (from collect/gps_collect.c) ******************************************************/ void GPSHMEM_COLLECT__ST_F(long* target, long* source, int* nwords, int* PE_start, int* PE_stride, int* PE_size, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_collect__st_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_COLLECT__ST_F(target, source, nwords, PE_start, PE_stride, PE_size, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_COLLECT32__ST_F wrapper function *** (from collect/gps_collect.c) ******************************************************/ void GPSHMEM_COLLECT32__ST_F(short* target, short* source, int* nwords, int* PE_start, int* PE_stride, int* PE_size, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_collect32__st_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_COLLECT32__ST_F(target, source, nwords, PE_start, PE_stride, PE_size, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_FCOLLECT__ST_F wrapper function *** (from collect/gps_collect.c) ******************************************************/ void GPSHMEM_FCOLLECT__ST_F(long* target, long* source, int* nwords, int* PE_start, int* PE_stride, int* PE_size, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_fcollect__st_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_FCOLLECT__ST_F(target, source, nwords, PE_start, PE_stride, PE_size, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_FCOLLECT32__ST_F wrapper function *** (from collect/gps_collect.c) ******************************************************/ void GPSHMEM_FCOLLECT32__ST_F(short* target, short* source, int* nwords, int* PE_start, int* PE_stride, int* PE_size, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_fcollect32__st_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_FCOLLECT32__ST_F(target, source, nwords, PE_start, PE_stride, PE_size, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_COLLECT_F wrapper function *** (from collect/gps_collect.c) ******************************************************/ void GPSHMEM_COLLECT_F(long* target, long* source, int* nwords, int* PE_start, int* logPE_stride, int* PE_size, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_collect_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_COLLECT_F(target, source, nwords, PE_start, logPE_stride, PE_size, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_COLLECT32_F wrapper function *** (from collect/gps_collect.c) ******************************************************/ void GPSHMEM_COLLECT32_F(short* target, short* source, int* nwords, int* PE_start, int* logPE_stride, int* PE_size, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_collect32_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_COLLECT32_F(target, source, nwords, PE_start, logPE_stride, PE_size, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_FCOLLECT_F wrapper function *** (from collect/gps_collect.c) ******************************************************/ void GPSHMEM_FCOLLECT_F(long* target, long* source, int* nwords, int* PE_start, int* logPE_stride, int* PE_size, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_fcollect_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_FCOLLECT_F(target, source, nwords, PE_start, logPE_stride, PE_size, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_FCOLLECT32_F wrapper function *** (from collect/gps_collect.c) ******************************************************/ void GPSHMEM_FCOLLECT32_F(short* target, short* source, int* nwords, int* PE_start, int* logPE_stride, int* PE_size, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_fcollect32_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_FCOLLECT32_F(target, source, nwords, PE_start, logPE_stride, PE_size, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_GETMEM_C wrapper function *** (from getput/gps_getput.c) ******************************************************/ void GPSHMEM_GETMEM_C(void* target, void* source, int nlong, int pe) { TAU_PROFILE_TIMER(t, "gpshmem_getmem_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_GETMEM_C(target, source, nlong, pe); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_GET_C wrapper function *** (from getput/gps_getput.c) ******************************************************/ void GPSHMEM_GET_C(long* target, long* source, int nlong, int pe) { TAU_PROFILE_TIMER(t, "gpshmem_get_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_GET_C(target, source, nlong, pe); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_GET32_C wrapper function *** (from getput/gps_getput.c) ******************************************************/ void GPSHMEM_GET32_C(short* target, short* source, int nlong, int pe) { TAU_PROFILE_TIMER(t, "gpshmem_get32_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_GET32_C(target, source, nlong, pe); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_PUTMEM_C wrapper function *** (from getput/gps_getput.c) ******************************************************/ void GPSHMEM_PUTMEM_C(void* target, void* source, int nlong, int pe) { TAU_PROFILE_TIMER(t, "gpshmem_putmem_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_PUTMEM_C(target, source, nlong, pe); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_PUT_C wrapper function *** (from getput/gps_getput.c) ******************************************************/ void GPSHMEM_PUT_C(long* target, long* source, int nlong, int pe) { TAU_PROFILE_TIMER(t, "gpshmem_put_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_PUT_C(target, source, nlong, pe); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_PUT32_C wrapper function *** (from getput/gps_getput.c) ******************************************************/ void GPSHMEM_PUT32_C(short* target, short* source, int nlong, int pe) { TAU_PROFILE_TIMER(t, "gpshmem_put32_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_PUT32_C(target, source, nlong, pe); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_IGET_C wrapper function *** (from getput/gps_getput.c) ******************************************************/ void GPSHMEM_IGET_C(long* target, long* source, int target_inc, int source_inc, int nlong, int pe) { TAU_PROFILE_TIMER(t, "gpshmem_iget_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_IGET_C(target, source, target_inc, source_inc, nlong, pe); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_IGET32_C wrapper function *** (from getput/gps_getput.c) ******************************************************/ void GPSHMEM_IGET32_C(short* target, short* source, int target_inc, int source_inc, int nlong, int pe) { TAU_PROFILE_TIMER(t, "gpshmem_iget32_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_IGET32_C(target, source, target_inc, source_inc, nlong, pe); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_IPUT_C wrapper function *** (from getput/gps_getput.c) ******************************************************/ void GPSHMEM_IPUT_C(long* target, long* source, int target_inc, int source_inc, int nlong, int pe) { TAU_PROFILE_TIMER(t, "gpshmem_iput_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_IPUT_C(target, source, target_inc, source_inc, nlong, pe); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_IPUT32_C wrapper function *** (from getput/gps_getput.c) ******************************************************/ void GPSHMEM_IPUT32_C(short* target, short* source, int target_inc, int source_inc, int nlong, int pe) { TAU_PROFILE_TIMER(t, "gpshmem_iput32_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_IPUT32_C(target, source, target_inc, source_inc, nlong, pe); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_IXGET_C wrapper function *** (from getput/gps_getput.c) ******************************************************/ void GPSHMEM_IXGET_C(long* target, long* source, long* source_index, int nlong, int pe) { TAU_PROFILE_TIMER(t, "gpshmem_ixget_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_IXGET_C(target, source, source_index, nlong, pe); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_IXGET32_C wrapper function *** (from getput/gps_getput.c) ******************************************************/ void GPSHMEM_IXGET32_C(short* target, short* source, short* source_index, int nlong, int pe) { TAU_PROFILE_TIMER(t, "gpshmem_ixget32_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_IXGET32_C(target, source, source_index, nlong, pe); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_IXPUT_C wrapper function *** (from getput/gps_getput.c) ******************************************************/ void GPSHMEM_IXPUT_C(long* target, long* source, long* target_index, int nlong, int pe) { TAU_PROFILE_TIMER(t, "gpshmem_ixput_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_IXPUT_C(target, source, target_index, nlong, pe); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_IXPUT32_C wrapper function *** (from getput/gps_getput.c) ******************************************************/ void GPSHMEM_IXPUT32_C(short* target, short* source, short* target_index, int nlong, int pe) { TAU_PROFILE_TIMER(t, "gpshmem_ixput32_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_IXPUT32_C(target, source, target_index, nlong, pe); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_GETMEM_F wrapper function *** (from getput/gps_getput.c) ******************************************************/ void GPSHMEM_GETMEM_F(void* target, void* source, int* nlong, int* pe) { TAU_PROFILE_TIMER(t, "gpshmem_getmem_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_GETMEM_F(target, source, nlong, pe); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_GET_F wrapper function *** (from getput/gps_getput.c) ******************************************************/ void GPSHMEM_GET_F(long* target, long* source, int* nlong, int* pe) { TAU_PROFILE_TIMER(t, "gpshmem_get_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_GET_F(target, source, nlong, pe); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_GET32_F wrapper function *** (from getput/gps_getput.c) ******************************************************/ void GPSHMEM_GET32_F(short* target, short* source, int* nlong, int* pe) { TAU_PROFILE_TIMER(t, "gpshmem_get32_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_GET32_F(target, source, nlong, pe); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_PUT_F wrapper function *** (from getput/gps_getput.c) ******************************************************/ void GPSHMEM_PUT_F(long* target, long* source, int* nlong, int* pe) { TAU_PROFILE_TIMER(t, "gpshmem_put_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_PUT_F(target, source, nlong, pe); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_PUT32_F wrapper function *** (from getput/gps_getput.c) ******************************************************/ void GPSHMEM_PUT32_F(short* target, short* source, int* nlong, int* pe) { TAU_PROFILE_TIMER(t, "gpshmem_put32_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_PUT32_F(target, source, nlong, pe); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_IGET_F wrapper function *** (from getput/gps_getput.c) ******************************************************/ void GPSHMEM_IGET_F(long* target, long* source, int* target_inc, int* source_inc, int* nlong, int* pe) { TAU_PROFILE_TIMER(t, "gpshmem_iget_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_IGET_F(target, source, target_inc, source_inc, nlong, pe); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_IGET32_F wrapper function *** (from getput/gps_getput.c) ******************************************************/ void GPSHMEM_IGET32_F(short* target, short* source, int* target_inc, int* source_inc, int* nlong, int* pe) { TAU_PROFILE_TIMER(t, "gpshmem_iget32_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_IGET32_F(target, source, target_inc, source_inc, nlong, pe); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_IPUT_F wrapper function *** (from getput/gps_getput.c) ******************************************************/ void GPSHMEM_IPUT_F(long* target, long* source, int* target_inc, int* source_inc, int* nlong, int* pe) { TAU_PROFILE_TIMER(t, "gpshmem_iput_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_IPUT_F(target, source, target_inc, source_inc, nlong, pe); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_IPUT32_F wrapper function *** (from getput/gps_getput.c) ******************************************************/ void GPSHMEM_IPUT32_F(short* target, short* source, int* target_inc, int* source_inc, int* nlong, int* pe) { TAU_PROFILE_TIMER(t, "gpshmem_iput32_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_IPUT32_F(target, source, target_inc, source_inc, nlong, pe); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_IXGET_F wrapper function *** (from getput/gps_getput.c) ******************************************************/ void GPSHMEM_IXGET_F(long* target, long* source, long* source_index, int* nlong, int* pe) { TAU_PROFILE_TIMER(t, "gpshmem_ixget_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_IXGET_F(target, source, source_index, nlong, pe); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_IXGET32_F wrapper function *** (from getput/gps_getput.c) ******************************************************/ void GPSHMEM_IXGET32_F(short* target, short* source, short* source_index, int* nlong, int* pe) { TAU_PROFILE_TIMER(t, "gpshmem_ixget32_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_IXGET32_F(target, source, source_index, nlong, pe); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_IXPUT_F wrapper function *** (from getput/gps_getput.c) ******************************************************/ void GPSHMEM_IXPUT_F(long* target, long* source, long* target_index, int* nlong, int* pe) { TAU_PROFILE_TIMER(t, "gpshmem_ixput_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_IXPUT_F(target, source, target_index, nlong, pe); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_IXPUT32_F wrapper function *** (from getput/gps_getput.c) ******************************************************/ void GPSHMEM_IXPUT32_F(short* target, short* source, short* target_index, int* nlong, int* pe) { TAU_PROFILE_TIMER(t, "gpshmem_ixput32_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_IXPUT32_F(target, source, target_index, nlong, pe); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMALLOC_C wrapper function *** (from mem/gp_ma.c) ******************************************************/ void* GPSHMALLOC_C(size_t client_nbytes) { void* retval; TAU_PROFILE_TIMER(t, "gpshmalloc_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retval = (void*)PGPSHMALLOC_C(client_nbytes); TAU_PROFILE_STOP(t); return retval; } /****************************************************** *** GPSHFREE_C wrapper function *** (from mem/gp_ma.c) ******************************************************/ void GPSHFREE_C(void* client_ptr) { TAU_PROFILE_TIMER(t, "gpshfree_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHFREE_C(client_ptr); TAU_PROFILE_STOP(t); } /****************************************************** *** GPPTRALIGN_C wrapper function *** (from mem/gp_ma.c) ******************************************************/ int GPPTRALIGN_C(int alignment) { int retval; TAU_PROFILE_TIMER(t, "gpptralign_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retval = (int)PGPPTRALIGN_C(alignment); TAU_PROFILE_STOP(t); return retval; } /****************************************************** *** GPSHPALLOC32_F wrapper function *** (from mem/gp_ma.c) ******************************************************/ void GPSHPALLOC32_F(void** client_ptr, int* length, int* errcode, int* abort) { TAU_PROFILE_TIMER(t, "gpshpalloc32_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHPALLOC32_F(client_ptr, length, errcode, abort); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHPALLOC64_F wrapper function *** (from mem/gp_ma.c) ******************************************************/ void GPSHPALLOC64_F(void** client_ptr, int* length, int* errcode, int* abort) { TAU_PROFILE_TIMER(t, "gpshpalloc64_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHPALLOC64_F(client_ptr, length, errcode, abort); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHFREE_F wrapper function *** (from mem/gp_ma.c) ******************************************************/ void GPSHFREE_F(void** client_ptr) { TAU_PROFILE_TIMER(t, "gpshfree_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHFREE_F(client_ptr); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHPALLOC_F wrapper function *** (from mem/gp_ma.c) ******************************************************/ void GPSHPALLOC_F(void** client_ptr, int* length, int* errcode, int* abort) { TAU_PROFILE_TIMER(t, "gpshpalloc_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHPALLOC_F(client_ptr, length, errcode, abort); TAU_PROFILE_STOP(t); } /****************************************************** *** GPPTRALIGN_F wrapper function *** (from mem/gp_ma.c) ******************************************************/ int GPPTRALIGN_F(int* alignment) { int retval; TAU_PROFILE_TIMER(t, "gpptralign_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retval = (int)PGPPTRALIGN_F(alignment); TAU_PROFILE_STOP(t); return retval; } /****************************************************** *** GPSHMALLOC_F wrapper function *** (from mem/gp_ma77.c) ******************************************************/ memhandle_t GPSHMALLOC_F(int* type_id, int* length) { memhandle_t retval; TAU_PROFILE_TIMER(t, "gpshmalloc_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retval = (memhandle_t)PGPSHMALLOC_F(type_id, length); TAU_PROFILE_STOP(t); return retval; } /****************************************************** *** GPSHINDEX_F wrapper function *** (from mem/gp_ma77.c) ******************************************************/ int GPSHINDEX_F(int* type_id, memhandle_t* handle) { int retval; TAU_PROFILE_TIMER(t, "gpshindex_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retval = (int)PGPSHINDEX_F(type_id, handle); TAU_PROFILE_STOP(t); return retval; } /****************************************************** *** GPSHMALLOCI_F wrapper function *** (from mem/gp_ma77.c) ******************************************************/ memhandle_t GPSHMALLOCI_F(int* type_id, int* length, int* index) { memhandle_t retval; TAU_PROFILE_TIMER(t, "gpshmalloci_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retval = (memhandle_t)PGPSHMALLOCI_F(type_id, length, index); TAU_PROFILE_STOP(t); return retval; } /****************************************************** *** GPSHFREE_HANDLE_F wrapper function *** (from mem/gp_ma77.c) ******************************************************/ void GPSHFREE_HANDLE_F(memhandle_t* handle) { TAU_PROFILE_TIMER(t, "gpshfree_handle_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHFREE_HANDLE_F(handle); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_FENCE_C wrapper function *** (from misc/gps_fence.c) ******************************************************/ void GPSHMEM_FENCE_C() { TAU_PROFILE_TIMER(t, "gpshmem_fence_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_FENCE_C(); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_QUIET_C wrapper function *** (from misc/gps_fence.c) ******************************************************/ void GPSHMEM_QUIET_C() { TAU_PROFILE_TIMER(t, "gpshmem_quiet_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_QUIET_C(); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_FENCE_F wrapper function *** (from misc/gps_fence.c) ******************************************************/ void GPSHMEM_FENCE_F() { TAU_PROFILE_TIMER(t, "gpshmem_fence_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_FENCE_F(); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_QUIET_F wrapper function *** (from misc/gps_fence.c) ******************************************************/ void GPSHMEM_QUIET_F() { TAU_PROFILE_TIMER(t, "gpshmem_quiet_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_QUIET_F(); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_INT_SWAP_C wrapper function *** (from misc/gps_swap.c) ******************************************************/ int GPSHMEM_INT_SWAP_C(int* target, int value, int pe) { int retval; TAU_PROFILE_TIMER(t, "gpshmem_int_swap_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retval = (int)PGPSHMEM_INT_SWAP_C(target, value, pe); TAU_PROFILE_STOP(t); return retval; } /****************************************************** *** GPSHMEM_INT_SWAP_F wrapper function *** (from misc/gps_swap.c) ******************************************************/ int GPSHMEM_INT_SWAP_F(long* target, long* value, int* pe) { int retval; TAU_PROFILE_TIMER(t, "gpshmem_int_swap_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); retval = (int)PGPSHMEM_INT_SWAP_F(target, value, pe); TAU_PROFILE_STOP(t); return retval; } /****************************************************** *** GPSHMEM_WAIT_C wrapper function *** (from misc/gps_wait.c) ******************************************************/ void GPSHMEM_WAIT_C(long* ivar, long value) { TAU_PROFILE_TIMER(t, "gpshmem_wait_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_WAIT_C(ivar, value); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_WAIT_UNTIL_C wrapper function *** (from misc/gps_wait.c) ******************************************************/ void GPSHMEM_WAIT_UNTIL_C(long* ivar, int cmp, long value) { TAU_PROFILE_TIMER(t, "gpshmem_wait_until_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_WAIT_UNTIL_C(ivar, cmp, value); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_INT_WAIT_C wrapper function *** (from misc/gps_wait.c) ******************************************************/ void GPSHMEM_INT_WAIT_C(int* ivar, int value) { TAU_PROFILE_TIMER(t, "gpshmem_int_wait_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_INT_WAIT_C(ivar, value); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_INT_WAIT_UNTIL_C wrapper function *** (from misc/gps_wait.c) ******************************************************/ void GPSHMEM_INT_WAIT_UNTIL_C(int* ivar, int cmp, int value) { TAU_PROFILE_TIMER(t, "gpshmem_int_wait_until_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_INT_WAIT_UNTIL_C(ivar, cmp, value); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_LONG_WAIT_C wrapper function *** (from misc/gps_wait.c) ******************************************************/ void GPSHMEM_LONG_WAIT_C(long* ivar, long value) { TAU_PROFILE_TIMER(t, "gpshmem_long_wait_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_LONG_WAIT_C(ivar, value); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_LONG_WAIT_UNTIL_C wrapper function *** (from misc/gps_wait.c) ******************************************************/ void GPSHMEM_LONG_WAIT_UNTIL_C(long* ivar, int cmp, long value) { TAU_PROFILE_TIMER(t, "gpshmem_long_wait_until_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_LONG_WAIT_UNTIL_C(ivar, cmp, value); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_WAIT_F wrapper function *** (from misc/gps_wait.c) ******************************************************/ void GPSHMEM_WAIT_F(long* ivar, long* value) { TAU_PROFILE_TIMER(t, "gpshmem_wait_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_WAIT_F(ivar, value); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_WAIT_UNTIL_F wrapper function *** (from misc/gps_wait.c) ******************************************************/ void GPSHMEM_WAIT_UNTIL_F(long* ivar, int* cmp, long* value) { TAU_PROFILE_TIMER(t, "gpshmem_wait_until_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_WAIT_UNTIL_F(ivar, cmp, value); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_INT_WAIT_F wrapper function *** (from misc/gps_wait.c) ******************************************************/ void GPSHMEM_INT_WAIT_F(int* ivar, int* value) { TAU_PROFILE_TIMER(t, "gpshmem_int_wait_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_INT_WAIT_F(ivar, value); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_INT_WAIT_UNTIL_F wrapper function *** (from misc/gps_wait.c) ******************************************************/ void GPSHMEM_INT_WAIT_UNTIL_F(int* ivar, int* cmp, int* value) { TAU_PROFILE_TIMER(t, "gpshmem_int_wait_until_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_INT_WAIT_UNTIL_F(ivar, cmp, value); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_LONG_WAIT_F wrapper function *** (from misc/gps_wait.c) ******************************************************/ void GPSHMEM_LONG_WAIT_F(long* ivar, long* value) { TAU_PROFILE_TIMER(t, "gpshmem_long_wait_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_LONG_WAIT_F(ivar, value); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_LONG_WAIT_UNTIL_F wrapper function *** (from misc/gps_wait.c) ******************************************************/ void GPSHMEM_LONG_WAIT_UNTIL_F(long* ivar, int* cmp, long* value) { TAU_PROFILE_TIMER(t, "gpshmem_long_wait_until_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_LONG_WAIT_UNTIL_F(ivar, cmp, value); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_INT_AND_TO_ALL__ST_C wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_INT_AND_TO_ALL__ST_C(int* target, int* source, int nreduce, int PE_start, int PE_stride, int PE_size, int* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_int_and_to_all__st_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_INT_AND_TO_ALL__ST_C(target, source, nreduce, PE_start, PE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_SHORT_AND_TO_ALL__ST_C wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_SHORT_AND_TO_ALL__ST_C(short* target, short* source, int nreduce, int PE_start, int PE_stride, int PE_size, short* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_short_and_to_all__st_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_SHORT_AND_TO_ALL__ST_C(target, source, nreduce, PE_start, PE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_LONG_AND_TO_ALL__ST_C wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_LONG_AND_TO_ALL__ST_C(long* target, long* source, int nreduce, int PE_start, int PE_stride, int PE_size, long* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_long_and_to_all__st_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_LONG_AND_TO_ALL__ST_C(target, source, nreduce, PE_start, PE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_LONGLONG_AND_TO_ALL__ST_C wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_LONGLONG_AND_TO_ALL__ST_C(long long* target, long long* source, int nreduce, int PE_start, int PE_stride, int PE_size, long long* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_longlong_and_to_all__st_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_LONGLONG_AND_TO_ALL__ST_C(target, source, nreduce, PE_start, PE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_INT_AND_TO_ALL_C wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_INT_AND_TO_ALL_C(int* target, int* source, int nreduce, int PE_start, int logPE_stride, int PE_size, int* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_int_and_to_all_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_INT_AND_TO_ALL_C(target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_SHORT_AND_TO_ALL_C wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_SHORT_AND_TO_ALL_C(short* target, short* source, int nreduce, int PE_start, int logPE_stride, int PE_size, short* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_short_and_to_all_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_SHORT_AND_TO_ALL_C(target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_LONG_AND_TO_ALL_C wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_LONG_AND_TO_ALL_C(long* target, long* source, int nreduce, int PE_start, int logPE_stride, int PE_size, long* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_long_and_to_all_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_LONG_AND_TO_ALL_C(target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_LONGLONG_AND_TO_ALL_C wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_LONGLONG_AND_TO_ALL_C(long long* target, long long* source, int nreduce, int PE_start, int logPE_stride, int PE_size, long long* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_longlong_and_to_all_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_LONGLONG_AND_TO_ALL_C(target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_INT_OR_TO_ALL__ST_C wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_INT_OR_TO_ALL__ST_C(int* target, int* source, int nreduce, int PE_start, int PE_stride, int PE_size, int* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_int_or_to_all__st_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_INT_OR_TO_ALL__ST_C(target, source, nreduce, PE_start, PE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_SHORT_OR_TO_ALL__ST_C wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_SHORT_OR_TO_ALL__ST_C(short* target, short* source, int nreduce, int PE_start, int PE_stride, int PE_size, short* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_short_or_to_all__st_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_SHORT_OR_TO_ALL__ST_C(target, source, nreduce, PE_start, PE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_LONG_OR_TO_ALL__ST_C wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_LONG_OR_TO_ALL__ST_C(long* target, long* source, int nreduce, int PE_start, int PE_stride, int PE_size, long* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_long_or_to_all__st_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_LONG_OR_TO_ALL__ST_C(target, source, nreduce, PE_start, PE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_LONGLONG_OR_TO_ALL__ST_C wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_LONGLONG_OR_TO_ALL__ST_C(long long* target, long long* source, int nreduce, int PE_start, int PE_stride, int PE_size, long long* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_longlong_or_to_all__st_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_LONGLONG_OR_TO_ALL__ST_C(target, source, nreduce, PE_start, PE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_INT_OR_TO_ALL_C wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_INT_OR_TO_ALL_C(int* target, int* source, int nreduce, int PE_start, int logPE_stride, int PE_size, int* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_int_or_to_all_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_INT_OR_TO_ALL_C(target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_SHORT_OR_TO_ALL_C wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_SHORT_OR_TO_ALL_C(short* target, short* source, int nreduce, int PE_start, int logPE_stride, int PE_size, short* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_short_or_to_all_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_SHORT_OR_TO_ALL_C(target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_LONG_OR_TO_ALL_C wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_LONG_OR_TO_ALL_C(long* target, long* source, int nreduce, int PE_start, int logPE_stride, int PE_size, long* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_long_or_to_all_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_LONG_OR_TO_ALL_C(target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_LONGLONG_OR_TO_ALL_C wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_LONGLONG_OR_TO_ALL_C(long long* target, long long* source, int nreduce, int PE_start, int logPE_stride, int PE_size, long long* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_longlong_or_to_all_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_LONGLONG_OR_TO_ALL_C(target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_INT_XOR_TO_ALL__ST_C wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_INT_XOR_TO_ALL__ST_C(int* target, int* source, int nreduce, int PE_start, int PE_stride, int PE_size, int* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_int_xor_to_all__st_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_INT_XOR_TO_ALL__ST_C(target, source, nreduce, PE_start, PE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_SHORT_XOR_TO_ALL__ST_C wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_SHORT_XOR_TO_ALL__ST_C(short* target, short* source, int nreduce, int PE_start, int PE_stride, int PE_size, short* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_short_xor_to_all__st_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_SHORT_XOR_TO_ALL__ST_C(target, source, nreduce, PE_start, PE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_LONG_XOR_TO_ALL__ST_C wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_LONG_XOR_TO_ALL__ST_C(long* target, long* source, int nreduce, int PE_start, int PE_stride, int PE_size, long* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_long_xor_to_all__st_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_LONG_XOR_TO_ALL__ST_C(target, source, nreduce, PE_start, PE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_LONGLONG_XOR_TO_ALL__ST_C wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_LONGLONG_XOR_TO_ALL__ST_C(long long* target, long long* source, int nreduce, int PE_start, int PE_stride, int PE_size, long long* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_longlong_xor_to_all__st_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_LONGLONG_XOR_TO_ALL__ST_C(target, source, nreduce, PE_start, PE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_INT_XOR_TO_ALL_C wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_INT_XOR_TO_ALL_C(int* target, int* source, int nreduce, int PE_start, int logPE_stride, int PE_size, int* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_int_xor_to_all_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_INT_XOR_TO_ALL_C(target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_SHORT_XOR_TO_ALL_C wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_SHORT_XOR_TO_ALL_C(short* target, short* source, int nreduce, int PE_start, int logPE_stride, int PE_size, short* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_short_xor_to_all_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_SHORT_XOR_TO_ALL_C(target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_LONG_XOR_TO_ALL_C wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_LONG_XOR_TO_ALL_C(long* target, long* source, int nreduce, int PE_start, int logPE_stride, int PE_size, long* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_long_xor_to_all_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_LONG_XOR_TO_ALL_C(target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_LONGLONG_XOR_TO_ALL_C wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_LONGLONG_XOR_TO_ALL_C(long long* target, long long* source, int nreduce, int PE_start, int logPE_stride, int PE_size, long long* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_longlong_xor_to_all_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_LONGLONG_XOR_TO_ALL_C(target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_INT_SUM_TO_ALL__ST_C wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_INT_SUM_TO_ALL__ST_C(int* target, int* source, int nreduce, int PE_start, int PE_stride, int PE_size, int* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_int_sum_to_all__st_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_INT_SUM_TO_ALL__ST_C(target, source, nreduce, PE_start, PE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_SHORT_SUM_TO_ALL__ST_C wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_SHORT_SUM_TO_ALL__ST_C(short* target, short* source, int nreduce, int PE_start, int PE_stride, int PE_size, short* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_short_sum_to_all__st_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_SHORT_SUM_TO_ALL__ST_C(target, source, nreduce, PE_start, PE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_LONG_SUM_TO_ALL__ST_C wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_LONG_SUM_TO_ALL__ST_C(long* target, long* source, int nreduce, int PE_start, int PE_stride, int PE_size, long* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_long_sum_to_all__st_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_LONG_SUM_TO_ALL__ST_C(target, source, nreduce, PE_start, PE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_LONGLONG_SUM_TO_ALL__ST_C wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_LONGLONG_SUM_TO_ALL__ST_C(long long* target, long long* source, int nreduce, int PE_start, int PE_stride, int PE_size, long long* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_longlong_sum_to_all__st_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_LONGLONG_SUM_TO_ALL__ST_C(target, source, nreduce, PE_start, PE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_DOUBLE_SUM_TO_ALL__ST_C wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_DOUBLE_SUM_TO_ALL__ST_C(double* target, double* source, int nreduce, int PE_start, int PE_stride, int PE_size, double* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_double_sum_to_all__st_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_DOUBLE_SUM_TO_ALL__ST_C(target, source, nreduce, PE_start, PE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_FLOAT_SUM_TO_ALL__ST_C wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_FLOAT_SUM_TO_ALL__ST_C(float* target, float* source, int nreduce, int PE_start, int PE_stride, int PE_size, float* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_float_sum_to_all__st_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_FLOAT_SUM_TO_ALL__ST_C(target, source, nreduce, PE_start, PE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_INT_SUM_TO_ALL_C wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_INT_SUM_TO_ALL_C(int* target, int* source, int nreduce, int PE_start, int logPE_stride, int PE_size, int* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_int_sum_to_all_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_INT_SUM_TO_ALL_C(target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_SHORT_SUM_TO_ALL_C wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_SHORT_SUM_TO_ALL_C(short* target, short* source, int nreduce, int PE_start, int logPE_stride, int PE_size, short* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_short_sum_to_all_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_SHORT_SUM_TO_ALL_C(target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_LONG_SUM_TO_ALL_C wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_LONG_SUM_TO_ALL_C(long* target, long* source, int nreduce, int PE_start, int logPE_stride, int PE_size, long* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_long_sum_to_all_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_LONG_SUM_TO_ALL_C(target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_LONGLONG_SUM_TO_ALL_C wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_LONGLONG_SUM_TO_ALL_C(long long* target, long long* source, int nreduce, int PE_start, int logPE_stride, int PE_size, long long* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_longlong_sum_to_all_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_LONGLONG_SUM_TO_ALL_C(target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_DOUBLE_SUM_TO_ALL_C wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_DOUBLE_SUM_TO_ALL_C(double* target, double* source, int nreduce, int PE_start, int logPE_stride, int PE_size, double* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_double_sum_to_all_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_DOUBLE_SUM_TO_ALL_C(target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_FLOAT_SUM_TO_ALL_C wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_FLOAT_SUM_TO_ALL_C(float* target, float* source, int nreduce, int PE_start, int logPE_stride, int PE_size, float* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_float_sum_to_all_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_FLOAT_SUM_TO_ALL_C(target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_INT_PROD_TO_ALL__ST_C wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_INT_PROD_TO_ALL__ST_C(int* target, int* source, int nreduce, int PE_start, int PE_stride, int PE_size, int* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_int_prod_to_all__st_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_INT_PROD_TO_ALL__ST_C(target, source, nreduce, PE_start, PE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_SHORT_PROD_TO_ALL__ST_C wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_SHORT_PROD_TO_ALL__ST_C(short* target, short* source, int nreduce, int PE_start, int PE_stride, int PE_size, short* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_short_prod_to_all__st_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_SHORT_PROD_TO_ALL__ST_C(target, source, nreduce, PE_start, PE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_LONG_PROD_TO_ALL__ST_C wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_LONG_PROD_TO_ALL__ST_C(long* target, long* source, int nreduce, int PE_start, int PE_stride, int PE_size, long* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_long_prod_to_all__st_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_LONG_PROD_TO_ALL__ST_C(target, source, nreduce, PE_start, PE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_LONGLONG_PROD_TO_ALL__ST_C wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_LONGLONG_PROD_TO_ALL__ST_C(long long* target, long long* source, int nreduce, int PE_start, int PE_stride, int PE_size, long long* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_longlong_prod_to_all__st_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_LONGLONG_PROD_TO_ALL__ST_C(target, source, nreduce, PE_start, PE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_DOUBLE_PROD_TO_ALL__ST_C wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_DOUBLE_PROD_TO_ALL__ST_C(double* target, double* source, int nreduce, int PE_start, int PE_stride, int PE_size, double* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_double_prod_to_all__st_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_DOUBLE_PROD_TO_ALL__ST_C(target, source, nreduce, PE_start, PE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_FLOAT_PROD_TO_ALL__ST_C wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_FLOAT_PROD_TO_ALL__ST_C(float* target, float* source, int nreduce, int PE_start, int PE_stride, int PE_size, float* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_float_prod_to_all__st_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_FLOAT_PROD_TO_ALL__ST_C(target, source, nreduce, PE_start, PE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_INT_PROD_TO_ALL_C wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_INT_PROD_TO_ALL_C(int* target, int* source, int nreduce, int PE_start, int logPE_stride, int PE_size, int* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_int_prod_to_all_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_INT_PROD_TO_ALL_C(target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_SHORT_PROD_TO_ALL_C wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_SHORT_PROD_TO_ALL_C(short* target, short* source, int nreduce, int PE_start, int logPE_stride, int PE_size, short* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_short_prod_to_all_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_SHORT_PROD_TO_ALL_C(target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_LONG_PROD_TO_ALL_C wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_LONG_PROD_TO_ALL_C(long* target, long* source, int nreduce, int PE_start, int logPE_stride, int PE_size, long* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_long_prod_to_all_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_LONG_PROD_TO_ALL_C(target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_LONGLONG_PROD_TO_ALL_C wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_LONGLONG_PROD_TO_ALL_C(long long* target, long long* source, int nreduce, int PE_start, int logPE_stride, int PE_size, long long* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_longlong_prod_to_all_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_LONGLONG_PROD_TO_ALL_C(target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_DOUBLE_PROD_TO_ALL_C wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_DOUBLE_PROD_TO_ALL_C(double* target, double* source, int nreduce, int PE_start, int logPE_stride, int PE_size, double* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_double_prod_to_all_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_DOUBLE_PROD_TO_ALL_C(target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_FLOAT_PROD_TO_ALL_C wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_FLOAT_PROD_TO_ALL_C(float* target, float* source, int nreduce, int PE_start, int logPE_stride, int PE_size, float* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_float_prod_to_all_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_FLOAT_PROD_TO_ALL_C(target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_INT_MIN_TO_ALL__ST_C wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_INT_MIN_TO_ALL__ST_C(int* target, int* source, int nreduce, int PE_start, int PE_stride, int PE_size, int* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_int_min_to_all__st_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_INT_MIN_TO_ALL__ST_C(target, source, nreduce, PE_start, PE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_SHORT_MIN_TO_ALL__ST_C wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_SHORT_MIN_TO_ALL__ST_C(short* target, short* source, int nreduce, int PE_start, int PE_stride, int PE_size, short* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_short_min_to_all__st_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_SHORT_MIN_TO_ALL__ST_C(target, source, nreduce, PE_start, PE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_LONG_MIN_TO_ALL__ST_C wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_LONG_MIN_TO_ALL__ST_C(long* target, long* source, int nreduce, int PE_start, int PE_stride, int PE_size, long* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_long_min_to_all__st_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_LONG_MIN_TO_ALL__ST_C(target, source, nreduce, PE_start, PE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_LONGLONG_MIN_TO_ALL__ST_C wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_LONGLONG_MIN_TO_ALL__ST_C(long long* target, long long* source, int nreduce, int PE_start, int PE_stride, int PE_size, long long* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_longlong_min_to_all__st_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_LONGLONG_MIN_TO_ALL__ST_C(target, source, nreduce, PE_start, PE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_DOUBLE_MIN_TO_ALL__ST_C wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_DOUBLE_MIN_TO_ALL__ST_C(double* target, double* source, int nreduce, int PE_start, int PE_stride, int PE_size, double* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_double_min_to_all__st_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_DOUBLE_MIN_TO_ALL__ST_C(target, source, nreduce, PE_start, PE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_FLOAT_MIN_TO_ALL__ST_C wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_FLOAT_MIN_TO_ALL__ST_C(float* target, float* source, int nreduce, int PE_start, int PE_stride, int PE_size, float* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_float_min_to_all__st_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_FLOAT_MIN_TO_ALL__ST_C(target, source, nreduce, PE_start, PE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_INT_MIN_TO_ALL_C wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_INT_MIN_TO_ALL_C(int* target, int* source, int nreduce, int PE_start, int logPE_stride, int PE_size, int* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_int_min_to_all_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_INT_MIN_TO_ALL_C(target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_SHORT_MIN_TO_ALL_C wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_SHORT_MIN_TO_ALL_C(short* target, short* source, int nreduce, int PE_start, int logPE_stride, int PE_size, short* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_short_min_to_all_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_SHORT_MIN_TO_ALL_C(target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_LONG_MIN_TO_ALL_C wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_LONG_MIN_TO_ALL_C(long* target, long* source, int nreduce, int PE_start, int logPE_stride, int PE_size, long* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_long_min_to_all_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_LONG_MIN_TO_ALL_C(target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_LONGLONG_MIN_TO_ALL_C wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_LONGLONG_MIN_TO_ALL_C(long long* target, long long* source, int nreduce, int PE_start, int logPE_stride, int PE_size, long long* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_longlong_min_to_all_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_LONGLONG_MIN_TO_ALL_C(target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_DOUBLE_MIN_TO_ALL_C wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_DOUBLE_MIN_TO_ALL_C(double* target, double* source, int nreduce, int PE_start, int logPE_stride, int PE_size, double* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_double_min_to_all_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_DOUBLE_MIN_TO_ALL_C(target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_FLOAT_MIN_TO_ALL_C wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_FLOAT_MIN_TO_ALL_C(float* target, float* source, int nreduce, int PE_start, int logPE_stride, int PE_size, float* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_float_min_to_all_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_FLOAT_MIN_TO_ALL_C(target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_INT_MAX_TO_ALL__ST_C wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_INT_MAX_TO_ALL__ST_C(int* target, int* source, int nreduce, int PE_start, int PE_stride, int PE_size, int* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_int_max_to_all__st_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_INT_MAX_TO_ALL__ST_C(target, source, nreduce, PE_start, PE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_SHORT_MAX_TO_ALL__ST_C wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_SHORT_MAX_TO_ALL__ST_C(short* target, short* source, int nreduce, int PE_start, int PE_stride, int PE_size, short* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_short_max_to_all__st_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_SHORT_MAX_TO_ALL__ST_C(target, source, nreduce, PE_start, PE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_LONG_MAX_TO_ALL__ST_C wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_LONG_MAX_TO_ALL__ST_C(long* target, long* source, int nreduce, int PE_start, int PE_stride, int PE_size, long* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_long_max_to_all__st_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_LONG_MAX_TO_ALL__ST_C(target, source, nreduce, PE_start, PE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_LONGLONG_MAX_TO_ALL__ST_C wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_LONGLONG_MAX_TO_ALL__ST_C(long long* target, long long* source, int nreduce, int PE_start, int PE_stride, int PE_size, long long* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_longlong_max_to_all__st_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_LONGLONG_MAX_TO_ALL__ST_C(target, source, nreduce, PE_start, PE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_DOUBLE_MAX_TO_ALL__ST_C wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_DOUBLE_MAX_TO_ALL__ST_C(double* target, double* source, int nreduce, int PE_start, int PE_stride, int PE_size, double* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_double_max_to_all__st_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_DOUBLE_MAX_TO_ALL__ST_C(target, source, nreduce, PE_start, PE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_FLOAT_MAX_TO_ALL__ST_C wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_FLOAT_MAX_TO_ALL__ST_C(float* target, float* source, int nreduce, int PE_start, int PE_stride, int PE_size, float* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_float_max_to_all__st_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_FLOAT_MAX_TO_ALL__ST_C(target, source, nreduce, PE_start, PE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_INT_MAX_TO_ALL_C wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_INT_MAX_TO_ALL_C(int* target, int* source, int nreduce, int PE_start, int logPE_stride, int PE_size, int* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_int_max_to_all_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_INT_MAX_TO_ALL_C(target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_SHORT_MAX_TO_ALL_C wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_SHORT_MAX_TO_ALL_C(short* target, short* source, int nreduce, int PE_start, int logPE_stride, int PE_size, short* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_short_max_to_all_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_SHORT_MAX_TO_ALL_C(target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_LONG_MAX_TO_ALL_C wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_LONG_MAX_TO_ALL_C(long* target, long* source, int nreduce, int PE_start, int logPE_stride, int PE_size, long* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_long_max_to_all_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_LONG_MAX_TO_ALL_C(target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_LONGLONG_MAX_TO_ALL_C wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_LONGLONG_MAX_TO_ALL_C(long long* target, long long* source, int nreduce, int PE_start, int logPE_stride, int PE_size, long long* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_longlong_max_to_all_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_LONGLONG_MAX_TO_ALL_C(target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_DOUBLE_MAX_TO_ALL_C wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_DOUBLE_MAX_TO_ALL_C(double* target, double* source, int nreduce, int PE_start, int logPE_stride, int PE_size, double* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_double_max_to_all_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_DOUBLE_MAX_TO_ALL_C(target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_FLOAT_MAX_TO_ALL_C wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_FLOAT_MAX_TO_ALL_C(float* target, float* source, int nreduce, int PE_start, int logPE_stride, int PE_size, float* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_float_max_to_all_c()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_FLOAT_MAX_TO_ALL_C(target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_INT_AND_TO_ALL__ST_F wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_INT_AND_TO_ALL__ST_F(int* target, int* source, int* nreduce, int* PE_start, int* PE_stride, int* PE_size, int* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_int_and_to_all__st_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_INT_AND_TO_ALL__ST_F(target, source, nreduce, PE_start, PE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_SHORT_AND_TO_ALL__ST_F wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_SHORT_AND_TO_ALL__ST_F(short* target, short* source, int* nreduce, int* PE_start, int* PE_stride, int* PE_size, short* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_short_and_to_all__st_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_SHORT_AND_TO_ALL__ST_F(target, source, nreduce, PE_start, PE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_LONG_AND_TO_ALL__ST_F wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_LONG_AND_TO_ALL__ST_F(long* target, long* source, int* nreduce, int* PE_start, int* PE_stride, int* PE_size, long* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_long_and_to_all__st_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_LONG_AND_TO_ALL__ST_F(target, source, nreduce, PE_start, PE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_LONGLONG_AND_TO_ALL__ST_F wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_LONGLONG_AND_TO_ALL__ST_F(long long* target, long long* source, int* nreduce, int* PE_start, int* PE_stride, int* PE_size, long long* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_longlong_and_to_all__st_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_LONGLONG_AND_TO_ALL__ST_F(target, source, nreduce, PE_start, PE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_INT_AND_TO_ALL_F wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_INT_AND_TO_ALL_F(int* target, int* source, int* nreduce, int* PE_start, int* logPE_stride, int* PE_size, int* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_int_and_to_all_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_INT_AND_TO_ALL_F(target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_SHORT_AND_TO_ALL_F wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_SHORT_AND_TO_ALL_F(short* target, short* source, int* nreduce, int* PE_start, int* logPE_stride, int* PE_size, short* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_short_and_to_all_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_SHORT_AND_TO_ALL_F(target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_LONG_AND_TO_ALL_F wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_LONG_AND_TO_ALL_F(long* target, long* source, int* nreduce, int* PE_start, int* logPE_stride, int* PE_size, long* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_long_and_to_all_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_LONG_AND_TO_ALL_F(target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_LONGLONG_AND_TO_ALL_F wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_LONGLONG_AND_TO_ALL_F(long long* target, long long* source, int* nreduce, int* PE_start, int* logPE_stride, int* PE_size, long long* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_longlong_and_to_all_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_LONGLONG_AND_TO_ALL_F(target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_INT_OR_TO_ALL__ST_F wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_INT_OR_TO_ALL__ST_F(int* target, int* source, int* nreduce, int* PE_start, int* PE_stride, int* PE_size, int* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_int_or_to_all__st_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_INT_OR_TO_ALL__ST_F(target, source, nreduce, PE_start, PE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_SHORT_OR_TO_ALL__ST_F wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_SHORT_OR_TO_ALL__ST_F(short* target, short* source, int* nreduce, int* PE_start, int* PE_stride, int* PE_size, short* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_short_or_to_all__st_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_SHORT_OR_TO_ALL__ST_F(target, source, nreduce, PE_start, PE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_LONG_OR_TO_ALL__ST_F wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_LONG_OR_TO_ALL__ST_F(long* target, long* source, int* nreduce, int* PE_start, int* PE_stride, int* PE_size, long* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_long_or_to_all__st_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_LONG_OR_TO_ALL__ST_F(target, source, nreduce, PE_start, PE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_LONGLONG_OR_TO_ALL__ST_F wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_LONGLONG_OR_TO_ALL__ST_F(long long* target, long long* source, int* nreduce, int* PE_start, int* PE_stride, int* PE_size, long long* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_longlong_or_to_all__st_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_LONGLONG_OR_TO_ALL__ST_F(target, source, nreduce, PE_start, PE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_INT_OR_TO_ALL_F wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_INT_OR_TO_ALL_F(int* target, int* source, int* nreduce, int* PE_start, int* logPE_stride, int* PE_size, int* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_int_or_to_all_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_INT_OR_TO_ALL_F(target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_SHORT_OR_TO_ALL_F wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_SHORT_OR_TO_ALL_F(short* target, short* source, int* nreduce, int* PE_start, int* logPE_stride, int* PE_size, short* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_short_or_to_all_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_SHORT_OR_TO_ALL_F(target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_LONG_OR_TO_ALL_F wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_LONG_OR_TO_ALL_F(long* target, long* source, int* nreduce, int* PE_start, int* logPE_stride, int* PE_size, long* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_long_or_to_all_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_LONG_OR_TO_ALL_F(target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_LONGLONG_OR_TO_ALL_F wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_LONGLONG_OR_TO_ALL_F(long long* target, long long* source, int* nreduce, int* PE_start, int* logPE_stride, int* PE_size, long long* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_longlong_or_to_all_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_LONGLONG_OR_TO_ALL_F(target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_INT_XOR_TO_ALL__ST_F wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_INT_XOR_TO_ALL__ST_F(int* target, int* source, int* nreduce, int* PE_start, int* PE_stride, int* PE_size, int* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_int_xor_to_all__st_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_INT_XOR_TO_ALL__ST_F(target, source, nreduce, PE_start, PE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_SHORT_XOR_TO_ALL__ST_F wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_SHORT_XOR_TO_ALL__ST_F(short* target, short* source, int* nreduce, int* PE_start, int* PE_stride, int* PE_size, short* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_short_xor_to_all__st_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_SHORT_XOR_TO_ALL__ST_F(target, source, nreduce, PE_start, PE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_LONG_XOR_TO_ALL__ST_F wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_LONG_XOR_TO_ALL__ST_F(long* target, long* source, int* nreduce, int* PE_start, int* PE_stride, int* PE_size, long* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_long_xor_to_all__st_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_LONG_XOR_TO_ALL__ST_F(target, source, nreduce, PE_start, PE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_LONGLONG_XOR_TO_ALL__ST_F wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_LONGLONG_XOR_TO_ALL__ST_F(long long* target, long long* source, int* nreduce, int* PE_start, int* PE_stride, int* PE_size, long long* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_longlong_xor_to_all__st_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_LONGLONG_XOR_TO_ALL__ST_F(target, source, nreduce, PE_start, PE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_INT_XOR_TO_ALL_F wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_INT_XOR_TO_ALL_F(int* target, int* source, int* nreduce, int* PE_start, int* logPE_stride, int* PE_size, int* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_int_xor_to_all_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_INT_XOR_TO_ALL_F(target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_SHORT_XOR_TO_ALL_F wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_SHORT_XOR_TO_ALL_F(short* target, short* source, int* nreduce, int* PE_start, int* logPE_stride, int* PE_size, short* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_short_xor_to_all_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_SHORT_XOR_TO_ALL_F(target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_LONG_XOR_TO_ALL_F wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_LONG_XOR_TO_ALL_F(long* target, long* source, int* nreduce, int* PE_start, int* logPE_stride, int* PE_size, long* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_long_xor_to_all_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_LONG_XOR_TO_ALL_F(target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_LONGLONG_XOR_TO_ALL_F wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_LONGLONG_XOR_TO_ALL_F(long long* target, long long* source, int* nreduce, int* PE_start, int* logPE_stride, int* PE_size, long long* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_longlong_xor_to_all_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_LONGLONG_XOR_TO_ALL_F(target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_INT_SUM_TO_ALL__ST_F wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_INT_SUM_TO_ALL__ST_F(int* target, int* source, int* nreduce, int* PE_start, int* PE_stride, int* PE_size, int* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_int_sum_to_all__st_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_INT_SUM_TO_ALL__ST_F(target, source, nreduce, PE_start, PE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_SHORT_SUM_TO_ALL__ST_F wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_SHORT_SUM_TO_ALL__ST_F(short* target, short* source, int* nreduce, int* PE_start, int* PE_stride, int* PE_size, short* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_short_sum_to_all__st_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_SHORT_SUM_TO_ALL__ST_F(target, source, nreduce, PE_start, PE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_LONG_SUM_TO_ALL__ST_F wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_LONG_SUM_TO_ALL__ST_F(long* target, long* source, int* nreduce, int* PE_start, int* PE_stride, int* PE_size, long* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_long_sum_to_all__st_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_LONG_SUM_TO_ALL__ST_F(target, source, nreduce, PE_start, PE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_LONGLONG_SUM_TO_ALL__ST_F wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_LONGLONG_SUM_TO_ALL__ST_F(long long* target, long long* source, int* nreduce, int* PE_start, int* PE_stride, int* PE_size, long long* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_longlong_sum_to_all__st_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_LONGLONG_SUM_TO_ALL__ST_F(target, source, nreduce, PE_start, PE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_DOUBLE_SUM_TO_ALL__ST_F wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_DOUBLE_SUM_TO_ALL__ST_F(double* target, double* source, int* nreduce, int* PE_start, int* PE_stride, int* PE_size, double* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_double_sum_to_all__st_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_DOUBLE_SUM_TO_ALL__ST_F(target, source, nreduce, PE_start, PE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_FLOAT_SUM_TO_ALL__ST_F wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_FLOAT_SUM_TO_ALL__ST_F(float* target, float* source, int* nreduce, int* PE_start, int* PE_stride, int* PE_size, float* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_float_sum_to_all__st_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_FLOAT_SUM_TO_ALL__ST_F(target, source, nreduce, PE_start, PE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_INT_SUM_TO_ALL_F wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_INT_SUM_TO_ALL_F(int* target, int* source, int* nreduce, int* PE_start, int* logPE_stride, int* PE_size, int* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_int_sum_to_all_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_INT_SUM_TO_ALL_F(target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_SHORT_SUM_TO_ALL_F wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_SHORT_SUM_TO_ALL_F(short* target, short* source, int* nreduce, int* PE_start, int* logPE_stride, int* PE_size, short* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_short_sum_to_all_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_SHORT_SUM_TO_ALL_F(target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_LONG_SUM_TO_ALL_F wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_LONG_SUM_TO_ALL_F(long* target, long* source, int* nreduce, int* PE_start, int* logPE_stride, int* PE_size, long* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_long_sum_to_all_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_LONG_SUM_TO_ALL_F(target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_LONGLONG_SUM_TO_ALL_F wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_LONGLONG_SUM_TO_ALL_F(long long* target, long long* source, int* nreduce, int* PE_start, int* logPE_stride, int* PE_size, long long* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_longlong_sum_to_all_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_LONGLONG_SUM_TO_ALL_F(target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_DOUBLE_SUM_TO_ALL_F wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_DOUBLE_SUM_TO_ALL_F(double* target, double* source, int* nreduce, int* PE_start, int* logPE_stride, int* PE_size, double* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_double_sum_to_all_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_DOUBLE_SUM_TO_ALL_F(target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_FLOAT_SUM_TO_ALL_F wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_FLOAT_SUM_TO_ALL_F(float* target, float* source, int* nreduce, int* PE_start, int* logPE_stride, int* PE_size, float* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_float_sum_to_all_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_FLOAT_SUM_TO_ALL_F(target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_INT_PROD_TO_ALL__ST_F wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_INT_PROD_TO_ALL__ST_F(int* target, int* source, int* nreduce, int* PE_start, int* PE_stride, int* PE_size, int* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_int_prod_to_all__st_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_INT_PROD_TO_ALL__ST_F(target, source, nreduce, PE_start, PE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_SHORT_PROD_TO_ALL__ST_F wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_SHORT_PROD_TO_ALL__ST_F(short* target, short* source, int* nreduce, int* PE_start, int* PE_stride, int* PE_size, short* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_short_prod_to_all__st_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_SHORT_PROD_TO_ALL__ST_F(target, source, nreduce, PE_start, PE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_LONG_PROD_TO_ALL__ST_F wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_LONG_PROD_TO_ALL__ST_F(long* target, long* source, int* nreduce, int* PE_start, int* PE_stride, int* PE_size, long* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_long_prod_to_all__st_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_LONG_PROD_TO_ALL__ST_F(target, source, nreduce, PE_start, PE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_LONGLONG_PROD_TO_ALL__ST_F wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_LONGLONG_PROD_TO_ALL__ST_F(long long* target, long long* source, int* nreduce, int* PE_start, int* PE_stride, int* PE_size, long long* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_longlong_prod_to_all__st_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_LONGLONG_PROD_TO_ALL__ST_F(target, source, nreduce, PE_start, PE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_DOUBLE_PROD_TO_ALL__ST_F wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_DOUBLE_PROD_TO_ALL__ST_F(double* target, double* source, int* nreduce, int* PE_start, int* PE_stride, int* PE_size, double* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_double_prod_to_all__st_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_DOUBLE_PROD_TO_ALL__ST_F(target, source, nreduce, PE_start, PE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_FLOAT_PROD_TO_ALL__ST_F wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_FLOAT_PROD_TO_ALL__ST_F(float* target, float* source, int* nreduce, int* PE_start, int* PE_stride, int* PE_size, float* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_float_prod_to_all__st_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_FLOAT_PROD_TO_ALL__ST_F(target, source, nreduce, PE_start, PE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_INT_PROD_TO_ALL_F wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_INT_PROD_TO_ALL_F(int* target, int* source, int* nreduce, int* PE_start, int* logPE_stride, int* PE_size, int* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_int_prod_to_all_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_INT_PROD_TO_ALL_F(target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_SHORT_PROD_TO_ALL_F wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_SHORT_PROD_TO_ALL_F(short* target, short* source, int* nreduce, int* PE_start, int* logPE_stride, int* PE_size, short* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_short_prod_to_all_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_SHORT_PROD_TO_ALL_F(target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_LONG_PROD_TO_ALL_F wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_LONG_PROD_TO_ALL_F(long* target, long* source, int* nreduce, int* PE_start, int* logPE_stride, int* PE_size, long* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_long_prod_to_all_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_LONG_PROD_TO_ALL_F(target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_LONGLONG_PROD_TO_ALL_F wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_LONGLONG_PROD_TO_ALL_F(long long* target, long long* source, int* nreduce, int* PE_start, int* logPE_stride, int* PE_size, long long* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_longlong_prod_to_all_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_LONGLONG_PROD_TO_ALL_F(target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_DOUBLE_PROD_TO_ALL_F wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_DOUBLE_PROD_TO_ALL_F(double* target, double* source, int* nreduce, int* PE_start, int* logPE_stride, int* PE_size, double* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_double_prod_to_all_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_DOUBLE_PROD_TO_ALL_F(target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_FLOAT_PROD_TO_ALL_F wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_FLOAT_PROD_TO_ALL_F(float* target, float* source, int* nreduce, int* PE_start, int* logPE_stride, int* PE_size, float* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_float_prod_to_all_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_FLOAT_PROD_TO_ALL_F(target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_INT_MIN_TO_ALL__ST_F wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_INT_MIN_TO_ALL__ST_F(int* target, int* source, int* nreduce, int* PE_start, int* PE_stride, int* PE_size, int* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_int_min_to_all__st_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_INT_MIN_TO_ALL__ST_F(target, source, nreduce, PE_start, PE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_SHORT_MIN_TO_ALL__ST_F wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_SHORT_MIN_TO_ALL__ST_F(short* target, short* source, int* nreduce, int* PE_start, int* PE_stride, int* PE_size, short* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_short_min_to_all__st_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_SHORT_MIN_TO_ALL__ST_F(target, source, nreduce, PE_start, PE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_LONG_MIN_TO_ALL__ST_F wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_LONG_MIN_TO_ALL__ST_F(long* target, long* source, int* nreduce, int* PE_start, int* PE_stride, int* PE_size, long* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_long_min_to_all__st_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_LONG_MIN_TO_ALL__ST_F(target, source, nreduce, PE_start, PE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_LONGLONG_MIN_TO_ALL__ST_F wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_LONGLONG_MIN_TO_ALL__ST_F(long long* target, long long* source, int* nreduce, int* PE_start, int* PE_stride, int* PE_size, long long* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_longlong_min_to_all__st_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_LONGLONG_MIN_TO_ALL__ST_F(target, source, nreduce, PE_start, PE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_DOUBLE_MIN_TO_ALL__ST_F wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_DOUBLE_MIN_TO_ALL__ST_F(double* target, double* source, int* nreduce, int* PE_start, int* PE_stride, int* PE_size, double* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_double_min_to_all__st_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_DOUBLE_MIN_TO_ALL__ST_F(target, source, nreduce, PE_start, PE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_FLOAT_MIN_TO_ALL__ST_F wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_FLOAT_MIN_TO_ALL__ST_F(float* target, float* source, int* nreduce, int* PE_start, int* PE_stride, int* PE_size, float* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_float_min_to_all__st_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_FLOAT_MIN_TO_ALL__ST_F(target, source, nreduce, PE_start, PE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_INT_MIN_TO_ALL_F wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_INT_MIN_TO_ALL_F(int* target, int* source, int* nreduce, int* PE_start, int* logPE_stride, int* PE_size, int* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_int_min_to_all_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_INT_MIN_TO_ALL_F(target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_SHORT_MIN_TO_ALL_F wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_SHORT_MIN_TO_ALL_F(short* target, short* source, int* nreduce, int* PE_start, int* logPE_stride, int* PE_size, short* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_short_min_to_all_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_SHORT_MIN_TO_ALL_F(target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_LONG_MIN_TO_ALL_F wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_LONG_MIN_TO_ALL_F(long* target, long* source, int* nreduce, int* PE_start, int* logPE_stride, int* PE_size, long* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_long_min_to_all_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_LONG_MIN_TO_ALL_F(target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_LONGLONG_MIN_TO_ALL_F wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_LONGLONG_MIN_TO_ALL_F(long long* target, long long* source, int* nreduce, int* PE_start, int* logPE_stride, int* PE_size, long long* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_longlong_min_to_all_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_LONGLONG_MIN_TO_ALL_F(target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_DOUBLE_MIN_TO_ALL_F wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_DOUBLE_MIN_TO_ALL_F(double* target, double* source, int* nreduce, int* PE_start, int* logPE_stride, int* PE_size, double* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_double_min_to_all_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_DOUBLE_MIN_TO_ALL_F(target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_FLOAT_MIN_TO_ALL_F wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_FLOAT_MIN_TO_ALL_F(float* target, float* source, int* nreduce, int* PE_start, int* logPE_stride, int* PE_size, float* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_float_min_to_all_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_FLOAT_MIN_TO_ALL_F(target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_INT_MAX_TO_ALL__ST_F wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_INT_MAX_TO_ALL__ST_F(int* target, int* source, int* nreduce, int* PE_start, int* PE_stride, int* PE_size, int* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_int_max_to_all__st_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_INT_MAX_TO_ALL__ST_F(target, source, nreduce, PE_start, PE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_SHORT_MAX_TO_ALL__ST_F wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_SHORT_MAX_TO_ALL__ST_F(short* target, short* source, int* nreduce, int* PE_start, int* PE_stride, int* PE_size, short* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_short_max_to_all__st_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_SHORT_MAX_TO_ALL__ST_F(target, source, nreduce, PE_start, PE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_LONG_MAX_TO_ALL__ST_F wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_LONG_MAX_TO_ALL__ST_F(long* target, long* source, int* nreduce, int* PE_start, int* PE_stride, int* PE_size, long* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_long_max_to_all__st_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_LONG_MAX_TO_ALL__ST_F(target, source, nreduce, PE_start, PE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_LONGLONG_MAX_TO_ALL__ST_F wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_LONGLONG_MAX_TO_ALL__ST_F(long long* target, long long* source, int* nreduce, int* PE_start, int* PE_stride, int* PE_size, long long* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_longlong_max_to_all__st_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_LONGLONG_MAX_TO_ALL__ST_F(target, source, nreduce, PE_start, PE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_DOUBLE_MAX_TO_ALL__ST_F wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_DOUBLE_MAX_TO_ALL__ST_F(double* target, double* source, int* nreduce, int* PE_start, int* PE_stride, int* PE_size, double* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_double_max_to_all__st_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_DOUBLE_MAX_TO_ALL__ST_F(target, source, nreduce, PE_start, PE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_FLOAT_MAX_TO_ALL__ST_F wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_FLOAT_MAX_TO_ALL__ST_F(float* target, float* source, int* nreduce, int* PE_start, int* PE_stride, int* PE_size, float* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_float_max_to_all__st_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_FLOAT_MAX_TO_ALL__ST_F(target, source, nreduce, PE_start, PE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_INT_MAX_TO_ALL_F wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_INT_MAX_TO_ALL_F(int* target, int* source, int* nreduce, int* PE_start, int* logPE_stride, int* PE_size, int* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_int_max_to_all_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_INT_MAX_TO_ALL_F(target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_SHORT_MAX_TO_ALL_F wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_SHORT_MAX_TO_ALL_F(short* target, short* source, int* nreduce, int* PE_start, int* logPE_stride, int* PE_size, short* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_short_max_to_all_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_SHORT_MAX_TO_ALL_F(target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_LONG_MAX_TO_ALL_F wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_LONG_MAX_TO_ALL_F(long* target, long* source, int* nreduce, int* PE_start, int* logPE_stride, int* PE_size, long* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_long_max_to_all_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_LONG_MAX_TO_ALL_F(target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_LONGLONG_MAX_TO_ALL_F wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_LONGLONG_MAX_TO_ALL_F(long long* target, long long* source, int* nreduce, int* PE_start, int* logPE_stride, int* PE_size, long long* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_longlong_max_to_all_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_LONGLONG_MAX_TO_ALL_F(target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_DOUBLE_MAX_TO_ALL_F wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_DOUBLE_MAX_TO_ALL_F(double* target, double* source, int* nreduce, int* PE_start, int* logPE_stride, int* PE_size, double* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_double_max_to_all_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_DOUBLE_MAX_TO_ALL_F(target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } /****************************************************** *** GPSHMEM_FLOAT_MAX_TO_ALL_F wrapper function *** (from reduce/gps_reduce.c) ******************************************************/ void GPSHMEM_FLOAT_MAX_TO_ALL_F(float* target, float* source, int* nreduce, int* PE_start, int* logPE_stride, int* PE_size, float* pWrk, long* pSync) { TAU_PROFILE_TIMER(t, "gpshmem_float_max_to_all_f()", "", TAU_MESSAGE); TAU_PROFILE_START(t); PGPSHMEM_FLOAT_MAX_TO_ALL_F(target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync); TAU_PROFILE_STOP(t); } tau-2.16.4/src/Profile/TauShmemTurbo.c000066400000000000000000021211401062343042700174710ustar00rootroot00000000000000#include #include /******************************************************/ /******************************************************/ /****************************************************** *** shmem_init wrapper function ******************************************************/ void shmem_init( ) { TAU_PROFILE_TIMER(t, "shmem_init()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_init( ) ; #else /* !TAU_P_SHMEM */ pshmem_init( ) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_init wrapper function ******************************************************/ void SHMEM_INIT( ) { TAU_PROFILE_TIMER(t, "shmem_init()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_init( ) ; #else /* !TAU_P_SHMEM */ pshmem_init( ) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_init wrapper function ******************************************************/ void shmem_init_( ) { TAU_PROFILE_TIMER(t, "shmem_init()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_init( ) ; #else /* !TAU_P_SHMEM */ pshmem_init( ) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_init wrapper function ******************************************************/ void shmem_init__( ) { TAU_PROFILE_TIMER(t, "shmem_init()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_init( ) ; #else /* !TAU_P_SHMEM */ pshmem_init( ) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_finalize wrapper function ******************************************************/ void shmem_finalize( ) { TAU_PROFILE_TIMER(t, "shmem_finalize()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_finalize( ) ; #else /* !TAU_P_SHMEM */ pshmem_finalize( ) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_finalize wrapper function ******************************************************/ void SHMEM_FINALIZE( ) { TAU_PROFILE_TIMER(t, "shmem_finalize()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_finalize( ) ; #else /* !TAU_P_SHMEM */ pshmem_finalize( ) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_finalize wrapper function ******************************************************/ void shmem_finalize_( ) { TAU_PROFILE_TIMER(t, "shmem_finalize()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_finalize( ) ; #else /* !TAU_P_SHMEM */ pshmem_finalize( ) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_finalize wrapper function ******************************************************/ void shmem_finalize__( ) { TAU_PROFILE_TIMER(t, "shmem_finalize()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_finalize( ) ; #else /* !TAU_P_SHMEM */ pshmem_finalize( ) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_version wrapper function ******************************************************/ void shmem_version( ) { TAU_PROFILE_TIMER(t, "shmem_version()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_version( ) ; #else /* !TAU_P_SHMEM */ pshmem_version( ) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_version wrapper function ******************************************************/ void SHMEM_VERSION( ) { TAU_PROFILE_TIMER(t, "shmem_version()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_version( ) ; #else /* !TAU_P_SHMEM */ pshmem_version( ) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_version wrapper function ******************************************************/ void shmem_version_( ) { TAU_PROFILE_TIMER(t, "shmem_version()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_version( ) ; #else /* !TAU_P_SHMEM */ pshmem_version( ) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_version wrapper function ******************************************************/ void shmem_version__( ) { TAU_PROFILE_TIMER(t, "shmem_version()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_version( ) ; #else /* !TAU_P_SHMEM */ pshmem_version( ) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_set_cache_inv wrapper function ******************************************************/ void shmem_set_cache_inv( ) { TAU_PROFILE_TIMER(t, "shmem_set_cache_inv()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_set_cache_inv( ) ; #else /* !TAU_P_SHMEM */ pshmem_set_cache_inv( ) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_set_cache_inv wrapper function ******************************************************/ void SHMEM_SET_CACHE_INV( ) { TAU_PROFILE_TIMER(t, "shmem_set_cache_inv()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_set_cache_inv( ) ; #else /* !TAU_P_SHMEM */ pshmem_set_cache_inv( ) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_set_cache_inv wrapper function ******************************************************/ void shmem_set_cache_inv_( ) { TAU_PROFILE_TIMER(t, "shmem_set_cache_inv()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_set_cache_inv( ) ; #else /* !TAU_P_SHMEM */ pshmem_set_cache_inv( ) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_set_cache_inv wrapper function ******************************************************/ void shmem_set_cache_inv__( ) { TAU_PROFILE_TIMER(t, "shmem_set_cache_inv()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_set_cache_inv( ) ; #else /* !TAU_P_SHMEM */ pshmem_set_cache_inv( ) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_set_cache_line_inv wrapper function ******************************************************/ void shmem_set_cache_line_inv( long * target) { TAU_PROFILE_TIMER(t, "shmem_set_cache_line_inv()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_set_cache_line_inv( target) ; #else /* !TAU_P_SHMEM */ pshmem_set_cache_line_inv( target) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_set_cache_line_inv wrapper function ******************************************************/ void SHMEM_SET_CACHE_LINE_INV( long * target) { TAU_PROFILE_TIMER(t, "shmem_set_cache_line_inv()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_set_cache_line_inv( target) ; #else /* !TAU_P_SHMEM */ pshmem_set_cache_line_inv( target) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_set_cache_line_inv wrapper function ******************************************************/ void shmem_set_cache_line_inv_( long * target) { TAU_PROFILE_TIMER(t, "shmem_set_cache_line_inv()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_set_cache_line_inv( target) ; #else /* !TAU_P_SHMEM */ pshmem_set_cache_line_inv( target) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_set_cache_line_inv wrapper function ******************************************************/ void shmem_set_cache_line_inv__( long * target) { TAU_PROFILE_TIMER(t, "shmem_set_cache_line_inv()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_set_cache_line_inv( target) ; #else /* !TAU_P_SHMEM */ pshmem_set_cache_line_inv( target) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_clear_cache_inv wrapper function ******************************************************/ void shmem_clear_cache_inv( ) { TAU_PROFILE_TIMER(t, "shmem_clear_cache_inv()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_clear_cache_inv( ) ; #else /* !TAU_P_SHMEM */ pshmem_clear_cache_inv( ) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_clear_cache_inv wrapper function ******************************************************/ void SHMEM_CLEAR_CACHE_INV( ) { TAU_PROFILE_TIMER(t, "shmem_clear_cache_inv()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_clear_cache_inv( ) ; #else /* !TAU_P_SHMEM */ pshmem_clear_cache_inv( ) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_clear_cache_inv wrapper function ******************************************************/ void shmem_clear_cache_inv_( ) { TAU_PROFILE_TIMER(t, "shmem_clear_cache_inv()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_clear_cache_inv( ) ; #else /* !TAU_P_SHMEM */ pshmem_clear_cache_inv( ) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_clear_cache_inv wrapper function ******************************************************/ void shmem_clear_cache_inv__( ) { TAU_PROFILE_TIMER(t, "shmem_clear_cache_inv()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_clear_cache_inv( ) ; #else /* !TAU_P_SHMEM */ pshmem_clear_cache_inv( ) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_udcflush wrapper function ******************************************************/ void shmem_udcflush( ) { TAU_PROFILE_TIMER(t, "shmem_udcflush()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_udcflush( ) ; #else /* !TAU_P_SHMEM */ pshmem_udcflush( ) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_udcflush wrapper function ******************************************************/ void SHMEM_UDCFLUSH( ) { TAU_PROFILE_TIMER(t, "shmem_udcflush()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_udcflush( ) ; #else /* !TAU_P_SHMEM */ pshmem_udcflush( ) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_udcflush wrapper function ******************************************************/ void shmem_udcflush_( ) { TAU_PROFILE_TIMER(t, "shmem_udcflush()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_udcflush( ) ; #else /* !TAU_P_SHMEM */ pshmem_udcflush( ) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_udcflush wrapper function ******************************************************/ void shmem_udcflush__( ) { TAU_PROFILE_TIMER(t, "shmem_udcflush()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_udcflush( ) ; #else /* !TAU_P_SHMEM */ pshmem_udcflush( ) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_udcflush_line wrapper function ******************************************************/ void shmem_udcflush_line( long * target) { TAU_PROFILE_TIMER(t, "shmem_udcflush_line()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_udcflush_line( target) ; #else /* !TAU_P_SHMEM */ pshmem_udcflush_line( target) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_udcflush_line wrapper function ******************************************************/ void SHMEM_UDCFLUSH_LINE( long * target) { TAU_PROFILE_TIMER(t, "shmem_udcflush_line()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_udcflush_line( target) ; #else /* !TAU_P_SHMEM */ pshmem_udcflush_line( target) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_udcflush_line wrapper function ******************************************************/ void shmem_udcflush_line_( long * target) { TAU_PROFILE_TIMER(t, "shmem_udcflush_line()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_udcflush_line( target) ; #else /* !TAU_P_SHMEM */ pshmem_udcflush_line( target) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_udcflush_line wrapper function ******************************************************/ void shmem_udcflush_line__( long * target) { TAU_PROFILE_TIMER(t, "shmem_udcflush_line()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_udcflush_line( target) ; #else /* !TAU_P_SHMEM */ pshmem_udcflush_line( target) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_stack wrapper function ******************************************************/ void shmem_stack( void * stack_var) { TAU_PROFILE_TIMER(t, "shmem_stack()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_stack( stack_var) ; #else /* !TAU_P_SHMEM */ pshmem_stack( stack_var) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_stack wrapper function ******************************************************/ void SHMEM_STACK( void * stack_var) { TAU_PROFILE_TIMER(t, "shmem_stack()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_stack( stack_var) ; #else /* !TAU_P_SHMEM */ pshmem_stack( stack_var) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_stack wrapper function ******************************************************/ void shmem_stack_( void * stack_var) { TAU_PROFILE_TIMER(t, "shmem_stack()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_stack( stack_var) ; #else /* !TAU_P_SHMEM */ pshmem_stack( stack_var) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_stack wrapper function ******************************************************/ void shmem_stack__( void * stack_var) { TAU_PROFILE_TIMER(t, "shmem_stack()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_stack( stack_var) ; #else /* !TAU_P_SHMEM */ pshmem_stack( stack_var) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ #ifdef TAU_SUPPORT_SHMEM_PTR /****************************************************** *** shmem_ptr wrapper function ******************************************************/ void * shmem_ptr( void * target, int pe) { void * retvalue; TAU_PROFILE_TIMER(t, "shmem_ptr()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_ptr( target, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_ptr( target, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_ptr wrapper function ******************************************************/ void * SHMEM_PTR( void * target, int pe) { void * retvalue; TAU_PROFILE_TIMER(t, "shmem_ptr()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_ptr( target, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_ptr( target, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_ptr wrapper function ******************************************************/ void * shmem_ptr_( void * target, int pe) { void * retvalue; TAU_PROFILE_TIMER(t, "shmem_ptr()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_ptr( target, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_ptr( target, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_ptr wrapper function ******************************************************/ void * shmem_ptr__( void * target, int pe) { void * retvalue; TAU_PROFILE_TIMER(t, "shmem_ptr()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_ptr( target, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_ptr( target, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } #endif /* TAU_SUPPORT_SHMEM_PTR */ /******************************************************/ /******************************************************/ /****************************************************** *** shmem_start_pes wrapper function ******************************************************/ void shmem_start_pes( int npes) { TAU_PROFILE_TIMER(t, "shmem_start_pes()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_start_pes( npes) ; #else /* !TAU_P_SHMEM */ pshmem_start_pes( npes) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_start_pes wrapper function ******************************************************/ void SHMEM_START_PES( int npes) { TAU_PROFILE_TIMER(t, "shmem_start_pes()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_start_pes( npes) ; #else /* !TAU_P_SHMEM */ pshmem_start_pes( npes) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_start_pes wrapper function ******************************************************/ void shmem_start_pes_( int npes) { TAU_PROFILE_TIMER(t, "shmem_start_pes()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_start_pes( npes) ; #else /* !TAU_P_SHMEM */ pshmem_start_pes( npes) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_start_pes wrapper function ******************************************************/ void shmem_start_pes__( int npes) { TAU_PROFILE_TIMER(t, "shmem_start_pes()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_start_pes( npes) ; #else /* !TAU_P_SHMEM */ pshmem_start_pes( npes) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_my_pe wrapper function ******************************************************/ int shmem_my_pe( ) { int retvalue; TAU_PROFILE_TIMER(t, "shmem_my_pe()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_my_pe( ) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_my_pe( ) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_my_pe wrapper function ******************************************************/ int SHMEM_MY_PE( ) { int retvalue; TAU_PROFILE_TIMER(t, "shmem_my_pe()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_my_pe( ) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_my_pe( ) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_my_pe wrapper function ******************************************************/ int shmem_my_pe_( ) { int retvalue; TAU_PROFILE_TIMER(t, "shmem_my_pe()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_my_pe( ) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_my_pe( ) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_my_pe wrapper function ******************************************************/ int shmem_my_pe__( ) { int retvalue; TAU_PROFILE_TIMER(t, "shmem_my_pe()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_my_pe( ) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_my_pe( ) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_n_pes wrapper function ******************************************************/ int shmem_n_pes( ) { int retvalue; TAU_PROFILE_TIMER(t, "shmem_n_pes()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_n_pes( ) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_n_pes( ) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_n_pes wrapper function ******************************************************/ int SHMEM_N_PES( ) { int retvalue; TAU_PROFILE_TIMER(t, "shmem_n_pes()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_n_pes( ) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_n_pes( ) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_n_pes wrapper function ******************************************************/ int shmem_n_pes_( ) { int retvalue; TAU_PROFILE_TIMER(t, "shmem_n_pes()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_n_pes( ) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_n_pes( ) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_n_pes wrapper function ******************************************************/ int shmem_n_pes__( ) { int retvalue; TAU_PROFILE_TIMER(t, "shmem_n_pes()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_n_pes( ) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_n_pes( ) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_barrier wrapper function ******************************************************/ void shmem_barrier( int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_barrier()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_barrier( PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_barrier( PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_barrier wrapper function ******************************************************/ void SHMEM_BARRIER( int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_barrier()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_barrier( PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_barrier( PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_barrier wrapper function ******************************************************/ void shmem_barrier_( int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_barrier()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_barrier( PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_barrier( PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_barrier wrapper function ******************************************************/ void shmem_barrier__( int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_barrier()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_barrier( PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_barrier( PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_barrier_all wrapper function ******************************************************/ void shmem_barrier_all( ) { TAU_PROFILE_TIMER(t, "shmem_barrier_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_barrier_all( ) ; #else /* !TAU_P_SHMEM */ pshmem_barrier_all( ) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_barrier_all wrapper function ******************************************************/ void SHMEM_BARRIER_ALL( ) { TAU_PROFILE_TIMER(t, "shmem_barrier_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_barrier_all( ) ; #else /* !TAU_P_SHMEM */ pshmem_barrier_all( ) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_barrier_all wrapper function ******************************************************/ void shmem_barrier_all_( ) { TAU_PROFILE_TIMER(t, "shmem_barrier_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_barrier_all( ) ; #else /* !TAU_P_SHMEM */ pshmem_barrier_all( ) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_barrier_all wrapper function ******************************************************/ void shmem_barrier_all__( ) { TAU_PROFILE_TIMER(t, "shmem_barrier_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_barrier_all( ) ; #else /* !TAU_P_SHMEM */ pshmem_barrier_all( ) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_fence wrapper function ******************************************************/ void shmem_fence( ) { TAU_PROFILE_TIMER(t, "shmem_fence()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_fence( ) ; #else /* !TAU_P_SHMEM */ pshmem_fence( ) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_fence wrapper function ******************************************************/ void SHMEM_FENCE( ) { TAU_PROFILE_TIMER(t, "shmem_fence()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_fence( ) ; #else /* !TAU_P_SHMEM */ pshmem_fence( ) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_fence wrapper function ******************************************************/ void shmem_fence_( ) { TAU_PROFILE_TIMER(t, "shmem_fence()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_fence( ) ; #else /* !TAU_P_SHMEM */ pshmem_fence( ) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_fence wrapper function ******************************************************/ void shmem_fence__( ) { TAU_PROFILE_TIMER(t, "shmem_fence()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_fence( ) ; #else /* !TAU_P_SHMEM */ pshmem_fence( ) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_quiet wrapper function ******************************************************/ void shmem_quiet( ) { TAU_PROFILE_TIMER(t, "shmem_quiet()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_quiet( ) ; #else /* !TAU_P_SHMEM */ pshmem_quiet( ) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_quiet wrapper function ******************************************************/ void SHMEM_QUIET( ) { TAU_PROFILE_TIMER(t, "shmem_quiet()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_quiet( ) ; #else /* !TAU_P_SHMEM */ pshmem_quiet( ) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_quiet wrapper function ******************************************************/ void shmem_quiet_( ) { TAU_PROFILE_TIMER(t, "shmem_quiet()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_quiet( ) ; #else /* !TAU_P_SHMEM */ pshmem_quiet( ) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_quiet wrapper function ******************************************************/ void shmem_quiet__( ) { TAU_PROFILE_TIMER(t, "shmem_quiet()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_quiet( ) ; #else /* !TAU_P_SHMEM */ pshmem_quiet( ) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_broadcast wrapper function ******************************************************/ void shmem_broadcast( void * target, void * source, int nlong, int PE_root, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_broadcast()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_broadcast( target, source, nlong, PE_root, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_broadcast( target, source, nlong, PE_root, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_broadcast wrapper function ******************************************************/ void SHMEM_BROADCAST( void * target, void * source, int nlong, int PE_root, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_broadcast()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_broadcast( target, source, nlong, PE_root, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_broadcast( target, source, nlong, PE_root, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_broadcast wrapper function ******************************************************/ void shmem_broadcast_( void * target, void * source, int nlong, int PE_root, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_broadcast()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_broadcast( target, source, nlong, PE_root, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_broadcast( target, source, nlong, PE_root, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_broadcast wrapper function ******************************************************/ void shmem_broadcast__( void * target, void * source, int nlong, int PE_root, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_broadcast()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_broadcast( target, source, nlong, PE_root, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_broadcast( target, source, nlong, PE_root, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_broadcast32 wrapper function ******************************************************/ void shmem_broadcast32( void * target, void * source, int nlong, int PE_root, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_broadcast32()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_broadcast32( target, source, nlong, PE_root, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_broadcast32( target, source, nlong, PE_root, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_broadcast32 wrapper function ******************************************************/ void SHMEM_BROADCAST32( void * target, void * source, int nlong, int PE_root, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_broadcast32()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_broadcast32( target, source, nlong, PE_root, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_broadcast32( target, source, nlong, PE_root, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_broadcast32 wrapper function ******************************************************/ void shmem_broadcast32_( void * target, void * source, int nlong, int PE_root, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_broadcast32()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_broadcast32( target, source, nlong, PE_root, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_broadcast32( target, source, nlong, PE_root, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_broadcast32 wrapper function ******************************************************/ void shmem_broadcast32__( void * target, void * source, int nlong, int PE_root, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_broadcast32()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_broadcast32( target, source, nlong, PE_root, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_broadcast32( target, source, nlong, PE_root, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_broadcast64 wrapper function ******************************************************/ void shmem_broadcast64( void * target, void * source, int nlong, int PE_root, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_broadcast64()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_broadcast64( target, source, nlong, PE_root, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_broadcast64( target, source, nlong, PE_root, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_broadcast64 wrapper function ******************************************************/ void SHMEM_BROADCAST64( void * target, void * source, int nlong, int PE_root, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_broadcast64()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_broadcast64( target, source, nlong, PE_root, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_broadcast64( target, source, nlong, PE_root, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_broadcast64 wrapper function ******************************************************/ void shmem_broadcast64_( void * target, void * source, int nlong, int PE_root, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_broadcast64()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_broadcast64( target, source, nlong, PE_root, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_broadcast64( target, source, nlong, PE_root, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_broadcast64 wrapper function ******************************************************/ void shmem_broadcast64__( void * target, void * source, int nlong, int PE_root, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_broadcast64()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_broadcast64( target, source, nlong, PE_root, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_broadcast64( target, source, nlong, PE_root, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_broadcast128 wrapper function ******************************************************/ void shmem_broadcast128( void * target, void * source, int nlong, int PE_root, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_broadcast128()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_broadcast128( target, source, nlong, PE_root, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_broadcast128( target, source, nlong, PE_root, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_broadcast128 wrapper function ******************************************************/ void SHMEM_BROADCAST128( void * target, void * source, int nlong, int PE_root, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_broadcast128()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_broadcast128( target, source, nlong, PE_root, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_broadcast128( target, source, nlong, PE_root, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_broadcast128 wrapper function ******************************************************/ void shmem_broadcast128_( void * target, void * source, int nlong, int PE_root, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_broadcast128()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_broadcast128( target, source, nlong, PE_root, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_broadcast128( target, source, nlong, PE_root, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_broadcast128 wrapper function ******************************************************/ void shmem_broadcast128__( void * target, void * source, int nlong, int PE_root, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_broadcast128()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_broadcast128( target, source, nlong, PE_root, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_broadcast128( target, source, nlong, PE_root, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_fcollect wrapper function ******************************************************/ void shmem_fcollect( void * target, void * source, int nlong, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_fcollect()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_fcollect( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_fcollect( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_fcollect wrapper function ******************************************************/ void SHMEM_FCOLLECT( void * target, void * source, int nlong, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_fcollect()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_fcollect( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_fcollect( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_fcollect wrapper function ******************************************************/ void shmem_fcollect_( void * target, void * source, int nlong, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_fcollect()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_fcollect( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_fcollect( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_fcollect wrapper function ******************************************************/ void shmem_fcollect__( void * target, void * source, int nlong, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_fcollect()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_fcollect( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_fcollect( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_fcollect32 wrapper function ******************************************************/ void shmem_fcollect32( void * target, void * source, int nlong, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_fcollect32()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_fcollect32( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_fcollect32( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_fcollect32 wrapper function ******************************************************/ void SHMEM_FCOLLECT32( void * target, void * source, int nlong, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_fcollect32()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_fcollect32( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_fcollect32( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_fcollect32 wrapper function ******************************************************/ void shmem_fcollect32_( void * target, void * source, int nlong, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_fcollect32()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_fcollect32( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_fcollect32( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_fcollect32 wrapper function ******************************************************/ void shmem_fcollect32__( void * target, void * source, int nlong, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_fcollect32()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_fcollect32( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_fcollect32( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_fcollect64 wrapper function ******************************************************/ void shmem_fcollect64( void * target, void * source, int nlong, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_fcollect64()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_fcollect64( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_fcollect64( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_fcollect64 wrapper function ******************************************************/ void SHMEM_FCOLLECT64( void * target, void * source, int nlong, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_fcollect64()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_fcollect64( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_fcollect64( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_fcollect64 wrapper function ******************************************************/ void shmem_fcollect64_( void * target, void * source, int nlong, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_fcollect64()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_fcollect64( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_fcollect64( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_fcollect64 wrapper function ******************************************************/ void shmem_fcollect64__( void * target, void * source, int nlong, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_fcollect64()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_fcollect64( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_fcollect64( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_fcollect128 wrapper function ******************************************************/ void shmem_fcollect128( void * target, void * source, int nlong, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_fcollect128()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_fcollect128( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_fcollect128( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_fcollect128 wrapper function ******************************************************/ void SHMEM_FCOLLECT128( void * target, void * source, int nlong, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_fcollect128()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_fcollect128( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_fcollect128( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_fcollect128 wrapper function ******************************************************/ void shmem_fcollect128_( void * target, void * source, int nlong, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_fcollect128()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_fcollect128( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_fcollect128( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_fcollect128 wrapper function ******************************************************/ void shmem_fcollect128__( void * target, void * source, int nlong, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_fcollect128()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_fcollect128( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_fcollect128( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_collect wrapper function ******************************************************/ void shmem_collect( void * target, void * source, int nlong, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_collect()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_collect( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_collect( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_collect wrapper function ******************************************************/ void SHMEM_COLLECT( void * target, void * source, int nlong, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_collect()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_collect( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_collect( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_collect wrapper function ******************************************************/ void shmem_collect_( void * target, void * source, int nlong, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_collect()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_collect( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_collect( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_collect wrapper function ******************************************************/ void shmem_collect__( void * target, void * source, int nlong, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_collect()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_collect( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_collect( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_collect32 wrapper function ******************************************************/ void shmem_collect32( void * target, void * source, int nlong, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_collect32()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_collect32( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_collect32( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_collect32 wrapper function ******************************************************/ void SHMEM_COLLECT32( void * target, void * source, int nlong, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_collect32()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_collect32( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_collect32( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_collect32 wrapper function ******************************************************/ void shmem_collect32_( void * target, void * source, int nlong, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_collect32()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_collect32( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_collect32( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_collect32 wrapper function ******************************************************/ void shmem_collect32__( void * target, void * source, int nlong, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_collect32()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_collect32( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_collect32( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_collect64 wrapper function ******************************************************/ void shmem_collect64( void * target, void * source, int nlong, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_collect64()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_collect64( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_collect64( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_collect64 wrapper function ******************************************************/ void SHMEM_COLLECT64( void * target, void * source, int nlong, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_collect64()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_collect64( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_collect64( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_collect64 wrapper function ******************************************************/ void shmem_collect64_( void * target, void * source, int nlong, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_collect64()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_collect64( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_collect64( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_collect64 wrapper function ******************************************************/ void shmem_collect64__( void * target, void * source, int nlong, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_collect64()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_collect64( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_collect64( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_collect128 wrapper function ******************************************************/ void shmem_collect128( void * target, void * source, int nlong, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_collect128()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_collect128( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_collect128( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_collect128 wrapper function ******************************************************/ void SHMEM_COLLECT128( void * target, void * source, int nlong, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_collect128()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_collect128( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_collect128( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_collect128 wrapper function ******************************************************/ void shmem_collect128_( void * target, void * source, int nlong, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_collect128()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_collect128( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_collect128( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_collect128 wrapper function ******************************************************/ void shmem_collect128__( void * target, void * source, int nlong, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_collect128()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_collect128( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_collect128( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_getmem wrapper function ******************************************************/ void shmem_getmem( void * target, void * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_getmem()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_getmem( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_getmem( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_getmem wrapper function ******************************************************/ void SHMEM_GETMEM( void * target, void * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_getmem()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_getmem( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_getmem( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_getmem wrapper function ******************************************************/ void shmem_getmem_( void * target, void * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_getmem()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_getmem( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_getmem( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_getmem wrapper function ******************************************************/ void shmem_getmem__( void * target, void * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_getmem()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_getmem( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_getmem( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_putmem wrapper function ******************************************************/ void shmem_putmem( void * target, void * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_putmem()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_putmem( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_putmem( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_putmem wrapper function ******************************************************/ void SHMEM_PUTMEM( void * target, void * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_putmem()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_putmem( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_putmem( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_putmem wrapper function ******************************************************/ void shmem_putmem_( void * target, void * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_putmem()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_putmem( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_putmem( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_putmem wrapper function ******************************************************/ void shmem_putmem__( void * target, void * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_putmem()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_putmem( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_putmem( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_short_get wrapper function ******************************************************/ void shmem_short_get( short * target, short * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_short_get()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_get( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_short_get( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_get wrapper function ******************************************************/ void SHMEM_SHORT_GET( short * target, short * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_short_get()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_get( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_short_get( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_get wrapper function ******************************************************/ void shmem_short_get_( short * target, short * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_short_get()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_get( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_short_get( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_get wrapper function ******************************************************/ void shmem_short_get__( short * target, short * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_short_get()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_get( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_short_get( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_short_put wrapper function ******************************************************/ void shmem_short_put( short * target, short * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_short_put()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_put( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_short_put( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_put wrapper function ******************************************************/ void SHMEM_SHORT_PUT( short * target, short * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_short_put()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_put( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_short_put( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_put wrapper function ******************************************************/ void shmem_short_put_( short * target, short * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_short_put()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_put( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_short_put( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_put wrapper function ******************************************************/ void shmem_short_put__( short * target, short * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_short_put()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_put( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_short_put( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_int_get wrapper function ******************************************************/ void shmem_int_get( int * target, int * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_int_get()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_get( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_int_get( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_get wrapper function ******************************************************/ void SHMEM_INT_GET( int * target, int * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_int_get()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_get( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_int_get( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_get wrapper function ******************************************************/ void shmem_int_get_( int * target, int * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_int_get()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_get( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_int_get( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_get wrapper function ******************************************************/ void shmem_int_get__( int * target, int * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_int_get()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_get( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_int_get( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_int_put wrapper function ******************************************************/ void shmem_int_put( int * target, int * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_int_put()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_put( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_int_put( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_put wrapper function ******************************************************/ void SHMEM_INT_PUT( int * target, int * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_int_put()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_put( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_int_put( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_put wrapper function ******************************************************/ void shmem_int_put_( int * target, int * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_int_put()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_put( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_int_put( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_put wrapper function ******************************************************/ void shmem_int_put__( int * target, int * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_int_put()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_put( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_int_put( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_long_get wrapper function ******************************************************/ void shmem_long_get( long * target, long * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_long_get()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_get( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_long_get( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_get wrapper function ******************************************************/ void SHMEM_LONG_GET( long * target, long * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_long_get()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_get( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_long_get( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_get wrapper function ******************************************************/ void shmem_long_get_( long * target, long * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_long_get()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_get( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_long_get( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_get wrapper function ******************************************************/ void shmem_long_get__( long * target, long * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_long_get()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_get( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_long_get( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_long_put wrapper function ******************************************************/ void shmem_long_put( long * target, long * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_long_put()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_put( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_long_put( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_put wrapper function ******************************************************/ void SHMEM_LONG_PUT( long * target, long * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_long_put()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_put( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_long_put( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_put wrapper function ******************************************************/ void shmem_long_put_( long * target, long * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_long_put()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_put( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_long_put( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_put wrapper function ******************************************************/ void shmem_long_put__( long * target, long * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_long_put()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_put( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_long_put( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_longlong_get wrapper function ******************************************************/ void shmem_longlong_get( long long * target, long long * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_longlong_get()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_get( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_get( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_get wrapper function ******************************************************/ void SHMEM_LONGLONG_GET( long long * target, long long * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_longlong_get()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_get( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_get( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_get wrapper function ******************************************************/ void shmem_longlong_get_( long long * target, long long * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_longlong_get()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_get( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_get( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_get wrapper function ******************************************************/ void shmem_longlong_get__( long long * target, long long * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_longlong_get()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_get( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_get( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_longlong_put wrapper function ******************************************************/ void shmem_longlong_put( long long * target, long long * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_longlong_put()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_put( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_put( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_put wrapper function ******************************************************/ void SHMEM_LONGLONG_PUT( long long * target, long long * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_longlong_put()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_put( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_put( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_put wrapper function ******************************************************/ void shmem_longlong_put_( long long * target, long long * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_longlong_put()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_put( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_put( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_put wrapper function ******************************************************/ void shmem_longlong_put__( long long * target, long long * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_longlong_put()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_put( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_put( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_float_get wrapper function ******************************************************/ void shmem_float_get( float * target, float * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_float_get()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_float_get( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_float_get( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_float_get wrapper function ******************************************************/ void SHMEM_FLOAT_GET( float * target, float * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_float_get()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_float_get( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_float_get( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_float_get wrapper function ******************************************************/ void shmem_float_get_( float * target, float * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_float_get()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_float_get( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_float_get( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_float_get wrapper function ******************************************************/ void shmem_float_get__( float * target, float * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_float_get()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_float_get( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_float_get( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_float_put wrapper function ******************************************************/ void shmem_float_put( float * target, float * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_float_put()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_float_put( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_float_put( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_float_put wrapper function ******************************************************/ void SHMEM_FLOAT_PUT( float * target, float * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_float_put()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_float_put( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_float_put( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_float_put wrapper function ******************************************************/ void shmem_float_put_( float * target, float * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_float_put()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_float_put( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_float_put( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_float_put wrapper function ******************************************************/ void shmem_float_put__( float * target, float * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_float_put()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_float_put( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_float_put( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_double_get wrapper function ******************************************************/ void shmem_double_get( double * target, double * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_double_get()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_double_get( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_double_get( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_double_get wrapper function ******************************************************/ void SHMEM_DOUBLE_GET( double * target, double * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_double_get()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_double_get( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_double_get( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_double_get wrapper function ******************************************************/ void shmem_double_get_( double * target, double * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_double_get()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_double_get( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_double_get( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_double_get wrapper function ******************************************************/ void shmem_double_get__( double * target, double * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_double_get()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_double_get( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_double_get( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_double_put wrapper function ******************************************************/ void shmem_double_put( double * target, double * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_double_put()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_double_put( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_double_put( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_double_put wrapper function ******************************************************/ void SHMEM_DOUBLE_PUT( double * target, double * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_double_put()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_double_put( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_double_put( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_double_put wrapper function ******************************************************/ void shmem_double_put_( double * target, double * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_double_put()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_double_put( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_double_put( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_double_put wrapper function ******************************************************/ void shmem_double_put__( double * target, double * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_double_put()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_double_put( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_double_put( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_longdouble_get wrapper function ******************************************************/ void shmem_longdouble_get( long double * target, long double * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_longdouble_get()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longdouble_get( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_longdouble_get( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longdouble_get wrapper function ******************************************************/ void SHMEM_LONGDOUBLE_GET( long double * target, long double * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_longdouble_get()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longdouble_get( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_longdouble_get( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longdouble_get wrapper function ******************************************************/ void shmem_longdouble_get_( long double * target, long double * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_longdouble_get()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longdouble_get( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_longdouble_get( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longdouble_get wrapper function ******************************************************/ void shmem_longdouble_get__( long double * target, long double * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_longdouble_get()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longdouble_get( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_longdouble_get( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_longdouble_put wrapper function ******************************************************/ void shmem_longdouble_put( long double * target, long double * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_longdouble_put()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longdouble_put( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_longdouble_put( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longdouble_put wrapper function ******************************************************/ void SHMEM_LONGDOUBLE_PUT( long double * target, long double * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_longdouble_put()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longdouble_put( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_longdouble_put( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longdouble_put wrapper function ******************************************************/ void shmem_longdouble_put_( long double * target, long double * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_longdouble_put()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longdouble_put( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_longdouble_put( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longdouble_put wrapper function ******************************************************/ void shmem_longdouble_put__( long double * target, long double * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_longdouble_put()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longdouble_put( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_longdouble_put( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_complexf_get wrapper function ******************************************************/ void shmem_complexf_get( void * target, void * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_complexf_get()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexf_get( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_complexf_get( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_complexf_get wrapper function ******************************************************/ void SHMEM_COMPLEXF_GET( void * target, void * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_complexf_get()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexf_get( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_complexf_get( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_complexf_get wrapper function ******************************************************/ void shmem_complexf_get_( void * target, void * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_complexf_get()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexf_get( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_complexf_get( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_complexf_get wrapper function ******************************************************/ void shmem_complexf_get__( void * target, void * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_complexf_get()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexf_get( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_complexf_get( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_complexf_put wrapper function ******************************************************/ void shmem_complexf_put( void * target, void * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_complexf_put()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexf_put( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_complexf_put( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_complexf_put wrapper function ******************************************************/ void SHMEM_COMPLEXF_PUT( void * target, void * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_complexf_put()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexf_put( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_complexf_put( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_complexf_put wrapper function ******************************************************/ void shmem_complexf_put_( void * target, void * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_complexf_put()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexf_put( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_complexf_put( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_complexf_put wrapper function ******************************************************/ void shmem_complexf_put__( void * target, void * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_complexf_put()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexf_put( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_complexf_put( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_complexd_get wrapper function ******************************************************/ void shmem_complexd_get( void * target, void * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_complexd_get()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexd_get( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_complexd_get( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_complexd_get wrapper function ******************************************************/ void SHMEM_COMPLEXD_GET( void * target, void * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_complexd_get()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexd_get( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_complexd_get( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_complexd_get wrapper function ******************************************************/ void shmem_complexd_get_( void * target, void * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_complexd_get()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexd_get( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_complexd_get( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_complexd_get wrapper function ******************************************************/ void shmem_complexd_get__( void * target, void * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_complexd_get()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexd_get( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_complexd_get( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_complexd_put wrapper function ******************************************************/ void shmem_complexd_put( void * target, void * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_complexd_put()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexd_put( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_complexd_put( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_complexd_put wrapper function ******************************************************/ void SHMEM_COMPLEXD_PUT( void * target, void * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_complexd_put()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexd_put( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_complexd_put( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_complexd_put wrapper function ******************************************************/ void shmem_complexd_put_( void * target, void * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_complexd_put()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexd_put( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_complexd_put( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_complexd_put wrapper function ******************************************************/ void shmem_complexd_put__( void * target, void * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_complexd_put()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexd_put( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_complexd_put( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_get wrapper function ******************************************************/ void shmem_get( void * target, void * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_get()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_get( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_get( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_get wrapper function ******************************************************/ void SHMEM_GET( void * target, void * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_get()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_get( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_get( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_get wrapper function ******************************************************/ void shmem_get_( void * target, void * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_get()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_get( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_get( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_get wrapper function ******************************************************/ void shmem_get__( void * target, void * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_get()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_get( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_get( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_put wrapper function ******************************************************/ void shmem_put( void * target, void * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_put()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_put( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_put( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_put wrapper function ******************************************************/ void SHMEM_PUT( void * target, void * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_put()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_put( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_put( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_put wrapper function ******************************************************/ void shmem_put_( void * target, void * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_put()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_put( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_put( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_put wrapper function ******************************************************/ void shmem_put__( void * target, void * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_put()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_put( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_put( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_get32 wrapper function ******************************************************/ void shmem_get32( void * target, void * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_get32()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_get32( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_get32( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_get32 wrapper function ******************************************************/ void SHMEM_GET32( void * target, void * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_get32()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_get32( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_get32( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_get32 wrapper function ******************************************************/ void shmem_get32_( void * target, void * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_get32()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_get32( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_get32( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_get32 wrapper function ******************************************************/ void shmem_get32__( void * target, void * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_get32()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_get32( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_get32( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_put32 wrapper function ******************************************************/ void shmem_put32( void * target, void * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_put32()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_put32( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_put32( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_put32 wrapper function ******************************************************/ void SHMEM_PUT32( void * target, void * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_put32()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_put32( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_put32( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_put32 wrapper function ******************************************************/ void shmem_put32_( void * target, void * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_put32()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_put32( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_put32( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_put32 wrapper function ******************************************************/ void shmem_put32__( void * target, void * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_put32()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_put32( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_put32( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_get64 wrapper function ******************************************************/ void shmem_get64( void * target, void * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_get64()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_get64( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_get64( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_get64 wrapper function ******************************************************/ void SHMEM_GET64( void * target, void * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_get64()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_get64( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_get64( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_get64 wrapper function ******************************************************/ void shmem_get64_( void * target, void * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_get64()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_get64( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_get64( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_get64 wrapper function ******************************************************/ void shmem_get64__( void * target, void * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_get64()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_get64( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_get64( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_put64 wrapper function ******************************************************/ void shmem_put64( void * target, void * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_put64()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_put64( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_put64( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_put64 wrapper function ******************************************************/ void SHMEM_PUT64( void * target, void * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_put64()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_put64( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_put64( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_put64 wrapper function ******************************************************/ void shmem_put64_( void * target, void * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_put64()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_put64( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_put64( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_put64 wrapper function ******************************************************/ void shmem_put64__( void * target, void * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_put64()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_put64( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_put64( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_get128 wrapper function ******************************************************/ void shmem_get128( void * target, void * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_get128()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_get128( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_get128( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_get128 wrapper function ******************************************************/ void SHMEM_GET128( void * target, void * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_get128()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_get128( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_get128( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_get128 wrapper function ******************************************************/ void shmem_get128_( void * target, void * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_get128()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_get128( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_get128( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_get128 wrapper function ******************************************************/ void shmem_get128__( void * target, void * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_get128()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_get128( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_get128( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_put128 wrapper function ******************************************************/ void shmem_put128( void * target, void * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_put128()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_put128( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_put128( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_put128 wrapper function ******************************************************/ void SHMEM_PUT128( void * target, void * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_put128()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_put128( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_put128( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_put128 wrapper function ******************************************************/ void shmem_put128_( void * target, void * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_put128()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_put128( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_put128( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_put128 wrapper function ******************************************************/ void shmem_put128__( void * target, void * source, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_put128()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_put128( target, source, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_put128( target, source, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_short_p wrapper function ******************************************************/ void shmem_short_p( short * addr, short value, int pe) { TAU_PROFILE_TIMER(t, "shmem_short_p()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_p( addr, value, pe) ; #else /* !TAU_P_SHMEM */ pshmem_short_p( addr, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_p wrapper function ******************************************************/ void SHMEM_SHORT_P( short * addr, short value, int pe) { TAU_PROFILE_TIMER(t, "shmem_short_p()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_p( addr, value, pe) ; #else /* !TAU_P_SHMEM */ pshmem_short_p( addr, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_p wrapper function ******************************************************/ void shmem_short_p_( short * addr, short value, int pe) { TAU_PROFILE_TIMER(t, "shmem_short_p()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_p( addr, value, pe) ; #else /* !TAU_P_SHMEM */ pshmem_short_p( addr, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_p wrapper function ******************************************************/ void shmem_short_p__( short * addr, short value, int pe) { TAU_PROFILE_TIMER(t, "shmem_short_p()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_p( addr, value, pe) ; #else /* !TAU_P_SHMEM */ pshmem_short_p( addr, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_int_p wrapper function ******************************************************/ void shmem_int_p( int * addr, int value, int pe) { TAU_PROFILE_TIMER(t, "shmem_int_p()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_p( addr, value, pe) ; #else /* !TAU_P_SHMEM */ pshmem_int_p( addr, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_p wrapper function ******************************************************/ void SHMEM_INT_P( int * addr, int value, int pe) { TAU_PROFILE_TIMER(t, "shmem_int_p()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_p( addr, value, pe) ; #else /* !TAU_P_SHMEM */ pshmem_int_p( addr, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_p wrapper function ******************************************************/ void shmem_int_p_( int * addr, int value, int pe) { TAU_PROFILE_TIMER(t, "shmem_int_p()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_p( addr, value, pe) ; #else /* !TAU_P_SHMEM */ pshmem_int_p( addr, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_p wrapper function ******************************************************/ void shmem_int_p__( int * addr, int value, int pe) { TAU_PROFILE_TIMER(t, "shmem_int_p()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_p( addr, value, pe) ; #else /* !TAU_P_SHMEM */ pshmem_int_p( addr, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_long_p wrapper function ******************************************************/ void shmem_long_p( long * addr, long value, int pe) { TAU_PROFILE_TIMER(t, "shmem_long_p()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_p( addr, value, pe) ; #else /* !TAU_P_SHMEM */ pshmem_long_p( addr, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_p wrapper function ******************************************************/ void SHMEM_LONG_P( long * addr, long value, int pe) { TAU_PROFILE_TIMER(t, "shmem_long_p()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_p( addr, value, pe) ; #else /* !TAU_P_SHMEM */ pshmem_long_p( addr, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_p wrapper function ******************************************************/ void shmem_long_p_( long * addr, long value, int pe) { TAU_PROFILE_TIMER(t, "shmem_long_p()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_p( addr, value, pe) ; #else /* !TAU_P_SHMEM */ pshmem_long_p( addr, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_p wrapper function ******************************************************/ void shmem_long_p__( long * addr, long value, int pe) { TAU_PROFILE_TIMER(t, "shmem_long_p()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_p( addr, value, pe) ; #else /* !TAU_P_SHMEM */ pshmem_long_p( addr, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_longlong_p wrapper function ******************************************************/ void shmem_longlong_p( long long * addr, long long value, int pe) { TAU_PROFILE_TIMER(t, "shmem_longlong_p()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_p( addr, value, pe) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_p( addr, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_p wrapper function ******************************************************/ void SHMEM_LONGLONG_P( long long * addr, long long value, int pe) { TAU_PROFILE_TIMER(t, "shmem_longlong_p()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_p( addr, value, pe) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_p( addr, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_p wrapper function ******************************************************/ void shmem_longlong_p_( long long * addr, long long value, int pe) { TAU_PROFILE_TIMER(t, "shmem_longlong_p()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_p( addr, value, pe) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_p( addr, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_p wrapper function ******************************************************/ void shmem_longlong_p__( long long * addr, long long value, int pe) { TAU_PROFILE_TIMER(t, "shmem_longlong_p()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_p( addr, value, pe) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_p( addr, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_float_p wrapper function ******************************************************/ void shmem_float_p( float * addr, float value, int pe) { TAU_PROFILE_TIMER(t, "shmem_float_p()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_float_p( addr, value, pe) ; #else /* !TAU_P_SHMEM */ pshmem_float_p( addr, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_float_p wrapper function ******************************************************/ void SHMEM_FLOAT_P( float * addr, float value, int pe) { TAU_PROFILE_TIMER(t, "shmem_float_p()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_float_p( addr, value, pe) ; #else /* !TAU_P_SHMEM */ pshmem_float_p( addr, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_float_p wrapper function ******************************************************/ void shmem_float_p_( float * addr, float value, int pe) { TAU_PROFILE_TIMER(t, "shmem_float_p()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_float_p( addr, value, pe) ; #else /* !TAU_P_SHMEM */ pshmem_float_p( addr, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_float_p wrapper function ******************************************************/ void shmem_float_p__( float * addr, float value, int pe) { TAU_PROFILE_TIMER(t, "shmem_float_p()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_float_p( addr, value, pe) ; #else /* !TAU_P_SHMEM */ pshmem_float_p( addr, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_double_p wrapper function ******************************************************/ void shmem_double_p( double * addr, double value, int pe) { TAU_PROFILE_TIMER(t, "shmem_double_p()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_double_p( addr, value, pe) ; #else /* !TAU_P_SHMEM */ pshmem_double_p( addr, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_double_p wrapper function ******************************************************/ void SHMEM_DOUBLE_P( double * addr, double value, int pe) { TAU_PROFILE_TIMER(t, "shmem_double_p()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_double_p( addr, value, pe) ; #else /* !TAU_P_SHMEM */ pshmem_double_p( addr, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_double_p wrapper function ******************************************************/ void shmem_double_p_( double * addr, double value, int pe) { TAU_PROFILE_TIMER(t, "shmem_double_p()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_double_p( addr, value, pe) ; #else /* !TAU_P_SHMEM */ pshmem_double_p( addr, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_double_p wrapper function ******************************************************/ void shmem_double_p__( double * addr, double value, int pe) { TAU_PROFILE_TIMER(t, "shmem_double_p()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_double_p( addr, value, pe) ; #else /* !TAU_P_SHMEM */ pshmem_double_p( addr, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_longdouble_p wrapper function ******************************************************/ void shmem_longdouble_p( long double * addr, long double value, int pe) { TAU_PROFILE_TIMER(t, "shmem_longdouble_p()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longdouble_p( addr, value, pe) ; #else /* !TAU_P_SHMEM */ pshmem_longdouble_p( addr, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longdouble_p wrapper function ******************************************************/ void SHMEM_LONGDOUBLE_P( long double * addr, long double value, int pe) { TAU_PROFILE_TIMER(t, "shmem_longdouble_p()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longdouble_p( addr, value, pe) ; #else /* !TAU_P_SHMEM */ pshmem_longdouble_p( addr, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longdouble_p wrapper function ******************************************************/ void shmem_longdouble_p_( long double * addr, long double value, int pe) { TAU_PROFILE_TIMER(t, "shmem_longdouble_p()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longdouble_p( addr, value, pe) ; #else /* !TAU_P_SHMEM */ pshmem_longdouble_p( addr, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longdouble_p wrapper function ******************************************************/ void shmem_longdouble_p__( long double * addr, long double value, int pe) { TAU_PROFILE_TIMER(t, "shmem_longdouble_p()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longdouble_p( addr, value, pe) ; #else /* !TAU_P_SHMEM */ pshmem_longdouble_p( addr, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_short_g wrapper function ******************************************************/ short shmem_short_g( short * addr, int pe) { short retvalue; TAU_PROFILE_TIMER(t, "shmem_short_g()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_short_g( addr, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_short_g( addr, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_short_g wrapper function ******************************************************/ short SHMEM_SHORT_G( short * addr, int pe) { short retvalue; TAU_PROFILE_TIMER(t, "shmem_short_g()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_short_g( addr, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_short_g( addr, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_short_g wrapper function ******************************************************/ short shmem_short_g_( short * addr, int pe) { short retvalue; TAU_PROFILE_TIMER(t, "shmem_short_g()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_short_g( addr, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_short_g( addr, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_short_g wrapper function ******************************************************/ short shmem_short_g__( short * addr, int pe) { short retvalue; TAU_PROFILE_TIMER(t, "shmem_short_g()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_short_g( addr, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_short_g( addr, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_int_g wrapper function ******************************************************/ int shmem_int_g( int * addr, int pe) { int retvalue; TAU_PROFILE_TIMER(t, "shmem_int_g()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_int_g( addr, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_int_g( addr, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_int_g wrapper function ******************************************************/ int SHMEM_INT_G( int * addr, int pe) { int retvalue; TAU_PROFILE_TIMER(t, "shmem_int_g()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_int_g( addr, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_int_g( addr, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_int_g wrapper function ******************************************************/ int shmem_int_g_( int * addr, int pe) { int retvalue; TAU_PROFILE_TIMER(t, "shmem_int_g()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_int_g( addr, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_int_g( addr, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_int_g wrapper function ******************************************************/ int shmem_int_g__( int * addr, int pe) { int retvalue; TAU_PROFILE_TIMER(t, "shmem_int_g()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_int_g( addr, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_int_g( addr, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_long_g wrapper function ******************************************************/ long shmem_long_g( long * addr, int pe) { long retvalue; TAU_PROFILE_TIMER(t, "shmem_long_g()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_long_g( addr, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_long_g( addr, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_long_g wrapper function ******************************************************/ long SHMEM_LONG_G( long * addr, int pe) { long retvalue; TAU_PROFILE_TIMER(t, "shmem_long_g()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_long_g( addr, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_long_g( addr, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_long_g wrapper function ******************************************************/ long shmem_long_g_( long * addr, int pe) { long retvalue; TAU_PROFILE_TIMER(t, "shmem_long_g()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_long_g( addr, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_long_g( addr, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_long_g wrapper function ******************************************************/ long shmem_long_g__( long * addr, int pe) { long retvalue; TAU_PROFILE_TIMER(t, "shmem_long_g()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_long_g( addr, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_long_g( addr, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_longlong_g wrapper function ******************************************************/ long long shmem_longlong_g( long long * addr, int pe) { long long retvalue; TAU_PROFILE_TIMER(t, "shmem_longlong_g()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_longlong_g( addr, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_longlong_g( addr, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_longlong_g wrapper function ******************************************************/ long long SHMEM_LONGLONG_G( long long * addr, int pe) { long long retvalue; TAU_PROFILE_TIMER(t, "shmem_longlong_g()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_longlong_g( addr, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_longlong_g( addr, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_longlong_g wrapper function ******************************************************/ long long shmem_longlong_g_( long long * addr, int pe) { long long retvalue; TAU_PROFILE_TIMER(t, "shmem_longlong_g()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_longlong_g( addr, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_longlong_g( addr, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_longlong_g wrapper function ******************************************************/ long long shmem_longlong_g__( long long * addr, int pe) { long long retvalue; TAU_PROFILE_TIMER(t, "shmem_longlong_g()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_longlong_g( addr, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_longlong_g( addr, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_float_g wrapper function ******************************************************/ float shmem_float_g( float * addr, int pe) { float retvalue; TAU_PROFILE_TIMER(t, "shmem_float_g()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_float_g( addr, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_float_g( addr, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_float_g wrapper function ******************************************************/ float SHMEM_FLOAT_G( float * addr, int pe) { float retvalue; TAU_PROFILE_TIMER(t, "shmem_float_g()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_float_g( addr, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_float_g( addr, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_float_g wrapper function ******************************************************/ float shmem_float_g_( float * addr, int pe) { float retvalue; TAU_PROFILE_TIMER(t, "shmem_float_g()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_float_g( addr, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_float_g( addr, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_float_g wrapper function ******************************************************/ float shmem_float_g__( float * addr, int pe) { float retvalue; TAU_PROFILE_TIMER(t, "shmem_float_g()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_float_g( addr, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_float_g( addr, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_double_g wrapper function ******************************************************/ double shmem_double_g( double * addr, int pe) { double retvalue; TAU_PROFILE_TIMER(t, "shmem_double_g()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_double_g( addr, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_double_g( addr, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_double_g wrapper function ******************************************************/ double SHMEM_DOUBLE_G( double * addr, int pe) { double retvalue; TAU_PROFILE_TIMER(t, "shmem_double_g()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_double_g( addr, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_double_g( addr, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_double_g wrapper function ******************************************************/ double shmem_double_g_( double * addr, int pe) { double retvalue; TAU_PROFILE_TIMER(t, "shmem_double_g()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_double_g( addr, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_double_g( addr, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_double_g wrapper function ******************************************************/ double shmem_double_g__( double * addr, int pe) { double retvalue; TAU_PROFILE_TIMER(t, "shmem_double_g()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_double_g( addr, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_double_g( addr, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_longdouble_g wrapper function ******************************************************/ long double shmem_longdouble_g( long double * addr, int pe) { long double retvalue; TAU_PROFILE_TIMER(t, "shmem_longdouble_g()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_longdouble_g( addr, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_longdouble_g( addr, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_longdouble_g wrapper function ******************************************************/ long double SHMEM_LONGDOUBLE_G( long double * addr, int pe) { long double retvalue; TAU_PROFILE_TIMER(t, "shmem_longdouble_g()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_longdouble_g( addr, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_longdouble_g( addr, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_longdouble_g wrapper function ******************************************************/ long double shmem_longdouble_g_( long double * addr, int pe) { long double retvalue; TAU_PROFILE_TIMER(t, "shmem_longdouble_g()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_longdouble_g( addr, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_longdouble_g( addr, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_longdouble_g wrapper function ******************************************************/ long double shmem_longdouble_g__( long double * addr, int pe) { long double retvalue; TAU_PROFILE_TIMER(t, "shmem_longdouble_g()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_longdouble_g( addr, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_longdouble_g( addr, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_iget wrapper function ******************************************************/ void shmem_iget( void * target, void * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_iget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_iget( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_iget( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_iget wrapper function ******************************************************/ void SHMEM_IGET( void * target, void * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_iget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_iget( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_iget( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_iget wrapper function ******************************************************/ void shmem_iget_( void * target, void * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_iget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_iget( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_iget( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_iget wrapper function ******************************************************/ void shmem_iget__( void * target, void * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_iget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_iget( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_iget( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_iget32 wrapper function ******************************************************/ void shmem_iget32( void * target, void * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_iget32()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_iget32( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_iget32( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_iget32 wrapper function ******************************************************/ void SHMEM_IGET32( void * target, void * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_iget32()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_iget32( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_iget32( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_iget32 wrapper function ******************************************************/ void shmem_iget32_( void * target, void * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_iget32()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_iget32( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_iget32( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_iget32 wrapper function ******************************************************/ void shmem_iget32__( void * target, void * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_iget32()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_iget32( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_iget32( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_iget64 wrapper function ******************************************************/ void shmem_iget64( void * target, void * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_iget64()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_iget64( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_iget64( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_iget64 wrapper function ******************************************************/ void SHMEM_IGET64( void * target, void * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_iget64()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_iget64( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_iget64( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_iget64 wrapper function ******************************************************/ void shmem_iget64_( void * target, void * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_iget64()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_iget64( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_iget64( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_iget64 wrapper function ******************************************************/ void shmem_iget64__( void * target, void * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_iget64()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_iget64( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_iget64( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_iget128 wrapper function ******************************************************/ void shmem_iget128( void * target, void * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_iget128()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_iget128( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_iget128( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_iget128 wrapper function ******************************************************/ void SHMEM_IGET128( void * target, void * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_iget128()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_iget128( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_iget128( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_iget128 wrapper function ******************************************************/ void shmem_iget128_( void * target, void * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_iget128()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_iget128( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_iget128( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_iget128 wrapper function ******************************************************/ void shmem_iget128__( void * target, void * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_iget128()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_iget128( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_iget128( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_short_iget wrapper function ******************************************************/ void shmem_short_iget( short * target, short * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_short_iget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_iget( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_short_iget( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_iget wrapper function ******************************************************/ void SHMEM_SHORT_IGET( short * target, short * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_short_iget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_iget( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_short_iget( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_iget wrapper function ******************************************************/ void shmem_short_iget_( short * target, short * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_short_iget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_iget( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_short_iget( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_iget wrapper function ******************************************************/ void shmem_short_iget__( short * target, short * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_short_iget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_iget( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_short_iget( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_int_iget wrapper function ******************************************************/ void shmem_int_iget( int * target, int * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_int_iget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_iget( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_int_iget( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_iget wrapper function ******************************************************/ void SHMEM_INT_IGET( int * target, int * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_int_iget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_iget( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_int_iget( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_iget wrapper function ******************************************************/ void shmem_int_iget_( int * target, int * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_int_iget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_iget( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_int_iget( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_iget wrapper function ******************************************************/ void shmem_int_iget__( int * target, int * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_int_iget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_iget( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_int_iget( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_long_iget wrapper function ******************************************************/ void shmem_long_iget( long * target, long * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_long_iget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_iget( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_long_iget( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_iget wrapper function ******************************************************/ void SHMEM_LONG_IGET( long * target, long * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_long_iget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_iget( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_long_iget( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_iget wrapper function ******************************************************/ void shmem_long_iget_( long * target, long * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_long_iget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_iget( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_long_iget( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_iget wrapper function ******************************************************/ void shmem_long_iget__( long * target, long * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_long_iget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_iget( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_long_iget( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_longlong_iget wrapper function ******************************************************/ void shmem_longlong_iget( long long * target, long long * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_longlong_iget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_iget( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_iget( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_iget wrapper function ******************************************************/ void SHMEM_LONGLONG_IGET( long long * target, long long * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_longlong_iget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_iget( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_iget( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_iget wrapper function ******************************************************/ void shmem_longlong_iget_( long long * target, long long * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_longlong_iget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_iget( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_iget( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_iget wrapper function ******************************************************/ void shmem_longlong_iget__( long long * target, long long * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_longlong_iget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_iget( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_iget( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_float_iget wrapper function ******************************************************/ void shmem_float_iget( float * target, float * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_float_iget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_float_iget( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_float_iget( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_float_iget wrapper function ******************************************************/ void SHMEM_FLOAT_IGET( float * target, float * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_float_iget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_float_iget( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_float_iget( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_float_iget wrapper function ******************************************************/ void shmem_float_iget_( float * target, float * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_float_iget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_float_iget( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_float_iget( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_float_iget wrapper function ******************************************************/ void shmem_float_iget__( float * target, float * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_float_iget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_float_iget( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_float_iget( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_double_iget wrapper function ******************************************************/ void shmem_double_iget( double * target, double * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_double_iget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_double_iget( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_double_iget( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_double_iget wrapper function ******************************************************/ void SHMEM_DOUBLE_IGET( double * target, double * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_double_iget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_double_iget( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_double_iget( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_double_iget wrapper function ******************************************************/ void shmem_double_iget_( double * target, double * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_double_iget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_double_iget( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_double_iget( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_double_iget wrapper function ******************************************************/ void shmem_double_iget__( double * target, double * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_double_iget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_double_iget( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_double_iget( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_longdouble_iget wrapper function ******************************************************/ void shmem_longdouble_iget( long double * target, long double * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_longdouble_iget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longdouble_iget( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_longdouble_iget( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longdouble_iget wrapper function ******************************************************/ void SHMEM_LONGDOUBLE_IGET( long double * target, long double * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_longdouble_iget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longdouble_iget( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_longdouble_iget( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longdouble_iget wrapper function ******************************************************/ void shmem_longdouble_iget_( long double * target, long double * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_longdouble_iget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longdouble_iget( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_longdouble_iget( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longdouble_iget wrapper function ******************************************************/ void shmem_longdouble_iget__( long double * target, long double * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_longdouble_iget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longdouble_iget( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_longdouble_iget( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_complexf_iget wrapper function ******************************************************/ void shmem_complexf_iget( void * target, void * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_complexf_iget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexf_iget( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_complexf_iget( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_complexf_iget wrapper function ******************************************************/ void SHMEM_COMPLEXF_IGET( void * target, void * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_complexf_iget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexf_iget( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_complexf_iget( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_complexf_iget wrapper function ******************************************************/ void shmem_complexf_iget_( void * target, void * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_complexf_iget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexf_iget( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_complexf_iget( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_complexf_iget wrapper function ******************************************************/ void shmem_complexf_iget__( void * target, void * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_complexf_iget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexf_iget( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_complexf_iget( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_complexd_iget wrapper function ******************************************************/ void shmem_complexd_iget( void * target, void * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_complexd_iget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexd_iget( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_complexd_iget( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_complexd_iget wrapper function ******************************************************/ void SHMEM_COMPLEXD_IGET( void * target, void * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_complexd_iget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexd_iget( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_complexd_iget( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_complexd_iget wrapper function ******************************************************/ void shmem_complexd_iget_( void * target, void * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_complexd_iget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexd_iget( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_complexd_iget( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_complexd_iget wrapper function ******************************************************/ void shmem_complexd_iget__( void * target, void * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_complexd_iget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexd_iget( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_complexd_iget( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_iput wrapper function ******************************************************/ void shmem_iput( void * target, void * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_iput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_iput( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_iput( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_iput wrapper function ******************************************************/ void SHMEM_IPUT( void * target, void * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_iput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_iput( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_iput( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_iput wrapper function ******************************************************/ void shmem_iput_( void * target, void * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_iput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_iput( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_iput( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_iput wrapper function ******************************************************/ void shmem_iput__( void * target, void * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_iput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_iput( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_iput( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_iput32 wrapper function ******************************************************/ void shmem_iput32( void * target, void * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_iput32()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_iput32( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_iput32( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_iput32 wrapper function ******************************************************/ void SHMEM_IPUT32( void * target, void * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_iput32()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_iput32( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_iput32( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_iput32 wrapper function ******************************************************/ void shmem_iput32_( void * target, void * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_iput32()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_iput32( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_iput32( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_iput32 wrapper function ******************************************************/ void shmem_iput32__( void * target, void * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_iput32()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_iput32( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_iput32( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_iput64 wrapper function ******************************************************/ void shmem_iput64( void * target, void * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_iput64()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_iput64( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_iput64( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_iput64 wrapper function ******************************************************/ void SHMEM_IPUT64( void * target, void * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_iput64()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_iput64( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_iput64( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_iput64 wrapper function ******************************************************/ void shmem_iput64_( void * target, void * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_iput64()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_iput64( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_iput64( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_iput64 wrapper function ******************************************************/ void shmem_iput64__( void * target, void * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_iput64()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_iput64( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_iput64( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_iput128 wrapper function ******************************************************/ void shmem_iput128( void * target, void * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_iput128()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_iput128( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_iput128( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_iput128 wrapper function ******************************************************/ void SHMEM_IPUT128( void * target, void * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_iput128()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_iput128( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_iput128( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_iput128 wrapper function ******************************************************/ void shmem_iput128_( void * target, void * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_iput128()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_iput128( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_iput128( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_iput128 wrapper function ******************************************************/ void shmem_iput128__( void * target, void * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_iput128()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_iput128( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_iput128( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_short_iput wrapper function ******************************************************/ void shmem_short_iput( short * target, short * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_short_iput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_iput( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_short_iput( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_iput wrapper function ******************************************************/ void SHMEM_SHORT_IPUT( short * target, short * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_short_iput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_iput( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_short_iput( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_iput wrapper function ******************************************************/ void shmem_short_iput_( short * target, short * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_short_iput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_iput( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_short_iput( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_iput wrapper function ******************************************************/ void shmem_short_iput__( short * target, short * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_short_iput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_iput( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_short_iput( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_int_iput wrapper function ******************************************************/ void shmem_int_iput( int * target, int * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_int_iput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_iput( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_int_iput( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_iput wrapper function ******************************************************/ void SHMEM_INT_IPUT( int * target, int * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_int_iput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_iput( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_int_iput( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_iput wrapper function ******************************************************/ void shmem_int_iput_( int * target, int * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_int_iput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_iput( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_int_iput( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_iput wrapper function ******************************************************/ void shmem_int_iput__( int * target, int * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_int_iput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_iput( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_int_iput( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_long_iput wrapper function ******************************************************/ void shmem_long_iput( long * target, long * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_long_iput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_iput( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_long_iput( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_iput wrapper function ******************************************************/ void SHMEM_LONG_IPUT( long * target, long * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_long_iput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_iput( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_long_iput( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_iput wrapper function ******************************************************/ void shmem_long_iput_( long * target, long * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_long_iput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_iput( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_long_iput( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_iput wrapper function ******************************************************/ void shmem_long_iput__( long * target, long * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_long_iput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_iput( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_long_iput( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_longlong_iput wrapper function ******************************************************/ void shmem_longlong_iput( long long * target, long long * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_longlong_iput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_iput( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_iput( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_iput wrapper function ******************************************************/ void SHMEM_LONGLONG_IPUT( long long * target, long long * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_longlong_iput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_iput( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_iput( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_iput wrapper function ******************************************************/ void shmem_longlong_iput_( long long * target, long long * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_longlong_iput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_iput( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_iput( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_iput wrapper function ******************************************************/ void shmem_longlong_iput__( long long * target, long long * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_longlong_iput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_iput( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_iput( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_float_iput wrapper function ******************************************************/ void shmem_float_iput( float * target, float * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_float_iput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_float_iput( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_float_iput( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_float_iput wrapper function ******************************************************/ void SHMEM_FLOAT_IPUT( float * target, float * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_float_iput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_float_iput( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_float_iput( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_float_iput wrapper function ******************************************************/ void shmem_float_iput_( float * target, float * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_float_iput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_float_iput( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_float_iput( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_float_iput wrapper function ******************************************************/ void shmem_float_iput__( float * target, float * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_float_iput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_float_iput( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_float_iput( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_double_iput wrapper function ******************************************************/ void shmem_double_iput( double * target, double * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_double_iput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_double_iput( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_double_iput( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_double_iput wrapper function ******************************************************/ void SHMEM_DOUBLE_IPUT( double * target, double * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_double_iput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_double_iput( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_double_iput( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_double_iput wrapper function ******************************************************/ void shmem_double_iput_( double * target, double * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_double_iput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_double_iput( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_double_iput( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_double_iput wrapper function ******************************************************/ void shmem_double_iput__( double * target, double * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_double_iput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_double_iput( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_double_iput( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_longdouble_iput wrapper function ******************************************************/ void shmem_longdouble_iput( long double * target, long double * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_longdouble_iput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longdouble_iput( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_longdouble_iput( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longdouble_iput wrapper function ******************************************************/ void SHMEM_LONGDOUBLE_IPUT( long double * target, long double * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_longdouble_iput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longdouble_iput( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_longdouble_iput( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longdouble_iput wrapper function ******************************************************/ void shmem_longdouble_iput_( long double * target, long double * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_longdouble_iput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longdouble_iput( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_longdouble_iput( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longdouble_iput wrapper function ******************************************************/ void shmem_longdouble_iput__( long double * target, long double * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_longdouble_iput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longdouble_iput( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_longdouble_iput( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_complexf_iput wrapper function ******************************************************/ void shmem_complexf_iput( void * target, void * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_complexf_iput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexf_iput( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_complexf_iput( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_complexf_iput wrapper function ******************************************************/ void SHMEM_COMPLEXF_IPUT( void * target, void * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_complexf_iput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexf_iput( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_complexf_iput( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_complexf_iput wrapper function ******************************************************/ void shmem_complexf_iput_( void * target, void * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_complexf_iput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexf_iput( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_complexf_iput( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_complexf_iput wrapper function ******************************************************/ void shmem_complexf_iput__( void * target, void * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_complexf_iput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexf_iput( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_complexf_iput( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_complexd_iput wrapper function ******************************************************/ void shmem_complexd_iput( void * target, void * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_complexd_iput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexd_iput( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_complexd_iput( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_complexd_iput wrapper function ******************************************************/ void SHMEM_COMPLEXD_IPUT( void * target, void * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_complexd_iput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexd_iput( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_complexd_iput( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_complexd_iput wrapper function ******************************************************/ void shmem_complexd_iput_( void * target, void * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_complexd_iput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexd_iput( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_complexd_iput( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_complexd_iput wrapper function ******************************************************/ void shmem_complexd_iput__( void * target, void * source, int target_inc, int source_inc, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_complexd_iput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexd_iput( target, source, target_inc, source_inc, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_complexd_iput( target, source, target_inc, source_inc, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_ixget wrapper function ******************************************************/ void shmem_ixget( void * target, void * source, long long * source_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_ixget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_ixget( target, source, source_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_ixget( target, source, source_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_ixget wrapper function ******************************************************/ void SHMEM_IXGET( void * target, void * source, long long * source_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_ixget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_ixget( target, source, source_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_ixget( target, source, source_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_ixget wrapper function ******************************************************/ void shmem_ixget_( void * target, void * source, long long * source_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_ixget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_ixget( target, source, source_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_ixget( target, source, source_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_ixget wrapper function ******************************************************/ void shmem_ixget__( void * target, void * source, long long * source_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_ixget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_ixget( target, source, source_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_ixget( target, source, source_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_ixget32 wrapper function ******************************************************/ void shmem_ixget32( void * target, void * source, int * source_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_ixget32()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_ixget32( target, source, source_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_ixget32( target, source, source_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_ixget32 wrapper function ******************************************************/ void SHMEM_IXGET32( void * target, void * source, int * source_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_ixget32()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_ixget32( target, source, source_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_ixget32( target, source, source_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_ixget32 wrapper function ******************************************************/ void shmem_ixget32_( void * target, void * source, int * source_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_ixget32()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_ixget32( target, source, source_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_ixget32( target, source, source_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_ixget32 wrapper function ******************************************************/ void shmem_ixget32__( void * target, void * source, int * source_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_ixget32()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_ixget32( target, source, source_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_ixget32( target, source, source_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_ixget64 wrapper function ******************************************************/ void shmem_ixget64( void * target, void * source, int * source_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_ixget64()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_ixget64( target, source, source_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_ixget64( target, source, source_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_ixget64 wrapper function ******************************************************/ void SHMEM_IXGET64( void * target, void * source, int * source_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_ixget64()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_ixget64( target, source, source_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_ixget64( target, source, source_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_ixget64 wrapper function ******************************************************/ void shmem_ixget64_( void * target, void * source, int * source_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_ixget64()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_ixget64( target, source, source_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_ixget64( target, source, source_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_ixget64 wrapper function ******************************************************/ void shmem_ixget64__( void * target, void * source, int * source_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_ixget64()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_ixget64( target, source, source_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_ixget64( target, source, source_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_ixget128 wrapper function ******************************************************/ void shmem_ixget128( void * target, void * source, int * source_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_ixget128()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_ixget128( target, source, source_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_ixget128( target, source, source_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_ixget128 wrapper function ******************************************************/ void SHMEM_IXGET128( void * target, void * source, int * source_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_ixget128()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_ixget128( target, source, source_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_ixget128( target, source, source_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_ixget128 wrapper function ******************************************************/ void shmem_ixget128_( void * target, void * source, int * source_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_ixget128()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_ixget128( target, source, source_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_ixget128( target, source, source_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_ixget128 wrapper function ******************************************************/ void shmem_ixget128__( void * target, void * source, int * source_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_ixget128()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_ixget128( target, source, source_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_ixget128( target, source, source_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_short_ixget wrapper function ******************************************************/ void shmem_short_ixget( short * target, short * source, int * source_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_short_ixget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_ixget( target, source, source_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_short_ixget( target, source, source_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_ixget wrapper function ******************************************************/ void SHMEM_SHORT_IXGET( short * target, short * source, int * source_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_short_ixget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_ixget( target, source, source_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_short_ixget( target, source, source_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_ixget wrapper function ******************************************************/ void shmem_short_ixget_( short * target, short * source, int * source_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_short_ixget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_ixget( target, source, source_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_short_ixget( target, source, source_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_ixget wrapper function ******************************************************/ void shmem_short_ixget__( short * target, short * source, int * source_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_short_ixget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_ixget( target, source, source_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_short_ixget( target, source, source_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_int_ixget wrapper function ******************************************************/ void shmem_int_ixget( int * target, int * source, int * source_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_int_ixget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_ixget( target, source, source_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_int_ixget( target, source, source_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_ixget wrapper function ******************************************************/ void SHMEM_INT_IXGET( int * target, int * source, int * source_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_int_ixget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_ixget( target, source, source_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_int_ixget( target, source, source_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_ixget wrapper function ******************************************************/ void shmem_int_ixget_( int * target, int * source, int * source_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_int_ixget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_ixget( target, source, source_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_int_ixget( target, source, source_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_ixget wrapper function ******************************************************/ void shmem_int_ixget__( int * target, int * source, int * source_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_int_ixget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_ixget( target, source, source_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_int_ixget( target, source, source_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_long_ixget wrapper function ******************************************************/ void shmem_long_ixget( long * target, long * source, int * source_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_long_ixget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_ixget( target, source, source_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_long_ixget( target, source, source_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_ixget wrapper function ******************************************************/ void SHMEM_LONG_IXGET( long * target, long * source, int * source_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_long_ixget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_ixget( target, source, source_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_long_ixget( target, source, source_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_ixget wrapper function ******************************************************/ void shmem_long_ixget_( long * target, long * source, int * source_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_long_ixget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_ixget( target, source, source_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_long_ixget( target, source, source_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_ixget wrapper function ******************************************************/ void shmem_long_ixget__( long * target, long * source, int * source_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_long_ixget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_ixget( target, source, source_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_long_ixget( target, source, source_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_longlong_ixget wrapper function ******************************************************/ void shmem_longlong_ixget( long long * target, long long * source, int * source_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_longlong_ixget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_ixget( target, source, source_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_ixget( target, source, source_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_ixget wrapper function ******************************************************/ void SHMEM_LONGLONG_IXGET( long long * target, long long * source, int * source_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_longlong_ixget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_ixget( target, source, source_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_ixget( target, source, source_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_ixget wrapper function ******************************************************/ void shmem_longlong_ixget_( long long * target, long long * source, int * source_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_longlong_ixget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_ixget( target, source, source_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_ixget( target, source, source_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_ixget wrapper function ******************************************************/ void shmem_longlong_ixget__( long long * target, long long * source, int * source_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_longlong_ixget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_ixget( target, source, source_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_ixget( target, source, source_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_float_ixget wrapper function ******************************************************/ void shmem_float_ixget( float * target, float * source, int * source_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_float_ixget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_float_ixget( target, source, source_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_float_ixget( target, source, source_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_float_ixget wrapper function ******************************************************/ void SHMEM_FLOAT_IXGET( float * target, float * source, int * source_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_float_ixget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_float_ixget( target, source, source_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_float_ixget( target, source, source_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_float_ixget wrapper function ******************************************************/ void shmem_float_ixget_( float * target, float * source, int * source_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_float_ixget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_float_ixget( target, source, source_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_float_ixget( target, source, source_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_float_ixget wrapper function ******************************************************/ void shmem_float_ixget__( float * target, float * source, int * source_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_float_ixget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_float_ixget( target, source, source_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_float_ixget( target, source, source_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_double_ixget wrapper function ******************************************************/ void shmem_double_ixget( double * target, double * source, int * source_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_double_ixget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_double_ixget( target, source, source_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_double_ixget( target, source, source_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_double_ixget wrapper function ******************************************************/ void SHMEM_DOUBLE_IXGET( double * target, double * source, int * source_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_double_ixget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_double_ixget( target, source, source_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_double_ixget( target, source, source_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_double_ixget wrapper function ******************************************************/ void shmem_double_ixget_( double * target, double * source, int * source_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_double_ixget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_double_ixget( target, source, source_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_double_ixget( target, source, source_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_double_ixget wrapper function ******************************************************/ void shmem_double_ixget__( double * target, double * source, int * source_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_double_ixget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_double_ixget( target, source, source_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_double_ixget( target, source, source_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_longdouble_ixget wrapper function ******************************************************/ void shmem_longdouble_ixget( long double * target, long double * source, int * source_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_longdouble_ixget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longdouble_ixget( target, source, source_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_longdouble_ixget( target, source, source_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longdouble_ixget wrapper function ******************************************************/ void SHMEM_LONGDOUBLE_IXGET( long double * target, long double * source, int * source_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_longdouble_ixget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longdouble_ixget( target, source, source_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_longdouble_ixget( target, source, source_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longdouble_ixget wrapper function ******************************************************/ void shmem_longdouble_ixget_( long double * target, long double * source, int * source_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_longdouble_ixget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longdouble_ixget( target, source, source_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_longdouble_ixget( target, source, source_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longdouble_ixget wrapper function ******************************************************/ void shmem_longdouble_ixget__( long double * target, long double * source, int * source_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_longdouble_ixget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longdouble_ixget( target, source, source_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_longdouble_ixget( target, source, source_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_complexf_ixget wrapper function ******************************************************/ void shmem_complexf_ixget( void * target, void * source, int * source_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_complexf_ixget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexf_ixget( target, source, source_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_complexf_ixget( target, source, source_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_complexf_ixget wrapper function ******************************************************/ void SHMEM_COMPLEXF_IXGET( void * target, void * source, int * source_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_complexf_ixget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexf_ixget( target, source, source_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_complexf_ixget( target, source, source_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_complexf_ixget wrapper function ******************************************************/ void shmem_complexf_ixget_( void * target, void * source, int * source_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_complexf_ixget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexf_ixget( target, source, source_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_complexf_ixget( target, source, source_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_complexf_ixget wrapper function ******************************************************/ void shmem_complexf_ixget__( void * target, void * source, int * source_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_complexf_ixget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexf_ixget( target, source, source_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_complexf_ixget( target, source, source_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_complexd_ixget wrapper function ******************************************************/ void shmem_complexd_ixget( void * target, void * source, int * source_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_complexd_ixget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexd_ixget( target, source, source_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_complexd_ixget( target, source, source_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_complexd_ixget wrapper function ******************************************************/ void SHMEM_COMPLEXD_IXGET( void * target, void * source, int * source_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_complexd_ixget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexd_ixget( target, source, source_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_complexd_ixget( target, source, source_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_complexd_ixget wrapper function ******************************************************/ void shmem_complexd_ixget_( void * target, void * source, int * source_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_complexd_ixget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexd_ixget( target, source, source_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_complexd_ixget( target, source, source_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_complexd_ixget wrapper function ******************************************************/ void shmem_complexd_ixget__( void * target, void * source, int * source_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_complexd_ixget()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexd_ixget( target, source, source_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_complexd_ixget( target, source, source_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_ixput wrapper function ******************************************************/ void shmem_ixput( void * target, void * source, long long * target_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_ixput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_ixput( target, source, target_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_ixput( target, source, target_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_ixput wrapper function ******************************************************/ void SHMEM_IXPUT( void * target, void * source, long long * target_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_ixput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_ixput( target, source, target_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_ixput( target, source, target_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_ixput wrapper function ******************************************************/ void shmem_ixput_( void * target, void * source, long long * target_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_ixput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_ixput( target, source, target_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_ixput( target, source, target_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_ixput wrapper function ******************************************************/ void shmem_ixput__( void * target, void * source, long long * target_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_ixput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_ixput( target, source, target_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_ixput( target, source, target_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_ixput32 wrapper function ******************************************************/ void shmem_ixput32( void * target, void * source, int * target_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_ixput32()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_ixput32( target, source, target_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_ixput32( target, source, target_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_ixput32 wrapper function ******************************************************/ void SHMEM_IXPUT32( void * target, void * source, int * target_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_ixput32()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_ixput32( target, source, target_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_ixput32( target, source, target_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_ixput32 wrapper function ******************************************************/ void shmem_ixput32_( void * target, void * source, int * target_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_ixput32()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_ixput32( target, source, target_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_ixput32( target, source, target_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_ixput32 wrapper function ******************************************************/ void shmem_ixput32__( void * target, void * source, int * target_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_ixput32()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_ixput32( target, source, target_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_ixput32( target, source, target_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_ixput64 wrapper function ******************************************************/ void shmem_ixput64( void * target, void * source, int * target_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_ixput64()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_ixput64( target, source, target_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_ixput64( target, source, target_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_ixput64 wrapper function ******************************************************/ void SHMEM_IXPUT64( void * target, void * source, int * target_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_ixput64()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_ixput64( target, source, target_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_ixput64( target, source, target_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_ixput64 wrapper function ******************************************************/ void shmem_ixput64_( void * target, void * source, int * target_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_ixput64()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_ixput64( target, source, target_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_ixput64( target, source, target_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_ixput64 wrapper function ******************************************************/ void shmem_ixput64__( void * target, void * source, int * target_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_ixput64()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_ixput64( target, source, target_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_ixput64( target, source, target_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_ixput128 wrapper function ******************************************************/ void shmem_ixput128( void * target, void * source, int * target_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_ixput128()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_ixput128( target, source, target_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_ixput128( target, source, target_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_ixput128 wrapper function ******************************************************/ void SHMEM_IXPUT128( void * target, void * source, int * target_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_ixput128()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_ixput128( target, source, target_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_ixput128( target, source, target_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_ixput128 wrapper function ******************************************************/ void shmem_ixput128_( void * target, void * source, int * target_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_ixput128()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_ixput128( target, source, target_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_ixput128( target, source, target_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_ixput128 wrapper function ******************************************************/ void shmem_ixput128__( void * target, void * source, int * target_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_ixput128()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_ixput128( target, source, target_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_ixput128( target, source, target_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_short_ixput wrapper function ******************************************************/ void shmem_short_ixput( short * target, short * source, int * target_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_short_ixput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_ixput( target, source, target_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_short_ixput( target, source, target_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_ixput wrapper function ******************************************************/ void SHMEM_SHORT_IXPUT( short * target, short * source, int * target_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_short_ixput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_ixput( target, source, target_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_short_ixput( target, source, target_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_ixput wrapper function ******************************************************/ void shmem_short_ixput_( short * target, short * source, int * target_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_short_ixput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_ixput( target, source, target_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_short_ixput( target, source, target_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_ixput wrapper function ******************************************************/ void shmem_short_ixput__( short * target, short * source, int * target_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_short_ixput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_ixput( target, source, target_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_short_ixput( target, source, target_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_int_ixput wrapper function ******************************************************/ void shmem_int_ixput( int * target, int * source, int * target_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_int_ixput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_ixput( target, source, target_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_int_ixput( target, source, target_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_ixput wrapper function ******************************************************/ void SHMEM_INT_IXPUT( int * target, int * source, int * target_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_int_ixput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_ixput( target, source, target_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_int_ixput( target, source, target_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_ixput wrapper function ******************************************************/ void shmem_int_ixput_( int * target, int * source, int * target_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_int_ixput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_ixput( target, source, target_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_int_ixput( target, source, target_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_ixput wrapper function ******************************************************/ void shmem_int_ixput__( int * target, int * source, int * target_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_int_ixput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_ixput( target, source, target_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_int_ixput( target, source, target_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_long_ixput wrapper function ******************************************************/ void shmem_long_ixput( long * target, long * source, int * target_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_long_ixput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_ixput( target, source, target_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_long_ixput( target, source, target_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_ixput wrapper function ******************************************************/ void SHMEM_LONG_IXPUT( long * target, long * source, int * target_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_long_ixput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_ixput( target, source, target_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_long_ixput( target, source, target_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_ixput wrapper function ******************************************************/ void shmem_long_ixput_( long * target, long * source, int * target_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_long_ixput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_ixput( target, source, target_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_long_ixput( target, source, target_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_ixput wrapper function ******************************************************/ void shmem_long_ixput__( long * target, long * source, int * target_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_long_ixput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_ixput( target, source, target_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_long_ixput( target, source, target_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_longlong_ixput wrapper function ******************************************************/ void shmem_longlong_ixput( long long * target, long long * source, int * target_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_longlong_ixput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_ixput( target, source, target_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_ixput( target, source, target_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_ixput wrapper function ******************************************************/ void SHMEM_LONGLONG_IXPUT( long long * target, long long * source, int * target_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_longlong_ixput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_ixput( target, source, target_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_ixput( target, source, target_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_ixput wrapper function ******************************************************/ void shmem_longlong_ixput_( long long * target, long long * source, int * target_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_longlong_ixput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_ixput( target, source, target_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_ixput( target, source, target_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_ixput wrapper function ******************************************************/ void shmem_longlong_ixput__( long long * target, long long * source, int * target_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_longlong_ixput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_ixput( target, source, target_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_ixput( target, source, target_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_float_ixput wrapper function ******************************************************/ void shmem_float_ixput( float * target, float * source, int * target_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_float_ixput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_float_ixput( target, source, target_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_float_ixput( target, source, target_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_float_ixput wrapper function ******************************************************/ void SHMEM_FLOAT_IXPUT( float * target, float * source, int * target_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_float_ixput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_float_ixput( target, source, target_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_float_ixput( target, source, target_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_float_ixput wrapper function ******************************************************/ void shmem_float_ixput_( float * target, float * source, int * target_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_float_ixput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_float_ixput( target, source, target_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_float_ixput( target, source, target_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_float_ixput wrapper function ******************************************************/ void shmem_float_ixput__( float * target, float * source, int * target_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_float_ixput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_float_ixput( target, source, target_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_float_ixput( target, source, target_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_double_ixput wrapper function ******************************************************/ void shmem_double_ixput( double * target, double * source, long * target_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_double_ixput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_double_ixput( target, source, target_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_double_ixput( target, source, target_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_double_ixput wrapper function ******************************************************/ void SHMEM_DOUBLE_IXPUT( double * target, double * source, long * target_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_double_ixput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_double_ixput( target, source, target_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_double_ixput( target, source, target_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_double_ixput wrapper function ******************************************************/ void shmem_double_ixput_( double * target, double * source, long * target_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_double_ixput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_double_ixput( target, source, target_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_double_ixput( target, source, target_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_double_ixput wrapper function ******************************************************/ void shmem_double_ixput__( double * target, double * source, long * target_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_double_ixput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_double_ixput( target, source, target_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_double_ixput( target, source, target_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_longdouble_ixput wrapper function ******************************************************/ void shmem_longdouble_ixput( long double * target, long double * source, int * target_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_longdouble_ixput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longdouble_ixput( target, source, target_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_longdouble_ixput( target, source, target_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longdouble_ixput wrapper function ******************************************************/ void SHMEM_LONGDOUBLE_IXPUT( long double * target, long double * source, int * target_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_longdouble_ixput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longdouble_ixput( target, source, target_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_longdouble_ixput( target, source, target_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longdouble_ixput wrapper function ******************************************************/ void shmem_longdouble_ixput_( long double * target, long double * source, int * target_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_longdouble_ixput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longdouble_ixput( target, source, target_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_longdouble_ixput( target, source, target_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longdouble_ixput wrapper function ******************************************************/ void shmem_longdouble_ixput__( long double * target, long double * source, int * target_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_longdouble_ixput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longdouble_ixput( target, source, target_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_longdouble_ixput( target, source, target_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_complexf_ixput wrapper function ******************************************************/ void shmem_complexf_ixput( void * target, void * source, int * target_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_complexf_ixput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexf_ixput( target, source, target_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_complexf_ixput( target, source, target_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_complexf_ixput wrapper function ******************************************************/ void SHMEM_COMPLEXF_IXPUT( void * target, void * source, int * target_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_complexf_ixput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexf_ixput( target, source, target_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_complexf_ixput( target, source, target_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_complexf_ixput wrapper function ******************************************************/ void shmem_complexf_ixput_( void * target, void * source, int * target_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_complexf_ixput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexf_ixput( target, source, target_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_complexf_ixput( target, source, target_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_complexf_ixput wrapper function ******************************************************/ void shmem_complexf_ixput__( void * target, void * source, int * target_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_complexf_ixput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexf_ixput( target, source, target_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_complexf_ixput( target, source, target_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_complexd_ixput wrapper function ******************************************************/ void shmem_complexd_ixput( void * target, void * source, int * target_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_complexd_ixput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexd_ixput( target, source, target_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_complexd_ixput( target, source, target_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_complexd_ixput wrapper function ******************************************************/ void SHMEM_COMPLEXD_IXPUT( void * target, void * source, int * target_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_complexd_ixput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexd_ixput( target, source, target_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_complexd_ixput( target, source, target_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_complexd_ixput wrapper function ******************************************************/ void shmem_complexd_ixput_( void * target, void * source, int * target_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_complexd_ixput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexd_ixput( target, source, target_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_complexd_ixput( target, source, target_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_complexd_ixput wrapper function ******************************************************/ void shmem_complexd_ixput__( void * target, void * source, int * target_index, int len, int pe) { TAU_PROFILE_TIMER(t, "shmem_complexd_ixput()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexd_ixput( target, source, target_index, len, pe) ; #else /* !TAU_P_SHMEM */ pshmem_complexd_ixput( target, source, target_index, len, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_short_and_to_all wrapper function ******************************************************/ void shmem_short_and_to_all( short * target, short * source, int nreduce, int PE_start, int logPE_stride, int PE_size, short * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_short_and_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_and_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_short_and_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_and_to_all wrapper function ******************************************************/ void SHMEM_SHORT_AND_TO_ALL( short * target, short * source, int nreduce, int PE_start, int logPE_stride, int PE_size, short * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_short_and_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_and_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_short_and_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_and_to_all wrapper function ******************************************************/ void shmem_short_and_to_all_( short * target, short * source, int nreduce, int PE_start, int logPE_stride, int PE_size, short * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_short_and_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_and_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_short_and_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_and_to_all wrapper function ******************************************************/ void shmem_short_and_to_all__( short * target, short * source, int nreduce, int PE_start, int logPE_stride, int PE_size, short * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_short_and_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_and_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_short_and_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_int_and_to_all wrapper function ******************************************************/ void shmem_int_and_to_all( int * target, int * source, int nreduce, int PE_start, int logPE_stride, int PE_size, int * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_int_and_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_and_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_int_and_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_and_to_all wrapper function ******************************************************/ void SHMEM_INT_AND_TO_ALL( int * target, int * source, int nreduce, int PE_start, int logPE_stride, int PE_size, int * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_int_and_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_and_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_int_and_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_and_to_all wrapper function ******************************************************/ void shmem_int_and_to_all_( int * target, int * source, int nreduce, int PE_start, int logPE_stride, int PE_size, int * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_int_and_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_and_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_int_and_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_and_to_all wrapper function ******************************************************/ void shmem_int_and_to_all__( int * target, int * source, int nreduce, int PE_start, int logPE_stride, int PE_size, int * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_int_and_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_and_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_int_and_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_long_and_to_all wrapper function ******************************************************/ void shmem_long_and_to_all( long * target, long * source, int nreduce, int PE_start, int logPE_stride, int PE_size, long * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_long_and_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_and_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_long_and_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_and_to_all wrapper function ******************************************************/ void SHMEM_LONG_AND_TO_ALL( long * target, long * source, int nreduce, int PE_start, int logPE_stride, int PE_size, long * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_long_and_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_and_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_long_and_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_and_to_all wrapper function ******************************************************/ void shmem_long_and_to_all_( long * target, long * source, int nreduce, int PE_start, int logPE_stride, int PE_size, long * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_long_and_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_and_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_long_and_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_and_to_all wrapper function ******************************************************/ void shmem_long_and_to_all__( long * target, long * source, int nreduce, int PE_start, int logPE_stride, int PE_size, long * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_long_and_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_and_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_long_and_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_longlong_and_to_all wrapper function ******************************************************/ void shmem_longlong_and_to_all( long long * target, long long * source, int nreduce, int PE_start, int logPE_stride, int PE_size, long long * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_longlong_and_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_and_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_and_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_and_to_all wrapper function ******************************************************/ void SHMEM_LONGLONG_AND_TO_ALL( long long * target, long long * source, int nreduce, int PE_start, int logPE_stride, int PE_size, long long * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_longlong_and_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_and_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_and_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_and_to_all wrapper function ******************************************************/ void shmem_longlong_and_to_all_( long long * target, long long * source, int nreduce, int PE_start, int logPE_stride, int PE_size, long long * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_longlong_and_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_and_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_and_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_and_to_all wrapper function ******************************************************/ void shmem_longlong_and_to_all__( long long * target, long long * source, int nreduce, int PE_start, int logPE_stride, int PE_size, long long * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_longlong_and_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_and_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_and_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_short_or_to_all wrapper function ******************************************************/ void shmem_short_or_to_all( short * target, short * source, int nreduce, int PE_start, int logPE_stride, int PE_size, short * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_short_or_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_or_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_short_or_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_or_to_all wrapper function ******************************************************/ void SHMEM_SHORT_OR_TO_ALL( short * target, short * source, int nreduce, int PE_start, int logPE_stride, int PE_size, short * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_short_or_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_or_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_short_or_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_or_to_all wrapper function ******************************************************/ void shmem_short_or_to_all_( short * target, short * source, int nreduce, int PE_start, int logPE_stride, int PE_size, short * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_short_or_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_or_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_short_or_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_or_to_all wrapper function ******************************************************/ void shmem_short_or_to_all__( short * target, short * source, int nreduce, int PE_start, int logPE_stride, int PE_size, short * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_short_or_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_or_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_short_or_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_int_or_to_all wrapper function ******************************************************/ void shmem_int_or_to_all( int * target, int * source, int nreduce, int PE_start, int logPE_stride, int PE_size, int * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_int_or_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_or_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_int_or_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_or_to_all wrapper function ******************************************************/ void SHMEM_INT_OR_TO_ALL( int * target, int * source, int nreduce, int PE_start, int logPE_stride, int PE_size, int * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_int_or_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_or_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_int_or_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_or_to_all wrapper function ******************************************************/ void shmem_int_or_to_all_( int * target, int * source, int nreduce, int PE_start, int logPE_stride, int PE_size, int * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_int_or_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_or_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_int_or_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_or_to_all wrapper function ******************************************************/ void shmem_int_or_to_all__( int * target, int * source, int nreduce, int PE_start, int logPE_stride, int PE_size, int * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_int_or_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_or_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_int_or_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_long_or_to_all wrapper function ******************************************************/ void shmem_long_or_to_all( long * target, long * source, int nreduce, int PE_start, int logPE_stride, int PE_size, long * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_long_or_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_or_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_long_or_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_or_to_all wrapper function ******************************************************/ void SHMEM_LONG_OR_TO_ALL( long * target, long * source, int nreduce, int PE_start, int logPE_stride, int PE_size, long * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_long_or_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_or_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_long_or_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_or_to_all wrapper function ******************************************************/ void shmem_long_or_to_all_( long * target, long * source, int nreduce, int PE_start, int logPE_stride, int PE_size, long * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_long_or_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_or_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_long_or_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_or_to_all wrapper function ******************************************************/ void shmem_long_or_to_all__( long * target, long * source, int nreduce, int PE_start, int logPE_stride, int PE_size, long * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_long_or_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_or_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_long_or_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_longlong_or_to_all wrapper function ******************************************************/ void shmem_longlong_or_to_all( long long * target, long long * source, int nreduce, int PE_start, int logPE_stride, int PE_size, long long * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_longlong_or_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_or_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_or_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_or_to_all wrapper function ******************************************************/ void SHMEM_LONGLONG_OR_TO_ALL( long long * target, long long * source, int nreduce, int PE_start, int logPE_stride, int PE_size, long long * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_longlong_or_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_or_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_or_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_or_to_all wrapper function ******************************************************/ void shmem_longlong_or_to_all_( long long * target, long long * source, int nreduce, int PE_start, int logPE_stride, int PE_size, long long * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_longlong_or_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_or_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_or_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_or_to_all wrapper function ******************************************************/ void shmem_longlong_or_to_all__( long long * target, long long * source, int nreduce, int PE_start, int logPE_stride, int PE_size, long long * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_longlong_or_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_or_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_or_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_short_xor_to_all wrapper function ******************************************************/ void shmem_short_xor_to_all( short * target, short * source, int nreduce, int PE_start, int logPE_stride, int PE_size, short * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_short_xor_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_xor_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_short_xor_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_xor_to_all wrapper function ******************************************************/ void SHMEM_SHORT_XOR_TO_ALL( short * target, short * source, int nreduce, int PE_start, int logPE_stride, int PE_size, short * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_short_xor_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_xor_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_short_xor_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_xor_to_all wrapper function ******************************************************/ void shmem_short_xor_to_all_( short * target, short * source, int nreduce, int PE_start, int logPE_stride, int PE_size, short * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_short_xor_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_xor_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_short_xor_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_xor_to_all wrapper function ******************************************************/ void shmem_short_xor_to_all__( short * target, short * source, int nreduce, int PE_start, int logPE_stride, int PE_size, short * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_short_xor_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_xor_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_short_xor_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_int_xor_to_all wrapper function ******************************************************/ void shmem_int_xor_to_all( int * target, int * source, int nreduce, int PE_start, int logPE_stride, int PE_size, int * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_int_xor_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_xor_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_int_xor_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_xor_to_all wrapper function ******************************************************/ void SHMEM_INT_XOR_TO_ALL( int * target, int * source, int nreduce, int PE_start, int logPE_stride, int PE_size, int * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_int_xor_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_xor_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_int_xor_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_xor_to_all wrapper function ******************************************************/ void shmem_int_xor_to_all_( int * target, int * source, int nreduce, int PE_start, int logPE_stride, int PE_size, int * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_int_xor_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_xor_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_int_xor_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_xor_to_all wrapper function ******************************************************/ void shmem_int_xor_to_all__( int * target, int * source, int nreduce, int PE_start, int logPE_stride, int PE_size, int * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_int_xor_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_xor_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_int_xor_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_long_xor_to_all wrapper function ******************************************************/ void shmem_long_xor_to_all( long * target, long * source, int nreduce, int PE_start, int logPE_stride, int PE_size, long * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_long_xor_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_xor_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_long_xor_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_xor_to_all wrapper function ******************************************************/ void SHMEM_LONG_XOR_TO_ALL( long * target, long * source, int nreduce, int PE_start, int logPE_stride, int PE_size, long * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_long_xor_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_xor_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_long_xor_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_xor_to_all wrapper function ******************************************************/ void shmem_long_xor_to_all_( long * target, long * source, int nreduce, int PE_start, int logPE_stride, int PE_size, long * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_long_xor_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_xor_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_long_xor_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_xor_to_all wrapper function ******************************************************/ void shmem_long_xor_to_all__( long * target, long * source, int nreduce, int PE_start, int logPE_stride, int PE_size, long * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_long_xor_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_xor_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_long_xor_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_longlong_xor_to_all wrapper function ******************************************************/ void shmem_longlong_xor_to_all( long long * target, long long * source, int nreduce, int PE_start, int logPE_stride, int PE_size, long long * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_longlong_xor_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_xor_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_xor_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_xor_to_all wrapper function ******************************************************/ void SHMEM_LONGLONG_XOR_TO_ALL( long long * target, long long * source, int nreduce, int PE_start, int logPE_stride, int PE_size, long long * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_longlong_xor_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_xor_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_xor_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_xor_to_all wrapper function ******************************************************/ void shmem_longlong_xor_to_all_( long long * target, long long * source, int nreduce, int PE_start, int logPE_stride, int PE_size, long long * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_longlong_xor_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_xor_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_xor_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_xor_to_all wrapper function ******************************************************/ void shmem_longlong_xor_to_all__( long long * target, long long * source, int nreduce, int PE_start, int logPE_stride, int PE_size, long long * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_longlong_xor_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_xor_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_xor_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_float_xor_to_all wrapper function ******************************************************/ void shmem_float_xor_to_all( float * target, float * source, int nreduce, int PE_start, int logPE_stride, int PE_size, float * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_float_xor_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_float_xor_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_float_xor_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_float_xor_to_all wrapper function ******************************************************/ void SHMEM_FLOAT_XOR_TO_ALL( float * target, float * source, int nreduce, int PE_start, int logPE_stride, int PE_size, float * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_float_xor_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_float_xor_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_float_xor_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_float_xor_to_all wrapper function ******************************************************/ void shmem_float_xor_to_all_( float * target, float * source, int nreduce, int PE_start, int logPE_stride, int PE_size, float * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_float_xor_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_float_xor_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_float_xor_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_float_xor_to_all wrapper function ******************************************************/ void shmem_float_xor_to_all__( float * target, float * source, int nreduce, int PE_start, int logPE_stride, int PE_size, float * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_float_xor_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_float_xor_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_float_xor_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_double_xor_to_all wrapper function ******************************************************/ void shmem_double_xor_to_all( double * target, double * source, int nreduce, int PE_start, int logPE_stride, int PE_size, double * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_double_xor_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_double_xor_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_double_xor_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_double_xor_to_all wrapper function ******************************************************/ void SHMEM_DOUBLE_XOR_TO_ALL( double * target, double * source, int nreduce, int PE_start, int logPE_stride, int PE_size, double * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_double_xor_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_double_xor_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_double_xor_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_double_xor_to_all wrapper function ******************************************************/ void shmem_double_xor_to_all_( double * target, double * source, int nreduce, int PE_start, int logPE_stride, int PE_size, double * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_double_xor_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_double_xor_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_double_xor_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_double_xor_to_all wrapper function ******************************************************/ void shmem_double_xor_to_all__( double * target, double * source, int nreduce, int PE_start, int logPE_stride, int PE_size, double * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_double_xor_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_double_xor_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_double_xor_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_longdouble_xor_to_all wrapper function ******************************************************/ void shmem_longdouble_xor_to_all( long double * target, long double * source, int nreduce, int PE_start, int logPE_stride, int PE_size, long double * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_longdouble_xor_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longdouble_xor_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_longdouble_xor_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longdouble_xor_to_all wrapper function ******************************************************/ void SHMEM_LONGDOUBLE_XOR_TO_ALL( long double * target, long double * source, int nreduce, int PE_start, int logPE_stride, int PE_size, long double * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_longdouble_xor_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longdouble_xor_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_longdouble_xor_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longdouble_xor_to_all wrapper function ******************************************************/ void shmem_longdouble_xor_to_all_( long double * target, long double * source, int nreduce, int PE_start, int logPE_stride, int PE_size, long double * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_longdouble_xor_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longdouble_xor_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_longdouble_xor_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longdouble_xor_to_all wrapper function ******************************************************/ void shmem_longdouble_xor_to_all__( long double * target, long double * source, int nreduce, int PE_start, int logPE_stride, int PE_size, long double * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_longdouble_xor_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longdouble_xor_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_longdouble_xor_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_complexf_xor_to_all wrapper function ******************************************************/ void shmem_complexf_xor_to_all( void * target, void * source, int nreduce, int PE_start, int logPE_stride, int PE_size, void * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_complexf_xor_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexf_xor_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_complexf_xor_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_complexf_xor_to_all wrapper function ******************************************************/ void SHMEM_COMPLEXF_XOR_TO_ALL( void * target, void * source, int nreduce, int PE_start, int logPE_stride, int PE_size, void * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_complexf_xor_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexf_xor_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_complexf_xor_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_complexf_xor_to_all wrapper function ******************************************************/ void shmem_complexf_xor_to_all_( void * target, void * source, int nreduce, int PE_start, int logPE_stride, int PE_size, void * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_complexf_xor_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexf_xor_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_complexf_xor_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_complexf_xor_to_all wrapper function ******************************************************/ void shmem_complexf_xor_to_all__( void * target, void * source, int nreduce, int PE_start, int logPE_stride, int PE_size, void * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_complexf_xor_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexf_xor_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_complexf_xor_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_complexd_xor_to_all wrapper function ******************************************************/ void shmem_complexd_xor_to_all( void * target, void * source, int nreduce, int PE_start, int logPE_stride, int PE_size, void * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_complexd_xor_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexd_xor_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_complexd_xor_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_complexd_xor_to_all wrapper function ******************************************************/ void SHMEM_COMPLEXD_XOR_TO_ALL( void * target, void * source, int nreduce, int PE_start, int logPE_stride, int PE_size, void * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_complexd_xor_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexd_xor_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_complexd_xor_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_complexd_xor_to_all wrapper function ******************************************************/ void shmem_complexd_xor_to_all_( void * target, void * source, int nreduce, int PE_start, int logPE_stride, int PE_size, void * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_complexd_xor_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexd_xor_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_complexd_xor_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_complexd_xor_to_all wrapper function ******************************************************/ void shmem_complexd_xor_to_all__( void * target, void * source, int nreduce, int PE_start, int logPE_stride, int PE_size, void * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_complexd_xor_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexd_xor_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_complexd_xor_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_short_min_to_all wrapper function ******************************************************/ void shmem_short_min_to_all( short * target, short * source, int nreduce, int PE_start, int logPE_stride, int PE_size, short * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_short_min_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_min_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_short_min_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_min_to_all wrapper function ******************************************************/ void SHMEM_SHORT_MIN_TO_ALL( short * target, short * source, int nreduce, int PE_start, int logPE_stride, int PE_size, short * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_short_min_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_min_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_short_min_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_min_to_all wrapper function ******************************************************/ void shmem_short_min_to_all_( short * target, short * source, int nreduce, int PE_start, int logPE_stride, int PE_size, short * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_short_min_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_min_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_short_min_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_min_to_all wrapper function ******************************************************/ void shmem_short_min_to_all__( short * target, short * source, int nreduce, int PE_start, int logPE_stride, int PE_size, short * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_short_min_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_min_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_short_min_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_int_min_to_all wrapper function ******************************************************/ void shmem_int_min_to_all( int * target, int * source, int nreduce, int PE_start, int logPE_stride, int PE_size, int * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_int_min_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_min_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_int_min_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_min_to_all wrapper function ******************************************************/ void SHMEM_INT_MIN_TO_ALL( int * target, int * source, int nreduce, int PE_start, int logPE_stride, int PE_size, int * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_int_min_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_min_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_int_min_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_min_to_all wrapper function ******************************************************/ void shmem_int_min_to_all_( int * target, int * source, int nreduce, int PE_start, int logPE_stride, int PE_size, int * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_int_min_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_min_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_int_min_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_min_to_all wrapper function ******************************************************/ void shmem_int_min_to_all__( int * target, int * source, int nreduce, int PE_start, int logPE_stride, int PE_size, int * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_int_min_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_min_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_int_min_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_long_min_to_all wrapper function ******************************************************/ void shmem_long_min_to_all( long * target, long * source, int nreduce, int PE_start, int logPE_stride, int PE_size, long * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_long_min_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_min_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_long_min_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_min_to_all wrapper function ******************************************************/ void SHMEM_LONG_MIN_TO_ALL( long * target, long * source, int nreduce, int PE_start, int logPE_stride, int PE_size, long * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_long_min_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_min_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_long_min_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_min_to_all wrapper function ******************************************************/ void shmem_long_min_to_all_( long * target, long * source, int nreduce, int PE_start, int logPE_stride, int PE_size, long * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_long_min_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_min_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_long_min_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_min_to_all wrapper function ******************************************************/ void shmem_long_min_to_all__( long * target, long * source, int nreduce, int PE_start, int logPE_stride, int PE_size, long * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_long_min_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_min_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_long_min_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_longlong_min_to_all wrapper function ******************************************************/ void shmem_longlong_min_to_all( long long * target, long long * source, int nreduce, int PE_start, int logPE_stride, int PE_size, long long * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_longlong_min_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_min_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_min_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_min_to_all wrapper function ******************************************************/ void SHMEM_LONGLONG_MIN_TO_ALL( long long * target, long long * source, int nreduce, int PE_start, int logPE_stride, int PE_size, long long * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_longlong_min_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_min_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_min_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_min_to_all wrapper function ******************************************************/ void shmem_longlong_min_to_all_( long long * target, long long * source, int nreduce, int PE_start, int logPE_stride, int PE_size, long long * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_longlong_min_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_min_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_min_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_min_to_all wrapper function ******************************************************/ void shmem_longlong_min_to_all__( long long * target, long long * source, int nreduce, int PE_start, int logPE_stride, int PE_size, long long * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_longlong_min_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_min_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_min_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_float_min_to_all wrapper function ******************************************************/ void shmem_float_min_to_all( float * target, float * source, int nreduce, int PE_start, int logPE_stride, int PE_size, float * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_float_min_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_float_min_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_float_min_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_float_min_to_all wrapper function ******************************************************/ void SHMEM_FLOAT_MIN_TO_ALL( float * target, float * source, int nreduce, int PE_start, int logPE_stride, int PE_size, float * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_float_min_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_float_min_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_float_min_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_float_min_to_all wrapper function ******************************************************/ void shmem_float_min_to_all_( float * target, float * source, int nreduce, int PE_start, int logPE_stride, int PE_size, float * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_float_min_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_float_min_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_float_min_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_float_min_to_all wrapper function ******************************************************/ void shmem_float_min_to_all__( float * target, float * source, int nreduce, int PE_start, int logPE_stride, int PE_size, float * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_float_min_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_float_min_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_float_min_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_double_min_to_all wrapper function ******************************************************/ void shmem_double_min_to_all( double * target, double * source, int nreduce, int PE_start, int logPE_stride, int PE_size, double * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_double_min_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_double_min_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_double_min_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_double_min_to_all wrapper function ******************************************************/ void SHMEM_DOUBLE_MIN_TO_ALL( double * target, double * source, int nreduce, int PE_start, int logPE_stride, int PE_size, double * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_double_min_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_double_min_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_double_min_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_double_min_to_all wrapper function ******************************************************/ void shmem_double_min_to_all_( double * target, double * source, int nreduce, int PE_start, int logPE_stride, int PE_size, double * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_double_min_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_double_min_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_double_min_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_double_min_to_all wrapper function ******************************************************/ void shmem_double_min_to_all__( double * target, double * source, int nreduce, int PE_start, int logPE_stride, int PE_size, double * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_double_min_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_double_min_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_double_min_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_longdouble_min_to_all wrapper function ******************************************************/ void shmem_longdouble_min_to_all( long double * target, long double * source, int nreduce, int PE_start, int logPE_stride, int PE_size, long double * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_longdouble_min_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longdouble_min_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_longdouble_min_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longdouble_min_to_all wrapper function ******************************************************/ void SHMEM_LONGDOUBLE_MIN_TO_ALL( long double * target, long double * source, int nreduce, int PE_start, int logPE_stride, int PE_size, long double * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_longdouble_min_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longdouble_min_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_longdouble_min_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longdouble_min_to_all wrapper function ******************************************************/ void shmem_longdouble_min_to_all_( long double * target, long double * source, int nreduce, int PE_start, int logPE_stride, int PE_size, long double * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_longdouble_min_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longdouble_min_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_longdouble_min_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longdouble_min_to_all wrapper function ******************************************************/ void shmem_longdouble_min_to_all__( long double * target, long double * source, int nreduce, int PE_start, int logPE_stride, int PE_size, long double * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_longdouble_min_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longdouble_min_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_longdouble_min_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_complexf_min_to_all wrapper function ******************************************************/ void shmem_complexf_min_to_all( void * target, void * source, int nreduce, int PE_start, int logPE_stride, int PE_size, void * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_complexf_min_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexf_min_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_complexf_min_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_complexf_min_to_all wrapper function ******************************************************/ void SHMEM_COMPLEXF_MIN_TO_ALL( void * target, void * source, int nreduce, int PE_start, int logPE_stride, int PE_size, void * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_complexf_min_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexf_min_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_complexf_min_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_complexf_min_to_all wrapper function ******************************************************/ void shmem_complexf_min_to_all_( void * target, void * source, int nreduce, int PE_start, int logPE_stride, int PE_size, void * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_complexf_min_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexf_min_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_complexf_min_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_complexf_min_to_all wrapper function ******************************************************/ void shmem_complexf_min_to_all__( void * target, void * source, int nreduce, int PE_start, int logPE_stride, int PE_size, void * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_complexf_min_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexf_min_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_complexf_min_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_complexd_min_to_all wrapper function ******************************************************/ void shmem_complexd_min_to_all( void * target, void * source, int nreduce, int PE_start, int logPE_stride, int PE_size, void * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_complexd_min_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexd_min_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_complexd_min_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_complexd_min_to_all wrapper function ******************************************************/ void SHMEM_COMPLEXD_MIN_TO_ALL( void * target, void * source, int nreduce, int PE_start, int logPE_stride, int PE_size, void * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_complexd_min_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexd_min_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_complexd_min_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_complexd_min_to_all wrapper function ******************************************************/ void shmem_complexd_min_to_all_( void * target, void * source, int nreduce, int PE_start, int logPE_stride, int PE_size, void * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_complexd_min_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexd_min_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_complexd_min_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_complexd_min_to_all wrapper function ******************************************************/ void shmem_complexd_min_to_all__( void * target, void * source, int nreduce, int PE_start, int logPE_stride, int PE_size, void * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_complexd_min_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexd_min_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_complexd_min_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_short_max_to_all wrapper function ******************************************************/ void shmem_short_max_to_all( short * target, short * source, int nreduce, int PE_start, int logPE_stride, int PE_size, short * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_short_max_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_max_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_short_max_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_max_to_all wrapper function ******************************************************/ void SHMEM_SHORT_MAX_TO_ALL( short * target, short * source, int nreduce, int PE_start, int logPE_stride, int PE_size, short * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_short_max_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_max_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_short_max_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_max_to_all wrapper function ******************************************************/ void shmem_short_max_to_all_( short * target, short * source, int nreduce, int PE_start, int logPE_stride, int PE_size, short * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_short_max_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_max_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_short_max_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_max_to_all wrapper function ******************************************************/ void shmem_short_max_to_all__( short * target, short * source, int nreduce, int PE_start, int logPE_stride, int PE_size, short * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_short_max_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_max_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_short_max_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_int_max_to_all wrapper function ******************************************************/ void shmem_int_max_to_all( int * target, int * source, int nreduce, int PE_start, int logPE_stride, int PE_size, int * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_int_max_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_max_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_int_max_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_max_to_all wrapper function ******************************************************/ void SHMEM_INT_MAX_TO_ALL( int * target, int * source, int nreduce, int PE_start, int logPE_stride, int PE_size, int * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_int_max_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_max_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_int_max_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_max_to_all wrapper function ******************************************************/ void shmem_int_max_to_all_( int * target, int * source, int nreduce, int PE_start, int logPE_stride, int PE_size, int * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_int_max_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_max_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_int_max_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_max_to_all wrapper function ******************************************************/ void shmem_int_max_to_all__( int * target, int * source, int nreduce, int PE_start, int logPE_stride, int PE_size, int * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_int_max_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_max_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_int_max_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_long_max_to_all wrapper function ******************************************************/ void shmem_long_max_to_all( long * target, long * source, int nreduce, int PE_start, int logPE_stride, int PE_size, long * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_long_max_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_max_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_long_max_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_max_to_all wrapper function ******************************************************/ void SHMEM_LONG_MAX_TO_ALL( long * target, long * source, int nreduce, int PE_start, int logPE_stride, int PE_size, long * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_long_max_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_max_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_long_max_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_max_to_all wrapper function ******************************************************/ void shmem_long_max_to_all_( long * target, long * source, int nreduce, int PE_start, int logPE_stride, int PE_size, long * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_long_max_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_max_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_long_max_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_max_to_all wrapper function ******************************************************/ void shmem_long_max_to_all__( long * target, long * source, int nreduce, int PE_start, int logPE_stride, int PE_size, long * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_long_max_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_max_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_long_max_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_longlong_max_to_all wrapper function ******************************************************/ void shmem_longlong_max_to_all( long long * target, long long * source, int nreduce, int PE_start, int logPE_stride, int PE_size, long long * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_longlong_max_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_max_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_max_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_max_to_all wrapper function ******************************************************/ void SHMEM_LONGLONG_MAX_TO_ALL( long long * target, long long * source, int nreduce, int PE_start, int logPE_stride, int PE_size, long long * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_longlong_max_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_max_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_max_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_max_to_all wrapper function ******************************************************/ void shmem_longlong_max_to_all_( long long * target, long long * source, int nreduce, int PE_start, int logPE_stride, int PE_size, long long * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_longlong_max_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_max_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_max_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_max_to_all wrapper function ******************************************************/ void shmem_longlong_max_to_all__( long long * target, long long * source, int nreduce, int PE_start, int logPE_stride, int PE_size, long long * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_longlong_max_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_max_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_max_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_float_max_to_all wrapper function ******************************************************/ void shmem_float_max_to_all( float * target, float * source, int nreduce, int PE_start, int logPE_stride, int PE_size, float * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_float_max_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_float_max_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_float_max_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_float_max_to_all wrapper function ******************************************************/ void SHMEM_FLOAT_MAX_TO_ALL( float * target, float * source, int nreduce, int PE_start, int logPE_stride, int PE_size, float * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_float_max_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_float_max_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_float_max_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_float_max_to_all wrapper function ******************************************************/ void shmem_float_max_to_all_( float * target, float * source, int nreduce, int PE_start, int logPE_stride, int PE_size, float * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_float_max_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_float_max_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_float_max_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_float_max_to_all wrapper function ******************************************************/ void shmem_float_max_to_all__( float * target, float * source, int nreduce, int PE_start, int logPE_stride, int PE_size, float * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_float_max_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_float_max_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_float_max_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_double_max_to_all wrapper function ******************************************************/ void shmem_double_max_to_all( double * target, double * source, int nreduce, int PE_start, int logPE_stride, int PE_size, double * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_double_max_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_double_max_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_double_max_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_double_max_to_all wrapper function ******************************************************/ void SHMEM_DOUBLE_MAX_TO_ALL( double * target, double * source, int nreduce, int PE_start, int logPE_stride, int PE_size, double * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_double_max_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_double_max_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_double_max_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_double_max_to_all wrapper function ******************************************************/ void shmem_double_max_to_all_( double * target, double * source, int nreduce, int PE_start, int logPE_stride, int PE_size, double * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_double_max_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_double_max_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_double_max_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_double_max_to_all wrapper function ******************************************************/ void shmem_double_max_to_all__( double * target, double * source, int nreduce, int PE_start, int logPE_stride, int PE_size, double * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_double_max_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_double_max_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_double_max_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_longdouble_max_to_all wrapper function ******************************************************/ void shmem_longdouble_max_to_all( long double * target, long double * source, int nreduce, int PE_start, int logPE_stride, int PE_size, long double * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_longdouble_max_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longdouble_max_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_longdouble_max_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longdouble_max_to_all wrapper function ******************************************************/ void SHMEM_LONGDOUBLE_MAX_TO_ALL( long double * target, long double * source, int nreduce, int PE_start, int logPE_stride, int PE_size, long double * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_longdouble_max_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longdouble_max_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_longdouble_max_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longdouble_max_to_all wrapper function ******************************************************/ void shmem_longdouble_max_to_all_( long double * target, long double * source, int nreduce, int PE_start, int logPE_stride, int PE_size, long double * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_longdouble_max_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longdouble_max_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_longdouble_max_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longdouble_max_to_all wrapper function ******************************************************/ void shmem_longdouble_max_to_all__( long double * target, long double * source, int nreduce, int PE_start, int logPE_stride, int PE_size, long double * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_longdouble_max_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longdouble_max_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_longdouble_max_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_complexf_max_to_all wrapper function ******************************************************/ void shmem_complexf_max_to_all( void * target, void * source, int nreduce, int PE_start, int logPE_stride, int PE_size, void * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_complexf_max_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexf_max_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_complexf_max_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_complexf_max_to_all wrapper function ******************************************************/ void SHMEM_COMPLEXF_MAX_TO_ALL( void * target, void * source, int nreduce, int PE_start, int logPE_stride, int PE_size, void * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_complexf_max_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexf_max_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_complexf_max_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_complexf_max_to_all wrapper function ******************************************************/ void shmem_complexf_max_to_all_( void * target, void * source, int nreduce, int PE_start, int logPE_stride, int PE_size, void * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_complexf_max_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexf_max_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_complexf_max_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_complexf_max_to_all wrapper function ******************************************************/ void shmem_complexf_max_to_all__( void * target, void * source, int nreduce, int PE_start, int logPE_stride, int PE_size, void * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_complexf_max_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexf_max_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_complexf_max_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_complexd_max_to_all wrapper function ******************************************************/ void shmem_complexd_max_to_all( void * target, void * source, int nreduce, int PE_start, int logPE_stride, int PE_size, void * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_complexd_max_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexd_max_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_complexd_max_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_complexd_max_to_all wrapper function ******************************************************/ void SHMEM_COMPLEXD_MAX_TO_ALL( void * target, void * source, int nreduce, int PE_start, int logPE_stride, int PE_size, void * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_complexd_max_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexd_max_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_complexd_max_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_complexd_max_to_all wrapper function ******************************************************/ void shmem_complexd_max_to_all_( void * target, void * source, int nreduce, int PE_start, int logPE_stride, int PE_size, void * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_complexd_max_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexd_max_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_complexd_max_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_complexd_max_to_all wrapper function ******************************************************/ void shmem_complexd_max_to_all__( void * target, void * source, int nreduce, int PE_start, int logPE_stride, int PE_size, void * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_complexd_max_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexd_max_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_complexd_max_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_short_prod_to_all wrapper function ******************************************************/ void shmem_short_prod_to_all( short * target, short * source, int nreduce, int PE_start, int logPE_stride, int PE_size, short * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_short_prod_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_prod_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_short_prod_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_prod_to_all wrapper function ******************************************************/ void SHMEM_SHORT_PROD_TO_ALL( short * target, short * source, int nreduce, int PE_start, int logPE_stride, int PE_size, short * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_short_prod_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_prod_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_short_prod_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_prod_to_all wrapper function ******************************************************/ void shmem_short_prod_to_all_( short * target, short * source, int nreduce, int PE_start, int logPE_stride, int PE_size, short * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_short_prod_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_prod_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_short_prod_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_prod_to_all wrapper function ******************************************************/ void shmem_short_prod_to_all__( short * target, short * source, int nreduce, int PE_start, int logPE_stride, int PE_size, short * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_short_prod_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_prod_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_short_prod_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_int_prod_to_all wrapper function ******************************************************/ void shmem_int_prod_to_all( int * target, int * source, int nreduce, int PE_start, int logPE_stride, int PE_size, int * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_int_prod_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_prod_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_int_prod_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_prod_to_all wrapper function ******************************************************/ void SHMEM_INT_PROD_TO_ALL( int * target, int * source, int nreduce, int PE_start, int logPE_stride, int PE_size, int * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_int_prod_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_prod_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_int_prod_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_prod_to_all wrapper function ******************************************************/ void shmem_int_prod_to_all_( int * target, int * source, int nreduce, int PE_start, int logPE_stride, int PE_size, int * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_int_prod_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_prod_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_int_prod_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_prod_to_all wrapper function ******************************************************/ void shmem_int_prod_to_all__( int * target, int * source, int nreduce, int PE_start, int logPE_stride, int PE_size, int * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_int_prod_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_prod_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_int_prod_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_long_prod_to_all wrapper function ******************************************************/ void shmem_long_prod_to_all( long * target, long * source, int nreduce, int PE_start, int logPE_stride, int PE_size, long * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_long_prod_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_prod_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_long_prod_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_prod_to_all wrapper function ******************************************************/ void SHMEM_LONG_PROD_TO_ALL( long * target, long * source, int nreduce, int PE_start, int logPE_stride, int PE_size, long * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_long_prod_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_prod_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_long_prod_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_prod_to_all wrapper function ******************************************************/ void shmem_long_prod_to_all_( long * target, long * source, int nreduce, int PE_start, int logPE_stride, int PE_size, long * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_long_prod_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_prod_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_long_prod_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_prod_to_all wrapper function ******************************************************/ void shmem_long_prod_to_all__( long * target, long * source, int nreduce, int PE_start, int logPE_stride, int PE_size, long * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_long_prod_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_prod_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_long_prod_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_longlong_prod_to_all wrapper function ******************************************************/ void shmem_longlong_prod_to_all( long long * target, long long * source, int nreduce, int PE_start, int logPE_stride, int PE_size, long long * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_longlong_prod_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_prod_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_prod_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_prod_to_all wrapper function ******************************************************/ void SHMEM_LONGLONG_PROD_TO_ALL( long long * target, long long * source, int nreduce, int PE_start, int logPE_stride, int PE_size, long long * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_longlong_prod_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_prod_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_prod_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_prod_to_all wrapper function ******************************************************/ void shmem_longlong_prod_to_all_( long long * target, long long * source, int nreduce, int PE_start, int logPE_stride, int PE_size, long long * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_longlong_prod_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_prod_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_prod_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_prod_to_all wrapper function ******************************************************/ void shmem_longlong_prod_to_all__( long long * target, long long * source, int nreduce, int PE_start, int logPE_stride, int PE_size, long long * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_longlong_prod_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_prod_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_prod_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_float_prod_to_all wrapper function ******************************************************/ void shmem_float_prod_to_all( float * target, float * source, int nreduce, int PE_start, int logPE_stride, int PE_size, float * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_float_prod_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_float_prod_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_float_prod_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_float_prod_to_all wrapper function ******************************************************/ void SHMEM_FLOAT_PROD_TO_ALL( float * target, float * source, int nreduce, int PE_start, int logPE_stride, int PE_size, float * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_float_prod_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_float_prod_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_float_prod_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_float_prod_to_all wrapper function ******************************************************/ void shmem_float_prod_to_all_( float * target, float * source, int nreduce, int PE_start, int logPE_stride, int PE_size, float * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_float_prod_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_float_prod_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_float_prod_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_float_prod_to_all wrapper function ******************************************************/ void shmem_float_prod_to_all__( float * target, float * source, int nreduce, int PE_start, int logPE_stride, int PE_size, float * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_float_prod_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_float_prod_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_float_prod_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_double_prod_to_all wrapper function ******************************************************/ void shmem_double_prod_to_all( double * target, double * source, int nreduce, int PE_start, int logPE_stride, int PE_size, double * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_double_prod_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_double_prod_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_double_prod_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_double_prod_to_all wrapper function ******************************************************/ void SHMEM_DOUBLE_PROD_TO_ALL( double * target, double * source, int nreduce, int PE_start, int logPE_stride, int PE_size, double * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_double_prod_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_double_prod_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_double_prod_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_double_prod_to_all wrapper function ******************************************************/ void shmem_double_prod_to_all_( double * target, double * source, int nreduce, int PE_start, int logPE_stride, int PE_size, double * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_double_prod_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_double_prod_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_double_prod_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_double_prod_to_all wrapper function ******************************************************/ void shmem_double_prod_to_all__( double * target, double * source, int nreduce, int PE_start, int logPE_stride, int PE_size, double * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_double_prod_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_double_prod_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_double_prod_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_longdouble_prod_to_all wrapper function ******************************************************/ void shmem_longdouble_prod_to_all( long double * target, long double * source, int nreduce, int PE_start, int logPE_stride, int PE_size, long double * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_longdouble_prod_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longdouble_prod_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_longdouble_prod_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longdouble_prod_to_all wrapper function ******************************************************/ void SHMEM_LONGDOUBLE_PROD_TO_ALL( long double * target, long double * source, int nreduce, int PE_start, int logPE_stride, int PE_size, long double * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_longdouble_prod_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longdouble_prod_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_longdouble_prod_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longdouble_prod_to_all wrapper function ******************************************************/ void shmem_longdouble_prod_to_all_( long double * target, long double * source, int nreduce, int PE_start, int logPE_stride, int PE_size, long double * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_longdouble_prod_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longdouble_prod_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_longdouble_prod_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longdouble_prod_to_all wrapper function ******************************************************/ void shmem_longdouble_prod_to_all__( long double * target, long double * source, int nreduce, int PE_start, int logPE_stride, int PE_size, long double * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_longdouble_prod_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longdouble_prod_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_longdouble_prod_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_complexf_prod_to_all wrapper function ******************************************************/ void shmem_complexf_prod_to_all( void * target, void * source, int nreduce, int PE_start, int logPE_stride, int PE_size, void * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_complexf_prod_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexf_prod_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_complexf_prod_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_complexf_prod_to_all wrapper function ******************************************************/ void SHMEM_COMPLEXF_PROD_TO_ALL( void * target, void * source, int nreduce, int PE_start, int logPE_stride, int PE_size, void * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_complexf_prod_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexf_prod_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_complexf_prod_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_complexf_prod_to_all wrapper function ******************************************************/ void shmem_complexf_prod_to_all_( void * target, void * source, int nreduce, int PE_start, int logPE_stride, int PE_size, void * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_complexf_prod_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexf_prod_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_complexf_prod_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_complexf_prod_to_all wrapper function ******************************************************/ void shmem_complexf_prod_to_all__( void * target, void * source, int nreduce, int PE_start, int logPE_stride, int PE_size, void * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_complexf_prod_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexf_prod_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_complexf_prod_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_complexd_prod_to_all wrapper function ******************************************************/ void shmem_complexd_prod_to_all( void * target, void * source, int nreduce, int PE_start, int logPE_stride, int PE_size, void * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_complexd_prod_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexd_prod_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_complexd_prod_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_complexd_prod_to_all wrapper function ******************************************************/ void SHMEM_COMPLEXD_PROD_TO_ALL( void * target, void * source, int nreduce, int PE_start, int logPE_stride, int PE_size, void * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_complexd_prod_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexd_prod_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_complexd_prod_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_complexd_prod_to_all wrapper function ******************************************************/ void shmem_complexd_prod_to_all_( void * target, void * source, int nreduce, int PE_start, int logPE_stride, int PE_size, void * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_complexd_prod_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexd_prod_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_complexd_prod_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_complexd_prod_to_all wrapper function ******************************************************/ void shmem_complexd_prod_to_all__( void * target, void * source, int nreduce, int PE_start, int logPE_stride, int PE_size, void * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_complexd_prod_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexd_prod_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_complexd_prod_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_short_sum_to_all wrapper function ******************************************************/ void shmem_short_sum_to_all( short * target, short * source, int nreduce, int PE_start, int logPE_stride, int PE_size, short * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_short_sum_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_sum_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_short_sum_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_sum_to_all wrapper function ******************************************************/ void SHMEM_SHORT_SUM_TO_ALL( short * target, short * source, int nreduce, int PE_start, int logPE_stride, int PE_size, short * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_short_sum_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_sum_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_short_sum_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_sum_to_all wrapper function ******************************************************/ void shmem_short_sum_to_all_( short * target, short * source, int nreduce, int PE_start, int logPE_stride, int PE_size, short * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_short_sum_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_sum_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_short_sum_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_sum_to_all wrapper function ******************************************************/ void shmem_short_sum_to_all__( short * target, short * source, int nreduce, int PE_start, int logPE_stride, int PE_size, short * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_short_sum_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_sum_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_short_sum_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_int_sum_to_all wrapper function ******************************************************/ void shmem_int_sum_to_all( int * target, int * source, int nreduce, int PE_start, int logPE_stride, int PE_size, int * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_int_sum_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_sum_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_int_sum_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_sum_to_all wrapper function ******************************************************/ void SHMEM_INT_SUM_TO_ALL( int * target, int * source, int nreduce, int PE_start, int logPE_stride, int PE_size, int * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_int_sum_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_sum_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_int_sum_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_sum_to_all wrapper function ******************************************************/ void shmem_int_sum_to_all_( int * target, int * source, int nreduce, int PE_start, int logPE_stride, int PE_size, int * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_int_sum_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_sum_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_int_sum_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_sum_to_all wrapper function ******************************************************/ void shmem_int_sum_to_all__( int * target, int * source, int nreduce, int PE_start, int logPE_stride, int PE_size, int * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_int_sum_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_sum_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_int_sum_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_long_sum_to_all wrapper function ******************************************************/ void shmem_long_sum_to_all( long * target, long * source, int nreduce, int PE_start, int logPE_stride, int PE_size, long * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_long_sum_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_sum_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_long_sum_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_sum_to_all wrapper function ******************************************************/ void SHMEM_LONG_SUM_TO_ALL( long * target, long * source, int nreduce, int PE_start, int logPE_stride, int PE_size, long * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_long_sum_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_sum_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_long_sum_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_sum_to_all wrapper function ******************************************************/ void shmem_long_sum_to_all_( long * target, long * source, int nreduce, int PE_start, int logPE_stride, int PE_size, long * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_long_sum_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_sum_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_long_sum_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_sum_to_all wrapper function ******************************************************/ void shmem_long_sum_to_all__( long * target, long * source, int nreduce, int PE_start, int logPE_stride, int PE_size, long * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_long_sum_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_sum_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_long_sum_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_longlong_sum_to_all wrapper function ******************************************************/ void shmem_longlong_sum_to_all( long long * target, long long * source, int nreduce, int PE_start, int logPE_stride, int PE_size, long long * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_longlong_sum_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_sum_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_sum_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_sum_to_all wrapper function ******************************************************/ void SHMEM_LONGLONG_SUM_TO_ALL( long long * target, long long * source, int nreduce, int PE_start, int logPE_stride, int PE_size, long long * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_longlong_sum_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_sum_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_sum_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_sum_to_all wrapper function ******************************************************/ void shmem_longlong_sum_to_all_( long long * target, long long * source, int nreduce, int PE_start, int logPE_stride, int PE_size, long long * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_longlong_sum_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_sum_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_sum_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_sum_to_all wrapper function ******************************************************/ void shmem_longlong_sum_to_all__( long long * target, long long * source, int nreduce, int PE_start, int logPE_stride, int PE_size, long long * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_longlong_sum_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_sum_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_sum_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_float_sum_to_all wrapper function ******************************************************/ void shmem_float_sum_to_all( float * target, float * source, int nreduce, int PE_start, int logPE_stride, int PE_size, float * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_float_sum_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_float_sum_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_float_sum_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_float_sum_to_all wrapper function ******************************************************/ void SHMEM_FLOAT_SUM_TO_ALL( float * target, float * source, int nreduce, int PE_start, int logPE_stride, int PE_size, float * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_float_sum_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_float_sum_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_float_sum_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_float_sum_to_all wrapper function ******************************************************/ void shmem_float_sum_to_all_( float * target, float * source, int nreduce, int PE_start, int logPE_stride, int PE_size, float * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_float_sum_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_float_sum_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_float_sum_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_float_sum_to_all wrapper function ******************************************************/ void shmem_float_sum_to_all__( float * target, float * source, int nreduce, int PE_start, int logPE_stride, int PE_size, float * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_float_sum_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_float_sum_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_float_sum_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_double_sum_to_all wrapper function ******************************************************/ void shmem_double_sum_to_all( double * target, double * source, int nreduce, int PE_start, int logPE_stride, int PE_size, double * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_double_sum_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_double_sum_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_double_sum_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_double_sum_to_all wrapper function ******************************************************/ void SHMEM_DOUBLE_SUM_TO_ALL( double * target, double * source, int nreduce, int PE_start, int logPE_stride, int PE_size, double * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_double_sum_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_double_sum_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_double_sum_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_double_sum_to_all wrapper function ******************************************************/ void shmem_double_sum_to_all_( double * target, double * source, int nreduce, int PE_start, int logPE_stride, int PE_size, double * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_double_sum_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_double_sum_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_double_sum_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_double_sum_to_all wrapper function ******************************************************/ void shmem_double_sum_to_all__( double * target, double * source, int nreduce, int PE_start, int logPE_stride, int PE_size, double * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_double_sum_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_double_sum_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_double_sum_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_longdouble_sum_to_all wrapper function ******************************************************/ void shmem_longdouble_sum_to_all( long double * target, long double * source, int nreduce, int PE_start, int logPE_stride, int PE_size, long double * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_longdouble_sum_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longdouble_sum_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_longdouble_sum_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longdouble_sum_to_all wrapper function ******************************************************/ void SHMEM_LONGDOUBLE_SUM_TO_ALL( long double * target, long double * source, int nreduce, int PE_start, int logPE_stride, int PE_size, long double * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_longdouble_sum_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longdouble_sum_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_longdouble_sum_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longdouble_sum_to_all wrapper function ******************************************************/ void shmem_longdouble_sum_to_all_( long double * target, long double * source, int nreduce, int PE_start, int logPE_stride, int PE_size, long double * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_longdouble_sum_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longdouble_sum_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_longdouble_sum_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longdouble_sum_to_all wrapper function ******************************************************/ void shmem_longdouble_sum_to_all__( long double * target, long double * source, int nreduce, int PE_start, int logPE_stride, int PE_size, long double * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_longdouble_sum_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longdouble_sum_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_longdouble_sum_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_complexf_sum_to_all wrapper function ******************************************************/ void shmem_complexf_sum_to_all( void * target, void * source, int nreduce, int PE_start, int logPE_stride, int PE_size, void * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_complexf_sum_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexf_sum_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_complexf_sum_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_complexf_sum_to_all wrapper function ******************************************************/ void SHMEM_COMPLEXF_SUM_TO_ALL( void * target, void * source, int nreduce, int PE_start, int logPE_stride, int PE_size, void * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_complexf_sum_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexf_sum_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_complexf_sum_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_complexf_sum_to_all wrapper function ******************************************************/ void shmem_complexf_sum_to_all_( void * target, void * source, int nreduce, int PE_start, int logPE_stride, int PE_size, void * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_complexf_sum_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexf_sum_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_complexf_sum_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_complexf_sum_to_all wrapper function ******************************************************/ void shmem_complexf_sum_to_all__( void * target, void * source, int nreduce, int PE_start, int logPE_stride, int PE_size, void * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_complexf_sum_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexf_sum_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_complexf_sum_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_complexd_sum_to_all wrapper function ******************************************************/ void shmem_complexd_sum_to_all( void * target, void * source, int nreduce, int PE_start, int logPE_stride, int PE_size, void * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_complexd_sum_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexd_sum_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_complexd_sum_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_complexd_sum_to_all wrapper function ******************************************************/ void SHMEM_COMPLEXD_SUM_TO_ALL( void * target, void * source, int nreduce, int PE_start, int logPE_stride, int PE_size, void * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_complexd_sum_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexd_sum_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_complexd_sum_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_complexd_sum_to_all wrapper function ******************************************************/ void shmem_complexd_sum_to_all_( void * target, void * source, int nreduce, int PE_start, int logPE_stride, int PE_size, void * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_complexd_sum_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexd_sum_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_complexd_sum_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_complexd_sum_to_all wrapper function ******************************************************/ void shmem_complexd_sum_to_all__( void * target, void * source, int nreduce, int PE_start, int logPE_stride, int PE_size, void * pWrk, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_complexd_sum_to_all()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexd_sum_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_complexd_sum_to_all( target, source, nreduce, PE_start, logPE_stride, PE_size, pWrk, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_short_alltoall wrapper function ******************************************************/ void shmem_short_alltoall( short * target, short * source, int nlong, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_short_alltoall()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_alltoall( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_short_alltoall( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_alltoall wrapper function ******************************************************/ void SHMEM_SHORT_ALLTOALL( short * target, short * source, int nlong, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_short_alltoall()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_alltoall( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_short_alltoall( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_alltoall wrapper function ******************************************************/ void shmem_short_alltoall_( short * target, short * source, int nlong, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_short_alltoall()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_alltoall( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_short_alltoall( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_alltoall wrapper function ******************************************************/ void shmem_short_alltoall__( short * target, short * source, int nlong, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_short_alltoall()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_alltoall( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_short_alltoall( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_int_alltoall wrapper function ******************************************************/ void shmem_int_alltoall( int * target, int * source, int nlong, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_int_alltoall()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_alltoall( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_int_alltoall( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_alltoall wrapper function ******************************************************/ void SHMEM_INT_ALLTOALL( int * target, int * source, int nlong, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_int_alltoall()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_alltoall( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_int_alltoall( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_alltoall wrapper function ******************************************************/ void shmem_int_alltoall_( int * target, int * source, int nlong, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_int_alltoall()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_alltoall( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_int_alltoall( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_alltoall wrapper function ******************************************************/ void shmem_int_alltoall__( int * target, int * source, int nlong, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_int_alltoall()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_alltoall( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_int_alltoall( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_long_alltoall wrapper function ******************************************************/ void shmem_long_alltoall( long * target, long * source, int nlong, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_long_alltoall()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_alltoall( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_long_alltoall( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_alltoall wrapper function ******************************************************/ void SHMEM_LONG_ALLTOALL( long * target, long * source, int nlong, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_long_alltoall()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_alltoall( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_long_alltoall( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_alltoall wrapper function ******************************************************/ void shmem_long_alltoall_( long * target, long * source, int nlong, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_long_alltoall()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_alltoall( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_long_alltoall( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_alltoall wrapper function ******************************************************/ void shmem_long_alltoall__( long * target, long * source, int nlong, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_long_alltoall()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_alltoall( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_long_alltoall( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_longlong_alltoall wrapper function ******************************************************/ void shmem_longlong_alltoall( long long * target, long long * source, int nlong, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_longlong_alltoall()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_alltoall( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_alltoall( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_alltoall wrapper function ******************************************************/ void SHMEM_LONGLONG_ALLTOALL( long long * target, long long * source, int nlong, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_longlong_alltoall()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_alltoall( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_alltoall( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_alltoall wrapper function ******************************************************/ void shmem_longlong_alltoall_( long long * target, long long * source, int nlong, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_longlong_alltoall()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_alltoall( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_alltoall( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_alltoall wrapper function ******************************************************/ void shmem_longlong_alltoall__( long long * target, long long * source, int nlong, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_longlong_alltoall()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_alltoall( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_alltoall( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_float_alltoall wrapper function ******************************************************/ void shmem_float_alltoall( float * target, float * source, int nlong, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_float_alltoall()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_float_alltoall( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_float_alltoall( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_float_alltoall wrapper function ******************************************************/ void SHMEM_FLOAT_ALLTOALL( float * target, float * source, int nlong, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_float_alltoall()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_float_alltoall( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_float_alltoall( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_float_alltoall wrapper function ******************************************************/ void shmem_float_alltoall_( float * target, float * source, int nlong, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_float_alltoall()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_float_alltoall( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_float_alltoall( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_float_alltoall wrapper function ******************************************************/ void shmem_float_alltoall__( float * target, float * source, int nlong, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_float_alltoall()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_float_alltoall( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_float_alltoall( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_double_alltoall wrapper function ******************************************************/ void shmem_double_alltoall( double * target, double * source, int nlong, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_double_alltoall()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_double_alltoall( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_double_alltoall( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_double_alltoall wrapper function ******************************************************/ void SHMEM_DOUBLE_ALLTOALL( double * target, double * source, int nlong, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_double_alltoall()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_double_alltoall( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_double_alltoall( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_double_alltoall wrapper function ******************************************************/ void shmem_double_alltoall_( double * target, double * source, int nlong, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_double_alltoall()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_double_alltoall( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_double_alltoall( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_double_alltoall wrapper function ******************************************************/ void shmem_double_alltoall__( double * target, double * source, int nlong, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_double_alltoall()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_double_alltoall( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_double_alltoall( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_longdouble_alltoall wrapper function ******************************************************/ void shmem_longdouble_alltoall( long double * target, long double * source, int nlong, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_longdouble_alltoall()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longdouble_alltoall( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_longdouble_alltoall( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longdouble_alltoall wrapper function ******************************************************/ void SHMEM_LONGDOUBLE_ALLTOALL( long double * target, long double * source, int nlong, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_longdouble_alltoall()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longdouble_alltoall( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_longdouble_alltoall( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longdouble_alltoall wrapper function ******************************************************/ void shmem_longdouble_alltoall_( long double * target, long double * source, int nlong, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_longdouble_alltoall()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longdouble_alltoall( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_longdouble_alltoall( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longdouble_alltoall wrapper function ******************************************************/ void shmem_longdouble_alltoall__( long double * target, long double * source, int nlong, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_longdouble_alltoall()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longdouble_alltoall( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_longdouble_alltoall( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_complexf_alltoall wrapper function ******************************************************/ void shmem_complexf_alltoall( void * target, void * source, int nlong, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_complexf_alltoall()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexf_alltoall( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_complexf_alltoall( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_complexf_alltoall wrapper function ******************************************************/ void SHMEM_COMPLEXF_ALLTOALL( void * target, void * source, int nlong, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_complexf_alltoall()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexf_alltoall( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_complexf_alltoall( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_complexf_alltoall wrapper function ******************************************************/ void shmem_complexf_alltoall_( void * target, void * source, int nlong, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_complexf_alltoall()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexf_alltoall( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_complexf_alltoall( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_complexf_alltoall wrapper function ******************************************************/ void shmem_complexf_alltoall__( void * target, void * source, int nlong, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_complexf_alltoall()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexf_alltoall( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_complexf_alltoall( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_complexd_alltoall wrapper function ******************************************************/ void shmem_complexd_alltoall( void * target, void * source, int nlong, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_complexd_alltoall()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexd_alltoall( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_complexd_alltoall( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_complexd_alltoall wrapper function ******************************************************/ void SHMEM_COMPLEXD_ALLTOALL( void * target, void * source, int nlong, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_complexd_alltoall()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexd_alltoall( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_complexd_alltoall( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_complexd_alltoall wrapper function ******************************************************/ void shmem_complexd_alltoall_( void * target, void * source, int nlong, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_complexd_alltoall()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexd_alltoall( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_complexd_alltoall( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_complexd_alltoall wrapper function ******************************************************/ void shmem_complexd_alltoall__( void * target, void * source, int nlong, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_complexd_alltoall()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_complexd_alltoall( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_complexd_alltoall( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_alltoall wrapper function ******************************************************/ void shmem_alltoall( void * target, void * source, int nlong, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_alltoall()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_alltoall( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_alltoall( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_alltoall wrapper function ******************************************************/ void SHMEM_ALLTOALL( void * target, void * source, int nlong, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_alltoall()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_alltoall( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_alltoall( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_alltoall wrapper function ******************************************************/ void shmem_alltoall_( void * target, void * source, int nlong, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_alltoall()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_alltoall( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_alltoall( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_alltoall wrapper function ******************************************************/ void shmem_alltoall__( void * target, void * source, int nlong, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_alltoall()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_alltoall( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_alltoall( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_alltoall32 wrapper function ******************************************************/ void shmem_alltoall32( void * target, void * source, int nlong, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_alltoall32()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_alltoall32( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_alltoall32( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_alltoall32 wrapper function ******************************************************/ void SHMEM_ALLTOALL32( void * target, void * source, int nlong, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_alltoall32()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_alltoall32( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_alltoall32( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_alltoall32 wrapper function ******************************************************/ void shmem_alltoall32_( void * target, void * source, int nlong, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_alltoall32()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_alltoall32( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_alltoall32( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_alltoall32 wrapper function ******************************************************/ void shmem_alltoall32__( void * target, void * source, int nlong, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_alltoall32()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_alltoall32( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_alltoall32( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_alltoall64 wrapper function ******************************************************/ void shmem_alltoall64( void * target, void * source, int nlong, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_alltoall64()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_alltoall64( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_alltoall64( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_alltoall64 wrapper function ******************************************************/ void SHMEM_ALLTOALL64( void * target, void * source, int nlong, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_alltoall64()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_alltoall64( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_alltoall64( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_alltoall64 wrapper function ******************************************************/ void shmem_alltoall64_( void * target, void * source, int nlong, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_alltoall64()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_alltoall64( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_alltoall64( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_alltoall64 wrapper function ******************************************************/ void shmem_alltoall64__( void * target, void * source, int nlong, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_alltoall64()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_alltoall64( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_alltoall64( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_alltoall128 wrapper function ******************************************************/ void shmem_alltoall128( void * target, void * source, int nlong, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_alltoall128()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_alltoall128( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_alltoall128( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_alltoall128 wrapper function ******************************************************/ void SHMEM_ALLTOALL128( void * target, void * source, int nlong, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_alltoall128()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_alltoall128( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_alltoall128( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_alltoall128 wrapper function ******************************************************/ void shmem_alltoall128_( void * target, void * source, int nlong, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_alltoall128()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_alltoall128( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_alltoall128( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_alltoall128 wrapper function ******************************************************/ void shmem_alltoall128__( void * target, void * source, int nlong, int PE_start, int logPE_stride, int PE_size, long * pSync) { TAU_PROFILE_TIMER(t, "shmem_alltoall128()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_alltoall128( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #else /* !TAU_P_SHMEM */ pshmem_alltoall128( target, source, nlong, PE_start, logPE_stride, PE_size, pSync) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_short_cswap wrapper function ******************************************************/ short shmem_short_cswap( short * target, short * val, int pe) { short retvalue; TAU_PROFILE_TIMER(t, "shmem_short_cswap()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_short_cswap( target, val, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_short_cswap( target, val, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_short_cswap wrapper function ******************************************************/ short SHMEM_SHORT_CSWAP( short * target, short * val, int pe) { short retvalue; TAU_PROFILE_TIMER(t, "shmem_short_cswap()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_short_cswap( target, val, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_short_cswap( target, val, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_short_cswap wrapper function ******************************************************/ short shmem_short_cswap_( short * target, short * val, int pe) { short retvalue; TAU_PROFILE_TIMER(t, "shmem_short_cswap()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_short_cswap( target, val, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_short_cswap( target, val, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_short_cswap wrapper function ******************************************************/ short shmem_short_cswap__( short * target, short * val, int pe) { short retvalue; TAU_PROFILE_TIMER(t, "shmem_short_cswap()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_short_cswap( target, val, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_short_cswap( target, val, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_int_cswap wrapper function ******************************************************/ int shmem_int_cswap( int * target, int * val, int pe) { int retvalue; TAU_PROFILE_TIMER(t, "shmem_int_cswap()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_int_cswap( target, val, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_int_cswap( target, val, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_int_cswap wrapper function ******************************************************/ int SHMEM_INT_CSWAP( int * target, int * val, int pe) { int retvalue; TAU_PROFILE_TIMER(t, "shmem_int_cswap()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_int_cswap( target, val, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_int_cswap( target, val, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_int_cswap wrapper function ******************************************************/ int shmem_int_cswap_( int * target, int * val, int pe) { int retvalue; TAU_PROFILE_TIMER(t, "shmem_int_cswap()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_int_cswap( target, val, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_int_cswap( target, val, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_int_cswap wrapper function ******************************************************/ int shmem_int_cswap__( int * target, int * val, int pe) { int retvalue; TAU_PROFILE_TIMER(t, "shmem_int_cswap()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_int_cswap( target, val, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_int_cswap( target, val, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_long_cswap wrapper function ******************************************************/ long shmem_long_cswap( long * target, long * val, int pe) { long retvalue; TAU_PROFILE_TIMER(t, "shmem_long_cswap()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_long_cswap( target, val, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_long_cswap( target, val, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_long_cswap wrapper function ******************************************************/ long SHMEM_LONG_CSWAP( long * target, long * val, int pe) { long retvalue; TAU_PROFILE_TIMER(t, "shmem_long_cswap()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_long_cswap( target, val, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_long_cswap( target, val, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_long_cswap wrapper function ******************************************************/ long shmem_long_cswap_( long * target, long * val, int pe) { long retvalue; TAU_PROFILE_TIMER(t, "shmem_long_cswap()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_long_cswap( target, val, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_long_cswap( target, val, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_long_cswap wrapper function ******************************************************/ long shmem_long_cswap__( long * target, long * val, int pe) { long retvalue; TAU_PROFILE_TIMER(t, "shmem_long_cswap()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_long_cswap( target, val, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_long_cswap( target, val, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_longlong_cswap wrapper function ******************************************************/ long long shmem_longlong_cswap( long long * target, long long * val, int pe) { long long retvalue; TAU_PROFILE_TIMER(t, "shmem_longlong_cswap()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_longlong_cswap( target, val, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_longlong_cswap( target, val, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_longlong_cswap wrapper function ******************************************************/ long long SHMEM_LONGLONG_CSWAP( long long * target, long long * val, int pe) { long long retvalue; TAU_PROFILE_TIMER(t, "shmem_longlong_cswap()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_longlong_cswap( target, val, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_longlong_cswap( target, val, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_longlong_cswap wrapper function ******************************************************/ long long shmem_longlong_cswap_( long long * target, long long * val, int pe) { long long retvalue; TAU_PROFILE_TIMER(t, "shmem_longlong_cswap()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_longlong_cswap( target, val, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_longlong_cswap( target, val, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_longlong_cswap wrapper function ******************************************************/ long long shmem_longlong_cswap__( long long * target, long long * val, int pe) { long long retvalue; TAU_PROFILE_TIMER(t, "shmem_longlong_cswap()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_longlong_cswap( target, val, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_longlong_cswap( target, val, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_int_add wrapper function ******************************************************/ void shmem_int_add( int * target, int value, int pe) { TAU_PROFILE_TIMER(t, "shmem_int_add()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_add( target, value, pe) ; #else /* !TAU_P_SHMEM */ pshmem_int_add( target, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_add wrapper function ******************************************************/ void SHMEM_INT_ADD( int * target, int value, int pe) { TAU_PROFILE_TIMER(t, "shmem_int_add()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_add( target, value, pe) ; #else /* !TAU_P_SHMEM */ pshmem_int_add( target, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_add wrapper function ******************************************************/ void shmem_int_add_( int * target, int value, int pe) { TAU_PROFILE_TIMER(t, "shmem_int_add()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_add( target, value, pe) ; #else /* !TAU_P_SHMEM */ pshmem_int_add( target, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_add wrapper function ******************************************************/ void shmem_int_add__( int * target, int value, int pe) { TAU_PROFILE_TIMER(t, "shmem_int_add()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_add( target, value, pe) ; #else /* !TAU_P_SHMEM */ pshmem_int_add( target, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_short_fadd wrapper function ******************************************************/ short shmem_short_fadd( short * target, short value, int pe) { short retvalue; TAU_PROFILE_TIMER(t, "shmem_short_fadd()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_short_fadd( target, value, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_short_fadd( target, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_short_fadd wrapper function ******************************************************/ short SHMEM_SHORT_FADD( short * target, short value, int pe) { short retvalue; TAU_PROFILE_TIMER(t, "shmem_short_fadd()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_short_fadd( target, value, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_short_fadd( target, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_short_fadd wrapper function ******************************************************/ short shmem_short_fadd_( short * target, short value, int pe) { short retvalue; TAU_PROFILE_TIMER(t, "shmem_short_fadd()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_short_fadd( target, value, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_short_fadd( target, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_short_fadd wrapper function ******************************************************/ short shmem_short_fadd__( short * target, short value, int pe) { short retvalue; TAU_PROFILE_TIMER(t, "shmem_short_fadd()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_short_fadd( target, value, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_short_fadd( target, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_int_fadd wrapper function ******************************************************/ int shmem_int_fadd( int * target, int value, int pe) { int retvalue; TAU_PROFILE_TIMER(t, "shmem_int_fadd()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_int_fadd( target, value, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_int_fadd( target, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_int_fadd wrapper function ******************************************************/ int SHMEM_INT_FADD( int * target, int value, int pe) { int retvalue; TAU_PROFILE_TIMER(t, "shmem_int_fadd()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_int_fadd( target, value, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_int_fadd( target, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_int_fadd wrapper function ******************************************************/ int shmem_int_fadd_( int * target, int value, int pe) { int retvalue; TAU_PROFILE_TIMER(t, "shmem_int_fadd()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_int_fadd( target, value, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_int_fadd( target, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_int_fadd wrapper function ******************************************************/ int shmem_int_fadd__( int * target, int value, int pe) { int retvalue; TAU_PROFILE_TIMER(t, "shmem_int_fadd()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_int_fadd( target, value, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_int_fadd( target, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_long_fadd wrapper function ******************************************************/ long shmem_long_fadd( long * target, long value, int pe) { long retvalue; TAU_PROFILE_TIMER(t, "shmem_long_fadd()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_long_fadd( target, value, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_long_fadd( target, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_long_fadd wrapper function ******************************************************/ long SHMEM_LONG_FADD( long * target, long value, int pe) { long retvalue; TAU_PROFILE_TIMER(t, "shmem_long_fadd()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_long_fadd( target, value, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_long_fadd( target, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_long_fadd wrapper function ******************************************************/ long shmem_long_fadd_( long * target, long value, int pe) { long retvalue; TAU_PROFILE_TIMER(t, "shmem_long_fadd()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_long_fadd( target, value, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_long_fadd( target, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_long_fadd wrapper function ******************************************************/ long shmem_long_fadd__( long * target, long value, int pe) { long retvalue; TAU_PROFILE_TIMER(t, "shmem_long_fadd()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_long_fadd( target, value, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_long_fadd( target, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_longlong_fadd wrapper function ******************************************************/ long long shmem_longlong_fadd( long long * target, long long value, int pe) { long long retvalue; TAU_PROFILE_TIMER(t, "shmem_longlong_fadd()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_longlong_fadd( target, value, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_longlong_fadd( target, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_longlong_fadd wrapper function ******************************************************/ long long SHMEM_LONGLONG_FADD( long long * target, long long value, int pe) { long long retvalue; TAU_PROFILE_TIMER(t, "shmem_longlong_fadd()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_longlong_fadd( target, value, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_longlong_fadd( target, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_longlong_fadd wrapper function ******************************************************/ long long shmem_longlong_fadd_( long long * target, long long value, int pe) { long long retvalue; TAU_PROFILE_TIMER(t, "shmem_longlong_fadd()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_longlong_fadd( target, value, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_longlong_fadd( target, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_longlong_fadd wrapper function ******************************************************/ long long shmem_longlong_fadd__( long long * target, long long value, int pe) { long long retvalue; TAU_PROFILE_TIMER(t, "shmem_longlong_fadd()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_longlong_fadd( target, value, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_longlong_fadd( target, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_short_inc wrapper function ******************************************************/ void shmem_short_inc( short * target, int pe) { TAU_PROFILE_TIMER(t, "shmem_short_inc()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_inc( target, pe) ; #else /* !TAU_P_SHMEM */ pshmem_short_inc( target, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_inc wrapper function ******************************************************/ void SHMEM_SHORT_INC( short * target, int pe) { TAU_PROFILE_TIMER(t, "shmem_short_inc()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_inc( target, pe) ; #else /* !TAU_P_SHMEM */ pshmem_short_inc( target, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_inc wrapper function ******************************************************/ void shmem_short_inc_( short * target, int pe) { TAU_PROFILE_TIMER(t, "shmem_short_inc()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_inc( target, pe) ; #else /* !TAU_P_SHMEM */ pshmem_short_inc( target, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_inc wrapper function ******************************************************/ void shmem_short_inc__( short * target, int pe) { TAU_PROFILE_TIMER(t, "shmem_short_inc()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_inc( target, pe) ; #else /* !TAU_P_SHMEM */ pshmem_short_inc( target, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_int_inc wrapper function ******************************************************/ void shmem_int_inc( int * target, int pe) { TAU_PROFILE_TIMER(t, "shmem_int_inc()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_inc( target, pe) ; #else /* !TAU_P_SHMEM */ pshmem_int_inc( target, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_inc wrapper function ******************************************************/ void SHMEM_INT_INC( int * target, int pe) { TAU_PROFILE_TIMER(t, "shmem_int_inc()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_inc( target, pe) ; #else /* !TAU_P_SHMEM */ pshmem_int_inc( target, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_inc wrapper function ******************************************************/ void shmem_int_inc_( int * target, int pe) { TAU_PROFILE_TIMER(t, "shmem_int_inc()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_inc( target, pe) ; #else /* !TAU_P_SHMEM */ pshmem_int_inc( target, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_inc wrapper function ******************************************************/ void shmem_int_inc__( int * target, int pe) { TAU_PROFILE_TIMER(t, "shmem_int_inc()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_inc( target, pe) ; #else /* !TAU_P_SHMEM */ pshmem_int_inc( target, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_swap wrapper function ******************************************************/ int shmem_swap( int * target, int value, int pe) { int retvalue; TAU_PROFILE_TIMER(t, "shmem_swap()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_swap( target, value, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_swap( target, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_swap wrapper function ******************************************************/ int SHMEM_SWAP( int * target, int value, int pe) { int retvalue; TAU_PROFILE_TIMER(t, "shmem_swap()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_swap( target, value, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_swap( target, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_swap wrapper function ******************************************************/ int shmem_swap_( int * target, int value, int pe) { int retvalue; TAU_PROFILE_TIMER(t, "shmem_swap()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_swap( target, value, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_swap( target, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_swap wrapper function ******************************************************/ int shmem_swap__( int * target, int value, int pe) { int retvalue; TAU_PROFILE_TIMER(t, "shmem_swap()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_swap( target, value, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_swap( target, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_short_swap wrapper function ******************************************************/ short shmem_short_swap( short * target, short value, int pe) { short retvalue; TAU_PROFILE_TIMER(t, "shmem_short_swap()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_short_swap( target, value, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_short_swap( target, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_short_swap wrapper function ******************************************************/ short SHMEM_SHORT_SWAP( short * target, short value, int pe) { short retvalue; TAU_PROFILE_TIMER(t, "shmem_short_swap()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_short_swap( target, value, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_short_swap( target, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_short_swap wrapper function ******************************************************/ short shmem_short_swap_( short * target, short value, int pe) { short retvalue; TAU_PROFILE_TIMER(t, "shmem_short_swap()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_short_swap( target, value, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_short_swap( target, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_short_swap wrapper function ******************************************************/ short shmem_short_swap__( short * target, short value, int pe) { short retvalue; TAU_PROFILE_TIMER(t, "shmem_short_swap()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_short_swap( target, value, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_short_swap( target, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_int_swap wrapper function ******************************************************/ int shmem_int_swap( int * target, int value, int pe) { int retvalue; TAU_PROFILE_TIMER(t, "shmem_int_swap()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_int_swap( target, value, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_int_swap( target, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_int_swap wrapper function ******************************************************/ int SHMEM_INT_SWAP( int * target, int value, int pe) { int retvalue; TAU_PROFILE_TIMER(t, "shmem_int_swap()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_int_swap( target, value, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_int_swap( target, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_int_swap wrapper function ******************************************************/ int shmem_int_swap_( int * target, int value, int pe) { int retvalue; TAU_PROFILE_TIMER(t, "shmem_int_swap()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_int_swap( target, value, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_int_swap( target, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_int_swap wrapper function ******************************************************/ int shmem_int_swap__( int * target, int value, int pe) { int retvalue; TAU_PROFILE_TIMER(t, "shmem_int_swap()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_int_swap( target, value, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_int_swap( target, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_long_swap wrapper function ******************************************************/ long shmem_long_swap( long * target, long value, int pe) { long retvalue; TAU_PROFILE_TIMER(t, "shmem_long_swap()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_long_swap( target, value, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_long_swap( target, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_long_swap wrapper function ******************************************************/ long SHMEM_LONG_SWAP( long * target, long value, int pe) { long retvalue; TAU_PROFILE_TIMER(t, "shmem_long_swap()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_long_swap( target, value, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_long_swap( target, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_long_swap wrapper function ******************************************************/ long shmem_long_swap_( long * target, long value, int pe) { long retvalue; TAU_PROFILE_TIMER(t, "shmem_long_swap()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_long_swap( target, value, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_long_swap( target, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_long_swap wrapper function ******************************************************/ long shmem_long_swap__( long * target, long value, int pe) { long retvalue; TAU_PROFILE_TIMER(t, "shmem_long_swap()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_long_swap( target, value, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_long_swap( target, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_float_swap wrapper function ******************************************************/ float shmem_float_swap( float * target, float value, int pe) { float retvalue; TAU_PROFILE_TIMER(t, "shmem_float_swap()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_float_swap( target, value, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_float_swap( target, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_float_swap wrapper function ******************************************************/ float SHMEM_FLOAT_SWAP( float * target, float value, int pe) { float retvalue; TAU_PROFILE_TIMER(t, "shmem_float_swap()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_float_swap( target, value, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_float_swap( target, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_float_swap wrapper function ******************************************************/ float shmem_float_swap_( float * target, float value, int pe) { float retvalue; TAU_PROFILE_TIMER(t, "shmem_float_swap()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_float_swap( target, value, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_float_swap( target, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_float_swap wrapper function ******************************************************/ float shmem_float_swap__( float * target, float value, int pe) { float retvalue; TAU_PROFILE_TIMER(t, "shmem_float_swap()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_float_swap( target, value, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_float_swap( target, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_double_swap wrapper function ******************************************************/ double shmem_double_swap( double * target, double value, int pe) { double retvalue; TAU_PROFILE_TIMER(t, "shmem_double_swap()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_double_swap( target, value, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_double_swap( target, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_double_swap wrapper function ******************************************************/ double SHMEM_DOUBLE_SWAP( double * target, double value, int pe) { double retvalue; TAU_PROFILE_TIMER(t, "shmem_double_swap()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_double_swap( target, value, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_double_swap( target, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_double_swap wrapper function ******************************************************/ double shmem_double_swap_( double * target, double value, int pe) { double retvalue; TAU_PROFILE_TIMER(t, "shmem_double_swap()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_double_swap( target, value, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_double_swap( target, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_double_swap wrapper function ******************************************************/ double shmem_double_swap__( double * target, double value, int pe) { double retvalue; TAU_PROFILE_TIMER(t, "shmem_double_swap()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_double_swap( target, value, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_double_swap( target, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_longlong_swap wrapper function ******************************************************/ long long shmem_longlong_swap( long long * target, long long value, int pe) { long long retvalue; TAU_PROFILE_TIMER(t, "shmem_longlong_swap()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_longlong_swap( target, value, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_longlong_swap( target, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_longlong_swap wrapper function ******************************************************/ long long SHMEM_LONGLONG_SWAP( long long * target, long long value, int pe) { long long retvalue; TAU_PROFILE_TIMER(t, "shmem_longlong_swap()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_longlong_swap( target, value, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_longlong_swap( target, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_longlong_swap wrapper function ******************************************************/ long long shmem_longlong_swap_( long long * target, long long value, int pe) { long long retvalue; TAU_PROFILE_TIMER(t, "shmem_longlong_swap()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_longlong_swap( target, value, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_longlong_swap( target, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_longlong_swap wrapper function ******************************************************/ long long shmem_longlong_swap__( long long * target, long long value, int pe) { long long retvalue; TAU_PROFILE_TIMER(t, "shmem_longlong_swap()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_longlong_swap( target, value, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_longlong_swap( target, value, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_short_finc wrapper function ******************************************************/ short shmem_short_finc( short * target, int pe) { short retvalue; TAU_PROFILE_TIMER(t, "shmem_short_finc()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_short_finc( target, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_short_finc( target, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_short_finc wrapper function ******************************************************/ short SHMEM_SHORT_FINC( short * target, int pe) { short retvalue; TAU_PROFILE_TIMER(t, "shmem_short_finc()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_short_finc( target, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_short_finc( target, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_short_finc wrapper function ******************************************************/ short shmem_short_finc_( short * target, int pe) { short retvalue; TAU_PROFILE_TIMER(t, "shmem_short_finc()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_short_finc( target, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_short_finc( target, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_short_finc wrapper function ******************************************************/ short shmem_short_finc__( short * target, int pe) { short retvalue; TAU_PROFILE_TIMER(t, "shmem_short_finc()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_short_finc( target, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_short_finc( target, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_int_finc wrapper function ******************************************************/ int shmem_int_finc( int * target, int pe) { int retvalue; TAU_PROFILE_TIMER(t, "shmem_int_finc()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_int_finc( target, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_int_finc( target, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_int_finc wrapper function ******************************************************/ int SHMEM_INT_FINC( int * target, int pe) { int retvalue; TAU_PROFILE_TIMER(t, "shmem_int_finc()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_int_finc( target, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_int_finc( target, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_int_finc wrapper function ******************************************************/ int shmem_int_finc_( int * target, int pe) { int retvalue; TAU_PROFILE_TIMER(t, "shmem_int_finc()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_int_finc( target, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_int_finc( target, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_int_finc wrapper function ******************************************************/ int shmem_int_finc__( int * target, int pe) { int retvalue; TAU_PROFILE_TIMER(t, "shmem_int_finc()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_int_finc( target, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_int_finc( target, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_long_finc wrapper function ******************************************************/ long shmem_long_finc( long * target, int pe) { long retvalue; TAU_PROFILE_TIMER(t, "shmem_long_finc()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_long_finc( target, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_long_finc( target, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_long_finc wrapper function ******************************************************/ long SHMEM_LONG_FINC( long * target, int pe) { long retvalue; TAU_PROFILE_TIMER(t, "shmem_long_finc()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_long_finc( target, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_long_finc( target, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_long_finc wrapper function ******************************************************/ long shmem_long_finc_( long * target, int pe) { long retvalue; TAU_PROFILE_TIMER(t, "shmem_long_finc()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_long_finc( target, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_long_finc( target, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_long_finc wrapper function ******************************************************/ long shmem_long_finc__( long * target, int pe) { long retvalue; TAU_PROFILE_TIMER(t, "shmem_long_finc()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_long_finc( target, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_long_finc( target, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_longlong_finc wrapper function ******************************************************/ long long shmem_longlong_finc( long long * target, int pe) { long long retvalue; TAU_PROFILE_TIMER(t, "shmem_longlong_finc()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_longlong_finc( target, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_longlong_finc( target, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_longlong_finc wrapper function ******************************************************/ long long SHMEM_LONGLONG_FINC( long long * target, int pe) { long long retvalue; TAU_PROFILE_TIMER(t, "shmem_longlong_finc()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_longlong_finc( target, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_longlong_finc( target, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_longlong_finc wrapper function ******************************************************/ long long shmem_longlong_finc_( long long * target, int pe) { long long retvalue; TAU_PROFILE_TIMER(t, "shmem_longlong_finc()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_longlong_finc( target, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_longlong_finc( target, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_longlong_finc wrapper function ******************************************************/ long long shmem_longlong_finc__( long long * target, int pe) { long long retvalue; TAU_PROFILE_TIMER(t, "shmem_longlong_finc()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_longlong_finc( target, pe) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_longlong_finc( target, pe) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_clear_lock wrapper function ******************************************************/ void shmem_clear_lock( int * lock) { TAU_PROFILE_TIMER(t, "shmem_clear_lock()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_clear_lock( lock) ; #else /* !TAU_P_SHMEM */ pshmem_clear_lock( lock) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_clear_lock wrapper function ******************************************************/ void SHMEM_CLEAR_LOCK( int * lock) { TAU_PROFILE_TIMER(t, "shmem_clear_lock()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_clear_lock( lock) ; #else /* !TAU_P_SHMEM */ pshmem_clear_lock( lock) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_clear_lock wrapper function ******************************************************/ void shmem_clear_lock_( int * lock) { TAU_PROFILE_TIMER(t, "shmem_clear_lock()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_clear_lock( lock) ; #else /* !TAU_P_SHMEM */ pshmem_clear_lock( lock) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_clear_lock wrapper function ******************************************************/ void shmem_clear_lock__( int * lock) { TAU_PROFILE_TIMER(t, "shmem_clear_lock()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_clear_lock( lock) ; #else /* !TAU_P_SHMEM */ pshmem_clear_lock( lock) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_set_lock wrapper function ******************************************************/ void shmem_set_lock( int * lock) { TAU_PROFILE_TIMER(t, "shmem_set_lock()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_set_lock( lock) ; #else /* !TAU_P_SHMEM */ pshmem_set_lock( lock) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_set_lock wrapper function ******************************************************/ void SHMEM_SET_LOCK( int * lock) { TAU_PROFILE_TIMER(t, "shmem_set_lock()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_set_lock( lock) ; #else /* !TAU_P_SHMEM */ pshmem_set_lock( lock) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_set_lock wrapper function ******************************************************/ void shmem_set_lock_( int * lock) { TAU_PROFILE_TIMER(t, "shmem_set_lock()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_set_lock( lock) ; #else /* !TAU_P_SHMEM */ pshmem_set_lock( lock) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_set_lock wrapper function ******************************************************/ void shmem_set_lock__( int * lock) { TAU_PROFILE_TIMER(t, "shmem_set_lock()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_set_lock( lock) ; #else /* !TAU_P_SHMEM */ pshmem_set_lock( lock) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_test_lock wrapper function ******************************************************/ int shmem_test_lock( int * lock) { int retvalue; TAU_PROFILE_TIMER(t, "shmem_test_lock()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_test_lock( lock) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_test_lock( lock) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_test_lock wrapper function ******************************************************/ int SHMEM_TEST_LOCK( int * lock) { int retvalue; TAU_PROFILE_TIMER(t, "shmem_test_lock()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_test_lock( lock) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_test_lock( lock) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_test_lock wrapper function ******************************************************/ int shmem_test_lock_( int * lock) { int retvalue; TAU_PROFILE_TIMER(t, "shmem_test_lock()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_test_lock( lock) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_test_lock( lock) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /****************************************************** *** shmem_test_lock wrapper function ******************************************************/ int shmem_test_lock__( int * lock) { int retvalue; TAU_PROFILE_TIMER(t, "shmem_test_lock()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM retvalue = __p__shmem_test_lock( lock) ; #else /* !TAU_P_SHMEM */ retvalue = pshmem_test_lock( lock) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return retvalue; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_wait wrapper function ******************************************************/ void shmem_wait( int * ivar, int cmp_value) { TAU_PROFILE_TIMER(t, "shmem_wait()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_wait( ivar, cmp_value) ; #else /* !TAU_P_SHMEM */ pshmem_wait( ivar, cmp_value) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_wait wrapper function ******************************************************/ void SHMEM_WAIT( int * ivar, int cmp_value) { TAU_PROFILE_TIMER(t, "shmem_wait()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_wait( ivar, cmp_value) ; #else /* !TAU_P_SHMEM */ pshmem_wait( ivar, cmp_value) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_wait wrapper function ******************************************************/ void shmem_wait_( int * ivar, int cmp_value) { TAU_PROFILE_TIMER(t, "shmem_wait()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_wait( ivar, cmp_value) ; #else /* !TAU_P_SHMEM */ pshmem_wait( ivar, cmp_value) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_wait wrapper function ******************************************************/ void shmem_wait__( int * ivar, int cmp_value) { TAU_PROFILE_TIMER(t, "shmem_wait()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_wait( ivar, cmp_value) ; #else /* !TAU_P_SHMEM */ pshmem_wait( ivar, cmp_value) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_short_wait wrapper function ******************************************************/ void shmem_short_wait( short * ivar, short cmp_value) { TAU_PROFILE_TIMER(t, "shmem_short_wait()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_wait( ivar, cmp_value) ; #else /* !TAU_P_SHMEM */ pshmem_short_wait( ivar, cmp_value) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_wait wrapper function ******************************************************/ void SHMEM_SHORT_WAIT( short * ivar, short cmp_value) { TAU_PROFILE_TIMER(t, "shmem_short_wait()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_wait( ivar, cmp_value) ; #else /* !TAU_P_SHMEM */ pshmem_short_wait( ivar, cmp_value) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_wait wrapper function ******************************************************/ void shmem_short_wait_( short * ivar, short cmp_value) { TAU_PROFILE_TIMER(t, "shmem_short_wait()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_wait( ivar, cmp_value) ; #else /* !TAU_P_SHMEM */ pshmem_short_wait( ivar, cmp_value) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_wait wrapper function ******************************************************/ void shmem_short_wait__( short * ivar, short cmp_value) { TAU_PROFILE_TIMER(t, "shmem_short_wait()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_wait( ivar, cmp_value) ; #else /* !TAU_P_SHMEM */ pshmem_short_wait( ivar, cmp_value) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_int_wait wrapper function ******************************************************/ void shmem_int_wait( int * ivar, int cmp_value) { TAU_PROFILE_TIMER(t, "shmem_int_wait()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_wait( ivar, cmp_value) ; #else /* !TAU_P_SHMEM */ pshmem_int_wait( ivar, cmp_value) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_wait wrapper function ******************************************************/ void SHMEM_INT_WAIT( int * ivar, int cmp_value) { TAU_PROFILE_TIMER(t, "shmem_int_wait()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_wait( ivar, cmp_value) ; #else /* !TAU_P_SHMEM */ pshmem_int_wait( ivar, cmp_value) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_wait wrapper function ******************************************************/ void shmem_int_wait_( int * ivar, int cmp_value) { TAU_PROFILE_TIMER(t, "shmem_int_wait()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_wait( ivar, cmp_value) ; #else /* !TAU_P_SHMEM */ pshmem_int_wait( ivar, cmp_value) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_wait wrapper function ******************************************************/ void shmem_int_wait__( int * ivar, int cmp_value) { TAU_PROFILE_TIMER(t, "shmem_int_wait()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_wait( ivar, cmp_value) ; #else /* !TAU_P_SHMEM */ pshmem_int_wait( ivar, cmp_value) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_long_wait wrapper function ******************************************************/ void shmem_long_wait( long * ivar, long cmp_value) { TAU_PROFILE_TIMER(t, "shmem_long_wait()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_wait( ivar, cmp_value) ; #else /* !TAU_P_SHMEM */ pshmem_long_wait( ivar, cmp_value) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_wait wrapper function ******************************************************/ void SHMEM_LONG_WAIT( long * ivar, long cmp_value) { TAU_PROFILE_TIMER(t, "shmem_long_wait()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_wait( ivar, cmp_value) ; #else /* !TAU_P_SHMEM */ pshmem_long_wait( ivar, cmp_value) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_wait wrapper function ******************************************************/ void shmem_long_wait_( long * ivar, long cmp_value) { TAU_PROFILE_TIMER(t, "shmem_long_wait()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_wait( ivar, cmp_value) ; #else /* !TAU_P_SHMEM */ pshmem_long_wait( ivar, cmp_value) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_wait wrapper function ******************************************************/ void shmem_long_wait__( long * ivar, long cmp_value) { TAU_PROFILE_TIMER(t, "shmem_long_wait()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_wait( ivar, cmp_value) ; #else /* !TAU_P_SHMEM */ pshmem_long_wait( ivar, cmp_value) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_longlong_wait wrapper function ******************************************************/ void shmem_longlong_wait( long long * ivar, long long cmp_value) { TAU_PROFILE_TIMER(t, "shmem_longlong_wait()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_wait( ivar, cmp_value) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_wait( ivar, cmp_value) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_wait wrapper function ******************************************************/ void SHMEM_LONGLONG_WAIT( long long * ivar, long long cmp_value) { TAU_PROFILE_TIMER(t, "shmem_longlong_wait()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_wait( ivar, cmp_value) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_wait( ivar, cmp_value) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_wait wrapper function ******************************************************/ void shmem_longlong_wait_( long long * ivar, long long cmp_value) { TAU_PROFILE_TIMER(t, "shmem_longlong_wait()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_wait( ivar, cmp_value) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_wait( ivar, cmp_value) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_wait wrapper function ******************************************************/ void shmem_longlong_wait__( long long * ivar, long long cmp_value) { TAU_PROFILE_TIMER(t, "shmem_longlong_wait()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_wait( ivar, cmp_value) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_wait( ivar, cmp_value) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_wait_until wrapper function ******************************************************/ void shmem_wait_until( int * ivar, int cmp, int value) { TAU_PROFILE_TIMER(t, "shmem_wait_until()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_wait_until( ivar, cmp, value) ; #else /* !TAU_P_SHMEM */ pshmem_wait_until( ivar, cmp, value) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_wait_until wrapper function ******************************************************/ void SHMEM_WAIT_UNTIL( int * ivar, int cmp, int value) { TAU_PROFILE_TIMER(t, "shmem_wait_until()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_wait_until( ivar, cmp, value) ; #else /* !TAU_P_SHMEM */ pshmem_wait_until( ivar, cmp, value) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_wait_until wrapper function ******************************************************/ void shmem_wait_until_( int * ivar, int cmp, int value) { TAU_PROFILE_TIMER(t, "shmem_wait_until()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_wait_until( ivar, cmp, value) ; #else /* !TAU_P_SHMEM */ pshmem_wait_until( ivar, cmp, value) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_wait_until wrapper function ******************************************************/ void shmem_wait_until__( int * ivar, int cmp, int value) { TAU_PROFILE_TIMER(t, "shmem_wait_until()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_wait_until( ivar, cmp, value) ; #else /* !TAU_P_SHMEM */ pshmem_wait_until( ivar, cmp, value) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_short_wait_until wrapper function ******************************************************/ void shmem_short_wait_until( short * ivar, int cmp, short value) { TAU_PROFILE_TIMER(t, "shmem_short_wait_until()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_wait_until( ivar, cmp, value) ; #else /* !TAU_P_SHMEM */ pshmem_short_wait_until( ivar, cmp, value) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_wait_until wrapper function ******************************************************/ void SHMEM_SHORT_WAIT_UNTIL( short * ivar, int cmp, short value) { TAU_PROFILE_TIMER(t, "shmem_short_wait_until()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_wait_until( ivar, cmp, value) ; #else /* !TAU_P_SHMEM */ pshmem_short_wait_until( ivar, cmp, value) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_wait_until wrapper function ******************************************************/ void shmem_short_wait_until_( short * ivar, int cmp, short value) { TAU_PROFILE_TIMER(t, "shmem_short_wait_until()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_wait_until( ivar, cmp, value) ; #else /* !TAU_P_SHMEM */ pshmem_short_wait_until( ivar, cmp, value) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_short_wait_until wrapper function ******************************************************/ void shmem_short_wait_until__( short * ivar, int cmp, short value) { TAU_PROFILE_TIMER(t, "shmem_short_wait_until()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_short_wait_until( ivar, cmp, value) ; #else /* !TAU_P_SHMEM */ pshmem_short_wait_until( ivar, cmp, value) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_int_wait_until wrapper function ******************************************************/ void shmem_int_wait_until( int * ivar, int cmp, int value) { TAU_PROFILE_TIMER(t, "shmem_int_wait_until()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_wait_until( ivar, cmp, value) ; #else /* !TAU_P_SHMEM */ pshmem_int_wait_until( ivar, cmp, value) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_wait_until wrapper function ******************************************************/ void SHMEM_INT_WAIT_UNTIL( int * ivar, int cmp, int value) { TAU_PROFILE_TIMER(t, "shmem_int_wait_until()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_wait_until( ivar, cmp, value) ; #else /* !TAU_P_SHMEM */ pshmem_int_wait_until( ivar, cmp, value) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_wait_until wrapper function ******************************************************/ void shmem_int_wait_until_( int * ivar, int cmp, int value) { TAU_PROFILE_TIMER(t, "shmem_int_wait_until()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_wait_until( ivar, cmp, value) ; #else /* !TAU_P_SHMEM */ pshmem_int_wait_until( ivar, cmp, value) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_int_wait_until wrapper function ******************************************************/ void shmem_int_wait_until__( int * ivar, int cmp, int value) { TAU_PROFILE_TIMER(t, "shmem_int_wait_until()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_int_wait_until( ivar, cmp, value) ; #else /* !TAU_P_SHMEM */ pshmem_int_wait_until( ivar, cmp, value) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_long_wait_until wrapper function ******************************************************/ void shmem_long_wait_until( long * ivar, int cmp, long value) { TAU_PROFILE_TIMER(t, "shmem_long_wait_until()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_wait_until( ivar, cmp, value) ; #else /* !TAU_P_SHMEM */ pshmem_long_wait_until( ivar, cmp, value) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_wait_until wrapper function ******************************************************/ void SHMEM_LONG_WAIT_UNTIL( long * ivar, int cmp, long value) { TAU_PROFILE_TIMER(t, "shmem_long_wait_until()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_wait_until( ivar, cmp, value) ; #else /* !TAU_P_SHMEM */ pshmem_long_wait_until( ivar, cmp, value) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_wait_until wrapper function ******************************************************/ void shmem_long_wait_until_( long * ivar, int cmp, long value) { TAU_PROFILE_TIMER(t, "shmem_long_wait_until()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_wait_until( ivar, cmp, value) ; #else /* !TAU_P_SHMEM */ pshmem_long_wait_until( ivar, cmp, value) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_long_wait_until wrapper function ******************************************************/ void shmem_long_wait_until__( long * ivar, int cmp, long value) { TAU_PROFILE_TIMER(t, "shmem_long_wait_until()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_long_wait_until( ivar, cmp, value) ; #else /* !TAU_P_SHMEM */ pshmem_long_wait_until( ivar, cmp, value) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /******************************************************/ /******************************************************/ /****************************************************** *** shmem_longlong_wait_until wrapper function ******************************************************/ void shmem_longlong_wait_until( long long * ivar, int cmp, long long value) { TAU_PROFILE_TIMER(t, "shmem_longlong_wait_until()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_wait_until( ivar, cmp, value) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_wait_until( ivar, cmp, value) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_wait_until wrapper function ******************************************************/ void SHMEM_LONGLONG_WAIT_UNTIL( long long * ivar, int cmp, long long value) { TAU_PROFILE_TIMER(t, "shmem_longlong_wait_until()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_wait_until( ivar, cmp, value) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_wait_until( ivar, cmp, value) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_wait_until wrapper function ******************************************************/ void shmem_longlong_wait_until_( long long * ivar, int cmp, long long value) { TAU_PROFILE_TIMER(t, "shmem_longlong_wait_until()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_wait_until( ivar, cmp, value) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_wait_until( ivar, cmp, value) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } /****************************************************** *** shmem_longlong_wait_until wrapper function ******************************************************/ void shmem_longlong_wait_until__( long long * ivar, int cmp, long long value) { TAU_PROFILE_TIMER(t, "shmem_longlong_wait_until()", "", TAU_MESSAGE); TAU_PROFILE_START(t); #ifdef TAU_P_SHMEM __p__shmem_longlong_wait_until( ivar, cmp, value) ; #else /* !TAU_P_SHMEM */ pshmem_longlong_wait_until( ivar, cmp, value) ; #endif /* TAU_P_SHMEM */ TAU_PROFILE_STOP(t); return ; } tau-2.16.4/src/Profile/Tracer.cpp000077500000000000000000000340241062343042700165170ustar00rootroot00000000000000/*********************************************************************/ /* pC++/Sage++ Copyright (C) 1994 */ /* Indiana University University of Oregon University of Rennes */ /*********************************************************************/ /* * pcxx_event.c: simple SW monitor routines * * (c) 1994 Jerry Manic Saftware * * Version 3.0 */ # include # include # include # include # include # include #ifdef TAU_WINDOWS #include typedef __int64 x_int64; typedef unsigned __int64 x_uint64; #else #include #define O_BINARY 0 typedef long long x_int64; typedef unsigned long long x_uint64; #endif # include # include #ifdef TAU_LARGEFILE #define LARGEFILE_OPTION O_LARGEFILE #else #define LARGEFILE_OPTION 0 #endif #ifdef TAU_SYNCHRONIZE_CLOCKS extern double TauSyncAdjustTimeStamp(double timestamp); #endif # define PCXX_EVENT_SRC # include "Profile/pcxx_events.h" /* extern "C" time_t time(time_t * t); use time.h */ unsigned long int pcxx_ev_class = PCXX_EC_TRACER | PCXX_EC_TIMER; /* -- event record buffer ------------------------------------ */ #define TAU_MAX_RECORDS 64*1024 #define TAU_BUFFER_SIZE sizeof(PCXX_EV)*TAU_MAX_RECORDS /* -- buffer that holds the events before they are flushed to disk -- */ static PCXX_EV TraceBuffer[TAU_MAX_THREADS][TAU_MAX_RECORDS]; /* The second dimension shouldn't be TAU_BUFFER_SIZE ! */ /* -- id of the last record for each thread --- */ /* -- pointer to last available element of event record buffer */ /* -- need one place for flush event => - 1 ------------------ */ // static int TauEventMax[TAU_MAX_THREADS] = {TAU_MAX_RECORDS - 1 }; /* -- current record pointer for each thread -- */ static int TauCurrentEvent[TAU_MAX_THREADS] = {0}; /* -- event trace file descriptor ---------------------------- */ static int TraceFd[TAU_MAX_THREADS] = {0}; /* -- do event files need to be re-written ------------------- */ static int FlushEvents[TAU_MAX_THREADS] = {0}; /* -- initialization status flags ---------------------------- */ static int TraceInitialized[TAU_MAX_THREADS] = {0}; #ifdef TAU_MULTIPLE_COUNTERS static double tracerValues[MAX_TAU_COUNTERS] = {0}; #endif // TAU_MULTIPLE_COUNTERS /* -- Use Profiling interface for time -- */ x_uint64 pcxx_GetUSecLong(int tid) { // If you're modifying the behavior of this routine, note that in // Profiler::Start and Stop, we obtain the timestamp for tracing explicitly. // The same changes would have to be made there as well (e.g., using COUNTER1 // for tracing in multiplecounters case) for consistency. #ifdef TAU_MULTIPLE_COUNTERS //In the presence of multiple counters, the system always //assumes that counter1 contains the tracing metric. //Thus, if you want gettimeofday, make sure that you //define counter1 to be GETTIMEOFDAY. //Just return values[0] as that is the position of counter1 (whether it //is active or not). // THE SLOW WAY! // RtsLayer::getUSecD(tid, tracerValues); // double value = tracerValues[0]; x_uint64 value = MultipleCounterLayer::getSingleCounter(tid, 0); #else //TAU_MULTIPLE_COUNTERS x_uint64 value = RtsLayer::getUSecD(tid); #endif // TAU_MULTIPLE_COUNTERS #ifdef TAU_SYNCHRONIZE_CLOCKS return (x_uint64) TauSyncAdjustTimeStamp(value); #else return (x_uint64) value; #endif } /* -- write event to buffer only [without overflow check] ---- */ void TraceEventOnly(long int ev, x_int64 par, int tid) { PCXX_EV * pcxx_ev_ptr = &TraceBuffer[tid][TauCurrentEvent[tid]] ; pcxx_ev_ptr->ev = ev; pcxx_ev_ptr->ti = pcxx_GetUSecLong(tid); pcxx_ev_ptr->par = par; pcxx_ev_ptr->nid = RtsLayer::myNode(); pcxx_ev_ptr->tid = tid; TauCurrentEvent[tid] ++; } /* -- Set the flag to flush the EDF file --------------------- */ void SetFlushEvents(int tid) { FlushEvents[tid] = 1; } /* -- Get the flag to flush the EDF file. 1 means flush edf file. ------ */ int GetFlushEvents(int tid) { return FlushEvents[tid]; } /* -- write event buffer to file ----------------------------- */ void TraceEvFlush(int tid) { /* static PCXX_EV flush_end = { PCXX_EV_FLUSH_EXIT, 0, 0, 0L }; */ int ret; if (TraceFd[tid] == 0) { printf("Error: TraceEvFlush(%d): Fd is -1. Trace file not initialized \n", tid); if (RtsLayer::myNode() == -1) { fprintf (stderr, "ERROR in configuration. Trace file not initialized. If this is an MPI application, please ensure that TAU MPI wrapper library is linked. If not, please ensure that TAU_PROFILE_SET_NODE(id); is called in the program (0 for sequential).\n"); exit(1); } } //#ifdef TRACEMONITORING // Do this by default. if (FlushEvents[tid]) { /* Dump the EDF file before writing trace data: Monitoring */ RtsLayer::DumpEDF(tid); FlushEvents[tid]=0; } //#endif /* TRACEMONITORING */ int numEventsToBeFlushed = TauCurrentEvent[tid]; /* starting from 0 */ DEBUGPROFMSG("Tid "< -1)) /* node has been set*/ { /* done with initialization */ TraceInitialized[tid] = 1; char *dirname, tracefilename[1024]; if ((dirname = getenv("TRACEDIR")) == NULL) { // Use default directory name . dirname = new char[8]; strcpy (dirname,"."); } sprintf(tracefilename, "%s/tautrace.%d.%d.%d.trc",dirname, RtsLayer::myNode(), RtsLayer::myContext(), tid); init_wrap_up (); if ((TraceFd[tid] = open (tracefilename, O_WRONLY|O_CREAT|O_TRUNC|O_APPEND|O_BINARY|LARGEFILE_OPTION, 0600)) < 0) { fprintf (stderr, "TraceEvInit[open]: "); perror (tracefilename); exit (1); } /* there may be some records in pcxx_ev_ptr already. Make sure that the first record has node id set properly */ if (TraceBuffer[tid][0].ev == PCXX_EV_INIT) { /* first record is init */ for (int iter = 0; iter < TauCurrentEvent[tid]; iter ++) { TraceBuffer[tid][iter].nid = RtsLayer::myNode(); } } else { /* either the first record is blank - in which case we should put INIT record, or it is an error */ if (TauCurrentEvent[tid] == 0) { TraceEvent(PCXX_EV_INIT, pcxx_ev_class, tid); retvalue ++; /* one record generated */ } else { /* error */ printf("Warning: TraceEvInit(%d): First record is not INIT\n", tid); } } /* first record was not INIT */ if ( pcxx_ev_class & PCXX_EC_TRACER ) { /* generate a wallclock time record */ TraceEvent (PCXX_EV_WALL_CLOCK, time((time_t *)0), tid); retvalue ++; } } return retvalue; } /* This routine is typically invoked when multiple SET_NODE calls are encountered for a multi-threaded program */ void TraceReinitialize(int oldid, int newid, int tid) { printf("Inside TraceReinitialize : oldid = %d, newid = %d, tid = %d\n", oldid, newid, tid); /* We should put a record in the trace that says that oldid is mapped to newid this way and have an offline program clean and transform it. Otherwise if we do it online, we'd have to lock the multithreaded execution, and do if for all threads and this may perturb the application */ return ; } void pcxx_EvInit(char *name) { /*-- dummy function for compatibility with the earlier ver. Remove later -- */ TraceEvInit(RtsLayer::myThread()); } /* -- Reset the trace --------------------------------------- */ void TraceUnInitialize(int tid) { /* -- to set the trace as uninitialized and clear the current buffers (for forked child process, trying to clear its parent records) -- */ TraceInitialized[tid] = 0; TauCurrentEvent[tid] = 0; TraceEventOnly(PCXX_EV_INIT, pcxx_ev_class, tid); } /* -- write event to buffer ---------------------------------- */ void TraceEvent(long int ev, x_int64 par, int tid, x_uint64 ts, int use_ts) { int i; int records_created = TraceEvInit(tid); PCXX_EV * pcxx_ev_ptr = &TraceBuffer[tid][TauCurrentEvent[tid]] ; #ifdef TAU_SYNCHRONIZE_CLOCKS ts = (x_uint64) TauSyncAdjustTimeStamp((double)ts); #endif if (records_created) { #ifdef DEBUG printf("TraceEvent(): TID %d records_created in TraceEvInit = %d\n", RtsLayer::myThread(), records_created); #endif /* DEBUG */ /* one or more records were created in TraceEvInit. We must initialize the timestamps of those records to the current timestamp. */ if (use_ts) { /* we're asked to use the timestamp. Initialize with this ts */ /* Initialize only records just above the current record! */ for (i = 0; i < records_created; i++) { /* set the timestamp accordingly */ TraceBuffer[tid][TauCurrentEvent[tid]-1-i].ti = ts; } } } if (!(TraceInitialized[tid]) && (TauCurrentEvent[tid] == 0)) /* not initialized and its the first time */ { if (ev != PCXX_EV_INIT) { /* we need to ensure that INIT is the first event */ pcxx_ev_ptr->ev = PCXX_EV_INIT; /* Should we use the timestamp provided to us? */ if (use_ts) { pcxx_ev_ptr->ti = ts; } else { pcxx_ev_ptr->ti = pcxx_GetUSecLong(tid); } pcxx_ev_ptr->par = pcxx_ev_class; /* init event */ /* probably the nodeid is not set yet */ pcxx_ev_ptr->nid = RtsLayer::myNode(); pcxx_ev_ptr->tid = tid; TauCurrentEvent[tid] ++; pcxx_ev_ptr = &TraceBuffer[tid][TauCurrentEvent[tid]]; } } pcxx_ev_ptr->ev = ev; if (use_ts) { pcxx_ev_ptr->ti = ts; } else { pcxx_ev_ptr->ti = pcxx_GetUSecLong(tid); } pcxx_ev_ptr->par = par; pcxx_ev_ptr->nid = RtsLayer::myNode(); pcxx_ev_ptr->tid = tid ; TauCurrentEvent[tid] ++; if ( TauCurrentEvent[tid] >= TAU_MAX_RECORDS - 1 ) TraceEvFlush(tid); } void pcxx_Event(long int ev, x_int64 par) { TraceEvent(ev, par, RtsLayer::myThread()); } /* -- terminate SW tracing ----------------------------------- */ void TraceEvClose(int tid) { if ( pcxx_ev_class & PCXX_EC_TRACER ) { TraceEvent (PCXX_EV_CLOSE, 0, tid); TraceEvent (PCXX_EV_WALL_CLOCK, time((time_t *)0), tid); } TraceEvFlush (tid); //close (TraceFd[tid]); // Just in case the same thread writes to this file again, don't close it. // for OpenMP. #ifndef TAU_OPENMP if ((RtsLayer::myNode() == 0) && (RtsLayer::myThread() == 0)) close(TraceFd[tid]); #endif /* TAU_OPENMP */ } void pcxx_EvClose(void) { TraceEvClose(RtsLayer::myThread()); } ////////////////////////////////////////////////////////////////////// // TraceCallStack is a recursive function that looks at the current // Profiler and requests that all the previous profilers be traced prior // to tracing the current profiler ////////////////////////////////////////////////////////////////////// void TraceCallStack(int tid, Profiler *current) { if (current == 0) return; else { // Trace all the previous records before tracing self TraceCallStack(tid, current->ParentProfiler); TraceEvent(current->ThisFunction->GetFunctionId(), 1, tid); DEBUGPROFMSG("TRACE CORRECTED: "<ThisFunction->GetName()< #include #include using namespace NAMESPACE; #else // SMARTS #include #include #include #endif // SMARTS ///////////////////////////////////////////////////////////////////////// // Member Function Definitions For class TulipThread // This allows us to get thread ids from 0..N-1 ///////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////// // Define the static private members of PthreadLayer ///////////////////////////////////////////////////////////////////////// #ifdef SMARTS Mutex TulipThreadLayer::tauDBMutex; Mutex TulipThreadLayer::tauEnvMutex; #else // SMARTS Tulip_Mutex TulipThreadLayer::tauDBMutex; Tulip_Mutex TulipThreadLayer::tauEnvMutex; #endif // SMARTS //////////////////////////////////////////////////////////////////////// // RegisterThread() should be called before any profiling routines are // invoked. This routine sets the thread id that is used by the code in // FunctionInfo and Profiler classes. This should be the first routine a // thread should invoke from its wrapper. Note: main() thread shouldn't // call this routine. //////////////////////////////////////////////////////////////////////// int TulipThreadLayer::RegisterThread(void) { /* Do nothing */ return 1; } //////////////////////////////////////////////////////////////////////// // GetThreadId returns an id in the range 0..N-1 by looking at the // Tulip_Context::thread and getting the id from it. Note: Tulip numbers // the threads from 1..N so we need to decrement it by 1. //////////////////////////////////////////////////////////////////////// int TulipThreadLayer::GetThreadId(void) { DEBUGPROFMSG("TulipThreadLayer::GetThreadId() : "<getThreadID() ; } */ /* old... int tid = Context::thread()->getThreadID() - 1; */ #else // SMARTS int tid = Tulip_Context::thread()->getThreadID() - 1; #endif // SMARTS DEBUGPROFMSG(" " << tid < #endif /* TAU_AIX */ #include /*********************************************************************/ /* tulip_InitClocks() */ /*********************************************************************/ static int pcxxT_notinit = 1; #ifdef __PARAGON__ # include # include # define _2_to_52d (4503599627370496.0) # define OR_EXPONENT (0x4330) # define MASK_EXPONENT (0x000F) double pcxxT_start; static struct rpm *rpm = (struct rpm *) RPM_BASE_VADDR; double pcxxT_dclock() { union { unsigned short wordwise[4]; double value; } t; t.value = rpm->rpm_time; t.wordwise[3] = (t.wordwise[3] & MASK_EXPONENT) | OR_EXPONENT; return (t.value - _2_to_52d); } void tulip_InitClocks() { if ( pcxxT_notinit ) { pcxxT_notinit = 0; pcxxT_start = floor (pcxxT_dclock()*1.0e-9)*1.0e9; } } #else #ifdef __ksr__ void tulip_InitClocks() {} #else #if defined(_SEQUENT_) || defined(sequent) void tulip_InitClocks() { if ( pcxxT_notinit ) { pcxxT_notinit = 0; usclk_init(); } } #else #ifdef butterfly void tulip_InitClocks() {} #else /* added SP1_T instead of SP1 by elj 3/26/97 -- tb0time not available on SP2 */ #ifdef __SP1_T__ # include double pcxxT_time; double pcxxT_start; void tulip_InitClocks() { if ( pcxxT_notinit ) { pcxxT_notinit = 0; tb0time(&pcxxT_time); pcxxT_start = floor(pcxxT_time*1.0e-5)*1.0e5; } } #else #ifdef __SOLARIS2__ # include static int pcxxT_fd; static void pcxx_InitUserClock() { char proc[64]; pcxxT_notinit = 0; sprintf(proc,"/proc/%d", getpid()); pcxxT_fd = open(proc,O_RDONLY); } #endif #if !defined( __T3D__) && !defined(_CRAYT3E) # include static long pcxxT_secs = 0L; unsigned long int pcxxT_GetClock() { struct timeval tp; gettimeofday (&tp, 0); return ( (tp.tv_sec - pcxxT_secs) * 1000000 + tp.tv_usec ); } void tulip_InitClocks() { struct timeval tp; if ( pcxxT_notinit ) { pcxxT_notinit = 0; gettimeofday (&tp, 0); pcxxT_secs = tp.tv_sec; #ifdef __SOLARIS2__ pcxx_InitUserClock(); #endif } } #endif #endif #endif #endif #endif #endif /*********************************************************************/ /* void tulip_UserClock */ /*********************************************************************/ #include #ifdef __SOLARIS2__ /* This is a problem. Version 2.5 of Solaris (at least) does not have * rusage.h, preferring to include the definition of struct rusage in * resource.h. Version 2.3 of Solaris (at least) has resource.h but * it does not include struct rusage, which is rather defined in rusage.h * * The _right_ fix */ # ifdef USE_RUSAGE_H # include # else # include # endif # include #else # include #endif #ifdef __hpux #include #define getrusage(a,b) syscall(SYS_getrusage,a,b) #endif #if defined(_SEQUENT_) || defined(cray) && !defined(__T3D__) && !defined(_CRAYT3E) # include //# include # include # if defined(cray) #ifndef HZ # define HZ CLK_TCK #endif /* HZ */ # endif /* double tulip_UserClock() { struct tms timbuf; times(&timbuf); return ((double) timbuf.tms_utime + timbuf.tms_stime) / (double) HZ; } */ /* NOTE : times clashes with C++ times. */ #else #if (defined (CRAYKAI) || defined(CRAYCC)) #else double tulip_UserClock() { return -1; /* Not implemented for now */ } #endif /* CRAYKAI || CRAYCC */ #ifdef __SOLARIS2__ double tulip_UserClock() { prusage_t myrusage; ioctl(pcxxT_fd, PIOCUSAGE, &myrusage); return (double)(myrusage.pr_utime.tv_sec+myrusage.pr_stime.tv_sec) + ((double)(myrusage.pr_utime.tv_nsec+myrusage.pr_stime.tv_nsec) * 1.0e-9); } /* #else #if !defined(__ksr__) && !defined(__T3D__) && !defined(_CRAYT3E) double tulip_UserClock() { struct rusage myrusage; getrusage(RUSAGE_SELF,&myrusage); return (double)(myrusage.ru_utime.tv_sec+myrusage.ru_stime.tv_sec) + ((double)(myrusage.ru_utime.tv_usec+myrusage.ru_stime.tv_usec) * 1.0e-6); } #endif */ #endif #endif /*********************************************************************/ /* tulip_WallClockTimers */ /* tulip_UserClockTimers */ /*********************************************************************/ #define MAXTIMERS 64 #if ! defined(__ksr__) || defined(UNIPROC) # define __private #endif /* Wall clock timers */ __private static double WTimerStart[MAXTIMERS]; __private static double WTimerStop[MAXTIMERS]; __private static double WTimerElapsed[MAXTIMERS]; /* User clock timers */ #ifndef CM5 __private static double UTimerStart[MAXTIMERS]; __private static double UTimerStop[MAXTIMERS]; __private static double UTimerElapsed[MAXTIMERS]; #endif #ifdef CM5 #include #endif int tulip_UserTimerClear(int i) { PCXX_EVENT (PCXX_EC_TIMER, PCXX_UTIMER_CLEAR, i); #ifdef CM5 CMMD_node_timer_clear(i); #else UTimerStart[i] = 0.0; UTimerStop[i] = 0.0; UTimerElapsed[i] = 0.0; #endif return 1; } int tulip_UserTimerStart(int i) { PCXX_EVENT (PCXX_EC_TIMER, PCXX_UTIMER_START + i, 0); #ifdef CM5 return CMMD_node_timer_start(i); #else UTimerStart[i] = tulip_UserClock(); #endif return 1; } int tulip_UserTimerStop(int i) { PCXX_EVENT (PCXX_EC_TIMER, PCXX_UTIMER_STOP + i, 0); #ifdef CM5 CMMD_node_timer_stop(i); #else UTimerStop[i] = tulip_UserClock() - UTimerStart[i]; UTimerElapsed[i] = UTimerElapsed[i] + UTimerStop[i]; #endif return 1; } double tulip_UserTimerElapsed(int i) { #ifdef CM5 return CMMD_node_timer_elapsed(i); #else return UTimerElapsed[i]; #endif } /*******************************************************************/ int tulip_WallTimerClear(int i) { PCXX_EVENT (PCXX_EC_TIMER, PCXX_WTIMER_CLEAR, i); WTimerStart[i] = 0.0; WTimerStop[i] = 0.0; WTimerElapsed[i] = 0.0; return 1; } int tulip_WallTimerStart(int i) { PCXX_EVENT (PCXX_EC_TIMER, PCXX_WTIMER_START + i, 0); WTimerStart[i] = tulip_WallClock(); return 1; } int tulip_WallTimerStop(int i) { PCXX_EVENT (PCXX_EC_TIMER, PCXX_WTIMER_STOP + i, 0); WTimerStop[i] = tulip_WallClock() - WTimerStart[i]; WTimerElapsed[i] = WTimerElapsed[i] + WTimerStop[i]; return 1; } double tulip_WallTimerElapsed(int i) { return WTimerElapsed[i]; } tau-2.16.4/src/Profile/UserEvent.cpp000066400000000000000000000511531062343042700172160ustar00rootroot00000000000000/**************************************************************************** ** TAU Portable Profiling Package ** ** http://www.cs.uoregon.edu/research/tau ** ***************************************************************************** ** Copyright 1997 ** ** Department of Computer and Information Science, University of Oregon ** ** Advanced Computing Laboratory, Los Alamos National Laboratory ** ****************************************************************************/ /*************************************************************************** ** File : UserEvent.cpp ** ** Description : TAU Profiling Package ** ** Author : Sameer Shende ** ** Contact : sameer@cs.uoregon.edu sameer@acl.lanl.gov ** ** Flags : Compile with ** ** -DPROFILING_ON to enable profiling (ESSENTIAL) ** ** -DPROFILE_STATS for Std. Deviation of Excl Time ** ** -DSGI_HW_COUNTERS for using SGI counters ** ** -DPROFILE_CALLS for trace of each invocation ** ** -DSGI_TIMERS for SGI fast nanosecs timer ** ** -DTULIP_TIMERS for non-sgi Platform ** ** -DPOOMA_STDSTL for using STD STL in POOMA src ** ** -DPOOMA_TFLOP for Intel Teraflop at SNL/NM ** ** -DPOOMA_KAI for KCC compiler ** ** -DDEBUG_PROF for internal debugging messages ** ** -DPROFILE_CALLSTACK to enable callstack traces ** ** Documentation : See http://www.cs.uoregon.edu/research/tau ** ***************************************************************************/ ////////////////////////////////////////////////////////////////////// // Note: The default behavior of this library is to calculate all the // statistics (min, max, mean, stddev, etc.) If the user wishes to // override these settings, SetDisableXXX routines can be used to do so ////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////// // Include Files ////////////////////////////////////////////////////////////////////// //#define DEBUG_PROF #include "Profile/Profiler.h" #ifdef TAU_WINDOWS typedef __int64 x_int64; typedef unsigned __int64 x_uint64; #else typedef long long x_int64; typedef unsigned long long x_uint64; #endif #include #include //#include #ifdef TAU_DOT_H_LESS_HEADERS #include using namespace std; #else /* TAU_DOT_H_LESS_HEADERS */ #include #endif /* TAU_DOT_H_LESS_HEADERS */ #ifdef TRACING_ON #ifdef TAU_EPILOG #include "elg_trc.h" #else /* TAU_EPILOG */ #define PCXX_EVENT_SRC #include "Profile/pcxx_events.h" #endif /* TAU_EPILOG */ #endif // TRACING_ON #ifdef PGI template void vector::insert_aux(vector::iterator, TauUserEvent *const &); template TauUserEvent** copy_backward(TauUserEvent**,TauUserEvent**,TauUserEvent**); template TauUserEvent** uninitialized_copy(TauUserEvent**,TauUserEvent**,TauUserEvent**); #endif // PGI vector& TheEventDB(void) { static vector EventDB; return EventDB; } // Add User Event to the EventDB void TauUserEvent::AddEventToDB() { RtsLayer::LockDB(); TheEventDB().push_back(this); DEBUGPROFMSG("Successfully registered event " << GetEventName() << endl;); DEBUGPROFMSG("Size of eventDB is " << TheEventDB().size() < 1) { MinValue[tid] = data < MinValue[tid] ? data : MinValue[tid]; } else MinValue[tid] = data; } if (!GetDisableMax()) { // Max is not disabled if (NumEvents[tid] > 1) { MaxValue[tid] = MaxValue[tid] < data ? data : MaxValue[tid]; } else MaxValue[tid] = data; } if (!GetDisableMean()) { // Mean is not disabled SumValue[tid] += data; } if (!GetDisableStdDev()) { // Standard Deviation is not disabled SumSqrValue[tid] += data*data; } #endif /* PROFILING_ON */ return; // completed calculating statistics for this event } // Return the data stored in the class TAU_EVENT_DATATYPE TauUserEvent::GetMin(int tid) { if (NumEvents[tid] != 0L) { return MinValue[tid]; } else return 0; } TAU_EVENT_DATATYPE TauUserEvent::GetMax(int tid) { if (NumEvents[tid] != 0L) { return MaxValue[tid]; } else return 0; } TAU_EVENT_DATATYPE TauUserEvent::GetSumValue(int tid) { if (NumEvents[tid] != 0L) { return SumValue[tid]; } else return 0; } TAU_EVENT_DATATYPE TauUserEvent::GetMean(int tid) { if (NumEvents[tid] != 0L) { return (SumValue[tid]/NumEvents[tid]); } else return 0; } double TauUserEvent::GetSumSqr(int tid) { return (SumSqrValue[tid]); } long TauUserEvent::GetNumEvents(int tid) { return NumEvents[tid]; } // Get the event name const char * TauUserEvent::GetEventName (void) const { return EventName.c_str(); } // Set the event name void TauUserEvent::SetEventName (const char *newname) { EventName = newname; } // Set the event name void TauUserEvent::SetEventName (string newname) { EventName = newname; } bool TauUserEvent::GetDisableMin(void) { return DisableMin; } bool TauUserEvent::GetDisableMax(void) { return DisableMax; } bool TauUserEvent::GetDisableMean(void) { return DisableMean; } bool TauUserEvent::GetDisableStdDev(void) { return DisableStdDev; } // Set Routines void TauUserEvent::SetDisableMin(bool value) { DisableMin = value; return; } void TauUserEvent::SetDisableMax(bool value) { DisableMax = value; return; } void TauUserEvent::SetDisableMean(bool value) { DisableMean = value; return; } void TauUserEvent::SetDisableStdDev(bool value) { DisableStdDev = value; return; } TauUserEvent::~TauUserEvent(void) { DEBUGPROFMSG(" DTOR CALLED for " << GetEventName() << endl;); } void TauUserEvent::ReportStatistics(bool ForEachThread) { TAU_EVENT_DATATYPE TotalNumEvents, TotalSumValue, Minima, Maxima ; vector::iterator it; Maxima = Minima = 0; cout << "TAU Runtime Statistics" <GetEventName() << "\n Min " << (*it)->GetMin() << "\n Max " << (*it)->GetMax() << "\n Mean " << (*it)->GetMean() << "\n Sum Sqr " << (*it)->GetSumSqr() << "\n NumEvents " << (*it)->GetNumEvents()<< endl;); TotalNumEvents = TotalSumValue = 0; for (int tid = 0; tid < TAU_MAX_THREADS; tid++) { if ((*it)->GetNumEvents(tid) > 0) { // There were some events on this thread TotalNumEvents += (*it)->GetNumEvents(tid); TotalSumValue += (*it)->GetSumValue(tid); if (!(*it)->GetDisableMin()) { // Min is not disabled // take the lesser of Minima and the min on that thread if (tid > 0) { // more than one thread Minima = (*it)->GetMin(tid) < Minima ? (*it)->GetMin(tid) : Minima; } else { // this is the first thread. Initialize Minima to the min on it. Minima = (*it)->GetMin(tid); } } if (!(*it)->GetDisableMax()) { // Max is not disabled // take the maximum of Maxima and max on that thread if (tid > 0) { // more than one thread Maxima = (*it)->GetMax(tid) > Maxima ? (*it)->GetMax(tid) : Maxima; } else { // this is the first thread. Initialize Maxima to the max on it. Maxima = (*it)->GetMax(tid); } } if (ForEachThread) { // true, print statistics for this thread cout << "n,c,t "<GetEventName() << endl << " Number : " << (*it)->GetNumEvents(tid) <GetMin(tid) << endl << " Max : " << (*it)->GetMax(tid) << endl << " Mean : " << (*it)->GetMean(tid) << endl << " Sum : " << (*it)->GetSumValue(tid) << endl << endl; } } // there were no events on this thread } // for all threads cout << "*************************************************************" << endl; cout << "Cumulative Statistics over all threads for Node: " << RtsLayer::myNode() << " Context: " << RtsLayer::myContext() << endl; cout << "*************************************************************" << endl; cout << "Event Name = " << (*it)->GetEventName() << endl; cout << "Total Number = " << TotalNumEvents << endl; cout << "Total Value = " << TotalSumValue << endl; cout << "Minimum Value = " << Minima << endl; cout << "Maximum Value = " << Maxima << endl; cout << "-------------------------------------------------------------" <& TheContextMap(void) { // to avoid initialization problems of non-local static variables static map contextmap; return contextmap; } ////////////////////////////////////////////////////////////////////// #define TAU_DEFAULT_CONTEXT_CALLPATH_DEPTH 2 ////////////////////////////////////////////////////////////////////// // How deep should the callpath be? The default value is 2 ////////////////////////////////////////////////////////////////////// int& TauGetContextCallPathDepth(void) { char *depth; static int value = 0; if (value == 0) { if ((depth = getenv("TAU_CALLPATH_DEPTH")) != NULL) { value = atoi(depth); if (value > 1) { return value; } else { value = TAU_DEFAULT_CONTEXT_CALLPATH_DEPTH; return value; /* default value */ } } else { value = TAU_DEFAULT_CONTEXT_CALLPATH_DEPTH; return value; } } else return value; } //////////////////////////////////////////////////////////////////////////// // Formulate Context Comparison Array ////////////////////////////////////////////////////////////////////// long* TauFormulateContextComparisonArray(Profiler *p, TauUserEvent *uevent) { int depth = TauGetContextCallPathDepth(); /* Create a long array with size depth+1. We need to put the depth * in it as the 0th index */ long *ary = new long [depth+2]; int i = 0; int j; Profiler *current = p; /* argument */ /* initialize the array */ for (j = 0; j < depth+1; j++) { ary[j] = 0L; } /* use the clean array now */ if (ary) { ary[0] = depth; /* this tells us how deep it is */ while (current != NULL && depth != 0) { i++; /* increment i */ ary[i] = (long) current->ThisFunction; depth --; current = current->ParentProfiler; } } ary[i] = (long) uevent; return ary; } //////////////////////////////////////////////////////////////////////////// // Formulate Context Callpath name string //////////////////////////////////////////////////////////////////////////// string * TauFormulateContextNameString(Profiler *p) { DEBUGPROFMSG("Inside TauFormulateContextNameString()"< "); string *name = new string(""); while (current != NULL && depth != 0) { if (current != p) *name = current->ThisFunction->GetName() + string(" ") + current->ThisFunction->GetType() + delimiter + *name; else *name = current->ThisFunction->GetName() + string (" ") + current->ThisFunction->GetType(); current = current->ParentProfiler; depth --; } DEBUGPROFMSG("TauFormulateContextNameString:Name: "<<*name <GetEventName(); else return (const char *)NULL; } //////////////////////////////////////////////////////////////////////////// // Trigger the context event //////////////////////////////////////////////////////////////////////////// void TauContextUserEvent::TriggerEvent( TAU_EVENT_DATATYPE data, int tid) { if (!DisableContext) { long *comparison = 0; TauUserEvent *ue; /* context tracking is enabled */ Profiler *current = Profiler::CurrentProfiler[tid]; comparison = TauFormulateContextComparisonArray(current, uevent); map::iterator it = TheContextMap().find(comparison); if (it == TheContextMap().end()) { string *ctxname = TauFormulateContextNameString(current); string contextname(uevent->EventName + " : " + *ctxname); DEBUGPROFMSG("Couldn't find string in map: "<<*comparison<::value_type(comparison, ue)); ue->ctxevt = this; /* store the current object in the user event */ delete ctxname; /* free up the string memory */ } else { /* found it! Get the user defined event from the map */ ue = (*it).second; delete comparison; // free up memory when name is found } /* Now we trigger this event */ if (ue) { /* it is not null, trigger it */ contextevent = ue; /* store this context event, so we can get its name */ contextevent->TriggerEvent(data, tid); } } uevent->TriggerEvent(data, tid); } /*************************************************************************** * $RCSfile: UserEvent.cpp,v $ $Author: sameer $ * $Revision: 1.20 $ $Date: 2006/06/27 19:26:56 $ * POOMA_VERSION_ID: $Id: UserEvent.cpp,v 1.20 2006/06/27 19:26:56 sameer Exp $ ***************************************************************************/ tau-2.16.4/src/Profile/WindowsThreadLayer.cpp000066400000000000000000000201221062343042700210450ustar00rootroot00000000000000/**************************************************************************** ** TAU Portable Profiling Package ** ** http://www.cs.uoregon.edu/research/tau ** ***************************************************************************** ** Copyright 1997 ** ** Department of Computer and Information Science, University of Oregon ** ** Advanced Computing Laboratory, Los Alamos National Laboratory ** ****************************************************************************/ /*************************************************************************** ** File : WindowsThreadLayer.cpp ** ** Description : TAU Profiling Package RTS Layer definitions ** ** for supporting Microsoft Windows' Threads ** ** Author : Robert Ansell-Bell ** ** Contact : bertie@cs.uoregon.edu ** ** Flags : Compile with ** ** -DPROFILING_ON to enable profiling (ESSENTIAL) ** ** -DPROFILE_STATS for Std. Deviation of Excl Time ** ** -DSGI_HW_COUNTERS for using SGI counters ** ** -DPROFILE_CALLS for trace of each invocation ** ** -DSGI_TIMERS for SGI fast nanosecs timer ** ** -DTULIP_TIMERS for non-sgi Platform ** ** -DPOOMA_STDSTL for using STD STL in POOMA src ** ** -DPOOMA_TFLOP for Intel Teraflop at SNL/NM ** ** -DPOOMA_KAI for KCC compiler ** ** -DDEBUG_PROF for internal debugging messages ** ** -DPROFILE_CALLSTACK to enable callstack traces ** ** Documentation : See http://www.cs.uoregon.edu/research/tau ** ***************************************************************************/ #ifdef TAU_WINDOWS ////////////////////////////////////////////////////////////////////// // Include Files ////////////////////////////////////////////////////////////////////// #include using namespace std; #include "Profile/Profiler.h" ///////////////////////////////////////////////////////////////////////// // Member Function Definitions For class WindowsThreadLayer // This allows us to get thread ids from 0..N-1 instead of long nos // as generated by built-in threadid calls. ///////////////////////////////////////////////////////////////////////// DWORD WindowsThreadLayer::tauWindowsthreadId; HANDLE WindowsThreadLayer::tauThreadcountMutex; HANDLE WindowsThreadLayer::tauDBMutex; HANDLE WindowsThreadLayer::tauEnvMutex; int WindowsThreadLayer::tauThreadCount = 0; //////////////////////////////////////////////////////////////////////// // RegisterThread() should be called before any profiling routines are // invoked. This routine sets the thread id that is used by the code in // FunctionInfo and Profiler classes. This should be the first routine a // thread should invoke from its wrapper. Note: main() thread shouldn't // call this routine. //////////////////////////////////////////////////////////////////////// int WindowsThreadLayer::RegisterThread(void) { int *threadId = new int; DWORD WaitCheck; WaitCheck = WaitForSingleObject(tauThreadcountMutex, INFINITE); if(WaitCheck == WAIT_OBJECT_0) { tauThreadCount ++; // A thread should call this routine exactly once. *threadId = tauThreadCount; DEBUGPROFMSG("Thread id "<< tauThreadCount<< " Created! "< #include #include //declare the sys_ktau_gettimeofday syscall //_syscall2(int,ktau_gettimeofday,struct timeval *,tv,struct timezone *,tz); int ktau_gettimeofday(struct timeval *tv, struct timezone *tz) { //return syscall(318, tv, tz); return syscall(__NR_ktau_gettimeofday, tv, tz); } /*************************************************************************** * $RCSfile: ktau_syscall.c,v $ $Author: anataraj $ * $Revision: 1.3 $ $Date: 2006/11/09 08:05:46 $ ***************************************************************************/ tau-2.16.4/src/Profile/pcxx_events.cpp000066400000000000000000000213461062343042700176450ustar00rootroot00000000000000/*********************************************************************/ /* pC++/Sage++ Copyright (C) 1994 */ /* Indiana University University of Oregon University of Rennes */ /*********************************************************************/ /* * pcxx_event.c: simple SW monitor routines * * (c) 1994 Jerry Manic Saftware * * Version 3.0 */ # include # include # include # include # include # include # include # include # if !defined(__ksr__) || defined(UNIPROC) # define __private # endif # define PCXX_EVENT_SRC # define TRACING_ON 1 # include "Profile/pcxx_events.h" /* # include "TulipTimers.h" */ extern "C" time_t time(time_t * t); __private unsigned long int pcxx_ev_class = PCXX_EC_TRACER | PCXX_EC_TIMER; # ifndef TRUE # define FALSE 0 # define TRUE 1 # endif /* -- event record buffer ------------------------------------ */ __private static PCXX_EV pcxx_buf[PCXX_BUFSIZE]; /* -- pointer to next free element of event record buffer ---- */ __private PCXX_EV *pcxx_ev_ptr = pcxx_buf; /* -- pointer to last available element of event record buffer */ /* -- need one place for flush event => - 1 ------------------ */ __private PCXX_EV *pcxx_ev_max = pcxx_buf + PCXX_BUFSIZE - 1; /* -- event trace file descriptor ---------------------------- */ __private static int pcxx_fd; /* -- initialization status flags ---------------------------- */ __private static int pcxx_num_init[PCXX_MAXPROCS]; /*__private static int pcxx_not_first[PCXX_MAXPROCS]; */ /* -- Use Profiling interface for time -- */ long pcxx_GetUSecLong(void) { return (long) RtsLayer::getUSecD(); } /* -- write event to buffer only [without overflow check] ---- */ static void pcxx_EventOnly(long int ev,long int par) { pcxx_ev_ptr->ev = ev; pcxx_ev_ptr->ti = pcxx_GetUSecLong(); pcxx_ev_ptr->par = par; pcxx_ev_ptr->nid = PCXX_MYNODE; pcxx_ev_ptr->tid = PCXX_MYTHREAD; pcxx_ev_ptr++; } /* -- write event buffer to file ----------------------------- */ void pcxx_EvFlush() { static PCXX_EV flush_end = { PCXX_EV_FLUSH_EXIT, 0, 0, 0L }; if ( pcxx_ev_ptr != pcxx_buf ) { if ( pcxx_ev_class & PCXX_EC_TRACER ) pcxx_EventOnly (PCXX_EV_FLUSH_ENTER, pcxx_ev_ptr - pcxx_buf); write (pcxx_fd, pcxx_buf, (pcxx_ev_ptr - pcxx_buf) * sizeof(PCXX_EV)); if ( pcxx_ev_class & PCXX_EC_TRACER ) { flush_end.nid = PCXX_MYNODE; flush_end.ti = pcxx_GetUSecLong(); write (pcxx_fd, &flush_end, sizeof(PCXX_EV)); } pcxx_ev_ptr = pcxx_buf; } } /* -- signal catching to flush event buffers ----------------- */ # ifndef NSIG # define NSIG 32 # endif static SIGNAL_TYPE (*sighdlr[NSIG])(SIGNAL_ARG_TYPE); static void wrap_up(int sig) { fprintf (stderr, "signal %d on %d - flushing event buffer...\n", sig, PCXX_MYNODE); pcxx_EvFlush (); fprintf (stderr, "done.\n"); if ( sighdlr[sig] != SIG_IGN ) (* sighdlr)(sig); exit (1); } static void init_wrap_up() { # ifdef SIGINT sighdlr[SIGINT ] = signal (SIGINT , wrap_up); # endif # ifdef SIGQUIT sighdlr[SIGQUIT] = signal (SIGQUIT, wrap_up); # endif # ifdef SIGILL sighdlr[SIGILL ] = signal (SIGILL , wrap_up); # endif # ifdef SIGFPE sighdlr[SIGFPE ] = signal (SIGFPE , wrap_up); # endif # ifdef SIGBUS sighdlr[SIGBUS ] = signal (SIGBUS , wrap_up); # endif # ifdef SIGTERM sighdlr[SIGTERM] = signal (SIGTERM, wrap_up); # endif # ifdef SIGABRT sighdlr[SIGABRT] = signal (SIGABRT, wrap_up); # endif # ifdef SIGSEGV sighdlr[SIGSEGV] = signal (SIGSEGV, wrap_up); # endif } /* -- initialize SW monitor and open trace file(s) ----------- */ void pcxx_EvInit(char *name) { char *ptr; char *ptr1; PCXX_EV *pcxx_iter = pcxx_buf; static int first_time = 0; /* Sameer's fix to pcxx_num_init[] = 0 - error on mpi in sgi8k*/ if (first_time == 0) { first_time = 1; # ifdef UNIPROC ptr = name; # else ptr = (char *) PCXX_MALLOC (strlen(name) + 1); strcpy (ptr, name); if ( ptr1 = strchr (ptr, '#') ) { *ptr1++ = PCXX_MYNODE / 1000 + '0'; *ptr1++ = PCXX_MYNODE % 1000 / 100 + '0'; *ptr1++ = PCXX_MYNODE % 100 / 10 + '0'; *ptr1 = PCXX_MYNODE % 10 + '0'; } else { fprintf (stderr, "%s: trace file name does not contain '####'\n", name); exit (1); } # endif init_wrap_up (); if ((pcxx_fd = open (ptr, O_WRONLY|O_CREAT|O_TRUNC|O_APPEND, 0600)) < 0) { fprintf (stderr, "pcxx_EvInit[open]: "); perror (ptr); exit (1); } /* there may be some records in pcxx_ev_ptr already. Make sure that the first record has node id set properly */ if ((&pcxx_buf[0])->ev == PCXX_EV_INIT) { /* first record is init */ for(pcxx_iter = pcxx_buf; pcxx_iter != pcxx_ev_ptr ; pcxx_iter++) { pcxx_iter->nid = PCXX_MYNODE; } } else { /* either the first record is blank - in which case we should put INIT record, or it is an error */ if (pcxx_ev_ptr == pcxx_buf) { /* no records in here */ pcxx_Event(PCXX_EV_INIT, pcxx_ev_class); } else { printf("Warning: pcxx_EvInit(): First record is not INIT\n"); } } if ( pcxx_ev_class & PCXX_EC_TRACER ) pcxx_Event (PCXX_EV_WALL_CLOCK, time((time_t *)0)); } pcxx_num_init[PCXX_MYNODE]++; /* pcxx_not_first[PCXX_MYNODE] = TRUE; */ } /* -- write event to buffer ---------------------------------- */ void pcxx_Event(long int ev, long int par) { static int first_time = 0; if (first_time == 0) { if (ev != PCXX_EV_INIT) { pcxx_ev_ptr = pcxx_buf; /* we need to ensure that INIT is the first event */ pcxx_ev_ptr->ev = PCXX_EV_INIT; pcxx_ev_ptr->ti = pcxx_GetUSecLong(); pcxx_ev_ptr->par = pcxx_ev_class; /* init event */ /* probably the nodeid is not set yet */ pcxx_ev_ptr->nid = PCXX_MYNODE; pcxx_ev_ptr->tid = PCXX_MYTHREAD; pcxx_ev_ptr++; /* proceed to add this record, nodeid will be set later */ } first_time = 1; } pcxx_ev_ptr->ev = ev; pcxx_ev_ptr->ti = pcxx_GetUSecLong(); pcxx_ev_ptr->par = par; pcxx_ev_ptr->nid = PCXX_MYNODE; pcxx_ev_ptr->tid = PCXX_MYTHREAD; pcxx_ev_ptr++; if ( pcxx_ev_ptr >= pcxx_ev_max ) pcxx_EvFlush (); } /* -- terminate SW tracing ----------------------------------- */ void pcxx_EvClose() { pcxx_num_init[PCXX_MYNODE]--; if ( pcxx_num_init[PCXX_MYNODE] == 0 ) { if ( pcxx_ev_class & PCXX_EC_TRACER ) { pcxx_Event (PCXX_EV_CLOSE, 0); pcxx_Event (PCXX_EV_WALL_CLOCK, time((time_t *)0)); } pcxx_EvFlush (); close (pcxx_fd); } } /* -- write long event to buffer ----------------------------- */ # define CONT_EV_LEN (sizeof(PCXX_EV) - sizeof(long int)) void pcxx_LongEvent(long int ev, int ln, char *par) { char *buf; int i, j, cev_no; cev_no = ln / CONT_EV_LEN + ((ln % CONT_EV_LEN) > 0); /* -- inlined pcxx_Event (ev, cev_no); ----------------------- */ pcxx_ev_ptr->ev = ev; pcxx_ev_ptr->ti = pcxx_GetUSecLong(); pcxx_ev_ptr->par = ln; pcxx_ev_ptr->nid = PCXX_MYNODE; pcxx_ev_ptr->tid = PCXX_MYTHREAD; pcxx_ev_ptr++; if ( pcxx_ev_ptr >= pcxx_ev_max ) pcxx_EvFlush (); /* -- inlined pcxx_Event (ev, cev_no); ----------------------- */ if ( ln ) { for (i=0; iev = PCXX_EV_CONT_EVENT; buf = ((char *) pcxx_ev_ptr) + sizeof(short unsigned int); for (j=0; j= pcxx_ev_max ) pcxx_EvFlush (); } } } #if defined( TRACING_ON ) && defined( ARIADNE_SUPPORT ) /* Function to trace the events of Ariadne. */ void pcxx_AriadneTrace (long int event_class, long int event, int pid, int oid, int rwtype, int mtag, int par) { /* This routine writes the ariadne events to the trace file */ long int trace_value = 0L; /* the first parameter to be traced */ long int parameter = 0L; /* dummy to shift the par by 32 bits */ /* Even for pC++ events we use U as the event rwtype and PCXX_... as the utag */ /* This way we can keep the old format for tracing : parameter (32), pid (10), oid (10), rwtype (4) , utag (8) for 64 bit long int */ parameter = (long int) par; if (sizeof (long int) == 8) { /* This is true of SGI8K */ /* care has to be taken to ensure that mtag is 8 bits long */ trace_value = (parameter << 32) | (pid << 22) | (oid << 12) | (rwtype << 8) | mtag; /* printf("Tracing ec = %lx, ev = %lx, pid = %d, oid = %d, mtag = %d, rwtype = %d, parameter = %d, trace_value = %ld\n", event_class, event, pid, oid, mtag, rwtype, parameter, trace_value); */ PCXX_EVENT(event_class, event, trace_value); } } #endif /* defined( TRACING_ON ) && defined( ARIADNE_SUPPORT ) */ /* eof */ tau-2.16.4/src/Profile/rebuild_libmpi000077500000000000000000000040461062343042700175010ustar00rootroot00000000000000#!/bin/ksh # script to regenerate libmpi_r.a incorporating name-shifted profiling code # # David Skinner May 2005 (dskinner@nersc.gov) # if [ $1 != "32" -a $1 != "64" ] ; then echo "rebuild_mpi 32|64" exit fi # Very important, if $WRKDIR is set, then the outputs won't go in the local # directory, and our build with fail. unset WRKDIR export BITS=$1 export BITSUFFIX=$BITS shift # We get TAU_LINKER_OPTS from the makefile (on the command line) TAU_LINKER_OPTS=$* #rm -rf $BITS #mkdir $BITS cd $BITS export USE_PMAPI=-lpmapi export OBJECT_MODE=$BITS export ORIGMPIPATH=/usr/lpp/ppe.poe # exceptions : pm_initfini.o mpifmod_r.o export OBJ=`ar -X $BITS t $ORIGMPIPATH/lib/libmpi_r.a | grep -v pm_initfini | grep -v mpifmod` export NEWOBJ=`ar -X $BITS t $ORIGMPIPATH/lib/libmpi_r.a | sed -e 's/_r/_X/' | grep -v pm_initfini | grep -v mpifmod ` if [ $BITS = "32" ] ; then export XOBJ="pm_initfini.o mpifmod_r.o" fi if [ $BITS = "64" ] ; then export XOBJ="pm_initfini64.o mpifmod64_r.o" fi rm -rf *.exp 32 64 *.o *.a lib tmp* mkdir lib ar -X $BITS xv $ORIGMPIPATH/lib/libmpi_r.a cp $ORIGMPIPATH/lib/libmpi_r.a . for o in $OBJ ; do news=`echo $o | sed -e 's/\.o/.sh/'` if [ $o = "mpicore_r.o" ] ; then # $TAU_LINKER_OPTS here for epilog (among others) rtl_enable -X $BITS -l -R -s $o -L. -lc_r -lpthreads -lpmapi $TAU_LINKER_OPTS sed -e 's#mpicore_r.o -b#tau/* mpicore_r.o -b#' $news > tmp.$nnews mv tmp.$nnews $news elif [ $o = "mpicore64_r.o" ] ; then rtl_enable -X $BITS -l -R -s $o -L. -lc_r -lpthreads -lpmapi $TAU_LINKER_OPTS sed -e 's#mpicore64_r.o -b#tau/* mpicore64_r.o -b#' $news > tmp.$nnews mv tmp.$nnews $news else # can't use $TAU_LINKER_OPTS here or it will fail with epilog rtl_enable -X $BITS -l -R -s $o -L. -lc_r -lpthreads -lpmapi fi sed -e 's/-bnortllib -bnosymbolic -bnoautoexp/-bM:SRE -H512 -T512 -bnoentry -bnoobjreorder/' $news | sed -e 's/$LD/xlC/' > tmp.$nnews mv tmp.$nnews $news #cat $news chmod a+rx $news ./$news done rm -f libmpi_r.a ar -X $BITS rv libmpi_r.a $OBJ $XOBJ tau-2.16.4/src/Profile/tau.py000077500000000000000000000200461062343042700157350ustar00rootroot00000000000000#! /usr/bin/env python # # Class for profiling python code. rev 1.0 6/2/94 # # Based on prior profile module by Sjoerd Mullender... # which was hacked somewhat by: Guido van Rossum # # See profile.doc for more information """Class for profiling Python code.""" # Copyright 1994, by InfoSeek Corporation, all rights reserved. # Written by James Roskind # # Permission to use, copy, modify, and distribute this Python software # and its associated documentation for any purpose (subject to the # restriction in the following sentence) without fee is hereby granted, # provided that the above copyright notice appears in all copies, and # that both that copyright notice and this permission notice appear in # supporting documentation, and that the name of InfoSeek not be used in # advertising or publicity pertaining to distribution of the software # without specific, written prior permission. This permission is # explicitly restricted to the copying and modification of the software # to remain in Python, compiled Python, or other languages (such as C) # wherein the modified or derived code is exclusively imported into a # Python module. # # INFOSEEK CORPORATION DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS # SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND # FITNESS. IN NO EVENT SHALL INFOSEEK CORPORATION BE LIABLE FOR ANY # SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER # RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF # CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN # CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. import sys import os import time import marshal import pytau from optparse import OptionParser __all__ = ["run", "runctx", "help", "Profile"] #************************************************************************** # The following are the static member functions for the profiler class # Note that an instance of Profile() is *not* needed to call them. #************************************************************************** def run(statement, filename=None, sort=-1): """Run statement under profiler optionally saving results in filename This function takes a single argument that can be passed to the "exec" statement, and an optional file name. In all cases this routine attempts to "exec" its first argument and gather profiling statistics from the execution. If no file name is present, then this function automatically prints a simple profiling report, sorted by the standard name string (file/line/function-name) that is presented in each line. """ prof = Profile() try: prof = prof.run(statement) except SystemExit: pass pytau.stop() def runctx(statement, globals, locals, filename=None): """Run statement under profiler, supplying your own globals and locals, optionally saving results in filename. statement and filename have the same semantics as profile.run """ prof = Profile() try: prof = prof.runctx(statement, globals, locals) except SystemExit: pass pytau.stop() # print help def help(): for dirname in sys.path: fullname = os.path.join(dirname, 'profile.doc') if os.path.exists(fullname): sts = os.system('${PAGER-more} ' + fullname) if sts: print '*** Pager exit status:', sts break else: print 'Sorry, can\'t find the help file "profile.doc"', print 'along the Python search path.' class Profile: def __init__(self, timer=None): self.c_func_name = "" self.dispatcher = self.trace_dispatch def trace_dispatch(self, frame, event, arg): if event == "c_call": self.c_func_name = arg.__name__ self.dispatch[event](self, frame) def trace_dispatch_exception(self, frame): return 1 def trace_dispatch_call(self, frame): fcode = frame.f_code classname = "" if frame.f_locals: obj = frame.f_locals.get("self", None) if not obj is None: classname = obj.__class__.__name__ + "::" else: classname = "" methodname = fcode.co_name # methods with "?" are usually the files themselves (no method) # we now name them based on the file if methodname == "?": methodname = fcode.co_filename methodname = methodname[methodname.rfind("/")+1:] tauname = classname + methodname tautype = '[{' + fcode.co_filename + '} {' + str(fcode.co_firstlineno) + '}]' # exclude the "? " timer if not fcode.co_filename == "": tautimer = pytau.profileTimer(tauname, tautype) pytau.start(tautimer) def trace_dispatch_return(self, frame): # exclude the "? " timer if not frame.f_code.co_filename == "": pytau.stop() def trace_dispatch_c_call (self, frame): if self.c_func_name == "start" or self.c_func_name == "stop" or self.c_func_name == "profileTimer" or self.c_func_name == "setprofile": pass else: tautimer = pytau.profileTimer(self.c_func_name, "") pytau.start(tautimer) def trace_dispatch_c_return(self, frame): if self.c_func_name == "start" or self.c_func_name == "stop" or self.c_func_name == "profileTimer": pass else: pytau.stop() dispatch = { "call": trace_dispatch_call, "exception": trace_dispatch_exception, "return": trace_dispatch_return, "c_call": trace_dispatch_c_call, "c_exception": trace_dispatch_return, # the C function returned "c_return": trace_dispatch_c_return, } class fake_code: def __init__(self, filename, line, name): self.co_filename = filename self.co_line = line self.co_name = name self.co_firstlineno = 0 def __repr__(self): return repr((self.co_filename, self.co_line, self.co_name)) class fake_frame: def __init__(self, code, prior, local): self.f_code = code self.f_back = prior self.f_locals = local def simulate_call(self, name): code = self.fake_code('profile', 0, name) frame = self.fake_frame(code, None, None) self.dispatch['call'](self, frame) # The following two methods can be called by clients to use # a profiler to profile a statement, given as a string. def run(self, cmd): import __main__ dict = __main__.__dict__ return self.runctx(cmd, dict, dict) def runctx(self, cmd, globals, locals): self.simulate_call(cmd) sys.setprofile(self.dispatcher) try: exec cmd in globals, locals finally: sys.setprofile(None) return self # This method is more useful to profile a single function call. def runcall(self, func, *args, **kw): self.simulate_call(repr(func)) sys.setprofile(self.dispatcher) try: return func(*args, **kw) finally: sys.setprofile(None) # When invoked as main program, invoke the profiler on a script if __name__ == '__main__': usage = "tau.py scriptfile [arg] ..." if not sys.argv[1:]: print "Usage: ", usage sys.exit(2) class ProfileParser(OptionParser): def __init__(self, usage): OptionParser.__init__(self) self.usage = usage parser = ProfileParser(usage) parser.allow_interspersed_args = False parser.add_option('-o', '--outfile', dest="outfile", help="Save stats to ", default=None) parser.add_option('-s', '--sort', dest="sort", help="Sort order when printing to stdout, based on pstats.Stats class", default=-1) (options, args) = parser.parse_args() sys.argv[:] = args if (len(sys.argv) > 0): sys.path.insert(0, os.path.dirname(sys.argv[0])) run('execfile(%r)' % (sys.argv[0],), options.outfile, options.sort) else: print "Usage: ", usage tau-2.16.4/src/TraceInput/000077500000000000000000000000001062343042700152435ustar00rootroot00000000000000tau-2.16.4/src/TraceInput/Makefile000066400000000000000000000103041062343042700167010ustar00rootroot00000000000000#/**************************************************************************** #** TAU Portable Profiling Package ** #** http://www.cs.uoregon.edu/research/paracomp/tau ** #***************************************************************************** #** Copyright 2003 ** #** Department of Computer and Information Science, University of Oregon ** #** Advanced Computing Laboratory, Los Alamos National Laboratory ** #** Research Center Juelich, Germany ** #****************************************************************************/ #/*************************************************************************** #** File : makefile ** #** Description : TAU trace format reader makefile ** #** Author : Sameer Shende ** #** Contact : sameer@cs.uoregon.edu ** #***************************************************************************/ TAUROOTDIR=../../ include $(TAUROOTDIR)/include/Makefile CXX = $(TAU_CXX) CC = $(TAU_CC) AR = $(TAU_AR) ARFLAGS = rcv ############# For KAI KCC compiler, replace AR accordingly ####### #KAI#AR = $(CXX) #ENDIF# #KAI#ARFLAGS = --one_per -o #ENDIF# ################################################################## ############# For SGI CC compiler, replace AR accordingly ####### #SGICC#AR = $(CXX) -ar #ENDIF# #SGICC#ARFLAGS = -o #ENDIF# ################################################################## ############# For FUJITSU FCC compiler, replace AR accordingly ####### #FUJITSU#AR = $(CXX) --ar #ENDIF# #FUJITSU#ARFLAGS = -o #ENDIF# ################################################################## ############# For SUN CC compiler, replace AR accordingly ####### #SOL2CC#AR = $(CXX) -xar #ENDIF# #SOL2CC#ARFLAGS = -o #ENDIF# ################################################################## ############################################## #PGICC#PRELINK_PHASE = $(CXX) --prelink_objects $(OBJS) #ENDIF# #PGINOPRELINK#PRELINK_PHASE = #ENDIF# ############################################# #USE_DECCXX#EXTRAOBJS=cxx_repository/*.o #ENDIF# RM = /bin/rm -rf INSTALLDEST = $(TAU_PREFIX_INSTALL_DIR)/$(CONFIG_ARCH)/lib #PERFLIB#TAU_INCLUDE = -I$(TAU_PREFIX_INSTALL_DIR)/include #ENDIF# #PERFLIB#TAU_DEFS = $(TAUDEFS) #ENDIF# CFLAGS = $(TAU_INCLUDE) $(TAU_DEFS) $(TAU_MPI_INCLUDE) CXXFLAGS = $(TAU_INCLUDE) $(TAU_DEFS) $(TAU_MPI_INCLUDE) -I. LIBS = $(TAU_MPI_LIBS) $(TAU_SHLIBS) LDFLAGS = $(USER_OPT) $(TAU_LDFLAGS) LIBTARGET = libTAU_traceinput$(TAU_CONFIG).a OBJS = TAU_tf.o TAU_Cwrapper.o TAU_tf_writer.o HDRS = ../../include/TAU_tf.h ../../include/TAU_tf_writer.h TAU_tf_decl.h TAU_tf_headers.h ############################################## all: $(INSTALLDEST)/$(LIBTARGET) install: $(INSTALLDEST)/$(LIBTARGET) $(INSTALLDEST)/$(LIBTARGET): $(LIBTARGET) @echo Installing $? in $(INSTALLDEST) @if [ -d $(INSTALLDEST) ] ; then true; \ else mkdir $(INSTALLDEST) ;fi $(TAU_INSTALL) $? $(INSTALLDEST) $(RM) $(INSTALLDEST)/libTAU_tf.a cd $(INSTALLDEST) && ln -s $(LIBTARGET) libTAU_tf.a $(LIBTARGET): $(OBJS) $(PRELINK_PHASE) $(AR) $(ARFLAGS) $(LIBTARGET) $(OBJS) $(EXTRAOBJS) $(TAU_RANLIB) $(LIBTARGET) TAU_tf.o : TAU_tf.cpp $(HDRS) $(TAU_CXX) $(CXXFLAGS) -c $(@:.o=.cpp) TAU_tf_writer.o : TAU_tf_writer.cpp $(HDRS) $(TAU_CXX) $(CXXFLAGS) -c $(@:.o=.cpp) TAU_Cwrapper.o : TAU_Cwrapper.cpp $(HDRS) $(TAU_CXX) $(CXXFLAGS) -c $(@:.o=.cpp) clean: $(RM) $(OBJS) $(LIBTARGET) *.ii *.ti ti_files cxx_repository ii_files rii_files ############################################## #/*************************************************************************** # * $RCSfile: Makefile,v $ $Author: sameer $ # * $Revision: 1.10 $ $Date: 2006/11/07 23:11:14 $ # * TAU_VERSION_ID: $Id: Makefile,v 1.10 2006/11/07 23:11:14 sameer Exp $ # ***************************************************************************/ tau-2.16.4/src/TraceInput/TAU_Cwrapper.cpp000066400000000000000000000051361062343042700202500ustar00rootroot00000000000000/**************************************************************************** ** TAU Portable Profiling Package ** ** http://www.cs.uoregon.edu/research/paracomp/tau ** ***************************************************************************** ** Copyright 2003 ** ** Department of Computer and Information Science, University of Oregon ** ** Advanced Computing Laboratory, Los Alamos National Laboratory ** ** Research Center Juelich, Germany ** ****************************************************************************/ /*************************************************************************** ** File : TAU_Cwrapper.cpp ** ** Description : TAU trace format reader library's C API ** ** Author : Sameer Shende ** ** Contact : sameer@cs.uoregon.edu ** ***************************************************************************/ #include "TAU_tf.h" /* C API */ /* open a trace file for reading */ extern "C" Ttf_FileHandleT CTtf_OpenFileForInput( const char *name, const char *edf) { return Ttf_OpenFileForInput(name, edf); } /* Seek to an absolute event position. * A negative position indicates to start from the tail of the event stream. * Returns the position if successful or 0 if an error occured */ extern "C" int CTtf_AbsSeek( Ttf_FileHandleT handle, int eventPosition ) { return Ttf_AbsSeek(handle, eventPosition); } /* seek to a event position relative to the current position (just for completeness!) * Returns the position if successful or 0 if an error occured */ extern "C" int CTtf_RelSeek( Ttf_FileHandleT handle, int plusMinusNumEvents ) { return Ttf_RelSeek(handle, plusMinusNumEvents); } /* read n events and call appropriate handlers * Returns the number of records read (can be 0). * Returns a -1 value when an error takes place. Check errno */ extern "C" int CTtf_ReadNumEvents( Ttf_FileHandleT fileHandle, Ttf_CallbacksT callbacks, int numberOfEvents ) { return Ttf_ReadNumEvents(fileHandle, callbacks, numberOfEvents); } /* close a trace file */ extern "C" Ttf_FileHandleT CTtf_CloseFile( Ttf_FileHandleT fileHandle ) { return Ttf_CloseFile(fileHandle); } /*************************************************************************** * $RCSfile: TAU_Cwrapper.cpp,v $ $Author: amorris $ * $Revision: 1.2 $ $Date: 2005/10/11 16:20:38 $ * TAU_VERSION_ID: $Id: TAU_Cwrapper.cpp,v 1.2 2005/10/11 16:20:38 amorris Exp $ ***************************************************************************/ tau-2.16.4/src/TraceInput/TAU_tf.cpp000066400000000000000000000627361062343042700171070ustar00rootroot00000000000000/**************************************************************************** ** TAU Portable Profiling Package ** ** http://www.cs.uoregon.edu/research/paracomp/tau ** ***************************************************************************** ** Copyright 2003 ** ** Department of Computer and Information Science, University of Oregon ** ** Advanced Computing Laboratory, Los Alamos National Laboratory ** ** Research Center Juelich, Germany ** ****************************************************************************/ /*************************************************************************** ** File : TAU_tf.cpp ** ** Description : TAU trace format reader library ** ** Author : Sameer Shende ** ** Contact : sameer@cs.uoregon.edu ** ***************************************************************************/ #include #include #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /* Defines */ #define TAU_MESSAGE_SEND_EVENT -7 #define TAU_MESSAGE_RECV_EVENT -8 void convertEvent(Ttf_fileT *tFile, void *event, int index) { PCXX_EV32 *event32; PCXX_EV64 *event64; switch (tFile->format) { case FORMAT_NATIVE: case FORMAT_32: case FORMAT_64: return; case FORMAT_32_SWAP: event32 = (PCXX_EV32*) event; event32[index].ev = swap32(event32[index].ev); event32[index].nid = swap16(event32[index].nid); event32[index].tid = swap16(event32[index].tid); event32[index].par = swap64(event32[index].par); event32[index].ti = swap64(event32[index].ti); return; case FORMAT_64_SWAP: event64 = (PCXX_EV64*) event; event64[index].ev = swap64(event64[index].ev); event64[index].nid = swap16(event64[index].nid); event64[index].tid = swap16(event64[index].tid); event64[index].par = swap64(event64[index].par); event64[index].ti = swap64(event64[index].ti); // printf ("event.ti = %llu\n", swap64(event64->ti)); return; } return; } #define EVENT_EV 0; #define EVENT_NID 1; #define EVENT_TID 2; #define EVENT_PAR 3; #define EVENT_TI 4; int event_GetEv(Ttf_fileT *tFile, void *event, int index) { PCXX_EV_NATIVE *nativeEvent; PCXX_EV32 *event32; PCXX_EV64 *event64; switch (tFile->format) { case FORMAT_NATIVE: nativeEvent = (PCXX_EV_NATIVE*)event; return nativeEvent[index].ev; case FORMAT_32: case FORMAT_32_SWAP: event32 = (PCXX_EV32*) event; return event32[index].ev; case FORMAT_64: case FORMAT_64_SWAP: event64 = (PCXX_EV64*) event; return event64[index].ev; } return 0; } x_uint64 event_GetTi(Ttf_fileT *tFile, void *event, int index) { PCXX_EV_NATIVE *nativeEvent; PCXX_EV32 *event32; PCXX_EV64 *event64; switch (tFile->format) { case FORMAT_NATIVE: nativeEvent = (PCXX_EV_NATIVE*)event; return nativeEvent[index].ti; case FORMAT_32: case FORMAT_32_SWAP: event32 = (PCXX_EV32*) event; return event32[index].ti; case FORMAT_64: case FORMAT_64_SWAP: event64 = (PCXX_EV64*) event; return event64[index].ti; } return 0; } int event_GetNid(Ttf_fileT *tFile, void *event, int index) { PCXX_EV_NATIVE *nativeEvent; PCXX_EV32 *event32; PCXX_EV64 *event64; switch (tFile->format) { case FORMAT_NATIVE: nativeEvent = (PCXX_EV_NATIVE*)event; return nativeEvent[index].nid; case FORMAT_32: case FORMAT_32_SWAP: event32 = (PCXX_EV32*) event; return event32[index].nid; case FORMAT_64: case FORMAT_64_SWAP: event64 = (PCXX_EV64*) event; return event64[index].nid; } return 0; } int event_GetTid(Ttf_fileT *tFile, void *event, int index) { PCXX_EV_NATIVE *nativeEvent; PCXX_EV32 *event32; PCXX_EV64 *event64; switch (tFile->format) { case FORMAT_NATIVE: nativeEvent = (PCXX_EV_NATIVE*)event; return nativeEvent[index].tid; case FORMAT_32: case FORMAT_32_SWAP: event32 = (PCXX_EV32*) event; return event32[index].tid; case FORMAT_64: case FORMAT_64_SWAP: event64 = (PCXX_EV64*) event; return event64[index].tid; } return 0; } x_int64 event_GetPar(Ttf_fileT *tFile, void *event, int index) { PCXX_EV_NATIVE *nativeEvent; PCXX_EV32 *event32; PCXX_EV64 *event64; switch (tFile->format) { case FORMAT_NATIVE: nativeEvent = (PCXX_EV_NATIVE*)event; return nativeEvent[index].par; case FORMAT_32: case FORMAT_32_SWAP: event32 = (PCXX_EV32*) event; return event32[index].par; case FORMAT_64: case FORMAT_64_SWAP: event64 = (PCXX_EV64*) event; return event64[index].par; } return 0; } /* determine the format of a trace file */ void determineFormat(Ttf_fileT *tFile) { int bytesRead; bool formatFound = false; PCXX_EV32 event32; PCXX_EV64 event64; // 32 bit regular bytesRead = read(tFile->Fid, &event32, sizeof(PCXX_EV32)); lseek(tFile->Fid, 0, SEEK_SET); if (event32.par == 3) { tFile->format = FORMAT_32; tFile->eventSize = sizeof(PCXX_EV32); formatFound = true; // printf ("32 regular!\n"); } // 32 bit swapped bytesRead = read(tFile->Fid, &event32, sizeof(PCXX_EV32)); lseek(tFile->Fid, 0, SEEK_SET); if (swap64(event32.par) == 3) { if (formatFound == true) { // shouldn't happen, if it does, go to native tFile->format = FORMAT_NATIVE; tFile->eventSize = sizeof(PCXX_EV_NATIVE); return; } tFile->format = FORMAT_32_SWAP; tFile->eventSize = sizeof(PCXX_EV32); formatFound = true; // printf ("32 swapped!\n"); } // 64 bit regular bytesRead = read(tFile->Fid, &event64, sizeof(PCXX_EV64)); lseek(tFile->Fid, 0, SEEK_SET); if (event64.par == 3) { if (formatFound == true) { // shouldn't happen, if it does, go to native tFile->format = FORMAT_NATIVE; tFile->eventSize = sizeof(PCXX_EV_NATIVE); return; } tFile->format = FORMAT_64; tFile->eventSize = sizeof(PCXX_EV64); formatFound = true; // printf ("64 regular!\n"); } // 64 bit swapped bytesRead = read(tFile->Fid, &event64, sizeof(PCXX_EV64)); lseek(tFile->Fid, 0, SEEK_SET); if (swap64(event64.par) == 3) { if (formatFound == true) { // shouldn't happen, if it does, go to native tFile->format = FORMAT_NATIVE; tFile->eventSize = sizeof(PCXX_EV_NATIVE); return; } tFile->format = FORMAT_64_SWAP; tFile->eventSize = sizeof(PCXX_EV64); formatFound = true; // printf ("64 swapped!\n"); } if (formatFound == false) { fprintf (stderr, "couldn't determine format, using native!\n"); tFile->format = FORMAT_NATIVE; tFile->eventSize = sizeof(PCXX_EV_NATIVE); } } void Ttf_SetSubtractFirstTimestamp( Ttf_FileHandleT handle, int value ) { Ttf_fileT *tFile = (Ttf_fileT *) handle; tFile->subtractFirstTimestamp = value; } void Ttf_SetNonBlocking( Ttf_FileHandleT handle, int value ) { Ttf_fileT *tFile = (Ttf_fileT *) handle; tFile->nonBlocking = value; } /* Open the trace file and return a pointer to the Ttf_fileT struct that * contains the file id and the maps */ Ttf_FileHandleT Ttf_OpenFileForInput( const char *filename, const char *EDF) { Ttf_fileT *tFile; FILE *fp; /* first, allocate space for the trace file id struct */ tFile = new Ttf_fileT; if (tFile == (Ttf_file *) NULL) { perror("ERROR: memory allocation failed for tFile"); return NULL; } tFile->subtractFirstTimestamp = true; tFile->nonBlocking = false; tFile->forWriting = false; /* Open the trace file */ if ( (tFile->Fid = open (filename, O_RDONLY | O_BINARY | LARGEFILE_OPTION)) < 0 ) { perror (filename); return NULL; } /* Open the EDF (event description file) to read the event * tables*/ if ((fp = fopen (EDF, "rb")) == NULL) { printf("EDF file = %s\n", EDF); perror("ERROR: opening edf file"); return NULL; } /* check that the file is OK. close it for now. It will be re-read when * the event map is filled */ fclose(fp); /* make a copy of the EDF file name */ tFile->EdfFile = strdup(EDF); /* Allocate space for nodeid, thread id map */ tFile->NidTidMap = new NidTidMapT; if (tFile->NidTidMap == (NidTidMapT *) NULL) { perror("ERROR: memory allocation failed for NidTidMap"); return NULL; } /* Allocate space for event id map */ tFile->EventIdMap = new EventIdMapT; if (tFile->EventIdMap == (EventIdMapT *) NULL) { perror("ERROR: memory allocation failed for EventIdMap"); return NULL; } /* Allocate space for group id map */ tFile->GroupIdMap = new GroupIdMapT; if (tFile->GroupIdMap == (GroupIdMapT *) NULL) { perror("ERROR: memory allocation failed for GroupIdMap"); return NULL; } /* initialize clock */ tFile->ClkInitialized = FALSE; /* initialize the first timestamp for the trace */ tFile->FirstTimestamp = 0.0; /* determine the format */ determineFormat (tFile); /* return file handle */ return (Ttf_FileHandleT) tFile; } /* close a trace file */ Ttf_FileHandleT Ttf_CloseFile( Ttf_FileHandleT fileHandle ) { Ttf_fileT *tFile; tFile = (Ttf_fileT *) fileHandle; if (tFile == (Ttf_file *) NULL) return NULL; if (tFile->forWriting == true) { return (Ttf_FileHandleT) Ttf_CloseOutputFile(tFile); } /* Close the trace file using the handle */ if (close(tFile->Fid) < 0) { perror("ERROR: closing trace file"); return NULL; } /* delete the maps and free the memory */ delete tFile->NidTidMap; delete tFile->EventIdMap; delete tFile->GroupIdMap; /* return old file handle */ return fileHandle; } /* Seek to an absolute event position. * A negative position indicates to start from the tail of the event stream. * Returns the position */ int Ttf_AbsSeek( Ttf_FileHandleT handle, int eventPosition ) { Ttf_fileT *tFile = (Ttf_fileT *) handle; off_t position; if (eventPosition > 0) { /* start from the top, to the absolute position */ position = lseek(tFile->Fid, eventPosition*tFile->eventSize, SEEK_SET); if (position) { /* success */ return position/tFile->eventSize; } else { /* failure */ return 0; } } else { /* start from the tail of the event stream */ position = lseek(tFile->Fid, eventPosition*tFile->eventSize, SEEK_END); if (position) { /* success, return the position */ return position/tFile->eventSize; } else { /* failure */ return 0; } } } /* seek to a event position relative to the current position * (just for completeness!) */ int Ttf_RelSeek( Ttf_FileHandleT handle, int plusMinusNumEvents ) { Ttf_fileT *tFile = (Ttf_fileT *) handle; off_t position; /* seek relative to the current position */ position = lseek(tFile->Fid, plusMinusNumEvents*tFile->eventSize, SEEK_CUR); if (position) { /* success */ return position/tFile->eventSize; } else { /* failure */ return 0; } } /* read n events and call appropriate handlers * Returns the number of records read (can be 0). * Returns a -1 value when an error takes place. Check errno */ int Ttf_ReadNumEvents( Ttf_FileHandleT fileHandle, Ttf_CallbacksT callbacks, int numberOfEvents ) { Ttf_fileT *tFile = (Ttf_fileT *) fileHandle; void *traceBuffer = (void*) malloc (TAU_BUFSIZE*tFile->eventSize); long bytesRead, recordsRead, recordsToRead, i; int otherTid, otherNid, msgLen, msgTag; if (tFile == (Ttf_fileT *) NULL) return 0; /* ERROR */ /* How many bytes are to be read? */ recordsToRead = numberOfEvents > TAU_BUFSIZE ? TAU_BUFSIZE : numberOfEvents; /* if clock needs to be initialized, initialize it */ if (!tFile->ClkInitialized) { if (*callbacks.DefClkPeriod) (*callbacks.DefClkPeriod)(callbacks.UserData, 1E-6); /* set flag to initialized */ tFile->ClkInitialized = TRUE; /* Read the first record and check its timestamp * For this we need to lseek to the beginning of the file, read one * record and then lseek it back to where it was */ int originalPosition, currentPosition; originalPosition = lseek(tFile->Fid, 0, SEEK_CUR); #ifdef DEBUG printf("Original position = %d\n", originalPosition); #endif /* DEBUG */ currentPosition = lseek(tFile->Fid, 0, SEEK_SET); if (currentPosition == -1) { perror("lseek failed in Ttf_ReadNumEvents"); } #ifdef DEBUG printf("Current position = %d\n", currentPosition); #endif /* DEBUG */ /* read just one record to get the first timestamp */ while ((bytesRead = read(tFile->Fid, traceBuffer, tFile->eventSize)) != tFile->eventSize) { /* retry! The file may not have any data in it. Wait till it has some */ currentPosition = lseek(tFile->Fid, 0, SEEK_SET); #ifdef DEBUG printf("retrying current position = %d\n", currentPosition); #endif /* DEBUG */ } /* it now has exactly one record */ /* FOR MONITORING, we disable this first timestamp check. Re-introduce it * later! * tFile->FirstTimestamp = traceBuffer[0].ti; * */ convertEvent(tFile, traceBuffer, 0); tFile->FirstTimestamp = event_GetTi(tFile,traceBuffer,0); #ifdef DEBUG printf ("got initial timestamp of %G\n", tFile->FirstTimestamp); #endif /* DEBUG */ /* now return the trace file to its original position */ currentPosition = lseek(tFile->Fid, originalPosition, SEEK_SET); #ifdef DEBUG printf("Returning trace to %d position\n", currentPosition); #endif /* DEBUG */ } /* Read n records and go through each event record */ if ((bytesRead = read(tFile->Fid, traceBuffer, recordsToRead*tFile->eventSize)) != (long)(numberOfEvents * tFile->eventSize) ) { /* Check if data read is inconsistent with the size of trace record */ if ((bytesRead % tFile->eventSize) != 0) { #ifdef DEBUG printf("ERROR reading trace data, bytes read = %d, rec size=%d, recs to read = %d\n", bytesRead, tFile->eventSize, recordsToRead); printf("READ Error: inconsistent trace file. \n"); printf("Bytes read are not integer multiples of the trace record size.\n"); printf("Rewinding %d bytes... \n", bytesRead); #endif /* DEBUG */ int rewind_bytes = -1 * bytesRead; lseek(tFile->Fid, rewind_bytes, SEEK_CUR); return 0; } } /* the number of records read */ recordsRead = bytesRead/tFile->eventSize; /* See if the events are all present */ for (i = 0; i < recordsRead; i++) { convertEvent(tFile, traceBuffer, i); if (!isEventIDRegistered(tFile, event_GetEv(tFile, traceBuffer, i))) { /* if event id is not found in the event id map, read the EDF file */ if (!refreshTables(tFile, callbacks)) { /* error */ return -1; } if (!isEventIDRegistered(tFile, event_GetEv(tFile, traceBuffer, i))) { /* even after reading the edf file, if we don't find the event id, then there's an error */ return -1; } /* we did find the event id, process the trace file */ } /* event is OK. Examine each event and invoke callbacks for Entry/Exit/Node*/ /* first check nodeid, threadid */ //int nid = traceBuffer[i].nid; //int tid = traceBuffer[i].tid; int nid = event_GetNid(tFile, traceBuffer, i); int tid = event_GetTid(tFile, traceBuffer, i); NidTidMapT::iterator nit = tFile->NidTidMap->find( pair(nid,tid)); if (nit == tFile->NidTidMap->end()) { /* this pair of node and thread has not been encountered before */ char nodename[32]; /* sprintf(nodename, "Node %d Thread %d", nid, tid); */ sprintf(nodename, "process %d:%d", nid, tid); /* invoke callback routine */ if (*callbacks.DefThread) (*callbacks.DefThread)(callbacks.UserData, nid, tid, nodename); /* add it to the map! */ (*(tFile->NidTidMap))[pair(nid,tid)] = 1; } /* check the event to see if it is entry or exit */ // double ts = (double) (traceBuffer[i].ti - tFile->FirstTimestamp); // long long parameter = traceBuffer[i].par; double ts; if (tFile->subtractFirstTimestamp) { ts = (double) (event_GetTi(tFile, traceBuffer, i) - tFile->FirstTimestamp); } else { ts = (double) (event_GetTi(tFile, traceBuffer, i)); } long long parameter = event_GetPar(tFile, traceBuffer, i); /* Get param entry from EventIdMap */ Ttf_EventDescrT eventDescr = (*tFile->EventIdMap)[event_GetEv(tFile, traceBuffer, i)]; if ((eventDescr.Param != NULL) && (strcmp(eventDescr.Param,"EntryExit\n")==0)) { /* entry/exit event */ #ifdef DEBUG printf("entry/exit event %s \n",eventDescr.EventName); #endif /* DEBUG */ if (parameter == 1) { /* entry event, invoke the callback routine */ if (*callbacks.EnterState) (*callbacks.EnterState)(callbacks.UserData, ts, nid, tid, event_GetEv(tFile, traceBuffer, i)); } else { if (parameter == -1) { /* exit event */ if (*callbacks.LeaveState) (*callbacks.LeaveState)(callbacks.UserData,ts, nid, tid,event_GetEv(tFile, traceBuffer, i)); } } } /* entry exit events *//* add message passing events here */ else { if ((eventDescr.Param != NULL) && (strcmp(eventDescr.Param,"TriggerValue\n")==0)) { /* User defined event */ if (*callbacks.EventTrigger) { x_uint64 parameter = event_GetPar(tFile, traceBuffer, i); // to use as a double // double dparameter = *(reinterpret_cast(¶meter)); // (*callbacks.EventTrigger)(callbacks.UserData, ts, nid, tid, // event_GetEv(tFile, traceBuffer, i), // dparameter); (*callbacks.EventTrigger)(callbacks.UserData, ts, nid, tid, event_GetEv(tFile, traceBuffer, i), parameter); } } if (eventDescr.Tag == TAU_MESSAGE_SEND_EVENT) { /* send message */ /* See RtsLayer::TraceSendMsg for documentation on the bit patterns of "parameter" */ x_uint64 xpar = parameter; /* extract the information from the parameter */ msgTag = ((xpar>>16) & 0x000000FF) | (((xpar >> 48) & 0xFF) << 8); otherNid = ((xpar>>24) & 0x000000FF) | (((xpar >> 56) & 0xFF) << 8); msgLen = xpar & 0x0000FFFF | (xpar << 22 >> 54 << 16); unsigned int comm = xpar << 16 >> 58; // printf ("sent tag = %d\n", msgTag); // printf ("sent comm = %d\n", comm); // printf ("sent msgLen = %d\n", msgLen); /* If the application is multithreaded, insert call for matching sends/recvs here */ otherTid = 0; if (*callbacks.SendMessage) (*callbacks.SendMessage)(callbacks.UserData, ts, nid, tid, otherNid, otherTid, msgLen, msgTag, comm); /* the args are user, time, source nid (my), source tid (my), dest nid (other), dest * tid (other), size, tag */ } else { /* Check if it is a message receive operation */ if (eventDescr.Tag == TAU_MESSAGE_RECV_EVENT) { /* See RtsLayer::TraceSendMsg for documentation on the bit patterns of "parameter" */ x_uint64 xpar = parameter; /* extract the information from the parameter */ msgTag = ((xpar>>16) & 0x000000FF) | (((xpar >> 48) & 0xFF) << 8); otherNid = ((xpar>>24) & 0x000000FF) | (((xpar >> 56) & 0xFF) << 8); msgLen = xpar & 0x0000FFFF | (xpar << 22 >> 54 << 16); unsigned int comm = xpar << 16 >> 58; /* If the application is multithreaded, insert call for matching sends/recvs here */ otherTid = 0; if (*callbacks.RecvMessage) (*callbacks.RecvMessage)(callbacks.UserData, ts, otherNid, otherTid, nid, tid, msgLen, msgTag, comm); /* the args are user, time, source nid (my), source tid (my), dest nid (other), dest * tid (other), size, tag */ } } } if ((parameter == 0) && (eventDescr.EventName != NULL) && (strcmp(eventDescr.EventName, "\"FLUSH_CLOSE\"") == 0)) { /* reset the flag in NidTidMap to 0 (from 1) */ (*tFile->NidTidMap)[pair(nid,tid)] = 0; /* setting this flag to 0 tells us that a flush close has taken place * on this node, thread */ } else { /* see if it is a WALL_CLOCK record */ if ((parameter != 1) && (parameter != -1) && (eventDescr.EventName != NULL) && (strcmp(eventDescr.EventName, "\"WALL_CLOCK\"") == 0)) { /* ok, it is a wallclock event alright. But is it the *last* wallclock event? * We can confirm that it is if the NidTidMap flag has been set to 0 by a * previous FLUSH_CLOSE call */ if ((*tFile->NidTidMap)[pair(nid,tid)] == 0 ) { #ifdef DEBUG printf("LAST WALL_CLOCK! End of trace file detected \n"); #endif /* DEBUG */ /* see if an end of the trace callback is registered and * if it is, invoke it.*/ if (*callbacks.EndTrace) (*callbacks.EndTrace)(callbacks.UserData, nid, tid); } } } /* is it a WALL_CLOCK record? */ } /* cycle through all records */ free(traceBuffer); /* return the number of event records read */ return recordsRead; } /* Look for an event in the event map */ int isEventIDRegistered(Ttf_fileT *tFile, long int event) { EventIdMapT::iterator it; if ((it = tFile->EventIdMap->find(event)) == tFile->EventIdMap->end()) { /* couldn't locate the event id */ return FALSE; } else { /* located the event id */ return TRUE; } } /* Event ID is not found in the event map. Re-read the event * description file */ int refreshTables(Ttf_fileT *tFile, Ttf_CallbacksT cb) { #ifdef DEBUG printf("Inside refreshTables! \n"); #endif /* DEBUG */ int i,j,k; char linebuf[LINEMAX], eventname[LINEMAX], traceflag[32]; char group[512], param[512]; int numevents, dynamictrace, tag, groupid; long localEventId; EventIdMapT::iterator it; FILE *edf; dynamictrace = FALSE; /* first, open the edf file */ if ((edf = fopen (tFile->EdfFile, "rb")) == NULL ) { printf("ERROR: opening edf file %s\n", tFile->EdfFile); perror (tFile->EdfFile); return 0; } fgets (linebuf, LINEMAX, edf); sscanf (linebuf, "%d %s", &numevents, traceflag); if ((traceflag != NULL) && (strcmp(traceflag, "dynamic_trace_events") == 0)) { dynamictrace = TRUE; } for (i=0; iEventIdMap->find(localEventId)) == tFile->EventIdMap->end()) { /* couldn't locate the event id */ /* fill an event description object */ Ttf_EventDescrT *eventDescr = new Ttf_EventDescrT; eventDescr->Eid = localEventId; eventDescr->EventName = strdup(eventname); eventDescr->Group = strdup(group); eventDescr->Tag = tag; eventDescr->Param = strdup(param); (*(tFile->EventIdMap))[localEventId] = (*eventDescr); /* add it to the map */ #ifdef DEBUG printf("Added event %ld %s %s to the map\n", localEventId, eventname, group); #endif /* DEBUG */ /* invoke callbacks? Check group? */ GroupIdMapT::iterator git = tFile->GroupIdMap->find(eventDescr->Group); if (git == tFile->GroupIdMap->end()) { /* group id not found. Generate group id on the fly */ groupid = tFile->GroupIdMap->size()+1; (*(tFile->GroupIdMap))[eventDescr->Group] = groupid; /* invoke group callback */ /* check Param to see if its a user defined event */ if (strcmp(eventDescr->Param, "EntryExit\n") == 0) { /* it is not a user defined event */ if (*cb.DefStateGroup) (*cb.DefStateGroup)(cb.UserData, groupid, eventDescr->Group); } } else { /* retrieve the stored group id token */ groupid = (*git).second; } /* invoke callback for registering a new state */ if (strcmp(eventDescr->Param, "TriggerValue\n") == 0) { /* it is a user defined event */ if (*cb.DefUserEvent) (*cb.DefUserEvent)(cb.UserData, localEventId, eventDescr->EventName, eventDescr->Tag); } else if (strcmp(eventDescr->Param, "EntryExit\n") == 0) { /* it is an entry/exit event */ if (*cb.DefState) (*cb.DefState)(cb.UserData, localEventId, eventDescr->EventName, groupid); } } /* else, do nothing, examine the next record */ } /* not dynamic trace- what is to be done? */ else { sscanf (linebuf, "%ld %s %d %s %s", &localEventId, group, &tag, eventname, param); } if ( (localEventId < 0) || !*eventname ) { fprintf (stderr, "%s: blurb in line %d\n", tFile->EdfFile, i+2); } } /* for loop */ return TRUE; } #ifdef __cplusplus } #endif /* __cplusplus */ /*************************************************************************** * $RCSfile: TAU_tf.cpp,v $ $Author: amorris $ * $Revision: 1.19 $ $Date: 2006/06/21 18:50:45 $ * TAU_VERSION_ID: $Id: TAU_tf.cpp,v 1.19 2006/06/21 18:50:45 amorris Exp $ ***************************************************************************/ tau-2.16.4/src/TraceInput/TAU_tf_decl.h000066400000000000000000000117431062343042700175330ustar00rootroot00000000000000/**************************************************************************** ** TAU Portable Profiling Package ** ** http://www.cs.uoregon.edu/research/paracomp/tau ** ***************************************************************************** ** Copyright 2003 ** ** Department of Computer and Information Science, University of Oregon ** ** Advanced Computing Laboratory, Los Alamos National Laboratory ** ** Research Center Juelich, Germany ** ****************************************************************************/ /*************************************************************************** ** File : TAU_tf_decl.h ** ** Description : TAU trace format reader library internal data ** ** structures ** ** Author : Sameer Shende ** ** Contact : sameer@cs.uoregon.edu ** ***************************************************************************/ /* TAU Trace format */ #ifndef _TAU_TF_DECL_H_ #define _TAU_TF_DECL_H_ #include "Profile/tau_types.h" /* general declarations */ # ifndef TRUE # define FALSE 0 # define TRUE 1 # endif #ifdef TAU_HP_GNU # define LINEMAX 2*1024 #else # define LINEMAX 64*1024 #endif /* TAU_HP_GNU */ #define TAU_BUFSIZE 1024 #define TAU_MAX_RECORDS 64*1024 /* TAU trace library related declarations */ typedef struct Ttf_EventDescr { int Eid; /* event id */ char *Group; /* state as in TAU_VIZ */ char *EventName; /* name as in "foo" */ int Tag; /* -7 for send etc. */ char *Param; /* param as in EntryExit */ } Ttf_EventDescrT; struct Ttf_ltstr { bool operator()(const char* s1, const char* s2) const { return strcmp(s1, s2) < 0; } }; #define FORMAT_NATIVE 0 // as a fallback #define FORMAT_32 1 #define FORMAT_64 2 #define FORMAT_32_SWAP 3 #define FORMAT_64_SWAP 4 /* for 32 bit platforms */ typedef struct { x_int32 ev; /* -- event id -- */ x_uint16 nid; /* -- node id -- */ x_uint16 tid; /* -- thread id -- */ x_int64 par; /* -- event parameter -- */ x_uint64 ti; /* -- time [us]? -- */ } PCXX_EV32; /* for 64 bit platforms */ typedef struct { x_int64 ev; /* -- event id -- */ x_uint16 nid; /* -- node id -- */ x_uint16 tid; /* -- thread id -- */ x_uint32 padding; /* space wasted for 8-byte aligning the next item */ x_int64 par; /* -- event parameter -- */ x_uint64 ti; /* -- time [us]? -- */ } PCXX_EV64; typedef PCXX_EV32 EVENT; typedef PCXX_EV PCXX_EV_NATIVE; #define swap16(A) ((((x_uint16)(A) & 0xff00) >> 8) | \ (((x_uint16)(A) & 0x00ff) << 8)) #define swap32(A) ((((x_uint32)(A) & 0xff000000) >> 24) | \ (((x_uint32)(A) & 0x00ff0000) >> 8) | \ (((x_uint32)(A) & 0x0000ff00) << 8) | \ (((x_uint32)(A) & 0x000000ff) << 24)) #define swap64(A) ((((x_uint64)(A) & 0xff00000000000000ull) >> 56) | \ (((x_uint64)(A) & 0x00ff000000000000ull) >> 40) | \ (((x_uint64)(A) & 0x0000ff0000000000ull) >> 24) | \ (((x_uint64)(A) & 0x000000ff00000000ull) >> 8) | \ (((x_uint64)(A) & 0x00000000ff000000ull) << 8) | \ (((x_uint64)(A) & 0x0000000000ff0000ull) << 24) | \ (((x_uint64)(A) & 0x000000000000ff00ull) << 40) | \ (((x_uint64)(A) & 0x00000000000000ffull) << 56)) typedef map< pair, int, less < pair > > NidTidMapT; typedef map< long int , Ttf_EventDescrT, less > EventIdMapT; typedef map< const char *, int, Ttf_ltstr > GroupIdMapT; /* for trace writing */ typedef map< int, const char * > GroupNameMapT; typedef struct Ttf_file { int Fid; char * EdfFile; NidTidMapT *NidTidMap; EventIdMapT *EventIdMap; GroupIdMapT *GroupIdMap; int ClkInitialized; double FirstTimestamp; bool subtractFirstTimestamp; bool nonBlocking; int format; // see above int eventSize; // sizeof() the corresponding format struct /* For Trace Writing */ EVENT *traceBuffer; int tracePosition; bool needsEdfFlush; GroupNameMapT *groupNameMap; bool initialized; double lastTimestamp; bool forWriting; } Ttf_fileT; extern "C" int refreshTables(Ttf_fileT *tFile, Ttf_CallbacksT cb); extern "C" int isEventIDRegistered(Ttf_fileT *tFile, long int eid); #endif /* _TAU_TF_DECL_H_ */ /*************************************************************************** * $RCSfile: TAU_tf_decl.h,v $ $Author: amorris $ * $Revision: 1.6 $ $Date: 2006/06/21 18:50:45 $ * TAU_VERSION_ID: $Id: TAU_tf_decl.h,v 1.6 2006/06/21 18:50:45 amorris Exp $ ***************************************************************************/ tau-2.16.4/src/TraceInput/TAU_tf_headers.h000066400000000000000000000036361062343042700202410ustar00rootroot00000000000000/**************************************************************************** ** TAU Portable Profiling Package ** ** http://www.cs.uoregon.edu/research/paracomp/tau ** ***************************************************************************** ** Copyright 2003 ** ** Department of Computer and Information Science, University of Oregon ** ** Advanced Computing Laboratory, Los Alamos National Laboratory ** ** Research Center Juelich, Germany ** ****************************************************************************/ /*************************************************************************** ** File : TAU_tf_headers.h ** ** Description : TAU trace format reader library header files ** ** Author : Sameer Shende ** ** Contact : sameer@cs.uoregon.edu ** ***************************************************************************/ /* TAU Trace format */ #ifndef _TAU_TF_HEADERS_H_ #define _TAU_TF_HEADERS_H_ #include #include #ifdef _MSC_VER #include #else #define O_BINARY 0 #include #endif #include #include #ifdef TAU_LARGEFILE #define LARGEFILE_OPTION O_LARGEFILE #else #define LARGEFILE_OPTION 0 #endif #include #include using namespace std; /* TAU specific headers */ #define PCXX_EVENT_SRC #include #include /* TAU trace library specific headers */ #include #endif /* _TAU_TF_HEADERS_H_ */ /******************************************************************************** * $RCSfile: TAU_tf_headers.h,v $ $Author: amorris $ * $Revision: 1.4 $ $Date: 2005/08/23 21:11:09 $ * TAU_VERSION_ID: $Id: TAU_tf_headers.h,v 1.4 2005/08/23 21:11:09 amorris Exp $ *******************************************************************************/ tau-2.16.4/src/TraceInput/TAU_tf_writer.cpp000066400000000000000000000334041062343042700204710ustar00rootroot00000000000000/***************************************************************************** ** TAU Portable Profiling Package ** ** http://www.cs.uoregon.edu/research/paracomp/tau ** ***************************************************************************** ** Copyright 2005 ** ** Department of Computer and Information Science, University of Oregon ** ** Advanced Computing Laboratory, Los Alamos National Laboratory ** ** Research Center Juelich, Germany ** ****************************************************************************/ /***************************************************************************** ** File : TAU_tf_writer.cpp ** ** Description : TAU trace format writer library C, C++ API ** ** Author : Alan Morris ** ** Contact : amorris@cs.uoregon.edu ** ****************************************************************************/ #include "TAU_tf.h" #include "TAU_tf_headers.h" #include #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ static void checkFlush(Ttf_fileT *tFile) { // Write the current trace buffer to file if necessary. if (tFile->tracePosition >= TAU_MAX_RECORDS) { Ttf_FlushTrace(tFile); } } static int flushEdf(Ttf_fileT *tFile) { FILE *fp; if ((fp = fopen (tFile->EdfFile, "wb")) == NULL) { perror("Error while flushing EDF file"); return -1; } int numEvents = tFile->EventIdMap->size(); fprintf(fp, "%d dynamic_trace_events\n", numEvents); fprintf(fp,"# FunctionId Group Tag \"Name Type\" Parameters\n"); for (EventIdMapT::iterator it = tFile->EventIdMap->begin(); it != tFile->EventIdMap->end(); ++it) { int id = (*it).first; Ttf_EventDescrT eventDesc = (*it).second; fprintf(fp, "%ld %s %ld \"%s\" %s\n", id, eventDesc.Group, eventDesc.Tag, eventDesc.EventName, eventDesc.Param); } fclose(fp); tFile->needsEdfFlush = false; return 0; } Ttf_FileHandleT Ttf_OpenFileForOutput( const char *name, const char *edf) { Ttf_fileT *tFile; FILE *fp; /* first, allocate space for the trace file id struct */ tFile = new Ttf_fileT; if (tFile == NULL) { perror("ERROR: memory allocation failed for tFile"); return NULL; } // Allocation the trace buffer tFile->traceBuffer = new EVENT[TAU_MAX_RECORDS]; if (tFile->traceBuffer == NULL) { perror("ERROR: memory allocation failed for trace buffer"); return NULL; } tFile->tracePosition = 1; // 0 will be the EV_INIT record tFile->initialized = false; tFile->forWriting = true; /* Open the trace file */ if ((tFile->Fid = open (name, O_WRONLY|O_CREAT|O_TRUNC|O_APPEND|O_BINARY|LARGEFILE_OPTION, 0600)) < 0) { perror (name); return NULL; } if ((fp = fopen (edf, "wb")) == NULL) { printf("EDF file = %s\n", edf); perror("ERROR: opening edf file"); return NULL; } fclose(fp); /* make a copy of the EDF file name */ tFile->EdfFile = strdup(edf); tFile->NidTidMap = new NidTidMapT; if (tFile->NidTidMap == (NidTidMapT *) NULL) { perror("ERROR: memory allocation failed for NidTidMap"); return NULL; } /* Allocate space for event id map */ tFile->EventIdMap = new EventIdMapT; if (tFile->EventIdMap == (EventIdMapT *) NULL) { perror("ERROR: memory allocation failed for EventIdMap"); return NULL; } /* Allocate space for group id map */ tFile->GroupIdMap = new GroupIdMapT; if (tFile->GroupIdMap == (GroupIdMapT *) NULL) { perror("ERROR: memory allocation failed for GroupIdMap"); return NULL; } tFile->groupNameMap = new GroupNameMapT; if (tFile->groupNameMap == NULL) { perror("ERROR: memory allocation failed for GroupNameMap"); return NULL; } tFile->needsEdfFlush = true; /* initialize clock */ tFile->ClkInitialized = FALSE; /* initialize the first timestamp for the trace */ tFile->FirstTimestamp = 0.0; /* define some events */ Ttf_EventDescrT newEventDesc; newEventDesc.Eid = PCXX_EV_INIT; newEventDesc.Group = "TRACER"; newEventDesc.EventName = "EV_INIT"; newEventDesc.Tag = 0; newEventDesc.Param = "none"; (*tFile->EventIdMap)[PCXX_EV_INIT] = newEventDesc; newEventDesc.Eid = PCXX_EV_CLOSE; newEventDesc.Group = "TRACER"; newEventDesc.EventName = "FLUSH_CLOSE"; newEventDesc.Tag = 0; newEventDesc.Param = "none"; (*tFile->EventIdMap)[PCXX_EV_CLOSE] = newEventDesc; newEventDesc.Eid = PCXX_EV_WALL_CLOCK; newEventDesc.Group = "TRACER"; newEventDesc.EventName = "WALL_CLOCK"; newEventDesc.Tag = 0; newEventDesc.Param = "none"; (*tFile->EventIdMap)[PCXX_EV_WALL_CLOCK] = newEventDesc; newEventDesc.Eid = TAU_MESSAGE_SEND; newEventDesc.Group = "TAU_MESSAGE"; newEventDesc.EventName = "MESSAGE_SEND"; newEventDesc.Tag = -7; newEventDesc.Param = "par"; (*tFile->EventIdMap)[TAU_MESSAGE_SEND] = newEventDesc; newEventDesc.Eid = TAU_MESSAGE_RECV; newEventDesc.Group = "TAU_MESSAGE"; newEventDesc.EventName = "MESSAGE_RECV"; newEventDesc.Tag = -8; newEventDesc.Param = "par"; (*tFile->EventIdMap)[TAU_MESSAGE_RECV] = newEventDesc; /* return file handle */ return (Ttf_FileHandleT) tFile; } static int checkInitialized(Ttf_FileHandleT file, unsigned int nodeToken, unsigned int threadToken, double time) { // Adds the initialization record Ttf_fileT *tFile = (Ttf_fileT*)file; if (!tFile->initialized) { int pos = 0; tFile->traceBuffer[pos].ev = PCXX_EV_INIT; tFile->traceBuffer[pos].nid = nodeToken; tFile->traceBuffer[pos].tid = threadToken; tFile->traceBuffer[pos].ti = (x_uint64) time; tFile->traceBuffer[pos].par = 3; tFile->initialized = true; } return 0; } int Ttf_DefThread(Ttf_FileHandleT file, unsigned int nodeToken, unsigned int threadToken, const char *threadName) { Ttf_fileT *tFile = (Ttf_fileT*)file; int nid = nodeToken; int tid = threadToken; NidTidMapT::iterator nit = tFile->NidTidMap->find(pair(nid,tid)); if (nit == tFile->NidTidMap->end()) { /* this pair of node and thread has not been encountered before */ /* add it to the map! */ (*(tFile->NidTidMap))[pair(nid,tid)] = 1; } return 0; } // returns stateGroupToken int Ttf_DefStateGroup(Ttf_FileHandleT file, const char *stateGroupName, unsigned int stateGroupToken) { Ttf_fileT *tFile = (Ttf_fileT*)file; (*tFile->groupNameMap)[stateGroupToken] = strdup(stateGroupName); return 0; } // returns stateToken int Ttf_DefState(Ttf_FileHandleT file, unsigned int stateToken, const char *stateName, unsigned int stateGroupToken) { Ttf_fileT *tFile = (Ttf_fileT*)file; Ttf_EventDescrT newEventDesc; GroupNameMapT::iterator git = tFile->groupNameMap->find(stateGroupToken); if (git == tFile->groupNameMap->end()) { fprintf (stderr, "Ttf_DefState: Have not seen %d stateGroupToken before, please define it first\n", stateGroupToken); } newEventDesc.Eid = stateToken; newEventDesc.Group = const_cast((*tFile->groupNameMap)[stateGroupToken]); newEventDesc.EventName = strdup(stateName); newEventDesc.Tag = 0; newEventDesc.Param = "EntryExit"; (*tFile->EventIdMap)[stateToken] = newEventDesc; tFile->needsEdfFlush = true; return 0; } int Ttf_FlushTrace(Ttf_FileHandleT file) { Ttf_fileT *tFile = (Ttf_fileT*)file; checkInitialized(file, tFile->traceBuffer[1].nid, tFile->traceBuffer[1].tid, tFile->traceBuffer[1].ti); // compute size of write int size = tFile->tracePosition * sizeof(EVENT); // reset trace position tFile->tracePosition = 0; // must write out edf file first if (tFile->needsEdfFlush) { if (flushEdf(tFile) != 0) { return -1; } } //printf ("flushing %d bytes\n", size); int ret = write (tFile->Fid, tFile->traceBuffer, size); if (ret != size) { perror("Error flushing trace buffer"); return -1; } return 0; } int Ttf_CloseOutputFile(Ttf_FileHandleT file) { Ttf_fileT *tFile = (Ttf_fileT*)file; if (tFile->forWriting == false) { return (int)((long)Ttf_CloseFile(tFile)); } for (NidTidMapT::iterator it = tFile->NidTidMap->begin(); it != tFile->NidTidMap->end(); ++it) { pair nidtid = (*it).first; checkFlush(tFile); int pos = tFile->tracePosition; tFile->traceBuffer[pos].ev = PCXX_EV_CLOSE; tFile->traceBuffer[pos].nid = nidtid.first; tFile->traceBuffer[pos].tid = nidtid.second; tFile->traceBuffer[pos].ti = (x_uint64) tFile->lastTimestamp; tFile->traceBuffer[pos].par = 0; tFile->tracePosition++; pos = tFile->tracePosition; tFile->traceBuffer[pos].ev = PCXX_EV_WALL_CLOCK; tFile->traceBuffer[pos].nid = nidtid.first; tFile->traceBuffer[pos].tid = nidtid.second; tFile->traceBuffer[pos].ti = (x_uint64) tFile->lastTimestamp; tFile->traceBuffer[pos].par = 0; tFile->tracePosition++; } Ttf_FlushTrace(file); close(tFile->Fid); return 0; } static int enterExit(Ttf_FileHandleT file, x_uint64 time, unsigned int nodeToken, unsigned int threadToken, unsigned int stateToken, int parameter) { Ttf_fileT *tFile = (Ttf_fileT*)file; checkFlush(tFile); int pos = tFile->tracePosition; tFile->traceBuffer[pos].ev = stateToken; tFile->traceBuffer[pos].nid = nodeToken; tFile->traceBuffer[pos].tid = threadToken; tFile->traceBuffer[pos].ti = time; tFile->traceBuffer[pos].par = parameter; tFile->tracePosition++; tFile->lastTimestamp = time; return 0; } int Ttf_EnterState(Ttf_FileHandleT file, x_uint64 time, unsigned int nodeToken, unsigned int threadToken, unsigned int stateToken) { return enterExit(file, time, nodeToken, threadToken, stateToken, 1); // entry } int Ttf_LeaveState(Ttf_FileHandleT file, x_uint64 time, unsigned int nodeToken, unsigned int threadToken, unsigned int stateToken) { return enterExit(file, time, nodeToken, threadToken, stateToken, -1); // exit } int Ttf_DefClkPeriod(Ttf_FileHandleT file, double clkPeriod) { return 0; } static int sendRecv(Ttf_FileHandleT file, double time, unsigned int sourceNodeToken, unsigned int sourceThreadToken, unsigned int destinationNodeToken, unsigned int destinationThreadToken, unsigned int messageSize, unsigned int messageTag, unsigned int messageComm, int eventId) { Ttf_fileT *tFile = (Ttf_fileT*)file; x_int64 parameter; x_uint64 xother, xtype, xlength, xcomm; xother = destinationNodeToken; xtype = messageTag; xlength = messageSize; xcomm = messageComm; parameter = (xlength >> 16 << 54 >> 22) | ((xtype >> 8 & 0xFF) << 48) | ((xother >> 8 & 0xFF) << 56) | (xlength & 0xFFFF) | ((xtype & 0xFF) << 16) | ((xother & 0xFF) << 24) | (xcomm << 58 >> 16); checkFlush(tFile); int pos = tFile->tracePosition; tFile->traceBuffer[pos].ev = eventId; tFile->traceBuffer[pos].nid = sourceNodeToken; tFile->traceBuffer[pos].tid = sourceThreadToken; tFile->traceBuffer[pos].ti = (x_uint64)time; tFile->traceBuffer[pos].par = parameter; tFile->tracePosition++; tFile->lastTimestamp = time; return 0; } int Ttf_SendMessage(Ttf_FileHandleT file, double time, unsigned int sourceNodeToken, unsigned int sourceThreadToken, unsigned int destinationNodeToken, unsigned int destinationThreadToken, unsigned int messageSize, unsigned int messageTag, unsigned int messageComm) { return sendRecv(file, time, sourceNodeToken, sourceThreadToken, destinationNodeToken, destinationThreadToken, messageSize, messageTag, messageComm, TAU_MESSAGE_SEND); } int Ttf_RecvMessage(Ttf_FileHandleT file, double time, unsigned int sourceNodeToken, unsigned int sourceThreadToken, unsigned int destinationNodeToken, unsigned int destinationThreadToken, unsigned int messageSize, unsigned int messageTag, unsigned int messageComm) { return sendRecv(file, time, destinationNodeToken, destinationThreadToken, sourceNodeToken, sourceThreadToken, messageSize, messageTag, messageComm, TAU_MESSAGE_RECV); } int Ttf_DefUserEvent(Ttf_FileHandleT file, unsigned int userEventToken, const char *userEventName, int monotonicallyIncreasing) { Ttf_fileT *tFile = (Ttf_fileT*)file; Ttf_EventDescrT newEventDesc; newEventDesc.Eid = userEventToken; newEventDesc.Group = "TAUEVENT"; newEventDesc.EventName = strdup(userEventName); newEventDesc.Tag = monotonicallyIncreasing; newEventDesc.Param = "TriggerValue"; (*tFile->EventIdMap)[userEventToken] = newEventDesc; tFile->needsEdfFlush = true; return 0; } int Ttf_EventTrigger(Ttf_FileHandleT file, double time, unsigned int nodeToken, unsigned int threadToken, unsigned int userEventToken, double userEventValue ) { Ttf_fileT *tFile = (Ttf_fileT*)file; checkFlush(tFile); int pos = tFile->tracePosition; tFile->traceBuffer[pos].ev = userEventToken; tFile->traceBuffer[pos].nid = nodeToken; tFile->traceBuffer[pos].tid = threadToken; tFile->traceBuffer[pos].ti = (x_uint64) time; // currently casting to x_uint64 tFile->traceBuffer[pos].par = (x_uint64) userEventValue; tFile->tracePosition++; tFile->lastTimestamp = time; return 0; } #ifdef __cplusplus } #endif /* __cplusplus */ tau-2.16.4/tau_setup000077500000000000000000000001651062343042700143370ustar00rootroot00000000000000#!/bin/sh java -cp ./tools/src/tauconf/bin/TAU_Conf.jar:./tools/src/contrib/swing-layout-0.7.1.jar tau_conf/TAU_Conf tau-2.16.4/tau_validate000077500000000000000000000474541062343042700150040ustar00rootroot00000000000000#!/usr/bin/env python import sys import os import popen2 import string import glob uniqID = 1 # python 2.2 check if string.atof( ( string.split( sys.version )[0] ) [0:3]) < 2.3: True = 1 False = 0 def outputHeader(message): if verbose == True: if html == True: print "

\n" + message + "\n

";
        else:
            print message + "\n";

        

def output(message):
    if verbose == True:
        if html == True:
            print "

\n" + message + "\n

";
        else:
            print message + "\n";


def begin():
    if html == True:
        print "
\n"
    else:
        print "------------------------------------------------------"
        print "build/run : %-20s : %s" % ("test name", "stub makefile")
        print "------------------------------------------------------"
        



def end():
    if (errorsFound == 0):
        outputHeader ("No Errors!")
        code = 0
    else:
        print "Encountered %d errors" % errorsFound
        code = errorsFound
    if (html):
        print "
\n" sys.exit(code) def usesOption(makefile, option): opts = makefile.split('-') for opt in opts: if opt == option: return True return False def shortMakefile(makefile): return makefile[makefile.find("/lib/")+5:] def system(command): if verbose == True: if html == True: print "" + os.getcwd() + "> " + command + "" else: print os.getcwd() + "> " + command sys.stdout.flush() child = popen2.Popen4(command) data = child.fromchild.readlines() for line in data: print line retval = child.wait() return retval else: child = popen2.Popen4(command) data = child.fromchild.readlines() retval = child.wait() return retval def chdir(directory): if verbose == True: if html == True: print "" + os.getcwd() + "> cd " + directory + "" else: print os.getcwd() + "> cd " + directory if os.path.exists(directory) and os.path.isdir(directory): os.chdir(directory) def prependPath(directory): print "" + os.getcwd() + "> PATH=" + directory + ":$PATH" os.environ['PATH'] = directory + os.pathsep + os.environ['PATH'] def setEnviron(variable,value): print "" + os.getcwd() + "> export " + variable + "=" + value + "" os.environ[variable] = value def unsetEnviron(variable): print "" + os.getcwd() + "> unset " + variable + "" del os.environ[variable] def outputSummary(testgrid): if verbose == True and html == False: for makefile in testgrid.keys(): tests = testgrid[makefile] for test in tests: print "%4s : %40s : %s %s" % (test.buildresult, test.name, makefile, test.message) return if html == True: print "" first = 1 for makefile in testgrid.keys(): tests = testgrid[makefile] if first == 1: first = 0 print "" for test in tests: print "" print "" print "" for test in tests: print "" print "" print "" print "" for test in tests: if test.buildresult == "pass": print "" elif test.buildresult == "fail": print "" % (test.errorID) else: print "" if test.runresult == "pass": print "" elif test.runresult == "fail": print "" % (test.errorID) else: print "" print "" print "
Stub Makefile"+test.name+"
buildrun
"+makefile+"passfailN/ApassfailN/A
" class Test: def __init__(self, name, makefile): self.name = name self.fullmakefile = makefile self.buildresult = "na" self.runresult = "na" self.message = "" self.makefile = shortMakefile(makefile) self.buildpath = "build-" + self.makefile self.errorID = 0 def checkApplicable(self): return True def runTest(self): self.error ("Base class runTest called") def buildTest(self): self.error ("Base class buildTest called") def error(self,message): global errorsFound global uniqID errorsFound = errorsFound + 1 if verbose == True: if html == True: print ("

\n" + message + "\n

") % (uniqID);
                self.errorID = uniqID
                uniqID = uniqID + 1
            else:
                print message + "\n";

class SimpleTest(Test):
    def __init__(self, name, makefile):
        Test.__init__(self, name, makefile)

    def getActualTest(self):
        return "simple"
        
    def buildTest(self):
        outputHeader("SimpleTest("+self.getActualTest()+"), build (" + self.fullmakefile + ")")
        if self.checkApplicable() == False:
            return
        chdir(TEST_ROOT + "/" + self.getActualTest())
        system("rm -rf " + self.buildpath)
        system("TAU_TEST_MAKEFILE="+self.fullmakefile+" make clean")
        retval = system("TAU_TEST_MAKEFILE="+self.fullmakefile+" make")
        if retval != 0 or os.path.exists("simple") == False:
            self.error("Error: failed to build")
            self.buildresult = "fail"
            return
        self.buildresult = "pass"
        system("mkdir " + self.buildpath)
        system("cp simple " + self.buildpath)

    def runTest(self):
        outputHeader("SimpleTest("+self.getActualTest()+", run (" + self.fullmakefile + ")")
        if self.checkApplicable() == False:
            return

        chdir(TEST_ROOT + "/" + self.getActualTest())
        if os.path.exists(self.buildpath) == False:
            output("Nothing to run")
            return
        chdir(self.buildpath)
        retval = system("./simple")
        if retval != 0:
            self.error("Error: failed to run")
            self.runresult = "fail"
        else:
            self.runresult = "pass"


class CTest(SimpleTest):
    def __init__(self, makefile):
        SimpleTest.__init__(self, "C", makefile)
    def getActualTest(self):
        return "c"
    def checkApplicable(self):
        if usesOption(self.makefile, "mpi") == True and usesOption(self.makefile, "epilog") == True:
            return False
        return True

class FflinkTest(SimpleTest):
    def __init__(self, makefile):
        SimpleTest.__init__(self, "Fortran (flink)", makefile)
    def getActualTest(self):
        return "fflink"

    def checkApplicable(self):
        if system("grep \"^TAU_F90 \" "+self.fullmakefile) != 0:
            return False
        if usesOption(self.makefile, "mpi") == True and usesOption(self.makefile, "epilog") == True:
            return False
        return True


class FcpplinkTest(SimpleTest):
    def __init__(self, makefile):
        SimpleTest.__init__(self, "Fortran (cpplink)", makefile)
    def getActualTest(self):
        return "fcpplink"

    def checkApplicable(self):
        if system("grep \"^TAU_F90 \" "+self.fullmakefile) != 0:
            return False
        if usesOption(self.makefile, "mpi") == True and usesOption(self.makefile, "epilog") == True:
            return False
        return True
    
class FclinkTest(SimpleTest):
    def __init__(self, makefile):
        SimpleTest.__init__(self, "Fortran (clink)", makefile)
    def getActualTest(self):
        return "fclink"

    def checkApplicable(self):
        if system("grep \"^TAU_F90 \" "+self.fullmakefile) != 0:
            return False
        if usesOption(self.makefile, "mpi") == True and usesOption(self.makefile, "epilog") == True:
            return False
        return True



class MpiCTest(SimpleTest):
    def __init__(self, makefile):
        SimpleTest.__init__(self, "MPI (C)", makefile)
    def getActualTest(self):
        return "mpic"

    def checkApplicable(self):
        if usesOption(self.makefile, "mpi") == False:
            output("Skipping, not configured with MPI")
            return False
        return True

    def runTest(self):
        output ("Skipping Test (we won't run MPI tests yet)")

class MpiFTest(SimpleTest):
    def __init__(self, makefile):
        SimpleTest.__init__(self, "MPI (Fortran)", makefile)
    def getActualTest(self):
        return "mpif"

    def checkApplicable(self):
        if usesOption(self.makefile, "mpi") == False:
            output("Skipping, not configured with MPI")
            return False
        if system("grep \"^TAU_F90 \" "+self.fullmakefile) != 0:
            return False
        return True

    def runTest(self):
        output ("Skipping Test (we won't run MPI tests yet)")
        


class PdtTest(Test):
    def __init__(self, name, makefile):
        Test.__init__(self, name, makefile)

    def getActualTest(self):
        return "pdt"

    def buildTest(self):
        outputHeader("PdtTest (" + self.fullmakefile + ")")

        if usesOption(self.makefile, "pdt") == False:
            output("Skipping, not configured with PDT")
            return

        if self.checkApplicable() == False:
            return

        chdir(TEST_ROOT + "/" + self.getActualTest())
        system("rm -rf " + self.buildpath)

        system("TAU_TEST_MAKEFILE="+self.fullmakefile+" make clean")
        system("rm -f *.inst.*")
        retval = system("TAU_TEST_MAKEFILE="+self.fullmakefile+" make")
        if retval != 0:
            self.error("Error: failed to build")
            self.buildresult = "fail"
            return

        if len(glob.glob("*.inst.*")) != 1:
            self.error("Error: failed to instrument")
            self.buildresult = "fail"
            return
        
        self.buildresult = "pass"
        system("mkdir " + self.buildpath)
        system("cp simple " + self.buildpath)
        

    def runTest(self):
        outputHeader("PdtTest (" + self.fullmakefile + ")")

        if usesOption(self.makefile, "pdt") == False:
            output("Skipping, not configured with PDT")
            return

        if self.checkApplicable() == False:
            return
        
        chdir(TEST_ROOT + "/" + self.getActualTest())
        if os.path.exists(self.buildpath) == False:
            output("Nothing to run")
            return
        chdir(self.buildpath)
        retval = system("./simple")
        if retval != 0:
            self.error("Error: failed to run")
            self.runresult = "fail"
        else:
            self.runresult = "pass"



class PdtTestC(PdtTest):
    def __init__(self, makefile):
        PdtTest.__init__(self, "PDT (C)", makefile)
    def getActualTest(self):
        return "pdtc"
    def checkApplicable(self):
        if usesOption(self.makefile, "mpi") == True and usesOption(self.makefile, "epilog") == True:
            return False
        return True
    
class PdtTestCPP(PdtTest):
    def __init__(self, makefile):
        PdtTest.__init__(self, "PDT (C++)", makefile)
    def getActualTest(self):
        return "pdtcpp"
    def checkApplicable(self):
        if usesOption(self.makefile, "mpi") == True and usesOption(self.makefile, "epilog") == True:
            return False
        return True

class PdtTestF(PdtTest):
    def __init__(self, makefile):
        PdtTest.__init__(self, "PDT (Fortran)", makefile)
    def getActualTest(self):
        return "pdtf"
    def checkApplicable(self):
        if usesOption(self.makefile, "mpi") == True and usesOption(self.makefile, "epilog") == True:
            return False
        if system("grep \"^TAU_F90 \" "+self.fullmakefile) != 0:
            return False
        return True

class PdtTestGF(PdtTest):
    def __init__(self, makefile):
        PdtTest.__init__(self, "PDT (GFortran)", makefile)
    def getActualTest(self):
        return "pdtgf"
    def checkApplicable(self):
        if usesOption(self.makefile, "mpi") == True and usesOption(self.makefile, "epilog") == True:
            return False
        if system("grep \"^TAU_F90 \" "+self.fullmakefile) != 0:
            return False


        # strip off PDTDIR=, and newline
        pdtdir = os.popen("grep \"^PDTDIR=\" "+self.fullmakefile).read()[7:-1]

        pdtarchdir = os.popen("grep \"^PDTARCHDIR=\" "+self.fullmakefile).read()[11:-1]
        if pdtarchdir == "$(TAU_ARCH)":
            pdtarchdir = os.popen("grep \"^TAU_ARCH=\" "+self.fullmakefile).read()[9:-1]

        gfparse = pdtdir + "/" + pdtarchdir + "/bin/gfparse"
        if os.path.exists(gfparse) == False:
            return False

        print pdtdir
        return True



class PdtMPITestC(PdtTest):
    def __init__(self, makefile):
        PdtTest.__init__(self, "PDT-MPI (C)", makefile)
    def getActualTest(self):
        return "pdtmpic"
    def checkApplicable(self):
        if usesOption(self.makefile, "mpi") == True and usesOption(self.makefile, "epilog") == True:
            return False
        if usesOption(self.makefile, "mpi") == False:
            output("Skipping, not configured with MPI")
            return False
        return True
    def runTest(self):
        output ("Skipping Test (we won't run MPI tests yet)")



class PdtMPITestCPP(PdtTest):
    def __init__(self, makefile):
        PdtTest.__init__(self, "PDT-MPI (C++)", makefile)
    def getActualTest(self):
        return "pdtmpicpp"
    def checkApplicable(self):
        if usesOption(self.makefile, "mpi") == True and usesOption(self.makefile, "epilog") == True:
            return False
        if usesOption(self.makefile, "mpi") == False:
            output("Skipping, not configured with MPI")
            return False
        return True
    def runTest(self):
        output ("Skipping Test (we won't run MPI tests yet)")

class PdtMPITestF(PdtTest):
    def __init__(self, makefile):
        PdtTest.__init__(self, "PDT-MPI (Fortran)", makefile)
    def getActualTest(self):
        return "pdtmpif"
    def checkApplicable(self):
        if usesOption(self.makefile, "mpi") == True and usesOption(self.makefile, "epilog") == True:
            return False
        if usesOption(self.makefile, "mpi") == False:
            output("Skipping, not configured with MPI")
            return False
        if system("grep \"^TAU_F90 \" "+self.fullmakefile) != 0:
            return False
        return True
    def runTest(self):
        output ("Skipping Test (we won't run MPI tests yet)")

class PdtMPITestGF(PdtTest):
    def __init__(self, makefile):
        PdtTest.__init__(self, "PDT-MPI (GFortran)", makefile)
    def getActualTest(self):
        return "pdtmpigf"
    def checkApplicable(self):
        if usesOption(self.makefile, "mpi") == True and usesOption(self.makefile, "epilog") == True:
            return False
        if usesOption(self.makefile, "mpi") == False:
            output("Skipping, not configured with MPI")
            return False
        if system("grep \"^TAU_F90 \" "+self.fullmakefile) != 0:
            return False


        # strip off PDTDIR=, and newline
        pdtdir = os.popen("grep \"^PDTDIR=\" "+self.fullmakefile).read()[7:-1]

        pdtarchdir = os.popen("grep \"^PDTARCHDIR=\" "+self.fullmakefile).read()[11:-1]
        if pdtarchdir == "$(TAU_ARCH)":
            pdtarchdir = os.popen("grep \"^TAU_ARCH=\" "+self.fullmakefile).read()[9:-1]

        gfparse = pdtdir + "/" + pdtarchdir + "/bin/gfparse"
        if os.path.exists(gfparse) == False:
            return False

        print pdtdir
        return True
    def runTest(self):
        output ("Skipping Test (we won't run MPI tests yet)")


def usage():
    print ""
    print "Usage: tau_validate [-v] [--html] [--build] [--run] "
    print ""
    print "Options:"
    print ""
    print "-v           Verbose output"
    print "--html       Output results in HTML"
    print "--build      Only build"
    print "--run        Only run"
    print "     Specify an arch directory (e.g. rs6000), or the lib"
    print "             directory (rs6000/lib), or a specific makefile."
    print "             Relative or absolute paths are ok."
    print ""
    print "Notes:"
    print "tau_validate will attempt to validate a TAU installation by performing"
    print "various tests on each TAU stub Makefile.  Some degree of logic exists"
    print "to determine if a given test applies to a given makefile, but it's not"
    print "perfect."
    print ""
    print "Example:"
    print ""
    print "bash : ./tau_validate --html x86_64 &> results.html"
    print "tcsh : ./tau_validate --html x86_64 >& results.html"
    print ""
    
    
    sys.exit(-1)




# execution starts here

errorsFound = 0

PWD = os.getcwd()
TEST_ROOT = PWD + "/examples/validate"



args = sys.argv[1:]
verbose = False
html = False
target = ""
optRun = False
optBuild = False
optClean = False
for arg in args:
    if arg == "-v":
        verbose = True
    elif arg == "--html":
        verbose = True
        html = True
    elif arg == "--build":
        optBuild = True
    elif arg == "--run":
        optRun = True
    elif arg == "--clean":
        optClean = True
    else:
        if target != "":
            usage()
        target = arg

if optClean:
    print "Cleaning..."
    verbose = True
    chdir(TEST_ROOT)
    system("find . -name \"build-*\" | xargs rm -rf")
    system("find . -name \"profile.*\" | xargs rm")
    system("find . -name \"*.trc\" | xargs rm")
    system("find . -name \"*.edf\" | xargs rm")
    system("find . -name \"*.pdb\" | xargs rm")
    system("find . -name \"*.elg\" | xargs rm")
    system("find . -name \"core.*\" | xargs rm")
    system("find . -name \"*.o\" | xargs rm")
    system("find . -name \"*.inst.*\" | xargs rm")
    system("find . -name \"simple\" | xargs rm")
    
    sys.exit(0)
    

# if neither is specified, do both
if not optRun and not optBuild:
    optBuild = True
    optRun = True

if target == "":
    usage()


target = os.path.realpath(target)

begin()


def runTest(test,tests):
    if optBuild:
        test.buildTest()
    if optRun:
        test.runTest()
    tests.append(test)
    print "%4s/%-4s : %-20s : %s %s" % (test.buildresult, test.runresult, test.name, makefile, test.message)
    


if not os.path.exists(target):
    print "Couldn't find: " + target
    usage()

directory = False
if os.path.isdir(target):
    directory = True

    if os.path.exists(target + "/lib"):
        target = target + "/lib";

    chdir(target)
    makefiles = glob.glob("Makefile.tau*")
else:
    makefiles = [ target ]

testgrid = {}
found = 0
for makefile in makefiles:
    found = 1
#    print makefile

    tests = []
    if directory:
        fullmakefile = target + "/" + makefile
    else:
        fullmakefile = os.path.realpath(target)
            

    runTest(CTest(fullmakefile),tests)
    runTest(PdtTestC(fullmakefile),tests)
    runTest(PdtTestCPP(fullmakefile),tests)
    runTest(PdtTestF(fullmakefile),tests)
    runTest(PdtTestGF(fullmakefile),tests)

    runTest(FflinkTest(fullmakefile),tests)
    runTest(FcpplinkTest(fullmakefile),tests)
    runTest(FclinkTest(fullmakefile),tests)

    runTest(MpiCTest(fullmakefile),tests)
    runTest(MpiFTest(fullmakefile),tests)

    runTest(PdtMPITestC(fullmakefile),tests)
    runTest(PdtMPITestCPP(fullmakefile),tests)
    runTest(PdtMPITestF(fullmakefile),tests)
    runTest(PdtMPITestGF(fullmakefile),tests)


    testgrid[makefile] = tests

if found == 0:
    print "Couldn't find any makefiles in " + target

outputSummary(testgrid)

end()






tau-2.16.4/tools/000077500000000000000000000000001062343042700135365ustar00rootroot00000000000000tau-2.16.4/tools/doc/000077500000000000000000000000001062343042700143035ustar00rootroot00000000000000tau-2.16.4/tools/doc/cgm-interface/000077500000000000000000000000001062343042700170075ustar00rootroot00000000000000tau-2.16.4/tools/doc/cgm-interface/tau-interface.ps000066400000000000000000002716731062343042700221220ustar00rootroot00000000000000%!PS-Adobe-2.0
%%Creator: dvips 5.55 Copyright 1986, 1994 Radical Eye Software
%%Title: tau-interface.dvi
%%CreationDate: Fri Oct 11 15:51:03 1996
%%Pages: 8
%%PageOrder: Ascend
%%BoundingBox: 0 0 612 792
%%EndComments
%DVIPSCommandLine: dvips tau-interface
%DVIPSParameters: dpi=300, comments removed
%DVIPSSource:  TeX output 1996.10.11:1550
%%BeginProcSet: tex.pro
/TeXDict 250 dict def TeXDict begin /N{def}def /B{bind def}N /S{exch}N
/X{S N}B /TR{translate}N /isls false N /vsize 11 72 mul N /hsize 8.5 72
mul N /landplus90{false}def /@rigin{isls{[0 landplus90{1 -1}{-1 1}
ifelse 0 0 0]concat}if 72 Resolution div 72 VResolution div neg scale
isls{landplus90{VResolution 72 div vsize mul 0 exch}{Resolution -72 div
hsize mul 0}ifelse TR}if Resolution VResolution vsize -72 div 1 add mul
TR[matrix currentmatrix{dup dup round sub abs 0.00001 lt{round}if}
forall round exch round exch]setmatrix}N /@landscape{/isls true N}B
/@manualfeed{statusdict /manualfeed true put}B /@copies{/#copies X}B
/FMat[1 0 0 -1 0 0]N /FBB[0 0 0 0]N /nn 0 N /IE 0 N /ctr 0 N /df-tail{
/nn 8 dict N nn begin /FontType 3 N /FontMatrix fntrx N /FontBBox FBB N
string /base X array /BitMaps X /BuildChar{CharBuilder}N /Encoding IE N
end dup{/foo setfont}2 array copy cvx N load 0 nn put /ctr 0 N[}B /df{
/sf 1 N /fntrx FMat N df-tail}B /dfs{div /sf X /fntrx[sf 0 0 sf neg 0 0]
N df-tail}B /E{pop nn dup definefont setfont}B /ch-width{ch-data dup
length 5 sub get}B /ch-height{ch-data dup length 4 sub get}B /ch-xoff{
128 ch-data dup length 3 sub get sub}B /ch-yoff{ch-data dup length 2 sub
get 127 sub}B /ch-dx{ch-data dup length 1 sub get}B /ch-image{ch-data
dup type /stringtype ne{ctr get /ctr ctr 1 add N}if}B /id 0 N /rw 0 N
/rc 0 N /gp 0 N /cp 0 N /G 0 N /sf 0 N /CharBuilder{save 3 1 roll S dup
/base get 2 index get S /BitMaps get S get /ch-data X pop /ctr 0 N ch-dx
0 ch-xoff ch-yoff ch-height sub ch-xoff ch-width add ch-yoff
setcachedevice ch-width ch-height true[1 0 0 -1 -.1 ch-xoff sub ch-yoff
.1 sub]{ch-image}imagemask restore}B /D{/cc X dup type /stringtype ne{]}
if nn /base get cc ctr put nn /BitMaps get S ctr S sf 1 ne{dup dup
length 1 sub dup 2 index S get sf div put}if put /ctr ctr 1 add N}B /I{
cc 1 add D}B /bop{userdict /bop-hook known{bop-hook}if /SI save N @rigin
0 0 moveto /V matrix currentmatrix dup 1 get dup mul exch 0 get dup mul
add .99 lt{/QV}{/RV}ifelse load def pop pop}N /eop{SI restore showpage
userdict /eop-hook known{eop-hook}if}N /@start{userdict /start-hook
known{start-hook}if pop /VResolution X /Resolution X 1000 div /DVImag X
/IE 256 array N 0 1 255{IE S 1 string dup 0 3 index put cvn put}for
65781.76 div /vsize X 65781.76 div /hsize X}N /p{show}N /RMat[1 0 0 -1 0
0]N /BDot 260 string N /rulex 0 N /ruley 0 N /v{/ruley X /rulex X V}B /V
{}B /RV statusdict begin /product where{pop product dup length 7 ge{0 7
getinterval dup(Display)eq exch 0 4 getinterval(NeXT)eq or}{pop false}
ifelse}{false}ifelse end{{gsave TR -.1 .1 TR 1 1 scale rulex ruley false
RMat{BDot}imagemask grestore}}{{gsave TR -.1 .1 TR rulex ruley scale 1 1
false RMat{BDot}imagemask grestore}}ifelse B /QV{gsave newpath transform
round exch round exch itransform moveto rulex 0 rlineto 0 ruley neg
rlineto rulex neg 0 rlineto fill grestore}B /a{moveto}B /delta 0 N /tail
{dup /delta X 0 rmoveto}B /M{S p delta add tail}B /b{S p tail}B /c{-4 M}
B /d{-3 M}B /e{-2 M}B /f{-1 M}B /g{0 M}B /h{1 M}B /i{2 M}B /j{3 M}B /k{
4 M}B /w{0 rmoveto}B /l{p -4 w}B /m{p -3 w}B /n{p -2 w}B /o{p -1 w}B /q{
p 1 w}B /r{p 2 w}B /s{p 3 w}B /t{p 4 w}B /x{0 S rmoveto}B /y{3 2 roll p
a}B /bos{/SS save N}B /eos{SS restore}B end
%%EndProcSet
TeXDict begin 40258431 52099146 1000 300 300
(/nfs/research/paraducks1/kurtw/sage-install/sage/TAU/tools/doc/cgm-interface/tau-interface.dvi)
@start /Fa 3 63 df<01F807000C0018003800300070007FC0E000E000E000E000E000
60006000300018600F800D127E9111>15 D<0000038000000F0000003C000000F0000003
C000000F0000003C000000F0000003C000000F0000003C000000F0000000F00000003C00
00000F00000003C0000000F00000003C0000000F00000003C0000000F00000003C000000
0F000000038019187D9520>60 D62 D E /Fb 14 121 df<7FFFC0FFFFE0FFFFE07FFFC013047D901A>
45 D<1FF0003FFC007FFE00780F00300700000380000380007F8007FF801FFF803F8380
780380700380E00380E00380E00380700780780F803FFFFC1FFDFC07F0FC16157D941A>
97 DI<00FF8003FFC00FFF
E01F01E03C00C0780000700000700000E00000E00000E00000E00000E000007000007000
007800703C00701F01F00FFFE003FFC000FE0014157D941A>I<001FC0001FC0001FC000
01C00001C00001C00001C00001C00001C001F1C007FDC00FFFC01E0FC03C07C07803C070
01C0E001C0E001C0E001C0E001C0E001C0E001C0E001C07003C07003C03807C03E0FC01F
FFFC07FDFC01F1FC161E7E9D1A>I<01F80007FF000FFF801E07C03C01C07800E07000E0
E00070E00070FFFFF0FFFFF0FFFFF0E000007000007000007800703C00701F01F00FFFE0
03FFC000FE0014157D941A>I<01F87C07FFFE0FFFFE1E078C1C03803801C03801C03801
C03801C03801C01C03801E07801FFF001FFE0039F8003800003800001C00001FFF801FFF
E03FFFF878007C70001CE0000EE0000EE0000EE0000E70001C78003C3E00F81FFFF007FF
C001FF0017217F941A>103 DI108
D<7CE0E000FFFBF8007FFFF8001F1F1C001E1E1C001E1E1C001C1C1C001C1C1C001C1C1C
001C1C1C001C1C1C001C1C1C001C1C1C001C1C1C001C1C1C001C1C1C001C1C1C001C1C1C
007F1F1F00FF9F9F807F1F1F00191580941A>I112 D<00C00001C00001C00001C00001C00001C00001
C0007FFFE0FFFFE0FFFFE001C00001C00001C00001C00001C00001C00001C00001C00001
C00001C00001C07001C07001C07001C07000E0E000FFE0007FC0001F00141C7F9B1A>
116 D
I<7FC7F87FCFFC7FC7F80703C003838003C70001EF0000FE00007C00007800003800007C
0000EE0001EE0001C7000383800783C00F01C07FC7FCFFC7FE7FC7FC17157F941A>120
D E /Fc 16 118 df<0001FC000703000C03001C07001C03001800003800003800003800
00380000700007FFFC00701C00701C00701C00E03800E03800E03800E03800E07001C070
01C07001C07001C0E201C0E201C0E20380E4038064038038038000030000070000060000
C60000E40000CC00007000001825819C17>12 D<060F0F06000000000000000000003078
F06008127C910D>58 D<0300078007800300000000000000000000000000000000000000
0000180038007800380008000800100010002000400040008000091A7D910D>I<03CC06
3C0C3C181C3838303870387038E070E070E070E070E0E2C0E2C0E261E462643C380F127B
9115>97 D<01F007080C08181C3838300070007000E000E000E000E000E000E008E01060
2030C01F000E127B9113>99 D<01E007100C1018083810701070607F80E000E000E000E0
00E000E0086010602030C01F000D127B9113>101 D<0003C0000670000C70001C60001C
00001C0000380000380000380000380000380003FF800070000070000070000070000070
0000E00000E00000E00000E00000E00001C00001C00001C00001C00001C0000380000380
00038000030000030000070000C60000E60000CC00007800001425819C0D>I<00F3018F
030F06070E0E0C0E1C0E1C0E381C381C381C381C383830383038187818F00F7000700070
00E000E0C0C0E1C0C3007E00101A7D9113>I<0180038001000000000000000000000000
0000001C002600470047008E008E000E001C001C001C0038003800710071007100720072
003C00091C7C9B0D>105 D<1F800380038007000700070007000E000E000E000E001C00
1C001C001C0038003800380038007000700070007000E400E400E400E40068003800091D
7C9C0B>108 D<3C3C002646004687004707008E07008E07000E07000E07001C0E001C0E
001C0E001C1C00381C40381C40383840383880701900300E0012127C9117>110
D<01E007180C0C180C380C300E700E700EE01CE01CE01CE018E038E030E06060C031801E
000F127B9115>I<3C3C26C2468747078E068E000E000E001C001C001C001C0038003800
380038007000300010127C9112>114 D<01F006080C080C1C18181C001F001FC00FF007
F0007800386030E030C030806060C01F000E127D9111>I<00C001C001C001C003800380
03800380FFE00700070007000E000E000E000E001C001C001C001C003840384038403880
19000E000B1A7D990E>I<1E0300270700470700470700870E00870E000E0E000E0E001C
1C001C1C001C1C001C1C003838803838801838801839001C5900078E0011127C9116>I
E /Fd 3 107 df<03C00FF01FF83FFC7FFE7FFEFFFFFFFFFFFFFFFF7FFE7FFE3FFC1FF8
0FF003C010107E9115>15 D<0000030000000003000000000180000000018000000000C0
0000000060007FFFFFF000FFFFFFF8000000000E00000000070000000001E00000000078
00000001E0000000038000000006000000001C00FFFFFFF8007FFFFFF000000000600000
0000C000000001800000000180000000030000000003000025187E952A>41
D106 D E /Fe 37 124 df<00180030006000C001C0038007
0007000E001E001C003C003C003C007800780078007800F800F000F000F000F000F000F0
00F000F000F000F000F000F80078007800780078003C003C003C001C001E000E00070007
00038001C000C00060003000180D317BA416>40 DI<387CFEFEFE7C3807077C8610>46
D<00180000780001F800FFF800FFF80001F80001F80001F80001F80001F80001F80001F8
0001F80001F80001F80001F80001F80001F80001F80001F80001F80001F80001F80001F8
0001F80001F80001F80001F80001F80001F8007FFFE07FFFE013207C9F1C>49
D<03FC000FFF003C1FC07007E07C07F0FE03F0FE03F8FE03F8FE01F87C01F83803F80003
F80003F00003F00007E00007C0000F80001F00003E0000380000700000E01801C0180380
180700180E00380FFFF01FFFF03FFFF07FFFF0FFFFF0FFFFF015207D9F1C>I<00FE0007
FFC00F07E01E03F03F03F03F81F83F81F83F81F81F03F81F03F00003F00003E00007C000
1F8001FE0001FF000007C00001F00001F80000FC0000FC3C00FE7E00FEFF00FEFF00FEFF
00FEFF00FC7E01FC7801F81E07F00FFFC001FE0017207E9F1C>I<0000E00001E00003E0
0003E00007E0000FE0001FE0001FE00037E00077E000E7E001C7E00187E00307E00707E0
0E07E00C07E01807E03807E07007E0E007E0FFFFFEFFFFFE0007E00007E00007E00007E0
0007E00007E00007E000FFFE00FFFE17207E9F1C>I<1000201E01E01FFFC01FFF801FFF
001FFE001FF8001BC00018000018000018000018000019FC001FFF001E0FC01807E01803
E00003F00003F00003F80003F83803F87C03F8FE03F8FE03F8FC03F0FC03F07007E03007
C01C1F800FFF0003F80015207D9F1C>I<001F8000FFE003F07007C0F00F01F81F01F83E
01F83E01F87E00F07C00007C0000FC0800FC7FC0FCFFE0FD80F0FF00F8FE007CFE007CFC
007EFC007EFC007EFC007E7C007E7C007E7C007E3C007C3E007C1E00F80F00F00783E003
FFC000FF0017207E9F1C>I<6000007800007FFFFE7FFFFE7FFFFC7FFFF87FFFF87FFFF0
E00060E000C0C00180C00300C00300000600000C00001C00001800003800007800007800
00F00000F00000F00001F00001F00001F00003F00003F00003F00003F00003F00003F000
03F00001E00017227DA11C>I<0003FE0080001FFF818000FF01E38001F8003F8003E000
1F8007C0000F800F800007801F800007803F000003803F000003807F000001807E000001
807E00000180FE00000000FE00000000FE00000000FE00000000FE00000000FE00000000
FE00000000FE000000007E000000007E000001807F000001803F000001803F000003801F
800003000F8000030007C000060003F0000C0001F800380000FF00F000001FFFC0000003
FE000021227DA128>67 D<0003FE0040001FFFC0C0007F00F1C001F8003FC003F0000FC0
07C00007C00FC00003C01F800003C03F000001C03F000001C07F000000C07E000000C07E
000000C0FE00000000FE00000000FE00000000FE00000000FE00000000FE00000000FE00
000000FE000FFFFC7E000FFFFC7F00001FC07F00001FC03F00001FC03F00001FC01F8000
1FC00FC0001FC007E0001FC003F0001FC001FC003FC0007F80E7C0001FFFC3C00003FF00
C026227DA12C>71 D73 D<0007FC0000003FFF800000FC07E00003F001F80007E000FC00
0FC0007E001F80003F001F80003F003F00001F803F00001F807F00001FC07E00000FC07E
00000FC0FE00000FE0FE00000FE0FE00000FE0FE00000FE0FE00000FE0FE00000FE0FE00
000FE0FE00000FE0FE00000FE07E00000FC07F00001FC07F00001FC03F00001F803F8000
3F801F80003F000FC0007E0007E000FC0003F001F80000FC07E000003FFF80000007FC00
0023227DA12A>79 D<07FC001FFF803F07C03F03E03F01E03F01F01E01F00001F00001F0
003FF003FDF01FC1F03F01F07E01F0FC01F0FC01F0FC01F0FC01F07E02F07E0CF81FF87F
07E03F18167E951B>97 DI<00FF8007FFE00F83F01F03F03E03F07E03F07C01E07C
0000FC0000FC0000FC0000FC0000FC0000FC00007C00007E00007E00003E00301F00600F
C0E007FF8000FE0014167E9519>I<0001FE000001FE0000003E0000003E0000003E0000
003E0000003E0000003E0000003E0000003E0000003E0000003E0000003E0001FC3E0007
FFBE000F81FE001F007E003E003E007E003E007C003E00FC003E00FC003E00FC003E00FC
003E00FC003E00FC003E00FC003E00FC003E007C003E007C003E003E007E001E00FE000F
83BE0007FF3FC001FC3FC01A237EA21F>I<00FE0007FF800F87C01E01E03E01F07C00F0
7C00F8FC00F8FC00F8FFFFF8FFFFF8FC0000FC0000FC00007C00007C00007E00003E0018
1F00300FC07003FFC000FF0015167E951A>I<003F8000FFC001E3E003C7E007C7E00F87
E00F83C00F80000F80000F80000F80000F80000F8000FFFC00FFFC000F80000F80000F80
000F80000F80000F80000F80000F80000F80000F80000F80000F80000F80000F80000F80
000F80000F80000F80007FF8007FF80013237FA211>I<03FC1E0FFF7F1F0F8F3E07CF3C
03C07C03E07C03E07C03E07C03E07C03E03C03C03E07C01F0F801FFF0013FC0030000030
00003800003FFF801FFFF00FFFF81FFFFC3800FC70003EF0001EF0001EF0001EF0001E78
003C7C007C3F01F80FFFE001FF0018217E951C>II<1C003E007F007F007F003E00
1C000000000000000000000000000000FF00FF001F001F001F001F001F001F001F001F00
1F001F001F001F001F001F001F001F001F001F00FFE0FFE00B247EA310>I
108 DII<00FE0007FFC00F83E01E00F03E00F8
7C007C7C007C7C007CFC007EFC007EFC007EFC007EFC007EFC007EFC007E7C007C7C007C
3E00F81F01F00F83E007FFC000FE0017167E951C>II<00FE030007FF87000FC1C7001F006F003F003F007E003F
007E001F007C001F00FC001F00FC001F00FC001F00FC001F00FC001F00FC001F00FC001F
007E001F007E001F003E003F001F007F000FC1DF0007FF9F0001FC1F0000001F0000001F
0000001F0000001F0000001F0000001F0000001F0000001F000000FFE00000FFE01B207E
951E>II<0FF3003FFF00781F00600700E00300E00300F00300FC00007FE0007FF8003F
FE000FFF0001FF00000F80C00780C00380E00380E00380F00700FC0E00EFFC00C7F00011
167E9516>I<0180000180000180000180000380000380000780000780000F80003F8000
FFFF00FFFF000F80000F80000F80000F80000F80000F80000F80000F80000F80000F8000
0F80000F81800F81800F81800F81800F81800F830007C30003FE0000F80011207F9F16>
II119
DII123
D E /Ff 50 124 df<003FC00001F0300003C0380007C07C000F807C000F807C000F8038
000F8000000F8000000F8000000F800000FFFFFC00FFFFFC000F807C000F807C000F807C
000F807C000F807C000F807C000F807C000F807C000F807C000F807C000F807C000F807C
000F807C000F807C007FE1FF807FE1FF80191D809C1B>12 D<78FCFCFCFCFCFC78787878
78787878303030300000000078FCFCFCFC78061D7C9C0F>33 D<00200040018003800300
06000E001C001C003C0038003800780078007800F800F000F000F000F000F000F000F000
F000F000F800780078007800380038003C001C001C000E00060003000380018000400020
0B297C9E13>40 D<800040003000380018000C000E000700070007800380038003C003C0
03C003E001E001E001E001E001E001E001E001E001E003E003C003C003C0038003800780
070007000E000C00180038003000400080000B297D9E13>I<78FCFCFCFC7806067D850D>
46 D<03F8000F1E001C07003C07803803807803C07803C07803C0F803E0F803E0F803E0
F803E0F803E0F803E0F803E0F803E0F803E0F803E0F803E0F803E07803C07803C0380380
3C07801C07000F1E0003F800131B7E9A18>48 D<00600001E0000FE000FFE000F3E00003
E00003E00003E00003E00003E00003E00003E00003E00003E00003E00003E00003E00003
E00003E00003E00003E00003E00003E00003E00003E0007FFF807FFF80111B7D9A18>I<
07F8001FFE00383F80780FC0FC07C0FC07E0FC03E0FC03E07803E00007E00007C00007C0
000F80001F00001E0000380000700000E0000180600300600600600800E01FFFC03FFFC0
7FFFC0FFFFC0FFFFC0131B7E9A18>I<03F8001FFE003C1F003C0F807C07C07E07C07C07
C03807C0000F80000F80001E00003C0003F800001E00000F800007C00007C00007E03007
E07807E0FC07E0FC07E0FC07C0780F80781F001FFE0007F800131B7E9A18>I<00018000
0380000780000F80001F80003F80006F8000CF80008F80018F80030F80060F800C0F8018
0F80300F80600F80C00F80FFFFF8FFFFF8000F80000F80000F80000F80000F80000F8001
FFF801FFF8151B7F9A18>I<1801801FFF001FFE001FFC001FF8001FC000180000180000
18000018000019F8001E0E00180F801007800007C00007E00007E00007E07807E0F807E0
F807E0F807C0F007C0600F80381F001FFE0007F000131B7E9A18>I<007E0003FF000781
800F03C01E07C03C07C03C0380780000780000F80000F8F800FB0E00FA0780FC0380FC03
C0F803E0F803E0F803E0F803E07803E07803E07803C03C03C03C07801E0F0007FE0003F8
00131B7E9A18>I<6000007FFFE07FFFE07FFFC07FFF807FFF80E00300C00600C00C00C0
180000300000300000600000E00000E00001E00001C00003C00003C00003C00003C00007
C00007C00007C00007C00007C00007C000038000131C7D9B18>I66 D<001FE02000FFF8E003F80FE007C003E00F8001E01F0000E03E0000E03E0000607E
0000607C000060FC000000FC000000FC000000FC000000FC000000FC000000FC000000FC
0000007C0000607E0000603E0000603E0000C01F0000C00F80018007C0030003F80E0000
FFFC00001FE0001B1C7D9B22>III<
FFFC3FFFFFFC3FFF0FC003F00FC003F00FC003F00FC003F00FC003F00FC003F00FC003F0
0FC003F00FC003F00FC003F00FFFFFF00FFFFFF00FC003F00FC003F00FC003F00FC003F0
0FC003F00FC003F00FC003F00FC003F00FC003F00FC003F00FC003F00FC003F0FFFC3FFF
FFFC3FFF201C7E9B25>72 DI76 D78
D<003FE00001F07C0003C01E000F800F801F0007C01E0003C03E0003E07E0003F07C0001
F07C0001F0FC0001F8FC0001F8FC0001F8FC0001F8FC0001F8FC0001F8FC0001F8FC0001
F87C0001F07E0003F07E0003F03E0003E03F0007E01F0007C00F800F8003C01E0001F07C
00003FE0001D1C7D9B24>II82 D<07F8201FFEE03C07E0
7801E07000E0F000E0F00060F00060F80000FE0000FFE0007FFE003FFF003FFF800FFFC0
07FFE0007FE00003F00001F00000F0C000F0C000F0C000E0E000E0F001C0FC03C0EFFF00
83FC00141C7D9B1B>I<7FFFFFE07FFFFFE0781F81E0701F80E0601F8060E01F8070C01F
8030C01F8030C01F8030C01F8030001F8000001F8000001F8000001F8000001F8000001F
8000001F8000001F8000001F8000001F8000001F8000001F8000001F8000001F8000001F
8000001F800007FFFE0007FFFE001C1C7E9B21>I<0FF8001C1E003E0F803E07803E07C0
1C07C00007C0007FC007E7C01F07C03C07C07C07C0F807C0F807C0F807C0780BC03E13F8
0FE1F815127F9117>97 DI<03FC00
0E0E001C1F003C1F00781F00780E00F80000F80000F80000F80000F80000F80000780000
7801803C01801C03000E0E0003F80011127E9115>I<000FF0000FF00001F00001F00001
F00001F00001F00001F00001F00001F00001F001F9F00F07F01C03F03C01F07801F07801
F0F801F0F801F0F801F0F801F0F801F0F801F07801F07801F03C01F01C03F00F0FFE03F9
FE171D7E9C1B>I<01FC000F07001C03803C01C07801C07801E0F801E0F801E0FFFFE0F8
0000F80000F800007800007C00603C00601E00C00F038001FC0013127F9116>I<007F00
01E38003C7C00787C00F87C00F83800F80000F80000F80000F80000F8000FFF800FFF800
0F80000F80000F80000F80000F80000F80000F80000F80000F80000F80000F80000F8000
0F80000F80007FF8007FF800121D809C0F>I<03F8F00E0F381E0F381C07303C07803C07
803C07803C07801C07001E0F000E0E001BF8001000001800001800001FFF001FFFC00FFF
E01FFFF07801F8F00078F00078F000787000707800F01E03C007FF00151B7F9118>II<1E003F003F003F003F001E00000000
000000000000000000FF00FF001F001F001F001F001F001F001F001F001F001F001F001F
001F001F00FFE0FFE00B1E7F9D0E>I107 DIII<01FC000F07801C01C03C01E07800F07800F0F800F8F800F8F8
00F8F800F8F800F8F800F87800F07800F03C01E01E03C00F078001FC0015127F9118>I<
FF3F80FFE1E01F80F01F00781F007C1F003C1F003E1F003E1F003E1F003E1F003E1F003E
1F003C1F007C1F00781F80F01FC1E01F3F001F00001F00001F00001F00001F00001F0000
FFE000FFE000171A7F911B>I114 D<1FD830786018E018E018F000FF807FE07FF01FF807FC007CC01CC01CE01CE018
F830CFC00E127E9113>I<0300030003000300070007000F000F003FFCFFFC1F001F001F
001F001F001F001F001F001F001F0C1F0C1F0C1F0C0F08079803F00E1A7F9913>IIIIII123
D E /Fg 45 126 df45 D<70F8F8F8700505788416
>I<000180000380000380000700000700000E00000E00001C00001C0000380000380000
700000700000E00000E00001C00001C0000380000380000700000700000E00000E00001C
00001C0000380000380000700000700000E00000E00000C0000011207E9C16>I<03E000
0FF8001FFC001E3C00380E00780F00700700700700E00380E00380E00380E00380E00380
E00380E00380E00380F00780700700700700780F003C1E001E3C001FFC000FF80003E000
11197E9816>I<01800380038007800F807F80FF80738003800380038003800380038003
8003800380038003800380038003807FF87FFC7FF80E197C9816>I<07E0001FF8003FFC
00783E00E00700F00780F00380600380000380000380000700000700000E00001C000038
0000700000E00001C0000380000F00001E03803803807FFF80FFFF807FFF8011197E9816
>I<07E0001FF8003FFC00781E00780700300700000700000700000E00003E0007FC0007
F00007FC00001E00000700000300000380000380600380F00380E00700781E003FFC001F
F80007E00011197E9816>I<007C0000FC0000DC0001DC00039C00039C00071C000F1C00
0E1C001E1C003C1C00381C00781C00F01C00FFFFE0FFFFE0FFFFE0001C00001C00001C00
001C00001C0001FFC001FFC001FFC013197F9816>I<70F8F8F870000000000000000070
F8F8F8700512789116>58 D<000180000780001F80003E0000F80001F00007C0000F8000
3E0000FC0000F00000FC00003E00000F800007C00001F00000F800003E00001F80000780
00018011157E9616>60 D<7FFF00FFFF80FFFF80000000000000000000000000000000FF
FF80FFFF807FFF00110B7E9116>II<00F80003FC0007FE000F07001C3F80387F8078FF8071C3
C071C3C0E381C0E381C0E381C0E381C0E381C0E381C0E381C071C38071C38078FF00387E
001C3C000F03C007FFC003FF0000FC0012197E9816>64 D<01F18007FB800FFF801F0F80
3C0780380380700380700380F00000E00000E00000E00000E00000E00000E00000E00000
F000007003807003803803803C07001F0F000FFE0007FC0001F00011197E9816>67
D73 D76
DI<1FFC003FFE007FFF00780F00F00780E00380E00380E00380E0
0380E00380E00380E00380E00380E00380E00380E00380E00380E00380E00380F00780F0
0780780F007FFF003FFE001FFC0011197E9816>79 D<7FF800FFFE007FFF001C0F801C03
801C03C01C01C01C01C01C01C01C03C01C03801C0F801FFF001FFE001FF8001C00001C00
001C00001C00001C00001C00001C00007F0000FF80007F000012197F9816>I92
D<1FE0003FF0007FF800783C00300E00000E00000E0003FE001FFE003E0E00700E00E00E
00E00E00E00E00783E007FFFE03FE7E00F83E013127E9116>97 D<7E0000FE00007E0000
0E00000E00000E00000E00000E3E000EFF000FFF800F83C00F00E00E00E00E00700E0070
0E00700E00700E00700E00700E00E00F01E00F83C00FFF800EFF00063C001419809816>
I<03F80FFC1FFE3C1E780C7000E000E000E000E000E000F000700778073E0E1FFC0FF803
F010127D9116>I<003F00007F00003F0000070000070000070000070003C7000FF7001F
FF003C1F00780F00700700E00700E00700E00700E00700E00700E00700700F00700F003C
1F001FFFE00FE7F007C7E014197F9816>I<03E00FF81FFC3C1E780E7007E007FFFFFFFF
FFFFE000E000700778073C0F1FFE0FFC03F010127D9116>I<001F00007F8000FF8001E7
8001C30001C00001C0007FFF00FFFF00FFFF0001C00001C00001C00001C00001C00001C0
0001C00001C00001C00001C00001C00001C0003FFE007FFF003FFE0011197F9816>I<03
E3C007F7E00FFFE01C1CC0380E00380E00380E00380E00380E001C1C000FF8001FF0001B
E0003800001800001FFC001FFF003FFF807803C0E000E0E000E0E000E0E000E07001C07C
07C03FFF800FFE0003F800131C7F9116>I<7E0000FE00007E00000E00000E00000E0000
0E00000E3C000EFE000FFF000F87800F03800E03800E03800E03800E03800E03800E0380
0E03800E03800E03800E03807FC7F0FFE7F87FC7F01519809816>I<018003C003C00180
00000000000000007FC07FC07FC001C001C001C001C001C001C001C001C001C001C001C0
01C07FFFFFFF7FFF101A7D9916>I<7E0000FE00007E00000E00000E00000E00000E0000
0E7FE00E7FE00E7FE00E0F000E1E000E3C000E78000EF0000FF0000FF8000FBC000F1E00
0E0E000E07000E07807F87F0FFCFF07F87F01419809816>107 D
II<7E3C00FEFE007FFF000F
87800F03800E03800E03800E03800E03800E03800E03800E03800E03800E03800E03807F
C7F0FFE7F87FC7F01512809116>I<03E0000FF8001FFC003C1E00780F00700700E00380
E00380E00380E00380E00380F00780700700780F003C1E001FFC000FF80003E00011127E
9116>I<7E3E00FEFF007FFF800F83C00F00E00E00E00E00700E00700E00700E00700E00
700E00700E00E00F01E00F83C00FFF800EFF000E3C000E00000E00000E00000E00000E00
000E00007FC000FFE0007FC000141B809116>I<07C7000FE7001FF7003C1F00700F0070
0F00E00700E00700E00700E00700E00700E00700700F00700F003C3F003FF7001FE70007
C700000700000700000700000700000700000700003FE0007FF0003FE0141B7E9116>I<
FF0FC0FF3FE0FF7FE007F04007C000078000078000070000070000070000070000070000
070000070000070000FFFC00FFFC00FFFC0013127F9116>I<0FEC3FFC7FFCF03CE01CE0
1C70007F801FF007F8003C600EE00EF00EF81EFFFCFFF8C7E00F127D9116>I<03000007
00000700000700000700007FFF00FFFF00FFFF0007000007000007000007000007000007
000007000007010007038007038007038007870003FE0001FC0000F80011177F9616>I<
7E1F80FE3F807E1F800E03800E03800E03800E03800E03800E03800E03800E03800E0380
0E03800E03800E0F800FFFF007FBF803E3F01512809116>I<7F1FC0FF1FE07F1FC01C07
001E0F000E0E000E0E000E0E00071C00071C00071C00071C0003B80003B80003B80001F0
0001F00000E00013127F9116>I<7F1FC07F3FC07F1FC00F1C00073C0003B80003F00001
F00000E00001E00001F00003B800073C00071C000E0E007F1FC0FF3FE07F1FC013127F91
16>120 D<7F1FC0FF9FE07F1FC01C07000E07000E0E000E0E00070E00071C00071C0003
9C00039C0003980001B80001B80000F00000F00000F00000E00000E00000E00001C00079
C0007BC0007F80003F00003C0000131B7F9116>I<001F80007F8000FF8001E00001C000
01C00001C00001C00001C00001C00001C00001C00001C00003C0007F8000FF0000FF0000
7F800003C00001C00001C00001C00001C00001C00001C00001C00001C00001C00001E000
00FF80007F80001F8011207E9C16>123 D<7C0000FF0000FF800003C00001C00001C000
01C00001C00001C00001C00001C00001C00001C00001E00000FF00007F80007F8000FF00
01E00001C00001C00001C00001C00001C00001C00001C00001C00001C00003C000FF8000
FF00007C000011207E9C16>125 D E /Fh 67 124 df<007E1F0001C1B1800303E3C007
03C3C00E03C1800E01C0000E01C0000E01C0000E01C0000E01C0000E01C000FFFFFC000E
01C0000E01C0000E01C0000E01C0000E01C0000E01C0000E01C0000E01C0000E01C0000E
01C0000E01C0000E01C0000E01C0000E01C0000E01C0000E01C0007F87FC001A1D809C18
>11 D<007E0001C1800301800703C00E03C00E01800E00000E00000E00000E00000E0000
FFFFC00E01C00E01C00E01C00E01C00E01C00E01C00E01C00E01C00E01C00E01C00E01C0
0E01C00E01C00E01C00E01C00E01C07F87F8151D809C17>I<6060F0F0F8F86868080808
080808101010102020404080800D0C7F9C15>34 D<60F0F8680808081010204080050C7C
9C0C>39 D<004000800100020006000C000C0018001800300030007000600060006000E0
00E000E000E000E000E000E000E000E000E000E000E00060006000600070003000300018
0018000C000C00060002000100008000400A2A7D9E10>I<800040002000100018000C00
0C000600060003000300038001800180018001C001C001C001C001C001C001C001C001C0
01C001C001C0018001800180038003000300060006000C000C0018001000200040008000
0A2A7E9E10>I<0006000000060000000600000006000000060000000600000006000000
0600000006000000060000000600000006000000060000FFFFFFE0FFFFFFE00006000000
060000000600000006000000060000000600000006000000060000000600000006000000
06000000060000000600001B1C7E9720>43 D<60F0F0701010101020204080040C7C830C
>II<60F0F06004047C830C>I<03C00C301818300C300C700E60
066006E007E007E007E007E007E007E007E007E007E007E007E007E00760066006700E30
0C300C18180C3007E0101D7E9B15>48 D<030007003F00C7000700070007000700070007
0007000700070007000700070007000700070007000700070007000700070007000F80FF
F80D1C7C9B15>I<07C01830201C400C400EF00FF80FF807F8077007000F000E000E001C
001C00380070006000C00180030006010C01180110023FFE7FFEFFFE101C7E9B15>I<07
E01830201C201C781E780E781E381E001C001C00180030006007E00030001C001C000E00
0F000F700FF80FF80FF80FF00E401C201C183007E0101D7E9B15>I<000C00000C00001C
00003C00003C00005C0000DC00009C00011C00031C00021C00041C000C1C00081C00101C
00301C00201C00401C00C01C00FFFFC0001C00001C00001C00001C00001C00001C00001C
0001FFC0121C7F9B15>I<300C3FF83FF03FC020002000200020002000200023E0243028
18301C200E000E000F000F000F600FF00FF00FF00F800E401E401C2038187007C0101D7E
9B15>I<00F0030C06040C0E181E301E300C700070006000E3E0E430E818F00CF00EE006
E007E007E007E007E007600760077006300E300C18180C3003E0101D7E9B15>I<400000
7FFF807FFF007FFF00400200800400800400800800001000001000002000006000004000
00C00000C00001C000018000018000038000038000038000038000078000078000078000
078000078000078000030000111D7E9B15>I<03E00C301008200C200660066006600670
06780C3E083FB01FE007F007F818FC307E601E600FC007C003C003C003C0036002600430
0C1C1007E0101D7E9B15>I<60F0F0600000000000000000000060F0F06004127C910C>
58 D<60F0F0600000000000000000000060F0F0701010101020204080041A7C910C>I<7F
FFFFC0FFFFFFE00000000000000000000000000000000000000000000000000000000000
000000FFFFFFE07FFFFFC01B0C7E8F20>61 D<0FE03038401CE00EF00EF00EF00E000C00
1C0030006000C00080018001000100010001000100010000000000000000000000030007
80078003000F1D7E9C14>63 D<000600000006000000060000000F0000000F0000000F00
000017800000178000001780000023C0000023C0000023C0000041E0000041E0000041E0
000080F0000080F0000180F8000100780001FFF80003007C0002003C0002003C0006003E
0004001E0004001E000C001F001E001F00FF80FFF01C1D7F9C1F>65
DI<001F808000E061800180198007000780
0E0003801C0003801C00018038000180780000807800008070000080F0000000F0000000
F0000000F0000000F0000000F0000000F0000000F0000000700000807800008078000080
380000801C0001001C0001000E000200070004000180080000E03000001FC000191E7E9C
1E>IIII<001F808000E0618001801980070007800E000380
1C0003801C00018038000180780000807800008070000080F0000000F0000000F0000000
F0000000F0000000F0000000F000FFF0F0000F8070000780780007807800078038000780
1C0007801C0007800E00078007000B800180118000E06080001F80001C1E7E9C21>II
I76 DI<07E0801C1980300580700380
600180E00180E00080E00080E00080F00000F800007C00007FC0003FF8001FFE0007FF00
00FF80000F800007C00003C00001C08001C08001C08001C0C00180C00180E00300D00200
CC0C0083F800121E7E9C17>83 D<7FFFFFC0700F01C0600F00C0400F0040400F0040C00F
0020800F0020800F0020800F0020000F0000000F0000000F0000000F0000000F0000000F
0000000F0000000F0000000F0000000F0000000F0000000F0000000F0000000F0000000F
0000000F0000000F0000001F800003FFFC001B1C7F9B1E>II87 D91 D<08081010202040404040
808080808080B0B0F8F8787830300D0C7A9C15>II<1FC000
307000783800781C00301C00001C00001C0001FC000F1C00381C00701C00601C00E01C40
E01C40E01C40603C40304E801F870012127E9115>97 DI<07E00C301878307870306000E000E000E000E000E000E000600070
04300418080C3007C00E127E9112>I<003F000007000007000007000007000007000007
0000070000070000070000070003E7000C1700180F00300700700700600700E00700E007
00E00700E00700E00700E00700600700700700300700180F000C370007C7E0131D7E9C17
>I<03E00C301818300C700E6006E006FFFEE000E000E000E00060007002300218040C18
03E00F127F9112>I<00F8018C071E061E0E0C0E000E000E000E000E000E00FFE00E000E
000E000E000E000E000E000E000E000E000E000E000E000E000E000E007FE00F1D809C0D
>I<00038003C4C00C38C01C3880181800381C00381C00381C00381C001818001C38000C
300013C0001000003000001800001FF8001FFF001FFF803003806001C0C000C0C000C0C0
00C06001803003001C0E0007F800121C7F9215>II<18003C003C0018000000000000000000000000000000FC001C001C001C
001C001C001C001C001C001C001C001C001C001C001C001C001C00FF80091D7F9C0C>I<
FC00001C00001C00001C00001C00001C00001C00001C00001C00001C00001C00001C3FC0
1C0F001C0C001C08001C10001C20001C40001CE0001DE0001E70001C78001C38001C3C00
1C1C001C0E001C0F001C0F80FF9FE0131D7F9C16>107 DIII<03F0000E1C
00180600300300700380600180E001C0E001C0E001C0E001C0E001C0E001C06001807003
803003001806000E1C0003F00012127F9115>II<03C100
0C3300180B00300F00700700700700E00700E00700E00700E00700E00700E00700600700
700700300F00180F000C370007C700000700000700000700000700000700000700000700
003FE0131A7E9116>II<1F9030704030C010C010E010F8007F803FE00F
F000F880388018C018C018E010D0608FC00D127F9110>I<04000400040004000C000C00
1C003C00FFE01C001C001C001C001C001C001C001C001C001C101C101C101C101C100C10
0E2003C00C1A7F9910>II<
FF07E03C03801C01001C01000E02000E020007040007040007040003880003880003D800
01D00001D00000E00000E00000E00000400013127F9116>II<7F8FF00F
03800F030007020003840001C80001D80000F00000700000780000F800009C00010E0002
0E000607000403801E07C0FF0FF81512809116>II<7FFC
70386038407040F040E041C003C0038007000F040E041C043C0C380870087038FFF80E12
7F9112>II E /Fi 28 119 df<000E00001E00007E0007FE00FFFE
00FFFE00F8FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE
0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE
0000FE0000FE0000FE0000FE0000FE0000FE0000FE007FFFFE7FFFFE7FFFFE17277BA622
>49 D<00FF800003FFF0000FFFFC001F03FE003800FF007C007F80FE003FC0FF003FC0FF
003FE0FF001FE0FF001FE07E001FE03C003FE000003FE000003FC000003FC000007F8000
007F000000FE000000FC000001F8000003F0000003E00000078000000F0000001E000000
3C00E0007000E000E000E001C001C0038001C0070001C00FFFFFC01FFFFFC03FFFFFC07F
FFFFC0FFFFFF80FFFFFF80FFFFFF801B277DA622>I<007F800003FFF00007FFFC000F81
FE001F00FF003F80FF003F807F803F807F803F807F801F807F800F007F800000FF000000
FF000000FE000001FC000001F8000007F00000FFC00000FFF0000001FC0000007E000000
7F0000007F8000003FC000003FC000003FE000003FE03C003FE07E003FE0FF003FE0FF00
3FE0FF003FC0FF007FC07E007F807C007F003F01FE001FFFFC0007FFF00000FF80001B27
7DA622>I<00000E0000001E0000003E0000007E000000FE000000FE000001FE000003FE
0000077E00000E7E00000E7E00001C7E0000387E0000707E0000E07E0000E07E0001C07E
0003807E0007007E000E007E000E007E001C007E0038007E0070007E00E0007E00FFFFFF
F8FFFFFFF8FFFFFFF80000FE000000FE000000FE000000FE000000FE000000FE000000FE
000000FE00007FFFF8007FFFF8007FFFF81D277EA622>I68 D70 D73 D<0000FFE000000007FFFC0000003FC07F8000007F001FC00001FC
0007F00003F80003F80007F00001FC000FF00001FE001FE00000FF001FE00000FF003FC0
00007F803FC000007F807FC000007FC07F8000003FC07F8000003FC07F8000003FC0FF80
00003FE0FF8000003FE0FF8000003FE0FF8000003FE0FF8000003FE0FF8000003FE0FF80
00003FE0FF8000003FE0FF8000003FE0FF8000003FE07F8000003FC07FC000007FC07FC0
00007FC03FC000007F803FC000007F801FE00000FF001FE00000FF000FF00001FE0007F0
0001FC0003F80003F80001FC0007F00000FF001FE000003FC07F8000000FFFFE00000000
FFE000002B297CA834>79 DI82 D<01FF800007FFF0000F81F8001FC07E001FC07E001FC03F000F80
3F8007003F8000003F8000003F8000003F80000FFF8000FFFF8007FC3F800FE03F803F80
3F803F003F807F003F80FE003F80FE003F80FE003F80FE003F807E007F807F00DF803F83
9FFC0FFF0FFC01FC03FC1E1B7E9A21>97 D<001FF80000FFFE0003F01F0007E03F800FC0
3F801F803F803F801F007F800E007F0000007F000000FF000000FF000000FF000000FF00
0000FF000000FF000000FF0000007F0000007F0000007F8000003F8001C01F8001C00FC0
038007E0070003F01E0000FFFC00001FE0001A1B7E9A1F>99 D<00003FF80000003FF800
00003FF800000003F800000003F800000003F800000003F800000003F800000003F80000
0003F800000003F800000003F800000003F800000003F800000003F800001FE3F80000FF
FBF80003F03FF80007E00FF8000FC007F8001F8003F8003F8003F8007F0003F8007F0003
F8007F0003F800FF0003F800FF0003F800FF0003F800FF0003F800FF0003F800FF0003F8
00FF0003F8007F0003F8007F0003F8007F0003F8003F8003F8001F8003F8000F8007F800
07C00FF80003F03BFF8000FFF3FF80003FC3FF80212A7EA926>I<003FE00001FFF80003
F07E0007C01F000F801F801F800F803F800FC07F000FC07F0007C07F0007E0FF0007E0FF
0007E0FFFFFFE0FFFFFFE0FF000000FF000000FF0000007F0000007F0000007F0000003F
8000E01F8000E00FC001C007E0038003F81F0000FFFE00001FF0001B1B7E9A20>I<0007
F0003FFC00FE3E01F87F03F87F03F07F07F07F07F03E07F00007F00007F00007F00007F0
0007F00007F000FFFFC0FFFFC0FFFFC007F00007F00007F00007F00007F00007F00007F0
0007F00007F00007F00007F00007F00007F00007F00007F00007F00007F00007F00007F0
0007F00007F0007FFF807FFF807FFF80182A7EA915>I<00FF81F003FFE7F80FC1FE7C1F
80FC7C1F007C383F007E107F007F007F007F007F007F007F007F007F007F007F007F003F
007E001F007C001F80FC000FC1F8001FFFE00018FF800038000000380000003C0000003E
0000003FFFF8001FFFFF001FFFFF800FFFFFC007FFFFE01FFFFFF03E0007F07C0001F8F8
0000F8F80000F8F80000F8F80000F87C0001F03C0001E01F0007C00FC01F8003FFFE0000
7FF0001E287E9A22>II<07000F801FC03FE03FE03FE01FC00F80070000000000000000
00000000000000FFE0FFE0FFE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00F
E00FE00FE00FE00FE00FE00FE00FE00FE00FE0FFFEFFFEFFFE0F2B7DAA14>I108 DII<003FE00001
FFFC0003F07E000FC01F801F800FC03F800FE03F0007E07F0007F07F0007F07F0007F0FF
0007F8FF0007F8FF0007F8FF0007F8FF0007F8FF0007F8FF0007F8FF0007F87F0007F07F
0007F03F800FE03F800FE01F800FC00FC01F8007F07F0001FFFC00003FE0001D1B7E9A22
>II114 D<03FE300FFFF01E03F03800F0700070F00070F00070F80070FC0000FFE000
7FFE007FFF803FFFE01FFFF007FFF800FFF80003FC0000FC60007CE0003CF0003CF00038
F80038FC0070FF01E0F7FFC0C1FF00161B7E9A1B>I<00700000700000700000700000F0
0000F00000F00001F00003F00003F00007F0001FFFF0FFFFF0FFFFF007F00007F00007F0
0007F00007F00007F00007F00007F00007F00007F00007F00007F00007F00007F03807F0
3807F03807F03807F03807F03803F03803F87001F86000FFC0001F8015267FA51B>III
E /Fj 25 122 df<00200040008001000300060004000C000C0018001800300030003000
7000600060006000E000E000E000E000E000E000E000E000E000E000E000E000E000E000
6000600060007000300030003000180018000C000C000400060003000100008000400020
0B327CA413>40 D<800040002000100018000C0004000600060003000300018001800180
01C000C000C000C000E000E000E000E000E000E000E000E000E000E000E000E000E000E0
00C000C000C001C0018001800180030003000600060004000C0018001000200040008000
0B327DA413>I<70F8FCFC7404040404080810102040060F7C840E>44
D<008003800F80F380038003800380038003800380038003800380038003800380038003
80038003800380038003800380038003800380038003800380038007C0FFFE0F217CA018
>49 D<1000801E07001FFF001FFE001FF80013E000100000100000100000100000100000
10000010F800130E001407001803801003800001C00001C00001E00001E00001E00001E0
7001E0F001E0F001E0E001C08001C04003C04003802007001006000C1C0003F00013227E
A018>53 D<01F800060E000803001001802001802000C06000C06000C06000C07000C078
01803E01003F02001FC4000FF80003F80003FC00067F00083F80100F803007C06001C060
00E0C000E0C00060C00060C00060C000606000406000C03000801803000E0E0003F00013
227EA018>56 D<01F000060C000C0600180700380380700380700380F001C0F001C0F001
C0F001E0F001E0F001E0F001E0F001E07001E07003E03803E01805E00C05E00619E003E1
E00001C00001C00001C0000380000380300300780700780600700C002018001030000FC0
0013227EA018>I72 D<03FFF0001F00000F00000F00000F00000F00000F00000F00000F0000
0F00000F00000F00000F00000F00000F00000F00000F00000F00000F00000F00000F0000
0F00000F00000F00000F00000F00700F00F80F00F80F00F80E00F01E00401C0020380018
700007C00014237EA119>74 D76 D<7FFFFFF878078078600780184007800840078008400780
08C007800C80078004800780048007800480078004000780000007800000078000000780
000007800000078000000780000007800000078000000780000007800000078000000780
000007800000078000000780000007800000078000000780000007800000078000000FC0
0003FFFF001E227EA123>84 D<0FE0001838003C0C003C0E001807000007000007000007
0000FF0007C7001E07003C0700780700700700F00708F00708F00708F00F087817083C23
900FC1E015157E9418>97 D<0000E0000FE00001E00000E00000E00000E00000E00000E0
0000E00000E00000E00000E00000E00000E001F8E00704E00C02E01C01E03800E07800E0
7000E0F000E0F000E0F000E0F000E0F000E0F000E0F000E07000E07800E03800E01801E0
0C02E0070CF001F0FE17237EA21B>100 D<01FC000707000C03801C01C03801C07801E0
7000E0F000E0FFFFE0F00000F00000F00000F00000F000007000007800203800201C0040
0E008007030000FC0013157F9416>I<003C00C6018F038F030F07000700070007000700
0700070007000700FFF80700070007000700070007000700070007000700070007000700
0700070007000700070007807FF8102380A20F>I<0E0000FE00001E00000E00000E0000
0E00000E00000E00000E00000E00000E00000E00000E00000E00000E1F800E60C00E80E0
0F00700F00700E00700E00700E00700E00700E00700E00700E00700E00700E00700E0070
0E00700E00700E00700E00700E0070FFE7FF18237FA21B>104 D<0E00FE001E000E000E
000E000E000E000E000E000E000E000E000E000E000E000E000E000E000E000E000E000E
000E000E000E000E000E000E000E000E000E000E000E00FFE00B237FA20E>108
D<0E1FC07F00FE60E183801E807201C00F003C00E00F003C00E00E003800E00E003800E0
0E003800E00E003800E00E003800E00E003800E00E003800E00E003800E00E003800E00E
003800E00E003800E00E003800E00E003800E00E003800E00E003800E0FFE3FF8FFE2715
7F942A>I<0E1F80FE60C01E80E00F00700F00700E00700E00700E00700E00700E00700E
00700E00700E00700E00700E00700E00700E00700E00700E00700E0070FFE7FF18157F94
1B>I<01FC000707000C01801800C03800E0700070700070F00078F00078F00078F00078
F00078F00078F000787000707800F03800E01C01C00E038007070001FC0015157F9418>
I<0E3CFE461E8F0F0F0F060F000E000E000E000E000E000E000E000E000E000E000E000E
000E000F00FFF010157F9413>114 D<0F8830786018C018C008C008E008F0007F803FE0
0FF001F8003C801C800C800CC00CC008E018D0308FC00E157E9413>I<02000200020002
000600060006000E001E003E00FFF80E000E000E000E000E000E000E000E000E000E000E
000E040E040E040E040E040E040708030801F00E1F7F9E13>I<0E0070FE07F01E00F00E
00700E00700E00700E00700E00700E00700E00700E00700E00700E00700E00700E00700E
00700E00F00E00F006017003827800FC7F18157F941B>I121 D E /Fk 14 117 df<00000300000000000300
000000000300000000000780000000000780000000000FC0000000000FC0000000000FC0
0000000017E00000000013E00000000013E00000000023F00000000021F00000000021F0
0000000040F80000000040F80000000040F800000000807C00000000807C00000001807E
00000001003E00000001003E00000002003F00000002001F00000002001F00000004000F
80000004000F80000004000F800000080007C00000080007C00000180007E000001FFFFF
E000001FFFFFE00000200003F00000200001F00000200001F00000400001F80000400000
F80000400000F800008000007C00008000007C00008000007C00010000003E0001000000
3E00030000003F00030000001F00070000001F001F8000003F80FFE00003FFFCFFE00003
FFFC2E327EB132>65 D73 D<7FFFFFFFFFE07FFFFFFFFFE07E000F
8007E078000F8001E070000F8000E060000F80006040000F80002040000F800020C0000F
800030C0000F80003080000F80001080000F80001080000F80001080000F80001080000F
80001080000F80001000000F80000000000F80000000000F80000000000F80000000000F
80000000000F80000000000F80000000000F80000000000F80000000000F80000000000F
80000000000F80000000000F80000000000F80000000000F80000000000F80000000000F
80000000000F80000000000F80000000000F80000000000F80000000000F80000000000F
80000000000F80000000000F80000000000F80000000000F80000000000F80000000000F
80000000000F80000000001FC00000000FFFFF8000000FFFFF80002C317EB030>84
DI<00FE00000303C0000C00E00010007000
100038003C003C003E001C003E001E003E001E0008001E0000001E0000001E0000001E00
000FFE0000FC1E0003E01E000F801E001F001E003E001E003C001E007C001E00F8001E04
F8001E04F8001E04F8003E04F8003E0478003E047C005E043E008F080F0307F003FC03E0
1E1F7D9E21>97 D<003F8000E0600380180700040F00041E001E1C003E3C003E7C003E7C
0008780000F80000F80000F80000F80000F80000F80000F80000F80000F800007800007C
00007C00003C00011E00011E00020F000207000403801800E060003F80181F7D9E1D>99
D<003F800000E0E0000380380007003C000E001E001E001E001C000F003C000F007C000F
0078000F8078000780F8000780F8000780FFFFFF80F8000000F8000000F8000000F80000
00F8000000F8000000780000007C0000003C0000003C0000801E0000800E0001000F0002
000780020001C00C0000F03000001FC000191F7E9E1D>101 D<0007E0001C1000383800
707C00E07C01E07C01C03803C00003C00003C00003C00003C00003C00003C00003C00003
C00003C00003C00003C000FFFFC0FFFFC003C00003C00003C00003C00003C00003C00003
C00003C00003C00003C00003C00003C00003C00003C00003C00003C00003C00003C00003
C00003C00003C00003C00003C00003C00003C00003C00007E0007FFF007FFF0016327FB1
14>I<000000F0007F030801C1C41C0380E81C070070080F0078001E003C001E003C003E
003E003E003E003E003E003E003E003E003E003E003E001E003C001E003C000F00780007
0070000780E00009C1C000087F000018000000180000001800000018000000180000001C
0000000E0000000FFFF80007FFFF0003FFFF800E000FC0180001E0300000F070000070E0
000038E0000038E0000038E0000038E00000387000007070000070380000E01C0001C007
00070001C01C00003FE0001E2F7E9F21>I<0F001F801F801F801F800F00000000000000
000000000000000000000000000000000780FF80FF800F80078007800780078007800780
078007800780078007800780078007800780078007800780078007800780078007800780
0FC0FFF8FFF80D307EAF12>105 D<0780FE0000FF83078000FF8C03C0000F9001E00007
A001E00007A000F00007C000F00007C000F000078000F000078000F000078000F0000780
00F000078000F000078000F000078000F000078000F000078000F000078000F000078000
F000078000F000078000F000078000F000078000F000078000F000078000F000078000F0
00078000F000078000F0000FC001F800FFFC1FFF80FFFC1FFF80211F7E9E25>110
D<001FC00000F0780001C01C00070007000F0007801E0003C01C0001C03C0001E03C0001
E0780000F0780000F0780000F0F80000F8F80000F8F80000F8F80000F8F80000F8F80000
F8F80000F8F80000F8780000F07C0001F03C0001E03C0001E01E0003C01E0003C00F0007
8007800F0001C01C0000F07800001FC0001D1F7E9E21>I<0783E0FF8C18FF907C0F907C
07A07C07C03807C00007C00007C000078000078000078000078000078000078000078000
078000078000078000078000078000078000078000078000078000078000078000078000
0FC000FFFE00FFFE00161F7E9E19>114 D<00400000400000400000400000400000C000
00C00000C00001C00001C00003C00007C0000FC0001FFFE0FFFFE003C00003C00003C000
03C00003C00003C00003C00003C00003C00003C00003C00003C00003C00003C00003C000
03C00003C01003C01003C01003C01003C01003C01003C01003C01001C02001E02000E040
0078C0001F00142C7FAB19>116 D E end
%%EndProlog
%%BeginSetup
%%Feature: *Resolution 300dpi
TeXDict begin

%%EndSetup
%%Page: 1 1
1 0 bop 701 219 a Fk(In)n(terfacing)22 b(to)g(T)-6 b(A)n(U)904
311 y Fj(\(draft\))749 431 y(Lars)17 b(Thomas)f(Hansen)833
529 y(July)g(18,)g(1995)0 708 y Fi(1)69 b(In)n(tro)r(duction)0
799 y Fh(The)14 b(T)m(A)o(U)g(to)q(ols)g(rely)g(on)g(an)f(in)o(terface)
i(to)f(a)g(compiler)e(or)i(to)g(a)g(compiler)e(to)q(olkit)h(to)h
(retriev)o(e)h(information)c(ab)q(out)j(the)0 848 y(program)e(under)j
(analysis)e(and)h(to)g(instrumen)o(t)f(the)h(program)f(for)g
(debugging,)g(pro\014ling,)f(and)i(so)g(on.)62 898 y(This)e(do)q(cumen)
o(t)f(de\014nes)j(the)e(in)o(terface)h(b)q(et)o(w)o(een)g(T)m(A)o(U)e
(and)h(t)o(w)o(o)f(compiler)g(to)q(olkit)f(fron)o(tends:)18
b Fg(cgm)11 b Fh(pro)o(vides)h(T)m(A)o(U)0 948 y(with)e(information)e
(ab)q(out)j(the)g(program,)e(and)i Fg(instr)e Fh(is)i(in)o(v)o(ok)o(ed)
e(b)o(y)i(T)m(A)o(U)f(to)h(instrumen)o(t)f(the)h(program.)k(The)c(in)o
(terface)0 998 y(is)k(de\014ned)g(in)g(terms)f(of)g(data)h(la)o(y)o
(outs)f(and)g(their)h(seman)o(tics,)f(command)e(line)j(switc)o(hes)h
(giv)o(en)e(to)h(the)g(programs,)e(and)0 1048 y(the)h(command)e
(languages)h(accepted)j(b)o(y)d(the)i(programs.)62 1097
y(In)d(addition,)f(w)o(e)h(de\014ne)h(the)f(format)f(of)g(the)h(output)
g(data)g(whic)o(h)g(m)o(ust)f(b)q(e)h(pro)q(duced)h(b)o(y)f(a)g
(program)e(instrumen)o(ted)0 1147 y(with)k Fg(instr)p
Fh(.)0 1255 y Ff(Information)f(retriev)m(al)0 1332 y
Fh(T)m(A)o(U)j(gets)g(its)g(data)g(from)e(the)i(Sage++)h(to)q(olkit)e
(b)o(y)h(w)o(a)o(y)f(of)g(a)h(program)e(called)i Fg(cgm)f
Fh(\(\\call)g(graph)h(manager"\).)23 b Fg(Cgm)0 1382
y Fh(tak)o(es)14 b(as)f(argumen)o(ts)f(the)i(name)e(of)h(the)h(program)
d(database)j(and)f(a)g(sp)q(eci\014cation)h(of)e(the)i(desired)h
(output)e(format,)e(and)0 1431 y(prin)o(ts)j(a)g(digest)g(of)f(the)i
(call)e(graph)g(on)h(standard)g(output.)19 b(T)m(A)o(U)13
b(reads)i(and)f(parses)h(the)f(output.)62 1481 y(Section)h(2)e
(de\014nes)i(the)g(output)f(data)g(format.)0 1589 y Ff(Instrumen)o(tat)
o(ion)0 1666 y Fh(T)m(A)o(U)j(instrumen)o(ts)h(the)g(user)g(program)e
(b)o(y)i(w)o(a)o(y)e(of)h(a)h(program)e(called)h Fg(instr)f
Fh(\(\\instrumen)o(ter"\).)29 b Fg(Instr)17 b Fh(tak)o(es)h(as)0
1716 y(argumen)o(ts)g(the)i(t)o(yp)q(e)g(of)f(instrumen)o(tation)f(to)h
(b)q(e)h(p)q(erformed)f(\(breakp)q(oin)o(ting)f(or)h(pro\014ling\))g
(and,)h(in)e(the)i(case)h(of)0 1765 y(pro\014ling,)e(a)g(command)e
(\014le)i(describing)h(what)f(functions)h(to)f(instrumen)o(t.)34
b(It)19 b(pro)q(duces)i(an)e(output)h(\014le)f(with)g(the)0
1815 y(desired)c(data.)0 1952 y Fi(2)69 b(Information)23
b(Retriev)l(al)0 2043 y Fh(This)13 b(section)i(de\014nes)f(the)g(data)g
(that)f(an)o(y)g(in)o(terface)h(to)f(a)h(to)q(olkit)e(database)i(m)o
(ust)e(supply)m(,)h(and)g(the)h(format)e(this)h(data)0
2093 y(m)o(ust)g(b)q(e)h(supplied)g(on.)62 2143 y(The)f(data)e(\\m)o
(ust")f(b)q(e)j(supplied)f(b)o(y)f(a)h(standalone)g(program)e(called)i
Fg(cgm)p Fh(.)k(This)c(program)e(tak)o(es)j(one)f(output)g(option)0
2193 y(and)j(the)g(name)f(of)g(the)h(program)e(database)i(\(b)q(elo)o
(w)g(called)g(a)f(dep\014le\).)21 b(It)15 b(pro)q(duces,)h(on)f
(standard)g(output,)g(the)g(data)0 2243 y(on)f(the)g(required)h
(format.)62 2292 y(The)k(output)f(options)g(are)h Fg(-dumpall)p
Fh(,)e Fg(-dumpcg)p Fh(,)g Fg(-dumptxt)p Fh(,)g Fg(-dumpch)p
Fh(,)h Fg(-dumpbdb)p Fh(,)f(and)h Fg(-dumpdebug)p Fh(.)29
b(These)0 2342 y(options)14 b(are)g(m)o(utually)d(exclusiv)o(e)j(and)g
(are)g(describ)q(ed)i(b)q(elo)o(w.)62 2392 y(T)m(A)o(U)e(really)g
(should)g(ha)o(v)o(e)g(a)g(con\014guration)g(\014le)g(whic)o(h)g(sp)q
(eci\014es)i(ho)o(w)e(it)g(is)g(to)g(obtain)f(the)i(v)n(arious)f(forms)
f(of)g(data)0 2442 y(that)h(it)f(needs)j(in)d(terms)h(of)f(the)i
(programs)d(and)i(options)f(to)h(use.)62 2492 y(The)h(Sage++)f(v)o
(ersion)g(of)f Fg(cgm)h Fh(can)g(also)f(b)q(e)h(used)h(stand-alone,)e
(but)h(this)g(do)q(es)h(not)f(concern)h(us)f(in)g(this)g(pap)q(er.)965
2828 y(1)p eop
%%Page: 2 2
2 1 bop 0 45 a Fe(2.1)56 b(General)17 b(requiremen)n(ts)0
122 y Fh(Some)c(de\014nitions:)62 191 y Fd(\017)21 b
Fh(A)d Fc(tag)f Fh(is)h(a)f(nonnegativ)o(e)h(in)o(teger)g(in)f(the)i
(curren)o(t)g(implemen)o(tati)o(on;)d(it)i(can)g(b)q(e)g(an)o(y)f
(string,)i(but)f(due)g(to)f(the)104 241 y(uniqueness)d(requiremen)o(t)f
(\(see)h(b)q(elo)o(w\))f(some)e(form)g(of)i(name)e(mangling)f(w)o(ould)
i(ha)o(v)o(e)h(to)f(b)q(e)i(implemen)o(ted)c(if)i(the)104
291 y(program)g(iden)o(ti\014ers)j(w)o(ere)f(to)g(b)q(e)h(used)f(here.)
62 367 y Fd(\017)21 b Fh(A)14 b Fc(string)f Fh(is)h(a)f(sequence)j(of)e
(non)o(blank)f(c)o(haracters.)62 437 y(Some)g(general)h(requiremen)o
(ts)g(and)g(prop)q(erties)h(of)f(the)g(output:)62 506
y Fd(\017)21 b Fh(All)13 b(line)g(o\013sets)i(are)g(1-based;)e(column)g
(o\013sets)i(are)f(0-based.)62 582 y Fd(\017)21 b Fh(Class)13
b(and)g(function)g(tags)g(m)o(ust)g(b)q(e)h(unique)f(in)g(the)h(t)o(w)o
(o)f(imp)q(ortan)o(t)e(w)o(a)o(ys.)18 b(First,)13 b(no)g(tag)g(ma)o(y)e
(b)q(e)j(used)g(for)f(t)o(w)o(o)104 632 y(separate)18
b(en)o(tities)f(within)f(its)h(group;)g(i.e.,)f(no)h(t)o(w)o(o)f
(functions)h(can)g(ha)o(v)o(e)f(the)h(same)f(tag,)h(nor)g(can)f(t)o(w)o
(o)h(classes)104 682 y(ha)o(v)o(e)c(the)i(same)d(tag.)18
b(There)d(can)f(exist)g(a)f(tag,)g(ho)o(w)o(ev)o(er,)g(whic)o(h)h
(names)f(b)q(oth)h(a)f(function)g(and)h(a)f(class.)19
b(Second,)104 732 y(if)d(t)o(w)o(o)g(calls)g(are)h(made)f(to)g
Fg(cgm)g Fh(with)h(the)g(same)f(dep\014le,)h(the)h(tags)e(pro)q(duced)i
(b)o(y)f(the)g(t)o(w)o(o)f(calls)g(m)o(ust)g(b)q(e)h(the)104
782 y(same)c(for)g(the)i(same)e(program)f(elemen)o(ts.)62
858 y Fd(\017)21 b Fh(Lines)14 b(ma)o(y)e(ha)o(v)o(e)i(an)o(y)f
(length.)62 934 y Fd(\017)21 b Fh(The)14 b(spacing)f(of)g(\014elds)h
(is)f(arbitrary:)18 b(there)d(m)o(ust)d(b)q(e)i(at)f(least)h(one)g
(space)g(to)f(separate)i(\014elds,)f(but)f(the)h(\014eld)g(can)104
984 y(b)q(e)g(preceded)i(and)e(succeeded)j(b)o(y)c(arbitrary)h(spaces.)
0 1097 y Fe(2.2)56 b(Option)18 b Fb(-dumpall)e Fe({)j(dump)e(call)h
(graph)h(\(all)f(functions\))0 1174 y Fh(The)d Fg(-dumpall)d
Fh(option)h(dumps)h(a)f(represen)o(tation)j(of)e(all)f(the)h(functions)
h(in)e(the)i(dep\014le,)f(whether)i(used)f(or)f(not.)19
b(Eac)o(h)0 1224 y(function)c(starts)i(with)e(an)g Fg(ftag)g
Fh(line)g(and)g(is)g(follo)o(w)o(ed)f(b)o(y)h(other)i(information)12
b(lines.)23 b(F)m(unctions)15 b(are)h(separated)h(b)o(y)e(a)0
1274 y(blank)e(line.)18 b(There)d(ma)o(y)d(b)q(e)i(only)f(one)h(line)g
(of)f(eac)o(h)h(t)o(yp)q(e)h(for)e(eac)o(h)i(function.)62
1323 y(The)g(\014rst)f(line)g(of)f(the)h(output)h(con)o(tains)e(a)h
(single)f(n)o(um)o(b)q(er:)18 b(the)c(n)o(um)o(b)q(er)f(of)h(functions)
g(in)f(the)i(dep\014le.)62 1373 y(Certain)h(in)o(ternal)g(functions)g
(generated)h(b)o(y)f(the)h(instrumen)o(tation)d(co)q(de)j(are)g
(considered)g(\\hidden")f(and)g(are)g(not)0 1423 y(sho)o(wn)e(with)f
(this)h(option;)f(use)i Fg(-dumpdebug)d Fh(\(describ)q(ed)j(b)q(elo)o
(w\))f(to)g(displa)o(y)f(also)g(hidden)h(functions.)0
1528 y Ff(2.2.1)48 b(The)15 b Fg(ftag)g Ff(line)f(format)0
1605 y Fh(The)g Fg(ftag)f Fh(line)h(is)f(used)i(to)f(de\014ne)h(a)f
(new)g(function.)k(The)c(syn)o(tax)g(of)f(the)i Fg(ftag)e
Fh(line)g(is:)131 1674 y Fg(ftag:)21 b()f()0
1744 y Fh(where)15 b Fg()e Fh(is)h(the)g(tag)g(of)f(the)h
(function)g(and)g Fg()e Fh(is)i(the)g(function's)g(name)f(\(a)g
(string\).)0 1849 y Ff(2.2.2)48 b(The)15 b Fg(ffile)g
Ff(line)f(format)0 1925 y Fh(The)j Fg(ffile)e Fh(line)g(sp)q(eci\014es)
j(the)f(lo)q(cation)e(of)g(the)i(source)g(co)q(de)g(of)f(the)g(curren)o
(t)i(function.)24 b(The)17 b(syn)o(tax)f(of)f(the)i Fg(ffile)0
1975 y Fh(line)c(is:)131 2045 y Fg(ffile:)20 b()h()0
2114 y Fh(where)15 b Fg()f Fh(is)g(the)h(line)e(on)i(whic)o(h)f
(the)h(function)f(starts,)h(and)f Fg()e Fh(is)i(the)h(name)e
(of)h(the)h(\014le)f(in)g(whic)o(h)g(the)0 2164 y(function)g(is)f
(de\014ned.)19 b(If)14 b(either)h(the)f(line)g(or)f(the)i(\014le)f
(name)f(is)g(not)h(obtainable,)f(use)h(the)h(format)131
2233 y Fg(ffile:)20 b(0)i(-)0 2338 y Ff(2.2.3)48 b(The)15
b Fg(fcalls)g Ff(line)f(format)0 2415 y Fh(The)g Fg(fcalls)f
Fh(line)g(sp)q(eci\014es)j(calling)d(information)d(ab)q(out)k(the)h
(curren)o(t)g(function.)j(The)c(syn)o(tax)g(of)f(the)i
Fg(fcalls)d Fh(line)i(is:)131 2485 y Fg(fcalls:)20 b()g(-)i
()f(...)0 2554 y Fh(where)c Fg()d Fh(is)h(the)h(n)o(um)o(b)
q(er)f(of)g(calls)g(made)g(to)g(the)i(function)e(and)g(eac)o(h)h
Fg()f Fh(is)g(the)h(tag)g(of)f(a)g(function)g(called)0
2604 y(from)d(the)j(curren)o(t)h(function.)i(The)d(called)f(function)g
(tags)g(are)h(listed)f(in)f(the)i(sequence)i(in)c(whic)o(h)h(they)h
(are)g(called,)e(and)0 2654 y(there)k(will)e(b)q(e)h(rep)q(etitions)h
(if)e(a)h(function)g(is)f(called)h(more)f(than)h(once.)25
b(See)17 b(also)e(the)i(description)f(for)g Fg(fline)p
Fh(,)f(b)q(elo)o(w.)0 2704 y(The)f Fg(-)g Fh(has)g(to)g(b)q(e)g(presen)
o(t)i(ev)o(en)e(if)f(there)j(are)e(no)f(tags.)965 2828
y(2)p eop
%%Page: 3 3
3 2 bop 0 45 a Ff(2.2.4)48 b(The)15 b Fg(fclass)g Ff(line)f(format)0
122 y Fh(The)h Fg(fclass)e Fh(line)h(is)h(used)g(to)f(sp)q(ecify)i(the)
f(class)g(or)f(collection)g(of)g(whic)o(h)h(the)g(curren)o(t)h
(function)e(is)g(a)h(mem)o(b)q(er,)d(if)i(it)g(is)0 172
y(a)g(mem)o(b)q(er)e(function.)18 b(The)c(syn)o(tax)g(is:)131
255 y Fg(fclass:)20 b()g()f()0
338 y Fh(where)14 b Fg()d Fh(is)i(name)g(of)f(class)i(if)e
(the)i(function)f(is)g(a)g(mem)o(b)q(er)f(function,)g(or)i
Fg(-)f Fh(if)f(not;)h Fg()e Fh(is)i(either)0
387 y Fg(-)g Fh(\(ordinary)h(class,)f(or)h(not)f(applicable\))g(or)h
Fg(COLL)p Fh(;)e(and)h Fg()f Fh(is)h(the)h(tag)g(of)f(the)h
(class)g(\(see)h(the)f(section)g(for)f(the)0 437 y Fg(-dumpch)p
Fh(,)f(b)q(elo)o(w\))i(or)g Fg(-2)f Fh(if)g(the)h Fg()e
Fh(is)i Fg(-)p Fh(.)0 545 y Ff(2.2.5)48 b(The)15 b Fg(ftype)g
Ff(line)f(format)0 622 y Fh(The)g Fg(ftype)f Fh(line)h(is)f(used)i(to)f
(sp)q(ecify)g(some)f(attributes)i(of)e(the)i(function.)j(The)c(syn)o
(tax)g(is:)131 705 y Fg(ftype:)20 b()g()g()0
788 y Fh(where)14 b Fg()e Fh(is)h(either)h Fg(seq)e
Fh(\(sequen)o(tial)i(function\))f(or)g Fg(par)f Fh(\(mem)o(b)q(er)g
(function)h(called)g(in)g(a)f(parallel)g(section,)i(or)0
838 y(F)m(ortran)h(M)h Fg(process)p Fh(\);)f Fg()f
Fh(is)h(one)h(of)f Fg(Mem)g Fh(\(mem)o(b)q(er)f(function\),)h
Fg(Ord)g Fh(\(ordinary)h(function\),)f Fg(Prcs)g Fh(\(F)m(ortran)0
887 y(M)f Fg(process)p Fh(\),)e(or)i Fg(Main)f Fh(\(main)f(function\);)
h(and)h Fg()d Fh(is)j Fg(used)f Fh(\(a)h(syn)o(tactically)f
(visible)g(call)g(to)h(the)h(function)e(is)0 937 y(reac)o(hable)h(from)
f Fg(main)p Fh(\))g(or)h Fg(not)f Fh(\(unable)h(to)f(determine\).)0
1053 y Fe(2.3)56 b(Option)18 b Fb(-dumpcg)e Fe({)j(dump)f(call)g(graph)
h(\(called)e(functions\))0 1130 y Fh(The)c Fg(-dumpcg)d
Fh(option)h(is)h(used)h(to)f(dump)f(the)i(functions)f(in)f(the)i(call)e
(graph,)h(i.e.,)f(those)i(functions)f(in)g(the)g(dep\014le)h(whic)o(h)0
1180 y(are)j(syn)o(tactically)f(referenced)j(in)e(a)f(pro)q(cedure)j
(call.)k(The)16 b(output)g(format)e(here)j(is)f(the)g(same)f(as)g(the)i
(one)f(used)g(with)0 1230 y(the)e Fg(-dumpall)f Fh(option,)f(and)i(in)f
(addition)g(there)i(is)f(one)g(more)f(line:)18 b(the)c
Fg(fline)f Fh(line.)62 1279 y(The)i(\014rst)f(line)g(of)f(the)h(output)
h(con)o(tains)e(a)h(single)f(n)o(um)o(b)q(er:)18 b(the)c(n)o(um)o(b)q
(er)f(of)h(functions)g(in)f(the)i(dep\014le.)0 1387 y
Ff(2.3.1)48 b(The)15 b Fg(fline)g Ff(line)f(format)0
1464 y Fh(The)g Fg(fline)e Fh(line)i(sp)q(eci\014es)h(the)f(o)q
(ccurences)i(of)d(function)h(calls)f(within)g(the)h(source)h(text)f(of)
f(the)h(curren)o(t)h(function.)j(The)0 1514 y(syn)o(tax)c(of)f(the)i
Fg(fline)d Fh(line)i(is:)131 1597 y Fg(fline:)20 b()h(...)0
1680 y Fh(where)d(eac)o(h)g Fg()e Fh(is)h(a)g(line)f(n)o(um)o(b)q
(er)h(o\013set)h(from)d(the)j(start)g(of)f(the)g(\014le;)i(the)e(line)g
(is)g(within)g(the)g(source)i(text)f(of)0 1730 y(the)f(function)e(and)h
(con)o(tains)g(a)g(function)g(call.)24 b(There)17 b(are)f(as)g(man)o(y)
f(function)g(calls)h(in)g(this)g(list)f(as)h(there)i(are)e(called)0
1779 y(functions)e(in)f(the)h Fg(fcalls)e Fh(line)i(\(ab)q(o)o(v)o
(e\),)f(and)g(the)i(ordering)e(of)g(the)i(data)e(in)g
Fg(fcalls)f Fh(corresp)q(onds)k(to)d(the)i(ordering)e(in)0
1829 y Fg(fline)p Fh(.)k(If)c(there)j(are)e(no)g(line)f(n)o(um)o(b)q
(ers)h(to)f(list)h(b)q(ecause)h(there)h(w)o(ere)e(no)g(calls,)f(the)h
Fg(fline)f Fh(line)h(is)f(not)h(prin)o(ted.)0 1945 y
Fe(2.4)56 b(Option)18 b Fb(-dumptxt)e Fe({)j(dump)e(source)i(lo)r
(cations)0 2022 y Fh(The)c Fg(-dumptxt)f Fh(option)g(is)h(used)h(to)f
(dump)f(the)h(functions)g(in)g(the)h(call)e(graph)h(along)e(with)i
(information)d(whic)o(h)j(allo)o(ws)0 2072 y(T)m(A)o(U)i(to)h(\014nd)g
(the)g(source)h(text)f(for)g(the)g(function)g(in)f(the)h(source)h
(\014le.)30 b(The)18 b(output)g(format)e(is)h(that)h(of)f
Fg(-dumpall)p Fh(,)0 2122 y(except)e(that)f(the)h Fg(ffile)e
Fh(line)g(is)h(more)f(elab)q(orate,)g(the)i Fg(fline)e
Fh(line)g(is)h(replaced)h(b)o(y)e(a)h(new)g(line)g(t)o(yp)q(e)g
Fg(fpos)p Fh(.)62 2172 y(The)h(\014rst)f(line)g(of)f(the)h(output)h
(con)o(tains)e(a)h(single)f(n)o(um)o(b)q(er:)18 b(the)c(n)o(um)o(b)q
(er)f(of)h(functions)g(in)f(the)i(dep\014le.)62 2221
y(The)i Fg(-dumptxt)d Fh(option)h(also)g(dumps)g(the)h(follo)o(wing)d
(class)k(information)12 b(as)k(formatted)f(for)g(the)i
Fg(-dumpcg)d Fh(option:)0 2271 y Fg(ctag)p Fh(,)g Fg(cfile)g
Fh(\(with)g(additional)f(source)j(co)q(de)g(line)e(and)h(column)e(p)q
(ositions)i(as)g(formatted)f(for)g Fg(ffile)p Fh(\),)g
Fg(cbase)p Fh(,)f Fg(cpos)p Fh(,)0 2321 y Fg(cmpos)g
Fh(\()p Ff(THESE)k(LINES)f(NEED)g(BETTER)h(DESCRIPTIONS!)p
Fh(\).)0 2429 y Ff(2.4.1)48 b(New)16 b Fg(ffile)f Ff(syn)o(tax)0
2506 y Fh(The)h(new)f Fg(ffile)g Fh(syn)o(tax)g(allo)o(ws)f(for)h(more)
f(elab)q(orate)h(sp)q(eci\014cation)h(of)f(the)h(p)q(osition)f(of)f
(the)i(function)f(in)g(the)h(source)0 2555 y(text.)21
b(Compared)13 b(with)h(the)h(old)f(syn)o(tax,)h(the)g(line)f(has)h(app)
q(ended)g(four)f(new)h(\014elds)g(whic)o(h)g(de\014ne)g(the)h(exact)f
(lo)q(cation)0 2605 y(of)e(the)i(function's)e(text.)19
b(The)14 b(syn)o(tax)g(is:)131 2688 y Fg(ffile:)20 b()h
()f(@)h()g()g()g()965 2828
y Fh(3)p eop
%%Page: 4 4
4 3 bop 0 45 a Fh(where)15 b(eac)o(h)f Fg()f Fh(is)h(of)f(the)i
(form)d Fg(.)f Fh(and)j(denotes)h(a)e(line)h(and)f(a)h
(column)e(within)h(the)i(source)g(\014le.)j Fg()0
95 y Fh(is)d(the)g(\(lo)q(cation)g(of)f(the\))i(start)g(of)e(the)i
(function)e(header;)i Fg()f Fh(is)f(the)i(end)g(of)e(the)i(header;)
g Fg()e Fh(is)h(the)g(start)h(of)e(the)0 145 y(b)q(o)q(dy;)i(and)g
Fg()f Fh(is)g(the)h(end)h(of)e(the)h(b)q(o)q(dy)m(.)23
b(If)16 b(for)f(some)g(reason)h(the)g(information)d(could)j(not)f(b)q
(e)i(determined,)e(eac)o(h)0 195 y Fg()e Fh(is)h
Fg(-)p Fh(.)k(Eac)o(h)c(ending)f(p)q(osition)h(sp)q(eci\014es)h(the)g
(c)o(haracter)g(follo)o(wing)c(the)k(end,)f(not)g(the)g(c)o(haracter)h
(at)f(the)h(end.)0 302 y Ff(2.4.2)48 b(The)15 b Fg(fpos)g
Ff(line)f(format)0 379 y Fh(The)g Fg(fpos)f Fh(line)g(is)h(used)g(to)g
(sp)q(ecify)g(the)g(exact)g(lo)q(cation)f(of)g(pro)q(cedure)j(calls)d
(within)g(the)h(source)h(text)f(of)f(the)i(function.)0
429 y(The)f(syn)o(tax)g(is:)131 512 y Fg(fpos:)21 b()f(...)0
595 y Fh(where)15 b(eac)o(h)g Fg()f Fh(is)g(a)g(Tcl)g(string)h(of)
e(the)i(format)e Fg({)21 b()g()f(})p Fh(,)14
b(where)i(eac)o(h)f Fg()e Fh(is)h(either)h Fg(-)f
Fh(or)h(of)e(the)0 645 y(form)c Fg(.)p Fh(;)g(here,)j
Fg()e Fh(and)h Fg()f Fh(are)h(nonnegativ)o(e)g(in)o(tegers)h
(denoting)f(line)f(and)h(column)e(information,)0 695
y(resp)q(ectiv)o(ely)m(,)15 b(in)e(the)i(\014le)f(for)f(a)h(call;)f
Fg()f Fh(is)i(the)h(start)g(p)q(osition)e(of)g(the)i(iden)o
(ti\014er)f(in)g(the)g(call,)f(and)h Fg()f Fh(is)g(the)0
744 y(\014rst)e(p)q(osition)e(follo)o(wing)e(the)k(iden)o(ti\014er.)17
b(If)10 b(the)g(function)g(b)q(eing)g(called)g(is)f(an)h(op)q(erator,)h
(then)g(b)q(oth)f Fg()f Fh(are)h(curren)o(tly)0
794 y Fg(-)k Fh(since)h(the)f(Sage++)h(to)q(olkit)e(do)q(es)i(not)f(k)o
(eep)h(lo)q(cation)e(information)e(for)j(op)q(erator)g(sym)o(b)q(ols;)f
(ho)o(w)o(ev)o(er,)h(they)g(ma)o(y)e(b)q(e)0 844 y(supplied)i(and)g
(will)e(b)q(e)j(used.)0 960 y Fe(2.5)56 b(Option)18 b
Fb(-dumpbdb)e Fe({)j(dump)e(data)i(for)g(the)f(brosw)n(er)h(database)0
1037 y Fh(The)e Fg(-dumpbdb)d Fh(option)i(dumps)g(only)f(the)i
(dep\014le)g(information)d(that)i(is)g(needed)i(b)o(y)e(the)h(bro)o
(wsw)o(er)g(database.)26 b(This)0 1087 y(includes)16
b(the)f Fg(ftag)g Fh(and)g Fg(ffile)f Fh(lines)h(as)g(formatted)f(for)h
(the)h Fg(-dumpall)d Fh(option,)i(and)g(the)g Fg(ctag)g
Fh(and)g Fg(cfile)f Fh(lines)h(as)0 1136 y(formatted)e(for)g(the)i
Fg(-dumpch)d Fh(option.)17 b(Source)e(co)q(de)g(line)e(and)h(column)e
(p)q(ositions)i(are)g(not)g(written.)62 1186 y(In)f(addition,)e(the)i
Fg(ftype)e Fh(line)h(is)g(output)h(if)f(and)g(only)g(if)f(the)i
(function)f(is)h(the)g(Main)f(function)g(of)g(the)h(program.)j(The)0
1236 y(syn)o(tax)e(is:)131 1319 y Fg(ftype:)20 b(Main)0
1468 y Fe(2.6)56 b(Option)18 b Fb(-dumpdebug)d Fe({)k(dump)f(extra)f
(debug)i(data)0 1545 y Fh(When)10 b(the)h Fg(-dumpdebug)d
Fh(option)h(is)h(giv)o(en,)g(debugging)f(information)e(ab)q(out)j(eac)o
(h)g(function)g(is)g(dump)q(ed.)16 b(The)11 b(debugging)0
1595 y(information)i(tak)o(es)j(the)g(same)f(form)f(as)h(the)i
Fg(-dumpall)d Fh(information,)e(except)17 b(that)f(the)g
Fg(fline)f Fh(is)h(no)f(longer)g(presen)o(t)0 1645 y(and)e(that)g
(there)h(are)g(t)o(w)o(o)e(t)o(yp)q(es)i(of)e(extra)i(information.)h
(First,)e(hidden)g(functions)g(are)h(sho)o(wn)f(in)f(the)i(output.)k
(Second,)0 1695 y(a)c(sp)q(ecial)g(line)f Fg(fdebug)g
Fh(con)o(taining)g(debug)h(data)f(is)h(dump)q(ed)f(for)h(eac)o(h)g
(function.)0 1802 y Ff(2.6.1)48 b(The)15 b Fg(fdebug)g
Ff(line)f(format)0 1879 y Fh(The)i Fg(fdebug)f Fh(line)h(pro)o(vides)g
(some)f(information)e(not)j(otherwise)h(a)o(v)n(ailable.)23
b(It)16 b(is)g(used)h(only)e(for)h(debugging,)f(not)h(b)o(y)0
1929 y(an)o(y)d(of)g(the)i(to)q(ols,)d(and)i(need)h(not)e(b)q(e)i
(supplied)e(b)o(y)h(new)g(in)o(terfaces)g(to)g(compiler)e(to)q(olkits.)
17 b(It)d(is)g(do)q(cumen)o(ted)f(here)i(for)0 1979 y(the)f(sak)o(e)h
(of)e(completeness.)19 b(The)14 b(syn)o(tax)g(is:)131
2062 y Fg(fdebug:)20 b(moe=)g(moc=)g(seq=)f
(par=)h(min=)g(max=)0 2145 y Fh(Here,)13
b(\\mo)q(e")e(means)h(\\metho)q(d-of-elemen)o(t",)d(\\mo)q(c")i(means)h
(\\metho)q(d-of-class",)e(and)i(\\seq")h(and)f(\\par")g(mean)f(what)0
2195 y(y)o(ou)i(think.)18 b(A)c Fg()f Fh(is)h(either)h
Fg(0)e Fh(or)h Fg(1)p Fh(.)k(\\Min")13 b(is)h(the)g(minim)o(um)9
b(nesting)14 b(lev)o(el)g(in)f(the)i(call)e(graph)h(of)f(the)i
(function,)0 2244 y(starting)c(from)e(the)j(main)d(pro)q(cedure,)k(and)
e(\\max")e(is)i(the)h(maxim)n(um)7 b(nesting)k(lev)o(el.)17
b(The)11 b(main)e(pro)q(cedure)k(has)f(nesting)0 2294
y(lev)o(el)i(0.)0 2410 y Fe(2.7)56 b(Option)18 b Fb(-dumpch)e
Fe({)j(dump)f(the)g(class)g(hierarc)n(h)n(y)0 2487 y
Fh(The)d Fg(-dumpch)d Fh(option)i(is)g(used)h(to)e(pro)q(duce)j(a)e
(represen)o(tation)h(of)f(the)g(class)h(hierarc)o(h)o(y)m(.)k(The)14
b(output)h(is)e(a)h(sequence)j(of)0 2537 y(class)e(descriptions)h
(separated)g(b)o(y)f(blank)f(lines.)20 b(A)15 b(class)g(description)h
(consists)f(of)f(a)h Fg(ctag)f Fh(line)g(to)h(iden)o(tify)f(the)h
(class,)0 2587 y(follo)o(w)o(ed)c(b)o(y)h(a)g(single)g
Fg(csub)g Fh(line)g(to)g(list)g(the)h(sub)q(classes,)i(and)d(as)g(man)o
(y)f Fg(cmem)h Fh(lines)g(as)h(needed,)g(one)g(for)f(eac)o(h)h(mem)o(b)
q(er.)0 2636 y(The)h(class)h(hierarc)o(h)o(y)f(is)g(dump)q(ed)f(in)g
(preorder)j(with)d(a)h(distinguished)g(dumm)o(y)d(ro)q(ot)j(class)g(as)
g(an)f(anc)o(hor.)965 2828 y(4)p eop
%%Page: 5 5
5 4 bop 0 45 a Ff(2.7.1)48 b(The)15 b Fg(ctag)g Ff(line)f(format)0
122 y Fh(A)g Fg(ctag)f Fh(line)g(serv)o(es)j(to)e(iden)o(tify)f(a)g
(class)i(or)e(collection.)18 b(It)c(has)g(the)h(follo)o(wing)c(form:)
131 213 y Fg(ctag:)21 b()f()g()0
304 y Fh(where)13 b Fg()e Fh(is)g(the)i(tag)e(of)g(the)i(class,)f
(or)g(-1)f(if)g(the)i(line)e(describ)q(es)j(the)e(ro)q(ot)g(of)f(the)i
(hierarc)o(h)o(y)m(.)k Fg()9 b Fh(is)j(either)0
354 y(the)i(empt)o(y)e(Tcl)h(string)g Fg({})g Fh(for)g(the)g(ro)q(ot)h
(of)e(the)i(hierarc)o(h)o(y)g(or)f(a)g(string)g(for)g(real)g(classes)h
(or)f(collections.)18 b Fg()12 b Fh(is)h Fg(-)g
Fh(if)0 404 y(the)h(line)g(describ)q(es)i(an)e(ordinary)f(class)h(or)g
Fg(COLL)f Fh(if)g(the)i(line)e(describ)q(es)j(a)e(collection.)0
512 y Ff(2.7.2)48 b(The)15 b Fg(csub)g Ff(line)f(format)0
589 y Fh(The)g Fg(csub)f Fh(line)h(is)f(used)i(to)f(sp)q(ecify)g(the)h
(sub)q(classes)h(of)d(a)h(giv)o(en)f(class.)18 b(Its)d(syn)o(tax)f(is:)
131 680 y Fg(csub:)21 b()e(...)0 771 y Fh(where)c
Fg()c Fh(is)j(the)g(tag)g(of)f(another)i(class.)0
879 y Ff(2.7.3)48 b(The)15 b Fg(cmem)g Ff(line)f(format)0
956 y Fh(A)g Fg(cmem)f Fh(line)g(iden)o(ti\014es)i(a)e(single)h(mem)o
(b)q(er)e(of)h(a)h(class)g(or)g(collection.)k(It)c(has)g(the)g(follo)o
(wing)e(form:)131 1047 y Fg(cmem:)21 b()d()i
()0 1138 y Fh(where)d Fg()d
Fh(is)i(the)g(name)f(of)h(the)h(mem)o(b)q(er)d(\(an)i(iden)o(ti\014er)h
(or)f(op)q(erator)h(sym)o(b)q(ol\),)e Fg()e
Fh(is)j(a)0 1188 y(tag)e(whic)o(h)h(iden)o(ti\014es)g(the)g(mem)o(b)q
(er,)e(and)h Fg()e Fh(is)j(a)f(Tcl)h(string)f(on)h(the)g
(format)e Fg({abcde})g Fh(where)j Fg(a)p Fh({)p Fg(e)e
Fh(are)0 1238 y(single)g(c)o(haracters)h(with)f(the)g(follo)o(wing)d(v)
n(alues)j(and)g(meaning:)62 1329 y Fd(\017)21 b Fg(a)13
b Fh(and)h Fg(b)g Fh(describ)q(e)h(the)g(gross)f(mem)o(b)q(er)e(t)o(yp)
q(e:)150 1412 y Ff({)21 b Fg(a)14 b Fh(is)f(either)i(\\?")j(\(unkno)o
(wn\),)13 b(\\i")g(\(priv)n(ate\),)g(\\u")h(\(public\),)f(\\o")g
(\(protected\),)j(or)e(\\e")f(\(elemen)o(t\).)150 1479
y Ff({)21 b Fg(b)14 b Fh(is)f(either)i(\\f)s(")e(\(function\))h(or)g
(\\v")f(\(v)n(ariable\).)62 1562 y Fd(\017)21 b Fg(c)13
b Fh(is)h(\\v")f(if)g(the)i(mem)o(b)q(er)d(is)i(virtual,)e(else)j
(blank.)62 1645 y Fd(\017)21 b Fg(d)13 b Fh(is)h(\\i")f(if)g(the)i(mem)
o(b)q(er)d(is)i(inline,)e(else)j(blank.)62 1728 y Fd(\017)21
b Fg(e)16 b Fh(is)g(\\c")h(if)e(the)i(mem)o(b)q(er)e(is)h(a)g
(constructor,)j(\\d")d(if)f(the)i(mem)o(b)q(er)e(is)h(a)g(destructor,)j
(\\o")d(if)f(the)i(mem)o(b)q(er)e(is)h(an)104 1778 y(op)q(erator,)e
(else)g(blank.)0 1915 y Fi(3)69 b(Instrumen)n(ting)22
b(the)g(Program)0 2006 y Fg(Instr)12 b Fh(is)g(a)h(program)e(whic)o(h)i
(is)f(used)i(b)o(y)e(the)i(T)m(A)o(U)e(to)q(ols)h(to)f(instrumen)o(t)h
(the)g(program)e(under)j(insp)q(ection.)k(By)13 b(a)f(com-)0
2056 y(bination)g(of)g(a)h(simple)f(command)e(language)i(and)h(some)g
(command)d(line)i(switc)o(hes)j(the)e(program)f(can)h(b)q(e)h
(instrumen)o(ted)0 2105 y(for)d(pro\014ling)g(and)h(breakp)q(oin)o
(ting)e(with)i(reasonable)g(con)o(trol)f(o)o(v)o(er)h(what)g(parts)g
(of)f(the)h(program)e(are)i(instrumen)o(ted)g(and)0 2155
y(whic)o(h)i(are)g(not.)62 2205 y(The)h(command)d(line)h(switc)o(h)i
Fg(-breakpoint)d Fh(causes)k Fg(instr)d Fh(to)h(instrumen)o(t)g(the)h
(program)e(for)h(breakp)q(oin)o(ting;)f(the)0 2255 y(switc)o(h)19
b Fg(-profile)d Fh(causes)k Fg(instr)d Fh(to)h(instrumen)o(t)f(the)i
(program)e(for)h(pro\014ling.)29 b(In)19 b(addition,)e(an)h(instrumen)o
(tation)0 2305 y(command)11 b(\014le)i(ma)o(y)f(b)q(e)i(sp)q(eci\014ed)
i(with)d(the)h Fg(-commands)e Fh(option.)17 b(The)d(command)d(\014le,)i
(if)g(presen)o(t,)i(tells)f Fg(instr)e Fh(whic)o(h)0
2354 y(functions,)h(\014les,)h(and)g(classes)h(to)f(include)g(in)f(or)h
(exclude)h(from)d(the)i(instrumen)o(tation.)965 2828
y(5)p eop
%%Page: 6 6
6 5 bop 0 524 a Fa(<)p Fh(commands)p Fa(>)78 b Fh(=)-7
b Fd(\))16 b Fa(<)p Fh(commandline)p Fa(>)c(<)p Fh(commands)p
Fa(>)0 574 y(<)p Fh(commandline)p Fa(>)29 b Fh(=)-7 b
Fd(\))16 b Fa(<)p Fh(command)p Fa(>)c(<)p Fh(end-of-line)p
Fa(>)0 624 y(<)p Fh(command)p Fa(>)94 b Fh(=)-7 b Fd(\))16
b Fa(<)p Fh(lev)o(el-command)p Fa(>)387 674 y Fd(j)k
Fa(<)p Fh(inline-command)p Fa(>)387 724 y Fd(j)g Fa(<)p
Fh(limit-comm)n(and)p Fa(>)387 773 y Fd(j)g Fa(<)p Fh(exclude-command)p
Fa(>)387 823 y Fd(j)g Fa(<)p Fh(include-command)p Fa(>)387
873 y Fd(j)g Fa(\017)0 923 y(<)p Fh(lev)o(el-cmd)p Fa(>)100
b Fh(=)-7 b Fd(\))16 b Fg(include)d(up)g(to)h(level)f
Fa(<)p Fh(n)o(um)o(b)q(er)p Fa(>)0 973 y(<)p Fh(inline-cmd)p
Fa(>)81 b Fh(=)-7 b Fd(\))16 b Fh(\()e Fg(exclude)f Fd(j)g
Fg(include)g Fh(\))h Fg(inline)e Fh(\()i Fa(<)p Fh(function-w)o(ord)p
Fa(>)g Fd(j)f Fa(\017)h Fh(\))0 1022 y Fa(<)p Fh(limit-cm)o(d)p
Fa(>)94 b Fh(=)-7 b Fd(\))16 b Fg(count)d Fh(\()h Fg(only)f
Fd(j)h Fa(\017)f Fh(\))h Fa(<)p Fh(limit)p Fa(>)387 1072
y Fd(j)20 b Fg(exclude)13 b Fa(<)p Fh(limit)p Fa(>)0
1122 y(<)p Fh(limit)p Fa(>)184 b Fh(=)-7 b Fd(\))16 b
Fg(smaller)d(than)g Fa(<)p Fh(n)o(um)o(b)q(er)p Fa(>)h(<)p
Fh(stm)o(t-w)o(ord)p Fa(>)f(<)p Fh(logical)p Fa(>)g(<)p
Fh(n)o(um)o(b)q(er)p Fa(>)g(<)p Fh(c)o(hild-w)o(ord)p
Fa(>)387 1172 y Fd(j)20 b Fg(smaller)13 b(than)g Fa(<)p
Fh(n)o(um)o(b)q(er)p Fa(>)h(<)p Fh(c)o(hild-w)o(ord)p
Fa(>)f(<)p Fh(logical)p Fa(>)g(<)p Fh(n)o(um)o(b)q(er)p
Fa(>)h(<)p Fh(stm)o(t-w)o(ord)p Fa(>)0 1222 y(<)p Fh(exclude-cmd)p
Fa(>)47 b Fh(=)-7 b Fd(\))16 b Fg(exclude)d Fa(<)p Fh(parameter)p
Fa(>)0 1272 y(<)p Fh(include-cmd)p Fa(>)52 b Fh(=)-7
b Fd(\))16 b Fg(include)d Fa(<)p Fh(parameter)p Fa(>)0
1321 y(<)p Fh(parameter)p Fa(>)87 b Fh(=)-7 b Fd(\))16
b Fg(file)e Fa(<)p Fh(name)p Fa(>)387 1371 y Fd(j)20
b Fg(class)13 b Fa(<)p Fh(name)p Fa(>)387 1421 y Fd(j)20
b Fa(<)p Fh(function-w)o(ord)p Fa(>)14 b(<)p Fh(name)p
Fa(>)387 1471 y Fd(j)20 b Fa(<)p Fh(quali\014ed-name)p
Fa(>)0 1521 y(<)p Fh(name)p Fa(>)174 b Fh(=)-7 b Fd(\))16
b Fa(<)p Fh(iden)o(t)p Fa(>)f Fd(j)e Fa(<)p Fh(regexp)p
Fa(>)0 1570 y(<)p Fh(quali\014ed-name)p Fa(>)6 b Fh(=)-7
b Fd(\))16 b Fa(<)p Fh(name)p Fa(>)e Fg(:)k Fa(<)p Fh(name)p
Fa(>)13 b Fg(::)18 b Fa(<)p Fh(name)p Fa(>)248 b Fc(;)15
b(\014le:class::function)387 1620 y Fd(j)20 b Fa(<)p
Fh(name)p Fa(>)14 b Fg(::)k Fa(<)p Fh(name)p Fa(>)463
b Fc(;)15 b(class::function)387 1670 y Fd(j)20 b Fa(<)p
Fh(name)p Fa(>)14 b Fg(:)k Fa(<)p Fh(name)p Fa(>)13 b
Fg(::)428 b Fc(;)15 b(\014le:class::)387 1720 y Fd(j)20
b Fa(<)p Fh(name)p Fa(>)14 b Fg(:)k Fa(<)p Fh(name)p
Fa(>)485 b Fc(;)15 b(\014le:function)387 1770 y Fd(j)20
b Fa(<)p Fh(name)p Fa(>)14 b Fg(:)665 b Fc(;)15 b(\014le:)387
1819 y Fd(j)20 b Fa(<)p Fh(name)p Fa(>)14 b Fg(::)643
b Fc(;)15 b(class::)387 1869 y Fd(j)20 b Fa(<)p Fh(name)p
Fa(>)701 b Fc(;)15 b(function)0 1919 y Fa(<)p Fh(logical)p
Fa(>)155 b Fh(=)-7 b Fd(\))16 b Fg(and)e Fd(j)f Fg(or)0
1969 y Fa(<)p Fh(stm)o(t-w)o(ord)p Fa(>)86 b Fh(=)-7
b Fd(\))16 b Fg(statement)c Fd(j)i Fg(statements)0 2019
y Fa(<)p Fh(c)o(hild-w)o(ord)p Fa(>)82 b Fh(=)-7 b Fd(\))16
b Fg(child)d Fd(j)h Fg(children)0 2069 y Fa(<)p Fh(function-w)o(ord)p
Fa(>)20 b Fh(=)-7 b Fd(\))16 b Fg(function)d Fd(j)g Fg(functions)517
2251 y Fh(Figure)h(1:)k(The)c Fg(instr)f Fh(command)e(language)i
(grammar)965 2828 y(6)p eop
%%Page: 7 7
7 6 bop 0 45 a Fe(3.1)56 b(Command)17 b(language)0 122
y Fh(The)d(grammar)d(for)j(the)g(command)d(language)i(is)h(sho)o(wn)g
(in)f(\014gure)i(1.)62 172 y(The)21 b Fa(<)p Fh(lev)o(el-cmd)p
Fa(>)f Fh(command)e(tells)j Fg(instr)e Fh(to)i(instrumen)o(t)f(only)f
(those)j(functions)e(in)h(the)g(call)f(graph)g(whic)o(h)0
221 y(ha)o(v)o(e)c(a)g(call)g(graph)g(lev)o(el)g(of)f(less)i(than)g(or)
f(equal)g(to)g(what)g(is)g(sp)q(eci\014ed,)i(where)g(the)f(main)d
(function)i(\(in)g(most)f(cases,)0 271 y Fg(Processor)p
201 271 14 2 v 14 w(main)p Fh(\))e(has)h(a)g(lev)o(el)f(of)g(zero.)62
321 y(The)j Fa(<)p Fh(limit-cmd)p Fa(>)d Fh(command)g(has)j(t)o(w)o(o)f
(v)n(ariations.)22 b(The)17 b Fg(count)d Fh(v)n(ariation)g(tells)i
Fg(instr)f Fh(to)g(only)g(insert)i(instru-)0 371 y(men)o(tation)f(whic)
o(h)h(coun)o(ts)i(the)f(n)o(um)o(b)q(er)f(of)g(calls)g(to)g(functions)h
(whic)o(h)g(are)g(smaller)e(than)h(some)g(limit,)e(rather)k(than)0
421 y(instrumen)o(tation)12 b(whic)o(h)h(computes)g(the)h(time)e(sp)q
(en)o(t)i(in)e(those)i(functions)g(\(the)f(default\).)18
b(The)c Fg(exclude)d Fh(v)n(ariation)h(ex-)0 470 y(cludes)h(functions)f
(smaller)e(than)i(the)h(limit)c(from)h(instrumen)o(tation)h
(altogether.)17 b(In)12 b(b)q(oth)g(cases,)h(the)g(limit)c(is)j
(measured)0 520 y(in)h(the)i(n)o(um)o(b)q(er)e(of)g(statemen)o(ts)i(in)
e(the)h(function)g(and)g(the)g(n)o(um)o(b)q(er)f(of)h(function)f(calls)
h(it)f(con)o(tains.)62 570 y(The)g Fa(<)p Fh(exclude-cmd)p
Fa(>)h Fh(command)c(is)i(used)i(to)f(exclude)g(whole)g(classes)h(of)e
(functions)h(based)g(on)g(either)g(\014le,)g(class,)g(or)0
620 y(function)h(name.)i(The)f Fa(<)p Fh(include-cmd)p
Fa(>)e Fh(command)e(is)j(similarly)d(used)k(to)e(include)h(these)i
(classes)f(of)e(functions.)62 670 y(The)g(singular)e(or)h(plural)f
(forms)f(of)i(the)g(w)o(ords)g Fg(function)p Fh(,)e Fg(child)p
Fh(,)h(and)h Fg(statement)e Fh(ma)o(y)g(b)q(e)i(used)h(in)o(terc)o
(hangeably)0 719 y(regardless)g(of)e(the)i(magnitude)d(of)h(the)h(quan)
o(tit)o(y)f(sp)q(eci\014ed.)19 b(The)12 b(w)o(ord)g Fg(only)p
Fh(,)f(if)g(presen)o(t,)i(has)f(no)g(information)d(con)o(ten)o(t.)0
769 y(The)14 b(language)f(is)h(case-sensitiv)o(e;)h(only)e(lo)o(w)o
(er-case)h(k)o(eyw)o(ords)h(are)f(recognized.)62 819
y(An)o(y)g(n)o(um)o(b)q(er)g(of)g(commands)d(can)k(b)q(e)g(presen)o(t)g
(in)f(the)h(commands)d(\014le.)19 b(Ho)o(w)o(ev)o(er,)14
b(only)g(the)g(last)g(instances)i(of)d(the)0 869 y Fa(<)p
Fh(lev)o(el-cmd)p Fa(>)p Fh(,)g Fa(<)p Fh(inline-cmd)p
Fa(>)p Fh(,)f(and)h Fa(<)p Fh(limit-cmd)p Fa(>)e Fh(commands)h(will)g
(b)q(e)i(used)h(b)o(y)f Fg(instr)p Fh(.)62 919 y(When)k(functions,)f
(\014les,)h(and)f(classes)i(are)e(selected,)j(rules)e(whic)o(h)f(limit)
d(their)k(size)g(or)f(structure)j(\(e.g.)27 b Fg(exclude)0
969 y(inline)p Fh(\))13 b(are)h(applied)g(\014rst,)h(then)f(rules)h
(whic)o(h)f(selectiv)o(ely)h(exclude)g(and)f(include)g(based)h(on)e
(name)g(matc)o(hing.)k(In)d(the)0 1018 y(case)e(of)f(con)o(tradictory)h
(instances)g(of)f Fa(<)p Fh(include-cmd)p Fa(>)g Fh(and)g
Fa(<)p Fh(exclude-cmd)p Fa(>)h Fh(commands,)d(rules)i(of)g(precedence)k
(apply)m(.)0 1068 y(En)o(tities)i(sp)q(eci\014ed)i(in)e(an)g
Fg(include)f Fh(statemen)o(t)h(are)g(preferred)i(o)o(v)o(er)e(those)h
(in)f(an)g Fg(exclude)f Fh(statemen)o(t,)h(so)g(one)h(can)0
1118 y(fo)q(cus)13 b(on)f(for)g(example)f(one)h(single)g(\014le)h(b)o
(y)f(excluding)g(all)f(\014les)h(and)h(then)g(including)e(the)i(single)
f(desired)h(\014le;)g(this)f(w)o(orks)0 1168 y(b)q(ecause)k(the)e
(default)g(is)f(to)h(include)g(ev)o(erything.)0 1281
y Fe(3.2)56 b(Instrumen)n(tation)0 1358 y Fh(This)13
b(section)h(presen)o(ts,)h(on)e(a)g(high)f(lev)o(el,)h(the)h(t)o(yp)q
(e)f(of)g(instrumen)o(tation)f(p)q(erformed)h(inserted)h(b)o(y)f
Fg(instr)p Fh(.)k(Details)c(are)0 1408 y(left)h(out)f(as)h(they)h(are)f
(sp)q(eci\014c)h(to)f(the)h(compiler)d(to)q(olkit)h(b)q(eing)h(used.)0
1513 y Ff(3.2.1)48 b(Pro\014ling)0 1590 y Fh(The)14 b(pro\014ling)f(co)
q(de)i(curren)o(tly)g(w)o(orks)f(only)f(for)g(C++)i(programs;)d(F)m
(ortran)i(and)f(C)h(are)g(not)g(supp)q(orted)h(at)f(all.)62
1639 y(The)f(C++)h(class)f Fg(Profiler)e Fh(m)o(ust)g(b)q(e)j(declared)
f(in)f(the)i(program,)d(do)h(this)h(b)o(y)f(including)g(the)h(standard)
g(header)h(\014le)0 1689 y Fg(target/include/pr)o(ofile)o(r.h)p
Fh(.)62 1739 y(In)j(eac)o(h)h(function)e(to)h(b)q(e)h(pro\014led,)f
Fg(instr)f Fh(declares)i(a)f(lo)q(cal)f(auto)g(v)n(ariable)g(of)g
(class)i Fg(Profiler)d Fh(with)i(the)g(name)0 1789 y
Fg(pcxx)p 91 1789 V 15 w(P)p Fh(.)10 b(This)h(class)h(has)f(an)g(o)o(v)
o(erloaded)g(constructor)i(function;)f Fg(instr)e Fh(creates)j(an)e
(argumen)o(t)f(list)h(for)f(the)i(constructor)0 1839
y(dep)q(ending)j(on)f(whic)o(h)h(pro\014ling)e(options)i(are)g
(appropriate)f(for)g(the)i(function)e(\(curren)o(tly)h(only)f(whether)i
(the)f(function)0 1888 y(is)f(to)f(b)q(e)i(pro\014led)f(coun)o
(ting-only)f(or)g(not\).)62 1938 y(In)h(addition,)d Fg(Processor)p
489 1938 V 14 w(main)i Fh(is)g(instrumen)o(ted)g(sp)q(ecially)g(with)g
(a)g(v)n(ariable)f(of)h(class)g Fg(Profiler)f Fh(with)h(a)g(call)f(to)h
(a)0 1988 y(constructor)h(whic)o(h)f(tak)o(es)g(the)h(n)o(um)o(b)q(er)e
(of)g(functions)h(to)g(b)q(e)g(pro\014led;)g(the)h(purp)q(ose)g(of)e
(this)h(sp)q(ecial)g(case)h(is)e(to)h(let)g(that)0 2038
y(sp)q(ecial)h(constructor)i(allo)q(cate)d(space)i(for)f(the)g
(pro\014ler.)0 2143 y Ff(3.2.2)48 b(Breakp)q(oin)o(tin)o(g)0
2220 y Fh([need)14 b(something)f(here])0 2325 y Ff(3.2.3)48
b(T)l(racing)0 2401 y Fh([something)12 b(here??])0 2536
y Fi(4)69 b(Instrumen)n(tation)22 b(Output)h(Data)g(F)-6
b(ormat)0 2627 y Ff(4.0.4)48 b(Pro\014ler)13 b(data)j(output)d(format)i
(\(pro\014le.ft)o(ab\))0 2704 y Fh(Generated)g(only)e(when)i(instrumen)
o(ting)d(for)i(pro\014ling.)965 2828 y(7)p eop
%%Page: 8 8
8 7 bop 62 45 a Fh(The)14 b(output)f(from)f(the)h(pro\014ler)h(is)f
(enco)q(ded)h(in)f(ASCI)q(I)g(with)g(newline-terminated)g(lines;)f(eac)
o(h)i(datum)e(is)h(on)g(a)f(line)0 95 y(b)o(y)i(itself.)62
145 y(The)g(\014rst)g(line)f(con)o(tains)g(the)h(name)e(of)h(the)h
(dep\014le)g(on)f(whic)o(h)g(the)h(instrumen)o(tation)e(w)o(as)i(p)q
(erformed.)j(The)d(second)0 195 y(line)f(con)o(tains)h(a)g(coun)o(t)g
(of)f(the)i(n)o(um)o(b)q(er)e(of)g(functions)h(pro\014led,)g(plus)g
(11.)62 244 y(Thereafter)19 b(follo)o(ws)d(11)h(lines)h(on)f(the)i
(format)c Fg(\\t)g Fh(where)k Fg()e Fh(is)g(the)h(tag)g
(of)f(the)h(function)f(and)0 294 y Fg()11 b Fh(is)h(its)g(name;)f
(if)h(the)g(tag)g(is)g(-1,)g(then)h(the)f(name)f(is)i(blank)e(and)h
(the)h(line)e(is)i(to)f(b)q(e)g(ignored.)18 b(These)13
b(lines)f(describ)q(e)0 344 y(system)i(functions)g(lik)o(e)f(the)h
(main)e(pro)q(cedure,)j(the)g(barrier,)f(p)q(olling,)e(and)h(data)h
(elemen)o(t)f(lo)q(okup.)62 394 y(Finally)m(,)e(there)k(are)f(lines)g
(on)f(the)h(format)e Fg(\\t-)e Fh(where)15
b Fg()d Fh(is)i(a)f(function)g(and)g Fg()0
444 y Fh(is)h(the)g(n)o(um)o(b)q(er)f(of)h(times)f(it)g(w)o(as)h
(called.)k(If)13 b(the)i(function)e(w)o(as)h(not)g(called,)f(the)h
(dash)h(and)e(the)i(coun)o(t)f(are)g(omitted.)0 552 y
Ff(4.0.5)48 b(T)o(yp)q(e)16 b(descripti)o(on)d(\014les)0
628 y Fh(Generated)i(when)f(instrumen)o(ting)f(for)h(breakp)q(oin)o
(ting.)965 2828 y(8)p eop
%%Trailer
end
userdict /end-hook known{end-hook}if
%%EOF
tau-2.16.4/tools/doc/cgm-interface/tau-interface.tex000066400000000000000000000556371062343042700223000ustar00rootroot00000000000000\documentstyle{article}

\oddsidemargin 0in
\evensidemargin 0in
\textwidth 6.5in
\topmargin -0.5in
\textheight 9in

\title{Interfacing to TAU \\ {\large(draft)}}
\author{Lars Thomas Hansen}
\date{July 18, 1995}

\newcommand{\code}[1]{{\tt #1}}
\begin{document}
\maketitle

\section{Introduction}

The TAU tools rely on an interface to a compiler or to a compiler
toolkit to retrieve information about the program under analysis and to
instrument the program for debugging, profiling, and so on.

This document defines the interface between TAU and two compiler toolkit
frontends: \code{cgm} provides TAU with information about the program, and
\code{instr} is invoked by TAU to instrument the program. The interface
is defined in terms of data layouts and their semantics, command line
switches given to the programs, and the command languages accepted by
the programs.

In addition, we define the format of the output data which must be
produced by a program instrumented with \code{instr}.

\subsubsection*{Information retrieval}

TAU gets its data from the Sage++ toolkit by way of a program called
\code{cgm} (``call graph manager''). \code{Cgm} takes as arguments the
name of the program database and a specification of the desired output
format, and prints a digest of the call graph on standard output. TAU
reads and parses the output.

Section \ref{cgm} defines the output data format.

\subsubsection*{Instrumentation}

TAU instruments the user program by way of a program called \code{instr}
(``instrumenter''). \code{Instr} takes as arguments the type of
instrumentation to be performed (breakpointing or profiling) and, in the
case of profiling, a command file describing what functions to
instrument. It produces an output file with the desired data.

\section{Information Retrieval}
\label{cgm}

This section defines the data that any interface to a toolkit database
must supply, and the format this data must be supplied on.

The data ``must'' be supplied by a standalone program called
\code{cgm}. This program takes one output option and the name of the
program database (below called a depfile). It produces, on standard
output, the data on the required format.

The output options are \code{-dumpall}, \code{-dumpcg}, \code{-dumptxt},
\code{-dumpch}, \code{-dumpbdb}, and \code{-dumpdebug}.
These options are mutually exclusive and are described below.

TAU really should have a configuration file which specifies how it is
to obtain the various forms of data that it needs in terms of the programs
and options to use.

The Sage++ version of \code{cgm} can also be used stand-alone, but this does
not concern us in this paper.

\subsection{General requirements}

Some definitions:
\begin{itemize}
\item A {\em tag} is a nonnegative integer in the current implementation;
      it can be any string, but due to the uniqueness requirement (see
      below) some form of name mangling would have to be implemented if
      the program identifiers were to be used here.
\item A {\em string} is a sequence of nonblank characters.
\end{itemize}

Some general requirements and properties of the output:
\begin{itemize}
\item
All line offsets are 1-based; column offsets are 0-based.
\item
Class and function tags must be unique in the two important ways. First,
no tag may be used for two separate entities within its group; i.e., no
two functions can have the same tag, nor can two classes have the same
tag. There can exist a tag, however, which names both a function and a
class. Second, if two calls are made to \code{cgm} with the same
depfile, the tags produced by the two calls must be the same for the
same program elements.
\item
Lines may have any length.
\item
The spacing of fields is arbitrary: there must be at least one space to
separate fields, but the field can be preceded and succeeded by
arbitrary spaces.
\end{itemize}

\subsection{Option \code{-dumpall} -- dump call graph (all functions)}

The \code{-dumpall} option dumps a representation of all the functions 
in the depfile, whether used or not. Each function starts with an \code{ftag}
line and is followed by other information lines. Functions are separated
by a blank line. There may be only one line of each type for each function.

The first line of the output contains a single number: the number of functions
in the depfile.

Certain internal functions generated by the instrumentation code are
considered ``hidden'' and are not shown with this option; use
\code{-dumpdebug} (described below) to display also hidden functions.

\subsubsection{The \code{ftag} line format}

The \code{ftag} line is used to define a new function. The syntax of the
\code{ftag} line is:
\begin{verbatim}
      ftag:  
\end{verbatim}
\noindent
where \code{} is the tag of the function and \code{} is the 
function's name (a string). 

\subsubsection{The \code{ffile} line format}

The \code{ffile} line specifies the location of the source code of the 
current function. The syntax of the \code{ffile} line is:
\begin{verbatim}
      ffile:  
\end{verbatim}
\noindent
where \code{} is the line on which the function starts, and
\code{} is the name of the file in which the function is defined.
If either the line or the file name is not obtainable, use the format
\begin{verbatim}
      ffile: 0 -
\end{verbatim}

\subsubsection{The \code{fcalls} line format}

The \code{fcalls} line specifies calling information about the current 
function. The syntax of the \code{fcalls} line is:
\begin{verbatim}
      fcalls:  -  ...
\end{verbatim}
\noindent
where \code{} is the number of calls made to the function and
each \code{} is the tag of a function called from the current
function. The called function tags are listed in the sequence in which they
are called, and there will be repetitions if a function is called more
than once. See also the description for \code{fline}, below. The \code{-}
has to be present even if there are no tags.

\subsubsection{The \code{fclass} line format}

The \code{fclass} line is used to specify the class or collection of which
the current function is a member, if it is a member function. The syntax
is:
\begin{verbatim}
      fclass:   
\end{verbatim}
\noindent
where \code{} is name of class if the function is a member
function, or \code{-} if not; \code{} is either \code{-}
(ordinary class, or not applicable) or \code{COLL}; and \code{}
is the tag of the class (see the section for the \code{-dumpch}, below)
or \code{-2} if the \code{} is \code{-}.

\subsubsection{The \code{ftype} line format}

The \code{ftype} line is used to specify some attributes of the function.
The syntax is:
\begin{verbatim}
      ftype:   
\end{verbatim}
\noindent
where \code{} is either \code{seq} (sequential function) or
\code{par} (member function called in a parallel section, or Fortran M
\code{process}); \code{} is one of \code{Mem} (member
function), \code{Ord} (ordinary function), \code{Prcs} (Fortran M
\code{process}), or \code{Main} (main function); and \code{} is
\code{used} (a syntactically visible call to the function is reachable
from \code{main}) or \code{not} (unable to determine).

\subsection{Option \code{-dumpcg} -- dump call graph (called functions)}

The \code{-dumpcg} option is used to dump the functions in the call
graph, i.e., those functions in the depfile which are syntactically
referenced in a procedure call. The output format here is the same
as the one used with the \code{-dumpall} option, and in addition there
is one more line: the \code{fline} line.

The first line of the output contains a single number: the number of functions
in the depfile.

\subsubsection{The \code{fline} line format}

The \code{fline} line specifies the occurences of function calls within
the source text of the current function. The syntax of the \code{fline}
line is:
\begin{verbatim}
      fline:  ...
\end{verbatim}
\noindent
where each \code{} is a line number offset from the start of the
file; the line is within the source text of the function and contains a
function call. There are as many function calls in this list as there
are called functions in the \code{fcalls} line (above), and the ordering
of the data in \code{fcalls} corresponds to the ordering in
\code{fline}.  If there are no line numbers to list because there were
no calls, the \code{fline} line is not printed.

\subsection{Option \code{-dumptxt} -- dump source locations}

The \code{-dumptxt} option is used to dump the functions in the call
graph along with information which allows TAU to find the source text
for the function in the source file. The output format is that of
\code{-dumpall}, except that the \code{ffile} line is more elaborate,
the \code{fline} line is replaced by a new line type \code{fpos}.

The first line of the output contains a single number: the number of functions
in the depfile.

The \code{-dumptxt} option also dumps the following class information as
formatted for the \code{-dumpcg} option: 
\code{ctag}, \code{cfile} (with additional source code line and column
positions as formatted for \code{ffile}), \code{cbase}, \code{cpos}, 
\code{cmpos} ({\bf THESE LINES NEED BETTER DESCRIPTIONS!}).



\subsubsection{New \code{ffile} syntax}

The new \code{ffile} syntax allows for more elaborate specification of the
position of the function in the source text. Compared with the old syntax, 
the line has appended four new fields which define the exact location of the
function's text. The syntax is:
\begin{verbatim}
      ffile:   @    
\end{verbatim}
\noindent
where each \code{} is of the form \code{.} and denotes a
line and a column within the source file. \code{} is the (location
of the) start of the function header; \code{} is the end of the
header; \code{} is the start of the body; and \code{} is the end
of the body. If for some reason the information could not be determined,
each \code{} is \code{-}. Each ending position specifies the character
following the end, not the character at the end.

\subsubsection{The \code{fpos} line format}

The \code{fpos} line is used to specify the exact location of procedure calls
within the source text of the function. The syntax is:
\begin{verbatim}
      fpos:  ...
\end{verbatim}
\noindent
where each \code{} is a Tcl string of the format \verb+{   }+,
where each \code{} is either \code{-} or of the form \code{.};
here, \code{} and \code{} are nonnegative integers denoting line
and column information, respectively, in the file for a call; \code{} 
is the start position of the identifier in the call, and \code{} is the
first position following the identifier. If the function being called is
an operator, then both \code{} are currently \code{-} since the Sage++
toolkit does not keep location information for operator symbols; however,
they may be supplied and will be used.

\subsection{Option \code{-dumpbdb} -- dump data for the broswer database}

The \code{-dumpbdb} option dumps only the depfile information that is needed
by the browswer database.  This includes the \code{ftag} and
\code{ffile} lines as formatted for the \code{-dumpall} option, and the
\code{ctag} and \code{cfile} lines as formatted for the \code{-dumpch}
option.  Source code line and column positions are not written.

In addition, the \code{ftype} line is output if and only if the function
is the Main function of the program. The syntax is:
\begin{verbatim}
      ftype: Main
\end{verbatim}
\noindent


\subsection{Option \code{-dumpdebug} -- dump extra debug data}

When the \code{-dumpdebug} option is given, debugging information about
each function is dumped. The debugging information takes the same form
as the \code{-dumpall} information, except that the \code{fline} is no
longer present and that there are two types of extra information. First,
hidden functions are shown in the output. Second, a special line
\code{fdebug} containing debug data is dumped for each function.

\subsubsection{The \code{fdebug} line format}

The \code{fdebug} line provides some information not otherwise available.
It is used only for debugging, not by any of the tools, and need not be
supplied by new interfaces to compiler toolkits. It is documented here
for the sake of completeness. The syntax is:
\begin{verbatim}
      fdebug: moe= moc= seq= par= min= max=
\end{verbatim}
\noindent
Here, ``moe'' means ``method-of-element'', ``moc'' means
``method-of-class'', and ``seq'' and ``par'' mean what you think. A
\code{} is either \code{0} or \code{1}. ``Min'' is the minimum
nesting level in the call graph of the function, starting from the main
procedure, and ``max'' is the maximum nesting level. The main procedure
has nesting level 0.

\subsection{Option \code{-dumpch} -- dump the class hierarchy}

The \code{-dumpch} option is used to produce a representation of the class
hierarchy. 
The output is a sequence of class descriptions separated by blank
lines.  A class description consists of a \code{ctag} line to identify
the class, followed by a single \code{csub} line to list the subclasses,
and as many \code{cmem} lines as needed, one for each member. The class
hierarchy is dumped in preorder with a distinguished dummy root class as
an anchor.

\subsubsection{The \code{ctag} line format}

A \code{ctag} line serves to identify a class or collection. It has the
following form:

\begin{verbatim}
      ctag:   
\end{verbatim}

\noindent
where \code{} is the tag of the class, or -1 if the line describes
the root of the hierarchy. \code{} is either the empty Tcl
string \verb+{}+ for the root of the hierarchy or a string for real
classes or collections. \code{} is \code{-} if the line describes
an ordinary class or \code{COLL} if the line describes a collection.

\subsubsection{The \code{csub} line format}

The \code{csub} line is used to specify the subclasses of a given class.
Its syntax is:

\begin{verbatim}
      csub:  ...
\end{verbatim}

\noindent 
where \code{} is the tag of another class.

\subsubsection{The \code{cmem} line format}

A \code{cmem} line identifies a single member of a class or collection.
It has the following form:

\begin{verbatim}
      cmem:   
\end{verbatim}

\noindent 
where \code{} is the name of the member (an identifier or
operator symbol), \code{} is a tag which identifies the
member, and \code{} is a Tcl string on the format
\verb+{abcde}+ where \code{a}--\code{e} are single characters with the
following values and meaning:

\begin{itemize}
 \item \code{a} and \code{b} describe the gross member type:
  \begin{itemize}
   \item \code{a} is either ``?'' (unknown), ``i'' (private), ``u'' (public),
         ``o'' (protected), or ``e'' (element).
   \item \code{b} is either ``f'' (function) or ``v'' (variable).
  \end{itemize}
 \item \code{c} is ``v'' if the member is virtual, else blank.
 \item \code{d} is ``i'' if the member is inline, else blank.
 \item \code{e} is ``c'' if the member is a constructor, ``d'' if the member
       is a destructor, ``o'' if the member is an operator, else blank.
\end{itemize}

\section{Instrumenting the Program}

\code{Instr} is a program which is used by the TAU tools to instrument
the program under inspection. By a combination of a simple command language 
and some command line switches the program can be instrumented for 
profiling and breakpointing with reasonable control over what parts
of the program are instrumented and which are not.

The command line switch \code{-breakpoint} causes \code{instr} to
instrument the program for breakpointing; the switch \code{-profile}
causes \code{instr} to instrument the program for profiling. In
addition, an instrumentation command file may be specified with the
\code{-commands} option.  The command file, if present, tells
\code{instr} which functions, files, and classes to include in or
exclude from the instrumentation.

\subsection{Command language}

The grammar for the command language is shown in figure \ref{cmdlfig}.

\newcommand{\nt}[1]{$<$#1$>$}                 % nonterminal
\begin{figure}[hbtp]
% Yes, this is not pretty.
\newcommand{\arrow}{\>$\Longrightarrow$\>\>}  % lhs-to-rhs arrow
\newcommand{\tbar}{\>\>$\mid$\>}              % bar under arrow
\newcommand{\vbar}{$\mid$\ }                  % bar in rhs
\renewcommand{\t}[1]{{\tt #1}}                % terminal
\newcommand{\q}{\\}                           % end-of-line
\renewcommand{\empty}{$\epsilon$\ }           % empty production
\renewcommand{\a}[1]{\>{\em ; #1}}            % annotation

\begin{tabbing}
sdfkasdfkasdlfkjsd \= cc \= c \= cccccccccccccccccccccccccccccccccccccccccccccc \= \kill
\nt{commands}    \arrow \nt{commandline} \nt{commands} \q
\nt{commandline} \arrow \nt{command} \nt{end-of-line} \q
\nt{command}     \arrow \nt{level-command} \q
                   \tbar \nt{inline-command} \q
                   \tbar \nt{limit-command} \q
                   \tbar \nt{exclude-command} \q
                   \tbar \nt{include-command} \q
                   \tbar \empty \q
\nt{level-cmd}  \arrow \t{include} \t{up} \t{to} \t{level} \nt{number} \q
\nt{inline-cmd} \arrow ( \t{exclude} \vbar \t{include} ) \t{inline} ( \nt{function-word} \vbar \empty ) \q
\nt{limit-cmd} \arrow \t{count} ( \t{only} \vbar \empty ) \nt{limit} \q
                \tbar \t{exclude} \nt{limit} \q
\nt{limit} \arrow \t{smaller} \t{than} \nt{number} \nt{stmt-word} \nt{logical} \nt{number} \nt{child-word} \q
 \tbar \t{smaller} \t{than} \nt{number} \nt{child-word} \nt{logical} \nt{number} \nt{stmt-word} \q
\nt{exclude-cmd} \arrow \t{exclude} \nt{parameter} \q
\nt{include-cmd} \arrow \t{include} \nt{parameter} \q
\nt{parameter} \arrow \t{file} \nt{name} \q
\tbar \t{class} \nt{name} \q
\tbar \nt{function-word} \nt{name} \q
\tbar \nt{qualified-name} \q
\nt{name} \arrow \nt{ident} \vbar \nt{regexp} \q
\nt{qualified-name} \arrow \nt{name} \t{:} \nt{name} \t{::} \nt{name} \a{file:class::function} \q
\tbar \nt{name} \t{::} \nt{name} \a{class::function} \q
\tbar \nt{name} \t{:} \nt{name} \t{::} \a{file:class::} \q
\tbar \nt{name} \t{:} \nt{name} \a{file:function} \q
\tbar \nt{name} \t{:} \a{file:} \q
\tbar \nt{name} \t{::} \a{class::} \q
\tbar \nt{name} \a{function} \q
\nt{logical} \arrow \t{and} \vbar \t{or} \q
\nt{stmt-word} \arrow \t{statement} \vbar \t{statements} \q
\nt{child-word} \arrow \t{child} \vbar \t{children} \q
\nt{function-word} \arrow \t{function} \vbar \t{functions} \q
\end{tabbing}
\caption{The \code{instr} command language grammar}
\label{cmdlfig}
\end{figure}

The \nt{level-cmd} command tells \code{instr} to instrument only those
functions in the call graph which have a call graph level of less than
or equal to what is specified, where the main function (in most cases,
\code{Processor\_main}) has a level of zero.

The \nt{limit-cmd} command has two variations. The \code{count}
variation tells \code{instr} to only insert instrumentation which counts
the number of calls to functions which are smaller than some limit,
rather than instrumentation which computes the time spent in those
functions (the default). The \code{exclude} variation excludes functions
smaller than the limit from instrumentation altogether.  In both cases,
the limit is measured in the number of statements in the function and
the number of function calls it contains.

The \nt{exclude-cmd} command is used to exclude whole classes of functions
based on either file, class, or function name. The \nt{include-cmd} command
is similarly used to include these classes of functions.

The singular or plural forms of the words \code{function}, \code{child},
and \code{statement} may be used interchangeably regardless of the
magnitude of the quantity specified. The word \code{only}, if present,
has no information content. The language is case-sensitive; only
lower-case keywords are recognized.

Any number of commands can be present in the commands file. However,
only the last instances of the \nt{level-cmd}, \nt{inline-cmd}, and
\nt{limit-cmd} commands will be used by \code{instr}. 

When functions, files, and classes are selected, rules which limit their
size or structure (e.g. \code{exclude inline}) are applied first, then
rules which selectively exclude and include based on name matching.  In
the case of contradictory instances of \nt{include-cmd} and
\nt{exclude-cmd} commands, rules of precedence apply. Entities specified
in an \code{include} statement are preferred over those in an
\code{exclude} statement, so one can focus on for example one single
file by excluding all files and then including the single desired file;
this works because the default is to include everything.

\subsection{Instrumentation}

This section presents, on a high level, the type of instrumentation
performed inserted by \code{instr}. Details are left out as they are
specific to the compiler toolkit being used.

\subsubsection{Profiling}

The profiling code currently works only for C++ programs; Fortran and C
are not supported at all.

The C++ class \code{Profiler} must be declared in the program,
do this by including the standard header file
\code{target/include/profiler.h}. 

In each function to be profiled, \code{instr} declares a local auto
variable of class \code{Profiler} with the name \code{pcxx\_P}. This
class has an overloaded constructor function; \code{instr} creates an
argument list for the constructor depending on which profiling options
are appropriate for the function (currently only whether the function is
to be profiled counting-only or not).

In addition, \code{Processor\_main} is instrumented specially with a
variable of class \code{Profiler} with a call to a constructor which
takes the number of functions to be profiled; the purpose of this
special case is to let that special constructor allocate space for the
profiler.

\subsubsection{Breakpointing}

[need something here]

\subsubsection{Tracing}

[something here??]

\section{Instrumentation Output Data Format}

\subsubsection{Profiler data output format (profile.ftab)}

Generated only when instrumenting for profiling.

The output from the profiler is encoded in ASCII with newline-terminated
lines; each datum is on a line by itself.

The first line contains the name of the depfile on which the
instrumentation was performed. The second line contains a count of the
number of functions profiled, plus 11.

Thereafter follows 11 lines on the format \verb+\t+ where
\code{} is the tag of the function and \code{} is its name;
if the tag is -1, then the name is blank and the line is to be
ignored. These lines describe system functions like the main procedure, the
barrier, polling, and data element lookup. 

Finally, there are lines on the format \verb+\t-+
where \code{} is a function and \code{} is the number of
times it was called. If the function was not called, the dash and the
count are omitted.

\subsubsection{Type description files}

Generated when instrumenting for breakpointing.

%\subsubsubsection{tdl format}

%\subsubsubsection{edf format}


\end{document}
tau-2.16.4/tools/doc/interactions.doc000066400000000000000000000037311062343042700175000ustar00rootroot00000000000000REQUIRED AND OPTIONAL INTERACTIONS FOR INDIVIDUAL TAU TOOLS
	(very Alpha version!)

---------------------------------------------------------------------------

Initialization:
---------------

  Note: All tools (except tau and taud) may be called with the 
  command-line parameter, "-name ", which specifies what to
  name the interpreter.  It should come before all other parameters and
  will be removed from the argc and argv variables before the main body
  of the tool is sourced.

  1. Source "bdbm_utils.tcl", "pm_utils.tcl", and "depfile.tcl"
  2. Check if taud is running and launch it if not (launchTauDaemon).
  3. Define procedures for the tool.
  4. Define the tool-specific function, PM_AcceptChanges, to update the
     tool in response to project changes.
  5. Call PM_AddTool
  6. Call PM_AddGlobalSelect for any global select functions the tool should 
     receive.
  7. Parse tool's command-line args and call PM_OpenProject appropriately.
  8. Call PM_Status to get host, arch, dir, and root info :
	MUST SET depfile(...) with these values.

  9. Call functions to initialize the browser, such as:
	PM_GetFiles, PM_GetHeaders:
		To get lists of files available for browsing
	Bdb_GetClasses: 
		To get a list of classes
	Bdb_GetMainTag: 
		To get the tag for the project's main
	CgmLoadAllDeps:
		To load in all depfiles (probably not practical)
 10. Lanch TAU main window


Exiting:
--------
  1. Call PM_RemTool


Browsing:
---------
  -  To obtain browsing info for a function (class):

	Call Bdb_QueryFunc (Bdb_QueryClass) to determine which
	depfile to load (if necessary), tag, and line number for each
	match.  If full depfile info is needed check that the depfile 
	is loaded using Cgm_IsDepLoaded.  If the depfile is not loaded,
	load it with Cgm_LoadDep.  Call one of the accessors to get 
	the needed depfile info: Cgm_FuncInfo, Cgm_ClassInfo, Cgm_MemInfo,
	or Cgm_DepInfo.

  - To invoke global select function
	
	Call PM_GlobalSelect to broadcast the select.

  tau-2.16.4/tools/doc/interface.bdbm000066400000000000000000000224301062343042700170720ustar00rootroot00000000000000###########################################################################
# TAU Browser Databse Manager Utilities
#
# This file will be included by other TAU tools needing to interface with
# the browser database.  It contains functions that (via the BDBM) 
# querry and modify the database.
#
# The functions described below are to be sourced into all TAU tools needing
# the depfile indexing services of the browser database.
# Each function in the BDBM interfacecommunicates with the Tau daemon, 
# which contains the BDBM, requesting information, which is returned via 
# RPC from the interface function.  The TAU daemon MUST be running for these
# functions to operate.
#
# This document refers to three types of source code files: 
#   1. A "program file" (abbreviated "progfile") contains primary source code, 
#      such as function definitions.  Examples of progfiles are 
#      ".c, .C, or .pc" files.  
#   2. A "header file" is a file that may be multiply included into progfiles,
#      usually containing function and type declarations.  Examples of header
#      files are .h files in C, C++, or pC++.  
#   3. A "depfile" is a representation of the abstract syntax tree for a
#      single progile and multiple included header files.  The depfile is
#      created by the compiler parser and read by TAU via a "CGM" program,
#      described in the document, "Interfacing to TAU".
# The functions in the BDBM interface usually take progfile names, rather
# than depfile names, as parameters.
# 
# In this document names surrounded by angle brackets, "<>", are 
# representations of parameters or return values.  The brackets are not 
# used in actual code. Items surrounded by square brackets, "[]", are 
# optional, and the brackets should not appear in actual code.  The "==>" 
# symbol is used to indicate the format of the return value which follows.
#  
# Any BDBM interface functions will return the string "BDBM_FAILED" if the
# operation failed.
#
# Kurt Windisch (kurtw@cs.uoregon.edu) - 5/24/96
###########################################################################


###########################################################################
#
# To use Browser Database Functions, the tool should source include
#    TAU/tools/inc/bdbm_utils.tcl
#
###########################################################################


###########################################################################
# Data Structures - these data structures are used internally by the 
# 		    browser database and are not to be accessed directly 
#                   by tools except the TAU daemon.
#
# BDB_projname -> string containing name of project
#
# BDB_host -> string containing the host computer name or "localhost"
#
# BDB_names(,) -> list of {  } for files
#                                 defining the function .
#
# BDB_classes(,) -> list of {   for files
#                                    defining the class .
#
# BDB_progfile_headers() -> list of header files included by
#                                     
#
# BDB_progfiles_comptime() -> compile timestamp for 
#
# BDB_maintag -> { }
#
###########################################################################



###########################################################################
#
# Bdb_GetFuncs - Return a list containing all functions 
#                that are defined separately in a given progfile, or if
#                the progfile is unspecified, return a list of all functions
#                in the application.
#    Usage:
#      Bdb_GetFuncs [  ]
#        ==> { {  } ... }
#


###########################################################################
#
# Bdb_GetClasses - Return a list containing all classes (if C++ based language)
#                  that are defined separately in a given progfile, or if
#                  the progfile is unspecified, return a list of all classes
#                  in the application.
#    Usage:
#      Bdb_GetClasses [  ]
#        ==> { {  } ... }
#


###########################################################################
#
# Bdb_GetHeaders - Return a list of the header files included by a given
#                  progfile, or if a progfile is not specified, return a 
#                  list of all header files in the application.
#    Usage:
#      Bdb_GetHeaders [  ]
#        ==> {  ... }
#


###########################################################################
#
# Bdb_AddFile - Adds a specified progfile to the browser database (but does 
#               not build the index for it).  Header files are implicitly
#               added at compile-time.  The language is returned.
#    Usage:
#      Bdb_AddFile  
#        ==> 


###########################################################################
#
# Bdb_RemoveFile - Removes a given progfile and any uniquely included 
#                  header files from the browser database.  Returns nothing.
#    Usage:
#      Bdb_RemoveFile 


###########################################################################
#
# Bdb_BuildIndex - Builds or update an index for a given progfile from the 
#                  compiled depfile.  This must be called anytime the depfile 
#                  for a progfile is updated.  Returns nothing.
#    Usage:
#      Bdb_BuildIndex 


###########################################################################
#
# Bdb_QueryFunc - Lookup a function name in the browser DB index and return
#                 a list of associated progfile, tag, line, definition file, 
#                 and function name lists, one per distinct instance in the 
#                 index.
#    Usage:
#      Bdb_QueryFunc  
#        ==> { {      } ... }


###########################################################################
#
# Bdb_QueryClass - Lookup a class name in the browser DB index and return
#                  a list of associated progfile, tag, line, definiton file,
#                  and class name lists, one per distinct instance in the 
#                  index.
#    Usage:
#      Bdb_QueryClass 
#        ==> { {      } ... }


###########################################################################
#
# Bdb_QueryName - Lookup a name in the browser DB index and return
#                  a list of associated progfile, tag, line, and type lists,
#                  one per distinct instance in the index.  The name may
#                  refer to either a FUNC or CLASS and all matches on either
#                  will be returned.  Valid types are "FUNC" and "CLASS".
#    Usage:
#      Bdb_QueryName 
#        ==> { {       } ... }


###########################################################################
#
# Bdb_QueryFuncTag - Lookup a tag in a given progfile and returns
#                    a list of associated progfile, tag and line, and
#                    definition file.
#    Usage:
#      Bdb_QueryFuncTag  
#        ==> {     }


###########################################################################
#
# Bdb_QueryClassTag - Lookup a tag in a given progfile and returns
#                    a list of associated progfile, tag and line, and
#                    definition file.
#    Usage:
#      Bdb_QueryClassTag  
#        ==> {     }


###########################################################################
#
# Bdb_GetMaintag - Returns the filename and tag associated with the 
#                  Main function of the applications, or 0 if a main
#                  function is not defined.
#    Usage:
#      Bdb_GetMaintag
#        ==> {   }


###########################################################################
#
# Bdb__Init - Initializes the browswer database for a specific project.
#            Bdb_DeInit must be used between sucessive calls to Init.
#    Usage:
#      Bdb__Init    
#
# No interface function is provided for Bdb__Init, since it is only called
# from within the daemon.


###########################################################################
#
# Bdb__DeInit - Uninitializes the browswer database for a specific project.
#    Usage:
#      Bdb_DeInit 
#
# No interface function is provided for Bdb__DeInit, since it is only called
# from within the daemon.


###########################################################################
#
# Bdb__LoadDB - Load the browswer database from the project-specific BDB file.
#              Returns nothing.
#    Usage:
#      Bdb__LoadDB 
#
# No interface function is provided for Bdb__LoadDB, since it is only called
# from within the daemon.


###########################################################################
#
# Bdb__SaveDB - Save the browswer database from the project-specific BDB file.
#               Returns nothing.
#    Usage:
#      Bdb__SaveDB 
#
# No interface function is provided for Bdb__SaveDB, since it is only called
# from within the daemon.

tau-2.16.4/tools/doc/interface.cgm000066400000000000000000000203471062343042700167410ustar00rootroot00000000000000###########################################################################
# CGM MANAGER  - External Interface
# =============================================
# 
# The functions described below are to be sourced into all TAU tools needing
# the multiple depfile management services of the CGM manager.  
# 
# This document refers to three types of source code files: 
#   1. A "program file" (abbreviated "progfile") contains primary source code, 
#      such as function definitions. Examples of progfiles are ".c, .C, or .pc"
#      files.  
#   2. A "header file" is a file that may be multiply included into progfiles,
#      usually containing function and type declarations.  Examples of header
#      files are .h files in C, C++, or pC++.  
#   3. A "depfile" is a representation of the abstract syntax tree for a
#      single progile and multiple included header files.  The depfile is
#      created by the compiler parser and read by TAU via a "CGM" program,
#      described in the document, "Interfacing to TAU".
# The functions in the CGM interface usually take progfile names, rather
# than depfile names, as parameters.
# 
# In this document names surrounded by angle brackets, "<>", are reps
# of parameters or return values.  The brackets are not used in actual code.
# Items surrounded by square brackets, "[]", are optional, and the brackets
# should not appear in actual code.  The "==>" symbol is used to indicate
# the format of the return value which follows.
#   
# Any CGM interface functions will return the string "CGM_FAILED" if the
# operation failed.
###########################################################################


###########################################################################
#
# To use CGM functions, the tool should source include
#    TAU/tools/inc/depfile.tcl
#
###########################################################################


###########################################################################
# Data Structures - these data structures are used internally by the 
#                   CGM interface module and are not to be accessed directly 
#                   by tools except.
#
#   depfiles_loaded -> list of program files for which depfiles are loaded.
#
#   funcs
#       funcs(,,state)  -> Info for call-graph layout
#       funcs(,,fold)   -> Info for call-graph layout
#       funcs(,,name)   -> 
#       funcs(,,class)  -> {  }
#       funcs(,,file)   -> { }
#       funcs(,,pos)    ->                      
#       funcs(,,type)   -> {  
#       funcs(,,num)    -> 
#       funcs(,,calls)  -> 
#       funcs(,,childpos) -> 
#       funcs(,,childline) -> 
#
#
#   classes
#       classes(,,file) -> { 
#       classes(,,name) -> 
#       classes(,,fold) -> ???
#       classes(,,coll) -> 
#       classes(,,pos)  -> 
#       classes(,,typepos) -> 
#       classes(,,subs) ->        
#       classes(,,fmempos) -> 
#       classes(,,basepos) ->  
#       classes(,,mem)  -> 
#
#
#   members
#       members(,) -> {  }
#
#
#   depfile(,allftags)  - the ids of all functions
#   depfile(,allctags)  - the ids of all classes
#   depfile(,numfunc)   - number of functions defined in depfile
#   depfile(,numused)   - number of functions used (called) in program
#   depfile(,numprof)   - number of functions profiled
#   depfile(,ino)       - inode of depfile
#   depfile(,type)      - type/format of depfile
#
###########################################################################



###########################################################################
#
# Cgm_FuncList - Gets a list of functions defined in the given file 
#                (progfile or header allowed).
#
#    Usage:
#      Cgm_FuncList  
#         ==> {  ... }


###########################################################################
#
# Cgm_MethodList - Gets a list of methods  defined in the given class
#
#    Usage:
#      Cgm_MethodList   
#         ==> { {  } ... }


###########################################################################
#
# Cgm_FuncInfo - Gets function information from a depfile that has been 
#                loaded into memory with the Cgm_LoadDep or Cgm_LoadAllDeps 
#                functions.  The specified progfile MUST be loaded.  
#                Valid fields are: state, fold, name, class, file, pos,
#                type, num, calls, childpos, and childline.  
#                If the optional  parameter is given, the 
#                function info is reset to a new value.
#    Usage:
#      Cgm_FuncInfo    [  ]
#        ==> (See data descriptions)


###########################################################################
#
# Cgm_ClassInfo - Gets class information from a depfile that has been 
#                 loaded into memory with the Cgm_LoadDep or Cgm_LoadAllDeps 
#                 functions.  The specified progfile MUST be loaded.  
#                 Valid fields are: file, name, fold, coll, pos,
#                 typepos, subs, fmempos, basepos, and mem.
#                 If the optional  parameter is given, the 
#                 class info is reset to a new value.
#    Usage:
#      Cgm_ClassInfo    [  ]
#        ==> (See data descriptions)


###########################################################################
#
# Cgm_MemInfo - Gets member information from a depfile that has been 
#               loaded into memory with the Cgm_LoadDep or Cgm_LoadAllDeps 
#               functions.  The specified progfile MUST be loaded.  
#               If the optional  parameter is given, the 
#               member info is reset to a new value.
#    Usage:
#      Cgm_GetMemInfo   [  ] 
#        ==> {    }


###########################################################################
#
# Cgm_DepInfo - Gets general depfile information from a depfile that has been 
#               loaded into memory with the Cgm_LoadDep or Cgm_LoadAllDeps 
#               functions.  The specified progfile MUST be loaded.  
#               Valid fields are: path, file, allftags, allctags, numfunc,
#               numused, numprof, ino, and type.
#               If the optional  parameter is given, the 
#               depfile info is reset to a new value.
#    Usage:
#      Cgm_DepInfo   [  ] 
#        ==> (See data descriptions)


###########################################################################
#
# Cgm_IsDepLoaded - Boolean function returns 1 if the depfile associated 
#                   with the specified progfile is loaded into memory, 
#                   or 0 (zero) otherwise.
#    Usage:
#      Cgm_IsDepLoaded 
#        ==> 


###########################################################################
#
# Cgm_LoadDep - Loads the depfile information for a given progfile with the
#               given cgm options.  Returns nothing.  See the CGM document,
#               "Interfacing with TAU" for option descriptions.
#    Usage:
#      Cgm_LoadDep  


###########################################################################
#
# Cgm_LoadAllDeps - Loads the depfiles for ALL progfiles in the application
#                   with the given cgm options.  This may take a substantial
#                   ammount of time!  Returns nothing.
#    Usage:
#      Cgm_LoadAllDeps 


###########################################################################
#
# Cgm_RemoveDep - Removes the depfile information for a given progfile from
#                 memory.  Returns nothing.
#    Usage:
#      Cgm_RemoveDep 


tau-2.16.4/tools/doc/interface.fileio000066400000000000000000000035451062343042700174430ustar00rootroot00000000000000############################################################################
# File IO operations: These are functions available to TAU tools by 
# 	source including TAU/tools/inc/fileio.tcl.  They simplify file IO
#       in TAU, where relevant files may reside on remote host machines.
#
#       They are divided into two types of functions.  Functions beginning
# 	with "Remote_" implement remote-only file acces on the given host.
#       Note that for all remote access, the current working directy is 
#       always the user's home directory, so full file path names must be
#       given.  Functions beginning with "FileIO_" are generalized functions
#       that will access either remote or local files, based on the host
#       specifiec, which may be simply "localhost" for local file access.
#
#	For these functions to work the TAU tool MUST have the variable
#       depfile(root) defined globally and set to the irectory path of the
#       toplevel directory of distribution.
#
#   FileIO_ls  []
#   FileIO_pwd 
#   FileIO_file_readable  
#   FileIO_file_writable  
#   FileIO_file_exists                 - returns false for dir
#   FileIO_dir_exists                   - returns false for file
#   FileIO_file_open   []
#   FileIO_file_close  
#   FileIO_exec