Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Best practices for OpenMP #14

Open
lucaparisi91 opened this issue Jul 15, 2024 · 1 comment
Open

Best practices for OpenMP #14

lucaparisi91 opened this issue Jul 15, 2024 · 1 comment

Comments

@lucaparisi91
Copy link
Collaborator

lucaparisi91 commented Jul 15, 2024

  • Use all the directives ( teams ( more than 1 SIMD processor ) , parallel ( use more than one thread. For the Cray fortran compiler you also need the SIMD directive [ to check on Archer2 ] )
  • make sure to have enough parallelism ( O(1000) iterations )
  • combine teams distribute parallel for if possible. Increasingly difficult if not in the same function and not inline, and difficult to use if in different compilation unites.
  • use environment variables to track data movement ( CRAY_ACC_DEBUG, NVCOMPILER_ACC_NOTIFY , GOMP_DEBUG, LIBOMP_TARGET_INFO, -Minfo=mp,accel , -Rpass=openmp-opt )
  • prefers firstprivate for scalar variable( usually sent as a kernel parameter ), private will endup in global or local memory
  • merge parallel regions
  • use tasks and dependencies
  • use omp assumptions ( 5.1 )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant