I am trying to run a python function on 100s of files using a for loop as follows. It seems like the process is very slow. I was wondering if there is a way to make the process faster as I am using HPC computers with GPU.
#!/usr/bin/env bash
FILES="/directory_with_files/*.ply"
for i in $FILES;
do python3 function.py -file $i --odir /output_directory --verbose; done
for i in /directory_with_files/*.ply
is fine. – terdon Nov 01 '22 at 16:14