OpenMP Environment and Runtime Library

  • For controlling execution
    • Needed for tuning, but may limit portability
    • Control through environment variables or runtime library calls
      • Runtime library takes precedence in conflict
  • OMP_NUM_THREADS: How many to use in parallel region
    • OMP_GET_NUM_THREADS, OMP_SET_NUM_THREADS
    • Related: OMP_GET_THREAD_NUM, OMP_GET_MAX_THREADS, OMP_GET_NUM_PROCS
  • OMP_DYNAMIC: Should runtime system choose number of threads?
    • OMP_GET_NESTED, OMP_SET_DYNAMIC
  • OMP_NESTED: Should nested parallel regions be supported?
    • OMP_GET_NESTED, OMP_SET_NESTED
  • OMP_SCHEDULE: Choose DO scheduling option
    • Used by RUNTIME clause
  • OMP_IN_PARALLEL: Is the program in a parallel region?