Skip to content
Snippets Groups Projects
Commit 3b0abc28 authored by Aidan Chalk's avatar Aidan Chalk
Browse files

New genetic partitioning branch which actually compiles on c4 and should work orrectly

parent bd9b222b
No related branches found
No related tags found
No related merge requests found
......@@ -46,7 +46,7 @@ include_HEADERS = space.h runner.h queue.h task.h lock.h cell.h part.h const.h \
hydro_properties.h riemann.h threadpool.h cooling.h cooling_struct.h sourceterms.h \
sourceterms_struct.h statistics.h memswap.h cache.h runner_doiact_vec.h profiler.h \
dump.h logger.h active.h timeline.h xmf.h gravity_properties.h gravity_derivatives.h \
vector_power.h hydro_space.h sort_part.h
vector_power.h hydro_space.h sort_part.h genetic_partitioning.h
# Common source files
AM_SOURCES = space.c runner.c queue.c task.c cell.c engine.c \
......@@ -57,7 +57,7 @@ AM_SOURCES = space.c runner.c queue.c task.c cell.c engine.c \
runner_doiact_fft.c threadpool.c cooling.c sourceterms.c \
statistics.c runner_doiact_vec.c profiler.c dump.c logger.c \
part_type.c xmf.c gravity_properties.c gravity.c \
hydro_space.c
hydro_space.c genetic_partitioning.c
# Include files for distribution, not installation.
nobase_noinst_HEADERS = align.h approx_math.h atomic.h cycle.h error.h inline.h kernel_hydro.h kernel_gravity.h \
......
This diff is collapsed.
#include "swift.h"
void genetic_algorithm(struct space *s, struct task *tasks, int nr_tasks, idx_t *initial_partition, int nr_nodes);
......@@ -50,6 +50,7 @@
#include "debug.h"
#include "error.h"
#include "partition.h"
#include "genetic_partitioning.h"
#include "space.h"
#include "tools.h"
......@@ -394,6 +395,8 @@ static void pick_metis(struct space *s, int nregions, int *vertexw, int *edgew,
if (regionid[k] < 0 || regionid[k] >= nregions)
error("Got bad nodeID %" PRIDX " for cell %i.", regionid[k], k);
genetic_algorithm(s,s->e->sched.tasks, s->e->sched.nr_tasks, regionid, nregions);
/* We want a solution in which the current regions of the space are
* preserved when possible, to avoid unneccesary particle movement.
* So create a 2d-array of cells counts that are common to all pairs
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment