How to fwb

We're Just 'Having Fun.' How To Be Friends With Benefits

We’ve spoken with experts to explore what friends with benefits really involves — and how to make it work.

Chances are you’ve seen at least one movie or TV show where two of the characters were exploring a friends with benefits relationship. It usually ends with the duo falling in love and dancing off into the sunset. In reality, the situation can turn out very differently, as this type of relationship involves far more than just sex with “no strings attached.”

“Friends with benefits describes any sexual relationship in which partners have agreed not to expect emotional commitment or investment from the relationship,” explains Sari Cooper, founder of The Sex Esteem Program and the director of Center for Love and Sex in New York City. “It doesn’t have to include penetrative sex to qualify.”

When you think of friends with benefits, you likely envision tangled bedsheets and a good dose of satisfaction, then scheduling your next meetup and getting on with the rest of your day. But, as with many things in life, it’s not always so clear-cut.

Why it can be (scientifically) hard to keep love out of lust relationships

The main issue that tends to arise is around keeping the physical and the emotional aspects separate.

“Being physical with someone has loads of feel-good hormones going around in our bodies — we’ve got all of those endorphins going on, and hits of dopamine,” states Sarah Louise Ryan, a U.K.-based dating and relationship expert. “However, we’re built to attach to one another.”

Indeed, as well as those feel-good hormones being released, there’s a chemical in the body that actually pushes us to form a deeper connection: oxytocin. This is produced by the brain when you’re attracted to another person and is associated with bonding thanks to its role in developing feelings of trust and security and lowering anxiety levels.

Plus, together with the hormone vasopressin, research shows oxytocin encourages heightened sexual arousal and the process of falling in love.

Why it can be easier for some to enjoy sex without affinity

That being said, for various reasons, some individuals do find it easier to distinguish between love and lust. These include people who:

  • Are aromantic. Although they can form bonds, these individuals don’t get romantic feelings or seek traditional romantic relationships.
  • Are content in romantic relationships already but are looking to fulfill a sexual need. In some couples, one partner may have a higher sex drive. To ease a sense of frustration and guilt, the pair may come to an open-relationship style arrangement where sexual needs and demands are met by other people.
  • Have a vocation involving sex.Escorts and sex workers, for example, engage in intimate physical acts regularly, but don’t fall in love with every client. Research shows that, to help achieve separation, sex workers can construct various physical and emotional boundaries — such as using different locations and changing their appearance.
  • Have experienced sexual violence/abuse. A 2011 study indicated those who were sexually abused as children have greater difficulty forming stable and positive intimate relationships in adulthood.
  • Have an attachment style based in self-preservation. We learn by doing and some people have had repeated experiences that have created a fear of intimacy.
  • Have certain mental health conditions. Those with conditions such as schizophrenia and borderline personality disorder are shown to have lower levels of bond-inducing oxytocin.

When to avoid friends with benefits

Attempting no strings attached sex may be feasible for many, but it’s a scenario best avoided for some, such as folks who experience anxiety.

“If you feel that being sexual with someone might trigger feelings of rejection and emotion, and worry about what might happen, then it might just not be for you,” Ryan says.

“You need to feel comfortable and confident enough in yourself that you’ve got this and can do this. If you don’t, I highly advise a friends with benefits situation wouldn’t serve you,” cautions Ryan.

Cooper adds that people with rejection sensitivity and chronic depression might also be better off avoiding friends with benefits.

Cooper also says that “those who have a traumatic history and get triggered during sexual encounters will be challenged if the person is not an actual friend, since these triggering episodes can be very disturbing and, at times, a survivor can do a violent movement during a flashback.”

When it comes to diving into a friends with benefits relationship, getting on the same page from the very beginning is important to ensure optimum levels of trust, comfort, respect, and enjoyment.

Also, there are a variety of approaches to help ensure things don’t get messy both in and outside the bedroom.

Set sexual ground rules

“As in any sexual relationship, setting boundaries on what will and won’t be expected of the actual sexual behaviors (including sexual health guidelines, like sexually transmitted infections and contraceptive barriers), [should] be engaged in each time and during a sexual meetup,” Cooper states.

You might not want to engage in oral sex, for example, or feel less comfortable snapping pics or recording videos during the escapades. However you feel, speak up, and always make sure there’s mutual consent.

Create outside-of-the-bedroom boundaries

Setting these can help “eradicate what might lead to an emotional attachment,” explains Ryan, who suggests it’s important to think about factors such as whether you sleep over afterward or go for dinner beforehand and how you communicate between your hookups.

Ensure you’re both in it for the right reasons

In some instances, one partner goes into a friends with benefits relationship hoping it will evolve into something more. However, harboring these beliefs can lead to disappointment and upset that potentially ends your friendship entirely — so venture into this sexual territory only if you’re on the same page about how you feel toward each other.

Talk, talk, talk

“In any type of sexual relationship, no matter what the definition is, communication is key,” says Gillian Myhill, sex and relationship adviser and co-founder of the Bare. Dating app. “Ensure you’re always on the same page — frequently take each other’s ‘emotional temperature’. Feelings can and do change.”

Don’t let it become top priority

An FWB relationship is great for releasing pent-up sexual energy and having a bit of fun, but don’t let it hold you back in the real world.

“If you want to meet someone in the long term and emotionally invest in a relationship that is significant to you, and the friends with benefits situation is taking up way too much time and energy, look at scraping that back,” Ryan says.

Agree when to stop

“Have a conversation about the duration they see this going on for,” suggests Ryan.

“Is it until you meet somebody else, or is it until you’re exclusive with someone else? It’s also about communicating what we would do if one of us catches feelings,” Ryan says. Having this discussion will help ensure you’re both prepared for any developments and can navigate your way through them.

If you want to make friends with benefits work, look at the good and the bad. In addition to blurred boundaries and mixed messages, it’s essential to be aware of other challenges that could prevent your casual sex arrangement from staying healthy, safe, and fun.

Keeping in good health

It’s vital to look after your physical well-being as well as your mind. In 2019, there were 2.6 million cases of sexually transmitted infections (STIs). Currently, rates of chlamydia, gonorrhea, and syphilis are at an all-time high.

Practicing sex with a barrier method — using condoms and undergoing regular STI testing — is essential. And remember: “There are many STIs that can be spread through oral sex, so using a condom is not going to protect you completely,” Myhill notes.

Navigating social situations

It usually isn’t long before you introduce a new romantic partner to friends and family. But what’s the deal when it comes to socializing alongside a friend with benefits? “It all depends on your level of comfort,” states Ryan, and “the situation between the two people.

You may already be in the same social circle, and everyone is aware of what’s going on, or it may be something you want to keep private. Again, communicate and set those boundaries.

When three’s a crowd

Ensure you’re in agreement about friends with benefits exclusivity. Are you each other’s only casual partner, or does one of you have several?

Either way, “this should be communicated when you begin this kind of relationship,” Myhill says. Not only is this respectful and honest, but it also helps preserve your sexual health and prevents boundaries from being crossed.

If one wants more

Because of oxytocin, developing feelings for someone is easier than you might expect. But those feelings might not be returned, which can make it tougher for all involved.

“[It] can often sting more painfully, because the partner who falls in love hadn’t expected to, and the partner who isn’t reciprocating can feel guilty or blamed,” says Cooper.

At this point, the kindest thing for both partners to do is walk away. “If you’ve said that you’d like to progress this further and they don’t, it’s really [about] stepping into your power, having the confidence to know your worth, and knowing that you’re not just a plaything,” Ryan says.

A friends with benefits relationship can be complex, but it doesn’t have to be entirely off-limits. You just have to be aware of your emotional limits, the expectations versus reality, and the potential challenges. Also, know the importance of setting boundaries

Everyone’s experience looks different, and what works for some might not be so great for others. Ultimately, “there are so many layers to consider,” says Ryan — meaning it’s not something to jump into without giving a second thought.

“I think anyone can do it, as long as you’re fully prepared and aware of the best and worst outcomes,” she continues. “It’s [about] having the tools in one’s box to realize that this might not work out the way you foresee it to.”

Can ‘Friends With Benefits’ Really Work? 15 Rules for Mess-Free Arrangement

We all know the phrase "let's keep it casual," but what does it really mean to be "friends with benefits" with someone? Friends with benefits (aka FWB) is a casual sexual relationship with either a friend (duh) or just a random person. The general idea is that you are friends (or at least friendly) with the other person and have a sexual chemistry, but are not interested in pursuing a more serious, romantic, relationship. Successful FWB relationships are strictly sexual and avoid all of the romantic and physical intimacy of a true relationship. For a lot of people, FWB relationships are a great way to scratch a sexual itch without having to commit the time or emotional investment into a full blown relationship. They are also excellent for polyamorous people who are interested in pursuing multiple different types of relationships at one time.

And while some people really thrive in these casual relationships, others have a hard time separating sexual intimacy from emotional intimacy. Begging the question: Is it truly possible to have a sexual relationship without catching feelings? Casual relationships aren't for everyone, so if you are interested in pursuing a FWB, there are a few ground rules you should ask yourself to keep a FWB situation from becoming too involved.

1. Make sure you're emotionally mature enough to be FWB

Like we said before, not everyone is cut out for a casual FWB relationship. Sleeping with someone in a non-committal way takes a lot of emotional maturity. Before you start a FWB fling, make sure that you can deal with the different outcomes of the relationship. Adding sex to the equation will never make things easier (though it potentially adds a lot of satisfaction), so ask yourself if you can handle a casual thing from the get go.

Having emotional maturity also means that you are able to evaluate your own wants and needs. Before getting sexually involved with a friend, think about what you really want out of your relationship with them. Are you the type of person that can handle casual sex? Not everyone is. Knowing this about yourself is important before embarking on a FWB relationship so that you can protect yourself and your friendships.

Figuring out what’s right for you and your love life can be challenging, but our relationship coaches have seen it all. Let us create a customized lesson plan unique to your situation. Download now to start your free one week trial.

2. Don't become FWB with someone you already have feelings for

A successful friends with benefits relationship will end when the relationship is no longer serving one/both of you, or when one of you starts dating another person more seriously. You should not go into a friends with benefits relationship expecting (or hoping) for it to become something more serious. Most FWB do not end with you dating your bed buddy! For this reason, you should not become FWB with someone that you are already into. If you agree to just sleep together, you should not expect them to wake up one morning and reciprocate your feelings. And if you are sleeping together, your feelings for the other person will probably only become stronger, which can make the situation even more difficult.

For a lot of people, it’s easy and normal to separate emotional feelings from physical/sexual relationships and that’s what you’re signing up for as a FWB. Sleeping with someone with the hopes that they fall for you is a surefire way to break your own heart. Instead of going for someone that you are romantically interested in, choose someone that you are not romantically attracted to so that things can indeed be casual.

3. Choose your partner wisely

The ideal FWB is someone that you are physically attracted to, but not emotionally attracted to. In addition to sexual chemistry, it’s important to choose someone that is honest. Successful FWB relationships take a lot of communication and trust, so it’s important to choose your partner wisely. At the end of the day, you also need to consider what will happen if the FWB relationship doesn’t work out. Do you really want to risk changing the dynamic of a friend group by sleeping with your pal on the off chance that it does not work out? Sometimes it’s better to keep a playful friend group flirtationship rather than pursue a sexual relationship with a friend. And other times sleeping with your buddy totally works out. Everyone operates differently and all friend groups have a different dynamic. Just make sure that you are considering all the factors when deciding to become a FWB with someone.

4. Don’t be lovey dovey

If you are in a friends with benefits situation, do not act like a couple! This might be the golden rule of successful FWB relationships. Don’t hold hands. Don’t smooch in public. Don’t go on dates. Don’t practice PDA. In general, just don’t be lovey dovey with your sex friend. It’s important to keep things in the bedroom, so that you don’t start developing feelings for them. If you start doing couple-y things with your friend with benefits, then you may start to develop feelings for them, even if that’s not your intention. It’s only natural to start falling for someone if you spend a lot of time together, especially if you are already being sexually intimate. So try to avoid this situation all together.

A lot of people find that it’s actually easiest to minimize the amount of alone time they spend with the FWB to keep the relationship more casual and low key. While you don’t want the relationship to feel transactional, you do want to make sure that it is mostly/entirely about your sexual chemistry and connection. If you do want to spend time together outside of the bedroom, it’s a good idea to do so in group settings. Group dynamics will keep PDA to a minimum and it will emphasize the FRIENDS aspect of FWB.

With Relish you can text with a qualified relationship coach for one-to-one advice, take therapist-approved quizzes about communication, conflict, intimacy and more. Try our award winning relationship coaching app free for one week!

5. Avoid sleepovers

Along the same lines as the last piece of advice, you and your FWB should avoid having sleepovers. After having sex, LEAVE! Cuddles and spooning fall squarely into activities for couples and should be avoided if you want your FWB relationship to work. As does pillow talk, which can often get very intimate. As nice as it is so wake up next to someone in the morning (and potentially have morning sex!) that is an intimacy that you should try and reserve for serious partners. This is not to say that you need to kick your friend to the curb as soon as you finish having sex, but you should be weary of sleepovers, as they might add complications to your casual relationship.

6. Be transparent about your sex life and be safe

FWB relationships are not typically exclusive, which means that you and your friend are probably seeing a couple different people. When you first begin a friends with benefits relationship, you and your new boo should talk about whether or not you plan to sleep with other people when you talk about your boundaries (more on this to come). During this discussion, you should talk about how you plan to practice safe sex with each other and other people. It’s not necessary to disclose the other people that you are sleeping with (unless that makes you and your partner more comfortable), so long as you are on the same page about your expectations for protection during sex. It’s super important that you are both transparent about your sex lives and that you are practicing safe sex. In addition to condoms and other forms of protection, it’s a good idea to set up routine STI screenings so that you do know your status.

7. Set expectations at the beginning

Being in a FWB relationship requires a lot of potentially awkward or blunt conversations cough cough,why we mentioned that bit on emotional maturity. You and your FWB should talk about the expectations for your relationship at the outset. We understand that not everyone is into scheduling, but it can be helpful to talk about what your FWB relationship will look like from the outset. Do you want a standing hookup on Wednesday nights? Or do you want things to be more spontaneous? Are you down with flirty texting? Or is that crossing a line? Do you expect to be in this for the foreseeable future? Or are you moving across the country in two months? Talking all of these things through at the beginning will help make sure that you and your friend are on the same page.

8. Expect the bare minimum

In addition to setting expectations in the beginning, it’s a good rule of thumb to set your expectations as low as possible. A FWB relationship won’t come with any bells and whistles so don’t expect a birthday present, a Valentine’s card, or a bouquet of flowers at any point. Keeping your expectations low (yes, even lower than the expectations you set in the beginning) will prevent you from getting overly invested in your casual relationship. And it will prevent you from getting jealous or upset if your friend blows you off or doesn’t prioritize you. Expecting the bare minimum will also help you avoid falling into the trap of catching feelings.

Remember that you shouldn’t expect this relationship to turn into something more serious, so keep your expectations for the relationship realistic/low and leave space for other people in your life to provide emotional support and more consistent friendship.

Regardless of what type of relationship or situation you’re in, the best relationship advice is just a click away. Don’t wait, get started with our award winning relationship coaching and self-care app for free.

9. Set boundaries

Like we mentioned above, it’s extremely important to set boundaries when you take a friendship to the Friend with Benefits level. Boundaries are important for every relationship, and FWB relationships are no exception. In order for both of you to feel fulfilled in this relationship, you need to make sure that your boundaries and needs are being respected. This is often more important for FWB that share the same friend group or have some social overlap in their lives. If this is the case, it’s important to discuss who will know about the relationship, how you will navigate the relationship in public and whether or not friends or certain people are off limits. Setting up boundaries or rules is just as important (if not more important) than setting up expectations at the beginning. It’s important for you and your friend to check-in about your boundaries throughout your relationship.

10. Prioritize the friendship part of "FWB" over the physical

At the end of the day, remember that you should be friends with your FWB. A FWB relationship is not just a random hookup and it’s important to keep up a good relationship with one another outside of the bedroom. Because FWB is not a long-term thing, you should focus on being able to keep your friendship alive even if the benefits part of your relationship comes to an end (which it eventually will) You don’t need to spend a ton of time together to maintain your friendship, but focusing on keeping things fun, lighthearted, and playful, will help you prioritize the friendship part over the physical.

Respecting each other’s expectations and boundaries will also ensure that you stay on good terms throughout your FWB relationship and after it’s over. It is totally possible to stay friends with someone after you have hooked up (whether it’s one time or many times) as long as you maintain a mutual respect for one another. It can sometimes take a bit of time to transition from hooking up to being friends again, but keeping the idea of friendship in your head through the hooking up stage will help this transition when the time comes.

11. Communicate

Communication is key in every relationship, but it is especially important in a FWB relationship when you need to discuss things like expectations, boundaries and your sexual health. Being able to have these discussions requires a lot of maturity (remember our first tip), but it is also a skill that you can develop with practice. These conversations don’t come super naturally to most people, so establishing check-ins where you can freely talk about your boundaries and sexual health can help facilitate these important conversations. Oftentimes the most awkward part of these conversations is finding a way to bring these things up in the first place, establishing a time to check-in about these things takes away that weirdness and opens up the important dialogue.

It’s also important that you are able to communicate your sexual needs in a FWB relationship. After all, what’s the point of the benefits if they don’t do it for you! It’s important to be able to communicate openly about your sexual needs so that the FWB is fulfilling. Don’t be afraid to ask for what you need in the bedroom. More often than not, your partner will appreciate the guidance. This also means listening to what your FWB wants and needs in bed.

Having a “friend with benefits” requires a whole new level of communication, which definitely isn’t for everyone. Luckily, our relationships coaches are just a click away. Click here to chat with a qualified relationship coach for free.

12. Don’t be jealous!

Like we mentioned, your FWB will likely be sleeping with or pursuing other people. As will you. It’s important not to let feelings of jealousy get in the way of a good sex parternship. Possessiveness is not a good color on anyone - in any type of relationship - but especially in a FWB situation when you are decidedly not exclusive! It is up to you and you FWB whether you want to know the specifics of each other’s sex lives. It’s important to know if you are the type of person that gets jealous (some people are, some people are not) and discuss your boundaries with this in mind. Creating honest boundaries can often minimize the amount of jealousy partners feel in FWB relationships.

13. Don’t stop dating

Remember that you and your friend likely won’t end up as serious partners, so if that is what you are ultimately looking for, you should continue to date on the side. The great thing about a FWB relationship is the fact that things are so casual. You can sleep with your FWB when you are in the mood, and take things slow in your dating life. Having a FWB often takes the sexual frustration out of dating because you are getting your sexual needs met elsewhere, allowing you to focus on your emotional connection. Having a FWB can often take the pressure off of dating in the early stages. Even if you do choose to sleep with people you are newly dating, having a reliable sexual partner can make dating more relaxed. Dating can also help prevent you from catching feelings for a FWB because you have other outlets for flirting and emotional connections.

