ginkgo-project / ginkgo

Numerical linear algebra software package
https://ginkgo-project.github.io/
BSD 3-Clause "New" or "Revised" License
402 stars 88 forks source link

Add CMake options to install the documentation, benchmarks and examples #1144

Open lahwaacz opened 2 years ago

lahwaacz commented 2 years ago

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.

stanisic commented 2 years ago

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.

pratikvn commented 1 year ago

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.

upsj commented 1 year ago

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)

stanisic commented 1 year ago

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.

After that we simply use run_all_benchmark.sh, thus avoiding to rely on make benchmark.

I hope that this is useful for you.

upsj commented 10 months ago

If we want to approach this, we probably want to use separate CMake install components install(... COMPONENT Examples|Benchmark|...)