Index: XIOS/dev/dev_trunk_omp/src/parse_expr/filter_expr_node.cpp
===================================================================
--- XIOS/dev/dev_trunk_omp/src/parse_expr/filter_expr_node.cpp	(revision 1677)
+++ XIOS/dev/dev_trunk_omp/src/parse_expr/filter_expr_node.cpp	(revision 1680)
@@ -106,9 +106,17 @@
   std::shared_ptr<COutputPin> CFilterUnaryOpExprNode::reduce(CGarbageCollector& gc, CField& thisField) const
   {
+    std::shared_ptr<COutputPin> ch = child->reduce(gc, thisField);
+
     std::shared_ptr<CUnaryArithmeticFilter> filter(new CUnaryArithmeticFilter(gc, opId));
-    child->reduce(gc, thisField)->connectOutput(filter, 0);
-
-    (filter->parent_filters).resize(1);
-    (filter->parent_filters)[0] = child->reduce(gc, thisField);
+    ch->connectOutput(filter, 0);
+
+    (filter->parent_filters).resize(1);
+    (filter->parent_filters)[0] = ch;
+
+    filter->tag = ch->tag;
+    filter->start_graph = ch->start_graph;
+    filter->end_graph = ch->end_graph;
+    filter->field = &thisField;
+
 
     return filter;
@@ -127,9 +135,15 @@
   std::shared_ptr<COutputPin> CFilterScalarFieldOpExprNode::reduce(CGarbageCollector& gc, CField& thisField) const
   {
+    std::shared_ptr<COutputPin> ch2 = child2->reduce(gc, thisField);
     std::shared_ptr<CScalarFieldArithmeticFilter> filter(new CScalarFieldArithmeticFilter(gc, opId, child1->reduce()));
-    child2->reduce(gc, thisField)->connectOutput(filter, 0);
+    ch2->connectOutput(filter, 0);
     
     (filter->parent_filters).resize(1);
-    (filter->parent_filters)[0] = child2->reduce(gc, thisField);
+    (filter->parent_filters)[0] = ch2;
+
+    filter->tag = ch2->tag;
+    filter->start_graph = ch2->start_graph;
+    filter->end_graph = ch2->end_graph;
+    filter->field = &thisField;
 
     return filter;
@@ -148,9 +162,17 @@
   std::shared_ptr<COutputPin> CFilterFieldScalarOpExprNode::reduce(CGarbageCollector& gc, CField& thisField) const
   {
+    std::shared_ptr<COutputPin> ch1 = child1->reduce(gc, thisField);
+
     std::shared_ptr<CFieldScalarArithmeticFilter> filter(new CFieldScalarArithmeticFilter(gc, opId, child2->reduce()));
-    child1->reduce(gc, thisField)->connectOutput(filter, 0);
-
-    (filter->parent_filters).resize(1);
-    (filter->parent_filters)[0] = child1->reduce(gc, thisField);
+    ch1->connectOutput(filter, 0);
+
+    (filter->parent_filters).resize(1);
+    (filter->parent_filters)[0] = ch1;
+
+    filter->tag = ch1->tag;
+    filter->start_graph = ch1->start_graph;
+    filter->end_graph = ch1->end_graph;
+    filter->field = &thisField;
+
     return filter;
   }
@@ -168,11 +190,21 @@
   std::shared_ptr<COutputPin> CFilterFieldFieldOpExprNode::reduce(CGarbageCollector& gc, CField& thisField) const
   {
+    std::shared_ptr<COutputPin> ch1 = child1->reduce(gc, thisField);
+    std::shared_ptr<COutputPin> ch2 = child2->reduce(gc, thisField);
+
     std::shared_ptr<CFieldFieldArithmeticFilter> filter(new CFieldFieldArithmeticFilter(gc, opId));
-    child1->reduce(gc, thisField)->connectOutput(filter, 0);
-    child2->reduce(gc, thisField)->connectOutput(filter, 1); 
+    ch1->connectOutput(filter, 0);
+    ch2->connectOutput(filter, 1); 
 
     (filter->parent_filters).resize(2);
-    (filter->parent_filters)[0] = child1->reduce(gc, thisField);
-    (filter->parent_filters)[1] = child2->reduce(gc, thisField);
+    (filter->parent_filters)[0] = ch1;
+    (filter->parent_filters)[1] = ch2;
+
+    filter->tag = (ch1->tag || ch2->tag);
+    filter->start_graph = ch1->tag? ch1->start_graph : (ch2->tag? ch2->start_graph: -1);
+    filter->end_graph = ch1->tag? ch1->end_graph : (ch2->tag? ch2->end_graph: -1);
+    filter->field = &thisField;
+
+
     return filter;
   }
@@ -194,9 +226,16 @@
   std::shared_ptr<COutputPin> CFilterScalarScalarFieldOpExprNode::reduce(CGarbageCollector& gc, CField& thisField) const
   {
+    std::shared_ptr<COutputPin> ch3 = child3->reduce(gc, thisField);
+
     std::shared_ptr<CScalarScalarFieldArithmeticFilter> filter(new CScalarScalarFieldArithmeticFilter(gc, opId, child1->reduce(),child2->reduce()));
-    child3->reduce(gc, thisField)->connectOutput(filter, 0);
+    ch3->connectOutput(filter, 0);
     
     (filter->parent_filters).resize(1);
-    (filter->parent_filters)[0] = child3->reduce(gc, thisField);
+    (filter->parent_filters)[0] = ch3;
+
+    filter->tag = ch3->tag;
+    filter->start_graph = ch3->start_graph;
+    filter->end_graph = ch3->end_graph;
+    filter->field = &thisField;
 
     return filter;
@@ -217,9 +256,17 @@
   std::shared_ptr<COutputPin> CFilterScalarFieldScalarOpExprNode::reduce(CGarbageCollector& gc, CField& thisField) const
   {
+    std::shared_ptr<COutputPin> ch2 = child2->reduce(gc, thisField);
+
     std::shared_ptr<CScalarFieldScalarArithmeticFilter> filter(new CScalarFieldScalarArithmeticFilter(gc, opId, child1->reduce(),child3->reduce()));
-    child2->reduce(gc, thisField)->connectOutput(filter, 0);
-
-    (filter->parent_filters).resize(1);
-    (filter->parent_filters)[0] = child2->reduce(gc, thisField);
+    ch2->connectOutput(filter, 0);
+
+    (filter->parent_filters).resize(1);
+    (filter->parent_filters)[0] = ch2;
+
+    filter->tag = ch2->tag;
+    filter->start_graph = ch2->start_graph;
+    filter->end_graph = ch2->end_graph;
+    filter->field = &thisField;
+
     return filter;
   }
@@ -239,11 +286,19 @@
   std::shared_ptr<COutputPin> CFilterScalarFieldFieldOpExprNode::reduce(CGarbageCollector& gc, CField& thisField) const
   {
+    std::shared_ptr<COutputPin> ch2 = child2->reduce(gc, thisField);
+    std::shared_ptr<COutputPin> ch3 = child3->reduce(gc, thisField);
+
     std::shared_ptr<CScalarFieldFieldArithmeticFilter> filter(new CScalarFieldFieldArithmeticFilter(gc, opId, child1->reduce()));
-    child2->reduce(gc, thisField)->connectOutput(filter, 0);
-    child3->reduce(gc, thisField)->connectOutput(filter, 1);
+    ch2->connectOutput(filter, 0);
+    ch3->connectOutput(filter, 1);
 
     (filter->parent_filters).resize(2);
-    (filter->parent_filters)[0] = child2->reduce(gc, thisField);
-    (filter->parent_filters)[1] = child3->reduce(gc, thisField);
+    (filter->parent_filters)[0] = ch2;
+    (filter->parent_filters)[1] = ch3;
+
+    filter->tag = (ch3->tag || ch2->tag);
+    filter->start_graph = ch3->tag? ch3->start_graph : (ch2->tag? ch2->start_graph: -1);
+    filter->end_graph = ch3->tag? ch3->end_graph : (ch2->tag? ch2->end_graph: -1);
+    filter->field = &thisField;
 
     return filter;
@@ -265,9 +320,17 @@
   std::shared_ptr<COutputPin> CFilterFieldScalarScalarOpExprNode::reduce(CGarbageCollector& gc, CField& thisField) const
   {
+    std::shared_ptr<COutputPin> ch1 = child1->reduce(gc, thisField);
+
     std::shared_ptr<CFieldScalarScalarArithmeticFilter> filter(new CFieldScalarScalarArithmeticFilter(gc, opId, child2->reduce(),child3->reduce()));
-    child1->reduce(gc, thisField)->connectOutput(filter, 0);
-
-    (filter->parent_filters).resize(1);
-    (filter->parent_filters)[0] = child1->reduce(gc, thisField);
+    ch1->connectOutput(filter, 0);
+
+    (filter->parent_filters).resize(1);
+    (filter->parent_filters)[0] = ch1;
+
+    filter->tag = ch1->tag;
+    filter->start_graph = ch1->start_graph;
+    filter->end_graph = ch1->end_graph;
+    filter->field = &thisField;
+
     return filter;
   }
@@ -288,11 +351,19 @@
   std::shared_ptr<COutputPin> CFilterFieldScalarFieldOpExprNode::reduce(CGarbageCollector& gc, CField& thisField) const
   {
+    std::shared_ptr<COutputPin> ch1 = child1->reduce(gc, thisField);
+    std::shared_ptr<COutputPin> ch3 = child3->reduce(gc, thisField);
+
     std::shared_ptr<CFieldScalarFieldArithmeticFilter> filter(new CFieldScalarFieldArithmeticFilter(gc, opId, child2->reduce()));
-    child1->reduce(gc, thisField)->connectOutput(filter, 0);
-    child3->reduce(gc, thisField)->connectOutput(filter, 1);
+    ch1->connectOutput(filter, 0);
+    ch3->connectOutput(filter, 1);
 
     (filter->parent_filters).resize(2);
-    (filter->parent_filters)[0] = child1->reduce(gc, thisField);
-    (filter->parent_filters)[1] = child3->reduce(gc, thisField);
+    (filter->parent_filters)[0] = ch1;
+    (filter->parent_filters)[1] = ch3;
+
+    filter->tag = (ch3->tag || ch1->tag);
+    filter->start_graph = ch3->tag? ch3->start_graph : (ch1->tag? ch1->start_graph: -1);
+    filter->end_graph = ch3->tag? ch3->end_graph : (ch1->tag? ch1->end_graph: -1);
+    filter->field = &thisField;
 
     return filter;
@@ -314,11 +385,19 @@
   std::shared_ptr<COutputPin> CFilterFieldFieldScalarOpExprNode::reduce(CGarbageCollector& gc, CField& thisField) const
   {
+    std::shared_ptr<COutputPin> ch1 = child1->reduce(gc, thisField);
+    std::shared_ptr<COutputPin> ch2 = child2->reduce(gc, thisField);
+
     std::shared_ptr<CFieldFieldScalarArithmeticFilter> filter(new CFieldFieldScalarArithmeticFilter(gc, opId, child3->reduce()));
-    child1->reduce(gc, thisField)->connectOutput(filter, 0);
-    child2->reduce(gc, thisField)->connectOutput(filter, 1);
+    ch1->connectOutput(filter, 0);
+    ch2->connectOutput(filter, 1);
 
     (filter->parent_filters).resize(2);
-    (filter->parent_filters)[0] = child1->reduce(gc, thisField);
-    (filter->parent_filters)[1] = child2->reduce(gc, thisField);
+    (filter->parent_filters)[0] = ch1;
+    (filter->parent_filters)[1] = ch2;
+
+    filter->tag = (ch2->tag || ch1->tag);
+    filter->start_graph = ch2->tag? ch2->start_graph : (ch1->tag? ch1->start_graph: -1);
+    filter->end_graph = ch2->tag? ch2->end_graph : (ch1->tag? ch1->end_graph: -1);
+    filter->field = &thisField;
     return filter;
   }
@@ -338,13 +417,25 @@
   std::shared_ptr<COutputPin> CFilterFieldFieldFieldOpExprNode::reduce(CGarbageCollector& gc, CField& thisField) const
   {
+    std::shared_ptr<COutputPin> ch1 = child1->reduce(gc, thisField);
+    std::shared_ptr<COutputPin> ch2 = child2->reduce(gc, thisField);
+    std::shared_ptr<COutputPin> ch3 = child3->reduce(gc, thisField);
+
     std::shared_ptr<CFieldFieldFieldArithmeticFilter> filter(new CFieldFieldFieldArithmeticFilter(gc, opId));
-    child1->reduce(gc, thisField)->connectOutput(filter, 0);
-    child2->reduce(gc, thisField)->connectOutput(filter, 1);
-    child3->reduce(gc, thisField)->connectOutput(filter, 2);
+    std::cout<<"std::shared_ptr<CFieldFieldFieldArithmeticFilter> filter(new CFieldFieldFieldArithmeticFilter(gc, opId))" <<std::endl;
+    ch1->connectOutput(filter, 0);
+    ch2->connectOutput(filter, 1);
+    ch3->connectOutput(filter, 2);
 
     (filter->parent_filters).resize(3);
-    (filter->parent_filters)[0] = child1->reduce(gc, thisField);
-    (filter->parent_filters)[1] = child2->reduce(gc, thisField);
-    (filter->parent_filters)[2] = child3->reduce(gc, thisField);
+    (filter->parent_filters)[0] = ch1;
+    (filter->parent_filters)[1] = ch2;
+    (filter->parent_filters)[2] = ch3;
+
+
+    filter->tag = (ch1->tag || ch1->tag || ch3->tag);
+    filter->start_graph = ch1->tag? ch1->start_graph : (ch2->tag? ch2->start_graph: (ch3->tag? ch3->start_graph: -1));
+    filter->end_graph = ch1->tag? ch1->end_graph : (ch2->tag? ch2->end_graph: (ch3->tag? ch3->end_graph: -1));
+    filter->field = &thisField;
+
 
     return filter;
Index: XIOS/dev/dev_trunk_omp/src/parse_expr/yacc_parser.cpp
===================================================================
--- XIOS/dev/dev_trunk_omp/src/parse_expr/yacc_parser.cpp	(revision 1677)
+++ XIOS/dev/dev_trunk_omp/src/parse_expr/yacc_parser.cpp	(revision 1680)
@@ -70,4 +70,6 @@
 #include "exception.hpp"
 
+#include "yacc_var.hpp"
+
 using namespace std;
 using namespace xios;
@@ -86,6 +88,13 @@
   #pragma omp threadprivate(parsed, globalInputText_ptr, globalReadOffset)
 
+  
+  std::string *xios::yacc_globalInputText_ptr = 0;
+  // #pragma omp threadprivate(xios::yacc_globalInputText_ptr)
+
   int readInputForLexer(char* buffer, size_t* numBytesRead, size_t maxBytesToRead)
   {
+    yacc_globalInputText_ptr = globalInputText_ptr;
+
+    std::cout<<"========= yacc_globalInputText_ptr = "<<*yacc_globalInputText_ptr<<std::endl;
     if(globalInputText_ptr == 0) globalInputText_ptr = new std::string;
     size_t numBytesToRead = maxBytesToRead;
Index: XIOS/dev/dev_trunk_omp/src/parse_expr/yacc_parser.hpp
===================================================================
--- XIOS/dev/dev_trunk_omp/src/parse_expr/yacc_parser.hpp	(revision 1677)
+++ XIOS/dev/dev_trunk_omp/src/parse_expr/yacc_parser.hpp	(revision 1680)
@@ -92,3 +92,4 @@
 int yyparse (void);
 
+
 #endif /* !YY_YY_YACC_PARSER_HPP_INCLUDED  */
