| 1 |
/* |
| 2 |
* (C) Copyright 2013 ECMWF. |
| 3 |
* |
| 4 |
* This software is licensed under the terms of the Apache Licence Version 2.0 |
| 5 |
* which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. |
| 6 |
* In applying this licence, ECMWF does not waive the privileges and immunities |
| 7 |
* granted to it by virtue of its status as an intergovernmental organisation |
| 8 |
* nor does it submit to any jurisdiction. |
| 9 |
*/ |
| 10 |
|
| 11 |
|
| 12 |
#include "SerialPartitioner.h" |
| 13 |
|
| 14 |
#include "atlas/parallel/mpi/mpi.h" |
| 15 |
|
| 16 |
namespace { |
| 17 |
atlas::grid::detail::partitioner::PartitionerBuilder<atlas::grid::detail::partitioner::SerialPartitioner> __Serial( |
| 18 |
atlas::grid::detail::partitioner::SerialPartitioner::static_type()); |
| 19 |
} |
| 20 |
|
| 21 |
namespace atlas { |
| 22 |
namespace grid { |
| 23 |
namespace detail { |
| 24 |
namespace partitioner { |
| 25 |
|
| 26 |
SerialPartitioner::SerialPartitioner(const eckit::Parametrisation& config): |
| 27 |
Partitioner(config) { |
| 28 |
part_ = mpi::comm(mpi_comm()).rank(); |
| 29 |
config.get("part", part_); |
| 30 |
config.get("partition", part_); |
| 31 |
} |
| 32 |
|
| 33 |
} |
| 34 |
} |
| 35 |
} |
| 36 |
} |