/[escript]/trunk/escript/src/Utils.h
ViewVC logotype

Diff of /trunk/escript/src/Utils.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 757 by woo409, Mon Jun 26 13:12:56 2006 UTC revision 2607 by jfenwick, Tue Aug 18 01:02:56 2009 UTC
# Line 1  Line 1 
1  /*  
2   ************************************************************  /*******************************************************
3   *          Copyright 2006 by ACcESS MNRF                   *  *
4   *                                                          *  * Copyright (c) 2003-2009 by University of Queensland
5   *              http://www.access.edu.au                    *  * Earth Systems Science Computational Center (ESSCC)
6   *       Primary Business: Queensland, Australia            *  * http://www.uq.edu.au/esscc
7   *  Licensed under the Open Software License version 3.0    *  *
8   *     http://www.opensource.org/licenses/osl-3.0.php       *  * 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  #if !defined  escript_Utils_H
16  #define escript_Utils_H  #define escript_Utils_H
# Line 24  namespace escript { Line 26  namespace escript {
26    
27    /**    /**
28       \brief       \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       set the number of threads
42         \warning Use of this method is strongly discouraged. It may be deprecated in future.
43    */    */
44    ESCRIPT_DLL_API void setNumberOfThreads(const int num_threads);    ESCRIPT_DLL_API void setNumberOfThreads(const int num_threads);
45    
# Line 34  namespace escript { Line 49  namespace escript {
49    */    */
50    ESCRIPT_DLL_API int getNumberOfThreads();    ESCRIPT_DLL_API int getNumberOfThreads();
51    
52      /**
53         \brief
54         returns the total number of available MPI processes for MPI_COMM_WORLD
55      */
56      ESCRIPT_DLL_API int getMPISizeWorld();
57    
58      /**
59         \brief
60         returns the MPI processor number within MPI_COMM_WORLD
61      */
62      ESCRIPT_DLL_API int getMPIRankWorld();
63      /**
64         \brief
65         returns the maximum value of an integer over all processors within MPI_COMM_WORLD
66      */
67      ESCRIPT_DLL_API int getMPIWorldMax(const int val);
68    
69      /**
70         \brief returns sum of an integer over all processors with MPI_COMM_WORLD
71      */
72      ESCRIPT_DLL_API int getMPIWorldSum(const int val);
73    
74      /**
75        \brief performs a barrier synchronization across all processors.
76      */
77    
78      ESCRIPT_DLL_API void MPIBarrierWorld();
79    
80     /**
81        \brief
82        returns machine precision
83     */
84     ESCRIPT_DLL_API double getMachinePrecision();
85     /*
86       \brief
87       return largest positive float
88     */
89     ESCRIPT_DLL_API double getMaxFloat();
90    
91  } // end of namespace  } // end of namespace
92  #endif  #endif

Legend:
Removed from v.757  
changed lines
  Added in v.2607

  ViewVC Help
Powered by ViewVC 1.1.26