File: oshmem_setup_profiling.m4

package info (click to toggle)
openmpi 5.0.7-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 202,312 kB
  • sloc: ansic: 612,441; makefile: 42,495; sh: 11,230; javascript: 9,244; f90: 7,052; java: 6,404; perl: 5,154; python: 1,856; lex: 740; fortran: 61; cpp: 20; tcl: 12
file content (47 lines) | stat: -rw-r--r-- 2,033 bytes parent folder | download | duplicates (6)
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
# -*- shell-script -*-
#
# Copyright (c) 2014 Cisco Systems, Inc.  All rights reserved.
# Copyright (c) 2014      Research Organization for Information Science
#                         and Technology (RIST). All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#

AC_DEFUN([OSHMEM_SETUP_PROFILING],[
    opal_show_subtitle "OpenSHMEM profiling"

    AC_MSG_CHECKING([if pshmem will be enabled])
    AS_IF([test "$enable_oshmem" != "no" && \
           test "$enable_oshmem_profile" != "no"],
          [AS_IF([test "$OPAL_C_HAVE_WEAK_SYMBOLS" -eq 1 && \
                  test "$OPAL_C_HAVE_MACRO_WEAK_SYMBOLS" -eq 1],
                 [ # We want OSHMEM and we have all the required weak
                   # symbol support
                  oshmem_profiling_support=1
                  AC_MSG_RESULT([yes (weak symbols supported)])],
                 [ # We want OSHMEM, but we do NOT have all the
                   # required weak symbol support
                  oshmem_profiling_support=0
                  AC_MSG_RESULT([no (weak symbols not supported)])
                  AS_IF([test "$OPAL_C_HAVE_WEAK_SYMBOLS" -eq 0],
                        [AC_MSG_WARN([Weak symbols not supported by compiler])])
                  AS_IF([test "$OPAL_C_HAVE_MACRO_WEAK_SYMBOLS" -eq 0],
                       [AC_MSG_WARN([Macro weak symbols not supported by compiler])])
                  AC_MSG_WARN([OpenSHMEM profiling is disabled.])

                  AS_IF([test "$enable_oshmem_profile" = "yes" && \
                         test "$oshmem_profiling_support" -eq 0],
                        [AC_MSG_WARN([OpenSHMEM profiling requested but cannot be enabled])
                         AC_MSG_ERROR([Cannot continue])])
                 ])
          ],[
           # We do not want OSHMEM, so disable profiling
           oshmem_profiling_support=0
           AC_MSG_RESULT([no (OpenSHMEM disabled)])
          ])

    AM_CONDITIONAL([OSHMEM_PROFILING], [test $oshmem_profiling_support -eq 1])
]) dnl