Skip to content

Circular include in ParallelDispatch.h can cause include order compiler failure in OPALX #602

Description

@aliemen

On current IPPL master, including Manager/datatypes.h without first including Ippl.h fails with errors such as:

HaloCells.hpp:258: error: no template named 'RangePolicy'
HaloCells.hpp:262: error: no member named 'parallel_for' in namespace 'ippl'

ParallelDispatch.h includes Ippl.h, while Ippl.h includes ParallelDispatch.h and then IpplCore.h. This cycle allows HaloCells.hpp to be parsed before ippl::RangePolicy and ippl::parallel_for are declared. Headers should compile independently of whether Ippl.h was included first. Removing the Ippl.h dependency from ParallelDispatch.h, or otherwise breaking the cycle, should resolve the issue.

This include chain lead to a compiler error in OPALX. In can also be circumvented in OPALX by including Ippl.h first, but the "cleaner" fix would be here in IPPL.

Activity

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

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions