Makefile.am 6.1 KB
Newer Older
1 2 3 4 5 6 7 8 9
ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS} -I m4

AM_FCFLAGS = @AM_FCFLAGS@ @FC_MODINC@modules @FC_MODOUT@modules 

AM_LDFLAGS = @AM_LDFLAGS@ @BLACS_LDFLAGS@

BLACS_LDFLAGS = @BLACS_LDFLAGS@

# libelpa
10 11 12
if WITH_OPENMP
lib_LTLIBRARIES = libelpa_mt.la
else
13
lib_LTLIBRARIES = libelpa.la
14
endif
15 16 17 18 19

##rule to produce fortran config file:
#config_f90.h: ./config.h
#	grep "^#define" ./config.h > $@

20 21 22 23 24
if WITH_OPENMP
libelpa_mt_la_SOURCES = src/elpa1.F90 src/elpa2.F90
else
libelpa_la_SOURCES = src/elpa1.F90 src/elpa2.F90
endif
25 26

if WITH_GENERIC_SIMPLE
27 28 29 30
if WITH_OPENMP
  libelpa_mt_la_SOURCES += src/elpa2_kernels/elpa2_kernels_complex_simple.f90 \
                                           src/elpa2_kernels/elpa2_kernels_real_simple.f90
else
31
  libelpa_la_SOURCES += src/elpa2_kernels/elpa2_kernels_complex_simple.f90 \
32 33
                                           src/elpa2_kernels/elpa2_kernels_real_simple.f90
endif
34 35 36
endif

if WITH_GENERIC
37 38 39 40
if WITH_OPENMP
  libelpa_mt_la_SOURCES += src/elpa2_kernels/elpa2_kernels_complex.f90 \
                                           src/elpa2_kernels/elpa2_kernels_real.f90
else
41
  libelpa_la_SOURCES += src/elpa2_kernels/elpa2_kernels_complex.f90 \
42 43
                                           src/elpa2_kernels/elpa2_kernels_real.f90
endif
44 45 46
endif

if WITH_BGP
47 48 49 50
if WITH_OPENMP
  libelpa_mt_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_bgp.f90 \
                                           src/elpa2_kernels/elpa2_kernels_complex.f90
else
51
  libelpa_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_bgp.f90 \
52 53
                                           src/elpa2_kernels/elpa2_kernels_complex.f90
endif 
54 55 56
endif

if WITH_BGQ
57 58 59 60
if WITH_OPENMP
  libelpa_mt_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_bgq.f90 \
                                           src/elpa2_kernels/elpa2_kernels_complex.f90 
else
61
  libelpa_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_bgq.f90 \
62 63
                                           src/elpa2_kernels/elpa2_kernels_complex.f90 
endif
64 65 66
endif

if WITH_SSE_AS
67 68 69
if WITH_OPENMP
  libelpa_mt_la_SOURCES += src/elpa2_kernels/elpa2_kernels_asm_x86_64.s
else
70 71
  libelpa_la_SOURCES += src/elpa2_kernels/elpa2_kernels_asm_x86_64.s
endif
72
endif
73 74

if WITH_AVX_SANDYBRIDGE
75 76 77 78
if WITH_OPENMP
  libelpa_mt_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_sse-avx_2hv.c \
                                           src/elpa2_kernels/elpa2_kernels_complex_sse-avx_1hv.cpp
else
79
  libelpa_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_sse-avx_2hv.c \
80 81
                                           src/elpa2_kernels/elpa2_kernels_complex_sse-avx_1hv.cpp
endif
82 83 84
endif

if WITH_AMD_BULLDOZER
85 86 87 88 89
if WITH_OPENMP
  libelpa_mt_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_sse-avx_4hv.c \
                                           src/elpa2_kernels/elpa2_kernels_real_sse-avx_2hv.c \
                                           src/elpa2_kernels/elpa2_kernels_complex_sse-avx_1hv.cpp
else
90
  libelpa_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_sse-avx_4hv.c \
91 92 93
                                           src/elpa2_kernels/elpa2_kernels_real_sse-avx_2hv.c \
                                           src/elpa2_kernels/elpa2_kernels_complex_sse-avx_1hv.cpp
endif
94 95
endif
if WITH_AVX_COMPLEX_BLOCK1
96 97 98
if WITH_OPENMP
 libelpa_mt_la_SOURCES += src/elpa2_kernels/elpa2_kernels_complex_sse-avx_1hv.cpp
