-
Notifications
You must be signed in to change notification settings - Fork 3
/
makefile
87 lines (74 loc) · 2.71 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
# $^ : dependency list
# $@ : target
#----- Change options and library path according to your system ------------#
#-----------------------------------
# Compiler options and bin path |
#---------------------------------------------------------------------------|
#OPTIONS= -fpp -DMPI -mcmodel=large # for curion2
################# Possible options ##########################################
# MPI_USE : if "YES" MPI paralallism activation with the k-point parallization.
# IF "YES", with "make vaspbaum.mpi" tbfit.mpi will be compiled, and
# Note: possible make command
# make vaspbaum.mpi # generate tbfit execution file
#############################################################################
VBBIN=$(HOME)/code/bin
VBLIB=$(HOME)/code/lib
VERSION="0.0.1"
#####################
# MAC-INTEL COMPILE #
#####################
#FC = mpiifort
FC = mpif90
OPTIONS= -fPIC -fpp
FFLAG = -O2 -heap-arrays -nogen-interfaces -assume byterecl
MPI_USE= YES
BIN = $(VBBIN)
LIB = $(VBLIB)
#---------------------------------------------------------------------------|
MKLPATH = $(MKLROOT)
LAPACK = -L$(MKLPATH)/lib/ \
-lmkl_intel_lp64 -lmkl_sequential \
-lmkl_core -liomp5
INCLUDE = -I$(MKLPATH)/include
#---------------------------------------------------------------------------|
######################### Do not modify below ###############################
#-----------------------------------
# Objects |
#---------------------------------------------------------------------------|
MPI_MOD= blacs_basics.o mpi_basics.o mpi_setup.o
TEST = test.o
MODULE = mykind.o parameters.o do_math.o print_io.o directory.o utils.o $(MPI_MOD) kill.o time.o version.o \
wavecar.o
READER = parse.o read_kpoints.o read_poscar.o
WRITER = write_info.o write_result_cd.o write_result_sw.o write_kpoints.o
GET = get_band_unfold.o get_circular_dichroism.f90
LIBTOOL= ar src
OBJECTS = $(MODULE) vaspbaum.o $(READER) $(WRITER) $(GET) $(TEST)
ifeq ($(MPI_USE), YES)
F90 = $(FC) $(OPTIONS) -DMPI
F90FLAGS = $(FFLAG)
else
F90 = $(FC) $(OPTIONS)
F90FLAGS = $(FFLAG)
endif
#---------------------------------------------------------------------------|
#-----------------------------------
# Suffix rules |
#-----------------------------------
.SUFFIXES: .f .f90
%.o: %.f90
$(F90) $(FFLAG) -c $<
#-----------------------------------
# Targets |
#-----------------------------------
ifeq ($(MPI_USE), YES)
vaspbaum.mpi: $(OBJECTS)
$(F90) -o $@ $^ $(LAPACK) $(INCLUDE)
cp $@ $(BIN)/vaspbaum.mpi
else
vaspbaum.serial: $(OBJECT)
$(F90) -o $@ $^ $(LAPACK) $(INCLUDE)
cp $@ $(BIN)/vaspbaum.serial
endif
clean:
rm *.o *.mod