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