Welcome @lijiang!
-
In the addition of 4 more subjects, are you simply re-running
population_template
from the start, with 4 more subjects than what was used previously, and yet the script is encountering an error for one of the subjects that was included in the original successful execution (which I’m guessing based on “Subject_005”)? If so the addition of more subjects might be a red herring; it might be more simply that “it worked the first time, but not the second time”. But it’s hard to know without performing repeat attempts of both scenarios. -
If you want to rule out any sort of issue w.r.t. permissions, you might want to recursively change permissions for the whole scratch directory, so that there will also not be any issue with writing new files.
-
Is my understanding of your phrasing correct in that, upon using the
-continue
option, the script is in fact making non-zero progress, and it is essentially making its way through one complete non-linear iteration, then encounters the same error, at the same line of code, but within the subsequent iteration? Is it the same subject for which the error occurs, or a different one? If that is indeed the case, that is very unusual. The “warps_*/
” directories are all created at the commencement of the script using the same function, so one would expect them to all have the same permissions, and encountering an error at an iteration other than the first one is therefore quite strange. -
If the addition of those four subjects is not expected to change the resulting template drastically, one option is to use the template that you have, but instead perform an explicit
mrregister
call for all 24 subjects; as though your original 20 subjects were chosen as a representative subset of the whole cohort. -
Since the error is quite unusual, if there is indeed some problem somewhere at our end, you would need to confirm at least that you are able to reproduce the fault. If your filesystem permissions were toggled by e.g. a rogue solar neutrino, and simply re-running the script from the start does not reproduce the issue, then there’s nothing we can do really.
-
If you’re determined to complete the script without restarting from the beginning, I suppose you could try manually changing permissions and
-continue
-ing for each non-linear iteration. Very clumsy if you’re e.g. using a job scheduler, but if it’s running on your own system, there’s nothing stopping you from trying.
Cheers
Rob
EDIT: Conversation to continue in another thread.