We have a python script, that uses Jinja to render the a shell script and submit it as a job either using SLURM or FirecREST. So, technically, we want to get rid of Jinja since it deteriorated the readability of script. We are using Jinja template for providing some SBATCH args and some env vars as below:
#!/bin/bash
#SBATCH --time={{ time }}
...
FRAMEWORK="{{ framework }}"
...
So, we are completely fine with the env vars. Fortunately, pyfirecrest provides an API to pass the env vars as await self.client.submit(job_script, ..., env_vars=...) and also sbatch/srun commands provide an CLI argument to do so as srun --export=VAR1=value1 job.sh. What is problematic for us, is the sbatch args at the header of the script, e.g., #SBATCH --time={{ time }}. We can move these args from the header of the script to the command as srun --time=02:00:00 ..., but the only remaining piece here is to pass these attributes with firecrest. I wonder if there is a way to do so. It would be more than great for us!
We have a python script, that uses Jinja to render the a shell script and submit it as a job either using SLURM or FirecREST. So, technically, we want to get rid of Jinja since it deteriorated the readability of script. We are using Jinja template for providing some SBATCH args and some env vars as below:
So, we are completely fine with the env vars. Fortunately, pyfirecrest provides an API to pass the env vars as
await self.client.submit(job_script, ..., env_vars=...)and also sbatch/srun commands provide an CLI argument to do so assrun --export=VAR1=value1 job.sh. What is problematic for us, is the sbatch args at the header of the script, e.g., #SBATCH --time={{ time }}. We can move these args from the header of the script to the command assrun --time=02:00:00 ..., but the only remaining piece here is to pass these attributes with firecrest. I wonder if there is a way to do so. It would be more than great for us!