According to this guide, one needs to include
use omp_lib to enable openmp functionality. However, if I compile with
ifort -qopenmp my code executes fine and I get the expected speed up, regardless if
use omp_lib is used or not.
So what does
use omp_lib do and should I include this line?
omp_lib is a module like any other. In general they contain constants, variables, type definitions and either module procedures (subroutines/functions) or interfaces to external procedures.
use brings all those names of those entities into the accessible namespace. It does not affect the basic OpenMP functionality and directives at all.
What exactly do these particular modules bring can be found either in the OpenMP official specification documents or in the documentation of a particular OpenMP library, e.g. the GCC's one 9.3 OpenMP Modules OMP_LIB and OMP_LIB_KINDS. They indeed give you access to various named constants, derived types and functions and subroutines.