├── ChangeLog
├── Check.mak.in
├── Defs.mak.in
├── Makefile.in
├── README.md
├── Rules.mak
├── arch
├── arch.h
├── arch_arm64.h
├── arch_ppc.h
└── arch_x86_64.h
├── bin
├── config.guess
├── config.sub
├── install-sh
├── mpip-insert-src
├── mpirun-mpip
└── srun-mpip
├── config
├── linux.exp
├── testing.exp
└── unix.exp
├── configure
├── configure.ac
├── diag_msgs.c
├── diag_msgs_api.c
├── doc
├── README
├── UserGuide.html
├── UserGuide.md
└── UserGuide.pdf
├── get_fortran_arg.f.in
├── get_fortran_arg_pxf.f
├── glob.c
├── hash_proto.h
├── make-wrappers.py
├── mpi.io.protos.txt
├── mpi.nbc.protos.txt
├── mpi.protos.txt.in
├── mpi.rma.protos.txt
├── mpiP-API.c
├── mpiP-API.h
├── mpiP-callsites.c
├── mpiP-callsites.h
├── mpiP-hash.c
├── mpiP-hash.h
├── mpiP-mt-stats.c
├── mpiP-mt-stats.h
├── mpiP-stats.c
├── mpiP-stats.h
├── mpiP-tslist.c
├── mpiP-tslist.h
├── mpiPconfig.h.in
├── mpiPi.c
├── mpiPi.h
├── mpiPi_proto.h
├── mpip_timers.h
├── mpip_timers
├── aix_local.h.in
├── aix_swclock.h
├── bgl_local.h
├── crayx1_hw.h
├── crayxt.h
├── linux_posix.h
└── sunos-timers.h
├── pc_lookup.c
├── pc_lookup_dwarf.c
├── pcontrol.c
├── record_stack.c
├── report.c
├── testing
├── 0-simple-c++.C
├── 0-simple-c++.exp
├── 0-simple.c
├── 0-simple.exp
├── 0-simplef.exp
├── 0-simplef.f
├── 1-hot-potato.c
├── 1-hot-potato.exp
├── 1-hot-potato.src
├── 10-coll-mess-size.c
├── 10-coll-mess-size.exp
├── 10-coll-mess-size.src
├── 11-p2p-mess-size.c
├── 11-p2p-mess-size.exp
├── 11-p2p-mess-size.src
├── 12-null-null.c
├── 12-null-null.exp
├── 12-null-null.src
├── 13-pcontrol-report.c
├── 14-mpiio.c
├── 14-mpiio.exp
├── 14-mpiio.src
├── 15-pcontrol.c
├── 15-pcontrol.exp
├── 15-pcontrol.src
├── 16-waitallf.exp
├── 16-waitallf.f
├── 16-waitallf.src
├── 17-rma.c
├── 17-rma.exp
├── 17-rma.src
├── 18-coll-non-block.c
├── 18-coll-non-block.exp
├── 18-coll-non-block.src
├── 2-pcontrol.c
├── 3-stacktrace.c
├── 3-stacktrace.exp
├── 3-stacktrace.src
├── 4-demangle.C
├── 4-demangle.exp
├── 4-demangle.src
├── 5-medley.c
├── 6-nonblock.c
├── 7-nonblock-waitall.c
├── 8-test.c
├── 9-test-mpip-time.c
├── Makefile.in
├── api-test.c
├── bfd-test.c
├── mt
│ ├── 01_mt_send-recv_b.c
│ ├── 01_mt_send-recv_b.exp
│ ├── 01_mt_send-recv_b.src
│ ├── 02_mt_send-recv_nb.c
│ ├── 02_mt_send-recv_nb.exp
│ ├── 02_mt_send-recv_nb.src
│ ├── 03_mt_barrier.c
│ ├── 03_mt_barrier.exp
│ ├── 03_mt_barrier.src
│ ├── 04_mt_dynamic_threads.c
│ ├── Makefile
│ ├── mt_common.c
│ └── mt_common.h
├── sweep-ops-stack.exp
├── sweep-ops-stack.f
├── sweep-ops-stack.src
├── sweep-ops.exp
├── sweep-ops.f
├── sweep-ops.src
├── test_template.tcl
├── testing.exp
└── timer-info.c
├── util.c
└── wrappers_special.c
/Check.mak.in:
--------------------------------------------------------------------------------
1 | #
2 | # @configure_input@
3 | #
4 | # Make targets for dejagnu evaluation of test codes
5 | #
6 | # $Id$
7 | #
8 |
9 | # Look for a local version of DejaGnu, otherwise use one in the path
10 | RUNTEST = `if test -f $(top_srcdir)/../dejagnu/runtest; then \
11 | echo $(top_srcdir) ../dejagnu/runtest; \
12 | else \
13 | echo runtest; \
14 | fi`
15 |
16 | # The flags to pass to runtest
17 | RUNTESTFLAGS =
18 | TEST = @TEST_LIST@
19 | # Execute the tests
20 | check: site.exp @DEFAULT_TARGS@ test
21 | DEJAGNU="./config/testing.exp" $(RUNTEST) $(RUNTESTFLAGS) \
22 | --tool testing --srcdir . $(TEST)
23 |
24 | FAST_TEST=1-hot-potato
25 | check1: site.exp @DEFAULT_TARGS@ test
26 | DEJAGNU="./config/testing.exp" $(RUNTEST) $(RUNTESTFLAGS) \
27 | --tool testing --srcdir . ${FAST_TEST}.exp
28 |
29 | # Make the local config file
30 | site.exp: ./config.status Makefile
31 | @echo "Making a new config file..."
32 | -@rm -f ./tmp?
33 | @touch site.exp
34 |
35 | -@mv site.exp site.bak
36 | @echo "## these variables are automatically\
37 | generated by make ##" > ./tmp0
38 | @echo "# Do not edit here. If you wish to\
39 | override these values" >> ./tmp0
40 | @echo "# add them to the last section" >> ./tmp0
41 | @echo "set host_os @host_os@" >> ./tmp0
42 | @echo "set host_alias unreliable" >> ./tmp0
43 | @echo "set host_cpu @host_cpu@" >> ./tmp0
44 | @echo "set host_vendor @host_vendor@" >> ./tmp0
45 | @echo "set target_os @target_os@" >> ./tmp0
46 | @echo "set target_alias @target_alias@" >> ./tmp0
47 | @echo "set target_cpu @target_cpu@" >> ./tmp0
48 | @echo "set target_vendor @target_vendor@" >> ./tmp0
49 | @echo "set host_triplet @host@" >> ./tmp0
50 | @echo "set target_triplet @target@">>./tmp0
51 | @echo "set tool binutils" >> ./tmp0
52 | @echo "set srcdir @srcdir@" >> ./tmp0
53 | @echo "set objdir `pwd`" >> ./tmp0
54 | @echo "set launch @LAUNCH@" >> ./tmp0
55 | @echo "## All variables above are generated by\
56 | configure. Do Not Edit ##" >> ./tmp0
57 | @cat ./tmp0 > site.exp
58 | @sed < site.bak \
59 | -e '1,/^## All variables above are.*##/ d' \
60 | >> site.exp
61 | -@rm -f ./tmp?
62 | ##### EOF
63 |
--------------------------------------------------------------------------------
/Defs.mak.in:
--------------------------------------------------------------------------------
1 | # Makefile for MPIP -*-Makefile-*-
2 | # Please see license in doc/UserGuide.html
3 | # @configure_input@
4 | # $Id$
5 |
6 | SHELL = /bin/sh
7 | CC = @CC@
8 | CXX = @CXX@
9 | FC = @F77@
10 | AR = ar
11 | RANLIB = @RANLIB@
12 | PYTHON = @HAVE_PYTHON@
13 |
14 | CFLAGS = @CFLAGS@
15 | FFLAGS = @FFLAGS@
16 |
17 | USE_GETARG = @USE_GETARG@
18 | USE_LIBDWARF = @USE_LIBDWARF@
19 |
20 | ifneq (-g,$(findstring -g,$(CFLAGS)))
21 | CFLAGS += -g
22 | endif
23 | ifneq (-g,$(findstring -g,$(FFLAGS)))
24 | FFLAGS += -g
25 | endif
26 |
27 | INSTALL = @INSTALL@
28 | INSTALL_PROGRAM = @INSTALL_PROGRAM@
29 | INSTALL_DATA = @INSTALL_DATA@
30 |
31 | LIBS = @LIBS@
32 | LDFLAGS = @LDFLAGS@
33 | F77_SYMBOLS = @F77_SYMBOLS@
34 | BINUTILS_DIR = @BINUTILS_DIR@
35 | BIN_TYPE_FLAG = @BIN_TYPE_FLAG@
36 |
37 | CANONICAL_BUILD = @build@
38 | CANONICAL_TARGET = @target@
39 | TARGET_OS = @target_os@
40 | TARGET_CPU = @target_cpu@
41 |
42 | ifneq ( $(srcdir), "." )
43 | CPPFLAGS += -I.
44 | endif
45 | ifdef ${srcdir}
46 | CPPFLAGS = -I$(srcdir) @CPPFLAGS@
47 | endif
48 |
49 | # check if we're *really* cross-compiling
50 | ifeq (${CANONICAL_TARGET},${CANONICAL_BUILD})
51 | OS = $(shell uname)
52 | ARCH = $(shell uname -m)
53 | else
54 | OS = ${TARGET_OS}
55 | ARCH = ${TARGET_CPU}
56 | endif
57 |
58 | ifeq ($(OS),UNICOS/mp)
59 | OS = UNICOS_mp
60 | endif
61 |
62 | ifeq ($(OS),OSF1)
63 | LIBS += -lexc
64 | endif
65 |
66 | ifeq ($(OS),Linux)
67 | ifeq ($(ARCH),i686)
68 | CPPFLAGS += -DIA32
69 | endif
70 | ifeq ($(ARCH),alpha)
71 | CPPFLAGS += -Dalpha
72 | endif
73 | ifeq ($(ARCH),x86_64)
74 | CPPFLAGS += -DX86_64
75 | endif
76 | ifeq ($(ARCH),ppc64)
77 | CPPFLAGS += -Dppc64
78 | endif
79 |
80 | endif
81 |
82 | ifeq (${OS},catamount)
83 | OS = Catamount
84 | ifeq (${ARCH},x86_64)
85 | CPPFLAGS += -DX86_64
86 | endif
87 | endif
88 |
89 | C_TARGET = libmpiP.a
90 | SHARED_C_TARGET = libmpiP.so
91 | API_TARGET = libmpiPapi.a
92 | MPIPLIB = mpiP
93 | MPIPFLIB = mpiP
94 |
95 | BUILD_FLIB=false
96 | ifeq ($(USE_GETARG),true)
97 | BUILD_FLIB=true
98 | FORTRAN_FLAG = -DUSE_GETARG
99 | endif
100 | ifneq ($(OS),Linux)
101 | BUILD_FLIB=true
102 | endif
103 |
104 | ifeq ($(BUILD_FLIB),true)
105 | FORTRAN_TARGET = @FORTRAN_TARGET@
106 | MPIPFLIB = @MPIPFLIB@
107 | FORTRAN_FLAG := $(FORTRAN_FLAG) @FORTRAN_FLAG@
108 | F77_VENDOR = @F77_VENDOR@
109 | endif
110 |
111 | DEMANGLE_TARGET =
112 | DO_DEMANGLE = @DO_DEMANGLE@
113 | ENABLE_BFD = @ENABLE_BFD@
114 | MPIPCXXLIB = mpiP
115 |
116 | ifeq ($(ENABLE_BFD),yes)
117 |
118 | ifeq ($(DO_DEMANGLE),GNU)
119 | CPPFLAGS += -DDEMANGLE_$(DO_DEMANGLE)
120 | endif
121 | ifeq ($(DO_DEMANGLE),IBM)
122 | DEMANGLE_FLAG = -DDEMANGLE_$(DO_DEMANGLE)
123 | DEMANGLE_TARGET = libmpiPdmg.a
124 | MPIPCXXLIB = mpiPdmg
125 | CPPFLAGS := -I/usr/include $(CPPFLAGS)
126 | endif
127 | ifeq ($(DO_DEMANGLE),Compaq)
128 | DEMANGLE_FLAG = -DDEMANGLE_$(DO_DEMANGLE)
129 | DEMANGLE_TARGET = libmpiPdmg.a
130 | MPIPCXXLIB = mpiPdmg
131 | CPPFLAGS := -I/usr/include $(CPPFLAGS)
132 | CXXLIBS += -lmld
133 | endif
134 |
135 | endif
136 |
137 |
138 | ifneq ($(ARCH),ppc64)
139 | CPPFLAGS+= -D${OS}
140 | endif
141 | LFLAGS +=
142 | LIBS +=
143 |
144 | ADD_OBJS = @ADD_OBJS@
145 |
146 | ENABLE_API_ONLY = @ENABLE_API_ONLY@
147 | ##### EOF
148 |
--------------------------------------------------------------------------------
/Rules.mak:
--------------------------------------------------------------------------------
1 | # Makefile for MPIP -*-Makefile-*-
2 | # Please see license in doc/UserGuide.html
3 | # $Id$
4 |
5 | .c.o:
6 | ${CC} ${CFLAGS} ${CPPFLAGS} -c $< -o $@
7 |
8 | .f.o:
9 | ${FC} ${CFLAGS} -c $< -o $@
10 |
11 | clean::
12 | -rm -f $(OBJS) *.mpiP *.log core *~ ${C_TARGET} TAGS
13 |
14 | ##### EOF
15 |
--------------------------------------------------------------------------------
/arch/arch.h:
--------------------------------------------------------------------------------
1 | /* -*- C -*-
2 |
3 | mpiP MPI Profiler ( http://llnl.github.io/mpiP )
4 |
5 | Please see COPYRIGHT AND LICENSE information at the end of this file.
6 |
7 | -----
8 |
9 | arch.h -- architecture-specific code and definitions
10 |
11 | */
12 |
13 | #ifndef ARCH_ATOMICS_H
14 | #define ARCH_ATOMICS_H
15 |
16 | #ifdef __x86_64__
17 | #include "arch/arch_x86_64.h"
18 | #elif __ppc64__ || __ppc__ || __PPC64__
19 | #include "arch/arch_ppc.h"
20 | #elif __aarch64__
21 | #include "arch/arch_arm64.h"
22 | #endif
23 |
24 | #endif // ARCH_ATOMICS_H
25 |
26 |
27 | /*
28 |
29 |
30 |
31 | Copyright (c) 2019 Mellanox Technologies Ltd.
32 | Written by Artem Polyakov
33 | All rights reserved.
34 |
35 | This file is part of mpiP. For details, see http://llnl.github.io/mpiP.
36 |
37 | Redistribution and use in source and binary forms, with or without
38 | modification, are permitted provided that the following conditions are
39 | met:
40 |
41 | * Redistributions of source code must retain the above copyright
42 | notice, this list of conditions and the disclaimer below.
43 |
44 | * Redistributions in binary form must reproduce the above copyright
45 | notice, this list of conditions and the disclaimer (as noted below) in
46 | the documentation and/or other materials provided with the
47 | distribution.
48 |
49 | * Neither the name of the UC/LLNL nor the names of its contributors
50 | may be used to endorse or promote products derived from this software
51 | without specific prior written permission.
52 |
53 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
54 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
55 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
56 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OF
57 | THE UNIVERSITY OF CALIFORNIA, THE U.S. DEPARTMENT OF ENERGY OR
58 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
59 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
60 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
61 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
62 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
63 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
64 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
65 |
66 |
67 | Additional BSD Notice
68 |
69 | 1. This notice is required to be provided under our contract with the
70 | U.S. Department of Energy (DOE). This work was produced at the
71 | University of California, Lawrence Livermore National Laboratory under
72 | Contract No. W-7405-ENG-48 with the DOE.
73 |
74 | 2. Neither the United States Government nor the University of
75 | California nor any of their employees, makes any warranty, express or
76 | implied, or assumes any liability or responsibility for the accuracy,
77 | completeness, or usefulness of any information, apparatus, product, or
78 | process disclosed, or represents that its use would not infringe
79 | privately-owned rights.
80 |
81 | 3. Also, reference herein to any specific commercial products,
82 | process, or services by trade name, trademark, manufacturer or
83 | otherwise does not necessarily constitute or imply its endorsement,
84 | recommendation, or favoring by the United States Government or the
85 | University of California. The views and opinions of authors expressed
86 | herein do not necessarily state or reflect those of the United States
87 | Government or the University of California, and shall not be used for
88 | advertising or product endorsement purposes.
89 |
90 |
91 |
92 | */
93 |
--------------------------------------------------------------------------------
/bin/mpip-insert-src:
--------------------------------------------------------------------------------
1 | #! /usr/bin/perl
2 | #
3 | # mpip-insert-src
4 | #
5 | # Chris Chambreau LLNL 1/6/05
6 | #
7 | # Script for translating mpiP addresses with addr2line
8 | #
9 | # 1) Extracts addresses in mpiP report
10 | # 2) Generates temp file of address output from addr2line
11 | # 3) Substitutes source file information for addresses in report file
12 | #
13 | # Output is sent to stdout
14 | # addr2line must be available
15 | #
16 | #
17 |
18 | $temp_file=insert_src.temp;
19 |
20 |
21 | sub print_use
22 | {
23 | print "\nmpip-insert-src : mpip-insert-src [executable] [report file]\n\n";
24 | print "Translate mpiP report address information into source info.\n";
25 | print "Output is sent to stdout.\n\n";
26 | exit -1;
27 | }
28 |
29 |
30 | if ( $#ARGV ne 1 )
31 | {
32 | print_use();
33 | }
34 |
35 | if ( -f $temp_file )
36 | {
37 | unlink($temp_file);
38 | }
39 |
40 | #
41 | # Open pipe to addr2line and open report output file
42 | # Read addresses from report file and translate with addr2line
43 | #
44 | open INFO, "| addr2line -f -s -e $ARGV[0] > $temp_file"
45 | or die "failed to open addr2line pipe";
46 |
47 | open REPORT, "$ARGV[1]" or die "failed to open report file $ARGV[1]";
48 |
49 | while ()
50 | {
51 | if ( /0x/ )
52 | {
53 | ($addr) = $_ =~ /(0x\S+)/;
54 | push @addrs, $addr;
55 | print INFO "$addr\n";
56 | }
57 | }
58 |
59 | close INFO;
60 |
61 |
62 | # Read temp file with source data and populate hash table with info
63 | open ADDRS, $temp_file;
64 | $idx = 0;
65 | while ()
66 | {
67 | chomp;
68 | $func = $_;
69 | $_ = ;
70 | chomp;
71 | ($file, $line) = $_ =~ /(\S+):(\d+)/;
72 | $source{$addrs[$idx]}->{file} = $file;
73 | $source{$addrs[$idx]}->{line} = $line;
74 | $source{$addrs[$idx]}->{func} = $func;
75 | $idx++;
76 | }
77 | close ADDRS;
78 |
79 |
80 | #
81 | # Generate new report output with source information
82 | #
83 | seek (REPORT, 0, 0);
84 | while ()
85 | {
86 | if ( /0x/ )
87 | {
88 | ($addr) = $_ =~ /(0x\S+)/;
89 | ($id, $lev) = $_ =~ /(\d+)\s+(\d+)/;
90 | if ( $lev eq 0 )
91 | {
92 | ($call) = $_ =~ /(\S+)\s*$/;
93 | }
94 | else
95 | {
96 | $call = "";
97 | }
98 | printf ( "%3d%4d %-19s%5d %-24s %-20s\n", $id, $lev,
99 | $source{$addr}->{file}, $source{$addr}->{line},
100 | $source{$addr}->{func}, $call ) ;
101 | }
102 | else
103 | {
104 | print;
105 | }
106 | }
107 |
108 | close REPORT;
109 |
110 |
111 | if ( -f $temp_file )
112 | {
113 | unlink($temp_file);
114 | }
115 |
116 | exit 0;
117 |
--------------------------------------------------------------------------------
/bin/mpirun-mpip:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | #
3 | # mpirun-mpip
4 | #
5 | # Chris Chambreau LLNL 1/6/05
6 | #
7 | # If the application has been linked against an SO MPI library and
8 | # SO versions of libmpiP, libbfd, and libiberty are available, this
9 | # script should preload libmpiP such that MPI routines are profiled
10 | # and an mpiP report is generated.
11 | #
12 | # This script is a wrapper for mpirun. The use of "mpirun" to run a
13 | # parallel job can be replaced with "mpirun-mpip".
14 | #
15 | # You may need to preload other objects based on your MPI implementation
16 | # and compiler.
17 |
18 |
19 | MPIP_DIR=/home/chcham/workspace/mpiP
20 |
21 | export LD_PRELOAD=/usr/lib/libbfd.so:/usr/lib/libunwind.so:/lib/i386-linux-gnu/libz.so.1:${MPIP_DIR}/lib/libmpiP.so
22 |
23 | mpirun "$@"
24 |
25 | exit $?
26 |
--------------------------------------------------------------------------------
/bin/srun-mpip:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | #
3 | # srun-mpip
4 | #
5 | # Chris Chambreau LLNL 1/6/05
6 | #
7 | # If the application has been linked against an SO MPI library and
8 | # SO versions of libmpiP, libbfd, and libiberty are available, this
9 | # script should preload libmpiP.so (generated with 'make shared')
10 | # such that MPI routines are profiled and an mpiP report is generated.
11 | #
12 | # This script is a wrapper for srun The use of "srun" to run a
13 | # parallel job can be replaced with "srun-mpip".
14 | #
15 | # You may need to preload other objects based on your MPI implementation
16 | # and compiler.
17 |
18 | # Top-level mpiP install directory
19 | MPIP_DIR=/usr/local/tools/mpip
20 |
21 | # ADDTL_RT_LIBS objects must be separated by a colon
22 | ADDTL_RT_LIBS="/usr/lib64/libunwind.so"
23 |
24 | #set -x
25 |
26 | # Get the RPATH paths from the executable to add to LD_LIBRARY_PATH in the
27 | # event that using LD_PRELOAD interferes with using RPATH values.
28 |
29 | EXE_RPATHS=
30 | # Search through command-line arguments for executables with RPATH sections
31 | for iarg in $@ ; do
32 |
33 | # Skip arguments that start with a dash
34 | if test ${iarg:0:1} = '-' ; then continue; fi;
35 |
36 | # Try to get the full path to executable
37 | FULL_PATH=`which $iarg 2> /dev/null`
38 |
39 | if test $? -eq 0 ; then # Found an executable
40 |
41 | # Check executable for RPATH section
42 | objdump -p ${FULL_PATH} | grep RPATH > /dev/null 2>&1
43 |
44 | if test $? -eq 0 ; then # Found RPATH section
45 | EXE_RPATHS=${EXE_RPATHS:+${EXE_RPATHS}:}`objdump -p ${FULL_PATH} | grep RPATH | cut -d' ' -f10`
46 | fi
47 | fi
48 | done
49 | #echo :${EXE_RPATHS}:
50 |
51 | # Set LD_LIBRARY_PATH to find executable shared objects
52 | export LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+${LD_LIBRARY_PATH}:}${EXE_RPATHS}
53 |
54 | # Set LD_PRELOAD to preload mpiP library and other libs used by mpiP
55 | export RT_LD_PRELOAD=\
56 | ${LD_PRELOAD:+${LD_PRELOAD}:}${MPIP_DIR}/lib/libmpiP.so${ADDTL_RT_LIBS:+:${ADDTL_RT_LIBS}}
57 |
58 | #export LD_DEBUG=libs
59 |
60 | srun --export LD_PRELOAD=${RT_LD_PRELOAD} "$@"
61 |
62 | exit $?
63 |
--------------------------------------------------------------------------------
/config/linux.exp:
--------------------------------------------------------------------------------
1 |
2 | set launch prun
3 | set args {-n 2 -ppdebug }
4 |
5 |
--------------------------------------------------------------------------------
/config/testing.exp:
--------------------------------------------------------------------------------
1 | #placeholder to remove dejagnu configuration warning
2 |
--------------------------------------------------------------------------------
/config/unix.exp:
--------------------------------------------------------------------------------
1 |
2 | proc foo_exit {} {}
3 | proc foo_version {} {}
4 | set pool pdebug
5 | set rmpool pdebug
6 | set pause_time 1
7 |
8 |
--------------------------------------------------------------------------------
/diag_msgs.c:
--------------------------------------------------------------------------------
1 | /* -*- C -*-
2 |
3 | mpiP MPI Profiler ( http://llnl.github.io/mpiP )
4 |
5 | Please see COPYRIGHT AND LICENSE information at the end of this file.
6 |
7 | -----
8 |
9 | diag_msgs.c -- diagnostic routines, error logging, warning, etc
10 |
11 | */
12 |
13 | #ifndef lint
14 | static char *svnid = "$Id$";
15 | #endif
16 |
17 | #include
18 |
19 | #include "mpiPi.h"
20 |
21 | void
22 | mpiPi_msg (char *fmt, ...)
23 | {
24 | va_list args;
25 | FILE *fp = mpiPi.stdout_;
26 | va_start (args, fmt);
27 | fprintf (fp, "%s: ", mpiPi.toolname);
28 | vfprintf (fp, fmt, args);
29 | va_end (args);
30 | fflush (fp);
31 | }
32 |
33 | void
34 | mpiPi_abort (char *fmt, ...)
35 | {
36 | va_list args;
37 | FILE *fp = mpiPi.stderr_;
38 | va_start (args, fmt);
39 | fprintf (fp, "\n\n%s: ABORTING: ", mpiPi.toolname);
40 | vfprintf (fp, fmt, args);
41 | va_end (args);
42 | fflush (fp);
43 | PMPI_Abort (mpiPi.comm, -1);
44 | }
45 |
46 | void
47 | mpiPi_msg_debug (char *fmt, ...)
48 | {
49 | va_list args;
50 | FILE *fp = mpiPi.stdout_;
51 |
52 | if (mpiPi_debug <= 0)
53 | return;
54 |
55 | va_start (args, fmt);
56 | fprintf (fp, "%s: DBG: ", mpiPi.toolname);
57 | vfprintf (fp, fmt, args);
58 | va_end (args);
59 | fflush (fp);
60 | }
61 |
62 | void
63 | mpiPi_msg_debug0 (char *fmt, ...)
64 | {
65 | va_list args;
66 | FILE *fp = mpiPi.stdout_;
67 |
68 | if (mpiPi_debug <= 0)
69 | return;
70 |
71 | if (mpiPi.rank == 0)
72 | {
73 | va_start (args, fmt);
74 | fprintf (fp, "%s: DBG: ", mpiPi.toolname);
75 | vfprintf (fp, fmt, args);
76 | va_end (args);
77 | fflush (fp);
78 | }
79 | }
80 |
81 | void
82 | mpiPi_msg_warn (char *fmt, ...)
83 | {
84 | va_list args;
85 | FILE *fp = mpiPi.stderr_;
86 | va_start (args, fmt);
87 | fprintf (fp, "%s: WARNING: ", mpiPi.toolname);
88 | vfprintf (fp, fmt, args);
89 | va_end (args);
90 | fflush (fp);
91 | }
92 |
93 |
94 |
95 | /*
96 |
97 |
98 |
99 | Copyright (c) 2006, The Regents of the University of California.
100 | Produced at the Lawrence Livermore National Laboratory
101 | Written by Jeffery Vetter and Christopher Chambreau.
102 | UCRL-CODE-223450.
103 | All rights reserved.
104 |
105 | This file is part of mpiP. For details, see http://llnl.github.io/mpiP.
106 |
107 | Redistribution and use in source and binary forms, with or without
108 | modification, are permitted provided that the following conditions are
109 | met:
110 |
111 | * Redistributions of source code must retain the above copyright
112 | notice, this list of conditions and the disclaimer below.
113 |
114 | * Redistributions in binary form must reproduce the above copyright
115 | notice, this list of conditions and the disclaimer (as noted below) in
116 | the documentation and/or other materials provided with the
117 | distribution.
118 |
119 | * Neither the name of the UC/LLNL nor the names of its contributors
120 | may be used to endorse or promote products derived from this software
121 | without specific prior written permission.
122 |
123 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
124 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
125 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
126 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OF
127 | THE UNIVERSITY OF CALIFORNIA, THE U.S. DEPARTMENT OF ENERGY OR
128 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
129 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
130 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
131 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
132 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
133 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
134 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
135 |
136 |
137 | Additional BSD Notice
138 |
139 | 1. This notice is required to be provided under our contract with the
140 | U.S. Department of Energy (DOE). This work was produced at the
141 | University of California, Lawrence Livermore National Laboratory under
142 | Contract No. W-7405-ENG-48 with the DOE.
143 |
144 | 2. Neither the United States Government nor the University of
145 | California nor any of their employees, makes any warranty, express or
146 | implied, or assumes any liability or responsibility for the accuracy,
147 | completeness, or usefulness of any information, apparatus, product, or
148 | process disclosed, or represents that its use would not infringe
149 | privately-owned rights.
150 |
151 | 3. Also, reference herein to any specific commercial products,
152 | process, or services by trade name, trademark, manufacturer or
153 | otherwise does not necessarily constitute or imply its endorsement,
154 | recommendation, or favoring by the United States Government or the
155 | University of California. The views and opinions of authors expressed
156 | herein do not necessarily state or reflect those of the United States
157 | Government or the University of California, and shall not be used for
158 | advertising or product endorsement purposes.
159 |
160 |
161 |
162 | */
163 |
164 |
165 | /* eof */
166 |
--------------------------------------------------------------------------------
/diag_msgs_api.c:
--------------------------------------------------------------------------------
1 | /* -*- C -*-
2 |
3 | mpiP MPI Profiler ( http://llnl.github.io/mpiP )
4 |
5 | Please see COPYRIGHT AND LICENSE information at the end of this file.
6 |
7 | -----
8 |
9 | diag_msgs_api.c -- diagnostic routines, error logging, warning, etc
10 |
11 | */
12 |
13 | #ifndef lint
14 | static char *svnid = "$Id$";
15 | #endif
16 |
17 | #include
18 |
19 | #include "mpiPi.h"
20 |
21 | void
22 | mpiPi_msg (char *fmt, ...)
23 | {
24 | va_list args;
25 | FILE *fp = mpiPi.stdout_;
26 | va_start (args, fmt);
27 | fprintf (fp, "%s: ", mpiPi.toolname);
28 | vfprintf (fp, fmt, args);
29 | va_end (args);
30 | fflush (fp);
31 | }
32 |
33 | void
34 | mpiPi_abort (char *fmt, ...)
35 | {
36 | va_list args;
37 | FILE *fp = mpiPi.stderr_;
38 | va_start (args, fmt);
39 | fprintf (fp, "\n\n%s: ABORTING: ", mpiPi.toolname);
40 | vfprintf (fp, fmt, args);
41 | va_end (args);
42 | fflush (fp);
43 | abort ();
44 | }
45 |
46 | void
47 | mpiPi_msg_debug (char *fmt, ...)
48 | {
49 | va_list args;
50 | FILE *fp = mpiPi.stdout_;
51 |
52 | if (mpiPi_debug <= 0)
53 | return;
54 |
55 | va_start (args, fmt);
56 | fprintf (fp, "%s: DBG: ", mpiPi.toolname);
57 | vfprintf (fp, fmt, args);
58 | va_end (args);
59 | fflush (fp);
60 | }
61 |
62 | void
63 | mpiPi_msg_debug0 (char *fmt, ...)
64 | {
65 | va_list args;
66 | FILE *fp = mpiPi.stdout_;
67 | if (mpiPi.rank == 0)
68 | {
69 | va_start (args, fmt);
70 | fprintf (fp, "%s: ", mpiPi.toolname);
71 | vfprintf (fp, fmt, args);
72 | va_end (args);
73 | fflush (fp);
74 | }
75 | }
76 |
77 | void
78 | mpiPi_msg_warn (char *fmt, ...)
79 | {
80 | va_list args;
81 | FILE *fp = mpiPi.stderr_;
82 | va_start (args, fmt);
83 | fprintf (fp, "%s: WARNING: ", mpiPi.toolname);
84 | vfprintf (fp, fmt, args);
85 | va_end (args);
86 | fflush (fp);
87 | }
88 |
89 |
90 | /*
91 |
92 |
93 |
94 | Copyright (c) 2006, The Regents of the University of California.
95 | Produced at the Lawrence Livermore National Laboratory
96 | Written by Jeffery Vetter and Christopher Chambreau.
97 | UCRL-CODE-223450.
98 | All rights reserved.
99 |
100 | This file is part of mpiP. For details, see http://llnl.github.io/mpiP.
101 |
102 | Redistribution and use in source and binary forms, with or without
103 | modification, are permitted provided that the following conditions are
104 | met:
105 |
106 | * Redistributions of source code must retain the above copyright
107 | notice, this list of conditions and the disclaimer below.
108 |
109 | * Redistributions in binary form must reproduce the above copyright
110 | notice, this list of conditions and the disclaimer (as noted below) in
111 | the documentation and/or other materials provided with the
112 | distribution.
113 |
114 | * Neither the name of the UC/LLNL nor the names of its contributors
115 | may be used to endorse or promote products derived from this software
116 | without specific prior written permission.
117 |
118 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
119 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
120 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
121 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OF
122 | THE UNIVERSITY OF CALIFORNIA, THE U.S. DEPARTMENT OF ENERGY OR
123 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
124 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
125 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
126 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
127 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
128 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
129 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
130 |
131 |
132 | Additional BSD Notice
133 |
134 | 1. This notice is required to be provided under our contract with the
135 | U.S. Department of Energy (DOE). This work was produced at the
136 | University of California, Lawrence Livermore National Laboratory under
137 | Contract No. W-7405-ENG-48 with the DOE.
138 |
139 | 2. Neither the United States Government nor the University of
140 | California nor any of their employees, makes any warranty, express or
141 | implied, or assumes any liability or responsibility for the accuracy,
142 | completeness, or usefulness of any information, apparatus, product, or
143 | process disclosed, or represents that its use would not infringe
144 | privately-owned rights.
145 |
146 | 3. Also, reference herein to any specific commercial products,
147 | process, or services by trade name, trademark, manufacturer or
148 | otherwise does not necessarily constitute or imply its endorsement,
149 | recommendation, or favoring by the United States Government or the
150 | University of California. The views and opinions of authors expressed
151 | herein do not necessarily state or reflect those of the United States
152 | Government or the University of California, and shall not be used for
153 | advertising or product endorsement purposes.
154 |
155 |
156 |
157 | */
158 |
159 |
160 | /* eof */
161 |
--------------------------------------------------------------------------------
/doc/README:
--------------------------------------------------------------------------------
1 |
2 | The most current information regarding mpiP can be found at
3 | http://llnl.github.io/mpiP.
4 |
--------------------------------------------------------------------------------
/doc/UserGuide.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LLNL/mpiP/29faf3a32930044868807175db84b0c47934393c/doc/UserGuide.pdf
--------------------------------------------------------------------------------
/get_fortran_arg.f.in:
--------------------------------------------------------------------------------
1 | ! -*- Fortran -*-
2 | !
3 | ! mpiP MPI Profiler ( http://llnl.github.io/mpiP )
4 | !
5 | ! Please see COPYRIGHT AND LICENSE information at the end of this file.
6 | !
7 | ! -----
8 | !
9 | ! @configure_input@
10 | !
11 | ! access fortran command line arguments
12 | !
13 | ! $Id$
14 | !
15 |
16 | function mpipi_get_strlen(str)
17 | integer i
18 | character str*(*)
19 |
20 | i = len(str)
21 |
22 | do while (str(i:i) .eq. ' ')
23 | i = i - 1
24 | enddo
25 |
26 | mpipi_get_strlen = i
27 | return
28 | end
29 |
30 |
31 | subroutine mpipi_get_fortran_argc(argc_val)
32 | !DEC$ attributes REFERENCE :: argc_val
33 | integer argc_val
34 |
35 | argc_val = iargc()
36 |
37 | end
38 |
39 |
40 | subroutine mpipi_get_fortran_arg(idx, buf_len, buf, len)
41 | !DEC$ attributes REFERENCE :: idx
42 | !DEC$ attributes REFERENCE :: buf_len
43 | !DEC$ attributes REFERENCE :: buf
44 | !DEC$ attributes REFERENCE :: len
45 | integer idx
46 | integer buf_len
47 | integer len
48 | integer ierr
49 | @FORTRAN_STR_DECL@
50 |
51 | @FORTRAN_GETARG@
52 |
53 | end
54 |
55 | c
56 | c
57 | c
58 | c
59 | c Copyright (c) 2006, The Regents of the University of California.
60 | c Produced at the Lawrence Livermore National Laboratory
61 | c Written by Jeffery Vetter and Christopher Chambreau.
62 | c UCRL-CODE-223450.
63 | c All rights reserved.
64 | c
65 | c This file is part of mpiP. For details, see http://llnl.github.io/mpiP.
66 | c
67 | c Redistribution and use in source and binary forms, with or without
68 | c modification, are permitted provided that the following conditions are
69 | c met:
70 | c
71 | c * Redistributions of source code must retain the above copyright
72 | c notice, this list of conditions and the disclaimer below.
73 | c
74 | c * Redistributions in binary form must reproduce the above copyright
75 | c notice, this list of conditions and the disclaimer (as noted below) in
76 | c the documentation and/or other materials provided with the
77 | c distribution.
78 | c
79 | c * Neither the name of the UC/LLNL nor the names of its contributors
80 | c may be used to endorse or promote products derived from this software
81 | c without specific prior written permission.
82 | c
83 | c THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
84 | c "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
85 | c LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
86 | c A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OF
87 | c THE UNIVERSITY OF CALIFORNIA, THE U.S. DEPARTMENT OF ENERGY OR
88 | c CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
89 | c EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
90 | c PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
91 | c PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
92 | c LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
93 | c NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
94 | c SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
95 | c
96 | c
97 | c Additional BSD Notice
98 | c
99 | c 1. This notice is required to be provided under our contract with the
100 | c U.S. Department of Energy (DOE). This work was produced at the
101 | c University of California, Lawrence Livermore National Laboratory under
102 | c Contract No. W-7405-ENG-48 with the DOE.
103 | c
104 | c 2. Neither the United States Government nor the University of
105 | c California nor any of their employees, makes any warranty, express or
106 | c implied, or assumes any liability or responsibility for the accuracy,
107 | c completeness, or usefulness of any information, apparatus, product, or
108 | c process disclosed, or represents that its use would not infringe
109 | c privately-owned rights.
110 | c
111 | c 3. Also, reference herein to any specific commercial products,
112 | c process, or services by trade name, trademark, manufacturer or
113 | c otherwise does not necessarily constitute or imply its endorsement,
114 | c recommendation, or favoring by the United States Government or the
115 | c University of California. The views and opinions of authors expressed
116 | c herein do not necessarily state or reflect those of the United States
117 | c Government or the University of California, and shall not be used for
118 | c advertising or product endorsement purposes.
119 | c
120 | c
121 | c
122 | c
123 | c --- EOF
124 |
--------------------------------------------------------------------------------
/get_fortran_arg_pxf.f:
--------------------------------------------------------------------------------
1 | ! -*- Fortran -*-
2 | !
3 | ! mpiP MPI Profiler ( http://llnl.github.io/mpiP )
4 | !
5 | ! Please see COPYRIGHT AND LICENSE information at the end of this file.
6 | !
7 | ! -----
8 | !
9 | ! get_fortran_arg_pxf.f -- access fortran command line arguments
10 | !
11 | ! $Id$
12 | !
13 |
14 | subroutine mpipi_get_fortran_argc(argc_val)
15 | integer argc_val
16 |
17 | argc_val = IPXFARGC()
18 |
19 | end subroutine mpipi_get_fortran_argc
20 |
21 |
22 | subroutine mpipi_get_fortran_arg(idx, buf_len, buf, len)
23 | integer idx
24 | integer buf_len
25 | character (buf_len) buf
26 | integer len
27 | integer ierr
28 |
29 | call PXFGETARG(idx, buf, len, ierr)
30 |
31 | end subroutine mpipi_get_fortran_arg
32 |
33 |
34 | c
35 | c
36 | c
37 | c
38 | c Copyright (c) 2006, The Regents of the University of California.
39 | c Produced at the Lawrence Livermore National Laboratory
40 | c Written by Jeffery Vetter and Christopher Chambreau.
41 | c UCRL-CODE-223450.
42 | c All rights reserved.
43 | c
44 | c This file is part of mpiP. For details, see http://llnl.github.io/mpiP.
45 | c
46 | c Redistribution and use in source and binary forms, with or without
47 | c modification, are permitted provided that the following conditions are
48 | c met:
49 | c
50 | c * Redistributions of source code must retain the above copyright
51 | c notice, this list of conditions and the disclaimer below.
52 | c
53 | c * Redistributions in binary form must reproduce the above copyright
54 | c notice, this list of conditions and the disclaimer (as noted below) in
55 | c the documentation and/or other materials provided with the
56 | c distribution.
57 | c
58 | c * Neither the name of the UC/LLNL nor the names of its contributors
59 | c may be used to endorse or promote products derived from this software
60 | c without specific prior written permission.
61 | c
62 | c THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
63 | c "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
64 | c LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
65 | c A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OF
66 | c THE UNIVERSITY OF CALIFORNIA, THE U.S. DEPARTMENT OF ENERGY OR
67 | c CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
68 | c EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
69 | c PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
70 | c PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
71 | c LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
72 | c NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
73 | c SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
74 | c
75 | c
76 | c Additional BSD Notice
77 | c
78 | c 1. This notice is required to be provided under our contract with the
79 | c U.S. Department of Energy (DOE). This work was produced at the
80 | c University of California, Lawrence Livermore National Laboratory under
81 | c Contract No. W-7405-ENG-48 with the DOE.
82 | c
83 | c 2. Neither the United States Government nor the University of
84 | c California nor any of their employees, makes any warranty, express or
85 | c implied, or assumes any liability or responsibility for the accuracy,
86 | c completeness, or usefulness of any information, apparatus, product, or
87 | c process disclosed, or represents that its use would not infringe
88 | c privately-owned rights.
89 | c
90 | c 3. Also, reference herein to any specific commercial products,
91 | c process, or services by trade name, trademark, manufacturer or
92 | c otherwise does not necessarily constitute or imply its endorsement,
93 | c recommendation, or favoring by the United States Government or the
94 | c University of California. The views and opinions of authors expressed
95 | c herein do not necessarily state or reflect those of the United States
96 | c Government or the University of California, and shall not be used for
97 | c advertising or product endorsement purposes.
98 | c
99 | c
100 | c
101 | c
102 | c --- EOF
103 |
--------------------------------------------------------------------------------
/glob.c:
--------------------------------------------------------------------------------
1 | /* -*- C -*-
2 |
3 | mpiP MPI Profiler ( http://llnl.github.io/mpiP )
4 |
5 | Please see COPYRIGHT AND LICENSE information at the end of this file.
6 |
7 | -----
8 |
9 | glob.c -- globals vars
10 |
11 | */
12 |
13 | #ifndef lint
14 | static char *svnid = "$Id$";
15 | #endif
16 |
17 | #include "mpiPi.h"
18 |
19 | mpiPi_t mpiPi;
20 |
21 | int mpiPi_debug = 0;
22 |
23 | int mpiPi_vmajor = 3;
24 | int mpiPi_vminor = 5;
25 | int mpiPi_vpatch = 0;
26 | char *mpiPi_vdate = __DATE__;
27 | char *mpiPi_vtime = __TIME__;
28 |
29 |
30 | /*
31 |
32 |
33 |
34 | Copyright (c) 2006, The Regents of the University of California.
35 | Produced at the Lawrence Livermore National Laboratory
36 | Written by Jeffery Vetter and Christopher Chambreau.
37 | UCRL-CODE-223450.
38 | All rights reserved.
39 |
40 | This file is part of mpiP. For details, see http://llnl.github.io/mpiP.
41 |
42 | Redistribution and use in source and binary forms, with or without
43 | modification, are permitted provided that the following conditions are
44 | met:
45 |
46 | * Redistributions of source code must retain the above copyright
47 | notice, this list of conditions and the disclaimer below.
48 |
49 | * Redistributions in binary form must reproduce the above copyright
50 | notice, this list of conditions and the disclaimer (as noted below) in
51 | the documentation and/or other materials provided with the
52 | distribution.
53 |
54 | * Neither the name of the UC/LLNL nor the names of its contributors
55 | may be used to endorse or promote products derived from this software
56 | without specific prior written permission.
57 |
58 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
59 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
60 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
61 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OF
62 | THE UNIVERSITY OF CALIFORNIA, THE U.S. DEPARTMENT OF ENERGY OR
63 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
64 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
65 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
66 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
67 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
68 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
69 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
70 |
71 |
72 | Additional BSD Notice
73 |
74 | 1. This notice is required to be provided under our contract with the
75 | U.S. Department of Energy (DOE). This work was produced at the
76 | University of California, Lawrence Livermore National Laboratory under
77 | Contract No. W-7405-ENG-48 with the DOE.
78 |
79 | 2. Neither the United States Government nor the University of
80 | California nor any of their employees, makes any warranty, express or
81 | implied, or assumes any liability or responsibility for the accuracy,
82 | completeness, or usefulness of any information, apparatus, product, or
83 | process disclosed, or represents that its use would not infringe
84 | privately-owned rights.
85 |
86 | 3. Also, reference herein to any specific commercial products,
87 | process, or services by trade name, trademark, manufacturer or
88 | otherwise does not necessarily constitute or imply its endorsement,
89 | recommendation, or favoring by the United States Government or the
90 | University of California. The views and opinions of authors expressed
91 | herein do not necessarily state or reflect those of the United States
92 | Government or the University of California, and shall not be used for
93 | advertising or product endorsement purposes.
94 |
95 |
96 |
97 | */
98 |
99 |
100 | /* eof */
101 |
--------------------------------------------------------------------------------
/hash_proto.h:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | mpiP MPI Profiler ( http://llnl.github.io/mpiP )
4 |
5 | Please see COPYRIGHT AND LICENSE information at the end of this file.
6 |
7 | -----
8 |
9 | hash_proto.h
10 |
11 | $Id$
12 | */
13 |
14 | #ifndef __CEXTRACT__
15 | #if __STDC__
16 |
17 | extern h_t *h_open (int size, h_HashFunct hf, h_Comparator hc);
18 | extern void h_close (h_t * ht);
19 | extern int h_count (h_t * ht);
20 | extern int h_insert (h_t * ht, void *ptr);
21 | extern void *h_search (h_t * ht, void *key, void **ptr);
22 | extern void *h_delete (h_t * ht, void *key, void **ptr);
23 | extern int h_gather_data (h_t * ht, int *ac, void ***ptr);
24 | extern int h_drain (h_t * ht, int *ac, void ***ptr);
25 |
26 | #else /* __STDC__ */
27 |
28 | extern h_t *h_open ( /* int size, h_HashFunct hf, h_Comparator hc */ );
29 | extern void h_close ( /* h_t * ht */ );
30 | extern int h_count ( /* h_t * ht */ );
31 | extern int h_insert ( /* h_t * ht, void *ptr */ );
32 | extern void *h_search ( /* h_t * ht, void *key, void **ptr */ );
33 | extern void *h_delete ( /* h_t * ht, void *key, void **ptr */ );
34 | extern int h_gather_data ( /* h_t * ht, int *ac, void ***ptr */ );
35 | extern int h_drain ( /* h_t * ht, int *ac, void ***ptr */ );
36 |
37 | #endif /* __STDC__ */
38 | #endif /* __CEXTRACT__ */
39 |
40 | /*
41 |
42 |
43 |
44 | Copyright (c) 2006, The Regents of the University of California.
45 | Produced at the Lawrence Livermore National Laboratory
46 | Written by Jeffery Vetter and Christopher Chambreau.
47 | UCRL-CODE-223450.
48 | All rights reserved.
49 |
50 | This file is part of mpiP. For details, see http://llnl.github.io/mpiP.
51 |
52 | Redistribution and use in source and binary forms, with or without
53 | modification, are permitted provided that the following conditions are
54 | met:
55 |
56 | * Redistributions of source code must retain the above copyright
57 | notice, this list of conditions and the disclaimer below.
58 |
59 | * Redistributions in binary form must reproduce the above copyright
60 | notice, this list of conditions and the disclaimer (as noted below) in
61 | the documentation and/or other materials provided with the
62 | distribution.
63 |
64 | * Neither the name of the UC/LLNL nor the names of its contributors
65 | may be used to endorse or promote products derived from this software
66 | without specific prior written permission.
67 |
68 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
69 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
70 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
71 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OF
72 | THE UNIVERSITY OF CALIFORNIA, THE U.S. DEPARTMENT OF ENERGY OR
73 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
74 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
75 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
76 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
77 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
78 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
79 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
80 |
81 |
82 | Additional BSD Notice
83 |
84 | 1. This notice is required to be provided under our contract with the
85 | U.S. Department of Energy (DOE). This work was produced at the
86 | University of California, Lawrence Livermore National Laboratory under
87 | Contract No. W-7405-ENG-48 with the DOE.
88 |
89 | 2. Neither the United States Government nor the University of
90 | California nor any of their employees, makes any warranty, express or
91 | implied, or assumes any liability or responsibility for the accuracy,
92 | completeness, or usefulness of any information, apparatus, product, or
93 | process disclosed, or represents that its use would not infringe
94 | privately-owned rights.
95 |
96 | 3. Also, reference herein to any specific commercial products,
97 | process, or services by trade name, trademark, manufacturer or
98 | otherwise does not necessarily constitute or imply its endorsement,
99 | recommendation, or favoring by the United States Government or the
100 | University of California. The views and opinions of authors expressed
101 | herein do not necessarily state or reflect those of the United States
102 | Government or the University of California, and shall not be used for
103 | advertising or product endorsement purposes.
104 |
105 |
106 |
107 | */
108 |
--------------------------------------------------------------------------------
/mpi.io.protos.txt:
--------------------------------------------------------------------------------
1 | @@@ MPI I/O Routines
2 | int MPI_File_close (MPI_File *fh)
3 |
4 | int MPI_File_open (MPI_Comm comm, mpip_const_char_t *filename, int amode, MPI_Info info, MPI_File *fh)
5 |
6 | int MPI_File_delete (mpip_const_char_t *filename, MPI_Info info)
7 |
8 | int MPI_File_preallocate (MPI_File fh, MPI_Offset size)
9 |
10 | int MPI_File_set_size (MPI_File fh, MPI_Offset size)
11 |
12 | int MPI_File_get_size (MPI_File fh, MPI_Offset *size)
13 |
14 | int MPI_File_get_group (MPI_File fh, MPI_Group *group)
15 |
16 | int MPI_File_get_amode (MPI_File fh, int *amode)
17 |
18 | int MPI_File_set_info (MPI_File fh, MPI_Info info)
19 |
20 | int MPI_File_get_info (MPI_File fh, MPI_Info *info)
21 |
22 | int MPI_File_read (MPI_File fh, void *buf, int count, MPI_Datatype datatype, MPI_Status *status)
23 |
24 | int MPI_File_read_all (MPI_File fh, void *buf, int count, MPI_Datatype datatype, MPI_Status *status)
25 |
26 | int MPI_File_read_at_all (MPI_File fh, MPI_Offset offset, void *buf, int count, MPI_Datatype datatype, MPI_Status *status)
27 |
28 | int MPI_File_read_at (MPI_File fh, MPI_Offset offset, void *buf, int count, MPI_Datatype datatype, MPI_Status *status)
29 |
30 | int MPI_File_seek (MPI_File fh, MPI_Offset offset, int whence)
31 |
32 | int MPI_File_set_view (MPI_File fh, MPI_Offset disp, MPI_Datatype etype, MPI_Datatype filetype, mpip_const_char_t *datarep, MPI_Info info)
33 |
34 | int MPI_File_get_view (MPI_File fh, MPI_Offset *disp, MPI_Datatype *etype, MPI_Datatype *filetype, char *datarep)
35 |
36 | int MPI_File_write (MPI_File fh, mpip_const_void_t *buf, int count, MPI_Datatype datatype, MPI_Status *status)
37 |
38 | int MPI_File_write_all (MPI_File fh, mpip_const_void_t *buf, int count, MPI_Datatype datatype, MPI_Status *status)
39 |
40 | int MPI_File_write_at (MPI_File fh, MPI_Offset offset, mpip_const_void_t *buf, int count, MPI_Datatype datatype, MPI_Status *status)
41 |
42 | int MPI_File_write_at_all (MPI_File fh, MPI_Offset offset, mpip_const_void_t *buf, int count, MPI_Datatype datatype, MPI_Status *status)
43 |
44 | int MPI_File_get_position (MPI_File fh, MPI_Offset *offset)
45 |
46 | int MPI_File_get_byte_offset (MPI_File fh, MPI_Offset offset, MPI_Offset *disp)
47 |
48 | int MPI_File_sync (MPI_File fh)
49 |
--------------------------------------------------------------------------------
/mpi.nbc.protos.txt:
--------------------------------------------------------------------------------
1 | @@@ MPI Non-blocking collective functions
2 |
3 | int MPI_Iallgather ( const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount, MPI_Datatype recvtype, MPI_Comm comm, MPI_Request *request )
4 |
5 | int MPI_Iallgatherv ( const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, mpip_const_int_t recvcounts[], mpip_const_int_t displs[], MPI_Datatype recvtype, MPI_Comm comm, MPI_Request* request )
6 |
7 | int MPI_Iallreduce ( const void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, MPI_Request *request )
8 |
9 | int MPI_Ialltoall ( const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount, MPI_Datatype recvtype, MPI_Comm comm, MPI_Request *request )
10 |
11 | int MPI_Ialltoallv ( const void* sendbuf, mpip_const_int_t sendcounts[], mpip_const_int_t sdispls[], MPI_Datatype sendtype, void* recvbuf, mpip_const_int_t recvcounts[], mpip_const_int_t rdispls[], MPI_Datatype recvtype, MPI_Comm comm, MPI_Request *request )
12 |
13 | int MPI_Ialltoallw ( const void* sendbuf, mpip_const_int_t sendcounts[], mpip_const_int_t sdispls[], mpip_const_datatype_t sendtypes[], void* recvbuf, mpip_const_int_t recvcounts[], mpip_const_int_t rdispls[], mpip_const_datatype_t recvtypes[], MPI_Comm comm, MPI_Request *request )
14 |
15 | int MPI_Ibarrier ( MPI_Comm comm, MPI_Request *request )
16 |
17 | int MPI_Ibcast ( void* buffer, int count, MPI_Datatype datatype, int root, MPI_Comm comm, MPI_Request *request )
18 |
19 | int MPI_Iexscan ( const void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, MPI_Request *request )
20 |
21 | int MPI_Igather ( const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm, MPI_Request *request)
22 |
23 | int MPI_Igatherv ( const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, mpip_const_int_t recvcounts[], mpip_const_int_t displs[], MPI_Datatype recvtype, int root, MPI_Comm comm, MPI_Request *request )
24 |
25 | int MPI_Ireduce ( const void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm, MPI_Request *request )
26 |
27 | int MPI_Ireduce_scatter_block ( const void* sendbuf, void* recvbuf, int recvcount, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, MPI_Request *request )
28 |
29 | int MPI_Ireduce_scatter ( const void* sendbuf, void* recvbuf, mpip_const_int_t recvcounts[], MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, MPI_Request *request )
30 |
31 | int MPI_Iscan ( const void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, MPI_Request *request )
32 |
33 | int MPI_Iscatter ( const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm, MPI_Request *request )
34 |
35 | int MPI_Iscatterv ( const void* sendbuf, mpip_const_int_t sendcounts[], mpip_const_int_t displs[], MPI_Datatype sendtype, void* recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm, MPI_Request *request )
36 |
--------------------------------------------------------------------------------
/mpi.rma.protos.txt:
--------------------------------------------------------------------------------
1 | @@@ MPI RMA functions
2 |
3 | int MPI_Accumulate ( mpip_const_void_t *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 )
4 |
5 | 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 )
6 |
7 | int MPI_Put ( mpip_const_void_t *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 )
8 |
9 | int MPI_Win_complete ( MPI_Win win )
10 |
11 | int MPI_Win_create ( void *base, MPI_Aint size, int disp_unit, MPI_Info info, MPI_Comm comm, MPI_Win *win )
12 |
13 | int MPI_Win_fence ( int assert, MPI_Win win )
14 |
15 | int MPI_Win_free ( MPI_Win *win )
16 |
17 | int MPI_Win_get_group ( MPI_Win win, MPI_Group *group )
18 |
19 | int MPI_Win_lock ( int lock_type, int rank, int assert, MPI_Win win )
20 |
21 | int MPI_Win_post ( MPI_Group group, int assert, MPI_Win win )
22 |
23 | int MPI_Win_start ( MPI_Group group, int assert, MPI_Win win )
24 |
25 | int MPI_Win_test ( MPI_Win win, int *flag)
26 |
27 | int MPI_Win_unlock ( int rank, MPI_Win win )
28 |
29 | int MPI_Win_wait ( MPI_Win win )
30 |
31 | int MPI_Win_allocate ( MPI_Aint size, int disp_unit, MPI_Info info, MPI_Comm comm, void *baseptr, MPI_Win *win )
32 |
33 | int MPI_Win_allocate_shared ( MPI_Aint size, int disp_unit, MPI_Info info, MPI_Comm comm, void *baseptr, MPI_Win *win )
34 |
35 | int MPI_Win_shared_query ( MPI_Win win, int rank, MPI_Aint *size, int *disp_unit, void *baseptr)
36 |
37 | int MPI_Win_create_dynamic ( MPI_Info info, MPI_Comm comm, MPI_Win *win )
38 |
39 | int MPI_Get_accumulate ( mpip_const_void_t *origin_addr, int origin_count, MPI_Datatype origin_datatype, void *result_addr, int result_count, MPI_Datatype result_datatype, int target_rank, MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Op op, MPI_Win win )
40 |
41 | int MPI_Fetch_and_op ( mpip_const_void_t *origin_addr, void *result_addr, MPI_Datatype datatype, int target_rank, MPI_Aint target_disp, MPI_Op op, MPI_Win win )
42 |
43 | int MPI_Compare_and_swap ( mpip_const_void_t *origin_addr, mpip_const_void_t *compare_addr, void *result_addr, MPI_Datatype datatype, int target_rank, MPI_Aint target_disp, MPI_Win win )
44 |
45 | int MPI_Rput ( mpip_const_void_t *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, MPI_Request *request )
46 |
47 | int MPI_Rget ( 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, MPI_Request *request )
48 |
49 | int MPI_Raccumulate ( mpip_const_void_t *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, MPI_Request *request )
50 |
51 | int MPI_Rget_accumulate ( mpip_const_void_t *origin_addr, int origin_count, MPI_Datatype origin_datatype, void *result_addr, int result_count, MPI_Datatype result_datatype, int target_rank, MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Op op, MPI_Win win, MPI_Request *request )
52 |
53 | int MPI_Win_lock_all ( int assert, MPI_Win win )
54 |
55 | int MPI_Win_unlock_all ( MPI_Win win )
56 |
57 | int MPI_Win_flush ( int rank, MPI_Win win )
58 |
59 | int MPI_Win_flush_all ( MPI_Win win )
60 |
61 | int MPI_Win_flush_local ( int rank, MPI_Win win )
62 |
63 | int MPI_Win_flush_local_all ( MPI_Win win )
64 |
65 | int MPI_Win_sync ( MPI_Win win )
66 |
67 | int MPI_Win_attach ( MPI_Win win, void *base, MPI_Aint size )
68 |
69 | int MPI_Win_detach ( MPI_Win win, mpip_const_void_t *base )
70 |
71 | int MPI_Win_set_info ( MPI_Win win, MPI_Info info )
72 |
73 | int MPI_Win_get_info ( MPI_Win win, MPI_Info *info_used )
74 |
--------------------------------------------------------------------------------
/mpiP-API.h:
--------------------------------------------------------------------------------
1 | /* -*- C -*-
2 |
3 | mpiP MPI Profiler ( http://llnl.github.io/mpiP )
4 |
5 | Please see COPYRIGHT AND LICENSE information at the end of this file.
6 |
7 | -----
8 |
9 | mpiP-API.h -- include file for mpiP functionality API
10 |
11 | $Id$
12 |
13 | */
14 |
15 | /*
16 | For stack tracing and address lookup, use the following functions.
17 | mpiP_record_traceback may be called at any time.
18 | mpiP_find_src_loc must be called after a successful call to
19 | mpiP_open_executable and prior to mpiP_close_executable.
20 | */
21 |
22 | #include "mpip_timers.h"
23 |
24 | #ifndef __CEXTRACT__
25 | #if __STDC__
26 |
27 | extern void mpiP_init_api (void);
28 | extern int mpiP_record_traceback (void *pc_array[], int max_stack);
29 | extern int mpiP_open_executable (char *filename);
30 | extern void mpiP_close_executable (void);
31 | extern mpiP_TIMER mpiP_gettime (void);
32 | extern char *mpiP_get_executable_name (void);
33 | extern int mpiP_find_src_loc (void *i_addr_hex, char **o_file_str,
34 | int *o_lineno, char **o_funct_str);
35 | extern char *mpiP_format_address (void *pval, char *addr_buf);
36 |
37 | #else /* __STDC__ */
38 |
39 | extern void mpiP_init_api ( /* void */ );
40 | extern int mpiP_record_traceback ( /* void* pc_array[], int max_stack */ );
41 | extern int mpiP_open_executable ( /* char* filename */ );
42 | extern void mpiP_close_executable ( /* void */ );
43 | extern mpiP_TIMER mpiP_gettime ( /* void */ );
44 | extern char *mpiP_get_executable_name ( /* void */ );
45 | extern int mpiP_find_src_loc ( /* void */ );
46 | extern char *mpiP_format_address ( /*void* pval*, char* addr_buf */ );
47 | #endif /* __STDC__ */
48 | #endif /* __CEXTRACT__ */
49 |
50 | /*
51 |
52 |
53 |
54 | Copyright (c) 2006, The Regents of the University of California.
55 | Produced at the Lawrence Livermore National Laboratory
56 | Written by Jeffery Vetter and Christopher Chambreau.
57 | UCRL-CODE-223450.
58 | All rights reserved.
59 |
60 | This file is part of mpiP. For details, see http://llnl.github.io/mpiP.
61 |
62 | Redistribution and use in source and binary forms, with or without
63 | modification, are permitted provided that the following conditions are
64 | met:
65 |
66 | * Redistributions of source code must retain the above copyright
67 | notice, this list of conditions and the disclaimer below.
68 |
69 | * Redistributions in binary form must reproduce the above copyright
70 | notice, this list of conditions and the disclaimer (as noted below) in
71 | the documentation and/or other materials provided with the
72 | distribution.
73 |
74 | * Neither the name of the UC/LLNL nor the names of its contributors
75 | may be used to endorse or promote products derived from this software
76 | without specific prior written permission.
77 |
78 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
79 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
80 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
81 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OF
82 | THE UNIVERSITY OF CALIFORNIA, THE U.S. DEPARTMENT OF ENERGY OR
83 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
84 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
85 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
86 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
87 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
88 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
89 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
90 |
91 |
92 | Additional BSD Notice
93 |
94 | 1. This notice is required to be provided under our contract with the
95 | U.S. Department of Energy (DOE). This work was produced at the
96 | University of California, Lawrence Livermore National Laboratory under
97 | Contract No. W-7405-ENG-48 with the DOE.
98 |
99 | 2. Neither the United States Government nor the University of
100 | California nor any of their employees, makes any warranty, express or
101 | implied, or assumes any liability or responsibility for the accuracy,
102 | completeness, or usefulness of any information, apparatus, product, or
103 | process disclosed, or represents that its use would not infringe
104 | privately-owned rights.
105 |
106 | 3. Also, reference herein to any specific commercial products,
107 | process, or services by trade name, trademark, manufacturer or
108 | otherwise does not necessarily constitute or imply its endorsement,
109 | recommendation, or favoring by the United States Government or the
110 | University of California. The views and opinions of authors expressed
111 | herein do not necessarily state or reflect those of the United States
112 | Government or the University of California, and shall not be used for
113 | advertising or product endorsement purposes.
114 |
115 |
116 |
117 | */
118 |
--------------------------------------------------------------------------------
/mpiP-callsites.h:
--------------------------------------------------------------------------------
1 | /* -*- C -*-
2 |
3 | mpiP MPI Profiler ( http://llnl.github.io/mpiP )
4 |
5 | Please see COPYRIGHT AND LICENSE information at the end of this file.
6 |
7 | -----
8 |
9 | hash.h -- generic hash table
10 |
11 | $Id$
12 |
13 | */
14 |
15 | #ifndef MPIPCALLSITES_H
16 | #define MPIPCALLSITES_H
17 |
18 | #include "mpiPconfig.h"
19 |
20 | /* Callsite statistics */
21 | typedef struct _callsite_stats
22 | {
23 | unsigned op;
24 | unsigned rank;
25 | int csid;
26 | long long count;
27 | double cumulativeTime;
28 | double cumulativeTimeSquared;
29 | double maxDur;
30 | double minDur;
31 | double maxDataSent;
32 | double minDataSent;
33 | double maxIO;
34 | double minIO;
35 | double maxRMA;
36 | double minRMA;
37 | double cumulativeDataSent;
38 | double cumulativeIO;
39 | double cumulativeRMA;
40 | long long arbitraryMessageCount;
41 | double *siteData;
42 | int siteDataIdx;
43 | void *pc[MPIP_CALLSITE_STACK_DEPTH_MAX];
44 | char *filename[MPIP_CALLSITE_STACK_DEPTH_MAX];
45 | char *functname[MPIP_CALLSITE_STACK_DEPTH_MAX];
46 | int lineno[MPIP_CALLSITE_STACK_DEPTH_MAX];
47 | long cookie;
48 | } callsite_stats_t;
49 |
50 |
51 | /*
52 | * Simple callsite structure management routines
53 | */
54 | void mpiPi_cs_init(callsite_stats_t *csp, void *pc[],
55 | unsigned op, unsigned rank);
56 | void mpiPi_cs_reset_stat(callsite_stats_t *csp);
57 | void mpiPi_cs_merge(callsite_stats_t *dst, callsite_stats_t *src);
58 | void mpiPi_cs_update(callsite_stats_t *csp, double dur,
59 | double sendSize, double ioSize, double rmaSize,
60 | double threshold);
61 |
62 | /*
63 | * Callsite caching
64 | */
65 | void mpiPi_cs_cache_init();
66 | /* Translate callstats record (the pc) to src file, line and assign a
67 | * callsite id.
68 | */
69 | int mpiPi_query_src (callsite_stats_t * p);
70 |
71 | #endif // MPIPCALLSITES_H
72 |
73 | /*
74 |
75 |
76 |
77 | Copyright (c) 2006, The Regents of the University of California.
78 | Produced at the Lawrence Livermore National Laboratory
79 | Written by Jeffery Vetter and Christopher Chambreau.
80 | UCRL-CODE-223450.
81 | All rights reserved.
82 |
83 | Copyright (c) 2019, Mellanox Technologies Inc.
84 | Written by Artem Polyakov
85 | All rights reserved.
86 |
87 |
88 | This file is part of mpiP. For details, see http://llnl.github.io/mpiP.
89 |
90 | Redistribution and use in source and binary forms, with or without
91 | modification, are permitted provided that the following conditions are
92 | met:
93 |
94 | * Redistributions of source code must retain the above copyright
95 | notice, this list of conditions and the disclaimer below.
96 |
97 | * Redistributions in binary form must reproduce the above copyright
98 | notice, this list of conditions and the disclaimer (as noted below) in
99 | the documentation and/or other materials provided with the
100 | distribution.
101 |
102 | * Neither the name of the UC/LLNL nor the names of its contributors
103 | may be used to endorse or promote products derived from this software
104 | without specific prior written permission.
105 |
106 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
107 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
108 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
109 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OF
110 | THE UNIVERSITY OF CALIFORNIA, THE U.S. DEPARTMENT OF ENERGY OR
111 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
112 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
113 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
114 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
115 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
116 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
117 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
118 |
119 |
120 | Additional BSD Notice
121 |
122 | 1. This notice is required to be provided under our contract with the
123 | U.S. Department of Energy (DOE). This work was produced at the
124 | University of California, Lawrence Livermore National Laboratory under
125 | Contract No. W-7405-ENG-48 with the DOE.
126 |
127 | 2. Neither the United States Government nor the University of
128 | California nor any of their employees, makes any warranty, express or
129 | implied, or assumes any liability or responsibility for the accuracy,
130 | completeness, or usefulness of any information, apparatus, product, or
131 | process disclosed, or represents that its use would not infringe
132 | privately-owned rights.
133 |
134 | 3. Also, reference herein to any specific commercial products,
135 | process, or services by trade name, trademark, manufacturer or
136 | otherwise does not necessarily constitute or imply its endorsement,
137 | recommendation, or favoring by the United States Government or the
138 | University of California. The views and opinions of authors expressed
139 | herein do not necessarily state or reflect those of the United States
140 | Government or the University of California, and shall not be used for
141 | advertising or product endorsement purposes.
142 |
143 |
144 |
145 | */
146 |
147 | /* EOF */
148 |
--------------------------------------------------------------------------------
/mpiP-hash.h:
--------------------------------------------------------------------------------
1 | /* -*- C -*-
2 |
3 | mpiP MPI Profiler ( http://llnl.github.io/mpiP )
4 |
5 | Please see COPYRIGHT AND LICENSE information at the end of this file.
6 |
7 | -----
8 |
9 | hash.h -- generic hash table
10 |
11 | $Id$
12 |
13 | */
14 |
15 | #ifndef _HASH_H
16 | #define _HASH_H
17 |
18 | typedef int (*h_HashFunct) (const void *);
19 | typedef int (*h_Comparator) (const void *, const void *);
20 |
21 | typedef struct _h_entry_t
22 | {
23 | void *ptr;
24 | struct _h_entry_t *next;
25 | }
26 | h_entry_t;
27 |
28 | typedef struct _h_t
29 | {
30 | int size;
31 | int count;
32 | h_HashFunct hf; /* given an element compute the hash number */
33 | h_Comparator hc; /* given two elements, do they match? 0 for yes */
34 | h_entry_t **table; /* table[size] of pointers to lists of entries */
35 | }
36 | h_t;
37 |
38 | #include "hash_proto.h"
39 |
40 | #endif
41 |
42 | /*
43 |
44 |
45 |
46 | Copyright (c) 2006, The Regents of the University of California.
47 | Produced at the Lawrence Livermore National Laboratory
48 | Written by Jeffery Vetter and Christopher Chambreau.
49 | UCRL-CODE-223450.
50 | All rights reserved.
51 |
52 | This file is part of mpiP. For details, see http://llnl.github.io/mpiP.
53 |
54 | Redistribution and use in source and binary forms, with or without
55 | modification, are permitted provided that the following conditions are
56 | met:
57 |
58 | * Redistributions of source code must retain the above copyright
59 | notice, this list of conditions and the disclaimer below.
60 |
61 | * Redistributions in binary form must reproduce the above copyright
62 | notice, this list of conditions and the disclaimer (as noted below) in
63 | the documentation and/or other materials provided with the
64 | distribution.
65 |
66 | * Neither the name of the UC/LLNL nor the names of its contributors
67 | may be used to endorse or promote products derived from this software
68 | without specific prior written permission.
69 |
70 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
71 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
72 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
73 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OF
74 | THE UNIVERSITY OF CALIFORNIA, THE U.S. DEPARTMENT OF ENERGY OR
75 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
76 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
77 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
78 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
79 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
80 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
81 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
82 |
83 |
84 | Additional BSD Notice
85 |
86 | 1. This notice is required to be provided under our contract with the
87 | U.S. Department of Energy (DOE). This work was produced at the
88 | University of California, Lawrence Livermore National Laboratory under
89 | Contract No. W-7405-ENG-48 with the DOE.
90 |
91 | 2. Neither the United States Government nor the University of
92 | California nor any of their employees, makes any warranty, express or
93 | implied, or assumes any liability or responsibility for the accuracy,
94 | completeness, or usefulness of any information, apparatus, product, or
95 | process disclosed, or represents that its use would not infringe
96 | privately-owned rights.
97 |
98 | 3. Also, reference herein to any specific commercial products,
99 | process, or services by trade name, trademark, manufacturer or
100 | otherwise does not necessarily constitute or imply its endorsement,
101 | recommendation, or favoring by the United States Government or the
102 | University of California. The views and opinions of authors expressed
103 | herein do not necessarily state or reflect those of the United States
104 | Government or the University of California, and shall not be used for
105 | advertising or product endorsement purposes.
106 |
107 |
108 |
109 | */
110 |
111 | /* EOF */
112 |
--------------------------------------------------------------------------------
/mpiP-tslist.h:
--------------------------------------------------------------------------------
1 | /* -*- C -*-
2 |
3 | mpiP MPI Profiler ( http://llnl.github.io/mpiP )
4 |
5 | Please see COPYRIGHT AND LICENSE information at the end of this file.
6 |
7 | -----
8 |
9 | thread_safe_list.h -- Implementation of the thread-safe list based on atomics
10 | NOTE: only one thread is allowed to extract elements, but many can contribute.
11 | This fits perfectly fine with the purpose of holding TLS pointers in mpiP.
12 |
13 | */
14 |
15 | #ifndef THREAD_SAFE_LIST_H
16 | #define THREAD_SAFE_LIST_H
17 |
18 | #include "arch/arch.h"
19 |
20 | typedef struct tslist_elem_s {
21 | void *ptr;
22 | struct tslist_elem_s *next;
23 | } mpiP_tslist_elem_t;
24 |
25 | typedef struct tslist_s {
26 | mpiP_tslist_elem_t *head, *tail;
27 | } mpiP_tslist_t;
28 |
29 | mpiP_tslist_t *mpiPi_tslist_create();
30 | void mpiPi_tslist_release(mpiP_tslist_t *list);
31 | void mpiPi_tslist_append(mpiP_tslist_t *list, void *data_ptr);
32 | void *mpiPi_tslist_dequeue(mpiP_tslist_t *list);
33 | mpiP_tslist_elem_t *mpiPi_tslist_first(mpiP_tslist_t *list);
34 | mpiP_tslist_elem_t *mpiPi_tslist_next(mpiP_tslist_elem_t *current);
35 |
36 | #endif // THREAD_SAFE_LIST_H
37 |
38 | /*
39 |
40 |
41 |
42 | Derived from
43 | https://github.com/artpol84/poc/blob/master/arch/concurrency/thread-safe_list
44 |
45 | Copyright (c) 2019 Mellanox Technologies Ltd.
46 | Written by Artem Polyakov
47 | All rights reserved.
48 |
49 | This file is part of mpiP. For details, see http://llnl.github.io/mpiP.
50 |
51 | Redistribution and use in source and binary forms, with or without
52 | modification, are permitted provided that the following conditions are
53 | met:
54 |
55 | * Redistributions of source code must retain the above copyright
56 | notice, this list of conditions and the disclaimer below.
57 |
58 | * Redistributions in binary form must reproduce the above copyright
59 | notice, this list of conditions and the disclaimer (as noted below) in
60 | the documentation and/or other materials provided with the
61 | distribution.
62 |
63 | * Neither the name of the UC/LLNL nor the names of its contributors
64 | may be used to endorse or promote products derived from this software
65 | without specific prior written permission.
66 |
67 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
68 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
69 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
70 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OF
71 | THE UNIVERSITY OF CALIFORNIA, THE U.S. DEPARTMENT OF ENERGY OR
72 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
73 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
74 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
75 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
76 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
77 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
78 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
79 |
80 |
81 | Additional BSD Notice
82 |
83 | 1. This notice is required to be provided under our contract with the
84 | U.S. Department of Energy (DOE). This work was produced at the
85 | University of California, Lawrence Livermore National Laboratory under
86 | Contract No. W-7405-ENG-48 with the DOE.
87 |
88 | 2. Neither the United States Government nor the University of
89 | California nor any of their employees, makes any warranty, express or
90 | implied, or assumes any liability or responsibility for the accuracy,
91 | completeness, or usefulness of any information, apparatus, product, or
92 | process disclosed, or represents that its use would not infringe
93 | privately-owned rights.
94 |
95 | 3. Also, reference herein to any specific commercial products,
96 | process, or services by trade name, trademark, manufacturer or
97 | otherwise does not necessarily constitute or imply its endorsement,
98 | recommendation, or favoring by the United States Government or the
99 | University of California. The views and opinions of authors expressed
100 | herein do not necessarily state or reflect those of the United States
101 | Government or the University of California, and shall not be used for
102 | advertising or product endorsement purposes.
103 |
104 |
105 |
106 | */
107 |
--------------------------------------------------------------------------------
/mpiPconfig.h.in:
--------------------------------------------------------------------------------
1 | /* mpiPconfig.h.in. Generated from configure.ac by autoheader. */
2 |
3 | /* "Use collective reporting by default" */
4 | #undef COLLECTIVE_REPORT_DEFAULT
5 |
6 | /* The default format of the report */
7 | #undef DEFAULT_REPORT_FORMAT
8 |
9 | /* "Only build API" */
10 | #undef ENABLE_API_ONLY
11 |
12 | /* Enable BFD library for the PC to source lookups */
13 | #undef ENABLE_BFD
14 |
15 | /* Enable weak symbols for FORTRAN */
16 | #undef ENABLE_FORTRAN_WEAK_SYMS
17 |
18 | /* F77 symbols */
19 | #undef F77_SYMBOLS
20 |
21 | /* ARM LSE */
22 | #undef HAVE_ARM_LSE
23 |
24 | /* BFD booleans */
25 | #undef HAVE_BFD_BOOLEAN
26 |
27 | /* BFD get section size */
28 | #undef HAVE_BFD_GET_SECTION_SIZE
29 |
30 | /* BFD macros available before version 2.34 */
31 | #undef HAVE_BFD_GET_SECTION_MACROS
32 |
33 | /* Have demangling */
34 | #undef HAVE_DEMANGLE_H
35 |
36 | /* Define to 1 if you have the header file. */
37 | #undef HAVE_INTTYPES_H
38 |
39 | /* Define to 1 if you have the `m' library (-lm). */
40 | #undef HAVE_LIBM
41 |
42 | /* Have libunwind */
43 | #undef HAVE_LIBUNWIND
44 |
45 | /* Define to 1 if you have the header file. */
46 | #undef HAVE_MEMORY_H
47 |
48 | /* Have MPIR to pointer */
49 | #undef HAVE_MPIR_TOPOINTER
50 |
51 | /* Have MPI-IO */
52 | #undef HAVE_MPI_IO
53 |
54 | /* Have MPI non-blocking collectives */
55 | #undef HAVE_MPI_NONBLOCKINGCOLLECTIVES
56 |
57 | /* Have MPI RMA */
58 | #undef HAVE_MPI_RMA
59 |
60 | /* Define to 1 if you have the header file. */
61 | #undef HAVE_STDINT_H
62 |
63 | /* Define to 1 if you have the header file. */
64 | #undef HAVE_STDLIB_H
65 |
66 | /* Define to 1 if you have the header file. */
67 | #undef HAVE_STRINGS_H
68 |
69 | /* Define to 1 if you have the header file. */
70 | #undef HAVE_STRING_H
71 |
72 | /* Define to 1 if you have the header file. */
73 | #undef HAVE_SYS_STAT_H
74 |
75 | /* Define to 1 if you have the header file. */
76 | #undef HAVE_SYS_TYPES_H
77 |
78 | /* Define to 1 if you have the header file. */
79 | #undef HAVE_UNISTD_H
80 |
81 | /* Stack depth of callsites in report */
82 | #undef MPIP_CALLSITE_REPORT_STACK_DEPTH_MAX
83 |
84 | /* Internal stack frames */
85 | #undef MPIP_INTERNAL_STACK_DEPTH
86 |
87 | /* Recorded stack depth of callsites */
88 | #undef MPIP_CALLSITE_STACK_DEPTH_MAX
89 |
90 | /* MPI check time */
91 | #undef MPIP_CHECK_TIME
92 |
93 | /* Maximum number of command line arguments copied */
94 | #undef MPIP_COPIED_ARGS_MAX
95 |
96 | /* Need Real-time declaration */
97 | #undef NEED_MREAD_REAL_TIME_DECL
98 |
99 | /* Define to the address where bug reports for this package should be sent. */
100 | #undef PACKAGE_BUGREPORT
101 |
102 | /* Define to the full name of this package. */
103 | #undef PACKAGE_NAME
104 |
105 | /* Define to the full name and version of this package. */
106 | #undef PACKAGE_STRING
107 |
108 | /* Define to the one symbol short name of this package. */
109 | #undef PACKAGE_TARNAME
110 |
111 | /* Define to the home page for this package. */
112 | #undef PACKAGE_URL
113 |
114 | /* Define to the version of this package. */
115 | #undef PACKAGE_VERSION
116 |
117 | /* The size of `void*', as computed by sizeof. */
118 | #undef SIZEOF_VOIDP
119 |
120 | /* SO lookup */
121 | #undef SO_LOOKUP
122 |
123 | /* Define to 1 if you have the ANSI C header files. */
124 | #undef STDC_HEADERS
125 |
126 | /* Use backtrace */
127 | #undef USE_BACKTRACE
128 |
129 | /* Use clock_gettime for timing */
130 | #undef USE_CLOCK_GETTIME
131 |
132 | /* Use dlock */
133 | #undef USE_DCLOCK
134 |
135 | /* Use getarg */
136 | #undef USE_GETARG
137 |
138 | /* Use gettimofday */
139 | #undef USE_GETTIMEOFDAY
140 |
141 | /* Use libdwarf */
142 | #undef USE_LIBDWARF
143 |
144 | /* Use MPI v3 constructions */
145 | #undef USE_MPI3_CONSTS
146 |
147 | /* Use read real time */
148 | #undef USE_READ_REAL_TIME
149 |
150 | /* Use RTC */
151 | #undef USE_RTC
152 |
153 | /* Use RTS get timebase */
154 | #undef USE_RTS_GET_TIMEBASE
155 |
156 | /* Use setjmp */
157 | #undef USE_SETJMP
158 |
159 | /* Use MPI_Wtime */
160 | #undef USE_WTIME
161 |
--------------------------------------------------------------------------------
/mpip_timers.h:
--------------------------------------------------------------------------------
1 | /* -*- Mode: C; -*-
2 |
3 | mpiP MPI Profiler ( http://llnl.github.io/mpiP )
4 |
5 | Please see COPYRIGHT AND LICENSE information at the end of this file.
6 |
7 | -----
8 |
9 | mpip_timers.h -- timer macros
10 |
11 | $Id$
12 |
13 | */
14 |
15 | #ifndef _MPITI_TIMERS_H
16 | #define _MPITI_TIMERS_H
17 |
18 | #define MSECS 1000
19 | #define USECS 1000000
20 | #define NSECS 1000000000
21 |
22 | #include
23 | #include
24 | typedef double mpiP_TIMER;
25 |
26 | #if (defined(SunOS) && ! defined(USE_GETTIMEOFDAY))
27 | #include "mpip_timers/sunos_local.h"
28 |
29 | #elif (defined(AIX) && ! defined(USE_GETTIMEOFDAY))
30 | #include "mpip_timers/aix_local.h"
31 |
32 | #elif (defined(UNICOS_mp) && ! defined(USE_GETTIMEOFDAY))
33 | #include "mpip_timers/crayx1_hw.h"
34 |
35 | #elif (defined(Catamount) && defined(USE_DCLOCK))
36 | #include "mpip_timers/crayxt.h"
37 |
38 | #elif defined(USE_RTS_GET_TIMEBASE)
39 | #include "mpip_timers/bgl_local.h"
40 |
41 | #elif (defined(Linux) && defined(USE_CLOCK_GETTIME) && defined(_POSIX_TIMERS) && (_POSIX_TIMERS > 0))
42 | #include "mpip_timers/linux_posix.h"
43 |
44 | #elif defined(USE_WTIME)
45 | #define mpiPi_TIMER double
46 | #define mpiPi_TIME double
47 | #define mpiPi_TIMER_NAME "PMPI_Wtime"
48 | #define mpiPi_GETTIME(timeaddr) (*(timeaddr) = (PMPI_Wtime()*USECS))
49 | #define mpiPi_GETUSECS(timeaddr) (*(timeaddr))
50 | #define mpiPi_GETTIMEDIFF(end,start) ((*end)-(*start))
51 | #else
52 |
53 | /* gettimeofday returns microseconds */
54 | #define mpiPi_TIMER double
55 | #define mpiPi_TIME struct timeval
56 | #define mpiPi_TIMER_NAME "gettimeofday"
57 | #define mpiPi_ASNTIME(lhs,rhs) {bcopy(rhs, lhs, sizeof(mpiPi_TIMER));}
58 | #define mpiPi_GETTIME(timeaddr) gettimeofday(timeaddr,NULL)
59 | #define mpiPi_GETUSECS(timeaddr) (((mpiPi_TIMER)(timeaddr)->tv_sec)*USECS+((mpiPi_TIMER)(timeaddr)->tv_usec))
60 | #define mpiPi_PRINTTIME(taddr) printf("Time is %ld sec and %ld usec.\n", (taddr)->tv_sec, (taddr)->tv_usec)
61 | #define mpiPi_GETTIMEDIFF(end,start) ((mpiP_TIMER)((((mpiPi_TIMER)(end)->tv_sec)*USECS)+(end)->tv_usec)-((((mpiPi_TIMER)(start)->tv_sec)*USECS)+(start)->tv_usec))
62 | #define mpiPi_PRINTTIMEDIFF(end,start) {printf("Time diff is %ld usecs.\n",mpiPi_GETTIMEDIFF(end,start));}
63 |
64 | #endif
65 |
66 | #endif
67 |
68 |
69 | /*
70 |
71 |
72 |
73 | Copyright (c) 2006, The Regents of the University of California.
74 | Produced at the Lawrence Livermore National Laboratory
75 | Written by Jeffery Vetter and Christopher Chambreau.
76 | UCRL-CODE-223450.
77 | All rights reserved.
78 |
79 | This file is part of mpiP. For details, see http://llnl.github.io/mpiP.
80 |
81 | Redistribution and use in source and binary forms, with or without
82 | modification, are permitted provided that the following conditions are
83 | met:
84 |
85 | * Redistributions of source code must retain the above copyright
86 | notice, this list of conditions and the disclaimer below.
87 |
88 | * Redistributions in binary form must reproduce the above copyright
89 | notice, this list of conditions and the disclaimer (as noted below) in
90 | the documentation and/or other materials provided with the
91 | distribution.
92 |
93 | * Neither the name of the UC/LLNL nor the names of its contributors
94 | may be used to endorse or promote products derived from this software
95 | without specific prior written permission.
96 |
97 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
98 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
99 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
100 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OF
101 | THE UNIVERSITY OF CALIFORNIA, THE U.S. DEPARTMENT OF ENERGY OR
102 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
103 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
104 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
105 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
106 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
107 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
108 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
109 |
110 |
111 | Additional BSD Notice
112 |
113 | 1. This notice is required to be provided under our contract with the
114 | U.S. Department of Energy (DOE). This work was produced at the
115 | University of California, Lawrence Livermore National Laboratory under
116 | Contract No. W-7405-ENG-48 with the DOE.
117 |
118 | 2. Neither the United States Government nor the University of
119 | California nor any of their employees, makes any warranty, express or
120 | implied, or assumes any liability or responsibility for the accuracy,
121 | completeness, or usefulness of any information, apparatus, product, or
122 | process disclosed, or represents that its use would not infringe
123 | privately-owned rights.
124 |
125 | 3. Also, reference herein to any specific commercial products,
126 | process, or services by trade name, trademark, manufacturer or
127 | otherwise does not necessarily constitute or imply its endorsement,
128 | recommendation, or favoring by the United States Government or the
129 | University of California. The views and opinions of authors expressed
130 | herein do not necessarily state or reflect those of the United States
131 | Government or the University of California, and shall not be used for
132 | advertising or product endorsement purposes.
133 |
134 |
135 |
136 | */
137 |
138 | /* EOF */
139 |
--------------------------------------------------------------------------------
/mpip_timers/aix_swclock.h:
--------------------------------------------------------------------------------
1 | /* -*- C -*-
2 |
3 | mpiP MPI Profiler ( http://llnl.github.io/mpiP )
4 |
5 | Please see COPYRIGHT AND LICENSE information at the end of this file.
6 |
7 | -----
8 |
9 | aix_swclock.h -- aix global switch clock
10 |
11 | $Id: aix_swclock.h 369 2006-10-05 19:21:12 +0000 (Thu, 05 Oct 2006) chcham $
12 |
13 | */
14 |
15 | #ifndef _AIX_SWCLOCK_H
16 | #define _AIX_SWCLOCK_H
17 |
18 | /* PLEASE NOTE: as of release 2.7.1,
19 | this functionality is not supported. */
20 |
21 | /* use global switch clock */
22 | #include
23 |
24 | /* swclockRead returns nanoseconds/incr */
25 | typedef struct mpiTi_timer
26 | {
27 | swclock_handle_t h;
28 | int incr;
29 | }
30 | mpiTi_timer_t;
31 | #define mpiTi_TIMER mpiTi_timer_t
32 | #define mpiTi_TIMER_INIT(timer_addr) {(timer_addr)->h=swclockInit();if((timer_addr)->h==0){perror("swclockerror");exit(-1);}else{(timer_addr)->incr=swclockGetIncrement((timer_addr)->h);}{long long t1=swclockRead((timer_addr)->h);if(t1==-1){perror("swclockerror");exit(-1);}}}
33 | #define mpiTi_TIME long long
34 |
35 | #define mpiTi_ASNTIME(lhs,rhs) {bcopy(rhs, lhs, sizeof(mpiTi_TIME));}
36 | #define mpiTi_GETTIME(timer,timeaddr) {(*(timeaddr))=swclockRead((timer)->h);}
37 | #define mpiTi_GETUSECS(timer,timeaddr) ((*(timeaddr))/(((timer)->incr/1000000)))
38 | #define mpiTi_GETTIMEDIFF(timer,end_addr,start_addr) (((*(end_addr))-(*(start_addr)))/((timer)->incr/1000000))
39 | #define mpiTi_PRINTTIMEDIFF(timer,end_addr,start_addr) {printf("Time diff is %lld usecs.\n",mpiTi_GETTIMEDIFF(timer,end_addr,start_addr));}
40 |
41 | #define mpiPi_TIMER_NAME "swclockRead"
42 | #endif
43 |
44 |
45 | /*
46 |
47 |
48 |
49 | Copyright (c) 2006, The Regents of the University of California.
50 | Produced at the Lawrence Livermore National Laboratory
51 | Written by Jeffery Vetter and Christopher Chambreau.
52 | UCRL-CODE-223450.
53 | All rights reserved.
54 |
55 | This file is part of mpiP. For details, see http://llnl.github.io/mpiP.
56 |
57 | Redistribution and use in source and binary forms, with or without
58 | modification, are permitted provided that the following conditions are
59 | met:
60 |
61 | * Redistributions of source code must retain the above copyright
62 | notice, this list of conditions and the disclaimer below.
63 |
64 | * Redistributions in binary form must reproduce the above copyright
65 | notice, this list of conditions and the disclaimer (as noted below) in
66 | the documentation and/or other materials provided with the
67 | distribution.
68 |
69 | * Neither the name of the UC/LLNL nor the names of its contributors
70 | may be used to endorse or promote products derived from this software
71 | without specific prior written permission.
72 |
73 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
74 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
75 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
76 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OF
77 | THE UNIVERSITY OF CALIFORNIA, THE U.S. DEPARTMENT OF ENERGY OR
78 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
79 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
80 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
81 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
82 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
83 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
84 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
85 |
86 |
87 | Additional BSD Notice
88 |
89 | 1. This notice is required to be provided under our contract with the
90 | U.S. Department of Energy (DOE). This work was produced at the
91 | University of California, Lawrence Livermore National Laboratory under
92 | Contract No. W-7405-ENG-48 with the DOE.
93 |
94 | 2. Neither the United States Government nor the University of
95 | California nor any of their employees, makes any warranty, express or
96 | implied, or assumes any liability or responsibility for the accuracy,
97 | completeness, or usefulness of any information, apparatus, product, or
98 | process disclosed, or represents that its use would not infringe
99 | privately-owned rights.
100 |
101 | 3. Also, reference herein to any specific commercial products,
102 | process, or services by trade name, trademark, manufacturer or
103 | otherwise does not necessarily constitute or imply its endorsement,
104 | recommendation, or favoring by the United States Government or the
105 | University of California. The views and opinions of authors expressed
106 | herein do not necessarily state or reflect those of the United States
107 | Government or the University of California, and shall not be used for
108 | advertising or product endorsement purposes.
109 |
110 |
111 |
112 | */
113 |
114 | /* eof */
115 |
--------------------------------------------------------------------------------
/mpip_timers/bgl_local.h:
--------------------------------------------------------------------------------
1 | /* -*- C -*-
2 |
3 |
4 | mpiP MPI Profiler ( http://llnl.github.io/mpiP )
5 |
6 | Please see COPYRIGHT AND LICENSE information at the end of this file.
7 |
8 | -----
9 |
10 | timers/bgl_local.h
11 |
12 | local BG/L high res timers
13 |
14 | $Id: bgl_local.h.in 369 2006-10-05 19:21:12 +0000 (Thu, 05 Oct 2006) chcham $
15 |
16 | */
17 |
18 | #ifndef _BGL_LOCAL_H
19 | #define _BGL_LOCAL_H
20 |
21 | #include
22 |
23 | typedef unsigned long long RTS_TS;
24 | static double seconds_per_cycle = 1.4285714285714285714e-9; /* Assuming 700MHz */
25 |
26 | /* rts_get_timebase returns processor cycles */
27 | #define mpiPi_TIMER double
28 | #define mpiPi_TIMER_INIT(timer_addr) {*(timer_addr) = rts_get_timebase();}
29 | #define mpiPi_TIME RTS_TS
30 | #define mpiPi_ASNTIME(lhs,rhs) {bcopy(rhs, lhs, sizeof(mpiPi_TIME));}
31 | #define mpiPi_GETTIME(timeaddr) {(*timeaddr)=rts_get_timebase();}
32 |
33 | #define mpiPi_GETUSECS(timeaddr) ((*timeaddr)*seconds_per_cycle/USECS)
34 |
35 | #define mpiPi_GETTIMEDIFF(end,start) (seconds_per_cycle * ((*end) - (*start)) * USECS)
36 | #define mpiPi_PRINTTIMEDIFF(end,start) {printf("Time diff is %ld usecs.\n",mpiPi_GETTIMEDIFF(end,start));}
37 | #define mpiPi_TIMER_NAME "rts_get_timebase"
38 |
39 | #endif
40 |
41 |
42 | /*
43 |
44 |
45 |
46 | Copyright (c) 2006, The Regents of the University of California.
47 | Produced at the Lawrence Livermore National Laboratory
48 | Written by Jeffery Vetter and Christopher Chambreau.
49 | UCRL-CODE-223450.
50 | All rights reserved.
51 |
52 | This file is part of mpiP. For details, see http://llnl.github.io/mpiP.
53 |
54 | Redistribution and use in source and binary forms, with or without
55 | modification, are permitted provided that the following conditions are
56 | met:
57 |
58 | * Redistributions of source code must retain the above copyright
59 | notice, this list of conditions and the disclaimer below.
60 |
61 | * Redistributions in binary form must reproduce the above copyright
62 | notice, this list of conditions and the disclaimer (as noted below) in
63 | the documentation and/or other materials provided with the
64 | distribution.
65 |
66 | * Neither the name of the UC/LLNL nor the names of its contributors
67 | may be used to endorse or promote products derived from this software
68 | without specific prior written permission.
69 |
70 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
71 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
72 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
73 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OF
74 | THE UNIVERSITY OF CALIFORNIA, THE U.S. DEPARTMENT OF ENERGY OR
75 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
76 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
77 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
78 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
79 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
80 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
81 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
82 |
83 |
84 | Additional BSD Notice
85 |
86 | 1. This notice is required to be provided under our contract with the
87 | U.S. Department of Energy (DOE). This work was produced at the
88 | University of California, Lawrence Livermore National Laboratory under
89 | Contract No. W-7405-ENG-48 with the DOE.
90 |
91 | 2. Neither the United States Government nor the University of
92 | California nor any of their employees, makes any warranty, express or
93 | implied, or assumes any liability or responsibility for the accuracy,
94 | completeness, or usefulness of any information, apparatus, product, or
95 | process disclosed, or represents that its use would not infringe
96 | privately-owned rights.
97 |
98 | 3. Also, reference herein to any specific commercial products,
99 | process, or services by trade name, trademark, manufacturer or
100 | otherwise does not necessarily constitute or imply its endorsement,
101 | recommendation, or favoring by the United States Government or the
102 | University of California. The views and opinions of authors expressed
103 | herein do not necessarily state or reflect those of the United States
104 | Government or the University of California, and shall not be used for
105 | advertising or product endorsement purposes.
106 |
107 |
108 |
109 | */
110 |
111 | /* eof */
112 |
--------------------------------------------------------------------------------
/mpip_timers/crayx1_hw.h:
--------------------------------------------------------------------------------
1 | /* -*- C -*-
2 |
3 | mpiP MPI Profiler ( http://llnl.github.io/mpiP )
4 |
5 | Please see COPYRIGHT AND LICENSE information at the end of this file.
6 |
7 | -----
8 |
9 | crayx1_hw.h -- local high res timers
10 |
11 | $Id: crayx1_hw.h 369 2006-10-05 19:21:12 +0000 (Thu, 05 Oct 2006) chcham $
12 |
13 | */
14 | #ifndef _CRAYX1_LOCAL_H
15 | #define _CRAYX1_LOCAL_H
16 |
17 | #include
18 |
19 | #define mpiPi_TIMER int64_t
20 | #define mpiPi_TIME int64_t
21 | #define mpiPi_TIMER_NAME "_rtc"
22 |
23 | /* #define mpiPi_ASNTIME(lhs,rhs) {bcopy(rhs, lhs, sizeof(mpiPi_TIMER));} */
24 |
25 | /* mpiPi_GETTIME uses _rtc, which returns a value in ticks */
26 | #define mpiPi_GETTIME(timeaddr) {(*timeaddr)=_rtc();}
27 |
28 | #define mpiPi_GETUSECS(timeaddr) (((*timeaddr)*1000000)/((double)sysconf(_SC_SV2_USER_TIME_RATE)))
29 |
30 | #define mpiPi_PRINTTIME(taddr) printf("Time is %lf usec.\n", mpiPi_GETUSECS(0,taddr))
31 |
32 | #define mpiPi_GETTIMEDIFF(end,start) ((((*end)-(*start))*1000000)/((double)sysconf(_SC_SV2_USER_TIME_RATE)))
33 |
34 | #define mpiPi_PRINTTIMEDIFF(end,start) {printf("Time diff is %lf usecs.\n",mpiPi_GETTIMEDIFF(end,start));}
35 |
36 | #endif /* _CRAYX1_LOCAL_H */
37 |
38 | /*
39 |
40 |
41 |
42 | Copyright (c) 2006, The Regents of the University of California.
43 | Produced at the Lawrence Livermore National Laboratory
44 | Written by Jeffery Vetter and Christopher Chambreau.
45 | UCRL-CODE-223450.
46 | All rights reserved.
47 |
48 | This file is part of mpiP. For details, see http://llnl.github.io/mpiP.
49 |
50 | Redistribution and use in source and binary forms, with or without
51 | modification, are permitted provided that the following conditions are
52 | met:
53 |
54 | * Redistributions of source code must retain the above copyright
55 | notice, this list of conditions and the disclaimer below.
56 |
57 | * Redistributions in binary form must reproduce the above copyright
58 | notice, this list of conditions and the disclaimer (as noted below) in
59 | the documentation and/or other materials provided with the
60 | distribution.
61 |
62 | * Neither the name of the UC/LLNL nor the names of its contributors
63 | may be used to endorse or promote products derived from this software
64 | without specific prior written permission.
65 |
66 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
67 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
68 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
69 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OF
70 | THE UNIVERSITY OF CALIFORNIA, THE U.S. DEPARTMENT OF ENERGY OR
71 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
72 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
73 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
74 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
75 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
76 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
77 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
78 |
79 |
80 | Additional BSD Notice
81 |
82 | 1. This notice is required to be provided under our contract with the
83 | U.S. Department of Energy (DOE). This work was produced at the
84 | University of California, Lawrence Livermore National Laboratory under
85 | Contract No. W-7405-ENG-48 with the DOE.
86 |
87 | 2. Neither the United States Government nor the University of
88 | California nor any of their employees, makes any warranty, express or
89 | implied, or assumes any liability or responsibility for the accuracy,
90 | completeness, or usefulness of any information, apparatus, product, or
91 | process disclosed, or represents that its use would not infringe
92 | privately-owned rights.
93 |
94 | 3. Also, reference herein to any specific commercial products,
95 | process, or services by trade name, trademark, manufacturer or
96 | otherwise does not necessarily constitute or imply its endorsement,
97 | recommendation, or favoring by the United States Government or the
98 | University of California. The views and opinions of authors expressed
99 | herein do not necessarily state or reflect those of the United States
100 | Government or the University of California, and shall not be used for
101 | advertising or product endorsement purposes.
102 |
103 |
104 |
105 | */
106 |
--------------------------------------------------------------------------------
/mpip_timers/crayxt.h:
--------------------------------------------------------------------------------
1 | /* -*- C -*-
2 |
3 | mpiP MPI Profiler ( http://llnl.github.io/mpiP )
4 |
5 | Please see COPYRIGHT AND LICENSE information at the end of this file.
6 |
7 | -----
8 |
9 | crayxt.h -- local high res timers
10 |
11 | $Id: $
12 |
13 | */
14 | #ifndef _CRAYXT_LOCAL_H
15 | #define _CRAYXT_LOCAL_H
16 |
17 | /* without this #include, the code will compile but dclock() always
18 | returns the same value during a run
19 | */
20 | #include
21 |
22 | #define mpiPi_TIMER double
23 | #define mpiPi_TIME double
24 | #define mpiPi_TIMER_NAME "dclock"
25 |
26 | /* #define mpiPi_ASNTIME(lhs,rhs) {bcopy(rhs, lhs, sizeof(mpiPi_TIMER));} */
27 |
28 | /* mpiPi_GETTIME uses dclock, which returns a value in seconds */
29 | #define mpiPi_GETTIME(timeaddr) {(*timeaddr)=dclock();}
30 |
31 | #define mpiPi_GETUSECS(timeaddr) ((*timeaddr)*1000000)
32 |
33 | #define mpiPi_PRINTTIME(taddr) printf("Time is %lf usec.\n", mpiPi_GETUSECS(taddr))
34 |
35 | #define mpiPi_GETTIMEDIFF(end,start) (((*end)-(*start))*1000000)
36 |
37 | #define mpiPi_PRINTTIMEDIFF(end,start) {printf("Time diff is %lf usecs.\n",mpiPi_GETTIMEDIFF(end,start));}
38 |
39 | #endif /* _CRAYXT_LOCAL_H */
40 |
41 | /*
42 |
43 |
44 |
45 | Copyright (c) 2006, The Regents of the University of California.
46 | Produced at the Lawrence Livermore National Laboratory
47 | Written by Jeffery Vetter and Christopher Chambreau.
48 | UCRL-CODE-223450.
49 | All rights reserved.
50 |
51 | This file is part of mpiP. For details, see http://llnl.github.io/mpiP.
52 |
53 | Redistribution and use in source and binary forms, with or without
54 | modification, are permitted provided that the following conditions are
55 | met:
56 |
57 | * Redistributions of source code must retain the above copyright
58 | notice, this list of conditions and the disclaimer below.
59 |
60 | * Redistributions in binary form must reproduce the above copyright
61 | notice, this list of conditions and the disclaimer (as noted below) in
62 | the documentation and/or other materials provided with the
63 | distribution.
64 |
65 | * Neither the name of the UC/LLNL nor the names of its contributors
66 | may be used to endorse or promote products derived from this software
67 | without specific prior written permission.
68 |
69 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
70 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
71 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
72 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OF
73 | THE UNIVERSITY OF CALIFORNIA, THE U.S. DEPARTMENT OF ENERGY OR
74 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
75 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
76 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
77 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
78 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
79 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
80 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
81 |
82 |
83 | Additional BSD Notice
84 |
85 | 1. This notice is required to be provided under our contract with the
86 | U.S. Department of Energy (DOE). This work was produced at the
87 | University of California, Lawrence Livermore National Laboratory under
88 | Contract No. W-7405-ENG-48 with the DOE.
89 |
90 | 2. Neither the United States Government nor the University of
91 | California nor any of their employees, makes any warranty, express or
92 | implied, or assumes any liability or responsibility for the accuracy,
93 | completeness, or usefulness of any information, apparatus, product, or
94 | process disclosed, or represents that its use would not infringe
95 | privately-owned rights.
96 |
97 | 3. Also, reference herein to any specific commercial products,
98 | process, or services by trade name, trademark, manufacturer or
99 | otherwise does not necessarily constitute or imply its endorsement,
100 | recommendation, or favoring by the United States Government or the
101 | University of California. The views and opinions of authors expressed
102 | herein do not necessarily state or reflect those of the United States
103 | Government or the University of California, and shall not be used for
104 | advertising or product endorsement purposes.
105 |
106 |
107 |
108 | */
109 |
--------------------------------------------------------------------------------
/mpip_timers/linux_posix.h:
--------------------------------------------------------------------------------
1 | /* -*- C -*-
2 |
3 | mpiP MPI Profiler ( http://llnl.github.io/mpiP )
4 |
5 | Please see COPYRIGHT AND LICENSE information at the end of this file.
6 |
7 | -----
8 |
9 | linux_posix.h -- POSIX high-resolution timers on Linux
10 |
11 | $Id: linux_posix.h 391 2007-04-13 21:53:07 +0000 (Fri, 13 Apr 2007) chcham $
12 |
13 | */
14 |
15 | #ifndef _LINUX_POSIX_H
16 | #define _LINUX_POSIX_H
17 |
18 | /* read_real_time returns nanoseconds */
19 | #define mpiPi_TIMER double
20 | #define mpiPi_TIME struct timespec
21 | #define mpiPi_TIMER_NAME "clock_gettime(CLOCK_MONOTONIC)"
22 |
23 | #define mpiPi_TIMER_INIT(timer_addr) {*(timer_addr) = 0;}
24 | #define mpiPi_ASNTIME(lhs,rhs) {bcopy(rhs, lhs, sizeof(mpiPi_TIME));}
25 | #define mpiPi_GETTIME(timeaddr) {clock_gettime(CLOCK_MONOTONIC, timeaddr);}
26 |
27 | #define mpiPi_GETUSECS(timeaddr) ((((mpiPi_TIMER)((timeaddr)->tv_sec))*USECS) + ((mpiPi_TIMER)((timeaddr)->tv_nsec))/1000)
28 | #define mpiPi_GETTIMEDIFF(end,start) (mpiPi_GETUSECS(end)-mpiPi_GETUSECS(start))
29 |
30 | #endif
31 |
32 |
33 | /*
34 |
35 |
36 |
37 | Copyright (c) 2006, The Regents of the University of California.
38 | Produced at the Lawrence Livermore National Laboratory
39 | Written by Jeffery Vetter and Christopher Chambreau.
40 | UCRL-CODE-223450.
41 | All rights reserved.
42 |
43 | This file is part of mpiP. For details, see http://llnl.github.io/mpiP.
44 |
45 | Redistribution and use in source and binary forms, with or without
46 | modification, are permitted provided that the following conditions are
47 | met:
48 |
49 | * Redistributions of source code must retain the above copyright
50 | notice, this list of conditions and the disclaimer below.
51 |
52 | * Redistributions in binary form must reproduce the above copyright
53 | notice, this list of conditions and the disclaimer (as noted below) in
54 | the documentation and/or other materials provided with the
55 | distribution.
56 |
57 | * Neither the name of the UC/LLNL nor the names of its contributors
58 | may be used to endorse or promote products derived from this software
59 | without specific prior written permission.
60 |
61 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
62 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
63 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
64 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OF
65 | THE UNIVERSITY OF CALIFORNIA, THE U.S. DEPARTMENT OF ENERGY OR
66 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
67 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
68 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
69 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
70 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
71 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
72 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
73 |
74 |
75 | Additional BSD Notice
76 |
77 | 1. This notice is required to be provided under our contract with the
78 | U.S. Department of Energy (DOE). This work was produced at the
79 | University of California, Lawrence Livermore National Laboratory under
80 | Contract No. W-7405-ENG-48 with the DOE.
81 |
82 | 2. Neither the United States Government nor the University of
83 | California nor any of their employees, makes any warranty, express or
84 | implied, or assumes any liability or responsibility for the accuracy,
85 | completeness, or usefulness of any information, apparatus, product, or
86 | process disclosed, or represents that its use would not infringe
87 | privately-owned rights.
88 |
89 | 3. Also, reference herein to any specific commercial products,
90 | process, or services by trade name, trademark, manufacturer or
91 | otherwise does not necessarily constitute or imply its endorsement,
92 | recommendation, or favoring by the United States Government or the
93 | University of California. The views and opinions of authors expressed
94 | herein do not necessarily state or reflect those of the United States
95 | Government or the University of California, and shall not be used for
96 | advertising or product endorsement purposes.
97 |
98 |
99 |
100 | */
101 |
102 | /* eof */
103 |
--------------------------------------------------------------------------------
/mpip_timers/sunos-timers.h:
--------------------------------------------------------------------------------
1 | /* -*- C -*-
2 |
3 | mpiP MPI Profiler ( http://llnl.github.io/mpiP )
4 |
5 | Please see COPYRIGHT AND LICENSE information at the end of this file.
6 |
7 | -----
8 |
9 | sunos-timers.h -- sun os timers
10 |
11 | $Id: sunos-timers.h 369 2006-10-05 19:21:12 +0000 (Thu, 05 Oct 2006) chcham $
12 |
13 | */
14 |
15 | #ifndef _SUNOS_TIMERS_H
16 | #define _SUNOS_TIMERS_H
17 |
18 | /* gethrtime returns nanoseconds */
19 | #define mpiTi_TIMESTRUCT hrtime_t
20 | #define mpiTi_ASNTIME(lhs,rhs) {*(lhs) = *(rhs);}
21 | #define mpiTi_GETTIME(timeaddr) (*(timeaddr))=gethrtime()
22 | #define mpiTi_GETUSECS(timeaddr) ((*(timeaddr))/1000)
23 | #define mpiTi_GETTIMEDIFF(end,start) (((*(hrtime_t*)(end))-(*(hrtime_t*)(start)))/1000)
24 |
25 | #define mpiPi_TIMER_NAME "gethrtime"
26 | #endif
27 |
28 |
29 | /*
30 |
31 |
32 |
33 | Copyright (c) 2006, The Regents of the University of California.
34 | Produced at the Lawrence Livermore National Laboratory
35 | Written by Jeffery Vetter and Christopher Chambreau.
36 | UCRL-CODE-223450.
37 | All rights reserved.
38 |
39 | This file is part of mpiP. For details, see http://llnl.github.io/mpiP.
40 |
41 | Redistribution and use in source and binary forms, with or without
42 | modification, are permitted provided that the following conditions are
43 | met:
44 |
45 | * Redistributions of source code must retain the above copyright
46 | notice, this list of conditions and the disclaimer below.
47 |
48 | * Redistributions in binary form must reproduce the above copyright
49 | notice, this list of conditions and the disclaimer (as noted below) in
50 | the documentation and/or other materials provided with the
51 | distribution.
52 |
53 | * Neither the name of the UC/LLNL nor the names of its contributors
54 | may be used to endorse or promote products derived from this software
55 | without specific prior written permission.
56 |
57 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
58 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
59 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
60 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OF
61 | THE UNIVERSITY OF CALIFORNIA, THE U.S. DEPARTMENT OF ENERGY OR
62 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
63 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
64 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
65 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
66 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
67 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
68 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
69 |
70 |
71 | Additional BSD Notice
72 |
73 | 1. This notice is required to be provided under our contract with the
74 | U.S. Department of Energy (DOE). This work was produced at the
75 | University of California, Lawrence Livermore National Laboratory under
76 | Contract No. W-7405-ENG-48 with the DOE.
77 |
78 | 2. Neither the United States Government nor the University of
79 | California nor any of their employees, makes any warranty, express or
80 | implied, or assumes any liability or responsibility for the accuracy,
81 | completeness, or usefulness of any information, apparatus, product, or
82 | process disclosed, or represents that its use would not infringe
83 | privately-owned rights.
84 |
85 | 3. Also, reference herein to any specific commercial products,
86 | process, or services by trade name, trademark, manufacturer or
87 | otherwise does not necessarily constitute or imply its endorsement,
88 | recommendation, or favoring by the United States Government or the
89 | University of California. The views and opinions of authors expressed
90 | herein do not necessarily state or reflect those of the United States
91 | Government or the University of California, and shall not be used for
92 | advertising or product endorsement purposes.
93 |
94 |
95 |
96 | */
97 |
98 | /* eof */
99 |
--------------------------------------------------------------------------------
/testing/0-simple-c++.C:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | mpiP MPI Profiler ( http://llnl.github.io/mpiP )
4 |
5 | Please see COPYRIGHT AND LICENSE information at the end of this file.
6 |
7 | -----
8 |
9 | 0-simpile-c++.C -- simple C++ link test
10 |
11 | */
12 |
13 |
14 | #ifndef lint
15 | static const char *svnid =
16 | "$Id$";
17 | #endif
18 |
19 | #include "mpi.h"
20 | #include
21 | #include
22 |
23 | class simplec
24 | {
25 | public:
26 | simplec()
27 | {
28 | int nprocs = -1;
29 | int rank = -1;
30 | char buf[256];
31 |
32 | MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
33 | MPI_Comm_rank (MPI_COMM_WORLD, &rank);
34 | gethostname (buf, 256);
35 | printf ("MPI comm size is %d with rank %d executing on %s\n",
36 | nprocs, rank, buf);
37 | }
38 | };
39 |
40 | int
41 | main (int argc, char **argv)
42 | {
43 | simplec * s;
44 |
45 | MPI_Init (&argc, &argv);
46 | s = new simplec;
47 | MPI_Finalize ();
48 |
49 | printf("done\n");
50 | }
51 |
52 |
53 | /*
54 |
55 |
56 |
57 | Copyright (c) 2006, The Regents of the University of California.
58 | Produced at the Lawrence Livermore National Laboratory
59 | Written by Jeffery Vetter and Christopher Chambreau.
60 | UCRL-CODE-223450.
61 | All rights reserved.
62 |
63 | This file is part of mpiP. For details, see http://llnl.github.io/mpiP.
64 |
65 | Redistribution and use in source and binary forms, with or without
66 | modification, are permitted provided that the following conditions are
67 | met:
68 |
69 | * Redistributions of source code must retain the above copyright
70 | notice, this list of conditions and the disclaimer below.
71 |
72 | * Redistributions in binary form must reproduce the above copyright
73 | notice, this list of conditions and the disclaimer (as noted below) in
74 | the documentation and/or other materials provided with the
75 | distribution.
76 |
77 | * Neither the name of the UC/LLNL nor the names of its contributors
78 | may be used to endorse or promote products derived from this software
79 | without specific prior written permission.
80 |
81 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
82 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
83 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
84 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OF
85 | THE UNIVERSITY OF CALIFORNIA, THE U.S. DEPARTMENT OF ENERGY OR
86 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
87 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
88 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
89 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
90 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
91 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
92 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
93 |
94 |
95 | Additional BSD Notice
96 |
97 | 1. This notice is required to be provided under our contract with the
98 | U.S. Department of Energy (DOE). This work was produced at the
99 | University of California, Lawrence Livermore National Laboratory under
100 | Contract No. W-7405-ENG-48 with the DOE.
101 |
102 | 2. Neither the United States Government nor the University of
103 | California nor any of their employees, makes any warranty, express or
104 | implied, or assumes any liability or responsibility for the accuracy,
105 | completeness, or usefulness of any information, apparatus, product, or
106 | process disclosed, or represents that its use would not infringe
107 | privately-owned rights.
108 |
109 | 3. Also, reference herein to any specific commercial products,
110 | process, or services by trade name, trademark, manufacturer or
111 | otherwise does not necessarily constitute or imply its endorsement,
112 | recommendation, or favoring by the United States Government or the
113 | University of California. The views and opinions of authors expressed
114 | herein do not necessarily state or reflect those of the United States
115 | Government or the University of California, and shall not be used for
116 | advertising or product endorsement purposes.
117 |
118 |
119 |
120 | */
121 |
122 | /* EOF */
123 |
--------------------------------------------------------------------------------
/testing/0-simple-c++.exp:
--------------------------------------------------------------------------------
1 |
2 | set test_title "0-simple-c++.exe: basic C Test"
3 | set test "0-simple-c++.exe"
4 | set test_targ "./testing/$test"
5 | set procs 2
6 | exec sleep $pause_time
7 |
8 |
9 | case "$launch" in {
10 | { "jsrun" } {
11 | set pre_args ""
12 | set post_args ""
13 | set pre_procs "-p2"
14 | set post_procs ""
15 | } { "prun" | "srun" } {
16 | set pre_args "-p$pool"
17 | set post_args ""
18 | set pre_procs "-n2"
19 | set post_procs ""
20 | }
21 | { "mpirun" } {
22 | set pre_args "-np"
23 | set pre_procs $procs
24 | set post_args ""
25 | set post_procs ""
26 | }
27 | { "poe" } {
28 | set env(MP_PROCS) $procs
29 | set env(MP_NODES) 1
30 | set env(MP_RMPOOL) $rmpool
31 | set pre_args ""
32 | set post_args ""
33 | set pre_procs ""
34 | set post_procs ""
35 | }
36 | }
37 |
38 | set timeout 30
39 |
40 | set command "$launch $pre_args $pre_procs $test_targ $post_args $post_procs"
41 | send_user "${command} \n"
42 | spawn -noecho {*}${command}
43 |
44 | expect {
45 | "Collector found no records to merge." {
46 | pass "$test passed"
47 | # close
48 | # wait
49 | }
50 | timeout { fail "$test timed out\n\n" }
51 | eof { fail "$test failed\n\n" }
52 |
53 | }
54 |
55 | send_user "$expect_out(buffer)\n\n"
56 |
--------------------------------------------------------------------------------
/testing/0-simple.c:
--------------------------------------------------------------------------------
1 | /*
2 | mpiP MPI Profiler ( http://llnl.github.io/mpiP )
3 |
4 | Please see COPYRIGHT AND LICENSE information at the end of this file.
5 |
6 | -----
7 |
8 | 0-simple.c -- simple link test
9 |
10 | */
11 |
12 |
13 | #ifndef lint
14 | static char *svnid =
15 | "$Id$";
16 | #endif
17 |
18 | #include
19 | #include
20 | #include
21 |
22 | int main (int argc, char **argv)
23 | {
24 | int nprocs = -1;
25 | int rank = -1;
26 | char buf[256];
27 |
28 | MPI_Init (&argc, &argv);
29 | MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
30 | MPI_Comm_rank (MPI_COMM_WORLD, &rank);
31 | gethostname (buf, 256);
32 | printf ("MPI comm size is %d with rank %d executing on %s\n",
33 | nprocs, rank, buf);
34 | MPI_Finalize ();
35 | printf ("(%d) Finished normally\n", rank);
36 | }
37 |
38 |
39 | /*
40 |
41 |
42 |
43 | Copyright (c) 2006, The Regents of the University of California.
44 | Produced at the Lawrence Livermore National Laboratory
45 | Written by Jeffery Vetter and Christopher Chambreau.
46 | UCRL-CODE-223450.
47 | All rights reserved.
48 |
49 | This file is part of mpiP. For details, see http://llnl.github.io/mpiP.
50 |
51 | Redistribution and use in source and binary forms, with or without
52 | modification, are permitted provided that the following conditions are
53 | met:
54 |
55 | * Redistributions of source code must retain the above copyright
56 | notice, this list of conditions and the disclaimer below.
57 |
58 | * Redistributions in binary form must reproduce the above copyright
59 | notice, this list of conditions and the disclaimer (as noted below) in
60 | the documentation and/or other materials provided with the
61 | distribution.
62 |
63 | * Neither the name of the UC/LLNL nor the names of its contributors
64 | may be used to endorse or promote products derived from this software
65 | without specific prior written permission.
66 |
67 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
68 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
69 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
70 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OF
71 | THE UNIVERSITY OF CALIFORNIA, THE U.S. DEPARTMENT OF ENERGY OR
72 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
73 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
74 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
75 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
76 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
77 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
78 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
79 |
80 |
81 | Additional BSD Notice
82 |
83 | 1. This notice is required to be provided under our contract with the
84 | U.S. Department of Energy (DOE). This work was produced at the
85 | University of California, Lawrence Livermore National Laboratory under
86 | Contract No. W-7405-ENG-48 with the DOE.
87 |
88 | 2. Neither the United States Government nor the University of
89 | California nor any of their employees, makes any warranty, express or
90 | implied, or assumes any liability or responsibility for the accuracy,
91 | completeness, or usefulness of any information, apparatus, product, or
92 | process disclosed, or represents that its use would not infringe
93 | privately-owned rights.
94 |
95 | 3. Also, reference herein to any specific commercial products,
96 | process, or services by trade name, trademark, manufacturer or
97 | otherwise does not necessarily constitute or imply its endorsement,
98 | recommendation, or favoring by the United States Government or the
99 | University of California. The views and opinions of authors expressed
100 | herein do not necessarily state or reflect those of the United States
101 | Government or the University of California, and shall not be used for
102 | advertising or product endorsement purposes.
103 |
104 |
105 |
106 | */
107 |
108 | /* EOF */
109 |
--------------------------------------------------------------------------------
/testing/0-simple.exp:
--------------------------------------------------------------------------------
1 |
2 | set test_title "0-simple.exe: basic C Test"
3 | set test "0-simple.exe"
4 | set test_targ "./testing/$test"
5 | set procs 2
6 | exec sleep $pause_time
7 |
8 |
9 | case "$launch" in {
10 | { "jsrun" } {
11 | set pre_args ""
12 | set post_args ""
13 | set pre_procs "-p2"
14 | set post_procs ""
15 | }
16 | { "prun" | "srun" } {
17 | set pre_args "-p$pool"
18 | set post_args ""
19 | set pre_procs "-n$procs"
20 | set post_procs ""
21 | }
22 | { "mpirun" } {
23 | set pre_args "-np"
24 | set pre_procs $procs
25 | set post_args ""
26 | set post_procs ""
27 | }
28 | { "poe" } {
29 | set env(MP_PROCS) $procs
30 | set env(MP_NODES) 1
31 | set env(MP_RMPOOL) $rmpool
32 | set pre_args ""
33 | set post_args ""
34 | set pre_procs ""
35 | set post_procs ""
36 | }
37 | }
38 |
39 | set timeout 30
40 |
41 | set command "$launch $pre_args $pre_procs $test_targ $post_args $post_procs"
42 | send_user "${command} \n"
43 | spawn -noecho {*}${command}
44 |
45 | expect {
46 | "Collector found no records to merge." {
47 | pass "$test passed"
48 | # close
49 | # wait
50 | }
51 | timeout { fail "$test timed out\n\n" }
52 | eof { fail "$test failed\n\n" }
53 |
54 | }
55 |
56 | send_user "$expect_out(buffer)\n\n"
57 |
--------------------------------------------------------------------------------
/testing/0-simplef.exp:
--------------------------------------------------------------------------------
1 |
2 | set test_title "0-simplef.exe: basic Fortran Test"
3 | set test "0-simplef.exe"
4 | set test_targ "./testing/$test"
5 | set procs 2
6 | exec sleep $pause_time
7 |
8 |
9 | case "$launch" in {
10 | { "jsrun" } {
11 | set pre_args ""
12 | set post_args ""
13 | set pre_procs "-p2"
14 | set post_procs ""
15 | }
16 | { "prun" | "srun" } {
17 | set pre_args "-p$pool"
18 | set post_args ""
19 | set pre_procs "-n$procs"
20 | set post_procs ""
21 | }
22 | { "mpirun" } {
23 | set pre_args "-np"
24 | set pre_procs $procs
25 | set post_args ""
26 | set post_procs ""
27 | }
28 | { "poe" } {
29 | set env(MP_PROCS) $procs
30 | set env(MP_NODES) 1
31 | set env(MP_RMPOOL) $rmpool
32 | set pre_args ""
33 | set post_args ""
34 | set pre_procs ""
35 | set post_procs ""
36 | }
37 | }
38 |
39 | set timeout 30
40 |
41 | set command "$launch $pre_args $pre_procs $test_targ $post_args $post_procs"
42 | send_user "${command} \n"
43 | spawn -noecho {*}${command}
44 |
45 | expect {
46 | "Collector found no records to merge." {
47 | pass "$test passed"
48 | # close
49 | # wait
50 | }
51 | timeout { fail "$test timed out\n\n" }
52 | eof { fail "$test failed\n\n" }
53 |
54 | }
55 |
56 | send_user "$expect_out(buffer)\n\n"
57 |
--------------------------------------------------------------------------------
/testing/0-simplef.f:
--------------------------------------------------------------------------------
1 | c
2 | c mpiP MPI Profiler ( http://llnl.github.io/mpiP )
3 | c
4 | c Please see COPYRIGHT AND LICENSE information at the end of this file.
5 | c
6 | c -----
7 | c
8 | c 0-simplef.f -- a simple FORTRAN program to test linking to mpi.
9 |
10 |
11 | program simple
12 |
13 | include 'mpif.h'
14 |
15 | integer info
16 | integer rank
17 |
18 | call mpi_init(info)
19 | write(*,*) 'successfully called init.'
20 |
21 | call mpi_comm_rank(mpi_comm_world,rank,info)
22 |
23 | call mpi_finalize(info)
24 | write(*,*) 'successfully called finalize.'
25 |
26 | end
27 |
28 | c
29 | c
30 | c
31 | c
32 | c Copyright (c) 2006, The Regents of the University of California.
33 | c Produced at the Lawrence Livermore National Laboratory
34 | c Written by Jeffery Vetter and Christopher Chambreau.
35 | c UCRL-CODE-223450.
36 | c All rights reserved.
37 | c
38 | c This file is part of mpiP. For details, see http://llnl.github.io/mpiP.
39 | c
40 | c Redistribution and use in source and binary forms, with or without
41 | c modification, are permitted provided that the following conditions are
42 | c met:
43 | c
44 | c * Redistributions of source code must retain the above copyright
45 | c notice, this list of conditions and the disclaimer below.
46 | c
47 | c * Redistributions in binary form must reproduce the above copyright
48 | c notice, this list of conditions and the disclaimer (as noted below) in
49 | c the documentation and/or other materials provided with the
50 | c distribution.
51 | c
52 | c * Neither the name of the UC/LLNL nor the names of its contributors
53 | c may be used to endorse or promote products derived from this software
54 | c without specific prior written permission.
55 | c
56 | c THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
57 | c "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
58 | c LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
59 | c A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OF
60 | c THE UNIVERSITY OF CALIFORNIA, THE U.S. DEPARTMENT OF ENERGY OR
61 | c CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
62 | c EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
63 | c PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
64 | c PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
65 | c LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
66 | c NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
67 | c SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
68 | c
69 | c
70 | c Additional BSD Notice
71 | c
72 | c 1. This notice is required to be provided under our contract with the
73 | c U.S. Department of Energy (DOE). This work was produced at the
74 | c University of California, Lawrence Livermore National Laboratory under
75 | c Contract No. W-7405-ENG-48 with the DOE.
76 | c
77 | c 2. Neither the United States Government nor the University of
78 | c California nor any of their employees, makes any warranty, express or
79 | c implied, or assumes any liability or responsibility for the accuracy,
80 | c completeness, or usefulness of any information, apparatus, product, or
81 | c process disclosed, or represents that its use would not infringe
82 | c privately-owned rights.
83 | c
84 | c 3. Also, reference herein to any specific commercial products,
85 | c process, or services by trade name, trademark, manufacturer or
86 | c otherwise does not necessarily constitute or imply its endorsement,
87 | c recommendation, or favoring by the United States Government or the
88 | c University of California. The views and opinions of authors expressed
89 | c herein do not necessarily state or reflect those of the United States
90 | c Government or the University of California, and shall not be used for
91 | c advertising or product endorsement purposes.
92 | c
93 | c
94 | c
95 | c
96 | c --- EOF
97 |
--------------------------------------------------------------------------------
/testing/1-hot-potato.c:
--------------------------------------------------------------------------------
1 | /*
2 | mpiP MPI Profiler ( http://llnl.github.io/mpiP )
3 |
4 | Please see COPYRIGHT AND LICENSE information at the end of this file.
5 |
6 | -----
7 |
8 | 1-hot-potato.c -- hot potato test
9 |
10 | */
11 |
12 | #ifndef lint
13 | static char *svnid =
14 | "$Id$";
15 | #endif
16 |
17 | #include
18 | #include
19 |
20 | int main (int argc, char **argv)
21 | {
22 | int nprocs = -1;
23 | int rank = -1;
24 | float data = 0.0;
25 | int tag = 30;
26 | char processor_name[128];
27 | int namelen = 128;
28 |
29 | /* init */
30 | MPI_Init (&argc, &argv);
31 | MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
32 | MPI_Comm_rank (MPI_COMM_WORLD, &rank);
33 | printf ("Initializing (%d of %d)\n", rank, nprocs);
34 | MPI_Get_processor_name (processor_name, &namelen);
35 | printf ("(%d) is alive on %s\n", rank, processor_name);
36 | fflush (stdout);
37 | {
38 | int dest = (rank == nprocs - 1) ? (0) : (rank + 1);
39 | data = rank;
40 | MPI_Send (&data, 1, MPI_FLOAT, dest, tag, MPI_COMM_WORLD);
41 | printf ("(%d) sent data %f\n", rank, data);
42 | fflush (stdout);
43 | }
44 | {
45 | int src = (rank == 0) ? (nprocs - 1) : (rank - 1);
46 | MPI_Status status;
47 | MPI_Recv (&data, 1, MPI_FLOAT, src, tag, MPI_COMM_WORLD, &status);
48 | printf ("(%d) got data %f\n", rank, data);
49 | fflush (stdout);
50 | }
51 | MPI_Finalize ();
52 | printf ("(%d) Finished normally\n", rank);
53 | }
54 |
55 |
56 | /*
57 |
58 |
59 |
60 | Copyright (c) 2006, The Regents of the University of California.
61 | Produced at the Lawrence Livermore National Laboratory
62 | Written by Jeffery Vetter and Christopher Chambreau.
63 | UCRL-CODE-223450.
64 | All rights reserved.
65 |
66 | This file is part of mpiP. For details, see http://llnl.github.io/mpiP.
67 |
68 | Redistribution and use in source and binary forms, with or without
69 | modification, are permitted provided that the following conditions are
70 | met:
71 |
72 | * Redistributions of source code must retain the above copyright
73 | notice, this list of conditions and the disclaimer below.
74 |
75 | * Redistributions in binary form must reproduce the above copyright
76 | notice, this list of conditions and the disclaimer (as noted below) in
77 | the documentation and/or other materials provided with the
78 | distribution.
79 |
80 | * Neither the name of the UC/LLNL nor the names of its contributors
81 | may be used to endorse or promote products derived from this software
82 | without specific prior written permission.
83 |
84 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
85 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
86 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
87 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OF
88 | THE UNIVERSITY OF CALIFORNIA, THE U.S. DEPARTMENT OF ENERGY OR
89 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
90 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
91 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
92 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
93 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
94 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
95 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
96 |
97 |
98 | Additional BSD Notice
99 |
100 | 1. This notice is required to be provided under our contract with the
101 | U.S. Department of Energy (DOE). This work was produced at the
102 | University of California, Lawrence Livermore National Laboratory under
103 | Contract No. W-7405-ENG-48 with the DOE.
104 |
105 | 2. Neither the United States Government nor the University of
106 | California nor any of their employees, makes any warranty, express or
107 | implied, or assumes any liability or responsibility for the accuracy,
108 | completeness, or usefulness of any information, apparatus, product, or
109 | process disclosed, or represents that its use would not infringe
110 | privately-owned rights.
111 |
112 | 3. Also, reference herein to any specific commercial products,
113 | process, or services by trade name, trademark, manufacturer or
114 | otherwise does not necessarily constitute or imply its endorsement,
115 | recommendation, or favoring by the United States Government or the
116 | University of California. The views and opinions of authors expressed
117 | herein do not necessarily state or reflect those of the United States
118 | Government or the University of California, and shall not be used for
119 | advertising or product endorsement purposes.
120 |
121 |
122 |
123 | */
124 |
125 | /* EOF */
126 |
--------------------------------------------------------------------------------
/testing/1-hot-potato.exp:
--------------------------------------------------------------------------------
1 |
2 | ## Test-specific information
3 | #
4 |
5 | set test_title "1-hot-potato-exe: simple C Test with MPI"
6 | set test "1-hot-potato.exe"
7 | set test_targ "./testing/$test"
8 | set procs 2
9 | set source_check_file "testing/1-hot-potato.src"
10 |
11 |
12 | source "testing/test_template.tcl"
13 |
14 | checkSource
15 |
16 | send_user "\n\n"
17 |
18 |
--------------------------------------------------------------------------------
/testing/1-hot-potato.src:
--------------------------------------------------------------------------------
1 |
2 | checkOutput "1-hot-potato.c +47 \.?main +Recv" "Source check:"
3 | checkOutput "1-hot-potato.c +40 \.?main +Send" "Source check:"
4 |
5 |
--------------------------------------------------------------------------------
/testing/10-coll-mess-size.exp:
--------------------------------------------------------------------------------
1 |
2 | ## Test-specific information
3 | #
4 | set test_title "10-coll-mess-size-exe: check all supported operations for accurate size"
5 | set test "10-coll-mess-size.exe"
6 | set procs 2
7 | set source_check_file "testing/10-coll-mess-size.src"
8 |
9 |
10 | source "testing/test_template.tcl"
11 |
12 | checkSource
13 |
14 | send_user "\n\n"
15 |
16 |
--------------------------------------------------------------------------------
/testing/10-coll-mess-size.src:
--------------------------------------------------------------------------------
1 | set baseSize [ expr 256 * 8 ]
2 | set currAvrg $baseSize
3 |
4 | proc checkMessOutput { text type count avrg } {
5 | set baseSize [ expr 256 * 8 ]
6 | set currAvrg [ format "%.3g" $avrg ]
7 | set currTot [format "%.3g" [ expr $avrg * $count ] ]
8 | regsub "\\+" $currAvrg "\\\\+" currAvrg
9 | regsub "\\+" $currTot "\\\\+" currTot
10 | # send_user "currAvrg = $currAvrg\n"
11 | # send_user "currTot = $currTot\n"
12 | checkOutput "$text +\[0-9\]+ +$count +$currTot +$currAvrg" "Message size check:"
13 | }
14 |
15 | foreach op { Allgather Allgatherv Allreduce Alltoall Bcast Gather Gatherv Reduce Scan Scatter Sendrecv Sendrecv_replace } {
16 | checkMessOutput $op "Message size check:" 2 $currAvrg
17 | set currAvrg [ expr $currAvrg + $baseSize ]
18 | }
19 |
20 | #checkMessOutput "Allgather" "Message size check:" 2 $currAvrg
21 | #set currAvrg [ expr $currAvrg + $baseSize ]
22 | #checkMessOutput "Allgatherv" "Message size check:" 2 $currAvrg
23 | #set currAvrg [ expr $currAvrg + $baseSize ]
24 | #checkMessOutput "Allreduce" "Message size check:" 2 $currAvrg
25 | #set currAvrg [ expr $currAvrg + $baseSize ]
26 | #checkMessOutput "Alltoall" "Message size check:" 2 $currAvrg
27 | #
28 | #checkOutput "Allgather +\[0-9\]+ +2 +4.1e\\+03 +2.05e\\+03" "Message size check:"
29 | #checkOutput "Allgatherv +\[0-9\]+ +2 +2.87e\\+04 1.43e\\+04" "Message size check:"
30 | #checkOutput "Allreduce +\[0-9\]+ +2 +1.23e\\+04 6.14e\\+03" "Message size check:"
31 | #checkOutput "Alltoall +\[0-9\]+ +2 +1.64e\\+04 8.19e\\+03" "Message size check:"
32 | #checkOutput "Bcast +\[0-9\]+ +2 +2.05e\\+04 1.02e\\+04" "Message size check:"
33 | #checkOutput "Gather +\[0-9\]+ +2 +2.87e\\+04 1.43e\\+04" "Message size check:"
34 | #checkOutput "Gatherv +\[0-9\]+ +2 +2.87e\\+04 1.43e\\+04" "Message size check:"
35 | #checkOutput "Reduce +\[0-9\]+ +2 +5.32e\\+04 2.66e\\+04" "Message size check:"
36 | #checkOutput "Rsend +\[0-9\]+ +1 +2.87e\\+04 2.87e\\+04" "Message size check:"
37 | #checkOutput "Scatter +\[0-9\]+ +2 +6.55e\\+04 3.28e\\+04" "Message size check:"
38 | #checkOutput "Scan +\[0-9\]+ +2 +6.14e\\+04 3.07e\\+04" "Message size check:"
39 |
--------------------------------------------------------------------------------
/testing/11-p2p-mess-size.exp:
--------------------------------------------------------------------------------
1 |
2 | ## Test-specific information
3 | #
4 | set test_title "11-p2p-mess-size-exe: check all supported operations for accurate size"
5 | set test "11-p2p-mess-size.exe"
6 | set procs 2
7 | set source_check_file "testing/11-p2p-mess-size.src"
8 |
9 |
10 | source "testing/test_template.tcl"
11 |
12 | checkSource
13 |
14 | send_user "\n\n"
15 |
16 |
--------------------------------------------------------------------------------
/testing/11-p2p-mess-size.src:
--------------------------------------------------------------------------------
1 |
2 | set baseSize [ expr 256 * 8 ]
3 | set currAvrg $baseSize
4 |
5 | proc checkMessOutput { text type count avrg } {
6 | set baseSize [ expr 256 * 8 ]
7 | set currAvrg [ format "%.3g" $avrg ]
8 | set currTot [ format "%.3g" $avrg ]
9 | regsub "\\+" $currAvrg "\\\\+" currAvrg
10 | regsub "\\+" $currTot "\\\\+" currTot
11 | # send_user "currAvrg = $currAvrg\n"
12 | # send_user "currTot = $currTot\n"
13 | checkOutput "$text +\[0-9\]+ +$count +$currTot +$currAvrg" "Message size check:"
14 | }
15 |
16 | foreach op { Bsend Ibsend Irsend Isend Issend Rsend Send Ssend } {
17 | checkMessOutput $op "Message size check:" 1 $currAvrg
18 | set currAvrg [ expr $currAvrg + $baseSize ]
19 | }
20 |
21 |
--------------------------------------------------------------------------------
/testing/12-null-null.c:
--------------------------------------------------------------------------------
1 | /*
2 | mpiP MPI Profiler ( http://llnl.github.io/mpiP )
3 |
4 | Please see COPYRIGHT AND LICENSE information at the end of this file.
5 |
6 | -----
7 |
8 | 12-null-null.c -- test for MPI_Init(NULL, NULL) support
9 |
10 | */
11 |
12 | #ifndef lint
13 | static char *svnid =
14 | "$Id$";
15 | #endif
16 |
17 | #include
18 | #include
19 |
20 | int main (int argc, char **argv)
21 | {
22 | int nprocs = -1;
23 | int rank = -1;
24 | float data = 0.0;
25 | int tag = 30;
26 | char processor_name[128];
27 | int namelen = 128;
28 |
29 | /* init */
30 | MPI_Init (NULL, NULL);
31 | MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
32 | MPI_Comm_rank (MPI_COMM_WORLD, &rank);
33 | printf ("Initializing (%d of %d)\n", rank, nprocs);
34 | MPI_Get_processor_name (processor_name, &namelen);
35 | printf ("(%d) is alive on %s\n", rank, processor_name);
36 | fflush (stdout);
37 | {
38 | int dest = (rank == nprocs - 1) ? (0) : (rank + 1);
39 | data = rank;
40 | MPI_Send (&data, 1, MPI_FLOAT, dest, tag, MPI_COMM_WORLD);
41 | printf ("(%d) sent data %f\n", rank, data);
42 | fflush (stdout);
43 | }
44 | {
45 | int src = (rank == 0) ? (nprocs - 1) : (rank - 1);
46 | MPI_Status status;
47 | MPI_Recv (&data, 1, MPI_FLOAT, src, tag, MPI_COMM_WORLD, &status);
48 | printf ("(%d) got data %f\n", rank, data);
49 | fflush (stdout);
50 | }
51 | MPI_Finalize ();
52 | printf ("(%d) Finished normally\n", rank);
53 | }
54 |
55 |
56 | /*
57 |
58 |
59 |
60 | Copyright (c) 2006, The Regents of the University of California.
61 | Produced at the Lawrence Livermore National Laboratory
62 | Written by Jeffery Vetter and Christopher Chambreau.
63 | UCRL-CODE-223450.
64 | All rights reserved.
65 |
66 | This file is part of mpiP. For details, see http://llnl.github.io/mpiP.
67 |
68 | Redistribution and use in source and binary forms, with or without
69 | modification, are permitted provided that the following conditions are
70 | met:
71 |
72 | * Redistributions of source code must retain the above copyright
73 | notice, this list of conditions and the disclaimer below.
74 |
75 | * Redistributions in binary form must reproduce the above copyright
76 | notice, this list of conditions and the disclaimer (as noted below) in
77 | the documentation and/or other materials provided with the
78 | distribution.
79 |
80 | * Neither the name of the UC/LLNL nor the names of its contributors
81 | may be used to endorse or promote products derived from this software
82 | without specific prior written permission.
83 |
84 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
85 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
86 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
87 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OF
88 | THE UNIVERSITY OF CALIFORNIA, THE U.S. DEPARTMENT OF ENERGY OR
89 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
90 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
91 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
92 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
93 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
94 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
95 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
96 |
97 |
98 | Additional BSD Notice
99 |
100 | 1. This notice is required to be provided under our contract with the
101 | U.S. Department of Energy (DOE). This work was produced at the
102 | University of California, Lawrence Livermore National Laboratory under
103 | Contract No. W-7405-ENG-48 with the DOE.
104 |
105 | 2. Neither the United States Government nor the University of
106 | California nor any of their employees, makes any warranty, express or
107 | implied, or assumes any liability or responsibility for the accuracy,
108 | completeness, or usefulness of any information, apparatus, product, or
109 | process disclosed, or represents that its use would not infringe
110 | privately-owned rights.
111 |
112 | 3. Also, reference herein to any specific commercial products,
113 | process, or services by trade name, trademark, manufacturer or
114 | otherwise does not necessarily constitute or imply its endorsement,
115 | recommendation, or favoring by the United States Government or the
116 | University of California. The views and opinions of authors expressed
117 | herein do not necessarily state or reflect those of the United States
118 | Government or the University of California, and shall not be used for
119 | advertising or product endorsement purposes.
120 |
121 |
122 |
123 | */
124 |
125 | /* EOF */
126 |
--------------------------------------------------------------------------------
/testing/12-null-null.exp:
--------------------------------------------------------------------------------
1 |
2 | ## Test-specific information
3 | #
4 |
5 | set test_title "12-null-null-exe: test for NULL MPI_Init args"
6 | set test "12-null-null.exe"
7 | set test_targ "./testing/$test"
8 | set procs 2
9 | set source_check_file "testing/12-null-null.src"
10 |
11 |
12 | source "testing/test_template.tcl"
13 |
14 | checkSource
15 |
16 | send_user "\n\n"
17 |
18 |
--------------------------------------------------------------------------------
/testing/12-null-null.src:
--------------------------------------------------------------------------------
1 |
2 | checkOutput "unknown|12-null-null" "Source check:"
3 |
4 |
--------------------------------------------------------------------------------
/testing/13-pcontrol-report.c:
--------------------------------------------------------------------------------
1 | /*
2 | mpiP MPI Profiler ( http://llnl.github.io/mpiP )
3 |
4 | Please see COPYRIGHT AND LICENSE information at the end of this file.
5 |
6 | -----
7 |
8 | 13-pcontrol-report.c -- test report generation with MPI_Pcontrol values
9 |
10 | */
11 |
12 |
13 | #ifndef lint
14 | static char *svnid =
15 | "$Id$";
16 | #endif
17 |
18 | #include
19 | #include
20 | #include
21 | #include
22 |
23 | int main (int argc, char **argv)
24 | {
25 | int nprocs = -1;
26 | int rank = -1;
27 | char buf[256];
28 |
29 | MPI_Init (&argc, &argv); /* use cmd line to disable mpip initially */
30 | MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
31 | MPI_Comm_rank (MPI_COMM_WORLD, &rank);
32 | gethostname (buf, 256);
33 | printf ("MPI comm size is %d with rank %d executing on %s\n",
34 | nprocs, rank, buf);
35 |
36 | MPI_Barrier (MPI_COMM_WORLD);
37 | sleep (1);
38 | MPI_Barrier (MPI_COMM_WORLD);
39 | MPI_Pcontrol (2); /* generate report */
40 | MPI_Barrier (MPI_COMM_WORLD);
41 | exit (1);
42 | #if 0
43 | sleep (1);
44 | MPI_Barrier (MPI_COMM_WORLD);
45 | MPI_Pcontrol (-1); /* generate report */
46 | sleep (1);
47 | MPI_Barrier (MPI_COMM_WORLD);
48 | sleep (1);
49 | MPI_Finalize ();
50 | #endif
51 | }
52 |
53 | /*
54 |
55 |
56 |
57 | Copyright (c) 2006, The Regents of the University of California.
58 | Produced at the Lawrence Livermore National Laboratory
59 | Written by Jeffery Vetter and Christopher Chambreau.
60 | UCRL-CODE-223450.
61 | All rights reserved.
62 |
63 | This file is part of mpiP. For details, see http://llnl.github.io/mpiP.
64 |
65 | Redistribution and use in source and binary forms, with or without
66 | modification, are permitted provided that the following conditions are
67 | met:
68 |
69 | * Redistributions of source code must retain the above copyright
70 | notice, this list of conditions and the disclaimer below.
71 |
72 | * Redistributions in binary form must reproduce the above copyright
73 | notice, this list of conditions and the disclaimer (as noted below) in
74 | the documentation and/or other materials provided with the
75 | distribution.
76 |
77 | * Neither the name of the UC/LLNL nor the names of its contributors
78 | may be used to endorse or promote products derived from this software
79 | without specific prior written permission.
80 |
81 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
82 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
83 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
84 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OF
85 | THE UNIVERSITY OF CALIFORNIA, THE U.S. DEPARTMENT OF ENERGY OR
86 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
87 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
88 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
89 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
90 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
91 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
92 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
93 |
94 |
95 | Additional BSD Notice
96 |
97 | 1. This notice is required to be provided under our contract with the
98 | U.S. Department of Energy (DOE). This work was produced at the
99 | University of California, Lawrence Livermore National Laboratory under
100 | Contract No. W-7405-ENG-48 with the DOE.
101 |
102 | 2. Neither the United States Government nor the University of
103 | California nor any of their employees, makes any warranty, express or
104 | implied, or assumes any liability or responsibility for the accuracy,
105 | completeness, or usefulness of any information, apparatus, product, or
106 | process disclosed, or represents that its use would not infringe
107 | privately-owned rights.
108 |
109 | 3. Also, reference herein to any specific commercial products,
110 | process, or services by trade name, trademark, manufacturer or
111 | otherwise does not necessarily constitute or imply its endorsement,
112 | recommendation, or favoring by the United States Government or the
113 | University of California. The views and opinions of authors expressed
114 | herein do not necessarily state or reflect those of the United States
115 | Government or the University of California, and shall not be used for
116 | advertising or product endorsement purposes.
117 |
118 |
119 |
120 | */
121 |
122 | /* EOF */
123 |
--------------------------------------------------------------------------------
/testing/14-mpiio.exp:
--------------------------------------------------------------------------------
1 |
2 | ## Test-specific information
3 | #
4 | set test_title "14-mpiio-exe: check supported MPI I/O calls"
5 | set test "14-mpiio.exe"
6 | set procs 2
7 | set source_check_file "testing/14-mpiio.src"
8 |
9 |
10 | source "testing/test_template.tcl"
11 |
12 | checkSource
13 |
14 | send_user "\n\n"
15 |
16 |
--------------------------------------------------------------------------------
/testing/14-mpiio.src:
--------------------------------------------------------------------------------
1 |
2 | proc checkIoOutput { text type count tot avrg } {
3 | set baseSize [ expr 256 * 8 ]
4 | set currAvrg [ format "%.3g" $avrg ]
5 | set currTot [ format "%.3g" $tot ]
6 | regsub "\\+" $currAvrg "\\\\+" currAvrg
7 | regsub "\\+" $currTot "\\\\+" currTot
8 | # send_user "currAvrg = $currAvrg\n"
9 | # send_user "currTot = $currTot\n"
10 | checkOutput "$text +\[0-9\]+ +$count +$currTot +$currAvrg" "Message size check:"
11 | }
12 |
13 | proc checkIoCount { text type count } {
14 | checkOutput "$text +\[0-9\]+ +\\* +$count" $type
15 | }
16 |
17 | set currAvrg 64
18 | set currTot 2560
19 |
20 | foreach op { File_read File_read_at File_write File_write_at } {
21 | checkIoOutput $op "Message size check:" 40 $currTot $currAvrg
22 | }
23 |
24 | set currAvrg 1280
25 |
26 | foreach op { File_read_all File_write_all } {
27 | checkIoOutput $op "Message size check:" 2 $currTot $currAvrg
28 | }
29 |
30 | foreach op { File_open File_close File_preallocate } {
31 | checkIoCount $op "Call count check:" 2
32 | }
33 |
34 | checkIoCount File_seek "Call count check:" 40
35 |
--------------------------------------------------------------------------------
/testing/15-pcontrol.c:
--------------------------------------------------------------------------------
1 | /*
2 | mpiP MPI Profiler ( http://llnl.github.io/mpiP )
3 |
4 | Please see COPYRIGHT AND LICENSE information at the end of this file.
5 |
6 | -----
7 |
8 | 15-pcontrol.c -- test deactivation of profiling with MPI_Pcontrol(0)
9 |
10 | */
11 |
12 | #ifndef lint
13 | static char *svnid =
14 | "$Id$";
15 | #endif
16 |
17 | #include
18 | #include
19 | #include
20 | #include
21 |
22 | int main (int argc, char **argv)
23 | {
24 | MPI_Init (&argc, &argv);
25 | MPI_Barrier (MPI_COMM_WORLD); /* profiling should initially be disabled */
26 | MPI_Pcontrol (1); /* enable profiling */
27 | MPI_Pcontrol (2); /* reset call site data */
28 | MPI_Barrier (MPI_COMM_WORLD);
29 | MPI_Pcontrol (0); /* disable profiling */
30 | MPI_Barrier (MPI_COMM_WORLD);
31 | MPI_Pcontrol (1); /* enable profiling */
32 | MPI_Barrier (MPI_COMM_WORLD);
33 | MPI_Finalize ();
34 | }
35 |
36 | /*
37 |
38 |
39 |
40 | Copyright (c) 2006, The Regents of the University of California.
41 | Produced at the Lawrence Livermore National Laboratory
42 | Written by Jeffery Vetter and Christopher Chambreau.
43 | UCRL-CODE-223450.
44 | All rights reserved.
45 |
46 | This file is part of mpiP. For details, see http://llnl.github.io/mpiP.
47 |
48 | Redistribution and use in source and binary forms, with or without
49 | modification, are permitted provided that the following conditions are
50 | met:
51 |
52 | * Redistributions of source code must retain the above copyright
53 | notice, this list of conditions and the disclaimer below.
54 |
55 | * Redistributions in binary form must reproduce the above copyright
56 | notice, this list of conditions and the disclaimer (as noted below) in
57 | the documentation and/or other materials provided with the
58 | distribution.
59 |
60 | * Neither the name of the UC/LLNL nor the names of its contributors
61 | may be used to endorse or promote products derived from this software
62 | without specific prior written permission.
63 |
64 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
65 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
66 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
67 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OF
68 | THE UNIVERSITY OF CALIFORNIA, THE U.S. DEPARTMENT OF ENERGY OR
69 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
70 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
71 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
72 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
73 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
74 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
75 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
76 |
77 |
78 | Additional BSD Notice
79 |
80 | 1. This notice is required to be provided under our contract with the
81 | U.S. Department of Energy (DOE). This work was produced at the
82 | University of California, Lawrence Livermore National Laboratory under
83 | Contract No. W-7405-ENG-48 with the DOE.
84 |
85 | 2. Neither the United States Government nor the University of
86 | California nor any of their employees, makes any warranty, express or
87 | implied, or assumes any liability or responsibility for the accuracy,
88 | completeness, or usefulness of any information, apparatus, product, or
89 | process disclosed, or represents that its use would not infringe
90 | privately-owned rights.
91 |
92 | 3. Also, reference herein to any specific commercial products,
93 | process, or services by trade name, trademark, manufacturer or
94 | otherwise does not necessarily constitute or imply its endorsement,
95 | recommendation, or favoring by the United States Government or the
96 | University of California. The views and opinions of authors expressed
97 | herein do not necessarily state or reflect those of the United States
98 | Government or the University of California, and shall not be used for
99 | advertising or product endorsement purposes.
100 |
101 |
102 |
103 | */
104 |
--------------------------------------------------------------------------------
/testing/15-pcontrol.exp:
--------------------------------------------------------------------------------
1 |
2 | ## Test-specific information
3 | #
4 | set test_title "15-pcontrol.exe : test profiling activation/deactivation control"
5 | set test "15-pcontrol.exe"
6 | set procs 2
7 | set env(MPIP) "-o"
8 | set source_check_file "testing/15-pcontrol.src"
9 |
10 |
11 | source "testing/test_template.tcl"
12 |
13 | checkSource
14 |
15 | send_user "\n\n"
16 |
17 |
--------------------------------------------------------------------------------
/testing/15-pcontrol.src:
--------------------------------------------------------------------------------
1 |
2 | checkOutput "0 15-pcontrol.c +28 \.?main" "Source check:"
3 | checkAbsent "0 15-pcontrol.c +30 \.?main" "Source check:"
4 | checkOutput "0 15-pcontrol.c +32 \.?main" "Source check:"
5 |
--------------------------------------------------------------------------------
/testing/16-waitallf.exp:
--------------------------------------------------------------------------------
1 |
2 | ## Test-specific information
3 | #
4 | set test_title "16-waitallf.exe : test Fortran/C opaque object translation with isend/irecv/waitall"
5 | set test "16-waitallf.exe"
6 | set env(MPIP) ""
7 | set procs 4
8 | set source_check_file "testing/16-waitallf.src"
9 |
10 |
11 | source "testing/test_template.tcl"
12 |
13 | checkSource
14 |
15 | send_user "\n\n"
16 |
17 |
--------------------------------------------------------------------------------
/testing/16-waitallf.f:
--------------------------------------------------------------------------------
1 | c
2 | c mpiP MPI Profiler ( http://llnl.github.io/mpiP )
3 | c
4 | c Please see COPYRIGHT AND LICENSE information at the end of this file.
5 | c
6 | c -----
7 | c
8 | c 16-waitallf.f -- test use of Waitall
9 | c
10 | program waitallf
11 | include "mpif.h"
12 |
13 | integer ierr, wsize, rank, starg, rtarg
14 | integer istat(MPI_STATUS_SIZE,2)
15 | integer req(2)
16 | real*8 sendbuf, recvbuf
17 |
18 | CALL MPI_INIT( ierr )
19 |
20 | CALL MPI_COMM_RANK( MPI_COMM_WORLD, rank, ierr )
21 | CALL MPI_COMM_SIZE( MPI_COMM_WORLD, wsize, ierr )
22 |
23 | starg = mod( rank+1, wsize )
24 | rtarg = mod( rank+wsize-1, wsize )
25 |
26 | print *, 'rank ', rank, ' has starget ', starg
27 | print *, 'rank ', rank, ' has rtarget ', rtarg
28 |
29 | CALL MPI_IRECV(recvbuf,1,MPI_DOUBLE_PRECISION,
30 | 1 rtarg,1,MPI_COMM_WORLD,req(1),ierr)
31 |
32 | CALL MPI_ISEND(sendbuf,1,MPI_DOUBLE_PRECISION,
33 | 1 starg,1,MPI_COMM_WORLD,req(2),ierr)
34 |
35 | CALL MPI_WAITALL(2,req,istat,ierr)
36 |
37 | CALL MPI_FINALIZE(ierr)
38 | print *, 'rank ', rank, ' returned from FINALIZE'
39 |
40 | end
41 |
42 | c
43 | c
44 | c
45 | c
46 | c Copyright (c) 2006, The Regents of the University of California.
47 | c Produced at the Lawrence Livermore National Laboratory
48 | c Written by Jeffery Vetter and Christopher Chambreau.
49 | c UCRL-CODE-223450.
50 | c All rights reserved.
51 | c
52 | c This file is part of mpiP. For details, see http://llnl.github.io/mpiP.
53 | c
54 | c Redistribution and use in source and binary forms, with or without
55 | c modification, are permitted provided that the following conditions are
56 | c met:
57 | c
58 | c * Redistributions of source code must retain the above copyright
59 | c notice, this list of conditions and the disclaimer below.
60 | c
61 | c * Redistributions in binary form must reproduce the above copyright
62 | c notice, this list of conditions and the disclaimer (as noted below) in
63 | c the documentation and/or other materials provided with the
64 | c distribution.
65 | c
66 | c * Neither the name of the UC/LLNL nor the names of its contributors
67 | c may be used to endorse or promote products derived from this software
68 | c without specific prior written permission.
69 | c
70 | c THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
71 | c "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
72 | c LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
73 | c A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OF
74 | c THE UNIVERSITY OF CALIFORNIA, THE U.S. DEPARTMENT OF ENERGY OR
75 | c CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
76 | c EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
77 | c PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
78 | c PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
79 | c LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
80 | c NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
81 | c SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
82 | c
83 | c
84 | c Additional BSD Notice
85 | c
86 | c 1. This notice is required to be provided under our contract with the
87 | c U.S. Department of Energy (DOE). This work was produced at the
88 | c University of California, Lawrence Livermore National Laboratory under
89 | c Contract No. W-7405-ENG-48 with the DOE.
90 | c
91 | c 2. Neither the United States Government nor the University of
92 | c California nor any of their employees, makes any warranty, express or
93 | c implied, or assumes any liability or responsibility for the accuracy,
94 | c completeness, or usefulness of any information, apparatus, product, or
95 | c process disclosed, or represents that its use would not infringe
96 | c privately-owned rights.
97 | c
98 | c 3. Also, reference herein to any specific commercial products,
99 | c process, or services by trade name, trademark, manufacturer or
100 | c otherwise does not necessarily constitute or imply its endorsement,
101 | c recommendation, or favoring by the United States Government or the
102 | c University of California. The views and opinions of authors expressed
103 | c herein do not necessarily state or reflect those of the United States
104 | c Government or the University of California, and shall not be used for
105 | c advertising or product endorsement purposes.
106 | c
107 | c
108 | c
109 | c
110 | c --- EOF
111 |
--------------------------------------------------------------------------------
/testing/16-waitallf.src:
--------------------------------------------------------------------------------
1 | checkOutput "0 16-waitallf.f.* +(29|30) \.?(waitallf.|main|MAIN..)" "Source check:"
2 | checkOutput "0 16-waitallf.f.* +(32|33) \.?(waitallf.|main|MAIN..)" "Source check:"
3 | checkOutput "0 16-waitallf.f.* +35 \.?(waitallf.|main|MAIN..)" "Source check:"
4 |
--------------------------------------------------------------------------------
/testing/17-rma.exp:
--------------------------------------------------------------------------------
1 |
2 | ## Test-specific information
3 | #
4 |
5 | set test_title "17-rma-exe: verify all targeted RMA calls are interposed"
6 | set test "17-rma.exe"
7 | set test_targ "./testing/$test"
8 | set procs 2
9 | set source_check_file "testing/17-rma.src"
10 |
11 |
12 | source "testing/test_template.tcl"
13 |
14 | checkSource
15 |
16 | send_user "\n\n"
17 |
18 |
--------------------------------------------------------------------------------
/testing/17-rma.src:
--------------------------------------------------------------------------------
1 | checkOutput "Accumulate" "Report check:"
2 | checkOutput "Get" "Report check:"
3 | checkOutput "Get_accumulate" "Report check:"
4 | checkOutput "Put" "Report check:"
5 | checkOutput "Win_allocate" "Report check:"
6 | checkOutput "Win_complete" "Report check:"
7 | checkOutput "Win_create" "Report check:"
8 | checkOutput "Win_fence" "Report check:"
9 | checkOutput "Win_free" "Report check:"
10 | checkOutput "Win_lock" "Report check:"
11 | checkOutput "Win_post" "Report check:"
12 | checkOutput "Rput" "Report check:"
13 | checkOutput "Win_start" "Report check:"
14 | checkOutput "Win_unlock" "Report check:"
15 | checkOutput "Win_wait" "Report check:"
16 | checkOutput "Win_get_info" "Report check:"
17 | checkOutput "Win_set_info" "Report check:"
18 | checkOutput "Win_create_dynamic" "Report check:"
19 | checkOutput "Win_attach" "Report check:"
20 | checkOutput "Win_detach" "Report check:"
21 |
--------------------------------------------------------------------------------
/testing/18-coll-non-block.exp:
--------------------------------------------------------------------------------
1 |
2 | ## Test-specific information
3 | #
4 | set test_title "18-coll-non-block-exe: check all supported operations for accurate size"
5 | set test "18-coll-non-block.exe"
6 | set procs 2
7 | set source_check_file "testing/18-coll-non-block.src"
8 |
9 |
10 | source "testing/test_template.tcl"
11 |
12 | checkSource
13 |
14 | send_user "\n\n"
15 |
16 |
--------------------------------------------------------------------------------
/testing/18-coll-non-block.src:
--------------------------------------------------------------------------------
1 | checkOutput "Iallgatherv" "Report check:"
2 | checkOutput "Iallgather " "Report check:"
3 | checkOutput "Ialltoallv" "Report check:"
4 | checkOutput "Ialltoallw" "Report check:"
5 | checkOutput "Ialltoall" "Report check:"
6 | checkOutput "Iallreduce" "Report check:"
7 | checkOutput "Ibarrier" "Report check:"
8 | checkOutput "Ibcast" "Report check:"
9 | checkOutput "Iexscan" "Report check:"
10 | checkOutput "Igatherv" "Report check:"
11 | checkOutput "Igather " "Report check:"
12 | checkOutput "Ireduce_scatter_block" "Report check:"
13 | checkOutput "Ireduce_scatter" "Report check:"
14 | checkOutput "Ireduce " "Report check:"
15 | checkOutput "Iscan" "Report check:"
16 | checkOutput "Iscatter " "Report check:"
17 | checkOutput "Iscatterv" "Report check:"
18 |
19 | proc checkMessOutput { text type count total } {
20 | checkOutput "$text +\[0-9\]+ +$count +$total" "Message size check:"
21 | }
22 |
23 | foreach op { Iallgatherv Iallgather Iallreduce Ialltoall Ibcast Iexscan Igather Igatherv Ireduce Ireduce_scatter_block Iscan Iscatter } {
24 | checkMessOutput $op "Message size check:" 2 16
25 | }
26 |
27 | foreach op { Ialltoallv Ialltoallw Ireduce_scatter Iscatterv } {
28 | checkMessOutput $op "Message size check:" 2 32
29 | }
30 |
--------------------------------------------------------------------------------
/testing/2-pcontrol.c:
--------------------------------------------------------------------------------
1 | /*
2 | mpiP MPI Profiler ( http://llnl.github.io/mpiP )
3 |
4 | Please see COPYRIGHT AND LICENSE information at the end of this file.
5 |
6 | -----
7 |
8 | 2-pcontrol.c - uses sleep to verify that Pcontrol disables profiling
9 |
10 | */
11 |
12 |
13 | #ifndef lint
14 | static char *svnid =
15 | "$Id$";
16 | #endif
17 |
18 | #include
19 | #include
20 | #include
21 |
22 | int main (int argc, char **argv)
23 | {
24 | int nprocs = -1;
25 | int rank = -1;
26 | char buf[256];
27 |
28 | MPI_Init (&argc, &argv); /* use cmd line to disable mpip initially */
29 | MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
30 | MPI_Comm_rank (MPI_COMM_WORLD, &rank);
31 | gethostname (buf, 256);
32 | printf ("MPI comm size is %d with rank %d executing on %s\n",
33 | nprocs, rank, buf);
34 |
35 | MPI_Barrier (MPI_COMM_WORLD);
36 | MPI_Pcontrol (1); /* enable */
37 | sleep (2);
38 | MPI_Barrier (MPI_COMM_WORLD);
39 | MPI_Pcontrol (0); /* disable */
40 | sleep (2);
41 | MPI_Pcontrol (1); /* enable */
42 | sleep (2);
43 | MPI_Barrier (MPI_COMM_WORLD);
44 | MPI_Pcontrol (0); /* disable */
45 | sleep (2);
46 | MPI_Barrier (MPI_COMM_WORLD);
47 | sleep (2);
48 | MPI_Finalize ();
49 | if (rank == 0)
50 | {
51 | printf ("\n\n ---> This program should execute for ~10 secs, \n"
52 | " ---> but MPIP should measure only ~4 secs.\n\n\n");
53 | }
54 | }
55 |
56 |
57 | /*
58 |
59 |
60 |
61 | Copyright (c) 2006, The Regents of the University of California.
62 | Produced at the Lawrence Livermore National Laboratory
63 | Written by Jeffery Vetter and Christopher Chambreau.
64 | UCRL-CODE-223450.
65 | All rights reserved.
66 |
67 | This file is part of mpiP. For details, see http://llnl.github.io/mpiP.
68 |
69 | Redistribution and use in source and binary forms, with or without
70 | modification, are permitted provided that the following conditions are
71 | met:
72 |
73 | * Redistributions of source code must retain the above copyright
74 | notice, this list of conditions and the disclaimer below.
75 |
76 | * Redistributions in binary form must reproduce the above copyright
77 | notice, this list of conditions and the disclaimer (as noted below) in
78 | the documentation and/or other materials provided with the
79 | distribution.
80 |
81 | * Neither the name of the UC/LLNL nor the names of its contributors
82 | may be used to endorse or promote products derived from this software
83 | without specific prior written permission.
84 |
85 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
86 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
87 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
88 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OF
89 | THE UNIVERSITY OF CALIFORNIA, THE U.S. DEPARTMENT OF ENERGY OR
90 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
91 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
92 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
93 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
94 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
95 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
96 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
97 |
98 |
99 | Additional BSD Notice
100 |
101 | 1. This notice is required to be provided under our contract with the
102 | U.S. Department of Energy (DOE). This work was produced at the
103 | University of California, Lawrence Livermore National Laboratory under
104 | Contract No. W-7405-ENG-48 with the DOE.
105 |
106 | 2. Neither the United States Government nor the University of
107 | California nor any of their employees, makes any warranty, express or
108 | implied, or assumes any liability or responsibility for the accuracy,
109 | completeness, or usefulness of any information, apparatus, product, or
110 | process disclosed, or represents that its use would not infringe
111 | privately-owned rights.
112 |
113 | 3. Also, reference herein to any specific commercial products,
114 | process, or services by trade name, trademark, manufacturer or
115 | otherwise does not necessarily constitute or imply its endorsement,
116 | recommendation, or favoring by the United States Government or the
117 | University of California. The views and opinions of authors expressed
118 | herein do not necessarily state or reflect those of the United States
119 | Government or the University of California, and shall not be used for
120 | advertising or product endorsement purposes.
121 |
122 |
123 |
124 | */
125 |
126 | /* EOF */
127 |
--------------------------------------------------------------------------------
/testing/3-stacktrace.c:
--------------------------------------------------------------------------------
1 | /*
2 | mpiP MPI Profiler ( http://llnl.github.io/mpiP )
3 |
4 | Please see COPYRIGHT AND LICENSE information at the end of this file.
5 |
6 | -----
7 |
8 | 3-stacktrace.c -- hot potato stack trace test
9 |
10 | */
11 |
12 | #ifndef lint
13 | static char *svnid =
14 | "$Id$";
15 | #endif
16 |
17 | #include
18 | #include
19 |
20 | int nprocs = -1;
21 | int rank = -1;
22 | int tag = 30;
23 | int dest, src;
24 | float data = 0.0;
25 |
26 |
27 | void
28 | sendData ()
29 | {
30 | dest = (rank == nprocs - 1) ? (0) : (rank + 1);
31 | data = rank;
32 | MPI_Send (&data, 1, MPI_FLOAT, dest, tag, MPI_COMM_WORLD);
33 | printf ("(%d) sent data %f\n", rank, data);
34 | fflush (stdout);
35 | }
36 |
37 |
38 | void
39 | recvData ()
40 | {
41 | int src = (rank == 0) ? (nprocs - 1) : (rank - 1);
42 | MPI_Status status;
43 | MPI_Recv (&data, 1, MPI_FLOAT, src, tag, MPI_COMM_WORLD, &status);
44 | printf ("(%d) got data %f\n", rank, data);
45 | fflush (stdout);
46 | }
47 |
48 |
49 | void
50 | exchangeData ()
51 | {
52 | MPI_Barrier (MPI_COMM_WORLD);
53 |
54 | if (rank % 2)
55 | {
56 | sendData ();
57 | recvData ();
58 | }
59 | else
60 | {
61 | recvData ();
62 | sendData ();
63 | }
64 | }
65 |
66 |
67 | int main (int argc, char **argv)
68 | {
69 | char processor_name[128];
70 | int namelen = 128;
71 |
72 | /* init */
73 | MPI_Init (&argc, &argv);
74 | MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
75 | MPI_Comm_rank (MPI_COMM_WORLD, &rank);
76 | printf ("Initializing (%d of %d)\n", rank, nprocs);
77 | MPI_Get_processor_name (processor_name, &namelen);
78 | printf ("(%d) is alive on %s\n", rank, processor_name);
79 | fflush (stdout);
80 |
81 | exchangeData ();
82 |
83 | MPI_Barrier (MPI_COMM_WORLD);
84 |
85 | MPI_Finalize ();
86 | printf ("(%d) Finished normally\n", rank);
87 | }
88 |
89 |
90 | /*
91 |
92 |
93 |
94 | Copyright (c) 2006, The Regents of the University of California.
95 | Produced at the Lawrence Livermore National Laboratory
96 | Written by Jeffery Vetter and Christopher Chambreau.
97 | UCRL-CODE-223450.
98 | All rights reserved.
99 |
100 | This file is part of mpiP. For details, see http://llnl.github.io/mpiP.
101 |
102 | Redistribution and use in source and binary forms, with or without
103 | modification, are permitted provided that the following conditions are
104 | met:
105 |
106 | * Redistributions of source code must retain the above copyright
107 | notice, this list of conditions and the disclaimer below.
108 |
109 | * Redistributions in binary form must reproduce the above copyright
110 | notice, this list of conditions and the disclaimer (as noted below) in
111 | the documentation and/or other materials provided with the
112 | distribution.
113 |
114 | * Neither the name of the UC/LLNL nor the names of its contributors
115 | may be used to endorse or promote products derived from this software
116 | without specific prior written permission.
117 |
118 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
119 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
120 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
121 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OF
122 | THE UNIVERSITY OF CALIFORNIA, THE U.S. DEPARTMENT OF ENERGY OR
123 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
124 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
125 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
126 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
127 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
128 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
129 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
130 |
131 |
132 | Additional BSD Notice
133 |
134 | 1. This notice is required to be provided under our contract with the
135 | U.S. Department of Energy (DOE). This work was produced at the
136 | University of California, Lawrence Livermore National Laboratory under
137 | Contract No. W-7405-ENG-48 with the DOE.
138 |
139 | 2. Neither the United States Government nor the University of
140 | California nor any of their employees, makes any warranty, express or
141 | implied, or assumes any liability or responsibility for the accuracy,
142 | completeness, or usefulness of any information, apparatus, product, or
143 | process disclosed, or represents that its use would not infringe
144 | privately-owned rights.
145 |
146 | 3. Also, reference herein to any specific commercial products,
147 | process, or services by trade name, trademark, manufacturer or
148 | otherwise does not necessarily constitute or imply its endorsement,
149 | recommendation, or favoring by the United States Government or the
150 | University of California. The views and opinions of authors expressed
151 | herein do not necessarily state or reflect those of the United States
152 | Government or the University of California, and shall not be used for
153 | advertising or product endorsement purposes.
154 |
155 |
156 |
157 | */
158 |
159 | /* EOF */
160 |
--------------------------------------------------------------------------------
/testing/3-stacktrace.exp:
--------------------------------------------------------------------------------
1 |
2 | ## Test-specific information
3 | #
4 | set test_title "3-stacktrace-exe: simple C Test with MPI"
5 | set test "3-stacktrace.exe"
6 | set procs 2
7 | set env(MPIP) "-k 3"
8 | set source_check_file "testing/3-stacktrace.src"
9 |
10 |
11 | source "testing/test_template.tcl"
12 |
13 | checkSource
14 |
15 | send_user "\n\n"
16 |
17 |
--------------------------------------------------------------------------------
/testing/3-stacktrace.src:
--------------------------------------------------------------------------------
1 |
2 | checkOutput "0 3-stacktrace.c +52 \.?exchangeData +Barrier" "Source check:"
3 | checkOutput "1 3-stacktrace.c +81 \.?main" "Source check:"
4 | checkOutput "0 3-stacktrace.c +83 \.?main +Barrier" "Source check:"
5 | checkOutput "0 3-stacktrace.c +43 \.?recvData +Recv" "Source check:"
6 | checkOutput "1 3-stacktrace.c +57 \.?exchangeData" "Source check:"
7 | checkOutput "2 3-stacktrace.c +81 \.?main" "Source check:"
8 | checkOutput "0 3-stacktrace.c +32 \.?sendData +Send" "Source check:"
9 | checkOutput "1 3-stacktrace.c +56 \.?exchangeData" "Source check:"
10 | checkOutput "2 3-stacktrace.c +81 \.?main" "Source check:"
11 | checkOutput "0 3-stacktrace.c +43 \.?recvData +Recv" "Source check:"
12 | checkOutput "1 3-stacktrace.c +61 \.?exchangeData" "Source check:"
13 | checkOutput "2 3-stacktrace.c +81 \.?main" "Source check:"
14 | checkOutput "0 3-stacktrace.c +32 \.?sendData +Send" "Source check:"
15 | checkOutput "1 3-stacktrace.c +62 \.?exchangeData" "Source check:"
16 | checkOutput "2 3-stacktrace.c +81 \.?main" "Source check:"
17 |
--------------------------------------------------------------------------------
/testing/4-demangle.C:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | mpiP MPI Profiler ( http://llnl.github.io/mpiP )
4 |
5 | Please see COPYRIGHT AND LICENSE information at the end of this file.
6 |
7 | -----
8 |
9 | 4-demangle.C -- test symbol demanging
10 |
11 | */
12 |
13 | #include
14 |
15 | class comm {
16 | public:
17 | comm(int*, char***);
18 | int doBarriers(MPI_Comm, const int);
19 | ~comm();
20 | };
21 |
22 | comm::comm(int* pargc, char*** pargv)
23 | {
24 | MPI_Init(pargc, pargv);
25 | MPI_Barrier(MPI_COMM_WORLD);
26 | }
27 |
28 |
29 | comm::~comm()
30 | {
31 | MPI_Barrier(MPI_COMM_WORLD);
32 | MPI_Finalize();
33 | }
34 |
35 |
36 | int comm::doBarriers(MPI_Comm com, const int x)
37 | {
38 | for ( int i = 0; i < x; i++ )
39 | MPI_Barrier(com);
40 |
41 | return 1;
42 | }
43 |
44 | int main(int argc, char** argv)
45 | {
46 | const int x = 10;
47 |
48 | comm *mpi = new comm(&argc, &argv);
49 |
50 | mpi->doBarriers(MPI_COMM_WORLD, x);
51 |
52 | delete mpi;
53 |
54 | }
55 |
56 |
57 | /*
58 |
59 |
60 |
61 | Copyright (c) 2006, The Regents of the University of California.
62 | Produced at the Lawrence Livermore National Laboratory
63 | Written by Jeffery Vetter and Christopher Chambreau.
64 | UCRL-CODE-223450.
65 | All rights reserved.
66 |
67 | This file is part of mpiP. For details, see http://llnl.github.io/mpiP.
68 |
69 | Redistribution and use in source and binary forms, with or without
70 | modification, are permitted provided that the following conditions are
71 | met:
72 |
73 | * Redistributions of source code must retain the above copyright
74 | notice, this list of conditions and the disclaimer below.
75 |
76 | * Redistributions in binary form must reproduce the above copyright
77 | notice, this list of conditions and the disclaimer (as noted below) in
78 | the documentation and/or other materials provided with the
79 | distribution.
80 |
81 | * Neither the name of the UC/LLNL nor the names of its contributors
82 | may be used to endorse or promote products derived from this software
83 | without specific prior written permission.
84 |
85 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
86 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
87 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
88 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OF
89 | THE UNIVERSITY OF CALIFORNIA, THE U.S. DEPARTMENT OF ENERGY OR
90 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
91 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
92 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
93 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
94 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
95 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
96 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
97 |
98 |
99 | Additional BSD Notice
100 |
101 | 1. This notice is required to be provided under our contract with the
102 | U.S. Department of Energy (DOE). This work was produced at the
103 | University of California, Lawrence Livermore National Laboratory under
104 | Contract No. W-7405-ENG-48 with the DOE.
105 |
106 | 2. Neither the United States Government nor the University of
107 | California nor any of their employees, makes any warranty, express or
108 | implied, or assumes any liability or responsibility for the accuracy,
109 | completeness, or usefulness of any information, apparatus, product, or
110 | process disclosed, or represents that its use would not infringe
111 | privately-owned rights.
112 |
113 | 3. Also, reference herein to any specific commercial products,
114 | process, or services by trade name, trademark, manufacturer or
115 | otherwise does not necessarily constitute or imply its endorsement,
116 | recommendation, or favoring by the United States Government or the
117 | University of California. The views and opinions of authors expressed
118 | herein do not necessarily state or reflect those of the United States
119 | Government or the University of California, and shall not be used for
120 | advertising or product endorsement purposes.
121 |
122 |
123 |
124 | */
125 |
126 | /* EOF */
127 |
--------------------------------------------------------------------------------
/testing/4-demangle.exp:
--------------------------------------------------------------------------------
1 |
2 | ## Test-specific information
3 | #
4 | set test_title "4-demangle-exe: demangling test with mpiPdmg lib"
5 | set test "4-demangle.exe"
6 | set procs 1
7 | set source_check_file "testing/4-demangle.src"
8 |
9 |
10 | source "testing/test_template.tcl"
11 |
12 | checkSource
13 |
14 | send_user "\n\n"
15 |
16 |
--------------------------------------------------------------------------------
/testing/4-demangle.src:
--------------------------------------------------------------------------------
1 | checkOutput "0 4-demangle.C +25 comm(::comm|::\.*__ct|.*)(\\(int ?\\*, ?char ?\\*\\*\\*\\)|) +Barrier" "Source check:"
2 | checkOutput "0 4-demangle.C +39 (comm::)?.?doBarriers\\((ompi_communicator_t\\*|int), ?(const)? ?int\\) +Barrier" "Source check:"
3 | checkOutput "0 4-demangle.C +31 (~comm|comm::(~comm|\.*__dt)\\((void)?\\)) +Barrier" "Source check:"
4 |
--------------------------------------------------------------------------------
/testing/6-nonblock.c:
--------------------------------------------------------------------------------
1 | /* -*- Mode: C; -*-
2 |
3 | mpiP MPI Profiler ( http://llnl.github.io/mpiP )
4 |
5 | Please see COPYRIGHT AND LICENSE information at the end of this file.
6 |
7 | -----
8 |
9 | 6-nonblock.c -- example of simple non-blocking communication
10 |
11 | */
12 |
13 |
14 | #ifndef lint
15 | static char *svnid =
16 | "$Id$";
17 | #endif
18 |
19 | #include
20 | #include
21 |
22 | #define MSG_CNT 4
23 |
24 | int main (int ac, char **av)
25 | {
26 | int i, j;
27 | MPI_Request r1, r2;
28 | MPI_Status s1, s2;
29 | int cnt = MSG_CNT;
30 | int tag = 111;
31 | MPI_Comm comm = MPI_COMM_WORLD;
32 | int nprocs, rank;
33 | float sendX[MSG_CNT] = { 1, 2, 3, 4 };
34 | float recvX[MSG_CNT];
35 |
36 | MPI_Init (&ac, &av);
37 | MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
38 | MPI_Comm_rank (MPI_COMM_WORLD, &rank);
39 | for (i = 0; i < 10; i++)
40 | {
41 | int src = (rank == 0) ? (nprocs - 1) : (rank - 1);
42 | int dest = (rank == nprocs - 1) ? (0) : (rank + 1);
43 | MPI_Irecv (recvX, cnt, MPI_FLOAT, src, tag, comm, &r1);
44 | MPI_Isend (sendX, cnt, MPI_FLOAT, dest, tag, comm, &r2);
45 | MPI_Wait (&r1, &s1);
46 | MPI_Wait (&r2, &s2);
47 | }
48 | MPI_Finalize ();
49 | }
50 |
51 |
52 | /*
53 |
54 |
55 |
56 | Copyright (c) 2006, The Regents of the University of California.
57 | Produced at the Lawrence Livermore National Laboratory
58 | Written by Jeffery Vetter and Christopher Chambreau.
59 | UCRL-CODE-223450.
60 | All rights reserved.
61 |
62 | This file is part of mpiP. For details, see http://llnl.github.io/mpiP.
63 |
64 | Redistribution and use in source and binary forms, with or without
65 | modification, are permitted provided that the following conditions are
66 | met:
67 |
68 | * Redistributions of source code must retain the above copyright
69 | notice, this list of conditions and the disclaimer below.
70 |
71 | * Redistributions in binary form must reproduce the above copyright
72 | notice, this list of conditions and the disclaimer (as noted below) in
73 | the documentation and/or other materials provided with the
74 | distribution.
75 |
76 | * Neither the name of the UC/LLNL nor the names of its contributors
77 | may be used to endorse or promote products derived from this software
78 | without specific prior written permission.
79 |
80 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
81 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
82 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
83 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OF
84 | THE UNIVERSITY OF CALIFORNIA, THE U.S. DEPARTMENT OF ENERGY OR
85 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
86 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
87 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
88 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
89 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
90 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
91 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
92 |
93 |
94 | Additional BSD Notice
95 |
96 | 1. This notice is required to be provided under our contract with the
97 | U.S. Department of Energy (DOE). This work was produced at the
98 | University of California, Lawrence Livermore National Laboratory under
99 | Contract No. W-7405-ENG-48 with the DOE.
100 |
101 | 2. Neither the United States Government nor the University of
102 | California nor any of their employees, makes any warranty, express or
103 | implied, or assumes any liability or responsibility for the accuracy,
104 | completeness, or usefulness of any information, apparatus, product, or
105 | process disclosed, or represents that its use would not infringe
106 | privately-owned rights.
107 |
108 | 3. Also, reference herein to any specific commercial products,
109 | process, or services by trade name, trademark, manufacturer or
110 | otherwise does not necessarily constitute or imply its endorsement,
111 | recommendation, or favoring by the United States Government or the
112 | University of California. The views and opinions of authors expressed
113 | herein do not necessarily state or reflect those of the United States
114 | Government or the University of California, and shall not be used for
115 | advertising or product endorsement purposes.
116 |
117 |
118 |
119 | */
120 |
121 | /* EOF */
122 |
--------------------------------------------------------------------------------
/testing/7-nonblock-waitall.c:
--------------------------------------------------------------------------------
1 | /* -*- Mode: C; -*-
2 | mpiP MPI Profiler ( http://llnl.github.io/mpiP )
3 |
4 | Please see COPYRIGHT AND LICENSE information at the end of this file.
5 |
6 | -----
7 |
8 | 7-nonblock-waitall.c -- example of simple non-blocking communication
9 |
10 | */
11 |
12 |
13 | #ifndef lint
14 | static char *svnid =
15 | "$Id$";
16 | #endif
17 |
18 | #include
19 | #include
20 |
21 | #define MSG_CNT 4
22 |
23 | int main (int ac, char **av)
24 | {
25 | int i, j;
26 | MPI_Request r[2];
27 | MPI_Status s[2];
28 | int cnt = MSG_CNT;
29 | int tag = 111;
30 | MPI_Comm comm = MPI_COMM_WORLD;
31 | int nprocs, rank;
32 | float sendX[MSG_CNT] = { 1, 2, 3, 4 };
33 | float recvX[MSG_CNT];
34 |
35 | MPI_Init (&ac, &av);
36 | MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
37 | MPI_Comm_rank (MPI_COMM_WORLD, &rank);
38 | for (i = 0; i < 10; i++)
39 | {
40 | int src = (rank == 0) ? (nprocs - 1) : (rank - 1);
41 | int dest = (rank == nprocs - 1) ? (0) : (rank + 1);
42 | MPI_Irecv (recvX, cnt, MPI_FLOAT, src, tag, comm, &r[0]);
43 | MPI_Isend (sendX, cnt, MPI_FLOAT, dest, tag, comm, &r[1]);
44 | MPI_Waitall (2, r, s);
45 | }
46 | MPI_Finalize ();
47 | }
48 |
49 | /* eof */
50 |
51 | /*
52 |
53 |
54 |
55 | Copyright (c) 2006, The Regents of the University of California.
56 | Produced at the Lawrence Livermore National Laboratory
57 | Written by Jeffery Vetter and Christopher Chambreau.
58 | UCRL-CODE-223450.
59 | All rights reserved.
60 |
61 | This file is part of mpiP. For details, see http://llnl.github.io/mpiP.
62 |
63 | Redistribution and use in source and binary forms, with or without
64 | modification, are permitted provided that the following conditions are
65 | met:
66 |
67 | * Redistributions of source code must retain the above copyright
68 | notice, this list of conditions and the disclaimer below.
69 |
70 | * Redistributions in binary form must reproduce the above copyright
71 | notice, this list of conditions and the disclaimer (as noted below) in
72 | the documentation and/or other materials provided with the
73 | distribution.
74 |
75 | * Neither the name of the UC/LLNL nor the names of its contributors
76 | may be used to endorse or promote products derived from this software
77 | without specific prior written permission.
78 |
79 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
80 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
81 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
82 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OF
83 | THE UNIVERSITY OF CALIFORNIA, THE U.S. DEPARTMENT OF ENERGY OR
84 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
85 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
86 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
87 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
88 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
89 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
90 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
91 |
92 |
93 | Additional BSD Notice
94 |
95 | 1. This notice is required to be provided under our contract with the
96 | U.S. Department of Energy (DOE). This work was produced at the
97 | University of California, Lawrence Livermore National Laboratory under
98 | Contract No. W-7405-ENG-48 with the DOE.
99 |
100 | 2. Neither the United States Government nor the University of
101 | California nor any of their employees, makes any warranty, express or
102 | implied, or assumes any liability or responsibility for the accuracy,
103 | completeness, or usefulness of any information, apparatus, product, or
104 | process disclosed, or represents that its use would not infringe
105 | privately-owned rights.
106 |
107 | 3. Also, reference herein to any specific commercial products,
108 | process, or services by trade name, trademark, manufacturer or
109 | otherwise does not necessarily constitute or imply its endorsement,
110 | recommendation, or favoring by the United States Government or the
111 | University of California. The views and opinions of authors expressed
112 | herein do not necessarily state or reflect those of the United States
113 | Government or the University of California, and shall not be used for
114 | advertising or product endorsement purposes.
115 |
116 |
117 |
118 | */
119 |
--------------------------------------------------------------------------------
/testing/8-test.c:
--------------------------------------------------------------------------------
1 | /* -*- Mode: C; -*-
2 |
3 | mpiP MPI Profiler ( http://llnl.github.io/mpiP )
4 |
5 | Please see COPYRIGHT AND LICENSE information at the end of this file.
6 |
7 | -----
8 |
9 | 8-test.c -- use MPI_Test to check for completion of operations
10 |
11 | */
12 |
13 |
14 | #ifndef lint
15 | static char *svnid =
16 | "$Id$";
17 | #endif
18 |
19 | #include
20 | #include
21 |
22 | #define MSG_CNT (2<<20)
23 |
24 | int main (int ac, char **av)
25 | {
26 | int i, j;
27 | MPI_Request r1, r2;
28 | MPI_Status s1, s2;
29 | int cnt = MSG_CNT;
30 | int tag = 111;
31 | MPI_Comm comm = MPI_COMM_WORLD;
32 | int nprocs, rank;
33 | float sendX[MSG_CNT] = { 1, 2, 3, 4 };
34 | float recvX[MSG_CNT];
35 | int flag;
36 |
37 | MPI_Init (&ac, &av);
38 | MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
39 | MPI_Comm_rank (MPI_COMM_WORLD, &rank);
40 | for (i = 0; i < 10; i++)
41 | {
42 | int src = (rank == 0) ? (nprocs - 1) : (rank - 1);
43 | int dest = (rank == nprocs - 1) ? (0) : (rank + 1);
44 | MPI_Irecv (recvX, cnt, MPI_FLOAT, src, tag, comm, &r1);
45 | MPI_Isend (sendX, cnt, MPI_FLOAT, dest, tag, comm, &r2);
46 | for (flag = 0; !flag;)
47 | {
48 | MPI_Test (&r1, &flag, &s1);
49 | }
50 | for (flag = 0; !flag;)
51 | {
52 | MPI_Test (&r2, &flag, &s2);
53 | }
54 | }
55 | MPI_Finalize ();
56 | }
57 |
58 |
59 | /*
60 |
61 |
62 |
63 | Copyright (c) 2006, The Regents of the University of California.
64 | Produced at the Lawrence Livermore National Laboratory
65 | Written by Jeffery Vetter and Christopher Chambreau.
66 | UCRL-CODE-223450.
67 | All rights reserved.
68 |
69 | This file is part of mpiP. For details, see http://llnl.github.io/mpiP.
70 |
71 | Redistribution and use in source and binary forms, with or without
72 | modification, are permitted provided that the following conditions are
73 | met:
74 |
75 | * Redistributions of source code must retain the above copyright
76 | notice, this list of conditions and the disclaimer below.
77 |
78 | * Redistributions in binary form must reproduce the above copyright
79 | notice, this list of conditions and the disclaimer (as noted below) in
80 | the documentation and/or other materials provided with the
81 | distribution.
82 |
83 | * Neither the name of the UC/LLNL nor the names of its contributors
84 | may be used to endorse or promote products derived from this software
85 | without specific prior written permission.
86 |
87 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
88 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
89 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
90 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OF
91 | THE UNIVERSITY OF CALIFORNIA, THE U.S. DEPARTMENT OF ENERGY OR
92 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
93 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
94 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
95 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
96 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
97 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
98 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
99 |
100 |
101 | Additional BSD Notice
102 |
103 | 1. This notice is required to be provided under our contract with the
104 | U.S. Department of Energy (DOE). This work was produced at the
105 | University of California, Lawrence Livermore National Laboratory under
106 | Contract No. W-7405-ENG-48 with the DOE.
107 |
108 | 2. Neither the United States Government nor the University of
109 | California nor any of their employees, makes any warranty, express or
110 | implied, or assumes any liability or responsibility for the accuracy,
111 | completeness, or usefulness of any information, apparatus, product, or
112 | process disclosed, or represents that its use would not infringe
113 | privately-owned rights.
114 |
115 | 3. Also, reference herein to any specific commercial products,
116 | process, or services by trade name, trademark, manufacturer or
117 | otherwise does not necessarily constitute or imply its endorsement,
118 | recommendation, or favoring by the United States Government or the
119 | University of California. The views and opinions of authors expressed
120 | herein do not necessarily state or reflect those of the United States
121 | Government or the University of California, and shall not be used for
122 | advertising or product endorsement purposes.
123 |
124 |
125 |
126 | */
127 |
128 | /* EOF */
129 |
--------------------------------------------------------------------------------
/testing/9-test-mpip-time.c:
--------------------------------------------------------------------------------
1 | /* -*- C -*-
2 |
3 | mpiP MPI Profiler ( http://llnl.github.io/mpiP )
4 |
5 | Please see COPYRIGHT AND LICENSE information at the end of this file.
6 |
7 | -----
8 |
9 | 9-test-mpip-time.c -- concoct a simple scheme that we can test mpiP
10 | numbers with
11 |
12 | */
13 |
14 |
15 | #ifndef lint
16 | static char *svnid =
17 | "$Id$";
18 | #endif
19 |
20 | #include
21 | #include
22 | #include
23 | #include "mpi.h"
24 |
25 |
26 | int sleeptime = (10);
27 |
28 | int main (int argc, char **argv)
29 | {
30 | int nprocs = -1;
31 | int rank = -1;
32 | char buf[256];
33 | MPI_Comm comm = MPI_COMM_WORLD;
34 |
35 | /* Call MPI_Init before checking args for MPICH */
36 | MPI_Init (&argc, &argv);
37 |
38 | if (argc > 2)
39 | {
40 | printf ("usage: %s \n", argv[0]);
41 | MPI_Finalize ();
42 | exit (1);
43 | }
44 | if (argc == 2)
45 | {
46 | sleeptime = atoi (argv[1]);
47 | }
48 |
49 | MPI_Comm_size (comm, &nprocs);
50 | MPI_Comm_rank (comm, &rank);
51 | MPI_Barrier (comm);
52 | switch (rank)
53 | {
54 | case 0:
55 | sleep (sleeptime); /* slacker! holding everyone else up */
56 | break;
57 | default:
58 | break;
59 | }
60 | MPI_Barrier (comm);
61 | MPI_Finalize ();
62 | printf ("(%d) Finished normally\n", rank);
63 | }
64 |
65 |
66 | /*
67 |
68 |
69 |
70 | Copyright (c) 2006, The Regents of the University of California.
71 | Produced at the Lawrence Livermore National Laboratory
72 | Written by Jeffery Vetter and Christopher Chambreau.
73 | UCRL-CODE-223450.
74 | All rights reserved.
75 |
76 | This file is part of mpiP. For details, see http://llnl.github.io/mpiP.
77 |
78 | Redistribution and use in source and binary forms, with or without
79 | modification, are permitted provided that the following conditions are
80 | met:
81 |
82 | * Redistributions of source code must retain the above copyright
83 | notice, this list of conditions and the disclaimer below.
84 |
85 | * Redistributions in binary form must reproduce the above copyright
86 | notice, this list of conditions and the disclaimer (as noted below) in
87 | the documentation and/or other materials provided with the
88 | distribution.
89 |
90 | * Neither the name of the UC/LLNL nor the names of its contributors
91 | may be used to endorse or promote products derived from this software
92 | without specific prior written permission.
93 |
94 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
95 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
96 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
97 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OF
98 | THE UNIVERSITY OF CALIFORNIA, THE U.S. DEPARTMENT OF ENERGY OR
99 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
100 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
101 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
102 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
103 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
104 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
105 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
106 |
107 |
108 | Additional BSD Notice
109 |
110 | 1. This notice is required to be provided under our contract with the
111 | U.S. Department of Energy (DOE). This work was produced at the
112 | University of California, Lawrence Livermore National Laboratory under
113 | Contract No. W-7405-ENG-48 with the DOE.
114 |
115 | 2. Neither the United States Government nor the University of
116 | California nor any of their employees, makes any warranty, express or
117 | implied, or assumes any liability or responsibility for the accuracy,
118 | completeness, or usefulness of any information, apparatus, product, or
119 | process disclosed, or represents that its use would not infringe
120 | privately-owned rights.
121 |
122 | 3. Also, reference herein to any specific commercial products,
123 | process, or services by trade name, trademark, manufacturer or
124 | otherwise does not necessarily constitute or imply its endorsement,
125 | recommendation, or favoring by the United States Government or the
126 | University of California. The views and opinions of authors expressed
127 | herein do not necessarily state or reflect those of the United States
128 | Government or the University of California, and shall not be used for
129 | advertising or product endorsement purposes.
130 |
131 |
132 |
133 | */
134 |
135 | /* EOF */
136 |
--------------------------------------------------------------------------------
/testing/Makefile.in:
--------------------------------------------------------------------------------
1 | # Makefile for MPIP -*-Makefile-*-
2 | # Please see license in doc/UserGuide.html
3 | # @configure_input@
4 |
5 | srcdir=@srcdir@
6 | include_mpi_io_tests=@ENABLE_MPI_IO@
7 | include_mpi_rma_tests=@ENABLE_MPI_RMA@
8 | VPATH = $(srcdir)
9 |
10 | include ../Defs.mak
11 |
12 | # Specify compile flags to ensure debugging symbols and no optimization
13 | CFLAGS = -g
14 | FFLAGS = -g
15 | LDFLAGS += -L..
16 | CXXLIBS := -l$(MPIPCXXLIB) $(LIBS) $(CXXLIBS)
17 | FLIBS := -l$(MPIPFLIB) $(LIBS)
18 | LIBS := -lmpiP $(LIBS)
19 | CPPFLAGS =
20 |
21 | CSRCS = 0-simple.c \
22 | 0-simple-c++.C \
23 | 1-hot-potato.c \
24 | 2-pcontrol.c \
25 | 3-stacktrace.c \
26 | 4-demangle.C \
27 | 5-medley.c \
28 | 6-nonblock.c \
29 | 7-nonblock-waitall.c \
30 | 8-test.c \
31 | 9-test-mpip-time.c \
32 | 10-coll-mess-size.c \
33 | 11-p2p-mess-size.c \
34 | 12-null-null.c \
35 | 13-pcontrol-report.c \
36 | 15-pcontrol.c \
37 | 18-coll-non-block.c
38 |
39 | ifeq (${include_mpi_io_tests},yes)
40 | CSRCS += 14-mpiio.c
41 | endif
42 |
43 | ifeq (${include_mpi_rma_tests},yes)
44 | CSRCS += 17-rma.c
45 | endif
46 |
47 | FSRCS = 0-simplef.f sweep-ops.f sweep-ops-stack.f 16-waitallf.f
48 |
49 | TEXES = $(CSRCS:.c=.exe)
50 | EXES = $(TEXES:.C=.exe)
51 | EXES += $(FSRCS:.f=.exe)
52 |
53 | all: ${EXES}
54 | make -C mt
55 | @echo All done.
56 |
57 |
58 | .SUFFIXES: .exe
59 | .c.exe::
60 | ${CC} ${CFLAGS} ${CPPFLAGS} $< ${ADD_OBJS} -o $@ ${LDFLAGS} ${LIBS}
61 |
62 | .C.exe:
63 | ${CXX} ${CFLAGS} ${CPPFLAGS} $< ${ADD_OBJS} -o $@ ${LDFLAGS} ${CXXLIBS}
64 |
65 | .f.exe:
66 | ${FC} ${FFLAGS} ${CPPFLAGS} $< ${ADD_OBJS} -o $@ ${LDFLAGS} ${FLIBS}
67 |
68 | clean::
69 | rm -f ${EXES} *.mpiP *.o
70 | make -C mt clean
71 |
72 | include $(srcdir)/../Rules.mak
73 |
74 | ##### EOF
75 |
--------------------------------------------------------------------------------
/testing/bfd-test.c:
--------------------------------------------------------------------------------
1 | /* -*- C -*-
2 |
3 | mpiP MPI Profiler ( http://llnl.github.io/mpiP )
4 |
5 | Please see COPYRIGHT AND LICENSE information at the end of this file.
6 |
7 | -----
8 |
9 | bfd-test.c -- is the bfd link successful?
10 | *
11 | */
12 |
13 |
14 | #ifndef lint
15 | static char *svnid =
16 | "$Id$";
17 | #endif
18 |
19 |
20 |
21 | main (int ac, char **av)
22 | {
23 | void *pc;
24 | char *filename;
25 | char *functname;
26 | int lineno;
27 |
28 | if (ac != 3)
29 | {
30 | printf ("usage: %s \n", av[0]);
31 | exit (1);
32 | }
33 |
34 | open_bfd_executable (av[1]);
35 | sscanf (av[2], "%x", &pc);
36 | find_src_loc (pc, &filename, &lineno, &functname);
37 | printf ("\npc = %x (%d) -> %s:%d:%s\n", (long) pc, (long) pc, filename,
38 | lineno, functname);
39 | close_bfd_executable ();
40 | }
41 |
42 |
43 | /*
44 |
45 |
46 |
47 | Copyright (c) 2006, The Regents of the University of California.
48 | Produced at the Lawrence Livermore National Laboratory
49 | Written by Jeffery Vetter and Christopher Chambreau.
50 | UCRL-CODE-223450.
51 | All rights reserved.
52 |
53 | This file is part of mpiP. For details, see http://llnl.github.io/mpiP.
54 |
55 | Redistribution and use in source and binary forms, with or without
56 | modification, are permitted provided that the following conditions are
57 | met:
58 |
59 | * Redistributions of source code must retain the above copyright
60 | notice, this list of conditions and the disclaimer below.
61 |
62 | * Redistributions in binary form must reproduce the above copyright
63 | notice, this list of conditions and the disclaimer (as noted below) in
64 | the documentation and/or other materials provided with the
65 | distribution.
66 |
67 | * Neither the name of the UC/LLNL nor the names of its contributors
68 | may be used to endorse or promote products derived from this software
69 | without specific prior written permission.
70 |
71 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
72 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
73 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
74 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OF
75 | THE UNIVERSITY OF CALIFORNIA, THE U.S. DEPARTMENT OF ENERGY OR
76 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
77 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
78 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
79 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
80 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
81 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
82 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
83 |
84 |
85 | Additional BSD Notice
86 |
87 | 1. This notice is required to be provided under our contract with the
88 | U.S. Department of Energy (DOE). This work was produced at the
89 | University of California, Lawrence Livermore National Laboratory under
90 | Contract No. W-7405-ENG-48 with the DOE.
91 |
92 | 2. Neither the United States Government nor the University of
93 | California nor any of their employees, makes any warranty, express or
94 | implied, or assumes any liability or responsibility for the accuracy,
95 | completeness, or usefulness of any information, apparatus, product, or
96 | process disclosed, or represents that its use would not infringe
97 | privately-owned rights.
98 |
99 | 3. Also, reference herein to any specific commercial products,
100 | process, or services by trade name, trademark, manufacturer or
101 | otherwise does not necessarily constitute or imply its endorsement,
102 | recommendation, or favoring by the United States Government or the
103 | University of California. The views and opinions of authors expressed
104 | herein do not necessarily state or reflect those of the United States
105 | Government or the University of California, and shall not be used for
106 | advertising or product endorsement purposes.
107 |
108 |
109 |
110 | */
111 |
112 | /* EOF */
113 |
--------------------------------------------------------------------------------
/testing/mt/01_mt_send-recv_b.c:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 | #include
4 | #include //getopt
5 | #include
6 | #include
7 | #include "mt_common.h"
8 |
9 | void send_b(int tid)
10 | {
11 | int i;
12 | double start;
13 |
14 | mt_common_sync();
15 |
16 | mt_common_thr_enter(tid);
17 |
18 | MT_COMMON_DBG(tid,"Start");
19 | start = GET_TS();
20 | for(i=0; i < mt_common_iter(); i++) {
21 | int buf;
22 | MPI_Send(&buf, 1, MPI_INT, mt_common_nbr(), tid, MPI_COMM_WORLD);
23 | }
24 | mt_common_stat_append(tid, TEST_MPI_SEND, mt_common_iter(), GET_TS() - start);
25 |
26 | MT_COMMON_DBG(tid,"End");
27 | mt_common_thr_exit(tid);
28 | }
29 |
30 | void recv_b(int tid)
31 | {
32 | int i;
33 | double start;
34 |
35 | mt_common_sync();
36 |
37 | mt_common_thr_enter(tid);
38 |
39 | MT_COMMON_DBG(tid,"Start");
40 | start = GET_TS();
41 | for(i=0; i < mt_common_iter(); i++) {
42 | int buf;
43 | MPI_Recv(&buf, 1, MPI_INT, mt_common_nbr(), tid,
44 | MPI_COMM_WORLD, MPI_STATUS_IGNORE);
45 | }
46 | mt_common_stat_append(tid, TEST_MPI_RECV, mt_common_iter(), GET_TS() - start);
47 |
48 | MT_COMMON_DBG(tid,"End");
49 | mt_common_thr_exit(tid);
50 | }
51 |
52 | int main(int argc, char **argv)
53 | {
54 | mt_common_thrptr_t *workers, func_ptr = NULL;
55 | int i;
56 |
57 | mt_common_init(&argc, &argv);
58 |
59 | workers = calloc(mt_common_nthreads(), sizeof(*workers));
60 | if( mt_common_rank() % 2 == 0 ) {
61 | func_ptr = send_b;
62 | } else {
63 | func_ptr = recv_b;
64 | }
65 | for(i=0; i < mt_common_nthreads(); i++) {
66 | workers[i] = func_ptr;
67 | }
68 |
69 | mt_common_exec(workers);
70 |
71 | mt_common_fini();
72 |
73 | free(workers);
74 | return 0;
75 | }
76 |
77 | /*
78 |
79 |
80 |
81 | Copyright (c) 2019 Mellanox Technologies Ltd.
82 | Written by Artem Polyakov
83 | All rights reserved.
84 |
85 | This file is part of mpiP. For details, see http://llnl.github.io/mpiP.
86 |
87 | Redistribution and use in source and binary forms, with or without
88 | modification, are permitted provided that the following conditions are
89 | met:
90 |
91 | * Redistributions of source code must retain the above copyright
92 | notice, this list of conditions and the disclaimer below.
93 |
94 | * Redistributions in binary form must reproduce the above copyright
95 | notice, this list of conditions and the disclaimer (as noted below) in
96 | the documentation and/or other materials provided with the
97 | distribution.
98 |
99 | * Neither the name of the UC/LLNL nor the names of its contributors
100 | may be used to endorse or promote products derived from this software
101 | without specific prior written permission.
102 |
103 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
104 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
105 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
106 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OF
107 | THE UNIVERSITY OF CALIFORNIA, THE U.S. DEPARTMENT OF ENERGY OR
108 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
109 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
110 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
111 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
112 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
113 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
114 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
115 |
116 |
117 | Additional BSD Notice
118 |
119 | 1. This notice is required to be provided under our contract with the
120 | U.S. Department of Energy (DOE). This work was produced at the
121 | University of California, Lawrence Livermore National Laboratory under
122 | Contract No. W-7405-ENG-48 with the DOE.
123 |
124 | 2. Neither the United States Government nor the University of
125 | California nor any of their employees, makes any warranty, express or
126 | implied, or assumes any liability or responsibility for the accuracy,
127 | completeness, or usefulness of any information, apparatus, product, or
128 | process disclosed, or represents that its use would not infringe
129 | privately-owned rights.
130 |
131 | 3. Also, reference herein to any specific commercial products,
132 | process, or services by trade name, trademark, manufacturer or
133 | otherwise does not necessarily constitute or imply its endorsement,
134 | recommendation, or favoring by the United States Government or the
135 | University of California. The views and opinions of authors expressed
136 | herein do not necessarily state or reflect those of the United States
137 | Government or the University of California, and shall not be used for
138 | advertising or product endorsement purposes.
139 |
140 |
141 |
142 | */
143 |
--------------------------------------------------------------------------------
/testing/mt/01_mt_send-recv_b.exp:
--------------------------------------------------------------------------------
1 |
2 | ## Test-specific information
3 | #
4 |
5 | set test_title "01_mt_send-recv_b: multi-threaded send/recv test"
6 | set test "mt/01_mt_send-recv_b.exe"
7 | set procs 2
8 | set test_args "-m -t 4"
9 | set source_check_file "testing/mt/01_mt_send-recv_b.src"
10 |
11 |
12 | source "testing/test_template.tcl"
13 |
14 | checkSource
15 |
16 | send_user "\n\n"
17 |
18 |
--------------------------------------------------------------------------------
/testing/mt/01_mt_send-recv_b.src:
--------------------------------------------------------------------------------
1 |
2 | checkOutput "Recv .* 4000 " "Count check:"
3 | checkOutput "Send .* 4000 " "Count check:"
4 | checkOutput "Gather .* 12 " "Count check:"
5 |
--------------------------------------------------------------------------------
/testing/mt/02_mt_send-recv_nb.exp:
--------------------------------------------------------------------------------
1 |
2 | ## Test-specific information
3 | #
4 |
5 | set test_title "02_mt_send-recv_nb: multi-threaded isend/irecv test"
6 | set test "mt/02_mt_send-recv_nb.exe"
7 | set procs 2
8 | set test_args "-m -t 6 -n 700"
9 | set source_check_file "testing/mt/02_mt_send-recv_nb.src"
10 |
11 | source "testing/test_template.tcl"
12 |
13 | checkSource
14 |
15 | send_user "\n\n"
16 |
17 |
--------------------------------------------------------------------------------
/testing/mt/02_mt_send-recv_nb.src:
--------------------------------------------------------------------------------
1 |
2 | checkOutput "Irecv .* 4200 " "Count check:"
3 | checkOutput "Isend .* 4200 " "Count check:"
4 | checkOutput "Waitall .* 84 " "Count check:"
5 | checkOutput "Gather .* 12 " "Count check:"
6 |
--------------------------------------------------------------------------------
/testing/mt/03_mt_barrier.c:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 | #include
4 | #include //getopt
5 | #include
6 | #include
7 | #include "mt_common.h"
8 |
9 | void barrier_worker(int tid)
10 | {
11 | int i, j;
12 | double start;
13 |
14 | mt_common_sync();
15 |
16 | MT_COMMON_DBG(tid, "Start");
17 | mt_common_thr_enter(tid);
18 | start = GET_TS();
19 | for(i=0; i < mt_common_iter(); i++) {
20 | MPI_Barrier(mt_common_comm(tid));
21 | }
22 | mt_common_stat_append(tid, TEST_MPI_BARRIER, mt_common_iter(),
23 | GET_TS() - start);
24 | MT_COMMON_DBG(tid,"End");
25 | mt_common_thr_exit(tid);
26 | }
27 |
28 | int main(int argc, char **argv)
29 | {
30 | mt_common_thrptr_t *workers;
31 | int i;
32 |
33 | mt_common_init(&argc, &argv);
34 |
35 | workers = calloc(mt_common_nthreads(), sizeof(*workers));
36 | for(i=0; i < mt_common_nthreads(); i++) {
37 | workers[i] = barrier_worker;
38 | }
39 |
40 | mt_common_exec(workers);
41 |
42 | mt_common_fini();
43 |
44 | free(workers);
45 | }
46 |
47 | /*
48 |
49 |
50 |
51 | Copyright (c) 2019 Mellanox Technologies Ltd.
52 | Written by Artem Polyakov
53 | All rights reserved.
54 |
55 | This file is part of mpiP. For details, see http://llnl.github.io/mpiP.
56 |
57 | Redistribution and use in source and binary forms, with or without
58 | modification, are permitted provided that the following conditions are
59 | met:
60 |
61 | * Redistributions of source code must retain the above copyright
62 | notice, this list of conditions and the disclaimer below.
63 |
64 | * Redistributions in binary form must reproduce the above copyright
65 | notice, this list of conditions and the disclaimer (as noted below) in
66 | the documentation and/or other materials provided with the
67 | distribution.
68 |
69 | * Neither the name of the UC/LLNL nor the names of its contributors
70 | may be used to endorse or promote products derived from this software
71 | without specific prior written permission.
72 |
73 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
74 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
75 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
76 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OF
77 | THE UNIVERSITY OF CALIFORNIA, THE U.S. DEPARTMENT OF ENERGY OR
78 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
79 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
80 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
81 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
82 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
83 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
84 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
85 |
86 |
87 | Additional BSD Notice
88 |
89 | 1. This notice is required to be provided under our contract with the
90 | U.S. Department of Energy (DOE). This work was produced at the
91 | University of California, Lawrence Livermore National Laboratory under
92 | Contract No. W-7405-ENG-48 with the DOE.
93 |
94 | 2. Neither the United States Government nor the University of
95 | California nor any of their employees, makes any warranty, express or
96 | implied, or assumes any liability or responsibility for the accuracy,
97 | completeness, or usefulness of any information, apparatus, product, or
98 | process disclosed, or represents that its use would not infringe
99 | privately-owned rights.
100 |
101 | 3. Also, reference herein to any specific commercial products,
102 | process, or services by trade name, trademark, manufacturer or
103 | otherwise does not necessarily constitute or imply its endorsement,
104 | recommendation, or favoring by the United States Government or the
105 | University of California. The views and opinions of authors expressed
106 | herein do not necessarily state or reflect those of the United States
107 | Government or the University of California, and shall not be used for
108 | advertising or product endorsement purposes.
109 |
110 |
111 |
112 | */
113 |
--------------------------------------------------------------------------------
/testing/mt/03_mt_barrier.exp:
--------------------------------------------------------------------------------
1 |
2 | ## Test-specific information
3 | #
4 |
5 | set test_title "03_mt_barrier: multi-threaded barrier test"
6 | set test "mt/03_mt_barrier.exe"
7 | set procs 2
8 | set test_args "-m -t 8 -n 678"
9 | set source_check_file "testing/mt/03_mt_barrier.src"
10 |
11 | source "testing/test_template.tcl"
12 |
13 | checkSource
14 |
15 | send_user "\n\n"
16 |
17 | # Do not pass args to other tests
18 | set test_args ""
19 |
--------------------------------------------------------------------------------
/testing/mt/03_mt_barrier.src:
--------------------------------------------------------------------------------
1 |
2 | checkOutput "Barrier .* 10848 " "Count check:"
3 | checkOutput "Gather .* 12 " "Count check:"
4 |
--------------------------------------------------------------------------------
/testing/mt/04_mt_dynamic_threads.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LLNL/mpiP/29faf3a32930044868807175db84b0c47934393c/testing/mt/04_mt_dynamic_threads.c
--------------------------------------------------------------------------------
/testing/mt/Makefile:
--------------------------------------------------------------------------------
1 |
2 | include ../../Defs.mak
3 |
4 | HEADERS = mt_common.h
5 |
6 | EXE_SRCS = 01_mt_send-recv_b.c \
7 | 02_mt_send-recv_nb.c \
8 | 03_mt_barrier.c \
9 | # 04_mt_dynamic_threads.c
10 |
11 | EXES = ${EXE_SRCS:.c=.exe}
12 |
13 | LIBS += -lpthread -L../.. -lmpiP
14 |
15 | .PHONY: all
16 | all: ${EXES}
17 |
18 | mt_common.o : mt_common.c $(HEADERS)
19 | ${CC} ${CFLAGS} ${CPPFLAGS} -c $< -o $@
20 |
21 | %.exe : %.c mt_common.o $(HEADERS)
22 | ${CC} ${CFLAGS} ${CPPFLAGS} $< ${ADD_OBJS} mt_common.o ${ADD_OBJS} -o $@ ${LDFLAGS} ${LIBS}
23 |
24 | clean::
25 | rm -f ${EXES} *.o *.mpiP
26 |
27 |
--------------------------------------------------------------------------------
/testing/mt/mt_common.h:
--------------------------------------------------------------------------------
1 | #ifndef MT_COMMON_H
2 | #define MT_COMMON_H
3 |
4 | #include
5 | #include
6 | #include
7 | #include //getopt
8 | #include
9 | #include
10 |
11 | #define GET_TS() ({ \
12 | struct timespec ts; \
13 | double ret = 0; \
14 | clock_gettime(CLOCK_MONOTONIC, &ts); \
15 | ret = ts.tv_sec + 1E-9*ts.tv_nsec; \
16 | ret; \
17 | })
18 |
19 | typedef enum {
20 | TEST_MPI_SEND,
21 | TEST_MPI_RECV,
22 | TEST_MPI_ISEND,
23 | TEST_MPI_IRECV,
24 | TEST_MPI_WAITALL,
25 | TEST_MPI_BARRIER,
26 | TEST_MPI_COUNT
27 | } test_mpi_call_ids_t;
28 |
29 | int mt_common_dbg();
30 | #define MT_COMMON_DBG(tid,fmt,args...) \
31 | if(mt_common_dbg()) \
32 | printf("%d:%d:%s: " fmt " \n", \
33 | mt_common_rank(), tid, __FUNCTION__, \
34 | ## args); \
35 |
36 | void mt_common_init(int *argc, char ***argv);
37 | void mt_common_fini();
38 |
39 | int mt_common_nthreads();
40 | int mt_common_rank();
41 | int mt_common_size();
42 | int mt_common_nbr();
43 | int mt_common_iter();
44 |
45 | typedef void (*mt_common_thrptr_t)(int tid);
46 | void mt_common_exec(mt_common_thrptr_t *workers);
47 |
48 | void mt_common_thr_enter(int tid);
49 | void mt_common_thr_exit(int tid);
50 | void mt_common_stat_append(int tid, test_mpi_call_ids_t id,
51 | int count, double duration);
52 | void mt_common_sync();
53 | MPI_Comm mt_common_comm(int tid);
54 |
55 | #endif // MT_COMMON_H
56 |
57 | /*
58 |
59 |
60 |
61 | Copyright (c) 2019 Mellanox Technologies Ltd.
62 | Written by Artem Polyakov
63 | All rights reserved.
64 |
65 | This file is part of mpiP. For details, see http://llnl.github.io/mpiP.
66 |
67 | Redistribution and use in source and binary forms, with or without
68 | modification, are permitted provided that the following conditions are
69 | met:
70 |
71 | * Redistributions of source code must retain the above copyright
72 | notice, this list of conditions and the disclaimer below.
73 |
74 | * Redistributions in binary form must reproduce the above copyright
75 | notice, this list of conditions and the disclaimer (as noted below) in
76 | the documentation and/or other materials provided with the
77 | distribution.
78 |
79 | * Neither the name of the UC/LLNL nor the names of its contributors
80 | may be used to endorse or promote products derived from this software
81 | without specific prior written permission.
82 |
83 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
84 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
85 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
86 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OF
87 | THE UNIVERSITY OF CALIFORNIA, THE U.S. DEPARTMENT OF ENERGY OR
88 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
89 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
90 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
91 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
92 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
93 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
94 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
95 |
96 |
97 | Additional BSD Notice
98 |
99 | 1. This notice is required to be provided under our contract with the
100 | U.S. Department of Energy (DOE). This work was produced at the
101 | University of California, Lawrence Livermore National Laboratory under
102 | Contract No. W-7405-ENG-48 with the DOE.
103 |
104 | 2. Neither the United States Government nor the University of
105 | California nor any of their employees, makes any warranty, express or
106 | implied, or assumes any liability or responsibility for the accuracy,
107 | completeness, or usefulness of any information, apparatus, product, or
108 | process disclosed, or represents that its use would not infringe
109 | privately-owned rights.
110 |
111 | 3. Also, reference herein to any specific commercial products,
112 | process, or services by trade name, trademark, manufacturer or
113 | otherwise does not necessarily constitute or imply its endorsement,
114 | recommendation, or favoring by the United States Government or the
115 | University of California. The views and opinions of authors expressed
116 | herein do not necessarily state or reflect those of the United States
117 | Government or the University of California, and shall not be used for
118 | advertising or product endorsement purposes.
119 |
120 |
121 |
122 | */
123 |
--------------------------------------------------------------------------------
/testing/sweep-ops-stack.exp:
--------------------------------------------------------------------------------
1 |
2 | set test_title "sweep-ops-stack-exe: Fortran test with stack trace"
3 | set test "sweep-ops-stack.exe"
4 | set test_targ "./testing/$test"
5 | set procs 4
6 | set source_check_file "testing/sweep-ops-stack.src"
7 |
8 | set env(MPIP) "-k 3"
9 |
10 | source "testing/test_template.tcl"
11 |
12 | checkSource
13 |
14 | send_user "\n\n"
15 |
16 |
--------------------------------------------------------------------------------
/testing/sweep-ops-stack.src:
--------------------------------------------------------------------------------
1 |
2 |
3 | checkOutput "0 sweep-ops-stack.* +(77|78) \.?runtest. +Allreduce" "Source check:"
4 | checkOutput "1 sweep-ops-stack.* +115 \.?(simsweep3d.|main|MAIN..)" "Source check:"
5 | checkOutput "0 sweep-ops-stack.* +18 \.?do_bcasts.. +Bcast" "Source check:"
6 | checkOutput "1 sweep-ops-stack.* +53 \.?runtest." "Source check:"
7 | checkOutput "2 sweep-ops-stack.* +115 \.?(simsweep3d.|main|MAIN..)" "Source check:"
8 | checkOutput "0 sweep-ops-stack.* +54 \.?runtest. +Barrier" "Source check:"
9 | checkOutput "1 sweep-ops-stack.* +115 \.?(simsweep3d.|main|MAIN..)" "Source check:"
10 | checkOutput "0 sweep-ops-stack.* +67 \.?runtest. +Barrier" "Source check:"
11 | checkOutput "1 sweep-ops-stack.* +115 \.?(simsweep3d.|main|MAIN..)" "Source check:"
12 | checkOutput "0 sweep-ops-stack.* +41 \.?runtest. +Barrier" "Source check:"
13 | checkOutput "1 sweep-ops-stack.* +115 \.?(simsweep3d.|main|MAIN..)" "Source check:"
14 | checkOutput "0 sweep-ops-stack.* +(21|22) \.?do_bcasts.. +Bcast" "Source check:"
15 | checkOutput "1 sweep-ops-stack.* +53 \.?runtest." "Source check:"
16 | checkOutput "2 sweep-ops-stack.* +115 \.?(simsweep3d.|main|MAIN..)" "Source check:"
17 | checkOutput "0 sweep-ops-stack.* +(77|78) \.?runtest. +Allreduce" "Source check:"
18 | checkOutput "1 sweep-ops-stack.* +115 \.?(simsweep3d.|main|MAIN..)" "Source check:"
19 | checkOutput "0 sweep-ops-stack.* +(58|59) \.?runtest. +Send" "Source check:"
20 | checkOutput "1 sweep-ops-stack.* +115 \.?(simsweep3d.|main|MAIN..)" "Source check:"
21 | checkOutput "0 sweep-ops-stack.* +(62|63) \.?runtest. +Recv" "Source check:"
22 | checkOutput "1 sweep-ops-stack.* +115 \.?(simsweep3d.|main|MAIN..)" "Source check:"
23 |
24 |
--------------------------------------------------------------------------------
/testing/sweep-ops.exp:
--------------------------------------------------------------------------------
1 |
2 | set test_title "sweep-ops.exe: Fortran test app w/communication"
3 | set test "sweep-ops.exe"
4 | set test_targ "./testing/$test"
5 | set procs 4
6 | set source_check_file "testing/sweep-ops.src"
7 |
8 | set env(MPIP) "-k 1"
9 |
10 | source "testing/test_template.tcl"
11 |
12 | checkSource
13 |
14 | send_user "\n\n"
15 |
16 |
--------------------------------------------------------------------------------
/testing/sweep-ops.src:
--------------------------------------------------------------------------------
1 |
2 | checkOutput "sweep-ops.f +(82|83) (\.?simsweep3d\.|main|MAIN..) +Allreduce" "Source check:"
3 | checkOutput "sweep-ops.f +51 (\.?simsweep3d.|main|MAIN..) +Bcast" "Source check:"
4 | checkOutput "sweep-ops.f +(63|64) (\.?simsweep3d.|main|MAIN..) +Send" "Source check:"
5 | checkOutput "sweep-ops.f +(54|55) (\.?simsweep3d.|main|MAIN..) +Bcast" "Source check:"
6 | checkOutput "sweep-ops.f +59 (\.?simsweep3d.|main|MAIN..) +Barrier" "Source check:"
7 | checkOutput "sweep-ops.f +36 (\.?simsweep3d.|main|MAIN..) +Barrier" "Source check:"
8 | checkOutput "sweep-ops.f +(85|86) (\.?simsweep3d.|main|MAIN..) +Allreduce" "Source check:"
9 | checkOutput "sweep-ops.f +72 (\.?simsweep3d.|main|MAIN..) +Barrier" "Source check:"
10 | checkOutput "sweep-ops.f +(67|68) (\.?simsweep3d.|main|MAIN..) +Recv" "Source check:"
11 |
--------------------------------------------------------------------------------
/testing/test_template.tcl:
--------------------------------------------------------------------------------
1 | set test_targ "./testing/$test"
2 | global expect_out
3 | exec sleep $pause_time
4 |
5 | proc checkOutput { text type } {
6 | global outFile
7 | global test
8 | # send_user "in checkOutput for $text\n"
9 | set timeout 5
10 | spawn cat $outFile
11 | expect {
12 | -re $text {
13 | send_user "found $type $text\n"
14 | # wait
15 | # close
16 | }
17 | timeout { fail "$test timed out\n" }
18 | eof { fail "$test $type $text\n" }
19 | }
20 | }
21 |
22 |
23 | proc checkAbsent { text type } {
24 | global outFile
25 | global test
26 | # send_user "in checkOutput for $text\n"
27 | set timeout 5
28 | spawn cat $outFile
29 | expect {
30 | -re $text {
31 | fail "$test $type $text\n"
32 | # wait
33 | # close
34 | }
35 | timeout { fail "$test timed out\n" }
36 | eof { send_user "no $type $text\n" }
37 | }
38 | }
39 |
40 |
41 | proc runTest { } {
42 | global launch pool rmpool procs test_targ test expect_out env test_args
43 |
44 | set timeout 20
45 |
46 | if { ! [info exists test_args] } {
47 | set test_args ""
48 | }
49 |
50 | case "$launch" in {
51 | { "jsrun" } {
52 | set pre_args ""
53 | set pre_procs "-p$procs"
54 | set command "$launch $pre_args $pre_procs $test_targ $test_args"
55 | send_user "${command} \n"
56 | spawn -noecho {*}${command}
57 | }
58 | { "prun" | "srun" } {
59 | set pre_args "-p$pool"
60 | set pre_procs "-n$procs"
61 | send_user "$launch $pre_args $pre_procs $test_targ $test_args\n"
62 | spawn -noecho $launch $pre_args $pre_procs $test_targ {*}$test_args
63 | }
64 | { "mpirun" } {
65 | set pre_args "-np"
66 | set pre_procs $procs
67 | send_user "$launch $pre_args $pre_procs $test_targ $test_args\n"
68 | spawn -noecho $launch $pre_args $pre_procs $test_targ {*}$test_args
69 | }
70 | { "poe" } {
71 | set env(MP_PROCS) "$procs"
72 | # send_user "set MP_PROCS to $procs=$env(MP_PROCS)"
73 | set env(MP_NODES) 1
74 | set env(MP_RMPOOL) $rmpool
75 | send_user "$launch $test_targ $test_args\n"
76 | spawn -noecho $launch $test_targ {*}$test_args
77 | }
78 | }
79 |
80 | set expect_out(1,string) ""
81 | expect {
82 | -re "mpiP: Storing mpiP output in .\./(.*\.mpiP)\](.*)" {
83 | # wait
84 | # close
85 | }
86 | timeout { fail "$test timed out" }
87 | eof { fail "$test failed" }
88 |
89 | }
90 |
91 | # send_user "$expect_out(buffer)"
92 | sleep 1
93 | }
94 |
95 |
96 | proc checkSource { } {
97 |
98 | global expect_out
99 | global source_check_file
100 | global test outFile test_targ
101 |
102 | if ![file executable $test_targ ] { return }
103 |
104 | runTest
105 |
106 | # set buflen [string length $expect_out(buffer)]
107 | # set arrlen [array size expect_out]
108 | # set arrnames [array names expect_out]
109 | # send_user "expect_buffer length $buflen - arrlen = $arrlen, arrnames = $arrnames\n"
110 | if { [string length $expect_out(buffer)] == 0 || [array size expect_out] < 3 \
111 | || [string length $expect_out(1,string)] == 0 } {
112 | fail "Couldn't find mpiP report file."
113 | return
114 | }
115 |
116 | set outFile $expect_out(1,string)
117 | send_user "Found mpiP report file: $outFile\n"
118 | set expect_out(1) ""
119 | set expect_out(buffer) ""
120 |
121 | source $source_check_file
122 | pass "$test passed"
123 | }
124 |
125 |
--------------------------------------------------------------------------------
/testing/testing.exp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LLNL/mpiP/29faf3a32930044868807175db84b0c47934393c/testing/testing.exp
--------------------------------------------------------------------------------