Changeset 1876 for XIOS/trunk/src/node


Ignore:
Timestamp:
05/12/20 16:36:29 (4 years ago)
Author:
yushan
Message:

trunk : Bug fixed in workflow graph. wrong connection happens when a chain of arithmetic operations is applied on a field.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/node/field.cpp

    r1768 r1876  
    2626#include "workflow_graph.hpp" 
    2727 
     28#include "yacc_var.hpp" 
    2829namespace xios{ 
    2930 
     
    11421143     if(this->field_graph_end==-2) this->field_graph_end = filter_end;         // init 
    11431144 
    1144      // if(CXios::isClient) std::cout<<"****************** buildFilterGraph : field_id = "<<this->getId()<<" BEFORE: this->field_graph_start = "<<this->field_graph_start<<" this->field_graph_end = "<<this->field_graph_end<<std::endl; 
    11451145 
    11461146     if(start_graph == -1) 
    11471147     { 
    11481148       //nothing 
    1149        // if(CXios::isClient) std::cout<<"buildFilterGraph field_id = "<<this->getId()<<" case1: this->field_graph_start = "<<this->field_graph_start<<std::endl; 
    11501149     } 
    11511150     else //if(start_graph != -1) 
     
    11531152       if(this->field_graph_start == -1) this->field_graph_start = start_graph; 
    11541153       else this->field_graph_start = min(this->field_graph_start, start_graph); 
    1155  
    1156        // if(CXios::isClient) std::cout<<"buildFilterGraph field_id = "<<this->getId()<<" case2: this->field_graph_start = "<<this->field_graph_start<<std::endl; 
    11571154     } 
    11581155 
     
    11611158     { 
    11621159       //nothing 
    1163        // if(CXios::isClient) std::cout<<"buildFilterGraph field_id = "<<this->getId()<<" case1: this->field_graph_end = "<<this->field_graph_end<<std::endl; 
    11641160     } 
    11651161     else 
     
    11681164       else this->field_graph_end = max(this->field_graph_end, end_graph); 
    11691165 
    1170        // if(CXios::isClient) std::cout<<"buildFilterGraph field_id = "<<this->getId()<<" case2: this->field_graph_end = "<<this->field_graph_end<<std::endl; 
    11711166     } 
    11721167     
     
    11751170     filter_end = this->field_graph_end; 
    11761171 
    1177  
    1178      // if(CXios::isClient) std::cout<<"****************** buildFilterGraph : field_id = "<<this->getId()<<" AFTER: this->field_graph_start = "<<this->field_graph_start<<" this->field_graph_end = "<<this->field_graph_end<<std::endl; 
    1179       
    1180  
    1181       
    11821172      
    11831173 
     
    12821272            instantDataFilter->end_graph = filter_end; 
    12831273            instantDataFilter->field = this; 
    1284             // if(CXios::isClient) std::cout<<"***********************buildFilterGraph init source filter : field_id = "<<this->getId()<<" sourcefilter->start_graph = "<<clientSourceFilter->start_graph<<" sourcefilter->end_graph = "<<clientSourceFilter->end_graph<<std::endl; 
    12851274         } 
    12861275       } 
     
    13201309           fileWriterFilter->distance = getTemporalDataFilter(gc, file->output_freq)->distance+1; 
    13211310 
    1322            // std::cout<<"CFileWriterFilter filter start = "<<filter_start<<" end = "<<filter_end<<" field = "<<this->getId()<<std::endl; 
    13231311 
    13241312         } 
     
    13611349     if(this->field_graph_end==-2) this->field_graph_end = filter_end;         // init 
    13621350 
    1363      // if(CXios::isClient) std::cout<<"getFieldReference field_id = "<<this->getId()<<" BEFORE: this->field_graph_start = "<<this->field_graph_start<<" this->field_graph_end = "<<this->field_graph_end<<std::endl; 
    13641351 
    13651352     if(start_graph == -1) 
    13661353     { 
    13671354       //nothing 
    1368        // if(CXios::isClient) std::cout<<"getFieldReference field_id = "<<this->getId()<<" case1: this->field_graph_start = "<<this->field_graph_start<<std::endl; 
    13691355     } 
    13701356     else //if(start_graph != -1) 
     
    13721358       if(this->field_graph_start == -1) this->field_graph_start = start_graph; 
    13731359       else this->field_graph_start = min(this->field_graph_start, start_graph); 
    1374  
    1375        // if(CXios::isClient) std::cout<<"getFieldReference field_id = "<<this->getId()<<" case2: this->field_graph_start = "<<this->field_graph_start<<std::endl; 
    13761360     } 
    13771361 
     
    13791363     { 
    13801364       //nothing 
    1381        // if(CXios::isClient) std::cout<<"getFieldReference field_id = "<<this->getId()<<" case1: this->field_graph_end = "<<this->field_graph_end<<std::endl; 
    13821365     } 
    13831366     else 
     
    13851368       if(this->field_graph_end == -1) this->field_graph_end = end_graph; 
    13861369       else this->field_graph_end = max(this->field_graph_end, end_graph); 
    1387  
    1388        // if(CXios::isClient) std::cout<<"getFieldReference field_id = "<<this->getId()<<" case2: this->field_graph_end = "<<this->field_graph_end<<std::endl; 
    13891370     } 
    13901371 
    13911372     filter_start = this->field_graph_start; 
    13921373     filter_end = this->field_graph_end; 
    1393  
    1394      // if(CXios::isClient) std::cout<<"getFieldReference field_id = "<<this->getId()<<" AFTER: this->field_graph_start = "<<this->field_graph_start<<" this->field_graph_end = "<<this->field_graph_end<<std::endl; 
    13951374 
    13961375 
     
    14511430   TRY 
    14521431   { 
    1453      //if(CXios::isClient) std::cout<<"getSelfReference field_id = "<<this->getId()<<" start_graph = "<<start_graph<<" end_graph = "<<end_graph<<std::endl; 
    14541432 
    14551433     if (instantDataFilter || !hasExpression()) 
     
    15321510 
    15331511       instantDataFilter->connectOutput(temporalFilter, 0); 
    1534        //temporalFilter->tag = buildWorkflowGraph; 
    15351512        
    15361513       temporalFilter->parent_filters.resize(1); 
     
    15381515        
    15391516 
    1540        //if(temporalFilter->parent_filters[0]->tag) temporalFilter->tag=true; 
    15411517       temporalFilter->tag = temporalFilter->parent_filters[0]->tag; 
    15421518       temporalFilter->start_graph = temporalFilter->parent_filters[0]->start_graph; 
    15431519       temporalFilter->end_graph = temporalFilter->parent_filters[0]->end_graph; 
    15441520 
    1545        // temporalFilter->start_graph = filter_start; 
    1546        // temporalFilter->end_graph = filter_end; 
    15471521       temporalFilter->field = this; 
    15481522 
Note: See TracChangeset for help on using the changeset viewer.