Segfault when using MLFF in LAMMPS (might be duplicate)

Queries about input and output files, running specific calculations, etc.


Moderators: Global Moderator, Moderator

Post Reply
Message
Author
maxime_legrand
Newbie
Newbie
Posts: 11
Joined: Wed Oct 23, 2024 11:17 am

Segfault when using MLFF in LAMMPS (might be duplicate)

#1 Post by maxime_legrand » Wed Dec 10, 2025 5:09 pm

Dear developpers,

I recently tried to use a MLFF within LAMMPS and got a segfault. I trained the FF in version 6.4.2 and vaspML is 6.5.0. The FF is refitted. I am trying to run a NVT simulation at 200K with Langevin thermostat, 50ps long and 1fs step.

I tried various combinations of cores (including fewer than 154 - the amount of atoms in my system), none of them worked. The FF file name is ML_FF.

I am novice in LAMMPS so it might simply come from a newbie error in input construction.

Would it be an issue regarding the version of the FF which is older than 6.4.3 (that you recommended to use in a previous post on a similar error) ?

All the files (+ ML_FF header) are attached.

Thanks in advance for your help !

You do not have the required permissions to view the files attached to this post.

jonathan_lahnsteiner2
Global Moderator
Global Moderator
Posts: 300
Joined: Fri Jul 01, 2022 2:17 pm

Re: Segfault when using MLFF in LAMMPS (might be duplicate)

#2 Post by jonathan_lahnsteiner2 » Wed Dec 10, 2025 6:31 pm

Dear Maxime Legrand,

This looks like a bug on our side. Is it maybe possible for you to send us the ML_FF file or the ML_AB file. This would be a lot of help to us because then we would have a reproducer immediately.

All the best Jonathan


maxime_legrand
Newbie
Newbie
Posts: 11
Joined: Wed Oct 23, 2024 11:17 am

Re: Segfault when using MLFF in LAMMPS (might be duplicate)

#3 Post by maxime_legrand » Thu Dec 11, 2025 1:55 pm

Hello there,

Thanks for the quick answer !

You'll find both files in the link below. The ML_AB file only contains snapshots from the same structure taken OTF from NpT runs. Let me know if you need further informations.

https://filesender.renater.fr/?s=downlo ... 56b08f28b7


jonathan_lahnsteiner2
Global Moderator
Global Moderator
Posts: 300
Joined: Fri Jul 01, 2022 2:17 pm

Re: Segfault when using MLFF in LAMMPS (might be duplicate)

#4 Post by jonathan_lahnsteiner2 » Fri Dec 12, 2025 10:02 am

Dear Maxime Legrand,

Thank you for sharing your ML_FF and ML_AB files. I was testing your simulation with VASP 6.5.1. I was not able to reproduce the error you are experiencing. My simulations with the input files you supplied terminated gracefully.
Since you were using VASP 6.5.0 I would recommend to update to the latest VASP version where the error should not occur.

All the Best Jonathan


maxime_legrand
Newbie
Newbie
Posts: 11
Joined: Wed Oct 23, 2024 11:17 am

Re: Segfault when using MLFF in LAMMPS (might be duplicate)

#5 Post by maxime_legrand » Fri Dec 12, 2025 10:07 am

Thanks ! I'll tell you if everything is alright when the vaspML compilation in v6.5.1


jonathan_lahnsteiner2
Global Moderator
Global Moderator
Posts: 300
Joined: Fri Jul 01, 2022 2:17 pm

Re: Segfault when using MLFF in LAMMPS (might be duplicate)

#6 Post by jonathan_lahnsteiner2 » Fri Dec 12, 2025 11:07 am

Dear Maxime Legrand,

I was checking your simulation again. Now I am able to reproduce the error. Lammps is using a box cell neighbor list which is MPI distributed. If one of these boxes does not contain any atoms or in other words if there is a MPI rank which does not have any atoms the segmentation fault you are experiencing will occur. This will happen in both version VASP 6.5.0 and 6.5.1. A fix to this issue will be released in the next VASP version.

For now I would recommend to reduce the number of cores. Since you only have 150 atoms in your simulation box it does not make sense to use so many cores (64) anyway. For this number of atoms the code will only properly scale up to 2-4 cores. If you need better statistics you can use the replicate tag in your lammps input file:
https://docs.lammps.org/replicate.html
If you replicate your simulation box you will be able to use more cpu cores for your simulation.

Sorry for the inconvenience.

All the Best Jonathan


maxime_legrand
Newbie
Newbie
Posts: 11
Joined: Wed Oct 23, 2024 11:17 am

Re: Segfault when using MLFF in LAMMPS (might be duplicate)

#7 Post by maxime_legrand » Fri Dec 12, 2025 1:28 pm

Everything works fine now ! Thanks a lot for your help


Post Reply