Skip to content

Don't use MPI_THREAD_SINGLE in a case statement #121

Open
@eschnett

Description

@eschnett

Several examples in the EXAMPLE subdirectories use MPI constants such as MPI_THREAD_SINGLE in C case statements. This leads to compiler errors with certain MPI implementations.

I have written a forwarding MPI implementation MPItrampoline. In this implementation, MPI constants such as MPI_THREAD_SINGLE are regular integer constants and are not known at compile time. Consequently, they cannot be used in a C case statement. (The MPI standard 4.0 lists in section 2.5.4 which MPI constants can be used in case statements.)

Could you change you code to use if statements instead of a switch statement? I will open a pull request for this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions