1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194
|
/*
* Copyright 1998-1999, University of Notre Dame.
* Authors: Brian W. Barrett, Arun F. Rodrigues, Jeffrey M. Squyres,
* and Andrew Lumsdaine
*
* This file is part of XMPI
*
* You should have received a copy of the License Agreement for XMPI
* along with the software; see the file LICENSE. If not, contact
* Office of Research, University of Notre Dame, Notre Dame, IN 46556.
*
* Permission to modify the code and to distribute modified code is
* granted, provided the text of this NOTICE is retained, a notice that
* the code was modified is included with the above COPYRIGHT NOTICE and
* with the COPYRIGHT NOTICE in the LICENSE file, and that the LICENSE
* file is distributed with the modified code.
*
* LICENSOR MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED.
* By way of example, but not limitation, Licensor MAKES NO
* REPRESENTATIONS OR WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY
* PARTICULAR PURPOSE OR THAT THE USE OF THE LICENSED SOFTWARE COMPONENTS
* OR DOCUMENTATION WILL NOT INFRINGE ANY PATENTS, COPYRIGHTS, TRADEMARKS
* OR OTHER RIGHTS.
*
* Additional copyrights may follow.
*
* $Id: mpitrace.h,v 1.3 1999/11/08 07:15:40 arodrig6 Exp $
*
* Function: - MPI tracing constants and templates
*/
#ifndef _MPITRACE_H
#define _MPITRACE_H
#include <xmpi_config.h>
#include "lam.h"
/*
* macros
*/
#define LAM_S2US(time) ((int) ((time) * 1000000.0))
/*
* constants
*/
#define LAM_TRMAGIC 1279348022 /* LAM trace file magic number */
#define TRDTINITBUFSIZE 16 /* initial buffer size */
#define TRDPROGMAX 32 /* max length of program name */
#define TRDTCONTIG ((int4) 0) /* contiguous */
#define TRDTVECTOR ((int4) 1) /* vector */
#define TRDTHVECTOR ((int4) 2) /* hvector */
#define TRDTINDEXED ((int4) 3) /* indexed */
#define TRDTHINDEXED ((int4) 4) /* hindexed */
#define TRDTSTRUCT ((int4) 5) /* structure */
#define TRDTBYTE ((int4) 6) /* byte */
#define TRDTCHAR ((int4) 7) /* C char */
#define TRDTUCHAR ((int4) 8) /* C unsigned character */
#define TRDTSHORT ((int4) 9) /* C short */
#define TRDTUSHORT ((int4) 10) /* C unsigned short */
#define TRDTINT ((int4) 11) /* C int */
#define TRDTUINT ((int4) 12) /* C unsigned integer */
#define TRDTFLOGICAL ((int4) 13) /* F77 logical */
#define TRDTLONG ((int4) 14) /* C long */
#define TRDTULONG ((int4) 15) /* C unsigned long */
#define TRDTFLOAT ((int4) 16) /* C float */
#define TRDTDOUBLE ((int4) 17) /* C double */
#define TRDTFCOMPLEX ((int4) 18) /* F77 complex */
#define TRDTUB ((int4) 19) /* upper bound */
#define TRDTLB ((int4) 20) /* lower bound */
#define TRDTPACKED ((int4) 21) /* packed */
#define TRDT2INT ((int4) 22) /* C 2 ints */
#define TRDTFLOATINT ((int4) 25) /* C float-int */
#define TRDTDOUBLEINT ((int4) 26) /* C double-int */
#define TRDTLONGINT ((int4) 27) /* C long-int */
#define TRDTSHORTINT ((int4) 28) /* C short-int */
#define TRDTLONGDOUBLE ((int4) 29) /* C long double */
#define TRDTLONGDBLINT ((int4) 30) /* C long double-int */
#define TRDTFINTEGER ((int4) 31) /* F77 integer */
#define TRDTFCHARACTER ((int4) 32) /* F77 character */
#define TRDTFREAL ((int4) 33) /* F77 real */
#define TRDTFDBLPREC ((int4) 34) /* F77 double precision */
#define TRDTFDBLCOMPLEX ((int4) 35) /* F77 double complex */
#define TRDTF2INTEGER ((int4) 36) /* F77 2 integers */
#define TRDTF2REAL ((int4) 37) /* F77 2 reals */
#define TRDTF2DBLPREC ((int4) 38) /* F77 2 double precision */
#define TRDTLONGLONG ((int4) 39) /* C long long */
#define TRDTULONGLONG ((int4) 40) /* C unsigned long long */
#define TRDTWCHAR ((int4) 41) /* C wchar_t */
#define TRDTMAX ((int4) 41) /* highest flat datatype */
/*
* trace states
*/
#define TRDTRUN 0 /* running */
#define TRDTBLOCK 1 /* blocked */
#define TRDTSYSTEM 2 /* system overhead */
/*
* structures
*/
struct trsrc {
int4 trs_node; /* node of process that made trace */
int4 trs_pid; /* pid of process that made trace */
int4 trs_listno; /* list number of the trace */
#define TRRUNTIME 0 /* runtime trace list */
#define TRCOMM -2 /* communicator trace list */
#define TRDTYPE -3 /* datatype trace list */
#define TRONOFF -4 /* tracing init/on/off trace list */
#define TRWORLD -5 /* world trace list */
int4 trs_pad; /* for alignment */
};
struct trcid {
int4 trc_cid; /* cid */
int4 trc_nlg; /* size of local group */
int4 trc_nrg; /* size of remote group */
int4 trc_pad; /* for alignment */
};
struct trdtype {
int4 trd_param0;
#define trd_dtype trd_param0 /* datatype */
#define trd_disp trd_param0 /* displacement (index/struct) */
#define trd_stride trd_param0 /* stride (vector) */
int4 trd_param1;
#define trd_count trd_param1 /* # datatype entries */
#define trd_length trd_param1 /* length of entry */
};
struct trrthdr {
float8 trr_time; /* trace time (sec) */
int4 trr_type; /* trace type */
#define TRTINIT ((int4) 0) /* initialize */
#define TRTSUBCHG ((int4) 1) /* substrate change */
#define TRTOUTPUT ((int4) 2) /* output */
#define TRTINPUT ((int4) 3) /* input */
#define TRTNOIO ((int4) 4) /* no IO */
#define TRTRON ((int4) 5) /* tracing on */
#define TRTROFF ((int4) 6) /* tracing off */
int4 trr_pad; /* for alignment */
};
struct tronoff {
int4 tro_trnum; /* trace number */
int4 tro_pad; /* for alignment */
};
struct trinit {
float8 tri_skew; /* clock skew (sec) */
char tri_name[TRDPROGMAX]; /* application name */
};
struct trmsg {
int4 trm_topfunc; /* top-level function */
int4 trm_wrapfunc; /* wrapper function */
int4 trm_syst; /* trace time in system (usec) */
int4 trm_blkt; /* trace time blocked (usec) */
int4 trm_peer; /* peer rank */
int4 trm_tag; /* tag */
int4 trm_cid; /* context ID */
int4 trm_dtype; /* datatype label */
int4 trm_count; /* message count */
int4 trm_mrank; /* src rank matched in case of wcard */
int4 trm_mtag; /* tag matched in case of wcard */
int4 trm_seqnum; /* sequence number */
};
struct trxchg {
int4 trx_topfunc; /* top-level function */
int4 trx_sub; /* new substrate */
};
#ifdef __cplusplus
extern "C" {
#endif
extern void format_proc __ARGS((int, int, int, int, int, char *));
extern void format_cid __ARGS((int, char *));
extern void format_tag __ARGS((int, char*));
extern void format_dtype __ARGS((int, char *, int));
extern void mpitr_dataprint __ARGS((char *, char *, int, int, int));
extern void print_dtype __ARGS((int, int, int, char *));
extern void print_comm __ARGS((int, int, int, int));
extern int mpitr_dtypeget __ARGS((int4, int4, int4, char **));
#ifdef __cplusplus
}
#endif
#endif /* _MPITRACE_H */
|