root / src / Makefile @ 12
Historique | Voir | Annoter | Télécharger (8,02 ko)
1 |
################### Makefile for Path ############ |
---|---|
2 |
# (C) PFL 2008-2014 |
3 |
################################################# |
4 |
# Change the value of Machine before compiling |
5 |
# You might also have to edit the location of |
6 |
# some libraries (like mkl for ifort) |
7 |
|
8 |
Machine=arqg |
9 |
|
10 |
########################################### |
11 |
# # |
12 |
########### Main supported compilers ## |
13 |
# # |
14 |
########################################### |
15 |
ifeq ($(Machine),ifort) |
16 |
# Flags for arq Ifort |
17 |
COMP=ifort |
18 |
#F90=${COMP} -g -check bounds -check format -check uninit -traceback |
19 |
F90=${COMP} -g -traceback |
20 |
F77=${F90} |
21 |
#F90=${COMP} |
22 |
LIBMATH= -L/opt/intel/Compiler/11.1/064/mkl/lib/64 \ |
23 |
-Wl,--start-group -lmkl_intel_lp64 -lmkl_sequential \ |
24 |
-lmkl_core -Wl,--end-group |
25 |
LINK=${COMP} -lguide -lpthread -L/usr/lib/ |
26 |
FreeF=-FR |
27 |
endif |
28 |
|
29 |
ifeq ($(Machine),g95) |
30 |
# Flags for g95 |
31 |
COMP=g95 -g -Wall -fbounds-check |
32 |
#COMP=g95 -fbounds-check -g -ftrace=full -ftrace=frame -save-temps |
33 |
F90=${COMP} |
34 |
F77=${COMP} |
35 |
LIBMATH= -llapack -lblas |
36 |
LINK=${COMP} -L/usr/lib/ |
37 |
FreeF=-ffree-form |
38 |
endif |
39 |
|
40 |
ifeq ($(Machine),gfortran) |
41 |
# Flags for gfortran |
42 |
COMP=gfortran -pedantic -std=gnu |
43 |
F90=${COMP} |
44 |
F77=${COMP} |
45 |
LIBMATH= -llapack -lblas |
46 |
LINK=${COMP} -L/usr/lib/ |
47 |
FreeF=-ffree-form |
48 |
endif |
49 |
|
50 |
ifeq ($(Machine),pgf) |
51 |
# Flags for PGF |
52 |
COMP=pgf90 |
53 |
FLAGS= -mp -fast -Kieee -fastsse -tpp7 -Mipa=fast |
54 |
F90=$(COMP) -c $(FLAGS) |
55 |
LIBMATH= -llapack -lblas |
56 |
LINK=${COMP} $(FLAGS) -L/usr/local/pgi/linux86/6.2/lib -lpthread |
57 |
FreeF=-Mfree |
58 |
endif |
59 |
|
60 |
ifeq ($(Machine),pathscale) |
61 |
# Flags for PathScale |
62 |
COMP=/softs/pathscale/bin/pathf90 |
63 |
F90=${COMP} |
64 |
LIBMATH= -llapack -lblas |
65 |
LINK=${COMP} -L/usr/lib/ |
66 |
FreeF=-FR |
67 |
endif |
68 |
|
69 |
ifeq ($(Machine),xlf) |
70 |
# Flags for Xlf |
71 |
COMP=xlf |
72 |
F90=${COMP} |
73 |
LIBMATH= -llapack -lblas |
74 |
LINK=${COMP} -L/usr/lib/ |
75 |
FreeF=-qfree |
76 |
endif |
77 |
|
78 |
############################################ |
79 |
# |
80 |
# national center |
81 |
# |
82 |
############################################ |
83 |
# |
84 |
#### IDRIS |
85 |
# |
86 |
ifeq ($(Machine),vargas) |
87 |
# Flags for Xlf |
88 |
COMP=xlf |
89 |
F90=${COMP} |
90 |
F77=${COMP} |
91 |
LINK=${COMP} -L/usr/lib/ |
92 |
FreeF=-qfree |
93 |
endif |
94 |
|
95 |
ifeq ($(Machine),idris) |
96 |
# Flags for Xlf |
97 |
COMP=xlf |
98 |
F90=${COMP} |
99 |
F77=${COMP} |
100 |
LINK=${COMP} -L/usr/lib/ |
101 |
FreeF=-qfree |
102 |
endif |
103 |
# |
104 |
#### CINES |
105 |
# |
106 |
|
107 |
ifeq ($(Machine),jade) |
108 |
# Flags for Ifort |
109 |
COMP=ifort |
110 |
F90=${COMP} |
111 |
F77=${COMP} |
112 |
LIBMATH= -Wl,--start-group -lmkl_intel_lp64 -lmkl_sequential \ |
113 |
-lmkl_core -Wl,--end-group |
114 |
LINK=${COMP} -lguide -lpthread |
115 |
FreeF=-FR |
116 |
endif |
117 |
|
118 |
ifeq ($(Machine),zeus) |
119 |
# Flags for Xlf |
120 |
COMP=xlf |
121 |
F90=${COMP} |
122 |
F77=${COMP} |
123 |
LINK=${COMP} -L/usr/lib/ |
124 |
FreeF=-qfree |
125 |
endif |
126 |
|
127 |
|
128 |
############################################ |
129 |
# |
130 |
# local machines at the ENS Lyon |
131 |
# |
132 |
############################################ |
133 |
|
134 |
ifeq ($(Machine),arq) |
135 |
# Flags for arq Ifort |
136 |
COMP=ifort |
137 |
F90=${COMP} -g -check all -traceback |
138 |
F77=${F90} |
139 |
#F90=${COMP} |
140 |
LINK=${COMP} -lguide -lpthread |
141 |
FreeF=-FR |
142 |
endif |
143 |
|
144 |
ifeq ($(Machine),arqg) |
145 |
# Flags for arq GFortran |
146 |
COMP=gfortran -g -fbacktrace -fbounds-check -Wall -Wextra |
147 |
F90=${COMP} |
148 |
F77=${F90} |
149 |
LIBMATH= -llapack -lblas |
150 |
LINK=${COMP} -L/usr/lib/ |
151 |
FreeF=-ffree-form |
152 |
endif |
153 |
|
154 |
ifeq ($(Machine),psmn) |
155 |
# Flags for PSMN PathScale |
156 |
COMP=/softs/pathscale/bin/pathf90 |
157 |
F90=${COMP} |
158 |
LINK=${COMP} -L/usr/lib/ |
159 |
FreeF=-FR |
160 |
endif |
161 |
|
162 |
ifeq ($(Machine),psmnI) |
163 |
# Flags for PSMN Ifort v12 |
164 |
COMP=ifort |
165 |
F90=${COMP} -g -check all -traceback |
166 |
F77=${F90} |
167 |
#F90=${COMP} |
168 |
LIBMATH= -L/softs/intel/v12.0.084/mkl/lib/intel64 \ |
169 |
-L/softs/intel/v12.0.084/lib/intel64 -L/usr/lib \ |
170 |
-Wl,--start-group -lmkl_intel_lp64 -lmkl_sequential \ |
171 |
-lmkl_core -Wl,--end-group |
172 |
LINK=${COMP} |
173 |
FreeF=-FR |
174 |
endif |
175 |
|
176 |
|
177 |
ifeq ($(Machine),psmnI11) |
178 |
# Flags for PSMN Ifort v11 |
179 |
COMP=ifort |
180 |
F90=${COMP} -g -check all -traceback |
181 |
F77=${F90} |
182 |
#F90=${COMP} |
183 |
LIBMATH= -L/softs/intel/v11.1.069/mkl/lib/em64t \ |
184 |
-Wl,--start-group -lmkl_intel_lp64 -lmkl_sequential \ |
185 |
-lmkl_core -Wl,--end-group |
186 |
LINK=${COMP} -lguide -lpthread -L/usr/lib/ |
187 |
FreeF=-FR |
188 |
endif |
189 |
|
190 |
############################################################### |
191 |
# |
192 |
# Help Makefile |
193 |
# voir: http://gl.developpez.com/tutoriel/outil/makefile/ |
194 |
# |
195 |
############################################################### |
196 |
# $@ Le nom de la cible |
197 |
# $< Le nom de la première dépendance |
198 |
# $^ La liste des dépendances |
199 |
# $? La liste des dépendances plus récentes que la cible |
200 |
# $* Le nom du fichier sans suffixe |
201 |
|
202 |
SRC= Path.f90 \ |
203 |
PathCreate.f90 \ |
204 |
Read_geom.f90 \ |
205 |
ReadGeom_cart.f90 \ |
206 |
ReadGeom_vasp.f90 \ |
207 |
ReadGeom_turbomole.f90 \ |
208 |
ReadGeom_siesta.f90 \ |
209 |
ReadInput.f90 \ |
210 |
ReadInput_gaussian.f90 \ |
211 |
ReadInput_vasp.f90 \ |
212 |
ReadInput_mopac.f90 \ |
213 |
ReadInput_siesta.f90 \ |
214 |
ReadAnaList.f90 \ |
215 |
Set_FileDelim.f90 \ |
216 |
PrintAnaList.f90 \ |
217 |
AnaPath.f90 \ |
218 |
AnalyzeGeom.f90 \ |
219 |
Calc_zmat.f90 \ |
220 |
Calc_zmat_frag.f90 \ |
221 |
Calc_zmat_constr_frag.f90 \ |
222 |
Decomp_frag.f90 \ |
223 |
Calc_mixed_frag.f90 \ |
224 |
Calc_baker.f90 \ |
225 |
Calc_Xprim.f90 \ |
226 |
Calc_baker_allGeomF.f90 \ |
227 |
ConvertZmat_cart.f90 \ |
228 |
ConvertBakerInternal_cart.f90 \ |
229 |
ConvertZmat_cart_3.f90 \ |
230 |
Die.f90 \ |
231 |
Warning.f90 \ |
232 |
WriteList.f90 \ |
233 |
SearchInput.f90 \ |
234 |
CleanString.f90 \ |
235 |
InString.f90 \ |
236 |
NoComment.f90 \ |
237 |
NoString.f90 \ |
238 |
Egrad.f90 \ |
239 |
EgradPath.f90 \ |
240 |
egrad_gaussian.f90 \ |
241 |
egrad_mopac.f90 \ |
242 |
egrad_siesta.f90 \ |
243 |
egrad_ext.f90 \ |
244 |
egrad_test.f90 \ |
245 |
egrad_test_2D.f90 \ |
246 |
egrad_vasp.f90 \ |
247 |
egrad_turbomole.f90 \ |
248 |
egrad_LEPS.f90 \ |
249 |
CalcHess.f90 \ |
250 |
Hupdate_all.f90 \ |
251 |
Hupdate_MS.f90 \ |
252 |
Hupdate_Bofill.f90 \ |
253 |
Hinvup_BFGS.f90 \ |
254 |
Hinvup_DFP.f90 \ |
255 |
CalcTangent.f90 \ |
256 |
Step_RFO_all.f90 \ |
257 |
Step_GEDIIS.f90 \ |
258 |
Step_GEDIIS_All.f90 \ |
259 |
Energy_GEDIIS.f90 \ |
260 |
Step_DIIS_all.f90 \ |
261 |
Extrapol_int.f90 \ |
262 |
Extrapol_baker.f90 \ |
263 |
Extrapol_mixed.f90 \ |
264 |
Extrapol_cart.f90 \ |
265 |
IntCoord_der.f90 \ |
266 |
Step_DIIS.f90 \ |
267 |
Step_GDIIS_Simple_Err.f90 \ |
268 |
minv.f90 \ |
269 |
Space.f90 \ |
270 |
Space_GEDIIS.f90 \ |
271 |
Space_GEDIIS_all.f90 \ |
272 |
Space_all.f90 \ |
273 |
freemv.f90 \ |
274 |
Mat_util.f90 |
275 |
|
276 |
SRC0= ConvertNumAt.f90 \ |
277 |
CheckPeriodicBound.f90 \ |
278 |
Check_step.f90 \ |
279 |
TestCart.f90 \ |
280 |
Opt_Geom.f90 \ |
281 |
PrintGeom.f90 \ |
282 |
PrintGeomVasp.f90 \ |
283 |
test_zmat.f90 \ |
284 |
Annul.f90 \ |
285 |
addligne.f90 \ |
286 |
Splin1D.f90 \ |
287 |
bib_oper.f90 \ |
288 |
VectorPer.f90 \ |
289 |
ZmatBuild.f90 \ |
290 |
WriteMixed_Gaussian.f90 \ |
291 |
CalcCnct.f90 \ |
292 |
ConvXyzZmat.f90 \ |
293 |
ConvXyzMixed.f90 \ |
294 |
Add2indzmat.f90 \ |
295 |
CalcRmsd.f90\ |
296 |
AlignPartial.f90 \ |
297 |
Rotation_matrix.f90 \ |
298 |
valid.f90 \ |
299 |
upcase.f90\ |
300 |
CalcBMat_int.f90 \ |
301 |
CalcBMat_mixed.f90 \ |
302 |
ConvGrad_Cart2Int.f90 \ |
303 |
Int2cart.f90 \ |
304 |
Mixed2cart.f90 \ |
305 |
Write_path.f90 \ |
306 |
Write_vasp.f90 \ |
307 |
sinangle.f90 \ |
308 |
Header.f90 \ |
309 |
gaussj.f90 \ |
310 |
Expand.f90 |
311 |
|
312 |
MAIN= $(SRC:.f90=.o) |
313 |
TOOLS= $(SRC0:.f90=.o) |
314 |
|
315 |
MOD = VarTypes.mod \ |
316 |
Path_module.mod \ |
317 |
Io_module.mod |
318 |
|
319 |
MODo = $(MOD:.mod=.o) |
320 |
MODSRC = $(MOD:.mod=.f90) |
321 |
|
322 |
OBJ = ${MAIN} ${TOOLS} |
323 |
|
324 |
EXAMPLES = Path.valid parameter.dat |
325 |
|
326 |
|
327 |
all: path utils |
328 |
|
329 |
install: |
330 |
mkdir -p ${PWD}/../exe |
331 |
ln -s ${PWD}/Path.exe ../exe/. |
332 |
ln -s ${PWD}/../utils/xyz2scan ../exe/. |
333 |
ln -s ${PWD}/../utils/xyz2path ../exe/. |
334 |
|
335 |
path: ${MODo} ${OBJ} |
336 |
${LINK} -o Path.exe ${OBJ} ${MODo} ${LIBMATH} |
337 |
@echo "" |
338 |
@echo "Path.exe has been created." |
339 |
|
340 |
path_noL: ${MODo} ${OBJ} |
341 |
${LINK} -o Path.exe ${OBJ} ${MODo} ./liblapack.a ./librefblas.a |
342 |
@echo "" |
343 |
@echo "Path.exe has been created." |
344 |
|
345 |
util: utils |
346 |
utils: xyz2scan xyz2path |
347 |
@echo "" |
348 |
@echo "Utilities have been created." |
349 |
@echo "Make sure that they are in your PATH environment" |
350 |
|
351 |
xyz2scan: ../utils/Xyz2Scan.f90 |
352 |
${F90} -o ../utils/xyz2scan ../utils/Xyz2Scan.f90 |
353 |
|
354 |
xyz2path: ../utils/Xyz2Path.f90 ../utils/Xyz2Path.param |
355 |
${F90} -o ../utils/xyz2path ../utils/Xyz2Path.f90 |
356 |
|
357 |
clean: |
358 |
rm -f *~ "#"* *.s ${OBJ} *.mod ${MODo} |
359 |
|
360 |
veryclean: clean |
361 |
rm -f Path.exe ../utils/xyz2scan ../utils/xyz2path |
362 |
|
363 |
%.o : %.mod |
364 |
|
365 |
%.o: %.f90 ${MOD} |
366 |
${F90} -c $*.f90 |
367 |
|
368 |
%.o: %.f |
369 |
${F90} -o $@ -c $< |
370 |
|
371 |
%.exe: %.f90 |
372 |
${F90} -o $*.exe $*.f90 |
373 |
chmod u+x $*.exe |
374 |
|
375 |
%.mod: %.f90 |
376 |
${F90} -c $*.f90 |