42 if (mpi->
rank && xg) {
43 fprintf(stderr,
"Error in MPIPartitionArray1D(): global array exists on non-root processors (rank %d).\n",
47 if ((!mpi->
rank) && (!xg)) {
48 fprintf(stderr,
"Error in MPIPartitionArray1D(): global array is not allocated on root processor.\n");
54 for (proc = 0; proc < mpi->
nproc; proc++) {
59 MPI_Recv(&is,1,MPI_INT,proc,1442,mpi->
world,&status);
60 MPI_Recv(&ie,1,MPI_INT,proc,1443,mpi->
world,&status);
67 double *buffer = (
double*) calloc (size,
sizeof(
double));
71 MPI_Send(buffer,size,MPI_DOUBLE,proc,1539,mpi->
world);
81 MPI_Send(&istart,1,MPI_INT,0,1442,mpi->
world);
82 MPI_Send(&iend ,1,MPI_INT,0,1443,mpi->
world);
83 double *buffer = (
double*) calloc (N_local,
sizeof(buffer));
84 MPI_Recv(buffer,N_local,MPI_DOUBLE,0,1539,mpi->
world,&status);
int MPIPartitionArray1D(void *, double *, double *, int, int, int, int)
MPI related function definitions.
#define _ArrayCopy1D_(x, y, size)
Some basic definitions and macros.
Contains macros and function definitions for common array operations.
Structure of MPI-related variables.