From 367d7878df07a8f08d3595ea64ab5a74e3b44e4e Mon Sep 17 00:00:00 2001 From: Ben Fulton Date: Tue, 3 Feb 2026 14:21:56 +0000 Subject: [PATCH 1/2] Don't set NUM_GLOBAL_PARTS for Zoltan Setting both NUM_GLOBAL_PARTS and NUM_LOCAL_PARTS together has issues --- assemble/Zoltan_integration.F90 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/assemble/Zoltan_integration.F90 b/assemble/Zoltan_integration.F90 index d213821f16..8e5dac7704 100644 --- a/assemble/Zoltan_integration.F90 +++ b/assemble/Zoltan_integration.F90 @@ -580,7 +580,6 @@ subroutine set_zoltan_parameters(final_adapt_iteration, flredecomp, target_procs else ierr = Zoltan_Set_Param(zz, "NUM_LOCAL_PARTS", "1"); assert(ierr == ZOLTAN_OK) end if - ierr = Zoltan_set_Param(zz, "NUM_GLOBAL_PARTS", int2str(target_procs)); assert(ierr == ZOLTAN_OK) end if if (.NOT. final_adapt_iteration) then @@ -878,7 +877,9 @@ subroutine zoltan_load_balance(zz, changes, num_gid_entries, num_lid_entries, & ierr = Zoltan_LB_Partition(zz, changes, num_gid_entries, num_lid_entries, p1_num_import, p1_import_global_ids, & & p1_import_local_ids, p1_import_procs, import_to_part, p1_num_export, p1_export_global_ids, & & p1_export_local_ids, p1_export_procs, export_to_part) - assert(ierr == ZOLTAN_OK) + if (ierr .ne. ZOLTAN_OK .and. ierr .ne. ZOLTAN_WARN) then + FLAbort("Zoltan_LB_Partition failed in zoltan_load_balance.") + end if ! calculate how many owned nodes we'd have after doing the planned load balancing num_nodes_after_balance = num_nodes + p1_num_import - p1_num_export From 1c301c219cb19237337f32e33dccf81c1825423e Mon Sep 17 00:00:00 2001 From: Stephan Kramer Date: Wed, 11 Feb 2026 14:26:05 +0000 Subject: [PATCH 2/2] 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: https://github.com/PyCQA/pycodestyle/pull/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. --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2bf8eed9db..11302f6a89 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -33,7 +33,7 @@ repos: hooks: - id: pyupgrade - repo: https://github.com/PyCQA/flake8 - rev: 6.0.0 + rev: 6.1.0 hooks: - id: flake8 args: ["--max-line-length", "88", "--extend-ignore", "E203,E722"]