From 3e05386fe9bd7c82262bd43d649f3f4a322f9a4d Mon Sep 17 00:00:00 2001 From: Matthias Wolf Date: Fri, 10 May 2024 08:55:23 +0200 Subject: [PATCH 01/26] Add basic CI and clean up more. --- .github/workflows/test.yml | 42 ++++++++++++++++++++ examples/touch_display_convert.cpp | 62 ------------------------------ 2 files changed, 42 insertions(+), 62 deletions(-) create mode 100644 .github/workflows/test.yml delete mode 100644 examples/touch_display_convert.cpp diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..c12a28a --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,42 @@ +name: Run tests + +on: + push: + branches: ['main'] + pull_request: + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + packages: [""] + submodules: [true] + include: + - packages: "catch2 libcli11-dev" + submodules: false + + steps: + - uses: actions/checkout@v3 + with: + submodules: ${{ matrix.submodules }} + + - name: Set up Apache Arrow repositories + run: | + apt-get update + apt-get install -y ca-certificates lsb-release wget + wget https://apache.jfrog.io/artifactory/arrow/$(lsb_release --id --short | tr 'A-Z' 'a-z')/apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb + apt-get install -y ./apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb + apt-get update + + - name: Install build dependencies + run: | + apt-get install -y cmake g++ libhdf5-openmpi-dev librange-v3-dev ninja-build ${{ matrix.packages }} + ls -l /var/cache/apt/archives + apt-get install -y libarrow-dev libparquet-dev + ls -l /var/cache/apt/archives + + - name: Configure + run: | + cmake -B build -S . -GNinja \ + -DCMAKE_CXX_COMPILER=$(which mpicxx) diff --git a/examples/touch_display_convert.cpp b/examples/touch_display_convert.cpp deleted file mode 100644 index 7049d63..0000000 --- a/examples/touch_display_convert.cpp +++ /dev/null @@ -1,62 +0,0 @@ -#include -#include "touch_reader.h" -#include "parquet_reader.h" -#include "converter.h" -#include "progress.h" - -using namespace std; - -#define TEST_N_ENTRIES 20 - -int main(int argc, char *argv[]) -{ - if( argc < 2) { - printf("usage: %s \n", argv[0]); - return 1; - } - - //It will swap endians if we use the xxx_endian executable - int len = strlen(argv[0]); - bool swap_endians = false; - if( strcmp( &(argv[0][len-6]), "endian" ) == 0 ) { - swap_endians=true; - printf("[Info] Swapping endians\n"); - } - - TouchReader reader(argv[1], swap_endians); - - printf( "| NRN_SRC | NRN_DST | SECTION/SEGMENT/OFFSET[SRC->DST] | DIST SOMA | BRANCH |\n" ); - printf( "|---------------------------------------------------------------------------------------------|\n" ); - for( int i=0; i [%2u/%2u/%6.2f] | %9.2f | %6d |\n", - t.pre_synapse_ids[NEURON_ID], - t.post_synapse_ids[NEURON_ID], - t.pre_synapse_ids[SECTION_ID], - t.pre_synapse_ids[SEGMENT_ID], - t.pre_offset, - t.post_synapse_ids[SECTION_ID], - t.post_synapse_ids[SEGMENT_ID], - t.post_offset, - t.distance_soma, - t.branch - ); - - } - - string parquetFilename( argv[1] ); - std::size_t slashPos = parquetFilename.find_last_of("/\\"); - parquetFilename = parquetFilename.substr(slashPos+1); - parquetFilename += ".parquet"; - - TouchWriterParquet writer(parquetFilename); - - Converter converter(reader, writer); - ProgressMonitor p; - converter.setProgressHandler(p.getNewHandler()); - - converter.exportN( TEST_N_ENTRIES ); - printf("Done exporting\n"); - - return 0; -} From a04519e671adc623f0dae45a6dfac0706949ee7f Mon Sep 17 00:00:00 2001 From: Matthias Wolf Date: Fri, 10 May 2024 08:56:42 +0200 Subject: [PATCH 02/26] Use sudo --- .github/workflows/test.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c12a28a..7e1a724 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -23,17 +23,17 @@ jobs: - name: Set up Apache Arrow repositories run: | - apt-get update - apt-get install -y ca-certificates lsb-release wget + sudo apt-get update + sudo apt-get install -y ca-certificates lsb-release wget wget https://apache.jfrog.io/artifactory/arrow/$(lsb_release --id --short | tr 'A-Z' 'a-z')/apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb - apt-get install -y ./apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb - apt-get update + sudo apt-get install -y ./apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb + sudo apt-get update - name: Install build dependencies run: | - apt-get install -y cmake g++ libhdf5-openmpi-dev librange-v3-dev ninja-build ${{ matrix.packages }} + sudo apt-get install -y cmake g++ libhdf5-openmpi-dev librange-v3-dev ninja-build ${{ matrix.packages }} ls -l /var/cache/apt/archives - apt-get install -y libarrow-dev libparquet-dev + sudo apt-get install -y libarrow-dev libparquet-dev ls -l /var/cache/apt/archives - name: Configure From bf0f60b3247147e17a975a7e353f61c2aa69c381 Mon Sep 17 00:00:00 2001 From: Matthias Wolf Date: Fri, 10 May 2024 09:08:49 +0200 Subject: [PATCH 03/26] Tune workflow --- .github/workflows/test.yml | 19 ++++++++++++++++--- Dockerfile | 1 + 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7e1a724..d3316df 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -31,10 +31,23 @@ jobs: - name: Install build dependencies run: | - sudo apt-get install -y cmake g++ libhdf5-openmpi-dev librange-v3-dev ninja-build ${{ matrix.packages }} - ls -l /var/cache/apt/archives + sudo apt-get install -y cmake g++ libhdf5-openmpi-dev librange-v3-dev ninja-build nlohmann-json3-dev ${{ matrix.packages }} sudo apt-get install -y libarrow-dev libparquet-dev - ls -l /var/cache/apt/archives + + - name: Clone HighFive + uses: actions/checkout@3 + if: ${{ ! matrix.submodules }} + with: + repository: BlueBrain/HighFive + path: HighFive + + - name: Install HighFive + if: ${{ ! matrix.submodules }} + run: | + cmake -B highfive_build -S highfive -DCMAKE_INSTALL_PREFIX=highfive_install + cmake --build highfive_build + cmake --install highfive_build + echo "CMAKE_PREFIX_PATH=$PWD/highfive_build" >> "$GITHUB_ENV" - name: Configure run: | diff --git a/Dockerfile b/Dockerfile index 47c5d06..05470dc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,6 +11,7 @@ RUN apt-get update \ librange-v3-dev \ lsb-release \ ninja-build \ + nlohmann-json3-dev \ wget RUN wget https://apache.jfrog.io/artifactory/arrow/$(lsb_release --id --short | tr 'A-Z' 'a-z')/apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb \ && apt-get install -y ./apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb \ From ba56e73927e21bf73d1d91f02d950f680e1ccc2a Mon Sep 17 00:00:00 2001 From: Matthias Wolf Date: Fri, 10 May 2024 09:11:01 +0200 Subject: [PATCH 04/26] Use right version --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d3316df..1de9e09 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -17,7 +17,7 @@ jobs: submodules: false steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: ${{ matrix.submodules }} @@ -35,7 +35,7 @@ jobs: sudo apt-get install -y libarrow-dev libparquet-dev - name: Clone HighFive - uses: actions/checkout@3 + uses: actions/checkout@v4 if: ${{ ! matrix.submodules }} with: repository: BlueBrain/HighFive From 31d5ae398f9210a09a0935b7013490c02ce52d25 Mon Sep 17 00:00:00 2001 From: Matthias Wolf Date: Fri, 10 May 2024 09:12:49 +0200 Subject: [PATCH 05/26] Matching paths --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1de9e09..ff3b9c5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -39,12 +39,12 @@ jobs: if: ${{ ! matrix.submodules }} with: repository: BlueBrain/HighFive - path: HighFive + path: highfive_source - name: Install HighFive if: ${{ ! matrix.submodules }} run: | - cmake -B highfive_build -S highfive -DCMAKE_INSTALL_PREFIX=highfive_install + cmake -B highfive_build -S highfive_source -DCMAKE_INSTALL_PREFIX=highfive_install cmake --build highfive_build cmake --install highfive_build echo "CMAKE_PREFIX_PATH=$PWD/highfive_build" >> "$GITHUB_ENV" From 39ed1a75e81fc4aceba69bc79e82e0323ce5e9a5 Mon Sep 17 00:00:00 2001 From: Matthias Wolf Date: Fri, 10 May 2024 09:17:37 +0200 Subject: [PATCH 06/26] Less highfive cruft --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ff3b9c5..9805da0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -44,7 +44,7 @@ jobs: - name: Install HighFive if: ${{ ! matrix.submodules }} run: | - cmake -B highfive_build -S highfive_source -DCMAKE_INSTALL_PREFIX=highfive_install + cmake -B highfive_build -S highfive_source -DCMAKE_INSTALL_PREFIX=highfive_install -DHIGHFIVE_UNIT_TESTS=OFF -DHIGHFIVE_EXAMPLES=OFF -DHIGHFIVE_BUILD_DOCS=OFF cmake --build highfive_build cmake --install highfive_build echo "CMAKE_PREFIX_PATH=$PWD/highfive_build" >> "$GITHUB_ENV" From 794e827b0e0017f437a66bde9c567e7c34c93124 Mon Sep 17 00:00:00 2001 From: Matthias Wolf Date: Fri, 10 May 2024 09:22:19 +0200 Subject: [PATCH 07/26] More path matching --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9805da0..d9ca28f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -47,7 +47,7 @@ jobs: cmake -B highfive_build -S highfive_source -DCMAKE_INSTALL_PREFIX=highfive_install -DHIGHFIVE_UNIT_TESTS=OFF -DHIGHFIVE_EXAMPLES=OFF -DHIGHFIVE_BUILD_DOCS=OFF cmake --build highfive_build cmake --install highfive_build - echo "CMAKE_PREFIX_PATH=$PWD/highfive_build" >> "$GITHUB_ENV" + echo "CMAKE_PREFIX_PATH=$PWD/highfive_install" >> "$GITHUB_ENV" - name: Configure run: | From 78218ae6e060bd893daa6ccaf91a137560d72644 Mon Sep 17 00:00:00 2001 From: Matthias Wolf Date: Fri, 10 May 2024 09:30:27 +0200 Subject: [PATCH 08/26] Run tests --- .github/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d9ca28f..8f0926e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -53,3 +53,4 @@ jobs: run: | cmake -B build -S . -GNinja \ -DCMAKE_CXX_COMPILER=$(which mpicxx) + cd build && ctest -VV From 7d43a22ee3562d672826613f730e46b7628cf16d Mon Sep 17 00:00:00 2001 From: Matthias Wolf Date: Fri, 10 May 2024 09:37:00 +0200 Subject: [PATCH 09/26] Actually build --- .github/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8f0926e..e59fd45 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -53,4 +53,5 @@ jobs: run: | cmake -B build -S . -GNinja \ -DCMAKE_CXX_COMPILER=$(which mpicxx) + cmake --build build cd build && ctest -VV From 50095665883b5ac63520b4b4b08bdcdc56d075e4 Mon Sep 17 00:00:00 2001 From: Matthias Wolf Date: Fri, 10 May 2024 10:08:15 +0200 Subject: [PATCH 10/26] =?UTF-8?q?D-=F0=9F=90=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e59fd45..e54a3b9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -51,6 +51,7 @@ jobs: - name: Configure run: | + echo $CMAKE_PREFIX_PATH cmake -B build -S . -GNinja \ -DCMAKE_CXX_COMPILER=$(which mpicxx) cmake --build build From 1ebf8f0359be598786f27c7853957ae0fd3e1098 Mon Sep 17 00:00:00 2001 From: Matthias Wolf Date: Fri, 10 May 2024 10:10:43 +0200 Subject: [PATCH 11/26] =?UTF-8?q?D-=F0=9F=90=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e54a3b9..647e4f2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -44,6 +44,7 @@ jobs: - name: Install HighFive if: ${{ ! matrix.submodules }} run: | + echo $CMAKE_PREFIX_PATH cmake -B highfive_build -S highfive_source -DCMAKE_INSTALL_PREFIX=highfive_install -DHIGHFIVE_UNIT_TESTS=OFF -DHIGHFIVE_EXAMPLES=OFF -DHIGHFIVE_BUILD_DOCS=OFF cmake --build highfive_build cmake --install highfive_build From 28f58ec70def000942805f45ecc18da49232166b Mon Sep 17 00:00:00 2001 From: Matthias Wolf Date: Fri, 10 May 2024 10:14:09 +0200 Subject: [PATCH 12/26] =?UTF-8?q?D-=F0=9F=90=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 647e4f2..4b17305 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -44,7 +44,6 @@ jobs: - name: Install HighFive if: ${{ ! matrix.submodules }} run: | - echo $CMAKE_PREFIX_PATH cmake -B highfive_build -S highfive_source -DCMAKE_INSTALL_PREFIX=highfive_install -DHIGHFIVE_UNIT_TESTS=OFF -DHIGHFIVE_EXAMPLES=OFF -DHIGHFIVE_BUILD_DOCS=OFF cmake --build highfive_build cmake --install highfive_build @@ -52,6 +51,7 @@ jobs: - name: Configure run: | + ls -l /usr/include/catch2 echo $CMAKE_PREFIX_PATH cmake -B build -S . -GNinja \ -DCMAKE_CXX_COMPILER=$(which mpicxx) From 940d2cec54e36ce542ff83893ec3fda9231d7dd4 Mon Sep 17 00:00:00 2001 From: Matthias Wolf Date: Fri, 10 May 2024 10:16:36 +0200 Subject: [PATCH 13/26] =?UTF-8?q?D-=F0=9F=90=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4b17305..582b3f1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -51,7 +51,7 @@ jobs: - name: Configure run: | - ls -l /usr/include/catch2 + ls -l /usr/include/catch2 || true echo $CMAKE_PREFIX_PATH cmake -B build -S . -GNinja \ -DCMAKE_CXX_COMPILER=$(which mpicxx) From 67da624fe3eef73f3f0ca46408a4605230ef3fb1 Mon Sep 17 00:00:00 2001 From: Matthias Wolf Date: Fri, 10 May 2024 10:29:52 +0200 Subject: [PATCH 14/26] Ubuntu latest on GH is too old --- .github/workflows/test.yml | 40 +++++++++++++------------------------- Dockerfile | 7 +++++++ 2 files changed, 20 insertions(+), 27 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 582b3f1..846d15e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -6,20 +6,13 @@ on: pull_request: jobs: - build: + build_w_submodules: runs-on: ubuntu-latest - strategy: - matrix: - packages: [""] - submodules: [true] - include: - - packages: "catch2 libcli11-dev" - submodules: false steps: - uses: actions/checkout@v4 with: - submodules: ${{ matrix.submodules }} + submodules: true - name: Set up Apache Arrow repositories run: | @@ -31,29 +24,22 @@ jobs: - name: Install build dependencies run: | - sudo apt-get install -y cmake g++ libhdf5-openmpi-dev librange-v3-dev ninja-build nlohmann-json3-dev ${{ matrix.packages }} + sudo apt-get install -y cmake g++ libhdf5-openmpi-dev librange-v3-dev ninja-build nlohmann-json3-dev sudo apt-get install -y libarrow-dev libparquet-dev - - name: Clone HighFive - uses: actions/checkout@v4 - if: ${{ ! matrix.submodules }} - with: - repository: BlueBrain/HighFive - path: highfive_source - - - name: Install HighFive - if: ${{ ! matrix.submodules }} - run: | - cmake -B highfive_build -S highfive_source -DCMAKE_INSTALL_PREFIX=highfive_install -DHIGHFIVE_UNIT_TESTS=OFF -DHIGHFIVE_EXAMPLES=OFF -DHIGHFIVE_BUILD_DOCS=OFF - cmake --build highfive_build - cmake --install highfive_build - echo "CMAKE_PREFIX_PATH=$PWD/highfive_install" >> "$GITHUB_ENV" - - name: Configure run: | - ls -l /usr/include/catch2 || true - echo $CMAKE_PREFIX_PATH cmake -B build -S . -GNinja \ -DCMAKE_CXX_COMPILER=$(which mpicxx) cmake --build build cd build && ctest -VV + + build_docker_no_submodules: + runs-on: ubuntu-latest + steps: + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Build + uses: docker/build-push-action@v5 diff --git a/Dockerfile b/Dockerfile index 05470dc..a9f0c81 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,6 +20,13 @@ RUN wget https://apache.jfrog.io/artifactory/arrow/$(lsb_release --id --short | libarrow-dev \ libparquet-dev +RUN mkdir /highfive \ + && git clone https://github.com/BlueBrain/HighFive /highfive/src \ + && cmake -B /highfive/build -S /highfive/src -DCMAKE_INSTALL_PREFIX=/highfive/install -DHIGHFIVE_UNIT_TESTS=OFF -DHIGHFIVE_EXAMPLES=OFF -DHIGHFIVE_BUILD_DOCS=OFF \ + && cmake --build /highfive/build \ + && cmake --install /highfive/build + +ENV CMAKE_PREFIX_PATH=/highfive/install ENV OMPI_ALLOW_RUN_AS_ROOT=1 ENV OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1 From 43582f52b11de181036731888ec1f28750643ae3 Mon Sep 17 00:00:00 2001 From: Matthias Wolf Date: Fri, 10 May 2024 10:32:26 +0200 Subject: [PATCH 15/26] Include git in dockre --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index a9f0c81..161a6d2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,6 +6,7 @@ RUN apt-get update \ catch2 \ cmake \ g++ \ + git \ libcli11-dev \ libhdf5-openmpi-dev \ librange-v3-dev \ From 11395fa3a69c95682967496bdfdf07990f615bdc Mon Sep 17 00:00:00 2001 From: Matthias Wolf Date: Fri, 10 May 2024 10:44:42 +0200 Subject: [PATCH 16/26] Add dockre context --- .github/workflows/test.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 846d15e..48a622c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -37,9 +37,13 @@ jobs: build_docker_no_submodules: runs-on: ubuntu-latest steps: + - name: Checkout + uses: actions/checkout@v4 - name: Set up QEMU uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - name: Build uses: docker/build-push-action@v5 + with: + context: .:workspace From d02c1c7817324428568219f5630f653c2ac4c352 Mon Sep 17 00:00:00 2001 From: Matthias Wolf Date: Fri, 10 May 2024 10:47:21 +0200 Subject: [PATCH 17/26] Is context in local directory? --- .github/workflows/test.yml | 2 -- Dockerfile | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 48a622c..43b3cbe 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -45,5 +45,3 @@ jobs: uses: docker/setup-buildx-action@v3 - name: Build uses: docker/build-push-action@v5 - with: - context: .:workspace diff --git a/Dockerfile b/Dockerfile index 161a6d2..e4f51e3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -31,7 +31,7 @@ ENV CMAKE_PREFIX_PATH=/highfive/install ENV OMPI_ALLOW_RUN_AS_ROOT=1 ENV OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1 -RUN cmake -GNinja -B /build -S /workspace -DCMAKE_CXX_COMPILER=/usr/bin/mpicxx \ +RUN cmake -GNinja -B /build -S . -DCMAKE_CXX_COMPILER=/usr/bin/mpicxx \ && cmake --build /build \ && cmake --install /build \ && cd /build \ From 045f0dc394991d2a06b6f46111bd8c1b81cc1992 Mon Sep 17 00:00:00 2001 From: Matthias Wolf Date: Fri, 10 May 2024 11:00:05 +0200 Subject: [PATCH 18/26] Copy sources --- Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index e4f51e3..169fbb9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -31,7 +31,9 @@ ENV CMAKE_PREFIX_PATH=/highfive/install ENV OMPI_ALLOW_RUN_AS_ROOT=1 ENV OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1 -RUN cmake -GNinja -B /build -S . -DCMAKE_CXX_COMPILER=/usr/bin/mpicxx \ +COPY . /src + +RUN cmake -GNinja -B /build -S /src -DCMAKE_CXX_COMPILER=/usr/bin/mpicxx \ && cmake --build /build \ && cmake --install /build \ && cd /build \ From eac66cebd1ac47ae63ea5fbe4de711c749c70891 Mon Sep 17 00:00:00 2001 From: Matthias Wolf Date: Fri, 10 May 2024 11:03:13 +0200 Subject: [PATCH 19/26] Try to run with only 2 ranks --- tests/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 7c4a9f6..88dd8ac 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -7,7 +7,7 @@ find_program( DOC "Executable for running MPI programs.") add_test(NAME parquet2hdf5_mpi - COMMAND ${mpi_launcher} -n 4 $ + COMMAND ${mpi_launcher} -n 2 $ ${CMAKE_CURRENT_SOURCE_DIR}/parquets edges_n4.h5 All) add_test(NAME touches_conversion_v1 From 7de0c67612304241ddbdb640a675c22abbc14c06 Mon Sep 17 00:00:00 2001 From: Matthias Wolf Date: Fri, 10 May 2024 11:09:11 +0200 Subject: [PATCH 20/26] Allow to oversubscribe --- .github/workflows/test.yml | 1 + Dockerfile | 1 + tests/CMakeLists.txt | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 43b3cbe..7e624d2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -29,6 +29,7 @@ jobs: - name: Configure run: | + export PRTE_MCA_rmaps_default_mapping_policy=:oversubscribe cmake -B build -S . -GNinja \ -DCMAKE_CXX_COMPILER=$(which mpicxx) cmake --build build diff --git a/Dockerfile b/Dockerfile index 169fbb9..a02e699 100644 --- a/Dockerfile +++ b/Dockerfile @@ -30,6 +30,7 @@ RUN mkdir /highfive \ ENV CMAKE_PREFIX_PATH=/highfive/install ENV OMPI_ALLOW_RUN_AS_ROOT=1 ENV OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1 +ENV PRTE_MCA_rmaps_default_mapping_policy=:oversubscribe COPY . /src diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 88dd8ac..7c4a9f6 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -7,7 +7,7 @@ find_program( DOC "Executable for running MPI programs.") add_test(NAME parquet2hdf5_mpi - COMMAND ${mpi_launcher} -n 2 $ + COMMAND ${mpi_launcher} -n 4 $ ${CMAKE_CURRENT_SOURCE_DIR}/parquets edges_n4.h5 All) add_test(NAME touches_conversion_v1 From 852e36ac0d760427f4ac48c5593712aea1037cc5 Mon Sep 17 00:00:00 2001 From: Matthias Wolf Date: Fri, 10 May 2024 11:18:22 +0200 Subject: [PATCH 21/26] No real parallelism --- .github/workflows/test.yml | 1 - Dockerfile | 1 - 2 files changed, 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7e624d2..43b3cbe 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -29,7 +29,6 @@ jobs: - name: Configure run: | - export PRTE_MCA_rmaps_default_mapping_policy=:oversubscribe cmake -B build -S . -GNinja \ -DCMAKE_CXX_COMPILER=$(which mpicxx) cmake --build build diff --git a/Dockerfile b/Dockerfile index a02e699..169fbb9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -30,7 +30,6 @@ RUN mkdir /highfive \ ENV CMAKE_PREFIX_PATH=/highfive/install ENV OMPI_ALLOW_RUN_AS_ROOT=1 ENV OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1 -ENV PRTE_MCA_rmaps_default_mapping_policy=:oversubscribe COPY . /src From 28006f546af84458581eaa175bd6b2a3eec97b93 Mon Sep 17 00:00:00 2001 From: Matthias Wolf Date: Fri, 10 May 2024 11:25:37 +0200 Subject: [PATCH 22/26] Actually "unset" parallelism --- tests/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 7c4a9f6..ce2cb58 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -7,7 +7,7 @@ find_program( DOC "Executable for running MPI programs.") add_test(NAME parquet2hdf5_mpi - COMMAND ${mpi_launcher} -n 4 $ + COMMAND ${mpi_launcher} -n 1 $ ${CMAKE_CURRENT_SOURCE_DIR}/parquets edges_n4.h5 All) add_test(NAME touches_conversion_v1 From 68332ac56222f01b24ae5e8b16f9f16db0ab9618 Mon Sep 17 00:00:00 2001 From: Matthias Wolf Date: Fri, 10 May 2024 12:04:22 +0200 Subject: [PATCH 23/26] Update .github/workflows/test.yml Co-authored-by: Luc Grosheintz --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 43b3cbe..171d2ad 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -32,7 +32,7 @@ jobs: cmake -B build -S . -GNinja \ -DCMAKE_CXX_COMPILER=$(which mpicxx) cmake --build build - cd build && ctest -VV + ctest --test-dir build --output-on-failure build_docker_no_submodules: runs-on: ubuntu-latest From 7bfa03bd493eb451beb16e13696ee7beb4a549eb Mon Sep 17 00:00:00 2001 From: Matthias Wolf Date: Fri, 10 May 2024 12:09:12 +0200 Subject: [PATCH 24/26] Try VOLUME in Dockrefile --- Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Dockerfile b/Dockerfile index 169fbb9..d290bca 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,6 +21,7 @@ RUN wget https://apache.jfrog.io/artifactory/arrow/$(lsb_release --id --short | libarrow-dev \ libparquet-dev +VOLUME /highfive RUN mkdir /highfive \ && git clone https://github.com/BlueBrain/HighFive /highfive/src \ && cmake -B /highfive/build -S /highfive/src -DCMAKE_INSTALL_PREFIX=/highfive/install -DHIGHFIVE_UNIT_TESTS=OFF -DHIGHFIVE_EXAMPLES=OFF -DHIGHFIVE_BUILD_DOCS=OFF \ @@ -31,6 +32,7 @@ ENV CMAKE_PREFIX_PATH=/highfive/install ENV OMPI_ALLOW_RUN_AS_ROOT=1 ENV OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1 +VOLUME /src COPY . /src RUN cmake -GNinja -B /build -S /src -DCMAKE_CXX_COMPILER=/usr/bin/mpicxx \ From a1e0304c33253874e84a79be20ad8a9b74b44933 Mon Sep 17 00:00:00 2001 From: Matthias Wolf Date: Fri, 10 May 2024 12:14:58 +0200 Subject: [PATCH 25/26] VOLUME creates directory --- Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index d290bca..846fb85 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,8 +22,7 @@ RUN wget https://apache.jfrog.io/artifactory/arrow/$(lsb_release --id --short | libparquet-dev VOLUME /highfive -RUN mkdir /highfive \ - && git clone https://github.com/BlueBrain/HighFive /highfive/src \ +RUN git clone https://github.com/BlueBrain/HighFive /highfive/src \ && cmake -B /highfive/build -S /highfive/src -DCMAKE_INSTALL_PREFIX=/highfive/install -DHIGHFIVE_UNIT_TESTS=OFF -DHIGHFIVE_EXAMPLES=OFF -DHIGHFIVE_BUILD_DOCS=OFF \ && cmake --build /highfive/build \ && cmake --install /highfive/build From 5f98fd0d5a970246205a2f140bb8ba254daad9eb Mon Sep 17 00:00:00 2001 From: Matthias Wolf Date: Fri, 10 May 2024 12:18:46 +0200 Subject: [PATCH 26/26] Cleaner --- Dockerfile | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 846fb85..ac95d1f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -31,11 +31,10 @@ ENV CMAKE_PREFIX_PATH=/highfive/install ENV OMPI_ALLOW_RUN_AS_ROOT=1 ENV OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1 -VOLUME /src -COPY . /src +VOLUME /workspace +COPY . /workspace/src -RUN cmake -GNinja -B /build -S /src -DCMAKE_CXX_COMPILER=/usr/bin/mpicxx \ - && cmake --build /build \ - && cmake --install /build \ - && cd /build \ - && ctest --output-on-failure +RUN cmake -GNinja -B /workspace/build -S /workspace/src -DCMAKE_CXX_COMPILER=/usr/bin/mpicxx \ + && cmake --build /workspace/build \ + && cmake --install /workspace/build \ + && ctest --test-dir /workspace/build --output-on-failure