Skip to content

Commit 26a943c

Browse files
authored
[Doc] fix some stuff in quickstart & set ACPP_DEBUG_LEVEL=0 in envs (#1770)
1 parent 2dc3593 commit 26a943c

5 files changed

Lines changed: 22 additions & 9 deletions

File tree

doc/sphinx/source/user_guide/quickstart.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ If you get an error that's weird and it is probably simpler to drop a message on
4646
With Homebrew:
4747

4848
```bash
49-
brew install cmake libomp boost open-mpi adaptivecpp python ninja
49+
brew install cmake libomp boost open-mpi adaptivecpp python ninja fmt
5050
```
5151

5252
:::
@@ -124,14 +124,14 @@ Shamrock provides its own utilities with pre-made configurations for various mac
124124
:::{tab-item} Linux (Debian & Ubuntu)
125125

126126
```bash
127-
./env/new-env --builddir build --machine debian-generic.acpp -- --backend omp
127+
./env/new-env --machine debian-generic.acpp --builddir build -- --backend omp
128128
```
129129

130130
:::
131131
:::{tab-item} MacOS
132132

133133
```bash
134-
./env/new-env --builddir build --machine macos-generic.acpp -- --backend omp
134+
./env/new-env --machine macos-generic.acpp --builddir build --
135135
```
136136

137137
:::
@@ -345,6 +345,10 @@ You should see a figure like:
345345
The `--rscript` flag means run-scripts. In Shamrock since everything goes through Python your run will be a Python script, hence the name "run script". Here it is a benchmark of one of Shamrock's algorithms.
346346
:::
347347

348+
:::{note}
349+
It is normal for the figures to vary slightly between runs. This is a benchmark of the exclusive scans implemented in Shamrock, which are quite fast and therefore subject to some run-to-run variability. On CPU, this is especially noticeable depending on what else is using the memory bandwidth.
350+
:::
351+
348352
### Python interpreter + Ipython
349353

350354
:::::{warning}
@@ -403,6 +407,10 @@ import shamrock
403407
In [1]:
404408
```
405409

410+
:::{note}
411+
Currently on MacOS and maybe some other OS you will see `UserWarning: Attempting to work in a virtualenv. If you encounter problems, please install IPython inside the virtualenv.` do not worry to much about it, it works just fine without a venv. We will create one at the next step anyway.
412+
:::
413+
406414
Now you can use the same python as one would in runscripts. A classic one to run there is the following (which is what I do in the basic CI test btw):
407415

408416
```{code-block} python

env/machine/archlinux/acpp/env_built_acpp.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ export ACPP_APPDB_DIR=/tmp/acpp-appdb # otherwise it would we in the $HOME/.acpp
5555
export ACPP_GIT_DIR=$BUILD_DIR/.env/acpp-git
5656
export ACPP_BUILD_DIR=$BUILD_DIR/.env/acpp-builddir
5757
export ACPP_INSTALL_DIR=$BUILD_DIR/.env/acpp-installdir
58+
export ACPP_DEBUG_LEVEL=0
5859
export LLVM_INSTALL_DIR=/usr/lib/llvm20
5960

6061
function setupcompiler {

env/machine/conda/acpp/conda_acpp_env.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ echo " --------- Activating conda environment --------- "
1313
conda activate shamrock_dev_environment
1414
echo " ------------- Environment activated ------------ "
1515

16-
if which ccache &> /dev/null; then
16+
if which ccache &>/dev/null; then
1717
# to debug
1818
#export CCACHE_DEBUG=1
1919
#export CCACHE_DEBUGDIR=$BUILD_DIR/ccache-debug
@@ -28,9 +28,9 @@ fi
2828
export CMAKE_GENERATOR="Ninja"
2929
export ACPP_APPDB_DIR=/tmp/acpp-appdb # otherwise it would we in the $HOME/.acpp
3030

31-
3231
#enfore the use of the correct clang++ as the installation of acpp register a buggy compiler
3332
export ACPP_CPU_CXX=$(which clang++)
33+
export ACPP_DEBUG_LEVEL=0
3434

3535
function shamconfigure {
3636
cmake \

env/machine/debian-generic/acpp/env_built_acpp.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Everything before this line will be provided by the new-env script
22

3-
if which ccache &> /dev/null; then
3+
if which ccache &>/dev/null; then
44
export CCACHE_CMAKE_ARG="-DCMAKE_CXX_COMPILER_LAUNCHER=ccache"
55
echo " ----- ccache found, using it ----- "
66
else
@@ -12,6 +12,7 @@ export ACPP_APPDB_DIR=/tmp/acpp-appdb # otherwise it would we in the $HOME/.acpp
1212
export ACPP_GIT_DIR=$BUILD_DIR/.env/acpp-git
1313
export ACPP_BUILD_DIR=$BUILD_DIR/.env/acpp-builddir
1414
export ACPP_INSTALL_DIR=$BUILD_DIR/.env/acpp-installdir
15+
export ACPP_DEBUG_LEVEL=0
1516

1617
function setupcompiler {
1718
clone_acpp || return

env/machine/macos-generic/acpp/env_built_acpp.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Everything before this line will be provided by the new-env script
22

3-
if which ccache &> /dev/null; then
3+
if which ccache &>/dev/null; then
44
# to debug
55
#export CCACHE_DEBUG=1
66
#export CCACHE_DEBUGDIR=$BUILD_DIR/ccache-debug
@@ -20,15 +20,18 @@ echo " ---------- Activating sham environment ---------- "
2020
for package in "${required_packages[@]}"; do
2121
if ! brew list --versions "$package" &>/dev/null; then
2222
echo "Error: $package is not installed. Please run 'brew install $package'."
23-
return 1 # Abort sourcing the script and return to the current shell
23+
return 1 # Abort sourcing the script and return to the current shell
2424
else
2525
echo "$package is installed."
2626
fi
2727
done
2828

2929
echo "All required packages are installed."
3030

31-
ACPP_ROOT=`brew list adaptivecpp | grep acpp-info | sed -E "s/\/bin\/.*//"`
31+
export ACPP_DEBUG_LEVEL=0
32+
33+
ACPP_ROOT=$(brew list adaptivecpp | grep acpp-info | sed -E "s/\/bin\/.*//")
34+
3235
echo " ------------- Environment activated ------------- "
3336

3437
function shamconfigure {

0 commit comments

Comments
 (0)