Commit b48cf575 authored by Pedro Gonnet's avatar Pedro Gonnet
Browse files

Merge remote-tracking branch 'origin' into tasks_cleanup

Conflicts:
	src/engine.c
	src/scheduler.c
	src/space.c
	src/task.c
parents 98f8fde9 35b13d49
...@@ -20,11 +20,19 @@ ...@@ -20,11 +20,19 @@
* *
******************************************************************************/ ******************************************************************************/
/* Config parameters. */
#include "../config.h"
/* Some standard headers. */
#include <stdio.h> #include <stdio.h>
/* This object's header. */
#include "debug.h"
/* Local includes. */
#include "config.h" #include "config.h"
#include "const.h" #include "const.h"
#include "debug.h" #include "inline.h"
#include "part.h" #include "part.h"
/* Import the right hydro definition */ /* Import the right hydro definition */
...@@ -51,7 +59,6 @@ ...@@ -51,7 +59,6 @@
* *
* (Should be used for debugging only as it runs in O(N).) * (Should be used for debugging only as it runs in O(N).)
*/ */
void printParticle(struct part *parts, struct xpart *xparts, long long int id, void printParticle(struct part *parts, struct xpart *xparts, long long int id,
size_t N) { size_t N) {
...@@ -69,6 +76,17 @@ void printParticle(struct part *parts, struct xpart *xparts, long long int id, ...@@ -69,6 +76,17 @@ void printParticle(struct part *parts, struct xpart *xparts, long long int id,
if (!found) printf("## Particles[???] id=%lld not found\n", id); if (!found) printf("## Particles[???] id=%lld not found\n", id);
} }
/**
* @brief Looks for the g-particle with the given id and prints its information
* to
* the standard output.
*
* @param gparts The array of g-particles.
* @param id The id too look for.
* @param N The size of the array of g-particles.
*
* (Should be used for debugging only as it runs in O(N).)
*/
void printgParticle(struct gpart *gparts, long long int id, size_t N) { void printgParticle(struct gpart *gparts, long long int id, size_t N) {
int found = 0; int found = 0;
...@@ -95,9 +113,7 @@ void printgParticle(struct gpart *gparts, long long int id, size_t N) { ...@@ -95,9 +113,7 @@ void printgParticle(struct gpart *gparts, long long int id, size_t N) {
* *
* @param p The particle to print * @param p The particle to print
* @param xp The extended data ot the particle to print * @param xp The extended data ot the particle to print
*
*/ */
void printParticle_single(struct part *p, struct xpart *xp) { void printParticle_single(struct part *p, struct xpart *xp) {
printf("## Particle: id=%lld ", p->id); printf("## Particle: id=%lld ", p->id);
...@@ -105,6 +121,18 @@ void printParticle_single(struct part *p, struct xpart *xp) { ...@@ -105,6 +121,18 @@ void printParticle_single(struct part *p, struct xpart *xp) {
printf("\n"); printf("\n");
} }
/**
* @brief Prints the details of a given particle to stdout
*
* @param gp The g-particle to print
*/
void printgParticle_single(struct gpart *gp) {
printf("## g-Particle: id=%lld ", gp->id);
gravity_debug_particle(gp);
printf("\n");
}
#ifdef HAVE_METIS #ifdef HAVE_METIS
/** /**
......
...@@ -19,14 +19,15 @@ ...@@ -19,14 +19,15 @@
#ifndef SWIFT_DEBUG_H #ifndef SWIFT_DEBUG_H
#define SWIFT_DEBUG_H #define SWIFT_DEBUG_H
/* Includes. */ struct part;
#include "cell.h" struct gpart;
#include "part.h" struct xpart;
void printParticle(struct part *parts, struct xpart *xparts, long long int id, void printParticle(struct part *parts, struct xpart *xparts, long long int id,
size_t N); size_t N);
void printgParticle(struct gpart *parts, long long int id, size_t N); void printgParticle(struct gpart *parts, long long int id, size_t N);
void printParticle_single(struct part *p, struct xpart *xp); void printParticle_single(struct part *p, struct xpart *xp);
void printgParticle_single(struct gpart *gp);
#ifdef HAVE_METIS #ifdef HAVE_METIS
#include "metis.h" #include "metis.h"
......
...@@ -59,15 +59,26 @@ ...@@ -59,15 +59,26 @@
#include "parallel_io.h" #include "parallel_io.h"
#include "part.h" #include "part.h"
#include "partition.h" #include "partition.h"
#include "proxy.h"
#include "runner.h"
#include "serial_io.h" #include "serial_io.h"
#include "single_io.h" #include "single_io.h"
#include "timers.h" #include "timers.h"
#include "units.h"
const char *engine_policy_names[13] = {
"none", "rand", "steal", "keep", const char *engine_policy_names[13] = {"none",
"block", "fix_dt", "cpu_tight", "mpi", "rand",
"numa_affinity", "hydro", "self_gravity", "external_gravity", "steal",
"cosmology_integration"}; "keep",
"block",
"fix_dt",
"cpu_tight",
"mpi",
"numa_affinity",
"hydro",
"self_gravity",
"external_gravity",
"cosmology_integration"};
/** The rank of the engine as a global variable (for messages). */ /** The rank of the engine as a global variable (for messages). */
int engine_rank; int engine_rank;
...@@ -111,7 +122,6 @@ void engine_addlink(struct engine *e, struct link **l, struct task *t) { ...@@ -111,7 +122,6 @@ void engine_addlink(struct engine *e, struct link **l, struct task *t) {
* @param c The #cell. * @param c The #cell.
* @param super The super #cell. * @param super The super #cell.
*/ */
void engine_make_hierarchical_tasks(struct engine *e, struct cell *c, void engine_make_hierarchical_tasks(struct engine *e, struct cell *c,
struct cell *super) { struct cell *super) {
...@@ -217,7 +227,7 @@ void engine_redistribute(struct engine *e) { ...@@ -217,7 +227,7 @@ void engine_redistribute(struct engine *e) {
bzero(counts, sizeof(int) * nr_nodes * nr_nodes); bzero(counts, sizeof(int) * nr_nodes * nr_nodes);
bzero(g_counts, sizeof(int) * nr_nodes * nr_nodes); bzero(g_counts, sizeof(int) * nr_nodes * nr_nodes);
// Allocate the destination index arrays. /* Allocate the destination index arrays. */
int *dest, *g_dest; int *dest, *g_dest;
if ((dest = (int *)malloc(sizeof(int) * s->nr_parts)) == NULL) if ((dest = (int *)malloc(sizeof(int) * s->nr_parts)) == NULL)
error("Failed to allocate dest temporary buffer."); error("Failed to allocate dest temporary buffer.");
...@@ -236,9 +246,12 @@ void engine_redistribute(struct engine *e) { ...@@ -236,9 +246,12 @@ void engine_redistribute(struct engine *e) {
} }
const int cid = cell_getid(cdim, parts[k].x[0] * ih[0], const int cid = cell_getid(cdim, parts[k].x[0] * ih[0],
parts[k].x[1] * ih[1], parts[k].x[2] * ih[2]); parts[k].x[1] * ih[1], parts[k].x[2] * ih[2]);
/* if (cid < 0 || cid >= s->nr_cells) #ifdef SWIFT_DEBUG_CHECKS
error("Bad cell id %i for part %i at [%.3e,%.3e,%.3e].", if (cid < 0 || cid >= s->nr_cells)
cid, k, parts[k].x[0], parts[k].x[1], parts[k].x[2]); */ error("Bad cell id %i for part %zi at [%.3e,%.3e,%.3e].", cid, k,
parts[k].x[0], parts[k].x[1], parts[k].x[2]);
#endif
dest[k] = cells[cid].nodeID; dest[k] = cells[cid].nodeID;
/* The counts array is indexed as count[from * nr_nodes + to]. */ /* The counts array is indexed as count[from * nr_nodes + to]. */
...@@ -265,9 +278,10 @@ void engine_redistribute(struct engine *e) { ...@@ -265,9 +278,10 @@ void engine_redistribute(struct engine *e) {
count_this_dest = 0; count_this_dest = 0;
} }
/* Debug */ #ifdef SWIFT_DEBUG_CHECKS
/* if(s->parts[k].gpart->id < 0) */ if (s->parts[k].gpart->id < 0)
/* error("Trying to link a partnerless gpart !"); */ error("Trying to link a partnerless gpart !");
#endif
s->parts[k].gpart->id = count_this_dest; s->parts[k].gpart->id = count_this_dest;
count_this_dest++; count_this_dest++;
...@@ -287,9 +301,12 @@ void engine_redistribute(struct engine *e) { ...@@ -287,9 +301,12 @@ void engine_redistribute(struct engine *e) {
} }
const int cid = cell_getid(cdim, gparts[k].x[0] * ih[0], const int cid = cell_getid(cdim, gparts[k].x[0] * ih[0],
gparts[k].x[1] * ih[1], gparts[k].x[2] * ih[2]); gparts[k].x[1] * ih[1], gparts[k].x[2] * ih[2]);
/* if (cid < 0 || cid >= s->nr_cells) #ifdef SWIFT_DEBUG_CHECKS
error("Bad cell id %i for part %i at [%.3e,%.3e,%.3e].", if (cid < 0 || cid >= s->nr_cells)
cid, k, g_parts[k].x[0], g_parts[k].x[1], g_parts[k].x[2]); */ error("Bad cell id %i for part %zi at [%.3e,%.3e,%.3e].", cid, k,
gparts[k].x[0], gparts[k].x[1], gparts[k].x[2]);
#endif
g_dest[k] = cells[cid].nodeID; g_dest[k] = cells[cid].nodeID;
/* The counts array is indexed as count[from * nr_nodes + to]. */ /* The counts array is indexed as count[from * nr_nodes + to]. */
...@@ -464,17 +481,17 @@ void engine_redistribute(struct engine *e) { ...@@ -464,17 +481,17 @@ void engine_redistribute(struct engine *e) {
offset_gparts += count_gparts; offset_gparts += count_gparts;
} }
#ifdef SWIFT_DEBUG_CHECKS
/* Verify that all parts are in the right place. */ /* Verify that all parts are in the right place. */
/* for ( int k = 0 ; k < nr_parts ; k++ ) { for (int k = 0; k < nr_parts; k++) {
int cid = cell_getid( cdim , parts_new[k].x[0]*ih[0], int cid = cell_getid(cdim, parts_new[k].x[0] * ih[0],
parts_new[k].x[1]*ih[1], parts_new[k].x[2]*ih[2] ); parts_new[k].x[1] * ih[1], parts_new[k].x[2] * ih[2]);
if ( cells[ cid ].nodeID != nodeID ) if (cells[cid].nodeID != nodeID)
error( "Received particle (%i) that does not belong here error("Received particle (%i) that does not belong here (nodeID=%i).", k,
(nodeID=%i).", k , cells[ cid ].nodeID ); cells[cid].nodeID);
} */ }
/* Verify that the links are correct */ /* Verify that the links are correct */
/* MATTHIEU: To be commented out once we are happy */
for (size_t k = 0; k < nr_gparts; ++k) { for (size_t k = 0; k < nr_gparts; ++k) {
if (gparts_new[k].id > 0) { if (gparts_new[k].id > 0) {
...@@ -495,6 +512,7 @@ void engine_redistribute(struct engine *e) { ...@@ -495,6 +512,7 @@ void engine_redistribute(struct engine *e) {
if (parts_new[k].gpart->part != &parts_new[k]) error("Linking problem !"); if (parts_new[k].gpart->part != &parts_new[k]) error("Linking problem !");
} }
} }
#endif
/* Set the new part data, free the old. */ /* Set the new part data, free the old. */
free(parts); free(parts);
...@@ -535,7 +553,6 @@ void engine_redistribute(struct engine *e) { ...@@ -535,7 +553,6 @@ void engine_redistribute(struct engine *e) {
* *
* @param e The #engine. * @param e The #engine.
*/ */
void engine_repartition(struct engine *e) { void engine_repartition(struct engine *e) {
#if defined(WITH_MPI) && defined(HAVE_METIS) #if defined(WITH_MPI) && defined(HAVE_METIS)
...@@ -585,7 +602,6 @@ void engine_repartition(struct engine *e) { ...@@ -585,7 +602,6 @@ void engine_repartition(struct engine *e) {
* @param up The upward gravity #task. * @param up The upward gravity #task.
* @param down The downward gravity #task. * @param down The downward gravity #task.
*/ */
void engine_addtasks_grav(struct engine *e, struct cell *c, struct task *up, void engine_addtasks_grav(struct engine *e, struct cell *c, struct task *up,
struct task *down) { struct task *down) {
...@@ -607,7 +623,6 @@ void engine_addtasks_grav(struct engine *e, struct cell *c, struct task *up, ...@@ -607,7 +623,6 @@ void engine_addtasks_grav(struct engine *e, struct cell *c, struct task *up,
* @param ci The sending #cell. * @param ci The sending #cell.
* @param cj The receiving #cell * @param cj The receiving #cell
*/ */
void engine_addtasks_send(struct engine *e, struct cell *ci, struct cell *cj) { void engine_addtasks_send(struct engine *e, struct cell *ci, struct cell *cj) {
#ifdef WITH_MPI #ifdef WITH_MPI
...@@ -706,7 +721,6 @@ void engine_addtasks_recv(struct engine *e, struct cell *c, struct task *t_xv, ...@@ -706,7 +721,6 @@ void engine_addtasks_recv(struct engine *e, struct cell *c, struct task *t_xv,
* *
* @param e The #engine. * @param e The #engine.
*/ */
void engine_exchange_cells(struct engine *e) { void engine_exchange_cells(struct engine *e) {
#ifdef WITH_MPI #ifdef WITH_MPI
...@@ -721,8 +735,7 @@ void engine_exchange_cells(struct engine *e) { ...@@ -721,8 +735,7 @@ void engine_exchange_cells(struct engine *e) {
MPI_Status status; MPI_Status status;
ticks tic = getticks(); ticks tic = getticks();
/* Run through the cells and get the size of the ones that will be sent off. /* Run through the cells and get the size of the ones that will be sent */
*/
int count_out = 0; int count_out = 0;
for (int k = 0; k < nr_cells; k++) { for (int k = 0; k < nr_cells; k++) {
offset[k] = count_out; offset[k] = count_out;
...@@ -854,7 +867,6 @@ void engine_exchange_cells(struct engine *e) { ...@@ -854,7 +867,6 @@ void engine_exchange_cells(struct engine *e) {
* Note that this function does not mess-up the linkage between parts and * Note that this function does not mess-up the linkage between parts and
* gparts, i.e. the received particles have correct linkeage. * gparts, i.e. the received particles have correct linkeage.
*/ */
void engine_exchange_strays(struct engine *e, size_t offset_parts, void engine_exchange_strays(struct engine *e, size_t offset_parts,
int *ind_part, size_t *Npart, size_t offset_gparts, int *ind_part, size_t *Npart, size_t offset_gparts,
int *ind_gpart, size_t *Ngpart) { int *ind_gpart, size_t *Ngpart) {
...@@ -1165,7 +1177,7 @@ void engine_make_hydroloop_tasks(struct engine *e) { ...@@ -1165,7 +1177,7 @@ void engine_make_hydroloop_tasks(struct engine *e) {
* *
* @param e The #engine. * @param e The #engine.
*/ */
void engine_count_and_link_tasks_mapper(void *map_data, int num_elements, void engine_count_and_link_tasks_mapper(void *map_data, int num_elements,
void *extra_data) { void *extra_data) {
...@@ -1203,16 +1215,19 @@ void engine_count_and_link_tasks_mapper(void *map_data, int num_elements, ...@@ -1203,16 +1215,19 @@ void engine_count_and_link_tasks_mapper(void *map_data, int num_elements,
engine_addlink(e, &t->cj->density, t); engine_addlink(e, &t->cj->density, t);
atomic_inc(&t->cj->nr_density); atomic_inc(&t->cj->nr_density);
} }
} else if (t->type == task_type_sub) { } else if (t->type == task_type_sub_self) {
atomic_inc(&t->ci->nr_tasks); atomic_inc(&t->ci->nr_tasks);
if (t->cj != NULL) atomic_inc(&t->cj->nr_tasks);
if (t->subtype == task_subtype_density) { if (t->subtype == task_subtype_density) {
engine_addlink(e, &t->ci->density, t); engine_addlink(e, &t->ci->density, t);
atomic_inc(&t->ci->nr_density); atomic_inc(&t->ci->nr_density);
if (t->cj != NULL) { }
engine_addlink(e, &t->cj->density, t); } else if (t->type == task_type_sub_pair) {
atomic_inc(&t->cj->nr_density); atomic_inc(&t->ci->nr_tasks);
} if (t->subtype == task_subtype_density) {
engine_addlink(e, &t->ci->density, t);
atomic_inc(&t->ci->nr_density);
engine_addlink(e, &t->cj->density, t);
atomic_inc(&t->cj->nr_density);
} }
} }
} }
...@@ -1252,16 +1267,21 @@ void engine_count_and_link_tasks_serial(struct engine *e) { ...@@ -1252,16 +1267,21 @@ void engine_count_and_link_tasks_serial(struct engine *e) {
engine_addlink(e, &t->cj->density, t); engine_addlink(e, &t->cj->density, t);
atomic_inc(&t->cj->nr_density); atomic_inc(&t->cj->nr_density);
} }
} else if (t->type == task_type_sub) { } else if (t->type == task_type_sub_self) {
atomic_inc(&t->ci->nr_tasks); atomic_inc(&t->ci->nr_tasks);
if (t->cj != NULL) atomic_inc(&t->cj->nr_tasks); if (t->cj != NULL) atomic_inc(&t->cj->nr_tasks);
if (t->subtype == task_subtype_density) { if (t->subtype == task_subtype_density) {
engine_addlink(e, &t->ci->density, t); engine_addlink(e, &t->ci->density, t);
atomic_inc(&t->ci->nr_density); atomic_inc(&t->ci->nr_density);
if (t->cj != NULL) { }
engine_addlink(e, &t->cj->density, t); } else if (t->type == task_type_sub_pair) {
atomic_inc(&t->cj->nr_density); atomic_inc(&t->ci->nr_tasks);
} if (t->cj != NULL) atomic_inc(&t->cj->nr_tasks);
if (t->subtype == task_subtype_density) {
engine_addlink(e, &t->ci->density, t);
atomic_inc(&t->ci->nr_density);
engine_addlink(e, &t->cj->density, t);
atomic_inc(&t->cj->nr_density);
} }
} }
} }
...@@ -1354,29 +1374,47 @@ void engine_make_extra_hydroloop_tasks_mapper(void *map_data, int num_elements, ...@@ -1354,29 +1374,47 @@ void engine_make_extra_hydroloop_tasks_mapper(void *map_data, int num_elements,
} }
} }
/* Otherwise, sub interaction? */ /* Otherwise, sub self-interaction? */
else if (t->type == task_type_sub && t->subtype == task_subtype_density) { else if (t->type == task_type_sub_self &&
t->subtype == task_subtype_density) {
/* Start by constructing the task for the second hydro loop */ /* Start by constructing the task for the second hydro loop */
struct task *t2 = struct task *t2 =
scheduler_addtask(sched, task_type_sub, task_subtype_force, t->flags, scheduler_addtask(sched, task_type_sub_self, task_subtype_force,
0, t->ci, t->cj, 0); t->flags, 0, t->ci, t->cj, 0);
/* Add the link between the new loop and both cells */ /* Add the link between the new loop and both cells */
engine_addlink(e, &t->ci->force, t2); engine_addlink(e, &t->ci->force, t2);
atomic_inc(&t->ci->nr_force); atomic_inc(&t->ci->nr_force);
if (t->cj != NULL) {
engine_addlink(e, &t->cj->force, t2); /* Now, build all the dependencies for the hydro for the cells */
atomic_inc(&t->cj->nr_force); /* that are local and are not descendant of the same super-cells */
if (t->ci->nodeID == nodeID) {
engine_make_hydro_loops_dependencies(sched, t, t2, t->ci);
} }
}
/* Otherwise, sub pair-interaction? */
else if (t->type == task_type_sub_pair &&
t->subtype == task_subtype_density) {
/* Start by constructing the task for the second hydro loop */
struct task *t2 =
scheduler_addtask(sched, task_type_sub_pair, task_subtype_force,
t->flags, 0, t->ci, t->cj, 0);
/* Add the link between the new loop and both cells */
engine_addlink(e, &t->ci->force, t2);
atomic_inc(&t->ci->nr_force);
engine_addlink(e, &t->cj->force, t2);
atomic_inc(&t->cj->nr_force);
/* Now, build all the dependencies for the hydro for the cells */ /* Now, build all the dependencies for the hydro for the cells */
/* that are local and are not descendant of the same super-cells */ /* that are local and are not descendant of the same super-cells */
if (t->ci->nodeID == nodeID) { if (t->ci->nodeID == nodeID) {
engine_make_hydro_loops_dependencies(sched, t, t2, t->ci); engine_make_hydro_loops_dependencies(sched, t, t2, t->ci);
} }
if (t->cj != NULL && t->cj->nodeID == nodeID && if (t->cj->nodeID == nodeID && t->ci->super != t->cj->super) {
t->ci->super != t->cj->super) {
engine_make_hydro_loops_dependencies(sched, t, t2, t->cj); engine_make_hydro_loops_dependencies(sched, t, t2, t->cj);
} }
} }
...@@ -1443,13 +1481,14 @@ void engine_make_extra_hydroloop_tasks_serial(struct engine *e) { ...@@ -1443,13 +1481,14 @@ void engine_make_extra_hydroloop_tasks_serial(struct engine *e) {
} }
} }
/* Otherwise, sub interaction? */ /* Otherwise, sub-self interaction? */
else if (t->type == task_type_sub && t->subtype == task_subtype_density) { else if (t->type == task_type_sub_self &&
t->subtype == task_subtype_density) {
/* Start by constructing the task for the second hydro loop */ /* Start by constructing the task for the second hydro loop */
struct task *t2 = struct task *t2 =
scheduler_addtask(sched, task_type_sub, task_subtype_force, t->flags, scheduler_addtask(sched, task_type_sub_self, task_subtype_force,
0, t->ci, t->cj, 0); t->flags, 0, t->ci, t->cj, 0);
/* Add the link between the new loop and both cells */ /* Add the link between the new loop and both cells */
engine_addlink(e, &t->ci->force, t2); engine_addlink(e, &t->ci->force, t2);
...@@ -1458,22 +1497,33 @@ void engine_make_extra_hydroloop_tasks_serial(struct engine *e) { ...@@ -1458,22 +1497,33 @@ void engine_make_extra_hydroloop_tasks_serial(struct engine *e) {
engine_addlink(e, &t->cj->force, t2); engine_addlink(e, &t->cj->force, t2);
atomic_inc(&t->cj->nr_force); atomic_inc(&t->cj->nr_force);
} }
}
/* Otherwise, sub-pair interaction? */
else if (t->type == task_type_sub_pair &&
t->subtype == task_subtype_density) {
/* Start by constructing the task for the second hydro loop */
struct task *t2 =
scheduler_addtask(sched, task_type_sub_pair, task_subtype_force,
t->flags, 0, t->ci, t->cj, 0);
/* Add the link between the new loop and both cells */
engine_addlink(e, &t->ci->force, t2);
atomic_inc(&t->ci->nr_force);
engine_addlink(e, &t->cj->force, t2);
atomic_inc(&t->cj->nr_force);
/* Now, build all the dependencies for the hydro for the cells */ /* Now, build all the dependencies for the hydro for the cells */
/* that are local and are not descendant of the same super-cells */ /* that are local and are not descendant of the same super-cells */
if (t->ci->nodeID == nodeID) { if (t->ci->nodeID == nodeID) {
engine_make_hydro_loops_dependencies(sched, t, t2, t->ci); engine_make_hydro_loops_dependencies(sched, t, t2, t->ci);
} }
if (t->cj != NULL && t->cj->nodeID == nodeID && if (t->cj->nodeID == nodeID && t->ci->super != t->cj->super) {
t->ci->super != t->cj->super) {
engine_make_hydro_loops_dependencies(sched, t, t2, t->cj); engine_make_hydro_loops_dependencies(sched, t, t2, t->cj);
} }
} }
/* /\* Kick tasks should rely on the grav_down tasks of their cell. *\/ */
/* else if (t->type == task_type_kick && t->ci->grav_down != NULL) */
/* scheduler_addunlock(sched, t->ci->grav_down, t); */
/* External gravity tasks should depend on init and unlock the kick */ /* External gravity tasks should depend on init and unlock the kick */
else if (t->type == task_type_grav_external) { else if (t->type == task_type_grav_external) {
scheduler_addunlock(sched, t->ci->init, t); scheduler_addunlock(sched, t->ci->init, t);
...@@ -1579,8 +1629,8 @@ void engine_maketasks(struct engine *e) { ...@@ -1579,8 +1629,8 @@ void engine_maketasks(struct engine *e) {
{ {
const ticks tic = getticks(); const ticks tic = getticks();
scheduler_splittasks(sched); scheduler_splittasks(sched);
message("scheduler_splittasks took %.3f %s.", clocks_from_ticks(getticks() - tic), message("scheduler_splittasks took %.3f %s.",
clocks_getunit()); clocks_from_ticks(getticks() - tic), clocks_getunit());
} }
/* Allocate the list of cell-task links. The maximum number of links /* Allocate the list of cell-task links. The maximum number of links
...@@ -1600,7 +1650,8 @@ void engine_maketasks(struct engine *e) { ...@@ -1600,7 +1650,8 @@ void engine_maketasks(struct engine *e) {
store the density tasks in each cell, and make each sort store the density tasks in each cell, and make each sort
depend on the sorts of its progeny. */ depend on the sorts of its progeny. */
/* threadpool_map(&e->threadpool, engine_count_and_link_tasks_mapper,