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

TX90p/TX10p/TN90p/TN10p calculations do not complete when --base_period argument is used #19

Closed
ngben opened this issue Mar 13, 2023 · 2 comments · Fixed by #22
Closed

Comments

@ngben
Copy link
Contributor

ngben commented Mar 13, 2023

Using the --base_period argument for percentiles seems to hang with AGCD tasmax/tasmin data and the job runs out of walltime. I haven't applied it yet to other models. Below is the output from one of failed jobs.

/g/data/xv83/dbi599/miniconda3/envs/icclim/bin/python /g/data/xv83/users/bxn599/ACS/icclim/run_icclim.py --slice_mode year --verbose --start_date 1979-01-01 --end_date 2021-12-31 --base_period 1985-01-01 2014-12-31 --input_files [AGCD tasmax files on xv83] --variable tmax --drop_time_bounds TX10p TX10p_AUS-r005_BOM-AGCD_historical_none_year_19790101-20211231.nc
[########################################] | 100% Completed | 10m 17s
rm: cannot remove 'TX10p_AUS-r005_BOM-AGCD_historical_none_year_19790101-20211231.nc': No such file or directory
2023-03-11 09:06:12,661 Array size: (15706, 691, 886)
2023-03-11 09:06:12,662 Chunk size: Frozen({'time': (15706,), 'lat': (35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 26), 'lon': (60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 46)})
2023-03-11 09:06:12,662    ********************************************************************************************
2023-03-11 09:06:12,662    *                                                                                          *
2023-03-11 09:06:12,662    *          icclim                6.1.3   *
2023-03-11 09:06:12,662    *                                                                                          *
2023-03-11 09:06:12,662    *                                                                                          *
2023-03-11 09:06:12,662    *          Fri Mar 10 22:06:12 2023                                                    *
2023-03-11 09:06:12,662    *                                                                                          *
2023-03-11 09:06:12,662    *          BEGIN EXECUTION                                                                 *
2023-03-11 09:06:12,662    *                                                                                          *
2023-03-11 09:06:12,662    ********************************************************************************************
2023-03-11 09:06:12,662 Processing: 0%
/g/data/xv83/dbi599/miniconda3/envs/icclim/lib/python3.10/site-packages/dask/array/core.py:4806: PerformanceWarning: Increasing number of chunks by factor of 15
  result = blockwise(
/g/data/xv83/dbi599/miniconda3/envs/icclim/lib/python3.10/site-packages/xarray/core/dataset.py:4880: PerformanceWarning: Reshaping is producing a large chunk. To accept the large
chunk and silence this warning, set the option
    >>> with dask.config.set(**{'array.slicing.split_large_chunks': False}):
    ...     array.reshape(shape)

To avoid creating the large chunks, set the option
    >>> with dask.config.set(**{'array.slicing.split_large_chunks': True}):
    ...     array.reshape(shape)Explictly passing ``limit`` to ``reshape`` will also silence this warning
    >>> array.reshape(shape, limit='128 MiB')
  result = result._unstack_full_reindex(
/g/data/xv83/dbi599/miniconda3/envs/icclim/lib/python3.10/site-packages/xarray/core/variable.py:1722: PerformanceWarning: Reshaping is producing a large chunk. To accept the large
chunk and silence this warning, set the option
    >>> with dask.config.set(**{'array.slicing.split_large_chunks': False}):
    ...     array.reshape(shape)

To avoid creating the large chunks, set the option
    >>> with dask.config.set(**{'array.slicing.split_large_chunks': True}):
    ...     array.reshape(shape)Explictly passing ``limit`` to ``reshape`` will also silence this warning
    >>> array.reshape(shape, limit='128 MiB')
  result = result._stack_once(dims, new_dim)
/g/data/xv83/dbi599/miniconda3/envs/icclim/lib/python3.10/site-packages/xclim/core/cfchecks.py:44: UserWarning: Variable does not have a `cell_methods` attribute.
  _check_cell_methods(
/g/data/xv83/dbi599/miniconda3/envs/icclim/lib/python3.10/site-packages/xclim/core/cfchecks.py:48: UserWarning: Variable does not have a `standard_name` attribute.
  check_valid(vardata, "standard_name", data["standard_name"])
/g/data/xv83/dbi599/miniconda3/envs/icclim/lib/python3.10/site-packages/dask/array/core.py:4806: PerformanceWarning: Increasing number of chunks by factor of 15
  result = blockwise(
/g/data/xv83/dbi599/miniconda3/envs/icclim/lib/python3.10/site-packages/dask/array/core.py:4806: PerformanceWarning: Increasing number of chunks by factor of 15
  result = blockwise(
/g/data/xv83/dbi599/miniconda3/envs/icclim/lib/python3.10/site-packages/dask/array/core.py:4806: PerformanceWarning: Increasing number of chunks by factor of 15
  result = blockwise(
/g/data/xv83/dbi599/miniconda3/envs/icclim/lib/python3.10/site-packages/dask/array/core.py:4806: PerformanceWarning: Increasing number of chunks by factor of 15
  result = blockwise(
/g/data/xv83/dbi599/miniconda3/envs/icclim/lib/python3.10/site-packages/dask/array/core.py:4806: PerformanceWarning: Increasing number of chunks by factor of 15
  result = blockwise(
/g/data/xv83/dbi599/miniconda3/envs/icclim/lib/python3.10/site-packages/dask/array/core.py:4806: PerformanceWarning: Increasing number of chunks by factor of 15
  result = blockwise(
/g/data/xv83/dbi599/miniconda3/envs/icclim/lib/python3.10/site-packages/dask/array/core.py:4806: PerformanceWarning: Increasing number of chunks by factor of 15
  result = blockwise(
/g/data/xv83/dbi599/miniconda3/envs/icclim/lib/python3.10/site-packages/dask/array/core.py:4806: PerformanceWarning: Increasing number of chunks by factor of 15
  result = blockwise(
/g/data/xv83/dbi599/miniconda3/envs/icclim/lib/python3.10/site-packages/dask/array/core.py:4806: PerformanceWarning: Increasing number of chunks by factor of 15
  result = blockwise(
/g/data/xv83/dbi599/miniconda3/envs/icclim/lib/python3.10/site-packages/dask/array/core.py:4806: PerformanceWarning: Increasing number of chunks by factor of 15
  result = blockwise(
/g/data/xv83/dbi599/miniconda3/envs/icclim/lib/python3.10/site-packages/dask/array/core.py:4806: PerformanceWarning: Increasing number of chunks by factor of 15
  result = blockwise(
/g/data/xv83/dbi599/miniconda3/envs/icclim/lib/python3.10/site-packages/dask/array/core.py:4806: PerformanceWarning: Increasing number of chunks by factor of 15
  result = blockwise(
/g/data/xv83/dbi599/miniconda3/envs/icclim/lib/python3.10/site-packages/dask/array/core.py:4806: PerformanceWarning: Increasing number of chunks by factor of 15
  result = blockwise(
/g/data/xv83/dbi599/miniconda3/envs/icclim/lib/python3.10/site-packages/dask/array/core.py:4806: PerformanceWarning: Increasing number of chunks by factor of 15
  result = blockwise(
/g/data/xv83/dbi599/miniconda3/envs/icclim/lib/python3.10/site-packages/dask/array/core.py:4806: PerformanceWarning: Increasing number of chunks by factor of 15
  result = blockwise(
/g/data/xv83/dbi599/miniconda3/envs/icclim/lib/python3.10/site-packages/dask/array/core.py:4806: PerformanceWarning: Increasing number of chunks by factor of 15
  result = blockwise(
/g/data/xv83/dbi599/miniconda3/envs/icclim/lib/python3.10/site-packages/dask/array/core.py:4806: PerformanceWarning: Increasing number of chunks by factor of 15
  result = blockwise(
/g/data/xv83/dbi599/miniconda3/envs/icclim/lib/python3.10/site-packages/dask/array/core.py:4806: PerformanceWarning: Increasing number of chunks by factor of 15
  result = blockwise(
/g/data/xv83/dbi599/miniconda3/envs/icclim/lib/python3.10/site-packages/dask/array/core.py:4806: PerformanceWarning: Increasing number of chunks by factor of 15
  result = blockwise(
/g/data/xv83/dbi599/miniconda3/envs/icclim/lib/python3.10/site-packages/dask/array/core.py:4806: PerformanceWarning: Increasing number of chunks by factor of 15
  result = blockwise(
/g/data/xv83/dbi599/miniconda3/envs/icclim/lib/python3.10/site-packages/dask/array/core.py:4806: PerformanceWarning: Increasing number of chunks by factor of 15
  result = blockwise(
/g/data/xv83/dbi599/miniconda3/envs/icclim/lib/python3.10/site-packages/dask/array/core.py:4806: PerformanceWarning: Increasing number of chunks by factor of 15
  result = blockwise(
/g/data/xv83/dbi599/miniconda3/envs/icclim/lib/python3.10/site-packages/dask/array/core.py:4806: PerformanceWarning: Increasing number of chunks by factor of 15
  result = blockwise(
/g/data/xv83/dbi599/miniconda3/envs/icclim/lib/python3.10/site-packages/dask/array/core.py:4806: PerformanceWarning: Increasing number of chunks by factor of 15
  result = blockwise(
/g/data/xv83/dbi599/miniconda3/envs/icclim/lib/python3.10/site-packages/dask/array/core.py:4806: PerformanceWarning: Increasing number of chunks by factor of 15
  result = blockwise(
/g/data/xv83/dbi599/miniconda3/envs/icclim/lib/python3.10/site-packages/dask/array/core.py:4806: PerformanceWarning: Increasing number of chunks by factor of 15
  result = blockwise(
/g/data/xv83/dbi599/miniconda3/envs/icclim/lib/python3.10/site-packages/dask/array/core.py:4806: PerformanceWarning: Increasing number of chunks by factor of 15
  result = blockwise(
/g/data/xv83/dbi599/miniconda3/envs/icclim/lib/python3.10/site-packages/dask/array/core.py:4806: PerformanceWarning: Increasing number of chunks by factor of 15
  result = blockwise(
/g/data/xv83/dbi599/miniconda3/envs/icclim/lib/python3.10/site-packages/dask/array/core.py:4806: PerformanceWarning: Increasing number of chunks by factor of 15
  result = blockwise(
/g/data/xv83/dbi599/miniconda3/envs/icclim/lib/python3.10/site-packages/dask/array/core.py:4806: PerformanceWarning: Increasing number of chunks by factor of 15
  result = blockwise(
/g/data/xv83/dbi599/miniconda3/envs/icclim/lib/python3.10/site-packages/dask/array/core.py:4806: PerformanceWarning: Increasing number of chunks by factor of 15
  result = blockwise(
/g/data/xv83/dbi599/miniconda3/envs/icclim/lib/python3.10/site-packages/dask/array/core.py:4806: PerformanceWarning: Increasing number of chunks by factor of 15
  result = blockwise(
/g/data/xv83/dbi599/miniconda3/envs/icclim/lib/python3.10/site-packages/dask/array/core.py:4806: PerformanceWarning: Increasing number of chunks by factor of 15
  result = blockwise(
/g/data/xv83/dbi599/miniconda3/envs/icclim/lib/python3.10/site-packages/dask/array/core.py:4806: PerformanceWarning: Increasing number of chunks by factor of 15
  result = blockwise(
/g/data/xv83/dbi599/miniconda3/envs/icclim/lib/python3.10/site-packages/dask/array/core.py:4806: PerformanceWarning: Increasing number of chunks by factor of 15
  result = blockwise(
/g/data/xv83/dbi599/miniconda3/envs/icclim/lib/python3.10/site-packages/dask/array/core.py:4806: PerformanceWarning: Increasing number of chunks by factor of 15
  result = blockwise(
/g/data/xv83/dbi599/miniconda3/envs/icclim/lib/python3.10/site-packages/dask/array/core.py:4806: PerformanceWarning: Increasing number of chunks by factor of 15
  result = blockwise(
/g/data/xv83/dbi599/miniconda3/envs/icclim/lib/python3.10/site-packages/dask/array/core.py:4806: PerformanceWarning: Increasing number of chunks by factor of 15
  result = blockwise(
/g/data/xv83/dbi599/miniconda3/envs/icclim/lib/python3.10/site-packages/dask/array/core.py:4806: PerformanceWarning: Increasing number of chunks by factor of 15
  result = blockwise(
/g/data/xv83/dbi599/miniconda3/envs/icclim/lib/python3.10/site-packages/dask/array/core.py:4806: PerformanceWarning: Increasing number of chunks by factor of 15
  result = blockwise(
/g/data/xv83/dbi599/miniconda3/envs/icclim/lib/python3.10/site-packages/dask/array/core.py:4806: PerformanceWarning: Increasing number of chunks by factor of 15
  result = blockwise(
/g/data/xv83/dbi599/miniconda3/envs/icclim/lib/python3.10/site-packages/dask/array/core.py:4806: PerformanceWarning: Increasing number of chunks by factor of 15
  result = blockwise(
/g/data/xv83/dbi599/miniconda3/envs/icclim/lib/python3.10/site-packages/dask/array/core.py:4806: PerformanceWarning: Increasing number of chunks by factor of 15
  result = blockwise(
/g/data/xv83/dbi599/miniconda3/envs/icclim/lib/python3.10/site-packages/dask/array/core.py:4806: PerformanceWarning: Increasing number of chunks by factor of 15
  result = blockwise(
/g/data/xv83/dbi599/miniconda3/envs/icclim/lib/python3.10/site-packages/dask/array/core.py:4806: PerformanceWarning: Increasing number of chunks by factor of 15
  result = blockwise(
/g/data/xv83/dbi599/miniconda3/envs/icclim/lib/python3.10/site-packages/dask/array/core.py:4806: PerformanceWarning: Increasing number of chunks by factor of 15
  result = blockwise(
=>> PBS: job killed: walltime 172826 exceeded limit 172800
@DamienIrving
Copy link
Member

Thanks, @ngben. I'll take a look.

The --base_period calculations successfully complete (notwithstanding #17) on a smaller spatial domain (i.e. as opposed to the whole of Australia at 5km), so the problem is just with scaling up to a bigger grid.

@DamienIrving
Copy link
Member

DamienIrving commented Mar 15, 2023

@ngben I couldn't find any dask cluster configurations that would solve the --base_period issue (I think the dask task graph just becomes way to complicated when the base period option is used) so I've added a --nslices option which slices the input dataset along the longitude axis and processes each slice one after the other in a simple loop (before putting everything back together again at the end). It's not the most elegant solution (the whole point of dask is to avoid looping) and it takes quite a few hours to process the whole AGCD grid if you use a large number of slices (I used 200 in a successful example run), but it does successfully run which is the main thing.

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

Successfully merging a pull request may close this issue.

2 participants