OpenMPI 0.1.1

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

Stack.h
1 /*
2 This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2012.
3 Authors: Andreas Knuepfer, Holger Brunst, Ronny Brendel, Thomas Kriebitzsch
4 */
5
6 #ifndef _STACK_H
7 #define _STACK_H
8
9 #include <assert.h>
10 #include "Hash.h"
11
12 #include <OTF_Writer.h>
13
14
15 struct struct_StackEntry
16 {
17 int state;
18 };
19 typedef struct struct_StackEntry StackEntryT;
20
21 struct struct_Stack
22 {
23 /* Stack entries */
24 StackEntryT* stack;
25
26 /* Number of entries */
27 int n;
28
29 /* Size of the stack */
30 int s;
31 };
32 typedef struct struct_Stack StackT;
33
34 #define FILEIOBUFFERSIZE 2048
35 typedef struct {
36 char *name;
37 StackT *stack;
38
39 uint64_t fileIObegin; /* writing - timestamp of the last beginfileio */
40
41 uint64_t filepos; /* reading - current position in the *.io file */
42
43 uint32_t fileIObufferpos;
44 uint32_t fileIObufferlen; /* reading - determines the end of the buffer */
45 uint64_t fileIObuffer[FILEIOBUFFERSIZE]; /*1st= timestamp, 2nd= duration*/
46 }processT;
47
48 typedef struct {
49 uint32_t id;
50 uint32_t size;
51 uint32_t *procs;
52 char* name;
53 } ProcessGroup;
54
55 typedef struct {
56 OTF_Writer* writer;
57 processT **processes;
58 int processcount;
59 int *threadnums;
60 ProcessGroup *processgroups;
61 unsigned int processgroupcount;
62 Hash *pghash; /* processgroup-mapping */
63 uint32_t *reservedIds;
64 int reservedIdsc;
65
66 char *outputFile;
67
68 int ioonly;
69
70 uint64_t handleid; /* needed for fileio */
71 }fcbT;
72
73
74 StackT* Stack_new( void );
75
76 void Stack_delete( StackT *stack );
77
78 void Stack_push( StackT* stack, StackEntryT* entry );
79
80 StackEntryT Stack_pop( StackT* stack );
81
82
83 /* write out the io buffer */
84 void writeFileIOBuffer( int cpuid, processT* proc, const char* outputFile );
85
86 /* read from the io buffer */
87 void readFileIOBuffer( int cpuid, processT* proc, const char* outputFile );
88
89 #endif /* _STACK_H */
struct_StackEntry
Definition: Stack.h:15
processT
Definition: Stack.h:35
struct_Stack
Definition: Stack.h:21
struct_Hash
Definition: Hash.h:38
fcbT
Definition: Treehash.h:68
ProcessGroup
Definition: Stack.h:48
struct_OTF_Writer
Holds the data objects needed for global trace creation.
Definition: OTF_Writer.c:21
OTF_Writer.h
Transparently writes OTF traces which consist of multiple streams.