Skip to content

Commit 29eecef

Browse files
authored
Merge pull request #661 from LLNL/task/white238/fix_rtd
Fix RTD
2 parents a7f0a6e + 335a8eb commit 29eecef

12 files changed

+112
-58
lines changed

.readthedocs.yml

+14
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,21 @@
55
# Required
66
version: 2
77

8+
# Set the OS, Python version and other tools you might need
9+
build:
10+
os: ubuntu-22.04
11+
tools:
12+
python: "3.11"
13+
apt_packages:
14+
- ghostscript
15+
- graphviz
16+
- texlive-full
17+
818
# Optionally set the version of Python and requirements required to build your docs
919
python:
1020
install:
1121
- requirements: docs/requirements.txt
22+
23+
# Build documentation in the docs/ directory with Sphinx
24+
sphinx:
25+
configuration: docs/conf.py
File renamed without changes.

docs/api/target.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ Internal variable names are prefixed with ``_`` to avoid collision with input pa
531531
.. _blt_export_tpl_targets:
532532

533533
blt_export_tpl_targets
534-
~~~~~~~~~~~~~~~~~~~~
534+
~~~~~~~~~~~~~~~~~~~~~~
535535

536536
.. code-block:: cmake
537537
@@ -563,7 +563,7 @@ targets, without the downstream project itself requiring the use of BLT.
563563
.. blt_install_tpl_setups:
564564
565565
blt_install_tpl_setups
566-
~~~~~~~~~~~~~~~~~~~~
566+
~~~~~~~~~~~~~~~~~~~~~~
567567

568568
.. code-block:: cmake
569569

docs/api/utility.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Utility Macros
99
.. _blt_assert_exists:
1010

1111
blt_assert_exists
12-
~~~~~~~~~~~~~~~~~~~
12+
~~~~~~~~~~~~~~~~~
1313

1414
.. code-block:: cmake
1515
@@ -218,7 +218,7 @@ command but doesn't throw an error if the list is empty or not defined.
218218
.. _blt_convert_to_system_includes:
219219

220220
blt_convert_to_system_includes
221-
~~~~~~~~~~~~~~~~~~~
221+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
222222

223223
.. code-block:: cmake
224224

docs/conf.py

+9-3
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@
3131
# Add any Sphinx extension module names here, as strings. They can be extensions
3232
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
3333
extensions = ['sphinx.ext.autodoc',
34-
'sphinx.ext.imgmath']
34+
'sphinx.ext.imgmath',
35+
'sphinxcontrib.jquery']
3536

3637
# Add any paths that contain templates here, relative to this directory.
3738
templates_path = ['_templates']
@@ -47,7 +48,7 @@
4748

4849
# General information about the project.
4950
project = u'BLT: Build, Link, and Test'
50-
copyright = u'2017-2022, BLT Development Team'
51+
copyright = u'2017-2023, BLT Development Team'
5152

5253
# The version info for the project you're documenting, acts as replacement for
5354
# |version| and |release|, also used in various other places throughout the
@@ -128,8 +129,13 @@
128129
# Add any paths that contain custom static files (such as style sheets) here,
129130
# relative to this directory. They are copied after the builtin static files,
130131
# so a file named "default.css" will overwrite the builtin "default.css".
131-
html_static_path = ['_static']
132+
html_static_path = ['_static/blt_style.css']
132133

134+
# These paths are either relative to html_static_path
135+
# or fully qualified paths (eg. https://...)
136+
html_css_files = [
137+
'blt_style.css',
138+
]
133139
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
134140
# using the given strftime format.
135141
#html_last_updated_fmt = '%b %d, %Y'

docs/requirements.txt

+3-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
docutils<0.18
1+
docutils
2+
sphinx==6.2.1
3+
sphinx-rtd-theme==1.2.2

docs/tutorial/common_hpc_dependencies.rst

+3-14
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ which uses MPI to parallelize the calculation over the integration intervals.
4040
To enable MPI, we set ``ENABLE_MPI``, ``MPI_C_COMPILER``, and ``MPI_CXX_COMPILER``
4141
in our host config file. Here is a snippet with these settings for LLNL's Lassen Cluster:
4242

