Install and configure openmpi

Source: Internet
Author: User

Install and configure openmpi

The main installation steps are as follows.

Download and decompress openmpi

Download the latest version from the official website and decompress it.

Tar-xvf openmpi-xxxcd openmpi-xxx

Configuration, the-prefix option indicates the installation directory

./Configure -- prefix = "/opt/openmpi"

Build installation. The-j option indicates the number of Cores Used for compilation.

Make-j 4 all

There are a lot of output, wait a few minutes

Make install

Usage. Either of the following two methods

Add Environment Variables

Add the following lines to the. bashrc file:

Export PATH = "$ PATH:/opt/openmpi/bin" export LD_LIBRARY_PATH = "$ LD_LIBRARY_PATH:/opt/openmpi/lib /"

Use the configuration file

Vim openmpi-gcc # Add the following statement export PATH = "$ PATH:/opt/openmpi/bin" export LD_LIBRARY_PATH = "$ LD_LIBRARY_PATH:/opt/openmpi/lib /"

Run source/opt/openmpi-gcc to use

Check whether the installation is successful

Which mpirun

Or

Mpirun

Since then, openmpi has been installed.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.