Fixing the clock speed of the CPUs on Fritz
On Fritz, "Turbo Mode" is enabled, which means that the CPUs can decide (within certain limits) to boost their own clock speed beyond the "base clock speed" of 2.4 GHz. This is good for performance but bad for benchmarking since it introduces an element of variation. Also, the maximum clock speed depends on the number of cores you use on a socket.
In order to fix the clock speed when running an OpenMP program, you have to use the srun command to start it, together with an option specifying a minimum and a maximum frequency:
$ OMP_NUM_THREADS=4 srun --cpu-freq=2000000-2000000:performance ./a.out
This will set the clock speed to a fixed 2.0 GHz. Weirdly, this has to be specified in kHz (!). The frequency will be reset to "Turbo" as soon as the program terminates. Currently there is unfortunately no simple way to fix the clock frequency for MPI programs.
The clock speed on the Intel Ice Lake CPUs in Fritz can be set to values between 1.2 GHz and 2.4 GHz in steps of 100 MHz. If you do not fix the frequency, it can go up to 3.1-3.5 GHz depending on how many cores are active, chip temperature, and manufacturing variations.