When a program is run with a job scheduler, the scheduler allocates n processor cores (specified by the user) for the job. When a program using OpenMP runs, OpenMP will in general use OMP_NUM_THREADS threads, which for simplicity we'll say are each mapped to a different processor core.
OpenMP doesn't know anything about which cores were allocated to the program/job by the scheduler (afaik). Also, the OS is the one to actually map the OpenMP threads to cores, not OpenMP.
My question is: what's going on behind the scenes so that the OpenMP threads are only mapped to cores that were allocated to the job by the job scheduler?
I want my question to be general, but if the process is really different across job schedulers, then an LSF-specific answer would be best.