Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Benchmark CESM2 LENS access from AWS origin

Access AWS CESM2 using the AWS open data origin data and benchmark

Create a Dask cluster

Select the Dask cluster type

The default will be LocalCluster as that can run on any system.

If running on a HPC computer with a PBS Scheduler, set to True. Otherwise, set to False.

If running on Jupyter server with Dask Gateway configured, set to True. Otherwise, set to False.

Python function for a PBS cluster
Python function for a Gateway Cluster
Python function for a Local Cluster

This uses True/False boolean logic based on the variables set in the previous cells

Python logic to select the Dask Cluster type
Loading...

Access the data from the AWS bucket using intake

Loading...
array(['osdf:///aws-opendata/us-west-2/ncar-cesm2-lens/atm/daily/cesm2LE-historical-cmip6-FLNS.zarr', 'osdf:///aws-opendata/us-west-2/ncar-cesm2-lens/atm/daily/cesm2LE-historical-cmip6-FLNSC.zarr', 'osdf:///aws-opendata/us-west-2/ncar-cesm2-lens/atm/daily/cesm2LE-historical-cmip6-FLUT.zarr', 'osdf:///aws-opendata/us-west-2/ncar-cesm2-lens/atm/daily/cesm2LE-historical-cmip6-FSNS.zarr', 'osdf:///aws-opendata/us-west-2/ncar-cesm2-lens/atm/daily/cesm2LE-historical-cmip6-FSNSC.zarr'], dtype=object)
array(['s3://ncar-cesm2-lens/atm/daily/cesm2LE-historical-cmip6-FLNS.zarr', 's3://ncar-cesm2-lens/atm/daily/cesm2LE-historical-cmip6-FLNSC.zarr', 's3://ncar-cesm2-lens/atm/daily/cesm2LE-historical-cmip6-FLUT.zarr', 's3://ncar-cesm2-lens/atm/daily/cesm2LE-historical-cmip6-FSNS.zarr', 's3://ncar-cesm2-lens/atm/daily/cesm2LE-historical-cmip6-FSNSC.zarr'], dtype=object)
Loading...

--> The keys in the returned dictionary of datasets are constructed as follows:
	'component.experiment.frequency.forcing_variant'
Loading...
Loading...

Data Access Speed tests

  • We will now test how long it takes to access data (via OSDF) for various sizes using one of the above arrays

Prepare data subsets

Loading...
Loading...

Now access data and plot

 Finished processing dataset 1 in 1 th call
 Finished processing dataset 1 in 2 th call
 Finished processing dataset 1 in 3 th call
 Finished processing dataset 1 in 4 th call
 Finished processing dataset 1 in 5 th call
 Finished processing dataset 2 in 1 th call
 Finished processing dataset 2 in 2 th call
 Finished processing dataset 2 in 3 th call
