subject

Write an mpi program named intro_mpi. c that performs the following tasks. assume that the mpi program is going to be run with 8 processes. have process 0 creates a 16-element array of integers named arrayzero and randomly initializes each element in this array. using mpi_send and mpi_recv, have process 0 sends the second element in this array to process 1. output the second element of arrayzero in process 0 and a variable contained the newly sent data in process 1 to verify the communication. using mpi_broadcast, broadcast the content of the variable of process 1 from task 1 to all other processes, to be saved in a new variable called fromone. output this variable from all eight processes to verify the communication. using mpi_reduce, calculate the sum of the fromone variables (task 2) of all the processes and store the final value in process 2. using mpi_scatter, scatter the 16-element array from process 0 into 2-element arrays named fromarray at all other processes. output the content of fromarray for each process for verification purposes. using mpi_gather, gather the fromarray arrays into a second array in process 0 named arrayone. for process 0 only, output arrayzero and arrayone for verification purposes

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 20:00
When you mouse over and click to add a search term this(these) boolean operator(s) is(are) not implied. (select all that apply)?
Answers: 1
question
Computers and Technology, 23.06.2019 11:00
How should you specify box sizes on a web page if you want the boxes to vary according to the font size of the text they contain? a. in pixels b. in inches c. as percentages d. in em units
Answers: 2
question
Computers and Technology, 23.06.2019 12:40
According to the video what are some tasks petroleum engineers perform check all that apply
Answers: 2
question
Computers and Technology, 24.06.2019 00:30
Use the keyword strategy to remember the meaning of the following word. the meaning for the word has been provided. write your keyword and describe the picture you would create in your mind. obfuscate: to make something so confusing that it is difficult to understand.
Answers: 2
You know the right answer?
Write an mpi program named intro_mpi. c that performs the following tasks. assume that the mpi progr...
Questions
question
Arts, 16.10.2020 08:01
question
Mathematics, 16.10.2020 08:01
question
Mathematics, 16.10.2020 08:01
question
English, 16.10.2020 08:01