Skip to content

Commit

Permalink
Modified check on size of proc grid for LAPACK-style distributions so…
Browse files Browse the repository at this point in the history
… that they

work on processor groups.
  • Loading branch information
Bruce J Palmer committed Dec 14, 2021
1 parent 35c9ed2 commit 3142f8f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions global/src/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -1807,7 +1807,7 @@ void pnga_set_block_cyclic_proc_grid(Integer g_a, Integer *dims, Integer *proc_g
GA[ga_handle].nblock[i] = proc_grid[i];
tot *= proc_grid[i];
}
if (tot != GAnproc)
if (tot != pnga_pgroup_nnodes(GA[ga_handle].p_handle))
pnga_error("Number of processors in processor grid must equal available processors",0);
/* evaluate number of blocks in each dimension */
for (i=0; i<GA[ga_handle].ndim; i++) {
Expand Down Expand Up @@ -1851,7 +1851,7 @@ void pnga_set_tiled_proc_grid(Integer g_a, Integer *dims, Integer *proc_grid)
GA[ga_handle].nblock[i] = proc_grid[i];
tot *= proc_grid[i];
}
if (tot != GAnproc)
if (tot != pnga_pgroup_nnodes(GA[ga_handle].p_handle))
pnga_error("Number of processors in processor grid must equal available processors",0);
/* evaluate number of blocks in each dimension */
for (i=0; i<GA[ga_handle].ndim; i++) {
Expand Down Expand Up @@ -1929,7 +1929,7 @@ void pnga_set_tiled_irreg_proc_grid(Integer g_a, Integer *mapc, Integer *nblocks
GA[ga_handle].nblock[i] = proc_grid[i];
tot *= proc_grid[i];
}
if (tot != GAnproc)
if (tot != pnga_pgroup_nnodes(GA[ga_handle].p_handle))
pnga_error("Number of processors in processor grid must equal available processors",0);
/* Find total number of blocks */
jsize = 1;
Expand Down

0 comments on commit 3142f8f

Please sign in to comment.