Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug in get_group_masters #2349

Merged
merged 1 commit into from
Dec 20, 2022
Merged

Conversation

oskooi
Copy link
Collaborator

@oskooi oskooi commented Dec 20, 2022

Fixes a bug in the function get_group_masters of simulation.py which is recently causing a failure in the CI (reproduced below). This bug occurs in Numpy 1.24 which removed a deprecation warning for np.bool.

Elapsed run time = 0.3249 sERROR: test_divide_parallel_processes (__main__.TestDivideParallelProcesses)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/runner/work/meep/meep/build/meep-1.26.0-beta/_build/sub/python/../../../python/tests/test_divide_mp\
i_processes.py", line 53, in test_divide_parallel_processes
    tot_fluxes = mp.merge_subgroup_data(tot_flux)
  File "/home/runner/work/meep/meep/build/meep-1.26.0-beta/_build/sub/python/meep/simulation.py", line 6078, in m\
erge_subgroup_data
    group_masters = get_group_masters()
  File "/home/runner/work/meep/meep/build/meep-1.26.0-beta/_build/sub/python/meep/simulation.py", line 6045, in g\
et_group_masters
    group_master_idx = np.zeros((num_workers,), dtype=np.bool)
  File "/opt/hostedtoolcache/Python/3.10.9/x64/lib/python3.10/site-packages/numpy/__init__.py", line 284, in __ge\
tattr__
    raise AttributeError("module {!r} has no attribute "
AttributeError: module 'numpy' has no attribute 'bool'

@oskooi oskooi added the bug label Dec 20, 2022
@codecov-commenter
Copy link

Codecov Report

Merging #2349 (4099531) into master (6e44cb8) will not change coverage.
The diff coverage is 0.00%.

@@           Coverage Diff           @@
##           master    #2349   +/-   ##
=======================================
  Coverage   72.55%   72.55%           
=======================================
  Files          17       17           
  Lines        5156     5156           
=======================================
  Hits         3741     3741           
  Misses       1415     1415           
Impacted Files Coverage Δ
python/simulation.py 76.62% <0.00%> (ø)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants