All of the source files are first compiled using mpif90 -C -g -qdpc -qautodbl=dbl4 -qinitauto -Wl,-framework - Wl,vecLib -c file.f90
On each file, this creates the appropriate .o and .mod files. Also, these are compiled in order such that if a file B depends on a module defined in another file A, then A would be compiled before B Then the executable is created by running mpif90 -C -g -qdpc -qautodbl=dbl4 -qinitauto -Wl,-framework - Wl,vecLib -o executable all_object_files.o I'm attaching the Makefile here -------------- next part -------------- A non-text attachment was scrubbed... Name: Makefile_no_petsc Type: application/octet-stream Size: 3558 bytes Desc: not available URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20070303/e24ec155/attachment.obj> -------------- next part -------------- -Aaron On Mar 3, 2007, at 12:36 PM, Satish Balay wrote: > 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 >> >> > 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