2024-11-13 13:43:35,946 - distributed.worker - ERROR - Failed to communicate with scheduler during heartbeat.
Traceback (most recent call last):
  File "/glade/work/harshah/conda-envs/arco_experiments/lib/python3.12/site-packages/distributed/comm/tcp.py", line 225, in read
    frames_nosplit_nbytes_bin = await stream.read_bytes(fmt_size)
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tornado.iostream.StreamClosedError: Stream is closed

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/glade/work/harshah/conda-envs/arco_experiments/lib/python3.12/site-packages/distributed/worker.py", line 1250, in heartbeat
    response = await retry_operation(
               ^^^^^^^^^^^^^^^^^^^^^^
  File "/glade/work/harshah/conda-envs/arco_experiments/lib/python3.12/site-packages/distributed/utils_comm.py", line 459, in retry_operation
    return await retry(
           ^^^^^^^^^^^^
  File "/glade/work/harshah/conda-envs/arco_experiments/lib/python3.12/site-packages/distributed/utils_comm.py", line 438, in retry
    return await coro()
           ^^^^^^^^^^^^
  File "/glade/work/harshah/conda-envs/arco_experiments/lib/python3.12/site-packages/distributed/core.py", line 1398, in send_recv_from_rpc
    return await send_recv(comm=comm, op=key, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/glade/work/harshah/conda-envs/arco_experiments/lib/python3.12/site-packages/distributed/core.py", line 1157, in send_recv
    response = await comm.read(deserializers=deserializers)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/glade/work/harshah/conda-envs/arco_experiments/lib/python3.12/site-packages/distributed/comm/tcp.py", line 236, in read
    convert_stream_closed_error(self, e)
  File "/glade/work/harshah/conda-envs/arco_experiments/lib/python3.12/site-packages/distributed/comm/tcp.py", line 142, in convert_stream_closed_error
    raise CommClosedError(f"in {obj}: {exc}") from exc
distributed.comm.core.CommClosedError: in <TCP (closed) ConnectionPool.heartbeat_worker local=tcp://127.0.0.1:49756 remote=tcp://127.0.0.1:43357>: Stream is closed
2024-11-13 13:43:35,949 - distributed.worker - ERROR - Failed to communicate with scheduler during heartbeat.
Traceback (most recent call last):
  File "/glade/work/harshah/conda-envs/arco_experiments/lib/python3.12/site-packages/distributed/comm/tcp.py", line 225, in read
    frames_nosplit_nbytes_bin = await stream.read_bytes(fmt_size)
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tornado.iostream.StreamClosedError: Stream is closed

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/glade/work/harshah/conda-envs/arco_experiments/lib/python3.12/site-packages/distributed/worker.py", line 1250, in heartbeat
    response = await retry_operation(
               ^^^^^^^^^^^^^^^^^^^^^^
  File "/glade/work/harshah/conda-envs/arco_experiments/lib/python3.12/site-packages/distributed/utils_comm.py", line 459, in retry_operation
    return await retry(
           ^^^^^^^^^^^^
  File "/glade/work/harshah/conda-envs/arco_experiments/lib/python3.12/site-packages/distributed/utils_comm.py", line 438, in retry
    return await coro()
           ^^^^^^^^^^^^
  File "/glade/work/harshah/conda-envs/arco_experiments/lib/python3.12/site-packages/distributed/core.py", line 1398, in send_recv_from_rpc
    return await send_recv(comm=comm, op=key, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/glade/work/harshah/conda-envs/arco_experiments/lib/python3.12/site-packages/distributed/core.py", line 1157, in send_recv
    response = await comm.read(deserializers=deserializers)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/glade/work/harshah/conda-envs/arco_experiments/lib/python3.12/site-packages/distributed/comm/tcp.py", line 236, in read
    convert_stream_closed_error(self, e)
  File "/glade/work/harshah/conda-envs/arco_experiments/lib/python3.12/site-packages/distributed/comm/tcp.py", line 142, in convert_stream_closed_error
    raise CommClosedError(f"in {obj}: {exc}") from exc
distributed.comm.core.CommClosedError: in <TCP (closed) ConnectionPool.heartbeat_worker local=tcp://127.0.0.1:49764 remote=tcp://127.0.0.1:43357>: Stream is closed
 Finished processing dataset 2 in 4 th call
 Finished processing dataset 2 in 5 th call
 Finished processing dataset 3 in 1 th call
 Finished processing dataset 3 in 2 th call
 Finished processing dataset 3 in 3 th call
 Finished processing dataset 3 in 4 th call
 Finished processing dataset 3 in 5 th call
 Finished processing dataset 4 in 1 th call
 Finished processing dataset 4 in 2 th call
 Finished processing dataset 4 in 3 th call
 Finished processing dataset 4 in 4 th call
 Finished processing dataset 4 in 5 th call
 Finished processing dataset 5 in 1 th call
 Finished processing dataset 5 in 2 th call
 Finished processing dataset 5 in 3 th call
 Finished processing dataset 5 in 4 th call
 Finished processing dataset 5 in 5 th call
 Finished processing dataset 1 in 1 th call
 Finished processing dataset 1 in 2 th call
 Finished processing dataset 1 in 3 th call
 Finished processing dataset 1 in 4 th call
 Finished processing dataset 1 in 5 th call
 Finished processing dataset 2 in 1 th call
 Finished processing dataset 2 in 2 th call
 Finished processing dataset 2 in 3 th call
 Finished processing dataset 2 in 4 th call
 Finished processing dataset 2 in 5 th call
 Finished processing dataset 3 in 1 th call
 Finished processing dataset 3 in 2 th call
 Finished processing dataset 3 in 3 th call
 Finished processing dataset 3 in 4 th call
 Finished processing dataset 3 in 5 th call
 Finished processing dataset 4 in 1 th call
 Finished processing dataset 4 in 2 th call
 Finished processing dataset 4 in 3 th call
 Finished processing dataset 4 in 4 th call
 Finished processing dataset 4 in 5 th call
 Finished processing dataset 5 in 1 th call
 Finished processing dataset 5 in 2 th call
 Finished processing dataset 5 in 3 th call
 Finished processing dataset 5 in 4 th call
 Finished processing dataset 5 in 5 th call
Loading...
/glade/derecho/scratch/harshah/tmp/ipykernel_13477/2772681286.py:15: FutureWarning: The default of observed=False is deprecated and will be changed to True in a future version of pandas. Pass observed=False to retain current behavior or observed=True to adopt the future default and silence this warning.
  subsequent_access_avg = subsequent_access.groupby('dataset_size')['MBps'].mean()
<Figure size 1000x600 with 1 Axes>
<Figure size 1200x600 with 1 Axes>
[0.0009918212890625, 1.0546875, 10.125, 101.25, 1025.15625]