forked from JeffersonLab/chroma
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
executable file
·1247 lines (1052 loc) · 37.9 KB
/
configure.ac
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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
AC_INIT(chroma,3.43.0,[email protected])
AC_PREREQ([2.57])
AC_CONFIG_AUX_DIR(./config)
AC_CANONICAL_HOST
AM_INIT_AUTOMAKE([subdir-objects])
dnl stupid templates to shut up stupid autoheader
dnl AC_DEFINE([BUILD_PAB_WILSON_DSLASH],[],[Build Pab Wilson Dslash])
dnl AC_DEFINE([BUILD_SSE_WILSON_DSLASH],[],[Build SSE wilson Dslash])
dnl AC_DEFINE([CHROMA_BUILD_STAGGERED],[], [Build Staggered version of Chroma])
dnl AC_DEFINE([CHROMA_BUILD_WILSON],[],[Build Wilson version of Chroma])
AC_CONFIG_HEADERS([lib/chroma_config_internal.h])
# AC_PRO_MAKE_SET # (RGE) Causes error: do not find in autoconf docs
AC_PROG_CXX(g++)
AC_PROG_CC(gcc)
AC_PROG_RANLIB
##################################
# Check for the correct AR
##################################
AC_CHECK_TOOL(AR, ar, [ar])
dnl
dnl --with-xxxx and --enable-xxxx switches
dnl
dnl George T. Fleming, 12 February 2003
dnl Complete rewrite of configure switches based on new config scripts.
dnl --with-qdp=DIR
AC_ARG_WITH(qdp,
AC_HELP_STRING(
[--with-qdp=DIR],
[Build Chroma on top of QDP++ where QDP++ is installed in DIR]
),
[QDPXX_HOME="$with_qdp"]
)
AC_ARG_ENABLE(sse_wilson_dslash,
AC_HELP_STRING(
[--enable-sse-wilson-dslash],
[Build and Use the SSE2 Wilson Dslash Library])
)
dnl CPP_WILSON_DSLASH_OPTIONS
AC_ARG_ENABLE(cpp_wilson_dslash,
AC_HELP_STRING(
[--enable-cpp-wilson-dslash],
[Build and Use the CPP Wilson Dslash Library. Can also specify --enable-sse2 or --enable-sse3 and requires a QMP location in parscalar more with --with-qmp] )
)
AC_ARG_ENABLE(sse2,
AC_HELP_STRING(
[--enable-sse2],
[Enable SSE2 support in the CPP Wilson Dslash package]
)
)
AC_ARG_ENABLE(sse3,
AC_HELP_STRING(
[--enable-sse3],
[Enable SSE3 support in the CPP Wilson Dslash package]
)
)
AC_ARG_ENABLE(cg-dwf,
AC_HELP_STRING([--enable-cg-dwf=<cpuarch> <cpuarch>=sse,bluelight,altivec]),
[cg_dwf_cpu_arch=${enableval}
build_cg_dwf="yes"],
[cg_dwf_cpu_arch="none"
build_cg_dwf="no"]
)
AC_ARG_ENABLE(cg-dwf-lowmem,
AC_HELP_STRING([--enable-cg-dwf-lowmem=<yes/no> Enable Low/High Memory mode of CG-DWF inverter]),
[ cg_dwf_lowmem="yes"],
[ cg_dwf_lowmem="no" ]
)
AC_ARG_ENABLE(cg-solver-restart,
AC_HELP_STRING([ Enable a single restart in the CG linop syssolvers ]),
[cg_do_one_restart="yes"],
[cg_do_one_restart="no"]
)
AC_ARG_WITH(mdwf,
AC_HELP_STRING([--with-mdwf=<install location>]),
[mdwf_path=${withval}
build_mdwf="yes"],
[mdwf_path=""
build_mdwf="no"]
)
AC_ARG_WITH(llvm-wilson-dslash,
AC_HELP_STRING([--with-llvm-wilson-dslash=<install location>]),
[llvm_wd_path=${withval}
build_llvm_wd="yes"],
[llvm_wd_path=""
build_llvm_wd="no"]
)
AC_ARG_ENABLE(asqtad_level3_inverter,
AC_HELP_STRING(
[--enable-asqtad-level3-inverter],
[Wrap the level3 asqtad inverter])
)
AC_ARG_WITH(bagel_wilson_dslash,
AC_HELP_STRING(
[--with-bagel-wilson-dslash=DIR],
[Use Peter Boyles BAGEL Wilson Dslash Library installed in DIR]
),
[bagel_wilson_dslash_enabled="yes"
BAGEL_WILSON_DSLASH_HOME="${with_bagel_wilson_dslash}"]
)
AC_ARG_ENABLE(bagel_wilson_dslash_sloppy,
AC_HELP_STRING(
[--enable-bagel-wilson-dslash-sloppy],
[Enable Sloppy Precision in BAGEL Dslash -- different internal and external precisions]),
[bagel_wilson_dslash_sloppy="yes"],
[bagel_wilson_dslash_sloppy="no"]
)
AC_ARG_WITH(bagel_clover,
AC_HELP_STRING(
[--with-bagel-clover=DIR],
[Use the BAGEL Clover Apply Library installed in DIR]
),
[bagel_clover_enabled="yes"
BAGEL_CLOVER_HOME="${with_bagel_clover}"]
)
AC_ARG_ENABLE(ssed_clover,
AC_HELP_STRING(
[--enable-ssed-clover],
[Enable SSE Double Prec clover operator]),
[ssed_clover_enabled="${enableval}"],
[ssed_clover_enabled="no"]
)
AC_ARG_ENABLE(jit_clover,
AC_HELP_STRING(
[--enable-jit-clover],
[Enable QDP-JIT clover operator]),
[jit_clover_enabled="${enableval}"],
[jit_clover_enabled="no"]
)
AC_ARG_ENABLE(quda_deviface,
AC_HELP_STRING(
[--enable-quda-deviface],
[Enable QUDA device pointer interface]),
[quda_deviface_enabled="${enableval}"],
[quda_deviface_enabled="no"]
)
AC_ARG_ENABLE(lapack,
AC_HELP_STRING([--enable-lapack=<type>],
[Use the type of lapack bindings specified by <type>. Currently, this can be lapack]),
[LAPACK_BINDING="${enableval}"]
)
AC_ARG_ENABLE(opt-eigcg,
AC_HELP_STRING([--enable-opt-eigcg],
[Build optimized eigcg]),
[opt_eigcg_enabled="${enableval}"],
[opt_eigcg_enabled="no" ]
)
AC_ARG_ENABLE(opt_cfz_linop,
AC_HELP_STRING(
[--enable-opt-cfz-linop],
[Build and use the generic optimized Continued Frac. Zolo. (CFZ) Linear Oper.])
)
AC_ARG_ENABLE(enable_generic_scalarsite_bicgstab_kernels,
AC_HELP_STRING(
[--enable-generic-scalarsite-bicgstab-kernels],
[Switch on kernels to reduce Reliable BiCGStab BLAS memory bandwidth on threaded machines])
)
AC_ARG_ENABLE(enable_sse_scalarsite_bicgstab_kernels,
AC_HELP_STRING(
[--enable-sse-scalarsite-bicgstab-kernels],
[Switch on SSE kernels to reduce Reliable BiCGStab BLAS memory bandwidth on threaded machines])
)
AC_ARG_ENABLE(testcase-runner,
AC_HELP_STRING([--enable-testcase-runner=script],
[Use <script> to run testcases: trivial|cobalt|6n_mpirun_rsh|7n_mpirun_rsh|9q_mpirun_rsh]),
[chroma_testcase_runner=${enable_testcase_runner}],
[chroma_testcase_runner="trivial_runner.sh"]
)
AC_ARG_ENABLE(gtest,
AC_HELP_STRING([--enable-gtest],
[ Enable GoogleTest UnitTesting Framework ]),
[ chroma_enable_gtest=${enable_gtest} ],
[ chroma_enable_gtest="no" ]
)
AC_ARG_WITH(gmp,
AC_HELP_STRING(
[--with-gmp=<DIR>],
[Enable use of GMP - GNU Multi-Precision library, installed in DIR]
),
[gmp_enabled="yes"
GMP_HOME=${with_gmp}],
[gmp_enabled="no"]
)
AC_ARG_WITH(qmt,
AC_HELP_STRING(
[--with-qmt=<DIR>],
[Enable use of QMT Threads library installed in DIR]
),
[ qmt_enabled="yes"
QMT_HOME=${with_qmt} ],
[ qmt_enabled="no" ]
)
AC_ARG_WITH(quda,
AC_HELP_STRING(
[--with-quda=<DIR>],
[Use QUDA Library installed in DIR]
),
[ quda_enabled="yes"
QUDA_HOME=${with_quda} ],
[ quda_enabled="no" ]
)
AC_ARG_WITH(cuda,
AC_HELP_STRING(
[--with-cuda=<DIR>],
[Use CUDA installation in DIR]
),
[ CUDA_HOME=${with_cuda} ],
[ CUDA_HOME="/usr/local/cuda" ]
)
AC_ARG_WITH(qphix-solver,
AC_HELP_STRING(
[--with-qphix-solver=DIR],
[Build Chroma with the QPhiX L3 solver installed in DIR]
),
[qphix_enabled="yes"
QPHIX_HOME="$with_qphix_solver"],
[qphix_enabled="no"]
)
AC_ARG_ENABLE(qphix-solver-arch,
AC_HELP_STRING(
[--enable-qphix-solver-arch=avx|mic|qpx],
[Set Architecture for the QPhiX solver (avx or mic)]
),
[ qphix_arch="${enable_qphix_solver_arch}" ],
[ qphix_arch="avx"]
)
AC_ARG_ENABLE(qphix-solver-soalen,
AC_HELP_STRING(
[--enable-qphix-solver-soalen=S],
[Set Soalen for the QPhiX solver]
),
[ qphix_soalen="${enable_qphix_solver_soalen}" ],
[ qphix_soalen="4" ]
)
AC_ARG_ENABLE(qphix-solver-inner-soalen,
AC_HELP_STRING(
[--enable-qphix-solver-inner-soalen=S],
[Set Inner Solver Soalen for Mixed precision QPhiX solvers]
),
[ qphix_inner_soalen="${enable_qphix_solver_inner_soalen}" ],
[ qphix_inner_soalen="4" ]
)
AC_ARG_ENABLE(qphix-solver-inner-type,
AC_HELP_STRING(
[--enable-qphix-solver-inner-type=half,float,double],
[Set Inner Solver Type for Mixed precision QPhiX solvers]
),
[ qphix_inner_type="${enable_qphix_solver_inner_type}" ],
[ qphix_inner_type="none" ]
)
AC_ARG_ENABLE(qphix-solver-compress12,
AC_HELP_STRING(
[--enable-qphix-solver-compress12],
[If enabled will employ compression in the QPhiX solver]
),
[ qphix_compress12="${enable_qphix_solver_compress12}" ],
[ qphix_sompress12="no" ]
)
dnl level 3 libraries for asqtad inverter
AC_ARG_WITH(asqtadlevel3,
AC_HELP_STRING(
[--with-asqtadlevel3=DIR],
[Build Chroma on top of the level3 asqtad libraries, where the libraries installed in DIR.]
),
[QDPCVER_HOME="$with_asqtadlevel3"]
)
dnl support for MG Solver from QDP/C
AC_ARG_WITH(qdpc,
AC_HELP_STRING(
[--with-qdpc=DIR],
[Use QDPC in directory DOR]
),
[QDPC_DIR="${with_qdpc}"],
[QDPC_DIR="not_given"]
)
AC_ARG_WITH(qmp,
AC_HELP_STRING(
[--with-qmp=DIR],
[Use QMP in directory DIR]
),
[QMP_DIR="${with_qmp}"],
[QMP_DIR="not_given"]
)
AC_ARG_WITH(qla,
AC_HELP_STRING(
[--with-qla=DIR],
[Use QLA in directory DOR]
),
[QLA_DIR="${with_qla}"],
[QLA_DIR="not_given"]
)
AC_ARG_WITH(qopqdp,
AC_HELP_STRING(
[--with-qopqdp=DIR],
[Use QOPQDP in directory DOR]
),
[QOPQDP_DIR="${with_qopqdp}"],
[QOPQDP_DIR="not_given"]
)
AC_ARG_WITH(qio,
AC_HELP_STRING(
[--with-qio=DIR],
[Use QIO for header includes in directory DOR]
),
[QIO_DIR="${with_qio}"],
[QIO_DIR="not_given"]
)
AC_ARG_ENABLE(qop-mg,
AC_HELP_STRING(
[--enable-qop-mg], [ Enable QDP MultiGrid. Needs --with-qla --with-qdp and --with-qdpqop arguments ]
),
[BUILD_QOP_MG=${enableval}]
)
if test "X${QDPCVER_HOME}X" = "XX" ; then
AC_MSG_NOTICE([QDPCVER_HOME variable not set.])
else
AC_SUBST(QDPC_DIR, "${QDPCVER_HOME}")
fi
###########
#
# ISOLVER (Intel Level 3 -- needs a better name ) support
#
###########
if test "X${qphix_enabled}X" = "XyesX";
then
AC_MSG_NOTICE([ Enabling QPhiX L3 Solver in ${QPHIX_HOME}])
AC_DEFINE([BUILD_QPHIX], [], [Build with the QPHIX_LIBRARY])
AC_SUBST(QPHIX_CXXFLAGS, "-I${QPHIX_HOME}/include" )
AC_SUBST(QPHIX_LDFLAGS, "-L${QPHIX_HOME}/lib" )
AC_SUBST(QPHIX_LIBS,"-lqphix_solver")
case "${qphix_arch}" in
avx|AVX)
AC_DEFINE(CHROMA_QPHIX_ARCH_AVX,[], [QPhiX Arch is AVX])
;;
mic|MIC)
AC_DEFINE(CHROMA_QPHIX_ARCH_MIC,[], [QPhiX Arch is MIC])
;;
qpx|QPX)
AC_DEFINE(CHROMA_QPHIX_ARCH_QPX,[], [QPhiX Arch is QPX])
;;
*)
AC_MSG_WARN([ QPhiX Arch not specified: Defaulting to AVX ])
AC_DEFINE(CHROMA_QPHIX_ARCH_AVX,[], [QPhiX Arch is AVX])
;;
esac
AC_MSG_NOTICE([ Enabling Intel L3 Solver Soalen: ${qphix_soalen}] )
AC_DEFINE_UNQUOTED(CHROMA_QPHIX_SOALEN, ${qphix_soalen}, [ The SOA length for QPhiX ])
if test "X${qphix_compress12}X" == "XyesX";
then
AC_DEFINE(CHROMA_QPHIX_COMPRESS12,[true], [Enable Intel Solver Compression])
else
AC_DEFINE(CHROMA_QPHIX_COMPRESS12,[false], [Disable Intel Solver Compression])
fi
AC_MSG_NOTICE([ Enabling Intel L3 Solver Inner Soalen: ${qphix_inner_soalen}] )
AC_DEFINE_UNQUOTED(CHROMA_QPHIX_INNER_SOALEN, ${qphix_inner_soalen}, [ The SOA length for inner solvers for mixed prec QPhiX] )
case "${qphix_inner_type}" in
h|half)
AC_MSG_NOTICE([Setting Intel Solver Type to: half])
AC_DEFINE(CHROMA_QPHIX_INNER_TYPE,[QPhiX::half],[QPhiX Inner Type is half prec])
;;
f|float|single)
AC_MSG_NOTICE([Setting Intel Solver Type to: float])
AC_DEFINE(CHROMA_QPHIX_INNER_TYPE,[float],[QPhiX Inner Type is float ])
;;
d|double)
AC_MSG_NOTICE([Setting Intel Solver Type to: double])
AC_DEFINE(CHROMA_QPHIX_INNER_TYPE,[double],[QPhiX Inner Type is double ] )
;;
*)
AC_MSG_WARN([ QPhiX inner type not specified: Defaulting to float ])
AC_DEFINE(CHROMA_QPHIX_INNER_TYPE,[float], [QPhiX Inner Type is float ] )
;;
esac
fi
AM_CONDITIONAL(BUILD_QPHIX,
[test "x${qphix_enabled}x" = "xyesx" ])
if test "X${QDPXX_HOME}X" = "XX" ; then
AC_PATH_PROG(QDPXX_CONFIG, [qdp++-config], [])
else
AC_PATH_PROG(QDPXX_CONFIG, [qdp++-config], [], [${QDPXX_HOME}/bin:${PATH}])
fi
if test "X${QDPXX_CONFIG}X" = "XX" ; then
AC_MSG_ERROR([QDP++ configuration program qdp++-config not found.])
fi
AC_MSG_NOTICE([Found QDP++ configuration program ${QDPXX_CONFIG}])
AC_SUBST(CXX, "`${QDPXX_CONFIG} --cxx`")
AC_MSG_NOTICE([QDP++ compiler: ${CXX}])
AC_SUBST(QDPXX_CXXFLAGS, "`${QDPXX_CONFIG} --cxxflags`")
AC_MSG_NOTICE([QDP++ compile flags: ${QDPXX_CXXFLAGS}])
AC_SUBST(QDPXX_LDFLAGS, "`${QDPXX_CONFIG} --ldflags`")
AC_MSG_NOTICE([QDP++ linking flags: ${QDPXX_LDFLAGS}])
AC_SUBST(QDPXX_LIBS, "`${QDPXX_CONFIG} --libs`")
AC_MSG_NOTICE([QDP++ libraries flags: ${QDPXX_LIBS}])
AC_SUBST(QDPXX_ND, "`${QDPXX_CONFIG} --Nd`")
if test "X${QDPXX_ND}X" = "XX" ; then
AC_MSG_ERROR([Cannot determine QDP++ spacetime dimension])
else
AC_MSG_NOTICE([QDP++ spacetime dimension: ${QDPXX_ND}])
fi
AC_SUBST(QDPXX_NC, "`${QDPXX_CONFIG} --Nc`")
AC_MSG_NOTICE([QDP++ number of colors: ${QDPXX_NC}])
AC_SUBST(QDPXX_NS, "`${QDPXX_CONFIG} --Ns`")
if test "X${QDPXX_NS}X" = "XX" ; then
AC_MSG_ERROR([Cannot determine number of spin components in QDP++])
else
AC_MSG_NOTICE([QDP++ number of spin components: ${QDPXX_NS}])
fi
AC_SUBST(QDPXX_PARALLEL_ARCH, "`${QDPXX_CONFIG} --parallel-arch`")
AC_MSG_NOTICE([QDP++ parallel arch: ${QDPXX_PARALLEL_ARCH}])
AC_SUBST(QDPXX_PRECISION, "`${QDPXX_CONFIG} --precision`")
AC_MSG_NOTICE([QDP++ precision: ${QDPXX_PRECISION}])
dnl Try to compile a QDP++ program to check the --with options
dnl This function is defined in acinclude.m4
AC_MSG_CHECKING([if we can compile/link a simple QDP++ program])
PAC_QDPXX_LINK_CXX_FUNC(
${QDPXX_CXXFLAGS},
${QDPXX_LDFLAGS},
${QDPXX_LIBS},
,
,
[qdpxx_link_ok=yes],
[qdpxx_link_ok=no]
)
if test "X${qdpxx_link_ok}X" = "XyesX";
then
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
AC_MSG_ERROR([Cannot compile/link a program with QDP++. Use --with-qdp++=<dir> to select a working version.])
fi
dnl ************************************************************************
dnl **** SSE Wilson dslash ****
dnl ************************************************************************
case "$enable_sse_wilson_dslash" in
yes)
if test "X${enable_cpp_wilson_dslash}X" = "XyesX";
then
AC_MSG_ERROR([Cannot compile and link both CPP Wilson Dslash and SSE Wilson Dslash. Disable one of them])
fi
AC_MSG_NOTICE([Configuring SSE Wilson Dslash])
AC_CONFIG_SUBDIRS(other_libs/sse_wilson_dslash)
AC_MSG_NOTICE([Finished configuring SSE Wilson Dslash])
AC_SUBST(SSE_DSLASH_DIR, [sse_wilson_dslash])
AC_DEFINE([BUILD_SSE_WILSON_DSLASH],[],[ Build SSE Dslash Op ])
AC_SUBST(SSE_DSLASH_ENABLED,[yes] )
;;
*)
AC_SUBST(SSE_DSLASH_DIR)
AC_MSG_NOTICE( [Not building SSE Dslash ] )
AC_SUBST(SSE_DSLASH_ENABLED,[no] )
;;
esac
AM_CONDITIONAL(BUILD_SSE_WILSON_DSLASH,
[test "x${enable_sse_wilson_dslash}x" = "xyesx" ])
dnl ************************************************************************
dnl **** CPP DSlash Stuff *****
dnl ************************************************************************
case "$enable_cpp_wilson_dslash" in
yes)
if test "X${enable_sse_wilson_dslash}X" = "XyesX";
then
AC_MSG_ERROR([Cannot compile and link both CPP Wilson Dslash and SSE Wilson Dslash. Disable one of them])
fi
AC_MSG_NOTICE([Configuring CPP Wilson Dslash])
AC_CONFIG_SUBDIRS(other_libs/cpp_wilson_dslash)
AC_MSG_NOTICE([Finished configuring CPP Wilson Dslash])
AC_SUBST(CPP_DSLASH_DIR, [cpp_wilson_dslash])
AC_DEFINE([BUILD_CPP_WILSON_DSLASH],[],[ Build CPP Dslash Ops ])
AC_SUBST(CPP_DSLASH_ENABLED,[yes] )
;;
*)
AC_SUBST(CPP_DSLASH_DIR)
AC_MSG_NOTICE( [Not building CPP Dslash ] )
AC_SUBST(CPP_DSLASH_ENABLED,[no] )
;;
esac
AM_CONDITIONAL(BUILD_CPP_WILSON_DSLASH,
[test "x${enable_cpp_wilson_dslash}x" = "xyesx" ])
dnl ************************************************************************
dnl **** Generic Scalarsite BiCGStab Stuff
dnl ************************************************************************
case "$enable_generic_scalarsite_bicgstab_kernels" in
yes)
AC_MSG_NOTICE([Enabling Generic Scalarsite BiCGStab Kernels])
AC_DEFINE([BUILD_SCALARSITE_BICGSTAB],[],[Build Scalarsite BICGStab Kernels])
AC_DEFINE([BUILD_GENERIC_SCALARSITE_BICGSTAB],[],[Use Generic Kernels ])
;;
*)
;;
esac
dnl ************************************************************************
dnl **** Generic Scalarsite BiCGStab Stuff
dnl ************************************************************************
case "$enable_sse_scalarsite_bicgstab_kernels" in
yes)
AC_MSG_NOTICE([Enabling SSE Scalarsite BiCGStab Kernels])
AC_DEFINE([BUILD_SCALARSITE_BICGSTAB],[],[Build Scalarsite BICGStab Kernels])
AC_DEFINE([BUILD_SSE_SCALARSITE_BICGSTAB],[],[Use Generic Kernels ])
;;
*)
;;
esac
AM_CONDITIONAL(BUILD_SCALARSITE_BICGSTAB,
[test "x${enable_sse_scalarsite_bicgstab_kernels}x" = "xyesx" -o "x${enable_generic_scalarsite_bicgstab_kernels}x" ])
dnl ************************************************************************
dnl **** CG DWF stuff ****
dnl ************************************************************************
if [ test "x${build_cg_dwf}x" = "xyesx" ];
then
AC_MSG_NOTICE([Configuring CG DWF])
if [ test "x${build_mdwf}x" = "xyesx" ];
then
AC_MSG_ERROR([Cannot have both CG-DWF and MDWF configured at the same time])
fi
case ${cg_dwf_cpu_arch} in
sse)
AC_MSG_NOTICE([Configuring CG-DWF for SSE architecture])
;;
bluelight)
AC_MSG_NOTICE([Configuring CG-DWF for BlueLight architecture])
;;
altivec)
AC_MSG_NOTICE([Configuring CG-DWF for AltiVec architecture])
;;
*)
AC_MSG_ERROR([Unknown cpu architecture. Use --enable-cg-dwf=<arch> to select a known one])
;;
esac
AC_MSG_NOTICE([Configuring cg-dwf])
AC_CONFIG_SUBDIRS(other_libs/cg-dwf)
AC_MSG_NOTICE([Finished configuring cg-dwf])
AC_SUBST(CG_DWF_DIR, [cg-dwf])
AC_DEFINE([BUILD_CG_DWF],[1],[Build CG DWF])
AC_SUBST(CG_DWF_ENABLED,[yes])
else
AC_SUBST(CG_DWF_DIR)
AC_MSG_NOTICE([Not building CG DWF])
fi
AM_CONDITIONAL(BUILD_CG_DWF,
[test "x${build_cg_dwf}x" = "xyesx" ])
AM_CONDITIONAL(BUILD_CG_DWF_SSE,
[test "x${cg_dwf_cpu_arch}x" = "xssex" \
-a "x${build_cg_dwf}x"="xyesx"])
AM_CONDITIONAL(BUILD_CG_DWF_BLUELIGHT,
[test "x${cg_dwf_cpu_arch}x" = "xbluelightx" \
-a "x${build_cg_dwf}x"="xyesx" ])
AM_CONDITIONAL(BUILD_CG_DWF_ALTIVEC,
[test "x${cg_dwf_cpu_arch}x" = "xaltivecx" \
-a "x${build_cg_dwf}x"="xyesx" ])
if [ test "x${cg_dwf_lowmem}x" = "xyesx" ];
then
AC_MSG_NOTICE([Configuring CG-DWF in Lower Memory Mode])
AC_DEFINE([CHROMA_USE_CG_DWF_LOWMEM],[1], [Switch in Lower Memory File])
else
AC_MSG_NOTICE([Configuring CG-DWF for Higher Memory Mode])
fi
if [ test "x${cg_do_one_restart}x" = "xyesx" ];
then
AC_MSG_NOTICE([Enabling restart in CG Syssolvers ])
AC_DEFINE([CHROMA_DO_ONE_CG_RESTART],[1],[Enable Restart in linop syssolvers])
fi
dnl ************************************************************************
dnl **** Bagel wilson dslash ****
dnl ************************************************************************
if test "X${bagel_wilson_dslash_enabled}X" = "XyesX";
then
AC_MSG_NOTICE( [Configuring with BAGEL Wilson Dslash] )
AC_DEFINE([BUILD_PAB_WILSON_DSLASH],[], [ Use Peter Boyles BAGEL Wilson Dslash library])
if test "X${BAGEL_WILSON_DSLASH_HOME}X" = "XyesX";
then
AC_PATH_PROG([BAGEL_WILSON_DSLASH_CONFIG], [wfm-config], [])
else
AC_PATH_PROG([BAGEL_WILSON_DSLASH_CONFIG], [wfm-config], [], [${BAGEL_WILSON_DSLASH_HOME}/bin:${PATH}])
fi
if test "X${BAGEL_WILSON_DSLASH_CONFIG}X" = "XX";
then
AC_MSG_WARN([wfm-config script for bagel_wilson_dslash not found])
AC_SUBST(BAGEL_WILSON_DSLASH_CXXFLAGS, ${BAGEL_WILSON_DSLASH_CXXFLAGS})
AC_SUBST(BAGEL_WILSON_DSLASH_LDFLAGS, ${BAGEL_WILSON_DSLASH_LDFLAGS})
AC_SUBST(BAGEL_WILSON_DSLASH_LIBS, ${BAGEL_WILSON_DSLASH_LIBS})
else
AC_MSG_NOTICE([Found bagel_wilson_dslash configuration program ${BAGEL_WILSON_DSLASH_CONFIG}])
AC_SUBST(BAGEL_WILSON_DSLASH_CXXFLAGS, "`${BAGEL_WILSON_DSLASH_CONFIG} --cxxflags`")
AC_MSG_NOTICE([bagel_wilson_dslash compile flags: ${BAGEL_WILSON_DSLASH_CXXFLAGS}])
AC_SUBST(BAGEL_WILSON_DSLASH_LDFLAGS, "`${BAGEL_WILSON_DSLASH_CONFIG} --ldflags`")
AC_MSG_NOTICE([bagel_wilson_dslash link flags : ${BAGEL_WILSON_DSLASH_LDFLAGS}])
AC_SUBST(BAGEL_WILSON_DSLASH_LIBS, "`${BAGEL_WILSON_DSLASH_CONFIG} --libs`")
AC_MSG_NOTICE([bagel_wilson_dslash libraries flags: ${BAGEL_WILSON_DSLASH_LIBS}])
fi
else
AC_SUBST(BAGEL_WILSON_DSLASH_CXXFLAGS, "")
AC_SUBST(BAGEL_WILSON_DSLASH_LDFLAGS, "")
AC_SUBST(BAGEL_WILSON_DSLASH_LIBS, "")
AC_MSG_NOTICE( [Not using BAGEL Wilson Dslash] )
fi
if test "X${bagel_wilson_dslash_enabled}X" = "XyesX";
then
AC_MSG_CHECKING([if we can compile/link a simple BAGEL Wilson Dslash program])
PAC_BAGEL_WFM_LINK_CXX_FUNC(
${BAGEL_WILSON_DSLASH_CXXFLAGS},
${BAGEL_WILSON_DSLASH_LDFLAGS},
${BAGEL_WILSON_DSLASH_LIBS},
[ WilsonArg wil;],
[ wfm_vec_init(&wil); wfm_vec_end(&wil);],
[bagel_wilson_dslash_link_ok=yes],
[bagel_wilson_dslash_link_ok=no]
)
if test "X${bagel_wilson_dslash_link_ok}X" = "XyesX";
then
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
AC_MSG_ERROR([Cannot compile/link a program with Bagel Wilson Dslash. Use --with-bagel-wilson-dslash=<dir> to select a working version.])
fi
if test "X${bagel_wilson_dslash_sloppy}X" = "XyesX";
then
AC_MSG_RESULT([Enabling Sloppy Precision in Bagel Wilson Dslash])
AC_DEFINE([CHROMA_USE_SLOPPY_BAGEL_DSLASH],
[1],
[Enable Sloppy Precision in Bagel Wilson Dslash])
fi
else
if test "X${bagel_wilson_dslash_sloppy}X" = "XyesX";
then
AC_MSG_WARN([Enabling Sloppy Precision has no effect if not using --with-bagel-wilson-dslash option])
fi
fi
AM_CONDITIONAL(BUILD_PAB_WILSON_DSLASH, [test "x${bagel_wilson_dslash_enabled}x" = "xyesx" ])
dnl ************************************************************************
dnl **** Bagel clover ****
dnl ************************************************************************
if test "X${bagel_clover_enabled}X" = "XyesX";
then
AC_MSG_NOTICE( [Configuring with BAGEL Clover Apply] )
AC_DEFINE([BUILD_BAGEL_CLOVER_TERM],[], [ Use the BAGEL Clover Term Apply library])
if test "X${BAGEL_CLOVER_HOME}X" = "XyesX";
then
AC_PATH_PROG([BAGEL_CLOVER_CONFIG], [bagel-clover-config], [])
else
AC_PATH_PROG([BAGEL_CLOVER_CONFIG], [bagel-clover-config], [], [${BAGEL_CLOVER_HOME}/bin:${PATH}])
fi
if test "X${BAGEL_CLOVER_CONFIG}X" = "XX";
then
AC_MSG_WARN([bagel-clover-config script for bagel_wilson_dslash not found])
AC_SUBST(BAGEL_CLOVER_DSLASH_CXXFLAGS, ${BAGEL_CLOVER_CXXFLAGS})
AC_SUBST(BAGEL_CLOVER_DSLASH_LDFLAGS, ${BAGEL_CLOVER_LDFLAGS})
AC_SUBST(BAGEL_CLOVER_DSLASH_LIBS, ${BAGEL_CLOVER_LIBS})
else
AC_MSG_NOTICE([Found bagel-clover-config configuration program ${BAGEL_CLOVER_CONFIG}])
AC_SUBST(BAGEL_CLOVER_CXXFLAGS, "`${BAGEL_CLOVER_CONFIG} --cxxflags`")
AC_MSG_NOTICE([Bagel_Clover compile flags: ${BAGEL_CLOVER_CXXFLAGS}])
AC_SUBST(BAGEL_CLOVER_LDFLAGS, "`${BAGEL_CLOVER_CONFIG} --ldflags`")
AC_MSG_NOTICE([Bagel_Clover link flags : ${BAGEL_CLOVER_LDFLAGS}])
AC_SUBST(BAGEL_CLOVER_LIBS, "`${BAGEL_CLOVER_CONFIG} --libs`")
AC_MSG_NOTICE([Bagel Clover libraries flags: ${BAGEL_CLOVER_LIBS}])
fi
else
AC_SUBST(BAGEL_CLOVER_CXXFLAGS, "")
AC_SUBST(BAGEL_CLOVER_LDFLAGS, "")
AC_SUBST(BAGEL_CLOVER_LIBS, "")
AC_MSG_NOTICE( [Not using BAGEL Clover] )
fi
if test "X${bagel_clover_enabled}X" = "XyesX";
then
AC_MSG_CHECKING([if we can compile/link a simple BAGEL Clover program])
PAC_BAGEL_CLOVER_LINK_CXX_FUNC(
${BAGEL_CLOVER_CXXFLAGS},
${BAGEL_CLOVER_LDFLAGS},
${BAGEL_CLOVER_LIBS},
[],
[bagel_clover(0, 0, 0, 0, 1);],
[bagel_clover_link_ok=yes],
[bagel_clover_link_ok=no]
)
if test "X${bagel_clover_link_ok}X" = "XyesX";
then
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
AC_MSG_ERROR([Cannot compile/link a program with Bagel Clover. Use --with-bagel-clover=<dir> to select a working version.])
fi
fi
AM_CONDITIONAL(BUILD_BAGEL_CLOVER_APPLY, [test "x${bagel_clover_enabled}x" = "xyesx" ])
dnl ************************************************************************
dnl **** SSE Double Prec clover ****
dnl ************************************************************************
if test "X${ssed_clover_enabled}X" = "XyesX";
then
AC_MSG_NOTICE( [Building with SSED Clover Apply] )
AC_DEFINE([BUILD_SSED_CLOVER_TERM],[], [ Use SSED Clover Term Apply ])
else
AC_MSG_NOTICE( [Not using SSE DP Clover] )
fi
AM_CONDITIONAL(BUILD_SSED_CLOVER_APPLY, [test "x${ssed_clover_enabled}x" = "xyesx" ])
dnl ************************************************************************
dnl **** QDP-JIT clover ****
dnl ************************************************************************
if test "X${jit_clover_enabled}X" = "XyesX";
then
AC_MSG_NOTICE( [Building with QDP-JIT Clover] )
AC_DEFINE([BUILD_JIT_CLOVER_TERM],[], [ Use JIT Clover Term Apply, requires to build on top of QDP-JIT ])
else
AC_MSG_NOTICE( [Not using QDP-JIT Clover] )
fi
AM_CONDITIONAL(BUILD_JIT_CLOVER_APPLY, [test "x${jit_clover_enabled}x" = "xyesx" ])
dnl ************************************************************************
dnl **** QUDA device interface ****
dnl ************************************************************************
if test "X${quda_deviface_enabled}X" = "XyesX";
then
AC_MSG_NOTICE( [Building with QUDA device pointer interface] )
AC_DEFINE([BUILD_QUDA_DEVIFACE_SPINOR],[], [ Use of QUDA device pointer interface SPINOR, requires to build on top of QDP-JIT/PTX ])
AC_DEFINE([BUILD_QUDA_DEVIFACE_GAUGE],[], [ Use of QUDA device pointer interface GAUGE, requires to build on top of QDP-JIT/PTX ])
AC_DEFINE([BUILD_QUDA_DEVIFACE_CLOVER],[], [ Use of QUDA device pointer interface CLOVER, requires to build on top of QDP-JIT/PTX ])
else
AC_MSG_NOTICE( [Not using QUDA device pointer interface] )
fi
dnl ************************************************************************
dnl **** Use Lapack ****
dnl ************************************************************************
case "${LAPACK_BINDING}" in
lapack)
AC_MSG_NOTICE([Configuring to use Lapack.])
AC_DEFINE(BUILD_LAPACK,[],[Using Lapack])
AC_SUBST(LAPACK_ENABLED,[yes])
;;
*)
AC_MSG_NOTICE([Will not use Lapack])
AC_SUBST(LAPACK_ENABLED,[no])
;;
esac
AM_CONDITIONAL(BUILD_LAPACK, [ test "X${LAPACK_ENABLED}X" = "XyesX" ])
dnl ************************************************************************
dnl **** Use optimized eigcg ****
dnl ************************************************************************
case "${opt_eigcg_enabled}" in
yes)
AC_MSG_NOTICE([Configuring to use optimized eigcg])
AC_DEFINE(BUILD_OPT_EIGCG,[],[Configuring to use optimized eigcg])
AC_SUBST(OPT_EIGCG_ENABLED,[yes])
;;
*)
AC_MSG_NOTICE([Will not build optimized eigCG.])
AC_SUBST(OPT_EIGCG_ENABLED,[no])
;;
esac
AM_CONDITIONAL(BUILD_OPT_EIGCG, [ test "X${OPT_EIGCG_ENABLED}X" = "XyesX" ])
dnl ************************************************************************
dnl **** Level3 Asqtad inverter stuff ****
dnl ************************************************************************
case "$enable_asqtad_level3_inverter" in
yes)
AC_MSG_NOTICE([Configuring Asqtad level3 Inverter Wrapper])
AC_DEFINE([BUILD_CPS_ASQTAD_INVERTER],[],[Build CPS ASQTAD INVERTER])
;;
*)
AC_MSG_NOTICE([Not Configuring Asqtad level3 Inverter Wrapper])
;;
esac
AM_CONDITIONAL(BUILD_ASQTAD_LEVEL3_INVERTER_WRAPPER,
[test "x${enable_asqtad_level3_inverter}x" = "xyesx" ])
dnl Generically optimized CFZ Linop
case "$enable_opt_cfz_linop" in
yes)
ac_build_opt_cfz_linop="yes"
AC_MSG_NOTICE( [Configuring optimized Continued Frac. (CFZ) LinOp] )
AC_DEFINE([BUILD_CFZ_CFZ_LINOP],[],[ Build optimized Continued Frac. (CFZ) LinOp])
;;
*)
ac_build_opt_cfz_linop="no"
AC_MSG_NOTICE( [Not building optimized CFZ LinOp] )
;;
esac
AM_CONDITIONAL(BUILD_OPT_CFZ_LINOP,
[test "x${enable_opt_cfz_linop}x" = "xyesx" ])
dnl Enable GMP
if test "X${gmp_enabled}X" = "XyesX";
then
AC_MSG_NOTICE( [Enabling GNU Multi-Precision Library] )
AC_DEFINE([BUILD_GMP_REMEZ],[],[ Build GMP Remez code ])
if test "X${GMP_HOME}X" != "XyesX";
then
dnl if we were given an install path set up the flags
AC_SUBST(GMP_CXXFLAGS, "-I${GMP_HOME}/include")
AC_SUBST(GMP_LDFLAGS, "-L${GMP_HOME}/lib")
AC_SUBST(GMP_LIBS, "-lgmp")
else
dnl if we were not given an install path use existing env variables/standard include
dnl link paths
AC_SUBST(GMP_CXXFLAGS, ${GMP_CXXFLAGS})
AC_SUBST(GMP_LDFLAGS, ${GMP_LDFLAGS})
dnl if stuff is on the standard include and lib paths we still need the library
dnl invocation
if test "X${GMP_LIBS}X" = "XX";
then
AC_SUBST(GMP_LIBS, "-lgmp")
else
AC_SUBST(GMP_LIBS, ${GMP_LIBS})
fi
fi
AC_MSG_NOTICE([GMP CXXFLAGS: ${GMP_CXXFLAGS}])
AC_MSG_NOTICE([GMP LDFLAGS: ${GMP_LDFLAGS}])
AC_MSG_NOTICE([GMP LIBS: ${GMP_LIBS}])
AC_MSG_CHECKING([if we can compile/link a simple GMP program])
dnl check we can link against gmp
PAC_GMP_LINK_CXX_FUNC(
[ ${GMP_CXXFLAGS} ],
[ ${GMP_LDFLAGS} ],
[ ${GMP_LIBS} ],
[ mpf_t x; ],
[ mpf_init(x); ],
[gmp_working="yes"],
[gmp_working="no"]
)
if test "X${gmp_working}X" = "XyesX";
then
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
AC_MSG_ERROR([Couldn't link a simple GMP program. Use --with-gmp=<dir> to set a working one])
fi
else
AC_MSG_NOTICE( [Not building GMP Remez code ] )
AC_SUBST(GMP_CXXFLAGS, "")
AC_SUBST(GMP_LDFLAGS,"")
AC_SUBST(GMP_LIBS, "")
fi
AM_CONDITIONAL(BUILD_GMP_REMEZ,
[test "x${gmp_enabled}x" = "xyesx" ])
dnl QMT Threads stuff
if test "X${qmt_enabled}X" == "XyesX";
then
AC_MSG_NOTICE([Configuring QMT Threading])
AC_DEFINE([CHROMA_USE_QMT_THREADS], [1], [ Use QMT Threads library ])
AC_SUBST(QMT_CXXFLAGS, "-I${QMT_HOME}/include")
AC_SUBST(QMT_LDFLAGS, "-L${QMT_HOME}/lib")
AC_SUBST(QMT_LIBS, "-lqmt -lpthread -lm")
else
AC_SUBST(QMT_CXXFLAGS, "")
AC_SUBST(QMT_LDFLAGS, "")
AC_SUBST(QMT_LIBS, "")
fi
AM_CONDITIONAL(BUILD_QMT, [test "x${qmt_enabled}x" = "xyesx" ])
case "${chroma_testcase_runner}" in
trivial)
AC_MSG_NOTICE([Using Trivial Testcase Runner: trivial_runner.sh])
chroma_testcase_runner_script="trivial_runner.sh"
;;
6n_mpirun_rsh)
AC_MSG_NOTICE([Using 6n_mpirun_rsh Testcase Runner: 6n_mpirun_rsh_runner.sh])
chroma_testcase_runner_script="6n_mpirun_rsh_runner.sh"
;;
7n_mpirun_rsh)
AC_MSG_NOTICE([Using 7n_mpirun_rsh Testcase Runner: 7n_mpirun_rsh_runner.sh])
chroma_testcase_runner_script="7n_mpirun_rsh_runner.sh"
;;
9q_mpirun_rsh)