Question about using quip in lammps

Dear all
I try to use quip potential in my simulations. Then I downloaded the latest stable version of lammps and try to reproduce the results in ./examples/PACKAGES/quip/in.gap. But when I try to run the simulations, an error happened:

Reading QUIP potential file gap_example.xml with DATE: 2015-02-20
SYSTEM ABORT: Database was created with a later version of the code.Version of code used to generate the database is 1423607965.Version of current code is 0. Please update your code.
STOP 1
SYSTEM ABORT: Database was created with a later version of the code.Version of code used to generate the database is 1423607965.Version of current code is 0. Please update your code.

The error seems to point out that my compiled quip is too new for the example problem in the lammps file. Would you like to give me some advice on how to solve this problem?

Thanks very much and I appreciate your help.

Cheers!

Hao

I have no problem using pair style quip and the example you are referring to.

The error message comes from within libAtoms, so it is more likely one of the following that happened:

  • your compilation of libAtoms and related libraries was not done correctly
  • your fortran compiler is broken
  • your xml potential file is corrupted

In order to further investigate you need to provide more information:

  • what version of LAMMPS exactly are you using?
  • how did you obtain it?
  • how exactly did you compile LAMMPS and how libAtom/GAP/quip?
  • what compilers did you use and which platform are you compiling and running on?
  • please provide MD5 sums of all files in example folder so we can confirm that none of them are corrupted

Thanks very much, Professor. Here I uploaded the files I used. These files are exactly the files provided in the /examples/PACKAGES/quip/.

The platform we use is centos
The lammps version is: lammps-2Aug2023
The fortran compiler is intel2021 gcc10.1.0
We compile lammps using the following command: make intel_cpu_intelmpi
We compile quip using the following command: quip arch=Linux_x86_64_gfortran
make libquip

The error is the output.4667805

Thanks again for your help and I really appreciate it.

Cheers!

Hao

in.gap (367 Bytes)
data_gap (2.5 KB)
gap_example.xml (54.4 KB)

output.4667805 (6.9 KB)

Your output says: LAMMPS (23 Jun 2022)

No, you are using gfortran

I don’t understand what this means.

Also, your output says:

Compiler gcc-11.2.0 loaded.
Loading compiler/gcc/11.2.0

Recent GCC and Intel compilers are comparable in terms of performance, so you should avoid using the intel compiler for better consistency.

Your output says: LAMMPS (23 Jun 2022)

My mistake, I used the example file from lammps-2Aug2023 but still compiled with LAMMPS(23 Jun 2022).

Yes, I used gfortran. Should I change to GCC?

I need to recompile the lammps with GCC.

Thanks very much.
Hao

I have nothing to add to my previous post and unless you can provide a complete and correct and consistent description and confirmation for how you built libAtoms (with GAP support!) there is little that can be done from the outside.

Dear Hao
Hello, may I ask if the above issue has been resolved? If it has already been resolved, would it be convenient for you to inform them of the solution? I also encountered this issue when using the example provided on the QUIP official website, SYSTEM ABORT: Database was created with a later version of the code Version of code used to generate the database is 1496137870. Version of current code is 0 Please update your code STOP 1. Thank you very much for your help.
sincerely
rookie

The examples bundled with LAMMPS can be run without problems if a) LAMMPS is version 7 Feb 2024 and b) LAMMPS is compiled using CMake and c) quip is downloaded and compiled automatically during the build (in contrast to building it separately and telling LAMMPS where to find it).

I used an older version of lammps in 2023. It works now. But honestly, I don’t know why it happens when I use the latest version. I think the compiler I use is wrong as Axel said. You may try using the same compiler Axel suggested, and it should work.

The version of LAMMPS I am using is (2 Aug 2023- Update 2). which version I need to adjust to

The lammps version I use is lammps-23Jun2022. You can try it and see what happens.

Unfortunately, the error still occurred, even though I changed the lambps to the 2022 version.maybe the compiler i use is still wrong.

No, I already mentioned that you should be using the 7 Feb 2024 version of LAMMPS, you should compile LAMMPS using CMake (not the traditional make), and you should not compile a standalone QUIP library, but let CMake download and compile it during the build.

There are multiple issues at hand here that needed some adjustments:

  • the QUIP library code uses some code constructs that are non-standard, deprecated and were removed from from recent GNU Fortran compiler versions when trying to compile with flags that signal compliance with Fortran standard. Thus the quip library must be compiled with a permissive -fstd=gnu setting. However, by default LAMMPS will compile Fortran sources with -fstd=2003 since we want to make certain that the compiler errors out when some non-standard code is added. There are some adjustments to the CMake scripting to revert this setting if QUIP is compiled
  • the QUIP library code use some large local memory allocations during the declaration of variables instead of making them ALLOCATABLE and use ALLOCATE. This normally would allocate these arrays on the stack, but on most Linux machines the stack is limited. To address this compilers have a threshold after which the allocation is converted to a dynamic allocation using the heap instead of the stack. However, this conflicts with functions and subroutines declared as recursive leading to memory corruption which is the origin of the errors you see.
  • the QUIP library does not have releases but follow a “continuous release” approach, which means that you always use the latest version of their sources. This however has the consequence that if there are changes in the QUIP library that trigger issues like those mentioned above, they are not known by older versions of LAMMPS since they require implementing workarounds on the LAMMPS side and the documentation does not “know” about them either.
  • Since you can tell these issues only after running some input, they are not usually detected by the automated testing of LAMMPS and thus issues can go unnoticed for a while until somebody alerts us to them and we figure out a workaround and implement it in LAMMPS. Currently the 7 Feb 2024 release is the only version that handles all known issues. The next update to the stable release will contain them as well but the release date for that one has not yet been decided on

Thanks very much.

I have successfully utilized the GAP potential. It turns out that by modifying the version in the GAP potential XML file to 0, it can be used.

But will it work correctly? Getting code to run without error is different from it producing correct results.
The error looks to be legitimate and your quip library outdated.

As I mentioned now multiple times, if you compile LAMMPS and the quip library the correct way, this will not happen. Now there is not only the 7 Feb 2024 version but also update 3 for the stable 2 Aug 2023 version that has the necessary changes.
I have tested the bundled GAP example in LAMMPS by manually setting the code version to the value you have and there is no error and then setting it to a much larger version and I do get an error:

SYSTEM ABORT: Database was created with a later version of the code.Version of code used to generate the database
is 1796137870.Version of current code is 1686220958. Please update your code.      

So the error message is correct in pointing out that you are using an incompatible version of the quip library. Either it is too old (as indicated) or it is not correctly compiled and thus will result in memory corruption (more likely).

If you want to waste your time running simulations with a likely compromised executable, be my guest, but remember that you have been warned.

I could not generate the libquip file from the make libquip .

Please do not add posts to discussion topics that do not cover your question.
Instead you should create a new topic (and in the LAMMPS Installation category) and provide sufficient details so that people can actually make recommendations. If you post “I could not do” style messages, then the response will have to be “then you probably didn’t follow the instructions in the documentation correctly” and that won’t help you much anyway.

I will now close this topic to prevent further off-topic additions.