Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
31 Views

What is wrong with my Makefile?

My makefile

FC = ifort
FCFLAGS= -O3 -xHost

TARGETS= clean birrp
OBJSOC= strlen.f diagnostic.f math.f rtpss.f zlinpack.f coherence.f fft.f rarfilt.f utils.f dataft.f filter.f response.f weight.f  birrp.f
   
all:  $(TARGETS)    
clean:$
        rm -f *.o *.mod
        rm -f birrp
        
birrp:$(OBJSOC)
        $(FC) $(FCFLAGS) -o $@ $(OBJSOC)

# General compile rules
.SUFFIXES: .f .o 

.f .o:    
    $(FC) $(FCFLAGS) -c -o $@ $< 

 

I have now birrp exe and when I try to run it

./birrp < n128.in

I got some results.But the problem is that it does not read some input files at all.I have double checked this by changing these files,results523974 are the same.I have inserted write(*,*) line in dataft.f to print on the screen but nothing happens.I have attached all the files.

0 Kudos
3 Replies
Highlighted
Beginner
31 Views

My processor 

cat /proc/cpuinfo
processor    : 0
vendor_id    : GenuineIntel
cpu family    : 6
model        : 23
model name    : Pentium(R) Dual-Core CPU       T4200  @ 2.00GHz
stepping    : 10
microcode    : 0xa0b
cpu MHz        : 2000.000
cache size    : 1024 KB
physical id    : 0
siblings    : 2
core id        : 0
cpu cores    : 2
apicid        : 0
initial apicid    : 0
fpu        : yes
fpu_exception    : yes
cpuid level    : 13
wp        : yes
flags        : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts nopl aperfmperf pni dtes64 monitor ds_cpl est tm2 ssse3 cx16 xtpr pdcm xsave lahf_lm dtherm
bugs        :
bogomips    : 3989.95
clflush size    : 64
cache_alignment    : 64
address sizes    : 36 bits physical, 48 bits virtual
power management:

processor    : 1
vendor_id    : GenuineIntel
cpu family    : 6
model        : 23
model name    : Pentium(R) Dual-Core CPU       T4200  @ 2.00GHz
stepping    : 10
microcode    : 0xa0b
cpu MHz        : 1200.000
cache size    : 1024 KB
physical id    : 0
siblings    : 2
core id        : 1
cpu cores    : 2
apicid        : 1
initial apicid    : 1
fpu        : yes
fpu_exception    : yes
cpuid level    : 13
wp        : yes
flags        : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts nopl aperfmperf pni dtes64 monitor ds_cpl est tm2 ssse3 cx16 xtpr pdcm xsave lahf_lm dtherm
bugs        :
bogomips    : 3989.95
clflush size    : 64
cache_alignment    : 64
address sizes    : 36 bits physical, 48 bits virtual
power management:

0 Kudos
Highlighted
Black Belt
31 Views

There is a DATE procedure in ifort library, so ifort issues the diagnostic that your context requires EXTERNAL for strict conformance, but that doesn't seem to be the main issue.  I don't know why ifort -gen_interfaces doesn't complain:

$ gfortran *.f
fft.f:44:32:

       call cffti1 (n,wsave(iw1),wsave(iw2))
                                1
Warning: Type mismatch in argument ‘ifac’ at (1); passed REAL(4) to INTEGER(4)
fft.f:188:40:

       call cfftf1 (n,c,wsave,wsave(iw1),wsave(iw2))
                                        1
Warning: Type mismatch in argument ‘ifac’ at (1); passed REAL(4) to INTEGER(4)
fft.f:325:40:

       call cfftb1 (n,c,wsave,wsave(iw1),wsave(iw2))
                                        1
Warning: Type mismatch in argument ‘ifac’ at (1); passed REAL(4) to INTEGER(4)
fft.f:1075:32:

       call dcfti1 (n,wsave(iw1),wsave(iw2))
                                1
Warning: Type mismatch in argument ‘ifac’ at (1); passed REAL(8) to INTEGER(4)
fft.f:1154:40:

       call dcftf1 (n,c,wsave,wsave(iw1),wsave(iw2))
                                        1
Warning: Type mismatch in argument ‘ifac’ at (1); passed REAL(8) to INTEGER(4)
fft.f:1571:40:

       call dcftb1 (n,c,wsave,wsave(iw1),wsave(iw2))
                                        1
Warning: Type mismatch in argument ‘ifac’ at (1); passed REAL(8) to INTEGER(4)
math.f:2079:52:

       call fzero(fmedian,b,c,r,1.e-6,1.e-32,iflag,x,n)
                                                    1
Warning: Rank mismatch in argument ‘ipar’ at (1) (rank-1 and scalar)
rarfilt.f:33:40:

       call rarfilt1(npts,nfft,nar,rdata,work(i1),work(i2),
                                        1
Warning: Type mismatch in argument ‘dpss’ at (1); passed REAL(4) to REAL(8)
rtpss.f:154:18:

      $            work(iv1),ierr,work(nv4),work(nv5))
                  1
Warning: Type mismatch in argument ‘ind’ at (1); passed REAL(8) to INTEGER(4)
rtpss.f:156:45:

       call tinvit(nndim,nn,fv1,fv2,fv3,mm,ev,work(iv1),efn,ierr,
                                             1
Warning: Type mismatch in argument ‘ind’ at (1); passed REAL(8) to INTEGER(4)
utils.f:578:27:

                call i1mcra(small, k, 16, 0, 0)
                           1
Warning: Rank mismatch in argument ‘a’ at (1) (scalar and rank-1)
utils.f:579:27:

                call i1mcra(large, k, 32751, 16777215, 16777215)
                           1
Warning: Rank mismatch in argument ‘a’ at (1) (scalar and rank-1)
utils.f:580:27:

                call i1mcra(right, k, 15520, 0, 0)
                           1
Warning: Rank mismatch in argument ‘a’ at (1) (scalar and rank-1)
utils.f:581:27:

                call i1mcra(diver, k, 15536, 0, 0)
                           1
Warning: Rank mismatch in argument ‘a’ at (1) (scalar and rank-1)
utils.f:582:27:

                call i1mcra(log10, k, 16339, 4461392, 10451455)
                           1
Warning: Rank mismatch in argument ‘a’ at (1) (scalar and rank-1)

 

Some of those warnings might be considered pedantic, but array bounds violations seem likely if you even succeed in starting the program.

 

 

0 Kudos
Highlighted
31 Views

-gen-interfaces by itself doesn't do any warnings. Use -warn interface instead.

0 Kudos