else
99 100
  libelpa_la_SOURCES += src/elpa2_kernels/elpa2_kernels_complex_sse-avx_1hv.cpp
endif
101
endif
102 103

if WITH_AVX_COMPLEX_BLOCK2
104 105 106 107
if WITH_OPENMP
  libelpa_mt_la_SOURCES += src/elpa2_kernels/elpa2_kernels_complex_sse-avx_2hv.cpp \
                                           src/elpa2_kernels/elpa2_kernels_complex_sse-avx_1hv.cpp
else
108
  libelpa_la_SOURCES += src/elpa2_kernels/elpa2_kernels_complex_sse-avx_2hv.cpp \
109 110
                                           src/elpa2_kernels/elpa2_kernels_complex_sse-avx_1hv.cpp
endif
111 112 113
endif

if WITH_AVX_REAL_BLOCK2
114 115 116
if WITH_OPENMP
  libelpa_mt_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_sse-avx_2hv.c
else
117 118
  libelpa_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_sse-avx_2hv.c
endif
119
endif
120 121

if WITH_AVX_REAL_BLOCK4
122 123 124
if WITH_OPENMP
  libelpa_mt_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_sse-avx_4hv.c
else
125 126
  libelpa_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_sse-avx_4hv.c
endif
127
endif
128 129

if WITH_AVX_REAL_BLOCK6
130 131 132
if WITH_OPENMP
  libelpa_mt_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_sse-avx_6hv.c
else
133 134
  libelpa_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_sse-avx_6hv.c
endif
135
endif
136

137 138
if WITH_OPENMP
libelpa_mt_la_LDFLAGS = -version-info $(ELPA_SO_VERSION)
139 140
else
libelpa_la_LDFLAGS = -version-info $(ELPA_SO_VERSION)
141
endif
142 143 144 145 146 147 148 149

# install any .mod files in the include/ dir
elpa_includedir = $(includedir)/elpa
nobase_elpa_include_HEADERS = $(wildcard modules/*)

# other files to distribute
filesdir = $(datarootdir)
files_DATA = \
Andreas Marek's avatar
Andreas Marek committed
150 151
	test/read_real.F90 \
	test/read_real_gen.F90 \
152 153
	test/test_complex2.F90 \
	test/test_complex.F90 \
Andreas Marek's avatar
Andreas Marek committed
154
	test/test_complex_gen.F90 \
155 156
	test/test_real2.F90 \
	test/test_real.F90 \
Andreas Marek's avatar
Andreas Marek committed
157
	test/test_real_gen.F90
158 159 160 161 162 163

# pkg-config stuff
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = elpa.pc

# test programs
164 165 166 167 168
if WITH_OPENMP
build_lib = libelpa_mt.la 
else
build_lib = libelpa.la 
endif
Andreas Marek's avatar
Andreas Marek committed
169 170 171

#bindir = $(abs_top_builddir)
bin_PROGRAMS = test_real test_real2 test_complex test_complex2
172

173 174
test_real_SOURCES = test/test_real.F90
test_real_LDADD = $(build_lib)
175

176 177
test_real2_SOURCES = test/test_real2.F90
test_real2_LDADD = $(build_lib)
178

179 180
test_complex_SOURCES = test/test_complex.F90
test_complex_LDADD = $(build_lib)
181

182 183
test_complex2_SOURCES = test/test_complex2.F90
test_complex2_LDADD = $(build_lib)
184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206


check_SCRIPTS = test_real.sh test_real2.sh test_complex.sh test_complex2.sh   
TESTS = $(check_SCRIPTS)

test_real.sh:
	echo "mpiexec -n 2 ./test_real > /dev/null 2>&1" > test_real.sh
	chmod +x test_real.sh	

test_real2.sh:
	echo "mpiexec -n 2 ./test_real2 > /dev/null 2>&1" > test_real2.sh
	chmod +x test_real2.sh	

test_complex.sh:
	echo "mpiexec -n 2 ./test_complex > /dev/null 2>&1" > test_complex.sh
	chmod +x test_complex.sh	

test_complex2.sh:
	echo "mpiexec -n 2 ./test_complex2 > /dev/null 2>&1" > test_complex2.sh
	chmod +x test_complex2.sh	


CLEANFILES = test_real.sh test_real2.sh test_complex.sh test_complex2.sh
207 208

@FORTRAN_MODULE_DEPS@