Skip to content
Snippets Groups Projects
Commit c1db9d16 authored by kamischi's avatar kamischi
Browse files

Merge branch 'coverage'

parents 8aaeb849 6b0a2a81
No related branches found
No related tags found
No related merge requests found
.DS_Store
*.gcno
*.gcda
source/f90/bosou
source/f90/eelsou
*.gcov
.SUFFIXES: .c .f .f90 .F90 .for .FOR .ftn .FTN .o
.SUFFIXES: .f90 .F90 .o
# the fortran compiler
# fortran compiler
FC = gfortran
# the options for the fortran compiler
# FFLAGS = -fbounds-check
# FFLAGS = -O3 -ff2c -gw
FFLAGS = -g -gdwarf-2 -fbounds-check -fcheck=all -fdiagnostics-color=auto
# fortran compiler options
FFLAGS = -g -gdwarf-2 -fbounds-check -fcheck=all --coverage
# gfortran version 4.8 does not know -fdiagnostics-color
# safeguard for major version >= 5
GFORTAN_VERSION_GT_5 := $(shell echo `gcc -dumpversion | cut -f1 -d. ` \>= 5 | bc)
ifeq "$(GFORTAN_VERSION_GT_5)" "1"
FFLAGS += -fdiagnostics-color=auto
endif
# Stuff for the python modules
# Python3 and its numpy must be installed.
PYTHON3 = python3
# the implicit rule for compiling for files
# %.o: %.for ; $(FC) $(FFLAGS) -c -o $@ $<
# implicit rules for compiling fortran files
%.o: %.f90 ; $(FC) $(FFLAGS) -c $<
%_mod.mod: %.f90 ; $(FC) $(FFLAGS) -c $<
all: boson eels eels-boson pylibs
all: boson eels eels-boson
bosonmods = sicot_mod.mod sintr_mod.mod rcffi_mod.mod
doboson.o: doboson.f90 $(bosonmods)
......@@ -44,22 +43,53 @@ eels: eels.f90 change_working_dir.o $(eelssubs) $(eelsmods)
eels-boson: eels-boson.f90 change_working_dir.o $(eelssubs) $(eelsmods) $(bosonsubs) $(bosonmods)
$(FC) $(FFLAGS) -o eels-boson eels-boson.f90 change_working_dir.o $(eelssubs) $(bosonsubs)
pylibs: doeels-py doboson-py
doeels-py: doeels.f90 quanc8.f90 surlos.f90 fint1.f90 fint2.f90 fint3.f90 queels.f90 phint.f90 qrat.f90 usurlo.f90
$(PYTHON3) -m numpy.f2py -c seteps.f90 doeels.f90 quanc8.f90 surlos.f90 fint1.f90 fint2.f90 fint3.f90 queels.f90 phint.f90 qrat.f90 usurlo.f90 -m doeels
doboson-py: doboson.f90 sicot.f90 sintr.f90 rcffi.f90 respon.f90 o1.f90 o2.f90
$(PYTHON3) -m numpy.f2py -c o1.f90 o2.f90 sintr.f90 rcffi.f90 respon.f90 sicot.f90 doboson.f90 -m doboson
coverage: boson eels eels-boson
./eelsf90
./bosonf90
./eels-boson
gcov change_working_dir
gcov bosonf90-boson
gcov doboson
gcov sicot
gcov sintr
gcov rcffi
gcov respon
gcov eelsf90-eels
gcov doeels
gcov fint1
gcov fint2
gcov fint3
gcov fun
gcov o1
gcov o2
gcov phint
gcov qrat
gcov quanc8
gcov queels
gcov seteps
gcov surlos
gcov usurlo
gcov eels-boson-eels-boson
mkdir -p gcov-analysis
mv *.gcov gcov-analysis/
clean:
rm -f *.o
rm -rf *.dSYM
rm -rf *.mod
rm -rf *.so
rm -f *.mod
rm -f *.so
rm -f *.gcno
rm -f *.gcda
rm -f gcov-analysis/*
rm -f eelsou bosou
rm -f bosonf90 bosonf90.exe
rm -f eelsf90 eelsf90.exe
rm -f eels-boson eels-boson.exe
.PHONY: all clean pylibs
.PHONY: all clean coverage
300.0 t
25.0 width
0.5 gauss
0.3 asym
-500.0 emin
1200.0 emax
......@@ -13,7 +13,7 @@ EELS
surlos
phint
seteps
extend3
(extend3)
BOSON
change_working_dir
......
4.0 E0 ABTI0002
60.0 THETA ABTI0003
1.8 PHIA ABTI0004
1.8 PHIB ABTI0005
50.0 WMIN ABTI0006
700.0 WMAX ABTI0007
2.0 DW ABTI0008
WFW: MnO layer on metal
ABTI0010
2 1 No-layers NPER No-periodic
MnO 994.00D+00 LAYER 1 name thickness
4.95 1 epsinf No-Osc.
269.0 16.000 5.00000E-02 wto, Q, lambda
Platinum 1000.00D+00 LAYER 2 ABTI0012
8.90 1 ABTI0013
160000.0 -1 12.0000E-02 ABTI0014
......@@ -17,31 +17,77 @@ endif
# fcat tool
FCAT = fcat
boson_all-fcat.f90: boson_all.f90
$(FCAT) -count boson_all.f90 > boson_all-fcat.f90
bosonf90: boson_all-fcat.f90
$(FC) $(FFLAGS) -o bosonf90 boson_all-fcat.f90
# Stuff for the python modules
# Python3 and its numpy must be installed.
PYTHON3 = python3
eels_all-fcat.f90: eels_all.f90
$(FCAT) -count eels_all.f90 > eels_all-fcat.f90
eelsf90: eels_all-fcat.f90
$(FC) $(FFLAGS) -o eelsf90 eels_all-fcat.f90
# the implicit rule for compiling for files
# %.o: %.for ; $(FC) $(FFLAGS) -c -o $@ $<
#%-fcat.f90: %.f90 ; fcat -count %.f90 > %-fcat.f90
%.o: %-fcat.f90 ; $(FC) $(FFLAGS) -c $<
%_mod.mod: %.f90 ; $(FC) $(FFLAGS) -c $<
all: eelsf90 bosonf90
all: boson eels eels-boson pylibs
bosonmods = sicot_mod.mod sintr_mod.mod rcffi_mod.mod
doboson-fcat.f90: doboson.f90
$(FCAT) -count doboson.f90 > doboson-fcat.f90
doboson.o: doboson-fcat.f90 $(bosonmods)
sicot_mod.mod: sintr_mod.mod
bosonsubs = doboson.o respon.o sicot.o sintr.o rcffi.o o1.o o2.o
boson-fcat.f90: boson.f90
$(FCAT) -count boson.f90 > boson-fcat.f90
boson: boson-fcat.f90 change_working_dir.o $(bosonsubs) $(bosonmods)
$(FC) $(FFLAGS) -o bosonf90 boson-fcat.f90 change_working_dir.o $(bosonsubs)
eelsmods = quanc8_mod.mod queels_mod.mod seteps_mod.mod
doeels-fcat.f90: doeels.f90
$(FCAT) -count doeels.f90 > doeels-fcat.f90
doeels.o: doeels-fcat.f90 $(eelsmods)
queels_mod.mod: quanc8_mod.mod fint1_mod.mod fint2_mod.mod fint3_mod.mod
quanc8_mod.mod: fun_mod.mod
fint1_mod.mod: surlos_mod.mod
fint2_mod.mod: surlos_mod.mod
fint3_mod.mod: surlos_mod.mod
eelssubs = doeels.o usurlo.o quanc8.o fun.o queels.o fint1.o fint2.o fint3.o surlos.o seteps.o phint.o qrat.o
eels-fcat.f90: eels.f90
$(FCAT) -count eels.f90 > eels-fcat.f90
eels: eels-fcat.f90 change_working_dir.o $(eelssubs) $(eelsmods)
$(FC) $(FFLAGS) -o eelsf90 eels-fcat.f90 change_working_dir.o $(eelssubs)
eels-boson: eels-boson.f90 change_working_dir.o $(eelssubs) $(eelsmods) $(bosonsubs) $(bosonmods)
$(FC) $(FFLAGS) -o eels-boson eels-boson.f90 change_working_dir.o $(eelssubs) $(bosonsubs)
pylibs: doeels-py doboson-py
doeels-py: doeels.f90 quanc8.f90 surlos.f90 fint1.f90 fint2.f90 fint3.f90 queels.f90 phint.f90 qrat.f90 usurlo.f90
$(PYTHON3) -m numpy.f2py -c seteps.f90 doeels.f90 quanc8.f90 surlos.f90 fint1.f90 fint2.f90 fint3.f90 queels.f90 phint.f90 qrat.f90 usurlo.f90 -m doeels
doboson-py: doboson.f90 sicot.f90 sintr.f90 rcffi.f90 respon.f90 o1.f90 o2.f90
$(PYTHON3) -m numpy.f2py -c o1.f90 o2.f90 sintr.f90 rcffi.f90 respon.f90 sicot.f90 doboson.f90 -m doboson
fcat: eelsf90 bosonf90
./eelsf90 > eelsf90_fcat_output
fcat -count eels_all.f90 eelsf90_fcat_output > eels_all.f90.fcat-analysis.f90
fcat -count eels.f90 eelsf90_fcat_output
# fcat -report eels.f90 eelsf90_fcat_output
./bosonf90 > bosonf90_fcat_output
fcat -count boson_all.f90 bosonf90_fcat_output > boson_all.f90.fcat-analysis.f90
fcat -count boson.f90 bosonf90_fcat_output
fcat -count doboson.f90 bosonf90_fcat_output
# fcat -report boson.f90 bosonf90_fcat_output
clean:
rm -f *.dSYM
rm -f *mod.mod
rm -f *_all-fcat.f90
rm -f bosonf90 bosonf90.exe
rm -f eelsf90 eelsf90.exe
rm -f eelsou bosou
rm -f *f90_fcat_output
rm -f *_all.f90.fcat-analysis.f90
.PHONY: all clean
rm -f *.o
rm -rf *.dSYM
rm -rf *.mod
rm -rf *.so
rm -rf *-fcat.*
rm -f bosonf90 bosonf90.exe
rm -f eelsf90 eelsf90.exe
rm -f eels-boson eels-boson.exe
.PHONY: all clean pylibs fcat
......@@ -132,7 +132,10 @@ program boson
stop
call FCAT_boson_all_rep()
end program boson
<<<<<<< HEAD
=======
>>>>>>> coverage
subroutine change_working_dir()
! This routine gets the first argument of the commandline and takes it
......@@ -169,7 +172,10 @@ subroutine change_working_dir()
call FCAT_boson_all(55)
return
end subroutine change_working_dir
<<<<<<< HEAD
=======
>>>>>>> coverage
double precision function respon(w, width)
!*******************************************************************
......@@ -208,7 +214,12 @@ double precision function respon(w, width)
return
call FCAT_boson_all_rep()
end function respon
<<<<<<< HEAD
=======
module sicot_mod
contains
>>>>>>> coverage
subroutine sicot(f, m, h, x0)
! *******************************************************************
......@@ -237,6 +248,11 @@ subroutine sicot(f, m, h, x0)
! * *
! *******************************************************************
<<<<<<< HEAD
=======
use sintr_mod
>>>>>>> coverage
implicit none
double precision, intent(in out) :: f(*)
......@@ -249,6 +265,7 @@ subroutine sicot(f, m, h, x0)
logical :: debug
<<<<<<< HEAD
interface
subroutine sintr(f, msign, h)
double precision, intent(in out) :: f(*)
......@@ -257,6 +274,8 @@ subroutine sicot(f, m, h, x0)
end subroutine sintr
end interface
=======
>>>>>>> coverage
call FCAT_boson_all(67)
debug = .false.
call FCAT_boson_all(68)
......@@ -358,7 +377,13 @@ subroutine sicot(f, m, h, x0)
call FCAT_boson_all(109)
return
end subroutine sicot
<<<<<<< HEAD
=======
end module sicot_mod
module sintr_mod
contains
>>>>>>> coverage
subroutine sintr(f, msign, h)
! *******************************************************************
......@@ -693,7 +718,13 @@ subroutine sintr(f, msign, h)
call FCAT_boson_all(246)
return
end subroutine sintr
<<<<<<< HEAD
=======
end module sintr_mod
module rcffi_mod
contains
>>>>>>> coverage
subroutine rcffi(ar, ai, msign, h)
! *******************************************************************
......@@ -996,7 +1027,11 @@ subroutine rcffi(ar, ai, msign, h)
call FCAT_boson_all(367)
return
end subroutine rcffi
<<<<<<< HEAD
=======
end module rcffi_mod
>>>>>>> coverage
subroutine doboson(t, width, gauss, asym, emin, emax, wmin, wmax, np, p, xout, yout, nout)
! *******************************************************************
......@@ -1021,6 +1056,13 @@ subroutine doboson(t, width, gauss, asym, emin, emax, wmin, wmax, np, p, xout, y
! * nout: Number of points of this computation *
! *******************************************************************
<<<<<<< HEAD
=======
use rcffi_mod
use sicot_mod
use sintr_mod
>>>>>>> coverage
implicit none
double precision, intent(in) :: t, width, gauss, asym, emin, emax, wmin
......@@ -1046,6 +1088,7 @@ subroutine doboson(t, width, gauss, asym, emin, emax, wmin, wmax, np, p, xout, y
logical :: debug
<<<<<<< HEAD
interface
subroutine rcffi(ar, ai, msign, h)
double precision, intent(in out) :: ar(*)
......@@ -1066,6 +1109,8 @@ subroutine doboson(t, width, gauss, asym, emin, emax, wmin, wmax, np, p, xout, y
end subroutine sintr
end interface
=======
>>>>>>> coverage
! remark : the two arrays r1 and r2 are used for fourier
! transforming the user-supplied instrumental response of the
! spectrometer that has to be coded in the external routine
......@@ -1572,7 +1617,10 @@ subroutine doboson(t, width, gauss, asym, emin, emax, wmin, wmax, np, p, xout, y
call FCAT_boson_all(596)
return
end subroutine doboson
<<<<<<< HEAD
=======
>>>>>>> coverage
double precision function o1(u)
implicit none
......@@ -1588,7 +1636,10 @@ double precision function o1(u)
call FCAT_boson_all(599)
return
end function o1
<<<<<<< HEAD
=======
>>>>>>> coverage
double precision function o2(u)
implicit none
......
......@@ -83,7 +83,10 @@ program boson
deallocate (xout, yout)
stop
end program boson
<<<<<<< HEAD
=======
>>>>>>> coverage
subroutine change_working_dir()
! This routine gets the first argument of the commandline and takes it
......@@ -109,7 +112,10 @@ subroutine change_working_dir()
return
end subroutine change_working_dir
<<<<<<< HEAD
=======
>>>>>>> coverage
double precision function respon(w, width)
!*******************************************************************
......@@ -136,7 +142,12 @@ double precision function respon(w, width)
endif
return
end function respon
<<<<<<< HEAD
=======
module sicot_mod
contains
>>>>>>> coverage
subroutine sicot(f, m, h, x0)
! *******************************************************************
......@@ -165,6 +176,11 @@ subroutine sicot(f, m, h, x0)
! * *
! *******************************************************************
<<<<<<< HEAD
=======
use sintr_mod
>>>>>>> coverage
implicit none
double precision, intent(in out) :: f(*)
......@@ -177,6 +193,7 @@ subroutine sicot(f, m, h, x0)
logical :: debug
<<<<<<< HEAD
interface
subroutine sintr(f, msign, h)
double precision, intent(in out) :: f(*)
......@@ -185,6 +202,8 @@ subroutine sicot(f, m, h, x0)
end subroutine sintr
end interface
=======
>>>>>>> coverage
debug = .false.
if (m == 0) then
f(1) = 0.0d0
......@@ -241,7 +260,13 @@ subroutine sicot(f, m, h, x0)
call sintr(f, msign, h)
return
end subroutine sicot
<<<<<<< HEAD
=======
end module sicot_mod
module sintr_mod
contains
>>>>>>> coverage
subroutine sintr(f, msign, h)
! *******************************************************************
......@@ -438,7 +463,13 @@ subroutine sintr(f, msign, h)
f(1) = 0.0d0
return
end subroutine sintr
<<<<<<< HEAD
=======
end module sintr_mod
module rcffi_mod
contains
>>>>>>> coverage
subroutine rcffi(ar, ai, msign, h)
! *******************************************************************
......@@ -619,7 +650,11 @@ subroutine rcffi(ar, ai, msign, h)
enddo
return
end subroutine rcffi
<<<<<<< HEAD
=======
end module rcffi_mod
>>>>>>> coverage
subroutine doboson(t, width, gauss, asym, emin, emax, wmin, wmax, np, p, xout, yout, nout)
! *******************************************************************
......@@ -644,6 +679,13 @@ subroutine doboson(t, width, gauss, asym, emin, emax, wmin, wmax, np, p, xout, y
! * nout: Number of points of this computation *
! *******************************************************************
<<<<<<< HEAD
=======
use rcffi_mod
use sicot_mod
use sintr_mod
>>>>>>> coverage
implicit none
double precision, intent(in) :: t, width, gauss, asym, emin, emax, wmin
......@@ -669,6 +711,7 @@ subroutine doboson(t, width, gauss, asym, emin, emax, wmin, wmax, np, p, xout, y
logical :: debug
<<<<<<< HEAD
interface
subroutine rcffi(ar, ai, msign, h)
double precision, intent(in out) :: ar(*)
......@@ -689,6 +732,8 @@ subroutine doboson(t, width, gauss, asym, emin, emax, wmin, wmax, np, p, xout, y
end subroutine sintr
end interface
=======
>>>>>>> coverage
! remark : the two arrays r1 and r2 are used for fourier
! transforming the user-supplied instrumental response of the
! spectrometer that has to be coded in the external routine
......@@ -964,7 +1009,10 @@ subroutine doboson(t, width, gauss, asym, emin, emax, wmin, wmax, np, p, xout, y
deallocate (p2)
return
end subroutine doboson
<<<<<<< HEAD
=======
>>>>>>> coverage
double precision function o1(u)
implicit none
......@@ -977,7 +1025,10 @@ double precision function o1(u)
return
end function o1
<<<<<<< HEAD
=======
>>>>>>> coverage
double precision function o2(u)
implicit none
......
This diff is collapsed.
This diff is collapsed.
eelsou
bosou
.SUFFIXES: .f90 .F90 .o
# fortran compiler
FC = gfortran
# fortran compiler options
FFLAGS = -g -gdwarf-2 -fbounds-check -fcheck=all --coverage
# gfortran version 4.8 does not know -fdiagnostics-color
# safeguard for major version >= 5
GFORTAN_VERSION_GT_5 := $(shell echo `gcc -dumpversion | cut -f1 -d. ` \>= 5 | bc)
ifeq "$(GFORTAN_VERSION_GT_5)" "1"
FFLAGS += -fdiagnostics-color=auto
endif
# implicit rules for compiling fortran files
%.o: ../%.f90 ; $(FC) $(FFLAGS) -c $<
%_mod.mod: ../%.f90 ; $(FC) $(FFLAGS) -c $<
all: boson eels eels-boson
bosonmods = sicot_mod.mod sintr_mod.mod rcffi_mod.mod
doboson.o: ../doboson.f90 $(bosonmods)
sicot_mod.mod: sintr_mod.mod
bosonsubs = doboson.o respon.o sicot.o sintr.o rcffi.o o1.o o2.o
boson: ../boson.f90 change_working_dir.o $(bosonsubs) $(bosonmods)
$(FC) $(FFLAGS) -o bosonf90 ../boson.f90 change_working_dir.o $(bosonsubs)
eelsmods = quanc8_mod.mod queels_mod.mod seteps_mod.mod
doeels.o: ../doeels.f90 $(eelsmods)
queels_mod.mod: quanc8_mod.mod fint1_mod.mod fint2_mod.mod fint3_mod.mod
quanc8_mod.mod: fun_mod.mod
fint1_mod.mod: surlos_mod.mod
fint2_mod.mod: surlos_mod.mod
fint3_mod.mod: surlos_mod.mod
eelssubs = doeels.o usurlo.o quanc8.o fun.o queels.o fint1.o fint2.o fint3.o surlos.o seteps.o phint.o qrat.o
eels: ../eels.f90 change_working_dir.o $(eelssubs) $(eelsmods)
$(FC) $(FFLAGS) -o eelsf90 ../eels.f90 change_working_dir.o $(eelssubs)
eels-boson: ../eels-boson.f90 change_working_dir.o $(eelssubs) $(eelsmods) $(bosonsubs) $(bosonmods)
$(FC) $(FFLAGS) -o eels-boson ../eels-boson.f90 change_working_dir.o $(eelssubs) $(bosonsubs)
coverage: boson eels eels-boson
./eelsf90
./bosonf90
./eels-boson
gcov change_working_dir
gcov bosonf90-boson
gcov doboson
gcov sicot
gcov sintr
gcov rcffi
gcov respon
gcov eelsf90-eels
gcov doeels
gcov fint1
gcov fint2
gcov fint3
gcov fun
gcov o1
gcov o2
gcov phint
gcov qrat
gcov quanc8
gcov queels
gcov seteps
gcov surlos
gcov usurlo
gcov eels-boson-eels-boson
clean:
rm -f *.o
rm -rf *.dSYM
rm -f *.mod
rm -f *.so
rm -f *.gcno
rm -f *.gcda
rm -f *.gcov
rm -f eelsou bosou
rm -f bosonf90 bosonf90.exe
rm -f eelsf90 eelsf90.exe
rm -f eels-boson eels-boson.exe
.PHONY: all clean coverage
300.0 t
25.0 width
0.5 gauss
0.3 asym
-500.0 emin
1200.0 emax
4.0 E0 ABTI0002
60.0 THETA ABTI0003
1.8 PHIA ABTI0004
1.8 PHIB ABTI0005
50.0 WMIN ABTI0006
700.0 WMAX ABTI0007
2.0 DW ABTI0008
WFW: MnO layer on metal
ABTI0010
2 1 No-layers NPER No-periodic
MnO 994.00D+00 LAYER 1 name thickness
4.95 1 epsinf No-Osc.
269.0 16.000 5.00000E-02 wto, Q, lambda
Platinum 1000.00D+00 LAYER 2 ABTI0012
8.90 1 ABTI0013
160000.0 -1 12.0000E-02 ABTI0014
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment