From 8c0b4967faa1d0da5521e05fb7300c7e579a2373 Mon Sep 17 00:00:00 2001 From: Lars Bilke Date: Thu, 19 Oct 2023 09:52:14 +0200 Subject: [PATCH 1/4] [web] Replace eigen links. https://eigen.tuxfamily.org is down. Use https://libeigen.gitlab.io/docs instead. --- .../prj/linear_solvers/linear_solver/eigen/i_eigen.md | 2 +- .../prj/linear_solvers/linear_solver/eigen/t_angle.md | 2 +- .../ProjectFile/prj/linear_solvers/linear_solver/eigen/t_l.md | 2 +- .../linear_solvers/linear_solver/eigen/t_residual_update.md | 2 +- .../prj/linear_solvers/linear_solver/eigen/t_restart.md | 2 +- .../ProjectFile/prj/linear_solvers/linear_solver/eigen/t_s.md | 2 +- .../prj/linear_solvers/linear_solver/eigen/t_scaling.md | 4 ++-- .../prj/linear_solvers/linear_solver/eigen/t_smoothing.md | 2 +- MathLib/LinAlg/Eigen/EigenLinearSolver.cpp | 4 ++-- MathLib/ODE/ODESolverTypes.h | 2 +- .../docs/devguide/advanced/configuration-options/index.md | 2 +- 11 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Documentation/ProjectFile/prj/linear_solvers/linear_solver/eigen/i_eigen.md b/Documentation/ProjectFile/prj/linear_solvers/linear_solver/eigen/i_eigen.md index dae5722ba94..cd4db4acfa9 100644 --- a/Documentation/ProjectFile/prj/linear_solvers/linear_solver/eigen/i_eigen.md +++ b/Documentation/ProjectFile/prj/linear_solvers/linear_solver/eigen/i_eigen.md @@ -1,3 +1,3 @@ Configuration for solvers from the Eigen library. -For details see also the [documentation of the Eigen library](https://eigen.tuxfamily.org/dox/group__Sparse__Reference.html). +For details see also the [documentation of the Eigen library](https://libeigen.gitlab.io/docs/group__Sparse__Reference.html). diff --git a/Documentation/ProjectFile/prj/linear_solvers/linear_solver/eigen/t_angle.md b/Documentation/ProjectFile/prj/linear_solvers/linear_solver/eigen/t_angle.md index 816d5ca0a7a..58171a5ac37 100644 --- a/Documentation/ProjectFile/prj/linear_solvers/linear_solver/eigen/t_angle.md +++ b/Documentation/ProjectFile/prj/linear_solvers/linear_solver/eigen/t_angle.md @@ -5,4 +5,4 @@ through OGS_USE_EIGEN_UNSUPPORTED CMake option. See following links for detail description: -- "Detailed Description" in +- "Detailed Description" in diff --git a/Documentation/ProjectFile/prj/linear_solvers/linear_solver/eigen/t_l.md b/Documentation/ProjectFile/prj/linear_solvers/linear_solver/eigen/t_l.md index bf1ed857e6a..3c8693d282b 100644 --- a/Documentation/ProjectFile/prj/linear_solvers/linear_solver/eigen/t_l.md +++ b/Documentation/ProjectFile/prj/linear_solvers/linear_solver/eigen/t_l.md @@ -4,4 +4,4 @@ through OGS_USE_EIGEN_UNSUPPORTED CMake option. See following links for detail description: -- "Detailed Description" in +- "Detailed Description" in diff --git a/Documentation/ProjectFile/prj/linear_solvers/linear_solver/eigen/t_residual_update.md b/Documentation/ProjectFile/prj/linear_solvers/linear_solver/eigen/t_residual_update.md index 25686010beb..5f75293b331 100644 --- a/Documentation/ProjectFile/prj/linear_solvers/linear_solver/eigen/t_residual_update.md +++ b/Documentation/ProjectFile/prj/linear_solvers/linear_solver/eigen/t_residual_update.md @@ -5,4 +5,4 @@ through OGS_USE_EIGEN_UNSUPPORTED CMake option. See following links for detail description: -- "Detailed Description" in +- "Detailed Description" in diff --git a/Documentation/ProjectFile/prj/linear_solvers/linear_solver/eigen/t_restart.md b/Documentation/ProjectFile/prj/linear_solvers/linear_solver/eigen/t_restart.md index 76b8eb7c5c8..0379ee378c6 100644 --- a/Documentation/ProjectFile/prj/linear_solvers/linear_solver/eigen/t_restart.md +++ b/Documentation/ProjectFile/prj/linear_solvers/linear_solver/eigen/t_restart.md @@ -5,4 +5,4 @@ through OGS_USE_EIGEN_UNSUPPORTED CMake option. See following links for detail description: -- "Detailed Description" in +- "Detailed Description" in diff --git a/Documentation/ProjectFile/prj/linear_solvers/linear_solver/eigen/t_s.md b/Documentation/ProjectFile/prj/linear_solvers/linear_solver/eigen/t_s.md index 132d574f5c8..859aa276561 100644 --- a/Documentation/ProjectFile/prj/linear_solvers/linear_solver/eigen/t_s.md +++ b/Documentation/ProjectFile/prj/linear_solvers/linear_solver/eigen/t_s.md @@ -4,4 +4,4 @@ through OGS_USE_EIGEN_UNSUPPORTED CMake option. See following links for detail description: -- "Detailed Description" in +- "Detailed Description" in diff --git a/Documentation/ProjectFile/prj/linear_solvers/linear_solver/eigen/t_scaling.md b/Documentation/ProjectFile/prj/linear_solvers/linear_solver/eigen/t_scaling.md index fde0cebb933..74444c77fb3 100644 --- a/Documentation/ProjectFile/prj/linear_solvers/linear_solver/eigen/t_scaling.md +++ b/Documentation/ProjectFile/prj/linear_solvers/linear_solver/eigen/t_scaling.md @@ -4,6 +4,6 @@ through OGS_USE_EIGEN_UNSUPPORTED CMake option. See following links for detail description: -- "Note" in -- "Detailed Description" in +- "Note" in +- "Detailed Description" in - References : D. Ruiz and B. Ucar, A Symmetry Preserving Algorithm for Matrix Scaling, INRIA Research report RR-7552 diff --git a/Documentation/ProjectFile/prj/linear_solvers/linear_solver/eigen/t_smoothing.md b/Documentation/ProjectFile/prj/linear_solvers/linear_solver/eigen/t_smoothing.md index 339f112ad50..170b1f20d57 100644 --- a/Documentation/ProjectFile/prj/linear_solvers/linear_solver/eigen/t_smoothing.md +++ b/Documentation/ProjectFile/prj/linear_solvers/linear_solver/eigen/t_smoothing.md @@ -4,4 +4,4 @@ through OGS_USE_EIGEN_UNSUPPORTED CMake option. See following links for detail description: -- "Detailed Description" in +- "Detailed Description" in diff --git a/MathLib/LinAlg/Eigen/EigenLinearSolver.cpp b/MathLib/LinAlg/Eigen/EigenLinearSolver.cpp index 84f6b29f77b..91b79bc088a 100644 --- a/MathLib/LinAlg/Eigen/EigenLinearSolver.cpp +++ b/MathLib/LinAlg/Eigen/EigenLinearSolver.cpp @@ -259,7 +259,7 @@ class EigenIterativeLinearSolver final : public EigenLinearSolverBase // matrix must be copied, because Eigen's linear solver stores a // reference to it cf. - // https://eigen.tuxfamily.org/dox/classEigen_1_1IterativeSolverBase.html#a7dfa55c55e82d697bde227696a630914 + // https://libeigen.gitlab.io/docs/classEigen_1_1IterativeSolverBase.html#a7dfa55c55e82d697bde227696a630914 A_ = A; if (!A_.isCompressed()) @@ -339,7 +339,7 @@ std::unique_ptr createIterativeSolver( case EigenOption::PreconType::ILUT: // TODO for this preconditioner further options can be passed. // see - // https://eigen.tuxfamily.org/dox/classEigen_1_1IncompleteLUT.html + // https://libeigen.gitlab.io/docs/classEigen_1_1IncompleteLUT.html return createIterativeSolver>(); default: diff --git a/MathLib/ODE/ODESolverTypes.h b/MathLib/ODE/ODESolverTypes.h index 0d0494db76a..ee752f8beb9 100644 --- a/MathLib/ODE/ODESolverTypes.h +++ b/MathLib/ODE/ODESolverTypes.h @@ -26,7 +26,7 @@ namespace ODE * \tparam N number of rows * \tparam M number of columns * - * \see https://eigen.tuxfamily.org/dox/classEigen_1_1Map.html + * \see https://libeigen.gitlab.io/docs/classEigen_1_1Map.html */ template using MappedMatrix = Eigen::Map>; diff --git a/web/content/docs/devguide/advanced/configuration-options/index.md b/web/content/docs/devguide/advanced/configuration-options/index.md index b11c0c38210..ea7b62cb994 100644 --- a/web/content/docs/devguide/advanced/configuration-options/index.md +++ b/web/content/docs/devguide/advanced/configuration-options/index.md @@ -46,7 +46,7 @@ CMake switches to enable / disable parts of OGS. - `OGS_CPU_ARCHITECTURE` - Optimizes for the given CPU architecture see [-march](https://gcc.gnu.org/onlinedocs/gcc-4.5.3/gcc/i386-and-x86_002d64-Options.html)-flag. Defaults to `native`. For redistributable binaries set to `generic` on Linux and `core2` on Mac OS. Can be disabled when set to `OFF`. - `CMAKE_LIBRARY_SEARCH_PATH` - Additional library installation path, e.g. `/opt/local` or `C:/libs` - `OGS_DEPENDENCY_VERSIONS` - Overwrite individual entries in `web/data/versions.json`. Should be quoted and `;`-separated, e.g.: `-DOGS_DEPENDENCY_VERSIONS="minimum_version.petsc=3.16.2;ctest.large_runtime=120"`. -- `OGS_USE_MKL` - Enables MKL support. Requires MKL to be installed on the system.[^MKL] A CMake or environment variable `MKLROOT` or `MKL_DIR` has to point to the MKL installation directory. To enable 64-bit array indices in MKL add `-DMKL_USE_interface=ilp64` on the first CMake run (with a clean CMake cache) but this seems [not supported by Eigen](https://eigen.tuxfamily.org/dox/TopicUsingIntelMKL.html). +- `OGS_USE_MKL` - Enables MKL support. Requires MKL to be installed on the system.[^MKL] A CMake or environment variable `MKLROOT` or `MKL_DIR` has to point to the MKL installation directory. To enable 64-bit array indices in MKL add `-DMKL_USE_interface=ilp64` on the first CMake run (with a clean CMake cache) but this seems [not supported by Eigen](https://libeigen.gitlab.io/docs/TopicUsingIntelMKL.html). - `OGS_USE_PETSC_MKL_EIGEN_OPENMP` - Also enables OpenMP multithreading when PETSc and MKL is used. This pulls in another OpenMP implementation besides the Intel MKL OpenMP. **Experimental feature!** [^MKL]: The `mkl_link_tool` (part of the MKL installation) is used for setting up necessary compiler flags. It is a 32-bit executable. On Arch Linux you need to enable the [multilib-repository](https://wiki.archlinux.org/title/official_repositories#Enabling_multilib) and then install the package `lib32-gcc-libs` (otherwise you may get this error when trying to run it: `mkl_link_tool: No such file or directory`) On other Linux distributions you have to install the package `lib32stdc++6` (Ubuntu / Debian) or `libstdc++.i686` (yum-based)! On Windows please also install the *Intel oneAPI Threading Building Blocks* during installation! From e35c79100bade79611be4dfaf7a5cd56ec2ff85e Mon Sep 17 00:00:00 2001 From: Lars Bilke Date: Thu, 19 Oct 2023 10:10:18 +0200 Subject: [PATCH 2/4] [ci] 'check web links' fix dependency. --- scripts/ci/jobs/web-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/ci/jobs/web-check.yml b/scripts/ci/jobs/web-check.yml index a449639b8c5..79b9cd0ae64 100644 --- a/scripts/ci/jobs/web-check.yml +++ b/scripts/ci/jobs/web-check.yml @@ -4,7 +4,7 @@ check web links: tags: [docker] extends: - .rules-master-manual - needs: [ci_images, "build linux arch", "build mac petsc amd64"] + needs: [ci_images, "build linux arch", "build mac petsc arm64"] image: $WEB_IMAGE script: # Copy notebook pages From f1484e92014249b27d8f32956cc9ab046fe1ba9c Mon Sep 17 00:00:00 2001 From: Lars Bilke Date: Thu, 19 Oct 2023 10:58:50 +0200 Subject: [PATCH 3/4] [ci] Archive .ipynb-files. --- scripts/ci/extends/test-artifacts.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/ci/extends/test-artifacts.yml b/scripts/ci/extends/test-artifacts.yml index 9abe04405f2..27700422e2a 100644 --- a/scripts/ci/extends/test-artifacts.yml +++ b/scripts/ci/extends/test-artifacts.yml @@ -10,6 +10,7 @@ - build/*/*.tar.gz # Notebook testrunner: - build/**/*.ipynb.html + - build/**/*.ipynb - build/**/*out.txt - build/**/web/content expire_in: 1 week From 134693d95e1a9dcbb41f3c81078c3cc160adfbab Mon Sep 17 00:00:00 2001 From: Lars Bilke Date: Thu, 19 Oct 2023 13:05:53 +0200 Subject: [PATCH 4/4] [nb,ci] Copy converted ipynb-file to web output path. --- Tests/Data/Notebooks/testrunner.py | 22 ++++++++++++---------- scripts/ci/jobs/web-preview.yml | 6 +++--- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/Tests/Data/Notebooks/testrunner.py b/Tests/Data/Notebooks/testrunner.py index 8b60f1fd578..41c8aba5051 100644 --- a/Tests/Data/Notebooks/testrunner.py +++ b/Tests/Data/Notebooks/testrunner.py @@ -16,6 +16,7 @@ def save_to_website(exec_notebook_file, web_path): output_path_arg = "" + output_path = "" notebook = nbformat.read(exec_notebook_file, as_version=4) first_cell = notebook.cells[0] if "Tests/Data" in exec_notebook_file: @@ -28,10 +29,9 @@ def save_to_website(exec_notebook_file, web_path): Path(build_dir) / Path("web/content/docs/benchmarks") / Path(parsed_frontmatter["web_subsection"]) + / Path(exec_notebook_file).stem.lower() ) - output_path_arg = ( - f"--output-dir={Path(output_path) / Path(exec_notebook_file).stem}" - ) + output_path_arg = f"--output-dir={Path(output_path)}" template = os.path.join( os.path.dirname(os.path.abspath(__file__)), @@ -54,17 +54,19 @@ def save_to_website(exec_notebook_file, web_path): if not "Tests/Data" in exec_notebook_file: return + Path(output_path).mkdir(parents=True, exist_ok=True) + + to_copy_path = Path(output_path) / "." + + if is_jupytext: + shutil.copy(exec_notebook_file, to_copy_path) + print(f"Copying ${exec_notebook_file} to {to_copy_path}") + for subfolder in ["figures", "images"]: figures_path = os.path.abspath( os.path.join(os.path.dirname(notebook_file_path), subfolder) ) - symlink_figures_path = os.path.join( - web_path, - "content", - output_path, - os.path.splitext(os.path.basename(exec_notebook_file))[0].lower(), - subfolder, - ) + symlink_figures_path = to_copy_path / subfolder if os.path.exists(figures_path) and not os.path.exists(symlink_figures_path): print( f"{subfolder} folder detected, copying {figures_path} to " diff --git a/scripts/ci/jobs/web-preview.yml b/scripts/ci/jobs/web-preview.yml index c504e908320..f57f9b04f73 100644 --- a/scripts/ci/jobs/web-preview.yml +++ b/scripts/ci/jobs/web-preview.yml @@ -10,12 +10,12 @@ preview web site: variables: HUGO_ENVIRONMENT: "staging" script: - # Copy notebook pages - - cp -rl build/*/web/content web/ || true - cd web + - python scripts/convert_notebooks.py + # Copy notebook pages + - cp -rl ../build/*/web/content ./ || true # Symlink for prj link checks (data-link shortcode) - ln -s ../Tests . - - python scripts/convert_notebooks.py - yarn - yarn build rules: