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 7720197
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T03:36:13+00:00 2026-06-01T03:36:13+00:00

In MPI, is it possible to immediately throw out received data without allocating a

  • 0

In MPI, is it possible to immediately throw out received data without allocating a buffer to hold it? I’m using MPI_Allgather to collect data from several processes, but at some point, one or more processes have no useful data to send.

My original solution was to let the useless process finish. However, if a task terminates without calling MPI_Allgather, the rest end up in deadlock, because MPI_Allgather blocks. In order to overcome this problem I keep all the processes around until the end, but send junk data that is never used.

The useful processes keep some of the received data, but the useless processes don’t. I tried passing a null pointer for the recbuf like so:

MPI_Allgather(&sendbuf, 1, MPI_INT, 0, 1, MPI_INT, MPI_COMM_WORLD);

but it didn’t work. Is the anything I can do to avoid receiving, or at least storing the useless data?

  • 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-01T03:36:15+00:00Added an answer on June 1, 2026 at 3:36 am

    Collectives are by definition collective, which means every process in the communicator must call them. If you need to perform a collective call over a subset of a communicator, you have to make a new communicator, as already suggested.

    You could also look at MPI_Allgatherv and see if it’s a good fit for your application. With this collective you can specify how much data each process will send. However, every process in the communicator must still call MPI_Allgatherv, even those that send no data. In addition to this requirement, all processes must know how much data each process is contributing.

    Finally, MPI 3 will most likely include sparse collective operations which do exactly what you wish. But for now a new communicator is probably the best approach.

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

Sidebar

Related Questions

I used MPI_Irecv to recieve data from a certain host in MPI. By using
Using mpi.h in C, with 4 processors, each processor has allocated a buffer (integer)
Is it possible for F# and MPI to run off of Mono on a
I'm using MPI for performing parallel processing, after i compile the application using mpicc,
I'm using MPI with C, I've imported mpi.h and I am able to use
I have some parallel code (implemented using MPI) that needs to be documented. I'd
My application of MPI will read a series images to build a 3-D data.
I doing an application using C and MPI that makes a vector by Matrix
According to MPI 2.2 standard Section 4.1: to create a new data type we
How much tcp connections will be used for sending data by MPI program if

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.