Changing log file location when using htmap

14 Views Asked by At

I am using HTCondor with HTMap [HTMap documentation, HTMap with HTCondor] using a python script, and I am running with an issue when trying to add customised settings to the HTCondor job.

I want to change the location of the logfiles (so log, error and output), as well as the name of the job.

If I were to write a submission (.sub file), I would have the options like:

log = path_to_log/logfile.log
output = path_to_output/output.txt
error = path_to_error/error.txt
+JobBatchName = 'job_name'

However, if I try to set these parameters as options of HTMap, I get the error htmap.exceptions.ReservedOptionKeyword: jobbatchname,log are reserved keywords and cannot be used. I get this error both if I try to set the options as standard options or as custom_options. Would anyone know how to solve this?

Here are the two version of the code I am using, both raising the same error:

  • standard options:
options = ht.MapOptions(
    request_cpus="1",
    request_memory="5GB",
    environment=f"PYTHONPATH={here.resolve()}",
    log="/usera/plebani/MET/condor_logs/logs/ttbar.log",
    JobBatchName="ttbar"
    requirements='(POOL != "GENERAL" && HAS_r04 && OpSysAndVer == "CentOS7")',
    custom_options= { "MaxRunTime" : "38800"
                     }
)
  • custom_options:
options = ht.MapOptions(
    request_cpus="1",
    request_memory="5GB",
    environment=f"PYTHONPATH={here.resolve()}",
    requirements='(POOL != "GENERAL" && HAS_r04 && OpSysAndVer == "CentOS7")',
    custom_options= { "MaxRunTime" : "38800",
                     "JobBatchName" : "ttbar",
                     "log" : "/usera/plebani/MET/condor_logs/logs/ttbar.log"
                     }
)
0

There are 0 best solutions below