[petsc-dev] [petsc-users] new book introducing PETSc for PDEs

Barry Smith bsmith at petsc.dev
Sat Oct 31 22:31:31 CDT 2020

> On Oct 31, 2020, at 5:21 PM, Jed Brown <jed at jedbrown.org> wrote:
> Barry Smith <bsmith at petsc.dev> writes:
>>> On Oct 31, 2020, at 9:35 AM, Jed Brown <jed at jedbrown.org> wrote:
>>> Barry Smith <bsmith at petsc.dev> writes:
>>>>  I have no problem updating any of Ed's examples if we need to with each release, so the burdern doesn't fall on him. We simply make a fork of his 
>>>> repository with a new branch and update that and make a MR to Ed for each release and he can have a new branch or tag of his examples for each new 
>>>> PETSc release.
>>>>  Barry
>>>> We just make this part of our release process.
>>> If we add it to CI, the workflow is
>> I would keep the  fork always petsc/pkg-eds-repo   and have PETSc master always point to the fork. At releases we would have release point directly to eds. 
>> This would remove the need to fork constantly I use this model partially for adol-c
>>  Anything wrong with this model?
> This takes Ed out of the loop, but doesn't avoid the CI circus that I outlined. It's more reproducible to always pin to a commit hash in the repository, in which case there may be no need to circle back and update PETSc after merging in Ed's repo (or our fork).
> An alternative would be to subtree the examples into PETSc and export upon release. Ed could be the CODEOWNER so he can weigh in on proposed changes or more idiomatic interfaces that may become available. His repo would always work with the latest release.

  What do you mean by release (six month release or all the time with master?)

  I have no problem with alternative approaches but they must truly eliminate part of the extra work required by my approach on everyone's part not increase the work. I did find some possible issues with subtree which may or may not apply 


Drawbacks (but in our opinion they're largely acceptable):

You must learn about a new merge strategy (i.e.git subtree).
Contributing code back upstream for the sub-projects is slightly more complicated.
The responsibility of not mixing super and sub-project code in commits lies with you.
1 and 3 seem a bit concerning, I will certainly make this mistake constantly without an automatic system to prevent it.

This is not a good sign, git subtree exists,  but
$ git help subtree
No manual entry for git-subtree


Anyways back to my concern.

git subtree does require use of new commands every time you mess with it (say every three months) that we do not know and since each of 
us will do this infrequently it is likely we will not remember them (I won't)  while my approach does not require remembering new commands. 
My approach only requires branching, push, and pulling on the fork and updating EdsRepo.py which is things all the developers know about and 
do regularly since we update other external packages.

If we all needed to use git subtree often then the extra burden of learning it and remembering it would just happen, but since we are 
likely to use it infrequently it is not clear to me that the extra burden of everyone learning subtree is truly simpler than my approach for everyone but you. 

Also making Ed a code owner seems to give him an extra unneeded burden by sending mail for every trivial fix, that he would not face if we just submitted MR to him when anything dramatically changes and at release time.

I would just put the fork of Ed's repository in a couple of pipeline tests with --download-edsrepo then people don't need to monkey with it themselves unless there is a failure and if there is a failure they proceed just like any other external package, add --download-edsrepository locally, fix in the downloaded repo, push, change the commit in edsrepo.py and push. 

In conclusion, if you can demonstrate that git subtree is truly simpler for all of us including Ed, then definitely we should use it. But I have my concerns that it actually adds a good amount of unneeded new complexity. 



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20201031/da9ced92/attachment-0001.html>

More information about the petsc-dev mailing list