/[escript]/branches/split/escriptcore/src/SplitWorld.h
ViewVC logotype

Contents of /branches/split/escriptcore/src/SplitWorld.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4734 - (show annotations)
Mon Mar 10 06:38:54 2014 UTC (3 years, 9 months ago) by jfenwick
File MIME type: text/plain
File size: 1861 byte(s)
Run skeleton jobs with no params.
1
2 /*****************************************************************************
3 *
4 * Copyright (c) 2014 by University of Queensland
5 * http://www.uq.edu.au
6 *
7 * Primary Business: Queensland, Australia
8 * Licensed under the Open Software License version 3.0
9 * http://www.opensource.org/licenses/osl-3.0.php
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_SplitWorld_H
18 #define escript_SplitWorld_H
19 #include <boost/python.hpp>
20 #include <boost/smart_ptr.hpp>
21 #include "esysUtils/Esys_MPI.h"
22 #include "SubWorld.h"
23 namespace escript
24 {
25
26 /** class to hold a collection of MPI ranks and a communicator linking them
27 */
28 class SplitWorld
29 {
30 public:
31 SplitWorld(unsigned int numgroups, MPI_Comm global=MPI_COMM_WORLD);
32 ~SplitWorld();
33 boost::python::object buildDomains(boost::python::tuple t, boost::python::dict kwargs);
34 // first param will be the factory method / constructor
35 // return value will always be None (it would be void but apparently boost doesn't like that
36 // this method will be def("set....", raw_function(SplitWorld::setDomainParams, 1)
37
38 void runJobs(boost::python::list l);
39 private:
40 MPI_Comm globalcom; // don't free this because we don't own it
41 MPI_Comm subcom;
42 escript::SubWorld_ptr localworld; // subworld which this process belongs to
43 unsigned int groupcount;
44 unsigned int localid; // position of localworld in overall world sequence
45 };
46
47
48 /**
49 used to invoke the SplitWorld version from python (in lieu of a method based equivalent to raw_function)
50 */
51 boost::python::object raw_buildDomains(boost::python::tuple t, boost::python::dict kwargs);
52
53
54 }
55 #endif

  ViewVC Help
Powered by ViewVC 1.1.26