Skip to content

Commit

Permalink
fix the README and the documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreaGuarracino committed Dec 9, 2022
1 parent bfa82ba commit 33fb1c7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ This means that the docker image can run on processors that support AVX or later
To achieve better performance, it is **STRONGLY RECOMMENDED** to build the docker image locally after replacing `-march=sandybridge` with `-march=native` and the `Generic` build type with `Release` in the `Dockerfile`:

```bash
sed -i 's/-march=haswell/-march=native/g' Dockerfile
sed -i 's/-march=sandybridge/-march=native/g' Dockerfile
sed -i 's/Generic/Release/g' Dockerfile
```

Expand Down
14 changes: 10 additions & 4 deletions docs/rst/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,16 @@ build docker locally
--------------------------

Multiple ``pggb``'s tools use SIMD instructions that require AVX (like ``abPOA``) or need it to improve performance.
The currently built docker image has ``-march=haswell`` set.
This means that the docker image can run on processors that support AVX256 or later, improving portability, but preventing your system hardware from being fully exploited.
The currently built docker image has ``-Ofast -march=sandybridge`` set.
This means that the docker image can run on processors that support AVX or later, improving portability, but preventing your system hardware from being fully exploited.
In practice, this could mean that specific tools are up to 9 times slower.
And that a pipeline runs ~30% slower compared to when using a native build docker image.

To achieve better performance, it is **STRONGLY RECOMMENDED** to build the docker image locally after replacing ``-march=haswell`` with ``-march=native`` and the ``Generic` build type with `Release`` in the ``Dockerfile``:
To achieve better performance, it is **STRONGLY RECOMMENDED** to build the docker image locally after replacing ``-march=sandybridge`` with ``-march=native`` and the ``Generic` build type with `Release`` in the ``Dockerfile``:

.. code-block:: bash
sed -i 's/-march=haswell/-march=native/g' Dockerfile
sed -i 's/-march=sandybridge/-march=native/g' Dockerfile
sed -i 's/Generic/Release/g' Dockerfile
To build a docker image locally using the ``Dockerfile``, execute:
Expand All @@ -93,6 +95,8 @@ Staying in the ``pggb`` directory, we can run ``pggb`` with the locally build im
docker run -it -v ${PWD}/data/:/data ${USER}/pggb "pggb -i /data/HLA/DRB1-3123.fa.gz -p 70 -s 3000 -G 2000 -n 10 -t 16 -v -V 'gi|568815561:#' -o /data/out -M -C cons,100,1000,10000 -m"
A script that handles the whole building process automatically can be found at `https://github.com/nf-core/pangenome#building-a-native-container <https://github.com/nf-core/pangenome#building-a-native-container>`_`.


Singularity
======
Expand Down Expand Up @@ -122,6 +126,8 @@ For Singularity to be able to read and write files to a directory on the host op
.. code-block:: bash
singularity run -B ${PWD}/data:/data ../pggb_latest.sif "pggb -i /data/HLA/DRB1-3123.fa.gz -p 70 -s 3000 -G 2000 -n 10 -t 16 -v -V 'gi|568815561:#' -o /data/out -M -m"
A script that handles the whole building process automatically can be found at `https://github.com/nf-core/pangenome#building-a-native-container <https://github.com/nf-core/pangenome#building-a-native-container>`_`.


Bioconda
========
Expand Down

0 comments on commit 33fb1c7

Please sign in to comment.