Results 1 to 10 of 10
I have made and compiled a programme,but the calculations are not good,because it has somehow problems with findfiff2d.o file(calulates travel-times on nodes).May be the problem is that findiff2d calls 6 ...
- 12-13-2010 #1Just Joined!
- Join Date
- May 2010
- Posts
- 41
fortran makefile problem!
I have made and compiled a programme,but the calculations are not good,because it has somehow problems with findfiff2d.o file(calulates travel-times on nodes).May be the problem is that findiff2d calls 6 other subroutines.So main=>findiff2d=>expand,sort,pass,stensilcs2d,fnod e,fside.So how to tell them to look for these 6 subroutines?
My makefile:
FC= ifort
LD = ifort
FCFLAGS = -O2 -g
LDFLAGS = $(FCFLAGS)
# Executables
main: main.o model.o findiff2d.o findnode.o timenearsrc.o readsrc.o fnode.o expand.o fside.o sort.o pass.o stencils2d.o find.o timeinterp.o timeinterp2d.o timelinear.o time1d.o timeb2d.o timec2d.o blkdat.o fd.par fd.com
$(FC) $(FCLAGS) -o main main.o model.o findiff2d.o findnode.o timenearsrc.o readsrc.o fnode.o expand.o fside.o sort.o pass.o stencils2d.o find.o timeinterp.o timeinterp2d.o timelinear.o time1d.o timeb2d.o timec2d.o blkdat.o
What should I change?
- 12-13-2010 #2Linux Engineer
- Join Date
- Apr 2006
- Location
- Saint Paul, MN, USA / CentOS, Debian, Solaris, SuSE
- Posts
- 1,117
Hi.
The easiest action to take seems to change the makefile to look like:
which, for the short files main.f and sub.f, then make will produce:Code:FC= ifort # LD = ifort FCFLAGS = -O2 -g LDFLAGS = $(FCFLAGS) main: main.o sub.o $(FC) -o $@ $^
Best wishes ... cheers, drlCode:% make ifort -c -o main.o main.f ifort -c -o sub.o sub.f ifort -o main main.o sub.o
Welcome - get the most out of the forum by reading forum basics and guidelines: click here.
90% of questions can be answered by using man pages, Quick Search, Advanced Search, Google search, Wikipedia.
We look forward to helping you with the challenge of the other 10%.
( Mn, 2.6.n, AMD-64 3000+, ASUS A8V Deluxe, 1 GB, SATA + IDE, Matrox G400 AGP )
- 12-13-2010 #3Just Joined!
- Join Date
- May 2010
- Posts
- 41
Thanks drl.I am going to try now.
- 12-13-2010 #4Just Joined!
- Join Date
- May 2010
- Posts
- 41
$(FC) -c $(FCLAGS) -o $@ $^ main main.o model.o findiff2d.o findnode.o timenearsrc.o readsrc.o fnode.o expand.o fside.o sort.o pass.o stencils2d.o find.o timeinterp.o timeinterp2d.o timelinear.o time1d.o timeb2d.o timec2d.o blkdat.o
There isn't any change,gives me:
make: `main' is up to date.
- 12-13-2010 #5Linux Engineer
- Join Date
- Apr 2006
- Location
- Saint Paul, MN, USA / CentOS, Debian, Solaris, SuSE
- Posts
- 1,117
Welcome - get the most out of the forum by reading forum basics and guidelines: click here.
90% of questions can be answered by using man pages, Quick Search, Advanced Search, Google search, Wikipedia.
We look forward to helping you with the challenge of the other 10%.
( Mn, 2.6.n, AMD-64 3000+, ASUS A8V Deluxe, 1 GB, SATA + IDE, Matrox G400 AGP )
- 12-13-2010 #6Just Joined!
- Join Date
- May 2010
- Posts
- 41
So far as I know,I don't have error condition.Problem is that he does not see these variables.
- 12-13-2010 #7Linux Engineer
- Join Date
- Apr 2006
- Location
- Saint Paul, MN, USA / CentOS, Debian, Solaris, SuSE
- Posts
- 1,117
Welcome - get the most out of the forum by reading forum basics and guidelines: click here.
90% of questions can be answered by using man pages, Quick Search, Advanced Search, Google search, Wikipedia.
We look forward to helping you with the challenge of the other 10%.
( Mn, 2.6.n, AMD-64 3000+, ASUS A8V Deluxe, 1 GB, SATA + IDE, Matrox G400 AGP )
- 12-13-2010 #8Just Joined!
- Join Date
- May 2010
- Posts
- 41
$@ $^
How do you call this up?Yes there are not variables.
- 12-13-2010 #9Linux Engineer
- Join Date
- Apr 2006
- Location
- Saint Paul, MN, USA / CentOS, Debian, Solaris, SuSE
- Posts
- 1,117
Hi.
If you are asking what these symbols mean, then here is a reference:
Best wishes ... cheers, drlCode:# Automatic Variables set after a rule match: # # $@ Filename representing the target # $% Filename element of archive member specification # $< Filename of the first prerequisite # $? Names of all prerequisites newer than target, space separated # $^ Names of all prerequisites, duplicates removed, spaced # $+ Same as $^, but with duplicates removed, spaced # $* Stem of the target - typically file without suffix # GNU make, 3rd, pages 16-17
Welcome - get the most out of the forum by reading forum basics and guidelines: click here.
90% of questions can be answered by using man pages, Quick Search, Advanced Search, Google search, Wikipedia.
We look forward to helping you with the challenge of the other 10%.
( Mn, 2.6.n, AMD-64 3000+, ASUS A8V Deluxe, 1 GB, SATA + IDE, Matrox G400 AGP )
- 12-13-2010 #10Just Joined!
- Join Date
- May 2010
- Posts
- 41
Thanks again.


Reply With Quote
