Maybe a bug...

Riccardo Maione's picture
Submitted by Riccardo Maione on Tue, 07/08/2014 - 14:39

Hello all,

I am trying to create a loop with atom style variable to simulate the effect of a solid reaction on a multispheric body here is my relevant script and the error

variable Mbl atomfile Mbl.txt
variable Mhl atomfile Mhl.txt
variable Mcharl atomfile Mcharl.txt
if "$a>=2" then "next Mbl Mhl Mcharl"
next Mbl Mhl Mcharl
#--------------------------------------------------------------------------------
variable T equal v_Mbl[1]
variable p equal v_Mhl[1]
variable W equal v_Mcharl[1]
print "$T $p $W"
6.5957526862084e-07 7.0871517814368e-10 1.26558986283157e-316
print "$a"
2
variable kc atom ${k0c}*exp(-(${expic})/f_Temp)
variable kc atom 10800000*exp(-(${expic})/f_Temp)
variable kc atom 10800000*exp(-(14553.0453089221)/f_Temp)
variable kg atom ${k0g}*exp(-(${expiag})/f_Temp)
variable kg atom 130000000*exp(-(${expiag})/f_Temp)
variable kg atom 130000000*exp(-(16838.234241728)/f_Temp)
variable kt atom ${k0t}*exp(-(${expiat})/f_Temp)
variable kt atom 200000000*exp(-(${expiat})/f_Temp)
variable kt atom 200000000*exp(-(15996.3225296416)/f_Temp)
variable kh atom ${k0h}*exp(-(${expiah})/f_Temp)
variable kh atom 51300000000*exp(-(${expiah})/f_Temp)
variable kh atom 51300000000*exp(-(10584.0329519433)/f_Temp)
variable K atom v_kc+v_kg+v_kt
variable Kdt atom v_K*v_dt+1
variable 1Kdt atom (v_Kdt)^-1
variable DMchar atom v_kc*v_Mbl*${dt}*v_1Kdt
variable DMchar atom v_kc*v_Mbl*0.001*v_1Kdt
variable DMt atom v_kt*v_Mbl*${dt}*v_1Kdt
variable DMt atom v_kt*v_Mbl*0.001*v_1Kdt
variable DMg atom v_kg*v_Mbl*${dt}*v_1Kdt
variable DMg atom v_kg*v_Mbl*0.001*v_1Kdt
variable Mhu atom v_Mhl/(1+v_kh*v_dt)
variable Kschar atom 1.47+0.0011*f_Temp
variable Kw atom -0.487+5.88e-3*f_Temp-7.39e-6*(f_Temp)^2
variable Kgas atom ${kgas_a}*f_Temp+${kgas_b}
variable Kgas atom 5.6263e-05*f_Temp+${kgas_b}
variable Kgas atom 5.6263e-05*f_Temp+0.0090037
variable Mbu atom v_Mbl*v_1Kdt
variable Mbu_1 equal v_Mbu[1]

variable Mcharu atom v_Mcharl+v_DMchar
variable check0 equal v_Mcharu[1]
variable check1 equal v_Mhu[1]
variable check2 equal v_Mbu[1]
print "${check0}+${check1}+${check2}"
8.93738186703994e-11+7.62053885606466e-12+6.59151674420631e-07
variable check equal (${check0}+${check1}+${check2})/(4/3*3.1415*$r^3)
[clusterlsgc02:20990] *** Process received signal ***
[clusterlsgc02:20990] Signal: Segmentation fault (11)
[clusterlsgc02:20990] Signal code: Address not mapped (1)
[clusterlsgc02:20990] Failing at address: 0x228
[clusterlsgc02:20990] [ 0] /lib64/libpthread.so.0 [0x337140eb10]
[clusterlsgc02:20990] [ 1] /home/users/maione1/LHEATMod/LIGGGHTS-PUBLIC-master/src/lmp_openmpi(_ZN9LAMMPS_NS8Variable8evaluateEPcPPNS0_4TreeE+0x1914) [0xc20964]
[clusterlsgc02:20990] [ 2] /home/users/maione1/LHEATMod/LIGGGHTS-PUBLIC-master/src/lmp_openmpi(_ZN9LAMMPS_NS8Variable12compute_atomEiiPdii+0xa52) [0xc23692]
[clusterlsgc02:20990] [ 3] /home/users/maione1/LHEATMod/LIGGGHTS-PUBLIC-master/src/lmp_openmpi(_ZN9LAMMPS_NS8Variable8evaluateEPcPPNS0_4TreeE+0x24a3) [0xc214f3]
[clusterlsgc02:20990] [ 4] /home/users/maione1/LHEATMod/LIGGGHTS-PUBLIC-master/src/lmp_openmpi(_ZN9LAMMPS_NS8Variable8retrieveEPc+0x2ba) [0xc23c0a]
[clusterlsgc02:20990] [ 5] /home/users/maione1/LHEATMod/LIGGGHTS-PUBLIC-master/src/lmp_openmpi(_ZN9LAMMPS_NS5Input10substituteERPcS2_RiS3_i+0x2eb) [0xa8e3bb]
[clusterlsgc02:20990] [ 6] /home/users/maione1/LHEATMod/LIGGGHTS-PUBLIC-master/src/lmp_openmpi(_ZN9LAMMPS_NS5Input5parseEv+0x1ce) [0xa8ec2e]
[clusterlsgc02:20990] [ 7] /home/users/maione1/LHEATMod/LIGGGHTS-PUBLIC-master/src/lmp_openmpi(_ZN9LAMMPS_NS5Input4fileEv+0x3c6) [0xa938c6]
[clusterlsgc02:20990] [ 8] /home/users/maione1/LHEATMod/LIGGGHTS-PUBLIC-master/src/lmp_openmpi(main+0x4a) [0xaaa1ca]
[clusterlsgc02:20990] [ 9] /lib64/libc.so.6(__libc_start_main+0xf4) [0x337081d994]
[clusterlsgc02:20990] [10] /home/users/maione1/LHEATMod/LIGGGHTS-PUBLIC-master/src/lmp_openmpi(__gxx_personality_v0+0x349) [0x577859]
[clusterlsgc02:20990] *** End of error message ***
Segmentation fault

basically what I do is use the print command to output the input atomfile-variable to be used in the next step, as you can see it calculates the variable but when I ask another calculation of the same variable it returns a segmentation fault, it is just me?

thanks for the attention,

AttachmentSize
Plain text icon mhl.txt576.97 KB
Plain text icon mcharl.txt585.17 KB
Plain text icon mbl.txt577 KB
Plain text icon in.run3_.0tris.txt577.08 KB
Plain text icon in.piroplacn.txt66.7 KB
Plain text icon data.exp_.txt74.28 KB