@@ -237,7 +237,7 @@ this function, followed by our AWS example:
237237 ``compiler_section_for() ``.
2382383. Merge the compiler definitions with merge_dicts (this part is unnecessary if you have
239239 only one type of compiler).
240- 4. Generally, you will want to compose a minimal list of compilers: e.g. if you want to
240+ 4. Generally, you will want to compose a minimal list of compilers: e.g., if you want to
241241 compile your benchmark with the oneAPI compiler, and have multiple versions to choose
242242 from, you would add a variant to the system, and the config would expose only one of
243243 them.
@@ -247,9 +247,9 @@ For our AWS system, the compiler we define is ``
[email protected] ``. For the
247247
2482481. ``spec `` - Similar to package specs, ``name@version ``. GCC in particular also needs
249249 the ``languages `` variant, where the list of languages depends on the available
250- ``exes `` (e.g. do not include "fortran" if ``gfortran `` is not available). If you are
251- **not ** using GCC or Spack as your package manager, ``languages `` is unnecessary.
252- 2. ``prefix `` - Prefix to the compiler binary directory, e.g. ``/usr/ `` for
250+ ``exes `` (e.g., do not include "fortran" if ``gfortran `` is not available). If you
251+ are **not ** using GCC or Spack as your package manager, ``languages `` is unnecessary.
252+ 2. ``prefix `` - Prefix to the compiler binary directory, e.g., ``/usr/ `` for
253253 ``/usr/bin/gcc ``
2542543. ``exes `` - Dictionary to map ``c ``, ``cxx ``, and ``fortran `` to the appropriate file
255255 found in the prefix.
@@ -320,23 +320,27 @@ instead. For each package that you include, you need to define its spec ``name@v
320320and the system path ``prefix `` to the package. Additionally for Spack, you need to set
321321``buildable: False `` to tell Spack not to build that package.
322322
323- At minimum, we recommend you define externals for ``cmake `` and ``mpi `` (users also
324- typically define externals for other libraries, e.g. math libraries like ``blas `` and
325- ``lapack ``). This is because certain packages (e.g. ``cmake ``) can take a long time to
323+ At minimum, we recommend to define externals for ``cmake `` and ``mpi `` (users also
324+ typically define externals for other libraries, e.g., math libraries like ``blas `` and
325+ ``lapack ``). This is because certain packages (e.g., ``cmake ``) can take a long time to
326326build, and packages such as ``mpi ``, ``blas ``, and ``lapack `` can influence runtime
327- performance significantly. Additionally, for systems with accelerators, define externals
328- for CUDA and ROCm runtime libraries (see externals examples for a `CUDA system
327+ performance significantly so it is prudent to use the versions optimized for our system.
328+ Additionally, for systems with accelerators, define externals for CUDA and ROCm runtime
329+ libraries (see externals examples for a `CUDA system
329330<https://github.com/LLNL/benchpark/blob/e82e3a26aef54855cf281c088b8f149ab7d87d9d/systems/llnl-matrix/system.py#L274> `_,
330331or a `ROCm system
331332<https://github.com/LLNL/benchpark/blob/e82e3a26aef54855cf281c088b8f149ab7d87d9d/systems/llnl-elcapitan/system.py#L483> `_).
332- Also, see :ref: `adding-sys-packages `, for help on how to search for the packages
333- available on your system.
333+ See :ref: `adding-sys-packages `, for help on how to search for the packages available on
334+ your system.
334335
335336.. note ::
336337
337- For ``mpi ``, you need to define ``"mpi": {"buildable": False}, `` as a virtual
338- package, and then define your MPI package as we have for the ``openmpi `` package.
339- This is to ensure Spack uses our MPI, and does not try to build another MPI package.
338+ For packages that declare virtual dependencies, e.g., ``depends_on("mpi") ``, you
339+ need to define a virtual package ``"mpi": {"buildable": False}, ``, followed by a
340+ definition of at least one provider of this package (see the provider definition for
341+ ``openmpi `` in our example). This is to ensure Spack uses the provider we specified,
342+ and does not try to build another MPI package. See a similar example for ``blas ``,
343+ ``lapack ``, and their provider ``atlas ``.
340344
341345::
342346
@@ -354,6 +358,11 @@ available on your system.
354358 def compute_packages_section(self):
355359 return {
356360 "packages": {
361+ "blas": {"buildable": False},
362+ "lapack": {"buildable": False},
363+ "atlas": {
364+ "externals": [{"spec": "[email protected] ", "prefix": "/usr"}], 365+ },
357366 "mpi": {"buildable": False},
358367 "openmpi": {
359368 "externals": [
@@ -364,7 +373,7 @@ available on your system.
364373 ]
365374 },
366375 "cmake": {
367- "externals": [{"spec": "cmake@4.0.2 ", "prefix": "/usr"}],
376+ "externals": [{"spec": "cmake@4.1.1 ", "prefix": "/usr"}],
368377 "buildable": False,
369378 },
370379 ...
@@ -462,7 +471,7 @@ cluster=<cluster>``:
462471 'tar': {'buildable': False,
463472 'externals': [{'prefix': '/usr', 'spec': '[email protected] '}]}} 464473
465- where the command should be ran on a cluster that is defined for the given system, e.g.
474+ where the command should be ran on a cluster that is defined for the given system, e.g.,
466475ruby for llnl-cluster. Use this output to update your package definitions in your
467476``system.py ``'s ``compute_package_section() ``.
468477
0 commit comments