14. Understand that they are also still dating

Just like you will likely be dating on the side, so are they. Be aware that as a FWB you probably aren’t they’re priority and you might have to be comfortable taking a backseat to their dating life. You probably want the same thing, so this usually works out for the best. In addition to not getting jealous of a FWB, it’s important not to expect to be their number one priority.

15. Don’t forget why you started

At the end of the day, friends with benefits relationships are about sex. Make sure that you and your friend are having fun sex together! FWB relationships are a great way to explore different types of sex and to get creative. Focus on the fun and carefree part of the relationship and make sure that your needs are being met in the bedroom!

Start being honest with yourself and your love needs, download Relish to get started on your relationship and self-love journey. Get full access to our expert relationship coaches, therapist approved quizzes, and more free for one week.

By Caitlin Killoren on May 24, 2021

With a degree in Psychology and over a decade of experience, Caitlin has made improving people's relationships both her career and her passion. Her work has been featured in publications like Bustle, Well + Good, and Goalcast, and she currently resides in Austin, Texas with her husband and giant fluffy dog, Remy.

fbb_alumni_admin, Author at FBB Alumni CLUB

IX FBB Alumni Prize, 2022

By : fbb_alumni_admin Posted On : No Comment

We are happy to share that the IX FBB Alumni Club Award has taken place! 6 FBB students submitted their applications and competed for victory in two categories: FBB Alumni Prize and FBB Alumni Prize Junior. It was very difficult to choose, because our students were able to show really outstanding achievements in various fields. According to the results of the two-level voting of the Club, it was decided to award…

Continue Reading

VII FBB Alumni Prize, 2021

By : fbb_alumni_admin Posted On : No Comment

We are happy to share that the 7th FBB Alumni Club Award has taken place! 12 FBB students submitted their applications and competed for victory in two categories: FBB Alumni Prize and FBB Alumni Prize Junior. It was very difficult to choose, because our students were able to show really outstanding achievements in various fields. According to the results of the two-level voting of the Club, it was decided to award…

Continue Reading

Statement of the FBB Alumni Club

By : fbb_alumni_admin Posted On : No Comment

A few days ago, a post by a graduate of the Faculty of Biology of Moscow State University was published on social networks. In the ensuing discussion, other girls, including at least one FBB graduate, shared similar stories. Since the BBC is a very special place that has left its mark on the souls of many generations ...

Continue Reading

VI FBB Alumni Prize, 2021

By : fbb_alumni_admin Posted On : No Comment

We are happy to share that the VI FBB Alumni Club Award has taken place! 13 FBB students submitted their applications and competed for victory in two categories: FBB Alumni Prize and FBB Alumni Prize Junior. It was very difficult to choose, because our students were able to show really outstanding achievements in various fields. Therefore, according to the results of the two-level voting of the Club, it was decided…

Continue Reading

V FBB Alumni Prize, 2020

By : fbb_alumni_admin Posted On : No Comment

We are happy to share that the 5th FBB Alumni Club Award has taken place! We see that interest in the Prize is steadily growing, which is expressed both in the growth in the number of applications and in the quality of applications: 17 FBB students submitted their applications and fought for victory in two categories: FBB Alumni Prize and FBB Alumni Prize Junior. It was very difficult to choose, because ...

Continue Reading

Changes in the rules for awarding the Prize

By : fbb_alumni_admin Posted On : No Comment

Dear Club members, FBB students and graduates! The initiative group held a Retro following the results of the IV FBB Alumni Awards and prepared some changes that, in our opinion, should make the FBB Alumni Awards better. We are happy to introduce them and hear your feedback. nine0009

Continue Reading

IV FBB Alumni Prize, 2020

By : fbb_alumni_admin Posted On : No Comment

