Skip to content

Commit 44391e1

Browse files
committed
Build guide fix.
1 parent 7f08ecd commit 44391e1

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

docs/sphinx/buildGuide.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ In addition to the standard CMake and BLT options LvArray supports the following
5252
* ``ENABLE_TOTALVIEW_OUTPUT`` : default ``OFF``
5353
Makes it easier to inspect the ``LvArray::Array`` in TotalView. This functionality is highly dependent on the version of TotalView used.
5454

55+
Using LvArray Your Application
56+
------------------------------
57+
Once LvArray has been installed if your application uses CMake importing LvArray is as simple as defining ``LVARRAY_DIR`` as the path to LvArray install directory and then adding ``find_package(LVARRAY)``. This will export a ``lvarray`` target that can then be used by ``target_link_libraries`` and the like.
58+
5559
Host Configs
5660
------------
5761
Host config files are a convenient way to group CMake options for a specific configuration together. There are a set of example host configs in the ``host-configs`` directory. Once you've created a host config file you can use ``scripts/config-build.py`` to create the build directory and run CMake for you. An example usage would be ``python ./scripts/config-build.py --hc host-configs/LLNL/[email protected]``.
@@ -174,11 +178,13 @@ LvArray also has an ``uberenv`` based build which simplifies building LvArray's
174178
Two simple examples are provided below.
175179

176180
::
181+
177182
quartz2498 > ./scripts/uberenv/uberenv.py --install --spec="@develop %[email protected]"
178183

179184
This will build RAJA (LvArray's only hard dependency) and LvArray and install them in ``./uberenv_libs/[email protected]``. By default libraries are built in the ``RelWithDebInfo`` CMake configuration.
180185

181186
::
187+
182188
quartz2498 > ./scripts/uberenv/uberenv.py --spec="@develop %[email protected] ^[email protected] build_type=Release"
183189

184190
This will install RAJA in the same location but it will be built in the ``Release`` configuration and instead of building and installing LvArray a host-config will be generated and placed in the current directory. This can be useful for developing or debugging.
@@ -190,11 +196,13 @@ Adding support for a new system is easy too, you just need to create a directory
190196
For reference two more complicated specs are shown below
191197

192198
::
199+
193200
lassen709 > ./scripts/uberenv/uberenv.py --install --run_tests --spec="@develop+umpire+chai+caliper+cuda %[email protected] cuda_arch=70 ^[email protected] ^[email protected]~examples~exercises cuda_arch=70 ^[email protected]~examples cuda_arch=70 ^chai@master~benchmarks~examples cuda_arch=70 ^[email protected]~adiak~mpi~dyninst~callpath~papi~libpfm~gotcha~sampler~sosflow"
194201

195202
This will use ``[email protected]`` and ``[email protected]`` to build and install RAJA v0.12.1 without examples or exercises, Umpire v4.0.1 without examples, the master branch of CHAI without benchmarks or examples, and caliper v2.4 without a bunch of options. Finally it will build and install LvArray after running the unit tests and verifying that they pass. Note that each package that depends on cuda gets the ``cuda_arch=70`` variable.
196203

197204
::
205+
198206
quartz2498 > ./scripts/uberenv/uberenv.py --spec="@tribol+umpire %[email protected] ^[email protected] build_type=Release ^[email protected] build_type=Release"
199207

200208
This will use ``[email protected]`` to build and install RAJA V0.12.1 in release and Umpire v4.0.1 in release. Finally it will generate a host config that can be used to build LvArray.

0 commit comments

Comments
 (0)