Environment configuration for MPI parallel programming

Source: Internet
Author: User

Recently, algorithm analysis jobs need to be handed in. Learn MPI. Below is a post on Basic Environment Configuration

Environment configuration for MPI parallel programming
Mpich2 and VC ++ 6.0

(1) Installation of VC ++ (omitted)

(2) install mpich2 (omitted)

(3) Under directories in tools> options in VC ++ 6.0, add the include directory of mpich2 under the include files option, such as: C: /program files/mpich2/include; Add the lib directory of mpich2 under the library files option, such as C:/program files/mpich2/lib, from then on, you can use the MPI library in VC, instead of setting

(4) After each project is created, under project-> Settings, under the link tab, add MPI. lib to the object/library modules.

(5) In the program # include "MPI. H "before adding # define mpich_skip_mpicxx, this is because the CPP Io library conflicts with the macro definition in the MPI header file. After adding this definition, you can skip the mpicxx definition during compilation.

(6) After mpich2 is installed, there are several mpich2programs in the Start Menu> program. wmpiregister.exe registers an account. This account must be an existing account of the current system and must have administrator privileges (Note: setting is a setup program, after setting the account, you do not need to set it again here. If you have set it correctly before, click scan hostsand the name in the hostsdirectory should be green. Run your program with wmpiexec.exe. After setting the number of parallel programs, you can run it.

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.