00001 00002 /******************************************************* 00003 * 00004 * Copyright (c) 2003-2009 by University of Queensland 00005 * Earth Systems Science Computational Center (ESSCC) 00006 * http://www.uq.edu.au/esscc 00007 * 00008 * Primary Business: Queensland, Australia 00009 * Licensed under the Open Software License version 3.0 00010 * http://www.opensource.org/licenses/osl-3.0.php 00011 * 00012 *******************************************************/ 00013 00014 00015 #if !defined escript_Utils_H 00016 #define escript_Utils_H 00017 #include "system_dep.h" 00018 00019 namespace escript { 00020 00031 ESCRIPT_DLL_API int getSvnVersion(); 00032 00037 ESCRIPT_DLL_API void printParallelThreadCnt(); 00038 00043 ESCRIPT_DLL_API void setNumberOfThreads(const int num_threads); 00044 00049 ESCRIPT_DLL_API int getNumberOfThreads(); 00050 00055 ESCRIPT_DLL_API int getMPISizeWorld(); 00056 00061 ESCRIPT_DLL_API int getMPIRankWorld(); 00066 ESCRIPT_DLL_API int getMPIWorldMax(const int val); 00067 00068 00073 ESCRIPT_DLL_API void MPIBarrierWorld(); 00074 00079 ESCRIPT_DLL_API double getMachinePrecision(); 00080 /* 00081 \brief 00082 return largest positive float 00083 */ 00084 ESCRIPT_DLL_API double getMaxFloat(); 00085 00086 } // end of namespace 00087 #endif