Input file too long for fix ave/time?

Hi steve and all,

I tried to time average hundreds of compute as follows:

fix 19 all ave/time 1 200000 200000 c_1 c_2 c_3 c_4 c_5 &
c_7 c_8 c_9 c_10 c_11 c_12 c_13 c_16 &
c_17 c_18 c_19 c_20 c_21 c_22 c_25 c_26 &
c_27 c_28 c_29 c_30 c_31 c_32 c_33 c_34 c_35 c_36 &
c_37 c_41 c_42 c_43 c_44 c_45 c_46 &
c_47 c_48 c_49 c_50 c_51 c_52 c_53 c_54 c_55 c_56 &
c_61 c_62 c_63 c_64 c_65 c_66 &
c_67 c_68 c_69 c_70 c_71 c_72 c_73 c_74 c_75 c_76 &
c_77 c_78 c_79 c_85 c_86 &
c_87 c_88 c_89 c_90 c_91 c_92 c_93 c_94 c_95 c_96 &
c_97 c_98 c_99 c_105 c_106 &
c_107 c_108 c_109 c_110 c_111 c_112 c_113 c_114 c_115 c_116 &
c_117 c_118 c_119 c_120 c_121 c_122 c_123 c_124 c_125 c_126 &
c_127 c_128 c_129 c_136 &
c_137 c_138 c_139 c_140 c_141 c_142 c_143 c_144 c_145 c_146 &
c_147 c_148 c_149 c_150 c_151 c_152 c_153 c_154 c_155 c_156 &
c_157 c_158 c_159 c_160 c_161 c_162 c_163 c_164 c_165 c_166 &
c_167 c_168 c_169 c_170 c_171 c_172 c_173 &
c_174 c_175 c_176 c_177 c_178 c_179 &
c_180 c_181 c_182 c_183 c_184 c_185 c_186 &
c_187 c_188 c_189 c_190 c_191 c_192 c_193 &
c_194 c_195 c_196 c_197 c_198 c_199 &
c_200 c_201 c_202 c_203 &
c_204 c_205 c_206 &
c_207 c_208 c_209 &
c_210 c_211 c_212 c_213 &
c_214 c_215 c_216 &
c_217 c_218 c_219 &
c_220 c_221 c_222 c_223 &
c_224 c_225 c_226 &
file tmp.all

However, I got the error message like this:

fix 19 all ave/time 1 200000 200000 c_1 c_2 c_3 c_4 c_5 c_7 c_8 c_9 c_10 c_11 c_12 c_13 c_16 c_17 c_18 c_19 c_20 c_21 c_22 c_25 c_26 c_27 c_28 c_29 c_30 c_31 c_32 c_33 c_34 c_35 c_36 c_37 c_41 c_42 c_43 c_44 c_45 c_46 c_47 c_48 c_49 c_50 c_51 c_52 c_53 c_54 c_55 c_56 c_61 c_62 c_63 c_64 c_65 c_66 c_67 c_68 c_69 c_70 c_71 c_72 c_73 c_74 c_75 c_76 c_77 c_78 c_79 c_85 c_86 c_87 c_88 c_89 c_90 c_91 c_92 c_93 c_94 c_95 c_96 c_97 c_98 c_99 c_105 c_106 c_107 c_108 c_109 c_110 c_111 c_112 c_113 c_114 c_115 c_116 c_117 c_118 c_119 c_120 c_121 c_122 c_123 c_124 c_125 c_126 c_127 c_128 c_129 c_136 c_137 c_138 c_139 c_140 c_141 c_142 c_143 c_144 c_145 c_146 c_147 c_148 c_149 c_150 c_151 c_152 c_153 c_154 c_155 c_156 c_167 c_168 c_169 c_170 c_171 c_172 c_173 &
ERROR: Illegal fix ave/time command

I guess the error means I had reached the maximum variables in the line of fix ave/time. I wonder where is the corresponding source code that I can modify to meet my purpose, allowing me to put more input variable in there? Thanks, Ajing

2011/11/22 Albert Cao <[email protected]>:

Hi steve and all,

I tried to time average hundreds of compute as follows:

fix 19 all ave/time 1 200000 200000 c_1 c_2 c_3 c_4 c_5 &

[...]

c_220 c_221 c_222 c_223 &
c_224 c_225 c_226 &
file tmp.all

However, I got the error message like this:

fix 19 all ave/time 1 200000 200000 c_1 c_2 c_3 c_4 c_5 c_7
c_8 c_9 c_10 c_11 c_12 c_13 c_16 c_17 c_18 c_19 c_20 c_21 c_22 c_25
c_26 c_27 c_28 c_29 c_30 c_31 c_32 c_33 c_34 c_35 c_36 c_37 c_41
c_42 c_43 c_44 c_45 c_46 c_47 c_48 c_49 c_50 c_51 c_52 c_53 c_54 c_55
c_56 c_61 c_62 c_63 c_64 c_65 c_66 c_67 c_68 c_69 c_70 c_71 c_72
c_73 c_74 c_75 c_76 c_77 c_78 c_79 c_85 c_86 c_87 c_88 c_89 c_90
c_91 c_92 c_93 c_94 c_95 c_96 c_97 c_98 c_99 c_105 c_106 c_107 c_108
c_109 c_110 c_111 c_112 c_113 c_114 c_115 c_116 c_117 c_118 c_119 c_120
c_121 c_122 c_123 c_124 c_125 c_126 c_127 c_128 c_129 c_136 c_137
c_138 c_139 c_140 c_141 c_142 c_143 c_144 c_145 c_146 c_147 c_148 c_149
c_150 c_151 c_152 c_153 c_154 c_155 c_156 c_167 c_168 c_169 c_170 c_171
c_172 c_173 &
ERROR: Illegal fix ave/time command

I guess the error means I had reached the maximum variables in the line of
fix ave/time. I wonder where is the corresponding source code that I can
modify to meet my purpose, allowing me to put more input variable in
there? Thanks, Ajing

why not use multiple fix ave/time commands?

seems a cleaner and less excessive approach to me.
as a bonus you get easier to parse files.

axel.

I guess the error means I had reached the maximum variables in the line of
fix ave/time. I wonder where is the corresponding source code that I can
modify to meet my purpose, allowing me to put more input variable in
there? Thanks, Ajing

in addition, the limitation that you hit is not one of the fix,
but rather the concatenation of multiple input lines.

at the beginning of input.cpp, there is a #define MAXLINE 2048
that limits the maximum line to be parsed by the LAMMPS
input file parser to 2047 characters _after_ processing of
the & continuation markers. you are getting an error, because
the parser tries to parse an incomplete line.

cheers,
    axel.

Axel,

Thanks for your kind help. But I have experimented to delete some of input lines before the “fix ave/time” and it turned out it is always stuck at the line as shown in the following. I guess I’m hitting the maximum lines (19 lines) allowable in “fix ave/time” or read input so that the concatenation is not complete. I’m sure it is not hitting the maxmimum 2047 characters cap. Can anyone kindly point me to where the limit is defined in the source code? thanks, AC

fix 19 all ave/time 1 200000 200000 c_1 c_2 c_3 c_4 c_5 c_6 c_7 c_8 c_9 c_10 c_11 c_12 c_13 c_14 c_15 c_16 c_17 c_18 c_19 c_20 c_21 c_22 c_23 c_24 c_25 c_26 c_27 c_28 c_29 c_30 c_31 c_32 c_33 c_34 c_35 c_36 c_37 c_38 c_39 c_40 c_41 c_42 c_43 c_44 c_45 c_46 c_47 c_48 c_49 c_50 c_51 c_52 c_53 c_54 c_55 c_56 c_57 c_58 c_59 c_60 c_61 c_62 c_63 c_64 c_65 c_66 c_67 c_68 c_69 c_70 c_71 c_72 c_73 c_74 c_75 c_76 c_77 c_78 c_79 c_80 c_81 c_82 c_83 c_84 c_85 c_86 c_87 c_88 c_89 c_90 c_91 c_92 c_93 c_94 c_95 c_96 c_97 c_98 c_99 c_100 c_101 c_102 c_103 c_104 c_105 c_106 c_107 c_108 c_109 c_110 c_111 c_112 c_113 c_114 c_115 c_116 c_117 c_118 c_119 c_120 c_121 c_122 c_123 c_124 c_125 c_126 c_127 c_128 c_129 c_130 c_131 c_132 c_133 c_134 c_135 c_136 c_137 c_138 c_139 c_140 c_141 c_142 c_143 c_144 c_145 c_146 c_147 c_148 c_149 c_150 c_151 c_152 c_153 c_154 c_155 c_156 c_157 c_158 c_159 c_160 c_161 c_162 c_163 c_164 c_165 c_166 file tmp.molecule.1