Our students continue to surprise us with their achievements: all 11 applications received as part of the Fourth Prize of the FBB Alumni Club were worthy of the award. We had to solve the most difficult task - choose the top three. According to the results of a two-level voting, the Club members determined the winners, who were announced and awarded on May 18 during a web conference. Congratulations to our winners: I place - Anna Kamysheva II ...

Continue Reading

III FBB Alumni Prize, 2019

By : fbb_alumni_admin Posted On : No Comment

Our students continue to surprise us with their achievements: all 11 applications received as part of the Third Prize of the FBB Alumni Club were worthy of an award.But, according to the conditions of the competition , we had to solve the most difficult task - to choose the top three. According to the results of a two-level voting, the Club members determined the winners, who were announced and awarded on December 27 as part of the celebration of the New Year . ..

Continue Reading

Call for applications for the III FBB Alumni Award

By : fbb_alumni_admin Posted On : No Comment

Dear members of the Club! We have successfully completed the acceptance of applications for the FBB Alumni Prize ( A total of 11 applications were received from students. The initiative group of the club selected the 4 strongest applications for the general vote. According to the terms of the competition, the fundamental selection criterion is “Encouragement of students for their first achievements”, it can be both formal articles and…

Continue Reading

II FBB Alumni Prize, 2019

By : fbb_alumni_admin Posted On : No Comment

This time we received 14 applications and were very impressed with the success of our students. Therefore, choosing a winner is a very difficult task for us. But as we promised, the winners and prize-winners were announced and awarded on May 18 as part of the Graduation Day. They were 1st place - Nadezhda Azbukina 2nd-3rd place - Sergey Isaev and Daria Nikolaeva Congratulations to Nadezhda Azbukina, Sergey Isaev and ...

Continue Reading

Laboratory of Evolutionary Genomics FBB MSU

To obtain an account, fill out the form:


*** The information below is outdated, but may be useful for academic purposes ***

0. What is

node01: 512GB RAM 48 CPU

node03-node32: 48GB RAM 24CPU

91T HDD /home - for data and calculations

9T HDD /home/user/work - for editing scripts and ongoing work

4 /genomes/10124 - data from the 1000 genomes project.

Web interface to R-Studio:

1. General information

Log in to the cluster ssh [email protected].

Copy file to cluster scp [file] [email protected]:~/destination

On windows, use the putty and pscp utilities, or tunnelier.

To start the task, you need to create a start script - an example of a start script ,nodes=bigmem

#PBS -d.

#as an example - launching velvet, here you need to run the command or program you need

./velvetg from_all_reads -exp_cov auto -cov_cutoff auto -ins_length 80 -ins_length2 180 -ins_length3 120 -amos_file yes -min_contig_lgth 1000

The script says that it takes 100 hours of estimated time, 200G of memory, to use a node with large memory (node01). By default, the estimated time (walltime) is 1 hour. If you do not specify walltime, the task will be automatically completed in an hour.

For more information on requesting resources, see the man pbs_resources file.

For example, to use 10 cores, you would set

#PBS -l nodes=1:ppn=10 .

Nodes are divided into ordinary settlement (node13-node32) and a large memory node (node01). The latter is intended for tasks that require a large memory (for the assembly of genomes). Therefore, it cannot be loaded with tasks for which large memory is not needed. If you do not specify nodes in the -l option, then by default the task will go to one of the usual compute nodes, and not to a node with a large memory. If you need more memory, you need to write -l nodes=bigmem.

Set a task for execution qsub .

During task execution, 2 files o - output stream and - error stream are created. If the task produces a very large (gigabyte) output file, it is better to redirect it directly to a specific file, for example perl > /home/user/result.out. Otherwise, all large output is first created as a file on one of the compute nodes, and at the end of the count is copied over the network to the home folder, which slows down the main node. nine0009

View queue status qstat -n1 verbose, qstat brief.

Delete task qdel .

You can view the available nodes with the command qhost, in more detail - pbsnodes .

pbsnodes -l free - shows all nodes with at least one free core.

2. About calculations on the main node

Do not count on the main node (the main node is head02, where you go when you enter). nine0126

If you need to count the number of lines in a huge file, make a task for this and run it in the queue.


#PBS -d .

#PBS -l walltime=24:00:00

wc -l moscow.fca.fastq.filtered > moscow.fca.fastq.filtered.wc

Reading huge files from master causes other users to , which are editing their scripts at this time, cannot work. Also don't open large genomic files with emacs. Just in case, there is a 5G memory limit. nine0009

At the beginning of the assembly of the genome, you need to take readings from /mnt/readarchive. To do this, go to node01 and from there (not the main node head02) copy the reads you need to your home folder.

You can run programs for a short time and debug programs from any node that is free from tasks:

qhost - determine a free node

ssh nodeX - go to it

3. Arrays of tasks

to problast them against the base, it's good to use task arrays. Do not make arrays larger than 1000 tasks. nine0009

For example


#PBS -d .


Start task: qsub -t 0-39 . Viewing the queue: qstat -t

40 identical tasks are spawned, each has its own kernel, each is given its own value of the $PBS_ARRAYID variable from 0 to 39. Depending on the value, you can access any file inside the script, for example, perl transl .pl $PBS_ARRAYID.fasta > $PBS_ARRAYID.prot. nine0009

You can limit your array to one node: #PBS -l nodes=node13, then the execution of the first 24 tasks will start, and the rest will wait in the queue.

If you specify the line #PBS -l nodes=node13:ppn=20+node14:ppn=20 for an array of tasks, then this line works not for the entire array, but for each task from the array. Those. it turns out that each of the 100 tasks will try to occupy 20 cores on node 13 and 20 cores on node 14. Therefore, they will all be considered slowly, and 39 of the busy 40 cores will be idle. nine0125 Don't do that.

4. Priorities

If you have a lot of small tasks, and, on the one hand, you want to count them, but on the other hand, you are ashamed to occupy a cluster and cause fair indignation of colleagues, then set a lower priority.

qsub -p -10

Then new tasks that have just arrived in the queue (priority = 0 by default) will be launched as soon as the resource for them is freed, and tasks that were launched earlier with a low priority

will wait. nine0009

5. More information

Curious users can refer to section 2.0 of the documentation htm also much is written in man qsub, man qstat, man pbs_resources

6. Programs

Many programs are already installed in /home/tools. They can be used. Executable files are symlinked in /home/tools/bin. This path has been added to $PATH on all nodes. Those. in the script you can just write program-binary , not /home/tools/program/program-binary . If you need some program and it is not in /home/tools, but it may be useful to others, then install it in /home/tools/newprogram and make a symbolic link to the executable file: ln -s /home/tools/ newprogram/bin/program.exe /home/tools/bin/program.exe.

There is a distributed version of mrbayes with mpi. The example runs on 2 nodes for a total of 46 cores.


#PBS -d .

#PBS -l walltime=100:00:00,nodes=node26:ppn=23+node27:ppn=23

mpirun -np 46 mb-mpi primates. nex

List of programs


All compute nodes, as well as work node head02, are connected to the file server (/home). If the file server starts to experience very heavy read-write loads, it becomes difficult to work on head02. Follow a simple rule - when starting arrays of tasks that intensively read and write large files (sam, bam, etc, sizes are in gigabytes, tens of gigabytes), do not occupy more than 5 cluster nodes with these tasks. nine0009

You can use the /home/user/work folder to debug programs and edit scripts. This drive is not designed to run tasks in a queue. This drive is independent of /home. It has a quota - 200G.

8. Assembly of genomes

How to assemble a genome - first steps

velvet or soapdenovo.

9. About memory

In the task parameters -l nodes=1:ppn=24,mem=2GB

2GB does not mean that the task will be guaranteed 2GB of memory, but that as soon as the task exceeds this value, it will be terminated.

Learn more