Ignore:
Timestamp:
03/24/15 11:21:45 (9 years ago)
Author:
rlacroix
Message:

Fix the Fortran interface generation to avoid generating dead code that caused a timer not to be stopped.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/interface/fortran_attr/ifile_attr.F90

    r538 r581  
    88  USE ifile 
    99  USE file_interface_attr 
    10    
     10 
    1111CONTAINS 
    12    
     12 
    1313  SUBROUTINE xios(set_file_attr)  & 
    1414    ( file_id, append, description, enabled, format, min_digits, name, name_suffix, output_freq  & 
    1515    , output_level, par_access, split_freq, split_freq_format, sync_freq, type ) 
    16      
     16 
    1717    IMPLICIT NONE 
    1818      TYPE(txios(file))  :: file_hdl 
     
    3434      TYPE(txios(duration))  , OPTIONAL, INTENT(IN) :: sync_freq 
    3535      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: type 
    36        
     36 
    3737      CALL xios(get_file_handle)(file_id,file_hdl) 
    3838      CALL xios(set_file_attr_hdl_)   & 
    3939      ( file_hdl, append, description, enabled, format, min_digits, name, name_suffix, output_freq  & 
    4040      , output_level, par_access, split_freq, split_freq_format, sync_freq, type ) 
    41      
     41 
    4242  END SUBROUTINE xios(set_file_attr) 
    43    
     43 
    4444  SUBROUTINE xios(set_file_attr_hdl)  & 
    4545    ( file_hdl, append, description, enabled, format, min_digits, name, name_suffix, output_freq  & 
    4646    , output_level, par_access, split_freq, split_freq_format, sync_freq, type ) 
    47      
     47 
    4848    IMPLICIT NONE 
    4949      TYPE(txios(file)) , INTENT(IN) :: file_hdl 
     
    6464      TYPE(txios(duration))  , OPTIONAL, INTENT(IN) :: sync_freq 
    6565      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: type 
    66        
     66 
    6767      CALL xios(set_file_attr_hdl_)  & 
    6868      ( file_hdl, append, description, enabled, format, min_digits, name, name_suffix, output_freq  & 
    6969      , output_level, par_access, split_freq, split_freq_format, sync_freq, type ) 
    70      
     70 
    7171  END SUBROUTINE xios(set_file_attr_hdl) 
    72    
     72 
    7373  SUBROUTINE xios(set_file_attr_hdl_)   & 
    7474    ( file_hdl, append_, description_, enabled_, format_, min_digits_, name_, name_suffix_, output_freq_  & 
    7575    , output_level_, par_access_, split_freq_, split_freq_format_, sync_freq_, type_ ) 
    76      
     76 
    7777    IMPLICIT NONE 
    7878      TYPE(txios(file)) , INTENT(IN) :: file_hdl 
     
    9393      TYPE(txios(duration))  , OPTIONAL, INTENT(IN) :: sync_freq_ 
    9494      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: type_ 
    95        
     95 
    9696      IF (PRESENT(append_)) THEN 
    97         append__tmp=append_ 
     97        append__tmp = append_ 
    9898        CALL cxios_set_file_append(file_hdl%daddr, append__tmp) 
    9999      ENDIF 
    100        
     100 
    101101      IF (PRESENT(description_)) THEN 
    102102        CALL cxios_set_file_description(file_hdl%daddr, description_, len(description_)) 
    103103      ENDIF 
    104        
     104 
    105105      IF (PRESENT(enabled_)) THEN 
    106         enabled__tmp=enabled_ 
     106        enabled__tmp = enabled_ 
    107107        CALL cxios_set_file_enabled(file_hdl%daddr, enabled__tmp) 
    108108      ENDIF 
    109        
     109 
    110110      IF (PRESENT(format_)) THEN 
    111111        CALL cxios_set_file_format(file_hdl%daddr, format_, len(format_)) 
    112112      ENDIF 
    113        
     113 
    114114      IF (PRESENT(min_digits_)) THEN 
    115115        CALL cxios_set_file_min_digits(file_hdl%daddr, min_digits_) 
    116116      ENDIF 
    117        
     117 
    118118      IF (PRESENT(name_)) THEN 
    119119        CALL cxios_set_file_name(file_hdl%daddr, name_, len(name_)) 
    120120      ENDIF 
    121        
     121 
    122122      IF (PRESENT(name_suffix_)) THEN 
    123123        CALL cxios_set_file_name_suffix(file_hdl%daddr, name_suffix_, len(name_suffix_)) 
    124124      ENDIF 
    125        
     125 
    126126      IF (PRESENT(output_freq_)) THEN 
    127127        CALL cxios_set_file_output_freq(file_hdl%daddr, output_freq_) 
    128128      ENDIF 
    129        
     129 
    130130      IF (PRESENT(output_level_)) THEN 
    131131        CALL cxios_set_file_output_level(file_hdl%daddr, output_level_) 
    132132      ENDIF 
    133        
     133 
    134134      IF (PRESENT(par_access_)) THEN 
    135135        CALL cxios_set_file_par_access(file_hdl%daddr, par_access_, len(par_access_)) 
    136136      ENDIF 
    137        
     137 
    138138      IF (PRESENT(split_freq_)) THEN 
    139139        CALL cxios_set_file_split_freq(file_hdl%daddr, split_freq_) 
    140140      ENDIF 
    141        
     141 
    142142      IF (PRESENT(split_freq_format_)) THEN 
    143143        CALL cxios_set_file_split_freq_format(file_hdl%daddr, split_freq_format_, len(split_freq_format_)) 
    144144      ENDIF 
    145        
     145 
    146146      IF (PRESENT(sync_freq_)) THEN 
    147147        CALL cxios_set_file_sync_freq(file_hdl%daddr, sync_freq_) 
    148148      ENDIF 
    149        
     149 
    150150      IF (PRESENT(type_)) THEN 
    151151        CALL cxios_set_file_type(file_hdl%daddr, type_, len(type_)) 
    152152      ENDIF 
    153        
    154        
    155      
     153 
    156154  END SUBROUTINE xios(set_file_attr_hdl_) 
    157    
     155 
    158156  SUBROUTINE xios(get_file_attr)  & 
    159157    ( file_id, append, description, enabled, format, min_digits, name, name_suffix, output_freq  & 
    160158    , output_level, par_access, split_freq, split_freq_format, sync_freq, type ) 
    161      
     159 
    162160    IMPLICIT NONE 
    163161      TYPE(txios(file))  :: file_hdl 
     
    179177      TYPE(txios(duration))  , OPTIONAL, INTENT(OUT) :: sync_freq 
    180178      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: type 
    181        
     179 
    182180      CALL xios(get_file_handle)(file_id,file_hdl) 
    183181      CALL xios(get_file_attr_hdl_)   & 
    184182      ( file_hdl, append, description, enabled, format, min_digits, name, name_suffix, output_freq  & 
    185183      , output_level, par_access, split_freq, split_freq_format, sync_freq, type ) 
    186      
     184 
    187185  END SUBROUTINE xios(get_file_attr) 
    188    
     186 
    189187  SUBROUTINE xios(get_file_attr_hdl)  & 
    190188    ( file_hdl, append, description, enabled, format, min_digits, name, name_suffix, output_freq  & 
    191189    , output_level, par_access, split_freq, split_freq_format, sync_freq, type ) 
    192      
     190 
    193191    IMPLICIT NONE 
    194192      TYPE(txios(file)) , INTENT(IN) :: file_hdl 
     
    209207      TYPE(txios(duration))  , OPTIONAL, INTENT(OUT) :: sync_freq 
    210208      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: type 
    211        
     209 
    212210      CALL xios(get_file_attr_hdl_)  & 
    213211      ( file_hdl, append, description, enabled, format, min_digits, name, name_suffix, output_freq  & 
    214212      , output_level, par_access, split_freq, split_freq_format, sync_freq, type ) 
    215      
     213 
    216214  END SUBROUTINE xios(get_file_attr_hdl) 
    217    
     215 
    218216  SUBROUTINE xios(get_file_attr_hdl_)   & 
    219217    ( file_hdl, append_, description_, enabled_, format_, min_digits_, name_, name_suffix_, output_freq_  & 
    220218    , output_level_, par_access_, split_freq_, split_freq_format_, sync_freq_, type_ ) 
    221      
     219 
    222220    IMPLICIT NONE 
    223221      TYPE(txios(file)) , INTENT(IN) :: file_hdl 
     
    238236      TYPE(txios(duration))  , OPTIONAL, INTENT(OUT) :: sync_freq_ 
    239237      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: type_ 
    240        
     238 
    241239      IF (PRESENT(append_)) THEN 
    242240        CALL cxios_get_file_append(file_hdl%daddr, append__tmp) 
    243         append_=append__tmp 
    244       ENDIF 
    245        
     241        append_ = append__tmp 
     242      ENDIF 
     243 
    246244      IF (PRESENT(description_)) THEN 
    247245        CALL cxios_get_file_description(file_hdl%daddr, description_, len(description_)) 
    248246      ENDIF 
    249        
     247 
    250248      IF (PRESENT(enabled_)) THEN 
    251249        CALL cxios_get_file_enabled(file_hdl%daddr, enabled__tmp) 
    252         enabled_=enabled__tmp 
    253       ENDIF 
    254        
     250        enabled_ = enabled__tmp 
     251      ENDIF 
     252 
    255253      IF (PRESENT(format_)) THEN 
    256254        CALL cxios_get_file_format(file_hdl%daddr, format_, len(format_)) 
    257255      ENDIF 
    258        
     256 
    259257      IF (PRESENT(min_digits_)) THEN 
    260258        CALL cxios_get_file_min_digits(file_hdl%daddr, min_digits_) 
    261259      ENDIF 
    262        
     260 
    263261      IF (PRESENT(name_)) THEN 
    264262        CALL cxios_get_file_name(file_hdl%daddr, name_, len(name_)) 
    265263      ENDIF 
    266        
     264 
    267265      IF (PRESENT(name_suffix_)) THEN 
    268266        CALL cxios_get_file_name_suffix(file_hdl%daddr, name_suffix_, len(name_suffix_)) 
    269267      ENDIF 
    270        
     268 
    271269      IF (PRESENT(output_freq_)) THEN 
    272270        CALL cxios_get_file_output_freq(file_hdl%daddr, output_freq_) 
    273271      ENDIF 
    274        
     272 
    275273      IF (PRESENT(output_level_)) THEN 
    276274        CALL cxios_get_file_output_level(file_hdl%daddr, output_level_) 
    277275      ENDIF 
    278        
     276 
    279277      IF (PRESENT(par_access_)) THEN 
    280278        CALL cxios_get_file_par_access(file_hdl%daddr, par_access_, len(par_access_)) 
    281279      ENDIF 
    282        
     280 
    283281      IF (PRESENT(split_freq_)) THEN 
    284282        CALL cxios_get_file_split_freq(file_hdl%daddr, split_freq_) 
    285283      ENDIF 
    286        
     284 
    287285      IF (PRESENT(split_freq_format_)) THEN 
    288286        CALL cxios_get_file_split_freq_format(file_hdl%daddr, split_freq_format_, len(split_freq_format_)) 
    289287      ENDIF 
    290        
     288 
    291289      IF (PRESENT(sync_freq_)) THEN 
    292290        CALL cxios_get_file_sync_freq(file_hdl%daddr, sync_freq_) 
    293291      ENDIF 
    294        
     292 
    295293      IF (PRESENT(type_)) THEN 
    296294        CALL cxios_get_file_type(file_hdl%daddr, type_, len(type_)) 
    297295      ENDIF 
    298        
    299        
    300      
     296 
    301297  END SUBROUTINE xios(get_file_attr_hdl_) 
    302    
     298 
    303299  SUBROUTINE xios(is_defined_file_attr)  & 
    304300    ( file_id, append, description, enabled, format, min_digits, name, name_suffix, output_freq  & 
    305301    , output_level, par_access, split_freq, split_freq_format, sync_freq, type ) 
    306      
     302 
    307303    IMPLICIT NONE 
    308304      TYPE(txios(file))  :: file_hdl 
     
    336332      LOGICAL, OPTIONAL, INTENT(OUT) :: type 
    337333      LOGICAL(KIND=C_BOOL) :: type_tmp 
    338        
     334 
    339335      CALL xios(get_file_handle)(file_id,file_hdl) 
    340336      CALL xios(is_defined_file_attr_hdl_)   & 
    341337      ( file_hdl, append, description, enabled, format, min_digits, name, name_suffix, output_freq  & 
    342338      , output_level, par_access, split_freq, split_freq_format, sync_freq, type ) 
    343      
     339 
    344340  END SUBROUTINE xios(is_defined_file_attr) 
    345    
     341 
    346342  SUBROUTINE xios(is_defined_file_attr_hdl)  & 
    347343    ( file_hdl, append, description, enabled, format, min_digits, name, name_suffix, output_freq  & 
    348344    , output_level, par_access, split_freq, split_freq_format, sync_freq, type ) 
    349      
     345 
    350346    IMPLICIT NONE 
    351347      TYPE(txios(file)) , INTENT(IN) :: file_hdl 
     
    378374      LOGICAL, OPTIONAL, INTENT(OUT) :: type 
    379375      LOGICAL(KIND=C_BOOL) :: type_tmp 
    380        
     376 
    381377      CALL xios(is_defined_file_attr_hdl_)  & 
    382378      ( file_hdl, append, description, enabled, format, min_digits, name, name_suffix, output_freq  & 
    383379      , output_level, par_access, split_freq, split_freq_format, sync_freq, type ) 
    384      
     380 
    385381  END SUBROUTINE xios(is_defined_file_attr_hdl) 
    386    
     382 
    387383  SUBROUTINE xios(is_defined_file_attr_hdl_)   & 
    388384    ( file_hdl, append_, description_, enabled_, format_, min_digits_, name_, name_suffix_, output_freq_  & 
    389385    , output_level_, par_access_, split_freq_, split_freq_format_, sync_freq_, type_ ) 
    390      
     386 
    391387    IMPLICIT NONE 
    392388      TYPE(txios(file)) , INTENT(IN) :: file_hdl 
     
    419415      LOGICAL, OPTIONAL, INTENT(OUT) :: type_ 
    420416      LOGICAL(KIND=C_BOOL) :: type__tmp 
    421        
     417 
    422418      IF (PRESENT(append_)) THEN 
    423         append__tmp=cxios_is_defined_file_append(file_hdl%daddr) 
    424         append_=append__tmp 
    425       ENDIF 
    426        
     419        append__tmp = cxios_is_defined_file_append(file_hdl%daddr) 
     420        append_ = append__tmp 
     421      ENDIF 
     422 
    427423      IF (PRESENT(description_)) THEN 
    428         description__tmp=cxios_is_defined_file_description(file_hdl%daddr) 
    429         description_=description__tmp 
    430       ENDIF 
    431        
     424        description__tmp = cxios_is_defined_file_description(file_hdl%daddr) 
     425        description_ = description__tmp 
     426      ENDIF 
     427 
    432428      IF (PRESENT(enabled_)) THEN 
    433         enabled__tmp=cxios_is_defined_file_enabled(file_hdl%daddr) 
    434         enabled_=enabled__tmp 
    435       ENDIF 
    436        
     429        enabled__tmp = cxios_is_defined_file_enabled(file_hdl%daddr) 
     430        enabled_ = enabled__tmp 
     431      ENDIF 
     432 
    437433      IF (PRESENT(format_)) THEN 
    438         format__tmp=cxios_is_defined_file_format(file_hdl%daddr) 
    439         format_=format__tmp 
    440       ENDIF 
    441        
     434        format__tmp = cxios_is_defined_file_format(file_hdl%daddr) 
     435        format_ = format__tmp 
     436      ENDIF 
     437 
    442438      IF (PRESENT(min_digits_)) THEN 
    443         min_digits__tmp=cxios_is_defined_file_min_digits(file_hdl%daddr) 
    444         min_digits_=min_digits__tmp 
    445       ENDIF 
    446        
     439        min_digits__tmp = cxios_is_defined_file_min_digits(file_hdl%daddr) 
     440        min_digits_ = min_digits__tmp 
     441      ENDIF 
     442 
    447443      IF (PRESENT(name_)) THEN 
    448         name__tmp=cxios_is_defined_file_name(file_hdl%daddr) 
    449         name_=name__tmp 
    450       ENDIF 
    451        
     444        name__tmp = cxios_is_defined_file_name(file_hdl%daddr) 
     445        name_ = name__tmp 
     446      ENDIF 
     447 
    452448      IF (PRESENT(name_suffix_)) THEN 
    453         name_suffix__tmp=cxios_is_defined_file_name_suffix(file_hdl%daddr) 
    454         name_suffix_=name_suffix__tmp 
    455       ENDIF 
    456        
     449        name_suffix__tmp = cxios_is_defined_file_name_suffix(file_hdl%daddr) 
     450        name_suffix_ = name_suffix__tmp 
     451      ENDIF 
     452 
    457453      IF (PRESENT(output_freq_)) THEN 
    458         output_freq__tmp=cxios_is_defined_file_output_freq(file_hdl%daddr) 
    459         output_freq_=output_freq__tmp 
    460       ENDIF 
    461        
     454        output_freq__tmp = cxios_is_defined_file_output_freq(file_hdl%daddr) 
     455        output_freq_ = output_freq__tmp 
     456      ENDIF 
     457 
    462458      IF (PRESENT(output_level_)) THEN 
    463         output_level__tmp=cxios_is_defined_file_output_level(file_hdl%daddr) 
    464         output_level_=output_level__tmp 
    465       ENDIF 
    466        
     459        output_level__tmp = cxios_is_defined_file_output_level(file_hdl%daddr) 
     460        output_level_ = output_level__tmp 
     461      ENDIF 
     462 
    467463      IF (PRESENT(par_access_)) THEN 
    468         par_access__tmp=cxios_is_defined_file_par_access(file_hdl%daddr) 
    469         par_access_=par_access__tmp 
    470       ENDIF 
    471        
     464        par_access__tmp = cxios_is_defined_file_par_access(file_hdl%daddr) 
     465        par_access_ = par_access__tmp 
     466      ENDIF 
     467 
    472468      IF (PRESENT(split_freq_)) THEN 
    473         split_freq__tmp=cxios_is_defined_file_split_freq(file_hdl%daddr) 
    474         split_freq_=split_freq__tmp 
    475       ENDIF 
    476        
     469        split_freq__tmp = cxios_is_defined_file_split_freq(file_hdl%daddr) 
     470        split_freq_ = split_freq__tmp 
     471      ENDIF 
     472 
    477473      IF (PRESENT(split_freq_format_)) THEN 
    478         split_freq_format__tmp=cxios_is_defined_file_split_freq_format(file_hdl%daddr) 
    479         split_freq_format_=split_freq_format__tmp 
    480       ENDIF 
    481        
     474        split_freq_format__tmp = cxios_is_defined_file_split_freq_format(file_hdl%daddr) 
     475        split_freq_format_ = split_freq_format__tmp 
     476      ENDIF 
     477 
    482478      IF (PRESENT(sync_freq_)) THEN 
    483         sync_freq__tmp=cxios_is_defined_file_sync_freq(file_hdl%daddr) 
    484         sync_freq_=sync_freq__tmp 
    485       ENDIF 
    486        
     479        sync_freq__tmp = cxios_is_defined_file_sync_freq(file_hdl%daddr) 
     480        sync_freq_ = sync_freq__tmp 
     481      ENDIF 
     482 
    487483      IF (PRESENT(type_)) THEN 
    488         type__tmp=cxios_is_defined_file_type(file_hdl%daddr) 
    489         type_=type__tmp 
    490       ENDIF 
    491        
    492        
    493      
     484        type__tmp = cxios_is_defined_file_type(file_hdl%daddr) 
     485        type_ = type__tmp 
     486      ENDIF 
     487 
    494488  END SUBROUTINE xios(is_defined_file_attr_hdl_) 
    495    
     489 
    496490END MODULE ifile_attr 
Note: See TracChangeset for help on using the changeset viewer.