Re: [petsc-dev] user makefile

2022-01-14 Thread Barry Smith
The MR is ready for review https://gitlab.com/petsc/petsc/-/merge_requests/4719 I consider Mark's email a very serious bug report; as bad as a bug report that says "PETSc programs are randomly crashing right and left on all kinds of machines" since the documentation on this topic is __s

Re: [petsc-dev] user makefile

2022-01-14 Thread Mark Adams
Thanks, This came up because a Chombo user, who has a makefile system that is working on other platforms, failed on Spock because it did not find a library. My make of an example worked and I had that lib and a -L path to a directory with that lib. So I wanted to double check the recommended lib va

Re: [petsc-dev] user makefile

2022-01-14 Thread Barry Smith
I'll take a stab at fixing up the description of possible makefile approaches in the user's manual documentation and put it in an MR. I agree with Mark it is weak. Barry > On Jan 14, 2022, at 10:41 AM, Jed Brown wrote: > > Makefile.user is meant to be the example that doesn't import a

Re: [petsc-dev] user makefile

2022-01-14 Thread Jed Brown
Makefile.user is meant to be the example that doesn't import a zillion variables and in which you can readily add other packages that provide pkg-config. (Just add them to one line.) If you already use pkg-config for other dependencies, it also makes clear how to add PETSc. This is symmetric, w

Re: [petsc-dev] user makefile

2022-01-14 Thread Mark Adams
I want an example that I can clone for an existing makefile. I don't even see PETSC_LIB in Makefile.user Makefile.user is where you start if 0) you are starting from scratch and are all-in on PETSc. I think the vast majority of our users either 1) have a makefile and want to add PETSc or 2) want

Re: [petsc-dev] user makefile

2022-01-14 Thread Mark Adams
Bingo. On Thu, Jan 13, 2022 at 10:48 PM Matthew Knepley wrote: > foo: foo .o > ${CLINKER} -o $@ $^ ${PETSC_LIB} > >Matt > > On Thu, Jan 13, 2022 at 9:54 PM Jacob Faibussowitsch > wrote: > >> Is share/petsc/Makefile.user what you are looking for? >> >> Best regards, >> >> Jacob Faibuss

Re: [petsc-dev] user makefile

2022-01-14 Thread Mark Adams
Well, that really should have it but it does not and I, being the highly talented product tester that I am, did not find it. On Thu, Jan 13, 2022 at 9:54 PM Jacob Faibussowitsch wrote: > Is share/petsc/Makefile.user what you are looking for? > > Best regards, > > Jacob Faibussowitsch > (Jacob Fa

Re: [petsc-dev] user makefile

2022-01-14 Thread Mark Adams
This is too verbose for what I have in mind. And it just points to Jacob's solution. And your hint was very (too) useful. On Thu, Jan 13, 2022 at 9:49 PM Barry Smith wrote: > > > https://petsc.org/release/docs/manual/getting_started/?highlight=user%20makefile > > Search for Writing Application C

Re: [petsc-dev] user makefile

2022-01-13 Thread Jed Brown
No makefile is needed to build foo from foo.c. $ make -f $PETSC_DIR/share/petsc/Makefile.user foo In the example below, you don't have to write the recipe (the ${CLINKER} line). It's enough to write foo: foo.o baz.o Matthew Knepley writes: > foo: foo .o > ${CLINKER} -o $@ $^ ${PETSC_L

Re: [petsc-dev] user makefile

2022-01-13 Thread Matthew Knepley
foo: foo .o ${CLINKER} -o $@ $^ ${PETSC_LIB} Matt On Thu, Jan 13, 2022 at 9:54 PM Jacob Faibussowitsch wrote: > Is share/petsc/Makefile.user what you are looking for? > > Best regards, > > Jacob Faibussowitsch > (Jacob Fai - booss - oh - vitch) > > On Jan 13, 2022, at 21:49, Barry Smit

Re: [petsc-dev] user makefile

2022-01-13 Thread Jacob Faibussowitsch
Is share/petsc/Makefile.user what you are looking for? Best regards, Jacob Faibussowitsch (Jacob Fai - booss - oh - vitch) > On Jan 13, 2022, at 21:49, Barry Smith wrote: > > > https://petsc.org/release/docs/manual/getting_started/?highlight=user%20makefile > >

Re: [petsc-dev] user makefile

2022-01-13 Thread Barry Smith
https://petsc.org/release/docs/manual/getting_started/?highlight=user%20makefile Search for Writing Application Codes with PETSc Perhaps this needs to clearer or have links to it from the FAQ. > On Jan 13, 2022, at 9:38 PM, Mark Adams wrote: > > I am finding it pretty hard to find an exampl

[petsc-dev] user makefile

2022-01-13 Thread Mark Adams
I am finding it pretty hard to find an example of a makefile target to build an app with PETSc. I can not find it on the docs page. With Google: Victor has a little example that looks fine ($PETSC_LIB). (sort of, see below) Another one is bigger and has this at the end: -${CLINKER} $< -o b