Skip to content

Explore interoperability with parallel and lazy computation workflows #4655

Open

Description

@seisman

Here is the reviewer’s comment:

The text mentions pandas, geopandas and xarray - but no mention of dask and the other tools aimed at making these tools suitable for parallel computation (e.g. dask). I assume this is possible but would be useful to add detail.

As far as I know, Dask and Polars are two widely used tools in the Python data ecosystem, but PyGMT compatibility with them has never been formally tested.

PyGMT may already interoperate with Dask-backed DataFrames and DataArrays through its existing support for pandas and xarray objects, but Polars is less likely to work because it uses a different API and data model.

We need to test the current level of interoperability, especially for Dask-backed workflows. Since I‘m not very familiar with these tools, it would be great if @weiji14 could provide some guidance.

Activity

  1. added
    discussions
    on May 25, 2026
  2. weiji14 commented on May 27, 2026

    @weiji14
    Member

    Can we just mention that GMT already uses OpenMP for multi-threading in some modules? Somewhat mentioned at #3994, but I know that it's not good to mix OpenMP multi-threading with Dask's multi-threaded scheduler, or any multi-threading for that matter unless you're super careful to limit the number of cores used (there's a long thread on this - data-apis/array-api#776 (comment)). Mixing OpenMP multi-threading with multi-processing might work in theory, but... it gets complicated (there's a reason #217 is still open 😆)

    Let me think about how to properly respond to that next week (a little swamped with work this week). I'm leaning towards just mentioning GMT's OpenMP usage, but could also expand a bit more on the topic since it's an important one.

    Polars is less likely to work because it uses a different API and data model.

    Polars is arrow-compatible, so the integration work at #2800 might mean it could work in some cases? But haven't tested yet. Might need to handle the Dataframe exchange protocol if not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    discussions

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions