Question: Multiple Choice (MPI Program Output) Select the correct output of the following MPI program, assuming that 3 processes were launched to run the program. from

Multiple Choice (MPI Program Output)

Multiple Choice (MPI Program Output) Select the correct output of the following

Select the correct output of the following MPI program, assuming that 3 processes were launched to run the program. from mpi 4py import MPI comm = MPI.COMM WORLD size = comm. Get_size() rank = comm. Get_rank() if rank == 0: data = [(i+1)**2 for i in range (size)] else: data = None data = comm.scatter (data, root=0) assert data == (rank+1) **2 print ("data on rank %d is: %s" % (rank, data)) data on rank O is: 16 data on rank 1 is: 9 data on rank 2 is: 4 data on rank 3 is: 1 data on rank O is: 1 data on rank 1 is: 4 data on rank 2 is: 9 data on rank 3 is: 16 O data on rank O is: 1 data on rank 1 is: 4 data on rank 2 is: 9 O data on rank O is: 1,4,9, 16 data on rank 1 is: ata on rank 2 is

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!