Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
lahwaacz opened this issue Oct 15, 2022 · 5 comments
Open
Labels
is:enhancement An improvement of an existing feature. reg:build This is related to the build system. reg:documentation This is related to documentation. reg:packaging Regarding poackaging Ginkgo

Comments

@lahwaacz
Copy link
Contributor

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
Copy link

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
Copy link
Member

pratikvn commented Nov 1, 2022

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.

@pratikvn pratikvn added is:enhancement An improvement of an existing feature. reg:build This is related to the build system. reg:documentation This is related to documentation. reg:packaging Regarding poackaging Ginkgo labels Nov 1, 2022
@upsj
Copy link
Member

upsj commented Nov 1, 2022

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
Copy link

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) inside run_all_benchmark.sh script, e.g., ./spmv/spmv${BENCH_SUFFIX}... => spmv${BENCH_SUFFIX}...
  • Add all aforementioned executables to the PATH
  • Prepend RESULT_DIR path inside run_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 the PATH 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.

@upsj
Copy link
Member

upsj commented Dec 8, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
is:enhancement An improvement of an existing feature. reg:build This is related to the build system. reg:documentation This is related to documentation. reg:packaging Regarding poackaging Ginkgo
Projects
None yet
Development

No branches or pull requests

4 participants