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.


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 <> wrote:

 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.



Thank you,

Srinivasan Mahendran

Check out the vibrant tech community on one of the world's most
engaging tech sites,!
lammps-users mailing list

Dr. Axel Kohlmeyer  akohlmey@...24...
College of Science & Technology, Temple University, Philadelphia PA, USA
International Centre for Theoretical Physics, Trieste. Italy.