aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsinanmohd <sinan@sinanmohd.com>2024-07-25 08:12:09 +0530
committersinanmohd <sinan@sinanmohd.com>2024-07-25 08:12:09 +0530
commitf1fbce3d224864c8ba04c15e2f41853e347933f9 (patch)
tree442a0280d8ceeaf587ccd027a94e07bd9c4eeaab /src
parentf133ed873187ae6a84471d21ce9b768a0f143feb (diff)
solver_highs: implement --solver-report
Diffstat (limited to 'src')
-rw-r--r--src/solver_highs.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/solver_highs.c b/src/solver_highs.c
index a56dbd8..5f96ea1 100644
--- a/src/solver_highs.c
+++ b/src/solver_highs.c
@@ -191,6 +191,7 @@ int solver_highs(struct job **job, struct job_clist *q, int32_t resources)
static bool solved = false;
struct jobid *jobid = NULL;
double *solution = NULL;
+ struct job *j;
int ret = 0;
if (solved)
@@ -216,6 +217,15 @@ int solver_highs(struct job **job, struct job_clist *q, int32_t resources)
job_stale_set(jobid->jobs[i]);
}
+ if (evanix_opts.solver_report) {
+ CIRCLEQ_FOREACH (j, q, clist) {
+ if (j->stale) {
+ printf("❌ refusing to build %s, cost: %d\n",
+ j->drv_path, job_cost_recursive(j));
+ }
+ }
+ }
+
solved = true;
out_free_jobid:
jobid_free(jobid);