Sbatch chdir flag partially working in submit job app


I have an app which allows users to submit job to Slurm cluster.
I want output goes to working directory not under ondemand session directory:


I use --chdir in my submit script and I see that some output goes to the working directory, but when job starts solving and writing results it does it under session directory.

Is it possible to force all output to the working directory?

My job_script_options.json
“job_name”: “sys/dashboard/sys/submit-ansys-job”,
“workdir”: “~/ondemand/data/sys/dashboard/batch_connect/sys/submit-ansys-job/output/0a923d51-58e3-4a36-889a-43f2b910e241”,
“output_path”: “~/ondemand/data/sys/dashboard/batch_connect/sys/submit-ansys-job/output/0a923d51-58e3-4a36-889a-43f2b910e241/output.log”,
“shell_path”: “/bin/bash”,
“queue_name”: “sky,epyc,bdw”,
“qos”: “lowprio_8job”,
“wall_time”: 3600,
“native”: [

I see “%x.%j.out” goes to working directory but not actual job results.

According to these docs Batch Connect Script Options — Open OnDemand 3.1.0 documentation

Users cannot specify workdir this in batch connect applications. The same goes for output_path.

@jeff.ohrstrom am I out of luck and cannot change where the result of my job go?

No I don’t think you can.

Gotcha. I was able to go around by changing to my slurm working directory in my script.erb and starting job from there. I created a link from my session id folder to that slurm workdir.

Is not as elegant as having session id link in the web browser. I’m talking about this:

If I want to make another link on this screen pointing to slurm working directory which files should edit?

Can you please steer me in a right direction documentation wise?

Thank you