[STAR] How to clear memory after lost --genomeLoad
1
0
Entering edit mode
10 months ago

Hi all,

I'm regularly using STAR and happen to play with the argument --genomeLoad. My problem is that I think a genome index is still loaded in memory but I can't find it (I tried to --genomeLoad Remove all the indexes I could find and none of them cleared the memory). I'm not sure how it happened though. I ran zUMIs that failed and I think it's related (it's using STAR to map). It's also possible that I changed some directory location that contained an index.

Anyway, is there a magical way to remove all STAR indexes in memory whatever their path? Are there other tips to clear the memory in such situation (other than rebooting the server...)?

Cheers, Mathieu

STAR memory • 451 views
ADD COMMENT
0
Entering edit mode

If this can help, I finally found and kill the process (that was a ghost child process from zUMIs, though zUMIs command was long ago failed) from htop. In STAR manual, it's said to use Linux commands "ipcs" and "ipcrm" though I'm not sure how it works since "ipcs" listed the same shared memory segments before and after I killed the process.

ADD REPLY
0
Entering edit mode
9 weeks ago
Erik • 0

I made myself a little bash alias for deleting any lingering shared memory segments...

alias memclear='for n in $(ipcs -m | awk -v u=$USER "\$3==u {print \$2}"); do ipcrm -m $n; done'

With that (easiest to put it in your .bashrc file, to always have it defined), you can just type "memclear" at a shell prompt, and any shared memory you have on that machine will be cleared.

How it works:

  • use "ipcs -m" to print the current list of shared memory
  • use "awk" to match lines with memory segments owned by you ($USER) and extract the ID of each
  • use "ipcrm" to delete each segment, by ID

-Erik

ADD COMMENT
0
Entering edit mode

Hi Erik,

Thank you for your answer! :) I might use this code!

Cheers, Mathieu

ADD REPLY

Login before adding your answer.

Traffic: 2070 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6