ESYS13  Revision_
Utils.h
Go to the documentation of this file.
00001 
00002 /*******************************************************
00003 *
00004 * Copyright (c) 2003-2012 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 
00032   ESCRIPT_DLL_API int getSvnVersion();
00033 
00038   ESCRIPT_DLL_API void printParallelThreadCnt();
00039 
00045   ESCRIPT_DLL_API void setNumberOfThreads(const int num_threads);
00046 
00051   ESCRIPT_DLL_API int getNumberOfThreads();
00052 
00057   ESCRIPT_DLL_API int getMPISizeWorld();
00058 
00063   ESCRIPT_DLL_API int getMPIRankWorld();
00068   ESCRIPT_DLL_API int getMPIWorldMax(const int val);
00069 
00073   ESCRIPT_DLL_API int getMPIWorldSum(const int val);
00074 
00078   ESCRIPT_DLL_API void MPIBarrierWorld();
00079 
00083   ESCRIPT_DLL_API int runMPIProgram(const boost::python::list args);
00084 
00089  ESCRIPT_DLL_API double getMachinePrecision();
00090  /*
00091    \brief
00092    return largest positive float
00093  */
00094  ESCRIPT_DLL_API double getMaxFloat();
00095 
00096  ESCRIPT_DLL_API
00097  void
00098  saveDataCSV(const std::string& filename, boost::python::dict arg, const std::string& sep, const std::string& csep,
00099 bool append=false); 
00100 
00101 
00108  ESCRIPT_DLL_API
00109  void 
00110  resolveGroup(boost::python::object obj);
00111 
00112 } // end of namespace
00113 #endif