filippi-claudia/champ

issues in using the refac tool for batch 3

neelravi opened this issue · 1 comments

The following is the list of files for which refac.py tool does not work. Specific reasons for each file are given in the following text

  • mmpol.f ::

      • Line 328 refac.py shows that the variables J, J1, J2, J3 are already defined.
      • Line 697 This file has a really confusing statement - real(dp), dimension(3*MCHMM) :: dp . Fortran says "name conflict with those made accessible by a USE statement."
      • Line 747, 749, 765, 766, 767 throw error because of compiler thinks that a parameter (dp from the USE statement) is being changed.
  • misc_grdnts.f ::

      • Line 127 A variable named "if" is used. After using refac tool, the compiler says "This name does not have a type, and must have an explicit type" and "An INTEGER or REAL data type is required"
  • metrop_mov1_slat.f ::

      • Line 50. A statement appears as "real(dp) :: 10d". The compiler says "Syntax error, found INTEGER_CONSTANT '10'"
      • Line 224 rannyu(0), and
      • Line 238 gammai show error as "This name does not have a type, and must have an explicit type"
      • Line 401 rnorm_nodes_num(...) "This name does not have a type, and must have an explicit type".
  • mc_configs.f ::

      • Line 46 rannyu(0) gives error "This name does not have a type, and must have an explicit type"
  • nonloc.f ::

      • Line 564 dpsibnl gives error "This name does not have a type, and must have an explicit type"
      • Line 579 psinl gives error "This name does not have a type, and must have an explicit type"
      • Line 588 psianl gives error "This name does not have a type, and must have an explicit type"
      • Line 597 dpsianl gives error "This name does not have a type, and must have an explicit type"
  • nonlpsi.f ::

      • Line 219 dpsibnl gives error "This name does not have a type, and must have an explicit type"
      • Line 1 psinl gives error "This name does not have a type, and must have an explicit type"
      • Line 93 psianl gives error "This name does not have a type, and must have an explicit type"
      • Line 179 dpsianl gives error "This name does not have a type, and must have an explicit type"
      • Line 219 ipar gives error "This name does not have a type, and must have an explicit type"
  • optci_reduce.f ::
    The refac tool itself gives an error.
    File "/home/ravindra/softwares/refac/refac/refac_fortran.py", line 83, in
    scope = clean_statements(args)
    File "/home/ravindra/.local/lib/python3.8/site-packages/refac/clean_use_and_implicit.py", line 124, in clean_statements
    scopes = fill_scopes(rawdata, scopes, clean_implicit)
    File "/home/ravindra/.local/lib/python3.8/site-packages/refac/scope_utils.py", line 68, in fill_scopes
    scope = fill_floats(scope)
    File "/home/ravindra/.local/lib/python3.8/site-packages/refac/scope_utils.py", line 139, in fill_floats
    declaration = separate_dimensions(list_to_string(sd[1:]))
    File "/home/ravindra/.local/lib/python3.8/site-packages/refac/scope_utils.py", line 273, in separate_dimensions
    variables.append(variable[:variable.index("(")])
    ValueError: substring not found

I have observed that the refac tool does not give type to function names.
The rest of the files have been modified successfully from the batch 3

Closed by #133