Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how do to parallel-process files with looper locally -- lump them together, this will group several commands in one like: #498

Open
Tracked by #414
donaldcampbelljr opened this issue Jun 5, 2024 · 1 comment

Comments

@donaldcampbelljr
Copy link
Contributor

donaldcampbelljr commented Jun 5, 2024

how do to parallel-process files with looper locally -> originally a divvy idea.
issue: 100 files -> divvy submits to cluster no problem, if local they will run serial. Could run in background process using ampersand. in command shell script with &. So can we lump 100 samples (in 10 background processes), new divvy template to accomplish that

  • Original Notes
@donaldcampbelljr
Copy link
Contributor Author

Currently, if using lump for samples locally (--lump-n), we get a couple submission scripts:

#!/bin/bash

echo 'Compute node:' `hostname`
echo 'Start time:' `date +'%Y-%m-%d %T'`

{
python3 /tmp/tmplr4qcfsa/advanced/pipeline/pipeline1.py --sample-name sample1 --req-attr val 
python3 /tmp/tmplr4qcfsa/advanced/pipeline/pipeline1.py --sample-name sample2 --req-attr val 
} | tee /tmp/tmplr4qcfsa/advanced/results/submission/PIPELINE1_lump1.log
#!/bin/bash

echo 'Compute node:' `hostname`
echo 'Start time:' `date +'%Y-%m-%d %T'`

{
python3 /tmp/tmplr4qcfsa/advanced/pipeline/pipeline1.py --sample-name sample3 --req-attr val 
} | tee /tmp/tmplr4qcfsa/advanced/results/submission/PIPELINE1_lump3.log

Perhaps we can change the template to use & for running in parallel?


#!/bin/bash

echo 'Compute node:' `hostname`
echo 'Start time:' `date +'%Y-%m-%d %T'`

{
python3 /tmp/tmplr4qcfsa/advanced/pipeline/pipeline1.py --sample-name sample1 --req-attr val &
python3 /tmp/tmplr4qcfsa/advanced/pipeline/pipeline1.py --sample-name sample2 --req-attr val &
python3 /tmp/tmplr4qcfsa/advanced/pipeline/pipeline1.py --sample-name sample3 --req-attr val & 
} | tee /tmp/tmplr4qcfsa/advanced/results/submission/PIPELINE1_lump1.log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant