Skip to content

Commit 355c2ee

Browse files
authored
Merge pull request #449 from davidozog/pr/split_2d-init_vars
Resolve compiler warning in 2D team split example
2 parents 071f174 + 236f7ca commit 355c2ee

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

example_code/shmem_team_split_2D.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ static void find_xy_dims(int npes, int *x, int *y) {
1515
/* Find x, y, and z such that x * y * z == npes and
1616
* abs(x - y) + abs(x - z) + abs(y - z) is minimized. */
1717
static void find_xyz_dims(int npes, int *x, int *y, int *z) {
18+
*x = *y = *z = 1;
1819
for(int divider = ceil(cbrt(npes)); divider >= 1; divider--)
1920
if (npes % divider == 0) {
2021
*x = divider;

0 commit comments

Comments
 (0)