Dear afni experts,
I would like to execute afni commands from python, e.g., using subprocess.check_call() or ipython's ! notation.
However, it seems that commands with OpenMP multithread support, e.g., 3dREMLfit or 3dDeconvolve, only deploy a single thread when executed from python, dramatically slowing down the computation.
For example, when I run
subprocess.check_call(['tcsh', 'stats.REML_cmd'])
or
!tcsh stats.REML_cmd
in ipython, it spawns only one thread and computes very slowly. But when I run the same script directly from the shell
$ tcsh stats.REML_cmd
it spawns 15 thread and runs considerably faster.
Is there a way to execute 3dREMLfit in multithreaded mode from python?
Thanks for help~