Flux-core: The mustache template doesn't work with flux mini run

Created on 31 Aug 2020  路  7Comments  路  Source: flux-framework/flux-core

I am helping COVID19 docking simulations and it appears that the mustache template doesn't work with flux mini run. We have a work around but it would be good to fix this.

quartz2306{dahn}38: flux mini run -N 2 -n 4 --output='job-{{jobid}}.out' hostname
[0-1]: stdout redirected to job-{{jobid}}.out
[0-1]: stderr redirected to job-{{jobid}}.out
quartz2306{dahn}39:
quartz2306{dahn}39: flux mini run -N 2 -n 4 --output=job-{{jobid}}.out hostname
[0-1]: stdout redirected to job-jobid.out
[0-1]: stderr redirected to job-jobid.out
quartz2306{dahn}40: ll
-rw-------  1 dahn dahn   44 Aug 31 09:20 job-jobid.out
-rw-------  1 dahn dahn   44 Aug 31 09:19 job-{{jobid}}.out
quartz2306{dahn}24: /usr/global/tools/flux/toss_3_x86_64_ib/flux-c0.18.0-s0.10.0/bin/flux --version
commands:           0.18.0
libflux-core:       0.18.0
build-options:      +hwloc==1.11.0

All 7 comments

flux-mini(1) documents the only supported template as {{id}} not {{jobid}}. Have you tried that?

The command should probably error out when an unsupported template is used.

Ah. That could have been the issue in his script. Will try.

馃う That's totally my bad. I read this comment and not the code right below it: https://github.com/flux-framework/flux-core/blob/master/src/cmd/flux-mini.py#L578. Super low priority, but we should probably update that comment just for consistency.

Seems like it may be a common error, so perhaps either {{id}} or {{jobid}} should work?

Seems like it may be a common error, so perhaps either {{id}} or {{jobid}} should work?

I think that makes a lot of sense FWIW. Also errors on un-matched templates would be really good for catching this kind of thing.

I think that makes a lot of sense FWIW. Also errors on un-matched templates would be really good for catching this kind of thing.

Heh, yeah, I'll open an issue on that one. One problem is that the template isn't substituted until the job is running (in the job shell). This is perhaps a good case for extensions to the validator, or a way to run the job shell in standalone "validate" mode as I alluded to above. (edit: well I thought I had alluded to it above, maybe that was a different issue)

I think this was fixed by #3180

Was this page helpful?
0 / 5 - 0 ratings

Related issues

grondo picture grondo  路  7Comments

cmoussa1 picture cmoussa1  路  8Comments

SteVwonder picture SteVwonder  路  7Comments

SteVwonder picture SteVwonder  路  7Comments

garlick picture garlick  路  8Comments