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: Karthik Sasihithlu <skarthik.rao@...24...>
Date: Wed, 11 Oct 2017 11:45:58 +0100

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. 

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