Statistics
| Revision:

root / src / Makefile @ 7

History | View | Annotate | Download (9.5 kB)

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