43-
.. literalinclude:: ../../host-configs/llnl/toss_3_x86_64_ib/gcc@8.3.1.cmake
43+
.. literalinclude:: ../../host-configs/llnl/toss_4_x86_64_ib/gcc@10.3.1.cmake
4444
:start-after: _blt_tutorial_mpi_config_start
4545
:end-before: _blt_tutorial_mpi_config_end
4646
:language: cmake
@@ -103,7 +103,7 @@ for you and enable the CUDA language.
103103

104104
Here is a snippet with these settings for LLNL's Lassen Cluster:
105105

106-
.. literalinclude:: ../../host-configs/llnl/blueos_3_ppc64le_ib_p9/clang@upstream_nvcc_c++17.cmake
106+
.. literalinclude:: ../../host-configs/llnl/blueos_3_ppc64le_ib_p9/clang@10.0.1_nvcc_c++17.cmake
107107
:start-after: _blt_tutorial_cuda_config_start
108108
:end-before: _blt_tutorial_cuda_config_end
109109
:language: cmake
@@ -124,7 +124,7 @@ compile each source file with ``nvcc``.
124124

125125
Some other useful CUDA flags are:
126126

127-
.. literalinclude:: ../../host-configs/llnl/blueos_3_ppc64le_ib_p9/clang@upstream_nvcc_xlf.cmake
127+
.. literalinclude:: ../../host-configs/llnl/blueos_3_ppc64le_ib_p9/clang@10.0.1_nvcc_c++14_xlf.cmake
128128
:start-after: _blt_tutorial_useful_cuda_flags_start
129129
:end-before: _blt_tutorial_useful_cuda_flags_end
130130
:language: cmake
@@ -144,17 +144,6 @@ Here is an example of how to add an OpenMP enabled executable:
144144
:end-before: _blt_tutorial_openmp_executable_end
145145
:language: cmake
146146

147-
.. note::
148-
While we have tried to ensure that BLT chooses the correct compile and link flags for
149-
OpenMP, there are several niche cases where the default options are insufficient.
150-
For example, linking with NVCC requires to link in the OpenMP libraries directly instead
151-
of relying on the compile and link flags returned by CMake's FindOpenMP package. An
152-
example of this is in ``host-configs/llnl/blueos_3_ppc64le_ib_p9/clang@upstream_link_with_nvcc.cmake``.
153-
We provide two variables to override BLT's OpenMP flag logic:
154-
155-
* ``BLT_OPENMP_COMPILE_FLAGS``
156-
* ``BLT_OPENMP_LINK_FLAGS``
157-
158147
Here is an example of how to add an OpenMP enabled test that sets the amount of threads used:
159148

160149
.. literalinclude:: ../../tests/smoke/CMakeLists.txt

docs/tutorial/host_configs.rst

+16-16
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ These files use standard CMake commands. CMake ``set()`` commands need to specif
3131
set(CMAKE_VARIABLE_NAME {VALUE} CACHE PATH "")
3232
3333
Here is a snippet from a host-config file that specifies compiler details for
34-
using specific gcc (version 4.9.3 in this case) on the LLNL Pascal cluster.
34+
using specific gcc (version 10.3.1 in this case) on the LLNL Pascal cluster:
3535

36-
.. literalinclude:: ../../host-configs/llnl/toss_3_x86_64_ib/gcc@4.9.3_nvcc.cmake
37-
:start-after: _blt_tutorial_compiler_config_start
38-
:end-before: _blt_tutorial_compiler_config_end
36+
.. literalinclude:: ../../host-configs/llnl/toss_4_x86_64_ib/gcc@10.3.1_nvcc.cmake
37+
:start-after: _blt_pascal_compiler_config_start
38+
:end-before: _blt_pascal_compiler_config_end
3939
:language: cmake
4040

4141

