Multiprocessing in linux?

Hello everyone,
I want to implement a preprocessing pipeline in the computational server on my DTI dataset and for better performance, I want to use the multithreading techniques in my Linux terminal.
My os is Ubunto 20.0.4.
I there any book or any resource I can use in my procedure?
I don’t know the multiprocessing techniques should be applied in bash code or python.

1 Like

hi Ali - you can use the ampersand symbol in bash (&) at the end of a line and the process will get run in the background asynchronously; do this on a few lines and those lines may run in parallel if they take long enough to execute. In python you can use the standard multiprocessing library. Some of the parallel pool methods in there are very easy to use - the documentation is a quick google away.

1 Like

Thank you for useful explanation

You may want to consider using some pipelines (nipype, Automatic Analysis), which have already implemented multiprocessing.

1 Like

Thanks for guidance…I want to use PreQual pipeline and I don’t know how to apply multiprocessing in my code.

Category icons made by Freepik from www.flaticon.com