[petsc-dev] Could generatefortranstubs.py be lazier about modification times?

Kai Germaschewski kai.germaschewski at unh.edu
Tue Oct 5 07:02:50 CDT 2010


A common trick with regular Makefiles, which you should be to able to adopt,
is to:

generated.c: blah blah FORCE
        ./generate_it > $@.tmp
        if cmp generated.c generated.c.tmp; then
           mv $@.tmp $@
        else
           rm -f $@.tmp

It's not really pretty, but I think a bit less hacky than mucking with
mtime, and it's definitely safe. (I may have the cmp logic reversed, but you
get the idea. Instead of .tmp, you could do a separate dir)

--Kai


On Mon, Oct 4, 2010 at 6:21 PM, Jed Brown <jed at 59a2.org> wrote:

> On Mon, Oct 4, 2010 at 23:26, Satish Balay <balay at mcs.anl.gov> wrote:
> > Hmm - if there is a file 'xxx.c' - then bfort generates ftn-auto/xxxf.c
>
> It looks like generation of include/finclude/ftn-auto/*.h90 is much
> less direct.  The dependencies below also produce unused *.h90 files.
> What is bfort using to produce these f90module.f90 files?  Do you
> think it's feasible to get a list of files that each *.h90 depends on?
>  If not, I guess I'll just live with the few seconds to recompile
> these and relink even though nothing changed.
>
> Jed
>
> src/sys/plog/f90module.f90 -> include/finclude/ftn-auto/petscprofiling.h90
> src/sys/verbose/f90module.f90 ->
> include/finclude/ftn-auto/petscprofiling.h90
> src/mat/order/f90module.f90 ->
> include/finclude/ftn-auto/petscmatorderings.h90
> src/mat/matfd/f90module.f90 -> include/finclude/ftn-auto/petscmatfd.h90
> src/mat/partition/f90module.f90 ->
> include/finclude/ftn-auto/petscmatorderings.h90
> src/mat/partition/impls/party/f90module.f90 ->
> include/finclude/ftn-auto/petscmatorderings.h90
> src/mat/partition/impls/chaco/f90module.f90 ->
> include/finclude/ftn-auto/petscmatorderings.h90
> src/mat/partition/impls/jostle/f90module.f90 ->
> include/finclude/ftn-auto/petscmatorderings.h90
> src/mat/partition/impls/pmetis/f90module.f90 ->
> include/finclude/ftn-auto/petscmatorderings.h90
> src/mat/partition/impls/scotch/f90module.f90 ->
> include/finclude/ftn-auto/petscmatorderings.h90
> src/characteristic/interface/f90module.f90 ->
> include/finclude/ftn-auto/petscsemilagrange.h90
>



-- 
Kai Germaschewski
Assistant Professor, Dept of Physics / Space Science Center
University of New Hampshire, Durham, NH 03824
office: Morse Hall 245E
phone:  +1-603-862-2912
fax: +1-603-862-2771
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20101005/c1e37700/attachment.html>


More information about the petsc-dev mailing list