escript  Revision_
Utils.h
Go to the documentation of this file.
00001 
00002 /*****************************************************************************
00003 *
00004 * Copyright (c) 2003-2014 by University of Queensland
00005 * http://www.uq.edu.au
00006 *
00007 * Primary Business: Queensland, Australia
00008 * Licensed under the Open Software License version 3.0
00009 * http://www.opensource.org/licenses/osl-3.0.php
00010 *
00011 * Development until 2012 by Earth Systems Science Computational Center (ESSCC)
00012 * Development 2012-2013 by School of Earth Sciences
00013 * Development from 2014 by Centre for Geoscience Computing (GeoComp)
00014 *
00015 *****************************************************************************/
00016 
00017 
00018 #if !defined  escript_Utils_H
00019 #define escript_Utils_H
00020 #include "system_dep.h"
00021 
00022 namespace escript {
00023 
00035   ESCRIPT_DLL_API int getSvnVersion();
00036 
00041   ESCRIPT_DLL_API void printParallelThreadCnt();
00042 
00048   ESCRIPT_DLL_API void setNumberOfThreads(const int num_threads);
00049 
00054   ESCRIPT_DLL_API int getNumberOfThreads();
00055 
00060   ESCRIPT_DLL_API int getMPISizeWorld();
00061 
00066   ESCRIPT_DLL_API int getMPIRankWorld();
00071   ESCRIPT_DLL_API int getMPIWorldMax(const int val);
00072 
00076   ESCRIPT_DLL_API int getMPIWorldSum(const int val);
00077 
00081   ESCRIPT_DLL_API void MPIBarrierWorld();
00082 
00086   ESCRIPT_DLL_API int runMPIProgram(const boost::python::list args);
00087 
00092  ESCRIPT_DLL_API double getMachinePrecision();
00093  /*
00094    \brief
00095    return largest positive float
00096  */
00097  ESCRIPT_DLL_API double getMaxFloat();
00098 
00099  ESCRIPT_DLL_API
00100  void
00101  saveDataCSV(const std::string& filename, boost::python::dict arg, const std::string& sep, const std::string& csep,
00102 bool append=false); 
00103 
00104 
00111  ESCRIPT_DLL_API
00112  void 
00113  resolveGroup(boost::python::object obj);
00114 
00115 } // end of namespace
00116 #endif