fix 20 all ave/time 1 200000 200000 c_167 c_168 c_169 c_170 c_171 c_172 c_173 &
ERROR: Illegal fix ave/time command

Axel,

Thanks for your kind help. But I have experimented to delete some of
input lines before the "fix ave/time" and it turned out it is always
stuck at the line as shown in the following. I guess I'm hitting the
maximum lines (19 lines) allowable in "fix ave/time" or read input so
that the concatenation is not complete. I'm sure it is not hitting
the maxmimum 2047 characters cap. Can anyone kindly point me to
where the limit is defined in the source code? thanks, AC

fix 19 all ave/time 1 200000 200000 c_1 c_2 c_3 c_4 c_5
c_6 c_7 c_8 c_9 c_10 c_11 c_12 c_13 c_14 c_15 c_16 c_17 c_18 c_19
c_20 c_21 c_22 c_23 c_24 c_25 c_26 c_27 c_28 c_29 c_30 c_31 c_32
c_33 c_34 c_35 c_36 c_37 c_38 c_39 c_40 c_41 c_42 c_43 c_44 c_45
c_46 c_47 c_48 c_49 c_50 c_51 c_52 c_53 c_54 c_55 c_56 c_57
c_58 c_59 c_60 c_61 c_62 c_63 c_64 c_65 c_66 c_67 c_68 c_69 c_70
c_71 c_72 c_73 c_74 c_75 c_76 c_77 c_78 c_79 c_80 c_81 c_82 c_83
c_84 c_85 c_86 c_87 c_88 c_89 c_90 c_91 c_92 c_93 c_94 c_95 c_96
c_97 c_98 c_99 c_100 c_101 c_102 c_103 c_104 c_105 c_106 c_107
c_108 c_109 c_110 c_111 c_112 c_113 c_114 c_115 c_116 c_117 c_118
c_119 c_120 c_121 c_122 c_123 c_124 c_125 c_126 c_127 c_128 c_129
c_130 c_131 c_132 c_133 c_134 c_135 c_136 c_137 c_138 c_139 c_140
c_141 c_142 c_143 c_144 c_145 c_146 c_147 c_148 c_149 c_150 c_151
c_152 c_153 c_154 c_155 c_156 c_157 c_158 c_159 c_160 c_161 c_162
c_163 c_164 c_165 c_166 file tmp.molecule.1

fix 20 all ave/time 1 200000 200000 c_167 c_168 c_169
c_170 c_171 c_172 c_173 &
ERROR: Illegal fix ave/time command

granted this is not a size issue, but it could be a character issue.

apparently the "&" character after c_173 is no being recognized as
a proper '&'. i suggest you double check that it has the proper
ASCII value and it not a multibyte character or something else
that just looks like a "&" but is not the same as the previous '&'
chars.

cheers,
     axel.

where is the rest of your fix 20 command?

Steve

Steve, thanks for looking at this issue. The portion of my input file is the following:

fix 19 all ave/time 1 200000 200000 c_1 c_2 c_3 c_4 c_5 c_6 &
c_7 c_8 c_9 c_10 c_11 c_12 c_13 c_14 c_15 c_16 &
c_17 c_18 c_19 c_20 c_21 c_22 c_23 c_24 c_25 c_26 &
c_27 c_28 c_29 c_30 c_31 c_32 c_33 c_34 c_35 c_36 &
c_37 c_38 c_39 c_40 c_41 c_42 c_43 c_44 c_45 c_46 &
c_47 c_48 c_49 c_50 c_51 c_52 c_53 c_54 c_55 c_56 &
c_57 c_58 c_59 c_60 c_61 c_62 c_63 c_64 c_65 c_66 &
c_67 c_68 c_69 c_70 c_71 c_72 c_73 c_74 c_75 c_76 &
c_77 c_78 c_79 c_80 c_81 c_82 c_83 c_84 c_85 c_86 &
c_87 c_88 c_89 c_90 c_91 c_92 c_93 c_94 c_95 c_96 &
c_97 c_98 c_99 c_100 c_101 c_102 c_103 c_104 c_105 c_106 &
c_107 c_108 c_109 c_110 c_111 c_112 c_113 c_114 c_115 c_116 &
c_117 c_118 c_119 c_120 c_121 c_122 c_123 c_124 c_125 c_126 &
c_127 c_128 c_129 c_130 c_131 c_132 c_133 c_134 c_135 c_136 &
c_137 c_138 c_139 c_140 c_141 c_142 c_143 c_144 c_145 c_146 &
c_147 c_148 c_149 c_150 c_151 c_152 c_153 c_154 c_155 c_156 &
c_157 c_158 c_159 c_160 c_161 c_162 c_163 c_164 c_165 c_166 &
c_167 c_168 c_169 c_170 c_171 c_172 c_173 c_174 c_175 c_176 &
file tmp.molecule.1

fix 20 all ave/time 1 200000 200000 c_177 &
c_180 c_181 c_182 c_183 c_184 c_185 c_186 &
c_187 c_188 c_189 c_190 c_191 c_192 c_193 &
c_194 c_195 c_196 c_197 c_198 c_199 &
c_200 c_201 c_202 c_203 &
c_204 c_205 c_206 c_207 c_208 c_209 &
c_210 c_211 c_212 c_213 &
c_214 c_215 c_216 &
c_217 c_218 c_219 &
c_220 c_221 c_222 c_223 &
c_224 c_225 c_226 &
c_227 c_228 c_229 &
c_230 c_231 c_232 c_233 &
c_234 c_235 c_236 &
c_237 c_238 c_239 &
c_240 c_241 c_242 c_243 &
file tmp.molecule.2

The output as follows:

fix 19 all ave/time 1 200000 200000 c_1 c_2 c_3 c_4 c_5 c_6 c_7 c_8 c_9 c_10 c_11 c_12 c_13 c_14 c_15 c_16 c_17 c_18 c_19 c_20 c_21 c_22 c_23 c_24 c_25 c_26 c_27 c_28 c_29 c_30 c_31 c_32 c_33 c_34 c_35 c_36 c_37 c_38 c_39 c_40 c_41 c_42 c_43 c_44 c_45 c_46 c_47 c_48 c_49 c_50 c_51 c_52 c_53 c_54 c_55 c_56 c_57 c_58 c_59 c_60 c_61 c_62 c_63 c_64 c_65 c_66 c_67 c_68 c_69 c_70 c_71 c_72 c_73 c_74 c_75 c_76 c_77 c_78 c_79 c_80 c_81 c_82 c_83 c_84 c_85 c_86 c_87 c_88 c_89 c_90 c_91 c_92 c_93 c_94 c_95 c_96 c_97 c_98 c_99 c_100 c_101 c_102 c_103 c_104 c_105 c_106 c_107 c_108 c_109 c_110 c_111 c_112 c_113 c_114 c_115 c_116 c_117 c_118 c_119 c_120 c_121 c_122 c_123 c_124 c_125 c_126 c_127 c_128 c_129 c_130 c_131 c_132 c_133 c_134 c_135 c_136 c_137 c_138 c_139 c_140 c_141 c_142 c_143 c_144 c_145 c_146 c_147 c_148 c_149 c_150 c_151 c_152 c_153 c_154 c_155 c_156 c_157 c_158 c_159 c_160 c_161 c_162 c_163 c_164 c_165 c_166 c_167 c_168 c_169 c_170 c_171 c_172 c_173 c_174 c_175 c_176 file tmp.molecule.1

fix 20 all ave/time 1 200000 200000 c_179 c_180 c_181 c_182 c_183 c_184 c_185 c_186 &
ERROR: Illegal fix ave/time command

As I said in the previous email, the maximum lines that could be concatenated for this command is 20, no matter how many characters each line. I do not know where can I modify this value. You certainly know better than anyone else. Please give me a hint on this.

Thanks,

Ajing

no, there is no 20 line limit. check out this script code:
this creates 202 lines and outputs them.

[[email protected] lammps-ro] \( echo &#39;print &amp;&#39; ; for s in \`seq 0 200\` ; do echo &quot;{s}&" ; done ; echo x ) | ./src/lmp_serial
LAMMPS (9 Nov 2011)
0123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200x

it looks more like the '&' character in the failing line is not a
proper ASCII character.

can you please attach a working(!) input as a gzipped file (so that
its text will not be
converted by any mail program).

axel.

The input as you've listed it has additional
blank lines in the 2nd fix, which will not work.
And the echoed line has c_179 which isn't in
your input. So I don't think you are posting
consistent input/output in your emails.

Steve