[lammps-users] how to debug self write modules under linux?

Hi,

I wrote a class to couple LAMMPS with my another code, when i put the
.cpp/.h to /src directory, i can make LAMMPS successfully. but when i
ran it, there is sth wrong in my code.

so i want to how to debug my code? it is gratefully appreciated if you
can share some experiences of yours :slight_smile:

Thanks in advance.

Hi,

I wrote a framework in which lammps is coupled with a finite element code.
Thus, i allow myself to respond this question, although i am not a LAMMPS
developper.

What kind of trouble do you have ?

Yin-Chun,

I use the standard gnu debugger: gdb. You will need to create a Makefile in MAKE/ to reflect compiling with the -g flag. I attached Makefile.debug that I use. I did compile fftw (version 2 something) and mpich2 locally to reflect a true parallel environment. I normally debug my versions on my laptop...

Pieter

Makefile.debug (722 Bytes)