/[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 474 by jgs, Mon Jan 30 04:23:44 2006 UTC revision 2308 by gross, Mon Mar 16 01:20:56 2009 UTC
# Line 1  Line 1 
1  /*  
2   ******************************************************************************  /*******************************************************
3   *                                                                            *  *
4   *       COPYRIGHT  ACcESS 2004 -  All Rights Reserved                        *  * Copyright (c) 2003-2008 by University of Queensland
5   *                                                                            *  * Earth Systems Science Computational Center (ESSCC)
6   * This software is the property of ACcESS. No part of this code              *  * http://www.uq.edu.au/esscc
7   * may be copied in any form or by any means without the expressed written    *  *
8   * consent of ACcESS.  Copying, use or modification of this software          *  * Primary Business: Queensland, Australia
9   * by any unauthorised person is illegal unless that person has a software    *  * Licensed under the Open Software License version 3.0
10   * license agreement with ACcESS.                                             *  * 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
17    #include "system_dep.h"
 #ifdef _OPENMP  
 #include <omp.h>  
 #endif  
18    
19  namespace escript {  namespace escript {
20    
# Line 29  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    */    */
43    void setNumberOfThreads(const int num_threads);    ESCRIPT_DLL_API void setNumberOfThreads(const int num_threads);
44    
45    /**    /**
46       \brief       \brief
47       returns  the number of threads       returns  the number of threads
48    */    */
49    int getNumberOfThreads();    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         \brief
64         returns the maximum value of an integer over all processors within MPI_COMM_WORLD
65      */
66      ESCRIPT_DLL_API int getMPIWorldMax(const int val);
67    
68     /**
69        \brief
70        returns machine precision
71     */
72     ESCRIPT_DLL_API double getMachinePrecision();
73     /*
74       \brief
75       return largest positive float
76     */
77     ESCRIPT_DLL_API double getMaxFloat();
78    
79  } // end of namespace  } // end of namespace
80  #endif  #endif

Legend:
Removed from v.474  
changed lines
  Added in v.2308

  ViewVC Help
Powered by ViewVC 1.1.26