Python GNU parallel single command on multiple cores

Hello,

I have a 4 core machine.

Here is my initial script

cd /work/
python script.py input.txt output.txt 1 2 3

This script runs for 1.5hrs.

So I read across the web and figured out that you can use GNU parallel to submit multiple jobs using parallel. But I am not sure if I can run single command on multiple processors. Still, I went ahead and used the following command

cd /work/
parallel python script.py input.txt output.txt 1 2 3

Here is the error

parallel: Warning: Input is read from the terminal. Only experts do this on purpose. Press CTRL-D to exit.

Hello Jacobs.smith,

Not sure about your complete code/requirement(as you haven't shown us) but seems like it may be code is executing a process into a sub-shell then there it is expecting a variable to be passed rather than it gets passed while running the script.

Thanks,
R. Singh

But the script is designed to take inputs from the terminal itself.

Do you know of a way where I can run a python command on multiple processors instead of one?

Thank you for your time R.Singh.

Can you modify the python script and use the multiprocessing module.

All I can access it is for execution only.

I cannot edit it.