Giter Site home page Giter Site logo

mrbayes-mpi_in_wsl's Introduction

bishengorange/Mrbayes-Mpi_in_WSL

Install Mrbayes software running multi-threaded on WSL (Windows Subsystem for Linux)

Get started

  1. WSL1;
  2. beagle-lib-3.1.2;
  3. openmpi-4.1.5;
  4. mrbayes-3.2.7;

1 Install Linux on Windows with WSL1

To install WSL1, please take a look at the official tutorial of WSL. Or download WSL distribution in the Windows Microsoft store.

How to install WSL in the Windows Microsoft Store

First, enable the WSL function, Follow these steps:

Windows Control Panel -> Programs and Features -> Turn Windows features on or off -> √ Windows Subsystem for Linux -> Restart.

WSL2 is turned on by default and needs to be set to WSL1 in Powershell.

Set the default WSL version to WSL1:

wsl --set-default-version 1

Then search for WSL in the Windows Microsoft Store to download Ubuntu 22.04.4 LTS-WSL (You can also choose Debian, etc.).

After the download is complete, install it and set the username and password after installation.

WSL1 is installed successfully.

2 Install Ubuntu prerequisite software

sudo apt-get update && sudo apt-get upgrade # Update sources and packages
sudo apt-get install -y gcc cmake build-essential autoconf automake subversion libtool git pkg-config openjdk-11-jdk

3 Download beagle-lib-3.1.2, openmpi-4.1.5 and mrbayes-3.2.7

Download beagle-lib-3.1.2.tar.gz, mrbayes-3.2.7.tar.gz, and openmpi-4.1.5.tar.gz in Releases (Note: I haven’t tried a higher version of beagle. I don’t know if it applies to Mrbayes3.2.7.).

Download and extract beagle-lib-3.1.2.tar.gz, mrbayes-3.2.7.tar.gz, and openmpi-4.1.5.tar.gz to any location in Windows (example path: C:\Mrbayes-Mpi_in_WSL-Package).

Copy beagle-lib-3.1.2.tar.gz, mrbayes-3.2.7.tar.gz, and openmpi-4.1.5.tar.gz to WSL, and then unzip it.

cp /mnt/d/Mrbayes-Mpi_in_WSL-Package/beagle-lib-3.1.2.tar.gz /home/username/
tar -xzvf beagle-lib-3.1.2.tar.gz

cp /mnt/d/Mrbayes-Mpi_in_WSL-Package/mrbayes-3.2.7.tar.gz /home/username/
tar -xzvf mrbayes-3.2.7.tar.gz

cp /mnt/d/Mrbayes-Mpi_in_WSL-Package/openmpi-4.1.5.tar.gz /home/username/
tar -xzvf openmpi-4.1.5.tar.gz

4 Install step by step

Installation sequence: beagle-lib-3.1.2 -> openmpi-4.1.5 -> mrbayes-3.2.7.

4.1 beagle-lib-3.1.2

cd
cd beagle-lib-3.1.2 && ll
./configure
make
sudo make install

Configure environment variables

vim ~/.bashrc

Add the following to the end of the .bashrc file

export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH
source ~/.bashrc

4.2 openmpi-4.1.5

cd
cd openmpi-4.1.5 && ll
./configure
make
sudo make install

Configure environment variables

vim ~/.bashrc

Add the following to the end of the .bashrc file

MPI_HOME=/usr/local/openmpi
export PATH=${MPI_HOME}/bin:$PATH
export LD_LIBRARY_PATH=${MPI_HOME}/lib:$LD_LIBRARY_PATH
export MANPATH=${MPI_HOME}/share/man:$MANPATH
source ~/.bashrc

Verify installation

cd examples && ll
make
mpirun -np 4 hello_c

4.3 mrbayes-3.2.7

cd
cd mrbayes-3.2.7/ && ll
./configure --with-mpi --with-beagle
make
sudo make install

Thus, the installation was successful

Running multi-threaded Mrbayes

mpirun -np 4 mb # 4 cores running Mrbayes (number of cores depends on computer CPU)

mrbayes-mpi_in_wsl's People

Contributors

bishengorange avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.