SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
Blacklight: World's largest shared memory system open for research pdblood Bioinformatics 0 04-12-2011 03:50 PM
Setting up a shared analysis platform for NGS (advice is welcome) splaisan Core Facilities 1 09-05-2010 11:40 PM
Top of the line Shared Memory james_lindsay Bioinformatics 4 01-14-2010 12:22 PM
PubMed: Barcoded Pyrosequencing Reveals Shared Bacterial Community Properties along T Newsbot! Literature Watch 0 05-12-2009 05:00 AM

Reply
 
Thread Tools
Old 04-13-2012, 01:07 PM   #1
mscholz
Member
 
Location: Los alamos

Join Date: May 2010
Posts: 13
Default Bowtie2 shared memory (--mm)

Anyone knows how this bad boy works? The manual is less than informative.

How do different threads know the shared memory is there? What's the deal???

Help?
mscholz is offline   Reply With Quote
Old 04-13-2012, 09:11 PM   #2
nilshomer
Super Moderator
 
nilshomer's Avatar
 
Location: Boston, MA, USA

Join Date: Nov 2008
Posts: 1,279
Default

Quote:
Originally Posted by mscholz View Post
Anyone knows how this bad boy works? The manual is less than informative.

How do different threads know the shared memory is there? What's the deal???

Help?
I would presume that the main thread memory maps the index file so that the index is treated as though it is in primary memory. Then the main thread needs only give a pointer to this memory to each thread. This is no different than if it had just read the index into memory. That's the beauty of memory mapping, as it is as though the file is in memory from the point of view of the process.

For shared memory, typically a key is used to associate a shared memory segment (google shmget for example). Given this key, a process can attach the shared memory to its own process memory.
nilshomer is offline   Reply With Quote
Old 04-15-2012, 11:42 PM   #3
tonybolger
Senior Member
 
Location: berlin

Join Date: Feb 2010
Posts: 123
Default

Quote:
Originally Posted by mscholz View Post
Anyone knows how this bad boy works? The manual is less than informative.

How do different threads know the shared memory is there? What's the deal???

Help?
It's magic

Seriously though, it's probably just memory mapping the index files (via mmap). The OS can automatically share multiple mappings to the same file from different processes, so it allocates RAM for only one copy in memory.

BTW, threads within one bowtie process automatically share their memory, this only saves memory when running multiple bowtie processes.

*edit: beaten to it
tonybolger is offline   Reply With Quote
Old 03-25-2013, 07:09 AM   #4
mscholz
Member
 
Location: Los alamos

Join Date: May 2010
Posts: 13
Default

So,

I'm back to this. My question is this, how on earth would I call bowtie2 using multiple read sets on the -mm flagged index so that I don't have to keep reloading the same index? Do I have to run it with parallel? I'm just not clear at all on how you get two disparate calls of the same index to share the memory mapping info...

Thanks!
mscholz is offline   Reply With Quote
Old 03-28-2013, 10:24 AM   #5
arolfe
Member
 
Location: 02119

Join Date: Jul 2011
Posts: 28
Default it should just work

You add the --mm flag to the command line. If there's only one copy of bowtie2 using that index on the machine, there shouldn't be any change. If there are multiple copies of bowtie2 running at the same time and using the same index, the total RAM use will be less as the operating system will only have one copy of the index in memory. You shouldn't notice any difference otherwise.

Yes, this only helps if you're running multiple instances of bowtie2 at once.
arolfe is offline   Reply With Quote
Reply

Tags
bowtie2

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off




All times are GMT -8. The time now is 10:16 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.