Unnecessary slowness in build system.

Hi Ryan,

I am not sure if this is due to running on another computer, or upgrading from version 1.7.1 to 1.7.3, but the build system is now very slow indeed. Even make clean takes surprisingly long - it takes 14 minutes the second time you run it (i.e. when there is nothing to clean).

I looked with “ps x” what was going on, and it looks like the build system is spending most of its time doing

icc —version 2>&1
icpc —version 2>&1
ifort —version 2>&1

It looks like it runs these three commands hundreds of times when I do "make clean”. Perhaps most make targets do this as a sanity check, and then when make targets are chained this is repeated almost endlessly.

Best regards


A follow-up: Testing the version of icc is much slower than gcc (350 ms versus 7 ms), this may explain why this hits me so badly.

I tried disabling the sanity checks by replacing build_system/Makefile.SanityCheck with an empty file. Here are my results:

make add-OpenKIM

4 min 0 sec versus 13 min 9 sec
(in both cases it failed due to the afore-mentioned missing model, and no drivers were downloaded)

make clean (with 188 models, no model drivers, none of them compiled).

14 sec versus 6 min 19 sec OUCH !!!

Editing Makefile.SanityCheck to skip the tests of the compiler versions but test everything else gives a time of 19 sec (patch attached). It is thus the compiler version checks that kill performance.

Best regards


OpenKIM-173-no-intel-slowness.patch (685 Bytes)

Hi Jakob,

Thanks for the detective work. I put an "include guard" around the sanity checks and this eliminates all but the first invocation. So, I think this will help your timing quite a bit. This and other improvements will be in the next release. (However, I've already pushed them to the 'devel' branch on github.)

Now, another thought comes to mind....

It might be more efficient for you to split the compilation process so it can be done in parallel. This would involve (in sequence)

1. Compile and install the kim-api package without any models/model drivers

2. Get the Model Drivers and separately compile and install each (can be done in parallel)

3. Get the Models and separately compile and install each (can be done in parallel)

For this approach you would need to use your scripts (or the equivalent wget commands found in the Makefile under the add-OpenKIM rule.), but it should dramatically reduce the wall-clock time for compiling everything...