@@ -52,7 +52,7 @@ MPI and CUDA enabled on Pascal:
5252
mkdir build
5353
cd build
5454
# configure using host-config
55-
cmake -C ../../host-configs/llnl/toss_3_x86_64_ib/gcc@4.9.3_nvcc.cmake ..
55+
cmake -C ../../host-configs/llnl/toss_4_x86_64_ib/gcc@10.3.1_nvcc.cmake ..
5656
5757
After building (``make``), you can run ``make test`` on a batch node (where the GPUs reside)
5858
to run the unit tests that are using MPI and CUDA:
@@ -90,16 +90,16 @@ to run the unit tests that are using MPI and CUDA:
9090
Building and Testing on Ray
9191
---------------------------
9292

93-
Here is how you can use the host-config file to configure a build of the ``calc_pi`` project with MPI and CUDA
94-
enabled on the LLNL BlueOS Ray cluster:
93+
Here is how you can use the host-config file to configure a build of the
94+
``calc_pi`` project with MPI and CUDA enabled on the LLNL BlueOS Lassen cluster:
9595

9696
.. code-block:: bash
9797
9898
# create build dir
9999
mkdir build
100100
cd build
101101
# configure using host-config
102-
cmake -C ../../host-configs/llnl/blueos_3_ppc64le_ib_p9/clang@upstream_nvcc_xlf.cmake ..
102+
cmake -C ../../host-configs/llnl/blueos_3_ppc64le_ib_p9/clang@10.0.1_nvcc_c++17.cmake ..
103103
104104
And here is how to build and test the code on Ray:
105105

@@ -134,8 +134,8 @@ And here is how to build and test the code on Ray:
134134
Building and Testing on Summit
135135
-------------------------------
136136

137-
Here is how you can use the host-config file to configure a build of the ``calc_pi`` project with MPI and CUDA
138-
enabled on the OLCF Summit cluster:
137+
Here is how you can use the host-config file to configure a build of the
138+
``calc_pi`` project with MPI and CUDA enabled on the OLCF Summit cluster:
139139

140140
.. code-block:: bash
141141
@@ -198,20 +198,20 @@ Basic TOSS3 (for example: Quartz) host-config that has C, C++, and Fortran Compi
198198

199199
``[email protected] host-config``
200200

201-
.. literalinclude:: ../../host-configs/llnl/toss_3_x86_64_ib/gcc@8.3.1.cmake
201+
.. literalinclude:: ../../host-configs/llnl/toss_4_x86_64_ib/gcc@10.3.1.cmake
202202
:language: cmake
203203
:linenos:
204204

205-
Here are the full example host-config files for LLNL's Pascal, Ray, and Quartz Clusters that uses
206-
the default compilers on the system:
205+
Here are the full example host-config files for LLNL's Pascal, Lassen,
206+
and Quartz Clusters that uses the default compilers on the system:
207207

208208
.. container:: toggle
209209

210210
.. container:: label
211211

212-
``gcc@4.9.3 host-config``
212+
``gcc@10.3.1 host-config``
213213

214-
.. literalinclude:: ../../host-configs/llnl/toss_3_x86_64_ib/gcc@4.9.3_nvcc.cmake
214+
.. literalinclude:: ../../host-configs/llnl/toss_4_x86_64_ib/gcc@10.3.1_nvcc.cmake
215215
:language: cmake
216216
:linenos:
217217

@@ -223,7 +223,7 @@ More complicated BlueOS host-config that has C, C++, MPI, and CUDA support:
223223

224224
``clang@upstream C++17 host-config``
225225

226-
.. literalinclude:: ../../host-configs/llnl/blueos_3_ppc64le_ib_p9/clang@upstream_nvcc_c++17_no_separable.cmake
226+
.. literalinclude:: ../../host-configs/llnl/blueos_3_ppc64le_ib_p9/clang@10.0.1_nvcc_c++17_no_separable.cmake
227227
:language: cmake
228228
:linenos:
229229

host-configs/llnl/toss_4_x86_64_ib/[email protected]

+5-5
Original file line numberDiff line numberDiff line change
@@ -16,24 +16,23 @@
1616
# [email protected] compilers
1717
#------------------------------------------------------------------------------
1818

