Skip to content

Threadprivate clause #3198

@RobWatersMet

Description

@RobWatersMet

We've recently changed our parallelism approach with UKCA and are attempting to add omp directives to a high level caller just above the main solver in UKCA.

There is existing omp threadprivate clauses for hoisted arrays in asad_mod.F90

! Variables which should be stored separately on each thread
!$OMP THREADPRIVATE(cdt, cdt_diag, co3, deriv, dpd, dpw, ej, emr,              &
!$OMP               f, fdot, fj, fpsc1, fpsc2, ftilde,                         &
!$OMP               interval, ipa, jsubs,                                      &
!$OMP               lati, linfam, ltrig, modified_map,                         &
!$OMP               ncsteps, ncsteps_factor, p, pd, pmintnd, prk, prod,        &
!$OMP               qa, ratio, rk,                                             &
!$OMP               sh2o, shno3, slos, spfj, sph2o, sphno3,                    &
!$OMP               t, t300, tnd, wp, co2, y, ydot, za)

I don't believe it is currently possible to add these in via psyclone.

Though we can use the existing ones in the short-term, or process the file with --keep-directives, ideally we'd like to have these added in via a transformer. This will help ensure the directives are not mistakenly stripped out in the future and will improve consistency in how omp directives are being applied to UKCA.

There is also critical regions - which I'll make a seperate issue for.

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