Skip to content

Redundant copies of scalars in OpenACC parallel directive #1

@fspiga

Description

@fspiga

https://github.com/QEF/qe_test_openacc/blob/phonon_gpu_develop/PHonon/PH/dvqpsi_us.f90#L141

In both OpenACC parallel and kernel directives it is not needed to do copyin/copyout/create (any data clause actually) for scalars. Scalars are passed to the GPu kernel generated by the compiler as parameters of the kernel function call. Forcing them with copyin/copyout results is extra unnecessary data movement.

This:

copyin(fact, u1, u2, u3, gu0)

can be purged.

Similar here

!$acc parallel loop private(itmp,gtau,gu) present(eigts1, eigts2, eigts3, g, mill,drhoc) copyin(u1,u2,u3,drc,fact,mu,gu0)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions