Hey there,
maybe someone of you can help me or at least give me a hint on where else I could look for help.
My problem is as follows:
I have a Python script that invokes the EMBOSS needle program on command line (using os.system("needle ...")
) with two sequences and performs an alignment. Then it does some other stuff. This I repeated many 1000 times.
At first, needle uses a reasonable amount of memory (anything between 1 to 400 MB). However, after a couple of thousand times, the amount of memory used by needle increases, until it reaches the maximum and my Mac is completely blocked. The python script however doesn't use more memory than in the beginning.
So it seems that needle reserves some part of the memory and never releases it.
I have also tried to use the subprocess module and start needle with process=subprocess.Popen("needle ...")
. Then I performed process.kill()
, process.terminate()
and process.wait()
(all separately in other versions of my script), as it was suggested in some forums, in order to avoid zombie processes. But it didn't change anything....
Does one of you have an idea how can I release this memory from the grabs of needle or how I can overcome this problem in another way?
Edit:
It is the needle process and not the python script that increases in memory usage. I added this information more specifically.
First you really need to establish whether it is the python program, the needle program or the fact that you iterate with the former on the latter that uses up the memory.
Thank you for these ideas! I will check tomorrow how the memory usage will look like in these two cases.