forked from HLRA-JHPCN/HACApK-MAGMA
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.example
executable file
·120 lines (96 loc) · 2.91 KB
/
Makefile.example
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
#SYSTEM = FX10
#SYSTEM = INTEL
#SYSTEM = XC30
#FX10
ifeq ($(SYSTEM),FX10)
OPTFLAGS = -fs
CC=mpifccpx
F90=mpifrtpx -Kfast,openmp
#F90=mpifrtpx -Kopenmp
CCFLAGS = $(OPTFLAGS)
F90FLAGS = $(OPTFLAGS) -Cfpp
LDFLAGS = -SSL2
endif
#intel
ifeq ($(SYSTEM),INTEL)
#OPTFLAGS = -O3 -traceback -ip -heap-arrays -openmp
OPTFLAGS = -openmp -O3 -ip
CC=mpiicc
F90=mpiifort
CCFLAGS = $(OPTFLAGS)
#F90FLAGS = $(OPTFLAGS) -fpp -assume nounderscore -names uppercase
F90FLAGS = $(OPTFLAGS) -fpp
#F90FLAGS = $(OPTFLAGS) -fpp -check all
#F90FLAGS = -fpe0 -traceback -g -CB -assume nounderscore -names lowercase -fpp -check all
#LDFLAGS = -mkl -trace
LDFLAGS = -mkl
endif
#XC30
ifeq ($(SYSTEM),XC30)
OPTFLAGS = -O2 -homp
CC=cc
F90=ftn
CCFLAGS = $(OPTFLAGS)
F90FLAGS = $(OPTFLAGS)
endif
#Tsubame
SYSTEM = TSUBAME
ifeq ($(SYSTEM),TSUBAME)
OPTFLAGS = -openmp -O3 -ip
CC=mpicc
F90=mpif90
CCFLAGS = $(OPTFLAGS)
F90FLAGS = $(OPTFLAGS) -fpp1
LDFLAGS = -mkl
#INCS+= -I/usr/apps.sp3/isv/intel/ParallelStudioXE/ClusterEdition/2016-Update3/compilers_and_libraries_2016.3.210/linux/compiler/include
endif
#CCFLAGS += -g
#F90FLAGS += -g
LINK=$(F90)
OBJS = HACApK_FPGA.o \
m_bem-bb-fw-coordinate.o HACApK_lib.o bem-bb-template-SCM-0.4.1.o m_HACApK_calc_entry_ij.o \
m_HACApK_base.o m_HACApK_solve.o m_HACApK_use.o m_ppohBEM_bembb2hacapk.o bem-bb-fw-HACApK-0.4.1.o \
# PaRSEC
#CPP = mpiicpc
# forcing the link with OpenMPI
#LINK = ifort
#MPI_DIR = /opt/ompi/2.0.1
#INCS = -I$(MPI_DIR)/include
#LIBS = -cxxlib
#LIBS+= $(MPI_DIR)/lib/libmpi_mpifh.so
#PARSEC_DIR = /home/yamazaki/parsec-bitbucket/dplasma
#SOLVER_DIR = /home/yamazaki/pulsar/ierus/main/parsec
#IERUS_DIR = /home/yamazaki/pulsar/ierus/ierus_source/parsec
#OBJS+= HACApK_PaRSEC.o
#LIBS+= $(IERUS_DIR)/ACA.o $(IERUS_DIR)/DataFile.o $(IERUS_DIR)/rsvd.o $(IERUS_DIR)/symbolic.o \
# $(SOLVER_DIR)/lib/*.o $(SOLVER_DIR)/lib/ierus/*.o \
# $(PARSEC_DIR)/libdague.a $(PARSEC_DIR)/data_dist/matrix/libdague_distribution_matrix.a \
# -lpthread -lm -lhwloc
#INCS+= -I$(IERUS_DIR) -I$(SOLVER_DIR)/include \
# -I$(PARSEC_DIR) -I$(PARSEC_DIR)/include
#CCFLAGS += -DHAVE_PaRSEC
#F90FLAGS+= -DHAVE_PaRSEC
# MAGMA
CUDA_DIR = /usr/apps.sp3/cuda/7.5
MAGMA_DIR = /home/usr2/16IH0462/magma/release/magma-2.2.0
INCS+= -I$(CUDA_DIR)/include -I$(MAGMA_DIR)/include
LIBS+= -L$(CUDA_DIR)/lib64 -lcublas -lcusparse -lcudart $(MAGMA_DIR)/lib/libmagma.a
CCFLAGS += -DHAVE_MAGMA
F90FLAGS+= -DHAVE_MAGMA
CCFLAGS += -DHAVE_MAGMA_BATCH
F90FLAGS+= -DHAVE_MAGMA_BATCH
#CCFLAGS += -Wall -Wremarks -Wcheck
TARGET=bem-bb-SCM.out
.SUFFIXES: .o .c .f90
$(TARGET): $(OBJS)
$(LINK) -o $@ $(OBJS) $(LDFLAGS) $(LIBS)
.c.o: *.c
$(CC) -c $(CCFLAGS) $(INCS) $<
.cpp.o: *.c
$(CPP) -c $(CCFLAGS) $(INCS) $<
.f90.o: *.f90
$(F90) -c $< $(F90FLAGS) $(INCS)
clean:
rm -f *.o *.mod $(TARGET)
rmod:
rm -f m_*.o *.mod