Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Job Composer's Job Options sets input file set as job script when none is specified #105

Closed
ericfranz opened this issue Nov 6, 2019 · 1 comment · Fixed by #310
Closed
Assignees
Labels
bug Existing functionality not working as expected component/jobcomposer

Comments

@ericfranz
Copy link
Contributor

ericfranz commented Nov 6, 2019

You can use abaqus as an example. Create a new directory, cd into it, do module load abaqus and then abaqus fetch job=knee_bolster && abaqus fetch job=knee_bolster_ef1 && abaqus fetch job=knee_bolster_ef2 && abaqus fetch job=knee_bolster_ef3. Then do curl https://raw.githubusercontent.com/OSC/osc-ood-config/master/ondemand.osc.edu/apps/myjobs/templates/Basic_ABAQUS_Job_Owens/basic_abaqus.sh | grep -v fetch > script.sh.

The result is a job directory, with no manifest, that looks like this:

efranz@owens-login02:~/tmp/abaqus_script_z$ ls -1
.
..
knee_bolster_ef1.inp
knee_bolster_ef2.inp
knee_bolster_ef3.inp
knee_bolster.inp
shellscript.sh

In the Job Composer do "New Job => From Specified Path" and put the full path in the Source path box. Leave everything else blank and Save.

The result is the job details claims "Script is not valid! Edit Job Options to select a valid script".

Click Job Options. Notice that "knee_bolster.inp" is selected as the job script! This is a bug. We should not auto-select the first file in the directory as the job script. Rather, we should

  1. make a best guess as to which the job script is
  2. not let you choose a job script that is a file of size > 65k

It is reasonable to expect that a user would open the Job Options, change Cluster from Ruby to Owens, since this is an Owens job script, click Save, and be unaware that they had set the Job Script to an input file. Then they submit and run into problems.

This is related to #104

@ericfranz ericfranz added the bug Existing functionality not working as expected label Nov 6, 2019
@ericfranz
Copy link
Contributor Author

Note that the "validation" to avoid 65k size input files would in the above example only eliminate from the dropdown knee_bolster_ef1.inp and knee_bolster_ef2.inp.

Out of the remaining we would still have shellscript.sh.

This is where @AriettaZ's idea of a recommended options along with other options is good. For recommended options we can look for clues like:

  • first 1000 bytes has string #PBS or #SBATCH or other
  • first line starts with a shebang
  • file name ends with .sh, .job, .slurm, .batch, .qsub, .sbatch, .srun, .bsub
  • if there is a reliable way to find the mimetype, that could be used to ignore binary files (though the file command is not available on all systems)

Basically I think there would be a number of tests and if one passes we might include that in our recommendations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Existing functionality not working as expected component/jobcomposer
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants