Optimize MPI domain decomposition min_width calculation to improve scalability

This commit is contained in:
2026-01-31 16:23:16 +08:00
parent d11eaa2242
commit 6684016e8c

View File

@@ -313,7 +313,7 @@ MyList<Block> *Parallel::distribute(MyList<Patch> *PatchLIST, int cpusize, int i
int split_size, min_size, block_size = 0; int split_size, min_size, block_size = 0;
int min_width = 2 * Mymax(ghost_width, buffer_width); int min_width = Mymax(2 * ghost_width + 2, buffer_width + 2);
int nxyz[dim], mmin_width[dim], min_shape[dim]; int nxyz[dim], mmin_width[dim], min_shape[dim];
MyList<Patch> *PLi = PatchLIST; MyList<Patch> *PLi = PatchLIST;
@@ -641,7 +641,7 @@ MyList<Block> *Parallel::distribute(MyList<Patch> *PatchLIST, int cpusize, int i
int split_size, min_size, block_size = 0; int split_size, min_size, block_size = 0;
int min_width = 2 * Mymax(ghost_width, buffer_width); int min_width = Mymax(2 * ghost_width + 2, buffer_width + 2);
int nxyz[dim], mmin_width[dim], min_shape[dim]; int nxyz[dim], mmin_width[dim], min_shape[dim];
MyList<Patch> *PLi = PatchLIST; MyList<Patch> *PLi = PatchLIST;