Skip to main content

Optimization time: local machine vs computer cluster



1 comment

  • Mario Ruthmair
    Gurobi Staff Gurobi Staff

    Hi Pedro,

    You have to tell both Slurm and Gurobi how many threads you want to use. For Slurm it is important to know how many threads a job will use to ensure a correct resource scheduling for all jobs in the queue. But this does not change any physical information on the server machine itself. Gurobi still sees 32 cores and will use them. This can potentially conflict with other jobs on that machine and therefore its performance is not reliable anymore. You can tell Gurobi how many threads you want to use by setting parameter Threads.

    Note the difference between CPUs, cores, and threads. Your local machine has 1 CPU, 4 cores, and 8 threads. The server seems to be a 2-socket machine, since the Xeon Gold 5218 has 16 physical cores, and 32 threads. In your case, there might be 2 Xeons installed having in total 32 physical cores. Potentially, there might be 64 threads but Hyperthreading might be disabled in your system (which makes sense in HPC clusters). Additionally, Gurobi uses by default "only" up to 32 threads.

    Keeping this in mind, you could repeat your performance benchmark with the Threads parameter set. This might lead to more intuitive results.

    Best regards,


Please sign in to leave a comment.