need help with makefile

Matthew Knepley knepley at gmail.com
Thu Mar 1 16:55:05 CST 2007


You usually need the PETSc Fortran includes in order
to define variables and setup F90 interfaces. I would
suggest looking at our examples:

  cd src/snes/examples/tutorials
  make ex5f90

    Matt

On 3/1/07, P. Aaron Lott <palott at ipst.umd.edu> wrote:
>
>
> Hi,
>
> I have a fortran90 code and I would like to use petsc's
> preconditioners inside of it. I'm having trouble setting up a
> makefile that will allow me include a petsc. It seems the problem is
> from the use of the c-preprocessor.
>
> My old makefile looked something like this:
>
> $(CMD)  : $(SOBJS)
>         $(F90) $(FLAGS) -o $(EXENAME) $(SOBJS)
>
> where SOBJ is a list of all of my object files.
>
> I was hoping to be able to make a petsc object file and include it in
> this list. Is this possible? Is there a tutorial on how to get petsc
> setup inside of your existing code?
>
> Thanks,
>
> -Aaron
>
>
>
> P. Aaron Lott
> Ph.D. Candidate
> 4239 Computer and Space Sciences Building
> University of Maryland
> College Park, MD 20742-4015
>
> palott at ipst.umd.edu
> http://www.lcv.umd.edu/~palott
> Office: 301.405.4894
> Fax:      301.314.0827
>
>
>


-- 
One trouble is that despite this system, anyone who reads journals widely
and critically is forced to realize that there are scarcely any bars to eventual
publication. There seems to be no study too fragmented, no hypothesis too
trivial, no literature citation too biased or too egotistical, no design too
warped, no methodology too bungled, no presentation of results too
inaccurate, too obscure, and too contradictory, no analysis too self-serving,
no argument too circular, no conclusions too trifling or too unjustified, and
no grammar and syntax too offensive for a paper to end up in print. --
Drummond Rennie




More information about the petsc-users mailing list