19+
# _blt_tutorial_compiler_config_start
1920
set(GCC_VERSION "gcc-10.3.1")
2021
set(GCC_HOME "/usr/tce/packages/gcc/${GCC_VERSION}")
2122

22-
# c compiler
2323
set(CMAKE_C_COMPILER "${GCC_HOME}/bin/gcc" CACHE PATH "")
2424

25-
# cpp compiler
2625
set(CMAKE_CXX_COMPILER "${GCC_HOME}/bin/g++" CACHE PATH "")
2726

28-
# fortran support
27+
# Fortran support
2928
set(ENABLE_FORTRAN ON CACHE BOOL "")
30-
31-
# fortran compiler
3229
set(CMAKE_Fortran_COMPILER "${GCC_HOME}/bin/gfortran" CACHE PATH "")
30+
#_blt_tutorial_compiler_config_end
3331

3432
#------------------------------------------------------------------------------
3533
# MPI Support
3634
#------------------------------------------------------------------------------
35+
# _blt_tutorial_mpi_config_start
3736
set(ENABLE_MPI ON CACHE BOOL "")
3837

3938
set(MPI_HOME "/usr/tce/packages/mvapich2/mvapich2-2.3.6-${GCC_VERSION}" CACHE PATH "")
@@ -44,3 +43,4 @@ set(MPI_Fortran_COMPILER "${MPI_HOME}/bin/mpif90" CACHE PATH "")
4443

4544
set(MPIEXEC "/usr/bin/srun" CACHE PATH "")
4645
set(MPIEXEC_NUMPROC_FLAG "-n" CACHE PATH "")
46+
# _blt_tutorial_mpi_config_end
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Copyright (c) 2017-2023, Lawrence Livermore National Security, LLC and
2+
# other BLT Project Developers. See the top-level LICENSE file for details
3+
#
4+
# SPDX-License-Identifier: (BSD-3-Clause)
5+
6+
#------------------------------------------------------------------------------
7+
# Example host-config file for a cluster on a toss4 platform (e.g. quartz) at LLNL
8+
#------------------------------------------------------------------------------
9+
#
10+
# This file provides CMake with paths / details for:
11+
# C,C++, & Fortran compilers + MPI
12+
#
13+
#------------------------------------------------------------------------------
14+
15+
#------------------------------------------------------------------------------
16+
# [email protected] compilers
17+
#------------------------------------------------------------------------------
18+
19+
# _blt_pascal_compiler_config_start
20+
set(GCC_VERSION "gcc-10.3.1")
21+
set(GCC_HOME "/usr/tce/packages/gcc/${GCC_VERSION}")
22+
23+
set(CMAKE_C_COMPILER "${GCC_HOME}/bin/gcc" CACHE PATH "")
24+
set(CMAKE_CXX_COMPILER "${GCC_HOME}/bin/g++" CACHE PATH "")
25+
26+
# Fortran support
27+
set(ENABLE_FORTRAN ON CACHE BOOL "")
28+
set(CMAKE_Fortran_COMPILER "${GCC_HOME}/bin/gfortran" CACHE PATH "")
29+
# _blt_pascal_compiler_config_end
30+
31+
#------------------------------------------------------------------------------
32+
# MPI Support
33+
#------------------------------------------------------------------------------
34+
set(ENABLE_MPI ON CACHE BOOL "")
35+
36+
set(MPI_HOME "/usr/tce/packages/mvapich2/mvapich2-2.3.6-${GCC_VERSION}" CACHE PATH "")
37+
38+
set(MPI_C_COMPILER "${MPI_HOME}/bin/mpicc" CACHE PATH "")
39+
set(MPI_CXX_COMPILER "${MPI_HOME}/bin/mpicxx" CACHE PATH "")
40+
set(MPI_Fortran_COMPILER "${MPI_HOME}/bin/mpif90" CACHE PATH "")
41+
42+
set(MPIEXEC "/usr/bin/srun" CACHE PATH "")
43+
set(MPIEXEC_NUMPROC_FLAG "-n" CACHE PATH "")
44+
45+
#------------------------------------------------------------------------------
46+
# CUDA support
47+
#------------------------------------------------------------------------------
48+
set(ENABLE_CUDA ON CACHE BOOL "")
49+
50+
set(CUDA_TOOLKIT_ROOT_DIR "/usr/tce/packages/cuda/cuda-12.2.2" CACHE PATH "")
51+
set(CMAKE_CUDA_COMPILER "${CUDA_TOOLKIT_ROOT_DIR}/bin/nvcc" CACHE PATH "")
52+
set(CMAKE_CUDA_HOST_COMPILER "${CMAKE_CXX_COMPILER}" CACHE PATH "")
53+
54+
set(CMAKE_CUDA_ARCHITECTURES "70" CACHE STRING "")
55+
set(CMAKE_CUDA_FLAGS "-restrict --expt-extended-lambda -G" CACHE STRING "")
56+
57+
set(CUDA_SEPARABLE_COMPILATION ON CACHE BOOL "" )

