For licensing purposes, Gurobi always aims to count physical cores. To do this, the operating system is queried for the number of physical and logical cores.
Gurobi license files always contain the (maximal) number of (physical) cores for which they are valid. (For reasons of backward-compatibility, they also contain the number of sockets if it is greater than 1.)
On Virtual Machines
On virtual machines, the number of physical cores is more difficult to obtain, since VMs typically hide the difference between physical and logical cores.
In a properly configured VM with hyper-threading, a total number of 16 logical cores would be counted as 8 physical cores. To check how many physical cores are measured by Gurobi, you can download and install Gurobi and use the grbprobe utility.
On Gurobi Instant Cloud
AWS and Azure machine specifications in the Cloud Manager show the number of physical cores.
Note that the specifications on the AWS and Azure website may list logical cores (e.g. as "vCPU" on AWS). For all available AWS instance types on Instant Cloud, the number of physical cores is half the number of logical cores. However, there are machines on Azure (such as the H-series, e.g. H16m) where hyper-threading is turned off, and physical cores are equal to logical cores.
- How do I configure an AWS EC2 instance so the license file remains valid?
- What system changes can invalidate a license file?
- How do I resolve an "ERROR 10009: License is for 8 cores, machine has XX"?