Skip to content

Commit

Permalink
Improve doc for dev
Browse files Browse the repository at this point in the history
  • Loading branch information
paugier committed Jan 8, 2024
1 parent b118297 commit 32c38a4
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
26 changes: 20 additions & 6 deletions doc/build-from-source.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 32c38a4

Please sign in to comment.