-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathmakefile
106 lines (84 loc) · 5.28 KB
/
makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
goal: duo
tarball:
tar cfz duo$(PLAT).tar.gz makefile *.f90
checkin:
ci -l Makefile *.f90
#FPATH =
EXE = j-duo-2605.x
FOR = ifort # Fortran compiler
##FOR = gfortran
# Lorenzo Lodi ---- meaning of some flags used by the Intel fortran compiler
# see (e.g.) file:///opt/intel/composer_xe_2011_sp1.8.273/Documentation/en_US/compiler_f/main_for/index.htm
# -O0 removes compiler optimization of the code. Code is slower in execution but compilation is much faster.
# -fltconsistency disables some optimisations which may lead to very small numerical roundoff errors
# -stand f95 gives warnings if non-Fortran95-compliant features are used
# -stand f03 gives warnings if non-Fortran03-compliant features are used
# -check all enables the following run-time checks:
# arg_temp_created => Determines whether checking occurs for actual arguments before routine calls.
# bounds => checks if accessing an out-of-bounds array element (e.g., x(0) when x is defined as x(1:NMAX)
# format => mismatch in the output format, e.g. write(*,'(F10.5)') i , and i is an integer
# output_conversion => output error, e.g. the number won't fit in the given spaces
# pointer => checks for disassociated/uninitialized pointers
# uninit => checks for uninitialized variables
# -warn all enables the following compile-time diagnostic checks:
# alignments => data that is not naturally aligned
# declarations => undeclared names
# errors => warnings are changed to errors
# general => various things
# ignore_loc => %LOC is stripped from an actual argument. (?)
# interfaces => compiler checks the interfaces
# stderrors => Fortran standard violations are changed to errors.
# truncated_source => source exceeds the maximum column width
# uncalled => statement function is never called
# unused => declared variables that are never used.
# usage => questionable programming practices.
# -traceback ***GOLDEN OPTION*** when a run-time error occurs it'll tell you the line in the source code responsible
# -fp-stack-check stops the program immediately when a NaN (Not-a-numeber) error occurs
# Other options:
# -O3 most agressive general optimization setting
# -ip enables additional interprocedural optimizations
# -g generate full debugging information in the object file
# -C compile only (=make .o files), but do not link .o files to produce executable
# -prof-value-profiling=all All value profile types are enabled and value profiling is performed.
#NOTE: -fpe0 will stop on floating-point exceptions. Do not use this flag because LAPACK makes use of divide by zero etc.
#
#FFLAGS = -O0 -fpe0 -fltconsistency -stand f03 -check all -warn all -traceback -fp-stack-check # debugging options
FFLAGS = -O3 -ipo -qopenmp -mkl=parallel # -xHost -fast
#FFLAGS = -C -check bounds -g -gen-interfaces -warn interfaces -check arg_temp_created -prof-value-profiling=all -warn all
#FFLAGS = -O3 -ipo -qopenmp # no optimization -- fast compilation
##FFLAGS = -W -Wall -fbounds-check -pedantic-errors -std=f2008 -Wunderflow -O0 -fbacktrace -g -Wextra
#ARPACK = ~/libraries/ARPACK/libarpack_omp_64.a
LAPACK = -mkl=parallel -static
#LAPACK = -mkl=parallel -static
LIB = $(LAPACK)
###############################################################################
OBJ = F1_hyperfine.o F1_intensity.o grids.o accuracy.o lapack.o timer.o input.o diatom.o refinement.o functions.o symmetry.o dipole.o quadrupole.o header_info.o atomic_and_nuclear_data.o Lobatto.o me_numer.o RWF.o magnetic_dipole.o
diatom.o: symmetry.o functions.o input.o lapack.o Lobatto.o timer.o atomic_and_nuclear_data.o accuracy.o me_numer.o
dipole.o: timer.o accuracy.o diatom.o symmetry.o
quadrupole.o: timer.o accuracy.o diatom.o symmetry.o
magnetic_dipole.o: timer.o accuracy.o diatom.o symmetry.o
duo.o: header_info.o diatom.o accuracy.o refinement.o timer.o dipole.o F1_hyperfine.o F1_intensity.o magnetic_dipole.o quadrupole.o
functions.o: accuracy.o timer.o lapack.o
grids.o: accuracy.o Lobatto.o
header_info.o: accuracy.o
F1_hyperfine.o: accuracy.o diatom.o lapack.o symmetry.o
F1_intensity.o: F1_hyperfine.o accuracy.o diatom.o
me_numer.o : accuracy.o lapack.o timer.o
lapack.o: accuracy.o timer.o
Lobatto.o: accuracy.o timer.o
refinement.o: timer.o accuracy.o diatom.o
symmetry.o: accuracy.o
timer.o: accuracy.o
RWF.o: accuracy.o diatom.o timer.o symmetry.o lapack.o
# clear internal suffix rules
.SUFFIXES:
# specify our own suffix rules
.SUFFIXES: .f90 .o
.f90.o:
$(FOR) -c -o $@ $< $(FFLAGS)
duo: $(OBJ) duo.o
$(FOR) -o $(EXE) $(OBJ) $(FFLAGS) duo.o $(LIB)
clean:
rm -f $(OBJ) *.mod *__genmod.f90 duo.o duo_test_0* eigen_vectors.chk eigen_vib.chk Bob-Rot_centrifugal_functions.dat _Lp__functions.dat Spin-Orbit.dat Spin-spin_functions.dat Dipole_moment_functions.dat Potential_functions.dat Spin-rotation_functions.dat Spin-spin-o__non-diagonal__functions.dat
test: test_duo.f90
$(FOR) -O0 test_duo.f90 -o duo_test.exe