LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Mailing List Archives
Re: [lammps-users] fprintf() to DEBUG
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lammps-users] fprintf() to DEBUG


From: Srinivasan Mahendran <srinivasan.mahendran@...24...>
Date: Mon, 21 Aug 2017 15:16:06 +0200

Yes I accept it's a library function whereas,

For example I used the following fprintf command

fprintf(screen,"\n TEST \n");

in pair_lj_cut.cpp and also in the pair_style_x.cpp file I created and compile

when I called these pairs styles from a input file to minimize, when pair_lj_cut.cpp is called from the input file TEST prints every time the sub routine is called
whereas it does not print when pair_style_x.cpp is called from the input file.

Sri


On Mon, Aug 21, 2017 at 3:08 PM, Axel Kohlmeyer <akohlmey@...24...> wrote:


On Mon, Aug 21, 2017 at 8:54 AM, Srinivasan Mahendran <srinivasan.mahendran@...4218...com> wrote:
Hello,

 I have implemented THB1 potential for an earlier version of LAMMPS (lammps-5Sep14), I later tried to make few modification to the pair_style file, to debug I used fprintf(screen/logfile, ) command.
The code compiles without error but I am unable to see the data printed either in screen or logfile.
But I found the fprintf command works perfectly for LAMMPS default pair_styles (eg. lj/cut).
Am I missing something ?? Kindly help

​fprintf() is a function of the C library and thus will behave exactly the same everywhere, if used correctly.

axel.​

 

Thank you,

Regards,
Srinivasan Mahendran

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
lammps-users mailing list
lammps-users@...655....net
https://lists.sourceforge.net/lists/listinfo/lammps-users




--
Dr. Axel Kohlmeyer  akohlmey@...24...  http://goo.gl/1wk0
College of Science & Technology, Temple University, Philadelphia PA, USA
International Centre for Theoretical Physics, Trieste. Italy.