Last active
April 1, 2019 10:11
-
-
Save musically-ut/9334018d9a66c44ff0d271c602a6ad1c to your computer and use it in GitHub Desktop.
Poor man's parallel execution on servers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -e | |
for N in {1..5} | |
do | |
for M in {0.1,1,2,5,10}; | |
do | |
# Replace ./my_prog.py with your program to run it in parallel | |
./my_prog.py -N $N -M $M > output/stdout_N${N}_M${M}.txt & | |
echo $! | |
done | |
done | |
## Run as: | |
## ./pool_man_parallel.sh > pids | |
## Then kill recalcitrant processes from `pids` file, if needed. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
hmmm interesting. Yeah, I would pass on that as well 😆