Skip to content

Unified rc12 testing: np.int error on Perlmutter #484

@forsyth2

Description

@forsyth2

Running into the following on global_time_series on Perlmutter:

Traceback (most recent call last):
  File "/global/cfs/cdirs/e3sm/forsyth/zppy_test_complete_run_output/v2.LR.historical_0201/post/scripts/global_time_series_18\
50-1860_dir/coupled_global.py", line 603, in <module>
    run(sys.argv)
  File "/global/cfs/cdirs/e3sm/forsyth/zppy_test_complete_run_output/v2.LR.historical_0201/post/scripts/global_time_series_18\
50-1860_dir/coupled_global.py", line 587, in run
    PLOT_DICT[plot_list[i]](ax, xlim, exps)
  File "/global/cfs/cdirs/e3sm/forsyth/zppy_test_complete_run_output/v2.LR.historical_0201/post/scripts/global_time_series_18\
50-1860_dir/coupled_global.py", line 295, in plot_max_moc
    plot(ax, xlim, exps, param_dict)
  File "/global/cfs/cdirs/e3sm/forsyth/zppy_test_complete_run_output/v2.LR.historical_0201/post/scripts/global_time_series_18\
50-1860_dir/coupled_global.py", line 374, in plot
    [year, var] = getmoc(exp["moc"])
  File "/global/cfs/cdirs/e3sm/forsyth/zppy_test_complete_run_output/v2.LR.historical_0201/post/scripts/global_time_series_18\
50-1860_dir/coupled_global.py", line 29, in getmoc
    for iyear in range(np.int(time0[0]), np.int(time0[-1]) + 1):
  File "/global/common/software/e3sm/anaconda_envs/base/envs/e3sm_unified_1.9.0rc12_pm-cpu/lib/python3.10/site-packages/numpy\
/__init__.py", line 305, in __getattr__
    raise AttributeError(__former_attrs__[attr])
AttributeError: module 'numpy' has no attribute 'int'.
`np.int` was a deprecated alias for the builtin `int`. To avoid this error in existing code, use `int` by itself. Doing this \
will not modify any behavior and is safe. When replacing `np.int`, you may wish to use e.g. `np.int64` or `np.int32` to speci\
fy the precision. If you wish to review your current use, check the release note link for additional information.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
    https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations. Did you mean: 'inf'?

This np.int issue was resolved by https://github.com/E3SM-Project/zppy/pull/466/files#diff-a10da0e74d3b76ccfa4c61b3666ceb36b458e72e82820d85c357507070820badL29, so it shouldn't be an issue in Unified rc12...

Metadata

Metadata

Assignees

No one assigned

    Labels

    semver: bugBug fix (will increment patch version)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions