-
Notifications
You must be signed in to change notification settings - Fork 12
/
configure.ac
4809 lines (4278 loc) · 179 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
# StarPU --- Runtime system for heterogeneous multicore architectures.
#
# Copyright (C) 2009-2024 University of Bordeaux, CNRS (LaBRI UMR 5800), Inria
# Copyright (C) 2018-2018 Umeà University
# Copyright (C) 2018,2020 Federal University of Rio Grande do Sul (UFRGS)
# Copyright (C) 2017-2017 Guillaume Beauchamp
# Copyright (C) 2013-2013 Thibaut Lambert
# Copyright (C) 2011-2011 Télécom Sud Paris
#
# StarPU is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or (at
# your option) any later version.
#
# StarPU is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
# See the GNU Lesser General Public License in COPYING.LGPL for more details.
#
AC_INIT([StarPU], [1.4.99], [[email protected]], [starpu], [http://gitlab.inria.fr/starpu/starpu])
AC_CONFIG_SRCDIR(include/starpu.h)
AC_CONFIG_AUX_DIR([build-aux])
# libtool doesn't actually properly manage a space in the workdir
case `pwd` in
*[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
AC_MSG_ERROR([unsafe absolute working directory name]);;
esac
dnl Versioning.
STARPU_MAJOR_VERSION="`echo $PACKAGE_VERSION | cut -d . -f 1`"
STARPU_MINOR_VERSION="`echo $PACKAGE_VERSION | cut -d . -f 2`"
STARPU_RELEASE_VERSION="`echo $PACKAGE_VERSION | cut -d . -f 3`"
STARPU_RELEASE_VERSION="`echo $PACKAGE_VERSION | cut -d . -f 3| sed 's/rc.*//'`"
dnl we do not want the rcXX in the release version. we would like to use sed -r 's/[a-z]+.*//' to remove any string but the -r option is not portable
AC_SUBST([STARPU_MAJOR_VERSION])
AC_SUBST([STARPU_MINOR_VERSION])
AC_SUBST([STARPU_RELEASE_VERSION])
AC_SUBST([STARPU_EFFECTIVE_VERSION])
AC_DEFINE_UNQUOTED([STARPU_MAJOR_VERSION], [$STARPU_MAJOR_VERSION], [Major version number of StarPU.])
AC_DEFINE_UNQUOTED([STARPU_MINOR_VERSION], [$STARPU_MINOR_VERSION], [Minor version number of StarPU.])
AC_DEFINE_UNQUOTED([STARPU_RELEASE_VERSION], [$STARPU_RELEASE_VERSION], [Release version number of StarPU.])
. "$srcdir/STARPU-VERSION"
AC_SUBST([LIBSTARPU_INTERFACE_CURRENT])
AC_SUBST([LIBSTARPU_INTERFACE_REVISION])
AC_SUBST([LIBSTARPU_INTERFACE_AGE])
AC_SUBST([LIBSTARPUMPI_INTERFACE_CURRENT])
AC_SUBST([LIBSTARPUMPI_INTERFACE_REVISION])
AC_SUBST([LIBSTARPUMPI_INTERFACE_AGE])
AC_SUBST([LIBSTARPUFFT_INTERFACE_CURRENT])
AC_SUBST([LIBSTARPUFFT_INTERFACE_REVISION])
AC_SUBST([LIBSTARPUFFT_INTERFACE_AGE])
AC_SUBST([LIBSTARPURM_INTERFACE_CURRENT])
AC_SUBST([LIBSTARPURM_INTERFACE_REVISION])
AC_SUBST([LIBSTARPURM_INTERFACE_AGE])
AC_SUBST([LIBSTARPU_OPENMP_LLVM_INTERFACE_CURRENT])
AC_SUBST([LIBSTARPU_OPENMP_LLVM_INTERFACE_REVISION])
AC_SUBST([LIBSTARPU_OPENMP_LLVM_INTERFACE_AGE])
AC_SUBST([LIBSOCL_INTERFACE_CURRENT])
AC_SUBST([LIBSOCL_INTERFACE_REVISION])
AC_SUBST([LIBSOCL_INTERFACE_AGE])
AC_SUBST([LIBSTARPUJULIA_INTERFACE_CURRENT])
AC_SUBST([LIBSTARPUJULIA_INTERFACE_REVISION])
AC_SUBST([LIBSTARPUJULIA_INTERFACE_AGE])
AC_CANONICAL_SYSTEM
AM_INIT_AUTOMAKE([1.11 -Wall -Wno-portability foreign silent-rules color-tests parallel-tests subdir-objects tar-pax])
m4_ifdef([AM_SILENT_RULES],
[AM_SILENT_RULES(yes)])
AC_PREREQ(2.64)
m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
AC_PROG_CC
AM_PROG_CC_C_O
AC_PROG_CXX
AC_PROG_CPP
AC_PROG_SED
AC_PROG_LN_S
AC_PROG_F77
AC_PROG_FC
AC_PROG_GREP
AC_PROG_EGREP
AC_PROG_INSTALL
AC_PROG_MKDIR_P
AC_CHECK_PROGS(PROG_STAT,gstat stat)
AC_CHECK_PROGS(PROG_DATE,gdate date)
AC_PATH_PROGS(PROG_FIND,find)
AC_CHECK_PROGS(PROG_CLANG,clang)
AC_CACHE_CHECK([for parallel that supports semaphores with exit code], [ac_cv_path_PARALLEL],
[AC_PATH_PROGS_FEATURE_CHECK([PARALLEL], [parallel],
[[parallel --semaphore --id starpu --fg --fg-exit -j 2 exit 42 > /dev/null 2>&1
[ $? = 42 ] && ac_cv_path_PARALLEL=$ac_path_PARALLEL ac_path_PARALLEL_found=:]],
[ac_cv_path_PARALLEL=no])])
AC_SUBST([PARALLEL], [$ac_cv_path_PARALLEL])
AM_CONDITIONAL([HAVE_PARALLEL], [test "x$PARALLEL" != "xno"])
dnl locate pkg-config
PKG_PROG_PKG_CONFIG
AC_ARG_ENABLE(simgrid, [AS_HELP_STRING([--enable-simgrid],
[Enable simulating execution in simgrid])],
enable_simgrid=$enableval, enable_simgrid=no)
if test x$enable_perf_debug = xyes; then
enable_shared=no
fi
default_enable_mpi_check=no
if test x$enable_simgrid = xyes ; then
default_enable_mpi=no
else
default_enable_mpi=maybe
fi
IS_SUPPORTED_FLAG_VAR(-Wno-unused,APP)
IS_SUPPORTED_FFLAG(-Wno-unused-dummy-argument,[APP_FFLAGS="$APP_FFLAGS -Wno-unused-dummy-argument"])
IS_SUPPORTED_FCFLAG(-Wno-unused-dummy-argument,[APP_FCFLAGS="$APP_FCFLAGS -Wno-unused-dummy-argument"])
AC_SUBST(APP_CFLAGS)
AC_SUBST(APP_CXXFLAGS)
AC_SUBST(APP_FFLAGS)
AC_SUBST(APP_FCFLAGS)
AC_FUNC_MMAP
###############################################################################
# #
# Forwarded options #
# #
# Move here options whose values are needed early #
# #
###############################################################################
#
AC_ARG_ENABLE(starpupy, [AS_HELP_STRING([--enable-starpupy], [enable StarPU python interface])],
enable_starpupy=$enableval, enable_starpupy=maybe)
###############################################################################
# #
# Profiling tool support #
# #
###############################################################################
AC_ARG_ENABLE(prof-tool, [AS_HELP_STRING([--enable-prof-tool],
[enable profiling tool])],
enable_prof_tool=$enableval, enable_prof_tool=yes)
if test x$enable_prof_tool = xyes; then
AC_DEFINE(STARPU_PROF_TOOL, [1], [Define this to enable profiling tool support])
fi
AC_MSG_CHECKING([for profiling tool support])
AC_MSG_RESULT($enable_prof_tool)
###############################################################################
# #
# Recursive tasks support #
# #
###############################################################################
AC_ARG_ENABLE(recursive-tasks, [AS_HELP_STRING([--enable-recursive-tasks],
[build the recursive tasks support])],
enable_recursive_tasks=$enableval, enable_recursive_tasks=no)
AC_MSG_CHECKING([for recursive tasks support])
if test x$enable_recursive_tasks = xyes; then
AC_DEFINE(STARPU_RECURSIVE_TASKS, [1], [Define this to enable recursive tasks support])
fi
AM_CONDITIONAL([STARPU_RECURSIVE_TASKS], [test "x$enable_recursive_tasks" = "xyes"])
AC_MSG_RESULT($enable_recursive_tasks)
AC_MSG_CHECKING(whether recursive tasks debug messages should be displayed)
AC_ARG_ENABLE(recursive-tasks-verbose, [AS_HELP_STRING([--enable-recursive-tasks-verbose],
[display verbose recursive_tasks messages])],
enable_recursive_tasks_verbose=$enableval, enable_recursive_tasks_verbose=no)
AC_MSG_RESULT($enable_recursive_tasks_verbose)
if test x$enable_recursive_tasks_verbose = xextra; then
AC_DEFINE(STARPU_RECURSIVE_TASKS_VERBOSE, [1], [display verbose recursive tasks debug messages])
fi
###############################################################################
# #
# Drivers #
# #
###############################################################################
AC_ARG_ENABLE(opencl-simulator, [AS_HELP_STRING([--enable-opencl-simulator],
[Enable the use of an OpenCL simulator])],
enable_opencl_simulator=$enableval, enable_opencl_simulator=no)
if test x$enable_opencl_simulator = xyes; then
enable_simgrid=yes
AC_DEFINE(STARPU_OPENCL_SIMULATOR, [1], [Define this to enable using an OpenCL simulator])
fi
AC_ARG_WITH(simgrid-dir,
[AS_HELP_STRING([--with-simgrid-dir=<path>],
[specify SimGrid installation directory])],
[
simgrid_dir="$withval"
# in case this was not explicit yet
enable_simgrid=yes
], simgrid_dir=no)
AC_ARG_WITH(simgrid-include-dir,
[AS_HELP_STRING([--with-simgrid-include-dir=<path>],
[specify where SimGrid headers are installed])],
[
simgrid_include_dir="$withval"
# in case this was not explicit yet
enable_simgrid=yes
], [simgrid_include_dir=no])
AC_ARG_WITH(simgrid-lib-dir,
[AS_HELP_STRING([--with-simgrid-lib-dir=<path>],
[specify where SimGrid libraries are installed])],
[
simgrid_lib_dir="$withval"
# in case this was not explicit yet
enable_simgrid=yes
], [simgrid_lib_dir=no])
if test x$enable_simgrid = xyes ; then
PKG_CHECK_MODULES([SIMGRID], [simgrid], [], [:])
if test "$simgrid_include_dir" != "no" ; then
SIMGRID_CFLAGS="-I$simgrid_include_dir $SIMGRID_CFLAGS"
fi
if test "$simgrid_lib_dir" != "no" ; then
SIMGRID_LIBS="-L$simgrid_lib_dir $SIMGRID_LIBS"
fi
if test "$simgrid_dir" != "no" ; then
SIMGRID_CFLAGS="-I$simgrid_dir/include $SIMGRID_CFLAGS"
SIMGRID_LIBS="-L$simgrid_dir/lib $SIMGRID_LIBS"
else
simgrid_dir="$(pkg-config --variable=prefix simgrid)"
fi
if test -n "$SIMGRID_CFLAGS" ; then
CFLAGS="$SIMGRID_CFLAGS $CFLAGS"
CXXFLAGS="$SIMGRID_CFLAGS $CXXFLAGS"
NVCCFLAGS="$SIMGRID_CFLAGS $NVCCFLAGS"
HIPCCFLAGS="$SIMGRID_CFLAGS $HIPCCFLAGS"
fi
SAVED_LIBS="${LIBS}"
LIBS="$SIMGRID_LIBS $LIBS"
AC_HAVE_LIBRARY([simgrid], [],
[
AC_MSG_ERROR(Simgrid support needs simgrid installed)
]
)
AC_CHECK_HEADERS([simgrid/msg.h], [AC_DEFINE([STARPU_HAVE_SIMGRID_MSG_H], [1], [Define to 1 if you have msg.h in simgrid/.])])
AC_CHECK_HEADERS([msg/msg.h], [AC_DEFINE([STARPU_HAVE_MSG_MSG_H], [1], [Define to 1 if you have msg.h in msg/.])])
AC_CHECK_HEADERS([simgrid/host.h], [AC_DEFINE([STARPU_HAVE_SIMGRID_HOST_H], [1], [Define to 1 if you have host.h in simgrid/.])])
AC_CHECK_HEADERS([simgrid/link.h], [AC_DEFINE([STARPU_HAVE_SIMGRID_LINK_H], [1], [Define to 1 if you have link.h in simgrid/.])])
AC_CHECK_HEADERS([xbt/base.h], [AC_DEFINE([STARPU_HAVE_XBT_BASE_H], [1], [Define to 1 if you have base.h in xbt/.])])
AC_CHECK_HEADERS([simgrid/version.h], [AC_DEFINE([STARPU_HAVE_SIMGRID_VERSION_H], [1], [Define to 1 if you have version.h in simgrid/.])], [], [[
#ifdef STARPU_HAVE_XBT_BASE_H
#include <xbt/base.h>
#endif
]])
AC_CHECK_HEADERS([simgrid/simdag.h], [AC_DEFINE([STARPU_HAVE_SIMGRID_SIMDAG_H], [1], [Define to 1 if you have simdag.h in simgrid/.])])
AC_CHECK_HEADERS([xbt/synchro.h], [AC_DEFINE([STARPU_HAVE_XBT_SYNCHRO_H], [1], [Define to 1 if you have synchro.h in xbt/.])])
AC_CHECK_HEADERS([xbt/config.h], [AC_DEFINE([STARPU_HAVE_XBT_CONFIG_H], [1], [Define to 1 if you have config.h in xbt/.])])
AC_CHECK_HEADERS([simgrid/actor.h], [AC_DEFINE([STARPU_HAVE_SIMGRID_ACTOR_H], [1], [Define to 1 if you have actor.h in simgrid/.])])
AC_CHECK_HEADERS([simgrid/engine.h], [AC_DEFINE([STARPU_HAVE_SIMGRID_ENGINE_H], [1], [Define to 1 if you have engine.h in simgrid/.])])
AC_CHECK_HEADERS([simgrid/semaphore.h], [AC_DEFINE([STARPU_HAVE_SIMGRID_SEMAPHORE_H], [1], [Define to 1 if you have semaphore.h in simgrid/.])])
AC_CHECK_HEADERS([simgrid/mutex.h], [AC_DEFINE([STARPU_HAVE_SIMGRID_MUTEX_H], [1], [Define to 1 if you have mutex.h in simgrid/.])])
AC_CHECK_HEADERS([simgrid/cond.h], [AC_DEFINE([STARPU_HAVE_SIMGRID_COND_H], [1], [Define to 1 if you have cond.h in simgrid/.])])
AC_CHECK_HEADERS([simgrid/barrier.h], [AC_DEFINE([STARPU_HAVE_SIMGRID_BARRIER_H], [1], [Define to 1 if you have barrier.h in simgrid/.])])
AC_CHECK_HEADERS([simgrid/engine.h])
AC_CHECK_HEADERS([simgrid/zone.h], [AC_DEFINE([STARPU_HAVE_SIMGRID_ZONE_H], [1], [Define to 1 if you have zone.h in simgrid/.])])
AC_CHECK_TYPES([smx_actor_t], [AC_DEFINE([STARPU_HAVE_SMX_ACTOR_T], [1], [Define to 1 if you have the smx_actor_t type.])], [], [[#include <simgrid/simix.h>]])
# Latest functions
AC_CHECK_FUNCS([MSG_process_attach sg_actor_attach sg_actor_init sg_actor_set_stacksize sg_actor_on_exit MSG_zone_get_hosts sg_zone_get_hosts MSG_process_self_name MSG_process_userdata_init sg_actor_get_data sg_actor_set_data sg_actor_data])
AC_CHECK_FUNCS([xbt_mutex_try_acquire smpi_process_set_user_data SMPI_thread_create sg_zone_get_by_name sg_link_get_name sg_link_name sg_link_set_bandwidth sg_link_bandwidth_set sg_host_get_route sg_host_route sg_host_self sg_host_list sg_host_get_speed sg_host_speed simcall_process_create sg_config_continue_after_help])
AC_CHECK_FUNCS([simgrid_set_maestro])
AC_CHECK_FUNCS([simgrid_init], [AC_DEFINE([STARPU_SIMGRID_HAVE_SIMGRID_INIT], [1], [Define to 1 if you have the `simgrid_init' function.])])
AC_CHECK_FUNCS([xbt_barrier_init], [AC_DEFINE([STARPU_SIMGRID_HAVE_XBT_BARRIER_INIT], [1], [Define to 1 if you have the `xbt_barrier_init' function.])])
AC_CHECK_FUNCS([sg_actor_sleep_for sg_actor_self sg_actor_ref sg_host_get_properties sg_host_send_to sg_host_sendto sg_cfg_set_int sg_actor_self_execute sg_actor_execute simgrid_get_clock])
AC_CHECK_DECLS([smpi_process_set_user_data], [], [], [[#include <smpi/smpi.h>]])
# Oldies for compatibility with older simgrid
AC_CHECK_FUNCS([MSG_get_as_by_name MSG_zone_get_by_name MSG_environment_get_routing_root MSG_host_get_speed])
LIBS="${SAVED_LIBS}"
AC_DEFINE(STARPU_SIMGRID, [1], [Define this to enable simgrid execution])
# We won't bind or detect anything
with_hwloc=no
# disable mpi checks by default, they require static linking, we don't
# want that by default
default_enable_mpi_check=no
# disable MPI support by default
default_enable_mpi=no
AC_LANG_PUSH([C++])
if test x$enable_shared = xno ; then
# When linking statically, libtool does not realize we need libstdc++ for simgrid_cpp.cpp
SIMGRID_LIBS="$SIMGRID_LIBS -lstdc++"
LIBS="$LIBS -lstdc++"
fi
SIMGRID_LDFLAGS="$SIMGRID_LIBS -lsimgrid"
# Simgrid 3.12 & 3.13 need -std=c++11 to be able to build anything in C++...
case \ $CXXFLAGS\ in
*\ -std=*\ *) ;;
*)
# Make sure our C++ compiler can compile simgrid headers
SIMGRID_INCLUDES="
#ifdef STARPU_HAVE_SIMGRID_MSG_H
#include <simgrid/msg.h>
#include <simgrid/host.h>
#elif defined(STARPU_HAVE_MSG_MSG_H)
#include <msg/msg.h>
#endif
#ifdef STARPU_HAVE_XBT_BASE_H
#include <xbt/base.h>
#endif
#ifdef STARPU_HAVE_SIMGRID_VERSION_H
#include <simgrid/version.h>
#endif
#ifdef STARPU_HAVE_SIMGRID_ZONE_H
#include <simgrid/zone.h>
#endif
#ifdef STARPU_HAVE_SIMGRID_HOST_H
#include <simgrid/host.h>
#endif
#include <xbt/xbt_os_time.h>
"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[$SIMGRID_INCLUDES]])],,
CXXFLAGS="-std=c++11 $CXXFLAGS")
;;
esac
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[$SIMGRID_INCLUDES
#include <simgrid/s4u/Engine.hpp>]],
[[simgrid::s4u::Engine::on_time_advance_cb([](double delta) { });]]
)],
AC_DEFINE(STARPU_HAVE_S4U_ON_TIME_ADVANCE_CB, [1], [Define this to 1 when s4u::Engine::on_time_advance_cb is available]))
AC_LANG_POP([C++])
AC_ARG_ENABLE(simgrid-mc, [AS_HELP_STRING([--enable-simgrid-mc],
[Enable using Model Checker of simgrid])],
enable_simgrid_mc=$enableval, enable_simgrid_mc=no)
if test x$enable_simgrid_mc = xyes ; then
AC_DEFINE(STARPU_SIMGRID_MC, [1], [Define this to enable Model Checker in simgrid execution])
AC_PATH_PROG([SIMGRID_MC], [simgrid-mc], [no], [$simgrid_dir/bin:$PATH])
LDFLAGS="$LDFLAGS -Wl,-znorelro -Wl,-znoseparate-code"
# libsimgrid needs to be linked from binaries themselves for MC to work
STARPU_EXPORTED_LIBS="$STARPU_EXPORTED_LIBS $SIMGRID_LDFLAGS"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#ifdef STARPU_HAVE_XBT_BASE_H
#include <xbt/base.h>
#endif
#ifdef STARPU_HAVE_SIMGRID_VERSION_H
#include <simgrid/version.h>
#endif
#if SIMGRID_VERSION < 33100
#error no mutex support with MC
#endif
]])],,
AC_MSG_ERROR([We need simgrid >= 3.31 for MC]))
fi
fi
AM_CONDITIONAL(STARPU_SIMGRID_MC, test x$enable_simgrid_mc = xyes)
AM_CONDITIONAL(STARPU_SIMGRID, test x$enable_simgrid = xyes)
AC_SUBST(SIMGRID_CFLAGS)
AC_SUBST(SIMGRID_LDFLAGS)
AC_MSG_CHECKING(whether SimGrid is enabled)
AC_MSG_RESULT($enable_simgrid)
AC_MSG_CHECKING(whether blocking drivers should be enabled)
AC_ARG_ENABLE(blocking-drivers, [AS_HELP_STRING([--enable-blocking-drivers], [enable blocking drivers])],
enable_blocking=$enableval, enable_blocking=$enable_simgrid)
AC_MSG_RESULT($enable_blocking)
if test x$enable_blocking = xno ; then
if test x$enable_simgrid = xyes ; then
AC_MSG_ERROR([--disable-blocking-drivers cannot be used in simgrid mode])
fi
AC_DEFINE(STARPU_NON_BLOCKING_DRIVERS, [1], [drivers must progress])
fi
if test x$enable_blocking = xyes ; then
AC_MSG_CHECKING(whether worker callbacks should be enabled)
AC_ARG_ENABLE(worker-callbacks, [AS_HELP_STRING([--enable-worker-callbacks], [enable worker callbacks])],
enable_worker_cb=$enableval, enable_worker_cb=no)
AC_MSG_RESULT($enable_worker_cb)
else
# worker sleep/wake-up callbacks only make sense if blocking drivers are enabled
enable_worker_cb=no
fi
if test x$enable_worker_cb = xyes ; then
AC_DEFINE(STARPU_WORKER_CALLBACKS, [1], [workers must call callbacks on sleep/wake-up])
fi
# nOS-V support
have_nosv=no
AC_ARG_ENABLE(nosv, [AS_HELP_STRING([--enable-nosv],
[enable support for nOS-V])],
enable_nosv=$enableval, enable_nosv=no)
if test x$enable_simgrid = xyes; then
if test x$enable_nosv = xyes; then
AC_MSG_ERROR([nOS-V support is not compatible with SimGrid])
fi
enable_nosv=no
fi
if test x$enable_nosv = xyes; then
PKG_CHECK_MODULES([NOSV], [nos-v], [
AC_DEFINE(STARPU_NOSV, [1], [Define this to enable nOS-V support])
AC_SUBST([STARPU_NOSV], [1])
have_nosv=yes
], [:])
fi
if test x$enable_nosv = xyes -a x$have_nosv = xyes; then
LIBS="${NOSV_LIBS} ${SAVED_LIBS}"
CPPFLAGS="${NOSV_CFLAGS} ${SAVED_CPPFLAGS}"
else
enable_nosv=no
fi
AM_CONDITIONAL(STARPU_BUILD_NOSV, [test x$enable_nosv = xyes])
AC_MSG_CHECKING([for nOS-V support])
AC_MSG_RESULT($enable_nosv)
###############################################################################
# #
# LIBTOOLS #
# #
###############################################################################
#c++11 detection
AX_CXX_COMPILE_STDCXX(11,noext,optional)
AC_SUBST([STARPU_HAVE_CXX11], $HAVE_CXX11)
AM_CONDITIONAL([STARPU_HAVE_CXX11], [test "$HAVE_CXX11" -eq 1])
if test $HAVE_CXX11 -eq 1; then
AC_DEFINE(STARPU_HAVE_CXX11, [1], [compiler supports cxx11])
fi
LT_PREREQ([2.2])
LT_INIT([win32-dll])
AC_HEADER_STDC
AC_C_RESTRICT
# Check if bash is available
AC_PATH_PROG([REALBASH], [bash], , [/bin:$PATH])
# Record git version
AC_PATH_PROG(gitcommand, git)
if test -f $srcdir/STARPU-REVISION ; then
cp $srcdir/STARPU-REVISION .
elif test "$gitcommand" = "" ; then
echo "unknown" > ./STARPU-REVISION
else
bdir=$PWD
cd $srcdir
git log -n 1 --pretty="%H%d" . > $bdir/STARPU-REVISION_tmp
cd $bdir
if test -s ./STARPU-REVISION_tmp ; then
mv ./STARPU-REVISION_tmp ./STARPU-REVISION
else
echo "unknown" > ./STARPU-REVISION
fi
fi
AM_CONDITIONAL([STARPU_CROSS_COMPILING], [test "x$cross_compiling" = "xyes"])
###############################################################################
# #
# MPI compilers #
# #
###############################################################################
#Check MPICC
if test x$enable_simgrid = xyes ; then
DEFAULT_MPICC=smpicc
else
DEFAULT_MPICC=mpicc
fi
mpicc_path_explicit=no
mpicxx_path_explicit=no
AC_ARG_WITH(mpicc,
[AS_HELP_STRING([--with-mpicc=<mpicc name or path to mpicc>], [Name or path of the mpicc compiler])],
[
DEFAULT_MPICC=$withval
mpicc_path_explicit=yes
]
)
case $DEFAULT_MPICC in
/*) mpicc_path="$DEFAULT_MPICC" ;;
*) AC_PATH_PROG(mpicc_path, $DEFAULT_MPICC, [no], [$simgrid_dir/bin:$PATH]) ;;
esac
# We test if the MPICC compiler exists
if test ! -x $mpicc_path; then
AC_MSG_RESULT(The mpicc compiler '$mpicc_path' does not have the execute permission)
mpicc_path=no
fi
AC_MSG_CHECKING(whether mpicc is available)
AC_MSG_RESULT($mpicc_path)
AC_SUBST(MPICC, $mpicc_path)
if test x$mpicc_path != xno ; then
MPIPATH=$(dirname $mpicc_path):$PATH
else
MPIPATH=$PATH
fi
#Check MPICXX/MPIC++
if test x$enable_simgrid = xyes ; then
DEFAULT_MPICXX=smpicxx
else
DEFAULT_MPICXX=mpicxx
fi
AC_ARG_WITH(mpicxx,
[AS_HELP_STRING([--with-mpicxx=<mpicxx name or path to mpicxx>], [Name or path of the mpicxx/mpic++ compiler])],
[
DEFAULT_MPICXX=$withval
mpicxx_path_explicit=yes
])
case $DEFAULT_MPICXX in
/*) mpicxx_path="$DEFAULT_MPICXX" ;;
*) AC_PATH_PROG(mpicxx_path, $DEFAULT_MPICXX, [no], [$MPIPATH]) ;;
esac
# try with mpic++ if mpicxx was not found
if test x$mpicxx_path = xno ; then
DEFAULT_MPICXX=mpic++
AC_PATH_PROG(mpicxx_path, $DEFAULT_MPICXX, [no], [$MPIPATH])
fi
# We test if the MPICXX/MPIC++ compiler exists
if test ! -x $mpicxx_path; then
AC_MSG_RESULT(The mpicxx compiler '$mpicxx_path' does not have the execute permission)
mpicxx_path=no
fi
AC_MSG_CHECKING(whether mpicxx is available)
AC_MSG_RESULT($mpicxx_path)
AC_SUBST(MPICXX, $mpicxx_path)
mpiexec_path_explicit=no
# Check if mpiexec is available
if test x$enable_simgrid = xyes ; then
DEFAULT_MPIEXEC=smpirun
AC_ARG_WITH(smpirun,
[AS_HELP_STRING([--with-smpirun[=<name of smpirun or path to smpirun>]], [Name or path of the smpirun helper])],
[
DEFAULT_MPIEXEC=$withval
mpiexec_path_explicit=yes
])
else
DEFAULT_MPIEXEC=mpiexec
AC_ARG_WITH(mpiexec,
[AS_HELP_STRING([--with-mpiexec=<name of mpiexec or path to mpiexec>], [Name or path of mpiexec])],
[
DEFAULT_MPIEXEC=$withval
mpiexec_path_explicit=yes
])
fi
case $DEFAULT_MPIEXEC in
/*) mpiexec_path="$DEFAULT_MPIEXEC" ;;
*) AC_PATH_PROG(mpiexec_path, $DEFAULT_MPIEXEC, [no], [$MPIPATH])
esac
AC_MSG_CHECKING(whether mpiexec is available)
AC_MSG_RESULT($mpiexec_path)
# We test if MPIEXEC exists
if test ! -x $mpiexec_path; then
AC_MSG_RESULT(The mpiexec script '$mpiexec_path' is not valid)
default_enable_mpi_check=no
mpiexec_path=""
fi
AC_SUBST(MPIEXEC,$mpiexec_path)
###############################################################################
# #
# MPI #
# #
###############################################################################
AC_ARG_ENABLE(mpi, [AS_HELP_STRING([--disable-mpi],
[Disable StarPU MPI library generation])],
[enable_mpi=$enableval],
[enable_mpi=$default_enable_mpi])
if test x$enable_mpi = xmaybe ; then
if test -x "$mpicc_path"; then
enable_mpi=yes
else
enable_mpi=no
fi
fi
AC_ARG_ENABLE(mpi-type-vector-c, AC_HELP_STRING([--disable-mpi-type-vector-c], [Disable usage of function MPI_Type_vector_c]),
[enable_mpi_type_vector_c=$enableval], [enable_mpi_type_vector_c=yes])
# in case MPI was explicitly required, but mpicc is not available, this is an error
if test x$enable_mpi = xyes ; then
if test ! -x "$mpicc_path"; then
AC_MSG_ERROR([Compiler MPI '$mpicc_path' not valid])
fi
OLD_CC=$CC
CC=$mpicc_path
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM([[
#include <mpi.h>
#include <mpi-ext.h>
]],,)],
[AC_DEFINE(STARPU_HAVE_MPI_EXT, [1], [<mpi-ext.h> is available])])
AC_CHECK_FUNC([MPI_Comm_create_group], [AC_DEFINE([STARPU_HAVE_MPI_COMM_CREATE_GROUP], [1], [Define to 1 if the function MPI_Comm_create_group is available.])])
if test x$enable_mpi_type_vector_c = xyes ; then
AC_CHECK_FUNC([MPI_Type_vector_c], [AC_DEFINE([STARPU_HAVE_MPI_TYPE_VECTOR_C], [1], [Define to 1 if the function MPI_Type_vector_c is available.])])
fi
CC=$OLD_CC
fi
build_mpi_lib=$enable_mpi
AC_ARG_ENABLE(mpi-minimal-tests, [AS_HELP_STRING([--enable-mpi-minimal-tests],
[Only enable a subset of MPI tests])],
[enable_mpi_minimal_tests=$enableval],
[enable_mpi_minimal_tests=no])
AM_CONDITIONAL([STARPU_MPI_MINIMAL_TESTS], [test x$enable_mpi_minimal_tests = xyes])
if test "x$enable_mpi_minimal_tests" = "xyes"; then
AC_DEFINE(STARPU_MPI_MINIMAL_TESTS, [1], [only enable MPI minimal tests])
fi
###############################################################################
# #
# NEW MADELEINE #
# #
###############################################################################
AC_ARG_ENABLE(nmad, [AS_HELP_STRING([--enable-nmad],
[Enable StarPU MPI library generation using the new madeleine backend])],
[enable_nmad=$enableval],
[enable_nmad=no])
build_nmad_lib=no
AC_SUBST(CC_OR_MPICC, $cc_or_mpicc)
#We can only build StarPU MPI Library if User wants it and MPI is available
if test x$enable_mpi = xyes -a x$enable_nmad = xyes ; then
build_nmad_lib=yes
build_mpi_lib=no
PKG_CHECK_MODULES([NMAD],[nmad])
save_LIBS="$LIBS"
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $NMAD_CFLAGS"
LIBS="$LIBS $NMAD_LIBS"
AC_CHECK_FUNCS([piom_ltask_set_bound_thread_os_indexes])
AC_CHECK_FUNCS([nm_trace_add_synchro_point])
CFLAGS="$save_CFLAGS"
LIBS="$save_LIBS"
else
build_nmad_lib=no
fi
# If MadMPI is used, MadMPI should not the built with PIOman, as we don't want
# communication progression to be done in both StarPU and MadMPI. Yet, if it is
# the case, we will disable PIOman progression in the code.
# (PIOman is required by MadMPI to be able to use MPI_THREAD_MULTIPLE)
if test x$enable_mpi = xyes -a x$build_nmad_lib = xno -a ! -z "`$mpicc_path --showme|grep pioman`"; then
AC_MSG_WARN([Using MPI backend of StarPU with MadMPI built with PIOman: disabling PIOman's progression.])
AC_DEFINE(HAVE_PIOMAN, [1], [PIOman (from PM2) is available])
fi
###############################################################################
# #
# MPI Master Slave #
# #
###############################################################################
AC_ARG_ENABLE(mpi-master-slave, [AS_HELP_STRING([--enable-mpi-master-slave],
[Enable StarPU to run with the master-slave mode])],
use_mpi_master_slave=$enableval,
use_mpi_master_slave=no)
if test x$enable_simgrid = xyes; then
if test x$use_mpi_master_slave = xyes; then
AC_MSG_ERROR([MPI Master Slave not supported with simgrid])
fi
use_mpi_master_slave=no
fi
# in case it is explicitly required, but mpicc is not available, this is an error
if test x$use_mpi_master_slave = xyes -a ! -x "$mpicc_path"; then
AC_MSG_ERROR([Compiler MPI '$mpicc_path' not valid])
fi
#We can only build MPI Master Slave if User wants it and MPI compiler are available
if test x$use_mpi_master_slave = xyes -a x$mpicc_path != xno -a x${mpicxx_path} != xno ; then
build_mpi_master_slave=yes
else
build_mpi_master_slave=no
fi
#users cannot use both at the same time
if test x$build_mpi_master_slave = xyes -a x$enable_mpi = xyes; then
AC_MSG_WARN(StarPU-MPI and MPI Master-Slave cannot be used at the same time ! Disabling StarPU-MPI...)
build_mpi_lib=no
build_nmad_lib=no
enable_mpi=no
fi
if test x$build_mpi_master_slave = xyes; then
AC_DEFINE(STARPU_USE_MPI_MASTER_SLAVE, [1], [MPI Master Slave support is enabled])
CC=$mpicc_path
CCLD=$mpicc_path
CXX=$mpicxx_path
CXXLD=mpicxx_path
fi
AC_MSG_CHECKING(whether the MPI master-slave mode should be enabled)
AC_MSG_RESULT($build_mpi_master_slave)
AM_CONDITIONAL([STARPU_USE_MPI_MASTER_SLAVE], [test x$build_mpi_master_slave = xyes])
AC_MSG_CHECKING(maximum number of MPI master-slave devices)
AC_ARG_ENABLE(maxmpidev, [AS_HELP_STRING([--enable-maxmpidev=<number>],
[maximum number of MPI master-slave devices])],
nmaxmpidev=$enableval,
[
if test x$build_mpi_master_slave = xyes; then
nmaxmpidev=4
else
nmaxmpidev=0
fi
])
if test x$nmaxmpidev = x -o x$nmaxmpidev = xyes
then
AC_MSG_ERROR([The --enable-maxmpidev option needs to be given a number])
fi
AC_MSG_RESULT($nmaxmpidev)
AC_DEFINE_UNQUOTED(STARPU_MAXMPIDEVS, [$nmaxmpidev], [maximum number of MPI devices])
###############################################################################
# #
# TCP/IP Master Slave #
# #
###############################################################################
AC_ARG_ENABLE(tcpip-master-slave, [AS_HELP_STRING([--enable-tcpip-master-slave],
[Enable StarPU to run with the master-slave mode])],
build_tcpip_master_slave=$enableval,
build_tcpip_master_slave=no)
if test x$build_tcpip_master_slave = xyes; then
AC_CHECK_LIB([dl], [dlsym])
AC_DEFINE(STARPU_USE_TCPIP_MASTER_SLAVE, [1], [TCPIP Master Slave support is enabled])
fi
AC_MSG_CHECKING(whether the TCP/IP master-slave mode should be enabled)
AC_MSG_RESULT($build_tcpip_master_slave)
AM_CONDITIONAL([STARPU_USE_TCPIP_MASTER_SLAVE], [test x$build_tcpip_master_slave = xyes])
AC_MSG_CHECKING(maximum number of TCP/IP master-slave devices)
AC_ARG_ENABLE(maxtcpipdev, [AS_HELP_STRING([--enable-maxtcpipdev=<number>],
[maximum number of TCP/IP master-slave devices])],
nmaxtcpipdev=$enableval,
[
if test x$build_tcpip_master_slave = xyes; then
nmaxtcpipdev=4
else
nmaxtcpipdev=0
fi
])
if test x$nmaxtcpipdev = x -o x$nmaxtcpipdev = xyes
then
AC_MSG_ERROR([The --enable-maxtcpipdev option needs to be given a number])
fi
AC_MSG_RESULT($nmaxtcpipdev)
AC_DEFINE_UNQUOTED(STARPU_MAXTCPIPDEVS, [$nmaxtcpipdev], [maximum number of TCP/IP devices])
###############################################################################
# #
# Miscellaneous things for MPI #
# #
###############################################################################
AC_ARG_ENABLE(mpi-pedantic-isend, [AS_HELP_STRING([--enable-mpi-pedantic-isend],
[Prevent StarPU MPI from reading buffers while being sent over MPI])],
enable_mpi_pedantic_isend=$enableval, enable_mpi_pedantic_isend=no)
if test x$enable_mpi_pedantic_isend = xyes; then
AC_DEFINE(STARPU_MPI_PEDANTIC_ISEND, [1], [enable StarPU MPI pedantic isend])
fi
# If the user specifically asks for it, or if we are in a developer checkout, we enable mpi check
if test -d "$srcdir/.git" -o -f "$srcdir/.git" ; then
default_enable_mpi_check=$enable_mpi
fi
AC_ARG_ENABLE(mpi-check, AC_HELP_STRING([--enable-mpi-check], [Enable execution of MPI testcases]),
[enable_mpi_check=$enableval], [enable_mpi_check=$default_enable_mpi_check])
running_mpi_check=no
if test x$enable_mpi_check = xyes ; then
running_mpi_check=yes
if test x$enable_mpi = xno ; then
AC_MSG_ERROR([MPI checks requested, but MPI is disabled])
fi
fi
if test x$enable_mpi_check = xmaybe ; then
running_mpi_check=yes
fi
if test x$enable_mpi_check = xno ; then
running_mpi_check=no
fi
if test x$enable_mpi = xno ; then
running_mpi_check=no
fi
AM_CONDITIONAL(STARPU_MPI_CHECK, test x$running_mpi_check = xyes)
AC_MSG_CHECKING(whether MPI tests should be run)
AC_MSG_RESULT($running_mpi_check)
AC_MSG_CHECKING(whether the StarPU MPI library should be generated)
AC_MSG_RESULT($build_mpi_lib)
AC_MSG_CHECKING(whether the StarPU MPI nmad library should be generated)
AC_MSG_RESULT($build_nmad_lib)
if test x$build_mpi_lib = xyes -o x$build_nmad_lib = xyes ; then
AC_DEFINE(STARPU_USE_MPI,[1],[whether the StarPU MPI library is available])
if test x$build_mpi_lib = xyes ; then
AC_DEFINE(STARPU_USE_MPI_MPI,[1],[whether the StarPU MPI library (with a native MPI implementation) is available])
else
AC_DEFINE(STARPU_USE_MPI_NMAD,[1],[whether the StarPU MPI library (with a NewMadeleine implementation) is available])
fi
fi
if test x$enable_mpi = xyes ; then
if test x$enable_simgrid = xyes ; then
if test x$enable_shared = xyes ; then
AC_MSG_ERROR([MPI with simgrid can not work with shared libraries, if you need the MPI support, then use --disable-shared to fix this, else disable MPI with --disable-mpi])
else
CFLAGS="$CFLAGS -fPIC"
CXXFLAGS="$CXXFLAGS -fPIC"
NVCCFLAGS="$NVCCFLAGS --compiler-options -fPIC"
HIPCCFLAGS="$HIPCCFLAGS --compiler-options -fPIC"
FFLAGS="$FFLAGS -fPIC"
FCLAGS="$FFLAGS -fPIC"
fi
fi
enable_mpi_sync_clocks=no
PKG_CHECK_MODULES([MPI_SYNC_CLOCKS],[mpi_sync_clocks],[enable_mpi_sync_clocks=yes],[enable_mpi_sync_clocks=no])
if test x$enable_mpi_sync_clocks = xyes ; then
AC_DEFINE(STARPU_HAVE_MPI_SYNC_CLOCKS, [1], [Define to 1 if you have mpi_sync_clocks and it is meant to be used])
fi
fi
AM_CONDITIONAL(STARPU_MPI_SYNC_CLOCKS, test x$enable_mpi_sync_clocks = xyes)
AM_CONDITIONAL(STARPU_USE_MPI_MPI, test x$build_mpi_lib = xyes)
AM_CONDITIONAL(STARPU_USE_MPI_NMAD, test x$build_nmad_lib = xyes)
AM_CONDITIONAL(STARPU_USE_MPI, test x$build_nmad_lib = xyes -o x$build_mpi_lib = xyes)
###### Failure tolerance material #######
default_enable_mpi_ft=no
AC_ARG_ENABLE(mpi-ft, AC_HELP_STRING([--enable-mpi-ft], [Enable failure tolerance mechanisms provided by StarPU]),
[enable_mpi_ft=$enableval], [enable_mpi_ft=$default_enable_mpi_ft])
default_enable_mpi_ft_stats=no
use_mpi_ft_stats=no
AC_ARG_ENABLE(mpi-ft-stats, AC_HELP_STRING([--enable-mpi-ft-stats], [Enable stats for failure tolerance mechanisms]),
[enable_mpi_ft_stats=$enableval], [enable_mpi_ft_stats=$default_enable_mpi_ft_stats])
# TODO: Check MPI version to be ULFM
if test x$enable_mpi_ft = xyes ; then
if test x$build_mpi_lib != xyes ; then
AC_MSG_ERROR([Failure tolerance mechanisms only work with a particular MPI implementation: ULFM (OpenMPI based).])
else
AC_DEFINE(STARPU_USE_MPI_FT, [1], [whether the StarPU MPI failure tolerance mechanisms are requested])
use_mpi_ft=yes;
if test x$enable_mpi_ft_stats = xyes ; then
AC_DEFINE(STARPU_USE_MPI_FT_STATS, [1], [whether the StarPU MPI failure tolerance mechanisms stats are watched])
use_mpi_ft_stats=$enable_mpi_ft_stats;
fi
fi
fi
AM_CONDITIONAL(STARPU_USE_MPI_FT, [test x$use_mpi_ft = xyes])
AM_CONDITIONAL(STARPU_USE_MPI_FT_STATS, [test x$use_mpi_ft_stats = xyes])
###### End of failure tolerance material ######
AC_ARG_WITH(mpiexec-args, [AS_HELP_STRING([--with-mpiexec-args[=<arguments to give when running mpiexec>]],
[Arguments for mpiexec])],
[
mpiexec_args=$withval
])
AC_SUBST(MPIEXEC_ARGS,$mpiexec_args)
AC_MSG_CHECKING(whether MPI debug messages should be displayed)
AC_ARG_ENABLE(mpi-verbose, [AS_HELP_STRING([--enable-mpi-verbose],
[display MPI verbose debug messages (--enable-mpi-verbose=extra increase the verbosity)])],
enable_mpi_verbose=$enableval, enable_mpi_verbose=no)
AC_MSG_RESULT($enable_mpi_verbose)
if test x$enable_mpi_verbose = xyes; then
AC_DEFINE(STARPU_MPI_VERBOSE, [1], [display MPI verbose debug messages])
fi
if test x$enable_mpi_verbose = xextra; then
AC_DEFINE(STARPU_MPI_VERBOSE, [1], [display MPI verbose debug messages])
AC_DEFINE(STARPU_MPI_EXTRA_VERBOSE, [1], [display MPI verbose debug messages])
fi
if test x$enable_mpi = xyes -o x$build_mpi_master_slave = xyes ; then
cc_or_mpicc=$mpicc_path
# For some reason, libtool uses gcc instead of mpicc when linking
# libstarpumpi.
# On Darwin (and maybe other systems ?) the linker will fail (undefined
# references to MPI_*). We manually add the required flags to fix this
# issue.
# openmpi version
MPICC_LDFLAGS=`$mpicc_path --showme:link 2>/dev/null`
if test -z "$MPICC_LDFLAGS"
then
# mpich version
MPICC_LDFLAGS=`$mpicc_path -link_info | awk '{$1=""; print}'`
fi
AC_SUBST(MPICC_LDFLAGS)
else
cc_or_mpicc=$CC
fi
AC_SUBST(CC_OR_MPICC, $cc_or_mpicc)
###############################################################################
# #
# NUMA memory nodes #
# #
###############################################################################
default_nmaxnumanodes=2
AC_PATH_PROG(hwloccalccommand, hwloc-calc)
AC_MSG_CHECKING(maximum number of NUMA nodes)
AC_ARG_ENABLE(maxnumanodes, [AS_HELP_STRING([--enable-maxnumanodes=<number>],
[maximum number of NUMA nodes])],
nmaxnumanodes=$enableval, nmaxnumanodes=auto)
if test x$nmaxnumanodes = xauto
then
if test "$hwloccalccommand" = ""; then
AC_MSG_WARN([hwloc-calc not available to automatically get the number of NUMA nodes, using the default value: $default_nmaxnumanodes])
nmaxnumanodes=$default_nmaxnumanodes
else
nmaxnumanodes=$($hwloccalccommand all -N node 2>/dev/null)
if test x$nmaxnumanodes = x; then
AC_MSG_WARN([hwloc-calc could not get the number of NUMA nodes, using the default value: $default_nmaxnumanodes])
nmaxnumanodes=$default_nmaxnumanodes
fi
fi
fi
if test x$nmaxnumanodes = x -o x$nmaxnumanodes = xyes
then
AC_MSG_ERROR([The --enable-maxnumanodes option needs to be given a number])
fi
AC_MSG_RESULT($nmaxnumanodes)
AC_DEFINE_UNQUOTED(STARPU_MAXNUMANODES, [$nmaxnumanodes],
[maximum number of NUMA nodes])
###############################################################################
AC_PATH_PROGS([STARPU_MS_LIB], [lib])
AC_ARG_VAR([STARPU_MS_LIB], [Path to Microsoft's Visual Studio `lib' tool])
AM_CONDITIONAL([STARPU_HAVE_MS_LIB], [test "x$STARPU_MS_LIB" != "x"])
case "$target" in
*-*-mingw*|*-*-cygwin*|*-*-msys*)
starpu_windows=yes
libext=a
AC_DEFINE(STARPU_HAVE_WINDOWS, [1], [Define this on windows.])
;;
*-*-linux*)
starpu_linux=yes
AC_DEFINE(STARPU_LINUX_SYS, [1], [Define to 1 on Linux])
;;
*-*-openbsd*)
starpu_openbsd=yes
AC_DEFINE(STARPU_OPENBSD_SYS, [1], [Define to 1 on OpenBSD systems])