sate-dev / sate-core

3 stars 3 forks source link

Multiple threads and initial alignment #3

Open smirarab opened 12 years ago

smirarab commented 12 years ago

It seems that in creating the initial alignments, we don't use multiple threads, even if available. Look at this code in the mainsate:

                for unaligned_seqs in multilocus_dataset:
                    job = sate_team.aligner.create_job(unaligned_seqs,
                                                       tmp_dir_par=init_aln_dir,
                                                       context_str="initalign",
                                                       delete_temps=delete_aln_temps)
                    _RunningJobs = job
                    jobq.put(job)
                    new_alignment = job.get_results()
                    _RunningJobs = None
                    new_alignment_list.append(new_alignment)

Shouldn't we break up this for loop to two loops (one for queuing, one for reading results) so that different markers could be aligned in parallel?

mtholder commented 12 years ago

This has been fixed in commit 97277615f5bbd29520ca3417554ba4f806d28184 It did also require slight changes to the system for killing running jobs. Tested by hand, but we don't have a unit or integration test for this yet.