void sphere(char * fname,scalar s, coord center, double radius, int maxlevel){ FILE *fpver = fopen (fname,"a"); int nn = (1<= 0 ? interpolate(s,xp,yp,zp) : nodata; } } if (pid() == 0){ // master #if _MPI MPI_Reduce (MPI_IN_PLACE, field[0], 2*sq(nn), MPI_DOUBLE, MPI_MIN, 0, MPI_COMM_WORLD); #endif for (int i = 0; i < nn; i++) { for (int j = 0; j < nn; j++) { fprintf (fpver, "%g\t", field[i][j]); } fputc ('\n', fpver); } fflush (fpver); } #if _MPI else // slave MPI_Reduce (field[0], NULL, 2*nn*nn, MPI_DOUBLE, MPI_MIN, 0, MPI_COMM_WORLD); #endif matrix_free (field); }