I have truncated the time series and resampled them to 3.5mm3, and I've also set OMP_NUM_THREADS=1, but it's not helping. I'm using
Precompiled binary linux_ubuntu_24_64: Feb 12 2025 (Version AFNI_25.0.06 'Severus Alexander'), and I have 64GB of memory with an 8.1GB swap space.
I never get to that point. I submit the afni_proc.py and get that message after a short delay. The regression is supposed to detrend, regress motion (demeaned and derivatives), censor motion and outliers, and save the errts.
Of note, this script worked with full image series and native image resolutiion.
One issue is that I don't think you need both the backslashes before the square-bracket selectors and the quotes (esp. single quotes, which might be a particular problem here) in Lines 10-11.
Also, in line 8, there is only one dot . in the subbrick selector to denote range, where there should be two .. (as in the other cases just above)
I am not sure if these are causing the other issues, but could you try this:
And concatenating the 2 commands into 1 around -compare_opts_vs_opts shows that the basic differences are blip datasets in one and blurring in the other.
... and just for those keeping score at home, @rickr 's excellent suggestion was to run this command to compare the sets of opts, by providing 2 sets of AP options separated by -compare_opts_vs_opts (see that opt hanging out in line 26 here):
The end result is a comparison/review table, so you can spot any differences that might matter, such as in the selected blocks, or options, or arguments provided to the options. In this case, that table looks like this---so, the first set of options ("current") is missing the blur bock, relative to the second set ("target"), etc.:
Thank you both. I don't know why my text, which is reasonably aligned in my terminal window gets so messed up. Thanks for catching the typo. I didn't put in the backslashes. It might be a linux to windows issue in copy the text. I'll try these solutions, and see what happens, though the first set of commands is still giving me the "forking" problem. On to the second set of commands, though it looks like you already did that. I am running the afni_proc.py command as: "tcsh -xef afni_proc.py". Is that ok?
If you still get an error message, can you please copy+paste the full text of it. Having that level of specificity really helps in troubleshooting (in addition to having the exact command, which you have already provided).
The afni_proc.py command can be run in any shell: tcsh, bash, etc. Dealing with squarebrackets and how they are escaped might differ across shells, depending how it is done, but the above versions of the commands that we have copied and pasted should be save in any shell. So, you can put them in a bash or tcsh or zsh script and execute it.
After the AP command runs and creates the proc script, it will offer you a couple suggestions of running that script to do the processing, with convenient logging of terminal text. At that point, you need to know what shell you are using, because the syntax of sending the terminal text to be logged is shell-specific.
To know what shell you are running in, you can type:
echo $0
... and that will help you decide which command to copy+paste.
I think when the command is echoed, it will be expected that the quotes don't get displayed.
And wow, I have not run into that output error before. From searching online, it seems that is something at the system level, about not being able to start up new processes, because the max number of allowed running processes has been reached on the OS. Is that a shared computer or are lots of things running? (It also seems a bit odd that it displays afni_proc.py with a preceding ./.)
Out of curiosity, can you run any command at the terminal, such as:
ls
or (PT: now edited, to fix wrongly copied filename):
3dcopy func/epi_small_1_3mm.nii.gz tmp.nii.gz
(and you can remove the tmp.nii.gz that is created in the second case, if it does get generated)?
ls works, as does pretty much every other command. The 3dcopy command gives me:
++ 3dcopy: AFNI version=AFNI_25.0.06 (Feb 12 2025) [64-bit]
** FATAL ERROR: 3dcopy only takes one input AND one output filename after options.
Have at least one too many parameters:
func/epi_small_1_3mm.nii.gz[0..100]
-dsets_me_echo
func/epi_small_2_3mm.nii.gz
** Program compile date = Feb 12 2025
I had followed some guidance from Microsoft Edge's AI and had truncated and resampled the time series from 305 volumes and 2.5mm3 resolution to 100 volumes and 3mm3 resolution. I am WAY below my ulimit in terms of running processes.
And just to check, when you write that you ran "tcsh -xef afni_proc.py", what does that mean?
I would run it by putting the full afni_proc.py command into a text file, say a tcsh script "do_ap.tcsh". Then, you could execute that script from the command line with:
tcsh -xef do_ap.tcsh
Is that what you mean? You cannot run tcsh ... directly on afni_proc.py itself (it is a Python file).
Try adding -verb 3 to the command, and see if that gives an idea where the failed forking is happening. The program does use subprocess for running commands, but that should not be specific to blip.
Given the output, it seems like it might be failing before afni_proc.py even begins. Are the shells and environments identical between the 2 cases?
I'm sorry, I actually was running "tcsh -xef afni_proc.py". My gut is it caused some kind of recursion error, which is why it took a relatively long time to fail.
OK, great, glad that sorted it. As a bonus, I think asking the question here probably also added some benefit for troubleshooting the selector brackets (not needing backslashes) and the dots.
So, hopefully the processing runs smoothly from here.
--pt
The
National Institute of Mental Health (NIMH) is part of the National Institutes of
Health (NIH), a component of the U.S. Department of Health and Human
Services.