Hyperthreaded(HT) and simultaneous multithreaded (SMT) processors are now available in commodity workstations and servers. This technology is designed to increase throughput by executing multiple concurrent threads on a single physical processor. These multiple threads share the processor's functional units and on-chip memory hierarchy in an attempt to make better use of idle resources. This work focuses on tuning the behavior of OpenMP applications executing on SMPs with SMT processors. We propose a self-tuning OpenMP loop scheduler designed to react to behavior caused by inter-thread data locality, instruction mix and SMT-related load imbalance. This adaptive loop scheduler automatically selects the number of threads that should be used for each parallel loop and a good scheduling policy for the iterations. It is shown that this scheduler outperforms all other OpenMP schedulers, and because it can dynamically select the number of threads to use for each region, it even outperfo...