makefile 2.66 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
## ============================================================
## INTEL COMPILERS
## ============================================================
#
#CC = mpicc
#CFLAGS = -Wall -g -openmp -I.  -I${MKLROOT}/include
#CFLAGS = -Wall -openmp -I. -I${MKLROOT}/include
#CLFLAGS = -Wall -fopenmp -I. -I${MKLROOT}/include
#
#CLINKER = mpicc
#FLINKER = mpif77
#LDFLAGS = -openmp
#LIBLIST = -L. -lhbio -lclock -lsparsenew -lvector -lm -lc
#LIBLIST = -L. -lhbio -lclock -lvector -lm -lc
#LIBLIST = -L. -lhbio -lclock -lm -lc
#LIBLIST = -L. -lsparse -lvector -lclock -lm -lc
#
##LIBMKL = -L$(MKLROOT)/lib/intel64 $(MKL_FMULTIS_INTEL)
#LIBMKL = -L${MKLROOT}/lib/intel64 -lmkl_intel_lp64 -lmkl_core -lmkl_sequential -lpthread

# ============================================================
# GNU COMPILERS
# ============================================================
24
25
DIR = /home/martini/mam_bicgstab
APP = malleability/build
26
MAMFLAGS = -I$(DIR)/malleability -L$(DIR)/$(APP) -Wl,-rpath=$(DIR)/$(APP) -lmam
27

28
CC = mpicc
29
CFLAGS = -std=c++11 -mavx -fabi-version=0 -Wall -fopenmp -I. -I${MKLROOT}/include -I${HOME}/libs
30
#CFLAGS = -std=c++11 -Wall -fopenmp -I. -I${MKLROOT}/include -I${HOME}/libs
31
CLFLAGS = -Wall -fopenmp -I. -I${MKLROOT}/include
32
CFLAGS = -Wall -fopenmp -I. -I${HOME}/libs #ADDED BY IKER
33
34
35
36
37
38
39
40
41

CLINKER = mpicxx
LDFLAGS = -fopenmp
LIBLIST = -L. -lhbio -lclock -lsparsenew -lvector -lm -lc
LIBLIST = -L. -lhbio -lclock -lvector -lm -lc
LIBLIST = -L. -lhbio -lclock -lm -lc
LIBLIST = -L. -lsparse -lvector -lclock -lm -lc

LIBMKL = -L${MKLROOT}/lib/intel64 -lmkl_intel_lp64 -lmkl_core -lmkl_sequential -lpthread
42
LIBMKL = 
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

# ============================================================

AR = ar
ARFLAGS = ru

RL = ranlib

# ============================================================

OBJS_CLOCK  = reloj.o 
OBJS_VECTOR = ScalarVectors.o
OBJS_SPARSE = hb_io.o SparseProduct.o

OBJS = $(OBJS_CLOCK) $(OBJS_VECTOR) $(OBJS_SPARSE) 

# ============================================================

default: libclock.a libvector.a libsparse.a BiCGStab 

libshared.a : $(OBJS)
	$(AR) $(ARFLAGS) $@ $?
	$(RL) $(RLFLAGS) $@

libclock.a : $(OBJS_CLOCK)
	$(AR) $(ARFLAGS) $@ $?
	$(RL) $(RLFLAGS) $@

libvector.a : $(OBJS_VECTOR)
	$(AR) $(ARFLAGS) $@ $?
	$(RL) $(RLFLAGS) $@

libsparse.a : $(OBJS_SPARSE)
	$(AR) $(ARFLAGS) $@ $?
	$(RL) $(RLFLAGS) $@

79
80
BiCGStab: BiCGStab.o ToolsMPI.o ToolsMAM.o matrix.o mymkl.o
	$(CLINKER) $(LDFLAGS) -o BiCGStab BiCGStab.o ToolsMPI.o ToolsMAM.o matrix.o mymkl.o $(LIBMKL) $(LIBLIST) $(MAMFLAGS) 
81
82
83
84
85

# ============================================================

.c.o:
	echo compiling
86
	$(CC) $(CFLAGS) -c $*.c 
87
88
89
90
91

clean:
	rm -f *.o *.a BiCGStab 

# ============================================================