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

Parallelize optimal_snr jobs #3413

Merged

Conversation

GarethCabournDavies
Copy link
Contributor

Given certain approximants and amount of injections, optimal_snr jobs can take a long time causing jobs to be evicted/restarted in the workflow

This splits optimal_snr jobs in the same way as the findtrigs jobs, and recombines using a new executable, pycbc_optimal_snr_merge

This will break current configs due to changing the way optimal_snr is used and optimal_snr_merge config requirements.

Newly required config tags:

  • in [executables], optimal_snr_merge = ${which:pycbc_optimal_snr_merge}
  • in [workflow-optimal-snr]: parallelization-factor = 5
  • add [optimal_snr_merge]

Tested in multiifo workflow, but as the 2-ifo workflow calls it in the same way, this should work there as well

pycbc/workflow/injection.py Outdated Show resolved Hide resolved
pycbc/workflow/injection.py Outdated Show resolved Hide resolved
@titodalcanton
Copy link
Contributor

Instead of adding the new script pycbc_optimal_snr_merge, would it be possible to just use ligolw_add?

@GarethCabournDavies
Copy link
Contributor Author

Instead of adding the new script pycbc_optimal_snr_merge, would it be possible to just use ligolw_add?

I'm not sure - I hadn't seen that functionality before
I'm not sure how it could work within a workflow, as surely it would still need an executable to wrap it in pegasus?

@titodalcanton
Copy link
Contributor

I am thinking about this:

[executables]
optimal_snr_merge = ligolw_add

I do not see an obvious reason why a specific script would be needed instead, as it is just merging tables.

@ahnitz
Copy link
Member

ahnitz commented Aug 11, 2020

@GarethDaviesGW ligolw_add is an executable. I think @titodalcanton is saying why invent a new executable instead of using an existing one that likely already can do this. It takes options slightly differently, but otherwise, I think it should work.

@GarethCabournDavies
Copy link
Contributor Author

thanks - I hadnt seen the executable - I'll put that in rather than the optimal_snr_merge code

@GarethCabournDavies
Copy link
Contributor Author

I've updated to use the ligolw_add executable as well and removed the optimal_snr_merge

@GarethCabournDavies
Copy link
Contributor Author

The last codeclimate and codebeat issues are ones which we have generally ignored before - the overwriting of create_node in particular looks to be something done a lot elsewhere

@titodalcanton
Copy link
Contributor

This looks good to me, but I am a bit too rusty on the workflow code to feel comfortable approving that change. Maybe best if @spxiwh or @ahnitz give the final approval.

Copy link
Member

@ahnitz ahnitz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assuming you tested that the workflow builds and the dax looks sane, this seems fine.

@GarethCabournDavies
Copy link
Contributor Author

tested with and without the parallelize option in config for workflow, and using the updated optimal_snr exe

@GarethCabournDavies GarethCabournDavies merged commit e1c8bc0 into gwastro:master Aug 13, 2020
lenona pushed a commit to lenona/pycbc that referenced this pull request Sep 14, 2020
* add in codes and workflow to parallelize optimal_snr
@GarethCabournDavies GarethCabournDavies deleted the parallel_opt_snr branch March 25, 2022 11:17
OliverEdy pushed a commit to OliverEdy/pycbc that referenced this pull request Apr 3, 2023
* add in codes and workflow to parallelize optimal_snr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants