[petsc-dev] [petsc-maint] Dependence of build on test target broken

Smith, Barry F. bsmith at mcs.anl.gov
Sat Jul 13 01:30:31 CDT 2019


Hopefully resolves the problems

https://bitbucket.org/petsc/petsc/pull-requests/1869/fix-dependencies-in-gmakefiletest/diff


> On Jul 12, 2019, at 7:25 AM, Smith, Barry F. via petsc-dev <petsc-dev at mcs.anl.gov> wrote:
> 
> 
>   The problem is I understand why the old code shouldn't work but I don't understand why the new code messes up so badly.
> 
>    Old code:
> ------------------
> 
> test: pre-clean report_tests
> 
> pre-clean:
> 	@$(RM) -rf $(TESTDIR)/counts $(TESTLOGFILE)
> 	@touch $(TESTLOGFILE)
> 	@echo "Using MAKEFLAGS:" ${MAKEFLAGS}
> 
> The problem is that pre-clean and report_tests both start working at the same time. pre-clean recursively starts deleting items in $(TESTDIR)/counts but the targets of report_tests start putting new items into $(TESTDIR)/counts so that when rm -rf is ready to remove the directory there is now some files in there so you get the error about non-empty directory.
> 
> I figured well just run pre-clean before report_tests
> 
>    New code:
> 
> test:
> 	+@${OMAKE} -f gmakefile.test pre-clean
> 	+@${OMAKE} -f gmakefile.test report_tests
> 
>   Run pre-clean then report_tests but produces possibly two problems
> 
> How about
> 
> test: report_tests
> report_tests: pre-clean
> 
>   Haven't had a chance to test it properly but seems to work.
> 
>   Barry
> 
>> On Jul 11, 2019, at 9:44 PM, Matthew Knepley <knepley at gmail.com> wrote:
>> 
>> On Thu, Jul 11, 2019 at 8:46 PM Smith, Barry F. <bsmith at mcs.anl.gov> wrote:
>>> On Jul 11, 2019, at 6:02 PM, Matthew Knepley via petsc-dev <petsc-dev at mcs.anl.gov> wrote:
>>> 
>>> Barry, 
>>> 
>>> Do you want to handle the revert? Satish, do you?
>> 
>>   The problem is the old code doesn't properly handle the dependencies and always produces the error about deleting non-empty directory. I'd like to understand the underlying problem rather then just  go from a new broken thing to an old broken thing.
>> 
>> Okay, that is reasonable.
>> 
>>   Matt
>> 
>>> 
>>>  Thanks,
>>> 
>>>    Matt
>>> 
>>> On Thu, Jul 11, 2019 at 3:02 PM Balay, Satish via petsc-maint <petsc-maint at mcs.anl.gov> wrote:
>>> BTW: I think this commit also triggers the following error - but I haven't yet debugged this..
>>> 
>>> http://ftp.mcs.anl.gov/pub/petsc/nightlylogs/archive/2019/07/10/examples_master_arch-osx-10.6-cxx-pkgs-opt_ipro.log
>>> 
>>> Satish
>>> 
>>> On Thu, 11 Jul 2019, Balay, Satish via petsc-dev wrote:
>>> 
>>>> On Thu, 11 Jul 2019, Balay, Satish via petsc-dev wrote:
>>>> 
>>>>> On Thu, 11 Jul 2019, Matthew Knepley via petsc-dev wrote:
>>>>> 
>>>>>> After my latest pull of master, making the 'test' target no longer rebuilds
>>>>>> the library. I have tested this on a few arches, and rebuilt. This is
>>>>>> pretty inconvenient, but I do not know how to fix it.
>>>>> 
>>>>> 
>>>>> git bisect gives the following.
>>>>> 
>>>>> Satish
>>>>> 
>>>>> -----
>>>>> 
>>>>> 27d73d1f0a5c445a3a02971e31a2a1a02ed6d224 is the first bad commit
>>>>> commit 27d73d1f0a5c445a3a02971e31a2a1a02ed6d224
>>>>> Author: Barry Smith <bsmith at mcs.anl.gov>
>>>>> Date:   Sat Jun 22 22:56:05 2019 -0500
>>>>> 
>>>>>    Fix the error from gmakefile.test test about trying to remove a non-empty directory
>>>>> 
>>>>>    The problem was the target to rm -r the directory was running at the same time as
>>>>>    tests tests where generatering new files in the directory
>>>>> 
>>>>>    Commit-type: bug-fix
>>>>> 
>>>>> :100644 100644 67a00e0c1c9ce3eb91a88f314e81a74ac278131f 9c0c1b310a238fc27df3af114ec96336ef5640d2 M      gmakefile.test
>>>> 
>>>> specifically the following change (with recursive make) likely broke the dependencies..
>>>> 
>>>>>>>>>>>>>>>>> 
>>>> -test: pre-clean report_tests
>>>> +test:
>>>> +     +@${OMAKE} -f gmakefile.test pre-clean
>>>> +     +@${OMAKE} -f gmakefile.test report_tests
>>>> <<<<<<<<<<<
>>>> 
>>>> Satish
>>>> 
>>> 
>>> 
>>> 
>>> -- 
>>> What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.
>>> -- Norbert Wiener
>>> 
>>> https://www.cse.buffalo.edu/~knepley/
>> 
>> 
>> 
>> -- 
>> What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.
>> -- Norbert Wiener
>> 
>> https://www.cse.buffalo.edu/~knepley/
> 



More information about the petsc-dev mailing list