Use MPI in Ubuntu

Source: Internet
Author: User
Ubuntu environment MPI use 1, Environment build Terminal: sudoapt-getinstallmpich2 installed with mpich2 version 1.4.1. 2. Compile terminal: mpiccmpi_hello.c-g-Wall-ompi_hello3, run terminal: mpiexec-n & lt; numberofprocesses & gt;./mpi_hello example: run the program with four processes

Use MPI in Ubuntu

1. Establish the environment

Terminal: sudo apt-get install mpich2

Install Version 1.4.1 of mpich2.

2. Compile

Terminal: mpicc mpi_hello.c-g-Wall-o mpi_hello

3. Run

Terminal: mpiexec-n ./Mpi_hello

Example: run the program with four processes

Mpiexec-n 4./mpi_hello

For more information about Ubuntu, see Ubuntu special page http://www.linuxidc.com/topicnews.aspx? Tid = 2

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.