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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T15:04:51+00:00 2026-06-13T15:04:51+00:00

In the following code the value of xysize gets changed, if I do not

  • 0

In the following code the value of xysize gets changed, if I do not declare it as a parameter (which I generally cannot do). It happens only with optimizations -O2 and more in gfortran 4.7.2 and OpenMPI 1.6. How is it possible? I cannot find the exact interface, that I import from mpi.mod, but the C prototype clearly states that count is passed by value, hence it cannot change.

     write(*,*) im,"receiving from",image_index([iim,jim,kim+1]),"size",&
      size(D%A(D%starti:D%endi,D%startj:D%endj,D%endk)),xysize

    call MPI_RECV(D%A(D%starti:D%endi,D%startj:D%endj,D%endk+1),xysize , MPI_REAL, image_index([iim,jim,kim+1])-1,&
           5000, comm, status, ierr)

    write(*,*) im,"received size",&
      size(D%A(D%starti:D%endi,D%startj:D%endj,D%endk)),xysize

output:

1 receiving from           2 size        4096        4096
1 received size        4096        5000
  • 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-13T15:04:52+00:00Added an answer on June 13, 2026 at 3:04 pm

    For the sake of future visitors, I suppose I’ll answer this even though it’s all answered in the comments above.

    As far as I’m aware, if your program is behaving properly, you cannot change the value of that parameter (“count”) in a call to MPI_Recv.

    Your argument status is too small, it should be an array status(MPI_STATUS_SIZE), and you’re getting a buffer overflow — This often results in a segmentation fault, but at times (depending on how the compiler packed the variables in memory), it can result in funny behavior like this.

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

Sidebar

Related Questions

If the value in my control only have one value the following code will
Try the following code: s = '#value#' puts s.gsub('#value#', Regexp.escape('*')) # => '\*' puts
How do i get the identity. The following code enters a value into orderItem.
The following code raises an ambiguous reference to value at compile time: import flash.display.Sprite;
The following code gives digits whose name is shorter than their value. I can't
The following code I used to replace .(dot) by ,(coma) while user inputing value
the following code for some bizarre reason gives me a value for each row
I have the following code to assign a value to all the elements of
I used the following code to post a search value via an html button.
I have the following code that takes a double value and converts it to

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.