00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 #ifndef COMMON_DH
00031 #define COMMON_DH
00032
00033 #include <stdio.h>
00034 #include <stdlib.h>
00035 #include <string.h>
00036 #include <math.h>
00037 #include <limits.h>
00038 #include <stdarg.h>
00039
00040 #define REAL_DH double
00041
00042
00043
00044
00045
00046
00047
00048
00049 #include <mpi.h>
00050
00051
00052
00053
00054
00055
00056 #include "euclid_config.h"
00057
00058
00059
00060
00061 #include "macros_dh.h"
00062
00063
00064
00065
00066 typedef struct _matgenfd *MatGenFD;
00067 typedef struct _subdomain_dh *SubdomainGraph_dh;
00068 typedef struct _timer_dh *Timer_dh;
00069 typedef struct _parser_dh *Parser_dh;
00070 typedef struct _timeLog_dh *TimeLog_dh;
00071 typedef struct _mem_dh *Mem_dh;
00072 typedef struct _mat_dh *Mat_dh;
00073 typedef struct _factor_dh *Factor_dh;
00074 typedef struct _vec_dh *Vec_dh;
00075 typedef struct _numbering_dh *Numbering_dh;
00076 typedef struct _hash_dh *Hash_dh;
00077 typedef struct _hash_i_dh *Hash_i_dh;
00078 typedef struct _mpi_interface_dh *Euclid_dh;
00079 typedef struct _sortedList_dh *SortedList_dh;
00080 typedef struct _extrows_dh *ExternalRows_dh;
00081 typedef struct _stack_dh *Stack_dh;
00082 typedef struct _queue_dh *Queue_dh;
00083 typedef struct _sortedset_dh *SortedSet_dh;
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098 #if defined(__cplusplus)
00099 #else
00100 typedef int bool;
00101 #define true 1
00102 #define false 0
00103 #endif
00104
00105
00106
00107
00108
00109 extern Parser_dh parser_dh;
00110 extern TimeLog_dh tlog_dh;
00111 extern Mem_dh mem_dh;
00112 extern FILE *logFile;
00113 extern int np_dh;
00114 extern int myid_dh;
00115 extern MPI_Comm comm_dh;
00116
00117
00118 extern bool ignoreMe;
00119 extern int ref_counter;
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130 extern bool errFlag_dh;
00131
00132 #ifdef __cplusplus
00133 extern "C"
00134 {
00135 #endif
00136
00137 extern void setInfo_dh (char *msg, char *function, char *file, int line);
00138 extern void setError_dh (char *msg, char *function, char *file, int line);
00139 extern void printErrorMsg (FILE * fp);
00140
00141 #ifndef MPI_MAX_ERROR_STRING
00142 #define MPI_MAX_ERROR_STRING 256
00143 #endif
00144
00145 #define MSG_BUF_SIZE_DH MAX(1024, MPI_MAX_ERROR_STRING)
00146 extern char msgBuf_dh[MSG_BUF_SIZE_DH];
00147
00148
00149
00150
00151
00152
00153 extern void openLogfile_dh (int argc, char *argv[]);
00154 extern void closeLogfile_dh ();
00155 extern bool logInfoToStderr;
00156 extern bool logInfoToFile;
00157 extern bool logFuncsToStderr;
00158 extern bool logFuncsToFile;
00159 extern void Error_dhStartFunc (char *function, char *file, int line);
00160 extern void Error_dhEndFunc (char *function);
00161 extern void dh_StartFunc (char *function, char *file, int line,
00162 int priority);
00163 extern void dh_EndFunc (char *function, int priority);
00164 extern void printFunctionStack (FILE * fp);
00165
00166 extern void EuclidInitialize (int argc, char *argv[], char *help);
00167 extern void EuclidFinalize ();
00168 extern bool EuclidIsInitialized ();
00169 extern void printf_dh (char *fmt, ...);
00170 extern void fprintf_dh (FILE * fp, char *fmt, ...);
00171
00172
00173
00174
00175 extern void echoInvocation_dh (MPI_Comm comm, char *prefix, int argc,
00176 char *argv[]);
00177
00178 #ifdef __cplusplus
00179 }
00180 #endif
00181
00182 #endif