how to debug my Lammps using some printf? mine aren't even displayed from the re-compiled LAMMPS

Hello,

I have a problem by re-compiling LAMMPS after havin modified some few .cpp files through addition of printf commands.

Context: Lammps of august 2012,
    downloaded from a tarball
    private computer

History:
I compiled first one time using :
> make serial
It worked. Then I went in the examples/reax/Fe_O_H directory and executed in the terminal:

ln ../../../src/lmp_serial mylmp

then

mylmp < in.Fe_O_H > myoutput.txt

Then, I open myoutput.txt using gedit, and read:
LAMMPS(9 Aug 2012)
reading data file ...
orthogonal box = (0 0 0) to (25 25 25)
1by1by MPI processor grid
105 atoms
ERROR: Invalid pair style (force.cpp:168)

So, I tried adding some printf commands, such as: printf("a new pair is created \n"); in force.cpp at line 142.
as well as: printf("LAMMPS::create () called \n"); , line 451 in LAMMPS::create() in lammps.cpp
Then, I re-compiled. It went quickly and successfully. After executing again lammps from the example/reax/Fe_O_H directory, the same error output message was retrieved, without though some messages being displayed in the terminal while expected though.

Can somebody please tell me how I can proceed to make lammps display such messages when executing some intern classes, and also tell me what was wrong in my way of proceeding?

Thanks
Adrien Minière

Hello,

I have a problem by re-compiling LAMMPS after havin modified some few .cpp files through addition of printf commands.

Context: Lammps of august 2012,
    downloaded from a tarball
    private computer

History:
I compiled first one time using :
> make serial
It worked. Then I went in the examples/reax/Fe_O_H directory and executed in the terminal:

ln ../../../src/lmp_serial mylmp

then

mylmp < in.Fe_O_H > myoutput.txt

Then, I open myoutput.txt using gedit, and read:
LAMMPS(9 Aug 2012)
reading data file ...
orthogonal box = (0 0 0) to (25 25 25)
1by1by MPI processor grid
105 atoms
ERROR: Invalid pair style (force.cpp:168)

So, I tried adding some printf commands, such as: printf("a new pair is created \n"); in force.cpp at line 142.

no need to add printfs. would be better to read the documentation.
this message indicates that you are using a pair style that is not
included in your specific binary, most likely because you didn't
install the corresponding package. have a look at the compilation
and installation instructions, install the user-reaxc package,
recompile and try again.

cheers,
     axel.