need help with makefile

Satish Balay balay at mcs.anl.gov
Sat Mar 3 11:36:41 CST 2007


What is the command that correctly compiles this file? [from your
original makefile]

Satish

On Sat, 3 Mar 2007, P. Aaron Lott wrote:

> 
> Hi Satish,
> 
> I tried the order of the use statements and the include, but it didn't seem to
> matter. I really don't know much about make files or the linking process with
> compilers but it seems like the compiler statement
> 
> /usr/local/mpich-1.2.5.2/bin/mpif90 -c  -I. -g  __unsteady_ex.F -o
> unsteady_ex.o
> 
> is trying to make an object file unsteady_ex.o
> 
> However, unsteady_ex.F depends on many other object files before this can be
> compiled. During the make process the first file dealt with is unsteady_ex.F,
> which before using petsc, unsteady_ex.f90 was the last to be compiled. It
> seems like there should be some way to compile the rest of my program first
> and then perform this step at the end.
> 
> 
> I'm not sure if there's some way to rearrange things in the makefile command
> in order to do this or not. Do you have any ideas?
> 
> Thanks,
> 
> -Aaron
> 
> 
> 
> $(CMD)  : $(SOBJS)
> 	-${FLINKER} $(FLAGS)  -o $(EXENAME) $(SOBJS)
> 
> 
> 
> 
> 
> On Mar 3, 2007, at 12:07 PM, Satish Balay wrote:
> 
> > I can't spot any obvious issues here.. Is it possible that the
> > #include should go after the 'use statements'? [I don't know enough
> > about f90 issues here]
> > 
> > Satish
> > 
> > On Sat, 3 Mar 2007, P. Aaron Lott wrote:
> > 
> > > 
> > > Hi Satish,
> > > 
> > > I'm attaching the file to this e-mail.
> > > 
> > > 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
> 
> 




More information about the petsc-users mailing list