[petsc-dev] testharness failure Exception: Keyword: redirect_file from: redirect_file: ex1_1.tmp is not valid

Barry Smith bsmith at petsc.dev
Tue Dec 14 13:00:51 CST 2021


  Hmm,  I delete the new_ files and then later they are all there making trouble. Their creation dates seem to match the times of running configure but .... 

  Yeah it is probably my fault, but not sure where. Thanks for reminding me of the origins of those files, that may help me to determine why they exist. Maybe my giting magic is automatically running stuff on an ancient branch and thus scattering this stuff around.



> On Dec 14, 2021, at 10:29 AM, kruger Scott <kruger at txcorp.com> wrote:
> 
> 
> I'm really confused.  This is all legacy stuff from when we were working
> on converting the old test harness to the new test harness.  I agree
> that it should all be cleaned out, but this functionality shouldn't be
> called at the `gmakegentest.py` level.
> 
> If you look at the open statements in gmakegentest.py and testparse.py,
> you'll see I'm not writing any of those files.  That conversion was done
> by a separate script.
> 
> Scott
> 
> 
> On 2021-12-13 21:36, Barry Smith did write:
>> 
>>  If these are temporary work files could you not have them end with .c etc maybe have an extra .tmp at the end or something so they don't mess with everything if they are lying around? It is annoying to have to keep deleting them all.
>> 
>>> On Dec 13, 2021, at 9:32 PM, Barry Smith <bsmith at petsc.dev> wrote:
>>> 
>>> 
>>>  Scott,
>>> 
>>>    There is a problem. Somehow you are generating a ton of new_ex*.c files and then testparse.py is crapping out on them? 
>>> 
>>>    I see some weird stuff with these files but cannot tell when they are made and why they exist. 
>>> 
>>> 
>>> config/gmakegentest.py:      #if not exfile.startswith("new_"+"ex"): continue
>>> config/testparse.py:    new_pos = sl.instream.tell()
>>> config/testparse.py:    block = striptest[last_pos:new_pos]
>>> config/testparse.py:    last_pos = new_pos
>>> config/testparse.py:  bn=re.sub("new_","",basename)
>>> config/testparse.py:  for test_file in sorted(glob.glob("new_ex*.*")):
>>> 
>>> 
>>> 
>>>> On Dec 12, 2021, at 10:32 PM, Barry Smith <bsmith at petsc.dev <mailto:bsmith at petsc.dev>> wrote:
>>>> 
>>>> 
>>>> Looks like it is coming from some old .c files that I had lying around that are not in the repository.
>>>> 
>>>> I will push a commit that prints the offending file name to make the cause easier to track down in the future
>>>> 
>>>> Barry
>>>> 
>>>> 
>>>>> On Dec 12, 2021, at 6:09 PM, kruger Scott <kruger at txcorp.com <mailto:kruger at txcorp.com>> wrote:
>>>>> 
>>>>> 
>>>>> I'm baffled and unable to reproduce.  Can you give me your configure.log
>>>>> to help reproduce?  
>>>>> 
>>>>> Scott
>>>>> 
>>>>> 
>>>>> On 2021-12-12 17:40, Barry Smith did write:
>>>>>> 
>>>>>> Scott,
>>>>>> 
>>>>>>  In the branch barry/2021-11-04/add-dmplex-vecghost  which was just rebased on main I get 
>>>>>> 
>>>>>> /usr/local/opt/python at 3.9/bin/python3.9 ./config/gmakegen.py --petsc-arch=arch-add-dmplex-vecghost                                          
>>>>>> /usr/local/opt/python at 3.9/bin/python3.9 /Users/barrysmith/Src/petsc/config/gmakegentest.py --petsc-dir=/Users/barrysmith/Src/petsc --petsc-arch=arch-add-dmplex-vecghost --testdir=./arch-add-dmplex-vecghost/tests
>>>>>> Traceback (most recent call last):
>>>>>> File "/Users/barrysmith/Src/petsc/config/gmakegentest.py", line 1089, in <module>
>>>>>>  main(petsc_dir=opts.petsc_dir, petsc_arch=opts.petsc_arch,
>>>>>> File "/Users/barrysmith/Src/petsc/config/gmakegentest.py", line 1060, in main
>>>>>>  dataDict=pEx.walktree(os.path.join(pEx.srcdir))
>>>>>> File "/Users/barrysmith/Src/petsc/config/gmakegentest.py", line 924, in walktree
>>>>>>  self.genPetscTests(root,dirs,files,dataDict)
>>>>>> File "/Users/barrysmith/Src/petsc/config/gmakegentest.py", line 897, in genPetscTests
>>>>>>  dataDict[root].update(testparse.parseTestFile(fullex,0))
>>>>>> File "/Users/barrysmith/Src/petsc/config/testparse.py", line 542, in parseTestFile
>>>>>>  testDict[basename]=parseTests(testString,srcfile,fileNums,verbosity)
>>>>>> File "/Users/barrysmith/Src/petsc/config/testparse.py", line 498, in parseTests
>>>>>>  testnames,subdicts=parseTest(test,srcfile,verbosity)
>>>>>> File "/Users/barrysmith/Src/petsc/config/testparse.py", line 426, in parseTest
>>>>>>  if not var in acceptedkeys: raise Exception("Keyword: "+var+" from: "+line+" is not valid")
>>>>>> Exception: Keyword: redirect_file from: redirect_file: ex1_1.tmp is not valid
>>>>>> make: *** [gmakefile.test:97: arch-add-dmplex-vecghost/tests/testfiles] Error 1
>>>>>> 
>>>>>> How to track down the problem? Is it due to a bad rule from some file (which file, could that be printed?)
>>>>> 
>>>>> -- 
>>>>> Scott Kruger
>>>>> Tech-X Corporation               kruger at txcorp.com <mailto:kruger at txcorp.com>
>>>>> 5621 Arapahoe Ave, Suite A       Phone: (720) 466-3196
>>>>> Boulder, CO 80303                Fax:   (303) 448-7756
>>>> 
>>> 
>> 
> 
> -- 
> Scott Kruger
> Tech-X Corporation               kruger at txcorp.com
> 5621 Arapahoe Ave, Suite A       Phone: (720) 466-3196
> Boulder, CO 80303                Fax:   (303) 448-7756



More information about the petsc-dev mailing list