Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tool_ops_w_papiex.py removed from JinjaFilters/ since it's not a Jinj…
…aFilter, though i don't know where to put it exactly for now. new file lib/python/__init__.py --> for importing custom job runner locally in a python shell, and debugging what I can there. new file lib/python/ppan_handler.py --> the custom job runner inherits from SLURMHandler() within cylc/flow/job_runner_handlers initially I wanted to define this with a class method, "submit", that does everything that SLURMHandler() does, but adds the step of running tool_ops_w_papiex.py before calling the submit command... would have a little like "tool_ops_w_papiex(job_file_path); self.super().submit();" UNFORTUNATELY #1: the cylc ecosystem has two kinds of job handlers, those with a submit method, and those with a constant called SUBMIT_CMD_TMPL. UNFORTUNATELY #2: SLURMHandler() is a handler that does not have a submit method. Instead, it has a SUBMIT_CMD_TMPL, which houses the string, "sbatch '%(job)s'". this string gets parsed to place '%(job)s' with the job script in mind. UNFORTUNATELY #3: the way this command gets parsed seems to prohibit making a one-liner that calls the python script before doing the "sbatch" command. i.e. separating commands with e.g. semicolons or && or || simply doesn't work. IMPLICATION: I need to write a PPANHandler() submit class method, that does everything that cylc/flow/job_runner_mgr.py does when it realizes the specified job runner has no submit method, grabs the SUBMIT_CMD_TMPL, and issues the job submission command via procopen from cylc/flow/cylc_subproc.py. FUTURE IAN, BEWARE #1: the stdout AND the stderr from the procopen call gets passed through job_runner_mgr._filter_submit_output(), which prevents certain types of text output from being seen on the screen FUTURE IAN, BEWARE #2: ANY AND EVERY friggin little syntax problem or bad line of code in ppan_handler.py that breaks the submission seems to result in text output that reliably gets caught by that output filter from job_runner_mgr.py IMPLICATION: gotta move slowly and methodically, step-by-step
- Loading branch information