File: customizing-wrappers.rst

package info (click to toggle)
openmpi 5.0.8-4
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 201,684 kB
  • sloc: ansic: 613,078; makefile: 42,353; sh: 11,194; javascript: 9,244; f90: 7,052; java: 6,404; perl: 5,179; python: 1,859; lex: 740; fortran: 61; cpp: 20; tcl: 12
file content (95 lines) | stat: -rw-r--r-- 3,560 bytes parent folder | download | duplicates (12)
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
.. _label-customizing-wrapper-compiler:

Customizing wrapper compiler behavior
=====================================

The PMIx wrapper compiler is driven by text files that contain,
among other things, the flags that are passed to the underlying
compiler.  The text file is generated automatically for PMIx
and is customized for the compiler set that was selected when PMIx
was configured; it is *not* recommended that users edit this
file.

However, there are cases where it may be necessary or desirable to
edit the file and add to or subtract from the flags that PMIx
selected.  The file is installed in ``$pkgdatadir``, which
defaults to ``$prefix/share/pmix/pmixcc-wrapper-data.txt``.
Several environment variables are also available for run-time
replacement of the wrapper's default values (from the text file):

.. note:: You may need to scroll right in the following table.

.. list-table::
   :header-rows: 1

   * - Wrapper compiler
     - Compiler
     - Preprocessor flags
     - Compiler flags
     - Linker flags
     - Linker library flags
     - Data file

   * - ``mpmixcc``
     - ``PMIX_CC``
     - ``PMIX_CPPFLAGS``
     - ``PMIX_CFLAGS``
     - ``PMIX_LDFLAGS``
     - ``PMIX_LIBS``
     - ``pmixcc-wrapper-data.txt``

.. caution:: Note that changing the underlying compiler may not work
   at all.

   The traditional method of using multiple different compilers
   with PMIx is to install PMIx multiple times; each
   installation should be built/installed with a different compiler.
   This is annoying, but it is beyond the scope of PMIx to be able
   to fix.

Note that the values of these fields can be directly influenced by
passing flags to PMIx's ``configure`` script.  :ref:`See this
section in the Installation guide <label-building-installation-cli-options>` for
more details.

The files cited in the above table use fairly simplistic "key=value"
data formats.  The following are several fields that are likely to be
of interest to end-users:

* ``project_short``: Prefix for all environment variables.  See
  below.

* ``compiler_env``: Specifies the base name of the environment
  variable that can be used to override the wrapper's underlying
  compiler at run-time.  The full name of the environment variable is
  of the form ``<project_short>_<compiler_env>``; see table above.

* ``compiler_flags_env``: Specifies the base name of the environment
  variable that can be used to override the wrapper's compiler flags
  at run-time.  The full name of the environment variable is of the
  form ``<project_short>_<compiler_flags_env>``; see table above.

* ``compiler``: The executable name of the underlying compiler.

* ``extra_includes``: Relative to ``$installdir``, a list of directories
  to also list in the preprocessor flags to find header files.

* ``preprocessor_flags``: A list of flags passed to the preprocessor.

* ``compiler_flags``: A list of flags passed to the compiler.

* ``linker_flags``: A list of flags passed to the linker.

* ``libs``: A list of libraries passed to the linker.

* ``required_file``: If non-empty, check for the presence of this file
  before continuing.  If the file is not there, the wrapper will abort
  saying that the language is not supported.

* ``includedir``: Directory containing PMIx's header files.  The
  proper compiler "include" flag is prepended to this directory and
  added into the preprocessor flags.

* ``libdir``: Directory containing PMIx's library files.  The
  proper compiler "include" flag is prepended to this directory and
  added into the linker flags.