Skip to content

Get DECOMP_2D_COMM_CART_X from decomp_2d_mpi #330

Open

Description

@ia267

From Charles Moulinec:

On my end, I am still playing around X3D2, and found that this small
change might make the code more robust (in decomp_2decompfft.f90):

!!! CM:    use decomp_2d, only: decomp_2d_init, DECOMP_2D_COMM_CART_X, xsize, xstart
!!! CM:    use decomp_2d_mpi, only: nrank, nproc

!!! CM: Changed to
    use decomp_2d_mpi, only: nrank, nproc, DECOMP_2D_COMM_CART_X
    use decomp_2d, only: decomp_2d_init, xsize, xstart

Basically, decomp_2d_mpi is used in decomp_2d, but also contains
DECOMP_2D_COMM_CART_X, so, it is probably best to get this last
variable from the decomp_2d_mpi, where it is defined. If I don't do
this, I get a bug here on my old machine.

Activity

  1. added
    bugSomething isn't working
    on Jul 2, 2026
  2. added theissue type on Jul 2, 2026
  3. self-assigned this
    on Aug 18, 2026
  4. added this to the Version 0.1.0 milestone on Aug 18, 2026
  5. ia267 commented on Aug 20, 2026

    @ia267
    CollaboratorAuthor

    In both v2.0.3.1 and the currently pinned v2.0.3.2:

    • DECOMP_2D_COMM_CART_X is defined directly in decomp_2d - it is not merely re-exported. See decomp_2d.f90.
    • decomp_2d_mpi does not contain that sybmol. It exports nrank, nrpoc and decomp_2d_comm among other MPI utilities. See decomp_2d_mpi.f90

    We need to know which version of 2decomp was causing this.

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions