Skip to content

Conversation

ostanley
Copy link
Contributor

By not specifying bash in qsub commands you require the generated files to have executable permissions. Most linux systems create 644 files without these permissions. I corrected this by adding bash to the qsub command before the batchscript variable. If there is another proper way to do this please let me know.

Thank you,

Olivia

@ostanley ostanley changed the title FIX SGEGraph fixed to allow for varied write permissions FIX SGEGraph fixed to allow for varied file permissions Apr 28, 2016
@satra
Copy link
Member

satra commented Apr 30, 2016

@hjmjohnson - can you take a look here?

stdoutFile = '-o {outFile}'.format(
outFile=batchscriptoutfile)
full_line = '{jobNm}=$(qsub {outFileOption} {errFileOption} {extraQSubArgs} {dependantIndex} -N {jobNm} {batchscript} | awk \'{{print $3}}\')\n'.format(
full_line = '{jobNm}=$(qsub {outFileOption} {errFileOption} {extraQSubArgs} {dependantIndex} -N {jobNm} bash {batchscript} | awk \'{{print $3}}\')\n'.format(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ostanley @satra I think it would be better to ensure that that bash script has execute permisssions.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Forgive me if this is an obvious question but how would you do that? You can only use chmod after the file exists and the nipype creates the file just before run. Should I add an os.chmod() command to the script creation?

@effigies
Copy link
Member

Marking orphaned, but if someone comes back to this, you can check permissions with os.access().

@effigies
Copy link
Member

This pull request is "orphaned," which means it has been deemed to be abandoned by its original author. Orphaned pull requests have not been rejected, and we hope that if a user sees one that will meet their needs with a little work, that they will fork it and open a new pull request (or, in the case of the original author, reopen the original PR).

We ask that all adopted PRs be updated to merge or rebase the current master. If you would like to adopt a PR and need help getting started, any of a number of contributors will be happy to help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4 participants