Skip to content

Commit 29f51ea

Browse files
benfultonBen Fultonstephankramer
authored
Don't set NUM_GLOBAL_PARTS for Zoltan (#392)
* Don't set NUM_GLOBAL_PARTS for Zoltan Setting both NUM_GLOBAL_PARTS and NUM_LOCAL_PARTS together has issues * Upgrade flake8 version used in precommit Flake8 <6.1.0 and python 3.12 seems to have issues throwing up errors in the middle of f-strings. Fixed in 6.1.0: PyCQA/pycodestyle#1148 Upgrade to 6.1.0 only, as any newer versions introduce more errors that either need fixing, or ignoring explicitly - which should probably be done in a separate PR. --------- Co-authored-by: Ben Fulton <bfulton@imperial.ac.uk> Co-authored-by: Stephan Kramer <s.kramer@imperial.ac.uk>
1 parent e28a4ab commit 29f51ea

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ repos:
3333
hooks:
3434
- id: pyupgrade
3535
- repo: https://github.com/PyCQA/flake8
36-
rev: 6.0.0
36+
rev: 6.1.0
3737
hooks:
3838
- id: flake8
3939
args: ["--max-line-length", "88", "--extend-ignore", "E203,E722"]

assemble/Zoltan_integration.F90

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,6 @@ subroutine set_zoltan_parameters(final_adapt_iteration, flredecomp, target_procs
580580
else
581581
ierr = Zoltan_Set_Param(zz, "NUM_LOCAL_PARTS", "1"); assert(ierr == ZOLTAN_OK)
582582
end if
583-
ierr = Zoltan_set_Param(zz, "NUM_GLOBAL_PARTS", int2str(target_procs)); assert(ierr == ZOLTAN_OK)
584583
end if
585584

586585
if (.NOT. final_adapt_iteration) then
@@ -878,7 +877,9 @@ subroutine zoltan_load_balance(zz, changes, num_gid_entries, num_lid_entries, &
878877
ierr = Zoltan_LB_Partition(zz, changes, num_gid_entries, num_lid_entries, p1_num_import, p1_import_global_ids, &
879878
& p1_import_local_ids, p1_import_procs, import_to_part, p1_num_export, p1_export_global_ids, &
880879
& p1_export_local_ids, p1_export_procs, export_to_part)
881-
assert(ierr == ZOLTAN_OK)
880+
if (ierr .ne. ZOLTAN_OK .and. ierr .ne. ZOLTAN_WARN) then
881+
FLAbort("Zoltan_LB_Partition failed in zoltan_load_balance.")
882+
end if
882883

883884
! calculate how many owned nodes we'd have after doing the planned load balancing
884885
num_nodes_after_balance = num_nodes + p1_num_import - p1_num_export

0 commit comments

Comments
 (0)