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

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

Parent Directory Parent Directory | Revision Log Revision Log


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