Open Composer: Web application to generate and submit batch job scripts

Hi @mnakao , thanks for your support. This is very helpful.

Best,
Yucheng

1 Like

Thank you for response. I am trying Open Composer now with OOD 3.0.3, and it seems to work. I do have some questions, but I wonder is it best to post here, or in the discussion form at RIKEN-RCCS/OpenComposer · Discussions · GitHub ?

1 Like

Hi @colinbann, thank you for trying Open Composer!
If you have a GitHub account, I recommend posting in the Discussions section on GitHub, as it may help others with similar questions.
If you don’t have a GitHub account or feel more comfortable asking here, feel free to do so. Looking forward to your questions!

Best,

Hi, thank you for sharing this application, looks amazing. I am trying to personalize a few things and I am having some troubles. I hope the creators of the app will be able to help me.

I would like to add to my Slurm app a select widget with label “SLURM Account“ where the user can select under what slurm account they want to submit the job. Many users collaborate with different labs and have more than one Slurm account.

In other OnDemand apps we would add something like this:

account:
label: “SLURM Account”
required: true
<%- if SlurmAccounts.accounts.blank? -%>
widget: text_field
<%- else -%>
widget: select
options:
<%- SlurmAccounts.accounts.each do |a| -%>

  • “<%= a.strip %>”
    <%- end -%>
    <%- end -%>

But that doesn’t work, I get an Internal Server error. The file I’m editing is: sample_apps/Slurm/form.yml

I even tried something as simple as this just to test if javascript works, but I get a different error, that a key: value is not found in that line:

test1:
label: Test1
<%- if SlurmAccounts.accounts.blank? -%>
widget: text
<%- else -%>
widget: select
options:

  • [ “option1”, “” ]
  • [ “option2”, “” ]
    <%- end -%>

To test further, I created the following widget to test if javascript does work but perhaps it just doesnt recognize our SlurmAccounts variable:

test1:
label: “<%= OC_SCRIPT_LOCATION %>”
widget: select
options:

  • [ “option1” ]
  • [ “option2” ]
  • [ “<%= SCRIPT_CONTENT %>” ]
  • [ <%= SCRIPT_CONTENT %> ]
  • [ “#{HEADER_SCRIPT_LOCATION}” ]

But the app shows literally “<%= SCRIPT_CONTENT %>” as a string and it doesn’t interpret the value of the variable.

So, in summary, how can I edit the form.yml (or any other necessary file) to be able to add a select widget where the values in options are the accounts the user belongs to? And more generally, how can i access variables that are declared outside that file?

Thanks!

1 Like

You need to rename it to form.yml.erb to evaluate the ruby expressions.

We do something similar in our apps. This is our function to get slurm accounts (you’d likely need to change at least paths): hpc_docs/ood/common/CheckAccounts.rb at main · SouthernMethodistUniversity/hpc_docs · GitHub

Then use it like (note the includes at the top): hpc_docs/ood/combined_desktop/form.yml.erb at main · SouthernMethodistUniversity/hpc_docs · GitHub. We also show a completely different form to users without a slurm account so they get instruction for how accounts are requested.

1 Like

I received the same question on Open Composer of GitHub, so I replied there.
As John said, it was a file name issue.

Thanks,

We are pleased to announce that our paper on Open Composer has been published.
We sincerely appreciate the valuable discussions with all of you, which greatly contributed to this work.

*Open Composer: A Web-Based Application for Generating and Managing Batch Jobs on HPC Clusters [Paper][Slide]

Today, we also presented it at the SC25 workshop HUST2025.

Best regards,

1 Like

Masahiro:

Thank you for providing these wonderful resources! I’ve linked to them on the Open OnDemand website here: Resources | Open OnDemand

1 Like