Page 1 of 1
Segfault when using MLFF in LAMMPS (might be duplicate)
Posted: Wed Dec 10, 2025 5:09 pm
by maxime_legrand
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 !
Re: Segfault when using MLFF in LAMMPS (might be duplicate)
Posted: Wed Dec 10, 2025 6:31 pm
by jonathan_lahnsteiner2
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
Re: Segfault when using MLFF in LAMMPS (might be duplicate)
Posted: Thu Dec 11, 2025 1:55 pm
by maxime_legrand
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
Re: Segfault when using MLFF in LAMMPS (might be duplicate)
Posted: Fri Dec 12, 2025 10:02 am
by jonathan_lahnsteiner2
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
Re: Segfault when using MLFF in LAMMPS (might be duplicate)
Posted: Fri Dec 12, 2025 10:07 am
by maxime_legrand
Thanks ! I'll tell you if everything is alright when the vaspML compilation in v6.5.1
Re: Segfault when using MLFF in LAMMPS (might be duplicate)
Posted: Fri Dec 12, 2025 11:07 am
by jonathan_lahnsteiner2
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
Re: Segfault when using MLFF in LAMMPS (might be duplicate)
Posted: Fri Dec 12, 2025 1:28 pm
by maxime_legrand
Everything works fine now ! Thanks a lot for your help