Performance issues when using OpenKim on Fedora 35 wrt to LAMMPS


I recently got hooked in OpenKim as a LAMMPS user. I had no problem installing it on my Arch Linux laptop and it runs fine. However, on my Fedora laptop (an MSI which is more powerful), this is not the case.

I actually could install openkim-models and kim-api packages from the fedora repository on my system. I also compiled LAMMPS using the cmake procedure which found KIM-api. Yet when using a MEAM model on a 4000 atoms crystal systems I got an unusually long simulation time for a single equilibration when calling it through the kim command. I compared it with the MEAM pair style of LAMMPS which run fine with the same input files and gives same results (1m28 on 8 cpus for 2 minimizations with 0 tolerance for the energy and forces, one including pressure equilibration). The OpenKim implementation takes 7mn. Does the api or any part of the code need to be compiled with mpi? Should I install it from source? The simulation script are rather standard and I got no error so that’s why I did not provide them but I can obviously provide them if needed.

Since the LAMMPS version works with regular speed and input files, and since the OpenKim implementation I used was installed system wide through the repository of Fedora, I prefer to ask this question here than on the LAMMPS forum.

Best regards,

Hi Germain,

Thanks for your message. The thing that comes to mind based on your description is the possibility that the kim-api was built in “Debug” mode. When that is the case there is a massive amount of logging information sent to the kim.log file and all that i/o makes the calculations very slow.

However, the Fedora system installed kim-api should not be a Debug mode version. So, I don’t know what else it might be.

Could you provide some additional details about your Fedora system and take a look at your kim.log file. Is it massive in size or quite small? If it’s small posting it here might be helpful.


Hi @relliott,

The kim.log file is actually quite small. I’ll put a copy here: kim.log (4.9 KB)
Also the version of the kim-api in the repository of Fedora seems to be 2.2.1+GNU.GNU.GNU (from the kim-api-collection-management --version command).

I downloaded it using dnf[1] to install packages kim-api and kim-api-devel. The package details can be found here:
If you know any file that could give us the compilation options I would gladly share it.

On the other hand I did the test with a single CPU and I still have a 7 factor slower using kim[2] so I also suspect it is not an mpi related issue.

[1] Note that on your website, the command line for Fedora and CentOS related OS is still using yum. Since Fedora 18 dnf has been introduced as a wrapper than has a better dependencies management and is overall more efficient.

[2] 15s vs 1mn18 for a less restrictive minimization, results are the same

@Germain, Hi, could you share your input file or a simple input file for us to try as well? I have made a couple of performance comparisons on different architectures and using different compilers (using in-house clusters and Stampede cluster (TAC)). In general, the MEAM implementation in KIM is more efficient than the one in LAMMPS (from small to a large number of processors). So I am curious to figure out the reason for this performance issue.

Hi @yafshar ,

Here is a small archive with both of my directories to create a small crystal followed by a 0K - 1bar NPT minimization: Copper_test.tar.gz (75.2 KB)

I also provide the meam files from the Kim model in the equil_0K directory. Commented lines are the regular LAMMPS equivalent input.

I am glad to know that Kim’s implementation is faster than LAMMPS in the general case. I hope to solve this issue then. But again, I think this might be related to compiling/installing more than proper implementation of the models.

Ideally I should check using other software like conda or directly build from source to narrow the problem (it might be a compiling option or related to my system) but that needs rebuilding LAMMPS each time and I don’t have time today. I might try that tomorrow or later in the evening.

Thanks! I’ve updated our webpage.

@Germain Hi, I am unable to reproduce the performance issue. I used your code on three different systems, macOS, Centos, and UBUNTU (I do not have access to Fedora), and used the binary installation from conda on macOS & UBUNTU and building from source on Centos. In all of the systems, the performance is comparable or even better using the KIM model.

For example, on macOS 2.3 GHz 8-Core Intel Core i9

Loop time of 4.80863 on 1 procs for 50 steps with 4000 atoms (KIM)
Loop time of 5.05371 on 1 procs for 50 steps with 4000 atoms (LAMMPS)

I try to find a machine with Fedora and see if I can find out the issue.

Hi everyone,

thanks for the time you dedicated on this issue. I finally tried to build OpenKim system wide from sources. I also apparently struggled with linking file correctly[1] but now it works fine with LAMMPS and the kim-api utilities.

I got similar results at @yafshar with Fedora 35 on 1 CPU (i7-6700HQ CPU 2.60GHz x 8 cores). This still points me toward some possible error in the dnf package compilation but since my installation appears to be running correctly, I might not change it any more.

If I can still be of help on this issue please tell me.

[1] Wrt to default settings, I had to move it in /usr/lib64 directory (initially it was in /usr/local/lib64 and ldconfig did not find it for som reason, this might also be due to me not knowing how to properly indicate the directory to install the lib or where to look for.