How to set number of nodes?

The question is in the title thanks you ^^

Matthieu: Can you give us a bit more info as to what you are looking for specifically? Are you trying to set the number of nodes in one of the existing interactive apps? In the job composer? In a new app you are developing? As a starting point, you might want to look at this page in the documentation about modifying form attributes:

i want to put a option on the jobs composer page for choose the number of node for the user, exemple if the user want 3 nodes for a job. And ty for the documentation, I had already read it.

While it’s not impossible to do, that’s going to be rather complicated. The main reason is that the job composer inherently lets the user edit the submit script of the job, which is where you indicate the number of nodes to use. So if you had some sort of input box for number of nodes (which then somehow ‘injected’ the correct line into the script when you hit submit), if the user also edited the submit script directly as shown on the screen, the 2 inputs would be out of sync and you wouldn’t know which to utilize.

Perhaps a better approach would just be to add some comments to the template or fields that tell the user to directly edit the submit script and update the nodes directive in order to change the number of nodes?

I would like to understand how the script is generated to be able to put a variable to contain the desired number of nodes.

We don’t have anything that already does that for job composer, but we do for various interactive apps, which should give you a bit of sense as to how you could accomplish it. I recommend looking at one of our example interactive apps, such as the ANSYS one, in github:
In particular, check out the form.yml and submit.yml.erb to see how we populate the form and then translate that into a submission script.