docs/src/install.md

Sun, 09 Jul 2023 12:12:29 +0200

author
Mike Becker <universe@uap-core.de>
date
Sun, 09 Jul 2023 12:12:29 +0200
changeset 748
84a000a53d9b
parent 737
b3b113eac3b8
child 760
52e49533e7b4
permissions
-rw-r--r--

add release date for UCX 3.0

---
title: Build Instructions
---

The build processes uses CMake starting with UCX 3.0.
First, download the source code from [Source Forge][1].

    wget https://sourceforge.net/projects/ucx/files/ucx-latest.tar.gz
    tar -xzf ucx-latest.tar.gz
    cd ucx-latest
    
Then create a build directory and use cmake to create the build files,
execute the build, and - optionally - install the files.

    mkdir build
    cd build
    cmake ..
    cmake --build .
    sudo cmake --install .

When compiling UCX 3, you can tweak the buffer sizes for small-buffer-optimization.
You can do this, be pre-defining one or more of the following macros:

--------------------------------- --------------------------------------------------------------------- ----------
Macro                             Description                                                           Default
--------------------------------- --------------------------------------------------------------------- ----------
CX_ARRAY_SWAP_SBO_SIZE            The maximum item size in an array list that uses SBO.                 128

CX_LINKED_LIST_SORT_SBO_SIZE      The maximum list size that uses SBO during sort.                      1024

CX_LINKED_LIST_SWAP_SBO_SIZE      The maximum item size that uses SBO swap instead of relinking.        128

CX_PRINTF_SBO_SIZE                The maximum string length printf.h uses stack memory for.             512

CX_STRSTR_SBO_SIZE                The maximum length of the "needle" in strstr that can use SBO.        512
--------------------------------- --------------------------------------------------------------------- ----------

You can also tweak some other buffer sizes with the same technique:

--------------------------------- --------------------------------------------------- ----------
Macro                             Description                                         Default
--------------------------------- --------------------------------------------------- ----------
CX_STRREPLACE_INDEX_BUFFER_SIZE   The number of matches one index buffer can store.   64

CX_STREAM_COPY_BUF_SIZE           The buffer size on the stack for a stream copy.     1024

CX_STREAM_BCOPY_BUF_SIZE          The buffer size on the heap for a stream copy.      8192
--------------------------------- --------------------------------------------------- ----------

---

### UCX 2.1

The build procedure for UCX 2.1 uses a configure script.
For Microsoft Windows, you will need an appropriate port of the linux
tools (like MinGW or Cygwin).
First, download the source code from [Source Forge][1].

    wget https://sourceforge.net/projects/ucx/files/ucx-2.1.0.tar.gz
    tar -xzf ucx-2.1.0.tar.gz
    cd ucx-2.1.0

Then issue the `configure` and `make` commands.

    ./configure && make

To verify your installment you can issue `make check`. If everything is fine,
you can install UCX with

    make install
    
Note, that you might need administrative privileges for a system wide
installation.

[1]: https://sourceforge.net/projects/ucx/files/

mercurial