host-configs/llnl/toss_4_x86_64_ib_cray/[email protected]_clang_hip.cmake

-8
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,17 @@
1414
#------------------------------------------------------------------------------
1515
# HPE Cray [email protected] compilers
1616
#------------------------------------------------------------------------------
17-
# _blt_tutorial_compiler_config_start
1817
set(CCE_HOME "/usr/tce/packages/cce-tce/cce-13.0.1")
1918
set(CMAKE_C_COMPILER "${CCE_HOME}/bin/craycc" CACHE PATH "")
2019
set(CMAKE_CXX_COMPILER "${CCE_HOME}/bin/crayCC" CACHE PATH "")
2120

2221
# Fortran support
2322
set(ENABLE_FORTRAN ON CACHE BOOL "")
2423
set(CMAKE_Fortran_COMPILER "${CCE_HOME}/bin/crayftn" CACHE PATH "")
25-
# _blt_tutorial_compiler_config_end
2624

2725
#------------------------------------------------------------------------------
2826
# MPI Support
2927
#------------------------------------------------------------------------------
30-
# _blt_tutorial_mpi_config_start
3128
set(ENABLE_MPI ON CACHE BOOL "")
3229

3330
set(MPI_HOME "/usr/tce/packages/cray-mpich-tce/cray-mpich-8.1.13-cce-13.0.1/")
@@ -36,19 +33,14 @@ set(MPI_C_COMPILER "${MPI_HOME}/bin/mpicc" CACHE PATH "")
3633
set(MPI_CXX_COMPILER "${MPI_HOME}/bin/mpicxx" CACHE PATH "")
3734

3835
set(MPI_Fortran_COMPILER "${MPI_HOME}/bin/mpif90" CACHE PATH "")
39-
# _blt_tutorial_mpi_config_end
4036

4137
#------------------------------------------------------------------------------
4238
# HIP support
4339
#------------------------------------------------------------------------------
44-
# _blt_tutorial_hip_config_start
4540
set(ENABLE_HIP ON CACHE BOOL "")
4641

4742
set(ROCM_PATH "/opt/rocm-4.5.2/" CACHE PATH "")
4843
set(CMAKE_HIP_ARCHITECTURES "gfx908" CACHE STRING "gfx architecture to use when generating HIP/ROCm code")
4944

5045
# Recommended link line when not using tce-wrapped compilers
5146
# set(CMAKE_EXE_LINKER_FLAGS "-Wl,--disable-new-dtags -L/opt/rocm-4.5.2/hip/lib -L/opt/rocm-4.5.2/lib -L/opt/rocm-4.5.2/lib64 -Wl,-rpath,/opt/rocm-4.5.2/hip/lib:/opt/rocm-4.5.2/lib:/opt/rocm-4.5.2/lib64 -lamdhip64 -lhsakmt -lhsa-runtime64 -lamd_comgr" CACHE STRING "")
52-
53-
# _blt_tutorial_hip_config_end
54-

0 commit comments

Comments
 (0)