mdmparis / defense-finder

Systematic search of all known anti-phage systems.
GNU General Public License v3.0
76 stars 13 forks source link

hmmsearch not honouring -w --workers #32

Closed tsp-kucbd closed 1 year ago

tsp-kucbd commented 1 year ago

When restricting the amount of cpus with -w / --workers, that information is not passed on to hmm search which has a hard coded "--cpu 0" and will happily try to take over all cpus on a node and, in our case, get killed by the scheduling system.

in the profile file: defensefinder/lib/python3.9/site-packages/macsypy/profile.py Line 172 - 173

             command = f"{self.cfg.hmmer()} --cpu 0 -o '{output_path}' {hmmer_threshold} " \
                          f"'{self.path}' '{self.cfg.sequence_db()}' "

the workers variable should get passed to the Profile class on line 74

jeanrjc commented 1 year ago

You must have an old version of macsyfinder as this has been fixed last year : https://github.com/gem-pasteur/macsyfinder/issues/54

Also it's weird though, because --cpu 0 in hmmer does not tell hmmer to use all cpus (unlike macsyfinder), so your job might be killed for another reason. Anyway, you should update macsyfinder.