MDIL-SNU / SIMPLE-NN

SIMPLE-NN(SNU Interatomic Machine-learning PotentiaL packagE – version Neural Network)
GNU General Public License v3.0
47 stars 23 forks source link

LAMMPS segmentation fault error when using 5 elements #99

Closed weilaigit closed 3 years ago

weilaigit commented 3 years ago

SIMPLE-NN (20.2) and LAMMPS (3Mar20)

debugging with valgrind ==2624== Process terminating with default action of signal 11 (SIGSEGV) ==2624== Access not within mapped region at address 0x0 ==2624== at 0xBC55A84: ____strtod_l_internal (in /usr/lib64/libc-2.17.so) ==2624== by 0x75C4BD: LAMMPS_NS::PairNN::read_file(char*) (in /mnt/ufs18/rs-006/lai-lab/Codes-C7/lammps-3Mar20/src/lmp_seriali) ==2624== by 0x75B481: LAMMPS_NS::PairNN::coeff(int, char**) (in /mnt/ufs18/rs-006/lai-lab/Codes-C7/lammps-3Mar20/src/lmp_seriali) ==2624== by 0x45C212: LAMMPS_NS::Input::execute_command() (in /mnt/ufs18/rs-006/lai-lab/Codes-C7/lammps-3Mar20/src/lmp_seriali) ==2624== by 0x45D808: LAMMPS_NS::Input::file() (in /mnt/ufs18/rs-006/lai-lab/Codes-C7/lammps-3Mar20/src/lmp_seriali) ==2624== by 0x715905: main (in /mnt/ufs18/rs-006/lai-lab/Codes-C7/lammps-3Mar20/src/lmp_seriali) ==2624== If you believe this happened as a result of a stack ==2624== overflow in your program's main thread (unlikely but ==2624== possible), you can try to increase the size of the ==2624== main thread stack using the --main-stacksize= flag. ==2624== The main thread stack size used in this run was 16777216. ==2624== ==2624== HEAP SUMMARY: ==2624== in use at exit: 2,066,472 bytes in 1,952 blocks ==2624== total heap usage: 2,838 allocs, 886 frees, 2,511,490 bytes allocated ==2624== ==2624== LEAK SUMMARY: ==2624== definitely lost: 0 bytes in 0 blocks ==2624== indirectly lost: 0 bytes in 0 blocks ==2624== possibly lost: 0 bytes in 0 blocks ==2624== still reachable: 2,066,472 bytes in 1,952 blocks ==2624== suppressed: 0 bytes in 0 blocks ==2624== Rerun with --leak-check=full to see details of leaked memory ==2624== ==2624== Use --track-origins=yes to see where uninitialised values come from ==2624== For lists of detected and suppressed errors, rerun with: -s ==2624== ERROR SUMMARY: 642 errors from 12 contexts (suppressed: 0 from 0) Segmentation fault

debugging with gdb Program received signal SIGSEGV, Segmentation fault. 0x00002aaab1aeda84 in ____strtod_l_internal () from /lib64/libc.so.6 Missing separate debuginfos, use: debuginfo-install glibc-2.17-317.el7.x86_64 (gdb) where

0 0x00002aaab1aeda84 in ____strtod_l_internal () from /lib64/libc.so.6

1 0x000000000075c4be in LAMMPS_NS::PairNN::read_file(char*) ()

2 0x000000000075b482 in LAMMPS_NS::PairNN::coeff(int, char**) ()

3 0x000000000045c213 in LAMMPS_NS::Input::execute_command() ()

4 0x000000000045d809 in LAMMPS_NS::Input::file() ()

5 0x0000000000715906 in main ()

JisuJung928 commented 3 years ago

Hello, Prof. Lai.

Thanks for reporting a bug in our code. Now, I fix the issue and push the updated code in the main branch. Please download the new code and recompile the LAMMPS code.

One of the static variables is too small to accommodate the LONG symmetry function vectors for more than 4 elements. If you still have difficulty using SIMPLE-NN, please let us know.

Best regards, Jisu Jung.

weilaigit commented 3 years ago

Thanks Jisu. That worked.