1 |
|
2 |
/******************************************************* |
3 |
* |
4 |
* Copyright (c) 2003-2008 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 |
#if !defined escript_Utils_H |
16 |
#define escript_Utils_H |
17 |
#include "system_dep.h" |
18 |
|
19 |
namespace escript { |
20 |
|
21 |
/** |
22 |
\brief |
23 |
some functions |
24 |
|
25 |
*/ |
26 |
|
27 |
/** |
28 |
\brief |
29 |
return the latest SVN version number |
30 |
*/ |
31 |
ESCRIPT_DLL_API int getSvnVersion(); |
32 |
|
33 |
/** |
34 |
\brief |
35 |
print a message about how many MPI CPUs and OpenMP threads we're using |
36 |
*/ |
37 |
ESCRIPT_DLL_API void printParallelThreadCnt(); |
38 |
|
39 |
/** |
40 |
\brief |
41 |
set the number of threads |
42 |
*/ |
43 |
ESCRIPT_DLL_API void setNumberOfThreads(const int num_threads); |
44 |
|
45 |
/** |
46 |
\brief |
47 |
returns the number of threads |
48 |
*/ |
49 |
ESCRIPT_DLL_API int getNumberOfThreads(); |
50 |
|
51 |
/** |
52 |
\brief |
53 |
returns the total number of available MPI processes for MPI_COMM_WORLD |
54 |
*/ |
55 |
ESCRIPT_DLL_API int getMPISizeWorld(); |
56 |
|
57 |
/** |
58 |
\brief |
59 |
returns the MPI processor number within MPI_COMM_WORLD |
60 |
*/ |
61 |
ESCRIPT_DLL_API int getMPIRankWorld(); |
62 |
|
63 |
/** |
64 |
\brief |
65 |
returns machine precision |
66 |
*/ |
67 |
ESCRIPT_DLL_API double getMachinePrecision(); |
68 |
/* |
69 |
\brief |
70 |
return largest positive float |
71 |
*/ |
72 |
ESCRIPT_DLL_API double getMaxFloat(); |
73 |
|
74 |
} // end of namespace |
75 |
#endif |