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

use -p option for mkdir #3

Open
soichih opened this issue Feb 2, 2021 · 2 comments
Open

use -p option for mkdir #3

soichih opened this issue Feb 2, 2021 · 2 comments

Comments

@soichih
Copy link

soichih commented Feb 2, 2021

To allow for rerunning the failed job, we should use -p option for mkdir.

+ mkdir cortexmap ./cortexmap/cortexmap/
mkdir: cannot create directory 'cortexmap': File exists
mkdir: cannot create directory './cortexmap/cortexmap/': File exists
@soichih
Copy link
Author

soichih commented Jun 1, 2021

Also..

When a file from the staging job is copied to a local workdir, it should use "install" command instead of "cp". The staging jobs are write only, so when it's copied to workdir, the file attribute is retained and create read-only file. If a job is restarted, it will fail overwrite already copied file as it is set to read-only.

+ cp -v ../6079b5040a3c71d10084c850/6057a06d73b69e76f551d498/map.nii.gz ./metric/myelinmap.nii.gz
'../6079b5040a3c71d10084c850/6057a06d73b69e76f551d498/map.nii.gz' -> './metric/myelinmap.nii.gz'
cp: cannot create regular file './metric/myelinmap.nii.gz': Permission denied

To prevent this, you can simply use install command

@soichih
Copy link
Author

soichih commented Sep 30, 2021

I just patched this on v1.2-snr-input branch. I am not sure if there are any other branch that I should touch though.

fc9b3d9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant