#! /usr/bin/env python

import logging
import os
import platform

from lab.calls.call import Call
from lab import tools

tools.configure_logging()

logging.info(f"node: {platform.node()}")

run_log = open("run.log", "wb")
run_err = open("run.err", "wb", buffering=0)  # disable buffering
redirects = {"stdout": run_log, "stderr": run_err}

# Make sure we're in the run directory.
os.chdir(os.path.dirname(os.path.abspath(__file__)))

Call(['/infai/chrrem00/downward/duplicate-detection/experiments/.venv/bin/python3', '/infai/chrrem00/downward/duplicate-detection/experiments/data/experiments-2026-05-30_consolidated-blind/code-f2d41ef22404c0b7201382bd56220804d4cd8b8a_bd874d5d/fast-downward.py', '--validate', '--overall-time-limit', '30m', '--overall-memory-limit', '3584M', '--search-time-limit', '30m', '--build', 'release', 'domain.pddl', 'problem.pddl', '--search', 'let(h, blind(cache_estimates=false), let(f, sum([g(), h]), eager(early([f, h], heap_type=boost_fibonacci), reopen_closed=true, f_eval=f)))'], hard_stderr_limit=10240, hard_stdout_limit=10240, memory_limit=None, name='planner', soft_stderr_limit=64, soft_stdout_limit=1024, time_limit=None, **redirects).wait()


for f in [run_log, run_err]:
    f.close()
    if os.path.getsize(f.name) == 0:
        os.remove(f.name)
