in reply to Re^2: Multithreads with an executable in the worker subroutine
in thread Multithreads with an executable in the worker subroutine
Okay. Looking at the code I see nothing -- other than perhaps the implementation of logmsg which you haven't supplied -- to suggest that it is your code that is preventing concurrency.
Having scanned a little of the information I can find about the blast program, I strongly suspect that it is serialising access to it database file -- probably through file locking. So the problem would also exist if you were using fork.
The solution I would try is to use different databases for the concurrent runs. If the nature of your workload means that you only want to use a single database, then you could make N (where N is the number of cores) copies of that db file and have each thread operate against a different copy. I am assuming that the blast program is using the db for reference only, not updating it.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Multithreads with an executable in the worker subroutine (fork (probably) won't help)
by Anonymous Monk on May 31, 2012 at 13:24 UTC | |
by lskatz (Novice) on May 31, 2012 at 13:27 UTC |