Incorrect path to stdout and stderr files?

I’ve (apparently) gotten past my issue with submitting jobs to the scheduler and have run into an issue with the stdout and stderr files not showing up. If I let cylc set the filenames by default I see the following in the job script:

# DIRECTIVES:
#PBS -N L96.1.debug_submit/run7
#PBS -o cylc-run/debug_submit/run7/log/job/1/L96/01/job.out
#PBS -e cylc-run/debug_submit/run7/log/job/1/L96/01/job.err

It looks like cylc is not picking up my home directory path. Is this a bug or is this configuration error on my part? If I specify the full path to a file in my flow.cyc using PBS directives it works without issue.

That job script looks correct to me, no Cylc configuration needed. Cylc uses relative paths here. PBS should evaluate these paths relative to $HOME on the platform for the account under which the job is run.

Not sure why you’re not seeing the out/err files, might be worth running echo $HOME in a job incase it gives a different result in the execution environment than expected.

@oliver.sanders - I don’t think that’s right. With Cylc 7 the full path gets used for any jobs submitted to localhost. Relative paths get used for any remote jobs. This doesn’t appear to be working correctly with Cylc 8.

I think PBS takes job log path relative to the current working directory when “qsub” is executed. That will be $HOME for remote jobs (where ssh gets you) but not for local jobs? Cylc 8 changes could have broken this, we’d better check…

Yes, unfortunately this is a Cylc8 bug, Cylc7 used to provide an absolute path for local job submissions.

I’ve opened an issue, it should be quick to fix:

If keen to push ahead with the Cylc8 beta in the meantime, then a small patch to the source code that adds $HOME to job file path should serve as a temporary workaround. Note this would fix local PBS submissions but break remote ones.

diff --git a/cylc/flow/job_runner_handlers/pbs.py b/cylc/flow/job_runner_handlers/pbs.py
index 8319aac71..5926fb129 100644
--- a/cylc/flow/job_runner_handlers/pbs.py
+++ b/cylc/flow/job_runner_handlers/pbs.py
@@ -94,6 +94,8 @@ class PBSHandler:
         if job_name_len_max:
             directives["-N"] = directives["-N"][0:job_name_len_max]
 
+        # hardcode the job file path, will NOT work for remote
+        # job submissions (where $HOME would vary) only local ones
+        from pathlib import Path
+        job_file_path = str(Path('~/', job_file_path).expanduser())
         directives["-o"] = job_file_path + ".out"
         directives["-e"] = job_file_path + ".err"
         if (job_conf["execution_time_limit"] and

Thanks everyone! I’m content to either wait for the fix or add in the absolute path myself. Since there was a call for 8 beta testers I’m happy to keep plugging along with it and reporting what I find here while I learn 8.

On that note, since I’m not really sure what is an error on my part and what is a bug is it most useful for me to report what I find here? Rather than opening an issue for each stumbling block I hit?

1 Like

That’s great, thanks!

And yes, it’s best to post questions to the forum at this stage, on usage or possible bugs.