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

  • SEARCH
  • Home
  • 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 8844759
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T11:34:03+00:00 2026-06-14T11:34:03+00:00

I am broadcasting a pointer to an array MPI_Bcast(&xd_sim_send, Nooflines_Sim, MPI_FLOAT, root, MPI_COMM_WORLD); from

  • 0

I am broadcasting a pointer to an array

MPI_Bcast(&xd_sim_send, Nooflines_Sim, MPI_FLOAT, root, MPI_COMM_WORLD);

from process 0 and receiving this broadcast from processes other than 0

MPI_Bcast(&xd_sim_recv, Nooflines_Sim, MPI_FLOAT, root, MPI_COMM_WORLD);

I get segmentation fault 11 when I try to read the received value.
Like this

for(i=0; i<Numlines_Sim; i++)
printf("%f\n",xd_sim_recv[i]);fflush(stdout);

What is wrong here, Could you please help me fix it?

  • 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-14T11:34:05+00:00Added an answer on June 14, 2026 at 11:34 am

    If you want to receive the data in a vector other than the one used by root process, then you should do something like this (pseudocode):

    if (THIS PROCESS IS ROOT) {
        MPI_Bcast(xd_sim_send, Nooflines_Sim, MPI_FLOAT, root, MPI_COMM_WORLD);
    } else {
        MPI_Bcast(xd_sim_recv, Numlines_Sim, MPI_FLOAT, root, MPI_COMM_WORLD);
    }
    

    without the &, because the variables xd_sim_send xd_sim_recv are already pointers, that is what MPI_Bcast needs.

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

Sidebar

Related Questions

starting from this point: http://www.mattakis.com/blog/kisg/20090708/broadcasting-video-with-android-without-writing-to-the-file-system I'm trying to create an application to save a
I'm having some trouble understanding the rules for array broadcasting in Numpy. Obviously, if
So I have some server broadcasting live data onto Named Pipe - \\.\pipe\TestChannel (from
I have an issue with broadcasting Datagram packets from one Android phone to the
I'm thinking of broadcasting an Intent from my MainActivity to be received by SomeReceiver
I am trying to UDP broadcast from a Python program to two LabView programs.
I am in the process of creating a TCP remote desktop broadcasting application. (Something
Having this problem, I don `t know how to pull data from multiple tables.
Say the broadcasting thread broadcasts while only 3 threads are waiting and the 4th
I am broadcasting an intent when a record button is clicked. a boolean variable

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.