LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Mailing List Archives
Re: [lammps-users] bug in lammps ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lammps-users] bug in lammps ?


From: Axel Kohlmeyer <akohlmey@...24...>
Date: Wed, 11 Oct 2017 06:52:35 -0400



On Wed, Oct 11, 2017 at 6:45 AM, Karthik Sasihithlu <skarthik.rao@...24...> wrote:
Dear Axel,

Yes, indeed I am.  That's the first thing I checked.

Please note - the script I sent you is exactly the same script as the 'in.heat' script in the examples folder except for the following line added:
minimize        1e-25 1e-25 5000 10000 


As I have mentioned, the script runs fine without any error when I do not include the minimization command.  


If indeed its the time steps that is causing the problem, then the script should return the same error even when I do not use the minimisation command. Also, I do not run into issues during the minimisation step.  I have copied the script below for your reference. 

​yes, i've seen it from your post before.

you are outputting thermo data *every* 1000 steps. that is not necessarily the same as on timesteps that are multiple of 1000.​

​look at your log file. here is the output from the previous chunk:

Step Temp c_Thot c_Tcold 
    1009         1.35    1.3085985    1.2919644 
    2000    1.3570196      1.50763    1.2807513 
    3000    1.3554034    1.5778414    1.2046486 
    4000    1.3494233    1.5798786    1.1425197 
    5000    1.3576325    1.5951744     1.168535 
    6000    1.3704255    1.6742895    1.1077855 
    7000    1.3683399    1.6430636    1.1544932 
    8000    1.3711821    1.6770118    1.1106793 
    9000    1.3790886    1.8632775    1.1743227 
   10000    1.3812838    1.7864069    1.1613397 
   11000    1.3833654    1.6745914    1.1288611 
   11009    1.3750654    1.6276926    1.1311765 
Loop time of 54.3409 on 1 procs for 10000 steps with 8000 atoms


are *all* output steps multiples of 1000?


from that it should be obvious how the minimization figures into creating this issue and how to resolve it.

axel.


 

Thanks,
Karthik

# sample LAMMPS input script for thermal conductivity of liquid LJ
# use fix heat to add/subtract energy from 2 regions

# settings

variable    x equal 10
variable    y equal 10
variable    z equal 20

variable    rho equal 0.6
variable        t equal 1.35
variable    rc equal 2.5

#variable    rho equal 0.85
#variable        t equal 0.7
#variable    rc equal 3.0

# setup problem

units        lj
atom_style    atomic

lattice        fcc ${rho}
region        box block 0 $x 0 $y 0 $z
create_box    1 box
create_atoms    1 box
mass        1 1.0

pair_style    lj/cut ${rc}
pair_coeff    1 1 1.0 1.0

neighbor    0.3 bin
neigh_modify    delay 0 every 1

minimize        1e-25 1e-25 5000 10000
velocity    all create $t 87287

# heat layers

region          hot block INF INF INF INF 0 1
region          cold block  INF INF INF INF 10 11
compute         Thot all temp/region hot
compute         Tcold all temp/region cold


# 1st equilibration run

fix             1 all nvt temp $t $t 0.5
thermo            100
run             1000

velocity    all scale $t

unfix        1

# 2nd equilibration run

fix        1 all nve
fix             hot all heat 1 100.0 region hot
fix             cold all heat 1 -100.0 region cold

thermo_style    custom step temp c_Thot c_Tcold
thermo            1000
run             10000

# thermal conductivity calculation

compute        ke all ke/atom
variable    temp atom c_ke/1.5

compute         layers all chunk/atom bin/1d z lower 0.05 units reduced
fix        2 all ave/chunk 10 100 1000 layers v_temp file profile.heat

variable        tdiff equal f_2[11][3]-f_2[1][3]
fix             ave all ave/time 1 1 1000 v_tdiff ave running start 13000
thermo_style    custom step temp c_Thot c_Tcold v_tdiff f_ave

run             20000





On Wed, Oct 11, 2017 at 11:30 AM, Axel Kohlmeyer <akohlmey@...24...> wrote:


On Wed, Oct 11, 2017 at 3:11 AM, Karthik Sasihithlu <skarthik.rao@...24...> wrote:
Dear Axel,

Glad to hear it.

I haven't been able to get past the error.  Any thoughts as to why without the minimisation step the script runs without error, but not with it ?

​the error message tells you what is going on. you are trying to output the value of a variable on a timestep where the fix it is referencing does not compute data.
the fix in question has data available on time steps that are multiples of 1000. are you outputting the variable on time steps that are multiples of 1000?

axel.​

 


Many thanks,
Karthik

On Tue, Oct 10, 2017 at 7:36 PM, Axel Kohlmeyer <akohlmey@...24...> wrote:
This is not a bug. 



--
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.

On Oct 10, 2017 14:34, "Karthik Sasihithlu" <skarthik.rao@...24...> wrote:
Hello lammps-users,

At the risk of being called a doofus, may I point out what seems to be a bug in lammps ?

I am using the 31stMarch2017 lammps version.

In the  'in.heat' example file from the KAPPA folder, if you include a minimization command in the script,  I get the error
ERROR: Fix in variable not computed at compatible time (../variable.cpp:1639) when the command fix ave/chunk is being executed. The rest of the script runs fine.

Without the minimization command the error is not observed.

The two of them seem completely unrelated, and I am not sure what is causing it.
Can anybody throw light on what could be wrong ? 

The script and the log file is attached to the email.

Thanks,
Karthik




------------------------------------------------------------------------------
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.




--
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.