Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
SWIFTsim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SWIFT
SWIFTsim
Commits
38e72a9c
Commit
38e72a9c
authored
9 years ago
by
Peter W. Draper
Browse files
Options
Downloads
Patches
Plain Diff
Documentation fixes
parent
b0e4a2a0
No related branches found
No related tags found
2 merge requests
!136
Master
,
!76
Add new initial partition schemes and extend repartition ones.
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/partition.c
+10
-6
10 additions, 6 deletions
src/partition.c
with
10 additions
and
6 deletions
src/partition.c
+
10
−
6
View file @
38e72a9c
...
...
@@ -19,8 +19,8 @@
/**
* @file partition.c
* @brief file of various techniques for partitioning a
grid of cells
*
into geometrically connected regions.
* @brief file of various techniques for partitioning a
nd repartitioning
*
a grid of cells
into geometrically connected regions.
*
* Currently supported types, grid, vectorise and METIS.
*/
...
...
@@ -158,6 +158,7 @@ void part_split_vector(struct space *s, int nregions, int *samplecells) {
* weighted by the number of particles scheme. Note METIS is optional.
*/
#if defined(WITH_MPI) && defined(HAVE_METIS)
/**
* @brief Fill the METIS xadj and adjncy arrays defining the graph of cells
* in a space.
...
...
@@ -172,7 +173,6 @@ void part_split_vector(struct space *s, int nregions, int *samplecells) {
* @param xadj the METIS xadj array to fill, must be of size
* number of cells in space + 1. NULL for not used.
*/
#if defined(WITH_MPI) && defined(HAVE_METIS)
static
void
graph_init_metis
(
struct
space
*
s
,
idx_t
*
adjncy
,
idx_t
*
xadj
)
{
/* Loop over all cells in the space. */
...
...
@@ -226,6 +226,7 @@ static void graph_init_metis(struct space *s, idx_t *adjncy, idx_t *xadj) {
}
#endif
#if defined(WITH_MPI) && defined(HAVE_METIS)
/**
* @brief Accumulate the counts of particles per cell.
*
...
...
@@ -233,7 +234,6 @@ static void graph_init_metis(struct space *s, idx_t *adjncy, idx_t *xadj) {
* @param counts the number of particles per cell. Should be
* allocated as size s->nr_parts.
*/
#if defined(WITH_MPI) && defined(HAVE_METIS)
static
void
accumulate_counts
(
struct
space
*
s
,
int
*
counts
)
{
struct
part
*
parts
=
s
->
parts
;
...
...
@@ -262,6 +262,7 @@ static void accumulate_counts(struct space *s, int *counts) {
}
#endif
#if defined(WITH_MPI) && defined(HAVE_METIS)
/**
* @brief Repartition the cells amongst the nodes using task timings
* as edge weights and vertex weights also from task timings
...
...
@@ -270,9 +271,12 @@ static void accumulate_counts(struct space *s, int *counts) {
* @param partweights whether particle counts will be used as vertex weights.
* @param bothweights whether vertex and edge weights will be used, otherwise
* only edge weights will be used.
* @param e The #engine.
* @param nodeID our nodeID.
* @param nr_nodes the number of nodes.
* @param s the space of cells holding our local particles.
* @param tasks the completed tasks from the last engine step for our node.
* @param nr_tasks the number of tasks.
*/
#if defined(WITH_MPI) && defined(HAVE_METIS)
static
void
repart_edge_metis
(
int
partweights
,
int
bothweights
,
int
nodeID
,
int
nr_nodes
,
struct
space
*
s
,
struct
task
*
tasks
,
int
nr_tasks
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment