From 32c38a490ccfa0e11c2908f74e917c96663f2a87 Mon Sep 17 00:00:00 2001 From: paugier Date: Mon, 8 Jan 2024 15:57:37 +0100 Subject: [PATCH] Improve doc for dev --- Makefile | 2 +- doc/build-from-source.md | 26 ++++++++++++++++++++------ 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index ce6a37d8..92c84954 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,7 @@ MPI_NUM_PROCS ?= 2 develop: pdm install --no-self - pdm run pip install -e . --no-build-isolation --no-deps + pdm run pip install -e . -v --no-build-isolation --no-deps dist: pip install build diff --git a/doc/build-from-source.md b/doc/build-from-source.md index dcf23487..1cd65c0a 100644 --- a/doc/build-from-source.md +++ b/doc/build-from-source.md @@ -122,22 +122,36 @@ enough memory. One can control the number of processes launched in parallel with: ```sh -pip install . -C compile-args=-j2 +pip install . -v -C compile-args=-j2 +``` + +```` + +````{Admonition} Another example to set the optimization level + +The default optimization level is `-O3`. One can change that with: + +```sh +pip install . -v -C setup-args=-Doptimization=2 ``` ```` ```{todo} -- How to use `-march=native`? How to differentiate a native build from a +- How to use `-march=native -Ofast`? How to differentiate a native build from a regular build to produce binaries usable on other computers? -- How to know which compiler and compilation flags are used? +- How to do what was done with the `[compiler]` section of `~/.pythranrc` (described [here](https://pythran.readthedocs.io/en/latest/MANUAL.html#customizing-your-pythranrc))? -- How to check if XSIMD was indeed used? +- How to know which compilers and compilation flags are used? + +- How to `USE_XSIMD`? How to check if XSIMD was indeed used? - How to produce a wheel for other architectures (cross-compilation)? +- Default for `pythran-complex-hook`? Depending on OS? + ``` ### Setup a full developer environment with editable installation @@ -191,13 +205,13 @@ run: pdm install --no-self ``` -This last command creates a virtual environment and install all build and runtime +This command creates a virtual environment and installs all build and runtime dependencies. You can then activate this environment and build/install Fluidsim with: ```sh . .venv/bin/activate -pip install -e . --no-build-isolation --no-deps +pip install -e . -v --no-build-isolation --no-deps ``` ### Python installed with conda/mamba/conda-forge