/[escript]/trunk/esysUtils/src/error.h
ViewVC logotype

Contents of /trunk/esysUtils/src/error.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3975 - (show annotations)
Thu Sep 20 01:54:06 2012 UTC (7 years ago) by caltinay
File MIME type: text/plain
File size: 1852 byte(s)
Merged symbolic branch into trunk. Curious what daniel and spartacus have to
say...

1
2 /*******************************************************
3 *
4 * Copyright (c) 2010-2012 by University of Queensland
5 * Earth Systems Science Computational Center (ESSCC)
6 * http://www.uq.edu.au/esscc
7 *
8 * Primary Business: Queensland, Australia
9 * Licensed under the Open Software License version 3.0
10 * http://www.opensource.org/licenses/osl-3.0.php
11 *
12 *******************************************************/
13
14
15 /**************************************************************/
16
17 /* Functions for C error handling (and timing)*/
18
19 /**************************************************************/
20
21
22 #ifndef INC_ESYS_ERROR
23 #define INC_ESYS_ERROR
24
25 #include "system_dep.h"
26 #include "types.h"
27
28 #ifdef _OPENMP
29 #include <omp.h>
30 #endif
31
32 #include <stdio.h> /* For FILENAME_MAX */
33 #define LenString_MAX FILENAME_MAX*2
34 #define LenErrorMsg_MAX LenString_MAX
35
36 /**************************************************************/
37
38 typedef enum {
39 NO_ERROR,
40 WARNING,
41 DIVERGED,
42 VALUE_ERROR,
43 TYPE_ERROR,
44 MEMORY_ERROR,
45 IO_ERROR,
46 ZERO_DIVISION_ERROR,
47 EOF_ERROR,
48 FLOATING_POINT_ERROR,
49 INDEX_ERROR,
50 OS_ERROR,
51 OVERFLOW_ERROR,
52 SYSTEM_ERROR,
53 ESYS_MPI_ERROR,
54 NO_PROGRESS_ERROR
55 } Esys_ErrorCodeType;
56
57 /* interfaces */
58
59
60 ESYSUTILS_DLL_API
61 double Esys_timer(void);
62
63 ESYSUTILS_DLL_API
64 bool_t Esys_checkPtr(void*);
65
66 ESYSUTILS_DLL_API
67 void Esys_resetError(void);
68
69 ESYSUTILS_DLL_API
70 void Esys_setError(Esys_ErrorCodeType err,__const char* msg);
71
72 ESYSUTILS_DLL_API
73 bool_t Esys_noError(void);
74
75 ESYSUTILS_DLL_API
76 Esys_ErrorCodeType Esys_getErrorType(void);
77
78 ESYSUTILS_DLL_API
79 char* Esys_getErrorMessage(void);
80
81 #ifndef _OPENMP
82 int serial_get_max_threads(void);
83 int serial_get_thread_num(void);
84
85 /* Nasty hack to get 3.2 out */
86 #define omp_get_max_threads serial_get_max_threads
87 #define omp_get_thread_num serial_get_thread_num
88 #endif
89
90
91 #endif /* #ifndef INC_PASO */

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision
svn:mergeinfo /branches/lapack2681/paso/src/Paso.h:2682-2741 /branches/pasowrap/esysUtils/src/error.h:3661-3674 /branches/py3_attempt2/esysUtils/src/error.h:3871-3891 /branches/restext/paso/src/Paso.h:2610-2624 /branches/ripleygmg_from_3668/esysUtils/src/error.h:3669-3791 /branches/stage3.0/paso/src/Paso.h:2569-2590 /branches/symbolic_from_3470/esysUtils/src/error.h:3471-3974 /branches/symbolic_from_3470/ripley/test/python/esysUtils/src/error.h:3517-3974 /release/3.0/paso/src/Paso.h:2591-2601 /trunk/ripley/test/python/esysUtils/src/error.h:3480-3515

  ViewVC Help
Powered by ViewVC 1.1.26