I am using & to run multiple programs together in for-loop in bash shell script
for example,
for ((i=1;i<=45;i=i+1))
do
python pythonfile.py --gpu 4 --seed ${i} &
python pythonfile.py --gpu 4 --seed ${i} &
python pythonfile.py --gpu 5 --seed ${i} &
python pythonfile.py --gpu 5 --seed ${i} &
python pythonfile.py --gpu 6 --seed ${i} &
python pythonfile.py --gpu 6 --seed ${i} &
python pythonfile.py --gpu 3 --seed ${i} &
python pythonfile.py --gpu 3 --seed ${i}
done
and I did not put & in that last sentence, because it would be terrible if I run &... 45*8 programs together
but It still runs more programs than 8 programs together.
Why this problem is happening?