From 31ac7445865c583ab56fbd75022ee52e908527de Mon Sep 17 00:00:00 2001 From: Dan Wells Date: Wed, 14 Apr 1999 16:15:23 -0500 Subject: [svn-r1179] Changes made to enable automatic building of list of event IDs and to make output of HDF 4 and HDF 5 tracing compatible. --- pablo/HDF5record_RT.h | 176 --------------------- pablo/HDFIOTrace.h | 419 ++++++++++++++++++++++++++++++++++++++++++++++++++ pablo/HDFTrace.h | 139 +++++++++++++++++ 3 files changed, 558 insertions(+), 176 deletions(-) delete mode 100644 pablo/HDF5record_RT.h create mode 100644 pablo/HDFIOTrace.h create mode 100644 pablo/HDFTrace.h diff --git a/pablo/HDF5record_RT.h b/pablo/HDF5record_RT.h deleted file mode 100644 index f3bbe4e..0000000 --- a/pablo/HDF5record_RT.h +++ /dev/null @@ -1,176 +0,0 @@ -/* - * This file is part of the Pablo Performance Analysis Environment - * - * (R) - * The Pablo Performance Analysis Environment software is NOT in - * the public domain. However, it is freely available without fee for - * education, research, and non-profit purposes. By obtaining copies - * of this and other files that comprise the Pablo Performance Analysis - * Environment, you, the Licensee, agree to abide by the following - * conditions and understandings with respect to the copyrighted software: - * - * 1. The software is copyrighted in the name of the Board of Trustees - * of the University of Illinois (UI), and ownership of the software - * remains with the UI. - * - * 2. Permission to use, copy, and modify this software and its documentation - * for education, research, and non-profit purposes is hereby granted - * to Licensee, provided that the copyright notice, the original author's - * names and unit identification, and this permission notice appear on - * all such copies, and that no charge be made for such copies. Any - * entity desiring permission to incorporate this software into commercial - * products should contact: - * - * Professor Daniel A. Reed reed@cs.uiuc.edu - * University of Illinois - * Department of Computer Science - * 2413 Digital Computer Laboratory - * 1304 West Springfield Avenue - * Urbana, Illinois 61801 - * USA - * - * 3. Licensee may not use the name, logo, or any other symbol of the UI - * nor the names of any of its employees nor any adaptation thereof in - * advertizing or publicity pertaining to the software without specific - * prior written approval of the UI. - * - * 4. THE UI MAKES NO REPRESENTATIONS ABOUT THE SUITABILITY OF THE - * SOFTWARE FOR ANY PURPOSE. IT IS PROVIDED "AS IS" WITHOUT EXPRESS - * OR IMPLIED WARRANTY. - * - * 5. The UI shall not be liable for any damages suffered by Licensee from - * the use of this software. - * - * 6. The software was developed under agreements between the UI and the - * Federal Government which entitle the Government to certain rights. - * - ************************************************************************** - * - * Developed by: The Pablo Research Group - * University of Illinois at Urbana-Champaign - * Department of Computer Science - * 1304 W. Springfield Avenue - * Urbana, IL 61801 - * - * http://www-pablo.cs.uiuc.edu - * - * Send comments to: pablo-feedback@guitar.cs.uiuc.edu - * - * Copyright (c) 1987-1996 - * The University of Illinois Board of Trustees. - * All Rights Reserved. - * - * PABLO is a registered trademark of - * The Board of Trustees of the University of Illinois - * registered in the U.S. Patent and Trademark Office. - * - * Author: Dan Wells (dwells@cs.uiuc.edu) - * - * Project Manager and Principal Investigator: - * Daniel A. Reed (reed@cs.uiuc.edu) - * - * Funded in part by National Science Foundation grants NSF CCR87-06653 - * and NSF CDA87-22836 (Tapestry), DARPA contracts DABT63-91-K-0004, - * DABT63-93-C-0040, DABT63-94-C-0049 (SIO), and F30602-96-C-0161, NASA - * contracts NAG-1-613 (ICLASS), USRA 5555-22, and NGT-51023, and a - * collaborative research agreement with the Intel Supercomputer - * Systems Division - */ -/* - * HDFrecord.h: Class to represent HDF records. - * - * $Header$ - */ - -#ifndef HDF5RECORD_RT_H -#define HDF5RECORD_RT_H -#ifndef NULL -#define NULL 0 -#endif - -#include -#include -#include -#include "ProcIDs.h" - -#ifndef min -#define min( x , y ) ( x <= y ? x : y ) -#endif -#ifndef max -#define max( x , y ) ( x >= y ? x : y ) -#endif -/*======================================================================* -// Enumeration of time fields in an HDFrec_t below * -//======================================================================*/ -enum TimeFields { HDF_, MPI, Malloc, AllIO, Open, Close, Read, Write, ARead, - AWrite, Seek, Wait, Misc, nTallyFields }; -/*======================================================================* -// Enumeration of byte fields in an HDFrec_t below * -//======================================================================*/ -enum ByteFields{ MallocBytes, ReadBytes, WriteBytes, AReadBytes, AWriteBytes, - nByteFields }; -/*======================================================================* -// Definition of first and last IO event. * -//======================================================================*/ -#define FirstIO Open -#define LastIO Misc -#define nBkts 4 -#define ONEK 1024 -int BktLim[] = { 1, 4*ONEK, 64*ONEK, 256*ONEK, INT_MAX } ; -/*======================================================================* -// Definition of structure used to account activity in an HDF call * -//======================================================================*/ -typedef struct { - int nCalls; /* number of proc calls */ - CLOCK lastCall; /* time of last call */ - CLOCK incDur; /* inclusive duration */ - CLOCK excDur; /* exclusive duration */ - CLOCK times[nTallyFields]; /* Tally op/calls times */ - int counts[nTallyFields]; /* Tally op/calls counts */ - int bytes[nByteFields]; /* Tally bytes transferred */ - int Hists[nByteFields][nBkts]; /* Historgrams */ - long hdfID; /* data set ID */ - long xRef; /* data set cross reference */ -} HDFrec_t; -/*======================================================================* -// Node used to maintain linked lists of HDF procedure activity. * -//======================================================================*/ -typedef struct HDFnode { - CLOCK lastIOtime; /* last IO time stamp */ - HDFrec_t record; /* data */ - struct HDFnode *ptr; /* link pointer */ - int eventID; /* event ID */ -} HDFnode_t; -/*======================================================================* -// Structure used to produce SDDF packets for Named identifiers. * -//======================================================================*/ -typedef struct { - int packetLength; /* bytes in packet */ - int packetType; /* == PKT_DATA */ - int packetTag; /* == FAMILY_ */ - int fileType; /* Type of data set */ - int fileID; /* File ID */ - int nameLen; /* length of file */ -} HDFNamePacket_t; -/*======================================================================* -// Node used to form linked lists to track named identifiers. * -//======================================================================*/ -typedef struct fileRec { - struct fileRec *ptr; - long hdfID; - long PabloID; - char *fileName; -} fileRec_t; -/*======================================================================= -// Utility programs to determine field index for a given eventID * -//=====================================================================*/ -int getHDFFieldIndex( int eventID ); -int getHDFByteFieldIndex( int eventID ); - -/* - * Define flags to distinguish misc i/o begin from misc i/o end - */ -#define MISC_BEGIN 0 -#define MISC_END 1 - -#endif /* HDF5RECORD_RT_H */ diff --git a/pablo/HDFIOTrace.h b/pablo/HDFIOTrace.h new file mode 100644 index 0000000..6e41612 --- /dev/null +++ b/pablo/HDFIOTrace.h @@ -0,0 +1,419 @@ +/* + * This file is part of the Pablo Performance Analysis Environment + * + * (R) + * The Pablo Performance Analysis Environment software is NOT in + * the public domain. However, it is freely available without fee for + * education, research, and non-profit purposes. By obtaining copies + * of this and other files that comprise the Pablo Performance Analysis + * Environment, you, the Licensee, agree to abide by the following + * conditions and understandings with respect to the copyrighted software: + * + * 1. The software is copyrighted in the name of the Board of Trustees + * of the University of Illinois (UI), and ownership of the software + * remains with the UI. + * + * 2. Permission to use, copy, and modify this software and its documentation + * for education, research, and non-profit purposes is hereby granted + * to Licensee, provided that the copyright notice, the original author's + * names and unit identification, and this permission notice appear on + * all such copies, and that no charge be made for such copies. Any + * entity desiring permission to incorporate this software into commercial + * products should contact: + * + * Professor Daniel A. Reed reed@cs.uiuc.edu + * University of Illinois + * Department of Computer Science + * 2413 Digital Computer Laboratory + * 1304 West Springfield Avenue + * Urbana, Illinois 61801 + * USA + * + * 3. Licensee may not use the name, logo, or any other symbol of the UI + * nor the names of any of its employees nor any adaptation thereof in + * advertizing or publicity pertaining to the software without specific + * prior written approval of the UI. + * + * 4. THE UI MAKES NO REPRESENTATIONS ABOUT THE SUITABILITY OF THE + * SOFTWARE FOR ANY PURPOSE. IT IS PROVIDED "AS IS" WITHOUT EXPRESS + * OR IMPLIED WARRANTY. + * + * 5. The UI shall not be liable for any damages suffered by Licensee from + * the use of this software. + * + * 6. The software was developed under agreements between the UI and the + * Federal Government which entitle the Government to certain rights. + * + ************************************************************************** + * + * Developed by: The Pablo Research Group + * University of Illinois at Urbana-Champaign + * Department of Computer Science + * 1304 W. Springfield Avenue + * Urbana, IL 61801 + * + * http://www-pablo.cs.uiuc.edu + * + * Send comments to: pablo-feedback@guitar.cs.uiuc.edu + * + * Copyright (c) 1991-1996 + * The University of Illinois Board of Trustees. + * All Rights Reserved. + * + * PABLO is a registered trademark of + * The Board of Trustees of the University of Illinois + * registered in the U.S. Patent and Trademark Office. + * + * Author: Ruth A. Aydt (aydt@cs.uiuc.edu) + * Author: Tara M. Madhyastha (tara@cs.uiuc.edu) + * + * Project Manager and Principal Investigator: + * Daniel A. Reed (reed@cs.uiuc.edu) + * + * Funded in part by National Science Foundation grants NSF CCR87-06653 + * and NSF CDA87-22836 (Tapestry), DARPA contracts DABT63-91-K-0004, + * DABT63-93-C-0040, DABT63-94-C-0049 (SIO), and F30602-96-C-0161, NASA + * contracts NAG-1-613 (ICLASS), USRA 5555-22, and NGT-51023, and a + * collaborative research agreement with the Intel Supercomputer + * Systems Division + */ + +/* + * HDFIOTrace.h: This header file can be included in c source files to + * automatically redefine the I/O function calls to the + * tracing versions when "IOTRACE" is defined. + * + * It also contains function declarations for the I/O trace + * routines called from user code and constant values that may + * be needed by the user. + * + */ +#ifndef HDFIOTrace_h +#define HDFIOTrace_h + + +/************************************************************************/ +/* These defines and the external variable OUTPUT_SWITCH are used in */ +/* for HDF and MPI-IO tracing to govern the type of output produced. */ +/************************************************************************/ +extern int OUTPUT_SWITCH; /* default is SDDF records */ + +#if defined(__STDC__) || defined(__cplusplus) +#define PROTO(x) x +#else +#define PROTO(x) () +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/* #include */ +#include + +void startHDFtraceEvent (int ); +void endHDFtraceEvent (int , int , char *, int ); + +FILE *HDFtraceFOPEN( const char *filename, const char *type ) ; +#ifndef HDFtrace3OPEN__ + int HDFtrace3OPEN( const char *path, int flags, ... ) ; +#endif +int HDFtraceCREAT( const char *path, mode_t mode ); +int HDFtraceFFLUSH( FILE *stream ) ; +int HDFtraceFCLOSE( FILE *stream ) ; +int HDFtraceCLOSE( int fd ) ; +ssize_t HDFtraceREAD( int fd, void *buf, size_t nbyte ); +size_t HDFtraceFREAD( void *ptr, size_t size, size_t nitems, FILE *stream ); +void *HDFtraceMALLOC( size_t ); +off_t HDFtraceLSEEK( int fd, off_t offset, int whence ) ; +int HDFtraceFSEEK( FILE *stream, long offset, int whence ) ; +int HDFtraceFSETPOS( FILE *stream, const fpos_t *position ) ; +void HDFtraceREWIND( FILE *stream ) ; +ssize_t HDFtraceWRITE( int fd, const void *buf, size_t nbytes ); +size_t HDFtraceFWRITE( const void *, size_t , size_t , FILE * ); +int HDFtracePUTS( char *s ) ; +int HDFtraceFPUTC( int c, FILE *stream ) ; +int HDFtraceFPUTS( const char *s, FILE *stream ) ; + +#ifdef HDFIOTRACE +/* + * If IOTRACE is defined, then redefine standard I/O routines to tracing + * versions. Also include the appropriate .h files so the function + * declarations from them will be redefined to traced versions. + */ + +#ifdef fopen +# undef fopen +#endif +#ifdef open +# undef open +#endif +#ifdef creat +# undef creat +#endif + +#ifdef fflush +# undef fflush +#endif +#ifdef fclose +# undef fclose +#endif +#ifdef close +# undef close +#endif + +#ifdef read +# undef read +#endif +#ifdef fread +# undef fread +#endif +#ifdef fgetc +# undef fgetc +#endif +#ifdef fgets +# undef fgets +#endif +#ifdef gets +# undef gets +#endif +#ifdef getw +# undef getw +#endif + +#ifdef lseek +# undef lseek +#endif +#ifdef fseek +# undef fseek +#endif +#ifdef rewind +# undef rewind +#endif +#ifdef fsetpos +# undef fsetpos +#endif + +#ifdef write +# undef write +#endif +#ifdef fwrite +# undef fwrite +#endif +#ifdef fputc +# undef fputc +#endif +#ifdef fputs +# undef fputs +#endif +#ifdef puts +# undef puts +#endif +#ifdef putw +# undef putw +#endif + +#ifdef malloc +# undef malloc +#endif + +#define fopen (FILE *)HDFtraceFOPEN +#define open HDFtrace3OPEN +#define creat HDFtraceCREAT + +#define fflush HDFtraceFFLUSH +#define fclose HDFtraceFCLOSE +#define close HDFtraceCLOSE + +#define read HDFtraceREAD +#define fread HDFtraceFREAD +#define fgetc HDFtraceFGETC +#define fgets HDFtraceFGETS +#define gets HDFtraceGETS +#define getw HDFtraceGETW + +#define lseek HDFtraceLSEEK +#define fseek HDFtraceFSEEK +#define rewind HDFtraceREWIND +#define fsetpos HDFtraceFSETPOS + +#define write HDFtraceWRITE +#define fwrite HDFtraceFWRITE +#define fputc HDFtraceFPUTC +#define fputs HDFtraceFPUTS +#define puts HDFtracePUTS +#define putw HDFtracePUTW + +#define malloc HDFtraceMALLOC + +#include +#include + +/* + * On the iPSC/860 we don't include unistd.h or we get warnings about + * SEEK_* multiply defined. + */ +#ifndef __NX +#include +#endif + + +#include +/* + * Function declarations for routines that can be called from user code. + */ +void enableIOtracing( void ); +void disableIOtracing( void ); + +void enableIOdetail( void ); +void disableIOdetail( void ); + +void enableLifetimeSummaries( void ); +void disableLifetimeSummaries( void ); + +void enableTimeWindowSummaries ( double ); +void disableTimeWindowSummaries( void ); +void setTimeWindowSize ( double ); +void outputTimeWindowSummaries( void ); + +void enableFileRegionSummaries ( int ); +void disableFileRegionSummaries( void ); +void setFileRegionSize ( int ); +void outputFileRegionSummaries( void ); + +int HDFtrace2OPEN ( char*, int ); +void HDFtraceReadBegin ( int, int, int ); +void HDFtraceReadEnd ( int ); +void HDFtraceWriteBegin ( int, int, int ); +void HDFtraceWriteEnd ( int ); +void HDFtraceIOBegin ( int, int ); +void HDFtraceIOEnd ( int, double, char * ); + +#ifdef HAVE_PARALLEL + +#include "HDFmpioProtos.h" + +#ifdef MPI_File_open +#undef MPI_File_open +#endif +#ifdef MPI_File_close +#undef MPI_File_close +#endif +#ifdef MPI_File_delete +#undef MPI_File_delete +#endif +#ifdef MPI_File_set_size +#undef MPI_File_set_size +#endif +#ifdef MPI_File_preallocate +#undef MPI_File_preallocate +#endif +#ifdef MPI_File_get_size +#undef MPI_File_get_size +#endif +#ifdef MPI_File_get_group +#undef MPI_File_get_group +#endif +#ifdef MPI_File_get_amode +#undef MPI_File_get_amode +#endif +#ifdef MPI_File_set_view +#undef MPI_File_set_view +#endif +#ifdef MPI_File_get_view +#undef MPI_File_get_view +#endif +#ifdef MPI_File_read_at +#undef MPI_File_read_at +#endif +#ifdef MPI_File_read_at_all +#undef MPI_File_read_at_all +#endif +#ifdef MPI_File_write_at +#undef MPI_File_write_at +#endif +#ifdef MPI_File_write_at_all +#undef MPI_File_write_at_all +#endif +#ifdef MPI_File_iread_at +#undef MPI_File_iread_at +#endif +#ifdef MPI_File_iwrite_at +#undef MPI_File_iwrite_at +#endif +#ifdef MPI_File_read +#undef MPI_File_read +#endif +#ifdef MPI_File_read_all +#undef MPI_File_read_all +#endif +#ifdef MPI_File_write +#undef MPI_File_write +#endif +#ifdef MPI_File_write_all +#undef MPI_File_write_all +#endif +#ifdef MPI_File_iread +#undef MPI_File_iread +#endif +#ifdef MPI_File_iwrite +#undef MPI_File_iwrite +#endif +#ifdef MPI_File_seek +#undef MPI_File_seek +#endif +#ifdef MPI_File_get_position +#undef MPI_File_get_position +#endif +#ifdef MPI_File_get_byte_offset +#undef MPI_File_get_byte_offset +#endif +#ifdef MPI_File_get_type_extent +#undef MPI_File_get_type_extent +#endif +#ifdef MPI_File_set_atomicity +#undef MPI_File_set_atomicity +#endif +#ifdef MPI_File_get_atomicity +#undef MPI_File_get_atomicity +#endif +#ifdef MPI_File_sync +#undef MPI_File_sync +#endif + +#define MPI_File_open HDF_MPI_File_open +#define MPI_File_close HDF_MPI_File_close +#define MPI_File_delete HDF_MPI_File_delete +#define MPI_File_set_size HDF_MPI_File_set_size +#define MPI_File_preallocate HDF_MPI_File_preallocate +#define MPI_File_get_size HDF_MPI_File_get_size +#define MPI_File_get_group HDF_MPI_File_get_group +#define MPI_File_get_amode HDF_MPI_File_get_amode +#define MPI_File_set_view HDF_MPI_File_set_view +#define MPI_File_get_view HDF_MPI_File_get_view +#define MPI_File_read_at HDF_MPI_File_read_at +#define MPI_File_read_at_all HDF_MPI_File_read_at_all +#define MPI_File_write_at HDF_MPI_File_write_at +#define MPI_File_write_at_all HDF_MPI_File_write_at_all +#define MPI_File_iread_at HDF_MPI_File_iread_at +#define MPI_File_iwrite_at HDF_MPI_File_iwrite_at +#define MPI_File_read HDF_MPI_File_read +#define MPI_File_read_all HDF_MPI_File_read_all +#define MPI_File_write HDF_MPI_File_write +#define MPI_File_write_all HDF_MPI_File_write_all +#define MPI_File_iread HDF_MPI_File_iread +#define MPI_File_iwrite HDF_MPI_File_iwrite +#define MPI_File_seek HDF_MPI_File_seek +#define MPI_File_get_position HDF_MPI_File_get_position +#define MPI_File_get_byte_offset HDF_MPI_File_get_byte_offset +#define MPI_File_get_type_extent HDF_MPI_File_get_type_extent +#define MPI_File_set_atomicity HDF_MPI_File_set_atomicity +#define MPI_File_get_atomicity HDF_MPI_File_get_atomicity +#define MPI_File_sync HDF_MPI_File_sync +#endif /* HAVE_PARALLEL */ +#endif /* HAVE_PARALLEL */ +#ifdef __cplusplus +} +#endif + +#endif /* HDFIOTRACE conditional */ diff --git a/pablo/HDFTrace.h b/pablo/HDFTrace.h new file mode 100644 index 0000000..1bcf8d6 --- /dev/null +++ b/pablo/HDFTrace.h @@ -0,0 +1,139 @@ +/* This file is part of the Pablo Performance Analysis Environment +// +// (R) +// The Pablo Performance Analysis Environment software is NOT in +// the public domain. However, it is freely available without fee for +// education, research, and non-profit purposes. By obtaining copies +// of this and other files that comprise the Pablo Performance Analysis +// Environment, you, the Licensee, agree to abide by the following +// conditions and understandings with respect to the copyrighted software: +// +// 1. The software is copyrighted in the name of the Board of Trustees +// of the University of Illinois (UI), and ownership of the software +// remains with the UI. +// +// 2. Permission to use, copy, and modify this software and its documentation +// for education, research, and non-profit purposes is hereby granted +// to Licensee, provided that the copyright notice, the original author's +// names and unit identification, and this permission notice appear on +// all such copies, and that no charge be made for such copies. Any +// entity desiring permission to incorporate this software into commercial +// products should contact: +// +// Professor Daniel A. Reed reed@cs.uiuc.edu +// University of Illinois +// Department of Computer Science +// 2413 Digital Computer Laboratory +// 1304 West Springfield Avenue +// Urbana, Illinois 61801 +// USA +// +// 3. Licensee may not use the name, logo, or any other symbol of the UI +// nor the names of any of its employees nor any adaptation thereof in +// advertizing or publicity pertaining to the software without specific +// prior written approval of the UI. +// +// 4. THE UI MAKES NO REPRESENTATIONS ABOUT THE SUITABILITY OF THE +// SOFTWARE FOR ANY PURPOSE. IT IS PROVIDED "AS IS" WITHOUT EXPRESS +// OR IMPLIED WARRANTY. +// +// 5. The UI shall not be liable for any damages suffered by Licensee from +// the use of this software. +// +// 6. The software was developed under agreements between the UI and the +// Federal Government which entitle the Government to certain rights. +// +// ************************************************************************* +// +// Developed by: The Pablo Research Group +// University of Illinois at Urbana-Champaign +// Department of Computer Science +// 1304 W. Springfield Avenue +// Urbana, IL 61801 +// +// http://www-pablo.cs.uiuc.edu +// +// Send comments to: pablo-feedback@guitar.cs.uiuc.edu +// +// Copyright (c) 1987-1998 +// The University of Illinois Board of Trustees. +// All Rights Reserved. +// +// PABLO is a registered trademark of +// The Board of Trustees of the University of Illinois +// registered in the U.S. Patent and Trademark Office. +// +// Project Manager and Principal Investigator: +// Daniel A. Reed (reed@cs.uiuc.edu) +// +// Funded in part by the Defense Advanced Research Projects Agency under +// DARPA contracts DABT63-94-C0049 (SIO Initiative), F30602-96-C-0161, +// and DABT63-96-C-0027 by the National Science Foundation under the PACI +// program and grants NSF CDA 94-01124 and ASC 97-20202, and by the +// Department of Energy under contracts DOE B-341494, W-7405-ENG-48, and +// 1-B-333164. +//======================================================================*/ +#ifndef HDFTRACE_H +#define HDFTRACE_H +/************************************************************************/ +/* A shared char * pointer (defined in HDF_Descriptors.c) and Macro */ +/* definitions */ +/************************************************************************/ +extern char *hdfRecordPointer; +/************************************************************************/ +/* The following are used in tagging HDF packets. Avoid using FAMILY */ +/* tags in the range 0100000 to 0200000 */ +/************************************************************************/ +#define HDF_FAMILY 0100000 +#define HDF_SUMMARY_FAMILY 0140000 +/************************************************************************/ +/* Number of fields in the packets. */ +/************************************************************************/ +#define NUM_FIELDS 17 +/* + * "WRITE_HDF_ATTR" macro to output an attribute pair. + */ +#ifndef WRITE_HDF_ATTR +#define WRITE_HDF_ATTR( attrKey, attrValue ) \ + sddfWriteString( &hdfRecordPointer, attrKey ); \ + sddfWriteString( &hdfRecordPointer, attrValue ); +#endif /* WRITE_HDF_ATTR */ + +/* + * "WRITE_HDF_FIELD" macro to output a field with a single attribute pair. + */ +#ifndef WRITE_HDF_FIELD +#define WRITE_HDF_FIELD( name, attrKey, attrValue, type, dimension ) \ + sddfWriteString( &hdfRecordPointer, name ); \ + sddfWriteInteger( &hdfRecordPointer, 1 ); \ + sddfWriteString( &hdfRecordPointer, attrKey ); \ + sddfWriteString( &hdfRecordPointer, attrValue ); \ + sddfWriteInteger( &hdfRecordPointer, type ); \ + sddfWriteInteger( &hdfRecordPointer, dimension ); +#endif /* WRITE_HDF_FIELD */ + +/* + * "WRITE_HDF_FIELD2" to output a field with two attribute pairs. + */ +#ifndef WRITE_HDF_FIELD2 +#define WRITE_HDF_FIELD2( name, aKey1, aValue1, aKey2, aValue2, type, dimension ) \ + sddfWriteString( &hdfRecordPointer, name ); \ + sddfWriteInteger( &hdfRecordPointer, 2 ); \ + sddfWriteString( &hdfRecordPointer, aKey1 ); \ + sddfWriteString( &hdfRecordPointer, aValue1 ); \ + sddfWriteString( &hdfRecordPointer, aKey2 ); \ + sddfWriteString( &hdfRecordPointer, aValue2 ); \ + sddfWriteInteger( &hdfRecordPointer, type ); \ + sddfWriteInteger( &hdfRecordPointer, dimension ); +#endif /* WRITE_HDF_FIELD2*/ + +#define FAMILY_NAME 0260 /* Data Set Name Record */ +#define FAMILY_MISC 0270 +#define FAMILY_HDFPROCNAME 0300 + +typedef struct { + long setID; + char *setName; +} HDFsetInfo ; + +#endif /* HDFTRACE_H */ -- cgit v0.12