From d99f4daf04779dc6c42fd089417030d3482f514f Mon Sep 17 00:00:00 2001 From: "Peter W. Draper" <p.w.draper@durham.ac.uk> Date: Wed, 6 Jul 2016 13:20:58 +0100 Subject: [PATCH] Convert negative weights error in partitioning to warning about tic before toc A small synchronization error is seen on cosma-e that can be fixed using processory affinity, this stops that being critical. --- src/partition.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/partition.c b/src/partition.c index 6df437826d..ae2c841214 100644 --- a/src/partition.c +++ b/src/partition.c @@ -458,9 +458,15 @@ static void repart_edge_metis(int partweights, int bothweights, int nodeID, t->type != task_type_kick && t->type != task_type_init) continue; - /* Get the task weight. */ + /* Get the task weight. This can be slightly negative on multiple board + * computers when the runners are not pinned to cores, don't stress just + * make a report and ignore these tasks. */ int w = (t->toc - t->tic) * wscale; - if (w < 0) error("Bad task weight (%d).", w); + if (w < 0) { + message("Task toc before tic: -%.3f %s, (try using processor affinity).", + clocks_from_ticks( t->tic - t->toc ), clocks_getunit()); + w = 0; + } /* Do we need to re-scale? */ wtot += w; -- GitLab