dear all, I am not sure if I have understood correctly mpi_gather and mpi_gatherv. This is my problem:
I have a complex vector, let's say: X1, where X1 is (1:625). Each CPU work only with some element of X1, let say: CPU 0 --> X1(iEnd-iStart) 150 elements CPU 1 --> X1(iEnd-iStart) 150 elements CPU 2 --> X1(iEnd-iStart) 150 elements CPU 3 --> X1(iEnd-iStart) 175 elements I would like to collect all the data in only one vector, let's say PP(1:625) is it correct to write? CALL MPI_Gather(X1(iStart:iEnd), iEnd-iStart+1, MPI_DOUBLE_COMPLEX, PHIH(1:625), 625, MPI_DOUBLE_COMPLEX, 0, MPI_COMM_WORLD,MPIdata%iErr) In my case I get an error: An error occurred in MPI_Gather [diedroLap:3995] *** reported by process [140052855128065,0] [diedroLap:3995] *** on communicator MPI_COMM_WORLD [diedroLap:3995] *** MPI_ERR_TRUNCATE: message truncated Is this because each SubVector X1 has a different size? really really thanks Diego