escript  Revision_
Utils.h
Go to the documentation of this file.
1 
2 /*****************************************************************************
3 *
4 * Copyright (c) 2003-2016 by The University of Queensland
5 * http://www.uq.edu.au
6 *
7 * Primary Business: Queensland, Australia
8 * Licensed under the Apache License, version 2.0
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Development until 2012 by Earth Systems Science Computational Center (ESSCC)
12 * Development 2012-2013 by School of Earth Sciences
13 * Development from 2014 by Centre for Geoscience Computing (GeoComp)
14 *
15 *****************************************************************************/
16 
17 #ifndef __ESCRIPT_UTILS_H__
18 #define __ESCRIPT_UTILS_H__
19 
20 #include "system_dep.h"
21 #include <boost/python/dict.hpp>
22 
23 namespace escript {
24 
36 
42 
48 ESCRIPT_DLL_API void setNumberOfThreads(const int num_threads);
49 
55 
61 
67 
72 ESCRIPT_DLL_API int getMPIWorldMax(const int val);
73 
77 ESCRIPT_DLL_API int getMPIWorldSum(const int val);
78 
83 
87 ESCRIPT_DLL_API int runMPIProgram(const boost::python::list args);
88 
94 
95 /*
96  \brief
97  return largest positive float
98 */
100 
101 ESCRIPT_DLL_API void saveDataCSV(const std::string& filename,
102  boost::python::dict arg,
103  const std::string& sep,
104  const std::string& csep, bool append=false);
105 
106 
114 ESCRIPT_DLL_API void resolveGroup(boost::python::object obj);
115 
116 } // end of namespace
117 
118 #endif // __ESCRIPT_UTILS_H__
119 
int getSvnVersion()
some functions
Definition: Utils.cpp:37
Definition: AbstractContinuousDomain.cpp:22
void resolveGroup(bp::object obj)
Definition: Utils.cpp:613
int runMPIProgram(bp::list args)
Definition: Utils.cpp:305
int getMPISizeWorld()
returns the total number of available MPI processes for MPI_COMM_WORLD
Definition: Utils.cpp:88
int getMPIWorldSum(int val)
returns sum of an integer over all processors with MPI_COMM_WORLD
Definition: Utils.cpp:118
int getNumberOfThreads()
returns the number of threads
Definition: Utils.cpp:79
void saveDataCSV(const std::string &filename, bp::dict arg, const std::string &sep, const std::string &csep, bool append)
Definition: Utils.cpp:381
#define ESCRIPT_DLL_API
Definition: escriptcore/src/system_dep.h:29
double getMachinePrecision()
returns the machine precision
Definition: Utils.cpp:360
void printParallelThreadCnt()
print a message about how many MPI CPUs and OpenMP threads we&#39;re using
Definition: Utils.cpp:130
int getMPIWorldMax(int val)
returns the maximum value of an integer over all processors within MPI_COMM_WORLD ...
Definition: Utils.cpp:106
void setNumberOfThreads(int num_threads)
set the number of threads
Definition: Utils.cpp:72
double getMaxFloat()
Definition: Utils.cpp:365
int getMPIRankWorld()
returns the MPI processor number within MPI_COMM_WORLD
Definition: Utils.cpp:97
void MPIBarrierWorld()
performs a barrier synchronization across all processors.
Definition: Utils.cpp:370