你能帮我解决MPI_Reduce吗?我收到这样的错误
In: PMI_Abort(1, Fatal error in PMPI_Reduce:
Internal MPI error!, error stack:
PMPI_Reduce(1284)....................: MPI_Reduce(sbuf=0x7fffcd0d0ae0, rbuf=0x7fffcd0d0af0, count=400, MPI_LONG, MPI_SUM, root=0, MPI_COMM_WORLD) failed
MPIR_Reduce_impl(1090)...............:
MPIR_Reduce_MV2(1173)................:
MPIR_Reduce_two_level_helper_MV2(887):
MPIR_Reduce_binomial_MV2(119)........:
MPIR_Localcopy(386)..................: memcpy arguments alias each other, dst=0x7fffcd0d0af0 src=0x7fffcd0d0ae0 len=3200
)
这些是代码 适用于所有流程
#define binsperdegree 4
#define totaldegrees 64
long int TotalCountDD;
long int tDD;
int nr_of_bins = binsperdegree*totaldegrees;
int hgram_size = nr_of_bins+1;
long int *histogramDD;
long int *totalDD;
用于根进程
totalDD = (long int *)calloc( tDD, sizeof(long int));
MPI_Reduce(&histogramDD, &totalDD, tDD, MPI_LONG, MPI_SUM, 0, MPI_COMM_WORLD);
用于非根进程
totalDD = (long int *)calloc(tDD , sizeof(long int));
MPI_Reduce(&histogramDD, &totalDD, TotalCountDD, MPI_LONG, MPI_SUM, 0, MPI_COMM_WORLD);