The OMP_NUM_TEAMS environment variable sets the maximum number of teams created by a teams construct by setting the nteams-var ICV.
The value of this environment variable must be a positive integer. The behavior of the program is implementation defined if the requested value of OMP_NUM_TEAMS is greater than the number of teams that an implementation can support, or if the value is not a positive integer.