Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8323143
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T23:37:44+00:00 2026-06-08T23:37:44+00:00

In MPI, each rank has a unique address space and communication between them happens

  • 0

In MPI, each rank has a unique address space and communication between them happens via message passing.

I want to know how MPI works on a multicore machine which has a shared memory.
If the ranks are on two different machines with no shared memory, then MPI has to use messages for communication. But if ranks are on the same physical machine (but still each rank has a different address space), will the MPI calls take advantage of the shared memory?

For example, suppose I’m issuing an ALLREDUCE call. I have two machines M1 and M2, each with 2 cores. Rank R1 and R2 are on core 1 and core 2 of machine M1 and R3 and R4 are on core 1 and 2 of machine M2. How would the ALLREDUCE happen? Will there be more than 1 message transmitted?
Ideally, I would expect R1 and R2 to do a reduce using the shared memory available to them (similarly R3 andR4) followed by message exchange between M1 and M2.

Is there any documentation where I can read about the implementation details of the collective operations in MPI?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T23:37:47+00:00Added an answer on June 8, 2026 at 11:37 pm

    Implementation of collective operations differs from one MPI library to another. The best place to look is the source code of the concrete library that you are using/want to use.

    I can tell you about how Open MPI implements collectives. Open MPI is composed of various layers at which different components (modules) live. There is the coll framework for collective operations that uses the lower-level btl framework to transfer messages. There are many different algorithms implemented in the coll framework as well as many different modules that implement those algorithms. A scoring mechanism is used to select what the library thinks is the best module for your case, but this can be easiliy overriden with MCA parameters. The most prominent one is the tuned module that is well tested and scales well on all kinds of interconnects, from shared memory to InfiniBand. The tuned module is quite oblivious as to where processes are located. It just uses the btl framework to send messages and btl takes care to use shared memory or network operations. Some of the algorithms in the tuned module are hierarchical and with proper tuning of the parameters (OMPI’s great flexibility comes from the fact that many internal MCA parameters can changed without recompiling) those algorithms can be made to match the actual hierarchy of the cluster. There is another coll module called hierarch that tries its best to gather as much physical topology information as possible and to use it in order to optimise collective communications.

    Unfortunately virtually all MPI implementations are written in C with very thin layers on top to provide Fortran interfaces. So I hope you have above average knowledge of C if you’d like to dive into this topic. There are also many research papers on optimisation of collective operations. Some of them are available for free, others are available through academic subscriptions.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've never used Message Passing Interface (MPI), but I've heard its name thrown about,
Using mpi.h in C, with 4 processors, each processor has allocated a buffer (integer)
What happens if you use one of the MPI communication methods to have a
Ok, this is a really weird one. I have an MPI program, where each
I have a code that has some mpi api-dependent bits: #if MPIVERSION==1 ... #elif
I've written some MPI code which works flawlessly on large clusters. Each node in
I'm building a distributed web server in C/MPI and it seems like point-to-point communication
I'm studying the communication complexity of a parallel implementation of Quicksort in MPI and
i recently came across a problem with my parallel program. Each process has several
I have an MPI program where each node sends some values to some other

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.