ginkgo
ginkgo copied to clipboard
Add CMake options to install the documentation, benchmarks and examples
CMake options to install the documentation, benchmarks and examples would be useful for packaging. I guess the benchmarks and examples shouldn't go directly into bin/
as they don't have a common prefix, so the install paths should be configurable. For example, installing the built examples (and source code) to /usr/share/doc/ginkgo-hpc-git/examples/
would make sense.
From a personal experience, I can say that depending on the installation workflow, benchmark
might not work so smoothly out-of-the-box. For example, if spack/easybuild/... is used for installing Ginkgo, then Makefiles generated by CMake can have some hardcoded paths that are no longer valid. In overall, to make benchmark
installation robust, some changes to the run_all_benchmarks.sh
might be needed.
I dont know enough about the documentation and examples to comment about that part.
Thanks @lahwaacz for the report. I think installing documentation might be a good idea. In line with the usual linux packages, it probably should go into doc/
. Benchmarks are generally meant for developers and I dont think we should install and package them. Examples are meant for interactive usage and packaging them is probably not what we would like to have.
What might be interesting (comparing it to the CUDA samples) is installing the source code of the examples, so people can see how to use CMake etc. correctly (also connected to #1152, we don't seem to test out-of-source builds ATM)
During ISC23 conference we had several discussions with Ginkgo developers about the ways Ginkgo installation/packaging can be improved, especially when preparing modules for the HPC centers.
As promised at ISC23, I will state below the things we do at Huawei Munich Research Center when installing Ginkgo release 1.5 module using Easybuild. Note that we heavily use benchmarks, while documentation and examples are not so important for us.
- Copy the whole
benchmark
folder with subfolders - Change the path for all the executables (
matrix_statistics
,conversions
,spmv
,solver
,preconditioner
,matrix_generator
) insiderun_all_benchmark.sh
script, e.g.,./spmv/spmv${BENCH_SUFFIX}...
=>spmv${BENCH_SUFFIX}...
- Add all aforementioned executables to the
PATH
- Prepend
RESULT_DIR
path insiderun_all_benchmark.sh
script with another variable that can be configured by each user at runtime, e.g.,RESULT_DIR="results/${SYSTEM_NAME}/...
=>RESULT_DIR="${GINKGO_RESULT_PREFIX}/results/${SYSTEM_NAME}/...
-
chmod +x run_all_benchmark.sh
and add it to thePATH
as well
After that we simply use run_all_benchmark.sh
, thus avoiding to rely on make benchmark
.
I hope that this is useful for you.
If we want to approach this, we probably want to use separate CMake install components install(... COMPONENT Examples|Benchmark|...)